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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
376d41ecd5f3c5cbfc74b2b48fe78deb6dc88f8d | 229 | py | Python | LaundrIT-Project/Home/admin.py | linikerunk/laundr-it | 79d5403d897233e9354db2d6ec91393117eac24f | [
"MIT"
] | 1 | 2019-11-17T22:28:01.000Z | 2019-11-17T22:28:01.000Z | LaundrIT-Project/Home/admin.py | linikerunk/laundr-it | 79d5403d897233e9354db2d6ec91393117eac24f | [
"MIT"
] | 4 | 2021-04-08T18:43:19.000Z | 2021-06-10T17:57:30.000Z | LaundrIT-Project/Home/admin.py | linikerunk/laundr-it | 79d5403d897233e9354db2d6ec91393117eac24f | [
"MIT"
] | 1 | 2019-11-24T04:47:45.000Z | 2019-11-24T04:47:45.000Z | from django.contrib import admin
from .models import Cliente
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
# Register your models here.
admin.site.register(Cliente)
| 28.625 | 64 | 0.829694 | 33 | 229 | 5.757576 | 0.484848 | 0.157895 | 0.268421 | 0.221053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.10917 | 229 | 7 | 65 | 32.714286 | 0.931373 | 0.113537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.8 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
808b7170352d8ce0490edfa0893142b2d9f538ee | 196 | py | Python | examples/readme/props/test_props.py | abilian/viewdom | 9ceed007e67606c9a0125633132b4af3fdaf8680 | [
"MIT"
] | 3 | 2020-06-19T21:10:00.000Z | 2021-02-22T12:34:17.000Z | examples/readme/props/test_props.py | abilian/viewdom | 9ceed007e67606c9a0125633132b4af3fdaf8680 | [
"MIT"
] | 32 | 2020-05-22T22:15:50.000Z | 2022-03-31T02:24:21.000Z | examples/readme/props/test_props.py | abilian/viewdom | 9ceed007e67606c9a0125633132b4af3fdaf8680 | [
"MIT"
] | 2 | 2020-05-22T20:18:09.000Z | 2022-01-08T15:31:55.000Z | """Test an example."""
from . import main
def test_readme_props() -> None:
"""Ensure the demo matches expected."""
assert main() == '<div id="id-42" title="viewdom">Hello viewdom</div>'
| 24.5 | 74 | 0.637755 | 27 | 196 | 4.555556 | 0.814815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01227 | 0.168367 | 196 | 7 | 75 | 28 | 0.742331 | 0.255102 | 0 | 0 | 0 | 0 | 0.377778 | 0.155556 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
80bf7a38344860c2348a304798f8ff60dbaa012d | 45 | py | Python | tellurium/analysis/__init__.py | stanleygu/tellurium | bfa6898eb4b632b31c4d12c0b0c78ce704a1d898 | [
"Apache-2.0"
] | null | null | null | tellurium/analysis/__init__.py | stanleygu/tellurium | bfa6898eb4b632b31c4d12c0b0c78ce704a1d898 | [
"Apache-2.0"
] | null | null | null | tellurium/analysis/__init__.py | stanleygu/tellurium | bfa6898eb4b632b31c4d12c0b0c78ce704a1d898 | [
"Apache-2.0"
] | null | null | null | from match import *
from parameters import *
| 15 | 24 | 0.777778 | 6 | 45 | 5.833333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177778 | 45 | 2 | 25 | 22.5 | 0.945946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
20da696403242bdf58ed785dabb3327f3365ad2e | 19 | py | Python | __init__.py | hover2pi/pysynphot2d | e9e4aa8adc1ddfaece3529af58de1e6b100fe68c | [
"MIT"
] | null | null | null | __init__.py | hover2pi/pysynphot2d | e9e4aa8adc1ddfaece3529af58de1e6b100fe68c | [
"MIT"
] | null | null | null | __init__.py | hover2pi/pysynphot2d | e9e4aa8adc1ddfaece3529af58de1e6b100fe68c | [
"MIT"
] | null | null | null | from . import psp2d | 19 | 19 | 0.789474 | 3 | 19 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0625 | 0.157895 | 19 | 1 | 19 | 19 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
20de19ac6c0eb3e2903d09f2b04ea812287c1c6b | 3,854 | py | Python | spaic/Network/Construct.py | ZhejianglabNCRC/SPAIC | 5a08328adcc5a197316cf353746bae7ab6865337 | [
"Apache-2.0"
] | 3 | 2022-03-01T03:04:25.000Z | 2022-03-01T03:07:15.000Z | spaic/Network/Construct.py | ZhejianglabNCRC/SPAIC | 5a08328adcc5a197316cf353746bae7ab6865337 | [
"Apache-2.0"
] | null | null | null | spaic/Network/Construct.py | ZhejianglabNCRC/SPAIC | 5a08328adcc5a197316cf353746bae7ab6865337 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on 2020/12/23
@project: SPAIC
@filename: WithBuildFuncs
@author: Hong Chaofei
@contact: hongchf@gmail.com
@description:
"""
from ..Network.Assembly import Assembly
import spaic
# ================= Assembly Functions used in with ==========================
def add_assembly(name, assembly):
context = spaic.global_assembly_context_list
assert len(context) >0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.add_assembly(name, assembly)
spaic.global_assembly_init_count -= 1
def del_assembly(assembly=None, name=None):
context = spaic.global_assembly_context_list
assert len(context) >0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.del_assembly(name, assembly)
spaic.global_assembly_init_count -= 1
def add_connection(name, connection):
context = spaic.global_assembly_context_list
assert len(context) >0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.add_connection(name, connection)
spaic.global_assembly_init_count -= 1
def del_connection(connection=None, name=None):
context = spaic.global_assembly_context_list
assert len(context) >0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.del_connection(connection, name)
spaic.global_assembly_init_count -= 1
def copy_assembly(name, assembly):
context = spaic.global_assembly_context_list
assert len(context) > 0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.copy_assembly(name, assembly)
spaic.global_assembly_init_count -= 1
def replace_assembly(old_assembly, new_assembly):
context = spaic.global_assembly_context_list
assert len(context) > 0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.replace_assembly(old_assembly, new_assembly)
spaic.global_assembly_init_count -= 1
def merge_assembly(assembly):
context = spaic.global_assembly_context_list
assert len(context) > 0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
self.merge_assembly(assembly)
spaic.global_assembly_init_count -= 1
def select_assembly( assemblies, name=None):
context = spaic.global_assembly_context_list
assert len(context) > 0, "use global assembly build functions outside of the 'with' context"
assert isinstance(context[-1], Assembly), "the object of the context is not an Assembly"
spaic.global_assembly_init_count += 1
self = context[-1]
if name is None:
new_asb = self.select_assembly(assemblies, context)
else:
new_asb = self.select_assembly(assemblies, name)
spaic.global_assembly_init_count -= 1
return new_asb | 38.54 | 96 | 0.730929 | 528 | 3,854 | 5.153409 | 0.123106 | 0.164645 | 0.167585 | 0.135244 | 0.857405 | 0.857405 | 0.811099 | 0.785741 | 0.742374 | 0.742374 | 0 | 0.015313 | 0.169694 | 3,854 | 100 | 97 | 38.54 | 0.835 | 0.059419 | 0 | 0.685714 | 0 | 0 | 0.241084 | 0 | 0 | 0 | 0 | 0 | 0.228571 | 1 | 0.114286 | false | 0 | 0.028571 | 0 | 0.157143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
45671fa3e0a4964c22ade0d7ea890bca57c5175a | 3,335 | py | Python | tests/test_rekcurd_operator.py | rekcurd/airflow-plugin | f63e030c45e53e449dbccc505dab990ec5aab343 | [
"Apache-2.0"
] | 4 | 2019-03-06T01:08:04.000Z | 2019-04-25T00:52:57.000Z | tests/test_rekcurd_operator.py | rekcurd/airflow-plugin | f63e030c45e53e449dbccc505dab990ec5aab343 | [
"Apache-2.0"
] | 3 | 2019-05-22T09:23:54.000Z | 2019-07-07T06:39:03.000Z | tests/test_rekcurd_operator.py | rekcurd/airflow-plugin | f63e030c45e53e449dbccc505dab990ec5aab343 | [
"Apache-2.0"
] | 2 | 2019-06-21T02:56:29.000Z | 2020-01-05T06:33:27.000Z | import unittest
from datetime import datetime
from unittest.mock import Mock, patch
from airflow import DAG
from airflow.models import Variable
from rekcurd_airflow.operators.rekcurd_operator import RekcurdOperator
class TestRekcurdOperator(unittest.TestCase):
@staticmethod
def setUpClass():
Variable.set('rekcurd_access_token', 'my_token')
@staticmethod
def tearDownClass():
Variable.set('rekcurd_access_token', None)
def setUp(self):
self.dag = DAG(dag_id='test_rekcurd_operator', start_date=datetime.now())
@patch("rekcurd_airflow.operators.rekcurd_operator.HttpHook")
def test_rekcurd_operator(self, http_hook_class_mock):
http_hook_mock = Mock()
http_hook_class_mock.return_value = http_hook_mock
http_hook_mock.run.return_value = Mock(text='success')
task = RekcurdOperator(task_id='rekcurd_api',
dag=self.dag,
timeout=100,
method='POST',
endpoint='api/test')
context = None
result = task.execute(context)
self.assertEqual(result, 'success')
http_hook_class_mock.assert_called_with('POST', http_conn_id='rekcurd_dashboard')
http_hook_mock.run.assert_called_with(
'api/test', {}, {'Authorization': 'Bearer my_token'}, {'timeout': 100}
)
@patch("rekcurd_airflow.operators.rekcurd_operator.HttpHook")
def test_rekcurd_operator_with_extra_options(self, http_hook_class_mock):
http_hook_mock = Mock()
http_hook_class_mock.return_value = http_hook_mock
http_hook_mock.run.return_value = Mock(text='success')
task = RekcurdOperator(task_id='rekcurd_api',
dag=self.dag,
timeout=100,
method='POST',
extra_options={'a': 'b'},
endpoint='api/test')
context = None
result = task.execute(context)
self.assertEqual(result, 'success')
http_hook_class_mock.assert_called_with('POST', http_conn_id='rekcurd_dashboard')
http_hook_mock.run.assert_called_with(
'api/test', {}, {'Authorization': 'Bearer my_token'}, {'a': 'b', 'timeout': 100}
)
@patch("rekcurd_airflow.operators.rekcurd_operator.HttpHook")
def test_rekcurd_operator_with_extra_timeout_options(self, http_hook_class_mock):
http_hook_mock = Mock()
http_hook_class_mock.return_value = http_hook_mock
http_hook_mock.run.return_value = Mock(text='success')
task = RekcurdOperator(task_id='rekcurd_api',
dag=self.dag,
timeout=100,
method='POST',
extra_options={'a': 'b', 'timeout': 300},
endpoint='api/test')
context = None
result = task.execute(context)
self.assertEqual(result, 'success')
http_hook_class_mock.assert_called_with('POST', http_conn_id='rekcurd_dashboard')
http_hook_mock.run.assert_called_with(
'api/test', {}, {'Authorization': 'Bearer my_token'}, {'a': 'b', 'timeout': 300}
)
| 39.235294 | 92 | 0.607496 | 364 | 3,335 | 5.239011 | 0.175824 | 0.088096 | 0.075511 | 0.080231 | 0.823283 | 0.772942 | 0.772942 | 0.772942 | 0.772942 | 0.772942 | 0 | 0.00885 | 0.288456 | 3,335 | 84 | 93 | 39.702381 | 0.794775 | 0 | 0 | 0.647059 | 0 | 0 | 0.161919 | 0.052174 | 0 | 0 | 0 | 0 | 0.132353 | 1 | 0.088235 | false | 0 | 0.088235 | 0 | 0.191176 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
4582cdb3b1182d6d44325c5372f7697a6bcb9027 | 366 | py | Python | src/dstools/pipeline/sources/__init__.py | edublancas/python-ds-tools | 1da2337961db9c50562349c28c9115d3a7cc6c0c | [
"MIT"
] | 1 | 2021-11-02T05:48:00.000Z | 2021-11-02T05:48:00.000Z | src/dstools/pipeline/sources/__init__.py | edublancas/python-ds-tools | 1da2337961db9c50562349c28c9115d3a7cc6c0c | [
"MIT"
] | 8 | 2016-05-25T01:50:14.000Z | 2021-03-03T14:52:36.000Z | src/dstools/pipeline/sources/__init__.py | edublancas/dstools | 1da2337961db9c50562349c28c9115d3a7cc6c0c | [
"MIT"
] | null | null | null | from dstools.pipeline.sources.sources import (PythonCallableSource,
SQLScriptSource,
SQLQuerySource,
GenericSource)
__all__ = ['PythonCallableSource', 'SQLScriptSource',
'SQLQuerySource',
'GenericSource']
| 40.666667 | 67 | 0.464481 | 15 | 366 | 11.066667 | 0.666667 | 0.421687 | 0.590361 | 0.746988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.47541 | 366 | 8 | 68 | 45.75 | 0.864583 | 0 | 0 | 0 | 0 | 0 | 0.169399 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 0 | 1 | 0 | 1 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
45a2e93e94287338674fc91165ba471d66bb3ad1 | 40 | py | Python | flaskipy/__init__.py | osmangoninahid/flaskipy | faa563fd74c831d9caabb23a4136d9a970c7a336 | [
"MIT"
] | 19 | 2018-04-09T07:51:46.000Z | 2019-06-20T16:34:34.000Z | flaskipy/__init__.py | osmangoninahid/flaskipy | faa563fd74c831d9caabb23a4136d9a970c7a336 | [
"MIT"
] | null | null | null | flaskipy/__init__.py | osmangoninahid/flaskipy | faa563fd74c831d9caabb23a4136d9a970c7a336 | [
"MIT"
] | 10 | 2018-04-18T20:30:44.000Z | 2021-03-20T06:57:37.000Z | # coding=utf-8
from .commands import cli | 20 | 25 | 0.775 | 7 | 40 | 4.428571 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028571 | 0.125 | 40 | 2 | 25 | 20 | 0.857143 | 0.3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
45c685b0b8888dc734966f79dcf51cf92c240bf1 | 22 | py | Python | gradcop/__init__.py | nomadiq/maunakini | 835cf11573129ce5e614382c4d12f3bc9be4c6c5 | [
"MIT"
] | 1 | 2022-02-03T16:28:54.000Z | 2022-02-03T16:28:54.000Z | gradcop/__init__.py | nomadiq/maunakini | 835cf11573129ce5e614382c4d12f3bc9be4c6c5 | [
"MIT"
] | null | null | null | gradcop/__init__.py | nomadiq/maunakini | 835cf11573129ce5e614382c4d12f3bc9be4c6c5 | [
"MIT"
] | 1 | 2022-02-03T16:25:59.000Z | 2022-02-03T16:25:59.000Z | from .gradcop import * | 22 | 22 | 0.772727 | 3 | 22 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.894737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
45ddd5a0ba128f222225bfed1042a34727139ee4 | 366 | py | Python | Database_communication/safeBrowsing/database_playground.py | DonSimerino/CODE---DaWeSys | b678c153724e18117f9c03c85b9b3294a02ad693 | [
"MIT",
"BSD-3-Clause",
"Unlicense"
] | 1 | 2021-04-28T17:50:31.000Z | 2021-04-28T17:50:31.000Z | Database_communication/safeBrowsing/database_playground.py | DonSimerino/CODE---DaWeSys | b678c153724e18117f9c03c85b9b3294a02ad693 | [
"MIT",
"BSD-3-Clause",
"Unlicense"
] | null | null | null | Database_communication/safeBrowsing/database_playground.py | DonSimerino/CODE---DaWeSys | b678c153724e18117f9c03c85b9b3294a02ad693 | [
"MIT",
"BSD-3-Clause",
"Unlicense"
] | 1 | 2021-08-19T19:07:36.000Z | 2021-08-19T19:07:36.000Z | import sqlite3
def connect_db():
return sqlite3.connect('whotracksme.db')
def connect_db_top500():
return sqlite3.connect('top500webpages.db')
def connect_db_labels():
return sqlite3.connect('labels.db')
def connect_phishcore_db():
return sqlite3.connect('phishstats.db')
def connect_new_labels():
return sqlite3.connect('newlabels.db')
| 17.428571 | 47 | 0.737705 | 46 | 366 | 5.673913 | 0.304348 | 0.191571 | 0.383142 | 0.168582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038095 | 0.139344 | 366 | 20 | 48 | 18.3 | 0.790476 | 0 | 0 | 0 | 0 | 0 | 0.178082 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.454545 | true | 0 | 0.090909 | 0.454545 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
afea33eb095012b8507e4b3446c90c0958fd6efc | 3,042 | py | Python | fm_solver/feature_model/restriction.py | fpiedrah/FM-Solver | dea8a110b5af78598c3f22401b25099730d2b35e | [
"MIT"
] | 1 | 2022-03-17T20:56:13.000Z | 2022-03-17T20:56:13.000Z | fm_solver/feature_model/restriction.py | fpiedrah/FM-Solver | dea8a110b5af78598c3f22401b25099730d2b35e | [
"MIT"
] | null | null | null | fm_solver/feature_model/restriction.py | fpiedrah/FM-Solver | dea8a110b5af78598c3f22401b25099730d2b35e | [
"MIT"
] | null | null | null | import dataclasses
import typing
from fm_solver.feature_model import feature
@dataclasses.dataclass
class Cardinality:
lower_bound: int
upper_bound: int
@dataclasses.dataclass
class Restriction:
source: typing.Optional[feature.Feature]
destination: typing.Optional[typing.List[feature.Feature]]
cardinality: Cardinality
class Root(Restriction):
def __init__(self, source: feature.Feature) -> None:
super().__init__(
source=source,
destination=[source],
cardinality=Cardinality(lower_bound=1, upper_bound=1),
)
class Mandatory(Restriction):
def __init__(self, source: feature.Feature, destination: feature.Feature) -> None:
super().__init__(
source=source,
destination=[destination],
cardinality=Cardinality(lower_bound=1, upper_bound=1),
)
class Optional(Restriction):
def __init__(self, source: feature.Feature, destination: feature.Feature) -> None:
super().__init__(
source=source,
destination=[destination],
cardinality=Cardinality(lower_bound=1, upper_bound=1),
)
class Requires(Restriction):
def __init__(self, source: feature.Feature, destination: feature.Feature) -> None:
super().__init__(
source=source,
destination=[destination],
cardinality=Cardinality(lower_bound=1, upper_bound=1),
)
class Excludes(Restriction):
def __init__(self, source: feature.Feature, destination: feature.Feature) -> None:
super().__init__(
source=source,
destination=[destination],
cardinality=Cardinality(lower_bound=1, upper_bound=1),
)
class And(Restriction):
def __init__(
self, source: feature.Feature, destination: typing.List[feature.Feature]
) -> None:
super().__init__(
source=source,
destination=destination,
cardinality=Cardinality(
lower_bound=len(destination), upper_bound=len(destination)
),
)
class Or(Restriction):
def __init__(
self, source: feature.Feature, destination: typing.List[feature.Feature]
) -> None:
super().__init__(
source=source,
destination=destination,
cardinality=Cardinality(lower_bound=1, upper_bound=len(destination)),
)
class Xor(Restriction):
def __init__(
self, source: feature.Feature, destination: typing.List[feature.Feature]
) -> None:
super().__init__(
source=source,
destination=destination,
cardinality=Cardinality(lower_bound=1, upper_bound=1),
)
class Range(Restriction):
def __init__(
self,
source: feature.Feature,
destination: typing.List[feature.Feature],
cardinality: Cardinality,
) -> None:
super().__init__(
source=source, destination=destination, cardinality=cardinality
)
| 27.654545 | 86 | 0.633465 | 286 | 3,042 | 6.416084 | 0.122378 | 0.144959 | 0.102997 | 0.107902 | 0.837602 | 0.811444 | 0.774387 | 0.759128 | 0.73188 | 0.667575 | 0 | 0.005798 | 0.262985 | 3,042 | 109 | 87 | 27.908257 | 0.812667 | 0 | 0 | 0.546512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.104651 | false | 0 | 0.034884 | 0 | 0.325581 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
b32c90c69710ac72f756abcb7c83fb887f014817 | 132 | py | Python | attendees/persons/services/__init__.py | xjlin0/-attendees30 | 48a2f2cbec11ec471d7a40d24903b48890feebf9 | [
"MIT"
] | null | null | null | attendees/persons/services/__init__.py | xjlin0/-attendees30 | 48a2f2cbec11ec471d7a40d24903b48890feebf9 | [
"MIT"
] | null | null | null | attendees/persons/services/__init__.py | xjlin0/-attendees30 | 48a2f2cbec11ec471d7a40d24903b48890feebf9 | [
"MIT"
] | null | null | null | from .attending_service import AttendingService
from .folk_service import FolkService
from .attendee_service import AttendeeService
| 33 | 47 | 0.886364 | 15 | 132 | 7.6 | 0.6 | 0.342105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 132 | 3 | 48 | 44 | 0.95 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b334a55a730c3630b9b862b5bc6a2de152288ded | 27 | py | Python | __init__.py | aleneum/kalliope-tts-osx | 5c43e4284a7ce6703459e85fd5d15be4fdab78fc | [
"MIT"
] | null | null | null | __init__.py | aleneum/kalliope-tts-osx | 5c43e4284a7ce6703459e85fd5d15be4fdab78fc | [
"MIT"
] | null | null | null | __init__.py | aleneum/kalliope-tts-osx | 5c43e4284a7ce6703459e85fd5d15be4fdab78fc | [
"MIT"
] | null | null | null | from .osxsay import Osxsay
| 13.5 | 26 | 0.814815 | 4 | 27 | 5.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 27 | 1 | 27 | 27 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2fa8a1ae0db78f37a14d2c2fb3bd4f36a2aecff5 | 44,590 | py | Python | ultrascale_python/test_ultrascale_sike.py | pmassolino/hw-sike | 1fee8af81dcc3d0dcc57bc656e06acc6adf810a1 | [
"CC0-1.0"
] | 7 | 2020-01-15T13:36:37.000Z | 2021-04-10T02:54:28.000Z | ultrascale_python/test_ultrascale_sike.py | pmassolino/hw-sike | 1fee8af81dcc3d0dcc57bc656e06acc6adf810a1 | [
"CC0-1.0"
] | null | null | null | ultrascale_python/test_ultrascale_sike.py | pmassolino/hw-sike | 1fee8af81dcc3d0dcc57bc656e06acc6adf810a1 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Implementation by Pedro Maat C. Massolino,
# hereby denoted as "the implementer".
#
# To the extent possible under law, the implementer has waived all copyright
# and related or neighboring rights to the source code in this file.
# http://creativecommons.org/publicdomain/zero/1.0/
import time
import random
import sys
from ultrascale_sidh import *
import sike_core_utils
import SIKE_round2_spec
import sidh_fp2
import sike_fpga_constants_v128
import sike_fpga_constants_v256
tests_prom_folder = "../assembler/"
program_start_address_test_sike_kem_keygen = 1
program_start_address_test_sike_kem_enc = 3
program_start_address_test_sike_kem_dec = 5
program_start_address_test_sidh_keygen_alice = 7
program_start_address_test_sidh_keygen_bob = 9
program_start_address_test_sidh_shared_secret_alice = 11
program_start_address_test_sidh_shared_secret_bob = 13
sike_core_mac_ram_start_address = 0x00000;
sike_core_mac_ram_last_address = 0x07FFF;
sike_core_base_alu_ram_start_address = 0x0C000;
sike_core_base_alu_ram_last_address = 0x0C3FF;
sike_core_keccak_core_start_address = 0x0D000;
sike_core_keccak_core_last_address = 0x0D007;
sike_core_reg_program_counter_address = 0x0E000;
sike_core_reg_status_address = 0x0E001;
sike_core_reg_operands_size_address = 0x0E002;
sike_core_reg_prime_line_equal_one_address = 0x0E003;
sike_core_reg_prime_address_address = 0x0E004;
sike_core_reg_prime_plus_one_address_address = 0x0E005;
sike_core_reg_prime_line_address_address = 0x0E006;
sike_core_reg_2prime_address_address = 0x0E007;
sike_core_reg_initial_stack_address_address = 0x0E008;
sike_core_reg_flag_address = 0x0E009;
sike_core_reg_scalar_address_address = 0x0E00A;
sike_core_mac_ram_prime_address = 0x00000;
sike_core_mac_ram_prime_plus_one_address = 0x00001;
sike_core_mac_ram_prime_line_address = 0x00002;
sike_core_mac_ram_2prime_address = 0x00003;
sike_core_mac_ram_const_r_address = 0x00004;
sike_core_mac_ram_const_r2_address = 0x00005;
sike_core_mac_ram_const_1_address = 0x00006;
sike_core_mac_ram_inv_4_mont_address = 0x00007;
sike_core_mac_ram_sidh_xpa_mont_address = 0x00008;
sike_core_mac_ram_sidh_xpai_mont_address = 0x00009;
sike_core_mac_ram_sidh_xqa_mont_address = 0x0000A;
sike_core_mac_ram_sidh_xqai_mont_address = 0x0000B;
sike_core_mac_ram_sidh_xra_mont_address = 0x0000C;
sike_core_mac_ram_sidh_xrai_mont_address = 0x0000D;
sike_core_mac_ram_sidh_xpb_mont_address = 0x0000E;
sike_core_mac_ram_sidh_xpbi_mont_address = 0x0000F;
sike_core_mac_ram_sidh_xqb_mont_address = 0x00010;
sike_core_mac_ram_sidh_xqbi_mont_address = 0x00011;
sike_core_mac_ram_sidh_xrb_mont_address = 0x00012;
sike_core_mac_ram_sidh_xrbi_mont_address = 0x00013;
sike_core_base_alu_ram_sike_s_start_address = 0x000FB;
sike_core_base_alu_ram_sike_sk_start_address = 0x0011B;
sike_core_base_alu_ram_sike_m_start_address = 0x0013B;
sike_core_base_alu_ram_sike_ss_start_address = 0x0015B;
sike_core_base_alu_ram_sike_c1_start_address = 0x0017B;
sike_core_base_alu_ram_sike_message_length_address = 0x0019B;
sike_core_base_alu_ram_sike_shared_secret_length_address = 0x0019C;
sike_core_base_alu_ram_oa_mask_address = 0x0019D;
sike_core_base_alu_ram_ob_mask_address = 0x0019E;
sike_core_base_alu_ram_oa_bits_address = 0x0019F;
sike_core_base_alu_ram_ob_bits_address = 0x001A0;
sike_core_base_alu_ram_prime_size_bits_address = 0x001A1;
sike_core_base_alu_ram_splits_alice_start_address = 0x001A2;
sike_core_base_alu_ram_max_row_alice_address = 0x002D0;
sike_core_base_alu_ram_splits_bob_start_address = 0x002D1;
sike_core_base_alu_ram_max_row_bob_address = 0x003FF;
sike_core_mac_ram_input_function_start_address = 0x00014;
sike_core_mac_ram_output_function_start_address = 0x00024;
def load_program(ultrascale, prom_file_name, base_word_size, base_word_size_signed_number_words):
prom_file = open(prom_file_name, 'r')
program = []
prom_file.seek(0, 2)
prom_file_size = prom_file.tell()
prom_file.seek(0)
while (prom_file.tell() != prom_file_size):
program += [sike_core_utils.load_list_value_VHDL_MAC_memory_as_integer(prom_file, base_word_size, base_word_size_signed_number_words, 1, False)]
print("Loading program into SIKE core:" + str(prom_file_name))
ultrascale.write_program_prom(0, program)
print("Reading program uploaded into SIKE core")
program_written = ultrascale.read_program_prom(0, len(program))
print("Verifying program uploaded into SIKE core")
if(program_written == program):
return True
print(program)
print(program_written)
return False
def load_constants(ultrascale, param):
number_of_words = param[4]
base_word_size = param[1]
extended_word_size = param[2]
prime = param[5]
prime_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[5])
prime_plus_one_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[7])
prime_line_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[8])
prime2 = param[10]
prime2_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[10])
r_mod_prime_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[17])
r2_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[18])
constant_1_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[19])
constant_inv_4_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, param[20])
error_computation = False
fp2 = sidh_fp2.sidh_fp2(prime)
oa = param[11]
ob = param[12]
oa_bits = param[15]
ob_bits = param[16]
oa_mask = param[13]
ob_mask = param[14]
prime_size_bits = param[6]
sike_message_length = param[39]
sike_shared_secret_length = param[40]
alice_splits = param[33]
alice_max_row = param[34]
alice_max_int_points = param[35]
bob_splits = param[36]
bob_max_row = param[37]
bob_max_int_points = param[38]
starting_position_stack_sidh_core = param[41]
enable_special_prime_line_arithmetic = param[9]
alice_gen_points_mont = param[21:27]
bob_gen_points_mont = param[27:33]
alice_gen_points = param[42:48]
bob_gen_points = param[48:54]
test_value_xpa_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, alice_gen_points_mont[0])
test_value_xpai_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, alice_gen_points_mont[1])
test_value_xqa_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, alice_gen_points_mont[2])
test_value_xqai_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, alice_gen_points_mont[3])
test_value_xra_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, alice_gen_points_mont[4])
test_value_xrai_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, alice_gen_points_mont[5])
test_value_xpb_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, bob_gen_points_mont[0])
test_value_xpbi_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, bob_gen_points_mont[1])
test_value_xqb_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, bob_gen_points_mont[2])
test_value_xqbi_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, bob_gen_points_mont[3])
test_value_xrb_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, bob_gen_points_mont[4])
test_value_xrbi_mont_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, bob_gen_points_mont[5])
ultrascale.write_mac_ram_operand(sike_core_mac_ram_prime_address, prime_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_prime_plus_one_address, prime_plus_one_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_prime_line_address, prime_line_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_2prime_address, prime2_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_const_r_address, r_mod_prime_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_const_r2_address, r2_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_const_1_address, constant_1_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_inv_4_mont_address, constant_inv_4_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xpa_mont_address, test_value_xpa_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xpai_mont_address, test_value_xpai_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xqa_mont_address, test_value_xqa_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xqai_mont_address, test_value_xqai_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xra_mont_address, test_value_xra_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xrai_mont_address, test_value_xrai_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xpb_mont_address, test_value_xpb_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xpbi_mont_address, test_value_xpbi_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xqb_mont_address, test_value_xqb_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xqbi_mont_address, test_value_xqbi_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xrb_mont_address, test_value_xrb_mont_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_sidh_xrbi_mont_address, test_value_xrbi_mont_list, number_of_words)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_message_length_address, sike_message_length)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_shared_secret_length_address, sike_shared_secret_length)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_oa_mask_address, oa_mask)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_ob_mask_address, ob_mask)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_oa_bits_address, oa_bits)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_ob_bits_address, ob_bits)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_prime_size_bits_address, prime_size_bits)
start_address = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_splits_alice_start_address
for i in range(0, len(alice_splits)):
ultrascale.write_package(start_address+i, alice_splits[i])
for i in range(len(alice_splits), 302):
ultrascale.write_package(start_address+i, 0)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_max_row_alice_address, alice_max_row)
start_address = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_splits_bob_start_address
for i in range(0, len(bob_splits)):
ultrascale.write_package(start_address+i, bob_splits[i])
for i in range(len(bob_splits), 302):
ultrascale.write_package(start_address+i, 0)
ultrascale.write_package(sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_max_row_bob_address, bob_max_row)
ultrascale.write_package(sike_core_reg_operands_size_address, number_of_words - 1)
ultrascale.write_package(sike_core_reg_prime_line_equal_one_address, enable_special_prime_line_arithmetic)
ultrascale.write_package(sike_core_reg_prime_address_address, 0)
ultrascale.write_package(sike_core_reg_prime_plus_one_address_address, 1)
ultrascale.write_package(sike_core_reg_prime_line_address_address, 2)
ultrascale.write_package(sike_core_reg_2prime_address_address, 3)
ultrascale.write_package(sike_core_reg_scalar_address_address, 0)
ultrascale.write_package(sike_core_reg_initial_stack_address_address, starting_position_stack_sidh_core)
def test_single_sike_keygen(ultrascale, fp2, base_word_size, extended_word_size, number_of_words, alice_gen_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, ob, ob_bits, sike_message_length, sike_sk, sike_s, debug_mode=False):
test_value_sike_sk_list = sike_core_utils.integer_to_list(base_word_size, 32, sike_sk)
start_address_sike_sk = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_sk_start_address
for j in range(32):
ultrascale.write_package(start_address_sike_sk+j, test_value_sike_sk_list[j])
start_address_sike_s = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_s_start_address
for j in range(0, len(sike_s), 2):
ultrascale.write_package(start_address_sike_s+(j//2), sike_s[j+1]*256 + sike_s[j])
for j in range(len(sike_s), 32, 2):
ultrascale.write_package(start_address_sike_s+(j//2), 0)
ultrascale.write_package(sike_core_reg_program_counter_address, program_start_address_test_sike_kem_keygen)
true_sike_s, true_sike_sk, true_sike_pk = SIKE_round2_spec.SIKE_KEM_gen_key(fp2, alice_gen_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, ob, ob_bits, sike_message_length, sike_sk, sike_s)
true_value_o3 = true_sike_pk[0].polynomial()[0]
true_value_o3i = true_sike_pk[0].polynomial()[1]
true_value_o4 = true_sike_pk[1].polynomial()[0]
true_value_o4i = true_sike_pk[1].polynomial()[1]
true_value_o5 = true_sike_pk[2].polynomial()[0]
true_value_o5i = true_sike_pk[2].polynomial()[1]
#time.sleep(0.1)
while(not ultrascale.isFree()):
time.sleep(0.1)
computed_test_value_o3_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_start_address + sike_core_mac_ram_output_function_start_address + 0, number_of_words)
computed_test_value_o3i_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_start_address + sike_core_mac_ram_output_function_start_address + 1, number_of_words)
computed_test_value_o4_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_start_address + sike_core_mac_ram_output_function_start_address + 2, number_of_words)
computed_test_value_o4i_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_start_address + sike_core_mac_ram_output_function_start_address + 3, number_of_words)
computed_test_value_o5_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_start_address + sike_core_mac_ram_output_function_start_address + 4, number_of_words)
computed_test_value_o5i_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_start_address + sike_core_mac_ram_output_function_start_address + 5, number_of_words)
computed_test_value_o3 = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o3_list)
computed_test_value_o3i = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o3i_list)
computed_test_value_o4 = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o4_list)
computed_test_value_o4i = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o4i_list)
computed_test_value_o5 = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o5_list)
computed_test_value_o5i = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o5i_list)
computed_test_value_o1_list = [0 for i in range(32)]
start_address_sike_sk = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_sk_start_address
for j in range(32):
computed_test_value_o1_list[j] = ultrascale.read_package(start_address_sike_sk+j)
computed_test_value_o2_list = bytearray(sike_message_length)
start_address_sike_s = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_s_start_address
for j in range(0, len(computed_test_value_o2_list), 2):
temp_value = ultrascale.read_package(start_address_sike_s+(j//2))
computed_test_value_o2_list[j] = temp_value & 255;
computed_test_value_o2_list[j+1] = (temp_value >> 8) & 255;
if((debug_mode) or ((computed_test_value_o1_list != test_value_sike_sk_list) or (computed_test_value_o2_list != sike_s) or (computed_test_value_o3 != true_value_o3) or (computed_test_value_o3i != true_value_o3i) or (computed_test_value_o4 != true_value_o4) or (computed_test_value_o4i != true_value_o4i) or (computed_test_value_o5 != true_value_o5) or (computed_test_value_o5i != true_value_o5i))):
print("Error in SIKE key generation ")
print("SIKE sk")
print(sike_sk)
print("SIKE s")
print(binascii.hexlify(sike_s))
print("Computed SIKE sk")
print(computed_test_value_o1_list)
print(test_value_sike_sk_list)
print("Computed SIKE s")
print(binascii.hexlify(computed_test_value_o2_list))
print(binascii.hexlify(sike_s))
print("Computed SIKE PK 0")
print(computed_test_value_o3)
print(computed_test_value_o3i)
print("True SIKE PK 0")
print(true_value_o3)
print(true_value_o3i)
print("Computed SIKE PK 1")
print(computed_test_value_o4)
print(computed_test_value_o4i)
print("True SIKE PK 1")
print(true_value_o4)
print(true_value_o4i)
print("Computed SIKE PK 2")
print(computed_test_value_o5)
print(computed_test_value_o5i)
print("True SIKE PK 2")
print(true_value_o5)
print(true_value_o5i)
return True
return False
def test_sike_keygen(ultrascale, param, number_of_tests, debug_mode=False):
load_constants(ultrascale, param)
base_word_size = param[1]
extended_word_size = param[2]
number_of_words = param[4]
prime = param[5]
error_computation = False
fp2 = sidh_fp2.sidh_fp2(prime)
oa = param[11]
ob = param[12]
oa_bits = param[15]
ob_bits = param[16]
oa_mask = param[13]
ob_mask = param[14]
prime_size_bits = param[6]
sike_message_length = param[39]
sike_shared_secret_length = param[40]
alice_splits = param[33]
alice_max_row = param[34]
alice_max_int_points = param[35]
bob_splits = param[36]
bob_max_row = param[37]
bob_max_int_points = param[38]
alice_gen_points_mont = param[21:27]
bob_gen_points_mont = param[27:33]
alice_gen_points = param[42:48]
bob_gen_points = param[48:54]
# Fixed test
tests_already_performed = 0
fixed_tests = [[[0 for j in range(sike_message_length)], 0], [[0 for j in range(sike_message_length)], ob-1]]
for test in fixed_tests:
sike_s = bytearray(test[0])
sike_sk = test[1]
error_computation = test_single_sike_keygen(ultrascale, fp2, base_word_size, extended_word_size, number_of_words, alice_gen_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, ob, ob_bits, sike_message_length, sike_sk, sike_s, debug_mode)
tests_already_performed += 1
if(error_computation):
break
# Random tests
if(not error_computation):
for i in range(tests_already_performed, number_of_tests):
if(((i %(1000)) == 0)):
print(i)
sike_s = bytearray([random.randint(0, 255) for j in range(sike_message_length)])
sike_sk = random.randint(0, ob-1)
error_computation = test_single_sike_keygen(ultrascale, fp2, base_word_size, extended_word_size, number_of_words, alice_gen_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, ob, ob_bits, sike_message_length, sike_sk, sike_s, debug_mode)
if(error_computation):
break
return error_computation
def test_all_sike_keygen(ultrascale, sike_fpga_constants, number_of_tests, only_one_parameter=None):
error_computation = False
if(only_one_parameter != None):
all_testing_parameters = sike_fpga_constants[only_one_parameter:only_one_parameter+1]
else:
all_testing_parameters = sike_fpga_constants
for param in all_testing_parameters:
print("Testing SIKE key generation " + param[0])
error_computation = test_sike_keygen(ultrascale, param, number_of_tests, debug_mode=False)
if(error_computation):
break
def test_single_sike_encryption(ultrascale, fp2, extended_word_size, number_of_words, alice_gen_points, alice_splits, alice_max_row, alice_max_int_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, oa, ob, oa_bits, ob_bits, sike_message_length, sike_shared_secret_length, sike_sk, sike_s, sike_m, debug_mode=False):
true_sike_s, true_sike_sk, true_sike_pk = SIKE_round2_spec.SIKE_KEM_gen_key(fp2, alice_gen_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, ob, ob_bits, sike_message_length, sike_sk, sike_s)
true_sike_pk_phiPx = true_sike_pk[0].polynomial()[0]
true_sike_pk_phiPxi = true_sike_pk[0].polynomial()[1]
true_sike_pk_phiQx = true_sike_pk[1].polynomial()[0]
true_sike_pk_phiQxi = true_sike_pk[1].polynomial()[1]
true_sike_pk_phiRx = true_sike_pk[2].polynomial()[0]
true_sike_pk_phiRxi = true_sike_pk[2].polynomial()[1]
true_sike_pk_phiPx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiPx)
true_sike_pk_phiPxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiPxi)
true_sike_pk_phiQx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiQx)
true_sike_pk_phiQxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiQxi)
true_sike_pk_phiRx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiRx)
true_sike_pk_phiRxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiRxi)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 0, true_sike_pk_phiPx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 1, true_sike_pk_phiPxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 2, true_sike_pk_phiQx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 3, true_sike_pk_phiQxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 4, true_sike_pk_phiRx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 5, true_sike_pk_phiRxi_list, number_of_words)
start_address_sike_m = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_m_start_address
for j in range(0, len(sike_m), 2):
ultrascale.write_package(start_address_sike_m+(j//2), sike_m[j+1]*256 + sike_m[j])
for j in range(len(sike_m), 32, 2):
ultrascale.write_package(start_address_sike_m+(j//2), 0)
ultrascale.write_package(sike_core_reg_program_counter_address, program_start_address_test_sike_kem_enc)
true_sike_ss, true_sike_c0, true_sike_c1 = SIKE_round2_spec.SIKE_KEM_enc(fp2, alice_gen_points, bob_gen_points, alice_splits, alice_max_row, alice_max_int_points, oa, oa_bits, true_sike_pk, sike_message_length, sike_shared_secret_length, sike_m)
true_value_o3 = true_sike_c0[0].polynomial()[0]
true_value_o3i = true_sike_c0[0].polynomial()[1]
true_value_o4 = true_sike_c0[1].polynomial()[0]
true_value_o4i = true_sike_c0[1].polynomial()[1]
true_value_o5 = true_sike_c0[2].polynomial()[0]
true_value_o5i = true_sike_c0[2].polynomial()[1]
while(not ultrascale.isFree()):
time.sleep(0.1)
computed_test_value_o3_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_output_function_start_address + 0, number_of_words)
computed_test_value_o3i_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_output_function_start_address + 1, number_of_words)
computed_test_value_o4_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_output_function_start_address + 2, number_of_words)
computed_test_value_o4i_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_output_function_start_address + 3, number_of_words)
computed_test_value_o5_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_output_function_start_address + 4, number_of_words)
computed_test_value_o5i_list = ultrascale.read_mac_ram_operand(sike_core_mac_ram_output_function_start_address + 5, number_of_words)
computed_test_value_o3 = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o3_list)
computed_test_value_o3i = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o3i_list)
computed_test_value_o4 = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o4_list)
computed_test_value_o4i = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o4i_list)
computed_test_value_o5 = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o5_list)
computed_test_value_o5i = sike_core_utils.list_to_integer(extended_word_size, number_of_words, computed_test_value_o5i_list)
computed_test_value_o1_list = bytearray(sike_shared_secret_length)
start_address_sike_ss = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_ss_start_address
for j in range(0, len(computed_test_value_o1_list), 2):
temp_value = ultrascale.read_package(start_address_sike_ss+(j//2))
computed_test_value_o1_list[j] = temp_value & 255;
computed_test_value_o1_list[j+1] = (temp_value >> 8) & 255;
computed_test_value_o2_list = bytearray(sike_message_length)
start_address_sike_c1 = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_c1_start_address
for j in range(0, len(computed_test_value_o2_list), 2):
temp_value = ultrascale.read_package(start_address_sike_c1+(j//2))
computed_test_value_o2_list[j] = temp_value & 255;
computed_test_value_o2_list[j+1] = (temp_value >> 8) & 255;
if((debug_mode) or ((computed_test_value_o1_list != true_sike_ss) or (computed_test_value_o2_list != true_sike_c1) or (computed_test_value_o3 != true_value_o3) or (computed_test_value_o3i != true_value_o3i) or (computed_test_value_o4 != true_value_o4) or (computed_test_value_o4i != true_value_o4i) or (computed_test_value_o5 != true_value_o5) or (computed_test_value_o5i != true_value_o5i))):
print("Error in SIKE encryption ")
print("SIKE sk")
print(sike_sk)
print("SIKE s")
print(binascii.hexlify(sike_s))
print("SIKE m")
print(binascii.hexlify(sike_m))
print("Computed SIKE ss")
print(binascii.hexlify(computed_test_value_o1_list))
print("True SIKE ss")
print(binascii.hexlify(true_sike_ss))
print("Computed SIKE c1")
print(binascii.hexlify(computed_test_value_o2_list))
print("True SIKE c1")
print(binascii.hexlify(true_sike_c1))
print("Computed SIKE C0 0")
print(hex(computed_test_value_o3))
print(hex(computed_test_value_o3i))
print("True SIKE C0 0")
print(hex(true_value_o3))
print(hex(true_value_o3i))
print("Computed SIKE C0 1")
print(hex(computed_test_value_o4))
print(hex(computed_test_value_o4i))
print("True SIKE C0 1")
print(hex(true_value_o4))
print(hex(true_value_o4i))
print("Computed SIKE C0 2")
print(hex(computed_test_value_o5))
print(hex(computed_test_value_o5i))
print("True SIKE C0 2")
print(hex(true_value_o5))
print(hex(true_value_o5i))
return True
return False
def test_sike_encryption(ultrascale, param, number_of_tests, debug_mode=False):
load_constants(ultrascale, param)
base_word_size = param[1]
extended_word_size = param[2]
number_of_words = param[4]
prime = param[5]
error_computation = False
fp2 = sidh_fp2.sidh_fp2(prime)
oa = param[11]
ob = param[12]
oa_bits = param[15]
ob_bits = param[16]
oa_mask = param[13]
ob_mask = param[14]
prime_size_bits = param[6]
sike_message_length = param[39]
sike_shared_secret_length = param[40]
alice_splits = param[33]
alice_max_row = param[34]
alice_max_int_points = param[35]
bob_splits = param[36]
bob_max_row = param[37]
bob_max_int_points = param[38]
alice_gen_points_mont = param[21:27]
bob_gen_points_mont = param[27:33]
alice_gen_points = param[42:48]
bob_gen_points = param[48:54]
# Fixed test
tests_already_performed = 0
fixed_tests = [[[0 for j in range(sike_message_length)], 0, [0 for j in range(sike_message_length)]], [[0 for j in range(sike_message_length)], ob-1, [0 for j in range(sike_message_length)]], [[0 for j in range(sike_message_length)], 0, [100 for j in range(sike_message_length)]], [[0 for j in range(sike_message_length)], ob-1, [100 for j in range(sike_message_length)]]]
for test in fixed_tests:
sike_s = bytearray(test[0])
sike_sk = test[1]
sike_m = bytearray(test[2])
error_computation = test_single_sike_encryption(ultrascale, fp2, extended_word_size, number_of_words, alice_gen_points, alice_splits, alice_max_row, alice_max_int_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, oa, ob, oa_bits, ob_bits, sike_message_length, sike_shared_secret_length, sike_sk, sike_s, sike_m, debug_mode=False)
tests_already_performed += 1
if(error_computation):
break
# Random tests
if(not error_computation):
for i in range(tests_already_performed, number_of_tests):
if(((i %(1000)) == 0)):
print(i)
sike_s = bytearray([random.randint(0, 255) for j in range(sike_message_length)])
sike_sk = random.randint(0, ob-1)
sike_m = bytearray([random.randint(0, 255) for j in range(sike_message_length)])
error_computation = test_single_sike_encryption(ultrascale, fp2, extended_word_size, number_of_words, alice_gen_points, alice_splits, alice_max_row, alice_max_int_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, oa, ob, oa_bits, ob_bits, sike_message_length, sike_shared_secret_length, sike_sk, sike_s, sike_m, debug_mode=False)
if(error_computation):
break
return error_computation
def test_all_sike_encryption(ultrascale, sike_fpga_constants, number_of_tests, only_one_parameter=None):
error_computation = False
if(only_one_parameter != None):
all_testing_parameters = sike_fpga_constants[only_one_parameter:only_one_parameter+1]
else:
all_testing_parameters = sike_fpga_constants
for param in all_testing_parameters:
print("Testing SIKE encryption " + param[0])
error_computation = test_sike_encryption(ultrascale, param, number_of_tests, debug_mode=False)
if(error_computation):
break
def test_single_sike_decryption(ultrascale, fp2, base_word_size, extended_word_size, number_of_words, alice_gen_points, alice_splits, alice_max_row, alice_max_int_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, oa, ob, oa_bits, ob_bits, sike_message_length, sike_shared_secret_length, sike_sk, sike_s, sike_m, debug_mode=False):
true_sike_s, true_sike_sk, true_sike_pk = SIKE_round2_spec.SIKE_KEM_gen_key(fp2, alice_gen_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, ob, ob_bits, sike_message_length, sike_sk, sike_s)
true_sike_ss, true_sike_c0, true_sike_c1 = SIKE_round2_spec.SIKE_KEM_enc(fp2, alice_gen_points, bob_gen_points, alice_splits, alice_max_row, alice_max_int_points, oa, oa_bits, true_sike_pk, sike_message_length, sike_shared_secret_length, sike_m)
true_sike_pk_phiPx = true_sike_pk[0].polynomial()[0]
true_sike_pk_phiPxi = true_sike_pk[0].polynomial()[1]
true_sike_pk_phiQx = true_sike_pk[1].polynomial()[0]
true_sike_pk_phiQxi = true_sike_pk[1].polynomial()[1]
true_sike_pk_phiRx = true_sike_pk[2].polynomial()[0]
true_sike_pk_phiRxi = true_sike_pk[2].polynomial()[1]
true_sike_c0_phiPx = true_sike_c0[0].polynomial()[0]
true_sike_c0_phiPxi = true_sike_c0[0].polynomial()[1]
true_sike_c0_phiQx = true_sike_c0[1].polynomial()[0]
true_sike_c0_phiQxi = true_sike_c0[1].polynomial()[1]
true_sike_c0_phiRx = true_sike_c0[2].polynomial()[0]
true_sike_c0_phiRxi = true_sike_c0[2].polynomial()[1]
true_sike_pk_phiPx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiPx)
true_sike_pk_phiPxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiPxi)
true_sike_pk_phiQx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiQx)
true_sike_pk_phiQxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiQxi)
true_sike_pk_phiRx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiRx)
true_sike_pk_phiRxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_pk_phiRxi)
true_sike_c0_phiPx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_c0_phiPx)
true_sike_c0_phiPxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_c0_phiPxi)
true_sike_c0_phiQx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_c0_phiQx)
true_sike_c0_phiQxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_c0_phiQxi)
true_sike_c0_phiRx_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_c0_phiRx)
true_sike_c0_phiRxi_list = sike_core_utils.integer_to_list(extended_word_size, number_of_words, true_sike_c0_phiRxi)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 0, true_sike_pk_phiPx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 1, true_sike_pk_phiPxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 2, true_sike_pk_phiQx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 3, true_sike_pk_phiQxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 4, true_sike_pk_phiRx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 5, true_sike_pk_phiRxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 6, true_sike_c0_phiPx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 7, true_sike_c0_phiPxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 8, true_sike_c0_phiQx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 9, true_sike_c0_phiQxi_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 10, true_sike_c0_phiRx_list, number_of_words)
ultrascale.write_mac_ram_operand(sike_core_mac_ram_input_function_start_address + 11, true_sike_c0_phiRxi_list, number_of_words)
test_value_sike_sk_list = sike_core_utils.integer_to_list(base_word_size, 32, sike_sk)
start_address_sike_sk = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_sk_start_address
for j in range(32):
ultrascale.write_package(start_address_sike_sk+j, test_value_sike_sk_list[j])
start_address_sike_s = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_s_start_address
for j in range(0, len(sike_s), 2):
ultrascale.write_package(start_address_sike_s+(j//2), sike_s[j+1]*256 + sike_s[j])
for j in range(len(sike_s), 32, 2):
ultrascale.write_package(start_address_sike_s+(j//2), 0)
start_address_sike_c1 = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_c1_start_address
for j in range(0, len(true_sike_c1), 2):
ultrascale.write_package(start_address_sike_c1+(j//2), true_sike_c1[j+1]*256 + true_sike_c1[j])
for j in range(len(true_sike_c1), 32, 2):
ultrascale.write_package(start_address_sike_c1+(j//2), 0)
ultrascale.write_package(sike_core_reg_program_counter_address, program_start_address_test_sike_kem_dec)
#time.sleep(0.1)
while(not ultrascale.isFree()):
time.sleep(0.1)
computed_test_value_o1_list = bytearray(sike_shared_secret_length)
start_address_sike_ss = sike_core_base_alu_ram_start_address + sike_core_base_alu_ram_sike_ss_start_address
for j in range(0, len(computed_test_value_o1_list), 2):
temp_value = ultrascale.read_package(start_address_sike_ss+(j//2))
computed_test_value_o1_list[j] = temp_value & 255;
computed_test_value_o1_list[j+1] = (temp_value >> 8) & 255;
if((debug_mode) or (computed_test_value_o1_list != true_sike_ss)):
print("Error in SIKE decryption ")
print("SIKE sk")
print(sike_sk)
print("SIKE s")
print(binascii.hexlify(sike_s))
print("SIKE m")
print(binascii.hexlify(sike_m))
print("Computed SIKE ss")
print(binascii.hexlify(computed_test_value_o1_list))
print("True SIKE ss")
print(binascii.hexlify(true_sike_ss))
return True
return False
def test_sike_decryption(ultrascale, param, number_of_tests, debug_mode=False):
load_constants(ultrascale, param)
base_word_size = param[1]
extended_word_size = param[2]
number_of_words = param[4]
prime = param[5]
error_computation = False
fp2 = sidh_fp2.sidh_fp2(prime)
oa = param[11]
ob = param[12]
oa_bits = param[15]
ob_bits = param[16]
oa_mask = param[13]
ob_mask = param[14]
prime_size_bits = param[6]
sike_message_length = param[39]
sike_shared_secret_length = param[40]
alice_splits = param[33]
alice_max_row = param[34]
alice_max_int_points = param[35]
bob_splits = param[36]
bob_max_row = param[37]
bob_max_int_points = param[38]
alice_gen_points_mont = param[21:27]
bob_gen_points_mont = param[27:33]
alice_gen_points = param[42:48]
bob_gen_points = param[48:54]
# Fixed test
tests_already_performed = 0
fixed_tests = [[[0 for j in range(sike_message_length)], 0, [0 for j in range(sike_message_length)]], [[0 for j in range(sike_message_length)], ob-1, [0 for j in range(sike_message_length)]], [[0 for j in range(sike_message_length)], 0, [100 for j in range(sike_message_length)]], [[0 for j in range(sike_message_length)], ob-1, [100 for j in range(sike_message_length)]]]
for test in fixed_tests:
sike_s = bytearray(test[0])
sike_sk = test[1]
sike_m = bytearray(test[2])
error_computation = test_single_sike_decryption(ultrascale, fp2, base_word_size, extended_word_size, number_of_words, alice_gen_points, alice_splits, alice_max_row, alice_max_int_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, oa, ob, oa_bits, ob_bits, sike_message_length, sike_shared_secret_length, sike_sk, sike_s, sike_m, debug_mode=False)
tests_already_performed += 1
if(error_computation):
break
# Random tests
if(not error_computation):
for i in range(tests_already_performed, number_of_tests):
if(((i %(1000)) == 0)):
print(i)
sike_s = bytearray([random.randint(0, 255) for j in range(sike_message_length)])
sike_sk = random.randint(0, ob-1)
sike_m = bytearray([random.randint(0, 255) for j in range(sike_message_length)])
error_computation = test_single_sike_decryption(ultrascale, fp2, base_word_size, extended_word_size, number_of_words, alice_gen_points, alice_splits, alice_max_row, alice_max_int_points, bob_gen_points, bob_splits, bob_max_row, bob_max_int_points, oa, ob, oa_bits, ob_bits, sike_message_length, sike_shared_secret_length, sike_sk, sike_s, sike_m, debug_mode=False)
if(error_computation):
break
return error_computation
def test_all_sike_decryption(ultrascale, sike_fpga_constants, number_of_tests, only_one_parameter=None):
error_computation = False
if(only_one_parameter != None):
all_testing_parameters = sike_fpga_constants[only_one_parameter:only_one_parameter+1]
else:
all_testing_parameters = sike_fpga_constants
for param in all_testing_parameters:
print("Testing SIKE decryption " + param[0])
error_computation = test_sike_decryption(ultrascale, param, number_of_tests, debug_mode=False)
if(error_computation):
break
def test_all_sike_functions(ultrascale, version, only_one_parameter=None):
sike_base_word_size = 16
if(version == '256'):
sike_extended_word_size = 256
sike_fpga_constants = sike_fpga_constants_v256.sike_fpga_constants_v256
elif(version == '128'):
sike_extended_word_size = 128
sike_fpga_constants = sike_fpga_constants_v128.sike_fpga_constants_v128
tests_working_folder = "../hw_sidh_tests_v"+str(sike_extended_word_size)+"/"
if(load_program(ultrascale, tests_prom_folder + "test_sike_sidh_ecc_functions_v" + str(sike_extended_word_size)+ ".dat", sike_base_word_size, 4)):
print("Program loaded correctly into SIKE core")
test_all_sike_keygen(ultrascale, sike_fpga_constants, 100, only_one_parameter)
test_all_sike_encryption(ultrascale, sike_fpga_constants, 100, only_one_parameter)
test_all_sike_decryption(ultrascale, sike_fpga_constants, 100, only_one_parameter)
else:
print('Program loading failed')
ultrascale = Ultrascale('COM4', sys.argv[1])
#ultrascale.read_initial_message(34)
while(not ultrascale.isFree()):
time.sleep(0.01)
ultrascale.flush()
test_all_sike_functions(ultrascale, sys.argv[1])
ultrascale.disconnect() | 58.51706 | 402 | 0.767145 | 6,944 | 44,590 | 4.364631 | 0.048531 | 0.059126 | 0.048898 | 0.036954 | 0.916656 | 0.885971 | 0.849974 | 0.809126 | 0.758876 | 0.729378 | 0 | 0.030697 | 0.160574 | 44,590 | 762 | 403 | 58.51706 | 0.779028 | 0.010025 | 0 | 0.522293 | 0 | 0 | 0.017269 | 0.00068 | 0 | 0 | 0.008725 | 0 | 0 | 1 | 0.019108 | false | 0 | 0.014331 | 0 | 0.050955 | 0.136943 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
2fbdcf5a3d6732b48025f18b7b0f3d41484e1663 | 22 | py | Python | fsm/__init__.py | nczeak/switchgrass_cv_application | 3e27732f9589f0f4a8cd72519cf06f23e4a969a4 | [
"MIT"
] | null | null | null | fsm/__init__.py | nczeak/switchgrass_cv_application | 3e27732f9589f0f4a8cd72519cf06f23e4a969a4 | [
"MIT"
] | null | null | null | fsm/__init__.py | nczeak/switchgrass_cv_application | 3e27732f9589f0f4a8cd72519cf06f23e4a969a4 | [
"MIT"
] | null | null | null | from .machine import * | 22 | 22 | 0.772727 | 3 | 22 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.894737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2fc02bd232b54da0edd30eae29ec2879facfa90e | 121 | py | Python | tagging/__init__.py | kamigaito/allennlp-tagger | 5461363b82676d70d27ec2db41d822f2b9f4e324 | [
"Apache-2.0"
] | 1 | 2021-04-09T08:11:34.000Z | 2021-04-09T08:11:34.000Z | tagging/__init__.py | kamigaito/allennlp-tagger | 5461363b82676d70d27ec2db41d822f2b9f4e324 | [
"Apache-2.0"
] | null | null | null | tagging/__init__.py | kamigaito/allennlp-tagger | 5461363b82676d70d27ec2db41d822f2b9f4e324 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa: F403
from tagging.predictors import *
from tagging.models import *
from tagging.dataset_readers import *
| 24.2 | 37 | 0.793388 | 16 | 121 | 5.9375 | 0.625 | 0.347368 | 0.357895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038095 | 0.132231 | 121 | 4 | 38 | 30.25 | 0.866667 | 0.14876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
2fe4a21311e0f8da8feff1c15c62bf8f107e5cd0 | 205 | py | Python | orator/dbal/platforms/__init__.py | vimox-shah/orator-repo-0.9v | 002d7a0d9bcce17e5da39c3f4675d0a1a8286280 | [
"MIT"
] | 1,484 | 2015-05-24T19:34:02.000Z | 2022-03-29T07:17:05.000Z | orator/dbal/platforms/__init__.py | vimox-shah/orator-repo-0.9v | 002d7a0d9bcce17e5da39c3f4675d0a1a8286280 | [
"MIT"
] | 359 | 2015-05-25T14:59:20.000Z | 2022-03-21T07:54:28.000Z | orator/dbal/platforms/__init__.py | vimox-shah/orator-repo-0.9v | 002d7a0d9bcce17e5da39c3f4675d0a1a8286280 | [
"MIT"
] | 221 | 2015-06-10T12:38:38.000Z | 2022-03-12T23:22:36.000Z | # -*- coding: utf-8 -*-
from .sqlite_platform import SQLitePlatform
from .mysql_platform import MySQLPlatform
from .mysql57_platform import MySQL57Platform
from .postgres_platform import PostgresPlatform
| 29.285714 | 47 | 0.829268 | 23 | 205 | 7.217391 | 0.608696 | 0.337349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027322 | 0.107317 | 205 | 6 | 48 | 34.166667 | 0.879781 | 0.102439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
6421cc8edd52eccdc49f8eddc89eea7b95eee969 | 8,508 | py | Python | authors/apps/articles/tests/test_articles.py | andela/ah-robotics | d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf | [
"BSD-3-Clause"
] | 3 | 2019-01-03T11:08:39.000Z | 2019-06-21T18:20:58.000Z | authors/apps/articles/tests/test_articles.py | andela/ah-robotics | d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf | [
"BSD-3-Clause"
] | 32 | 2019-01-07T21:47:10.000Z | 2021-09-08T00:45:06.000Z | authors/apps/articles/tests/test_articles.py | andela/ah-robotics | d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf | [
"BSD-3-Clause"
] | 6 | 2019-02-07T09:34:22.000Z | 2020-05-31T15:37:52.000Z | from .base_test import ArticleTestBase
from rest_framework import status
class TestArticle(ArticleTestBase):
def test_add_article(self):
"""
User should be able to add an article
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
created_slug = response.data['slug']
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(created_slug, "the-one")
def test_add_article_no_title_field(self):
"""
User should not be able to add an article without a title field
"""
self.article['article'].pop('title')
self.authorize_user(self.user)
response = self.post_article_req(self.article)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
response_message = response.data["errors"]["title"][0]
self.assertEqual(response_message, "article title cannot be empty")
def test_add_article_no_body_field(self):
"""
User should not be able to add an article without a body field
"""
self.article['article'].pop('body')
self.authorize_user(self.user)
response = self.post_article_req(self.article)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
response_message = response.data["errors"]["body"][0]
self.assertEqual(response_message, "article body cannot be empty")
def test_add_article_empty_title(self):
"""
User should not be able to add an article with blank title field
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article_empty_title)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
response_message = response.data["errors"]["title"][0]
self.assertEqual(response_message, "This field may not be blank.")
def test_add_article_empty_body(self):
"""
User should not be able to add an article with blank body field
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article_empty_body)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
response_message = response.data["errors"]["body"][0]
self.assertEqual(response_message, "This field may not be blank.")
def test_add_article_unauthorized(self):
"""
Unauthorized user should not be able to create an article
"""
response = self.post_article_req(self.article)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
response_message = response.data["detail"]
self.assertEqual(response_message,
"Authentication credentials were not provided.")
def test_view_single_article(self):
"""
User should be able to view a single article
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
article_slug = response.data['slug']
response2 = self.client.get(self.articles_url + article_slug + '/')
self.assertEqual(response2.status_code, status.HTTP_200_OK)
def test_view_single_article_unauthorized(self):
"""
Unauthorized user should be able to view a single article
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
article_slug = response.data['slug']
self.client.credentials()
response2 = self.client.get(self.articles_url + article_slug + '/')
self.assertEqual(response2.status_code, status.HTTP_200_OK)
def test_view_articles_not_logged_in(self):
"""
User not logged in should still be able to view articles
"""
response = self.client.get(self.articles_url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_view_articles_logged_in(self):
"""
Logged in user should be able to view articles
"""
self.authorize_user(self.user)
response = self.client.get(self.articles_url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_get_article_nonexistent(self):
"""
User cannot view an article that does not exist
"""
self.authorize_user(self.user)
response = self.client.get(self.articles_url + "no-article-with-slug/",
format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
response_message = response.data["errors"]["error"]
self.assertEqual(response_message,
"No article found for the slug given")
def test_update_article(self):
"""
User should be able to update an existing article
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
article_slug = response.data['slug']
response2 = self.client.put(self.articles_url + article_slug + '/',
self.article_update_details, format='json')
updated_title = response2.data["title"]
self.assertEqual(response2.status_code, status.HTTP_200_OK)
self.assertEqual(updated_title, "The Updated One")
def test_update_article_unauthorized(self):
"""
Unauthorized user should not be able to update existing article
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
article_slug = response.data['slug']
self.client.credentials()
response2 = self.client.put(self.articles_url + article_slug + '/',
self.article_update_details, format='json')
self.assertEqual(response2.status_code, status.HTTP_403_FORBIDDEN)
response_message = response2.data["detail"]
self.assertEqual(response_message,
"Authentication credentials were not provided.")
def test_delete_article(self):
"""
User should be able to delete articles
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
article_slug = response.data['slug']
response2 = self.client.delete(self.articles_url + article_slug + '/')
self.assertEqual(response2.status_code, status.HTTP_200_OK)
response_message = response2.data["message"]
self.assertEqual(response_message,
"article deleted successfully")
def test_delete_article_unauthorized(self):
"""
This method tests if a non owner can delete an article
"""
self.authorize_user(self.user)
response = self.post_article_req(self.article)
article_slug = response.data['slug']
self.client.credentials()
response2 = self.client.delete(self.articles_url + article_slug + '/')
self.assertEqual(response2.status_code, status.HTTP_403_FORBIDDEN)
response_message = response2.data["detail"]
self.assertEqual(response_message,
"Authentication credentials were not provided.")
def test_add_tag_article(self):
"""
User should be able to add tags to an article
"""
self.authorize_user(self.user)
response = self.client.post(self.articles_url,
self.article, format='json')
created_slug = response.data['slug']
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(created_slug, "the-one")
self.assertEqual(len(response.data["tagList"]), 3)
def test_search_article_title_author_tags(self):
"""
User should should receive search results based on author,
title and tags
"""
self.authorize_user(self.user)
response = self.client.post(self.articles_url,
self.article, format='json')
created_slug = response.data['slug']
search_response = self.client.get(self.search_url
+ "?author=tester&title=The One&tagList=obi",
format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(created_slug, "the-one")
self.assertEqual(len(search_response.data), 4)
| 42.54 | 79 | 0.647743 | 1,003 | 8,508 | 5.278166 | 0.112662 | 0.090669 | 0.086891 | 0.064224 | 0.841141 | 0.806951 | 0.79354 | 0.769173 | 0.748961 | 0.734227 | 0 | 0.011538 | 0.256347 | 8,508 | 199 | 80 | 42.753769 | 0.825194 | 0.109779 | 0 | 0.692913 | 0 | 0 | 0.082938 | 0.006273 | 0 | 0 | 0 | 0 | 0.251969 | 1 | 0.133858 | false | 0 | 0.015748 | 0 | 0.15748 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ff40a0bc7eea3589b75a02f7e953ca3c05bab0e1 | 20 | py | Python | skip/history/v1/__init__.py | houzeyu2683/k1 | 398d44183019781c02340c6b70a586b67bc6bb4d | [
"Apache-2.0"
] | null | null | null | skip/history/v1/__init__.py | houzeyu2683/k1 | 398d44183019781c02340c6b70a586b67bc6bb4d | [
"Apache-2.0"
] | null | null | null | skip/history/v1/__init__.py | houzeyu2683/k1 | 398d44183019781c02340c6b70a586b67bc6bb4d | [
"Apache-2.0"
] | null | null | null |
from .data import * | 10 | 19 | 0.7 | 3 | 20 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 20 | 2 | 19 | 10 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
ff52af7ae937f40932ee02d1a36e7c6f61c1b5a6 | 28 | py | Python | notebooks/src/__init__.py | ahmed14-cell/loan-prediction | cbc76fe557d38c259a993b7649a92c18a96295e4 | [
"MIT"
] | null | null | null | notebooks/src/__init__.py | ahmed14-cell/loan-prediction | cbc76fe557d38c259a993b7649a92c18a96295e4 | [
"MIT"
] | null | null | null | notebooks/src/__init__.py | ahmed14-cell/loan-prediction | cbc76fe557d38c259a993b7649a92c18a96295e4 | [
"MIT"
] | null | null | null | from .note import Experiment | 28 | 28 | 0.857143 | 4 | 28 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107143 | 28 | 1 | 28 | 28 | 0.96 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
442a5d41e35c28f51ed38e67e1d7198e2e98bafb | 47 | py | Python | lib/test.py | arghodaketech/tpass | 8e6160a1592e341442c33721b49bf022ac4bdad1 | [
"MIT"
] | null | null | null | lib/test.py | arghodaketech/tpass | 8e6160a1592e341442c33721b49bf022ac4bdad1 | [
"MIT"
] | null | null | null | lib/test.py | arghodaketech/tpass | 8e6160a1592e341442c33721b49bf022ac4bdad1 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
print(os.getcwd()) | 15.666667 | 18 | 0.723404 | 8 | 47 | 4.25 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022727 | 0.06383 | 47 | 3 | 19 | 15.666667 | 0.75 | 0.361702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
4434c3df200e94d25a479b0008f59fced2e0e8ae | 22,991 | py | Python | experiments/experiments_toy/test_varying_missing/nmtf_icm.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 16 | 2017-04-19T12:04:47.000Z | 2021-12-03T00:50:43.000Z | experiments/experiments_toy/test_varying_missing/nmtf_icm.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 1 | 2017-04-20T11:26:16.000Z | 2017-04-20T11:26:16.000Z | experiments/experiments_toy/test_varying_missing/nmtf_icm.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 8 | 2015-12-15T05:29:43.000Z | 2019-06-05T03:14:11.000Z | """
Test the performance of ICM for recovering a toy dataset, where
we vary the fraction of entries that are missing.
We use the correct number of latent factors and same priors as used to generate the data.
I, J, K, L = 100, 50, 10, 5
"""
import sys, os
project_location = os.path.dirname(__file__)+"/../../../../"
sys.path.append(project_location)
from BNMTF.code.models.nmtf_icm import nmtf_icm
from BNMTF.data_toy.bnmtf.generate_bnmtf import try_generate_M
from BNMTF.code.cross_validation.mask import calc_inverse_M
import numpy, matplotlib.pyplot as plt
##########
fractions_unknown = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95] #[ 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 ]
input_folder = project_location+"BNMTF/data_toy/bnmtf/"
repeats = 10 # number of times we try each fraction
iterations = 1000
I,J,K,L = 100, 80, 5, 5
alpha, beta = 1., 1.
lambdaF = numpy.ones((I,K))/10.
lambdaS = numpy.ones((K,L))/10.
lambdaG = numpy.ones((J,L))/10.
priors = { 'alpha':alpha, 'beta':beta, 'lambdaF':lambdaF, 'lambdaS':lambdaS, 'lambdaG':lambdaG }
init_S = 'random'
init_FG = 'kmeans'
minimum_TN = 0.1
metrics = ['MSE', 'R^2', 'Rp']
# Load in data
R = numpy.loadtxt(input_folder+"R.txt")
# Seed all of the methods the same
numpy.random.seed(3)
# Generate matrices M - one list of M's for each fraction
M_attempts = 100
all_Ms = [
[try_generate_M(I,J,fraction,M_attempts) for r in range(0,repeats)]
for fraction in fractions_unknown
]
all_Ms_test = [ [calc_inverse_M(M) for M in Ms] for Ms in all_Ms ]
# Make sure each M has no empty rows or columns
def check_empty_rows_columns(M,fraction):
sums_columns = M.sum(axis=0)
sums_rows = M.sum(axis=1)
for i,c in enumerate(sums_rows):
assert c != 0, "Fully unobserved row in M, row %s. Fraction %s." % (i,fraction)
for j,c in enumerate(sums_columns):
assert c != 0, "Fully unobserved column in M, column %s. Fraction %s." % (j,fraction)
for Ms,fraction in zip(all_Ms,fractions_unknown):
for M in Ms:
check_empty_rows_columns(M,fraction)
# We now run the VB algorithm on each of the M's for each fraction.
all_performances = {metric:[] for metric in metrics}
average_performances = {metric:[] for metric in metrics} # averaged over repeats
for (fraction,Ms,Ms_test) in zip(fractions_unknown,all_Ms,all_Ms_test):
print "Trying fraction %s." % fraction
# Run the algorithm <repeats> times and store all the performances
for metric in metrics:
all_performances[metric].append([])
for (repeat,M,M_test) in zip(range(0,repeats),Ms,Ms_test):
print "Repeat %s of fraction %s." % (repeat+1, fraction)
# Run the VB algorithm
NMTF = nmtf_icm(R,M,K,L,priors)
NMTF.initialise(init_S,init_FG)
NMTF.run(iterations,minimum_TN=minimum_TN)
# Measure the performances
performances = NMTF.predict(M_test)
for metric in metrics:
# Add this metric's performance to the list of <repeat> performances for this fraction
all_performances[metric][-1].append(performances[metric])
# Compute the average across attempts
for metric in metrics:
average_performances[metric].append(sum(all_performances[metric][-1])/repeats)
print "repeats=%s \nfractions_unknown = %s \nall_performances = %s \naverage_performances = %s" % \
(repeats,fractions_unknown,all_performances,average_performances)
'''
repeats=10
fractions_unknown = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
all_performances = {'R^2': [[0.9975927090292699, 0.9980081023219172, 0.9978155521077262, 0.9975554561095054, 0.997923878035404, 0.9982099616576611, 0.9981625860413992, 0.9978359736733243, 0.9978779504510271, 0.997515342709776], [0.9975890536153215, 0.9980292910066693, 0.9979194412541915, 0.9979658918924728, 0.9975677425995196, 0.9980789962725235, 0.9978807816742185, 0.9979738215496476, 0.9977169179356461, 0.9979390527530128], [0.9977695576055731, 0.9977719145111632, 0.9977470654043835, 0.9975949936294892, 0.9978477764618622, 0.9974169395818809, 0.997792227822902, 0.9978193213459388, 0.9975648828625464, 0.9975486588574607], [0.9976570706503591, 0.997912315499696, 0.9975888360031283, 0.9975517834065201, 0.997401303631934, 0.9976416958006299, 0.9975701396700851, 0.9977735347994222, 0.9977381352638842, 0.9978347279701963], [0.9972048400356697, 0.9974121335180816, 0.9972725006709184, 0.9973945651110651, 0.9975860214597151, 0.9977031023255696, 0.9973354940256396, 0.9973366323745044, 0.9975166443424057, 0.9973194422122789], [0.9968876942549296, 0.9974666638945257, 0.9971232162590854, 0.9965339728630452, 0.9975274512294184, 0.9970835492426965, 0.9968105183626977, 0.9973085027696141, 0.9970350876802735, 0.9971047649757829], [0.9956004866700275, 0.9960425084997317, 0.9956908333301903, 0.9963534897720362, 0.9962563685498766, 0.996272429736938, 0.9963548678337069, 0.9958440798191359, 0.9957456641450465, 0.9958371822889462], [0.966490466863117, 0.9504011247182779, 0.9876873238870871, 0.9837743100507569, 0.9934731765762597, 0.9628010730795674, 0.9929675264889107, 0.9852611319618546, 0.980928068556346, 0.9846092579536968], [0.7448940841360358, 0.5644707788072548, 0.7317341967977111, 0.6268865264832666, 0.6904933275719349, 0.6529445005908574, 0.5883958546834347, 0.5221206128238185, 0.8335961861162272, 0.721881132667106]], 'MSE': [[1.2359111050754783, 1.3042928410580119, 1.2376394595262963, 1.2275988732827634, 1.2382569585089236, 1.1418971298061806, 1.1441518803914916, 1.2223920892944424, 1.2247789351682155, 1.2417987434632936], [1.2792307137209402, 1.2095820439287437, 1.204666514137299, 1.2176876197524185, 1.2450080035692148, 1.2369182353181538, 1.2530229409862728, 1.1919084524073353, 1.2828978056725004, 1.2545687977643687], [1.306426127698413, 1.2906457456653304, 1.3398826196253992, 1.3881057063319009, 1.2359863502075081, 1.3861514029887203, 1.2824578439380021, 1.368772494293425, 1.2942788237192839, 1.2678432597883094], [1.3495310437055388, 1.3641408699751489, 1.3558539963324807, 1.37733755299835, 1.3842753912555095, 1.3138440184813585, 1.4012705880437191, 1.2997572216472284, 1.3232244381774516, 1.3412297465782208], [1.4845439502286777, 1.4236733167015867, 1.4829075685316131, 1.5204074140569728, 1.4671178593650924, 1.296597105766925, 1.4165389674196776, 1.5220963946036925, 1.4511389025847241, 1.5223750280398956], [1.7278422464010317, 1.4371317131299706, 1.664199220301334, 1.8513490228163638, 1.4211713429603694, 1.6371637612297056, 1.7683467037268072, 1.5486671570896307, 1.7350633312338388, 1.6605389189725468], [2.6195785679210499, 2.3095470903110709, 2.4722099129359854, 2.1205864798805969, 2.1261213726651982, 2.1416350443412218, 2.1391932810654732, 2.3567048373783179, 2.4427368406574317, 2.3864977291757903], [19.054484310140925, 28.26033451828971, 7.1455382084831127, 9.5589530429614076, 3.744672733276559, 22.104946580343103, 3.930619863957872, 8.4495494068552048, 11.058583546825346, 8.8319755926652324], [144.22416058491476, 249.60357823247341, 153.54572226357712, 211.09141802208796, 176.71761117002131, 194.69471829847672, 237.88233262720109, 275.26569225321771, 95.593068425483409, 162.0412584829115]], 'Rp': [[0.99880420951544502, 0.99900395021136434, 0.99890857558075508, 0.99878035694496503, 0.99896500446856951, 0.99910731663444752, 0.99908550333940471, 0.9989248480995444, 0.99893876976564466, 0.99876195708329107], [0.99879681787297547, 0.99901489703340884, 0.99895955595351549, 0.99898584690408676, 0.99878738899022479, 0.99904044836434747, 0.99894016179002976, 0.99898821843986496, 0.99885993625712199, 0.99897197416089323], [0.99888436491207322, 0.99888592938366239, 0.99887397749315432, 0.9987985413547712, 0.99892389506668577, 0.99870798064138, 0.99889670828874466, 0.99890921170628233, 0.99878353194075076, 0.99877442025883056], [0.99882953400638341, 0.99895874015184949, 0.99879652488340387, 0.99877596405665137, 0.99869999080131067, 0.99882300349094955, 0.99878850333901692, 0.99888736849994753, 0.99887119732067753, 0.99891742914772053], [0.99860239521475547, 0.99870576989184867, 0.99863740745075846, 0.99869652065113557, 0.99880231392030572, 0.99885117938926438, 0.99867060989233092, 0.99867208619182257, 0.99875800884615606, 0.99865894212951556], [0.99844309014561028, 0.99873292732912911, 0.99856256752744232, 0.99826775109421695, 0.99876308359431631, 0.99854175878031926, 0.99840826616033396, 0.99865428180438387, 0.99852227404052185, 0.99855668698014199], [0.99780564121926174, 0.99802260055713676, 0.99786671812837191, 0.99819140855105448, 0.99813263124688767, 0.99813520389691202, 0.99817671233486327, 0.99793440286027668, 0.99787319646144834, 0.99791773308442666], [0.98362796692557153, 0.97694437268254153, 0.993825075948362, 0.991854258729025, 0.99673194445485813, 0.98223469976977984, 0.99649303700878877, 0.99265967783514075, 0.99053006207596628, 0.99229389145788727], [0.89031297236990137, 0.83497912445121836, 0.87060834703560308, 0.83604847675271821, 0.87662483639964928, 0.85831295806558006, 0.83403806731021446, 0.81720594968054239, 0.92663402534958672, 0.88144323801393565]]}
average_performances = {'R^2': [0.9978497512137011, 0.9978660990553223, 0.9976873338083202, 0.9976669542695855, 0.9974081376075847, 0.9970881421532068, 0.9959997910645635, 0.9788393460135871, 0.6677417200677647], 'MSE': [1.2218718015575099, 1.2375491127257248, 1.3160550374256292, 1.3510464867195005, 1.4587396507298858, 1.64514734178616, 2.3114811156332133, 12.213965780379848, 190.06595603603648], 'Rp': [0.99892804916434308, 0.99893452457664689, 0.99884385610463355, 0.99883482556979108, 0.9987055233577895, 0.99854526874564153, 0.99800562483406396, 0.98971949868879217, 0.86262079954289494]}
repeats=10
fractions_unknown = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95]
all_performances = {'R^2': [[0.9977960716139789, 0.9973834994890584, 0.9983016043107281, 0.9975472592906569, 0.9978136425496568, 0.9982280201387091, 0.9981965828582579, 0.9982640230093016, 0.9983963415199908, 0.9986477681687802], [0.9980111539591642, 0.9975445304412317, 0.9978931295438996, 0.9974807190762393, 0.99757835772839, 0.9983210217988878, 0.9978340730406277, 0.9967995704214855, 0.9978108885059572, 0.9979979938512343], [0.9973146791772716, 0.9980396394604358, 0.9977687638443559, 0.997904081502049, 0.9975161817834871, 0.998121638140143, 0.9976928630836424, 0.9978737988025677, 0.9977120376906787, 0.9972076792556375], [0.9978259391246938, 0.9977884822776646, 0.9980475595309849, 0.9976484374258442, 0.9976216503705784, 0.99789535037804, 0.9978651088505368, 0.9979826727856517, 0.997544456824371, 0.9975883619808774], [0.9975896865555836, 0.9976926057034096, 0.9976484871022528, 0.9978103442988308, 0.9978474789857447, 0.9972883842908079, 0.997677596006807, 0.9977181786238531, 0.9977999285296558, 0.9977976626898056], [0.9975737461445836, 0.9975423188792942, 0.9977169797502722, 0.9979126318421085, 0.9975225209643708, 0.997757794048769, 0.9975233529826689, 0.9978989446831908, 0.9979259356750545, 0.9978514364388203], [0.9978665622537566, 0.9977476716261016, 0.9975760561841783, 0.99790900009907, 0.9977387640460015, 0.9976825507814665, 0.9977414083572004, 0.997848613997625, 0.9977360605400215, 0.9975028818526086], [0.9975234749065116, 0.9974798654620204, 0.9974761474309704, 0.9973728835895923, 0.9976878829209026, 0.9976997532110653, 0.9974807774566232, 0.9975172657032069, 0.9976588312092749, 0.9977835395758824], [0.9976916099058944, 0.9973953438727917, 0.997230212317283, 0.9973304698418283, 0.9977560222676292, 0.9976886347066465, 0.997663466707994, 0.997508865564486, 0.997724741393137, 0.9976413063374209], [0.9972797546513117, 0.9973940868507666, 0.9972898855173566, 0.9974036286735548, 0.9974003668260464, 0.9974139449622138, 0.9975140464267697, 0.9975152871072698, 0.997777046292111, 0.9975378762795625], [0.9971501213232983, 0.9971977857080206, 0.9975558498142384, 0.9974912047361075, 0.9972945765279337, 0.997352246105013, 0.9973115052336812, 0.9974688120116599, 0.9974422419135635, 0.9974107073837184], [0.9970995270455087, 0.9973392783898744, 0.9972834182452326, 0.9972311347022608, 0.9972923039059131, 0.997197545842884, 0.9970868777460126, 0.9973734774086613, 0.9974327173642094, 0.9971003899531427], [0.9971298838288146, 0.9967578636383226, 0.9966776909374893, 0.9970304781422635, 0.9960345037762506, 0.9968291959653174, 0.9967697623614128, 0.9968179355654329, 0.9967998002156155, 0.9968017819420039], [0.9910039919105932, 0.9960555506964023, 0.9962509552455636, 0.9938998176987858, 0.9966791511827771, 0.9966366624720836, 0.9967903317782414, 0.9942109857060469, 0.9962207623480237, 0.9960353282783987], [0.995842543538116, 0.9955620025360832, 0.995907521770374, 0.8829053844080554, 0.9959229055620908, 0.9904842012728244, 0.9949252711617799, 0.9958227145540727, 0.9960905531238834, 0.995899366309018], [0.9934617025608774, 0.7371740107582515, 0.9922826081721235, 0.9934648038262894, 0.9838012678489808, 0.9896178071196157, 0.9814919718710041, 0.9812151164783904, 0.9837925411381649, 0.982883296991726], [0.8675910902715176, 0.9719095961333374, 0.8932930234717759, 0.9164207092822406, 0.8919421316904165, 0.9005238308496155, 0.9441155496017423, 0.9774620451163136, 0.9355822571031298, 0.9798571574602224], [0.5891624711472134, 0.7648666894351978, 0.7844874522667273, 0.6699633816459498, 0.5912874125814198, 0.7938940480533925, 0.7654709776302533, 0.372397391797735, 0.5689501208164378, 0.5707875297302283], [0.5356820022435773, 0.6425334772832034, 0.5279011792193716, 0.25505905517157423, 0.45448485610879363, 0.471030154278161, 0.48683253473635146, 0.6287791547754051, 0.6517576137524674, 0.49949659259123036]], 'MSE': [[1.1450246392114909, 1.2986670590230718, 1.262895968808295, 1.29825964658808, 1.4138665350704542, 1.0724022212929925, 1.2002489707376693, 1.2501162558286667, 1.1617217382766478, 1.2223468964174509], [1.1885623802538827, 1.2545136796398837, 1.4094536329111025, 1.329634618943272, 1.2521469466946074, 1.2387188840155623, 1.2177932802807248, 1.1976076890097385, 1.2328860687036776, 1.3004538688910794], [1.3091331188036246, 1.1699102110675565, 1.3689684255984995, 1.2638748078391044, 1.2833228665268406, 1.1564118609700051, 1.3209733440027862, 1.2762883138271994, 1.3163661787371224, 1.3859241245280605], [1.3419589522616153, 1.2464529617661497, 1.2874660589480103, 1.3935502398437702, 1.3637977502174352, 1.2224412621837066, 1.2211385805166233, 1.2027964656159795, 1.3864034937354353, 1.2795360946164827], [1.2856684807702792, 1.3319642545033934, 1.322338998508074, 1.2888487786435445, 1.3173376617480976, 1.4271941583652452, 1.3081757099208153, 1.4142075696016867, 1.291599600542312, 1.2296601238294209], [1.4561542408876869, 1.3548394884532, 1.2474253593911397, 1.2695165954654954, 1.3880053786827933, 1.3203555463773231, 1.3175642196349024, 1.2377602302549882, 1.2305351176261241, 1.2983851052958166], [1.2550550812445838, 1.2485573168105362, 1.3860457578407819, 1.272664109751503, 1.2067096392920351, 1.3227053456436386, 1.3503037860031089, 1.2710761506507637, 1.3608981059913599, 1.3585545973728475], [1.3565973014319042, 1.4078421372954384, 1.3681682904899881, 1.3815523823850144, 1.3430060224882041, 1.3671747729303292, 1.3566905483801273, 1.4243779991670056, 1.4010205397342466, 1.3502767881290783], [1.4450708655967792, 1.4169715322519969, 1.6678115220273113, 1.4225154528631265, 1.4015539722892949, 1.3414530355518277, 1.364043459535724, 1.3814473757333345, 1.3480544195167985, 1.3751031783066732], [1.4427006547855894, 1.494580879551638, 1.5942235427118878, 1.3599595844761085, 1.4943169638141514, 1.4702564716750393, 1.4855692701548133, 1.4435876091692579, 1.2815842421261499, 1.4210031425646643], [1.5772181401336689, 1.5654595031984846, 1.4069078858228075, 1.4777761152040079, 1.5552847083515597, 1.4840830577653927, 1.4825277592310759, 1.4862587456687619, 1.5207591062057491, 1.469974108855759], [1.6546548113350283, 1.4618935014338796, 1.6169883281110622, 1.5151526511788675, 1.5664548144455308, 1.6764140454342262, 1.6725771428458265, 1.4631902851047409, 1.5554480716787247, 1.6370529724262626], [1.6367548364088857, 1.8550847285144507, 1.9690461104081762, 1.6625927306332324, 2.2229930695515598, 1.8537641144518238, 1.7738650420783093, 1.782531880977406, 1.875946833165107, 1.8138575293636237], [5.1868853495123961, 2.2725482800187429, 2.2197745665901354, 3.5328223673119004, 1.8576404284898198, 1.9223835554790278, 1.7757916530539961, 3.3120375395504573, 2.1814882442868133, 2.3003375517405131], [2.3607550410019691, 2.5527398367559089, 2.3819341566204906, 66.333478408471791, 2.4509302605799901, 5.5157660021332902, 2.916088083254964, 2.3888283872327198, 2.2343597198439613, 2.2393921157266408], [3.8051959107529325, 156.05426900405925, 4.5022766451240486, 3.7695914924360454, 9.2785189900528913, 6.0528134400167906, 10.770496666154495, 10.867618932373919, 9.2052455851677433, 9.8885589088119588], [77.810189469115016, 16.224653856134744, 61.59555950659238, 46.618829263148868, 60.578534656481047, 56.644269349693523, 33.140001594590785, 12.840300085843067, 37.187807127884774, 11.728983634417434], [236.7423844286273, 130.38743451940667, 123.03203486810101, 190.50870291106733, 231.82376771486133, 121.05394140124487, 134.42958943368492, 360.28596416203214, 244.40634070142011, 247.17188547620017], [270.0540370588659, 205.53242824756143, 267.84105795700276, 426.9337636314288, 315.32642727762124, 301.20774639438889, 291.25795132420939, 213.66670393856165, 198.75373213764905, 287.60860431144732]], 'Rp': [[0.99890935256924096, 0.99869185280726025, 0.99916276320407815, 0.99877676385742276, 0.99891310989709747, 0.99911797993527129, 0.99910187286913665, 0.99913797417060035, 0.99920288198206242, 0.999330249353373], [0.99900615287740258, 0.99877516828671953, 0.99896692788050023, 0.99874957459175939, 0.99878974075166183, 0.99916734184053047, 0.99891746995248221, 0.99840579799538876, 0.99891356947634524, 0.99900600476308365], [0.99866262837407427, 0.99902441774235584, 0.99888640359126069, 0.99895339611985856, 0.99876404317948186, 0.99906197807601993, 0.9988470436151502, 0.99893773743809144, 0.99886585638400172, 0.9986071721895754], [0.99892628533831729, 0.99889735003056468, 0.99902385095087365, 0.99882411479595268, 0.9988113114169318, 0.99894900047793445, 0.99893444048330937, 0.99899212367256651, 0.99877418661514783, 0.99879851371599571], [0.9987953766991271, 0.99884814006291944, 0.99882534167464987, 0.99890576518535468, 0.9989259470544104, 0.99865174291269776, 0.99883983190854908, 0.99886078239354525, 0.99889955170821354, 0.99889933271644105], [0.99879254271427154, 0.9987752750031017, 0.99885837198547611, 0.99895647699378343, 0.99876106272044007, 0.99887904382598092, 0.99876613627728883, 0.99894958822151481, 0.9989647243004387, 0.99892730066312319], [0.99894393852846219, 0.99887633512073926, 0.99879137255226835, 0.99895511888467603, 0.99886879198767853, 0.99884571172590897, 0.99887216862001826, 0.99892833150295557, 0.9988695322819654, 0.99875289107495691], [0.99876347416434419, 0.99874326175445161, 0.99874014046974335, 0.99868807892266076, 0.99884534157992444, 0.99885015965869572, 0.99874240642417889, 0.99876339961357352, 0.99882908830951045, 0.99889219125682949], [0.99884824688476104, 0.99869920655871125, 0.99861826203745563, 0.99867253197609851, 0.99888351349247551, 0.99884688875393157, 0.99883458545343429, 0.99875585601283423, 0.99886183194494327, 0.99882304720438408], [0.99864178242640111, 0.99870277918222594, 0.99865088053712014, 0.99870795220847663, 0.99870201114927393, 0.99871454181743746, 0.99875772047994216, 0.99875864683112903, 0.99888892324977241, 0.99877267666535341], [0.99857409963631272, 0.99860632623390699, 0.99877785214981529, 0.99874512485309175, 0.99865193974519373, 0.99868546619008902, 0.99865788495019348, 0.99873892626542049, 0.99872403401333754, 0.99870997987681687], [0.99855017065490947, 0.9986687622542203, 0.99864981832292632, 0.99861499275635679, 0.99864617085512219, 0.99860256927794799, 0.99854596594405087, 0.99869167154587724, 0.99872024010358373, 0.99855537373748726], [0.99856643106380216, 0.9983792922799114, 0.99835264964525361, 0.9985144270164984, 0.99803345855867265, 0.99842495141746068, 0.99838607906859389, 0.99840865279579272, 0.99841544942711424, 0.99840045147289369], [0.99551286695583363, 0.99803265155046572, 0.99812538967031328, 0.99694844039148545, 0.99833861008987512, 0.99831785625680958, 0.99839705249686583, 0.99710229637235048, 0.99811734952734865, 0.99801657217517592], [0.99792672579435393, 0.99778161866028414, 0.9979557395283718, 0.94540538085365777, 0.99796123624828348, 0.99523276726597965, 0.9974610328108009, 0.99791127988803696, 0.99804820787585291, 0.99795351389476661], [0.9967621481196125, 0.88463345249420922, 0.99615828401900974, 0.99672915103861981, 0.99197321428477458, 0.99482651130955702, 0.99080231904391824, 0.9907108255405126, 0.99192096418767595, 0.99145986525720042], [0.93278003598471049, 0.98635120492483941, 0.95379991091096294, 0.95832139107447212, 0.94976056779666818, 0.95109755380423389, 0.97315830799096914, 0.98869008271397618, 0.96837229130465574, 0.99002572508503617], [0.82899672390352575, 0.88897660021746838, 0.89733927334601338, 0.84756014823296355, 0.82447297652678064, 0.90705198593095693, 0.90587327909949378, 0.79879661536924096, 0.84499517565171556, 0.84721926048568019], [0.78411640788953207, 0.8306266710716893, 0.78598556365468686, 0.70230820340856248, 0.75017038856772689, 0.76068119503423637, 0.82938455655594701, 0.82229042998374346, 0.84833032220204641, 0.77084465228349131]]}
average_performances = {'R^2': [0.9980574812949119, 0.9977271438367117, 0.9977151362740269, 0.9977808019549244, 0.9976870352786751, 0.9977225661409133, 0.9977349569738028, 0.997568042146605, 0.9975630672915111, 0.9974525923586963, 0.9973675050757235, 0.9972436670603699, 0.9967648896372923, 0.9953783537316918, 0.9839362464236299, 0.9619185126765425, 0.927869739098031, 0.6471267475104554, 0.5153556620160135], 'MSE': [1.2325549931254818, 1.2621771049343531, 1.28511732519008, 1.294554185970521, 1.3216995336432869, 1.3120541282069469, 1.303256989060116, 1.3756706782431336, 1.4164024813672866, 1.44877823610293, 1.5026249130437268, 1.5819826623994149, 1.8446436875552574, 2.6561709536033797, 9.1374272011621738, 22.419458557495005, 41.436912854390165, 201.9842045616646, 277.81824522787366], 'Rp': [0.99903448006455431, 0.99886977484158757, 0.99886106767098704, 0.99889311774975942, 0.99884518123159083, 0.99886305227054195, 0.99887041922796294, 0.99878575421539106, 0.9987843970319028, 0.99872979145471308, 0.99868716339141772, 0.99862457354524836, 0.99838818427459919, 0.99769090854865239, 0.99236375028203871, 0.982597673529509, 0.96523570715905238, 0.859128203876384, 0.78847383906516622]}
'''
# Plot the MSE, R^2 and Rp
for metric in metrics:
plt.figure()
x = fractions_unknown
y = average_performances[metric]
plt.plot(x,y)
plt.xlabel("Fraction missing")
plt.ylabel(metric) | 186.918699 | 11,691 | 0.811752 | 2,544 | 22,991 | 7.305031 | 0.450079 | 0.006888 | 0.003551 | 0.005811 | 0.029811 | 0.018618 | 0.013452 | 0.008825 | 0.008825 | 0.008825 | 0 | 0.756118 | 0.074029 | 22,991 | 123 | 11,692 | 186.918699 | 0.116821 | 0.025097 | 0 | 0.0625 | 1 | 0 | 0.116748 | 0.014941 | 0 | 0 | 0 | 0 | 0.03125 | 0 | null | null | 0 | 0.078125 | null | null | 0.046875 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
4438be28fcc6e5d7896b155930bc2408ec67fee7 | 164 | py | Python | backend/controller/__init__.py | guchengxi1994/code-find | 0793f61643109250f01011eb500fb290e60accb6 | [
"MIT"
] | 1 | 2022-03-14T05:22:35.000Z | 2022-03-14T05:22:35.000Z | backend/controller/__init__.py | guchengxi1994/a-cool-flutter-app | 0793f61643109250f01011eb500fb290e60accb6 | [
"MIT"
] | null | null | null | backend/controller/__init__.py | guchengxi1994/a-cool-flutter-app | 0793f61643109250f01011eb500fb290e60accb6 | [
"MIT"
] | null | null | null | '''
Descripttion:
version:
Author: xiaoshuyui
email: guchengxi1994@qq.com
Date: 2022-04-10 12:51:01
LastEditors: xiaoshuyui
LastEditTime: 2022-04-10 12:51:01
'''
| 16.4 | 33 | 0.75 | 24 | 164 | 5.125 | 0.708333 | 0.097561 | 0.130081 | 0.162602 | 0.227642 | 0.227642 | 0 | 0 | 0 | 0 | 0 | 0.219178 | 0.109756 | 164 | 9 | 34 | 18.222222 | 0.623288 | 0.945122 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
448192972180918eeaa34e4824ed596747a0eb04 | 166 | py | Python | atomicqueue/exceptions.py | arossoshynskyy/atomic-queue | f638f1f5b7d20ab93de387e0fec25c0663ff56c5 | [
"MIT"
] | 4 | 2021-01-09T15:04:59.000Z | 2021-05-27T02:27:15.000Z | atomicqueue/exceptions.py | arossoshynskyy/atomic-queue | f638f1f5b7d20ab93de387e0fec25c0663ff56c5 | [
"MIT"
] | null | null | null | atomicqueue/exceptions.py | arossoshynskyy/atomic-queue | f638f1f5b7d20ab93de387e0fec25c0663ff56c5 | [
"MIT"
] | null | null | null | class NoEventProcessorsException(Exception):
pass
class InvalidWaitStrategyException(Exception):
pass
class InvalidCapacityException(Exception):
pass
| 15.090909 | 46 | 0.795181 | 12 | 166 | 11 | 0.5 | 0.295455 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150602 | 166 | 10 | 47 | 16.6 | 0.93617 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 1 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
92287a14996fd8abf8dfff61c3d7a8da45f8bcee | 25 | py | Python | pyir/__init__.py | sarangian/PyIR | f7e3dde8a13fd8af907bde0ef7c9d4de63361e3d | [
"CC-BY-4.0"
] | 32 | 2018-10-08T15:42:23.000Z | 2022-02-13T22:23:57.000Z | pyir/__init__.py | sarangian/PyIR | f7e3dde8a13fd8af907bde0ef7c9d4de63361e3d | [
"CC-BY-4.0"
] | 13 | 2019-04-17T23:26:00.000Z | 2021-12-31T03:12:54.000Z | pyir/__init__.py | sarangian/PyIR | f7e3dde8a13fd8af907bde0ef7c9d4de63361e3d | [
"CC-BY-4.0"
] | 15 | 2018-11-27T19:02:15.000Z | 2021-06-21T12:38:22.000Z | from .factory import PyIR | 25 | 25 | 0.84 | 4 | 25 | 5.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12 | 25 | 1 | 25 | 25 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
9239d27c9e6c66fc2a65731ca1a1ba5db7665e76 | 949 | py | Python | notification/migrations/0016_auto_20210703_2308.py | horacexd/clist | 9759dfea97b86514bec9825d2430abc36decacf0 | [
"Apache-2.0"
] | 166 | 2019-05-16T23:46:08.000Z | 2022-03-31T05:20:23.000Z | notification/migrations/0016_auto_20210703_2308.py | horacexd/clist | 9759dfea97b86514bec9825d2430abc36decacf0 | [
"Apache-2.0"
] | 92 | 2020-01-18T22:51:53.000Z | 2022-03-12T01:23:57.000Z | notification/migrations/0016_auto_20210703_2308.py | horacexd/clist | 9759dfea97b86514bec9825d2430abc36decacf0 | [
"Apache-2.0"
] | 23 | 2020-02-09T17:38:43.000Z | 2021-12-09T14:39:07.000Z | # Generated by Django 3.1.12 on 2021-07-03 23:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notification', '0015_auto_20210308_1449'),
]
operations = [
migrations.AlterField(
model_name='notification',
name='created',
field=models.DateTimeField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='notification',
name='modified',
field=models.DateTimeField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='task',
name='created',
field=models.DateTimeField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='task',
name='modified',
field=models.DateTimeField(auto_now=True, db_index=True),
),
]
| 27.911765 | 73 | 0.586934 | 95 | 949 | 5.684211 | 0.4 | 0.148148 | 0.185185 | 0.214815 | 0.711111 | 0.711111 | 0.612963 | 0.612963 | 0.612963 | 0.612963 | 0 | 0.048265 | 0.30137 | 949 | 33 | 74 | 28.757576 | 0.766214 | 0.048472 | 0 | 0.740741 | 1 | 0 | 0.107658 | 0.025527 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.037037 | 0 | 0.148148 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
923ed1e17272b0ed6dfdd4c11f2f3c7b1c9a34e0 | 186 | py | Python | bert/__init__.py | Feecely/fairseq_bertnmt | 86a97432ba27a44b4a5cb66a35569c8517fbc66d | [
"MIT"
] | null | null | null | bert/__init__.py | Feecely/fairseq_bertnmt | 86a97432ba27a44b4a5cb66a35569c8517fbc66d | [
"MIT"
] | null | null | null | bert/__init__.py | Feecely/fairseq_bertnmt | 86a97432ba27a44b4a5cb66a35569c8517fbc66d | [
"MIT"
] | null | null | null | from .tokenization import BasicTokenizer, BertTokenizer
from .modeling import BertModel, BertForMaskedLM, BertForSequenceClassification, BertForTokenClassification, BertForMultipleChoice | 93 | 130 | 0.897849 | 13 | 186 | 12.846154 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064516 | 186 | 2 | 130 | 93 | 0.95977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2b8ec6fad4d2fa44152071b089bcc907dd084d9e | 533 | py | Python | tests/test_wrap.py | adzenith/isort | 158b22e223dd13ca144237353b07947fd8e055ed | [
"MIT"
] | 1,587 | 2020-08-24T03:07:20.000Z | 2022-03-31T20:10:06.000Z | tests/test_wrap.py | adzenith/isort | 158b22e223dd13ca144237353b07947fd8e055ed | [
"MIT"
] | 446 | 2020-08-24T04:59:41.000Z | 2022-03-30T21:48:34.000Z | tests/test_wrap.py | adzenith/isort | 158b22e223dd13ca144237353b07947fd8e055ed | [
"MIT"
] | 170 | 2020-08-25T15:09:46.000Z | 2022-03-30T13:46:48.000Z | from isort import wrap
from isort.settings import Config
def test_import_statement():
assert wrap.import_statement("", [], []) == ""
assert (
wrap.import_statement("from x import ", ["y"], [], config=Config(balanced_wrapping=True))
== "from x import (y)"
)
assert (
wrap.import_statement("from long_import ", ["verylong"] * 10, [])
== """from long_import (verylong, verylong, verylong, verylong, verylong, verylong,
verylong, verylong, verylong, verylong)"""
)
| 33.3125 | 97 | 0.613508 | 56 | 533 | 5.696429 | 0.321429 | 0.451411 | 0.601881 | 0.702194 | 0.557994 | 0.454545 | 0.250784 | 0.250784 | 0.250784 | 0 | 0 | 0.004914 | 0.236398 | 533 | 15 | 98 | 35.533333 | 0.77887 | 0 | 0 | 0.153846 | 0 | 0 | 0.360225 | 0 | 0 | 0 | 0 | 0 | 0.230769 | 1 | 0.076923 | true | 0 | 0.615385 | 0 | 0.692308 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2bbb9a85c223e784f628bac351701e6d23940d00 | 44 | py | Python | webcrawler/crawler/itempipelines/__init__.py | HansZimmer5000/LensComparison | e4d9b68211604c4569c4ca9b1e1b4fce2a8c1ea8 | [
"Apache-2.0"
] | null | null | null | webcrawler/crawler/itempipelines/__init__.py | HansZimmer5000/LensComparison | e4d9b68211604c4569c4ca9b1e1b4fce2a8c1ea8 | [
"Apache-2.0"
] | null | null | null | webcrawler/crawler/itempipelines/__init__.py | HansZimmer5000/LensComparison | e4d9b68211604c4569c4ca9b1e1b4fce2a8c1ea8 | [
"Apache-2.0"
] | null | null | null |
from .ghitempipeline import GhItemPipeline
| 14.666667 | 42 | 0.863636 | 4 | 44 | 9.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113636 | 44 | 2 | 43 | 22 | 0.974359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2bcce3d1e27cdcb7db80361f97f5a3af19a2039a | 153 | py | Python | satori/lib/apis/__init__.py | lastmeta/Satori | cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea | [
"MIT"
] | 3 | 2022-02-16T17:25:53.000Z | 2022-02-25T05:24:15.000Z | satori/lib/apis/__init__.py | lastmeta/Satori | cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea | [
"MIT"
] | 9 | 2022-02-16T20:23:55.000Z | 2022-03-26T17:27:23.000Z | satori/lib/apis/__init__.py | lastmeta/Satori | cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea | [
"MIT"
] | null | null | null | from .fx import fx
from .google import Google
from . import disk
from . import memory
from . import system
#from .disk import write, read, merge, gather
| 21.857143 | 45 | 0.75817 | 24 | 153 | 4.833333 | 0.458333 | 0.258621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.176471 | 153 | 6 | 46 | 25.5 | 0.920635 | 0.287582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
92021a95162ecd21999c40ce7345e88dd6dda93f | 129 | py | Python | lpulive/__init__.py | knight-byte/lpulive | 020f9592b85916ca3582e4b485c6dfe527414160 | [
"MIT"
] | 1 | 2021-05-25T08:19:03.000Z | 2021-05-25T08:19:03.000Z | lpulive/__init__.py | knight-byte/lpulive | 020f9592b85916ca3582e4b485c6dfe527414160 | [
"MIT"
] | null | null | null | lpulive/__init__.py | knight-byte/lpulive | 020f9592b85916ca3582e4b485c6dfe527414160 | [
"MIT"
] | 1 | 2021-05-25T08:19:12.000Z | 2021-05-25T08:19:12.000Z | '''
Author : knight_byte ( Abunachar )
File : __init__.py
'''
from .lpulive_main import *
from .lpulive_urls import *
| 16.125 | 38 | 0.651163 | 15 | 129 | 5.133333 | 0.8 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.232558 | 129 | 7 | 39 | 18.428571 | 0.777778 | 0.488372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
92120d3b0eb23708379b1ae8251b39bfbc12ce09 | 24 | py | Python | Modules/vms/statedef/statedef.py | vmssoftware/cpython | b5d2c7f578d33963798a02ca32f0c151c908aa7c | [
"0BSD"
] | 2 | 2021-10-06T15:46:53.000Z | 2022-01-26T02:58:54.000Z | Modules/vms/statedef/statedef.py | vmssoftware/cpython | b5d2c7f578d33963798a02ca32f0c151c908aa7c | [
"0BSD"
] | null | null | null | Modules/vms/statedef/statedef.py | vmssoftware/cpython | b5d2c7f578d33963798a02ca32f0c151c908aa7c | [
"0BSD"
] | null | null | null | from _statedef import *
| 12 | 23 | 0.791667 | 3 | 24 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 24 | 1 | 24 | 24 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a60e6bd6cac0616b623df57b18b6921d6976e846 | 233 | py | Python | app/utils/filesystem_utils.py | namuan/task-rider | 4474bb1acde98a489f52834ad3b9705f3f6e7034 | [
"MIT"
] | 5 | 2020-01-25T00:47:38.000Z | 2021-11-09T11:05:14.000Z | app/utils/filesystem_utils.py | namuan/task-rider | 4474bb1acde98a489f52834ad3b9705f3f6e7034 | [
"MIT"
] | 11 | 2020-06-07T12:29:21.000Z | 2020-06-24T19:44:36.000Z | app/utils/filesystem_utils.py | namuan/orkestra | 83b67f7e816c94b75232691c14d91fd9d62213ed | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QFileDialog
def open_file_dialog(parent, dialog_title, dialog_location, file_filter=None):
return QFileDialog.getOpenFileName(
parent, dialog_title, dialog_location, filter=file_filter
)
| 29.125 | 78 | 0.7897 | 28 | 233 | 6.285714 | 0.571429 | 0.136364 | 0.193182 | 0.261364 | 0.352273 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005025 | 0.145923 | 233 | 7 | 79 | 33.285714 | 0.879397 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
a61ed4b89c21ddc668ed6ca11d7c695a62e528c0 | 42 | py | Python | pepperonai/language/__init__.py | JonWiggins/pepperon.ai | 7162479dabb072cc125e707dc93785dff47dcb5b | [
"MIT"
] | 8 | 2019-09-30T03:41:10.000Z | 2021-05-30T22:18:17.000Z | pepperonai/language/__init__.py | JonWiggins/pepperon.ai | 7162479dabb072cc125e707dc93785dff47dcb5b | [
"MIT"
] | null | null | null | pepperonai/language/__init__.py | JonWiggins/pepperon.ai | 7162479dabb072cc125e707dc93785dff47dcb5b | [
"MIT"
] | 1 | 2020-04-13T16:12:43.000Z | 2020-04-13T16:12:43.000Z | from kgrams import *
from ngrams import *
| 14 | 20 | 0.761905 | 6 | 42 | 5.333333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.190476 | 42 | 2 | 21 | 21 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a62fd441d664bb7cc27798a8039b1253732fc68e | 500 | py | Python | pyleecan/Methods/Slot/HoleM53/__init__.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Slot/HoleM53/__init__.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Slot/HoleM53/__init__.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | # -*- coding: utf-8 -*-
from ....Methods.Slot.Slot import SlotCheckError
class Slot53InterError(SlotCheckError):
""" """
pass
class S53_NoneError(SlotCheckError):
"""Raised when a propery of HoleM53 is None"""
pass
class S53_Rext0CheckError(SlotCheckError):
""" """
pass
class S53_Rext1CheckError(SlotCheckError):
""" """
pass
class S53_W4CheckError(SlotCheckError):
""" """
pass
class S53_W5CheckError(SlotCheckError):
""" """
pass
| 12.5 | 50 | 0.638 | 46 | 500 | 6.826087 | 0.543478 | 0.286624 | 0.191083 | 0.33121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.048969 | 0.224 | 500 | 39 | 51 | 12.820513 | 0.760309 | 0.126 | 0 | 0.461538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.461538 | 0.076923 | 0 | 0.538462 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 6 |
a63c3d9470e575b5dda6ca40940f7fd5cc53654e | 4,419 | py | Python | tests/emm/services/test_validation_service.py | zamj/evg-module-manager | e6029edce023071847ef2ea25af89c31219f41f6 | [
"Apache-2.0"
] | null | null | null | tests/emm/services/test_validation_service.py | zamj/evg-module-manager | e6029edce023071847ef2ea25af89c31219f41f6 | [
"Apache-2.0"
] | 18 | 2021-11-19T16:43:39.000Z | 2022-03-31T20:02:20.000Z | tests/emm/services/test_validation_service.py | zamj/evg-module-manager | e6029edce023071847ef2ea25af89c31219f41f6 | [
"Apache-2.0"
] | 2 | 2021-11-09T16:02:57.000Z | 2022-02-09T18:35:24.000Z | """Unit tests for validation_service.py."""
from unittest.mock import MagicMock, patch
import pytest
from click import UsageError
import emm.services.validation_service as under_test
from emm.services.file_service import FileService
NAMESPACE = "emm.services.validation_service"
def ns(local_path: str) -> str:
return f"{NAMESPACE}.{local_path}"
@pytest.fixture()
def file_service():
file_service = MagicMock(spec_set=FileService)
return file_service
@pytest.fixture()
def validation_service(file_service):
validation_service = under_test.ValidationService(file_service)
return validation_service
class TestValidateGitCommand:
def test_validate_should_raise_exception_if_command_is_missing(
self, validation_service, file_service
):
file_service.which.return_value = None
with pytest.raises(UsageError):
validation_service.validate_git_command()
file_service.which.assert_called_with("git")
def test_validate_should_not_raise_exception_if_command_is_found(
self, validation_service, file_service
):
file_service.which.return_value = "/usr/bin/git"
validation_service.validate_git_command()
file_service.which.assert_called_with("git")
class TestValidateGhCommand:
def test_validate_should_raise_exception_if_command_is_missing(
self, validation_service, file_service
):
file_service.which.return_value = None
with pytest.raises(UsageError):
validation_service.validate_gh_command()
file_service.which.assert_called_with("gh")
def test_validate_should_not_raise_exception_if_command_is_found(
self, validation_service, file_service
):
file_service.which.return_value = "/usr/bin/gh"
validation_service.validate_gh_command()
file_service.which.assert_called_with("gh")
class TestValidateEvergreenCommand:
def test_validate_should_raise_exception_if_command_is_missing(
self, validation_service, file_service
):
file_service.which.return_value = None
with pytest.raises(UsageError):
validation_service.validate_evergreen_command()
file_service.which.assert_called_with("evergreen")
def test_validate_should_not_raise_exception_if_command_is_found(
self, validation_service, file_service
):
file_service.which.return_value = "/usr/bin/evergreen"
validation_service.validate_evergreen_command()
file_service.which.assert_called_with("evergreen")
class TestValidateGithubAuthentication:
@patch(ns("_check_github_auth_status"))
def test_validate_should_raise_exception_if_gh_is_not_authed(
self, check_gh_auth_mock, validation_service
):
check_gh_auth_mock.return_value = False
with pytest.raises(UsageError):
validation_service.validate_github_authentication()
print()
@patch(ns("_check_github_auth_status"))
def test_validate_should_not_raise_exception_if_gh_is_authed(
self, check_gh_auth_mock, validation_service
):
check_gh_auth_mock.return_value = True
validation_service.validate_github_authentication()
class TestValidateGithub:
@patch(ns("_check_github_auth_status"))
def test_validate_should_raise_exception_if_gh_is_not_authed(
self, check_gh_auth_mock, validation_service, file_service
):
file_service.which.return_value = "/usr/bin/gh"
check_gh_auth_mock.return_value = False
with pytest.raises(UsageError):
validation_service.validate_github()
@patch(ns("_check_github_auth_status"))
def test_validate_should_not_raise_exception_if_gh_command_is_not_found(
self, check_gh_auth_mock, validation_service, file_service
):
file_service.which.return_value = None
check_gh_auth_mock.return_value = True
with pytest.raises(UsageError):
validation_service.validate_github()
file_service.which.assert_called_with("gh")
@patch(ns("_check_github_auth_status"))
def test_validate_should_not_raise_exception_if_gh_is_authed_and_gh_exists(
self, check_gh_auth_mock, validation_service, file_service
):
file_service.which.return_value = "/usr/bin/gh"
check_gh_auth_mock.return_value = True
validation_service.validate_github()
| 30.6875 | 79 | 0.746323 | 539 | 4,419 | 5.632653 | 0.137291 | 0.112319 | 0.118577 | 0.076087 | 0.779974 | 0.770751 | 0.770751 | 0.749671 | 0.730896 | 0.730896 | 0 | 0 | 0.182394 | 4,419 | 143 | 80 | 30.902098 | 0.840299 | 0.008373 | 0 | 0.744898 | 0 | 0 | 0.062386 | 0.041133 | 0 | 0 | 0 | 0 | 0.071429 | 1 | 0.142857 | false | 0 | 0.05102 | 0.010204 | 0.27551 | 0.010204 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
a6470a12607f3665d875c1d7dfba8f61b7580de2 | 30 | py | Python | __init__.py | Robinson04/serverlesspack | 271fdbc4bcc769a778e369b14e5f491360824512 | [
"MIT"
] | 1 | 2022-03-07T22:32:32.000Z | 2022-03-07T22:32:32.000Z | __init__.py | Robinson04/serverlesspack | 271fdbc4bcc769a778e369b14e5f491360824512 | [
"MIT"
] | 3 | 2021-03-01T19:12:46.000Z | 2021-05-09T11:09:27.000Z | __init__.py | Robinson04/serverlesspack | 271fdbc4bcc769a778e369b14e5f491360824512 | [
"MIT"
] | null | null | null | from .serverlesspack import *
| 15 | 29 | 0.8 | 3 | 30 | 8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 30 | 1 | 30 | 30 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a6720a192f655fca9db322142303f3b4564ccd85 | 97 | py | Python | easy_mobile/sound.py | adam-mcdaniel/easy-mobile-2 | aca22dfcb9d484ce41e6e6316354babcb40f01c8 | [
"MIT"
] | null | null | null | easy_mobile/sound.py | adam-mcdaniel/easy-mobile-2 | aca22dfcb9d484ce41e6e6316354babcb40f01c8 | [
"MIT"
] | null | null | null | easy_mobile/sound.py | adam-mcdaniel/easy-mobile-2 | aca22dfcb9d484ce41e6e6316354babcb40f01c8 | [
"MIT"
] | null | null | null | from kivy.core.audio import SoundLoader
def Sound(path):
return SoundLoader.load(path)
| 16.166667 | 39 | 0.731959 | 13 | 97 | 5.461538 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185567 | 97 | 6 | 40 | 16.166667 | 0.898734 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
a6f4e6598d9786652473dc92cd05c430311bb0d4 | 26,292 | py | Python | tests/base/test_operators.py | ngodber/discretize | 2329c9e9552b5c05f40ebf62f0bb207267bd2f92 | [
"MIT"
] | 123 | 2017-01-09T04:59:25.000Z | 2022-03-29T08:06:43.000Z | tests/base/test_operators.py | ngodber/discretize | 2329c9e9552b5c05f40ebf62f0bb207267bd2f92 | [
"MIT"
] | 246 | 2017-01-09T17:20:12.000Z | 2022-03-01T22:05:20.000Z | tests/base/test_operators.py | ngodber/discretize | 2329c9e9552b5c05f40ebf62f0bb207267bd2f92 | [
"MIT"
] | 26 | 2018-03-27T19:24:46.000Z | 2021-11-11T20:28:09.000Z | import numpy as np
import unittest
import discretize
# Tolerance
TOL = 1e-14
np.random.seed(1)
MESHTYPES = [
"uniformTensorMesh",
# 'randomTensorMesh',
"uniformCurv",
"rotateCurv",
]
ORDERS = np.r_[2.0, 2.0, 2.0]
call2 = lambda fun, xyz: fun(xyz[:, 0], xyz[:, 1])
call3 = lambda fun, xyz: fun(xyz[:, 0], xyz[:, 1], xyz[:, 2])
cart_row2 = lambda g, xfun, yfun: np.c_[call2(xfun, g), call2(yfun, g)]
cart_row3 = lambda g, xfun, yfun, zfun: np.c_[
call3(xfun, g), call3(yfun, g), call3(zfun, g)
]
cartF2 = lambda M, fx, fy: np.vstack(
(cart_row2(M.gridFx, fx, fy), cart_row2(M.gridFy, fx, fy))
)
cartE2 = lambda M, ex, ey: np.vstack(
(cart_row2(M.gridEx, ex, ey), cart_row2(M.gridEy, ex, ey))
)
cartF3 = lambda M, fx, fy, fz: np.vstack(
(
cart_row3(M.gridFx, fx, fy, fz),
cart_row3(M.gridFy, fx, fy, fz),
cart_row3(M.gridFz, fx, fy, fz),
)
)
cartE3 = lambda M, ex, ey, ez: np.vstack(
(
cart_row3(M.gridEx, ex, ey, ez),
cart_row3(M.gridEy, ex, ey, ez),
cart_row3(M.gridEz, ex, ey, ez),
)
)
class TestCurl(discretize.tests.OrderTest):
name = "Curl"
meshTypes = MESHTYPES
def getError(self):
# fun: i (cos(y)) + j (cos(z)) + k (cos(x))
# sol: i (sin(z)) + j (sin(x)) + k (sin(y))
funX = lambda x, y, z: np.cos(2 * np.pi * y)
funY = lambda x, y, z: np.cos(2 * np.pi * z)
funZ = lambda x, y, z: np.cos(2 * np.pi * x)
solX = lambda x, y, z: 2 * np.pi * np.sin(2 * np.pi * z)
solY = lambda x, y, z: 2 * np.pi * np.sin(2 * np.pi * x)
solZ = lambda x, y, z: 2 * np.pi * np.sin(2 * np.pi * y)
Ec = cartE3(self.M, funX, funY, funZ)
E = self.M.projectEdgeVector(Ec)
Fc = cartF3(self.M, solX, solY, solZ)
curlE_ana = self.M.projectFaceVector(Fc)
curlE = self.M.edgeCurl.dot(E)
if self._meshType == "rotateCurv":
# Really it is the integration we should be caring about:
# So, let us look at the l2 norm.
err = np.linalg.norm(self.M.area * (curlE - curlE_ana), 2)
else:
err = np.linalg.norm((curlE - curlE_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestCurl2D(discretize.tests.OrderTest):
name = "Cell Grad 2D - Dirichlet"
meshTypes = ["uniformTensorMesh"]
meshDimension = 2
meshSizes = [8, 16, 32, 64]
def getError(self):
# Test function
ex = lambda x, y: np.cos(y)
ey = lambda x, y: np.cos(x)
sol = lambda x, y: -np.sin(x) + np.sin(y)
sol_curl2d = call2(sol, self.M.gridCC)
Ec = cartE2(self.M, ex, ey)
sol_ana = self.M.edgeCurl * self.M.projectFaceVector(Ec)
err = np.linalg.norm((sol_curl2d - sol_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestCellGrad1D_InhomogeneousDirichlet(discretize.tests.OrderTest):
name = "Cell Grad 1D - Dirichlet"
meshTypes = ["uniformTensorMesh"]
meshDimension = 1
expectedOrders = (
1 # because of the averaging involved in the ghost point. u_b = (u_n + u_g)/2
)
meshSizes = [8, 16, 32, 64]
def getError(self):
# Test function
fx = lambda x: -2 * np.pi * np.sin(2 * np.pi * x)
sol = lambda x: np.cos(2 * np.pi * x)
xc = sol(self.M.gridCC)
gradX_ana = fx(self.M.gridFx)
bc = np.array([1, 1])
self.M.setCellGradBC("dirichlet")
gradX = self.M.cellGrad.dot(xc) + self.M.cellGradBC * bc
err = np.linalg.norm((gradX - gradX_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestCellGrad2D_Dirichlet(discretize.tests.OrderTest):
name = "Cell Grad 2D - Dirichlet"
meshTypes = ["uniformTensorMesh"]
meshDimension = 2
meshSizes = [8, 16, 32, 64]
def getError(self):
# Test function
fx = lambda x, y: 2 * np.pi * np.cos(2 * np.pi * x) * np.sin(2 * np.pi * y)
fy = lambda x, y: 2 * np.pi * np.cos(2 * np.pi * y) * np.sin(2 * np.pi * x)
sol = lambda x, y: np.sin(2 * np.pi * x) * np.sin(2 * np.pi * y)
xc = call2(sol, self.M.gridCC)
Fc = cartF2(self.M, fx, fy)
gradX_ana = self.M.projectFaceVector(Fc)
self.M.setCellGradBC("dirichlet")
gradX = self.M.cellGrad.dot(xc)
err = np.linalg.norm((gradX - gradX_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestCellGrad3D_Dirichlet(discretize.tests.OrderTest):
name = "Cell Grad 3D - Dirichlet"
meshTypes = ["uniformTensorMesh"]
meshDimension = 3
meshSizes = [8, 16, 32]
def getError(self):
# Test function
fx = (
lambda x, y, z: 2
* np.pi
* np.cos(2 * np.pi * x)
* np.sin(2 * np.pi * y)
* np.sin(2 * np.pi * z)
)
fy = (
lambda x, y, z: 2
* np.pi
* np.sin(2 * np.pi * x)
* np.cos(2 * np.pi * y)
* np.sin(2 * np.pi * z)
)
fz = (
lambda x, y, z: 2
* np.pi
* np.sin(2 * np.pi * x)
* np.sin(2 * np.pi * y)
* np.cos(2 * np.pi * z)
)
sol = (
lambda x, y, z: np.sin(2 * np.pi * x)
* np.sin(2 * np.pi * y)
* np.sin(2 * np.pi * z)
)
xc = call3(sol, self.M.gridCC)
Fc = cartF3(self.M, fx, fy, fz)
gradX_ana = self.M.projectFaceVector(Fc)
self.M.setCellGradBC("dirichlet")
gradX = self.M.cellGrad.dot(xc)
err = np.linalg.norm((gradX - gradX_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestCellGrad2D_Neumann(discretize.tests.OrderTest):
name = "Cell Grad 2D - Neumann"
meshTypes = ["uniformTensorMesh"]
meshDimension = 2
meshSizes = [8, 16, 32, 64]
def getError(self):
# Test function
fx = lambda x, y: -2 * np.pi * np.sin(2 * np.pi * x) * np.cos(2 * np.pi * y)
fy = lambda x, y: -2 * np.pi * np.sin(2 * np.pi * y) * np.cos(2 * np.pi * x)
sol = lambda x, y: np.cos(2 * np.pi * x) * np.cos(2 * np.pi * y)
xc = call2(sol, self.M.gridCC)
Fc = cartF2(self.M, fx, fy)
gradX_ana = self.M.projectFaceVector(Fc)
self.M.setCellGradBC("neumann")
gradX = self.M.cellGrad.dot(xc)
err = np.linalg.norm((gradX - gradX_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestCellGrad3D_Neumann(discretize.tests.OrderTest):
name = "Cell Grad 3D - Neumann"
meshTypes = ["uniformTensorMesh"]
meshDimension = 3
meshSizes = [8, 16, 32]
def getError(self):
# Test function
fx = (
lambda x, y, z: -2
* np.pi
* np.sin(2 * np.pi * x)
* np.cos(2 * np.pi * y)
* np.cos(2 * np.pi * z)
)
fy = (
lambda x, y, z: -2
* np.pi
* np.cos(2 * np.pi * x)
* np.sin(2 * np.pi * y)
* np.cos(2 * np.pi * z)
)
fz = (
lambda x, y, z: -2
* np.pi
* np.cos(2 * np.pi * x)
* np.cos(2 * np.pi * y)
* np.sin(2 * np.pi * z)
)
sol = (
lambda x, y, z: np.cos(2 * np.pi * x)
* np.cos(2 * np.pi * y)
* np.cos(2 * np.pi * z)
)
xc = call3(sol, self.M.gridCC)
Fc = cartF3(self.M, fx, fy, fz)
gradX_ana = self.M.projectFaceVector(Fc)
self.M.setCellGradBC("neumann")
gradX = self.M.cellGrad.dot(xc)
err = np.linalg.norm((gradX - gradX_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestFaceDiv3D(discretize.tests.OrderTest):
name = "Face Divergence 3D"
meshTypes = MESHTYPES
meshSizes = [8, 16, 32, 64]
def getError(self):
# Test function
fx = lambda x, y, z: np.sin(2 * np.pi * x)
fy = lambda x, y, z: np.sin(2 * np.pi * y)
fz = lambda x, y, z: np.sin(2 * np.pi * z)
sol = lambda x, y, z: (
2 * np.pi * np.cos(2 * np.pi * x)
+ 2 * np.pi * np.cos(2 * np.pi * y)
+ 2 * np.pi * np.cos(2 * np.pi * z)
)
Fc = cartF3(self.M, fx, fy, fz)
F = self.M.projectFaceVector(Fc)
divF = self.M.faceDiv.dot(F)
divF_ana = call3(sol, self.M.gridCC)
if self._meshType == "rotateCurv":
# Really it is the integration we should be caring about:
# So, let us look at the l2 norm.
err = np.linalg.norm(self.M.vol * (divF - divF_ana), 2)
else:
err = np.linalg.norm((divF - divF_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestFaceDiv2D(discretize.tests.OrderTest):
name = "Face Divergence 2D"
meshTypes = MESHTYPES
meshDimension = 2
meshSizes = [8, 16, 32, 64]
def getError(self):
# Test function
fx = lambda x, y: np.sin(2 * np.pi * x)
fy = lambda x, y: np.sin(2 * np.pi * y)
sol = lambda x, y: 2 * np.pi * (np.cos(2 * np.pi * x) + np.cos(2 * np.pi * y))
Fc = cartF2(self.M, fx, fy)
F = self.M.projectFaceVector(Fc)
divF = self.M.faceDiv.dot(F)
divF_ana = call2(sol, self.M.gridCC)
err = np.linalg.norm((divF - divF_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestNodalGrad(discretize.tests.OrderTest):
name = "Nodal Gradient"
meshTypes = MESHTYPES
def getError(self):
# Test function
fun = lambda x, y, z: (np.cos(x) + np.cos(y) + np.cos(z))
# i (sin(x)) + j (sin(y)) + k (sin(z))
solX = lambda x, y, z: -np.sin(x)
solY = lambda x, y, z: -np.sin(y)
solZ = lambda x, y, z: -np.sin(z)
phi = call3(fun, self.M.gridN)
gradE = self.M.nodalGrad.dot(phi)
Ec = cartE3(self.M, solX, solY, solZ)
gradE_ana = self.M.projectEdgeVector(Ec)
err = np.linalg.norm((gradE - gradE_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestNodalGrad2D(discretize.tests.OrderTest):
name = "Nodal Gradient 2D"
meshTypes = MESHTYPES
meshDimension = 2
def getError(self):
# Test function
fun = lambda x, y: (np.cos(x) + np.cos(y))
# i (sin(x)) + j (sin(y)) + k (sin(z))
solX = lambda x, y: -np.sin(x)
solY = lambda x, y: -np.sin(y)
phi = call2(fun, self.M.gridN)
gradE = self.M.nodalGrad.dot(phi)
Ec = cartE2(self.M, solX, solY)
gradE_ana = self.M.projectEdgeVector(Ec)
err = np.linalg.norm((gradE - gradE_ana), np.inf)
return err
def test_order(self):
self.orderTest()
class TestAveraging1D(discretize.tests.OrderTest):
name = "Averaging 1D"
meshTypes = ["uniformTensorMesh"]
meshDimension = 1
meshSizes = [16, 32, 64]
def getError(self):
num = self.getAve(self.M) * self.getHere(self.M)
err = np.linalg.norm((self.getThere(self.M) - num), np.inf)
return err
def test_orderN2CC(self):
self.name = "Averaging 1D: N2CC"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.gridN)
self.getThere = lambda M: fun(M.gridCC)
self.getAve = lambda M: M.aveN2CC
self.orderTest()
def test_exactN2F(self):
self.name = "Averaging 1D: N2F"
fun = lambda x: np.cos(x)
M, _ = discretize.tests.setup_mesh('uniformTensorMesh', 32, 1)
v1 = M.aveN2F * fun(M.gridN)
v2 = fun(M.faces)
np.testing.assert_allclose(v1, v2)
def test_orderN2E(self):
self.name = "Averaging 1D: N2E"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.gridN)
self.getThere = lambda M: fun(M.edges)
self.getAve = lambda M: M.aveN2E
self.orderTest()
def test_orderF2CC(self):
self.name = "Averaging 1D: F2CC"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.faces)
self.getThere = lambda M: fun(M.gridCC)
self.getAve = lambda M: M.aveF2CC
self.orderTest()
def test_orderF2CCV(self):
self.name = "Averaging 1D: F2CCV"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.faces)
self.getThere = lambda M: fun(M.cell_centers)
self.getAve = lambda M: M.aveF2CCV
self.orderTest()
def test_orderCC2F(self):
self.name = "Averaging 1D: CC2F"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.gridCC)
self.getThere = lambda M: fun(M.faces)
self.getAve = lambda M: M.aveCC2F
self.expectedOrders = 1
self.orderTest()
self.expectedOrders = 2
def test_exactE2CC(self):
self.name = "Averaging 1D: E2CC"
fun = lambda x: np.cos(x)
M, _ = discretize.tests.setup_mesh('uniformTensorMesh', 32, 1)
v1 = M.aveE2CC @ fun(M.edges)
v2 = fun(M.gridCC)
np.testing.assert_allclose(v1, v2)
def test_exactE2CCV(self):
self.name = "Averaging 1D: E2CCV"
fun = lambda x: np.cos(x)
M, _ = discretize.tests.setup_mesh('uniformTensorMesh', 32, 1)
v1 = M.aveE2CCV @ fun(M.edges)
v2 = fun(M.gridCC)
np.testing.assert_allclose(v1, v2)
def test_exactCC2E(self):
self.name = "Averaging 1D: cell_centers_to_edges"
fun = lambda x: np.cos(x)
M, _ = discretize.tests.setup_mesh('uniformTensorMesh', 32, 1)
v1 = M.average_cell_to_edge @ fun(M.edges)
v2 = fun(M.gridCC)
np.testing.assert_allclose(v1, v2)
def test_orderCC2FV(self):
self.name = "Averaging 1D: CC2FV"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.gridCC)
self.getThere = lambda M: fun(M.faces)
self.getAve = lambda M: M.aveCCV2F
self.expectedOrders = 1
self.orderTest()
self.expectedOrders = 2
def test_orderE2FV(self):
self.name = "Averaging 1D: E2FV"
fun = lambda x: np.cos(x)
self.getHere = lambda M: fun(M.edges)
self.getThere = lambda M: fun(M.faces)
self.getAve = lambda M: M.average_edge_to_face_vector
self.expectedOrders = 1
self.orderTest()
self.expectedOrders = 2
class TestAverating2DSimple(unittest.TestCase):
def setUp(self):
hx = np.random.rand(10)
hy = np.random.rand(10)
self.mesh = discretize.TensorMesh([hx, hy])
def test_constantEdges(self):
edge_vec = np.ones(self.mesh.nE)
assert all(self.mesh.aveE2CC * edge_vec == 1.0)
assert all(self.mesh.aveE2CCV * edge_vec == 1.0)
def test_constantFaces(self):
face_vec = np.ones(self.mesh.nF)
assert all(self.mesh.aveF2CC * face_vec == 1.0)
assert all(self.mesh.aveF2CCV * face_vec == 1.0)
class TestAveraging2D(discretize.tests.OrderTest):
name = "Averaging 2D"
meshTypes = MESHTYPES
meshDimension = 2
meshSizes = [16, 32, 64]
def getError(self):
num = self.getAve(self.M) * self.getHere(self.M)
err = np.linalg.norm((self.getThere(self.M) - num), np.inf)
return err
def test_orderN2CC(self):
self.name = "Averaging 2D: N2CC"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: call2(fun, M.gridN)
self.getThere = lambda M: call2(fun, M.gridCC)
self.getAve = lambda M: M.aveN2CC
self.orderTest()
def test_orderN2F(self):
self.name = "Averaging 2D: N2F"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: call2(fun, M.gridN)
self.getThere = lambda M: np.r_[call2(fun, M.gridFx), call2(fun, M.gridFy)]
self.getAve = lambda M: M.aveN2F
self.orderTest()
def test_orderN2E(self):
self.name = "Averaging 2D: N2E"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: call2(fun, M.gridN)
self.getThere = lambda M: np.r_[call2(fun, M.gridEx), call2(fun, M.gridEy)]
self.getAve = lambda M: M.aveN2E
self.orderTest()
def test_orderF2CC(self):
self.name = "Averaging 2D: F2CC"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: np.r_[call2(fun, M.gridFx), call2(fun, M.gridFy)]
self.getThere = lambda M: call2(fun, M.gridCC)
self.getAve = lambda M: M.aveF2CC
self.orderTest()
def test_orderF2CCV(self):
self.name = "Averaging 2D: F2CCV"
funX = lambda x, y: (np.cos(x) + np.sin(y))
funY = lambda x, y: (np.cos(y) * np.sin(x))
self.getHere = lambda M: np.r_[call2(funX, M.gridFx), call2(funY, M.gridFy)]
self.getThere = lambda M: np.r_[call2(funX, M.gridCC), call2(funY, M.gridCC)]
self.getAve = lambda M: M.aveF2CCV
self.orderTest()
def test_orderCC2F(self):
self.name = "Averaging 2D: CC2F"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: call2(fun, M.gridCC)
self.getThere = lambda M: np.r_[call2(fun, M.gridFx), call2(fun, M.gridFy)]
self.getAve = lambda M: M.aveCC2F
self.expectedOrders = ORDERS / 2.0
self.orderTest()
self.expectedOrders = ORDERS
def test_orderE2CC(self):
self.name = "Averaging 2D: E2CC"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: np.r_[call2(fun, M.gridEx), call2(fun, M.gridEy)]
self.getThere = lambda M: call2(fun, M.gridCC)
self.getAve = lambda M: M.aveE2CC
self.orderTest()
def test_orderE2CCV(self):
self.name = "Averaging 2D: E2CCV"
funX = lambda x, y: (np.cos(x) + np.sin(y))
funY = lambda x, y: (np.cos(y) * np.sin(x))
self.getHere = lambda M: np.r_[call2(funX, M.gridEx), call2(funY, M.gridEy)]
self.getThere = lambda M: np.r_[call2(funX, M.gridCC), call2(funY, M.gridCC)]
self.getAve = lambda M: M.aveE2CCV
self.orderTest()
def test_orderCC2E(self):
self.name = "Averaging 2D: cell_centers_to_edges"
fun = lambda x, y: (np.cos(x) + np.sin(y))
self.getHere = lambda M: call2(fun, M.gridCC)
self.getThere = lambda M: call2(fun, M.edges)
self.getAve = lambda M: M.average_cell_to_edge
self.expectedOrders = ORDERS / 2.0
self.orderTest()
self.expectedOrders = ORDERS
def test_orderCC2FV(self):
self.name = "Averaging 2D: CC2FV"
funX = lambda x, y: (np.cos(x) + np.sin(y))
funY = lambda x, y: (np.cos(y) * np.sin(x))
self.getHere = lambda M: np.r_[call2(funX, M.gridCC), call2(funY, M.gridCC)]
self.getThere = lambda M: np.r_[call2(funX, M.gridFx), call2(funY, M.gridFy)]
self.getAve = lambda M: M.aveCCV2F
self.expectedOrders = ORDERS / 2.0
self.orderTest()
self.expectedOrders = ORDERS
class TestAverating3DSimple(unittest.TestCase):
def setUp(self):
hx = np.random.rand(10)
hy = np.random.rand(10)
hz = np.random.rand(10)
self.mesh = discretize.TensorMesh([hx, hy, hz])
def test_constantEdges(self):
edge_vec = np.ones(self.mesh.nE)
assert all(np.absolute(self.mesh.aveE2CC * edge_vec - 1.0) < TOL)
assert all(np.absolute(self.mesh.aveE2CCV * edge_vec - 1.0) < TOL)
def test_constantFaces(self):
face_vec = np.ones(self.mesh.nF)
assert all(np.absolute(self.mesh.aveF2CC * face_vec - 1.0) < TOL)
assert all(np.absolute(self.mesh.aveF2CCV * face_vec - 1.0) < TOL)
class TestAveraging3D(discretize.tests.OrderTest):
name = "Averaging 3D"
meshTypes = MESHTYPES
meshDimension = 3
meshSizes = [16, 32, 64]
def getError(self):
num = self.getAve(self.M) * self.getHere(self.M)
err = np.linalg.norm((self.getThere(self.M) - num), np.inf)
return err
def test_orderN2CC(self):
self.name = "Averaging 3D: N2CC"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: call3(fun, M.gridN)
self.getThere = lambda M: call3(fun, M.gridCC)
self.getAve = lambda M: M.aveN2CC
self.orderTest()
def test_orderN2F(self):
self.name = "Averaging 3D: N2F"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: call3(fun, M.gridN)
self.getThere = lambda M: np.r_[
call3(fun, M.gridFx), call3(fun, M.gridFy), call3(fun, M.gridFz)
]
self.getAve = lambda M: M.aveN2F
self.orderTest()
def test_orderN2E(self):
self.name = "Averaging 3D: N2E"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: call3(fun, M.gridN)
self.getThere = lambda M: np.r_[
call3(fun, M.gridEx), call3(fun, M.gridEy), call3(fun, M.gridEz)
]
self.getAve = lambda M: M.aveN2E
self.orderTest()
def test_orderF2CC(self):
self.name = "Averaging 3D: F2CC"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: np.r_[
call3(fun, M.gridFx), call3(fun, M.gridFy), call3(fun, M.gridFz)
]
self.getThere = lambda M: call3(fun, M.gridCC)
self.getAve = lambda M: M.aveF2CC
self.orderTest()
def test_orderF2CCV(self):
self.name = "Averaging 3D: F2CCV"
funX = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
funY = lambda x, y, z: (np.cos(x) + np.sin(y) * np.exp(z))
funZ = lambda x, y, z: (np.cos(x) * np.sin(y) + np.exp(z))
self.getHere = lambda M: np.r_[
call3(funX, M.gridFx), call3(funY, M.gridFy), call3(funZ, M.gridFz)
]
self.getThere = lambda M: np.r_[
call3(funX, M.gridCC), call3(funY, M.gridCC), call3(funZ, M.gridCC)
]
self.getAve = lambda M: M.aveF2CCV
self.orderTest()
def test_orderE2CC(self):
self.name = "Averaging 3D: E2CC"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: np.r_[
call3(fun, M.gridEx), call3(fun, M.gridEy), call3(fun, M.gridEz)
]
self.getThere = lambda M: call3(fun, M.gridCC)
self.getAve = lambda M: M.aveE2CC
self.orderTest()
def test_orderE2CCV(self):
self.name = "Averaging 3D: E2CCV"
funX = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
funY = lambda x, y, z: (np.cos(x) + np.sin(y) * np.exp(z))
funZ = lambda x, y, z: (np.cos(x) * np.sin(y) + np.exp(z))
self.getHere = lambda M: np.r_[
call3(funX, M.gridEx), call3(funY, M.gridEy), call3(funZ, M.gridEz)
]
self.getThere = lambda M: np.r_[
call3(funX, M.gridCC), call3(funY, M.gridCC), call3(funZ, M.gridCC)
]
self.getAve = lambda M: M.aveE2CCV
self.expectedOrders = ORDERS
self.orderTest()
def test_orderCC2F(self):
self.name = "Averaging 3D: CC2F"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: call3(fun, M.gridCC)
self.getThere = lambda M: np.r_[
call3(fun, M.gridFx), call3(fun, M.gridFy), call3(fun, M.gridFz)
]
self.getAve = lambda M: M.aveCC2F
self.expectedOrders = ORDERS / 2.0
self.orderTest()
self.expectedOrders = ORDERS
def test_orderCC2E(self):
self.name = "Averaging 3D: CC2E"
fun = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
self.getHere = lambda M: call3(fun, M.gridCC)
self.getThere = lambda M: call3(fun, M.edges)
self.getAve = lambda M: M.average_cell_to_edge
self.expectedOrders = ORDERS / 2.0
self.orderTest()
self.expectedOrders = ORDERS
def test_orderCCV2F(self):
self.name = "Averaging 3D: CC2FV"
funX = lambda x, y, z: (np.cos(x) + np.sin(y) + np.exp(z))
funY = lambda x, y, z: (np.cos(x) + np.sin(y) * np.exp(z))
funZ = lambda x, y, z: (np.cos(x) * np.sin(y) + np.exp(z))
self.getHere = lambda M: np.r_[
call3(funX, M.gridCC), call3(funY, M.gridCC), call3(funZ, M.gridCC)
]
self.getThere = lambda M: np.r_[
call3(funX, M.gridFx), call3(funY, M.gridFy), call3(funZ, M.gridFz)
]
self.getAve = lambda M: M.aveCCV2F
self.expectedOrders = ORDERS / 2.0
self.orderTest()
self.expectedOrders = ORDERS
class MimeticProperties(unittest.TestCase):
meshTypes = MESHTYPES
meshDimension = 3
meshSize = 64
tol = 1e-11 # there is still some error due to rounding
def test_DivCurl(self):
for meshType in self.meshTypes:
mesh, _ = discretize.tests.setupMesh(
meshType, self.meshSize, self.meshDimension
)
v = np.random.rand(mesh.nE)
divcurlv = mesh.faceDiv * (mesh.edgeCurl * v)
rel_err = np.linalg.norm(divcurlv) / np.linalg.norm(v)
passed = rel_err < self.tol
print(
"Testing Div * Curl on {} : |Div Curl v| / |v| = {} "
"... {}".format(meshType, rel_err, "FAIL" if not passed else "ok")
)
def test_CurlGrad(self):
for meshType in self.meshTypes:
mesh, _ = discretize.tests.setupMesh(
meshType, self.meshSize, self.meshDimension
)
v = np.random.rand(mesh.nN)
curlgradv = mesh.edgeCurl * (mesh.nodalGrad * v)
rel_err = np.linalg.norm(curlgradv) / np.linalg.norm(v)
passed = rel_err < self.tol
print(
"Testing Curl * Grad on {} : |Curl Grad v| / |v|= {} "
"... {}".format(meshType, rel_err, "FAIL" if not passed else "ok")
)
if __name__ == "__main__":
unittest.main()
| 32.419236 | 86 | 0.554161 | 3,768 | 26,292 | 3.818737 | 0.072187 | 0.041351 | 0.025019 | 0.023768 | 0.872889 | 0.823754 | 0.7897 | 0.740427 | 0.728334 | 0.706442 | 0 | 0.028578 | 0.302602 | 26,292 | 810 | 87 | 32.459259 | 0.756163 | 0.023543 | 0 | 0.6375 | 0 | 0 | 0.04924 | 0.001637 | 0 | 0 | 0 | 0 | 0.01875 | 1 | 0.1 | false | 0.00625 | 0.004688 | 0 | 0.239063 | 0.003125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
a6fb64bff1874aba2ff22f9200b2c2df319864fc | 80,151 | py | Python | scrape_conferences.py | supersciencegrl/website-tools | ad27e2fbdbcdd764b30379e14b69bd4861c3db72 | [
"MIT"
] | 1 | 2022-02-12T03:10:14.000Z | 2022-02-12T03:10:14.000Z | scrape_conferences.py | supersciencegrl/website-tools | ad27e2fbdbcdd764b30379e14b69bd4861c3db72 | [
"MIT"
] | null | null | null | scrape_conferences.py | supersciencegrl/website-tools | ad27e2fbdbcdd764b30379e14b69bd4861c3db72 | [
"MIT"
] | null | null | null | __author__ = "Nessa Carson"
__copyright__ = "Copyright 2020"
__version__ = "1.1"
__email__ = "nessa.carson@syngenta.com"
__status__ = "Production"
##import glob
##import html
import os
##import urllib.request
##import urllib.error
##import string
import threading
import time
##
##import openpyxl
##from openpyxl.styles import Alignment, Font
import PySimpleGUI as sg
import pythoncom
def importPackages():
global packagesloaded
global glob, html, urllib, string, threading, time
global openpyxl, Alignment, Font, pythoncom
pythoncom.CoInitialize()
import glob
import html
## import os
import urllib.request
import urllib.error
import string
## import threading
## import time
import openpyxl
from openpyxl.styles import Alignment, Font
## import PySimpleGUI as sg
## import pythoncom
packagesloaded = True
def getevent(position):
for n, line in enumerate(page[position:]):
if line.strip().startswith('</tr>'):
endposition = position + n + 1
break
event = [p.strip() for p in page[position:endposition]]
return event
def captureline(line):
result = line.partition('">')[2].partition('</td>')[0]
return result
def decodethemes(themelist):
replacelist = [('agro', 'agrochemistry'), ('anal', 'analytical'), ('chembio', 'chem bio'), ('comp', 'computational/data'), ('edu', 'education'), ('inorg', 'inorganic/materials'), ('medchem', 'med chem'), ('policy', 'law/policy'), ('pharm', 'pharma/regulatory')]
otherslist = ['automation', 'careers', 'diversity', 'process', 'synthesis']
if 'all' in themelist:
outputlist = sorted([r[1] for r in replacelist] + otherslist)
else:
names = [r[0] for r in replacelist]
newthemelist = []
for theme in themelist:
if theme in names:
newthemelist.append(replacelist[names.index(theme)][1])
if theme == 'chembio':
newthemelist.append('med chem')
if theme in ['medchem', 'process']:
newthemelist.append('synthesis')
else:
newthemelist.append(theme)
outputlist = [i for n, i in enumerate(newthemelist) if i not in newthemelist[:n]]
outputlist.sort()
themes = (', ').join(outputlist)
return themes
def decoderegion(region):
continents = [('NA', 'North America'), ('SA', 'South America'), ('Aus', 'Australasia')]
Eurlocalities = [('WEur', 'Western Europe'), ('EEur', 'Eastern Europe')]
USAlocalities = [('WUSA', 'Western USA'), ('EUSA', 'Eastern USA'), ('CUSA', 'Central USA')]
UKlocalities = [('NEng', 'Northern England'), ('SEng', 'Southern England'), ('NI', 'Northern Ireland')]
regionlist = continents + Eurlocalities + USAlocalities + UKlocalities
if region in [r[0] for r in regionlist]:
output = regionlist[[r[0] for r in regionlist].index(region)][1]
else:
output = region
return output
def resource_path(relative_path):
try:
base_path = sys._MEIPASS
except Exception:
base_path = os.environ.get('_MEIPASS2', os.path.abspath('.'))
newpath = os.path.join(base_path, relative_path)
return newpath
def getfile(message, **kwargs):
if 'defaultvalue' in kwargs:
defaultvalue = kwargs['defaultvalue']
else:
defaultvalue = ''
if conferencelistexists:
noFileButtonText = 'Overwrite Conference_List.xlsx'
else:
noFileButtonText = 'Create new file'
layout = [ [sg.Text(message)],
[sg.InputText('_', key = 'inputfile'), sg.FileBrowse(initial_folder = mydir, file_types = (('xlsx files', '*.xlsx'),))],
[sg.Button('Add to file', key = 'addfile', bind_return_key = True), sg.Button(noFileButtonText, key = 'nofile')]
]
window = sg.Window(f'Syngenta Conference List v.{__version__}', layout, return_keyboard_events = True, icon = resource_path('syngenta_logo.ico'))
window.Finalize()
window['inputfile'].update(defaultvalue)
window.TKroot.focus_force()
window.Element('inputfile').SetFocus()
while True:
try:
event, values = window.Read()
if event == 'addfile':
inputfile = values['inputfile']
break
elif event == 'nofile':
inputfile = None
break
elif event == sg.WIN_CLOSED:
window.close()
break
except KeyboardInterrupt:
window.close()
window.close()
return inputfile # Throws exception if window had been closed unexpectedly
def getDataAndInputFile():
global datafound, page, errors, lod, outlist, potentiallist, conferencelistexists
pythoncom.CoInitialize()
# Scrape from the web
url = 'http://supersciencegrl.co.uk/conferences'
try:
with urllib.request.urlopen(url) as response:
htmlr = response.readlines()
except urllib.error.HTTPError as error:
sg.Popup(f'{error.code}\n{error.read}')
print(error.code, error.read)
page = []
errors = []
for h in htmlr:
try:
page.append(h.decode('utf-8'))
except UnicodeDecodeError:
errors.append(h)
lod = []
for n, p in enumerate(page):
if p.strip().startswith('<tr class="body') and not 'postponed' in p and not 'cancelled' in p:
event = getevent(n)
mydict = {}
ColumnOneEnd = False
for n, line in [(n, line.strip()) for n, line in enumerate(event)]:
if n == 0:
themelist = []
for kw in line.split(' '):
if kw.startswith('c') and not kw.startswith('class'):
themelist.append(kw[1:])
elif kw.startswith('l'):
region = kw.translate(str.maketrans('', '', string.punctuation)).strip()[1:]
region = decoderegion(region)
mydict['region'] = region
mydict['themes'] = decodethemes(themelist)
elif n == 1:
mydict['url'] = line.partition('href="')[2].partition('"')[0]
if line.endswith('</td>'):
title = line.partition('rel = "noopener">')[2].partition('</td>')[0]
title = title.replace('<span class="new-fa"><i class="fa fa-certificate" aria-hidden="true"></i></span> ', '')
mydict['title'] = title
ColumnOneEnd = True
elif line.startswith('<span class="tooltipconf">') or line.startswith('<!--<span class="tooltipconf'):
pass
elif not ColumnOneEnd and line.endswith('</td>'):
title = line.partition('</td>')[0]
title = title.replace('<span class="new-fa"><i class="fa fa-certificate" aria-hidden="true"></i></span> ', '').replace('</a>', '')
mydict['title'] = title
ColumnOneEnd = True
elif line.startswith('<td class="column2'):
mydict['startdate'] = captureline(line).replace('<nobr>', '').replace('</nobr>', '')
elif line.startswith('<td class="column3'):
mydict['enddate'] = captureline(line).replace('<nobr>', '').replace('</nobr>', '')
elif line.startswith('<td class="column4'):
mydict['location'] = captureline(line)
elif line.startswith('<td class="column5'):
price = line.partition('>')[2].partition('</td>')[0]
price = price.replace('/', '').replace('<em>', '')
mydict['memberprice'] = html.unescape(price)
elif line.startswith('<td class="column6'):
price = line.partition('>')[2].partition('</td>')[0]
price = price.replace('/', '').replace('<em>', '')
mydict['nonmemberprice'] = html.unescape(price)
lod.append(mydict)
outlist = []
for event in lod:
eventlist = []
eventlist.append(event['title'])
if event['enddate'] != '—':
eventlist.append(f'{event["startdate"]}–{event["enddate"]}')
else:
eventlist.append(event['startdate'])
eventlist.append(event['location'])
eventlist += ['', '', '', ''] # Empty cells for Syngenta list
if event['memberprice'] == event['nonmemberprice']:
eventlist.append(event['memberprice'])
else:
eventlist.append(f'Members: {event["memberprice"]};\nNon-members: {event["nonmemberprice"]}')
eventlist.append(event['url'])
# Extra fields
eventlist.append(event['themes'])
eventlist.append(event['region'])
outlist.append(eventlist)
# Find default inputfile to append sheet
xlsxlist = glob.glob('**.xls*')
shortlist = glob.glob('**onference**.xls*')
if 'Conference_List.xlsx' in shortlist:
conferencelistexists = True
shortlist.remove('Conference_List.xlsx')
if not shortlist:
potentiallist = xlsxlist
else:
potentiallist = shortlist
datafound = True
def stopanimation():
sg.PopupAnimated(None)
def permissionerrorpopup(error, filename):
message = f'Permission denied: {filename} output file.'
message = ('\n ').join(message[i:i+64] for i in range(0, len(message), 64)) # Line breaks
message += '\nPlease close the file to continue.'
layout = [ [sg.Text(message)],
[sg.Text('', size = (3, None)), sg.Button('OK', bind_return_key = True), sg.Text('', size = (30, None))]
]
window = sg.Window(type(error).__name__, layout, keep_on_top = True, return_keyboard_events = True, right_click_menu = right)
window.Finalize()
window.TKroot.focus_force()
print(error)
while True:
try:
event, values = window.Read()
if event in ['OK', sg.WIN_CLOSED, 'Escape:27', chr(13)]:
break
elif event == 'Exit':
window.close()
raise CloseAllWindows
except (KeyboardInterrupt, CloseAllWindows):
closeallwindows()
return True # Error thrown
window.close()
return False # Error not thrown
def showreport():
if len(outputfile) >= 30:
textsize = (60, None)
else:
textsize = (None, None)
layout = [ [sg.Text(f'{len(outlist)} files added to {outputfile}.', size = textsize)],
[sg.Button('OK', bind_return_key = True), sg.Button('Open file', key = 'openfile')]
]
window = sg.Window('Successful!', layout, return_keyboard_events = True, icon = resource_path('syngenta_logo.ico'))
window.Finalize()
while True:
try:
event, values = window.Read()
if event == 'openfile':
openfile = True
break
elif event == 'OK':
openfile = False
break
elif event == sg.WIN_CLOSED:
window.close()
break
except KeyboardInterrupt:
break
window.close()
if openfile:
openoutput()
def openoutput():
os.system(f'start excel "{outputfile}"')
mydir = os.getcwd()
sg.theme('Green')
right = ['right', ['Exit']]
ring_blue = b'R0lGODlhQABAAOcAAAQFCASE6oyKjAxEaDyu9ExUXESCnAxipAQjPiSb7oTO5GyvxiREVwRksUSazCQmKCyCt8jO1AQyVGTH9wRMhip6sgQSGtzt+URteWSbqTRifGS85AyQ9hF1xCSM2WyGnBQjLCRSbCmm/KzG3AQ0XFSy6gRWlBgYHGx2fBSE2BRSfP///3S/1ZSqvESe3CxypAQaJAR0zxxDWzSQzMTi/HTT/ITc+P////T19Vi66hRXhwQqRDxOXDSCtBwyOUx4hxwsMzRTXCRKXHTK6GmnvAR61AQMEgSK9RxupBRrr////zSV1xY+XP///3S796yqrApKekRmbESGpHS2zFqnxwQVJmTC/ARYoByK2ESm5ODg4Bw7TpGdp0yx7P///yQ4PxRShOr0/GjC6hyO5zyn6v///////zR6pP///1R+hAyK7FSEkv///2yx5wRtwdTU2ARSlDR+rKza/FSy/BpKcIzj/DSi9QQsTzRdcP///ww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OADZQhTmEDAxyoNwgVlgAAG2GQkEECAgqFxQpfOFGYVlKEMLljkEjwAAQKqAIMqjBME9PgAMuNyiQ/AAATX/mwnO0HAg3wZw5rsdOc7YWCKWaYJB6agBz4F2k4QKMMYGSEEDOghUHfCIBr08EYdMfUGbyiUohV1JhtfggJ6gFSgFjApDBhhUKXggBEmLUZFBUqPbn4lofSwgE53Co8TVAEIXGipx7gAhJTCowoWMMJOq0CPAszzRgWwADyUqlSdGgEe8LAACDix0ZdEgBPFuOoJrJrUKhihCvAogFCHFdWpGuGtVJWqHt4KBFNI4hBawER3MKGFQ0giCg94K1aTCtfCWkCthrkECgrL2LfK1a2Nfase9ADZxhJWHk+1CCHcCgAjdPaznoXrXCVL2tHCFbRwhQchMGUMb7wVALANZO1nQTtbz8YWtrT9bCEguqpLSOIEs8WtcIdL3OICgB6SyGxSMMEJPRj3uc+FByem2TFMMOIB0M0uAB7ACOpW7RKHkEc0tCvcB8jjEMqtlhYIIY91IOIEzoXtCRCxDnkQQguBCggAIfkECQkA/wAsAAAAAEAAQACHBAkOBIfvjIqMBEh/RLL2TFFU////DGisCic5jMr8SZ/RKUdQJCYsKJ/1xMbMBGi4ZLbU////////ZMb4ZKCw0eb5DBYbBFCPRG50bImcJHe2LFdvbLPpETZM////b3R3////JIzYFBkaBHbMSJLGBDxpkazBFygrpMrszNrk7vDxFFSE////////BFyjFIfgZMDuNJ/pRH6cJ1h+////////////////JDlEBHjWrKqs////3N3gTJS0NFBc////////Bw8U////hNftdsDXfMjhbKPPCx8pbJKsMHCaFDBBNzc5FElsHGieCTBLWavP5OjocYKR////HI/jXLPc////PJTMVG6EdLTsRJrMBEF1rNb4VK33////+vz8////NFp8NpjaVF5oVJ7EJE9mBHDIdLLE////////OH60O2FxPJLcFCAnHFqBeb/5PKboJEBMHILU////4O/8VLTuDI70lJyh////////RKrkPHKM////////DEJopKq0////rLrMvMjQbK7EfKbMVIiYfKTEVIKMfJKsv8LEhNDlxNLgpMLcpNL8VHaU////P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ZyMb4EHA5HGwCAdhYp0F2sQpUNpOgGA3CB2jiBXBsogPyk58S/peNakj0H7uwwwlSiUqMurQA2tzVLD4KwJCCEAFKiAI/aMKPD+QjoC516Tti+pRZKAEeIpQhEIMowHnYARE8UMF4VMADRNgBEitVZVCDCtPHeOGHSkgqFQM4RzrW8Z3OtORWXfoBol7ED0BEwFgLWccp2pWZal2rSw36KB744AgSxGsvm9lMZ+o1qEvoJy5VKkSLsvSb8pTnYTNqCrc6RQWrkOsUIRvZyQaVE91jmQpMAQ9mClSyngVAPgQQWrF5ARG6gCRHPDs72Xx8ABGWpRcU/KALMbQjHxYgqAVE0I4CcOITPHhUQAAAIfkECQkA/wAsAAAAAEAAQACHBBEdFIzkBFCNjI6UTE5UVI2fCm66Bi9MXLLUJE5klMr0////JDE5RKPcVKLEdMnnNIq8DD5gBB8zzNTYRHB8BH/hJF6EBFmfbLjUbKLMb3V8JHS43Ov3jLLUFCAmNJXcBHDIbIykBDBWRH+cbL7c////BEBxrK+3HFqBJEBKOmBqKZfpLHqs////BBYkBGSyBCI8bLPqTK/nRJrMzODw9PX4FC9CZKrBlL/h////HE9xZL/p////////XG58FIHRJILEOUFJJIzY////NG+MbK3AbJe4HG6pxMzURoyxHEFXFicrPJvXB3bLFBocFDZMZLXZJGiSVIWW////////////////ZKC0gtHqTHefdIGP6/T5FjpU////JEZUfLXnKZLfjKK0OGqQBChG////Gne6SHeIfIyYBTZb////JFd3FSo2XLrpDCY0pLLEfMDUWK7cPGd3DBggHDA7pMLcTKj0GYbZJIbRPHakfK3UwNvvRJ3W////VGFs////JDhAvMbOpKSkrMzoRGZ0VHqcPH2fjJqskrjZ////vNbslKe3XJ7U3NrcfKbITIKsNldi+vz8hMrkJ2KR7O7vdKrYfJevLHapPJLE////////////ZJqsVGp8VIKofL70HEZk////LFZkXKbE1NrkBF6nbKa8TIac////NIKsdLr0TJ7E1Ob0LIbENEZUPHaURJK4////3Ob0fIaUxOL8qNL0WLXoLHKoNI3JbMLpGVy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QGWUhAKPyFs5Ep4RzneMIBlMAOdAAiFpOoTw0YAQh0+GAOWNTqNBVKAK8eBBJFe0QERDCypI3hCSlIwR/IcYA2LA+B2aNGHvW615f6NSNumMYzlGDYxvntCTZgwB/+wIA5mPaES1ikGhV6T2eYk1LfiInDWUfGN9alT335w6AaV6vQPzC0VzVQxCcSiwzbpg+BV0wuUV17WapMYhlcIEcKnqC8x0JWjSkEJjmd4UhzXLNjkzCEFyx4wzEgN4efbGQjncFdBgzgu1WDBBK04IU2rOG+qW2DHKixXzn4t73EiEdz81UPN8iiD+cgRxskS401BKEPWjgBZ/oUEAAh+QQJCQD/ACwAAAAAQABAAIcEER0UjOQEUI2MjpRMTlRUjZ8KbroGL0xUtOgsT1mUyvT///8kMTlEo9xUosQMPmR0yecEHzM0irxEb3zM1NgEf+EkXoRsuNQEWZ5woMRsdXwkeLTc6/eMstQUICYEcMgEMFY0lNpEf5xsjqxsvtRUoeIEQHGsr7ckP0g0XmwUXJD///8seqwEFyQkl+kEZLIUL0JMr+cEIjzM4PBss+n09fj///88lsQUeMgcUHJkv+k8pegUgdFsrb8kgsSMwvQ0PkxUmrw0b4xcqsxccHwWJytRgakUOEwcbqnEzNQHdss8m9cUGhwkjdhktdgcQVckaJIWOVT///////////8bZZ////9UlKxkn7GC0epGjLH////r8/krR1CMorQsV2partc4apAEKEZ8tOj///8VKjYad7pEdowFNltUhZZ8wdf///9EndYpkt5UYWxcuumkucx8jZy8xc48aHgMGCAcMDtMqPQbhtt8q9T///88dqTB2+////8MEhT///8kOECkpKSkwtyszOhEaHRUepx8oLw8fZ+MmqyTuNn///+81uyUp7fc2tz///98gYY2V2L6/PyEyuQnYpHs7u////98lqxUqvQsdqlapsj///////////9Uanx8vvQcRmR8psz///9IdoTU2uQEXqdsprxMhpw0gqzU5vRwuvQkWn////80RlQ8dpRMhrT////c5vREkrjE4vyo0vQscqg0jclswukkQlj///////9UltT///83nekEOWYMhuRveoQsfrREquwMNkystsRkprh8hpT///9MpNdcob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KCtVoGDoNjkpmJtCw1ReEIXuoCCyv7hsgxw4fhaEIEnnrMPdGjoqk4RhlT0dK7bYtcBIHYAb3ijr7vbhFsI5ahQIDDiXJBoRg6+8AVkaMtfIbOa3pQXwfIt7xwYvckkKuEJbHlCtXpNG+fmN0A6WJcYTE0YFwrxhShMFhl5Fe5weRcBOmBPinHI7s8gkYQReOII2cgGCrJRh5GdtQhoBWMEGOCLJCS3WuuAQxw4kYAnwMAbMvCG0dzwjBMU1E8BAQAh+QQJCQD/ACwAAAAAQABAAIcECQ4Eh++MiowESID///9MUVT///8MZ6kKJzmMyvxJn9EkJigpR1Aon/YEaLjExsxktNT///////9kxvcMFhvR5vlkoLAEUI9EcX5viZwkd7Zss+wRNkwsV2////8kidQUGRr///9sc3cEdsxIksYWJyv///8EPGmkyuzM2uQUh+H////u8PEEXKNkwe3///8klOUUVIQkOEQ0n+knWX3///9Efpz///+sqqz///8Eedbc3eBMlLQ0UFx3v9f///8YXIwUMEH///83NzkHDxT///8caJ6E1+0LHylso88sZpQcj+MUSWwJMEtcrdF8yOHc6PRkmqxxe4T///88oPT///88lMx4s+ZMl78EQXWs1vhUtOxUnsR0ssT///////98v/b///8kQFBUXmgkT2YEcMj///////9UboQ4frQ7YXEUICZEquT6/Pw0Wnz////g7/x8e38MjvSUnKH///////////+kqrQMQmj///8slOI8pulUgoxUrdwEgORclaasusy8ytRsrsR8psxUiJh8pMT///+/wsSE0OXE0uA8coykwtyk0vz///88dpdcZmyUtc7///88QkwwcJr///8kMjcUVowcN0a82vFUuvdcntQ0jMmkoqRcjrQpgMCL3/n///88WGA8Z3hUmryUzvx8ipePk5RUWFhUjrzU4PBUq/fU0tRoutz///9kuuQcbqgcTnD///90utBPZnx0ruQEToT////y9vkcWoQsfqz///8UQmT///8aYppxgpH///9cuuQ8jrz///////8oSGT///////////8sYpQscqhMptQpjtk3mtxcxvw4pvg8YoRUpswEVpissrx8stx8goyUoqykssRcgqS80uQcPkxsuvxUmNAMiOwMSXQUZq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e45gUB8RADHxQwxpQ0FVAAAAh+QQJCQD/ACwAAAAAQABAAIcEBQgEhOqMiowMRGg8rvRMVFwPY6REgpwEIz4knO+EzuRsr8YkQ1QEZLFEm8wkJiTIztQkhswEMlRkx/cETIYqerIEEhpku+EQdMRkm6nc7flEbXk0YnwMkPZ8hIwkUmwUIywki9ZZwPwppvwENFysxtwEVpQYGBx0vdJUsur///8UhNiUqrwUUnxMouwEdM9sbmwscpwEGiTE4vx00/wcRFs0mtyE3Pc0ksw8TlwcMjn09fU0U1wUV4cEKkQkSlxMeIccLDMUa680grR0yuhpp7x0uvRUuOwEetQEDBMEivVEZmx0tsxUpswWPlxUkagcO06MmqQKSnocbqREhqQEFSZkwew0boQ0ldcEWKCsqqw0eqTc3txMtPD///8UUoQ0fqwcjuc8p+r///8citlEpuT///80ovFUfoQMiuxUhJIpovpsr+YEbcFcmqwkOD/U1NgEUpQofcEcdLTr9fv///+s2vz///+M4/w0XXAEK07///8MDg9UlrCkpKgMg+GsusyQvNz///+80OD///88PkT////AwMQ0MjT///8kWITE2uwkluyk0PCUttTU5PSUlpyUprSUy/c8doz6/PwcSnDs7uz///9Usvx0tuxUirRUpux8enz///////85irxUosS83vxkorhEtvxQWmQkisxswuT///94ipxMlrzM5vw4ouT///98zud8wvwEXqff5uwkPkR8lqyUwuz///+Myvz///8kTGf///80hsRckrz///8EPG1YfJz///8UHiTc2twUesRcxvxsdnz///9stvREsfcMJDUsne8sRlYshcZsyPRsutk8ZXQUkOwsU2IcJjEMV4z///8cUXdUoODM3ux80/R8xtx8vPRct+R8stxsvvw8e5z///8sOkw8XmzM1twcluw0cp88ovQMUogMXpxUUlT///8MNVEMToQMFBnk7vQsjtcchNQMdswMGyM8nNiM3PY8kccMK0EsS1QcbKw8hrAMe89cp8ZckqSUnagkcKI8bIA8ktzk4uT+/v4I/gD/CRxIsKDBgetKFNEkrp6iHi2mKeLQSxYgWAczaty4kdKiIhX2bTmgRg2QSfw48GvWLM+zGk5uoRpEiaPNm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////pMrsBDxpFCcvzNrk7vDxBHnXFFmMF0lqBBktKFh+ZMDvJJfqKXapJDhD////dNL8////UpSyNJ/nrKqs3N3gZKrESHqMNzc5FIffUKzc////dMnpHDM6VKfsBw8UVLTnhNjyBG/EdMDXOJPK4efpBF2mZJmnKmiUcXuEFCw/FHjCd7Pm////NFp8NJjc////R2Z3rNb4////BCA3JEFOPKL3XLrkVIeXWZ+8JE9nfLLcNIa8dKbUVG6ETJbAHC40////BX7b4O/8HGaXBC5MDB4kFCAnHCgx+vz8F094////HJDk////////FHC0JG6kfHt/lJuf////////OH60DBgdMmByPJLcSq7upKq0rLrMvMrUNHigVH6M////VF5ofL/4v8LEhNHmxNLgpMLcpNL8////LH60PHCIlLXOGWCZPEJMbKLQbKrcJDI4XJanvNrxXI60////pKKk////VJjQFILUNHGYlM78fIqXj5OUVFdZVI/BXKvOBHLN1ODw1NLU////ZLrn////GX7MWKbMF26s////HDpKBDZgDF6cKJLiDEJo8vb5////PKbp////TIKcit75////cYKR////dLrMPH6c////RIqwKEhk////////////////////XJ7U////BIHm////LGKUXIKk////DI70LI7Mb3Z8ebrpOGKArLK8fIKMlKKspLLEvNLkbLr5HDNFDEh4lMjwTKDQLJ/2bMjwDFmUFDNFPGZ0TKr0rMbcDDxf1NfcHFaEbMLnLJbkLDhIfNTy////bKu8HIfZPE5cfMjhXKbkXLLcDG64HHe6PJrYDCEuLEJMLFFhPIi0fKXHXGp0HCAkLHCkPHaUzNHUrM7s/v7+CP4A/wkcSLCgwYFKAGUYNAXYuA0bvrlqZ+WTNCUHM2rcuNFNogzKWnyx16EdAwZaZrhSSekJijUznDhww7GmTYEq8IEoBw7ciy+yXr1SQ5RoFgRZjqJAwQbmABU3oxbMCQnEGD5vZJ3YKnRo0SxqkmZxMXYNmz1rpkGVatPNozT8eCgTQFcrV6FFw4YV68LFhb8h9rC5Q5OtRiV6OnVpQrexgK131XgFK3Zs379/iRCJRM7wQUWsuvTyhgGDANOyHgsQ+aWdPZP1tLj6to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pisxMzUHEBXPJzaFygrRIakFEhxKUhTFBocXKK8PIy4DGak////BjdZbpm6////////////////XLrqHE5vJGaQfMje6/P5TK3iGni6NGqIJJfqjKK0NHGRRHqU////BHjWGobXPKTnXJCgNFhkBFicOHakfLToBChH////////VGFsbLrWJIbMpLnMfI2cfMHUJEJXvMXOOmd5DBgfGWehHDA8////pMLcJll3////wdvvRJK8////DBIVpKSkIo3arMzoRGp0VHqcfJ60XKTgjJqskrjZBEh/vNbs////lKe33NrcVIaUXJ7UfIGESXiJfc/rXJbEXK7c+vz8JDhALGKU7O7vPJ7sVIOpfJasfL70fKvUVJKkdKbM////TKbcJHq0////ZJakHEZgfKbIDHbETKbUDCY01NrkTIacbLr01Ob0NEZUZKa83Ob0xOL8JJLkqNL0VGp8////JlFvBGGt////VJbUFIDYXLXo////JElh////////FHnHLJXnUFZcDDZMNJLMCIbkb3qErLbEfIaP////PF58TKr0DHG8dLXEDB8oLF94dKLEdMfkLILIlK7EdIqcTICWLHWqZK7MdLPn1N7pPICkHDdFRJvPTISwHElsZJ60////ZL3k////lKCpPHKMTHefDHfPRKbcPFpkDFqUDCc8xMbIXHiQDEh0fLrpPGqUdLrMLIbClJqcLHqw5ObnDE+BVI6iDDBKVLTqLE9fVKDGFD9g1NbU////DH/c/v7+CP4A/wkcSLCgwYH03sChZcKHC3WpXNxxxQYZClgHM2rcuLGSEGoJ7m3bZqnkHRdFUqZ05oyFJWPrKnGcSVMgli629iFBIgfIvQNpcggVCqEoC2ciRNSpo2AApppQC2LZ5K2XCSROOgAFmqYr0aIQWEAAwIJFHWd1REB6GpVmpWlVbKEr5SRrh7tpuAb9GjZsWQBk6/wRIU9mW42w3tlSkaBE3bp38Xb1ylds2b+A6wC40ejwwTf16KgoQdpx1tPDhgyxJKekpZPq1PW9DLj2nzqAPA+s9ERPhCqlHQsvle+qD58HuMZGeaeIUdq2AWQw3LZSNysR2iVKFLyE3F5OvP6xYzQHlo1KlWw0mjPux7YcqYqkqgMd8B8Awmy0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Bdsns////O4e0fKXHOJLYBj9r+vz8KGCA////4O/8V730lJyjVF5oVJ68////OH60////HHe3////////XJWkBGGu////////////bLrWKZLfpKq0er/5PHSP////GU5x////rLrMvMjQVIugVIKMfJKsv8LEJDE6////pMLc////////bKPPdK7clMjwXGZsKH60////lLXOvNLkFFaMfIaRfHp8vNvxNIrHpKKk////VFdXPFhgFEJkj5OUPEJEbKrc1ODwNDI01NLUZLrkFFqERJrM////hNr3////VGZ8VKbMGX7ICE6EDC5ETKbY////////b3qETK7s8vb4////DGKkPKbs////fM7kerrqdLrMaJq0JG6kPI68////jMr8KEhk////GVWCTJPPFInl////FGKk////////BEF1LGKQTGJ8////////DI70LI7MNqb2////rLK8lKKsXJ7UXJqspLLEPHqcXIKklM78fI6cbLr4VJjQDEd0FGehDCg5TKDMbMfuNFpsTGqELI7cHCkxPGd3rMbcTKrv1Nfc////fNX0DFyYbMLoHJPoLDhINHOcPE5c////HDdFHElkfMDUjNXmHDE6HD5RXKvPfLLkXKrkLFBgfLLcXGp0/v7+CP4A/wkcSLCgwYFHcMTSJAXJBwAAjHyQoikWjiMHM2rcuLGMgxCGjIgcCbGkSQAMQhQqw7GlS4EpOhmyQJPkyZsmGQhI8bJnwRSUkFj4YGGk0Yg4cRqpxNOnyzJqQCBhQLNm0aNGkCY1+aETS6caecRDUk7oCwsvjKQ1SjLr1pNSeIA9qOfbPRAv8qJVy1dv1ao23wLANHdgGUoI7iHJyzhtXiQO96a9OrKoYAAhvjqdhaWVIQSNGYOQisQQFjWFeKSYVSYFqEJqHJU7urXArM3L5s1DwPsF6Bcgyn1rVUnUy0CxZousfftlGSzz8PEGzbsVDRD4pjX3mUJNuatJC/5o5qgBH75W03nrbqVt+9xZlaoqDeHSmhIFrSQgyN8K3zxgKxRmkCg0GEFZSVkRthEoSsQjgX4QKrDDOO4JONAsaxiBBG0GypVRGVzww8mDJEqowXgWElRGLAayJZInKA4UCTBUkPggMEpokCJHLG7YlhFqHJSCH06QUcKRElABDBYx7qh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JCpRIWEBH/hIxw040M6b0EAJyvDBPLSABJFeUAclPWlBaoAPDNRBSC0VEqnmkIYbPMMf51iEBtwTiRpogA3akEY11NADNzTDFzJAoRJBgAqTjqZPZIgADKwkqDRsIw+eIEI7nlEKjhmgGNXYBB7m0Yx5GEMZ9VNiAB7RgFsIVSPn+MYb5DEkNlEKGrw6whUMQVk3POABiQCGA3oQ1tsVcIlgtKejWpEGMeADBYLKla60dYJSPIMc5FChw97YxrnAWoAFNtABLUxRrEh0wBXswMcpKrXafTVMa1ujrfHIx4J7zIMFCzgsVSxxiVOwQ13QYC2zwnCCpSX3dqtTRgO+yYJrqNJcWehAGtJQjiOoAgrF4Bhy+YYOHxjjCfNogBmGcF4asqEb7RgBBXBwhWM4AA8IdsAa5gGKeSDBDGZQwiukay57EOIBs+DFMqrB4U1sggQuUAIsNringAAAIfkECQkA/wAsAAAAAEAAQACHBAgOBIfvjIqMBEZ8////TFBQR42xBGasBCZDhMvhRJ7UJCYo////Z7PQKkhSxMbMLJ7kBjZbZMf5JIjMZ6Gx0eb5JHe2BBYjRG16bIecBFib////JFZ0FCcxJGaMbL/eJI3cbHB0R5LBFBkaRKTkBDll////pMrszNrkdNL47vDxBHjXKXapNFZcfLLc////EJL0F0lq////ZKzEBBktVrPjJDhCRHyU////GzA4rKqsBClMNJ7kGzhIdMfh////3N3g////BxAUKFiAGYfZh9ToVKzc////4efpcXuETJi+VKfsF4LUVLv0BG/DbLXsZJioBl6j////rNb4ODg8FD5UVIeXPIas////Bn7bBCA3////BEyHVF5odKbUVG6EPJLcBj5r////////////JF6G4O/8FGagV6HBKVBj////FHbEHCkxKJLhFCAm+vz8N5ja////OJ/wGY7ofHt/VJjQFHK0lJyhDDBEbLrcpKq0eLPmFE93ZK7M////BDBWrLrMvMbMPGZxVH6M////NFp0OHicv8LEJDA4xNLgpMLclMjwpNL8OJDI////PHCIXGZsLH60lLXOKW+kfL/4vNDcbKLMvNrxXI60pKKkVFdZSazuHGGSFEJkfIqXj5OU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EdgTvAb9DCgHj4wjaXANZe63CWnEcDMV4ZC0rGcoCyEaakF2tCGxdDUMVapQQ1aUYMI7GWtbBVLBQIzmFdQoQhteIEc3jI2TuikBg2YhjRmAJawbGawcXjFJRaqh3hA5Vpx8whIlDASLWRAHE1I7RyQEYqhvgQFZ5gWSfvmoZBsNOSqEGECCipxBhNgJFQBAQAh+QQJCQD/ACwAAAAAQABAAIcECA7///+MiowESH////9MUVEMaKxEi68EJ0OExtQrSFFEoNgkJigEaLgonvfExsxqssgHNltkyPz////R5vkkdrcLFxsEUI9JcXlviZwsV2xkoLIEdsxstewkjNkUJzMUGRpsc3c0Z4IEOGVQlLKkyuz///9MquwEedfM2uTu8PEEXKQ5WWEkl+kEHjQcUmz///900vhkwfP///8UlPQkN0QUNkksdan///////9Eeoysqqzc3eD///90wdlnq8L///8UP1n///+E0+p0x+cFftwcYJIHDxQUSGzh5ukLHypZs+AkUGlUrtw3k8xkmqwmWH1xe4Ss1vj///84ODz///8YcrR0tsx4s+ZcrOg5mdkUgdccaJ40hrxUboR8pcc4ktj///8GP2v///9UmsD////////g7/xXvfRUXmhUnsAEcMcsfrT///8cd7cUICZclaRMrun6/Pz///80XHQkQUz///8pYIJ8e3+Um59sutYqkt8cKTGkqrR8v/Y8dZGsusy8xsxUi6BUgoz///////84frS/wsQkMTf///+kwtz///////90rtxcZmyUtc680NwUVoxso8y82vE0isekoqT///9UWFgUQmR8ipePk5Q8QkRsqtzU4PDU0tREdoxkuuQXWoREmsz///8ajuKE2vcZTnFPZnxUpsz///80MjQIToQMLkRMptz////////y9vk8Xmz///88puz///////9xgpF0usz///8kbqQ8jrz///84YniUzvz///8nSWT///9EcIgZVYJMk88UieX///////////////8EQXX///8YesgMjvAsjsw2pvaEzuSssrxcntRcmqxQrvh8goyUoqykssQ8epxcgqRsuvxUmNAMRnQUZ6EMKDlMoMxsx+4sjtw8Z3esxtxUqO7U19wMXJz///981fNswugckuQsOEgcN0U0c5w8Tlz///9MfIx8wNQcMTocP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kA/wAsAAAAAEAAQACHBBEdFIrkBFCOjI6UTE5UVIyhDG+6BC5MVK7cJE5cJG6clMr0JDE6XKC4bMTmPKbpBEBwzNTYBB4z////BH/hbK7EJF58BFmeR298JIXH3Ov3bHV8jLLUBDBXcKDENJXZbLPpFCAmbI6sBHDHFEBbJ1FvJHCsKD9IBGKsRH6crK+3OV5pBBYkGVqJVKHiFIHRBCI8////FC9AzODw9PX4FE54////OUFJGWSeXLrr////RJjINIColL/hFjlU////wcvU////bKrcOZzbFEdwFBocGzdIHHe4TK/ncrvRBjdb////BnbLJEdY////FIbc////J43ZWJi0ZLHRM1djNHGUDEZsTI2uXG586/P5////JFh4////SoSuNGqEjKK0JGaUBGW0VKjWJJLcHHCs////TKPUDCc0FCgxLHipPGh2BChGfLvuwdvvBDll////VGFsWLbspLLEfI2cDBgfHIHNHDE6FFaJfM3n////PHqYDBIV////////dMrsDB8rv8XKpKSkpMLcrMzoRGhwSneIbKm6VHqcZJ6sfLDgjJqsjLbcvNbslKe33NrcVISUfIGGVH+nRJ7U+vz8TKj0JDhBLGKU7O7vfKC8fKnPfJasZJikNFpsVKjwVGp8////bLbQ////FGq0lMbsfL7Q1NrkBF6mDGqsTIacHGKU1Ob0HFZ8NEZUTJ7MPIas3Ob0////////xOL8qNL0VIq0VLLn////JEJW////cLr0////VJbUOZ7n////////J3m3SXaZDDZMDIbkb3qENIrMrLbEZLbcTKrgfLbsfIaUDFCILFBcdMXkRKLcDD9nLIXElK7EPJbUdLLndIqcHEJZLHKsDGWnTH+PXKDY1N7pHFB2ZLvhTJq8PICgdKjQHEdnLEdPPG+JLFlxlKCpLGiMXKbkHCovDCk+XHiQlLjWTFZcpLrMHIbUPGqULJLclJqcdLbEHGqmDF6c5ObnXIycFHG5DDFKXLDaLHCY1NbUDIDedLDALF965O75DHLE/v7+CP4A/wkcSLCgwYH9BnnbRexZhjp1MkSJ5kLarH4HM2rcuHFSGw+/frlqYKhkAzENpoBKkmSKGXfupMmaxLGmTYFZOK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QkMThMn8xstM4MP2EEHzMEXqQEf+HM1NgyjckkXoBsorREcYFsxuwkgMBvdXwsmuSMstRsjKTf7PgEMFdywNlUoeIUICb///////9EgpwEQHGsr7c0UF4kQEwEFyQsdagcYJA8YGpss+osjdlMkrxhtNgUL0Jcqs8bgMkEcszM4PAEIjyUv+H09fg5QUk0fqw8m9lcu+pamK4sV2psq7tsl7gXOlQUOEwcTm/EzNRcorwcQFdcbnwYKCsUGhwMZqQHN1n///////////////8qSFP///8ahtj///98yN50gY8aeLr///84dqQ0aoh8tec8pOckl+qMorQ0cZE8jLgkZozr9Pn///8EeNZcipx8usxEepR8jJgEWJw0WGQkerQZZ6AWgNcEKEYaWIAWKTf///8MEhVsutYkhsykssR8wdQESH+8xc4MGB86Z3lctegcMD2kwtx0qtjB2+9UYWykpKQijdqszOhEanRUepx8pshcpOBclsSMmqySuNm81uyUp7f////c2txUgpT///9cntRJeIp90Otcrtz6/PwkOEAsYpTs7u88nuxklqR8l698vvRUg6xUkqT///9Mptz///////9EkrwcRmAMdsRMptQMJjTU2uRMhpx0uvTU5vQ0RlRkprzc5vR8hpTE4vwkkuSo0vRUanz///8kUG8EYa3///8kdbf///9UltT///8nWHb///////9QqvQkSGAUecf///8MhuRseoQMNkystsR8uu98kqSkutD///88XnwMcbxUoMZ0tcQMHygsX3h0x+QsgsiUrsR0ipxMgZf///90s+lkrszU3uk8gKREnNJkvOb///9knrR8gIZEptyUoKc8coxEirD///8Md8xMd58MWpQ8WmQMJzwMSXfExsh8rdRceJBMVlxckqQ0mtw8apQserB0uswshsKUmpzk5ugMT4FUjqJUs+osT18UP2AMYKAMgdzU1tT+/v4I/gD/CRxIsKDBgR4GXQtB4YWgh4Ji8QihSpaYgxgzatRY6Y8fehS2zZgHYl6Mk3NAVKnC7QC8DapgVdpIs6ZAMYqk0TPioAGFDOVqCCVDlGg/QZn2VMHAZQOOizajEhTDDtcoCzBoGNhqQKjXokQlSCAjQVC+ST26cIIqlWYlRbjGedthwFZdrluH1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AQ8aRQnL8za5O7w8f///xdJav///yhYfmTA7yl2qQQZLSSX6////yQ4QXTS/P///1KUsjSe5qyqrNzd4BSH32SqxEh6jITY8lCs3P///3TI6DqTyihplFSn7Dc3OQcPFARvxHPA1wRdpv///xwzPv///zRafOTo6HSz6XGCkf///6zW+DeZ2f///////1Sz6BR4wv///xaC1AQgN0dmd1SHl1mfvCRPZzSGvHylx1RuhP////r8/BRPeP///yRBTiRupFy65JScoxxmlwQuTHyy3Dh+tAweJBQgJ0SazBwuNASA5Hm/+RyQ5P///////xRwtODv/P///wwYHjJgcjyS3KSqtBwpMRRgnKy6zLzI0Dx2kFR+jHySrFReaL/CxITR5sTS4HSu3KTC3KTS/P///2qkzFSX1Cx+tDxwiJS1zjxCTCQyPLzS5HyHkXx6fFyWp7za8VyOtP///6SipP///zRxmJTO/I+TlFRYWFSOvFyrzgRyzXx/h9Tg8NTS1P///2S63P///2iatBh+zFimzBdurDx+nP///xw6SgQ2YAxenGa66ieS4v///296hAxCaPL2+P///zym6f///0yCnIre9////3m67P///3S6zP///0SKsChIZP///////////////1ye1ChikP///////zR6pFyCpP///wyO9CyOzDhigDym/KyyvJSirKSyxHyOnAxIeJTI8Eyi1Cyf9WzI8AxZlBQzRTxmdEyq9KzG3Aw8X9TX3GzC5////yw4SHzT8Tyg5ByI3GyrvDxOXHzJ5Fym5AxuuHy05Fyy3Bx3uAwhLixRYTyItFxqdBxRfCxCTCxxoRwgJEyWwAx+3BxhlMzR1KzO7P7+/gj+AP8JHEiwoMGBeKTMIbINx4OHD7ZNszJnEZ6DGDNq1DgG0y8ZOKxI8OHjUBBu3GqQ9FEDzbRtczCN2UizpkBcc6agI3doli4ZO+QEGEo0ALQHBCT0qkFgWwJcNqMWxPWOFjx2P2jJ2cpVaACvRYc+eNFLwoM5UKXWHJPtww8kcPZ1nbv1a9ii0Kb5kLDN00y1GfHwgQO3gxzDiOnOvTsUWgACPlxeBGzQxCoIrDpo3rx53xRt8IKwO0T63AsruugwNoqmxr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GBClcYAxSgAAr+H1SFMiCRsB7gQyC2eIMWYsBELcTBG9Gb2RjIAAmE1RASMvuHA2LgBiYyEQXySAMAI2EPSGDjXi5QBiLmNYk3XOACXkTBEqLYL1zYYw9NaNm5FnadT+jhjYB8gxsqAT5C2GNlQBsAC/agroGowA16MMIFjBCDCyjRFJhLwS324IWgAU0aZDgdQaAgyVJewA0hMAcdP4ULF3iBA1Q7ATZcQIjw5SOSpoRkIYQnqzEMQhwcEEcsOWAPURYkDaU0gjIv8EdbZC0DG1gHCwYXCxZ4oWF9koQRAKDMZf5xBLyMzRgysIZ1mGFyg+NAE4Q3jkhys5tG+GMhVumfMGzgHrL+m10sFnCLy2lkE9wEgEC7GUlzvFBW4yCGN+7hu9+xABbWqMkIBErRgUbyAqSgJ0ZwcQ0ELIEG3mDe7GABiwzYZAwFqGhAlRlJP6RBowPBRTVo4NHtaWGBzVNeGMIZspSqdKDxNMIbbHFQmvQDCmD0xiRQsD6cakF5W4DpP3Dh059uE55+qMcnDKED9oxBBTowRBrqsYQYyMMPfmDq/vbXv6hSZgwT/SlQg7rMbgISjnp4AwreoEE4rnB/S0AAFHiqEWTKtaIEjaceFhuCELjhDX8EpBeZmMI19AGhRTgsRa8KT1NK8q6VXCEY1+HPXn5im5pVKWft+tk3PhYF1SBJrFpUYInUInal8HyjHh4LBWOCTAUCyIdtN5vbSE7iE77N2hgMUQ8GaPaq7zTCJEbgANk6TAc5GEEBihAC1ObVHKCAQh9Km6WAAAA7MGJrRXo5Y2lXNnVmU0JEVzFsWjk4YnBTejVFT1Mvbm5iRHBCSDJBNE5ONjFRSXU2QzdKNElOS3RHaFgwemlKbg=='
# Import packages
packagesloaded = False
importthread = threading.Thread(target = importPackages, daemon = True)
importthread.start()
# Waiting animation
time_between_frames = 100 # ms
timeout = 20_000 # ms
i = 0
while not packagesloaded and i < (timeout // time_between_frames):
sg.PopupAnimated(ring_blue, background_color = 'white',
time_between_frames = time_between_frames, alpha_channel = 0.8)
i += 1
time.sleep(time_between_frames * 0.001)
# Scrape data, look for input worksheets, and show loading animation
datafound = False
conferencelistexists = False # default
mythread = threading.Thread(target = getDataAndInputFile, daemon = True)
mythread.start()
# Waiting animation
timeout = 30_000 # ms
i = 0
while not datafound and i < (timeout // time_between_frames):
sg.PopupAnimated(ring_blue, background_color = 'white',
time_between_frames = time_between_frames, alpha_channel = 0.8)
i += 1
time.sleep(time_between_frames * 0.001)
stopanimation()
if not datafound:
message = 'Timeout. Please try again. '
print(message)
sg.Popup(message)
exit()
# Narrow down exact inputfile
fileknown = False
try:
defaultvalue = os.path.join(mydir, potentiallist[0])
except IndexError:
defaultvalue = ''
while not fileknown:
inputfile = getfile(f'Do you want to add {len(outlist)} conferences to an .xlsx file?\n(Existing scraped worksheets will be overwritten.) ', defaultvalue = defaultvalue)
if inputfile is not None:
if os.path.isfile(inputfile):
fileknown = True
else:
sg.Popup(f'{inputfile} not found.', title = 'File not found')
defaultvalue = inputfile
inputfile = inputfile.replace('/', '\\')
if '\\' in inputfile:
mydir = ('\\').join(inputfile.split('\\')[:-1])
else:
fileknown = True
if inputfile:
if inputfile.endswith('.xlsm'):
wb = openpyxl.load_workbook(filename = inputfile, data_only = False, keep_vba = True)
else:
wb = openpyxl.load_workbook(filename = inputfile, data_only = False)
if 'Scraped from web' in wb.sheetnames:
wb.remove(wb['Scraped from web'])
ws = wb.create_sheet('Scraped from web')
outputfile = inputfile
else:
wb = openpyxl.Workbook()
ws = wb.active
ws.title = 'Scraped from web'
outputfile = 'Conference_List.xlsx'
ws.sheet_properties.tabColor = '00B050'
headers = ['Conference', 'Date', 'Location', 'Nominations', 'Confirmed Attendees (JH)', 'Confirmed Attendees (ST)', 'Comments', 'Registration fee', 'Weblink', 'Themes', 'Region']
for n, h in enumerate(headers):
ws.cell(row = 1, column = n + 1).value = h
ws.cell(row = 1, column = n + 1).font = Font(name = 'Arial', size = 10, bold = True)
ws.cell(row = 1, column = n + 1).alignment = Alignment(wrapText = True)
for y, row in enumerate(outlist):
for x, cell in enumerate(row):
if x == 8:
value = cell
ws.cell(row = y + 2, column = x + 1).hyperlink = value
ws.cell(row = y + 2, column = x + 1).font = Font(name = 'Arial', size = 10, color = '0000FF', underline = 'single')
else:
value = html.unescape(cell)
ws.cell(row = y + 2, column = x + 1).font = Font(name = 'Arial', size = 10)
ws.cell(row = y + 2, column = x + 1).value = value
if x == 7:
ws.cell(row = y + 2, column = x + 1).alignment = Alignment(wrapText = True) # Allow newlines in price
# Aesthetics
colwidths = [('A', 66), ('B', 14), ('C', 20), ('D', 17), ('E', 18), ('F', 18), ('G', 18), ('H', 22), ('I', 30), ('J', 57), ('K', 18)]
for col in colwidths:
ws.column_dimensions[col[0]].width = col[1]
ws.freeze_panes = 'A2'
wb.active.views.sheetView[0].tabSelected = False
wb.active = ws
stopanimation() # Just to be sure
outputwritten = False
while not outputwritten:
try:
wb.save(outputfile)
except PermissionError as error:
errorthrown = permissionerrorpopup(error, outputfile)
if errorthrown:
message = 'Timeout. Please try again. '
print(message)
sg.Popup(message)
exit()
else:
outputwritten = True
showreport()
| 182.161364 | 64,323 | 0.875535 | 3,281 | 80,151 | 21.356903 | 0.593417 | 0.001927 | 0.002183 | 0.001427 | 0.037262 | 0.032452 | 0.029912 | 0.028813 | 0.026016 | 0.022434 | 0 | 0.096797 | 0.054959 | 80,151 | 439 | 64,324 | 182.57631 | 0.828281 | 0.008035 | 0 | 0.253521 | 0 | 0.011268 | 0.83826 | 0.811971 | 0 | 1 | 0 | 0 | 0 | 1 | 0.033803 | false | 0.008451 | 0.042254 | 0 | 0.098592 | 0.011268 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
47070d61b80e66c5377295546ba8df12f2b78e4f | 194 | py | Python | Image/__init__.py | olesmith/SmtC | dfae5097f02192b60aae05b9d02404fcfe893be3 | [
"CC0-1.0"
] | null | null | null | Image/__init__.py | olesmith/SmtC | dfae5097f02192b60aae05b9d02404fcfe893be3 | [
"CC0-1.0"
] | null | null | null | Image/__init__.py | olesmith/SmtC | dfae5097f02192b60aae05b9d02404fcfe893be3 | [
"CC0-1.0"
] | null | null | null | from Main import Image
from Colors import Image_Colors
from Fonts import Image_Fonts
from Draw import Image_Draw
from IO import Image_IO
from SVG import Image_SVG
| 24.25 | 34 | 0.716495 | 29 | 194 | 4.62069 | 0.310345 | 0.492537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.283505 | 194 | 7 | 35 | 27.714286 | 0.964029 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
4710ce5641e6139b55157287e55b40fdb6b337e6 | 9,019 | py | Python | src/plotski/store/custom.py | lukasz-migas/plotski | c497f8d7a04590acc7e8a9c17e7bf757921f9733 | [
"MIT"
] | 1 | 2022-02-21T14:09:04.000Z | 2022-02-21T14:09:04.000Z | src/plotski/store/custom.py | lukasz-migas/plotski | c497f8d7a04590acc7e8a9c17e7bf757921f9733 | [
"MIT"
] | 1 | 2021-09-14T21:22:51.000Z | 2021-09-14T21:25:47.000Z | src/plotski/store/custom.py | lukasz-migas/plotski | c497f8d7a04590acc7e8a9c17e7bf757921f9733 | [
"MIT"
] | null | null | null | """Plot store."""
import typing as ty
import numpy as np
from bokeh.models import ColumnDataSource
from ..spectrum.custom import (
PlotButterflyMassSpectrum,
PlotButterflyMobilogram,
PlotCentroidMassSpectrum,
PlotMassSpectrum,
PlotMobilogram,
)
from . import PlotStore
class CustomPlotStore(PlotStore):
"""Plot store with extra functionality."""
def plot_mass_spectrum(self, tab_name, data: ty.Dict, layout_name=None, **kwargs):
"""Adds mass spectrum to the plot store
Parameters
----------
tab_name : str
name of the tab where plot should be added to
data : dict
dictionary containing appropriate plot fields
in this case:
x = list / array
y = list / array
the length of x and y must be the same
layout_name : str
by default, plot objects are added to the tab in iterative way (e.g. if there are no plots in the tab, it
will be added as 'item #0', if there is one then it will be added as 'item #1' etc. Sometimes you might want
to add it to a 'row' or 'column' for which you have name - you can specify its name here and if its present
the plot object will be added to that container
kwargs :
dictionary containing plot parameters e.g. x/y axis labels, title, etc...
Returns
-------
tab_name : str
name of the tab
item_name : str
name of the plot
plot : PlotMassSpectrum
plot object
"""
self.check_tab(tab_name)
self.check_data(data, ("x", "y"))
source = ColumnDataSource(data)
plot = PlotMassSpectrum(self.output_dir, source=source, **kwargs)
# add figure object to tab
layout_name = layout_name if layout_name is not None else self.get_unique_name(tab_name)
plot = self.append_item(tab_name, layout_name, plot)
return tab_name, layout_name, plot
def plot_butterfly_mass_spectrum(self, tab_name, data: ty.Dict, layout_name=None, **kwargs):
"""Adds butterfly mass spectra to the plot store (one on top / one below)
Parameters
----------
tab_name : str
name of the tab where plot should be added to
data : dict
Dictionary containing appropriate plot fields, in this case:
x_top, y_top, x_bottom, y_bottom = list / array
the length of x_top and y_top, x_bottom and y_bottom must be the same.
layout_name : str
by default, plot objects are added to the tab in iterative way (e.g. if there are no plots in the tab, it
will be added as 'item #0', if there is one then it will be added as 'item #1' etc. Sometimes you might want
to add it to a 'row' or 'column' for which you have name - you can specify its name here and if its present
the plot object will be added to that container
kwargs :
dictionary containing plot parameters e.g. x/y axis labels, title, etc...
Returns
-------
tab_name : str
name of the tab
item_name : str
name of the plot
plot : PlotButterflyMassSpectrum
plot object
"""
self.check_tab(tab_name)
self.check_data(data, ("x_top", "y_top", "x_bottom", "y_bottom"))
source = ColumnDataSource(data=data)
plot = PlotButterflyMassSpectrum(self.output_dir, source=source, **kwargs)
# add figure object to tab
layout_name = layout_name if layout_name is not None else self.get_unique_name(tab_name)
self.append_item(tab_name, layout_name, plot)
return tab_name, layout_name, plot
def plot_centroid_mass_spectrum(self, tab_name, data: ty.Dict, layout_name=None, **kwargs):
"""Adds centroid mass spectrum to the plot store
Parameters
----------
tab_name : str
name of the tab where plot should be added to
data : dict
Dictionary containing appropriate plot fields, in this case:
x, y0, y1 = list / array
the length of x and y0 and y1 must be the same.
If y0 is not provided, values will be automatically generated to provide array of 0s
layout_name : str
by default, plot objects are added to the tab in iterative way (e.g. if there are no plots in the tab, it
will be added as 'item #0', if there is one then it will be added as 'item #1' etc. Sometimes you might want
to add it to a 'row' or 'column' for which you have name - you can specify its name here and if its present
the plot object will be added to that container
kwargs :
dictionary containing plot parameters e.g. x/y axis labels, title, etc...
Returns
-------
tab_name : str
name of the tab
item_name : str
name of the plot
plot : PlotCentroidMassSpectrum
plot object
"""
self.check_tab(tab_name)
if "y0" not in data:
data["y0"] = np.zeros_like(data["x"], dtype=np.int8)
self.check_data(data, ("x", "y0", "y1"))
source = ColumnDataSource(data)
plot = PlotCentroidMassSpectrum(self.output_dir, source=source, **kwargs)
# add figure object to tab
layout_name = layout_name if layout_name is not None else self.get_unique_name(tab_name)
self.append_item(tab_name, layout_name, plot)
return tab_name, layout_name, plot
def plot_mobilogram(self, tab_name, data: ty.Dict, layout_name=None, **kwargs):
"""Adds mobilogram to the plot store
Parameters
----------
tab_name : str
name of the tab where plot should be added to
data : dict
dictionary containing appropriate plot fields
in this case:
x, y = list / array
the length of x and y must be the same
layout_name : str
by default, plot objects are added to the tab in iterative way (e.g. if there are no plots in the tab, it
will be added as 'item #0', if there is one then it will be added as 'item #1' etc. Sometimes you might want
to add it to a 'row' or 'column' for which you have name - you can specify its name here and if its present
the plot object will be added to that container
kwargs :
dictionary containing plot parameters e.g. x/y axis labels, title, etc...
Returns
-------
tab_name : str
name of the tab
item_name : str
name of the plot
plot : PlotMobilogram
plot object
"""
self.check_tab(tab_name)
self.check_data(data, ("x", "y"))
source = ColumnDataSource(data)
plot = PlotMobilogram(self.output_dir, source=source, **kwargs)
# add figure object to tab
layout_name = layout_name if layout_name is not None else self.get_unique_name(tab_name)
self.append_item(tab_name, layout_name, plot)
return tab_name, layout_name, plot
def plot_butterfly_mobilogram(self, tab_name, data: ty.Dict, layout_name=None, **kwargs):
"""Adds butterfly mobilograms to the plot store (one on top / one below)
Parameters
----------
tab_name : str
name of the tab where plot should be added to
data : dict
Dictionary containing appropriate plot fields, in this case:
x_top, y_top, x_bottom, y_bottom = list / array
the length of x_top and y_top, x_bottom and y_bottom must be the same.
layout_name : str
by default, plot objects are added to the tab in iterative way (e.g. if there are no plots in the tab, it
will be added as 'item #0', if there is one then it will be added as 'item #1' etc. Sometimes you might want
to add it to a 'row' or 'column' for which you have name - you can specify its name here and if its present
the plot object will be added to that container
kwargs :
dictionary containing plot parameters e.g. x/y axis labels, title, etc...
Returns
-------
tab_name : str
name of the tab
item_name : str
name of the plot
plot : PlotButterflyMobilogram
plot object
"""
self.check_tab(tab_name)
self.check_data(data, ("x_top", "y_top", "x_bottom", "y_bottom"))
source = ColumnDataSource(data)
plot = PlotButterflyMobilogram(self.output_dir, source=source, **kwargs)
# add figure object to tab
layout_name = layout_name if layout_name is not None else self.get_unique_name(tab_name)
self.append_item(tab_name, layout_name, plot)
return tab_name, layout_name, plot
| 40.995455 | 120 | 0.613483 | 1,273 | 9,019 | 4.235664 | 0.10762 | 0.045438 | 0.030601 | 0.036165 | 0.862945 | 0.859607 | 0.859607 | 0.849777 | 0.849777 | 0.849777 | 0 | 0.003405 | 0.31611 | 9,019 | 219 | 121 | 41.182648 | 0.870785 | 0.553276 | 0 | 0.5 | 0 | 0 | 0.022059 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.092593 | false | 0 | 0.092593 | 0 | 0.296296 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
5b491330f1709efad7929cdbbf9b1c915a0e03e4 | 6,291 | py | Python | hexa/plugins/connector_dhis2/datacards.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 4 | 2021-07-19T12:53:21.000Z | 2022-01-26T17:45:02.000Z | hexa/plugins/connector_dhis2/datacards.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 20 | 2021-05-17T12:27:06.000Z | 2022-03-30T11:35:26.000Z | hexa/plugins/connector_dhis2/datacards.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 2 | 2021-09-07T04:19:59.000Z | 2022-02-08T15:33:29.000Z | from django.contrib.contenttypes.models import ContentType
from django.templatetags.static import static
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from hexa.catalog.datacards import OpenHexaMetaDataSection
from hexa.plugins.connector_dhis2.models import Instance
from hexa.ui.datacard import (
Action,
BooleanProperty,
Datacard,
DateProperty,
LocaleProperty,
Section,
TextProperty,
URLProperty,
)
class InstanceSection(Section):
title = "DHIS2 Data"
name = TextProperty(text="name", translate=False)
locale = LocaleProperty(locale="locale")
url = URLProperty(url="url")
class InstanceCard(Datacard):
title = "display_name"
subtitle = "generic_description"
image_src = "dhis2_image_src"
actions = [Action(label="Sync", url="get_sync_url", icon="refresh")]
external = InstanceSection()
metadata = OpenHexaMetaDataSection(value="index")
@property
def generic_description(self):
return _("DHIS2 Instance")
@property
def dhis2_image_src(self):
return static("connector_dhis2/img/symbol.svg")
def get_sync_url(self, instance: Instance):
return reverse(
"catalog:datasource_sync",
kwargs={
"datasource_id": instance.id,
"datasource_contenttype_id": ContentType.objects.get_for_model(
Instance
).id,
},
)
class DataElementSection(Section):
title = "DHIS2 Data"
dhis2_id = TextProperty(label="ID", text="dhis2_id", translate=False)
name = TextProperty(text="name")
short_name = TextProperty(label="Short name", text="short_name")
description = TextProperty(label="Description", text="description")
code = TextProperty(label="Code", text="code", translate=False)
domain_type = TextProperty(label="Domain type", text="get_domain_type_display")
value_type = TextProperty(label="Value type", text="get_value_type_display")
favourite = BooleanProperty(label="Favourite", value="favourite")
external_access = BooleanProperty(label="External access", value="external_access")
created = DateProperty(label="Creation date", date="created")
last_updated = DateProperty(label="Last updated", date="last_updated")
class DataElementCard(Datacard):
title = "display_name"
subtitle = "generic_description"
image_src = "dhis2_image_src"
external = DataElementSection()
metadata = OpenHexaMetaDataSection(value="index")
@property
def generic_description(self):
return _("DHIS2 Data Element")
@property
def dhis2_image_src(self):
return static("connector_dhis2/img/symbol.svg")
class OrganisationUnitSection(Section):
title = "DHIS2 Organisation Unit"
dhis2_id = TextProperty(label="ID", text="dhis2_id", translate=False)
name = TextProperty(text="name")
short_name = TextProperty(label="Short name", text="short_name")
description = TextProperty(label="Description", text="description")
code = TextProperty(label="Code", text="code", translate=False)
leaf = BooleanProperty(label="Leaf", value="leaf")
domain_type = TextProperty(label="Domain type", text="get_domain_type_display")
value_type = TextProperty(label="Value type", text="get_value_type_display")
favourite = BooleanProperty(label="Favourite", value="favourite")
external_access = BooleanProperty(label="External access", value="external_access")
created = DateProperty(label="Creation date", date="created")
last_updated = DateProperty(label="Last updated", date="last_updated")
class OrganisationUnitCard(Datacard):
title = "display_name"
subtitle = "generic_description"
image_src = "dhis2_image_src"
external = OrganisationUnitSection()
metadata = OpenHexaMetaDataSection(value="index")
@property
def generic_description(self):
return _("DHIS2 Organisation Unit")
@property
def dhis2_image_src(self):
return static("connector_dhis2/img/symbol.svg")
class IndicatorSection(Section):
title = "DHIS2 Indicator"
dhis2_id = TextProperty(label="ID", text="dhis2_id", translate=False)
name = TextProperty(text="name")
short_name = TextProperty(label="Short name", text="short_name")
description = TextProperty(label="Description", text="description")
code = TextProperty(label="Code", text="code", translate=False)
indicator_type = TextProperty(
label="Indicator type", text="indicator_type.display_name"
)
annualized = BooleanProperty(label="Annualized", value="annualized")
favourite = BooleanProperty(label="Favourite", value="favourite")
external_access = BooleanProperty(label="External access", value="external_access")
created = DateProperty(label="Creation date", date="created")
last_updated = DateProperty(label="Last updated", date="last_updated")
class IndicatorCard(Datacard):
title = "display_name"
subtitle = "generic_description"
image_src = "dhis2_image_src"
external = IndicatorSection()
metadata = OpenHexaMetaDataSection(value="index")
@property
def generic_description(self):
return _("DHIS2 Indicator")
@property
def dhis2_image_src(self):
return static("connector_dhis2/img/symbol.svg")
class DatasetSection(Section):
title = "DHIS2 Dataset"
dhis2_id = TextProperty(label="ID", text="dhis2_id", translate=False)
name = TextProperty(text="name")
short_name = TextProperty(label="Short name", text="short_name")
description = TextProperty(label="Description", text="description")
code = TextProperty(label="Code", text="code", translate=False)
created = DateProperty(label="Creation date", date="created")
last_updated = DateProperty(label="Last updated", date="last_updated")
class DatasetCard(Datacard):
title = "display_name"
subtitle = "generic_description"
image_src = "dhis2_image_src"
external = DatasetSection()
metadata = OpenHexaMetaDataSection(value="index")
@property
def generic_description(self):
return _("DHIS2 Dataset")
@property
def dhis2_image_src(self):
return static("connector_dhis2/img/symbol.svg")
| 33.822581 | 87 | 0.708472 | 666 | 6,291 | 6.524024 | 0.148649 | 0.082163 | 0.029919 | 0.027618 | 0.70702 | 0.70702 | 0.70702 | 0.70702 | 0.70702 | 0.70702 | 0 | 0.006554 | 0.17533 | 6,291 | 185 | 88 | 34.005405 | 0.830956 | 0 | 0 | 0.594406 | 0 | 0 | 0.227786 | 0.050072 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.048951 | 0.076923 | 0.797203 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
5b5b11c2c2c130294c73b83e766b9d3279bab4f6 | 153 | py | Python | Codewars/7kyu/going-to-the-cinema/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/7kyu/going-to-the-cinema/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/7kyu/going-to-the-cinema/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.6.0
Test.describe('Movie')
Test.it('Basic tests')
Test.assert_equals(movie(500, 15, 0.9), 43)
Test.assert_equals(movie(100, 10, 0.95), 24)
| 21.857143 | 44 | 0.686275 | 29 | 153 | 3.551724 | 0.689655 | 0.194175 | 0.31068 | 0.407767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160584 | 0.104575 | 153 | 6 | 45 | 25.5 | 0.591241 | 0.091503 | 0 | 0 | 0 | 0 | 0.116788 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
5b74f3ff6478f244ce8c7614c7a9147611b78b0b | 65 | py | Python | pyhist/history/__init__.py | jgoodman8/pyhist | d86d19a4033d0d485db87379da38722f12beb28c | [
"Apache-2.0"
] | 18 | 2020-06-16T17:18:47.000Z | 2022-03-22T23:57:59.000Z | pyhist/history/__init__.py | jgoodman8/pyhist | d86d19a4033d0d485db87379da38722f12beb28c | [
"Apache-2.0"
] | 1 | 2020-10-10T08:41:40.000Z | 2020-11-05T13:20:12.000Z | pyhist/history/__init__.py | jgoodman8/pyhist | d86d19a4033d0d485db87379da38722f12beb28c | [
"Apache-2.0"
] | 1 | 2020-09-24T19:31:23.000Z | 2020-09-24T19:31:23.000Z | from .history import History
from .git_history import GitHistory
| 21.666667 | 35 | 0.846154 | 9 | 65 | 6 | 0.555556 | 0.481481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123077 | 65 | 2 | 36 | 32.5 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
5b9d2d86cb634fc7df60ba95e96bd46f65cc97f7 | 47 | py | Python | modules/unit_tests/core/aaa/__init__.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/unit_tests/core/aaa/__init__.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/unit_tests/core/aaa/__init__.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | 1 | 2017-10-03T13:03:47.000Z | 2017-10-03T13:03:47.000Z | from .auth import *
from .permissions import *
| 15.666667 | 26 | 0.744681 | 6 | 47 | 5.833333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170213 | 47 | 2 | 27 | 23.5 | 0.897436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
750368d2d57c70de6fd11490f6fe1e1c6a787c45 | 478 | py | Python | app/routes.py | ErdalDomi/doctorviz | 0d33885e467331484b4817f9f2c9bdda3e7a434d | [
"MIT"
] | null | null | null | app/routes.py | ErdalDomi/doctorviz | 0d33885e467331484b4817f9f2c9bdda3e7a434d | [
"MIT"
] | null | null | null | app/routes.py | ErdalDomi/doctorviz | 0d33885e467331484b4817f9f2c9bdda3e7a434d | [
"MIT"
] | null | null | null | from flask import render_template, flash, redirect, url_for
from app import app
from app.forms import LoginForm
@app.route('/')
@app.route('/index')
def index():
return render_template('main.html')
@app.route('/timeline')
def timeline():
return render_template('timeline.html')
@app.route('/medintake')
def medintake():
return render_template('medintake.html')
@app.route('/visualization')
def visualization():
return render_template('visualization.html')
| 20.782609 | 59 | 0.730126 | 60 | 478 | 5.716667 | 0.35 | 0.204082 | 0.233236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121339 | 478 | 22 | 60 | 21.727273 | 0.816667 | 0 | 0 | 0 | 0 | 0 | 0.196653 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0 | 0.1875 | 0.25 | 0.6875 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
752e0cdff8972017efa89e62f251de5d866dbc11 | 401 | py | Python | lib/googlecloudsdk/third_party/apis/appengine/v1beta4/__init__.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/appengine/v1beta4/__init__.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/appengine/v1beta4/__init__.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 2 | 2020-11-04T03:08:21.000Z | 2020-11-05T08:14:41.000Z | """Common imports for generated appengine client library."""
# pylint:disable=wildcard-import
import pkgutil
from googlecloudsdk.third_party.apitools.base.py import *
from googlecloudsdk.third_party.apis.appengine.v1beta4.appengine_v1beta4_client import *
from googlecloudsdk.third_party.apis.appengine.v1beta4.appengine_v1beta4_messages import *
__path__ = pkgutil.extend_path(__path__, __name__)
| 36.454545 | 90 | 0.842893 | 49 | 401 | 6.489796 | 0.510204 | 0.201258 | 0.216981 | 0.264151 | 0.440252 | 0.440252 | 0.440252 | 0.440252 | 0.440252 | 0.440252 | 0 | 0.021563 | 0.074813 | 401 | 10 | 91 | 40.1 | 0.83558 | 0.214464 | 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 | 1 | 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 | 1 | 0 | 1 | 0 | 0 | 6 |
7561539b290e5a09c5345359bfbc07876b401b38 | 35,025 | py | Python | mev/api/tests/test_user_operation_input.py | hsph-qbrc/mev-backend | c381800aa7d53d7256e89a4db5a0f9444264e9a6 | [
"MIT"
] | null | null | null | mev/api/tests/test_user_operation_input.py | hsph-qbrc/mev-backend | c381800aa7d53d7256e89a4db5a0f9444264e9a6 | [
"MIT"
] | null | null | null | mev/api/tests/test_user_operation_input.py | hsph-qbrc/mev-backend | c381800aa7d53d7256e89a4db5a0f9444264e9a6 | [
"MIT"
] | null | null | null | import unittest
import unittest.mock as mock
import os
import json
import copy
import uuid
import shutil
from collections import defaultdict
from django.core.exceptions import ImproperlyConfigured
from rest_framework.exceptions import ValidationError
from api.utilities.operations import read_operation_json
from api.data_structures.submitted_input_or_output import submitted_operation_input_or_output_mapping
from api.models import Resource, Workspace, Operation, OperationResource
from api.tests.base import BaseAPITestCase
from resource_types import RESOURCE_MAPPING
# the api/tests dir
TESTDIR = os.path.dirname(__file__)
TESTDIR = os.path.join(TESTDIR, 'operation_test_files')
class UserOperationInputTester(BaseAPITestCase):
def setUp(self):
self.filepath = os.path.join(TESTDIR, 'valid_operation.json')
fp = open(self.filepath)
self.valid_dict = json.load(fp)
fp.close()
self.establish_clients()
@mock.patch('api.utilities.operations.read_local_file')
def test_read_operation_json(self, mock_read_local_file):
# test that a properly formatted file returns
# a dict as expected:
fp = open(self.filepath)
mock_read_local_file.return_value = fp
d = read_operation_json(self.filepath)
self.assertDictEqual(d, self.valid_dict)
def test_basic_user_inputs(self):
'''
This tests that the proper validation happens
when comparing the user-submitted values and the input
specifications. Here, the values are all valid.
'''
f = os.path.join(
TESTDIR,
'sample_for_basic_types.json'
)
d = read_operation_json(f)
# some valid user inputs corresponding to the input specifications
sample_inputs = {
'int_type': 10,
'positive_int_type': 3,
'nonnegative_int_type': 0,
'bounded_int_type': 2,
'float_type':0.2,
'bounded_float_type': 0.4,
'positive_float_type': 0.01,
'nonnegative_float_type': 0.1,
'string_type': 'abc',
'boolean_type': True,
'option_string_type': 'abc'
}
for key, val in sample_inputs.items():
spec_object = d['inputs'][key]['spec']
spec_type = spec_object['attribute_type']
submitted_input_or_output_class = submitted_operation_input_or_output_mapping[spec_type]
submitted_input_or_output_class(self.regular_user_1, None, None, key, val, spec_object)
def test_bad_basic_user_inputs(self):
'''
This tests that the proper validation happens
when comparing the user-submitted values and the input
specifications. Here, the user inputs violate the type
constraints
'''
f = os.path.join(
TESTDIR,
'sample_for_basic_types_no_default.json'
)
d = read_operation_json(f)
# some INvalid user inputs corresponding to the input specifications
sample_inputs = {
'int_no_default_type': 10.5,
'positive_int_no_default_type': -3,
'nonnegative_int_no_default_type': -10,
'bounded_int_no_default_type': 22222,
'float_no_default_type': 'abc',
'bounded_float_no_default_type': 10000.4,
'positive_float_no_default_type': -10.01,
'nonnegative_float_no_default_type': -0.1,
'string_no_default_type': '.*',
'boolean_no_default_type': 'abc',
'option_string_no_default_type': 'zzz'
}
# try to create objects for each- ensure they raise an exception:
for key, val in sample_inputs.items():
spec_object = d['inputs'][key]['spec']
spec_type = spec_object['attribute_type']
submitted_input_or_output_class = submitted_operation_input_or_output_mapping[spec_type]
with self.assertRaises(ValidationError):
# can pass None for the workspace arg since we don't use it when checking the basic types
# Also pass None for the Operation argument. None of the basic attributes require that.
submitted_input_or_output_class(self.regular_user_1, None, None, key, val, spec_object)
def test_defaults_for_non_required_inputs(self):
'''
Certain inputs may not be required by the user. In that case, check that
the defaults are properly entered as the value
'''
f = os.path.join(
TESTDIR,
'sample_for_basic_types.json'
)
d = read_operation_json(f)
# try to create objects for each- ensure they raise an exception:
for key, op_input in d['inputs'].items():
spec_object = op_input['spec']
spec_type = spec_object['attribute_type']
submitted_input_or_output_class = submitted_operation_input_or_output_mapping[spec_type]
# can pass None for the workspace arg since we don't use it when checking the basic types
submitted_input_or_output_class(self.regular_user_1, None, None, key, None, spec_object)
def test_resource_type_input(self):
'''
Tests the various scenarios for handling an input corresponding to a
DataResource
'''
submitted_input_or_output_class = submitted_operation_input_or_output_mapping['DataResource']
user_workspaces = Workspace.objects.filter(owner=self.regular_user_1)
has_valid_setup = False
user_workspace = None
for w in user_workspaces:
workspace_resources = w.resources.all()
user_resource_list = []
for r in workspace_resources:
if (r.is_active) and (r.owner == self.regular_user_1):
user_resource_list.append(r)
if len(user_resource_list) >= 2:
user_workspace = w
has_valid_setup = True
break
if not has_valid_setup:
raise ImproperlyConfigured('Need at least two active user'
' Resources in a single Workspace for this test.'
)
# want to get another Resource owned by this user that is NOT in the workspace
# They should NOT be able to execute an analysis on it unless it's associated with
# the workspace.
non_workspace_resources = [x for x in
Resource.objects.filter(owner=self.regular_user_1)
if not x in user_resource_list]
if len(non_workspace_resources) == 0:
raise ImproperlyConfigured('Need at least one Resource for the user that is not'
' associated with a workspace.'
)
other_user_resource = Resource.objects.create(
is_active=True,
owner = self.regular_user_2
)
# handle a good case with a single file
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'DataResource',
'many': False,
'resource_type': rt
}
x = submitted_input_or_output_class(self.regular_user_1, None, user_workspace,'xyz',
str(r.id), single_resource_input_spec)
self.assertEqual(x.get_value(), str(r.id))
# handle a good case with multiple files
user_resource_dict = defaultdict(list)
for r in user_resource_list:
user_resource_dict[r.resource_type].append(r)
rt = None
for k,v in user_resource_dict.items():
if len(v) > 1:
rt = k
if rt:
r0 = user_resource_dict[rt][0]
r1 = user_resource_dict[rt][1]
else:
raise ImproperlyConfigured('Set up the test such that there are '
'multiple resources with the same type.'
)
multiple_resource_input_spec = {
'attribute_type': 'DataResource',
'many': True,
'resource_type': rt
}
expected_vals = [str(r0.id), str(r1.id)]
x = submitted_input_or_output_class(self.regular_user_1, None, user_workspace,'xyz',
expected_vals,
multiple_resource_input_spec)
self.assertCountEqual(x.get_value(), expected_vals)
# malformatted input_spec (uses resource_typeS)
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'DataResource',
'many': False,
'resource_types': rt
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,
'xyz', str(r.id), single_resource_input_spec)
# malformatted input_spec (resource_type should be a str, not a list)
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'DataResource',
'many': False,
'resource_type': [rt,]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,
'xyz', str(r.id), single_resource_input_spec)
# handle a single file with an invalid UUID; uuid is fine, but no Resource
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'DataResource',
'many': False,
'resource_type': rt
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,
'xyz', str(uuid.uuid4()), single_resource_input_spec)
# handle multiple files where one has an invalid UUID; uuid is fine,
# but no Resource
multiple_resource_input_spec = {
'attribute_type': 'DataResource',
'many': True,
'resource_type': 'MTX'
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,'xyz',
[str(uuid.uuid4()), str(uuid.uuid4())],
multiple_resource_input_spec)
# handle the case where the UUID identifies a file, but it is not theirs
rt = other_user_resource.resource_type
single_resource_input_spec = {
'attribute_type': 'DataResource',
'many': False,
'resource_type': rt
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
str(other_user_resource.id), single_resource_input_spec)
# handle the case where the UUID identifies a file, but it is not the correct type
r = user_resource_list[0]
rt = r.resource_type
other_resource_types = [x for x in RESOURCE_MAPPING.keys() if x != rt]
single_resource_input_spec = {
'attribute_type': 'DataResource',
'many': False,
'resource_type': other_resource_types[0]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
str(r.id), single_resource_input_spec)
# handle the case where we have a list of UUIDs. They all identify
# files, but for one of them, it is not the correct type
r0 = user_resource_list[0]
r1 = user_resource_list[1]
rts = [r0.resource_type, r1.resource_type]
other_resource_types = [x for x in RESOURCE_MAPPING.keys() if not x in rts]
resource_input_spec = {
'attribute_type': 'DataResource',
'many': True,
'resource_type': other_resource_types[0]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
[str(r0.id), str(r1.id)], resource_input_spec)
# handle the case where we have a list of UUIDs. They all identify
# files, but one of them is not in the workspace (it is, however, owned
# by the correct user.)
r0 = user_resource_list[0]
# get the resource_type for r0. Since we are dealing with an input
# that expects a single type, we need to now get another, non-workspace
# resource with that same type
r1_found = False
r1 = None
idx = 0
while ((not r1_found) and idx < len(non_workspace_resources)):
if non_workspace_resources[idx].resource_type == r0.resource_type:
r1_found = True
r1 = non_workspace_resources[idx]
idx += 1
# just a double check
rt_set = set([r0.resource_type, r1.resource_type])
if len(rt_set) > 1:
raise ImproperlyConfigured('Need two resources with the same type where'
' one is in the workspace and the other is not.'
)
resource_input_spec = {
'attribute_type': 'DataResource',
'many': True,
'resource_type': list(rt_set)[0]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
[str(r0.id), str(r1.id)], resource_input_spec)
def test_variable_resource_type_input(self):
'''
Tests the various scenarios for handling an input corresponding to a
VariableDataResource
'''
submitted_input_or_output_class = submitted_operation_input_or_output_mapping['VariableDataResource']
user_workspaces = Workspace.objects.filter(owner=self.regular_user_1)
has_valid_setup = False
user_workspace = None
for w in user_workspaces:
workspace_resources = w.resources.all()
user_resource_list = []
for r in workspace_resources:
if (r.is_active) and (r.owner == self.regular_user_1):
user_resource_list.append(r)
if len(user_resource_list) >= 2:
user_workspace = w
has_valid_setup = True
break
if not has_valid_setup:
raise ImproperlyConfigured('Need at least two active user'
' Resources in a single Workspace for this test.'
)
# want to get another Resource owned by this user that is NOT in the workspace
# They should NOT be able to execute an analysis on it unless it's associated with
# the workspace.
non_workspace_resources = [x for x in
Resource.objects.filter(owner=self.regular_user_1)
if not x in user_resource_list]
if len(non_workspace_resources) == 0:
raise ImproperlyConfigured('Need at least one Resource for the user that is not'
' associated with a workspace.'
)
other_user_resource = Resource.objects.create(
is_active=True,
owner = self.regular_user_2
)
# handle a good case with a single file
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': False,
'resource_types': [rt,]
}
x = submitted_input_or_output_class(self.regular_user_1, None, user_workspace,'xyz',
str(r.id), single_resource_input_spec)
self.assertEqual(x.get_value(), str(r.id))
# handle a good case with multiple files
user_resource_dict = defaultdict(list)
for r in user_resource_list:
user_resource_dict[r.resource_type].append(r)
rt = None
for k,v in user_resource_dict.items():
if len(v) > 1:
rt = k
if rt:
r0 = user_resource_dict[rt][0]
r1 = user_resource_dict[rt][1]
else:
raise ImproperlyConfigured('Set up the test such that there are '
'multiple resources with the same type.'
)
multiple_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': True,
'resource_types': [rt,]
}
expected_vals = [str(r0.id), str(r1.id)]
x = submitted_input_or_output_class(self.regular_user_1, None, user_workspace,'xyz',
expected_vals,
multiple_resource_input_spec)
self.assertCountEqual(x.get_value(), expected_vals)
# malformatted input_spec (uses resource_type...singular)
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': False,
'resource_type': [rt,]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,
'xyz', str(r.id), single_resource_input_spec)
# malformatted input_spec (resource_type should be a list, not a str)
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': False,
'resource_types': rt
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,
'xyz', str(r.id), single_resource_input_spec)
# handle a single file with an invalid UUID; uuid is fine, but no Resource
r = user_resource_list[0]
rt = r.resource_type
single_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': False,
'resource_types': [rt,]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,
'xyz', str(uuid.uuid4()), single_resource_input_spec)
# handle multiple files where one has an invalid UUID; uuid is fine,
# but no Resource
multiple_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': True,
'resource_types': ['MTX', 'I_MTX']
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace,'xyz',
[str(uuid.uuid4()), str(uuid.uuid4())],
multiple_resource_input_spec)
# handle the case where the UUID identifies a file, but it is not theirs
rt = other_user_resource.resource_type
single_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': False,
'resource_types': [rt,]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
str(other_user_resource.id), single_resource_input_spec)
# handle the case where the UUID identifies a file, but it is not the correct type
r = user_resource_list[0]
rt = r.resource_type
other_resource_types = [x for x in RESOURCE_MAPPING.keys() if x != rt]
single_resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': False,
'resource_types': other_resource_types
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
str(r.id), single_resource_input_spec)
# handle the case where we have a list of UUIDs. They all identify
# files, but for one of them, it is not the correct type
r0 = user_resource_list[0]
r1 = user_resource_list[1]
rts = [r0.resource_type, r1.resource_type]
other_resource_types = [x for x in RESOURCE_MAPPING.keys() if not x in rts]
resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': True,
'resource_types': other_resource_types
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
[str(r0.id), str(r1.id)], resource_input_spec)
# handle the case where we have a list of UUIDs. They all identify
# files, but one of them is not in the workspace (it is, however, owned
# by the correct user.)
r0 = user_resource_list[0]
# get the resource_type for r0. Since we are dealing with an input
# that expects a single type, we need to now get another, non-workspace
# resource with that same type
r1_found = False
r1 = None
idx = 0
while ((not r1_found) and idx < len(non_workspace_resources)):
if non_workspace_resources[idx].resource_type == r0.resource_type:
r1_found = True
r1 = non_workspace_resources[idx]
idx += 1
# just a double check
rt_set = set([r0.resource_type, r1.resource_type])
if len(rt_set) > 1:
raise ImproperlyConfigured('Need two resources with the same type where'
' one is in the workspace and the other is not.'
)
resource_input_spec = {
'attribute_type': 'VariableDataResource',
'many': True,
'resource_types': list(rt_set)
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, None, user_workspace, 'xyz',
[str(r0.id), str(r1.id)], resource_input_spec)
def test_operationresource_type_input(self):
'''
Tests the various scenarios for handling an input corresponding to a
OperationDataResource
'''
submitted_input_or_output_class = submitted_operation_input_or_output_mapping['OperationDataResource']
user_workspaces = Workspace.objects.filter(owner=self.regular_user_1)
user_workspace = user_workspaces[0]
operations = Operation.objects.all()
if len(operations) < 2:
raise ImproperlyConfigured('Need at least two Operations to run this test.')
op1 = operations[0]
op2 = operations[1]
# create an OperationDataResource for both ops
r1 = OperationResource.objects.create(
operation = op1,
input_field = 'foo',
name = 'foo.txt',
resource_type = 'MTX'
)
r2 = OperationResource.objects.create(
operation = op1,
input_field = 'bar',
name = 'bar.txt',
resource_type = 'MTX'
)
r3 = OperationResource.objects.create(
operation = op2,
input_field = 'foo', # same input_field as above, but for a different op
name = 'baz.txt',
resource_type = 'MTX'
)
# handle a good case with a single file
single_resource_input_spec = {
'attribute_type': 'OperationDataResource',
'many': False,
'resource_type': r1.resource_type
}
x = submitted_input_or_output_class(self.regular_user_1, op1, user_workspace, 'foo',
str(r1.id), single_resource_input_spec)
self.assertEqual(x.get_value(), str(r1.id))
# change the input field name. Note that r1 is associated with field 'foo', but
# we mock a user trying to use that operationResource with a field named 'xyz'.
# xyz is not a valid name for any input field.
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, op1, user_workspace, 'xyz',
str(r1.id), single_resource_input_spec)
# change the input field name. Note that r1 is associated with field 'foo', but
# we mock a user trying to use that operationResource with a field named 'bar'.
# Here, 'bar' happens to be a valid name of a different input field
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, op1, user_workspace, 'bar',
str(r1.id), single_resource_input_spec)
# assert that this is valid
x = submitted_input_or_output_class(self.regular_user_1, op1, user_workspace, 'bar',
str(r2.id), single_resource_input_spec)
self.assertEqual(x.get_value(), str(r2.id))
# op2 has a 'foo' input field- check that it works before trying to create a
# failed example
x = submitted_input_or_output_class(self.regular_user_1, op2, user_workspace, 'foo',
str(r3.id), single_resource_input_spec)
self.assertEqual(x.get_value(), str(r3.id))
# now change the user input to be the UUID of r1. This resource has the same
# input field, but is assoc. with op1, not op2
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, op2, user_workspace, 'foo',
str(r1.id), single_resource_input_spec)
# change the resource_type for the input spec so
# it doesn't match the OperationResource.
single_resource_input_spec = {
'attribute_type': 'OperationDataResource',
'many': False,
'resource_type': 'XYZ'
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, op1, user_workspace, 'foo',
str(r1.id), single_resource_input_spec)
# change the resource_type for the input spec so
# it doesn't match the format. It should be a string
# but it's a list
single_resource_input_spec = {
'attribute_type': 'OperationDataResource',
'many': False,
'resource_type': [r1.resource_type,]
}
with self.assertRaises(ValidationError):
submitted_input_or_output_class(self.regular_user_1, op1, user_workspace, 'foo',
str(r1.id), single_resource_input_spec)
def test_observation_set_inputs(self):
'''
Tests that the inputs are properly validated when they
correspond to an input type of `ObservationSet`
'''
f = os.path.join(
TESTDIR,
'obs_set_test.json'
)
d = read_operation_json(f)
clazz = submitted_operation_input_or_output_mapping['ObservationSet']
valid_obs_1 = {
'id': 'foo',
'attributes': {
'treatment': {'attribute_type': 'String', 'value': 'A'}
}
}
valid_obs_2 = {
'id': 'bar',
'attributes': {
'treatment': {'attribute_type': 'String', 'value': 'B'}
}
}
valid_obs_set = {
'multiple': True,
'elements': [
valid_obs_1,
valid_obs_2
]
}
# test that we are fine with a valid input:
x=clazz(self.regular_user_1, None, None, 'xyz', valid_obs_set, d['inputs']['obs_set_type'])
val = x.get_value()
self.assertEqual(val['multiple'], valid_obs_set['multiple'])
self.assertCountEqual(val['elements'], valid_obs_set['elements'])
# an empty element set is technically valid
empty_obs_set = {
'multiple': True,
'elements': []
}
x=clazz(self.regular_user_1, None, None, 'xyz', empty_obs_set, d['inputs']['obs_set_type'])
val = x.get_value()
self.assertCountEqual(val['elements'], [])
invalid_obs_set = {
'multiple': False,
'elements': [
valid_obs_1,
valid_obs_2
]
}
# the >1 elements coupled with multiple=False makes this an invalid ObservationSet
with self.assertRaises(ValidationError):
clazz(self.regular_user_1, None, None, 'xyz', invalid_obs_set, d['inputs']['obs_set_type'])
valid_obs_set = {
'multiple': True,
'elements': [
valid_obs_1,
{'id': 'baz'} # missing the 'attributes' key, but that is OK
]
}
clazz(self.regular_user_1, None, None, 'xyz', valid_obs_set, d['inputs']['obs_set_type'])
invalid_obs_set = {
'multiple': True,
'elements': [
valid_obs_1,
{} # missing the 'id' key, which is required
]
}
# missing 'id' causes the nested Observation to be invalid
with self.assertRaises(ValidationError):
clazz(self.regular_user_1, None, None, 'xyz', invalid_obs_set, d['inputs']['obs_set_type'])
def test_feature_set_inputs(self):
'''
Tests that the inputs are properly validated when they
correspond to an input type of `FeatureSet`
'''
f = os.path.join(
TESTDIR,
'feature_set_test.json'
)
d = read_operation_json(f)
clazz = submitted_operation_input_or_output_mapping['FeatureSet']
valid_feature_1 = {
'id': 'foo',
'attributes': {}
}
valid_feature_2 = {
'id': 'bar',
'attributes': {}
}
valid_feature_set = {
'multiple': True,
'elements': [
valid_feature_1,
valid_feature_2
]
}
# test that we are fine with a valid input:
x = clazz(self.regular_user_1, None, None, 'xyz', valid_feature_set, d['inputs']['feature_set_type'])
val = x.get_value()
self.assertEqual(val['multiple'], valid_feature_set['multiple'])
self.assertCountEqual(val['elements'], valid_feature_set['elements'])
# this featureset has zero elements. It's technically valid
empty_feature_set = {
'multiple': True,
'elements': []
}
x = clazz(self.regular_user_1, None, None, 'xyz', empty_feature_set, d['inputs']['feature_set_type'])
val = x.get_value()
self.assertCountEqual(val['elements'], [])
invalid_feature_set = {
'multiple': False,
'elements': [
valid_feature_1,
valid_feature_2
]
}
# the >1 elements coupled with multiple=False makes this an invalid FeatureSet
with self.assertRaises(ValidationError):
clazz(self.regular_user_1, None, None, 'xyz', invalid_feature_set, d['inputs']['feature_set_type'])
valid_feature_set2 = {
'multiple': True,
'elements': [
valid_feature_1,
{'id': 'bar'} # missing the 'attributes' key, but that is OK
]
}
x = clazz(self.regular_user_1, None, None, 'xyz', valid_feature_set2, d['inputs']['feature_set_type'])
# note that we compare against the original valid_feature_set.
# This is because our methods add the empty 'attributes' key.
# Therefore, a strict comparison of valid_feature_set2 would not be possible
# as we designed THAT dict to be missing the 'attributes' key.
val = x.get_value()
self.assertEqual(val['multiple'], valid_feature_set['multiple'])
self.assertCountEqual(val['elements'], valid_feature_set['elements'])
invalid_feature_set = {
'multiple': True,
'elements': [
valid_feature_1,
{} # missing the 'id' key, which is required
]
}
# missing 'id' causes the nested Feature to be invalid
with self.assertRaises(ValidationError):
clazz(self.regular_user_1, None, None, 'xyz', invalid_feature_set, d['inputs']['feature_set_type'])
def test_observation_inputs(self):
'''
Tests that the inputs are properly validated when they
correspond to an input type of `Observation`
'''
f = os.path.join(
TESTDIR,
'obs_set_test.json'
)
d = read_operation_json(f)
clazz = submitted_operation_input_or_output_mapping['Observation']
valid_obs_1 = {
'id': 'foo',
'attributes': {
'treatment': {'attribute_type': 'String', 'value': 'A'}
}
}
valid_obs_2 = {
'id': 'foo'
}
invalid_obs = {
'attributes': {
'treatment': {'attribute_type': 'String', 'value': 'A'}
}
}
# test that we are fine with a valid input:
x = clazz(self.regular_user_1, None, None, 'xyz', valid_obs_1, d['inputs']['obs_type'])
y = clazz(self.regular_user_1, None, None, 'xyz', valid_obs_2, d['inputs']['obs_type'])
self.assertDictEqual(x.get_value(), valid_obs_1)
self.assertDictEqual(
y.get_value(),
{'id': 'foo', 'attributes':{} }
)
with self.assertRaises(ValidationError):
clazz(self.regular_user_1, None, None, 'xyz', invalid_obs, d['inputs']['obs_type'])
def test_feature_inputs(self):
'''
Tests that the inputs are properly validated when they
correspond to an input type of `Feature`
'''
f = os.path.join(
TESTDIR,
'feature_set_test.json'
)
d = read_operation_json(f)
clazz = submitted_operation_input_or_output_mapping['Feature']
valid_feature_1 = {
'id': 'foo',
'attributes': {
'treatment': {'attribute_type':'String','value':'A'}
}
}
valid_feature_2 = {
'id': 'foo'
}
invalid_feature = {
'attributes': {
'treatment': 'A'
}
}
# test that we are fine with a valid input:
x = clazz(self.regular_user_1, None, None, 'xyz', valid_feature_1, d['inputs']['feature_type'])
y = clazz(self.regular_user_1, None, None, 'xyz', valid_feature_2, d['inputs']['feature_type'])
self.assertDictEqual(x.get_value(), valid_feature_1)
self.assertDictEqual(
y.get_value(),
{'id': 'foo', 'attributes':{} }
)
with self.assertRaises(ValidationError):
clazz(self.regular_user_1, None, None, 'xyz', invalid_feature, d['inputs']['feature_type']) | 39.937286 | 111 | 0.603198 | 4,170 | 35,025 | 4.804077 | 0.078417 | 0.026057 | 0.041931 | 0.043129 | 0.835072 | 0.827485 | 0.817651 | 0.797484 | 0.786652 | 0.779314 | 0 | 0.010239 | 0.308437 | 35,025 | 877 | 112 | 39.937286 | 0.816819 | 0.169764 | 0 | 0.679389 | 0 | 0 | 0.13201 | 0.019297 | 0 | 0 | 0 | 0 | 0.073282 | 1 | 0.018321 | false | 0 | 0.022901 | 0 | 0.042748 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f3909ea783f823190fef4ec60e2244cf92cd12c5 | 582 | py | Python | free_game_notifier/factory.py | mtik00/steam-free-notifier | c3f5f8f14119f98f365fcf94813ea0d6bd0553f6 | [
"MIT"
] | 1 | 2021-01-27T04:44:44.000Z | 2021-01-27T04:44:44.000Z | free_game_notifier/factory.py | mtik00/steam-free-notifier | c3f5f8f14119f98f365fcf94813ea0d6bd0553f6 | [
"MIT"
] | null | null | null | free_game_notifier/factory.py | mtik00/steam-free-notifier | c3f5f8f14119f98f365fcf94813ea0d6bd0553f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
class ClassFactory:
def __init__(self):
self.mapping = {}
def register(self, key, obj):
self.mapping[key] = obj
def get(self, key):
if not (item := self.mapping.get(key)):
raise ValueError(f"Unknown mapping: '{key}'")
return item
def keys(self):
return self.mapping.keys()
def values(self):
return self.mapping.values()
def items(self):
return self.mapping.items()
def __getitem__(self, key):
return self.mapping.get(key)
| 20.068966 | 57 | 0.575601 | 72 | 582 | 4.541667 | 0.402778 | 0.235474 | 0.207951 | 0.192661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004796 | 0.283505 | 582 | 28 | 58 | 20.785714 | 0.779377 | 0.073883 | 0 | 0 | 0 | 0 | 0.044693 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.411765 | false | 0 | 0 | 0.235294 | 0.764706 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
345f8bdf36eddc95c70bb77dab955db3ca772208 | 6,117 | py | Python | tests/category.py | matthewgehring/wptools | 788cdc2078696dacb14652d5f2ad098a585e4763 | [
"MIT"
] | 482 | 2015-04-13T23:43:42.000Z | 2022-03-31T14:44:50.000Z | tests/category.py | matthewgehring/wptools | 788cdc2078696dacb14652d5f2ad098a585e4763 | [
"MIT"
] | 168 | 2016-01-06T14:30:05.000Z | 2022-02-17T22:14:36.000Z | tests/category.py | matthewgehring/wptools | 788cdc2078696dacb14652d5f2ad098a585e4763 | [
"MIT"
] | 80 | 2015-05-03T18:10:58.000Z | 2022-02-17T22:54:25.000Z | # -*- coding:utf-8 -*-
query = 'https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmlimit=500&cmtitle=Category%3AHuman_rights_by_issue&format=json'
response = r"""{"batchcomplete":"","query":{"categorymembers":[{"pageid":53206947,"ns":0,"title":"Academic freedom in the Middle East"},{"pageid":52982000,"ns":0,"title":"Access to public information in Albania"},{"pageid":52922616,"ns":0,"title":"Access to public information in Armenia"},{"pageid":53000611,"ns":0,"title":"Access to public information in Bosnia and Herzegovina"},{"pageid":53125280,"ns":0,"title":"Access to public information in Bulgaria"},{"pageid":53106462,"ns":0,"title":"Access to public information in Croatia"},{"pageid":52049646,"ns":0,"title":"Access to public information in Europe"},{"pageid":52970153,"ns":0,"title":"Access to public information in Georgia"},{"pageid":53248779,"ns":0,"title":"Access to public information in Greece"},{"pageid":53033394,"ns":0,"title":"Access to public information in Kosovo"},{"pageid":52959127,"ns":0,"title":"Access to public information in Moldova"},{"pageid":53134476,"ns":0,"title":"Access to public information in Montenegro"},{"pageid":48302927,"ns":0,"title":"Access to public information in Serbia"},{"pageid":53209634,"ns":0,"title":"Access to public information in Slovenia"},{"pageid":53251063,"ns":0,"title":"Access to public information in the Republic of Macedonia"},{"pageid":53188837,"ns":0,"title":"Access to public information in Turkey"},{"pageid":1694303,"ns":0,"title":"Adultism"},{"pageid":22648231,"ns":0,"title":"Ageism"},{"pageid":19932294,"ns":0,"title":"Anti-homelessness legislation"},{"pageid":55084,"ns":0,"title":"Cultural genocide"},{"pageid":40331171,"ns":0,"title":"Casagrande case"},{"pageid":5047204,"ns":0,"title":"Right to education"},{"pageid":44594933,"ns":0,"title":"Equal Pay Day"},{"pageid":1108449,"ns":0,"title":"Equal pay for equal work"},{"pageid":5818292,"ns":0,"title":"Fetal rights"},{"pageid":18593011,"ns":0,"title":"Freedom from discrimination"},{"pageid":333994,"ns":0,"title":"Freedom of assembly"},{"pageid":219580,"ns":0,"title":"Freedom of association"},{"pageid":4319616,"ns":0,"title":"Freedom of education"},{"pageid":911519,"ns":0,"title":"Freedom of information"},{"pageid":1270497,"ns":0,"title":"Freedom of movement"},{"pageid":21401843,"ns":0,"title":"Freedom of speech"},{"pageid":557913,"ns":0,"title":"Freedom of thought"},{"pageid":300602,"ns":0,"title":"Internet access"},{"pageid":47275784,"ns":0,"title":"Intersex human rights"},{"pageid":499423,"ns":0,"title":"Legal aid"},{"pageid":1600241,"ns":0,"title":"Prisoners' rights"},{"pageid":7532615,"ns":0,"title":"Psychiatric survivors movement"},{"pageid":338825,"ns":0,"title":"Toleration"},{"pageid":660608,"ns":0,"title":"Right to a fair trial"},{"pageid":30105520,"ns":0,"title":"Right to an adequate standard of living"},{"pageid":35684112,"ns":0,"title":"Right to clothing"},{"pageid":370782,"ns":0,"title":"Right to die"},{"pageid":11224741,"ns":0,"title":"Right to equal protection"},{"pageid":8032176,"ns":0,"title":"Right to food"},{"pageid":35973887,"ns":0,"title":"Right to Food Guidelines"},{"pageid":3085490,"ns":0,"title":"Right to health"},{"pageid":21311955,"ns":0,"title":"Right to housing"},{"pageid":27913563,"ns":0,"title":"Right to Internet access"},{"pageid":219243,"ns":0,"title":"Right to keep and bear arms"},{"pageid":468580,"ns":0,"title":"Right to life"},{"pageid":8313678,"ns":0,"title":"Right to petition"},{"pageid":3119733,"ns":0,"title":"Right to property"},{"pageid":26207472,"ns":0,"title":"Right to science and culture"},{"pageid":30012163,"ns":0,"title":"Right to social security"},{"pageid":3062336,"ns":0,"title":"Human right to water and sanitation"},{"pageid":783318,"ns":0,"title":"Right to work"},{"pageid":5001094,"ns":0,"title":"Security of person"},{"pageid":29269,"ns":0,"title":"Self-determination"},{"pageid":19231063,"ns":0,"title":"Services for mental disorders"},{"pageid":9674519,"ns":0,"title":"Sex characteristics"},{"pageid":265564,"ns":0,"title":"Solitary confinement"},{"pageid":50066223,"ns":0,"title":"Solitary confinement of women"},{"pageid":2023819,"ns":0,"title":"Stateless nation"},{"pageid":4720758,"ns":0,"title":"Substantive rights"},{"pageid":53400430,"ns":0,"title":"Transparency of media ownership in Turkey"},{"pageid":177101,"ns":0,"title":"Patients' rights"},{"pageid":31802,"ns":0,"title":"Universal access to education"},{"pageid":29542150,"ns":14,"title":"Category:Child marriage"},{"pageid":3862359,"ns":14,"title":"Category:Children's rights"},{"pageid":14338109,"ns":14,"title":"Category:Consumer protection"},{"pageid":38779392,"ns":14,"title":"Category:Digital rights"},{"pageid":5119200,"ns":14,"title":"Category:Disability rights"},{"pageid":24946646,"ns":14,"title":"Category:Environmental protection"},{"pageid":33248265,"ns":14,"title":"Category:Freedom of assembly"},{"pageid":33188995,"ns":14,"title":"Category:Freedom of association"},{"pageid":1584861,"ns":14,"title":"Category:Freedom of expression"},{"pageid":53094272,"ns":14,"title":"Category:Freedom of movement"},{"pageid":15279591,"ns":14,"title":"Category:Habeas corpus"},{"pageid":47799573,"ns":14,"title":"Category:Right to housing"},{"pageid":19850720,"ns":14,"title":"Category:Human rights in Islam"},{"pageid":26106850,"ns":14,"title":"Category:Indigenous rights"},{"pageid":3534405,"ns":14,"title":"Category:Internet access"},{"pageid":17713681,"ns":14,"title":"Category:Labor rights"},{"pageid":25070788,"ns":14,"title":"Category:LGBT rights by issue"},{"pageid":9660914,"ns":14,"title":"Category:Linguistic rights"},{"pageid":2090360,"ns":14,"title":"Category:Men's rights"},{"pageid":1804476,"ns":14,"title":"Category:Privacy"},{"pageid":2235897,"ns":14,"title":"Category:Reproductive rights"},{"pageid":46195979,"ns":14,"title":"Category:Right to work"},{"pageid":48543091,"ns":14,"title":"Category:Victims' rights"},{"pageid":3431123,"ns":14,"title":"Category:Women's rights"}]}}"""
cache = {'query': query,
'response': response,
'info': {'content-type': 'TEST', 'status': 200}}
| 611.7 | 5,832 | 0.696747 | 850 | 6,117 | 5.010588 | 0.303529 | 0.047899 | 0.12773 | 0.095797 | 0.272364 | 0.16788 | 0.123268 | 0.123268 | 0 | 0 | 0 | 0.136309 | 0.044139 | 6,117 | 9 | 5,833 | 679.666667 | 0.592099 | 0.00327 | 0 | 0 | 0 | 0.4 | 0.982116 | 0.816407 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1b24f8e4b4713f5d71d729f4a3a9458dd26082f8 | 29 | py | Python | fediverse/views/renderer/activity/Block.py | YuzuRyo61/CrossPlan | 7bdc9b688885cd2bcce8bdc1f4d65b225beeb122 | [
"MIT"
] | 8 | 2020-01-22T07:44:59.000Z | 2020-05-17T18:32:06.000Z | fediverse/views/renderer/activity/Block.py | YuzuRyo61/CrossPlan | 7bdc9b688885cd2bcce8bdc1f4d65b225beeb122 | [
"MIT"
] | 4 | 2021-03-19T08:17:48.000Z | 2021-06-10T19:53:08.000Z | fediverse/views/renderer/activity/Block.py | YuzuRyo61/CrossPlan | 7bdc9b688885cd2bcce8bdc1f4d65b225beeb122 | [
"MIT"
] | null | null | null |
def RenderBlock():
pass
| 7.25 | 18 | 0.62069 | 3 | 29 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.275862 | 29 | 3 | 19 | 9.666667 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
1b5761a1f9b61977b9248f71267012558d8bcc6a | 119 | py | Python | eig/__init__.py | anselmrothe/EIG | 2e5da26bb0552bcaf6f9656519c8167808f0f6cb | [
"MIT"
] | 3 | 2019-03-12T15:55:00.000Z | 2022-01-27T23:09:30.000Z | eig/__init__.py | anselmrothe/EIG | 2e5da26bb0552bcaf6f9656519c8167808f0f6cb | [
"MIT"
] | 1 | 2019-03-24T16:55:26.000Z | 2019-03-24T16:55:26.000Z | eig/__init__.py | anselmrothe/EIG | 2e5da26bb0552bcaf6f9656519c8167808f0f6cb | [
"MIT"
] | 2 | 2019-08-18T18:44:05.000Z | 2020-09-30T05:47:15.000Z | from .bayes import Bayes
from .context import Context
from .eig import compute_eig, compute_eig_basic, compute_eig_fast | 39.666667 | 65 | 0.848739 | 19 | 119 | 5.052632 | 0.421053 | 0.3125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109244 | 119 | 3 | 65 | 39.666667 | 0.90566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1b843df707bccb79557cd139c16b9fcc247806bf | 138 | py | Python | ogsom/__init__.py | LaiQE/OGSOM | 3eaab41fc9364f4655a7606df0b6193cad30de04 | [
"MIT"
] | 3 | 2021-09-15T07:06:35.000Z | 2021-12-08T15:07:12.000Z | ogsom/__init__.py | LaiQE/OGSOM | 3eaab41fc9364f4655a7606df0b6193cad30de04 | [
"MIT"
] | null | null | null | ogsom/__init__.py | LaiQE/OGSOM | 3eaab41fc9364f4655a7606df0b6193cad30de04 | [
"MIT"
] | null | null | null | '''
Description: In User Settings Edit
Author: Qianen
Date: 2021-09-13 06:51:17
LastEditTime: 2021-09-13 06:51:18
LastEditors: Qianen
'''
| 17.25 | 34 | 0.73913 | 23 | 138 | 4.434783 | 0.73913 | 0.117647 | 0.156863 | 0.196078 | 0.235294 | 0 | 0 | 0 | 0 | 0 | 0 | 0.231405 | 0.123188 | 138 | 7 | 35 | 19.714286 | 0.61157 | 0.934783 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1b9fb5aeef1985bf0deaf45172133445bb786719 | 139 | py | Python | baekjoon/10699.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | baekjoon/10699.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | baekjoon/10699.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | """
10699 : 오늘 날짜
URL : https://www.acmicpc.net/problem/10699
Input :
Output :
2015-01-24
"""
print('2020-01-09')
| 13.9 | 47 | 0.532374 | 19 | 139 | 3.894737 | 0.894737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.262626 | 0.28777 | 139 | 9 | 48 | 15.444444 | 0.484848 | 0.640288 | 0 | 0 | 0 | 0 | 0.454545 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
940cb7ba73b81b51f8c1e431366ab0b471c78f2c | 231 | py | Python | cruncher/services/servo_calibration.py | piofthings/piwars-2019 | ac0316f8ae3e62f685509ecb41c0562106c90279 | [
"MIT"
] | null | null | null | cruncher/services/servo_calibration.py | piofthings/piwars-2019 | ac0316f8ae3e62f685509ecb41c0562106c90279 | [
"MIT"
] | 31 | 2019-03-05T00:52:08.000Z | 2019-03-29T00:53:25.000Z | cruncher/services/servo_calibration.py | piofthings/piwars-2019 | ac0316f8ae3e62f685509ecb41c0562106c90279 | [
"MIT"
] | null | null | null |
class ServoCalibration():
"""Servo Calibration service on the Cruncher"""
def __init__(self, bt_server):
self.__bt_server = bt_server
def setupFrontLeft(self, data, callback):
self.__bt_server.send()
| 23.1 | 51 | 0.679654 | 27 | 231 | 5.37037 | 0.62963 | 0.22069 | 0.248276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.21645 | 231 | 9 | 52 | 25.666667 | 0.801105 | 0.177489 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
941a38b739d0fa25eb6e9850d44af86e442b434c | 31 | py | Python | Assets/testpy.py | baranusluel/valores | ffc3ddfb1ae06ad3f7cf0717315eb2e273303ca6 | [
"MIT"
] | null | null | null | Assets/testpy.py | baranusluel/valores | ffc3ddfb1ae06ad3f7cf0717315eb2e273303ca6 | [
"MIT"
] | null | null | null | Assets/testpy.py | baranusluel/valores | ffc3ddfb1ae06ad3f7cf0717315eb2e273303ca6 | [
"MIT"
] | null | null | null | import sys
print("helloooo"); | 10.333333 | 18 | 0.709677 | 4 | 31 | 5.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 3 | 18 | 10.333333 | 0.814815 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
847a3f87ab59ec99030879616b2785b1ba682aed | 96 | py | Python | simpleloadtest/__init__.py | orlevii/simple-loadtest | 4c7a18c5670638391ac312858a3bd13a7d5095c0 | [
"MIT"
] | null | null | null | simpleloadtest/__init__.py | orlevii/simple-loadtest | 4c7a18c5670638391ac312858a3bd13a7d5095c0 | [
"MIT"
] | null | null | null | simpleloadtest/__init__.py | orlevii/simple-loadtest | 4c7a18c5670638391ac312858a3bd13a7d5095c0 | [
"MIT"
] | null | null | null | from .strategies.fixed_time import FixedTime
from .strategies.payload_queue import PayloadQueue
| 32 | 50 | 0.875 | 12 | 96 | 6.833333 | 0.75 | 0.341463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 96 | 2 | 51 | 48 | 0.931818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
84d5085101f8cb55187e2c706fc8aa75c85cbf07 | 3,403 | py | Python | spectrum/autism_prevalence_map/migrations/0005_auto_20180918_1733.py | simonsfoundation/spectrum-autism-prevalence-map | 9f9674087b1404e1c5526ef7958e2e6d1c4724d6 | [
"Apache-2.0"
] | null | null | null | spectrum/autism_prevalence_map/migrations/0005_auto_20180918_1733.py | simonsfoundation/spectrum-autism-prevalence-map | 9f9674087b1404e1c5526ef7958e2e6d1c4724d6 | [
"Apache-2.0"
] | 1 | 2021-12-07T03:27:08.000Z | 2021-12-07T03:27:08.000Z | spectrum/autism_prevalence_map/migrations/0005_auto_20180918_1733.py | simonsfoundation/spectrum-autism-prevalence-map | 9f9674087b1404e1c5526ef7958e2e6d1c4724d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-18 17:33
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('autism_prevalence_map', '0004_auto_20180905_1834'),
]
operations = [
migrations.RenameField(
model_name='studies',
old_name='population',
new_name='study_size',
),
migrations.RenameField(
model_name='studies',
old_name='population_number',
new_name='study_size_number',
),
migrations.RenameField(
model_name='studies',
old_name='year',
new_name='year_of_publication',
),
migrations.RenameField(
model_name='studies',
old_name='year_number',
new_name='year_of_publication_number',
),
migrations.AddField(
model_name='studies',
name='category',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='education_level_of_participants',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='erics_quality_assessment',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='erics_reasons_for_lower_quality',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='link_to_news_coverage_by_spectrum',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='mean_income_of_participants',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='methodology',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='reliability_quality',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='time_period_studied',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
migrations.AddField(
model_name='studies',
name='time_period_studied_number_max',
field=models.DateField(blank=True, default=datetime.date.today, null=True),
),
migrations.AddField(
model_name='studies',
name='time_period_studied_number_min',
field=models.DateField(blank=True, default=datetime.date.today, null=True),
),
migrations.AddField(
model_name='studies',
name='url',
field=models.CharField(blank=True, default='', max_length=255, null=True),
),
]
| 35.082474 | 87 | 0.583309 | 339 | 3,403 | 5.613569 | 0.250737 | 0.07567 | 0.134524 | 0.170257 | 0.790857 | 0.765633 | 0.745665 | 0.745665 | 0.638466 | 0.638466 | 0 | 0.026756 | 0.297091 | 3,403 | 96 | 88 | 35.447917 | 0.768813 | 0.020276 | 0 | 0.674157 | 1 | 0 | 0.160913 | 0.082858 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.033708 | 0 | 0.067416 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
84fac428977490bde63d3bb60f8a580107375934 | 19,465 | py | Python | CanDI/structures/entity.py | GilbertLabUCSF/CanDI | 3ad73c30e9364d09f0372f3f4ff6a2791a440277 | [
"MIT"
] | 1 | 2020-05-22T03:00:46.000Z | 2020-05-22T03:00:46.000Z | CanDI/structures/entity.py | Yogiski/CanDI | 3ad73c30e9364d09f0372f3f4ff6a2791a440277 | [
"MIT"
] | 10 | 2021-04-13T15:25:30.000Z | 2022-03-19T16:39:45.000Z | CanDI/structures/entity.py | GilbertLabUCSF/CanDI | 3ad73c30e9364d09f0372f3f4ff6a2791a440277 | [
"MIT"
] | 1 | 2021-04-06T22:21:17.000Z | 2021-04-06T22:21:17.000Z | import pandas as pd
from CanDI.structures import handlers
class Entity(object):
"""
Entity is the parent class for all CanDI classes.
It's purpose is to provide a universal connection to the data for it's child classes.
It's methods are idiomatic functions for the various handlers that apply manipulations to the datasets.
The following functions handle most common biologically relevant queries of candi objects.
They automatically call the filtering objects that are defined during instantiation.
- :func:`dependent <candi.Entity.dependent>`
- :func:`non_dependent <candi.Entity.non_depedent>`
- :func:`dependency_of <candi.Entity.dependency_of>`
- :func:`expressed <candi.Entity.expressed>`
- :func:`unexpressed <candi.Entity.unexpressed>`
- :func:`expression_of <candi.Entity.expression_of>`
- :func:`essential <candi.Entity.essential>`
- :func:`non_essential <candi.Entity.non_essential>`
- :func:`effect_of <candi.Entity.effect_of>`
- :func:`duplication <candi.Entity.duplication>`
- :func:`deletion <candi.Entity.deletion>`
- :func:`cn_normal <candi.Entity.cn_normal>`
- :func:`mutated <candi.Entity.mutated>`
"""
def __init__(self, obj):
if obj == ("gene" or "org"):
self._axis = 0
else:
self._axis = 1
if obj == ("gene" or "line"):
bi_filt = pd.Series
else:
bi_filt = pd.DataFrame
"""Entity functions rely on the following data handlers."""
self._dependency_filter = handlers.BinaryFilter(0.50, bi_filt)
self._essentiality_filter = handlers.BinaryFilter(-1.0, bi_filt)
self._expression_filter = handlers.BinaryFilter(1.0, bi_filt)
self._copy_number_del = handlers.BinaryFilter(0.92, bi_filt)
self._copy_number_dup = handlers.BinaryFilter(1.07, bi_filt)
self._mutation_handler = handlers.MutationHandler(obj)
def __getattr__(self, attr):
values = self._grabber(attr)
setattr(self, attr, values)
return values
# """The following functions handle most common biologically relevant queries of candi objects.
# They automatically call the filtering objects that are defined during instantiation.
# """
def expressed(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Returns genes/celllines that are above a certain expression filter.
Args:
item: str or list, optional
name or list of names of items to query expression. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the expression dataset
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass expressed filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item input is str
list
Returns list if item arg is list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.expression)
return self._expression_filter(values, style, "over", threshold, return_lines)
def unexpressed(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Unexpressed function returns genes/cellline(s) that are below a certain expression filter.
Args:
item: str or list, optional
name or list of names of items to query expression. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the expression dataset
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass unexpressed filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item input is str
list
Returns list if item arg is list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.expression)
return self._expression_filter(values, style, "under", threshold, return_lines)
def expression_of(self, items):
"""It returns the expression value in (TPM) of a specific gene(s)/cellline(s).
Args:
items: str or list
name of gene(s)/cellline(s) to return expression values for
Returns:
numpy.float64
Returns if items arg is type str
pandas.core.series.Series
Returns if items arg is type list
"""
return self._subset_handler(items, self.expression)
# return self.expression.reindex(genes, axis=axis)
def effect_of(self, items):
"""Returns the gene effect of specific gene(s)/cellline(s).
Args:
items: str or list
name of gene(s)/cellline(s) to gene effect values for
Returns:
numpy.float64
Returns if items arg is type str
pandas.core.series.Series
Returns if items arg is type list
"""
return self._subset_handler(items, self.gene_effect)
def essential(self, item=None, style="bool", threshold=1.0, return_lines=False):
"""Returns genes/cellline(s) who's gene effect is less than -1.
Args:
item: str or list, optional
name or list of names of items to query gene effect. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene effect dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass essential filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item input is str
list
Returns list if item arg is list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.gene_effect)
return self._essentiality_filter(values, style, "under", threshold, return_lines)
def non_essential(self, item=None, style="bool", threshold=1.0, return_lines=False):
"""Returns genes/cellline(s) who's gene effect is greater than -1.
Args:
item: str or list, optional
name or list of names of items to query gene effect. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene effect dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass non_essential filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item input is str
list
Returns list if item arg is list
pandas.core.series.Series
Returns if style arg is 'values'.
pands.core.frame.DataFrame
Returns if style arg is 'values'. Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
"""
values = self._subset_handler(item, self.gene_effect)
return self._essentiality_filter(values, style, "over", threshold, return_lines)
def dependency_of(self, items):
"""Returns gene dependency of given items
Args:
items: str or list
name of gene(s)/cellline(s) to gene dependency values for
Returns:
numpy.float64
Returns if items arg is type str
pandas.core.series.Series
Returns if items arg is type list
"""
return self._subset_handler(items, self.gene_dependency)
def dependent(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Returns genes/cellline(s) whose gene dependency is greater than 0.5
Args:
item: str or list, optional
name or list of names of items to query gene dependency. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene dependency dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass dependent filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item arg is type str
list
Returns list if item arg is type list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.gene_dependency)
return self._dependency_filter(values, style, "over", threshold, return_lines)
def non_dependent(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Returns genes/celline(s) whose gene dependency is less than 0.5
Args:
item: str or list, optional
name or list of names of items to query gene dependency. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene dependency dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass non_dependent filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item arg is type str
list
Returns list if item arg is type list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.gene_dependency)
return self._dependency_filter(values, style, "under", threshold, return_lines)
def duplication(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Returns gene(s)/cellline(s) with copy number above specific threshold.
Args:
item: str or list, optional
name or list of names of items to query gene copy number. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene copy number dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass duplication filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item arg is type str
list
Returns list if item arg is type list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.gene_cn)
return self._copy_number_dup(values, style, "over", threshold, return_lines)
def deletion(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Returns gene(s)/cellline(s) with copy number below specific threshold.
Args:
item: str or list, optional
name or list of names of items to query gene copy number. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene copy number dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass deletion filter.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item arg is type str
list
Returns list if item arg is type list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.gene_cn)
return self._copy_number_del(values, style, "under", threshold, return_lines)
def cn_normal(self, item=None, style='bool', threshold=1.0, return_lines=False):
"""Returns gene(s)/cellline(s) with normal copy number.
Args:
item: str or list, optional
name or list of names of items to query gene copy number. Can be gene symbols or DepMap_IDs
style: str, optional
style argument defines the type of output desired. Options are "bool" or "values"
"bool" returns the gene/cellline name(s). "values" returns a slice from the gene copy number dataset.
threshold: float between 0 and 1, optional
This is the percentage of gene(s)/cellline(s) that need to pass copy number normal filters.
Only relevant for Cancer, CellLineCluster, Organelle, and GeneCluster objects.
return_lines: bool, optional
not implemented
Returns:
bool
Returns bool if item arg is type str
list
Returns list if item arg is type list
numpy.float64
Returns if style arg is 'values' and filter result is 1-d with length of 1.
pandas.core.series.Series
Returns if style arg is 'values' and filter result is 1-d with length > 1.
pands.core.frame.DataFrame
Returns if style arg is 'values' and filter result is 2-d.
"""
values = self._subset_handler(item, self.gene_cn)
under = self._copy_number_dup(values, "values", "under", threshold, return_lines)
over = self._copy_number_del(under, style, "over", threshold, return_lines)
return over
def mutated(self, subset=None, output="names", variant=None, item=None, translocations=False, fusions=False,
all_except=False):
"""Returns gene(s)/cellline(s) that are mutated. User can specify the type of mutation.
Args:
subset: str or list, optional
name or list of names to query for mutations
output: str
desired datatype for output. Can be 'names', 'dataframe', or 'dict'
variant: str
Column in mutations data set for specific filtering
item:
Value in variant column for filtering
translocations: bool
not implemented
fusions: bool
not implemented
all_except: bool
output all values except those passing the given mutation filters
Returns:
list
list of gene(s)/cellline(s) that pass mutation filters
pandas.core.frame.DataFrame
DataFrame of all mutational data for items that pass mutation filters
dict
Dictionary of with gene names as keys and list of depmap_ids as values.
"""
if subset:
mut_dat = self._get_mut_subset(self.mutations, subset)
if mut_dat.empty: return
else:
mut_dat = self.mutations
return self._mutation_handler(mut_dat, output, variant, item, translocations, fusions, all_except)
| 48.907035 | 128 | 0.616234 | 2,499 | 19,465 | 4.736295 | 0.081633 | 0.019432 | 0.030754 | 0.037344 | 0.794525 | 0.780331 | 0.776445 | 0.769939 | 0.749578 | 0.741129 | 0 | 0.008963 | 0.317904 | 19,465 | 397 | 129 | 49.030227 | 0.882504 | 0.676085 | 0 | 0.184615 | 0 | 0 | 0.026743 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.030769 | 0 | 0.492308 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ca09b530358209e4c46c89f5a2b2cdff991cd5c0 | 180 | py | Python | apps/controllerx/core/integration/z2m.py | sreknob/controllerx | f5e4475dae93d171ba3056399378107df1d52fa5 | [
"MIT"
] | 1 | 2020-02-28T17:26:36.000Z | 2020-02-28T17:26:36.000Z | apps/controllerx/core/integration/z2m.py | sreknob/controllerx | f5e4475dae93d171ba3056399378107df1d52fa5 | [
"MIT"
] | null | null | null | apps/controllerx/core/integration/z2m.py | sreknob/controllerx | f5e4475dae93d171ba3056399378107df1d52fa5 | [
"MIT"
] | null | null | null | from core.integration import Integration
from core.integration.state import StateIntegration
class Z2MIntegration(StateIntegration):
def get_name(self):
return "z2m"
| 22.5 | 51 | 0.783333 | 20 | 180 | 7 | 0.7 | 0.114286 | 0.271429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013158 | 0.155556 | 180 | 7 | 52 | 25.714286 | 0.907895 | 0 | 0 | 0 | 0 | 0 | 0.016667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0.2 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
ca5799af9d592d384e06a01088d9fd6851fc1491 | 370 | py | Python | openocd/test_quote.py | cdleonard/pyopenocd | d1c29f4c3b1c03cf48829c969e7f9eba3cbf6100 | [
"MIT"
] | 2 | 2021-01-08T07:57:07.000Z | 2021-11-11T13:32:20.000Z | openocd/test_quote.py | cdleonard/pyopenocd | d1c29f4c3b1c03cf48829c969e7f9eba3cbf6100 | [
"MIT"
] | null | null | null | openocd/test_quote.py | cdleonard/pyopenocd | d1c29f4c3b1c03cf48829c969e7f9eba3cbf6100 | [
"MIT"
] | 1 | 2021-07-04T19:07:31.000Z | 2021-07-04T19:07:31.000Z | from .tclrpc import tcl_quote_word
from .tclrpc import tcl_quote_cmd
def test_tcl_quote_simple_word():
assert(tcl_quote_word('a') == 'a')
def test_tcl_quote_word():
assert(tcl_quote_word('a"b') == '{a"b}')
def test_tcl_quote_word():
assert(tcl_quote_word('a"b') == '{a"b}')
def test_tcl_quote_list():
assert(tcl_quote_cmd(['a', 'b c']) == 'a {b c}')
| 24.666667 | 52 | 0.672973 | 65 | 370 | 3.446154 | 0.230769 | 0.357143 | 0.321429 | 0.267857 | 0.75 | 0.535714 | 0.433036 | 0.433036 | 0.433036 | 0.433036 | 0 | 0 | 0.140541 | 370 | 14 | 53 | 26.428571 | 0.704403 | 0 | 0 | 0.4 | 0 | 0 | 0.078378 | 0 | 0 | 0 | 0 | 0 | 0.4 | 1 | 0.4 | true | 0 | 0.2 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
ca62dbdee0822f8ec1d85fbf2cd1759f397042da | 345 | py | Python | rec_to_nwb/processing/validation/preprocessing_validation_summary.py | LorenFrankLab/rec_to_nwb | d0630f414662963ebbe23aedf8f3ce07628636bc | [
"Apache-2.0"
] | 1 | 2021-01-20T00:26:30.000Z | 2021-01-20T00:26:30.000Z | rec_to_nwb/processing/validation/preprocessing_validation_summary.py | LorenFrankLab/rec_to_nwb | d0630f414662963ebbe23aedf8f3ce07628636bc | [
"Apache-2.0"
] | 12 | 2020-11-13T01:36:32.000Z | 2022-01-23T20:35:55.000Z | rec_to_nwb/processing/validation/preprocessing_validation_summary.py | LorenFrankLab/rec_to_nwb | d0630f414662963ebbe23aedf8f3ce07628636bc | [
"Apache-2.0"
] | 3 | 2020-10-20T06:52:45.000Z | 2021-07-06T23:00:53.000Z | from rec_to_nwb.processing.validation.validation_summary import \
ValidationSummary
class PreprocessingValidationSummary(ValidationSummary):
def __init__(self, missing_preprocessing_data):
self.missing_preprocessing_data = missing_preprocessing_data
def is_valid(self):
return not self.missing_preprocessing_data
| 28.75 | 68 | 0.805797 | 36 | 345 | 7.277778 | 0.583333 | 0.305344 | 0.366412 | 0.320611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144928 | 345 | 11 | 69 | 31.363636 | 0.888136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0.142857 | 0.714286 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
ca919737b6d9553288e7dec554ec5e7f281fb917 | 23 | py | Python | testgear/Espec/__init__.py | PhilippCo/testgear | 9dbf9c6e1028394375ccca6720d5be1854315f93 | [
"MIT"
] | 1 | 2021-08-25T15:16:57.000Z | 2021-08-25T15:16:57.000Z | testgear/Espec/__init__.py | PhilippCo/testgear | 9dbf9c6e1028394375ccca6720d5be1854315f93 | [
"MIT"
] | null | null | null | testgear/Espec/__init__.py | PhilippCo/testgear | 9dbf9c6e1028394375ccca6720d5be1854315f93 | [
"MIT"
] | null | null | null | from .PU4J import PU4J
| 11.5 | 22 | 0.782609 | 4 | 23 | 4.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105263 | 0.173913 | 23 | 1 | 23 | 23 | 0.842105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
048f55bf3b040ce2ad768ddd0881d95e6c366f32 | 21 | py | Python | nlptoolkit/gec/models/__init__.py | Marcel-api/NLP_Toolkit | fb8371c8c0d9fc188bebef421e05a8d1b9697105 | [
"Apache-2.0"
] | 2 | 2020-09-26T11:20:13.000Z | 2021-09-17T13:15:48.000Z | nlptoolkit/gec/models/__init__.py | Marcel-api/NLP_Toolkit | fb8371c8c0d9fc188bebef421e05a8d1b9697105 | [
"Apache-2.0"
] | null | null | null | nlptoolkit/gec/models/__init__.py | Marcel-api/NLP_Toolkit | fb8371c8c0d9fc188bebef421e05a8d1b9697105 | [
"Apache-2.0"
] | 1 | 2021-03-11T21:14:24.000Z | 2021-03-11T21:14:24.000Z | from . import gector
| 10.5 | 20 | 0.761905 | 3 | 21 | 5.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.190476 | 21 | 1 | 21 | 21 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
04a29160a76f2f2fb8dfc3c50f6b86524bdc6a4b | 244 | py | Python | tests/test_xnor.py | assasinitachi123/extra-boolean | 632bf238bd44df0a31be8fb970ed65f812dad166 | [
"MIT"
] | null | null | null | tests/test_xnor.py | assasinitachi123/extra-boolean | 632bf238bd44df0a31be8fb970ed65f812dad166 | [
"MIT"
] | 2 | 2021-04-01T12:07:06.000Z | 2021-04-01T12:30:17.000Z | tests/test_xnor.py | assasinitachi123/extra-boolean | 632bf238bd44df0a31be8fb970ed65f812dad166 | [
"MIT"
] | 3 | 2021-04-01T11:29:06.000Z | 2021-04-01T12:07:55.000Z | from extra_boolean import xnor
def test_xnor():
assert xnor(True, True) == True
assert xnor(False, True) == False
assert xnor(True, True, False, False) == True
assert xnor(True, True, True, False) == False
| 27.111111 | 48 | 0.610656 | 32 | 244 | 4.59375 | 0.3125 | 0.272109 | 0.285714 | 0.367347 | 0.29932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.278689 | 244 | 8 | 49 | 30.5 | 0.835227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0.166667 | true | 0 | 0.166667 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
04e98c3ed6f66850abd400541e2c2050148a6e64 | 296 | py | Python | flambe/cluster/instance/__init__.py | ethan-asapp/flambe | 70257167058c7b82ee39f74167a6161bd264ad18 | [
"MIT"
] | 148 | 2019-08-29T21:19:03.000Z | 2022-03-18T06:13:53.000Z | flambe/cluster/instance/__init__.py | cle-ros/flambe | 0dc2f5b2b286694defe8abf450fe5be9ae12c097 | [
"MIT"
] | 108 | 2019-09-03T14:36:10.000Z | 2020-05-13T15:53:14.000Z | flambe/cluster/instance/__init__.py | cle-ros/flambe | 0dc2f5b2b286694defe8abf450fe5be9ae12c097 | [
"MIT"
] | 21 | 2019-09-08T14:09:45.000Z | 2020-12-27T04:12:33.000Z | from flambe.cluster.instance.instance import Instance
from flambe.cluster.instance.instance import CPUFactoryInstance, GPUFactoryInstance
from flambe.cluster.instance.instance import OrchestratorInstance
__all__ = ['CPUFactoryInstance', 'GPUFactoryInstance', 'OrchestratorInstance', 'Instance']
| 49.333333 | 90 | 0.851351 | 27 | 296 | 9.185185 | 0.333333 | 0.120968 | 0.205645 | 0.302419 | 0.471774 | 0.471774 | 0 | 0 | 0 | 0 | 0 | 0 | 0.067568 | 296 | 5 | 91 | 59.2 | 0.898551 | 0 | 0 | 0 | 0 | 0 | 0.216216 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.75 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f3ee0020cca0a0c3608c1e9c315c842e3fe99f0f | 38 | py | Python | app/events/__init__.py | josephmancuso/gbaleague-masonite2 | b3dd5ec3f20c07eaabcc3129b0c50379a946a82b | [
"MIT"
] | null | null | null | app/events/__init__.py | josephmancuso/gbaleague-masonite2 | b3dd5ec3f20c07eaabcc3129b0c50379a946a82b | [
"MIT"
] | 3 | 2018-07-25T17:36:43.000Z | 2020-01-06T18:52:51.000Z | app/events/__init__.py | josephmancuso/gbaleague-masonite2 | b3dd5ec3f20c07eaabcc3129b0c50379a946a82b | [
"MIT"
] | null | null | null | from .UserSignedUp import UserSignedUp | 38 | 38 | 0.894737 | 4 | 38 | 8.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078947 | 38 | 1 | 38 | 38 | 0.971429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
6d1bf3aa6201ec4249fd97ca7e898febf717248c | 6,059 | py | Python | happ/tests/api/regular/test_users.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | 1 | 2017-10-22T06:12:33.000Z | 2017-10-22T06:12:33.000Z | happ/tests/api/regular/test_users.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | null | null | null | happ/tests/api/regular/test_users.py | Mafioso/happ-backend | 3a3a57add4ec55985cc37db79c71430ed78b1ee3 | [
"MIT"
] | null | null | null | from datetime import datetime
from rest_framework import status
from rest_framework.test import APISimpleTestCase
from rest_framework_jwt.settings import api_settings
from happ.models import User, Currency
from happ.factories import UserFactory, FileObjectFactory
from happ.tests import *
class Tests(APISimpleTestCase):
def test_get_current_user(self):
"""
We can get current user
"""
u = UserFactory()
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
url = prepare_url('users-current')
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['username'], u.username)
def test_edit_current_user(self):
"""
We can get edit current user
"""
u = UserFactory(**{
'fullname': 'Michael Brown',
'phone': '87015555555',
'gender': 0,
'date_of_birth': datetime(1991, 12, 23)
})
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
url = prepare_url('users-current/edit')
data = {
'fullname': 'Adam Smith',
'phone': '87017777777',
'gender': 1,
'date_of_birth': datetime(1990, 10, 15)
}
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.post(url, data=data, format='json')
u = User.objects.get(username=u.username)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(u.fullname, 'Adam Smith')
self.assertEqual(u.phone, '87017777777')
self.assertEqual(u.gender, 1)
self.assertEqual(u.date_of_birth, datetime(1990, 10, 15))
def test_set_language(self):
"""
We can set language for current user
"""
u = UserFactory()
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
url = prepare_url('users-current/set/language')
data = {
'language': 'it',
}
response = self.client.post(url, data=data, format='json')
u = User.objects.get(username=u.username)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['settings']['language'], 'it')
self.assertEqual(u.settings.language, 'it')
def test_set_language_no_lang(self):
"""
We cannot set language for current user with no lang
"""
u = UserFactory()
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
url = prepare_url('users-current/set/language')
data = {}
response = self.client.post(url, data=data, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
def test_set_language_wrong_lang(self):
"""
We cannot set language for current user with wrong lang
"""
u = UserFactory()
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
url = prepare_url('users-current/set/language')
data = {
'language': 'kk',
}
response = self.client.post(url, data=data, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
def test_edit_avatar(self):
"""
We can edit avatar
"""
u = UserFactory(**{
'fullname': 'Michael Brown',
'phone': '87015555555',
'gender': 0,
'date_of_birth': datetime(1991, 12, 23)
})
u.set_password('123')
u.save()
auth_url = prepare_url('login')
data = {
'username': u.username,
'password': '123'
}
response = self.client.post(auth_url, data=data, format='json')
token = response.data['token']
url = prepare_url('users-current/edit')
file_object = FileObjectFactory()
data = {
'avatar_id': str(file_object.id),
}
self.assertEqual(u.avatar, None)
self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(api_settings.JWT_AUTH_HEADER_PREFIX, token))
response = self.client.post(url, data=data, format='json')
u = User.objects.get(username=u.username)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertNotEqual(u.avatar, None)
| 31.889474 | 110 | 0.588546 | 679 | 6,059 | 5.083947 | 0.138439 | 0.052144 | 0.045191 | 0.070104 | 0.789977 | 0.785921 | 0.772596 | 0.756952 | 0.756952 | 0.754056 | 0 | 0.030783 | 0.281565 | 6,059 | 189 | 111 | 32.058201 | 0.762233 | 0.035814 | 0 | 0.678832 | 0 | 0 | 0.112222 | 0.013677 | 0 | 0 | 0 | 0 | 0.109489 | 1 | 0.043796 | false | 0.087591 | 0.051095 | 0 | 0.10219 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
6d40ed1df75da9a1fe6d591e79f3b5519fd483af | 203 | py | Python | atest/testdata/running/NonAsciiByteLibrary.py | phil-davis/robotframework | 4d4ce686cbe01e293bb86ea6ff34330e8c45fc43 | [
"ECL-2.0",
"Apache-2.0"
] | 7,073 | 2015-01-01T17:19:16.000Z | 2022-03-31T22:01:29.000Z | atest/testdata/running/NonAsciiByteLibrary.py | phil-davis/robotframework | 4d4ce686cbe01e293bb86ea6ff34330e8c45fc43 | [
"ECL-2.0",
"Apache-2.0"
] | 2,412 | 2015-01-02T09:29:05.000Z | 2022-03-31T13:10:46.000Z | atest/testdata/running/NonAsciiByteLibrary.py | phil-davis/robotframework | 4d4ce686cbe01e293bb86ea6ff34330e8c45fc43 | [
"ECL-2.0",
"Apache-2.0"
] | 2,298 | 2015-01-03T02:47:15.000Z | 2022-03-31T02:00:16.000Z | def in_exception():
raise Exception(b'hyv\xe4')
def in_return_value():
return b'ty\xf6paikka'
def in_message():
print(b'\xe4iti')
def in_multiline_message():
print(b'\xe4iti\nis\xe4')
| 16.916667 | 31 | 0.679803 | 31 | 203 | 4.258065 | 0.516129 | 0.151515 | 0.19697 | 0.287879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.029412 | 0.162562 | 203 | 11 | 32 | 18.454545 | 0.747059 | 0 | 0 | 0 | 0 | 0 | 0.20197 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0.125 | 0.625 | 0.25 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
6d626467234f483a46d2a52448d2237f5550ded4 | 247 | py | Python | tests/test_fw.py | alphatwirl/atdelphes | c3a5fd235a2424c879d6e0b1c0ad4dd198d818bf | [
"BSD-3-Clause"
] | null | null | null | tests/test_fw.py | alphatwirl/atdelphes | c3a5fd235a2424c879d6e0b1c0ad4dd198d818bf | [
"BSD-3-Clause"
] | null | null | null | tests/test_fw.py | alphatwirl/atdelphes | c3a5fd235a2424c879d6e0b1c0ad4dd198d818bf | [
"BSD-3-Clause"
] | null | null | null | # Tai Sakuma <tai.sakuma@gmail.com>
from atdelphes import AtDelphes
##__________________________________________________________________||
def test_init():
AtDelphes()
##__________________________________________________________________||
| 22.454545 | 70 | 0.838057 | 14 | 247 | 5.285714 | 0.714286 | 0.243243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08502 | 247 | 10 | 71 | 24.7 | 0.327434 | 0.684211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
ed9a2f0810efafd86dbf55f60481d6b9c36d9306 | 1,590 | py | Python | util/sort.py | glomerulus-lab/nonnegative_connectome | a52e417df85cb680e2abdb0459750697d8a67c10 | [
"MIT"
] | null | null | null | util/sort.py | glomerulus-lab/nonnegative_connectome | a52e417df85cb680e2abdb0459750697d8a67c10 | [
"MIT"
] | null | null | null | util/sort.py | glomerulus-lab/nonnegative_connectome | a52e417df85cb680e2abdb0459750697d8a67c10 | [
"MIT"
] | null | null | null | import numpy as np
import collections
import math
def sort_vals(key, vals):
'''
Returns sorted lists in ascending order with entries that remain paired by index, where key = log10(key).
Parameters:
key (list): list of values to be sorted on (act as dictionary key)
vals (list): list of values to be sorted according to their corresponding key
'''
dict_sort = {}
# Create a dictionary, where key = keys and vals = corresponding key's value
for x in range(len(key)):
key[x] = math.log10(key[x])
dict_sort[key[x]]= [vals[x]]
# Sort dict by order of keys
dict_sort = collections.OrderedDict(sorted(dict_sort.items()))
key.sort()
# Update vals to match sorted order
for x in range(len(key)):
vals[x] = dict_sort[key[x]][0]
return key, vals
def sort_vals2(key, vals):
'''
Returns sorted lists in ascending order with entries that remain paired by index.
Parameters:
key (list): list of values to be sorted on (act as dictionary key)
vals (list): list of values to be sorted according to their corresponding key
'''
dict_sort = {}
# Create a dictionary, where key = keys and vals = corresponding key's value
for x in range(len(key)):
key[x] = key[x]
dict_sort[key[x]]= [vals[x]]
# Sort dict by order of keys
dict_sort = collections.OrderedDict(sorted(dict_sort.items()))
key.sort()
# Update vals to match sorted order
for x in range(len(key)):
vals[x] = dict_sort[key[x]][0]
return key, vals | 31.176471 | 109 | 0.638994 | 240 | 1,590 | 4.183333 | 0.229167 | 0.079681 | 0.039841 | 0.063745 | 0.910359 | 0.910359 | 0.910359 | 0.910359 | 0.910359 | 0.910359 | 0 | 0.005957 | 0.261006 | 1,590 | 51 | 110 | 31.176471 | 0.848511 | 0.498113 | 0 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.086957 | false | 0 | 0.130435 | 0 | 0.304348 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
eda423a6bfba426167c82608a7665895d0a702df | 7,402 | py | Python | scripts/irods/test/test_experimental_parallel_replication.py | JustinKyleJames/irods | 59e9db75200e95796ec51ec20eb3b185d9e4b5f5 | [
"BSD-3-Clause"
] | 333 | 2015-01-15T15:42:29.000Z | 2022-03-19T19:16:15.000Z | scripts/irods/test/test_experimental_parallel_replication.py | JustinKyleJames/irods | 59e9db75200e95796ec51ec20eb3b185d9e4b5f5 | [
"BSD-3-Clause"
] | 3,551 | 2015-01-02T19:55:40.000Z | 2022-03-31T21:24:56.000Z | scripts/irods/test/test_experimental_parallel_replication.py | JustinKyleJames/irods | 59e9db75200e95796ec51ec20eb3b185d9e4b5f5 | [
"BSD-3-Clause"
] | 148 | 2015-01-31T16:13:46.000Z | 2022-03-23T20:23:43.000Z | from __future__ import print_function
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import os
from .. import lib
from . import session
class TestParallelReplication(session.make_sessions_mixin([], []), unittest.TestCase):
def setUp(self):
super(TestParallelReplication, self).setUp()
with session.make_session_for_existing_admin() as admin:
admin.assert_icommand(['iadmin', "mkresc", "testResc", 'unixfilesystem', lib.get_hostname() + ":" + "/tmp/irods/testResc"], 'STDOUT_SINGLELINE', 'unixfilesystem')
admin.assert_icommand(['iadmin', "mkresc", "anotherResc", 'unixfilesystem', lib.get_hostname() + ":" + "/tmp/irods/anotherResc"], 'STDOUT_SINGLELINE', 'unixfilesystem')
admin.assert_icommand(['iadmin', "mkuser", "alice", 'rodsuser'])
admin.assert_icommand(['iadmin', "moduser", "alice", 'password', 'apass'])
def tearDown(self):
super(TestParallelReplication, self).tearDown()
with session.make_session_for_existing_admin() as admin:
admin.assert_icommand(['iadmin', "rmresc", "testResc"])
admin.assert_icommand(['iadmin', "rmresc", "anotherResc"])
admin.assert_icommand(['iadmin', "rmuser", "alice"])
def test_replicate_object(self):
with session.make_session_for_existing_admin() as admin:
try:
file_name = 'test_replicate_object'
lib.make_file(file_name, 1024)
admin.assert_icommand(['iput', '-f', file_name])
admin.assert_icommand(['ils', '-l'], 'STDOUT_SINGLELINE', file_name)
pwd, _, _ = admin.run_icommand(['ipwd'])
pwd = pwd.rstrip()
logical_path = os.path.join(pwd, file_name)
endpoint = 'replicate'
options = """{{"logical_path" : "{lp}",
"source_resource" : "{src}",
"destination_resource" : "{dst}" }}""".format(lp = logical_path, src = "demoResc", dst = "testResc")
_, _ = lib.execute_command(['irods_api_test_harness', options, endpoint])
admin.assert_icommand(['ils', '-l', logical_path], 'STDOUT_SINGLELINE', 'testResc')
admin.assert_icommand(['irm', '-f', logical_path])
finally:
os.remove(file_name)
def test_replicate_object_with_admin_mode(self):
logical_path = ""
file_name = 'test_replicate_object_with_admin_mode'
try:
lib.make_file(file_name, 1024)
with session.make_session_for_existing_user('alice', 'apass', lib.get_hostname(), 'tempZone') as alice:
alice.assert_icommand(['iput', '-f', file_name])
alice.assert_icommand(['ils', '-l'], 'STDOUT_SINGLELINE', file_name)
pwd, _, _ = alice.run_icommand(['ipwd'])
print(pwd)
pwd = pwd.rstrip()
logical_path = os.path.join(pwd, file_name)
endpoint = 'replicate'
options = """{{"logical_path" : "{lp}",
"admin_mode" : true,
"source_resource" : "{src}",
"destination_resource" : "{dst}" }}""".format(lp = logical_path, src = "demoResc", dst = "testResc")
_, _ = lib.execute_command(['irods_api_test_harness', options, endpoint])
with session.make_session_for_existing_user('alice', 'apass', lib.get_hostname(), 'tempZone') as alice:
alice.assert_icommand(['ils', '-l', logical_path], 'STDOUT_SINGLELINE', 'testResc')
finally:
os.remove(file_name)
with session.make_session_for_existing_user('alice', 'apass', lib.get_hostname(), 'tempZone') as alice:
alice.assert_icommand(['irm', '-f', logical_path])
def test_update_single_replica(self):
with session.make_session_for_existing_admin() as admin:
logical_path = ""
try:
file_name = 'test_replicate_object'
lib.make_file(file_name, 1024)
pwd, _, _ = admin.run_icommand(['ipwd'])
pwd = pwd.rstrip()
logical_path = os.path.join(pwd, file_name)
admin.assert_icommand(['iput', '-f', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
admin.assert_icommand(['irepl', '-R', 'testResc', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
admin.assert_icommand(['iput', '-f', '-n', '0', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
endpoint = 'replicate'
options = """{{"logical_path" : "{lp}",
"update_single_replica" : true,
"source_resource" : "{src}",
"destination_resource" : "{dst}" }}""".format(lp = logical_path, src = "demoResc", dst = "testResc")
_, _ = lib.execute_command(['irods_api_test_harness', options, endpoint])
out, _, _ = admin.run_icommand(['ils', '-l', logical_path])
print('OUTPUT: '+out)
assert 2 == out.count('&')
finally:
admin.assert_icommand(['irm', '-f', logical_path])
os.remove(file_name)
def test_update_all_replicas(self):
with session.make_session_for_existing_admin() as admin:
logical_path = ""
try:
file_name = 'test_replicate_object'
lib.make_file(file_name, 1024)
pwd, _, _ = admin.run_icommand(['ipwd'])
pwd = pwd.rstrip()
logical_path = os.path.join(pwd, file_name)
admin.assert_icommand(['iput', '-f', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
admin.assert_icommand(['irepl', '-R', 'testResc', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
admin.assert_icommand(['irepl', '-R', 'anotherResc', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
admin.assert_icommand(['iput', '-f', '-n', '0', file_name])
admin.assert_icommand(['ils', '-l', file_name], 'STDOUT_SINGLELINE', file_name)
endpoint = 'replicate'
options = """{{"logical_path" : "{lp}",
"update_all_replicas" : true,
"source_resource" : "{src}"}}""".format(lp = logical_path, src = "demoResc")
_, _ = lib.execute_command(['irods_api_test_harness', options, endpoint])
out, _, _ = admin.run_icommand(['ils', '-l', logical_path])
print('OUTPUT: '+out)
assert 3 == out.count('&')
finally:
admin.assert_icommand(['irm', '-f', logical_path])
os.remove(file_name)
| 48.064935 | 181 | 0.549041 | 738 | 7,402 | 5.188347 | 0.143631 | 0.085662 | 0.133978 | 0.074432 | 0.830504 | 0.805171 | 0.741708 | 0.7041 | 0.7041 | 0.662053 | 0 | 0.004487 | 0.307484 | 7,402 | 153 | 182 | 48.379085 | 0.742489 | 0 | 0 | 0.661157 | 0 | 0 | 0.239022 | 0.043237 | 0 | 0 | 0 | 0 | 0.272727 | 1 | 0.049587 | false | 0.033058 | 0.057851 | 0 | 0.115702 | 0.033058 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
edbbc2912e554d914ae2bf6950d6455e67afdc49 | 83 | py | Python | la/farray/__init__.py | fhal/la | 5f537345ec7fd627fa4bf16cab3a3f4d5a72800c | [
"BSD-2-Clause"
] | 1 | 2015-01-30T19:49:19.000Z | 2015-01-30T19:49:19.000Z | la/farray/__init__.py | fhal/la | 5f537345ec7fd627fa4bf16cab3a3f4d5a72800c | [
"BSD-2-Clause"
] | null | null | null | la/farray/__init__.py | fhal/la | 5f537345ec7fd627fa4bf16cab3a3f4d5a72800c | [
"BSD-2-Clause"
] | null | null | null |
from misc import *
from normalize import *
from group import *
from move import *
| 13.833333 | 23 | 0.746988 | 12 | 83 | 5.166667 | 0.5 | 0.483871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.204819 | 83 | 5 | 24 | 16.6 | 0.939394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
edff1bdffc93a45f3847e97a796b1ad054460b71 | 94 | py | Python | color_contrast_calc/const/__init__.py | nico-hn/color_contrast_calc_py | 92cf9eecbd8e5d000f284ec786103cb719df6026 | [
"MIT"
] | 2 | 2020-10-01T11:50:30.000Z | 2020-10-11T20:59:06.000Z | color_contrast_calc/const/__init__.py | nico-hn/color_contrast_calc_py | 92cf9eecbd8e5d000f284ec786103cb719df6026 | [
"MIT"
] | null | null | null | color_contrast_calc/const/__init__.py | nico-hn/color_contrast_calc_py | 92cf9eecbd8e5d000f284ec786103cb719df6026 | [
"MIT"
] | 1 | 2019-06-18T02:08:06.000Z | 2019-06-18T02:08:06.000Z | '''Define constants for some color properties.
'''
from . import luminance
from . import rgb
| 15.666667 | 46 | 0.734043 | 12 | 94 | 5.75 | 0.833333 | 0.289855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170213 | 94 | 5 | 47 | 18.8 | 0.884615 | 0.457447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
610743f59dc87544360d9e2e361fd21c9ec3baaf | 25,474 | py | Python | pythonx/tests/test_replace.py | ColinKennedy/vim-python-function-expander | 7fbaac0bdb6316177c85284052694175a2819638 | [
"MIT"
] | 20 | 2018-11-05T01:54:13.000Z | 2021-11-21T22:36:52.000Z | pythonx/tests/test_replace.py | ColinKennedy/vim-python-function-expander | 7fbaac0bdb6316177c85284052694175a2819638 | [
"MIT"
] | 3 | 2018-11-05T18:54:46.000Z | 2021-03-06T12:14:01.000Z | pythonx/tests/test_replace.py | ColinKennedy/vim-python-function-expander | 7fbaac0bdb6316177c85284052694175a2819638 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''A series of tests to make sure unused args are deleted correctly.'''
# IMPORT STANDARD LIBRARIES
import textwrap
import unittest
# IMPORT 'LOCAL' LIBRARIES
from python_function_expander.trimmer import trimmer
class _Common(unittest.TestCase):
'''A base class that is used to save code across multiple test cases.'''
@staticmethod
def _acquire_cursor(text):
'''Get the cursor in some text and remove the cursor marker.
Args:
text (str): The code to find a cursor for.
Returns:
tuple[str, tuple[int, int]]:
The modified code, followed by the row and column that the cursor
was found in.
'''
lines = text.split('\n')
for row, line in enumerate(lines):
try:
index = line.index('|')
except ValueError:
continue
if line[index + 2] == '|':
lines[row] = line.replace('|', '')
return ('\n'.join(lines), (row + 1, index))
raise ValueError('No cursor was found.')
def _compare(self, expected, code):
'''Check that the given code works the way we expect.
Args:
expected (str): What (ideally) should be the output of `code` after
unused arguments have beem trimmed.
code (str): The code to process.
'''
(code, (row, column)) = self._acquire_cursor(code)
output, call = trimmer.get_trimmed_keywords(code, row, column)
# raise ValueError(expected)
# raise ValueError(code)
# raise ValueError(output)
for index, (char1, char2) in enumerate(zip(expected, output)):
if char1 != char2:
raise ValueError(index, char1, char2, output[:index + 1], expected[:index + 1])
# raise ValueError(output)
self.assertEqual(expected, output)
class RegexTrim(_Common):
'''A TestCase that checks to make sure unused args are deleted correctly.'''
def test_single_line_001(self):
'''Remove unused arguments even if the cursor isn't directly on one.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
foo(bar, |f|izz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_single_line_002(self):
'''Remove unused arguments even if the cursor isn't directly on one.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
foo(bar, |f|izz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_single_line_003(self):
'''Remove unused arguments even when the cursor is on the start of the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
foo|(|bar, fizz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_single_line_004(self):
'''Remove unused arguments even when the cursor is not in the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
f|o|o(bar, fizz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_multiline_001(self):
'''Test to make sure that the a basic trimmer function works.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
foo(
b|a|r,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_multiline_002(self):
'''Remove unused arguments and preserve the user's whitespace.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
foo(
bar,
fizz,
another=8,
|t|hing='tt'
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
foo(
bar,
fizz,
thing='tt'
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_multiline_003(self):
'''Test to make sure that the a basic trimmer function works.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
b|a|r,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_001(self):
'''Replace text even when the cursor is outside of the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
thing=None,
another=9,
|)|
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_002(self):
'''Replace text even when the cursor is outside of the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo|(|
bar,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_003(self):
'''Replace text even when the cursor is on the edge of a line.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
thing=None|,|
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_004(self):
'''Replace text even when the cursor is in whitespace.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
| | thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_no_match_001(self):
'''Don't remove arguments if there are none to remove.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
thing=None,
another=9,
)
os|.|path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')'''
)
self._compare(expected, code)
def test_no_match_002(self):
'''Don't remove arguments if there are none to remove.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
thing=None,
another=9,
)
|a|
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
foo(
bar,
fizz,
thing=None,
another=9,
)
a
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
class AssignmentTrim(_Common):
def test_single_line_001(self):
'''Remove unused arguments even if the cursor isn't directly on one.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
thing = foo(bar, |f|izz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
thing = foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_single_line_002(self):
'''Remove unused arguments even if the cursor isn't directly on one.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
obj = foo(bar, |f|izz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
obj = foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_single_line_003(self):
'''Remove unused arguments even when the cursor is on the start of the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
obj = foo|(|bar, fizz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
obj = foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_single_line_004(self):
'''Remove unused arguments even when the cursor is not in the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
obj = f|o|o(bar, fizz, thing=None, another=9)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
stuff('asfd')
obj = foo(bar, fizz, another=9)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_multiline_001(self):
'''Test to make sure that the a basic trimmer function works.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
obj = foo(
b|a|r,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
obj = foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_multiline_002(self):
'''Remove unused arguments and preserve the user's whitespace.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
obj = foo(
bar,
fizz,
another=8,
|t|hing='tt'
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
obj = foo(
bar,
fizz,
thing='tt'
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_multiline_003(self):
'''Test to make sure that the a basic trimmer function works.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
b|a|r,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_001(self):
'''Replace text even when the cursor is outside of the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
thing=None,
another=9,
|)|
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_002(self):
'''Replace text even when the cursor is outside of the function.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo|(|
bar,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_003(self):
'''Replace text even when the cursor is on the edge of a line.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
thing=None|,|
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_fringe_004(self):
'''Replace text even when the cursor is in whitespace.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
| | thing=None,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
another=9,
)
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
def test_no_match_001(self):
'''Don't remove arguments if there are none to remove.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
thing=None,
another=9,
)
os|.|path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
thing=None,
another=9,
)
os.path.join('asdf', 'asdf')'''
)
self._compare(expected, code)
def test_no_match_002(self):
'''Don't remove arguments if there are none to remove.'''
code = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
thing=None,
another=9,
)
|a|
os.path.join('asdf', 'asdf')
'''
)
expected = textwrap.dedent(
'''\
import os
def foo(bar, fizz, thing=None, another=8):
pass
variant = 'asdf'
obj = foo(
bar,
fizz,
thing=None,
another=9,
)
a
os.path.join('asdf', 'asdf')
'''
)
self._compare(expected, code)
class FailedCases(_Common):
'''A series of failures that came up in production.'''
def test_regex_failure_001(self):
'''Run a test that was related to a regex parser error.'''
code = textwrap.dedent(
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# IMPORT STANDARD LIBRARIES
import argparse
def main():
'''Run the main execution of the current script.'''
parser = argparse.ArgumentParser(
prog=None,
usage=None,
description='asdfasdfasfd',
epi|l|og=None,
version='1.0.0',
parents=[],
formatter_class=HelpFormatter,
prefix_chars='asfasdfsdf',
fromfile_prefix_chars=None,
argument_default=None,
conflict_handler='error',
add_help=True,
)
if __name__ == '__main__':
main()
"""
)
expected = textwrap.dedent(
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# IMPORT STANDARD LIBRARIES
import argparse
def main():
'''Run the main execution of the current script.'''
parser = argparse.ArgumentParser(
description='asdfasdfasfd',
version='1.0.0',
prefix_chars='asfasdfsdf',
)
if __name__ == '__main__':
main()
"""
)
self._compare(expected, code)
| 23.413603 | 95 | 0.408338 | 2,361 | 25,474 | 4.350275 | 0.086404 | 0.057249 | 0.09152 | 0.147989 | 0.84909 | 0.84909 | 0.84909 | 0.846656 | 0.839061 | 0.839061 | 0 | 0.015315 | 0.482217 | 25,474 | 1,087 | 96 | 23.435143 | 0.763381 | 0.100769 | 0 | 0.569149 | 0 | 0 | 0.004163 | 0 | 0 | 0 | 0 | 0 | 0.005319 | 1 | 0.154255 | false | 0 | 0.015957 | 0 | 0.196809 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
610ac388a7111c7041119267e56e34acff904b9a | 34 | py | Python | providers/__init__.py | histofyi/actions.histo.fyi | 77be1cd3f0f6990dd542995795d1fd7b6b4fec70 | [
"MIT"
] | null | null | null | providers/__init__.py | histofyi/actions.histo.fyi | 77be1cd3f0f6990dd542995795d1fd7b6b4fec70 | [
"MIT"
] | 4 | 2022-01-26T09:37:49.000Z | 2022-01-26T09:38:56.000Z | providers/__init__.py | histofyi/actions.histo.fyi | 77be1cd3f0f6990dd542995795d1fd7b6b4fec70 | [
"MIT"
] | null | null | null | from .innodb import innodbProvider | 34 | 34 | 0.882353 | 4 | 34 | 7.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.088235 | 34 | 1 | 34 | 34 | 0.967742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b65c9aa5cde80420be7b1e6464753108f666c6a6 | 70 | py | Python | model/__init__.py | trueto/mebert | 6ecb06bd4394dc8d1e6bd693b0eb175a8455eb93 | [
"Apache-2.0"
] | 37 | 2021-03-26T07:38:57.000Z | 2022-03-29T08:17:00.000Z | model/__init__.py | Decem-Y/medbert | 6ecb06bd4394dc8d1e6bd693b0eb175a8455eb93 | [
"Apache-2.0"
] | 4 | 2021-03-28T02:20:21.000Z | 2021-10-08T09:36:17.000Z | model/__init__.py | Decem-Y/medbert | 6ecb06bd4394dc8d1e6bd693b0eb175a8455eb93 | [
"Apache-2.0"
] | 3 | 2021-05-16T05:06:04.000Z | 2022-01-03T04:29:16.000Z | from .ner_model import NER_Model
from .classify_model import CLS_Model | 35 | 37 | 0.871429 | 12 | 70 | 4.75 | 0.5 | 0.280702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 70 | 2 | 37 | 35 | 0.904762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b66465527b89c8364bed2e217ee804b84c7ce9df | 195 | py | Python | utils/mixins.py | w4nd0/KMDB | 50defe78a60f52c6a6986b09650a56b6823941e7 | [
"MIT"
] | null | null | null | utils/mixins.py | w4nd0/KMDB | 50defe78a60f52c6a6986b09650a56b6823941e7 | [
"MIT"
] | null | null | null | utils/mixins.py | w4nd0/KMDB | 50defe78a60f52c6a6986b09650a56b6823941e7 | [
"MIT"
] | null | null | null | from rest_framework import mixins
from rest_framework.viewsets import GenericViewSet
class CreateUpdateViewSet(
mixins.UpdateModelMixin, mixins.CreateModelMixin, GenericViewSet
):
pass
| 21.666667 | 68 | 0.830769 | 19 | 195 | 8.421053 | 0.631579 | 0.1 | 0.2125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 195 | 8 | 69 | 24.375 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.166667 | 0.333333 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 6 |
b6867dbfaf743f553e73e639cb4a74f448320089 | 31 | py | Python | base/constants/__init__.py | mevlanaayas/Skywalker | 48174024d05538a69b5dd8eec2ed581da82ae286 | [
"MIT"
] | null | null | null | base/constants/__init__.py | mevlanaayas/Skywalker | 48174024d05538a69b5dd8eec2ed581da82ae286 | [
"MIT"
] | null | null | null | base/constants/__init__.py | mevlanaayas/Skywalker | 48174024d05538a69b5dd8eec2ed581da82ae286 | [
"MIT"
] | null | null | null | from .error_constants import *
| 15.5 | 30 | 0.806452 | 4 | 31 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fcc1ebbe0ca545e0bbef943455ba5f31ab640c46 | 417 | py | Python | views/area_media.py | Catsuko/Westward | 3c04df668f7e04ca45e622017ffa9dfe6d3c242c | [
"MIT"
] | 3 | 2019-12-22T22:44:43.000Z | 2020-02-11T11:14:10.000Z | views/area_media.py | Catsuko/Westward | 3c04df668f7e04ca45e622017ffa9dfe6d3c242c | [
"MIT"
] | null | null | null | views/area_media.py | Catsuko/Westward | 3c04df668f7e04ca45e622017ffa9dfe6d3c242c | [
"MIT"
] | null | null | null | class AreaMedia:
def with_area(self, area):
return self
def with_open_space(self, x, y):
return self
def with_wall(self, x, y):
return self
def with_actor(self, x, y, key):
return self
def with_ledge(self, x, y):
return self
def with_door(self, x, y):
return self
def with_effect(self, x, y, effect_description):
return self
| 17.375 | 52 | 0.582734 | 61 | 417 | 3.836066 | 0.295082 | 0.209402 | 0.333333 | 0.435897 | 0.393162 | 0.393162 | 0.393162 | 0 | 0 | 0 | 0 | 0 | 0.328537 | 417 | 23 | 53 | 18.130435 | 0.835714 | 0 | 0 | 0.466667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.466667 | false | 0 | 0 | 0.466667 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
fccfdb9ad6f4713f998de9469b9e1998bd39d623 | 24 | py | Python | File1.py | jacobxr/Python_test | e5baf6adf20f9e2335668d7d8bba4c9454fdc5dd | [
"Apache-2.0"
] | null | null | null | File1.py | jacobxr/Python_test | e5baf6adf20f9e2335668d7d8bba4c9454fdc5dd | [
"Apache-2.0"
] | null | null | null | File1.py | jacobxr/Python_test | e5baf6adf20f9e2335668d7d8bba4c9454fdc5dd | [
"Apache-2.0"
] | null | null | null | "This is file numbrr 1"
| 12 | 23 | 0.708333 | 5 | 24 | 3.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 0.208333 | 24 | 1 | 24 | 24 | 0.842105 | 0.875 | 0 | 0 | 0 | 0 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 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 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
fce0d24dd39264c9b263c5ad49bbf894c6e641b5 | 118 | py | Python | tests/conftest.py | mozkzki/mediafile-organizer | 3040b194b67857e456dd129546c483bf3b038c22 | [
"MIT"
] | null | null | null | tests/conftest.py | mozkzki/mediafile-organizer | 3040b194b67857e456dd129546c483bf3b038c22 | [
"MIT"
] | 48 | 2021-09-25T22:13:26.000Z | 2022-03-29T02:11:37.000Z | tests/conftest.py | mozkzki/template-python | a7a08a8ddca99e7103e7adacea621be82342e595 | [
"MIT"
] | null | null | null | import sys
import os
sys.path.append(
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../src/")
)
| 16.857143 | 76 | 0.677966 | 18 | 118 | 4.222222 | 0.5 | 0.236842 | 0.342105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118644 | 118 | 6 | 77 | 19.666667 | 0.730769 | 0 | 0 | 0 | 0 | 0 | 0.067797 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
fce2b3a8d8e934ef82f34ba285768ca52ffed1d1 | 95 | py | Python | basepair/helpers/__init__.py | basepair/basepair-python | ce0e9a549e8eede9e55dc47a36ed4e9532607cff | [
"MIT"
] | 2 | 2015-09-14T00:45:45.000Z | 2021-08-13T16:45:25.000Z | basepair/helpers/__init__.py | basepair/basepair-python | ce0e9a549e8eede9e55dc47a36ed4e9532607cff | [
"MIT"
] | 12 | 2020-07-22T19:09:56.000Z | 2022-01-20T16:35:43.000Z | basepair/helpers/__init__.py | basepair/basepair-python | ce0e9a549e8eede9e55dc47a36ed4e9532607cff | [
"MIT"
] | 1 | 2022-02-23T15:27:31.000Z | 2022-02-23T15:27:31.000Z | from .eprint import eprint
from .nice_print import NicePrint
from .set_filter import SetFilter
| 23.75 | 33 | 0.842105 | 14 | 95 | 5.571429 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.126316 | 95 | 3 | 34 | 31.666667 | 0.939759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0.666667 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
fce9d8024ee5357bce66d8f56988765b2aca060b | 311 | py | Python | api/swagger_server/models/__init__.py | Marcoror150/MSCS-Project | 18cf43df288d34b930ce0dd18dba67b41c4bd4c6 | [
"MIT"
] | null | null | null | api/swagger_server/models/__init__.py | Marcoror150/MSCS-Project | 18cf43df288d34b930ce0dd18dba67b41c4bd4c6 | [
"MIT"
] | 2 | 2019-12-28T05:31:10.000Z | 2021-06-02T03:24:49.000Z | api/swagger_server/models/__init__.py | Marcoror150/MSCS-Project | 18cf43df288d34b930ce0dd18dba67b41c4bd4c6 | [
"MIT"
] | null | null | null | # coding: utf-8
# flake8: noqa
from __future__ import absolute_import
# import models into model package
from swagger_server.models.accident import Accident
from swagger_server.models.api_response import ApiResponse
from swagger_server.models.data import Data
from swagger_server.models.vehicle import Vehicle
| 31.1 | 58 | 0.848875 | 44 | 311 | 5.772727 | 0.477273 | 0.173228 | 0.267717 | 0.362205 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007194 | 0.106109 | 311 | 9 | 59 | 34.555556 | 0.906475 | 0.189711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fceec967018d88a9231ebd77b6750fa0135d20fe | 169 | py | Python | lib/__init__.py | greymistcube/racing_game_ai | 7e5e6ec781eb3c98729d370cbcc0ab6ed053962f | [
"MIT"
] | null | null | null | lib/__init__.py | greymistcube/racing_game_ai | 7e5e6ec781eb3c98729d370cbcc0ab6ed053962f | [
"MIT"
] | null | null | null | lib/__init__.py | greymistcube/racing_game_ai | 7e5e6ec781eb3c98729d370cbcc0ab6ed053962f | [
"MIT"
] | null | null | null | import lib.common
from lib.core import Core
from lib.settings import Settings
from lib.display import Display
from lib.clock import Clock
from lib.events import Events
| 21.125 | 33 | 0.828402 | 28 | 169 | 5 | 0.321429 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136095 | 169 | 7 | 34 | 24.142857 | 0.958904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1e2c2e47d6de0aa12e7e5002b89532c08bb16efb | 29 | py | Python | python_src/success_baxter_tools/head/__init__.py | SUCCESS-MURI/success_baxter_tools | 5257805a37aee1d4f8ecb9901b670b4a870deb46 | [
"MIT"
] | 1 | 2020-08-29T09:44:21.000Z | 2020-08-29T09:44:21.000Z | python_src/success_baxter_tools/head/__init__.py | SUCCESS-MURI/success_baxter_tools | 5257805a37aee1d4f8ecb9901b670b4a870deb46 | [
"MIT"
] | null | null | null | python_src/success_baxter_tools/head/__init__.py | SUCCESS-MURI/success_baxter_tools | 5257805a37aee1d4f8ecb9901b670b4a870deb46 | [
"MIT"
] | null | null | null | from head_controller import * | 29 | 29 | 0.862069 | 4 | 29 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 29 | 1 | 29 | 29 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1e2d048fce405f5a972d6a7a1e1e49586cb89e33 | 1,707 | py | Python | composeml/tests/test_label_transforms/test_bin.py | flowersw/compose | d51a397988f4a9b78a489260b541d02d59a4d290 | [
"BSD-3-Clause"
] | 1 | 2021-04-22T00:48:21.000Z | 2021-04-22T00:48:21.000Z | composeml/tests/test_label_transforms/test_bin.py | flowersw/compose | d51a397988f4a9b78a489260b541d02d59a4d290 | [
"BSD-3-Clause"
] | 14 | 2021-03-04T19:27:33.000Z | 2022-03-07T01:00:50.000Z | composeml/tests/test_label_transforms/test_bin.py | flowersw/compose | d51a397988f4a9b78a489260b541d02d59a4d290 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
from pytest import raises
def test_bins(labels):
given_labels = labels.bin(2)
transform = given_labels.transforms[0]
assert transform['transform'] == 'bin'
assert transform['bins'] == 2
assert transform['quantiles'] is False
assert transform['labels'] is None
assert transform['right'] is True
answer = [
pd.Interval(157.5, 283.46, closed='right'),
pd.Interval(31.288, 157.5, closed='right'),
pd.Interval(157.5, 283.46, closed='right'),
pd.Interval(31.288, 157.5, closed='right'),
]
answer = pd.Categorical(answer, ordered=True)
labels = labels.assign(my_labeling_function=answer)
pd.testing.assert_frame_equal(given_labels, labels)
def test_quantile_bins(labels):
given_labels = labels.bin(2, quantiles=True)
transform = given_labels.transforms[0]
assert transform['transform'] == 'bin'
assert transform['bins'] == 2
assert transform['quantiles'] is True
assert transform['labels'] is None
assert transform['right'] is True
answer = [
pd.Interval(137.44, 283.46, closed='right'),
pd.Interval(31.538999999999998, 137.44, closed='right'),
pd.Interval(137.44, 283.46, closed='right'),
pd.Interval(31.538999999999998, 137.44, closed='right'),
]
answer = pd.Categorical(answer, ordered=True)
labels = labels.assign(my_labeling_function=answer)
pd.testing.assert_frame_equal(given_labels, labels)
def test_single_target(total_spent):
lt = total_spent.copy()
lt.target_columns.append('target_2')
match = 'must first select an individual target'
with raises(AssertionError, match=match):
lt.bin(2)
| 31.036364 | 64 | 0.674868 | 224 | 1,707 | 5.040179 | 0.276786 | 0.132861 | 0.069088 | 0.111603 | 0.806023 | 0.806023 | 0.806023 | 0.751107 | 0.751107 | 0.751107 | 0 | 0.078374 | 0.192736 | 1,707 | 54 | 65 | 31.611111 | 0.740929 | 0 | 0 | 0.619048 | 0 | 0 | 0.09256 | 0 | 0 | 0 | 0 | 0 | 0.309524 | 1 | 0.071429 | false | 0 | 0.047619 | 0 | 0.119048 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1e8f94d20c0c05ff0570e7c6783b925e57233774 | 24,387 | py | Python | src/mcmc/all_params/burn_in_colour_allparams.py | MehnaazAsad/RESOLVE_Statistics | a7bdcc896ca2c51ab3417c46f07efe8c16825597 | [
"MIT"
] | 1 | 2020-02-22T02:18:55.000Z | 2020-02-22T02:18:55.000Z | src/mcmc/all_params/burn_in_colour_allparams.py | MehnaazAsad/RESOLVE_Statistics | a7bdcc896ca2c51ab3417c46f07efe8c16825597 | [
"MIT"
] | null | null | null | src/mcmc/all_params/burn_in_colour_allparams.py | MehnaazAsad/RESOLVE_Statistics | a7bdcc896ca2c51ab3417c46f07efe8c16825597 | [
"MIT"
] | 1 | 2020-02-22T02:27:49.000Z | 2020-02-22T02:27:49.000Z | """
{This script reads in the raw chain and plots times series for all parameters
in order to identify the burn-in}
"""
# Libs
from cosmo_utils.utils import work_paths as cwpaths
import matplotlib.pyplot as plt
from matplotlib import rc
import matplotlib
import pandas as pd
import numpy as np
import math
import os
__author__ = '{Mehnaaz Asad}'
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']},size=15)
rc('text', usetex=True)
matplotlib.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"]
rc('axes', linewidth=2)
rc('xtick.major', width=2, size=7)
rc('ytick.major', width=2, size=7)
def find_nearest(array, value):
"""Finds the element in array that is closest to the value
Args:
array (numpy.array): Array of values
value (numpy.float): Value to find closest match to
Returns:
numpy.float: Closest match found in array
"""
array = np.asarray(array)
idx = (np.abs(array - value)).argmin()
return array[idx]
dict_of_paths = cwpaths.cookiecutter_paths()
path_to_raw = dict_of_paths['raw_dir']
path_to_proc = dict_of_paths['proc_dir']
path_to_interim = dict_of_paths['int_dir']
path_to_figures = dict_of_paths['plot_dir']
survey = 'eco'
mf_type = 'smf'
quenching = 'halo'
nwalkers = 100
run = 33
if mf_type == 'smf':
path_to_proc = path_to_proc + 'smhm_colour_run{0}/'.format(run)
else:
path_to_proc = path_to_proc + 'bmhm_run3/'
chain_fname = path_to_proc + 'mcmc_{0}_colour_raw.txt'.format(survey)
if quenching == 'hybrid':
emcee_table = pd.read_csv(chain_fname, header=None, comment='#',
names=['Mhalo_c', 'Mstar_c', 'mlow_slope', 'mhigh_slope', 'scatter',
'Mstar_q','Mhalo_q','mu','nu'], sep='\s+')
for idx,row in enumerate(emcee_table.values):
## For cases where 5 params on one line and 3 on the next
if np.isnan(row)[6] == True and np.isnan(row)[5] == False:
mhalo_q_val = emcee_table.values[idx+1][0]
mu_val = emcee_table.values[idx+1][1]
nu_val = emcee_table.values[idx+1][2]
row[6] = mhalo_q_val
row[7] = mu_val
row[8] = nu_val
## For cases where 4 params on one line, 4 on the next and 1 on the
## third line (numbers in scientific notation unlike case above)
elif np.isnan(row)[4] == True and np.isnan(row)[3] == False:
scatter_val = emcee_table.values[idx+1][0]
mstar_q_val = emcee_table.values[idx+1][1]
mhalo_q_val = emcee_table.values[idx+1][2]
mu_val = emcee_table.values[idx+1][3]
nu_val = emcee_table.values[idx+2][0]
row[4] = scatter_val
row[5] = mstar_q_val
row[6] = mhalo_q_val
row[7] = mu_val
row[8] = nu_val
emcee_table = emcee_table.dropna(axis='index', how='any').\
reset_index(drop=True)
elif quenching == 'halo':
emcee_table = pd.read_csv(chain_fname, header=None, comment='#',
names=['Mhalo_c', 'Mstar_c', 'mlow_slope', 'mhigh_slope', 'scatter',
'Mh_qc','Mh_qs','mu_c','mu_s'], sep='\s+')
for idx,row in enumerate(emcee_table.values):
## For cases where 5 params on one line and 3 on the next
if np.isnan(row)[6] == True and np.isnan(row)[5] == False:
mhalo_qs_val = emcee_table.values[idx+1][0]
mu_c_val = emcee_table.values[idx+1][1]
mu_s_val = emcee_table.values[idx+1][2]
row[6] = mhalo_qs_val
row[7] = mu_c_val
row[8] = mu_s_val
## For cases where 4 params on one line, 4 on the next and 1 on the
## third line (numbers in scientific notation unlike case above)
elif np.isnan(row)[4] == True and np.isnan(row)[3] == False:
scatter_val = emcee_table.values[idx+1][0]
mhalo_qc_val = emcee_table.values[idx+1][1]
mhalo_qs_val = emcee_table.values[idx+1][2]
mu_c_val = emcee_table.values[idx+1][3]
mu_s_val = emcee_table.values[idx+2][0]
row[4] = scatter_val
row[5] = mhalo_qc_val
row[6] = mhalo_qs_val
row[7] = mu_c_val
row[8] = mu_s_val
emcee_table = emcee_table.dropna(axis='index', how='any').\
reset_index(drop=True)
chi2_fname = path_to_proc + '{0}_colour_chi2.txt'.format(survey)
chi2_df = pd.read_csv(chi2_fname,header=None,names=['chisquared'])
# chi2 = np.log10(chi2_df.chisquared.values)
emcee_table['chi2'] = chi2_df['chisquared']
# Each chunk is now a step and within each chunk, each row is a walker
# Different from what it used to be where each chunk was a walker and
# within each chunk, each row was a step
walker_id_arr = np.zeros(len(emcee_table))
iteration_id_arr = np.zeros(len(emcee_table))
counter_wid = 0
counter_stepid = 0
for idx,row in emcee_table.iterrows():
counter_wid += 1
if idx % nwalkers == 0:
counter_stepid += 1
counter_wid = 1
walker_id_arr[idx] = counter_wid
iteration_id_arr[idx] = counter_stepid
id_data = {'walker_id': walker_id_arr, 'iteration_id': iteration_id_arr}
id_df = pd.DataFrame(id_data, index=emcee_table.index)
emcee_table = emcee_table.assign(**id_df)
grps = emcee_table.groupby('iteration_id')
grp_keys = grps.groups.keys()
if quenching == 'hybrid':
Mhalo_c = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
Mstar_c = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mlow_slope = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mhigh_slope = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
scatter = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
Mstar_q = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
Mhalo_q = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mu = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
nu = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
chi2 = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
for idx,key in enumerate(grp_keys):
group = grps.get_group(key)
Mhalo_c_mean = np.mean(group.Mhalo_c.values)
Mhalo_c_std = np.std(group.Mhalo_c.values)
Mhalo_c[0][idx] = Mhalo_c_mean
Mhalo_c[1][idx] = Mhalo_c_std
Mstar_c_mean = np.mean(group.Mstar_c.values)
Mstar_c_std = np.std(group.Mstar_c.values)
Mstar_c[0][idx] = Mstar_c_mean
Mstar_c[1][idx] = Mstar_c_std
mlow_slope_mean = np.mean(group.mlow_slope.values)
mlow_slope_std = np.std(group.mlow_slope.values)
mlow_slope[0][idx] = mlow_slope_mean
mlow_slope[1][idx] = mlow_slope_std
mhigh_slope_mean = np.mean(group.mhigh_slope.values)
mhigh_slope_std = np.std(group.mhigh_slope.values)
mhigh_slope[0][idx] = mhigh_slope_mean
mhigh_slope[1][idx] = mhigh_slope_std
scatter_mean = np.mean(group.scatter.values)
scatter_std = np.std(group.scatter.values)
scatter[0][idx] = scatter_mean
scatter[1][idx] = scatter_std
Mstar_q_mean = np.mean(group.Mstar_q.values)
Mstar_q_std = np.std(group.Mstar_q.values)
Mstar_q[0][idx] = Mstar_q_mean
Mstar_q[1][idx] = Mstar_q_std
Mhalo_q_mean = np.mean(group.Mhalo_q.values)
Mhalo_q_std = np.std(group.Mhalo_q.values)
Mhalo_q[0][idx] = Mhalo_q_mean
Mhalo_q[1][idx] = Mhalo_q_std
mu_mean = np.mean(group.mu.values)
mu_std = np.std(group.mu.values)
mu[0][idx] = mu_mean
mu[1][idx] = mu_std
nu_mean = np.mean(group.nu.values)
nu_std = np.std(group.nu.values)
nu[0][idx] = nu_mean
nu[1][idx] = nu_std
chi2_mean = np.mean(group.chi2.values)
chi2_std = np.std(group.chi2.values)
chi2[0][idx] = chi2_mean
chi2[1][idx] = chi2_std
Mhalo_c_fid = 12.35
Mstar_c_fid = 10.72
mlow_slope_fid = 0.44
mhigh_slope_fid = 0.57
scatter_fid = 0.15
behroozi10_param_vals = [Mhalo_c_fid, Mstar_c_fid, mlow_slope_fid, \
mhigh_slope_fid, scatter_fid]
Mstar_q_fid = 10.5 # Msun/h
Mh_q_fid = 13.76 # Msun/h
mu_fid = 0.69
nu_fid = 0.15
zumandelbaum_param_vals = [Mstar_q_fid, Mh_q_fid, mu_fid, nu_fid]
grp_keys = list(grp_keys)
fig1, (ax1, ax2, ax3, ax4, ax5, ax6, ax7, ax8, ax9, ax10) = plt.subplots(10, 1,
sharex=True, figsize=(10,10))
ax1.plot(grp_keys, Mhalo_c[0],c='#941266',ls='--', marker='o')
ax1.axhline(behroozi10_param_vals[0],color='lightgray')
ax2.plot(grp_keys, Mstar_c[0], c='#941266',ls='--', marker='o')
ax2.axhline(behroozi10_param_vals[1],color='lightgray')
ax3.plot(grp_keys, mlow_slope[0], c='#941266',ls='--', marker='o')
ax3.axhline(behroozi10_param_vals[2],color='lightgray')
ax4.plot(grp_keys, mhigh_slope[0], c='#941266',ls='--', marker='o')
ax4.axhline(behroozi10_param_vals[3],color='lightgray')
ax5.plot(grp_keys, scatter[0], c='#941266',ls='--', marker='o')
ax5.axhline(behroozi10_param_vals[4],color='lightgray')
ax6.plot(grp_keys, Mstar_q[0],c='#941266',ls='--', marker='o')
ax6.axhline(zumandelbaum_param_vals[0],color='lightgray')
ax7.plot(grp_keys, Mhalo_q[0], c='#941266',ls='--', marker='o')
ax7.axhline(zumandelbaum_param_vals[1],color='lightgray')
ax8.plot(grp_keys, mu[0], c='#941266',ls='--', marker='o')
ax8.axhline(zumandelbaum_param_vals[2],color='lightgray')
ax9.plot(grp_keys, nu[0], c='#941266',ls='--', marker='o')
ax9.axhline(zumandelbaum_param_vals[3],color='lightgray')
ax10.plot(grp_keys, chi2[0], c='#941266',ls='--', marker='o')
ax1.fill_between(grp_keys, Mhalo_c[0]-Mhalo_c[1], Mhalo_c[0]+Mhalo_c[1],
alpha=0.3, color='#941266')
ax2.fill_between(grp_keys, Mstar_c[0]-Mstar_c[1], Mstar_c[0]+Mstar_c[1], \
alpha=0.3, color='#941266')
ax3.fill_between(grp_keys, mlow_slope[0]-mlow_slope[1], \
mlow_slope[0]+mlow_slope[1], alpha=0.3, color='#941266')
ax4.fill_between(grp_keys, mhigh_slope[0]-mhigh_slope[1], \
mhigh_slope[0]+mhigh_slope[1], alpha=0.3, color='#941266')
ax5.fill_between(grp_keys, scatter[0]-scatter[1], scatter[0]+scatter[1], \
alpha=0.3, color='#941266')
ax6.fill_between(grp_keys, Mstar_q[0]-Mstar_q[1], Mstar_q[0]+Mstar_q[1],
alpha=0.3, color='#941266')
ax7.fill_between(grp_keys, Mhalo_q[0]-Mhalo_q[1], Mhalo_q[0]+Mhalo_q[1], \
alpha=0.3, color='#941266')
ax8.fill_between(grp_keys, mu[0]-mu[1], mu[0]+mu[1], \
alpha=0.3, color='#941266')
ax9.fill_between(grp_keys, nu[0]-nu[1], nu[0]+nu[1], \
alpha=0.3, color='#941266')
ax10.fill_between(grp_keys, chi2[0]-chi2[1], chi2[0]+chi2[1], \
alpha=0.3, color='#941266')
ax1.set_ylabel(r"$\mathbf{log_{10}\ M_{1}}$")
ax2.set_ylabel(r"$\mathbf{log_{10}\ M_{*}}$")
ax3.set_ylabel(r"$\boldsymbol{\beta}$")
# ax4.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{\ \nu}$")
ax4.set_ylabel(r"$\boldsymbol{\delta}$")
# ax10.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{{\ \chi}^2}$")
ax5.set_ylabel(r"$\boldsymbol{\xi}$")
ax6.set_ylabel(r"$\mathbf{log_{10}\ M^{q}_{*}}$")
ax7.set_ylabel(r"$\mathbf{log_{10}\ M^{q}_{h}}$")
ax8.set_ylabel(r"$\boldsymbol{\mu}$")
# ax4.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{\ \nu}$")
ax9.set_ylabel(r"$\boldsymbol{\nu}$")
# ax10.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{{\ \chi}^2}$")
ax10.set_ylabel(r"$\boldsymbol{{\chi}^2}$")
# ax1.set_yscale('log')
# ax2.set_yscale('log')
ax1.annotate(behroozi10_param_vals[0], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax2.annotate(behroozi10_param_vals[1], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax3.annotate(behroozi10_param_vals[2], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax4.annotate(behroozi10_param_vals[3], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax5.annotate(behroozi10_param_vals[4], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax6.annotate(zumandelbaum_param_vals[0], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax7.annotate(zumandelbaum_param_vals[1], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax8.annotate(zumandelbaum_param_vals[2], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax9.annotate(zumandelbaum_param_vals[3], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
plt.xlabel(r"$\mathbf{iteration\ number}$")
plt.show()
elif quenching == 'halo':
Mhalo_c = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
Mstar_c = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mlow_slope = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mhigh_slope = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
scatter = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
Mh_qc = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
Mh_qs = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mu_c = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
mu_s = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
chi2 = [np.zeros(len(grp_keys)),np.zeros(len(grp_keys))]
for idx,key in enumerate(grp_keys):
group = grps.get_group(key)
Mhalo_c_mean = np.mean(group.Mhalo_c.values)
Mhalo_c_std = np.std(group.Mhalo_c.values)
Mhalo_c[0][idx] = Mhalo_c_mean
Mhalo_c[1][idx] = Mhalo_c_std
Mstar_c_mean = np.mean(group.Mstar_c.values)
Mstar_c_std = np.std(group.Mstar_c.values)
Mstar_c[0][idx] = Mstar_c_mean
Mstar_c[1][idx] = Mstar_c_std
mlow_slope_mean = np.mean(group.mlow_slope.values)
mlow_slope_std = np.std(group.mlow_slope.values)
mlow_slope[0][idx] = mlow_slope_mean
mlow_slope[1][idx] = mlow_slope_std
mhigh_slope_mean = np.mean(group.mhigh_slope.values)
mhigh_slope_std = np.std(group.mhigh_slope.values)
mhigh_slope[0][idx] = mhigh_slope_mean
mhigh_slope[1][idx] = mhigh_slope_std
scatter_mean = np.mean(group.scatter.values)
scatter_std = np.std(group.scatter.values)
scatter[0][idx] = scatter_mean
scatter[1][idx] = scatter_std
Mh_qc_mean = np.mean(group.Mh_qc.values)
Mh_qc_std = np.std(group.Mh_qc.values)
Mh_qc[0][idx] = Mh_qc_mean
Mh_qc[1][idx] = Mh_qc_std
Mh_qs_mean = np.mean(group.Mh_qs.values)
Mh_qs_std = np.std(group.Mh_qs.values)
Mh_qs[0][idx] = Mh_qs_mean
Mh_qs[1][idx] = Mh_qs_std
mu_c_mean = np.mean(group.mu_c.values)
mu_c_std = np.std(group.mu_c.values)
mu_c[0][idx] = mu_c_mean
mu_c[1][idx] = mu_c_std
mu_s_mean = np.mean(group.mu_s.values)
mu_s_std = np.std(group.mu_s.values)
mu_s[0][idx] = mu_s_mean
mu_s[1][idx] = mu_s_std
chi2_mean = np.mean(group.chi2.values)
chi2_std = np.std(group.chi2.values)
chi2[0][idx] = chi2_mean
chi2[1][idx] = chi2_std
#TODO modify plot making to add behroozi params
Mhalo_c_fid = 12.35
Mstar_c_fid = 10.72
mlow_slope_fid = 0.44
mhigh_slope_fid = 0.57
scatter_fid = 0.15
behroozi10_param_vals = [Mhalo_c_fid, Mstar_c_fid, mlow_slope_fid, \
mhigh_slope_fid, scatter_fid]
Mh_qc_fid = 12.2 # Msun/h
Mh_qs_fid = 12.17 # Msun/h
mu_c_fid = 0.38
mu_s_fid = 0.15
zumandelbaum_param_vals = [Mh_qc_fid, Mh_qs_fid, mu_c_fid, mu_s_fid]
grp_keys = list(grp_keys)
fig1, (ax1, ax2, ax3, ax4, ax5, ax6, ax7, ax8, ax9, ax10) = plt.subplots(10, 1,
sharex=True, figsize=(10,10))
ax1.plot(grp_keys, Mhalo_c[0],c='#941266',ls='--', marker='o')
ax1.axhline(behroozi10_param_vals[0],color='lightgray')
ax2.plot(grp_keys, Mstar_c[0], c='#941266',ls='--', marker='o')
ax2.axhline(behroozi10_param_vals[1],color='lightgray')
ax3.plot(grp_keys, mlow_slope[0], c='#941266',ls='--', marker='o')
ax3.axhline(behroozi10_param_vals[2],color='lightgray')
ax4.plot(grp_keys, mhigh_slope[0], c='#941266',ls='--', marker='o')
ax4.axhline(behroozi10_param_vals[3],color='lightgray')
ax5.plot(grp_keys, scatter[0], c='#941266',ls='--', marker='o')
ax5.axhline(behroozi10_param_vals[4],color='lightgray')
ax6.plot(grp_keys, Mh_qc[0],c='#941266',ls='--', marker='o')
ax6.axhline(zumandelbaum_param_vals[0],color='lightgray')
ax7.plot(grp_keys, Mh_qs[0], c='#941266',ls='--', marker='o')
ax7.axhline(zumandelbaum_param_vals[1],color='lightgray')
ax8.plot(grp_keys, mu_c[0], c='#941266',ls='--', marker='o')
ax8.axhline(zumandelbaum_param_vals[2],color='lightgray')
ax9.plot(grp_keys, mu_s[0], c='#941266',ls='--', marker='o')
ax9.axhline(zumandelbaum_param_vals[3],color='lightgray')
ax10.plot(grp_keys, chi2[0], c='#941266',ls='--', marker='o')
ax1.fill_between(grp_keys, Mhalo_c[0]-Mhalo_c[1], Mhalo_c[0]+Mhalo_c[1],
alpha=0.3, color='#941266')
ax2.fill_between(grp_keys, Mstar_c[0]-Mstar_c[1], Mstar_c[0]+Mstar_c[1], \
alpha=0.3, color='#941266')
ax3.fill_between(grp_keys, mlow_slope[0]-mlow_slope[1], \
mlow_slope[0]+mlow_slope[1], alpha=0.3, color='#941266')
ax4.fill_between(grp_keys, mhigh_slope[0]-mhigh_slope[1], \
mhigh_slope[0]+mhigh_slope[1], alpha=0.3, color='#941266')
ax5.fill_between(grp_keys, scatter[0]-scatter[1], scatter[0]+scatter[1], \
alpha=0.3, color='#941266')
ax6.fill_between(grp_keys, Mh_qc[0]-Mh_qc[1], Mh_qc[0]+Mh_qc[1],
alpha=0.3, color='#941266')
ax7.fill_between(grp_keys, Mh_qs[0]-Mh_qs[1], Mh_qs[0]+Mh_qs[1], \
alpha=0.3, color='#941266')
ax8.fill_between(grp_keys, mu_c[0]-mu_c[1], mu_c[0]+mu_c[1], \
alpha=0.3, color='#941266')
ax9.fill_between(grp_keys, mu_s[0]-mu_s[1], mu_s[0]+mu_s[1], \
alpha=0.3, color='#941266')
ax10.fill_between(grp_keys, chi2[0]-chi2[1], chi2[0]+chi2[1], \
alpha=0.3, color='#941266')
ax1.set_ylabel(r"$\mathbf{log_{10}\ M_{1}}$")
ax2.set_ylabel(r"$\mathbf{log_{10}\ M_{*}}$")
ax3.set_ylabel(r"$\boldsymbol{\beta}$")
# ax4.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{\ \nu}$")
ax4.set_ylabel(r"$\boldsymbol{\delta}$")
# ax10.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{{\ \chi}^2}$")
ax5.set_ylabel(r"$\boldsymbol{\xi}$")
ax6.set_ylabel(r"$\mathbf{log_{10}\ Mh_{qc}}$")
ax7.set_ylabel(r"$\mathbf{log_{10}\ Mh_{qs}}$")
ax8.set_ylabel(r"$\boldsymbol{{\mu}_{c}}$")
# ax4.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{\ \nu}$")
ax9.set_ylabel(r"$\boldsymbol{{\mu}_{s}}$")
ax10.set_ylabel(r"$\mathbf{log_{10}} \boldsymbol{{\ \chi}^2}$")
# ax5.set_ylabel(r"$\boldsymbol{{\chi}^2}$")
# ax1.set_yscale('log')
# ax2.set_yscale('log')
ax1.annotate(behroozi10_param_vals[0], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax2.annotate(behroozi10_param_vals[1], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax3.annotate(behroozi10_param_vals[2], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax4.annotate(behroozi10_param_vals[3], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax5.annotate(behroozi10_param_vals[4], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax6.annotate(zumandelbaum_param_vals[0], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax7.annotate(zumandelbaum_param_vals[1], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax8.annotate(zumandelbaum_param_vals[2], (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
ax9.annotate(0.15, (0.95,0.85), xycoords='axes fraction',
bbox=dict(boxstyle="square", ec='k', fc='lightgray', alpha=0.5), size=10)
plt.xlabel(r"$\mathbf{iteration\ number}$", fontsize=20)
plt.show()
######################## Calculate acceptance fraction ########################
dict_of_paths = cwpaths.cookiecutter_paths()
path_to_proc = dict_of_paths['proc_dir']
if mf_type == 'smf':
path_to_proc = path_to_proc + 'smhm_colour_run{0}/'.format(run)
else:
path_to_proc = path_to_proc + 'bmhm_run3/'
chain_fname = path_to_proc + 'mcmc_{0}_colour_raw.txt'.format(survey)
if quenching == 'hybrid':
emcee_table = pd.read_csv(chain_fname, header=None, comment='#',
names=['Mhalo_c', 'Mstar_c', 'mlow_slope', 'mhigh_slope', 'scatter',
'Mstar_q','Mhalo_q','mu','nu'], sep='\s+')
for idx,row in enumerate(emcee_table.values):
## For cases where 5 params on one line and 3 on the next
if np.isnan(row)[6] == True and np.isnan(row)[5] == False:
mhalo_q_val = emcee_table.values[idx+1][0]
mu_val = emcee_table.values[idx+1][1]
nu_val = emcee_table.values[idx+1][2]
row[6] = mhalo_q_val
row[7] = mu_val
row[8] = nu_val
## For cases where 4 params on one line, 4 on the next and 1 on the
## third line (numbers in scientific notation unlike case above)
elif np.isnan(row)[4] == True and np.isnan(row)[3] == False:
scatter_val = emcee_table.values[idx+1][0]
mstar_q_val = emcee_table.values[idx+1][1]
mhalo_q_val = emcee_table.values[idx+1][2]
mu_val = emcee_table.values[idx+1][3]
nu_val = emcee_table.values[idx+2][0]
row[4] = scatter_val
row[5] = mstar_q_val
row[6] = mhalo_q_val
row[7] = mu_val
row[8] = nu_val
emcee_table = emcee_table.dropna(axis='index', how='any').\
reset_index(drop=True)
elif quenching == 'halo':
emcee_table = pd.read_csv(chain_fname, header=None, comment='#',
names=['Mhalo_c', 'Mstar_c', 'mlow_slope', 'mhigh_slope', 'scatter',
'Mstar_q','Mhalo_q','mu','nu'], sep='\s+')
for idx,row in enumerate(emcee_table.values):
## For cases where 5 params on one line and 3 on the next
if np.isnan(row)[6] == True and np.isnan(row)[5] == False:
mhalo_q_val = emcee_table.values[idx+1][0]
mu_val = emcee_table.values[idx+1][1]
nu_val = emcee_table.values[idx+1][2]
row[6] = mhalo_q_val
row[7] = mu_val
row[8] = nu_val
## For cases where 4 params on one line, 4 on the next and 1 on the
## third line (numbers in scientific notation unlike case above)
elif np.isnan(row)[4] == True and np.isnan(row)[3] == False:
scatter_val = emcee_table.values[idx+1][0]
mstar_q_val = emcee_table.values[idx+1][1]
mhalo_q_val = emcee_table.values[idx+1][2]
mu_val = emcee_table.values[idx+1][3]
nu_val = emcee_table.values[idx+2][0]
row[4] = scatter_val
row[5] = mstar_q_val
row[6] = mhalo_q_val
row[7] = mu_val
row[8] = nu_val
emcee_table = emcee_table.dropna(axis='index', how='any').\
reset_index(drop=True)
num_unique_rows = emcee_table[['Mhalo_c', 'Mstar_c', 'mlow_slope',
'mhigh_slope', 'scatter','Mstar_q','Mhalo_q','mu','nu']].drop_duplicates().\
shape[0]
num_rows = len(emcee_table)
acceptance_fraction = num_unique_rows / num_rows
print("Acceptance fraction: {0}%".format(np.round(acceptance_fraction,2)*100)) | 43.626118 | 84 | 0.632427 | 3,964 | 24,387 | 3.662967 | 0.074924 | 0.041942 | 0.028926 | 0.035813 | 0.850482 | 0.836846 | 0.801928 | 0.795386 | 0.775413 | 0.775413 | 0 | 0.057909 | 0.192767 | 24,387 | 559 | 85 | 43.626118 | 0.679671 | 0.079797 | 0 | 0.679545 | 0 | 0 | 0.104298 | 0.007127 | 0 | 0 | 0 | 0.001789 | 0 | 1 | 0.002273 | false | 0 | 0.018182 | 0 | 0.022727 | 0.002273 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1ea30e174be2b530998a8beffcc109a1190b9a86 | 39 | py | Python | test/actions/conftest.py | ushahidi/deployment-director | 1a3c4b05d1ffb8b19efad0563df4fa9a9732853e | [
"MIT"
] | null | null | null | test/actions/conftest.py | ushahidi/deployment-director | 1a3c4b05d1ffb8b19efad0563df4fa9a9732853e | [
"MIT"
] | 1 | 2017-10-18T10:11:36.000Z | 2017-10-20T16:51:25.000Z | test/actions/conftest.py | ushahidi/deployment-director | 1a3c4b05d1ffb8b19efad0563df4fa9a9732853e | [
"MIT"
] | null | null | null | from ..context.fixtures import context
| 19.5 | 38 | 0.820513 | 5 | 39 | 6.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102564 | 39 | 1 | 39 | 39 | 0.914286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1ea45cfdf2b3d8b2988faf2b3f3ca80bc6420a4f | 82 | py | Python | lib/optimizers/__init__.py | wanghm92/Singlish_parser_tf0.12 | 06e28922ab54f57ade7fb8518ab4d3132286cd01 | [
"MIT"
] | 18 | 2017-05-17T13:51:08.000Z | 2021-06-13T14:34:42.000Z | lib/optimizers/__init__.py | wanghm92/Singlish_parser_tf0.12 | 06e28922ab54f57ade7fb8518ab4d3132286cd01 | [
"MIT"
] | 1 | 2019-03-15T05:39:49.000Z | 2019-03-15T06:49:20.000Z | lib/optimizers/__init__.py | wanghm92/Singlish_parser_tf0.12 | 06e28922ab54f57ade7fb8518ab4d3132286cd01 | [
"MIT"
] | 7 | 2018-04-24T11:25:03.000Z | 2021-03-21T16:41:42.000Z | from sgd_optimizer import SGDOptimizer
from radam_optimizer import RadamOptimizer | 41 | 42 | 0.902439 | 10 | 82 | 7.2 | 0.7 | 0.416667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097561 | 82 | 2 | 42 | 41 | 0.972973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1ee1b48c9bfd1f46ac11aa516f2645ccd3b0e96f | 93 | py | Python | keepachangelog/__init__.py | aogier/keepachangelog | 9c3f8adf9a00f64c2ebde450f162ceffa81db3b2 | [
"MIT"
] | null | null | null | keepachangelog/__init__.py | aogier/keepachangelog | 9c3f8adf9a00f64c2ebde450f162ceffa81db3b2 | [
"MIT"
] | null | null | null | keepachangelog/__init__.py | aogier/keepachangelog | 9c3f8adf9a00f64c2ebde450f162ceffa81db3b2 | [
"MIT"
] | null | null | null | from keepachangelog.version import __version__
from keepachangelog._changelog import to_dict
| 31 | 46 | 0.892473 | 11 | 93 | 7 | 0.636364 | 0.467532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086022 | 93 | 2 | 47 | 46.5 | 0.905882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
94f1af7d62bf8eccbef38df9d3a442aef051e09f | 7,265 | py | Python | tests/test_transformers.py | maxzheng/data-tools | c3aadecfdb2c8bc5a329d82e6ab66a640632e69e | [
"MIT"
] | null | null | null | tests/test_transformers.py | maxzheng/data-tools | c3aadecfdb2c8bc5a329d82e6ab66a640632e69e | [
"MIT"
] | null | null | null | tests/test_transformers.py | maxzheng/data-tools | c3aadecfdb2c8bc5a329d82e6ab66a640632e69e | [
"MIT"
] | null | null | null | import json
import gzip
import os
import pytest
from utils.fs import in_temp_dir
from confluent.data.transformers import Transformer, transform_usage_metrics
from confluent.data.scripts import transform
@pytest.fixture
def mock_data():
with in_temp_dir():
os.mkdir('data')
with gzip.open('data/test.json.gz', 'wt') as fp:
for _ in range(10):
fp.write(json.dumps({"value": "a", "@timestamp": "b", "id": "c", "source": "d", "@version": "e",
"metric": {
"request": "f", "user": "g",
"physicalstatefulcluster.core.confluent.cloud/version": "h",
"statefulset.kubernetes.io/pod-name": "i", "type": "j",
"_deltaSeconds": "50", "job": "l", "pod-name": "m",
"physicalstatefulcluster.core.confluent.cloud/name": "n",
"source": "o", "tenant": "p", "clusterId": "q", "_metricname": "r",
"another": "s", "instance": "t", "pscVersion": "u"},
"timestamp": 1234567}) + '\n')
yield
def test_usage_metrics_without_options(cli_runner, mock_data):
result = cli_runner.invoke_and_assert_exit(0, transform, ['usage-metrics'])
assert ('Transforming data files from "data" and writing them to "transformed-data" '
'using 5 parallel processes\n') in result.output
assert 'Transformed 1 data file(s)' in result.output
expected_record = {'value': 'a', 'date_pt': '1970-01-14', 'datetime_pt': '1970-01-14 22:56:00',
'id': 'c', 'source': 'd', '_version': 'e',
'metric': {
'request': 'f', 'user': 'g',
'physicalstatefulcluster_core_confluent_cloud_version': 'h',
'statefulset_kubernetes_io_pod_name': 'i',
'type': 'j', '_deltaSeconds': 60, 'job': 'l', 'pod_name': 'm',
'physicalstatefulcluster_core_confluent_cloud_name': 'n', 'source': 'o',
'tenant': 'p', 'clusterId': 'q', '_metricname': 'r', 'instance': 't',
'pscVersion': 'u'},
'timestamp': 1234560}
count = 0
for serialized_record in gzip.open('transformed-data/test.json.gz'):
record = json.loads(serialized_record)
assert expected_record == record
count += 1
assert count == 10
# Re-run by calling the `_transform_file` method ourselves as text coverage does not see the code as tested as
# the above code runs them in a child process.
transformer = Transformer(transform_usage_metrics, 'data', 'updated-data')
transformer._transform_file('data/test.json.gz')
expected_record['metric']['another'] = 's'
count = 0
for serialized_record in gzip.open('updated-data/test.json.gz'):
record = json.loads(serialized_record)
assert expected_record == record
count += 1
assert count == 10
def test_usage_metrics_select_fields(cli_runner, mock_data):
result = cli_runner.invoke_and_assert_exit(0, transform, [
'usage-metrics', '--select-fields', 'id,metric,metric.user,metric.type,timestamp,@version'])
assert ('Transforming data files from "data" and writing them to "transformed-data" '
'using 5 parallel processes\n') in result.output
assert 'Transformed 1 data file(s)' in result.output
assert 'Only extracting these fields: @version, id, metric, metric.type, metric.user, timestamp' in result.output
expected_record = {'id': 'c',
'_version': 'e',
'metric': {
'user': 'g',
'type': 'j'},
'timestamp': 1234560}
count = 0
for serialized_record in gzip.open('transformed-data/test.json.gz'):
record = json.loads(serialized_record)
assert expected_record == record
count += 1
assert count == 10
def test_usage_metrics_exclude_fields_with_others(cli_runner, mock_data):
result = cli_runner.invoke_and_assert_exit(0, transform, [
'usage-metrics', '--select-fields', 'id,metric,-metric.user,metric.type,-timestamp,@version'])
assert ('Transforming data files from "data" and writing them to "transformed-data" '
'using 5 parallel processes\n') in result.output
assert 'Transformed 1 data file(s)' in result.output
assert 'Only extracting these fields: @version, id, metric, metric.type' in result.output
assert 'Excluding these fields: metric.user, timestamp' in result.output
expected_record = {'id': 'c',
'_version': 'e',
'metric': {
'type': 'j'}}
count = 0
for serialized_record in gzip.open('transformed-data/test.json.gz'):
record = json.loads(serialized_record)
assert expected_record == record
count += 1
assert count == 10
def test_usage_metrics_exclude_fields_only(cli_runner, mock_data):
result = cli_runner.invoke_and_assert_exit(0, transform, [
'usage-metrics', '--select-fields', '-metric.user'])
assert ('Transforming data files from "data" and writing them to "transformed-data" '
'using 5 parallel processes\n') in result.output
assert 'Transformed 1 data file(s)' in result.output
assert 'Only extracting these fields' not in result.output
assert 'Excluding these fields: metric.user' in result.output
expected_record = {'value': 'a', 'date_pt': '1970-01-14', 'datetime_pt': '1970-01-14 22:56:00',
'id': 'c', 'source': 'd', '_version': 'e',
'metric': {
'request': 'f',
'physicalstatefulcluster_core_confluent_cloud_version': 'h',
'statefulset_kubernetes_io_pod_name': 'i',
'type': 'j', '_deltaSeconds': 60, 'job': 'l', 'pod_name': 'm',
'physicalstatefulcluster_core_confluent_cloud_name': 'n', 'source': 'o',
'tenant': 'p', 'clusterId': 'q', '_metricname': 'r', 'another': 's', 'instance': 't',
'pscVersion': 'u'},
'timestamp': 1234560}
count = 0
for serialized_record in gzip.open('transformed-data/test.json.gz'):
record = json.loads(serialized_record)
assert expected_record == record
count += 1
assert count == 10
def test_usage_metrics_path_contains(cli_runner, mock_data):
# No match
result = cli_runner.invoke_and_assert_exit(0, transform, ['usage-metrics', '--path-contains', 'blah'])
assert 'No data files found in "data" dir matching "blah"' in result.output
result = cli_runner.invoke_and_assert_exit(0, transform, ['usage-metrics', '--path-contains', 'data'])
assert ('Transforming data files from "data" and writing them to "transformed-data" '
'using 5 parallel processes\n') in result.output
| 44.845679 | 117 | 0.577151 | 821 | 7,265 | 4.947625 | 0.190012 | 0.029542 | 0.051699 | 0.044313 | 0.815116 | 0.815116 | 0.815116 | 0.815116 | 0.806499 | 0.784343 | 0 | 0.022334 | 0.291259 | 7,265 | 161 | 118 | 45.124224 | 0.766557 | 0.022299 | 0 | 0.577236 | 0 | 0.00813 | 0.342443 | 0.091844 | 0 | 0 | 0 | 0 | 0.252033 | 1 | 0.04878 | false | 0 | 0.056911 | 0 | 0.105691 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
bf4d75262a71169d8f17a673449ea0c4698265f1 | 1,872 | py | Python | pycones/blog/migrations/0003_auto_20150626_0943.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | pycones/blog/migrations/0003_auto_20150626_0943.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | pycones/blog/migrations/0003_auto_20150626_0943.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_auto_20150505_1927'),
]
operations = [
migrations.RemoveField(
model_name='post',
name='_content_ca_rendered',
),
migrations.RemoveField(
model_name='post',
name='_content_eu_rendered',
),
migrations.RemoveField(
model_name='post',
name='_content_ga_rendered',
),
migrations.RemoveField(
model_name='post',
name='content_ca',
),
migrations.RemoveField(
model_name='post',
name='content_ca_markup_type',
),
migrations.RemoveField(
model_name='post',
name='content_eu',
),
migrations.RemoveField(
model_name='post',
name='content_eu_markup_type',
),
migrations.RemoveField(
model_name='post',
name='content_ga',
),
migrations.RemoveField(
model_name='post',
name='content_ga_markup_type',
),
migrations.RemoveField(
model_name='post',
name='slug_ca',
),
migrations.RemoveField(
model_name='post',
name='slug_eu',
),
migrations.RemoveField(
model_name='post',
name='slug_ga',
),
migrations.RemoveField(
model_name='post',
name='title_ca',
),
migrations.RemoveField(
model_name='post',
name='title_eu',
),
migrations.RemoveField(
model_name='post',
name='title_ga',
),
]
| 24.96 | 44 | 0.50641 | 154 | 1,872 | 5.831169 | 0.220779 | 0.35078 | 0.434298 | 0.501114 | 0.826281 | 0.826281 | 0.826281 | 0.573497 | 0.122494 | 0 | 0 | 0.014693 | 0.381944 | 1,872 | 74 | 45 | 25.297297 | 0.761452 | 0.011218 | 0 | 0.661765 | 0 | 0 | 0.15576 | 0.048134 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.029412 | 0 | 0.073529 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
bf7e15fc2420d29b572583b212579b864b328111 | 24 | py | Python | peaklist.py | oaxiom/glbase3 | 9d3fc1efaad58ffb97e5b8126c2a96802daf9bac | [
"MIT"
] | 8 | 2019-06-11T02:13:20.000Z | 2022-02-22T09:27:23.000Z | peaklist.py | JackNg88/glbase3 | 4af190d06b89ef360dcba201d9e4e81f41ef8379 | [
"MIT"
] | 6 | 2020-12-18T15:08:14.000Z | 2021-05-22T00:31:57.000Z | peaklist.py | JackNg88/glbase3 | 4af190d06b89ef360dcba201d9e4e81f41ef8379 | [
"MIT"
] | 2 | 2020-05-06T04:27:03.000Z | 2022-02-22T09:28:25.000Z | """
Deprecated
"""
pass | 4.8 | 10 | 0.583333 | 2 | 24 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 24 | 5 | 11 | 4.8 | 0.7 | 0.416667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
bfb407ff8f2644979d7f20ebf7940343b82f8fc0 | 85 | py | Python | network_anomaly/code/Basic_features/Protocol_type.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | 1 | 2022-01-18T01:53:34.000Z | 2022-01-18T01:53:34.000Z | network_anomaly/code/Basic_features/Protocol_type.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | null | null | null | network_anomaly/code/Basic_features/Protocol_type.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
def Protocol_type(new_data):
return new_data['PROTOCOL'] | 21.25 | 31 | 0.658824 | 12 | 85 | 4.416667 | 0.75 | 0.264151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013889 | 0.152941 | 85 | 4 | 31 | 21.25 | 0.722222 | 0.247059 | 0 | 0 | 0 | 0 | 0.126984 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
44f17f6966c3135f1deadc0e8b6ab97a4985d202 | 119 | py | Python | Section 2/2.3 Start/enrollment/application/routes.py | chenjianAgain/Full-Stack-Web-Development-with-Flask | e110b0b649c19a9fd11ae70311cbf03727640921 | [
"MIT"
] | 14 | 2019-10-24T16:14:29.000Z | 2021-12-29T16:44:21.000Z | Section 2/2.3 Start/enrollment/application/routes.py | chenjianAgain/Full-Stack-Web-Development-with-Flask | e110b0b649c19a9fd11ae70311cbf03727640921 | [
"MIT"
] | 6 | 2019-10-03T08:03:00.000Z | 2021-08-14T12:36:11.000Z | Section 2/2.3 Start/enrollment/application/routes.py | chenjianAgain/Full-Stack-Web-Development-with-Flask | e110b0b649c19a9fd11ae70311cbf03727640921 | [
"MIT"
] | 29 | 2019-03-31T00:19:44.000Z | 2022-02-07T11:12:24.000Z | from application import app
@app.route("/")
@app.route("/index")
def index():
return "<h1>Hello Earth!!</h1>" | 19.833333 | 35 | 0.613445 | 16 | 119 | 4.5625 | 0.6875 | 0.219178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020202 | 0.168067 | 119 | 6 | 35 | 19.833333 | 0.717172 | 0 | 0 | 0 | 0 | 0 | 0.252174 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | true | 0 | 0.2 | 0.2 | 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 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
7848ef79dfbd146ff8be9cc55d925feaf2f9db91 | 2,180 | py | Python | symgp/superexpressions/supermatbase.py | jna29/SymGP | dd909feb51cb38e6eb70dee7fc3bd430dddf1b78 | [
"MIT"
] | 2 | 2017-06-07T14:54:07.000Z | 2021-08-30T20:01:43.000Z | symgp/superexpressions/supermatbase.py | jna29/SymGP | dd909feb51cb38e6eb70dee7fc3bd430dddf1b78 | [
"MIT"
] | 1 | 2017-06-07T16:19:54.000Z | 2017-06-07T20:39:30.000Z | symgp/superexpressions/supermatbase.py | jna29/SymGP | dd909feb51cb38e6eb70dee7fc3bd430dddf1b78 | [
"MIT"
] | null | null | null | from sympy import S, MatMul
from sympy.core.decorators import call_highest_priority
class SuperMatBase(object):
"""
The Base class for the redefined matrix symbols we have here
"""
def __neg__(self):
from .supermatmul import SuperMatMul
return SuperMatMul(S.NegativeOne, self).doit()
def __abs__(self):
raise NotImplementedError
@call_highest_priority('__radd__')
def __add__(self, other):
from .supermatadd import SuperMatAdd
return SuperMatAdd(self, other).doit()
@call_highest_priority('__add__')
def __radd__(self, other):
from .supermatadd import SuperMatAdd
return SuperMatAdd(other, self).doit()
@call_highest_priority('__rsub__')
def __sub__(self, other):
from .supermatadd import SuperMatAdd
return SuperMatAdd(self, -other).doit()
@call_highest_priority('__sub__')
def __rsub__(self, other):
from .supermatadd import SuperMatAdd
return SuperMatAdd(other, -self).doit()
@call_highest_priority('__rmul__')
def __mul__(self, other):
from .supermatmul import SuperMatMul
if isinstance(other, MatMul):
return SuperMatMul(self, *other.args).doit()
else:
return SuperMatMul(self, other).doit()
@call_highest_priority('__rmul__')
def __matmul__(self, other):
from .supermatmul import SuperMatMul
if isinstance(other, MatMul):
return SuperMatMul(self, *other.args).doit()
else:
return SuperMatMul(self, other).doit()
@call_highest_priority('__mul__')
def __rmul__(self, other):
from .supermatmul import SuperMatMul
if isinstance(other, MatMul):
return SuperMatMul(*other.args, self).doit()
else:
return SuperMatMul(other, self).doit()
@call_highest_priority('__mul__')
def __rmatmul__(self, other):
from .supermatmul import SuperMatMul
if isinstance(other, MatMul):
return SuperMatMul(*other.args, self).doit()
else:
return SuperMatMul(other, self).doit()
| 29.066667 | 68 | 0.640367 | 225 | 2,180 | 5.804444 | 0.2 | 0.096478 | 0.130934 | 0.123277 | 0.743492 | 0.743492 | 0.709035 | 0.709035 | 0.709035 | 0.709035 | 0 | 0 | 0.26422 | 2,180 | 74 | 69 | 29.459459 | 0.814214 | 0.027523 | 0 | 0.557692 | 0 | 0 | 0.028571 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.192308 | false | 0 | 0.211538 | 0 | 0.673077 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
786dca7a33e8be87dc55c5e4b9c39eea96086f1b | 33 | py | Python | pretorched/data/datasets/__init__.py | schwettmann/pretorched-x | ce8c3712434b3cd5d85dcbe8582ff51ddfa7d4ed | [
"MIT"
] | null | null | null | pretorched/data/datasets/__init__.py | schwettmann/pretorched-x | ce8c3712434b3cd5d85dcbe8582ff51ddfa7d4ed | [
"MIT"
] | null | null | null | pretorched/data/datasets/__init__.py | schwettmann/pretorched-x | ce8c3712434b3cd5d85dcbe8582ff51ddfa7d4ed | [
"MIT"
] | null | null | null | from torchvideo.datasets import * | 33 | 33 | 0.848485 | 4 | 33 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 33 | 1 | 33 | 33 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1530b0634551ad811fbf2a525f1229dc0c4caf0b | 109 | py | Python | model/__init__.py | diogocs1/facebookexplorer | dd95f635851a80f055cd3dcfd14908277ef108f5 | [
"Apache-2.0"
] | null | null | null | model/__init__.py | diogocs1/facebookexplorer | dd95f635851a80f055cd3dcfd14908277ef108f5 | [
"Apache-2.0"
] | null | null | null | model/__init__.py | diogocs1/facebookexplorer | dd95f635851a80f055cd3dcfd14908277ef108f5 | [
"Apache-2.0"
] | null | null | null | from utils import Utils
import profile
import feed
db = Utils.banco
db.generate_mapping(create_tables=True) | 15.571429 | 39 | 0.825688 | 17 | 109 | 5.176471 | 0.705882 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119266 | 109 | 7 | 39 | 15.571429 | 0.916667 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.