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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3beead2f1bbb20ab82ab1046d2b7a0401212b9f2 | 626 | py | Python | app.py | relh/cathhacks | a7f3f779caec8b02b27e09ab02b003c6e46a53d3 | [
"MIT"
] | null | null | null | app.py | relh/cathhacks | a7f3f779caec8b02b27e09ab02b003c6e46a53d3 | [
"MIT"
] | null | null | null | app.py | relh/cathhacks | a7f3f779caec8b02b27e09ab02b003c6e46a53d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import time
import json
import random
import re
from bottle import route, hook, response, run, static_file
@route('/')
def index():
return static_file('index.html', root = '.')
@route('/maptweets.js')
def index_css():
return static_file('maptweets.js', root = '.')
@route('/cross.jpg')
def index_css():
return static_file('cross.jpg', root = '.')
@route('/light.png')
def index_css():
return static_file('light.png', root = '.')
@route('/event.png')
def index_css():
return static_file('event.png', root = '.')
run(host = '0.0.0.0', port = 80, server = 'tornado', debug = True)
| 21.586207 | 66 | 0.648562 | 90 | 626 | 4.4 | 0.422222 | 0.151515 | 0.20202 | 0.171717 | 0.287879 | 0.287879 | 0.151515 | 0 | 0 | 0 | 0 | 0.011321 | 0.153355 | 626 | 28 | 67 | 22.357143 | 0.735849 | 0.031949 | 0 | 0.190476 | 0 | 0 | 0.185124 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.238095 | true | 0 | 0.238095 | 0.238095 | 0.714286 | 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 |
3bf06db6b595a9d1a5a4cb7a067a7c955758c1d4 | 1,749 | py | Python | session01_Decorators/test_printtime.py | morales-gregorio/Python-Module-of-the-Week | 2c68e20be3e174be9b91c92ac872806dd982e7d2 | [
"MIT"
] | 15 | 2017-06-22T11:57:38.000Z | 2022-03-31T13:34:07.000Z | session01_Decorators/test_printtime.py | morales-gregorio/Python-Module-of-the-Week | 2c68e20be3e174be9b91c92ac872806dd982e7d2 | [
"MIT"
] | 3 | 2019-10-16T10:32:55.000Z | 2020-01-09T09:24:48.000Z | session01_Decorators/test_printtime.py | morales-gregorio/Python-Module-of-the-Week | 2c68e20be3e174be9b91c92ac872806dd982e7d2 | [
"MIT"
] | 6 | 2016-10-07T12:50:24.000Z | 2019-11-28T11:15:04.000Z | #!/usr/bin/env python3
import sys
def test_we_can_import_module():
import printtime
def test_decorator_exists():
import printtime
printtime.printtime
def test_wrapped_function_is_callable():
import printtime
@printtime.printtime
def f(): pass
assert callable(f)
def test_function_can_be_called_with_1_arg():
import printtime
@printtime.printtime
def f(*args): pass
f(1)
def test_function_can_be_called_with_2_args():
import printtime
@printtime.printtime
def f(*args): pass
f(2)
def test_function_can_be_called_with_5_args():
import printtime
@printtime.printtime
def f(*args): pass
f(5)
def test_function_can_be_called_with_named_args():
import printtime
@printtime.printtime
def f(a, b): pass
f(b=2, a=1)
def test_function_can_be_called_with_mutable_args():
import printtime
@printtime.printtime
def f(a, b): pass
f(b=[], a={})
TEST_CASES = [(1, 2, 3),
(1.0, 2.0, 3.0),
("a", "b", "ab"),
((), (), ()),
((1,2,3), (4, 5, 6), tuple(range(1, 7))),
([], [], []),
([1,2,3], [4, 5, 6], list(range(1, 7)))]
def test_function_returns_proper_value_0_args():
import printtime
@printtime.printtime
def f(): return 234
assert f() == 234
def test_function_returns_proper_value_1_arg():
import printtime
@printtime.printtime
def f(a): return 234
assert f(11) == 234
def test_function_returns_proper_value_2_args():
import printtime
@printtime.printtime
def f(a, b): return 234
assert f(12, 'second arg') == 234
if __name__ == '__main__':
import pytest
pytest.main([__file__] + sys.argv[1:])
| 20.337209 | 55 | 0.628931 | 248 | 1,749 | 4.129032 | 0.229839 | 0.351563 | 0.234375 | 0.322266 | 0.701172 | 0.666016 | 0.585938 | 0.386719 | 0.280273 | 0.193359 | 0 | 0.045249 | 0.241852 | 1,749 | 85 | 56 | 20.576471 | 0.726998 | 0.012007 | 0 | 0.409836 | 0 | 0 | 0.012739 | 0 | 0 | 0 | 0 | 0 | 0.065574 | 1 | 0.327869 | false | 0.098361 | 0.229508 | 0.04918 | 0.557377 | 0.344262 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 6 |
ce124b2f132aba4a07da1b3bf301f0dd4fc77b5a | 23,989 | py | Python | airmozilla/search/tests/test_views.py | RAMilewski/airmozilla | 70d52295294fd319e60b046bf75baf971cd00f98 | [
"BSD-3-Clause"
] | 1 | 2019-08-17T21:22:08.000Z | 2019-08-17T21:22:08.000Z | airmozilla/search/tests/test_views.py | RAMilewski/airmozilla | 70d52295294fd319e60b046bf75baf971cd00f98 | [
"BSD-3-Clause"
] | 4 | 2021-03-19T15:38:56.000Z | 2021-09-08T02:47:16.000Z | airmozilla/search/tests/test_views.py | Acidburn0zzz/airmozilla | 7b03af6d6efe9af00a6070f5327e10fb755c3766 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import urllib
from django.test import TestCase
from django.utils.timezone import utc
from django.contrib.auth.models import User
from funfactory.urlresolvers import reverse
from nose.tools import eq_, ok_
from airmozilla.search.models import LoggedSearch
from airmozilla.main.models import Event, UserProfile, Tag, Channel
class TestSearch(TestCase):
fixtures = ['airmozilla/manage/tests/main_testdata.json']
placeholder = 'airmozilla/manage/tests/firefox.png'
def test_basic_search(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='Entirely Different',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_INITIATED,
description="These are my words."
)
assert event not in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url)
eq_(response.status_code, 200)
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
event.status = Event.STATUS_SCHEDULED
event.save()
assert event in Event.objects.approved()
assert event.privacy == Event.PRIVACY_PUBLIC
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
ok_('value="entirely"' in response.content)
def test_basic_search_with_privacy_filter(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='Entirely Different',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
event.privacy = Event.PRIVACY_CONTRIBUTORS
event.save()
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
contributor = User.objects.create_user(
'nigel', 'nigel@live.com', 'secret'
)
user_profile = UserProfile.objects.create(
user=contributor,
contributor=True
)
assert self.client.login(username='nigel', password='secret')
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
event.privacy = Event.PRIVACY_COMPANY
event.save()
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
user_profile.contributor = False
user_profile.save()
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
def test_search_ordering(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event1 = Event.objects.create(
title='Entirely Different',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="A different word is not mentioned here."
)
assert event1 in Event.objects.approved()
yesterday = today - datetime.timedelta(days=1)
event2 = Event.objects.create(
title='Muscle Belts',
slug=yesterday.strftime('test-event-%Y%m%d'),
start_time=yesterday.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="The word entirely appears here"
)
assert event2 in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': 'entirely'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event1.title in response.content)
ok_(event2.title in response.content)
# event1 should appear ahead of event2
# because event1 has the word "entirely" in the title
ok_(response.content.find(event1.title) <
response.content.find(event2.title))
response = self.client.get(url, {'q': 'words'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event1.title in response.content)
ok_(event2.title in response.content)
# "word" appears in both but event1 is newer
ok_(response.content.find(event1.title) <
response.content.find(event2.title))
def test_search_by_stopwords(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='THis is Different',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url)
eq_(response.status_code, 200)
response = self.client.get(url, {'q': 'this'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
response = self.client.get(url, {'q': 'this is are these'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
response = self.client.get(url, {'q': 'are'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
def test_search_with_strange_characters(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='THis is Different',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event in Event.objects.approved()
url = reverse('search:home')
# first check that specific words work
response = self.client.get(url, {'q': 'WORD'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
response = self.client.get(url, {'q': "O'Brian Should Work"})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
response = self.client.get(url, {'q': 'are my'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
# this won't allow the automatic OR
response = self.client.get(url, {'q': 'WORDS | LETTERS'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
response = self.client.get(url, {'q': 'WORDS & LETTERS'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
response = self.client.get(url, {'q': 'WORDS LETTERS'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
def test_search_with_nothing(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='THis is Different',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': ''})
eq_(response.status_code, 200)
ok_(event.title not in response.content)
def test_search_by_stemming(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='Engagement Discussion',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': 'discuss'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
response = self.client.get(url, {'q': 'discussions'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
response = self.client.get(url, {'q': 'engage'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
def test_search_with_highlight(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event = Event.objects.create(
title='Engagement Discussion',
slug=today.strftime('test-event-%Y%m%d'),
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': 'discuss'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_('<b>Discussion</b>' in response.content)
event.title += ' <input name="foo">'
event.save()
response = self.client.get(url, {'q': 'discuss'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_('<b>Discussion</b>' in response.content)
ok_('<input name="foo">' not in response.content)
response = self.client.get(url, {'q': 'WORD'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
# because it's not the short description
ok_('<b>words</b>' not in response.content)
event.short_description = "These are your words."
event.save()
response = self.client.get(url, {'q': 'WORD'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_('<b>words</b>' in response.content)
event.short_description += ' <script>alert("xxx")</script>'
event.save()
response = self.client.get(url, {'q': 'WORD'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_('<script>alert' not in response.content)
def test_searching_multi_words_finding_with_or(self):
Event.objects.all().delete()
today = datetime.datetime.utcnow()
event1 = Event.objects.create(
title='Blobber Fest',
slug='blobbering',
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are my words."
)
assert event1 in Event.objects.approved()
event2 = Event.objects.create(
title='Beauty and the Beast',
slug='beauty-and-beast',
start_time=today.replace(tzinfo=utc),
placeholder_img=self.placeholder,
status=Event.STATUS_SCHEDULED,
description="These are other words."
)
assert event2 in Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': 'BLOBBER'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event1.title in response.content)
ok_(event2.title not in response.content)
response = self.client.get(url, {'q': 'BEAST'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event1.title not in response.content)
ok_(event2.title in response.content)
response = self.client.get(url, {'q': 'BLOBBER BEAST'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event1.title in response.content)
ok_(event2.title in response.content)
def test_search_with_sql_injection(self):
assert Event.objects.approved()
url = reverse('search:home')
q = '1" onmouseover=prompt(931357) bad="'
response = self.client.get(url, {'q': q})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
def test_search_by_transcript(self):
assert Event.objects.approved()
url = reverse('search:home')
q = 'fingerfood'
response = self.client.get(url, {'q': q})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
event, = Event.objects.approved()
event.transcript = 'I love fingerfoods'
event.save()
response = self.client.get(url, {'q': q})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
ok_('found by transcript' in response.content)
# but if the event is found because of the description...
event.short_description = "Peter talks about his love for fingerfood"
event.save()
response = self.client.get(url, {'q': q})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
ok_('found by transcript' not in response.content)
def test_paginated_search(self):
event = Event.objects.get(title='Test event')
for i in range(14):
Event.objects.create(
title='Test event %d' % (i + 1),
short_description=event.short_description,
description=event.description,
start_time=event.start_time,
archive_time=event.archive_time,
location=event.location,
privacy=event.privacy,
status=event.status,
placeholder_img=event.placeholder_img,
)
url = reverse('search:home')
response = self.client.get(url, {'q': 'TEST EVENT'})
eq_(response.status_code, 200)
eq_(response.content.count('Test event'), 10)
response = self.client.get(url, {'q': 'TEST EVENT', 'page': 2})
eq_(response.status_code, 200)
eq_(response.content.count('Test event'), 5)
# but don't try to mess with it
response = self.client.get(url, {'q': 'TEST EVENT', 'page': 0})
eq_(response.status_code, 400)
def test_search_by_tag(self):
assert Event.objects.approved()
url = reverse('search:home')
response = self.client.get(url, {'q': 'tag: mytag'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
tag = Tag.objects.create(name='mytag')
event = Event.objects.get(title='Test event')
event.tags.add(tag)
response = self.client.get(url, {'q': 'tag: mytag'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
# should work case insensitively
response = self.client.get(url, {'q': 'TAG: MYTAG'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
# combine with something else to be found
response = self.client.get(url, {'q': 'Test tag:mytag'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
# combine with something else to be NOT found
response = self.client.get(url, {'q': 'Somethingelse tag:mytag'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
def test_search_and_suggest_tags(self):
url = reverse('search:home')
event = Event.objects.get(title='Test event')
tag = Tag.objects.create(name='rust')
event.tags.add(tag)
response = self.client.get(url, {'q': 'RUst'})
eq_(response.status_code, 200)
# because neither title or description contains this
ok_('Nothing found' in response.content)
tag_search_url = url + '?q=%s' % urllib.quote_plus('tag: rust')
ok_(tag_search_url in response.content)
# But searching for parts of the tag word should not suggest the
# tag.
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1072985
response = self.client.get(url, {'q': 'rusty'})
eq_(response.status_code, 200)
ok_(tag_search_url not in response.content)
def test_search_and_suggest_multiple_tags(self):
url = reverse('search:home')
event = Event.objects.get(title='Test event')
tag = Tag.objects.create(name='mytag')
event.tags.add(tag)
othertag = Tag.objects.create(name='other tag')
event.tags.add(othertag)
response = self.client.get(url, {'q': 'mytag other tag'})
eq_(response.status_code, 200)
# because neither title or description contains this
ok_('Nothing found' in response.content)
tag_search_url = (
url + '?q=%s' % urllib.quote_plus('other tag tag: mytag')
)
ok_(tag_search_url in response.content)
othertag_search_url = (
url + '?q=%s' % urllib.quote_plus('mytag tag: other tag')
)
ok_(othertag_search_url in response.content)
def test_search_by_channel(self):
assert Event.objects.approved()
url = reverse('search:home')
event = Event.objects.get(title='Test event')
response = self.client.get(url, {'q': 'channel: Grow Mozilla'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
channel = Channel.objects.create(name='Grow Mozilla')
event.channels.add(channel)
response = self.client.get(url, {'q': 'channel: Grow Mozilla'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
# should work case insensitively
response = self.client.get(url, {'q': 'CHANNEL: GROW mozilla'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
# combine with something else to be found
response = self.client.get(url, {'q': 'Test channel:grow mozilla'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(event.title in response.content)
# combine with something else to be NOT found
response = self.client.get(
url, {'q': 'Somethingelse channel:grow mozilla'}
)
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
def test_search_and_suggest_channels(self):
url = reverse('search:home')
event = Event.objects.get(title='Test event')
channel = Channel.objects.create(name='Grow Mozilla')
event.channels.add(channel)
response = self.client.get(url, {'q': 'grow mozilla'})
eq_(response.status_code, 200)
# because neither title or description contains this
ok_('Nothing found' in response.content)
channel_search_url = (
url + '?q=%s' % urllib.quote_plus('channel: Grow Mozilla')
)
ok_(channel_search_url in response.content)
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1072985
Channel.objects.create(name='Rust', slug='rust')
channel_search_url = (
url + '?q=%s' % urllib.quote_plus('y channel: Rust')
)
response = self.client.get(url, {'q': 'rusty'})
eq_(response.status_code, 200)
ok_(channel_search_url not in response.content)
def test_logged_search(self):
url = reverse('search:home')
response = self.client.get(url, {'q': 'TesT'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
logged_search = LoggedSearch.objects.get(
term='TesT',
results=1,
page=1,
)
# now after that, click on the found event
event = Event.objects.get(title='Test event')
event_url = reverse('main:event', args=(event.slug,))
ok_(event_url in response.content)
response = self.client.get(event_url)
eq_(response.status_code, 200)
# using a session it should now record that that search
# lead to clicking this event
logged_search = LoggedSearch.objects.get(pk=logged_search.pk)
eq_(logged_search.event_clicked, event)
def test_logged_search_not_empty_searches(self):
url = reverse('search:home')
response = self.client.get(url, {'q': ''})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(not LoggedSearch.objects.all())
# or something too short
response = self.client.get(url, {'q': '1'})
eq_(response.status_code, 200)
ok_('Too short' in response.content)
ok_(not LoggedSearch.objects.all())
response = self.client.get(url, {'q': ' ' * 10})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
ok_(not LoggedSearch.objects.all())
# but search by channel or tag without a wildcard should log
response = self.client.get(url, {'q': 'channel: Foo'})
eq_(response.status_code, 200)
ok_('Nothing found' in response.content)
ok_(LoggedSearch.objects.all())
def test_unicode_next_page_links(self):
"""https://bugzilla.mozilla.org/show_bug.cgi?id=1079370"""
event = Event.objects.get(title='Test event')
for i in range(20):
Event.objects.create(
title=u'T\xe4st event %d' % (i + 1),
short_description=event.short_description,
description=event.description,
start_time=event.start_time,
archive_time=event.archive_time,
location=event.location,
privacy=event.privacy,
status=event.status,
placeholder_img=event.placeholder_img,
)
url = reverse('search:home')
response = self.client.get(url, {'q': u'T\xe4sT'})
eq_(response.status_code, 200)
ok_('Nothing found' not in response.content)
| 38.3824 | 77 | 0.61449 | 2,898 | 23,989 | 4.949275 | 0.092478 | 0.106672 | 0.113784 | 0.089312 | 0.825978 | 0.812103 | 0.787632 | 0.763717 | 0.740779 | 0.725929 | 0 | 0.014517 | 0.264871 | 23,989 | 624 | 78 | 38.44391 | 0.798809 | 0.04798 | 0 | 0.678643 | 0 | 0 | 0.12426 | 0.005788 | 0 | 0 | 0 | 0 | 0.035928 | 1 | 0.03992 | false | 0.001996 | 0.017964 | 0 | 0.063872 | 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 |
ce2232a01897505144fe6b01b927ec8f8c501c90 | 244 | py | Python | pyaedt/third_party/ironpython/plumbum/path/__init__.py | beliaev-maksim/pyaedt | c549de1d0c80f3598afc5475817a332bb6d6df57 | [
"MIT"
] | 1,918 | 2015-01-05T22:51:02.000Z | 2022-03-30T16:59:59.000Z | pyaedt/third_party/ironpython/plumbum/path/__init__.py | beliaev-maksim/pyaedt | c549de1d0c80f3598afc5475817a332bb6d6df57 | [
"MIT"
] | 406 | 2015-01-07T19:04:52.000Z | 2022-03-31T19:48:02.000Z | pyaedt/third_party/ironpython/plumbum/path/__init__.py | beliaev-maksim/pyaedt | c549de1d0c80f3598afc5475817a332bb6d6df57 | [
"MIT"
] | 171 | 2015-02-07T19:36:23.000Z | 2022-03-29T11:33:13.000Z | # -*- coding: utf-8 -*-
from plumbum.path.base import FSUser, Path, RelativePath
from plumbum.path.local import LocalPath, LocalWorkdir
from plumbum.path.remote import RemotePath, RemoteWorkdir
from plumbum.path.utils import copy, delete, move
| 40.666667 | 57 | 0.795082 | 33 | 244 | 5.878788 | 0.606061 | 0.226804 | 0.309278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004608 | 0.110656 | 244 | 5 | 58 | 48.8 | 0.889401 | 0.086066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 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 | 1 | 0 | 0 | 6 |
cbf038579f14e439d0af607b0a71c78d679cefc7 | 148 | py | Python | test/foolib/util.py | xkortex/protosanity | 1acdeeb8862bbdfe4e304eecccbad815ae6f44b3 | [
"MIT"
] | null | null | null | test/foolib/util.py | xkortex/protosanity | 1acdeeb8862bbdfe4e304eecccbad815ae6f44b3 | [
"MIT"
] | null | null | null | test/foolib/util.py | xkortex/protosanity | 1acdeeb8862bbdfe4e304eecccbad815ae6f44b3 | [
"MIT"
] | null | null | null | import time
try:
ns = time.time_ns()
time_ns = time.time_ns
except AttributeError:
def time_ns():
return int(time.time() * 1e9)
| 18.5 | 37 | 0.635135 | 22 | 148 | 4.090909 | 0.454545 | 0.266667 | 0.222222 | 0.266667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018018 | 0.25 | 148 | 7 | 38 | 21.142857 | 0.792793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0.142857 | 0.428571 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 6 |
cbf9288ea09cab4d0c6ff229f50fd6b6380d8df7 | 336 | py | Python | src/UQpy/sampling/mcmc/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | src/UQpy/sampling/mcmc/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | src/UQpy/sampling/mcmc/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | from UQpy.sampling.mcmc.MetropolisHastings import MetropolisHastings
from UQpy.sampling.mcmc.ModifiedMetropolisHastings import ModifiedMetropolisHastings
from UQpy.sampling.mcmc.Stretch import Stretch
from UQpy.sampling.mcmc.DRAM import DRAM
from UQpy.sampling.mcmc.DREAM import DREAM
from UQpy.sampling.mcmc.baseclass.MCMC import MCMC
| 48 | 84 | 0.872024 | 43 | 336 | 6.813953 | 0.255814 | 0.163823 | 0.327645 | 0.409556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 336 | 6 | 85 | 56 | 0.939103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
020e8941cd56265583abad09817c2ee903f85a24 | 36 | py | Python | my_classes/.history/ModulesPackages_PackageNamespaces/example3b/main_20210726185238.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/.history/ModulesPackages_PackageNamespaces/example3b/main_20210726185238.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/.history/ModulesPackages_PackageNamespaces/example3b/main_20210726185238.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null |
import sys
import importer
module
| 6 | 15 | 0.805556 | 5 | 36 | 5.8 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.194444 | 36 | 5 | 16 | 7.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 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 |
02485969f5c51c0dbfbbf6bf72feffd113ce646a | 24 | py | Python | exercises/flatten-array/flatten_array.py | RJTK/python | f9678d629735f75354bbd543eb7f10220a498dae | [
"MIT"
] | 1 | 2021-05-15T19:59:04.000Z | 2021-05-15T19:59:04.000Z | exercises/flatten-array/flatten_array.py | RJTK/python | f9678d629735f75354bbd543eb7f10220a498dae | [
"MIT"
] | null | null | null | exercises/flatten-array/flatten_array.py | RJTK/python | f9678d629735f75354bbd543eb7f10220a498dae | [
"MIT"
] | 2 | 2018-03-03T08:32:12.000Z | 2019-08-22T11:55:53.000Z | def flatten():
pass
| 8 | 14 | 0.583333 | 3 | 24 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.291667 | 24 | 2 | 15 | 12 | 0.823529 | 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 |
024d47a8fa396d0358535b3e13dfb7d49e9f4338 | 15,042 | py | Python | sdl2/test/audio_test.py | zmarvel/py-sdl2 | fa91007e6eebcbf5838f08cfe8d0b9d5cdf3ab83 | [
"CC0-1.0"
] | null | null | null | sdl2/test/audio_test.py | zmarvel/py-sdl2 | fa91007e6eebcbf5838f08cfe8d0b9d5cdf3ab83 | [
"CC0-1.0"
] | null | null | null | sdl2/test/audio_test.py | zmarvel/py-sdl2 | fa91007e6eebcbf5838f08cfe8d0b9d5cdf3ab83 | [
"CC0-1.0"
] | null | null | null | import os
import sys
import ctypes
import unittest
from sdl2 import SDL_Init, SDL_Quit, SDL_InitSubSystem, SDL_QuitSubSystem, \
SDL_INIT_AUDIO
from sdl2 import audio
class SDLAudioTest(unittest.TestCase):
__tags__ = ["sdl"]
@classmethod
def setUpClass(cls):
SDL_Init(0)
def audio_cb(userdata, audiobytes, length):
pass
cls.audiocallback = audio.SDL_AudioCallback(audio_cb)
@classmethod
def tearDownClass(cls):
SDL_Quit()
def test_SDL_AUDIO_BITSIZE(self):
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_U8), 8)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S8), 8)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_U16LSB), 16)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S16LSB), 16)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_U16MSB), 16)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S16MSB), 16)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_U16), 16)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S16), 16)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S32LSB), 32)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S32MSB), 32)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_S32), 32)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_F32LSB), 32)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_F32MSB), 32)
self.assertEqual(audio.SDL_AUDIO_BITSIZE(audio.AUDIO_F32), 32)
def test_SDL_AUDIO_ISFLOAT(self):
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_U8))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S8))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_U16LSB))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S16LSB))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_U16MSB))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S16MSB))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_U16))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S16))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S32LSB))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S32MSB))
self.assertFalse(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_S32))
self.assertTrue(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_F32LSB))
self.assertTrue(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_F32MSB))
self.assertTrue(audio.SDL_AUDIO_ISFLOAT(audio.AUDIO_F32))
def test_SDL_AUDIO_ISBIGENDIAN(self):
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_U8))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S8))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_U16LSB))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S16LSB))
self.assertTrue(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_U16MSB))
self.assertTrue(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S16MSB))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_U16))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S16))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S32LSB))
self.assertTrue(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S32MSB))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_S32))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_F32LSB))
self.assertTrue(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_F32MSB))
self.assertFalse(audio.SDL_AUDIO_ISBIGENDIAN(audio.AUDIO_F32))
def test_SDL_AUDIO_ISSIGNED(self):
self.assertFalse(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_U8))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S8))
self.assertFalse(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_U16LSB))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S16LSB))
self.assertFalse(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_U16MSB))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S16MSB))
self.assertFalse(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_U16))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S16))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S32LSB))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S32MSB))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_S32))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_F32LSB))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_F32MSB))
self.assertTrue(audio.SDL_AUDIO_ISSIGNED(audio.AUDIO_F32))
def test_SDL_AUDIO_ISINT(self):
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_U8))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S8))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_U16LSB))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S16LSB))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_U16MSB))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S16MSB))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_U16))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S16))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S32LSB))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S32MSB))
self.assertTrue(audio.SDL_AUDIO_ISINT(audio.AUDIO_S32))
self.assertFalse(audio.SDL_AUDIO_ISINT(audio.AUDIO_F32LSB))
self.assertFalse(audio.SDL_AUDIO_ISINT(audio.AUDIO_F32MSB))
self.assertFalse(audio.SDL_AUDIO_ISINT(audio.AUDIO_F32))
def test_SDL_AUDIO_ISLITTLEENDIAN(self):
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_U8))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S8))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_U16LSB))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S16LSB))
self.assertFalse(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_U16MSB))
self.assertFalse(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S16MSB))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_U16))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S16))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S32LSB))
self.assertFalse(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S32MSB))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_S32))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_F32LSB))
self.assertFalse(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_F32MSB))
self.assertTrue(audio.SDL_AUDIO_ISLITTLEENDIAN(audio.AUDIO_F32))
def test_SDL_AUDIO_ISUNSIGNED(self):
self.assertTrue(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_U8))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S8))
self.assertTrue(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_U16LSB))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S16LSB))
self.assertTrue(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_U16MSB))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S16MSB))
self.assertTrue(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_U16))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S16))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S32LSB))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S32MSB))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_S32))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_F32LSB))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_F32MSB))
self.assertFalse(audio.SDL_AUDIO_ISUNSIGNED(audio.AUDIO_F32))
@unittest.skip("not implemented")
def test_SDL_AudioSpec(self):
pass
@unittest.skip("not implemented")
def test_SDL_AudioCVT(self):
pass
def test_SDL_GetNumAudioDrivers(self):
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
count = audio.SDL_GetNumAudioDrivers()
self.assertGreaterEqual(count, 1)
SDL_QuitSubSystem(SDL_INIT_AUDIO)
def test_SDL_GetAudioDriver(self):
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
founddummy = False
drivercount = audio.SDL_GetNumAudioDrivers()
for index in range(drivercount):
drivername = audio.SDL_GetAudioDriver(index)
self.assertIsInstance(drivername, (str, bytes))
if drivername == b"dummy":
founddummy = True
self.assertTrue(founddummy, "could not find dummy driver")
# self.assertRaises(SDLError, audio.SDL_GetAudioDriver, -1)
# self.assertRaises(SDLError, audio.get_audio_driver,
# drivercount + 1)
self.assertRaises((ctypes.ArgumentError, TypeError),
audio.SDL_GetAudioDriver, "Test")
self.assertRaises((ctypes.ArgumentError, TypeError),
audio.SDL_GetAudioDriver, None)
SDL_QuitSubSystem(SDL_INIT_AUDIO)
def test_SDL_GetCurrentAudioDriver(self):
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
SDL_QuitSubSystem(SDL_INIT_AUDIO)
success = 0
for index in range(audio.SDL_GetNumAudioDrivers()):
drivername = audio.SDL_GetAudioDriver(index)
os.environ["SDL_AUDIODRIVER"] = drivername.decode("utf-8")
# Certain drivers fail without bringing up the correct
# return value, such as the esd, if it is not running.
SDL_InitSubSystem(SDL_INIT_AUDIO)
driver = audio.SDL_GetCurrentAudioDriver()
# Do not handle wrong return values.
if driver is not None:
self.assertEqual(drivername, driver)
success += 1
SDL_QuitSubSystem(SDL_INIT_AUDIO)
self.assertGreaterEqual(success, 1,
"Could not initialize any sound driver")
@unittest.skip("SDL_AudioCallback is not retained in SDL_AudioSpec")
def test_SDL_OpenAudio(self):
os.environ["SDL_AUDIODRIVER"] = "dummy"
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
reqspec = audio.SDL_AudioSpec(44100, audio.AUDIO_U16SYS, 2, 8192,
self.audiocallback, None)
spec = audio.SDL_AudioSpec(0, 0, 0, 0)
ret = audio.SDL_OpenAudio(reqspec, ctypes.byref(spec))
self.assertEqual(ret, 0)
self.assertEqual(spec.format, reqspec.format)
self.assertEqual(spec.freq, reqspec.freq)
self.assertEqual(spec.channels, reqspec.channels)
audio.SDL_CloseAudio()
SDL_QuitSubSystem(SDL_INIT_AUDIO)
def test_SDL_GetNumAudioDevices(self):
os.environ["SDL_AUDIODRIVER"] = "dummy"
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
outnum = audio.SDL_GetNumAudioDevices(False)
self.assertGreaterEqual(outnum, 1)
innum = audio.SDL_GetNumAudioDevices(True)
self.assertGreaterEqual(innum, 0)
SDL_QuitSubSystem(SDL_INIT_AUDIO)
def test_SDL_GetAudioDeviceName(self):
os.environ["SDL_AUDIODRIVER"] = "dummy"
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
outnum = audio.SDL_GetNumAudioDevices(False)
for x in range(outnum):
name = audio.SDL_GetAudioDeviceName(x, False)
self.assertIsNotNone(name)
innum = audio.SDL_GetNumAudioDevices(True)
for x in range(innum):
name = audio.SDL_GetAudioDeviceName(x, True)
self.assertIsNotNone(name)
# self.assertRaises(SDLError, audio.get_audio_device_name, -1)
# self.assertRaises(SDLError, audio.get_audio_device_name, -1, True)
SDL_QuitSubSystem(SDL_INIT_AUDIO)
# self.assertRaises(SDLError, audio.get_audio_device_name, 0)
# self.assertRaises(SDLError, audio.get_audio_device_name, 0, True)
@unittest.skip("SDL_AudioCallback is not retained in SDL_AudioSpec")
def test_SDL_OpenCloseAudioDevice(self):
os.environ["SDL_AUDIODRIVER"] = "dummy"
if SDL_InitSubSystem(SDL_INIT_AUDIO) != 0:
self.skipTest('Audio subsystem not supported')
reqspec = audio.SDL_AudioSpec(44100, audio.AUDIO_U16SYS, 2, 8192,
self.audiocallback, None)
outnum = audio.SDL_GetNumAudioDevices(0)
for x in range(outnum):
spec = audio.SDL_AudioSpec()
name = audio.SDL_GetAudioDeviceName(x, 0)
self.assertIsNotNone(name)
deviceid = audio.SDL_OpenAudioDevice(None, 0, reqspec,
ctypes.byref(spec), 1)
self.assertGreaterEqual(deviceid, 2)
self.assertIsInstance(spec, audio.SDL_AudioSpec)
self.assertEqual(spec.format, reqspec.format)
self.assertEqual(spec.freq, reqspec.freq)
self.assertEqual(spec.channels, reqspec.channels)
audio.SDL_CloseAudioDevice(deviceid)
SDL_QuitSubSystem(SDL_INIT_AUDIO)
@unittest.skip("not implemented")
def test_SDL_GetAudioStatus(self):
pass
@unittest.skip("not implemented")
def test_SDL_GetAudioDeviceStatus(self):
pass
@unittest.skip("not implemented")
def test_SDL_PauseAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_PauseAudioDevice(self):
pass
@unittest.skip("not implemented")
def test_SDL_LoadWAV_RW(self):
pass
@unittest.skip("not implemented")
def test_SDL_LoadWAV(self):
pass
@unittest.skip("not implemented")
def test_SDL_FreeWAV(self):
pass
@unittest.skip("not implemented")
def test_SDL_BuildAudioCVT(self):
pass
@unittest.skip("not implemented")
def test_SDL_ConvertAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_MixAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_MixAudioFormat(self):
pass
@unittest.skip("not implemented")
def test_SDL_LockUnlockAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_LockUnlockAudioDevice(self):
pass
@unittest.skip("not implemented")
def test_SDL_CloseAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_QueueAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_GetQueuedAudioSize(self):
pass
@unittest.skip("not implemented")
def test_SDL_ClearQueuedAudio(self):
pass
@unittest.skip("not implemented")
def test_SDL_DequeueAudio(self):
pass
if __name__ == '__main__':
sys.exit(unittest.main())
| 44.901493 | 76 | 0.705425 | 1,792 | 15,042 | 5.646763 | 0.094308 | 0.098824 | 0.125902 | 0.095464 | 0.80087 | 0.76302 | 0.754521 | 0.734756 | 0.278684 | 0.129954 | 0 | 0.022014 | 0.199707 | 15,042 | 334 | 77 | 45.035928 | 0.818575 | 0.035767 | 0 | 0.33452 | 0 | 0 | 0.054302 | 0 | 0 | 0 | 0 | 0 | 0.423488 | 1 | 0.131673 | false | 0.074733 | 0.021352 | 0 | 0.160142 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
0264162f580417fac78ea9f6105681f8bfea68c8 | 3,693 | py | Python | 3_inference/code/src/atlas_utils/acl_logger.py | Ascend-Huawei/AVOD | ea62372517bbfa9d4020bc5ab2739ee182c63c56 | [
"BSD-2-Clause"
] | null | null | null | 3_inference/code/src/atlas_utils/acl_logger.py | Ascend-Huawei/AVOD | ea62372517bbfa9d4020bc5ab2739ee182c63c56 | [
"BSD-2-Clause"
] | null | null | null | 3_inference/code/src/atlas_utils/acl_logger.py | Ascend-Huawei/AVOD | ea62372517bbfa9d4020bc5ab2739ee182c63c56 | [
"BSD-2-Clause"
] | 1 | 2021-08-19T09:51:25.000Z | 2021-08-19T09:51:25.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import os
import acl
_ACL_DEBUG = 0
_ACL_INFO = 1
_ACL_WARNING = 2
_ACL_ERROR = 3
def log_error(*log_msg):
"""Recode error level log to file
Args:
*log_msg: format string and args list
"""
log_str = [str(i) for i in log_msg]
log_str = "".join(log_str)
print(log_str)
caller_frame = sys._getframe().f_back
# caller file
filename = caller_frame.f_code.co_filename
# caller line no
line_no = caller_frame.f_lineno
# caller function
func_name = caller_frame.f_code.co_name
message = "[" + filename + ":" + str(line_no) + \
" " + func_name + "]" + log_str
acl.app_log(_ACL_ERROR, message)
def log_warning(*log_msg):
"""Recode warning level log to file
Args:
*log_msg: format string and args list
"""
log_str = [str(i) for i in log_msg]
log_str = "".join(log_str)
caller_frame = sys._getframe().f_back
# caller file
filename = caller_frame.f_code.co_filename
# caller line no
line_no = caller_frame.f_lineno
# caller function
func_name = caller_frame.f_code.co_name
message = "[" + filename + ":" + str(line_no) + \
" " + func_name + "]" + log_str
acl.app_log(_ACL_WARNING, message)
def log_info(*log_msg):
"""Recode info level log to file
Args:
*log_msg: format string and args list
"""
log_str = [str(i) for i in log_msg]
log_str = "".join(log_str)
print(log_str)
caller_frame = sys._getframe().f_back
# caller file
filename = caller_frame.f_code.co_filename
# caller line no
line_no = caller_frame.f_lineno
# caller function
func_name = caller_frame.f_code.co_name
message = "[" + filename + ":" + str(line_no) + \
" " + func_name + "]" + log_str
acl.app_log(_ACL_INFO, message)
def log_debug(*log_msg):
"""Recode debug level log to file
Args:
*log_msg: format string and args list
"""
log_str = [str(i) for i in log_msg]
log_str = "".join(log_str)
caller_frame = sys._getframe().f_back
# caller file
filename = caller_frame.f_code.co_filename
# caller line no
line_no = caller_frame.f_lineno
# caller function
func_name = caller_frame.f_code.co_name
message = "[" + filename + ":" + str(line_no) + \
" " + func_name + "]" + log_str
acl.app_log(_ACL_DEBUG, message)
| 29.544 | 78 | 0.656377 | 538 | 3,693 | 4.29368 | 0.202602 | 0.046753 | 0.062338 | 0.055411 | 0.864935 | 0.864935 | 0.864935 | 0.864935 | 0.864935 | 0.864935 | 0 | 0.007015 | 0.227999 | 3,693 | 124 | 79 | 29.782258 | 0.803227 | 0.464121 | 0 | 0.693878 | 0 | 0 | 0.008565 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.081633 | false | 0 | 0.061224 | 0 | 0.142857 | 0.040816 | 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 |
027e39bfb75a99251b26506235f55b3992d0390b | 23,884 | py | Python | openrk/solver.py | samuelshaner/OpenRK | 6c382cd26c4c3f035e50a14f9bb59a91a8bbe682 | [
"MIT"
] | null | null | null | openrk/solver.py | samuelshaner/OpenRK | 6c382cd26c4c3f035e50a14f9bb59a91a8bbe682 | [
"MIT"
] | null | null | null | openrk/solver.py | samuelshaner/OpenRK | 6c382cd26c4c3f035e50a14f9bb59a91a8bbe682 | [
"MIT"
] | null | null | null | __author__ = 'Samuel Shaner'
__email__ = 'shaner@mit.edu'
# Import modules
import numpy as np
import checkvalue as cv
import openrk
from material import TransientMaterial
class Solver(object):
def __init__(self):
self._A_shape = None
self._AM_shape = None
self._M_shape = None
self._b_shape = None
self._A_amp = None
self._AM_amp = None
self._M_amp = None
self._b_amp = None
self._num_threads = None
self._k_eff = None
openrk.setNumThreads(1)
def set_num_threads(self, num_threads):
# Check input values
cv.check_is_int(num_threads, 'Solver number of threads', 'num threads')
self._num_threads = num_threads
class CmfdSolver(Solver):
def __init__(self, shape_mesh, amp_mesh=None):
super(CmfdSolver, self).__init__()
self._shape_mesh = shape_mesh
nc = self._shape_mesh.get_num_x() * self._shape_mesh.get_num_y()
ng = self._shape_mesh.get_num_shape_energy_groups()
self._A_shape = np.zeros((nc, ng * (ng + 4)))
self._AM_shape = np.zeros((nc, ng * (ng + 4)))
self._M_shape = np.zeros((nc, ng * ng))
self._b_shape = np.zeros(nc * ng)
if amp_mesh is not None:
self._amp_mesh = amp_mesh
nc = self._amp_mesh.get_num_x() * self._amp_mesh.get_num_y()
ng = self._shape_mesh.get_num_amp_energy_groups()
self._A_amp = np.zeros((nc, ng * (ng + 4)))
self._AM_amp = np.zeros((nc, ng * (ng + 4)))
self._M_amp = np.zeros((nc, ng * ng))
self._b_amp = np.zeros(nc * ng)
else:
self._amp_mesh = None
self._A_amp = None
self._AM_amp = None
self._M_amp = None
self._b_amp = None
def get_am_shape(self):
return self._AM_shape
def get_am_amp(self):
return self._AM_amp
def get_a_shape(self):
return self._A_shape
def get_a_amp(self):
return self._A_amp
def get_m_shape(self):
return self._M_shape
def get_m_amp(self):
return self._M_amp
def get_b_shape(self):
return self._b_shape
def get_b_amp(self):
return self._b_amp
def make_am_shape_initial(self, time='CURRENT'):
nx = self._shape_mesh.get_num_x()
ny = self._shape_mesh.get_num_y()
ng = self._shape_mesh.get_num_shape_energy_groups()
height = self._shape_mesh.get_cell_height()
width = self._shape_mesh.get_cell_width()
volume = width * height
mesh = self._shape_mesh
temps = mesh.get_temperature(time)
# reinitialize matrices to zero
self._A_shape.fill(0.0)
self._M_shape.fill(0.0)
for y in xrange(ny):
for x in xrange(nx):
cell = y*nx+x
temp = temps[cell]
for e in range(ng):
material = self._shape_mesh.get_material(y*nx+x)
# absorption term on diagonal
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += material.get_sigma_a_by_group(e, time, temp) \
* volume
# buckling term on diagonal
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += material.get_dif_coef_by_group(e, time, temp) * \
self._shape_mesh.get_buckling_by_group(e) * volume
# out scattering term on diagonal
for g in xrange(ng):
if e != g:
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += \
material.get_sigma_s_by_group(e, g, time, temp) * volume
# fission terms on diagonal
for g in xrange(ng):
self._M_shape[y * nx + x][e * ng + g] = material.get_chi_by_group(e, time, temp) * \
material.get_nu_sigma_f_by_group(g) * volume
# in scattering terms on off diagonals
for g in xrange(ng):
if e != g:
self._A_shape[y * nx + x][e * (ng + 4) + g + 2] -= \
material.get_sigma_s_by_group(g, e, time, temp) * volume
# RIGHT SURFACE
# transport term on diagonal
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += mesh.get_dif_linear_by_value(cell, e, 2) * height
# transport terms on off diagonals
if x != nx - 1:
self._A_shape[y * nx + x][e * (ng + 4) + ng + 2] -= mesh.get_dif_linear_by_value(cell, e, 2) \
* height
# LEFT SURFACE
# transport term on diagonal
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += mesh.get_dif_linear_by_value(cell, e, 0) * height
# transport terms on off diagonals
if x != 0:
self._A_shape[y * nx + x][e * (ng + 4)] -= mesh.get_dif_linear_by_value(cell, e, 0) * height
# BOTTOM SURFACE
# transport term on diagonal
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += mesh.get_dif_linear_by_value(cell, e, 1) * width
# transport terms on off diagonals
if y != 0:
self._A_shape[y * nx + x][e * (ng + 4) + 1] -= mesh.get_dif_linear_by_value(cell, e, 1) * width
# TOP SURFACE
# transport term on diagonal
self._A_shape[y * nx + x][e * (ng + 4) + e + 2] += mesh.get_dif_linear_by_value(cell, e, 3) * width
# transport terms on off diagonals
if y != ny - 1:
self._A_shape[y * nx + x][e * (ng + 4) + ng + 3] -= mesh.get_dif_linear_by_value(cell, e, 3) \
* width
def compute_initial_shape(self, tol):
# Compute the surface diffusion coefficients
self._shape_mesh.compute_dif_coefs('CURRENT')
# Create the production and loss matrices
self.make_am_shape_initial('CURRENT')
# Initialize the old source and a temporary flux variable
nx = self._shape_mesh.get_num_x()
ny = self._shape_mesh.get_num_y()
ng = self._shape_mesh.get_num_shape_energy_groups()
old_source = np.zeros(nx * ny * ng)
flux_temp = np.zeros(nx * ny * ng)
# solve the eigenvalue problem
self._k_eff = openrk.eigenvalueSolve(self._A_shape, self._M_shape, self._shape_mesh.get_flux('CURRENT'),
self._b_shape, old_source, flux_temp, ng, nx, ny, tol)
def make_am_amp(self, wt=0.5):
mesh = self._amp_mesh
am = self._AM_amp
b = self._b_amp
nx = mesh.get_num_x()
ny = mesh.get_num_y()
ng = mesh.get_num_amp_energy_groups()
height = mesh.get_cell_height()
width = mesh.get_cell_width()
volume = width * height
flux = mesh.get_flux('PREVIOUS_IN')
dt = mesh.get_clock().get_dt_inner()
temps = mesh.get_temperature('CURRENT')
temps_prev = mesh.get_temperature('PREVIOUS_IN')
# reinitialize matrices to zero
am.fill(0.0)
b.fill(0.0)
for y in xrange(ny):
for x in xrange(nx):
cell = y*nx+x
temp = temps[cell]
temp_prev = temps_prev[cell]
material = mesh.get_material(cell)
beta = 0.0
beta_prev = 0.0
for e in xrange(mesh.get_num_delayed_groups()):
beta += mesh.get_delayed_fraction_by_group(e)
beta_prev += mesh.get_delayed_fraction_by_group(e)
for e in range(ng):
# time absorption term on diagonal
am[cell][e * (ng + 4) + e + 2] += 1.0 / dt / \
material.get_velocity_by_group(e, 'CURRENT', temp) * volume
b[cell*ng+e] += flux[cell*ng+e] / dt / \
material.get_velocity_by_group(e, 'PREVIOUS_IN', temp_prev) * volume
# delayed neutron precursors
for d in xrange(mesh.get_num_delayed_groups()):
b[cell*ng+e] += wt * material.get_chi_by_group(e, 'CURRENT', temp) * \
mesh.get_decay_constant_by_group(d) * \
material.get_precursor_conc_by_group(d, 'CURRENT') * volume
b[cell*ng+e] += (1-wt) * material.get_chi_by_group(e, 'PREVIOUS_IN', temp_prev) * \
mesh.get_decay_constant_by_group(d) * \
material.get_precursor_conc_by_group(d, 'PREVIOUS_IN') * volume
# absorption term on diagonal
am[cell][e * (ng + 4) + e + 2] += volume * \
wt * material.get_sigma_a_by_group(e, 'CURRENT', temp)
b[cell*ng+e] -= volume * \
(1-wt) * material.get_sigma_a_by_group(e, 'PREVIOUS_IN', temp_prev) * flux[cell*ng+e]
# buckling term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * material.get_dif_coef_by_group(e, 'CURRENT', temp) * \
self._shape_mesh.get_buckling_by_group(e) * volume
b[cell*ng+e] -= (1-wt) * material.get_dif_coef_by_group(e, 'PREVIOUS_IN', temp_prev) * \
self._shape_mesh.get_buckling_by_group(e) * volume * flux[cell*ng+e]
# out scattering term on diagonal
for g in xrange(ng):
if e != g:
am[cell][e * (ng + 4) + e + 2] += volume * \
wt * material.get_sigma_s_by_group(e, g, 'CURRENT', temp)
b[cell*ng+e] -= volume * \
(1-wt) * material.get_sigma_s_by_group(e, g, 'PREVIOUS_IN', temp_prev) * flux[cell*ng+e]
# fission terms on diagonal
for g in xrange(ng):
am[cell][e * (ng+4) + g + 2] -= wt * (1 - beta) * material.get_chi_by_group(e, 'CURRENT', temp) * \
material.get_nu_sigma_f_by_group(g, 'CURRENT', temp) / mesh.get_k_eff_0() * volume
b[cell*ng+e] += (1-wt) * (1 - beta_prev) * material.get_chi_by_group(e, 'PREVIOUS_IN', temp_prev) * \
material.get_nu_sigma_f_by_group(g, 'PREVIOUS_IN', temp_prev) / mesh.get_k_eff_0() \
* flux[cell*ng+g] * volume
# in scattering terms on off diagonals
for g in xrange(ng):
if e != g:
am[cell][e * (ng + 4) + g + 2] -= volume * \
wt * material.get_sigma_s_by_group(g, e, 'CURRENT', temp)
b[cell*ng+e] += volume * \
(1-wt) * material.get_sigma_s_by_group(g, e, 'PREVIOUS_IN', temp_prev) * flux[cell*ng+g]
# TRANSPORT TO ADJACENT CELLS
# RIGHT SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
(mesh.get_dif_linear_by_value(cell, e, 2, 'CURRENT') -
mesh.get_dif_nonlinear_by_value(cell, e, 2, 'CURRENT')) * height
b[cell*ng+e] -= (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 2, 'PREVIOUS_IN') -
mesh.get_dif_nonlinear_by_value(cell, e, 2, 'PREVIOUS_IN')) * height * flux[cell*ng+e]
# transport terms on off diagonals
if x != nx - 1:
am[cell][e * (ng + 4) + ng + 2] -= wt * \
(mesh.get_dif_linear_by_value(cell, e, 2, 'CURRENT') +
mesh.get_dif_nonlinear_by_value(cell, e, 2, 'CURRENT')) * height
b[cell*ng+e] += (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 2, 'PREVIOUS_IN') +
mesh.get_dif_nonlinear_by_value(cell, e, 2, 'PREVIOUS_IN')) * height * flux[(cell+1)*ng+e]
# LEFT SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
(mesh.get_dif_linear_by_value(cell, e, 0, 'CURRENT') +
mesh.get_dif_nonlinear_by_value(cell, e, 0, 'CURRENT')) * height
b[cell*ng+e] -= (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 0, 'PREVIOUS_IN') +
mesh.get_dif_nonlinear_by_value(cell, e, 0, 'PREVIOUS_IN')) * height * flux[cell*ng+e]
# transport terms on off diagonals
if x != 0:
am[cell][e * (ng + 4)] -= wt * \
(mesh.get_dif_linear_by_value(cell, e, 0, 'CURRENT') -
mesh.get_dif_nonlinear_by_value(cell, e, 0, 'CURRENT')) * height
b[cell*ng+e] += (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 0, 'PREVIOUS_IN') -
mesh.get_dif_nonlinear_by_value(cell, e, 0, 'PREVIOUS_IN')) * height * flux[(cell-1)*ng+e]
# BOTTOM SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
(mesh.get_dif_linear_by_value(cell, e, 1, 'CURRENT') +
mesh.get_dif_nonlinear_by_value(cell, e, 1, 'CURRENT')) * width
b[cell*ng+e] -= (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 1, 'PREVIOUS_IN') +
mesh.get_dif_nonlinear_by_value(cell, e, 1, 'PREVIOUS_IN')) * width * flux[cell*ng+e]
# transport terms on off diagonals
if y != 0:
am[cell][e * (ng + 4) + 1] -= wt * \
(mesh.get_dif_linear_by_value(cell, e, 1, 'CURRENT') -
mesh.get_dif_nonlinear_by_value(cell, e, 1, 'CURRENT')) * width
b[cell*ng+e] += (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 1, 'PREVIOUS_IN') -
mesh.get_dif_nonlinear_by_value(cell, e, 1, 'PREVIOUS_IN')) * width * flux[(cell-nx)*ng+e]
# TOP SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
(mesh.get_dif_linear_by_value(cell, e, 3, 'CURRENT') -
mesh.get_dif_nonlinear_by_value(cell, e, 3, 'CURRENT')) * width
b[cell*ng+e] -= (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 3, 'PREVIOUS_IN') -
mesh.get_dif_nonlinear_by_value(cell, e, 3, 'PREVIOUS_IN')) * width * flux[cell*ng+e]
# transport terms on off diagonals
if y != ny - 1:
am[cell][e * (ng + 4) + ng + 3] -= wt * \
(mesh.get_dif_linear_by_value(cell, e, 3, 'CURRENT') +
mesh.get_dif_nonlinear_by_value(cell, e, 3, 'CURRENT')) * width
b[cell*ng+e] += (1-wt) * \
(mesh.get_dif_linear_by_value(cell, e, 3, 'PREVIOUS_IN') +
mesh.get_dif_nonlinear_by_value(cell, e, 3, 'PREVIOUS_IN')) * width * flux[(cell+nx)*ng+e]
def make_am_shape(self, wt=0.5):
mesh = self._shape_mesh
am = self._AM_shape
b = self._b_shape
nx = mesh.get_num_x()
ny = mesh.get_num_y()
ng = mesh.get_num_shape_energy_groups()
height = mesh.get_cell_height()
width = mesh.get_cell_width()
volume = width * height
flux = mesh.get_flux('PREVIOUS_OUT')
dt = mesh.get_clock().get_dt_outer()
temps_prev = mesh.get_temperature('PREVIOUS_OUT')
temps = mesh.get_temperature('FORWARD_OUT')
# reinitialize matrices to zero
am.fill(0.0)
b.fill(0.0)
for y in xrange(ny):
for x in xrange(nx):
cell = y*nx+x
temp = temps[cell]
temp_prev = temps_prev[cell]
material = mesh.get_material(y*nx+x)
beta = 0.0
beta_prev = 0.0
for e in xrange(mesh.get_num_delayed_groups()):
beta += mesh.get_delayed_fraction_by_group(e)
beta_prev += mesh.get_delayed_fraction_by_group(e)
for e in range(ng):
# time absorption term on diagonal
am[cell][e * (ng + 4) + e + 2] += 1.0 / dt / \
material.get_velocity_by_group(e, 'FORWARD_OUT', temp) * volume
b[cell*ng+e] += flux[cell*ng+e] / dt / \
material.get_velocity_by_group(e, 'PREVIOUS_OUT', temp_prev) * volume
# delayed neutron precursors
if isinstance(material, TransientMaterial):
for d in xrange(mesh.get_num_delayed_groups()):
b[cell*ng+e] += wt * material.get_chi_by_group(e, 'FORWARD_OUT', temp) * \
mesh.get_decay_constant_by_group(d) * \
material.get_precursor_conc_by_group(d, 'FORWARD_OUT') * volume
b[cell*ng+e] += (1-wt) * material.get_chi_by_group(e, 'PREVIOUS_OUT', temp_prev) * \
mesh.get_decay_constant_by_group(d) * \
material.get_precursor_conc_by_group(d, 'PREVIOUS_OUT') * volume
# absorption term on diagonal
am[cell][e * (ng + 4) + e + 2] += volume * \
wt * material.get_sigma_a_by_group(e, 'FORWARD_OUT', temp)
b[cell*ng+e] -= volume * \
(1-wt) * material.get_sigma_a_by_group(e, 'PREVIOUS_OUT', temp_prev) * flux[cell*ng+e]
# buckling term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * material.get_dif_coef_by_group(e, 'FORWARD_OUT', temp) * \
volume * self._amp_mesh.get_buckling_by_group(e)
b[cell*ng+e] -= (1-wt) * material.get_dif_coef_by_group(e, 'PREVIOUS_OUT', temp_prev) * \
flux[cell*ng+e] * volume * self._amp_mesh.get_buckling_by_group(e)
# out scattering term on diagonl
for g in xrange(ng):
if e != g:
am[cell][e * (ng + 4) + e + 2] += volume * \
wt * material.get_sigma_s_by_group(e, g, 'FORWARD_OUT', temp)
b[cell*ng+e] -= volume * \
(1-wt) * material.get_sigma_s_by_group(e, g, 'PREVIOUS_OUT', temp_prev) * flux[cell*ng+e]
# fission terms on diagonal
for g in xrange(ng):
am[cell][e * (ng+4) + g + 2] -= wt * (1 - beta) * material.get_chi_by_group(e, 'FORWARD_OUT', temp) * \
material.get_nu_sigma_f_by_group(g, 'FORWARD_OUT', temp) / mesh.get_k_eff_0() * volume
b[cell*ng+e] += (1-wt) * (1 - beta_prev) * material.get_chi_by_group(e, 'PREVIOUS_OUT', temp_prev) * \
material.get_nu_sigma_f_by_group(g, 'PREVIOUS_OUT', temp_prev) / mesh.get_k_eff_0() * \
flux[cell*ng+g] * volume
# in scattering terms on off diagonals
for g in xrange(ng):
if e != g:
am[cell][e * (ng + 4) + g + 2] -= \
wt * material.get_sigma_s_by_group(g, e, 'FORWARD_OUT', temp) * volume
b[cell*ng+e] += volume * \
(1-wt) * material.get_sigma_s_by_group(g, e, 'PREVIOUS_OUT', temp_prev) * flux[cell*ng+g]
# TRANSPORT TO ADJACENT CELLS
# RIGHT SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
mesh.get_dif_linear_by_value(cell, e, 2, 'FORWARD_OUT') * height
b[cell*ng+e] -= (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 2, 'PREVIOUS_OUT') * height * flux[cell*ng+e]
# transport terms on off diagonals
if x != nx - 1:
am[cell][e * (ng + 4) + ng + 2] -= wt * \
mesh.get_dif_linear_by_value(cell, e, 2, 'FORWARD_OUT') * height
b[cell*ng+e] += (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 2, 'PREVIOUS_OUT') * height * flux[(cell+1)*ng+e]
# LEFT SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
mesh.get_dif_linear_by_value(cell, e, 0, 'FORWARD_OUT') * height
b[cell*ng+e] -= (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 0, 'PREVIOUS_OUT') * height * flux[cell*ng+e]
# transport terms on off diagonals
if x != 0:
am[cell][e * (ng + 4)] -= wt * \
mesh.get_dif_linear_by_value(cell, e, 0, 'FORWARD_OUT') * height
b[cell*ng+e] += (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 0, 'PREVIOUS_OUT') * height * flux[(cell-1)*ng+e]
# BOTTOM SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
mesh.get_dif_linear_by_value(cell, e, 1, 'FORWARD_OUT') * width
b[cell*ng+e] -= (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 1, 'PREVIOUS_OUT') * width * flux[cell*ng+e]
# transport terms on off diagonals
if y != 0:
am[cell][e * (ng + 4) + 1] -= wt * \
mesh.get_dif_linear_by_value(cell, e, 1, 'FORWARD_OUT') * width
b[cell*ng+e] += (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 1, 'PREVIOUS_OUT') * width * flux[(cell-nx)*ng+e]
# TOP SURFACE
# transport term on diagonal
am[cell][e * (ng + 4) + e + 2] += wt * \
mesh.get_dif_linear_by_value(cell, e, 3, 'FORWARD_OUT') * width
b[cell*ng+e] -= (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 3, 'PREVIOUS_OUT') * width * flux[cell*ng+e]
# transport terms on off diagonals
if y != ny - 1:
am[cell][e * (ng + 4) + ng + 3] -= wt * \
mesh.get_dif_linear_by_value(cell, e, 3, 'FORWARD_OUT') * width
b[cell*ng+e] += (1-wt) * \
mesh.get_dif_linear_by_value(cell, e, 3, 'PREVIOUS_OUT') * width * flux[(cell+nx)*ng+e] | 46.376699 | 127 | 0.482289 | 3,044 | 23,884 | 3.503614 | 0.052562 | 0.074824 | 0.052508 | 0.06301 | 0.852602 | 0.829723 | 0.799156 | 0.785091 | 0.763713 | 0.724801 | 0 | 0.015271 | 0.40232 | 23,884 | 515 | 128 | 46.376699 | 0.731839 | 0.075155 | 0 | 0.462908 | 0 | 0 | 0.04518 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04451 | false | 0 | 0.011869 | 0.023739 | 0.086053 | 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 |
5a1180c32dc69b0280a9cd197a659f900bb0767e | 117 | py | Python | GFelem.py | Ei5baer/Number-theory-based-Object-Oriented-Examples- | 271616251e9d64fd6b7fdcacc6209afcb143cf25 | [
"MIT"
] | null | null | null | GFelem.py | Ei5baer/Number-theory-based-Object-Oriented-Examples- | 271616251e9d64fd6b7fdcacc6209afcb143cf25 | [
"MIT"
] | null | null | null | GFelem.py | Ei5baer/Number-theory-based-Object-Oriented-Examples- | 271616251e9d64fd6b7fdcacc6209afcb143cf25 | [
"MIT"
] | null | null | null | class GFelem():
def __init__ (val, prm, self):
assert (self.m_prime = prm)
assert (self.m_val) | 29.25 | 36 | 0.57265 | 16 | 117 | 3.8125 | 0.625 | 0.327869 | 0.360656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.299145 | 117 | 4 | 37 | 29.25 | 0.743902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | null | null | 0 | 0 | null | null | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
5a1bc9b65543b71d50febdea3b7338f0404fa861 | 3,722 | py | Python | boost/tools/build/v2/test/core_arguments.py | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 11 | 2016-04-12T16:29:29.000Z | 2021-06-28T11:01:57.000Z | boost/tools/build/v2/test/core_arguments.py | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 3 | 2018-10-31T19:35:14.000Z | 2019-06-04T17:11:27.000Z | boost/tools/build/v2/test/core_arguments.py | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 9 | 2015-09-09T02:38:32.000Z | 2021-01-30T00:24:24.000Z | #!/usr/bin/python
# Copyright 2001 Dave Abrahams
# Copyright 2011 Steven Watanabe
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
import os
t = BoostBuild.Tester(pass_toolset=0, pass_d0=False)
t.write("echo_args.jam", """
rule echo_args ( a b ? c ? : d + : e * )
{
ECHO a= $(a) b= $(b) c= $(c) ":" d= $(d) ":" e= $(e) ;
}
rule echo_varargs ( a b ? c ? : d + : e * : * )
{
ECHO a= $(a) b= $(b) c= $(c) ":" d= $(d) ":" e= $(e)
": rest= "$(4[1]) $(4[2])
": "$(5[1]) $(5[2])
": "$(6[1]) $(6[2])
": "$(7[1]) $(7[2])
": "$(8[1]) $(8[2])
": "$(9[1]) $(9[2]) ;
}
""")
t.write("file.jam", "include echo_args.jam ; echo_args ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("* missing argument a");
t.write("file.jam", "include echo_args.jam ; echo_args 1 2 : 3 : 4 : 5 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("* extra argument 5");
t.write("file.jam", "include echo_args.jam ; echo_args a b c1 c2 : d ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("* extra argument c2");
# Check modifier '?'
t.write("file.jam", "include echo_args.jam ; echo_args 1 2 3 : 4 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= 2 c= 3 : d= 4 : e=");
t.write("file.jam", "include echo_args.jam ; echo_args 1 2 : 3 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= 2 c= : d= 3 : e=");
t.write("file.jam", "include echo_args.jam ; echo_args 1 : 2 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e=");
# Check modifier '+'
t.write("file.jam", "include echo_args.jam ; echo_args 1 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("* missing argument d");
t.write("file.jam", "include echo_args.jam ; echo_args 1 : 2 3 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 3 : e=");
t.write("file.jam", "include echo_args.jam ; echo_args 1 : 2 3 4 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 3 4 : e=");
# Check modifier '*'
t.write("file.jam", "include echo_args.jam ; echo_args 1 : 2 : 3 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3");
t.write("file.jam", "include echo_args.jam ; echo_args 1 : 2 : 3 4 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4");
t.write("file.jam", "include echo_args.jam ; echo_args 1 : 2 : 3 4 5 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4 5");
#
# Check varargs
#
t.write("file.jam", "include echo_args.jam ; echo_varargs 1 : 2 : 3 4 5 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4 5");
t.write("file.jam", "include echo_args.jam ; echo_varargs 1 : 2 : 3 4 5 : 6 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6");
t.write("file.jam", "include echo_args.jam ; echo_varargs 1 : 2 : 3 4 5 : 6 7 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7");
t.write("file.jam", "include echo_args.jam ; echo_varargs 1 : 2 : 3 4 5 : 6 7 : 8 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8");
t.write("file.jam", "include echo_args.jam ; echo_varargs 1 : 2 : 3 4 5 : 6 7 : 8 : 9 ;")
t.run_build_system("-ffile.jam", status=1)
t.expect_output_line("a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8 : 9");
t.cleanup()
| 33.836364 | 89 | 0.610962 | 719 | 3,722 | 3.008345 | 0.10153 | 0.114656 | 0.09154 | 0.102173 | 0.841424 | 0.840037 | 0.840037 | 0.840037 | 0.840037 | 0.840037 | 0 | 0.062541 | 0.170876 | 3,722 | 109 | 90 | 34.146789 | 0.638367 | 0.077646 | 0 | 0.267606 | 0 | 0.098592 | 0.583577 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.014085 | 0.028169 | 0 | 0.028169 | 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 |
ce46fda60692b72463d68b80f22d6d765a609752 | 24 | py | Python | Code/Python2.7/Kattis/31sevenwonders.py | nicholasz2510/General | e2783cad4da7f9b50c952c2b91ef311d22b1d56f | [
"MIT"
] | 1 | 2019-11-21T15:56:03.000Z | 2019-11-21T15:56:03.000Z | Code/Python2.7/Kattis/31sevenwonders.py | nicholasz2510/General | e2783cad4da7f9b50c952c2b91ef311d22b1d56f | [
"MIT"
] | 12 | 2019-11-21T21:00:57.000Z | 2022-02-27T01:46:56.000Z | Code/Python2.7/Kattis/31sevenwonders.py | nicholasz2510/General | e2783cad4da7f9b50c952c2b91ef311d22b1d56f | [
"MIT"
] | 1 | 2019-11-21T20:49:18.000Z | 2019-11-21T20:49:18.000Z | from sys import stdin
| 6 | 21 | 0.75 | 4 | 24 | 4.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 24 | 3 | 22 | 8 | 1 | 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 |
cea4b16d5e2ce22cf74b68fad2eaac60e4b4c44e | 20,032 | py | Python | tests/threat_intelligence/test_victim_interface.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | 18 | 2017-01-09T22:17:49.000Z | 2022-01-24T20:46:42.000Z | tests/threat_intelligence/test_victim_interface.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | 84 | 2017-04-11T13:47:49.000Z | 2022-03-21T20:12:57.000Z | tests/threat_intelligence/test_victim_interface.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | 43 | 2017-01-05T20:40:26.000Z | 2022-03-31T19:18:02.000Z | """Test the TcEx Threat Intel Module."""
# standard library
import os
from .ti_helpers import TestThreatIntelligence, TIHelper
class TestVictim(TestThreatIntelligence):
"""Test TcEx Threat Groups."""
owner = os.getenv('TC_OWNER')
ti = None
ti_helper = None
tcex = None
def setup_method(self):
"""Configure setup before all tests."""
self.ti_helper = TIHelper('Victim')
self.ti = self.ti_helper.ti
self.tcex = self.ti_helper.tcex
def teardown_method(self):
"""Configure teardown before all tests."""
if os.getenv('TEARDOWN_METHOD') is None:
self.ti_helper.cleanup()
def tests_ti_victim_create(self):
"""Create a victim using specific interface."""
victim_data = {
'name': self.ti_helper.rand_name(),
'owner': self.owner,
}
ti = self.ti.victim(**victim_data)
ti.name = victim_data.get('name')
r = ti.create()
assert ti.as_entity
# assert response
assert r.status_code == 201
# retrieve victim for asserts
victim_data['unique_id'] = ti.unique_id
ti = self.ti.victim(**victim_data)
r = ti.single()
response_data = r.json()
ti_data = response_data.get('data', {}).get(ti.api_entity)
# validate response data
assert r.status_code == 200
assert response_data.get('status') == 'Success'
assert ti.name == ti_data.get('name')
# validate ti data
assert ti_data.get(ti.api_entity) == victim_data.get(ti.api_entity)
# cleanup victim
r = ti.delete()
assert r.status_code == 200
def tests_ti_victim_add_email_asset(self):
"""Test victim add email asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_email_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
def tests_ti_victim_add_network_asset(self):
"""Test victim add network asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_network_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
def tests_ti_victim_add_phone_asset(self):
"""Test victim add phone asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_phone_asset(self.ti_helper.rand_phone_number())
assert r.status_code == 201
def tests_ti_victim_add_social_asset(self):
"""Test victim add social asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_social_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
def tests_ti_victim_add_web_asset(self):
"""Test victim add web asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_web_asset(self.ti_helper.rand_name())
assert r.status_code == 201
def tests_ti_victim_delete_email_asset(self):
"""Test victim delete email asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_email_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimEmailAddress', {}).get('id')
r = helper_ti.delete_email_asset(asset_id)
assert r.status_code == 200
def tests_ti_victim_delete_network_asset(self):
"""Test victim delete network asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_network_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimNetworkAccount', {}).get('id')
r = helper_ti.delete_network_asset(asset_id)
assert r.status_code == 200
def tests_ti_victim_delete_phone_asset(self):
"""Test victim delete phone asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_phone_asset(self.ti_helper.rand_phone_number())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimPhone', {}).get('id')
r = helper_ti.delete_phone_asset(asset_id)
assert r.status_code == 200
def tests_ti_victim_delete_social_asset(self):
"""Test victim delete social asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_social_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimSocialNetwork', {}).get('id')
r = helper_ti.delete_social_asset(asset_id)
assert r.status_code == 200
def tests_ti_victim_delete_web_asset(self):
"""Test victim delete web asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_web_asset(self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimWebSite', {}).get('id')
r = helper_ti.delete_web_asset(asset_id)
assert r.status_code == 200
def tests_ti_victim_get_email_asset(self):
"""Test victim get email asset."""
helper_ti = self.ti_helper.create_victim()
address = self.ti_helper.rand_name()
address_type = self.ti_helper.rand_name()
r = helper_ti.add_email_asset(address, address_type)
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimEmailAddress', {}).get('id')
r = helper_ti.get_email_asset(asset_id)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimEmailAddress', {})
assert asset_json.get('address') == address
assert asset_json.get('addressType') == address_type
def tests_ti_victim_get_network_asset(self):
"""Test victim get network asset."""
helper_ti = self.ti_helper.create_victim()
account = self.ti_helper.rand_name()
network = self.ti_helper.rand_name()
r = helper_ti.add_network_asset(account, network)
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimNetworkAccount', {}).get('id')
r = helper_ti.get_network_asset(asset_id)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimNetworkAccount', {})
assert asset_json.get('account') == account
assert asset_json.get('network') == network
def tests_ti_victim_get_phone_asset(self):
"""Test victim get phone asset."""
helper_ti = self.ti_helper.create_victim()
phone_number = self.ti_helper.rand_phone_number()
r = helper_ti.add_phone_asset(phone_number)
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimPhone', {}).get('id')
r = helper_ti.get_phone_asset(asset_id)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimPhone', {})
assert asset_json.get('phoneType') == phone_number
def tests_ti_victim_get_social_asset(self):
"""Test victim get social asset."""
helper_ti = self.ti_helper.create_victim()
account = self.ti_helper.rand_name()
network = self.ti_helper.rand_name()
r = helper_ti.add_social_asset(account, network)
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimSocialNetwork', {}).get('id')
r = helper_ti.get_social_asset(asset_id)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimSocialNetwork', {})
assert asset_json.get('account') == account
assert asset_json.get('network') == network
def tests_ti_victim_get_web_asset(self):
"""Test victim get web asset."""
helper_ti = self.ti_helper.create_victim()
web_site = self.ti_helper.rand_name()
r = helper_ti.add_web_asset(web_site)
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimWebSite', {}).get('id')
r = helper_ti.get_web_asset(asset_id)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimWebSite', {})
assert asset_json.get('webSite') == web_site
def tests_ti_victim_update_email_asset(self):
"""Test victim update email asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_email_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimEmailAddress', {}).get('id')
address = self.ti_helper.rand_name()
address_type = self.ti_helper.rand_name()
r = helper_ti.update_email_asset(asset_id, address, address_type)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimEmailAddress', {})
assert asset_json.get('address') == address
assert asset_json.get('addressType') == address_type
def tests_ti_victim_update_network_asset(self):
"""Test victim update network asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_network_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimNetworkAccount', {}).get('id')
account = self.ti_helper.rand_name()
network = self.ti_helper.rand_name()
r = helper_ti.update_network_asset(asset_id, account, network)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimNetworkAccount', {})
assert asset_json.get('account') == account
assert asset_json.get('network') == network
def tests_ti_victim_update_phone_asset(self):
"""Test victim update phone asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_phone_asset(self.ti_helper.rand_phone_number())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimPhone', {}).get('id')
phone_type = self.ti_helper.rand_phone_number()
r = helper_ti.update_phone_asset(asset_id, phone_type)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimPhone', {})
assert asset_json.get('phoneType') == phone_type
def tests_ti_victim_update_social_asset(self):
"""Test victim update social asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_social_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimSocialNetwork', {}).get('id')
account = self.ti_helper.rand_name()
network = self.ti_helper.rand_name()
r = helper_ti.update_social_asset(asset_id, account, network)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimSocialNetwork', {})
assert asset_json.get('account') == account
assert asset_json.get('network') == network
def tests_ti_victim_update_web_asset(self):
"""Test victim update web asset."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_web_asset(self.ti_helper.rand_name())
assert r.status_code == 201
asset_id = r.json().get('data', {}).get('victimWebSite', {}).get('id')
web_site = self.ti_helper.rand_name()
r = helper_ti.update_web_asset(asset_id, web_site)
assert r.status_code == 200
asset_json = r.json().get('data', {}).get('victimWebSite', {})
assert asset_json.get('webSite') == web_site
def tests_ti_victim_get_web_assets(self):
"""Test victim get web assets."""
helper_ti = self.ti_helper.create_victim()
web_asset_names = [self.ti_helper.rand_name(), self.ti_helper.rand_name()]
helper_ti.add_web_asset(web_asset_names[0])
helper_ti.add_web_asset(web_asset_names[1])
counter = 0
for asset in helper_ti.web_assets():
assert asset.get('name') in web_asset_names
web_asset_names.remove(asset.get('name'))
counter += 1
assert counter == 2
def tests_ti_victim_get_phone_assets(self):
"""Test victim get phone assets."""
helper_ti = self.ti_helper.create_victim()
phone_types = [self.ti_helper.rand_name(), self.ti_helper.rand_name()]
helper_ti.add_phone_asset(phone_types[0])
helper_ti.add_phone_asset(phone_types[1])
counter = 0
for asset in helper_ti.phone_assets():
assert asset.get('name') in phone_types
phone_types.remove(asset.get('name'))
counter += 1
assert counter == 2
def tests_ti_victim_get_email_assets(self):
"""Test victim get email assets."""
helper_ti = self.ti_helper.create_victim()
addresses = [self.ti_helper.rand_name(), self.ti_helper.rand_name()]
helper_ti.add_email_asset(addresses[0], self.ti_helper.rand_name())
helper_ti.add_email_asset(addresses[1], self.ti_helper.rand_name())
counter = 0
for asset in helper_ti.email_assets():
assert asset.get('name') in addresses
addresses.remove(asset.get('name'))
counter += 1
assert counter == 2
def tests_ti_victim_get_network_assets(self):
"""Test victim get network assets."""
helper_ti = self.ti_helper.create_victim()
accounts = [self.ti_helper.rand_name(), self.ti_helper.rand_name()]
helper_ti.add_network_asset(accounts[0], self.ti_helper.rand_name())
helper_ti.add_network_asset(accounts[1], self.ti_helper.rand_name())
counter = 0
for asset in helper_ti.network_assets():
assert asset.get('name') in accounts
accounts.remove(asset.get('name'))
counter += 1
assert counter == 2
def tests_ti_victim_get_social_assets(self):
"""Test victim get social assets."""
helper_ti = self.ti_helper.create_victim()
accounts = [self.ti_helper.rand_name(), self.ti_helper.rand_name()]
helper_ti.add_social_asset(accounts[0], self.ti_helper.rand_name())
helper_ti.add_social_asset(accounts[1], self.ti_helper.rand_name())
counter = 0
for asset in helper_ti.social_assets():
assert asset.get('name') in accounts
accounts.remove(asset.get('name'))
counter += 1
assert counter == 2
def tests_ti_victim_get_assets(self):
"""Test victim get all assets."""
helper_ti = self.ti_helper.create_victim()
helper_ti.add_web_asset(self.ti_helper.rand_name())
helper_ti.add_web_asset(self.ti_helper.rand_name())
helper_ti.add_social_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
helper_ti.add_social_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
helper_ti.add_network_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
helper_ti.add_network_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
helper_ti.add_email_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
helper_ti.add_email_asset(self.ti_helper.rand_name(), self.ti_helper.rand_name())
helper_ti.add_phone_asset(self.ti_helper.rand_name())
helper_ti.add_phone_asset(self.ti_helper.rand_name())
counter = 0
for asset in helper_ti.assets():
assert str(helper_ti.unique_id) in asset.get('webLink')
counter += 1
assert counter == 10
def tests_ti_victim_add_asset_invalid(self):
"""Test victim fail on add asset with before victim has been created."""
helper_ti = self.ti.victim(name=self.ti_helper.rand_name())
try:
helper_ti.add_phone_asset(self.ti_helper.rand_name())
assert False, 'failed to catch add asset on an victim with no id.'
except RuntimeError:
assert True, 'caught add asset on an victim with no id.'
def tests_ti_victim_delete_asset_invalid(self):
"""Test victim fail on delete asset with before victim has been created."""
helper_ti = self.ti.victim(name=self.ti_helper.rand_name())
try:
helper_ti.delete_phone_asset(1)
assert False, 'failed to catch delete asset on an victim with no id.'
except RuntimeError:
assert True, 'caught add asset on an victim with no id.'
def tests_ti_victim_add_asset_no_body(self):
"""Test victim return error on add asset with no body."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_asset('phone', None)
assert r.status_code == 400
def tests_ti_victim_add_asset_no_type_invalid(self):
"""Test victim fail on add asset with no asset type."""
helper_ti = self.ti_helper.create_victim()
try:
helper_ti.add_asset(
None,
{'address': self.ti_helper.rand_name(), 'addressType': self.ti_helper.rand_name()},
)
assert False, 'failed to catch add asset on an victim with no type.'
except RuntimeError:
assert True, 'caught add asset on an victim with no type.'
def tests_ti_victim_delete_asset_no_type_invalid(self):
"""Test victim fail on delete asset with no asset type."""
helper_ti = self.ti_helper.create_victim()
try:
helper_ti.delete_asset(1, None)
assert False, 'failed to catch delete asset on an victim with no type.'
except RuntimeError:
assert True, 'caught delete asset on an victim with no type.'
def tests_ti_victim_get_assets_invalid(self):
"""Test victim fail on get assets when no victim id is present."""
helper_ti = self.ti.victim(name=self.ti_helper.rand_name())
try:
helper_ti.assets()
assert False, 'failed to catch get assets on an victim with no id.'
except RuntimeError:
assert True, 'caught get assets on an victim with no id.'
def tests_ti_victim_get_asset_invalid(self):
"""Test victim fail on get asset when no victim id is present."""
helper_ti = self.ti.victim(name=self.ti_helper.rand_name())
try:
helper_ti.get_phone_asset(1)
assert False, 'failed to catch get asset on an victim with no id.'
except RuntimeError:
assert True, 'caught get asset on an victim with no id.'
def tests_ti_victim_get_asset_no_type_invalid(self):
"""Test victim fail on get asset with no asset type."""
helper_ti = self.ti_helper.create_victim()
try:
helper_ti.get_asset(1, None)
assert False, 'failed to catch get asset on an victim with no id.'
except RuntimeError:
assert True, 'caught get asset on an victim with no id.'
def tests_ti_victim_update_asset_no_body(self):
"""Test victim error on update asset with no body."""
helper_ti = self.ti_helper.create_victim()
r = helper_ti.add_phone_asset(self.ti_helper.rand_name())
asset_id = r.json().get('data', {}).get('victimPhone', {}).get('id')
r = helper_ti.update_asset('phone', asset_id)
assert r.status_code == 400
def tests_ti_victim_update_asset_no_type_invalid(self):
"""Test victim fail on update asset with no asset type."""
helper_ti = self.ti_helper.create_victim()
try:
helper_ti.update_asset(None, None)
assert False, 'failed to catch update asset on an victim with no type.'
except RuntimeError:
assert True, 'caught update asset on an victim with no type.'
| 41.38843 | 99 | 0.644569 | 2,779 | 20,032 | 4.350846 | 0.04462 | 0.061533 | 0.116119 | 0.107187 | 0.902407 | 0.832355 | 0.788272 | 0.77628 | 0.743032 | 0.692829 | 0 | 0.009969 | 0.233876 | 20,032 | 483 | 100 | 41.47412 | 0.777872 | 0.082169 | 0 | 0.591837 | 0 | 0 | 0.086933 | 0 | 0 | 0 | 0 | 0 | 0.25656 | 1 | 0.113703 | false | 0 | 0.005831 | 0 | 0.134111 | 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 |
ceb46f7b8b87885e84b4c51fcb3c8b10fed95e03 | 96 | py | Python | glx/font/__init__.py | NeilGirdhar/glx | 643abc73e05f94ea56a00deb927a3978f01184f2 | [
"MIT"
] | 3 | 2018-04-18T02:42:36.000Z | 2020-09-06T15:48:17.000Z | glx/font/__init__.py | NeilGirdhar/glx | 643abc73e05f94ea56a00deb927a3978f01184f2 | [
"MIT"
] | 1 | 2020-07-12T22:36:45.000Z | 2020-07-13T14:20:32.000Z | glx/font/__init__.py | NeilGirdhar/glx | 643abc73e05f94ea56a00deb927a3978f01184f2 | [
"MIT"
] | 1 | 2021-04-27T14:53:34.000Z | 2021-04-27T14:53:34.000Z | from .atlas import *
from .code_lookup import *
from .display_list import *
from .font import *
| 19.2 | 27 | 0.75 | 14 | 96 | 5 | 0.571429 | 0.428571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 96 | 4 | 28 | 24 | 0.875 | 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 |
0ca5f26d121180444b848ed317478ef7a1e9a301 | 233 | py | Python | src/util/error.py | tubone24/tech_blog_spider | f91feea445d87d31e81bd920c7d386e42c495aee | [
"MIT"
] | null | null | null | src/util/error.py | tubone24/tech_blog_spider | f91feea445d87d31e81bd920c7d386e42c495aee | [
"MIT"
] | 7 | 2021-06-25T07:50:21.000Z | 2021-11-06T04:44:55.000Z | src/util/error.py | rcy1314/spider-feed | fbab76c8e221053f611cadd4d27642ef8725e76d | [
"MIT"
] | 1 | 2022-02-10T21:05:13.000Z | 2022-02-10T21:05:13.000Z | class EmptyLastPublishedRecordError(BaseException):
pass
class DeclarationDuplicateInstanceError(BaseException):
pass
class NoPublishDateError(BaseException):
pass
class NoEntrySummaryError(BaseException):
pass
| 15.533333 | 55 | 0.802575 | 16 | 233 | 11.6875 | 0.4375 | 0.363636 | 0.352941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145923 | 233 | 14 | 56 | 16.642857 | 0.939698 | 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 |
0cd63e38fbaba43bae0862128a6fbb0acdb6b4a9 | 51 | py | Python | pymock/matcher/matcher.py | diddi-/pymock | 53acd56a0e239bdc521e02a12bab81c4ec65115c | [
"MIT"
] | 1 | 2020-12-17T11:20:41.000Z | 2020-12-17T11:20:41.000Z | pymock/matcher/matcher.py | diddi-/pymock | 53acd56a0e239bdc521e02a12bab81c4ec65115c | [
"MIT"
] | null | null | null | pymock/matcher/matcher.py | diddi-/pymock | 53acd56a0e239bdc521e02a12bab81c4ec65115c | [
"MIT"
] | null | null | null | from abc import ABC
class Matcher(ABC):
pass
| 8.5 | 19 | 0.686275 | 8 | 51 | 4.375 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.254902 | 51 | 5 | 20 | 10.2 | 0.921053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
0ce1ca500f6c544a2c3427d07e6d39a00990b04d | 2,853 | py | Python | scripts/dynamics.py | korzhimanov/vlasov-solver | ffaeb5ae5a0f756a933d6e353b026e4df98c15c9 | [
"MIT"
] | 6 | 2016-09-22T04:17:52.000Z | 2021-04-17T00:13:33.000Z | scripts/dynamics.py | korzhimanov/vlasov-solver | ffaeb5ae5a0f756a933d6e353b026e4df98c15c9 | [
"MIT"
] | null | null | null | scripts/dynamics.py | korzhimanov/vlasov-solver | ffaeb5ae5a0f756a933d6e353b026e4df98c15c9 | [
"MIT"
] | 4 | 2016-11-23T02:28:23.000Z | 2020-09-29T01:03:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
import gzip
import matplotlib.pyplot as plt
from init import sail as inp
data_size = inp.MAX_Z
energy_data_size = 100000
prefix = 'output'
fig = plt.figure(figsize=(16, 12))
fd = gzip.open('{0}/conc0.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.double)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(231)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
fd = gzip.open('{0}/conc1.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.double)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(232)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
fd = gzip.open('{0}/conc2.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.double)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(233)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
fd = gzip.open('{0}/ex.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.double)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(234)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
fd = gzip.open('{0}/ey.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.double)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(235)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
fd = gzip.open('{0}/ez.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.double)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(236)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
'''
fd = gzip.open('{0}/conc2.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.float32)
b = np.reshape(a, (-1, data_size))
ax = fig.add_subplot(325)
cax = ax.matshow(b, aspect='auto')
fig.colorbar(cax)
'''
'''
energy_lim = 600.;
fd = gzip.open('{3}/{0}_{1}_{2}/output/energy0.gz'.format(i1, i2, i3, prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.int32)
b = np.reshape(a, (-1, energy_data_size))
b1 = b + 1
b_log = np.log(b1)
ax = fig.add_subplot(322)
ax.set_xlim(0, energy_lim/3000.*energy_data_size)
cax = ax.matshow(b_log, aspect='auto', vmin=0, vmax=5)
fig.colorbar(cax)
fd = gzip.open('{3}/{0}_{1}_{2}/output/energy1.gz'.format(i1, i2, i3, prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.int32)
b = np.reshape(a, (-1, energy_data_size))
b1 = b + 1
b_log = np.log(b1)
ax = fig.add_subplot(324)
ax.set_xlim(0, energy_lim/3000.*energy_data_size*56./24.)
cax = ax.matshow(b_log, aspect='auto', vmin=0, vmax=3)
fig.colorbar(cax)
fd = gzip.open('{3}/{0}_{1}_{2}/output/energy2.gz'.format(i1, i2, i3, prefix), 'rb')
a = np.frombuffer(fd.read(), dtype=np.int32)
b = np.reshape(a, (-1, energy_data_size))
b1 = b + 1
b_log = np.log(b1)
ax = fig.add_subplot(326)
ax.set_xlim(0, energy_lim/3000.*energy_data_size*197./69.)
cax = ax.matshow(b_log, aspect='auto', vmin=0, vmax=5)
fig.colorbar(cax)
'''
plt.show()
| 25.473214 | 84 | 0.662461 | 522 | 2,853 | 3.521073 | 0.180077 | 0.065288 | 0.054407 | 0.059848 | 0.847116 | 0.847116 | 0.847116 | 0.847116 | 0.836235 | 0.816104 | 0 | 0.053776 | 0.113565 | 2,853 | 111 | 85 | 25.702703 | 0.672993 | 0.013319 | 0 | 0.533333 | 0 | 0 | 0.07047 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.088889 | 0 | 0.088889 | 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 |
0b65eaa2c7fd4fdac06b8c6d21ff27f376234c8d | 222 | py | Python | src/decisionengine/framework/tests/PublisherWithMissingConsumes.py | moibenko/decisionengine | 4c458e0c225ec2ce1e82d56e752724983331b7d1 | [
"Apache-2.0"
] | 9 | 2018-06-11T20:06:50.000Z | 2020-10-01T17:02:02.000Z | src/decisionengine/framework/tests/PublisherWithMissingConsumes.py | moibenko/decisionengine | 4c458e0c225ec2ce1e82d56e752724983331b7d1 | [
"Apache-2.0"
] | 551 | 2018-06-25T21:06:37.000Z | 2022-03-31T13:47:32.000Z | src/decisionengine/framework/tests/PublisherWithMissingConsumes.py | goodenou/decisionengine | b203e2c493cf501562accf1013c6257c348711b7 | [
"Apache-2.0"
] | 70 | 2018-06-11T20:07:01.000Z | 2022-02-10T16:18:24.000Z | # SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from decisionengine.framework.modules import Publisher
class PublisherWithMissingConsumes(Publisher.Publisher):
pass
| 24.666667 | 59 | 0.81982 | 24 | 222 | 7.583333 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.030303 | 0.108108 | 222 | 8 | 60 | 27.75 | 0.888889 | 0.418919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
0b73ad8e4b5dbc4e6e7da5684ee60e6d0edab980 | 102 | py | Python | Chapter 01/Chap01_Example1.179.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.179.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.179.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | print(str(3)) # -- st1
print(str(3.2)) # -- st2
print(str(3+2j)) # -- st3
print(str('Four')) # -- st4
| 20.4 | 27 | 0.529412 | 18 | 102 | 3 | 0.555556 | 0.592593 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104651 | 0.156863 | 102 | 4 | 28 | 25.5 | 0.523256 | 0.264706 | 0 | 0 | 0 | 0 | 0.057143 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
f0721145b9e4e12e50e2e738061ab8c8ea69c68f | 41 | py | Python | automatminer/featurization/__init__.py | sgbaird/automatminer | 9a3996e37672b547f10645b53b816ee670940d56 | [
"BSD-3-Clause-LBNL"
] | 92 | 2018-11-28T17:36:42.000Z | 2022-03-26T07:45:22.000Z | automatminer/featurization/__init__.py | sgbaird/automatminer | 9a3996e37672b547f10645b53b816ee670940d56 | [
"BSD-3-Clause-LBNL"
] | 249 | 2018-11-30T22:09:15.000Z | 2022-01-06T22:25:12.000Z | automatminer/featurization/__init__.py | sgbaird/automatminer | 9a3996e37672b547f10645b53b816ee670940d56 | [
"BSD-3-Clause-LBNL"
] | 41 | 2018-11-21T22:33:52.000Z | 2022-03-03T02:24:32.000Z | from .core import AutoFeaturizer # noqa
| 20.5 | 40 | 0.780488 | 5 | 41 | 6.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170732 | 41 | 1 | 41 | 41 | 0.941176 | 0.097561 | 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 |
b2ba7bb61b01a7724340524a89ecefd80c342bfc | 137 | py | Python | src/testproject/decorator/__init__.py | bbornhau/python-opensdk | f6f6baf202598c9d234b3314f8e44fbd10a0f427 | [
"Apache-2.0"
] | 38 | 2021-02-04T06:38:13.000Z | 2022-03-25T05:41:28.000Z | src/testproject/decorator/__init__.py | bbornhau/python-opensdk | f6f6baf202598c9d234b3314f8e44fbd10a0f427 | [
"Apache-2.0"
] | 47 | 2020-07-08T05:13:03.000Z | 2021-02-01T10:17:58.000Z | src/testproject/decorator/__init__.py | bbornhau/python-opensdk | f6f6baf202598c9d234b3314f8e44fbd10a0f427 | [
"Apache-2.0"
] | 17 | 2021-02-28T23:46:17.000Z | 2022-01-26T05:02:59.000Z | from .report import report
from .report_assertion_errors import report_assertion_errors
__all__ = ["report", "report_assertion_errors"]
| 27.4 | 60 | 0.832117 | 17 | 137 | 6.117647 | 0.352941 | 0.432692 | 0.605769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094891 | 137 | 4 | 61 | 34.25 | 0.83871 | 0 | 0 | 0 | 0 | 0 | 0.211679 | 0.167883 | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
b2c4e1bb01186a6e90b0a5737b3c63ead9d751f9 | 218 | py | Python | cBugReport_foAnalyzeException_STATUS_BREAKPOINT.py | SkyLined/cBugId | fde6d3eff9d73c71fe6ac81c975c1a3e43afad3c | [
"CC-BY-4.0"
] | 22 | 2016-08-11T14:50:55.000Z | 2021-06-06T09:39:26.000Z | cBugReport_foAnalyzeException_STATUS_BREAKPOINT.py | SkyLined/cBugId | fde6d3eff9d73c71fe6ac81c975c1a3e43afad3c | [
"CC-BY-4.0"
] | 19 | 2016-09-07T05:54:40.000Z | 2020-07-02T07:46:38.000Z | cBugReport_foAnalyzeException_STATUS_BREAKPOINT.py | SkyLined/cBugId | fde6d3eff9d73c71fe6ac81c975c1a3e43afad3c | [
"CC-BY-4.0"
] | 11 | 2016-09-03T22:42:50.000Z | 2018-10-01T18:28:59.000Z | def cBugReport_foAnalyzeException_STATUS_BREAKPOINT(oBugReport, oProcess, oThread, oException):
oProcess.oCdbWrapper.oASanErrorDetector.fAddInformationToBugReport(oBugReport, oProcess, oThread);
return oBugReport;
| 54.5 | 100 | 0.866972 | 18 | 218 | 10.333333 | 0.722222 | 0.193548 | 0.268817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.06422 | 218 | 3 | 101 | 72.666667 | 0.911765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 1 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
b2d124a43b026c88c9414543ed38cfcf9dc43167 | 94 | py | Python | survae/tests/nn/__init__.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 262 | 2020-07-05T20:57:44.000Z | 2022-03-28T02:24:43.000Z | survae/tests/nn/__init__.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 17 | 2020-08-15T05:43:34.000Z | 2022-01-31T12:24:21.000Z | survae/tests/nn/__init__.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 35 | 2020-08-24T06:55:37.000Z | 2022-02-11T05:17:58.000Z | from .base import ModuleTest
from .layers import *
from .blocks import *
from .nets import *
| 15.666667 | 28 | 0.744681 | 13 | 94 | 5.384615 | 0.538462 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.180851 | 94 | 5 | 29 | 18.8 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b2dad32c37460e3f1982869aa119bc40893ac773 | 119 | py | Python | statistics/__init__.py | mec-correcaotextual/dataset_agnostic_segmentation | 201bf0aa137692855f3eb7a3ec1aa1f5535abadf | [
"MIT"
] | 36 | 2018-01-07T18:26:25.000Z | 2022-02-01T17:17:38.000Z | statistics/__init__.py | mec-correcaotextual/dataset_agnostic_segmentation | 201bf0aa137692855f3eb7a3ec1aa1f5535abadf | [
"MIT"
] | 3 | 2018-09-06T14:19:04.000Z | 2019-06-04T13:50:27.000Z | statistics/__init__.py | mec-correcaotextual/dataset_agnostic_segmentation | 201bf0aa137692855f3eb7a3ec1aa1f5535abadf | [
"MIT"
] | 12 | 2018-02-20T11:42:48.000Z | 2022-02-01T22:44:34.000Z | from statistics.phocs import update_phoc_stats
from statistics.segmentation import update_segmentation_stats, train_viz | 59.5 | 72 | 0.907563 | 16 | 119 | 6.4375 | 0.625 | 0.271845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.067227 | 119 | 2 | 72 | 59.5 | 0.927928 | 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 |
b2debd917f2d49d72bad77e7a016092146edf694 | 91 | py | Python | src/api/algorithm/__init__.py | moevm/nosql1h19-text-graph | 410f156ad4f232f8aa060d43692ab020610ddfd4 | [
"MIT"
] | null | null | null | src/api/algorithm/__init__.py | moevm/nosql1h19-text-graph | 410f156ad4f232f8aa060d43692ab020610ddfd4 | [
"MIT"
] | null | null | null | src/api/algorithm/__init__.py | moevm/nosql1h19-text-graph | 410f156ad4f232f8aa060d43692ab020610ddfd4 | [
"MIT"
] | null | null | null | from .abstract import *
from .dictionary import *
from .dummy import *
from .diff import *
| 18.2 | 25 | 0.736264 | 12 | 91 | 5.583333 | 0.5 | 0.447761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.175824 | 91 | 4 | 26 | 22.75 | 0.893333 | 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 |
3327e1e4b56f8c17769ea0bbc3f3263813bb2f5d | 43,249 | py | Python | unrolled-lutnet/training-software/binarization_utils.py | awai54st/LUTNet | 81b044f31d1131bee1a7fae41fc4d2fb102ea73a | [
"BSD-2-Clause"
] | 38 | 2019-10-28T10:06:33.000Z | 2022-02-21T21:38:39.000Z | unrolled-lutnet/training-software/binarization_utils.py | awai54st/LUTNet | 81b044f31d1131bee1a7fae41fc4d2fb102ea73a | [
"BSD-2-Clause"
] | null | null | null | unrolled-lutnet/training-software/binarization_utils.py | awai54st/LUTNet | 81b044f31d1131bee1a7fae41fc4d2fb102ea73a | [
"BSD-2-Clause"
] | 13 | 2019-10-28T10:17:48.000Z | 2021-08-10T21:37:11.000Z | import numpy as np
import pickle
import matplotlib.pyplot as plt
import matplotlib
import tensorflow as tf
import keras
from keras.models import Sequential, Model
from keras.layers import Dense, Convolution2D, Activation, Flatten, MaxPooling2D,Input,Dropout,GlobalAveragePooling2D
from keras import backend as K
from keras.datasets import cifar10
from keras.utils import np_utils
from keras.optimizers import SGD
from keras.engine.topology import Layer
from keras.models import load_model
from keras.preprocessing.image import ImageDataGenerator
import os
from keras.layers.normalization import BatchNormalization
from tensorflow.python.framework import ops
#from multi_gpu import make_parallel
def binarize(x):
'''Element-wise rounding to the closest integer with full gradient propagation.
A trick from [Sergey Ioffe](http://stackoverflow.com/a/36480182)
'''
clipped = K.clip(x,-1,1)
rounded = K.sign(clipped)
return clipped + K.stop_gradient(rounded - clipped)
class Residual_sign(Layer):
def __init__(self, levels=1,trainable=True,**kwargs):
self.levels=levels
self.trainable=trainable
super(Residual_sign, self).__init__(**kwargs)
def build(self, input_shape):
ars=np.arange(self.levels)+1.0
ars=ars[::-1]
means=ars/np.sum(ars)
#self.means=[K.variable(m) for m in means]
#self.trainable_weights=self.means
self.means = self.add_weight(name='means',
shape=(self.levels, ),
initializer=keras.initializers.Constant(value=means),
trainable=self.trainable) # Trainable scaling factors for residual binarisation
def call(self, x, mask=None):
resid = x
out_bin=0
if self.levels==1:
for l in range(self.levels):
#out=binarize(resid)*K.abs(self.means[l])
out=binarize(resid)*abs(self.means[l])
#out_bin=out_bin+out
out_bin=out_bin+out#no gamma per level
resid=resid-out
elif self.levels==2:
out=binarize(resid)*abs(self.means[0])
out_bin=out
resid=resid-out
out=binarize(resid)*abs(self.means[1])
out_bin=tf.stack([out_bin,out])
resid=resid-out
return out_bin
def get_output_shape_for(self,input_shape):
if self.levels==1:
return input_shape
else:
return (self.levels, input_shape)
def compute_output_shape(self,input_shape):
if self.levels==1:
return input_shape
else:
return (self.levels, input_shape)
def set_means(self,X):
means=np.zeros((self.levels))
means[0]=1
resid=np.clip(X,-1,1)
approx=0
for l in range(self.levels):
m=np.mean(np.absolute(resid))
out=np.sign(resid)*m
approx=approx+out
resid=resid-out
means[l]=m
err=np.mean((approx-np.clip(X,-1,1))**2)
means=means/np.sum(means)
sess=K.get_session()
sess.run(self.means.assign(means))
class binary_conv(Layer):
def __init__(self,nfilters,ch_in,k,padding,strides=(1,1),levels=1,pruning_prob=0,first_layer=False,LUT=True,BINARY=True,**kwargs):
self.nfilters=nfilters
self.ch_in=ch_in
self.k=k
self.padding=padding
if padding=='valid':
self.PADDING = "VALID"
elif padding=='same':
self.PADDING = "SAME"
self.strides=strides
self.levels=levels
self.first_layer=first_layer
self.LUT=LUT
self.BINARY=BINARY
self.window_size=self.ch_in*self.k*self.k
#self.rand_map=np.random.randint(self.window_size, size=[self.window_size, 1]) # Randomisation map for subsequent input connections
super(binary_conv,self).__init__(**kwargs)
def build(self, input_shape):
self.rand_map_0 = self.add_weight(name='rand_map_0',
shape=(self.window_size, 1),
initializer=keras.initializers.Constant(value=np.random.randint(self.window_size, size=[self.window_size, 1])),
trainable=False) # Randomisation map for subsequent input connections
self.rand_map_1 = self.add_weight(name='rand_map_1',
shape=(self.window_size, 1),
initializer=keras.initializers.Constant(value=np.random.randint(self.window_size, size=[self.window_size, 1])),
trainable=False) # Randomisation map for subsequent input connections
self.rand_map_2 = self.add_weight(name='rand_map_2',
shape=(self.window_size, 1),
initializer=keras.initializers.Constant(value=np.random.randint(self.window_size, size=[self.window_size, 1])),
trainable=False) # Randomisation map for subsequent input connections
stdv=1/np.sqrt(self.k*self.k*self.ch_in)
self.gamma=K.variable(1.0)
# if self.first_layer==True:
# w1 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
# w2 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
# w3 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
# w4 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
#
# self.w1=K.variable(w1)
# self.w2=K.variable(w2)
# self.w3=K.variable(w3)
# self.w4=K.variable(w4)
# self.trainable_weights=[self.w1,self.w2,self.w3,self.w4,self.gamma]
if self.levels==1 or self.first_layer==True:
w = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
self.w=K.variable(w)
self.trainable_weights=[self.w,self.gamma]
elif self.levels==2:
if self.LUT==True:
w1 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w2 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w3 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w4 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w5 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w6 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w7 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w8 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w9 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w10 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w11 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w12 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w13 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w14 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w15 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w16 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w17 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w18 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w19 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w20 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w21 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w22 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w23 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w24 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w25 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w26 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w27 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w28 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w29 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w30 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w31 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w32 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
self.w1=K.variable(w1)
self.w2=K.variable(w2)
self.w3=K.variable(w3)
self.w4=K.variable(w4)
self.w5=K.variable(w5)
self.w6=K.variable(w6)
self.w7=K.variable(w7)
self.w8=K.variable(w8)
self.w9=K.variable(w9)
self.w10=K.variable(w10)
self.w11=K.variable(w11)
self.w12=K.variable(w12)
self.w13=K.variable(w13)
self.w14=K.variable(w14)
self.w15=K.variable(w15)
self.w16=K.variable(w16)
self.w17=K.variable(w17)
self.w18=K.variable(w18)
self.w19=K.variable(w19)
self.w20=K.variable(w20)
self.w21=K.variable(w21)
self.w22=K.variable(w22)
self.w23=K.variable(w23)
self.w24=K.variable(w24)
self.w25=K.variable(w25)
self.w26=K.variable(w26)
self.w27=K.variable(w27)
self.w28=K.variable(w28)
self.w29=K.variable(w29)
self.w30=K.variable(w30)
self.w31=K.variable(w31)
self.w32=K.variable(w32)
self.trainable_weights=[self.w1,self.w2,self.w3,self.w4,self.w5,self.w6,self.w7,self.w8,self.w9,self.w10,self.w11,self.w12,self.w13,self.w14,self.w15,self.w16,self.w17,self.w18,self.w19,self.w20,self.w21,self.w22,self.w23,self.w24,self.w25,self.w26,self.w27,self.w28,self.w29,self.w30,self.w31,self.w32,self.gamma]
else:
w = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
self.w=K.variable(w)
self.trainable_weights=[self.w,self.gamma]
elif self.levels==3:
if self.LUT==True:
w1 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w2 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w3 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w4 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w5 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w6 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w7 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
w8 = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
self.w1=K.variable(w1)
self.w2=K.variable(w2)
self.w3=K.variable(w3)
self.w4=K.variable(w4)
self.w5=K.variable(w5)
self.w6=K.variable(w6)
self.w7=K.variable(w7)
self.w8=K.variable(w8)
self.trainable_weights=[self.w1,self.w2,self.w3,self.w4,self.w5,self.w6,self.w7,self.w8,self.gamma]
else:
w = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
self.w=K.variable(w)
self.trainable_weights=[self.w,self.gamma]
self.pruning_mask = self.add_weight(name='pruning_mask',
shape=(self.window_size,self.nfilters),
initializer=keras.initializers.Constant(value=np.ones((self.window_size,self.nfilters))),
trainable=False) # LUT pruning based on whether inputs get repeated
# if keras.backend._backend=="mxnet":
# w=w.transpose(3,2,0,1)
# if self.levels==1:#train baseline with no resid gamma scaling
# w = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
# self.w=K.variable(w)
# self.trainable_weights=[self.w,self.gamma]
# elif self.levels==2:
# w = np.random.normal(loc=0.0, scale=stdv,size=[self.k,self.k,self.ch_in,self.nfilters]).astype(np.float32)
# self.w=K.variable(w)
# self.trainable_weights=[self.w,self.gamma]
def call(self, x,mask=None):
constraint_gamma=K.abs(self.gamma)#K.clip(self.gamma,0.01,10)
if self.levels==1 or self.first_layer==True:
if self.BINARY==False:
self.clamped_w=constraint_gamma*K.clip(self.w,-1,1)
else:
self.clamped_w=constraint_gamma*binarize(self.w)
elif self.levels==2:
if self.LUT==True:
if self.BINARY==False:
self.clamped_w1=constraint_gamma*K.clip(self.w1,-1,1)
self.clamped_w2=constraint_gamma*K.clip(self.w2,-1,1)
self.clamped_w3=constraint_gamma*K.clip(self.w3,-1,1)
self.clamped_w4=constraint_gamma*K.clip(self.w4,-1,1)
self.clamped_w5=constraint_gamma*K.clip(self.w5,-1,1)
self.clamped_w6=constraint_gamma*K.clip(self.w6,-1,1)
self.clamped_w7=constraint_gamma*K.clip(self.w7,-1,1)
self.clamped_w8=constraint_gamma*K.clip(self.w8,-1,1)
self.clamped_w9=constraint_gamma*K.clip(self.w9,-1,1)
self.clamped_w10=constraint_gamma*K.clip(self.w10,-1,1)
self.clamped_w11=constraint_gamma*K.clip(self.w11,-1,1)
self.clamped_w12=constraint_gamma*K.clip(self.w12,-1,1)
self.clamped_w13=constraint_gamma*K.clip(self.w13,-1,1)
self.clamped_w14=constraint_gamma*K.clip(self.w14,-1,1)
self.clamped_w15=constraint_gamma*K.clip(self.w15,-1,1)
self.clamped_w16=constraint_gamma*K.clip(self.w16,-1,1)
self.clamped_w17=constraint_gamma*K.clip(self.w17,-1,1)
self.clamped_w18=constraint_gamma*K.clip(self.w18,-1,1)
self.clamped_w19=constraint_gamma*K.clip(self.w19,-1,1)
self.clamped_w20=constraint_gamma*K.clip(self.w20,-1,1)
self.clamped_w21=constraint_gamma*K.clip(self.w21,-1,1)
self.clamped_w22=constraint_gamma*K.clip(self.w22,-1,1)
self.clamped_w23=constraint_gamma*K.clip(self.w23,-1,1)
self.clamped_w24=constraint_gamma*K.clip(self.w24,-1,1)
self.clamped_w25=constraint_gamma*K.clip(self.w25,-1,1)
self.clamped_w26=constraint_gamma*K.clip(self.w26,-1,1)
self.clamped_w27=constraint_gamma*K.clip(self.w27,-1,1)
self.clamped_w28=constraint_gamma*K.clip(self.w28,-1,1)
self.clamped_w29=constraint_gamma*K.clip(self.w29,-1,1)
self.clamped_w30=constraint_gamma*K.clip(self.w30,-1,1)
self.clamped_w31=constraint_gamma*K.clip(self.w31,-1,1)
self.clamped_w32=constraint_gamma*K.clip(self.w32,-1,1)
else:
self.clamped_w1=constraint_gamma*binarize(self.w1)
self.clamped_w2=constraint_gamma*binarize(self.w2)
self.clamped_w3=constraint_gamma*binarize(self.w3)
self.clamped_w4=constraint_gamma*binarize(self.w4)
self.clamped_w5=constraint_gamma*binarize(self.w5)
self.clamped_w6=constraint_gamma*binarize(self.w6)
self.clamped_w7=constraint_gamma*binarize(self.w7)
self.clamped_w8=constraint_gamma*binarize(self.w8)
self.clamped_w9=constraint_gamma*binarize(self.w9)
self.clamped_w10=constraint_gamma*binarize(self.w10)
self.clamped_w11=constraint_gamma*binarize(self.w11)
self.clamped_w12=constraint_gamma*binarize(self.w12)
self.clamped_w13=constraint_gamma*binarize(self.w13)
self.clamped_w14=constraint_gamma*binarize(self.w14)
self.clamped_w15=constraint_gamma*binarize(self.w15)
self.clamped_w16=constraint_gamma*binarize(self.w16)
self.clamped_w17=constraint_gamma*binarize(self.w17)
self.clamped_w18=constraint_gamma*binarize(self.w18)
self.clamped_w19=constraint_gamma*binarize(self.w19)
self.clamped_w20=constraint_gamma*binarize(self.w20)
self.clamped_w21=constraint_gamma*binarize(self.w21)
self.clamped_w22=constraint_gamma*binarize(self.w22)
self.clamped_w23=constraint_gamma*binarize(self.w23)
self.clamped_w24=constraint_gamma*binarize(self.w24)
self.clamped_w25=constraint_gamma*binarize(self.w25)
self.clamped_w26=constraint_gamma*binarize(self.w26)
self.clamped_w27=constraint_gamma*binarize(self.w27)
self.clamped_w28=constraint_gamma*binarize(self.w28)
self.clamped_w29=constraint_gamma*binarize(self.w29)
self.clamped_w30=constraint_gamma*binarize(self.w30)
self.clamped_w31=constraint_gamma*binarize(self.w31)
self.clamped_w32=constraint_gamma*binarize(self.w32)
else:
if self.BINARY==False:
self.clamped_w=constraint_gamma*K.clip(self.w,-1,1)
else:
self.clamped_w=constraint_gamma*binarize(self.w)
if keras.__version__[0]=='2':
if self.levels==1 or self.first_layer==True:
self.out=K.conv2d(x, kernel=self.clamped_w*tf.reshape(self.pruning_mask, [self.k, self.k, self.ch_in, self.nfilters]), padding=self.padding,strides=self.strides )
elif self.levels==2:
if self.LUT==True:
x0_patches = tf.extract_image_patches(x[0,:,:,:,:],
[1, self.k, self.k, 1],
[1, self.strides[0], self.strides[1], 1], [1, 1, 1, 1],
padding=self.PADDING)
x1_patches = tf.extract_image_patches(x[1,:,:,:,:],
[1, self.k, self.k, 1],
[1, self.strides[0], self.strides[1], 1], [1, 1, 1, 1],
padding=self.PADDING)
# Special hack for randomising the subsequent input connections: tensorflow does not support advanced matrix indexing
x0_shuf_patches=tf.transpose(x0_patches, perm=[3, 0, 1, 2])
x0_shuf_patches_0 = tf.gather_nd(x0_shuf_patches, tf.cast(self.rand_map_0, tf.int32))
x0_shuf_patches_1 = tf.gather_nd(x0_shuf_patches, tf.cast(self.rand_map_1, tf.int32))
x0_shuf_patches_2 = tf.gather_nd(x0_shuf_patches, tf.cast(self.rand_map_2, tf.int32))
x0_shuf_patches_0=tf.transpose(x0_shuf_patches_0, perm=[1, 2, 3, 0])
x0_shuf_patches_1=tf.transpose(x0_shuf_patches_1, perm=[1, 2, 3, 0])
x0_shuf_patches_2=tf.transpose(x0_shuf_patches_2, perm=[1, 2, 3, 0])
x1_shuf_patches=tf.transpose(x1_patches, perm=[3, 0, 1, 2])
x1_shuf_patches_0 = tf.gather_nd(x1_shuf_patches, tf.cast(self.rand_map_0, tf.int32))
x1_shuf_patches_1 = tf.gather_nd(x1_shuf_patches, tf.cast(self.rand_map_1, tf.int32))
x1_shuf_patches_2 = tf.gather_nd(x1_shuf_patches, tf.cast(self.rand_map_2, tf.int32))
x1_shuf_patches_0=tf.transpose(x1_shuf_patches_0, perm=[1, 2, 3, 0])
x1_shuf_patches_1=tf.transpose(x1_shuf_patches_1, perm=[1, 2, 3, 0])
x1_shuf_patches_2=tf.transpose(x1_shuf_patches_2, perm=[1, 2, 3, 0])
x0_pos=(1+binarize(x0_patches))/2*abs(x0_patches)
x0_neg=(1-binarize(x0_patches))/2*abs(x0_patches)
x1_pos=(1+binarize(x1_patches))/2*abs(x1_patches)
x1_neg=(1-binarize(x1_patches))/2*abs(x1_patches)
x0s0_pos=(1+binarize(x0_shuf_patches_0))/2
x0s0_neg=(1-binarize(x0_shuf_patches_0))/2
x1s0_pos=(1+binarize(x1_shuf_patches_0))/2
x1s0_neg=(1-binarize(x1_shuf_patches_0))/2
x0s1_pos=(1+binarize(x0_shuf_patches_1))/2
x0s1_neg=(1-binarize(x0_shuf_patches_1))/2
x1s1_pos=(1+binarize(x1_shuf_patches_1))/2
x1s1_neg=(1-binarize(x1_shuf_patches_1))/2
x0s2_pos=(1+binarize(x0_shuf_patches_2))/2
x0s2_neg=(1-binarize(x0_shuf_patches_2))/2
x1s2_pos=(1+binarize(x1_shuf_patches_2))/2
x1s2_neg=(1-binarize(x1_shuf_patches_2))/2
self.out= K.dot(x0_pos*x0s0_pos*x0s1_pos*x0s2_pos, tf.reshape(self.clamped_w1, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_pos*x0s1_pos*x0s2_neg, tf.reshape(self.clamped_w2, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_pos*x0s1_neg*x0s2_pos, tf.reshape(self.clamped_w3, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_pos*x0s1_neg*x0s2_neg, tf.reshape(self.clamped_w4, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_neg*x0s1_pos*x0s2_pos, tf.reshape(self.clamped_w5, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_neg*x0s1_pos*x0s2_neg, tf.reshape(self.clamped_w6, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_neg*x0s1_neg*x0s2_pos, tf.reshape(self.clamped_w7, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_pos*x0s0_neg*x0s1_neg*x0s2_neg, tf.reshape(self.clamped_w8, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_pos*x0s1_pos*x0s2_pos, tf.reshape(self.clamped_w9, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_pos*x0s1_pos*x0s2_neg, tf.reshape(self.clamped_w10, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_pos*x0s1_neg*x0s2_pos, tf.reshape(self.clamped_w11, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_pos*x0s1_neg*x0s2_neg, tf.reshape(self.clamped_w12, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_neg*x0s1_pos*x0s2_pos, tf.reshape(self.clamped_w13, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_neg*x0s1_pos*x0s2_neg, tf.reshape(self.clamped_w14, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_neg*x0s1_neg*x0s2_pos, tf.reshape(self.clamped_w15, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x0_neg*x0s0_neg*x0s1_neg*x0s2_neg, tf.reshape(self.clamped_w16, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_pos*x1s1_pos*x1s2_pos, tf.reshape(self.clamped_w17, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_pos*x1s1_pos*x1s2_neg, tf.reshape(self.clamped_w18, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_pos*x1s1_neg*x1s2_pos, tf.reshape(self.clamped_w19, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_pos*x1s1_neg*x1s2_neg, tf.reshape(self.clamped_w20, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_neg*x1s1_pos*x1s2_pos, tf.reshape(self.clamped_w21, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_neg*x1s1_pos*x1s2_neg, tf.reshape(self.clamped_w22, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_neg*x1s1_neg*x1s2_pos, tf.reshape(self.clamped_w23, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_pos*x1s0_neg*x1s1_neg*x1s2_neg, tf.reshape(self.clamped_w24, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_pos*x1s1_pos*x1s2_pos, tf.reshape(self.clamped_w25, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_pos*x1s1_pos*x1s2_neg, tf.reshape(self.clamped_w26, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_pos*x1s1_neg*x1s2_pos, tf.reshape(self.clamped_w27, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_pos*x1s1_neg*x1s2_neg, tf.reshape(self.clamped_w28, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_neg*x1s1_pos*x1s2_pos, tf.reshape(self.clamped_w29, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_neg*x1s1_pos*x1s2_neg, tf.reshape(self.clamped_w30, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_neg*x1s1_neg*x1s2_pos, tf.reshape(self.clamped_w31, [-1, self.nfilters])*self.pruning_mask)
self.out=self.out+K.dot(x1_neg*x1s0_neg*x1s1_neg*x1s2_neg, tf.reshape(self.clamped_w32, [-1, self.nfilters])*self.pruning_mask)
#self.out=K.conv2d(x_pos[0,:,:,:,:]*xs_pos[0,:,:,:,:], kernel=self.clamped_w1, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_pos[0,:,:,:,:]*xs_neg[0,:,:,:,:], kernel=self.clamped_w2, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_neg[0,:,:,:,:]*xs_pos[0,:,:,:,:], kernel=self.clamped_w3, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_neg[0,:,:,:,:]*xs_neg[0,:,:,:,:], kernel=self.clamped_w4, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_pos[1,:,:,:,:]*xs_pos[1,:,:,:,:], kernel=self.clamped_w5, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_pos[1,:,:,:,:]*xs_neg[1,:,:,:,:], kernel=self.clamped_w6, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_neg[1,:,:,:,:]*xs_pos[1,:,:,:,:], kernel=self.clamped_w7, padding=self.padding,strides=self.strides )
#self.out=self.out+K.conv2d(x_neg[1,:,:,:,:]*xs_neg[1,:,:,:,:], kernel=self.clamped_w8, padding=self.padding,strides=self.strides )
else:
x_expanded=0
for l in range(self.levels):
x_in=x[l,:,:,:,:]
x_expanded=x_expanded+x_in
self.out=K.conv2d(x_expanded, kernel=self.clamped_w*tf.reshape(self.pruning_mask, [self.k, self.k, self.ch_in, self.nfilters]), padding=self.padding,strides=self.strides )
self.output_dim=self.out.get_shape()
return self.out
def get_output_shape_for(self,input_shape):
return (input_shape[0], self.output_dim[1],self.output_dim[2],self.output_dim[3])
def compute_output_shape(self,input_shape):
return (input_shape[0], self.output_dim[1],self.output_dim[2],self.output_dim[3])
class binary_dense(Layer):
def __init__(self,n_in,n_out,levels=1,pruning_prob=0,first_layer=False,LUT=True,BINARY=True,**kwargs):
self.n_in=n_in
self.n_out=n_out
self.levels=levels
self.LUT=LUT
self.BINARY=BINARY
self.first_layer=first_layer
super(binary_dense,self).__init__(**kwargs)
def build(self, input_shape):
self.rand_map_0 = self.add_weight(name='rand_map_0',
shape=(self.n_in, 1),
initializer=keras.initializers.Constant(value=np.random.randint(self.n_in, size=[self.n_in, 1])),
trainable=False) # Randomisation map for subsequent input connections
self.rand_map_1 = self.add_weight(name='rand_map_1',
shape=(self.n_in, 1),
initializer=keras.initializers.Constant(value=np.random.randint(self.n_in, size=[self.n_in, 1])),
trainable=False) # Randomisation map for subsequent input connections
self.rand_map_2 = self.add_weight(name='rand_map_2',
shape=(self.n_in, 1),
initializer=keras.initializers.Constant(value=np.random.randint(self.n_in, size=[self.n_in, 1])),
trainable=False) # Randomisation map for subsequent input connections
stdv=1/np.sqrt(self.n_in)
self.gamma=K.variable(1.0)
if self.levels==1 or self.first_layer==True:
w = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
self.w=K.variable(w)
self.trainable_weights=[self.w,self.gamma]
elif self.levels==2:
if self.LUT==True:
w1 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w2 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w3 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w4 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w5 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w6 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w7 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w8 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w9 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w10 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w11 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w12 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w13 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w14 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w15 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w16 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w17 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w18 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w19 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w20 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w21 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w22 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w23 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w24 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w25 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w26 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w27 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w28 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w29 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w30 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w31 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w32 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
self.w1=K.variable(w1)
self.w2=K.variable(w2)
self.w3=K.variable(w3)
self.w4=K.variable(w4)
self.w5=K.variable(w5)
self.w6=K.variable(w6)
self.w7=K.variable(w7)
self.w8=K.variable(w8)
self.w9=K.variable(w9)
self.w10=K.variable(w10)
self.w11=K.variable(w11)
self.w12=K.variable(w12)
self.w13=K.variable(w13)
self.w14=K.variable(w14)
self.w15=K.variable(w15)
self.w16=K.variable(w16)
self.w17=K.variable(w17)
self.w18=K.variable(w18)
self.w19=K.variable(w19)
self.w20=K.variable(w20)
self.w21=K.variable(w21)
self.w22=K.variable(w22)
self.w23=K.variable(w23)
self.w24=K.variable(w24)
self.w25=K.variable(w25)
self.w26=K.variable(w26)
self.w27=K.variable(w27)
self.w28=K.variable(w28)
self.w29=K.variable(w29)
self.w30=K.variable(w30)
self.w31=K.variable(w31)
self.w32=K.variable(w32)
self.trainable_weights=[self.w1,self.w2,self.w3,self.w4,self.w5,self.w6,self.w7,self.w8,self.w9,self.w10,self.w11,self.w12,self.w13,self.w14,self.w15,self.w16,self.w17,self.w18,self.w19,self.w20,self.w21,self.w22,self.w23,self.w24,self.w25,self.w26,self.w27,self.w28,self.w29,self.w30,self.w31,self.w32,self.gamma]
else:
w = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
self.w=K.variable(w)
self.trainable_weights=[self.w,self.gamma]
elif self.levels==3:
if self.LUT==True:
w1 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w2 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w3 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w4 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w5 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w6 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w7 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
w8 = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
self.w1=K.variable(w1)
self.w2=K.variable(w2)
self.w3=K.variable(w3)
self.w4=K.variable(w4)
self.w5=K.variable(w5)
self.w6=K.variable(w6)
self.w7=K.variable(w7)
self.w8=K.variable(w8)
self.trainable_weights=[self.w1,self.w2,self.w3,self.w4,self.w5,self.w6,self.w7,self.w8,self.gamma]
else:
w = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
self.w=K.variable(w)
self.trainable_weights=[self.w,self.gamma]
self.pruning_mask = self.add_weight(name='pruning_mask',
shape=(self.n_in,self.n_out),
initializer=keras.initializers.Constant(value=np.ones((self.n_in,self.n_out))),
trainable=False) # LUT pruning based on whether inputs get repeated
# elif self.levels==2:#train baseline without resid gamma scaling
# w = np.random.normal(loc=0.0, scale=stdv,size=[self.n_in,self.n_out]).astype(np.float32)
# self.w=K.variable(w)
# self.trainable_weights=[self.w,self.gamma]
def call(self, x,mask=None):
constraint_gamma=K.abs(self.gamma)#K.clip(self.gamma,0.01,10)
if self.levels==1 or self.first_layer==True:
if self.BINARY==False:
self.clamped_w=constraint_gamma*K.clip(self.w,-1,1)
else:
self.clamped_w=constraint_gamma*binarize(self.w)
self.out=K.dot(x,self.clamped_w)
elif self.levels==2:
if self.LUT==True:
if self.BINARY==False:
self.clamped_w1=constraint_gamma*K.clip(self.w1,-1,1)
self.clamped_w2=constraint_gamma*K.clip(self.w2,-1,1)
self.clamped_w3=constraint_gamma*K.clip(self.w3,-1,1)
self.clamped_w4=constraint_gamma*K.clip(self.w4,-1,1)
self.clamped_w5=constraint_gamma*K.clip(self.w5,-1,1)
self.clamped_w6=constraint_gamma*K.clip(self.w6,-1,1)
self.clamped_w7=constraint_gamma*K.clip(self.w7,-1,1)
self.clamped_w8=constraint_gamma*K.clip(self.w8,-1,1)
self.clamped_w9=constraint_gamma*K.clip(self.w9,-1,1)
self.clamped_w10=constraint_gamma*K.clip(self.w10,-1,1)
self.clamped_w11=constraint_gamma*K.clip(self.w11,-1,1)
self.clamped_w12=constraint_gamma*K.clip(self.w12,-1,1)
self.clamped_w13=constraint_gamma*K.clip(self.w13,-1,1)
self.clamped_w14=constraint_gamma*K.clip(self.w14,-1,1)
self.clamped_w15=constraint_gamma*K.clip(self.w15,-1,1)
self.clamped_w16=constraint_gamma*K.clip(self.w16,-1,1)
self.clamped_w17=constraint_gamma*K.clip(self.w17,-1,1)
self.clamped_w18=constraint_gamma*K.clip(self.w18,-1,1)
self.clamped_w19=constraint_gamma*K.clip(self.w19,-1,1)
self.clamped_w20=constraint_gamma*K.clip(self.w20,-1,1)
self.clamped_w21=constraint_gamma*K.clip(self.w21,-1,1)
self.clamped_w22=constraint_gamma*K.clip(self.w22,-1,1)
self.clamped_w23=constraint_gamma*K.clip(self.w23,-1,1)
self.clamped_w24=constraint_gamma*K.clip(self.w24,-1,1)
self.clamped_w25=constraint_gamma*K.clip(self.w25,-1,1)
self.clamped_w26=constraint_gamma*K.clip(self.w26,-1,1)
self.clamped_w27=constraint_gamma*K.clip(self.w27,-1,1)
self.clamped_w28=constraint_gamma*K.clip(self.w28,-1,1)
self.clamped_w29=constraint_gamma*K.clip(self.w29,-1,1)
self.clamped_w30=constraint_gamma*K.clip(self.w30,-1,1)
self.clamped_w31=constraint_gamma*K.clip(self.w31,-1,1)
self.clamped_w32=constraint_gamma*K.clip(self.w32,-1,1)
else:
self.clamped_w1=constraint_gamma*binarize(self.w1)
self.clamped_w2=constraint_gamma*binarize(self.w2)
self.clamped_w3=constraint_gamma*binarize(self.w3)
self.clamped_w4=constraint_gamma*binarize(self.w4)
self.clamped_w5=constraint_gamma*binarize(self.w5)
self.clamped_w6=constraint_gamma*binarize(self.w6)
self.clamped_w7=constraint_gamma*binarize(self.w7)
self.clamped_w8=constraint_gamma*binarize(self.w8)
self.clamped_w9=constraint_gamma*binarize(self.w9)
self.clamped_w10=constraint_gamma*binarize(self.w10)
self.clamped_w11=constraint_gamma*binarize(self.w11)
self.clamped_w12=constraint_gamma*binarize(self.w12)
self.clamped_w13=constraint_gamma*binarize(self.w13)
self.clamped_w14=constraint_gamma*binarize(self.w14)
self.clamped_w15=constraint_gamma*binarize(self.w15)
self.clamped_w16=constraint_gamma*binarize(self.w16)
self.clamped_w17=constraint_gamma*binarize(self.w17)
self.clamped_w18=constraint_gamma*binarize(self.w18)
self.clamped_w19=constraint_gamma*binarize(self.w19)
self.clamped_w20=constraint_gamma*binarize(self.w20)
self.clamped_w21=constraint_gamma*binarize(self.w21)
self.clamped_w22=constraint_gamma*binarize(self.w22)
self.clamped_w23=constraint_gamma*binarize(self.w23)
self.clamped_w24=constraint_gamma*binarize(self.w24)
self.clamped_w25=constraint_gamma*binarize(self.w25)
self.clamped_w26=constraint_gamma*binarize(self.w26)
self.clamped_w27=constraint_gamma*binarize(self.w27)
self.clamped_w28=constraint_gamma*binarize(self.w28)
self.clamped_w29=constraint_gamma*binarize(self.w29)
self.clamped_w30=constraint_gamma*binarize(self.w30)
self.clamped_w31=constraint_gamma*binarize(self.w31)
self.clamped_w32=constraint_gamma*binarize(self.w32)
# Special hack for randomising the subsequent input connections: tensorflow does not support advanced matrix indexing
shuf_x=tf.transpose(x, perm=[2, 0, 1])
shuf_x_0 = tf.gather_nd(shuf_x, tf.cast(self.rand_map_0, tf.int32))
shuf_x_1 = tf.gather_nd(shuf_x, tf.cast(self.rand_map_1, tf.int32))
shuf_x_2 = tf.gather_nd(shuf_x, tf.cast(self.rand_map_2, tf.int32))
shuf_x_0=tf.transpose(shuf_x_0, perm=[1, 2, 0])
shuf_x_1=tf.transpose(shuf_x_1, perm=[1, 2, 0])
shuf_x_2=tf.transpose(shuf_x_2, perm=[1, 2, 0])
x_pos=(1+binarize(x))/2*abs(x)
x_neg=(1-binarize(x))/2*abs(x)
xs0_pos=(1+binarize(shuf_x_0))/2
xs0_neg=(1-binarize(shuf_x_0))/2
xs1_pos=(1+binarize(shuf_x_1))/2
xs1_neg=(1-binarize(shuf_x_1))/2
xs2_pos=(1+binarize(shuf_x_2))/2
xs2_neg=(1-binarize(shuf_x_2))/2
self.out= K.dot(x_pos[0,:,:]*xs0_pos[0,:,:]*xs1_pos[0,:,:]*xs2_pos[0,:,:],self.clamped_w1*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_pos[0,:,:]*xs1_pos[0,:,:]*xs2_neg[0,:,:],self.clamped_w2*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_pos[0,:,:]*xs1_neg[0,:,:]*xs2_pos[0,:,:],self.clamped_w3*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_pos[0,:,:]*xs1_neg[0,:,:]*xs2_neg[0,:,:],self.clamped_w4*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_neg[0,:,:]*xs1_pos[0,:,:]*xs2_pos[0,:,:],self.clamped_w5*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_neg[0,:,:]*xs1_pos[0,:,:]*xs2_neg[0,:,:],self.clamped_w6*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_neg[0,:,:]*xs1_neg[0,:,:]*xs2_pos[0,:,:],self.clamped_w7*self.pruning_mask)
self.out=self.out+K.dot(x_pos[0,:,:]*xs0_neg[0,:,:]*xs1_neg[0,:,:]*xs2_neg[0,:,:],self.clamped_w8*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_pos[0,:,:]*xs1_pos[0,:,:]*xs2_pos[0,:,:],self.clamped_w9*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_pos[0,:,:]*xs1_pos[0,:,:]*xs2_neg[0,:,:],self.clamped_w10*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_pos[0,:,:]*xs1_neg[0,:,:]*xs2_pos[0,:,:],self.clamped_w11*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_pos[0,:,:]*xs1_neg[0,:,:]*xs2_neg[0,:,:],self.clamped_w12*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_neg[0,:,:]*xs1_pos[0,:,:]*xs2_pos[0,:,:],self.clamped_w13*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_neg[0,:,:]*xs1_pos[0,:,:]*xs2_neg[0,:,:],self.clamped_w14*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_neg[0,:,:]*xs1_neg[0,:,:]*xs2_pos[0,:,:],self.clamped_w15*self.pruning_mask)
self.out=self.out+K.dot(x_neg[0,:,:]*xs0_neg[0,:,:]*xs1_neg[0,:,:]*xs2_neg[0,:,:],self.clamped_w16*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_pos[1,:,:]*xs1_pos[1,:,:]*xs2_pos[1,:,:],self.clamped_w17*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_pos[1,:,:]*xs1_pos[1,:,:]*xs2_neg[1,:,:],self.clamped_w18*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_pos[1,:,:]*xs1_neg[1,:,:]*xs2_pos[1,:,:],self.clamped_w19*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_pos[1,:,:]*xs1_neg[1,:,:]*xs2_neg[1,:,:],self.clamped_w20*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_neg[1,:,:]*xs1_pos[1,:,:]*xs2_pos[1,:,:],self.clamped_w21*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_neg[1,:,:]*xs1_pos[1,:,:]*xs2_neg[1,:,:],self.clamped_w22*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_neg[1,:,:]*xs1_neg[1,:,:]*xs2_pos[1,:,:],self.clamped_w23*self.pruning_mask)
self.out=self.out+K.dot(x_pos[1,:,:]*xs0_neg[1,:,:]*xs1_neg[1,:,:]*xs2_neg[1,:,:],self.clamped_w24*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_pos[1,:,:]*xs1_pos[1,:,:]*xs2_pos[1,:,:],self.clamped_w25*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_pos[1,:,:]*xs1_pos[1,:,:]*xs2_neg[1,:,:],self.clamped_w26*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_pos[1,:,:]*xs1_neg[1,:,:]*xs2_pos[1,:,:],self.clamped_w27*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_pos[1,:,:]*xs1_neg[1,:,:]*xs2_neg[1,:,:],self.clamped_w28*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_neg[1,:,:]*xs1_pos[1,:,:]*xs2_pos[1,:,:],self.clamped_w29*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_neg[1,:,:]*xs1_pos[1,:,:]*xs2_neg[1,:,:],self.clamped_w30*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_neg[1,:,:]*xs1_neg[1,:,:]*xs2_pos[1,:,:],self.clamped_w31*self.pruning_mask)
self.out=self.out+K.dot(x_neg[1,:,:]*xs0_neg[1,:,:]*xs1_neg[1,:,:]*xs2_neg[1,:,:],self.clamped_w32*self.pruning_mask)
else:
x_expanded=0
# self.clamped_w=constraint_gamma*K.clip(self.w,-1,1)
self.clamped_w=constraint_gamma*binarize(self.w)
for l in range(self.levels):
x_expanded=x_expanded+x[l,:,:]
self.out=K.dot(x_expanded,self.clamped_w*self.pruning_mask)
return self.out
def get_output_shape_for(self,input_shape):
return (input_shape[0], self.n_out)
def compute_output_shape(self,input_shape):
return (input_shape[0], self.n_out)
class my_flat(Layer):
def __init__(self,**kwargs):
super(my_flat,self).__init__(**kwargs)
def build(self, input_shape):
return
def call(self, x, mask=None):
self.out=tf.reshape(x,[-1,np.prod(x.get_shape().as_list()[1:])])
return self.out
def compute_output_shape(self,input_shape):
shpe=(input_shape[0],int(np.prod(input_shape[1:])))
return shpe
| 57.511968 | 318 | 0.710791 | 7,703 | 43,249 | 3.826951 | 0.034143 | 0.079107 | 0.032973 | 0.053631 | 0.912344 | 0.895892 | 0.874182 | 0.853659 | 0.830015 | 0.827199 | 0 | 0.06425 | 0.107517 | 43,249 | 751 | 319 | 57.588549 | 0.699474 | 0.084256 | 0 | 0.608025 | 0 | 0 | 0.002732 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032407 | false | 0 | 0.027778 | 0.007716 | 0.089506 | 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 |
336a90b40ce1c467393981e85055986485aadb2a | 59,133 | py | Python | sloth/parsers/SLComp18Lexer.py | katelaan/sloth | f487911c4e6850253c592cf65280390f39e24a87 | [
"MIT"
] | 2 | 2018-07-09T10:10:52.000Z | 2021-04-02T14:56:00.000Z | sloth/parsers/SLComp18Lexer.py | katelaan/sloth | f487911c4e6850253c592cf65280390f39e24a87 | [
"MIT"
] | null | null | null | sloth/parsers/SLComp18Lexer.py | katelaan/sloth | f487911c4e6850253c592cf65280390f39e24a87 | [
"MIT"
] | null | null | null | # Generated from SLComp18.g4 by ANTLR 4.7.1
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2u")
buf.write("\u05fc\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r")
buf.write("\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23")
buf.write("\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30")
buf.write("\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36")
buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%")
buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.")
buf.write("\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64")
buf.write("\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:")
buf.write("\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\t")
buf.write("C\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\t")
buf.write("L\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\t")
buf.write("U\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4")
buf.write("^\t^\4_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4")
buf.write("g\tg\4h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4")
buf.write("p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4")
buf.write("y\ty\4z\tz\4{\t{\4|\t|\4}\t}\3\2\3\2\7\2\u00fe\n\2\f\2")
buf.write("\16\2\u0101\13\2\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3")
buf.write("\6\3\6\6\6\u010e\n\6\r\6\16\6\u010f\3\6\3\6\3\7\3\7\3")
buf.write("\7\6\7\u0117\n\7\r\7\16\7\u0118\3\7\3\7\3\b\3\b\3\b\3")
buf.write("\b\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n")
buf.write("\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13")
buf.write("\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\r")
buf.write("\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3")
buf.write("\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3")
buf.write("\16\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20")
buf.write("\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22")
buf.write("\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23")
buf.write("\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25")
buf.write("\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26")
buf.write("\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30")
buf.write("\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31")
buf.write("\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32")
buf.write("\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32")
buf.write("\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33")
buf.write("\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34")
buf.write("\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35")
buf.write("\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35")
buf.write("\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36")
buf.write("\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37")
buf.write("\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3")
buf.write(" \3 \3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3!\3!\3")
buf.write("!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"")
buf.write("\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3")
buf.write("$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3")
buf.write("%\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'")
buf.write("\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3")
buf.write(")\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3")
buf.write("*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3")
buf.write(",\3,\3,\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3")
buf.write(".\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3")
buf.write(".\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3")
buf.write("/\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3")
buf.write("\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3\63\3\63")
buf.write("\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\64\3\64")
buf.write("\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\65")
buf.write("\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\66\3\66\3\66")
buf.write("\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67")
buf.write("\3\67\3\67\3\67\3\67\3\67\3\67\3\67\38\38\39\39\3:\3:")
buf.write("\3:\3;\3;\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3<\3<\3<\3=\3")
buf.write("=\3=\3=\3=\3=\3=\3>\3>\3>\3>\3>\3>\3>\3>\3>\3>\3>\3>\3")
buf.write("?\3?\3?\3?\3?\3?\3?\3@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3B\3")
buf.write("B\3B\3B\3B\3B\3B\3B\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3")
buf.write("E\3E\3E\7E\u0369\nE\fE\16E\u036c\13E\5E\u036e\nE\3F\6")
buf.write("F\u0371\nF\rF\16F\u0372\3G\3G\3G\3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d\3")
buf.write("d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3e\3e\3f\3f\3f\3f\3f\3f\3")
buf.write("f\3f\3f\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3")
buf.write("h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3h\3")
buf.write("h\3h\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3i\3")
buf.write("i\3i\3i\3i\3i\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3")
buf.write("j\3j\3j\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3")
buf.write("k\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3")
buf.write("l\3l\3l\3l\3l\3l\3l\3l\3l\3l\3m\3m\3m\3m\3m\3m\3m\3m\3")
buf.write("m\3m\3m\3m\3m\3m\3m\3m\3m\3m\3m\3m\3m\3n\3n\3n\3n\3n\3")
buf.write("n\3n\3n\3n\3n\3n\3n\3n\3o\3o\3o\3o\3o\3o\3o\3o\3o\3o\3")
buf.write("o\3o\3o\3o\3o\3o\3p\3p\3p\3p\3p\3p\3p\3p\3p\3p\3p\3p\3")
buf.write("p\3p\3p\3p\3p\3p\3p\3p\3p\3p\3p\3p\3q\3q\3q\3q\3q\3q\3")
buf.write("q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3")
buf.write("q\3q\3q\3q\3q\3r\3r\3r\3r\3r\3r\3r\3r\3r\3r\3r\3r\3r\3")
buf.write("s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3s\3t\3")
buf.write("t\3t\3t\3t\3t\3t\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
buf.write("u\3u\3u\3u\3u\3u\3u\3v\3v\3v\3v\3v\3v\3v\3v\3w\3w\3w\3")
buf.write("w\3w\3w\3w\3w\3x\3x\3x\3x\3x\3x\3x\3x\3x\3x\3y\3y\3y\3")
buf.write("y\3y\3y\3y\3y\3z\3z\3z\3z\3z\3z\3z\3z\3z\3z\3z\3{\3{\3")
buf.write("{\3{\3{\3{\3{\3{\3{\3|\3|\3|\7|\u05f1\n|\f|\16|\u05f4")
buf.write("\13|\3}\6}\u05f7\n}\r}\16}\u05f8\3}\3}\2\2~\3\3\5\4\7")
buf.write("\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17")
buf.write("\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63")
buf.write("\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-")
buf.write("Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u<w=y>{?}")
buf.write("@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008d")
buf.write("H\u008fI\u0091\2\u0093J\u0095\2\u0097\2\u0099\2\u009b")
buf.write("\2\u009d\2\u009f\2\u00a1\2\u00a3\2\u00a5K\u00a7L\u00a9")
buf.write("M\u00abN\u00adO\u00afP\u00b1Q\u00b3R\u00b5S\u00b7T\u00b9")
buf.write("U\u00bbV\u00bdW\u00bfX\u00c1Y\u00c3Z\u00c5[\u00c7\\\u00c9")
buf.write("]\u00cb^\u00cd_\u00cf`\u00d1a\u00d3b\u00d5c\u00d7d\u00d9")
buf.write("e\u00dbf\u00ddg\u00dfh\u00e1i\u00e3j\u00e5k\u00e7l\u00e9")
buf.write("m\u00ebn\u00edo\u00efp\u00f1q\u00f3r\u00f5s\u00f7t\u00f9")
buf.write("u\3\2\f\4\2\f\f\17\17\3\2\63;\5\2\62;CHch\3\2\62;\n\2")
buf.write("##&(,-/\61>\\`ac|\u0080\u0080\3\2\62\63\4\2\"\u0080\u0082")
buf.write("\1\5\2\"#%\u0080\u0082\1\6\2\"]_}\177\u0080\u0082\1\5")
buf.write("\2\13\f\17\17\"\"\2\u0601\2\3\3\2\2\2\2\5\3\2\2\2\2\7")
buf.write("\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2")
buf.write("\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2")
buf.write("\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2")
buf.write("\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2")
buf.write("\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63")
buf.write("\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2")
buf.write("\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2")
buf.write("\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3")
buf.write("\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y")
buf.write("\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2")
buf.write("c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2")
buf.write("\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2")
buf.write("\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3")
buf.write("\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2")
buf.write("\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d")
buf.write("\3\2\2\2\2\u008f\3\2\2\2\2\u0093\3\2\2\2\2\u00a5\3\2\2")
buf.write("\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad")
buf.write("\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2")
buf.write("\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb")
buf.write("\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2")
buf.write("\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9")
buf.write("\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2")
buf.write("\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7")
buf.write("\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2")
buf.write("\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5")
buf.write("\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2")
buf.write("\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3")
buf.write("\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2")
buf.write("\2\3\u00fb\3\2\2\2\5\u0104\3\2\2\2\7\u0106\3\2\2\2\t\u0108")
buf.write("\3\2\2\2\13\u010a\3\2\2\2\r\u0113\3\2\2\2\17\u011c\3\2")
buf.write("\2\2\21\u0120\3\2\2\2\23\u0125\3\2\2\2\25\u0139\3\2\2")
buf.write("\2\27\u013f\3\2\2\2\31\u0145\3\2\2\2\33\u0154\3\2\2\2")
buf.write("\35\u015f\3\2\2\2\37\u0165\3\2\2\2!\u016c\3\2\2\2#\u0170")
buf.write("\3\2\2\2%\u0178\3\2\2\2\'\u017f\3\2\2\2)\u0184\3\2\2\2")
buf.write("+\u018c\3\2\2\2-\u0198\3\2\2\2/\u019e\3\2\2\2\61\u01a5")
buf.write("\3\2\2\2\63\u01af\3\2\2\2\65\u01c2\3\2\2\2\67\u01ce\3")
buf.write("\2\2\29\u01dc\3\2\2\2;\u01ed\3\2\2\2=\u01ff\3\2\2\2?\u020b")
buf.write("\3\2\2\2A\u0218\3\2\2\2C\u0225\3\2\2\2E\u0230\3\2\2\2")
buf.write("G\u023f\3\2\2\2I\u024f\3\2\2\2K\u025b\3\2\2\2M\u0260\3")
buf.write("\2\2\2O\u0265\3\2\2\2Q\u0274\3\2\2\2S\u0283\3\2\2\2U\u028c")
buf.write("\3\2\2\2W\u0296\3\2\2\2Y\u02a1\3\2\2\2[\u02ab\3\2\2\2")
buf.write("]\u02c1\3\2\2\2_\u02d0\3\2\2\2a\u02da\3\2\2\2c\u02de\3")
buf.write("\2\2\2e\u02e3\3\2\2\2g\u02e9\3\2\2\2i\u02fa\3\2\2\2k\u0303")
buf.write("\3\2\2\2m\u030d\3\2\2\2o\u0318\3\2\2\2q\u031a\3\2\2\2")
buf.write("s\u031c\3\2\2\2u\u031f\3\2\2\2w\u0326\3\2\2\2y\u032e\3")
buf.write("\2\2\2{\u0335\3\2\2\2}\u0341\3\2\2\2\177\u0348\3\2\2\2")
buf.write("\u0081\u034c\3\2\2\2\u0083\u0352\3\2\2\2\u0085\u035a\3")
buf.write("\2\2\2\u0087\u035e\3\2\2\2\u0089\u036d\3\2\2\2\u008b\u0370")
buf.write("\3\2\2\2\u008d\u0374\3\2\2\2\u008f\u037c\3\2\2\2\u0091")
buf.write("\u0386\3\2\2\2\u0093\u0388\3\2\2\2\u0095\u038a\3\2\2\2")
buf.write("\u0097\u038c\3\2\2\2\u0099\u038e\3\2\2\2\u009b\u0392\3")
buf.write("\2\2\2\u009d\u0396\3\2\2\2\u009f\u039a\3\2\2\2\u00a1\u039c")
buf.write("\3\2\2\2\u00a3\u039f\3\2\2\2\u00a5\u03a1\3\2\2\2\u00a7")
buf.write("\u03b1\3\2\2\2\u00a9\u03c9\3\2\2\2\u00ab\u03d2\3\2\2\2")
buf.write("\u00ad\u03dc\3\2\2\2\u00af\u03e7\3\2\2\2\u00b1\u03f3\3")
buf.write("\2\2\2\u00b3\u040e\3\2\2\2\u00b5\u041e\3\2\2\2\u00b7\u042a")
buf.write("\3\2\2\2\u00b9\u0430\3\2\2\2\u00bb\u0442\3\2\2\2\u00bd")
buf.write("\u0457\3\2\2\2\u00bf\u0469\3\2\2\2\u00c1\u0473\3\2\2\2")
buf.write("\u00c3\u047f\3\2\2\2\u00c5\u0488\3\2\2\2\u00c7\u048f\3")
buf.write("\2\2\2\u00c9\u0495\3\2\2\2\u00cb\u049c\3\2\2\2\u00cd\u04a5")
buf.write("\3\2\2\2\u00cf\u04b4\3\2\2\2\u00d1\u04c8\3\2\2\2\u00d3")
buf.write("\u04dd\3\2\2\2\u00d5\u04ed\3\2\2\2\u00d7\u04fd\3\2\2\2")
buf.write("\u00d9\u0518\3\2\2\2\u00db\u052d\3\2\2\2\u00dd\u053a\3")
buf.write("\2\2\2\u00df\u054a\3\2\2\2\u00e1\u0562\3\2\2\2\u00e3\u057f")
buf.write("\3\2\2\2\u00e5\u058c\3\2\2\2\u00e7\u059d\3\2\2\2\u00e9")
buf.write("\u05a4\3\2\2\2\u00eb\u05b7\3\2\2\2\u00ed\u05bf\3\2\2\2")
buf.write("\u00ef\u05c7\3\2\2\2\u00f1\u05d1\3\2\2\2\u00f3\u05d9\3")
buf.write("\2\2\2\u00f5\u05e4\3\2\2\2\u00f7\u05ed\3\2\2\2\u00f9\u05f6")
buf.write("\3\2\2\2\u00fb\u00ff\5\t\5\2\u00fc\u00fe\n\2\2\2\u00fd")
buf.write("\u00fc\3\2\2\2\u00fe\u0101\3\2\2\2\u00ff\u00fd\3\2\2\2")
buf.write("\u00ff\u0100\3\2\2\2\u0100\u0102\3\2\2\2\u0101\u00ff\3")
buf.write("\2\2\2\u0102\u0103\b\2\2\2\u0103\4\3\2\2\2\u0104\u0105")
buf.write("\7*\2\2\u0105\6\3\2\2\2\u0106\u0107\7+\2\2\u0107\b\3\2")
buf.write("\2\2\u0108\u0109\7=\2\2\u0109\n\3\2\2\2\u010a\u010d\7")
buf.write("$\2\2\u010b\u010e\5\u009dO\2\u010c\u010e\5\u00a3R\2\u010d")
buf.write("\u010b\3\2\2\2\u010d\u010c\3\2\2\2\u010e\u010f\3\2\2\2")
buf.write("\u010f\u010d\3\2\2\2\u010f\u0110\3\2\2\2\u0110\u0111\3")
buf.write("\2\2\2\u0111\u0112\7$\2\2\u0112\f\3\2\2\2\u0113\u0116")
buf.write("\7~\2\2\u0114\u0117\5\u009fP\2\u0115\u0117\5\u00a3R\2")
buf.write("\u0116\u0114\3\2\2\2\u0116\u0115\3\2\2\2\u0117\u0118\3")
buf.write("\2\2\2\u0118\u0116\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a")
buf.write("\3\2\2\2\u011a\u011b\7~\2\2\u011b\16\3\2\2\2\u011c\u011d")
buf.write("\7p\2\2\u011d\u011e\7q\2\2\u011e\u011f\7v\2\2\u011f\20")
buf.write("\3\2\2\2\u0120\u0121\7D\2\2\u0121\u0122\7q\2\2\u0122\u0123")
buf.write("\7q\2\2\u0123\u0124\7n\2\2\u0124\22\3\2\2\2\u0125\u0126")
buf.write("\7e\2\2\u0126\u0127\7q\2\2\u0127\u0128\7p\2\2\u0128\u0129")
buf.write("\7v\2\2\u0129\u012a\7k\2\2\u012a\u012b\7p\2\2\u012b\u012c")
buf.write("\7w\2\2\u012c\u012d\7g\2\2\u012d\u012e\7f\2\2\u012e\u012f")
buf.write("\7/\2\2\u012f\u0130\7g\2\2\u0130\u0131\7z\2\2\u0131\u0132")
buf.write("\7g\2\2\u0132\u0133\7e\2\2\u0133\u0134\7w\2\2\u0134\u0135")
buf.write("\7v\2\2\u0135\u0136\7k\2\2\u0136\u0137\7q\2\2\u0137\u0138")
buf.write("\7p\2\2\u0138\24\3\2\2\2\u0139\u013a\7g\2\2\u013a\u013b")
buf.write("\7t\2\2\u013b\u013c\7t\2\2\u013c\u013d\7q\2\2\u013d\u013e")
buf.write("\7t\2\2\u013e\26\3\2\2\2\u013f\u0140\7h\2\2\u0140\u0141")
buf.write("\7c\2\2\u0141\u0142\7n\2\2\u0142\u0143\7u\2\2\u0143\u0144")
buf.write("\7g\2\2\u0144\30\3\2\2\2\u0145\u0146\7k\2\2\u0146\u0147")
buf.write("\7o\2\2\u0147\u0148\7o\2\2\u0148\u0149\7g\2\2\u0149\u014a")
buf.write("\7f\2\2\u014a\u014b\7k\2\2\u014b\u014c\7c\2\2\u014c\u014d")
buf.write("\7v\2\2\u014d\u014e\7g\2\2\u014e\u014f\7/\2\2\u014f\u0150")
buf.write("\7g\2\2\u0150\u0151\7z\2\2\u0151\u0152\7k\2\2\u0152\u0153")
buf.write("\7v\2\2\u0153\32\3\2\2\2\u0154\u0155\7k\2\2\u0155\u0156")
buf.write("\7p\2\2\u0156\u0157\7e\2\2\u0157\u0158\7q\2\2\u0158\u0159")
buf.write("\7o\2\2\u0159\u015a\7r\2\2\u015a\u015b\7n\2\2\u015b\u015c")
buf.write("\7g\2\2\u015c\u015d\7v\2\2\u015d\u015e\7g\2\2\u015e\34")
buf.write("\3\2\2\2\u015f\u0160\7n\2\2\u0160\u0161\7q\2\2\u0161\u0162")
buf.write("\7i\2\2\u0162\u0163\7k\2\2\u0163\u0164\7e\2\2\u0164\36")
buf.write("\3\2\2\2\u0165\u0166\7o\2\2\u0166\u0167\7g\2\2\u0167\u0168")
buf.write("\7o\2\2\u0168\u0169\7q\2\2\u0169\u016a\7w\2\2\u016a\u016b")
buf.write("\7v\2\2\u016b \3\2\2\2\u016c\u016d\7u\2\2\u016d\u016e")
buf.write("\7c\2\2\u016e\u016f\7v\2\2\u016f\"\3\2\2\2\u0170\u0171")
buf.write("\7u\2\2\u0171\u0172\7w\2\2\u0172\u0173\7e\2\2\u0173\u0174")
buf.write("\7e\2\2\u0174\u0175\7g\2\2\u0175\u0176\7u\2\2\u0176\u0177")
buf.write("\7u\2\2\u0177$\3\2\2\2\u0178\u0179\7v\2\2\u0179\u017a")
buf.write("\7j\2\2\u017a\u017b\7g\2\2\u017b\u017c\7q\2\2\u017c\u017d")
buf.write("\7t\2\2\u017d\u017e\7{\2\2\u017e&\3\2\2\2\u017f\u0180")
buf.write("\7v\2\2\u0180\u0181\7t\2\2\u0181\u0182\7w\2\2\u0182\u0183")
buf.write("\7g\2\2\u0183(\3\2\2\2\u0184\u0185\7w\2\2\u0185\u0186")
buf.write("\7p\2\2\u0186\u0187\7m\2\2\u0187\u0188\7p\2\2\u0188\u0189")
buf.write("\7q\2\2\u0189\u018a\7y\2\2\u018a\u018b\7p\2\2\u018b*\3")
buf.write("\2\2\2\u018c\u018d\7w\2\2\u018d\u018e\7p\2\2\u018e\u018f")
buf.write("\7u\2\2\u018f\u0190\7w\2\2\u0190\u0191\7r\2\2\u0191\u0192")
buf.write("\7r\2\2\u0192\u0193\7q\2\2\u0193\u0194\7t\2\2\u0194\u0195")
buf.write("\7v\2\2\u0195\u0196\7g\2\2\u0196\u0197\7f\2\2\u0197,\3")
buf.write("\2\2\2\u0198\u0199\7w\2\2\u0199\u019a\7p\2\2\u019a\u019b")
buf.write("\7u\2\2\u019b\u019c\7c\2\2\u019c\u019d\7v\2\2\u019d.\3")
buf.write("\2\2\2\u019e\u019f\7c\2\2\u019f\u01a0\7u\2\2\u01a0\u01a1")
buf.write("\7u\2\2\u01a1\u01a2\7g\2\2\u01a2\u01a3\7t\2\2\u01a3\u01a4")
buf.write("\7v\2\2\u01a4\60\3\2\2\2\u01a5\u01a6\7e\2\2\u01a6\u01a7")
buf.write("\7j\2\2\u01a7\u01a8\7g\2\2\u01a8\u01a9\7e\2\2\u01a9\u01aa")
buf.write("\7m\2\2\u01aa\u01ab\7/\2\2\u01ab\u01ac\7u\2\2\u01ac\u01ad")
buf.write("\7c\2\2\u01ad\u01ae\7v\2\2\u01ae\62\3\2\2\2\u01af\u01b0")
buf.write("\7e\2\2\u01b0\u01b1\7j\2\2\u01b1\u01b2\7g\2\2\u01b2\u01b3")
buf.write("\7e\2\2\u01b3\u01b4\7m\2\2\u01b4\u01b5\7/\2\2\u01b5\u01b6")
buf.write("\7u\2\2\u01b6\u01b7\7c\2\2\u01b7\u01b8\7v\2\2\u01b8\u01b9")
buf.write("\7/\2\2\u01b9\u01ba\7c\2\2\u01ba\u01bb\7u\2\2\u01bb\u01bc")
buf.write("\7u\2\2\u01bc\u01bd\7w\2\2\u01bd\u01be\7o\2\2\u01be\u01bf")
buf.write("\7k\2\2\u01bf\u01c0\7p\2\2\u01c0\u01c1\7i\2\2\u01c1\64")
buf.write("\3\2\2\2\u01c2\u01c3\7e\2\2\u01c3\u01c4\7j\2\2\u01c4\u01c5")
buf.write("\7g\2\2\u01c5\u01c6\7e\2\2\u01c6\u01c7\7m\2\2\u01c7\u01c8")
buf.write("\7/\2\2\u01c8\u01c9\7w\2\2\u01c9\u01ca\7p\2\2\u01ca\u01cb")
buf.write("\7u\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd\7v\2\2\u01cd\66")
buf.write("\3\2\2\2\u01ce\u01cf\7f\2\2\u01cf\u01d0\7g\2\2\u01d0\u01d1")
buf.write("\7e\2\2\u01d1\u01d2\7n\2\2\u01d2\u01d3\7c\2\2\u01d3\u01d4")
buf.write("\7t\2\2\u01d4\u01d5\7g\2\2\u01d5\u01d6\7/\2\2\u01d6\u01d7")
buf.write("\7e\2\2\u01d7\u01d8\7q\2\2\u01d8\u01d9\7p\2\2\u01d9\u01da")
buf.write("\7u\2\2\u01da\u01db\7v\2\2\u01db8\3\2\2\2\u01dc\u01dd")
buf.write("\7f\2\2\u01dd\u01de\7g\2\2\u01de\u01df\7e\2\2\u01df\u01e0")
buf.write("\7n\2\2\u01e0\u01e1\7c\2\2\u01e1\u01e2\7t\2\2\u01e2\u01e3")
buf.write("\7g\2\2\u01e3\u01e4\7/\2\2\u01e4\u01e5\7f\2\2\u01e5\u01e6")
buf.write("\7c\2\2\u01e6\u01e7\7v\2\2\u01e7\u01e8\7c\2\2\u01e8\u01e9")
buf.write("\7v\2\2\u01e9\u01ea\7{\2\2\u01ea\u01eb\7r\2\2\u01eb\u01ec")
buf.write("\7g\2\2\u01ec:\3\2\2\2\u01ed\u01ee\7f\2\2\u01ee\u01ef")
buf.write("\7g\2\2\u01ef\u01f0\7e\2\2\u01f0\u01f1\7n\2\2\u01f1\u01f2")
buf.write("\7c\2\2\u01f2\u01f3\7t\2\2\u01f3\u01f4\7g\2\2\u01f4\u01f5")
buf.write("\7/\2\2\u01f5\u01f6\7f\2\2\u01f6\u01f7\7c\2\2\u01f7\u01f8")
buf.write("\7v\2\2\u01f8\u01f9\7c\2\2\u01f9\u01fa\7v\2\2\u01fa\u01fb")
buf.write("\7{\2\2\u01fb\u01fc\7r\2\2\u01fc\u01fd\7g\2\2\u01fd\u01fe")
buf.write("\7u\2\2\u01fe<\3\2\2\2\u01ff\u0200\7f\2\2\u0200\u0201")
buf.write("\7g\2\2\u0201\u0202\7e\2\2\u0202\u0203\7n\2\2\u0203\u0204")
buf.write("\7c\2\2\u0204\u0205\7t\2\2\u0205\u0206\7g\2\2\u0206\u0207")
buf.write("\7/\2\2\u0207\u0208\7h\2\2\u0208\u0209\7w\2\2\u0209\u020a")
buf.write("\7p\2\2\u020a>\3\2\2\2\u020b\u020c\7f\2\2\u020c\u020d")
buf.write("\7g\2\2\u020d\u020e\7e\2\2\u020e\u020f\7n\2\2\u020f\u0210")
buf.write("\7c\2\2\u0210\u0211\7t\2\2\u0211\u0212\7g\2\2\u0212\u0213")
buf.write("\7/\2\2\u0213\u0214\7j\2\2\u0214\u0215\7g\2\2\u0215\u0216")
buf.write("\7c\2\2\u0216\u0217\7r\2\2\u0217@\3\2\2\2\u0218\u0219")
buf.write("\7f\2\2\u0219\u021a\7g\2\2\u021a\u021b\7e\2\2\u021b\u021c")
buf.write("\7n\2\2\u021c\u021d\7c\2\2\u021d\u021e\7t\2\2\u021e\u021f")
buf.write("\7g\2\2\u021f\u0220\7/\2\2\u0220\u0221\7u\2\2\u0221\u0222")
buf.write("\7q\2\2\u0222\u0223\7t\2\2\u0223\u0224\7v\2\2\u0224B\3")
buf.write("\2\2\2\u0225\u0226\7f\2\2\u0226\u0227\7g\2\2\u0227\u0228")
buf.write("\7h\2\2\u0228\u0229\7k\2\2\u0229\u022a\7p\2\2\u022a\u022b")
buf.write("\7g\2\2\u022b\u022c\7/\2\2\u022c\u022d\7h\2\2\u022d\u022e")
buf.write("\7w\2\2\u022e\u022f\7p\2\2\u022fD\3\2\2\2\u0230\u0231")
buf.write("\7f\2\2\u0231\u0232\7g\2\2\u0232\u0233\7h\2\2\u0233\u0234")
buf.write("\7k\2\2\u0234\u0235\7p\2\2\u0235\u0236\7g\2\2\u0236\u0237")
buf.write("\7/\2\2\u0237\u0238\7h\2\2\u0238\u0239\7w\2\2\u0239\u023a")
buf.write("\7p\2\2\u023a\u023b\7/\2\2\u023b\u023c\7t\2\2\u023c\u023d")
buf.write("\7g\2\2\u023d\u023e\7e\2\2\u023eF\3\2\2\2\u023f\u0240")
buf.write("\7f\2\2\u0240\u0241\7g\2\2\u0241\u0242\7h\2\2\u0242\u0243")
buf.write("\7k\2\2\u0243\u0244\7p\2\2\u0244\u0245\7g\2\2\u0245\u0246")
buf.write("\7/\2\2\u0246\u0247\7h\2\2\u0247\u0248\7w\2\2\u0248\u0249")
buf.write("\7p\2\2\u0249\u024a\7u\2\2\u024a\u024b\7/\2\2\u024b\u024c")
buf.write("\7t\2\2\u024c\u024d\7g\2\2\u024d\u024e\7e\2\2\u024eH\3")
buf.write("\2\2\2\u024f\u0250\7f\2\2\u0250\u0251\7g\2\2\u0251\u0252")
buf.write("\7h\2\2\u0252\u0253\7k\2\2\u0253\u0254\7p\2\2\u0254\u0255")
buf.write("\7g\2\2\u0255\u0256\7/\2\2\u0256\u0257\7u\2\2\u0257\u0258")
buf.write("\7q\2\2\u0258\u0259\7t\2\2\u0259\u025a\7v\2\2\u025aJ\3")
buf.write("\2\2\2\u025b\u025c\7g\2\2\u025c\u025d\7e\2\2\u025d\u025e")
buf.write("\7j\2\2\u025e\u025f\7q\2\2\u025fL\3\2\2\2\u0260\u0261")
buf.write("\7g\2\2\u0261\u0262\7z\2\2\u0262\u0263\7k\2\2\u0263\u0264")
buf.write("\7v\2\2\u0264N\3\2\2\2\u0265\u0266\7i\2\2\u0266\u0267")
buf.write("\7g\2\2\u0267\u0268\7v\2\2\u0268\u0269\7/\2\2\u0269\u026a")
buf.write("\7c\2\2\u026a\u026b\7u\2\2\u026b\u026c\7u\2\2\u026c\u026d")
buf.write("\7g\2\2\u026d\u026e\7t\2\2\u026e\u026f\7v\2\2\u026f\u0270")
buf.write("\7k\2\2\u0270\u0271\7q\2\2\u0271\u0272\7p\2\2\u0272\u0273")
buf.write("\7u\2\2\u0273P\3\2\2\2\u0274\u0275\7i\2\2\u0275\u0276")
buf.write("\7g\2\2\u0276\u0277\7v\2\2\u0277\u0278\7/\2\2\u0278\u0279")
buf.write("\7c\2\2\u0279\u027a\7u\2\2\u027a\u027b\7u\2\2\u027b\u027c")
buf.write("\7k\2\2\u027c\u027d\7i\2\2\u027d\u027e\7p\2\2\u027e\u027f")
buf.write("\7o\2\2\u027f\u0280\7g\2\2\u0280\u0281\7p\2\2\u0281\u0282")
buf.write("\7v\2\2\u0282R\3\2\2\2\u0283\u0284\7i\2\2\u0284\u0285")
buf.write("\7g\2\2\u0285\u0286\7v\2\2\u0286\u0287\7/\2\2\u0287\u0288")
buf.write("\7k\2\2\u0288\u0289\7p\2\2\u0289\u028a\7h\2\2\u028a\u028b")
buf.write("\7q\2\2\u028bT\3\2\2\2\u028c\u028d\7i\2\2\u028d\u028e")
buf.write("\7g\2\2\u028e\u028f\7v\2\2\u028f\u0290\7/\2\2\u0290\u0291")
buf.write("\7o\2\2\u0291\u0292\7q\2\2\u0292\u0293\7f\2\2\u0293\u0294")
buf.write("\7g\2\2\u0294\u0295\7n\2\2\u0295V\3\2\2\2\u0296\u0297")
buf.write("\7i\2\2\u0297\u0298\7g\2\2\u0298\u0299\7v\2\2\u0299\u029a")
buf.write("\7/\2\2\u029a\u029b\7q\2\2\u029b\u029c\7r\2\2\u029c\u029d")
buf.write("\7v\2\2\u029d\u029e\7k\2\2\u029e\u029f\7q\2\2\u029f\u02a0")
buf.write("\7p\2\2\u02a0X\3\2\2\2\u02a1\u02a2\7i\2\2\u02a2\u02a3")
buf.write("\7g\2\2\u02a3\u02a4\7v\2\2\u02a4\u02a5\7/\2\2\u02a5\u02a6")
buf.write("\7r\2\2\u02a6\u02a7\7t\2\2\u02a7\u02a8\7q\2\2\u02a8\u02a9")
buf.write("\7q\2\2\u02a9\u02aa\7h\2\2\u02aaZ\3\2\2\2\u02ab\u02ac")
buf.write("\7i\2\2\u02ac\u02ad\7g\2\2\u02ad\u02ae\7v\2\2\u02ae\u02af")
buf.write("\7/\2\2\u02af\u02b0\7w\2\2\u02b0\u02b1\7p\2\2\u02b1\u02b2")
buf.write("\7u\2\2\u02b2\u02b3\7c\2\2\u02b3\u02b4\7v\2\2\u02b4\u02b5")
buf.write("\7/\2\2\u02b5\u02b6\7c\2\2\u02b6\u02b7\7u\2\2\u02b7\u02b8")
buf.write("\7u\2\2\u02b8\u02b9\7w\2\2\u02b9\u02ba\7o\2\2\u02ba\u02bb")
buf.write("\7r\2\2\u02bb\u02bc\7v\2\2\u02bc\u02bd\7k\2\2\u02bd\u02be")
buf.write("\7q\2\2\u02be\u02bf\7p\2\2\u02bf\u02c0\7u\2\2\u02c0\\")
buf.write("\3\2\2\2\u02c1\u02c2\7i\2\2\u02c2\u02c3\7g\2\2\u02c3\u02c4")
buf.write("\7v\2\2\u02c4\u02c5\7/\2\2\u02c5\u02c6\7w\2\2\u02c6\u02c7")
buf.write("\7p\2\2\u02c7\u02c8\7u\2\2\u02c8\u02c9\7c\2\2\u02c9\u02ca")
buf.write("\7v\2\2\u02ca\u02cb\7/\2\2\u02cb\u02cc\7e\2\2\u02cc\u02cd")
buf.write("\7q\2\2\u02cd\u02ce\7t\2\2\u02ce\u02cf\7g\2\2\u02cf^\3")
buf.write("\2\2\2\u02d0\u02d1\7i\2\2\u02d1\u02d2\7g\2\2\u02d2\u02d3")
buf.write("\7v\2\2\u02d3\u02d4\7/\2\2\u02d4\u02d5\7x\2\2\u02d5\u02d6")
buf.write("\7c\2\2\u02d6\u02d7\7n\2\2\u02d7\u02d8\7w\2\2\u02d8\u02d9")
buf.write("\7g\2\2\u02d9`\3\2\2\2\u02da\u02db\7r\2\2\u02db\u02dc")
buf.write("\7q\2\2\u02dc\u02dd\7r\2\2\u02ddb\3\2\2\2\u02de\u02df")
buf.write("\7r\2\2\u02df\u02e0\7w\2\2\u02e0\u02e1\7u\2\2\u02e1\u02e2")
buf.write("\7j\2\2\u02e2d\3\2\2\2\u02e3\u02e4\7t\2\2\u02e4\u02e5")
buf.write("\7g\2\2\u02e5\u02e6\7u\2\2\u02e6\u02e7\7g\2\2\u02e7\u02e8")
buf.write("\7v\2\2\u02e8f\3\2\2\2\u02e9\u02ea\7t\2\2\u02ea\u02eb")
buf.write("\7g\2\2\u02eb\u02ec\7u\2\2\u02ec\u02ed\7g\2\2\u02ed\u02ee")
buf.write("\7v\2\2\u02ee\u02ef\7/\2\2\u02ef\u02f0\7c\2\2\u02f0\u02f1")
buf.write("\7u\2\2\u02f1\u02f2\7u\2\2\u02f2\u02f3\7g\2\2\u02f3\u02f4")
buf.write("\7t\2\2\u02f4\u02f5\7v\2\2\u02f5\u02f6\7k\2\2\u02f6\u02f7")
buf.write("\7q\2\2\u02f7\u02f8\7p\2\2\u02f8\u02f9\7u\2\2\u02f9h\3")
buf.write("\2\2\2\u02fa\u02fb\7u\2\2\u02fb\u02fc\7g\2\2\u02fc\u02fd")
buf.write("\7v\2\2\u02fd\u02fe\7/\2\2\u02fe\u02ff\7k\2\2\u02ff\u0300")
buf.write("\7p\2\2\u0300\u0301\7h\2\2\u0301\u0302\7q\2\2\u0302j\3")
buf.write("\2\2\2\u0303\u0304\7u\2\2\u0304\u0305\7g\2\2\u0305\u0306")
buf.write("\7v\2\2\u0306\u0307\7/\2\2\u0307\u0308\7n\2\2\u0308\u0309")
buf.write("\7q\2\2\u0309\u030a\7i\2\2\u030a\u030b\7k\2\2\u030b\u030c")
buf.write("\7e\2\2\u030cl\3\2\2\2\u030d\u030e\7u\2\2\u030e\u030f")
buf.write("\7g\2\2\u030f\u0310\7v\2\2\u0310\u0311\7/\2\2\u0311\u0312")
buf.write("\7q\2\2\u0312\u0313\7r\2\2\u0313\u0314\7v\2\2\u0314\u0315")
buf.write("\7k\2\2\u0315\u0316\7q\2\2\u0316\u0317\7p\2\2\u0317n\3")
buf.write("\2\2\2\u0318\u0319\7#\2\2\u0319p\3\2\2\2\u031a\u031b\7")
buf.write("a\2\2\u031br\3\2\2\2\u031c\u031d\7c\2\2\u031d\u031e\7")
buf.write("u\2\2\u031et\3\2\2\2\u031f\u0320\7D\2\2\u0320\u0321\7")
buf.write("K\2\2\u0321\u0322\7P\2\2\u0322\u0323\7C\2\2\u0323\u0324")
buf.write("\7T\2\2\u0324\u0325\7[\2\2\u0325v\3\2\2\2\u0326\u0327")
buf.write("\7F\2\2\u0327\u0328\7G\2\2\u0328\u0329\7E\2\2\u0329\u032a")
buf.write("\7K\2\2\u032a\u032b\7O\2\2\u032b\u032c\7C\2\2\u032c\u032d")
buf.write("\7N\2\2\u032dx\3\2\2\2\u032e\u032f\7g\2\2\u032f\u0330")
buf.write("\7z\2\2\u0330\u0331\7k\2\2\u0331\u0332\7u\2\2\u0332\u0333")
buf.write("\7v\2\2\u0333\u0334\7u\2\2\u0334z\3\2\2\2\u0335\u0336")
buf.write("\7J\2\2\u0336\u0337\7G\2\2\u0337\u0338\7Z\2\2\u0338\u0339")
buf.write("\7C\2\2\u0339\u033a\7F\2\2\u033a\u033b\7G\2\2\u033b\u033c")
buf.write("\7E\2\2\u033c\u033d\7K\2\2\u033d\u033e\7O\2\2\u033e\u033f")
buf.write("\7C\2\2\u033f\u0340\7N\2\2\u0340|\3\2\2\2\u0341\u0342")
buf.write("\7h\2\2\u0342\u0343\7q\2\2\u0343\u0344\7t\2\2\u0344\u0345")
buf.write("\7c\2\2\u0345\u0346\7n\2\2\u0346\u0347\7n\2\2\u0347~\3")
buf.write("\2\2\2\u0348\u0349\7n\2\2\u0349\u034a\7g\2\2\u034a\u034b")
buf.write("\7v\2\2\u034b\u0080\3\2\2\2\u034c\u034d\7o\2\2\u034d\u034e")
buf.write("\7c\2\2\u034e\u034f\7v\2\2\u034f\u0350\7e\2\2\u0350\u0351")
buf.write("\7j\2\2\u0351\u0082\3\2\2\2\u0352\u0353\7P\2\2\u0353\u0354")
buf.write("\7W\2\2\u0354\u0355\7O\2\2\u0355\u0356\7G\2\2\u0356\u0357")
buf.write("\7T\2\2\u0357\u0358\7C\2\2\u0358\u0359\7N\2\2\u0359\u0084")
buf.write("\3\2\2\2\u035a\u035b\7r\2\2\u035b\u035c\7c\2\2\u035c\u035d")
buf.write("\7t\2\2\u035d\u0086\3\2\2\2\u035e\u035f\7u\2\2\u035f\u0360")
buf.write("\7v\2\2\u0360\u0361\7t\2\2\u0361\u0362\7k\2\2\u0362\u0363")
buf.write("\7p\2\2\u0363\u0364\7i\2\2\u0364\u0088\3\2\2\2\u0365\u036e")
buf.write("\7\62\2\2\u0366\u036a\t\3\2\2\u0367\u0369\5\u0095K\2\u0368")
buf.write("\u0367\3\2\2\2\u0369\u036c\3\2\2\2\u036a\u0368\3\2\2\2")
buf.write("\u036a\u036b\3\2\2\2\u036b\u036e\3\2\2\2\u036c\u036a\3")
buf.write("\2\2\2\u036d\u0365\3\2\2\2\u036d\u0366\3\2\2\2\u036e\u008a")
buf.write("\3\2\2\2\u036f\u0371\5\u0099M\2\u0370\u036f\3\2\2\2\u0371")
buf.write("\u0372\3\2\2\2\u0372\u0370\3\2\2\2\u0372\u0373\3\2\2\2")
buf.write("\u0373\u008c\3\2\2\2\u0374\u0375\7%\2\2\u0375\u0376\7")
buf.write("z\2\2\u0376\u0377\3\2\2\2\u0377\u0378\5\u0091I\2\u0378")
buf.write("\u0379\5\u0091I\2\u0379\u037a\5\u0091I\2\u037a\u037b\5")
buf.write("\u0091I\2\u037b\u008e\3\2\2\2\u037c\u037d\5\u0089E\2\u037d")
buf.write("\u0381\7\60\2\2\u037e\u0380\7\62\2\2\u037f\u037e\3\2\2")
buf.write("\2\u0380\u0383\3\2\2\2\u0381\u037f\3\2\2\2\u0381\u0382")
buf.write("\3\2\2\2\u0382\u0384\3\2\2\2\u0383\u0381\3\2\2\2\u0384")
buf.write("\u0385\5\u0089E\2\u0385\u0090\3\2\2\2\u0386\u0387\t\4")
buf.write("\2\2\u0387\u0092\3\2\2\2\u0388\u0389\7<\2\2\u0389\u0094")
buf.write("\3\2\2\2\u038a\u038b\t\5\2\2\u038b\u0096\3\2\2\2\u038c")
buf.write("\u038d\t\6\2\2\u038d\u0098\3\2\2\2\u038e\u038f\t\7\2\2")
buf.write("\u038f\u009a\3\2\2\2\u0390\u0393\t\b\2\2\u0391\u0393\5")
buf.write("\u00a1Q\2\u0392\u0390\3\2\2\2\u0392\u0391\3\2\2\2\u0393")
buf.write("\u009c\3\2\2\2\u0394\u0397\t\t\2\2\u0395\u0397\5\u00a1")
buf.write("Q\2\u0396\u0394\3\2\2\2\u0396\u0395\3\2\2\2\u0397\u009e")
buf.write("\3\2\2\2\u0398\u039b\t\n\2\2\u0399\u039b\5\u00a1Q\2\u039a")
buf.write("\u0398\3\2\2\2\u039a\u0399\3\2\2\2\u039b\u00a0\3\2\2\2")
buf.write("\u039c\u039d\7$\2\2\u039d\u039e\7$\2\2\u039e\u00a2\3\2")
buf.write("\2\2\u039f\u03a0\t\13\2\2\u03a0\u00a4\3\2\2\2\u03a1\u03a2")
buf.write("\7<\2\2\u03a2\u03a3\7c\2\2\u03a3\u03a4\7n\2\2\u03a4\u03a5")
buf.write("\7n\2\2\u03a5\u03a6\7/\2\2\u03a6\u03a7\7u\2\2\u03a7\u03a8")
buf.write("\7v\2\2\u03a8\u03a9\7c\2\2\u03a9\u03aa\7v\2\2\u03aa\u03ab")
buf.write("\7k\2\2\u03ab\u03ac\7u\2\2\u03ac\u03ad\7v\2\2\u03ad\u03ae")
buf.write("\7k\2\2\u03ae\u03af\7e\2\2\u03af\u03b0\7u\2\2\u03b0\u00a6")
buf.write("\3\2\2\2\u03b1\u03b2\7<\2\2\u03b2\u03b3\7c\2\2\u03b3\u03b4")
buf.write("\7u\2\2\u03b4\u03b5\7u\2\2\u03b5\u03b6\7g\2\2\u03b6\u03b7")
buf.write("\7t\2\2\u03b7\u03b8\7v\2\2\u03b8\u03b9\7k\2\2\u03b9\u03ba")
buf.write("\7q\2\2\u03ba\u03bb\7p\2\2\u03bb\u03bc\7/\2\2\u03bc\u03bd")
buf.write("\7u\2\2\u03bd\u03be\7v\2\2\u03be\u03bf\7c\2\2\u03bf\u03c0")
buf.write("\7e\2\2\u03c0\u03c1\7m\2\2\u03c1\u03c2\7/\2\2\u03c2\u03c3")
buf.write("\7n\2\2\u03c3\u03c4\7g\2\2\u03c4\u03c5\7x\2\2\u03c5\u03c6")
buf.write("\7g\2\2\u03c6\u03c7\7n\2\2\u03c7\u03c8\7u\2\2\u03c8\u00a8")
buf.write("\3\2\2\2\u03c9\u03ca\7<\2\2\u03ca\u03cb\7c\2\2\u03cb\u03cc")
buf.write("\7w\2\2\u03cc\u03cd\7v\2\2\u03cd\u03ce\7j\2\2\u03ce\u03cf")
buf.write("\7q\2\2\u03cf\u03d0\7t\2\2\u03d0\u03d1\7u\2\2\u03d1\u00aa")
buf.write("\3\2\2\2\u03d2\u03d3\7<\2\2\u03d3\u03d4\7e\2\2\u03d4\u03d5")
buf.write("\7c\2\2\u03d5\u03d6\7v\2\2\u03d6\u03d7\7g\2\2\u03d7\u03d8")
buf.write("\7i\2\2\u03d8\u03d9\7q\2\2\u03d9\u03da\7t\2\2\u03da\u03db")
buf.write("\7{\2\2\u03db\u00ac\3\2\2\2\u03dc\u03dd\7<\2\2\u03dd\u03de")
buf.write("\7e\2\2\u03de\u03df\7j\2\2\u03df\u03e0\7c\2\2\u03e0\u03e1")
buf.write("\7k\2\2\u03e1\u03e2\7p\2\2\u03e2\u03e3\7c\2\2\u03e3\u03e4")
buf.write("\7d\2\2\u03e4\u03e5\7n\2\2\u03e5\u03e6\7g\2\2\u03e6\u00ae")
buf.write("\3\2\2\2\u03e7\u03e8\7<\2\2\u03e8\u03e9\7f\2\2\u03e9\u03ea")
buf.write("\7g\2\2\u03ea\u03eb\7h\2\2\u03eb\u03ec\7k\2\2\u03ec\u03ed")
buf.write("\7p\2\2\u03ed\u03ee\7k\2\2\u03ee\u03ef\7v\2\2\u03ef\u03f0")
buf.write("\7k\2\2\u03f0\u03f1\7q\2\2\u03f1\u03f2\7p\2\2\u03f2\u00b0")
buf.write("\3\2\2\2\u03f3\u03f4\7<\2\2\u03f4\u03f5\7f\2\2\u03f5\u03f6")
buf.write("\7k\2\2\u03f6\u03f7\7c\2\2\u03f7\u03f8\7i\2\2\u03f8\u03f9")
buf.write("\7p\2\2\u03f9\u03fa\7q\2\2\u03fa\u03fb\7u\2\2\u03fb\u03fc")
buf.write("\7v\2\2\u03fc\u03fd\7k\2\2\u03fd\u03fe\7e\2\2\u03fe\u03ff")
buf.write("\7/\2\2\u03ff\u0400\7q\2\2\u0400\u0401\7w\2\2\u0401\u0402")
buf.write("\7v\2\2\u0402\u0403\7r\2\2\u0403\u0404\7w\2\2\u0404\u0405")
buf.write("\7v\2\2\u0405\u0406\7/\2\2\u0406\u0407\7e\2\2\u0407\u0408")
buf.write("\7j\2\2\u0408\u0409\7c\2\2\u0409\u040a\7p\2\2\u040a\u040b")
buf.write("\7p\2\2\u040b\u040c\7g\2\2\u040c\u040d\7n\2\2\u040d\u00b2")
buf.write("\3\2\2\2\u040e\u040f\7<\2\2\u040f\u0410\7g\2\2\u0410\u0411")
buf.write("\7t\2\2\u0411\u0412\7t\2\2\u0412\u0413\7q\2\2\u0413\u0414")
buf.write("\7t\2\2\u0414\u0415\7/\2\2\u0415\u0416\7d\2\2\u0416\u0417")
buf.write("\7g\2\2\u0417\u0418\7j\2\2\u0418\u0419\7c\2\2\u0419\u041a")
buf.write("\7x\2\2\u041a\u041b\7k\2\2\u041b\u041c\7q\2\2\u041c\u041d")
buf.write("\7t\2\2\u041d\u00b4\3\2\2\2\u041e\u041f\7<\2\2\u041f\u0420")
buf.write("\7g\2\2\u0420\u0421\7z\2\2\u0421\u0422\7v\2\2\u0422\u0423")
buf.write("\7g\2\2\u0423\u0424\7p\2\2\u0424\u0425\7u\2\2\u0425\u0426")
buf.write("\7k\2\2\u0426\u0427\7q\2\2\u0427\u0428\7p\2\2\u0428\u0429")
buf.write("\7u\2\2\u0429\u00b6\3\2\2\2\u042a\u042b\7<\2\2\u042b\u042c")
buf.write("\7h\2\2\u042c\u042d\7w\2\2\u042d\u042e\7p\2\2\u042e\u042f")
buf.write("\7u\2\2\u042f\u00b8\3\2\2\2\u0430\u0431\7<\2\2\u0431\u0432")
buf.write("\7h\2\2\u0432\u0433\7w\2\2\u0433\u0434\7p\2\2\u0434\u0435")
buf.write("\7u\2\2\u0435\u0436\7/\2\2\u0436\u0437\7f\2\2\u0437\u0438")
buf.write("\7g\2\2\u0438\u0439\7u\2\2\u0439\u043a\7e\2\2\u043a\u043b")
buf.write("\7t\2\2\u043b\u043c\7k\2\2\u043c\u043d\7r\2\2\u043d\u043e")
buf.write("\7v\2\2\u043e\u043f\7k\2\2\u043f\u0440\7q\2\2\u0440\u0441")
buf.write("\7p\2\2\u0441\u00ba\3\2\2\2\u0442\u0443\7<\2\2\u0443\u0444")
buf.write("\7i\2\2\u0444\u0445\7n\2\2\u0445\u0446\7q\2\2\u0446\u0447")
buf.write("\7d\2\2\u0447\u0448\7c\2\2\u0448\u0449\7n\2\2\u0449\u044a")
buf.write("\7/\2\2\u044a\u044b\7f\2\2\u044b\u044c\7g\2\2\u044c\u044d")
buf.write("\7e\2\2\u044d\u044e\7n\2\2\u044e\u044f\7c\2\2\u044f\u0450")
buf.write("\7t\2\2\u0450\u0451\7c\2\2\u0451\u0452\7v\2\2\u0452\u0453")
buf.write("\7k\2\2\u0453\u0454\7q\2\2\u0454\u0455\7p\2\2\u0455\u0456")
buf.write("\7u\2\2\u0456\u00bc\3\2\2\2\u0457\u0458\7<\2\2\u0458\u0459")
buf.write("\7k\2\2\u0459\u045a\7p\2\2\u045a\u045b\7v\2\2\u045b\u045c")
buf.write("\7g\2\2\u045c\u045d\7t\2\2\u045d\u045e\7c\2\2\u045e\u045f")
buf.write("\7e\2\2\u045f\u0460\7v\2\2\u0460\u0461\7k\2\2\u0461\u0462")
buf.write("\7x\2\2\u0462\u0463\7g\2\2\u0463\u0464\7/\2\2\u0464\u0465")
buf.write("\7o\2\2\u0465\u0466\7q\2\2\u0466\u0467\7f\2\2\u0467\u0468")
buf.write("\7g\2\2\u0468\u00be\3\2\2\2\u0469\u046a\7<\2\2\u046a\u046b")
buf.write("\7n\2\2\u046b\u046c\7c\2\2\u046c\u046d\7p\2\2\u046d\u046e")
buf.write("\7i\2\2\u046e\u046f\7w\2\2\u046f\u0470\7c\2\2\u0470\u0471")
buf.write("\7i\2\2\u0471\u0472\7g\2\2\u0472\u00c0\3\2\2\2\u0473\u0474")
buf.write("\7<\2\2\u0474\u0475\7n\2\2\u0475\u0476\7g\2\2\u0476\u0477")
buf.write("\7h\2\2\u0477\u0478\7v\2\2\u0478\u0479\7/\2\2\u0479\u047a")
buf.write("\7c\2\2\u047a\u047b\7u\2\2\u047b\u047c\7u\2\2\u047c\u047d")
buf.write("\7q\2\2\u047d\u047e\7e\2\2\u047e\u00c2\3\2\2\2\u047f\u0480")
buf.write("\7<\2\2\u0480\u0481\7n\2\2\u0481\u0482\7k\2\2\u0482\u0483")
buf.write("\7e\2\2\u0483\u0484\7g\2\2\u0484\u0485\7p\2\2\u0485\u0486")
buf.write("\7u\2\2\u0486\u0487\7g\2\2\u0487\u00c4\3\2\2\2\u0488\u0489")
buf.write("\7<\2\2\u0489\u048a\7p\2\2\u048a\u048b\7c\2\2\u048b\u048c")
buf.write("\7o\2\2\u048c\u048d\7g\2\2\u048d\u048e\7f\2\2\u048e\u00c6")
buf.write("\3\2\2\2\u048f\u0490\7<\2\2\u0490\u0491\7p\2\2\u0491\u0492")
buf.write("\7c\2\2\u0492\u0493\7o\2\2\u0493\u0494\7g\2\2\u0494\u00c8")
buf.write("\3\2\2\2\u0495\u0496\7<\2\2\u0496\u0497\7p\2\2\u0497\u0498")
buf.write("\7q\2\2\u0498\u0499\7v\2\2\u0499\u049a\7g\2\2\u049a\u049b")
buf.write("\7u\2\2\u049b\u00ca\3\2\2\2\u049c\u049d\7<\2\2\u049d\u049e")
buf.write("\7r\2\2\u049e\u049f\7c\2\2\u049f\u04a0\7v\2\2\u04a0\u04a1")
buf.write("\7v\2\2\u04a1\u04a2\7g\2\2\u04a2\u04a3\7t\2\2\u04a3\u04a4")
buf.write("\7p\2\2\u04a4\u00cc\3\2\2\2\u04a5\u04a6\7<\2\2\u04a6\u04a7")
buf.write("\7r\2\2\u04a7\u04a8\7t\2\2\u04a8\u04a9\7k\2\2\u04a9\u04aa")
buf.write("\7p\2\2\u04aa\u04ab\7v\2\2\u04ab\u04ac\7/\2\2\u04ac\u04ad")
buf.write("\7u\2\2\u04ad\u04ae\7w\2\2\u04ae\u04af\7e\2\2\u04af\u04b0")
buf.write("\7e\2\2\u04b0\u04b1\7g\2\2\u04b1\u04b2\7u\2\2\u04b2\u04b3")
buf.write("\7u\2\2\u04b3\u00ce\3\2\2\2\u04b4\u04b5\7<\2\2\u04b5\u04b6")
buf.write("\7r\2\2\u04b6\u04b7\7t\2\2\u04b7\u04b8\7q\2\2\u04b8\u04b9")
buf.write("\7f\2\2\u04b9\u04ba\7w\2\2\u04ba\u04bb\7e\2\2\u04bb\u04bc")
buf.write("\7g\2\2\u04bc\u04bd\7/\2\2\u04bd\u04be\7c\2\2\u04be\u04bf")
buf.write("\7u\2\2\u04bf\u04c0\7u\2\2\u04c0\u04c1\7g\2\2\u04c1\u04c2")
buf.write("\7t\2\2\u04c2\u04c3\7v\2\2\u04c3\u04c4\7k\2\2\u04c4\u04c5")
buf.write("\7q\2\2\u04c5\u04c6\7p\2\2\u04c6\u04c7\7u\2\2\u04c7\u00d0")
buf.write("\3\2\2\2\u04c8\u04c9\7<\2\2\u04c9\u04ca\7r\2\2\u04ca\u04cb")
buf.write("\7t\2\2\u04cb\u04cc\7q\2\2\u04cc\u04cd\7f\2\2\u04cd\u04ce")
buf.write("\7w\2\2\u04ce\u04cf\7e\2\2\u04cf\u04d0\7g\2\2\u04d0\u04d1")
buf.write("\7/\2\2\u04d1\u04d2\7c\2\2\u04d2\u04d3\7u\2\2\u04d3\u04d4")
buf.write("\7u\2\2\u04d4\u04d5\7k\2\2\u04d5\u04d6\7i\2\2\u04d6\u04d7")
buf.write("\7p\2\2\u04d7\u04d8\7o\2\2\u04d8\u04d9\7g\2\2\u04d9\u04da")
buf.write("\7p\2\2\u04da\u04db\7v\2\2\u04db\u04dc\7u\2\2\u04dc\u00d2")
buf.write("\3\2\2\2\u04dd\u04de\7<\2\2\u04de\u04df\7r\2\2\u04df\u04e0")
buf.write("\7t\2\2\u04e0\u04e1\7q\2\2\u04e1\u04e2\7f\2\2\u04e2\u04e3")
buf.write("\7w\2\2\u04e3\u04e4\7e\2\2\u04e4\u04e5\7g\2\2\u04e5\u04e6")
buf.write("\7/\2\2\u04e6\u04e7\7o\2\2\u04e7\u04e8\7q\2\2\u04e8\u04e9")
buf.write("\7f\2\2\u04e9\u04ea\7g\2\2\u04ea\u04eb\7n\2\2\u04eb\u04ec")
buf.write("\7u\2\2\u04ec\u00d4\3\2\2\2\u04ed\u04ee\7<\2\2\u04ee\u04ef")
buf.write("\7r\2\2\u04ef\u04f0\7t\2\2\u04f0\u04f1\7q\2\2\u04f1\u04f2")
buf.write("\7f\2\2\u04f2\u04f3\7w\2\2\u04f3\u04f4\7e\2\2\u04f4\u04f5")
buf.write("\7g\2\2\u04f5\u04f6\7/\2\2\u04f6\u04f7\7r\2\2\u04f7\u04f8")
buf.write("\7t\2\2\u04f8\u04f9\7q\2\2\u04f9\u04fa\7q\2\2\u04fa\u04fb")
buf.write("\7h\2\2\u04fb\u04fc\7u\2\2\u04fc\u00d6\3\2\2\2\u04fd\u04fe")
buf.write("\7<\2\2\u04fe\u04ff\7r\2\2\u04ff\u0500\7t\2\2\u0500\u0501")
buf.write("\7q\2\2\u0501\u0502\7f\2\2\u0502\u0503\7w\2\2\u0503\u0504")
buf.write("\7e\2\2\u0504\u0505\7g\2\2\u0505\u0506\7/\2\2\u0506\u0507")
buf.write("\7w\2\2\u0507\u0508\7p\2\2\u0508\u0509\7u\2\2\u0509\u050a")
buf.write("\7c\2\2\u050a\u050b\7v\2\2\u050b\u050c\7/\2\2\u050c\u050d")
buf.write("\7c\2\2\u050d\u050e\7u\2\2\u050e\u050f\7u\2\2\u050f\u0510")
buf.write("\7w\2\2\u0510\u0511\7o\2\2\u0511\u0512\7r\2\2\u0512\u0513")
buf.write("\7v\2\2\u0513\u0514\7k\2\2\u0514\u0515\7q\2\2\u0515\u0516")
buf.write("\7p\2\2\u0516\u0517\7u\2\2\u0517\u00d8\3\2\2\2\u0518\u0519")
buf.write("\7<\2\2\u0519\u051a\7r\2\2\u051a\u051b\7t\2\2\u051b\u051c")
buf.write("\7q\2\2\u051c\u051d\7f\2\2\u051d\u051e\7w\2\2\u051e\u051f")
buf.write("\7e\2\2\u051f\u0520\7g\2\2\u0520\u0521\7/\2\2\u0521\u0522")
buf.write("\7w\2\2\u0522\u0523\7p\2\2\u0523\u0524\7u\2\2\u0524\u0525")
buf.write("\7c\2\2\u0525\u0526\7v\2\2\u0526\u0527\7/\2\2\u0527\u0528")
buf.write("\7e\2\2\u0528\u0529\7q\2\2\u0529\u052a\7t\2\2\u052a\u052b")
buf.write("\7g\2\2\u052b\u052c\7u\2\2\u052c\u00da\3\2\2\2\u052d\u052e")
buf.write("\7<\2\2\u052e\u052f\7t\2\2\u052f\u0530\7c\2\2\u0530\u0531")
buf.write("\7p\2\2\u0531\u0532\7f\2\2\u0532\u0533\7q\2\2\u0533\u0534")
buf.write("\7o\2\2\u0534\u0535\7/\2\2\u0535\u0536\7u\2\2\u0536\u0537")
buf.write("\7g\2\2\u0537\u0538\7g\2\2\u0538\u0539\7f\2\2\u0539\u00dc")
buf.write("\3\2\2\2\u053a\u053b\7<\2\2\u053b\u053c\7t\2\2\u053c\u053d")
buf.write("\7g\2\2\u053d\u053e\7c\2\2\u053e\u053f\7u\2\2\u053f\u0540")
buf.write("\7q\2\2\u0540\u0541\7p\2\2\u0541\u0542\7/\2\2\u0542\u0543")
buf.write("\7w\2\2\u0543\u0544\7p\2\2\u0544\u0545\7m\2\2\u0545\u0546")
buf.write("\7p\2\2\u0546\u0547\7q\2\2\u0547\u0548\7y\2\2\u0548\u0549")
buf.write("\7p\2\2\u0549\u00de\3\2\2\2\u054a\u054b\7<\2\2\u054b\u054c")
buf.write("\7t\2\2\u054c\u054d\7g\2\2\u054d\u054e\7i\2\2\u054e\u054f")
buf.write("\7w\2\2\u054f\u0550\7n\2\2\u0550\u0551\7c\2\2\u0551\u0552")
buf.write("\7t\2\2\u0552\u0553\7/\2\2\u0553\u0554\7q\2\2\u0554\u0555")
buf.write("\7w\2\2\u0555\u0556\7v\2\2\u0556\u0557\7r\2\2\u0557\u0558")
buf.write("\7w\2\2\u0558\u0559\7v\2\2\u0559\u055a\7/\2\2\u055a\u055b")
buf.write("\7e\2\2\u055b\u055c\7j\2\2\u055c\u055d\7c\2\2\u055d\u055e")
buf.write("\7p\2\2\u055e\u055f\7p\2\2\u055f\u0560\7g\2\2\u0560\u0561")
buf.write("\7n\2\2\u0561\u00e0\3\2\2\2\u0562\u0563\7<\2\2\u0563\u0564")
buf.write("\7t\2\2\u0564\u0565\7g\2\2\u0565\u0566\7r\2\2\u0566\u0567")
buf.write("\7t\2\2\u0567\u0568\7q\2\2\u0568\u0569\7f\2\2\u0569\u056a")
buf.write("\7w\2\2\u056a\u056b\7e\2\2\u056b\u056c\7k\2\2\u056c\u056d")
buf.write("\7d\2\2\u056d\u056e\7n\2\2\u056e\u056f\7g\2\2\u056f\u0570")
buf.write("\7/\2\2\u0570\u0571\7t\2\2\u0571\u0572\7g\2\2\u0572\u0573")
buf.write("\7u\2\2\u0573\u0574\7q\2\2\u0574\u0575\7w\2\2\u0575\u0576")
buf.write("\7t\2\2\u0576\u0577\7e\2\2\u0577\u0578\7g\2\2\u0578\u0579")
buf.write("\7/\2\2\u0579\u057a\7n\2\2\u057a\u057b\7k\2\2\u057b\u057c")
buf.write("\7o\2\2\u057c\u057d\7k\2\2\u057d\u057e\7v\2\2\u057e\u00e2")
buf.write("\3\2\2\2\u057f\u0580\7<\2\2\u0580\u0581\7t\2\2\u0581\u0582")
buf.write("\7k\2\2\u0582\u0583\7i\2\2\u0583\u0584\7j\2\2\u0584\u0585")
buf.write("\7v\2\2\u0585\u0586\7/\2\2\u0586\u0587\7c\2\2\u0587\u0588")
buf.write("\7u\2\2\u0588\u0589\7u\2\2\u0589\u058a\7q\2\2\u058a\u058b")
buf.write("\7e\2\2\u058b\u00e4\3\2\2\2\u058c\u058d\7<\2\2\u058d\u058e")
buf.write("\7u\2\2\u058e\u058f\7o\2\2\u058f\u0590\7v\2\2\u0590\u0591")
buf.write("\7/\2\2\u0591\u0592\7n\2\2\u0592\u0593\7k\2\2\u0593\u0594")
buf.write("\7d\2\2\u0594\u0595\7/\2\2\u0595\u0596\7x\2\2\u0596\u0597")
buf.write("\7g\2\2\u0597\u0598\7t\2\2\u0598\u0599\7u\2\2\u0599\u059a")
buf.write("\7k\2\2\u059a\u059b\7q\2\2\u059b\u059c\7p\2\2\u059c\u00e6")
buf.write("\3\2\2\2\u059d\u059e\7<\2\2\u059e\u059f\7u\2\2\u059f\u05a0")
buf.write("\7q\2\2\u05a0\u05a1\7t\2\2\u05a1\u05a2\7v\2\2\u05a2\u05a3")
buf.write("\7u\2\2\u05a3\u00e8\3\2\2\2\u05a4\u05a5\7<\2\2\u05a5\u05a6")
buf.write("\7u\2\2\u05a6\u05a7\7q\2\2\u05a7\u05a8\7t\2\2\u05a8\u05a9")
buf.write("\7v\2\2\u05a9\u05aa\7u\2\2\u05aa\u05ab\7/\2\2\u05ab\u05ac")
buf.write("\7f\2\2\u05ac\u05ad\7g\2\2\u05ad\u05ae\7u\2\2\u05ae\u05af")
buf.write("\7e\2\2\u05af\u05b0\7t\2\2\u05b0\u05b1\7k\2\2\u05b1\u05b2")
buf.write("\7r\2\2\u05b2\u05b3\7v\2\2\u05b3\u05b4\7k\2\2\u05b4\u05b5")
buf.write("\7q\2\2\u05b5\u05b6\7p\2\2\u05b6\u00ea\3\2\2\2\u05b7\u05b8")
buf.write("\7<\2\2\u05b8\u05b9\7u\2\2\u05b9\u05ba\7q\2\2\u05ba\u05bb")
buf.write("\7w\2\2\u05bb\u05bc\7t\2\2\u05bc\u05bd\7e\2\2\u05bd\u05be")
buf.write("\7g\2\2\u05be\u00ec\3\2\2\2\u05bf\u05c0\7<\2\2\u05c0\u05c1")
buf.write("\7u\2\2\u05c1\u05c2\7v\2\2\u05c2\u05c3\7c\2\2\u05c3\u05c4")
buf.write("\7v\2\2\u05c4\u05c5\7w\2\2\u05c5\u05c6\7u\2\2\u05c6\u00ee")
buf.write("\3\2\2\2\u05c7\u05c8\7<\2\2\u05c8\u05c9\7v\2\2\u05c9\u05ca")
buf.write("\7j\2\2\u05ca\u05cb\7g\2\2\u05cb\u05cc\7q\2\2\u05cc\u05cd")
buf.write("\7t\2\2\u05cd\u05ce\7k\2\2\u05ce\u05cf\7g\2\2\u05cf\u05d0")
buf.write("\7u\2\2\u05d0\u00f0\3\2\2\2\u05d1\u05d2\7<\2\2\u05d2\u05d3")
buf.write("\7x\2\2\u05d3\u05d4\7c\2\2\u05d4\u05d5\7n\2\2\u05d5\u05d6")
buf.write("\7w\2\2\u05d6\u05d7\7g\2\2\u05d7\u05d8\7u\2\2\u05d8\u00f2")
buf.write("\3\2\2\2\u05d9\u05da\7<\2\2\u05da\u05db\7x\2\2\u05db\u05dc")
buf.write("\7g\2\2\u05dc\u05dd\7t\2\2\u05dd\u05de\7d\2\2\u05de\u05df")
buf.write("\7q\2\2\u05df\u05e0\7u\2\2\u05e0\u05e1\7k\2\2\u05e1\u05e2")
buf.write("\7v\2\2\u05e2\u05e3\7{\2\2\u05e3\u00f4\3\2\2\2\u05e4\u05e5")
buf.write("\7<\2\2\u05e5\u05e6\7x\2\2\u05e6\u05e7\7g\2\2\u05e7\u05e8")
buf.write("\7t\2\2\u05e8\u05e9\7u\2\2\u05e9\u05ea\7k\2\2\u05ea\u05eb")
buf.write("\7q\2\2\u05eb\u05ec\7p\2\2\u05ec\u00f6\3\2\2\2\u05ed\u05f2")
buf.write("\5\u0097L\2\u05ee\u05f1\5\u0095K\2\u05ef\u05f1\5\u0097")
buf.write("L\2\u05f0\u05ee\3\2\2\2\u05f0\u05ef\3\2\2\2\u05f1\u05f4")
buf.write("\3\2\2\2\u05f2\u05f0\3\2\2\2\u05f2\u05f3\3\2\2\2\u05f3")
buf.write("\u00f8\3\2\2\2\u05f4\u05f2\3\2\2\2\u05f5\u05f7\t\13\2")
buf.write("\2\u05f6\u05f5\3\2\2\2\u05f7\u05f8\3\2\2\2\u05f8\u05f6")
buf.write("\3\2\2\2\u05f8\u05f9\3\2\2\2\u05f9\u05fa\3\2\2\2\u05fa")
buf.write("\u05fb\b}\2\2\u05fb\u00fa\3\2\2\2\22\2\u00ff\u010d\u010f")
buf.write("\u0116\u0118\u036a\u036d\u0372\u0381\u0392\u0396\u039a")
buf.write("\u05f0\u05f2\u05f8\3\b\2\2")
return buf.getvalue()
class SLComp18Lexer(Lexer):
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
Comment = 1
ParOpen = 2
ParClose = 3
Semicolon = 4
String = 5
QuotedSymbol = 6
PS_Not = 7
PS_Bool = 8
PS_ContinuedExecution = 9
PS_Error = 10
PS_False = 11
PS_ImmediateExit = 12
PS_Incomplete = 13
PS_Logic = 14
PS_Memout = 15
PS_Sat = 16
PS_Success = 17
PS_Theory = 18
PS_True = 19
PS_Unknown = 20
PS_Unsupported = 21
PS_Unsat = 22
CMD_Assert = 23
CMD_CheckSat = 24
CMD_CheckSatAssuming = 25
CMD_CheckUnsat = 26
CMD_DeclareConst = 27
CMD_DeclareDatatype = 28
CMD_DeclareDatatypes = 29
CMD_DeclareFun = 30
CMD_DeclareHeap = 31
CMD_DeclareSort = 32
CMD_DefineFun = 33
CMD_DefineFunRec = 34
CMD_DefineFunsRec = 35
CMD_DefineSort = 36
CMD_Echo = 37
CMD_Exit = 38
CMD_GetAssertions = 39
CMD_GetAssignment = 40
CMD_GetInfo = 41
CMD_GetModel = 42
CMD_GetOption = 43
CMD_GetProof = 44
CMD_GetUnsatAssumptions = 45
CMD_GetUnsatCore = 46
CMD_GetValue = 47
CMD_Pop = 48
CMD_Push = 49
CMD_Reset = 50
CMD_ResetAssertions = 51
CMD_SetInfo = 52
CMD_SetLogic = 53
CMD_SetOption = 54
GRW_Exclamation = 55
GRW_Underscore = 56
GRW_As = 57
GRW_Binary = 58
GRW_Decimal = 59
GRW_Exists = 60
GRW_Hexadecimal = 61
GRW_Forall = 62
GRW_Let = 63
GRW_Match = 64
GRW_Numeral = 65
GRW_Par = 66
GRW_String = 67
Numeral = 68
Binary = 69
HexDecimal = 70
Decimal = 71
Colon = 72
PK_AllStatistics = 73
PK_AssertionStackLevels = 74
PK_Authors = 75
PK_Category = 76
PK_Chainable = 77
PK_Definition = 78
PK_DiagnosticOutputChannel = 79
PK_ErrorBehaviour = 80
PK_Extension = 81
PK_Funs = 82
PK_FunsDescription = 83
PK_GlobalDeclarations = 84
PK_InteractiveMode = 85
PK_Language = 86
PK_LeftAssoc = 87
PK_License = 88
PK_Named = 89
PK_Name = 90
PK_Notes = 91
PK_Pattern = 92
PK_PrintSuccess = 93
PK_ProduceAssertions = 94
PK_ProduceAssignments = 95
PK_ProduceModels = 96
PK_ProduceProofs = 97
PK_ProduceUnsatAssumptions = 98
PK_ProduceUnsatCores = 99
PK_RandomSeed = 100
PK_ReasonUnknown = 101
PK_RegularOutputChannel = 102
PK_ReproducibleResourceLimit = 103
PK_RightAssoc = 104
PK_SmtLibVersion = 105
PK_Sorts = 106
PK_SortsDescription = 107
PK_Source = 108
PK_Status = 109
PK_Theories = 110
PK_Values = 111
PK_Verbosity = 112
PK_Version = 113
UndefinedSymbol = 114
WS = 115
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE" ]
literalNames = [ "<INVALID>",
"'('", "')'", "';'", "'not'", "'Bool'", "'continued-execution'",
"'error'", "'false'", "'immediate-exit'", "'incomplete'", "'logic'",
"'memout'", "'sat'", "'success'", "'theory'", "'true'", "'unknown'",
"'unsupported'", "'unsat'", "'assert'", "'check-sat'", "'check-sat-assuming'",
"'check-unsat'", "'declare-const'", "'declare-datatype'", "'declare-datatypes'",
"'declare-fun'", "'declare-heap'", "'declare-sort'", "'define-fun'",
"'define-fun-rec'", "'define-funs-rec'", "'define-sort'", "'echo'",
"'exit'", "'get-assertions'", "'get-assignment'", "'get-info'",
"'get-model'", "'get-option'", "'get-proof'", "'get-unsat-assumptions'",
"'get-unsat-core'", "'get-value'", "'pop'", "'push'", "'reset'",
"'reset-assertions'", "'set-info'", "'set-logic'", "'set-option'",
"'!'", "'_'", "'as'", "'BINARY'", "'DECIMAL'", "'exists'", "'HEXADECIMAL'",
"'forall'", "'let'", "'match'", "'NUMERAL'", "'par'", "'string'",
"':'", "':all-statistics'", "':assertion-stack-levels'", "':authors'",
"':category'", "':chainable'", "':definition'", "':diagnostic-output-channel'",
"':error-behavior'", "':extensions'", "':funs'", "':funs-description'",
"':global-declarations'", "':interactive-mode'", "':language'",
"':left-assoc'", "':license'", "':named'", "':name'", "':notes'",
"':pattern'", "':print-success'", "':produce-assertions'", "':produce-assignments'",
"':produce-models'", "':produce-proofs'", "':produce-unsat-assumptions'",
"':produce-unsat-cores'", "':random-seed'", "':reason-unknown'",
"':regular-output-channel'", "':reproducible-resource-limit'",
"':right-assoc'", "':smt-lib-version'", "':sorts'", "':sorts-description'",
"':source'", "':status'", "':theories'", "':values'", "':verbosity'",
"':version'" ]
symbolicNames = [ "<INVALID>",
"Comment", "ParOpen", "ParClose", "Semicolon", "String", "QuotedSymbol",
"PS_Not", "PS_Bool", "PS_ContinuedExecution", "PS_Error", "PS_False",
"PS_ImmediateExit", "PS_Incomplete", "PS_Logic", "PS_Memout",
"PS_Sat", "PS_Success", "PS_Theory", "PS_True", "PS_Unknown",
"PS_Unsupported", "PS_Unsat", "CMD_Assert", "CMD_CheckSat",
"CMD_CheckSatAssuming", "CMD_CheckUnsat", "CMD_DeclareConst",
"CMD_DeclareDatatype", "CMD_DeclareDatatypes", "CMD_DeclareFun",
"CMD_DeclareHeap", "CMD_DeclareSort", "CMD_DefineFun", "CMD_DefineFunRec",
"CMD_DefineFunsRec", "CMD_DefineSort", "CMD_Echo", "CMD_Exit",
"CMD_GetAssertions", "CMD_GetAssignment", "CMD_GetInfo", "CMD_GetModel",
"CMD_GetOption", "CMD_GetProof", "CMD_GetUnsatAssumptions",
"CMD_GetUnsatCore", "CMD_GetValue", "CMD_Pop", "CMD_Push", "CMD_Reset",
"CMD_ResetAssertions", "CMD_SetInfo", "CMD_SetLogic", "CMD_SetOption",
"GRW_Exclamation", "GRW_Underscore", "GRW_As", "GRW_Binary",
"GRW_Decimal", "GRW_Exists", "GRW_Hexadecimal", "GRW_Forall",
"GRW_Let", "GRW_Match", "GRW_Numeral", "GRW_Par", "GRW_String",
"Numeral", "Binary", "HexDecimal", "Decimal", "Colon", "PK_AllStatistics",
"PK_AssertionStackLevels", "PK_Authors", "PK_Category", "PK_Chainable",
"PK_Definition", "PK_DiagnosticOutputChannel", "PK_ErrorBehaviour",
"PK_Extension", "PK_Funs", "PK_FunsDescription", "PK_GlobalDeclarations",
"PK_InteractiveMode", "PK_Language", "PK_LeftAssoc", "PK_License",
"PK_Named", "PK_Name", "PK_Notes", "PK_Pattern", "PK_PrintSuccess",
"PK_ProduceAssertions", "PK_ProduceAssignments", "PK_ProduceModels",
"PK_ProduceProofs", "PK_ProduceUnsatAssumptions", "PK_ProduceUnsatCores",
"PK_RandomSeed", "PK_ReasonUnknown", "PK_RegularOutputChannel",
"PK_ReproducibleResourceLimit", "PK_RightAssoc", "PK_SmtLibVersion",
"PK_Sorts", "PK_SortsDescription", "PK_Source", "PK_Status",
"PK_Theories", "PK_Values", "PK_Verbosity", "PK_Version", "UndefinedSymbol",
"WS" ]
ruleNames = [ "Comment", "ParOpen", "ParClose", "Semicolon", "String",
"QuotedSymbol", "PS_Not", "PS_Bool", "PS_ContinuedExecution",
"PS_Error", "PS_False", "PS_ImmediateExit", "PS_Incomplete",
"PS_Logic", "PS_Memout", "PS_Sat", "PS_Success", "PS_Theory",
"PS_True", "PS_Unknown", "PS_Unsupported", "PS_Unsat",
"CMD_Assert", "CMD_CheckSat", "CMD_CheckSatAssuming",
"CMD_CheckUnsat", "CMD_DeclareConst", "CMD_DeclareDatatype",
"CMD_DeclareDatatypes", "CMD_DeclareFun", "CMD_DeclareHeap",
"CMD_DeclareSort", "CMD_DefineFun", "CMD_DefineFunRec",
"CMD_DefineFunsRec", "CMD_DefineSort", "CMD_Echo", "CMD_Exit",
"CMD_GetAssertions", "CMD_GetAssignment", "CMD_GetInfo",
"CMD_GetModel", "CMD_GetOption", "CMD_GetProof", "CMD_GetUnsatAssumptions",
"CMD_GetUnsatCore", "CMD_GetValue", "CMD_Pop", "CMD_Push",
"CMD_Reset", "CMD_ResetAssertions", "CMD_SetInfo", "CMD_SetLogic",
"CMD_SetOption", "GRW_Exclamation", "GRW_Underscore",
"GRW_As", "GRW_Binary", "GRW_Decimal", "GRW_Exists", "GRW_Hexadecimal",
"GRW_Forall", "GRW_Let", "GRW_Match", "GRW_Numeral", "GRW_Par",
"GRW_String", "Numeral", "Binary", "HexDecimal", "Decimal",
"HexDigit", "Colon", "Digit", "Sym", "BinaryDigit", "PrintableChar",
"PrintableCharNoDquote", "PrintableCharNoBackslash", "EscapedSpace",
"WhiteSpaceChar", "PK_AllStatistics", "PK_AssertionStackLevels",
"PK_Authors", "PK_Category", "PK_Chainable", "PK_Definition",
"PK_DiagnosticOutputChannel", "PK_ErrorBehaviour", "PK_Extension",
"PK_Funs", "PK_FunsDescription", "PK_GlobalDeclarations",
"PK_InteractiveMode", "PK_Language", "PK_LeftAssoc", "PK_License",
"PK_Named", "PK_Name", "PK_Notes", "PK_Pattern", "PK_PrintSuccess",
"PK_ProduceAssertions", "PK_ProduceAssignments", "PK_ProduceModels",
"PK_ProduceProofs", "PK_ProduceUnsatAssumptions", "PK_ProduceUnsatCores",
"PK_RandomSeed", "PK_ReasonUnknown", "PK_RegularOutputChannel",
"PK_ReproducibleResourceLimit", "PK_RightAssoc", "PK_SmtLibVersion",
"PK_Sorts", "PK_SortsDescription", "PK_Source", "PK_Status",
"PK_Theories", "PK_Values", "PK_Verbosity", "PK_Version",
"UndefinedSymbol", "WS" ]
grammarFileName = "SLComp18.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.7.1")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None
| 68.204152 | 103 | 0.596959 | 12,522 | 59,133 | 2.791407 | 0.160597 | 0.113235 | 0.03888 | 0.040053 | 0.339274 | 0.198518 | 0.165389 | 0.154145 | 0.151742 | 0.147251 | 0 | 0.335891 | 0.14048 | 59,133 | 866 | 104 | 68.28291 | 0.351828 | 0.000693 | 0 | 0.018846 | 1 | 0.624264 | 0.662097 | 0.598717 | 0 | 0 | 0 | 0 | 0.023557 | 1 | 0.002356 | false | 0 | 0.004711 | 0 | 0.154299 | 0.001178 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
68342bbdcc383b2bdae1b8fab18cac5348cba88e | 5,503 | py | Python | tests/unit_tests/test_power.py | ecoen66/imcsdk | b10eaa926a5ee57cea7182ae0adc8dd1c818b0ab | [
"Apache-2.0"
] | 31 | 2016-06-14T07:23:59.000Z | 2021-09-12T17:17:26.000Z | tests/unit_tests/test_power.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 109 | 2016-05-25T03:56:56.000Z | 2021-10-18T02:58:12.000Z | tests/unit_tests/test_power.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 67 | 2016-05-17T05:53:56.000Z | 2022-03-24T15:52:53.000Z | # Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import patch, MagicMock
from nose.tools import assert_raises
from imcsdk.imchandle import ImcHandle
from imcsdk.imcexception import ImcOperationError
from imcsdk.apis.server.serveractions import server_power_down, server_power_up
from imcsdk.imccoreutils import IMC_PLATFORM
@patch.object(ImcHandle, 'set_mo')
@patch.object(ImcHandle, 'query_dn')
@patch.object(ImcHandle, 'login')
def test_valid_power_down_server(login_mock, query_dn_mock, set_mo_mock):
# Patch ImcHandle.login to create a Faux ImcHandle object w/o real CIMC
# Patch ImcHandle.query_dn to simulate CIMC interaction w/o real CIMC
# Patch ImcHandle.set_mo to simulate CIMC interaction w/o real CIMC
login_mock.return_value = True
set_mo_mock.return_value = True
pwrd_off_mock = MagicMock()
pwrd_off_mock.oper_power = "off"
pwrd_on_mock = MagicMock()
pwrd_on_mock.oper_power = "on"
test_cimc = ImcHandle(ip='169.254.1.1',
username='admin',
password='right')
test_cimc._set_platform(platform=IMC_PLATFORM.TYPE_CLASSIC)
# Scenario: server starts powered off
query_dn_mock.return_value = pwrd_off_mock
assert server_power_down(test_cimc, 0, 1) is pwrd_off_mock
# Scenario: server starts powered on, and powers off successfully
query_dn_mock.side_effect = [pwrd_on_mock, pwrd_off_mock, pwrd_off_mock, pwrd_off_mock]
assert server_power_down(test_cimc, 0, 1) is pwrd_off_mock
@patch.object(ImcHandle, 'set_mo')
@patch.object(ImcHandle, 'query_dn')
@patch.object(ImcHandle, 'login')
def test_invalid_power_down_server(login_mock, query_dn_mock, set_mo_mock):
# Patch ImcHandle.login to create a Faux ImcHandle object w/o real CIMC
# Patch ImcHandle.query_dn to simulate CIMC interaction w/o real CIMC
# Patch ImcHandle.set_mo to simulate CIMC interaction w/o real CIMC
# Patch ComputeRackUnit.oper_power to simulate power state
login_mock.return_value = True
set_mo_mock.return_value = True
pwrd_off_mock = MagicMock()
pwrd_off_mock.oper_power = "off"
pwrd_on_mock = MagicMock()
pwrd_on_mock.oper_power = "on"
test_cimc = ImcHandle(ip='169.254.1.1',
username='admin',
password='right')
test_cimc._set_platform(platform=IMC_PLATFORM.TYPE_CLASSIC)
# Scenario: Zero value passed in as check interval
assert_raises(ValueError, server_power_down, test_cimc, 0, 0)
# Scenario: server starts power on, and doesn't power off
query_dn_mock.return_value = pwrd_on_mock
assert_raises(ImcOperationError, server_power_down, test_cimc, 0, 1)
@patch.object(ImcHandle, 'set_mo')
@patch.object(ImcHandle, 'query_dn')
@patch.object(ImcHandle, 'login')
def test_valid_power_up_server(login_mock, query_dn_mock, set_mo_mock):
# Patch ImcHandle.login to create a Faux ImcHandle object w/o real CIMC
# Patch ImcHandle.query_dn to simulate CIMC interaction w/o real CIMC
# Patch ImcHandle.set_mo to simulate CIMC interaction w/o real CIMC
login_mock.return_value = True
set_mo_mock.return_value = True
pwrd_off_mock = MagicMock()
pwrd_off_mock.oper_power = "off"
pwrd_on_mock = MagicMock()
pwrd_on_mock.oper_power = "on"
test_cimc = ImcHandle(ip='169.254.1.1',
username='admin',
password='right')
test_cimc._set_platform(platform=IMC_PLATFORM.TYPE_CLASSIC)
# Scenario: server starts powered on
query_dn_mock.return_value = pwrd_on_mock
assert server_power_up(test_cimc, 0, 1) is pwrd_on_mock
# Scenario: server starts powered off, and powers on successfully
query_dn_mock.side_effect = [pwrd_off_mock, pwrd_on_mock, pwrd_on_mock, pwrd_on_mock]
assert server_power_up(test_cimc, 0, 1) is pwrd_on_mock
@patch.object(ImcHandle, 'set_mo')
@patch.object(ImcHandle, 'query_dn')
@patch.object(ImcHandle, 'login')
def test_invalid_power_up_server(login_mock, query_dn_mock, set_mo_mock):
# Patch ImcHandle.login to create a Faux ImcHandle object w/o real CIMC
# Patch ImcHandle.query_dn to simulate CIMC interaction w/o real CIMC
# Patch ImcHandle.set_mo to simulate CIMC interaction w/o real CIMC
login_mock.return_value = True
set_mo_mock.return_value = True
pwrd_off_mock = MagicMock()
pwrd_off_mock.oper_power = "off"
pwrd_on_mock = MagicMock()
pwrd_on_mock.oper_power = "on"
test_cimc = ImcHandle(ip='169.254.1.1',
username='admin',
password='right')
test_cimc._set_platform(platform=IMC_PLATFORM.TYPE_CLASSIC)
# Scenario: Zero value passed in as check interval
assert_raises(ValueError, server_power_up, test_cimc, 0, 0)
# Scenario: server starts power off, and doesn't power on
query_dn_mock.return_value = pwrd_off_mock
assert_raises(ImcOperationError, server_power_up, test_cimc, 0, 1)
| 43.330709 | 91 | 0.735417 | 824 | 5,503 | 4.643204 | 0.165049 | 0.032933 | 0.046001 | 0.031364 | 0.792734 | 0.777313 | 0.763722 | 0.716153 | 0.697857 | 0.664924 | 0 | 0.0125 | 0.185899 | 5,503 | 126 | 92 | 43.674603 | 0.841518 | 0.333273 | 0 | 0.789474 | 0 | 0 | 0.049519 | 0 | 0 | 0 | 0 | 0 | 0.118421 | 1 | 0.052632 | false | 0.052632 | 0.078947 | 0 | 0.131579 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
6839b5ca5516e6736274a7ed230a96a79b96d759 | 12,203 | py | Python | project/models.py | felixzheng02/pypkpd | 9e7f41aa7e33ba50cec3482f14e7be08a4bc23e7 | [
"MIT"
] | 9 | 2021-06-17T08:11:31.000Z | 2021-06-22T08:05:27.000Z | project/models.py | Caiya-Zhang/pypkpd | 9e7f41aa7e33ba50cec3482f14e7be08a4bc23e7 | [
"MIT"
] | null | null | null | project/models.py | Caiya-Zhang/pypkpd | 9e7f41aa7e33ba50cec3482f14e7be08a4bc23e7 | [
"MIT"
] | 2 | 2021-06-18T07:16:08.000Z | 2021-09-25T04:43:28.000Z | """
## This python script defines main structural models needed.
#' Author: Caiya Zhang, Yuchen Zheng
"""
import numpy as np
from project.feval import feval
#' Structural model: one-compartment, oral absorption, multiple bolus dose, parameterized using KE.
#'
#' This is a structural model function that encodes a model that is
#' one-compartment, oral absorption, multiple bolus dose, parameterized using KE.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{ff_file} argument.
#'
#' @param model_switch a vector of values, the same size as \code{xt}, identifying which model
#' response should be computed for the
#' corresponding xt value. Used for multiple response models.
#' @param xt a vector of independent variable values (often time).
#' @param parameters A named list of parameter values.
#' @param poped_db a poped database. This can be used to extract information that may be needed in the model file.
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family structural_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_ff.PK.1.comp.oral.md.KE.R
#'
#' @export
def ff_PK_1_comp_oral_md_KE(model_switch, xt, parameters: dict, poped_db):
##-- Model: One comp first order absorption
## -- Analytic solution for both mutiple and single dosing
y = xt
N = np.floor(xt/parameters["TAU"]) + 1
y = (parameters["DOSE"]*parameters["Favail"]/parameters["V"])*(parameters["KA"]/(parameters["KA"]-parameters["KE"]))*(np.exp(-parameters["KE"]*(xt-(N-1)*parameters["TAU"]))*(1-np.exp(-N*parameters["KE"]*parameters["TAU"]))/(1-np.exp(-parameters["KE"]*parameters["TAU"]))-np.exp(-parameters["KA"]*(xt-(N-1)*parameters["TAU"]))*(1-np.exp(-N*parameters["KA"]*parameters["TAU"]))/(1-np.exp(-parameters["KA"]*parameters["TAU"])))
return {"y": y, "poped_db": poped_db}
#' Structural model: one-compartment, oral absorption, multiple bolus dose, parameterized using CL.
#'
#' This is a structural model function that encodes a model that is
#' one-compartment, oral absorption, multiple bolus dose, parameterized using CL.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{ff_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family structural_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_ff.PK.1.comp.oral.md.CL.R
#'
#' @export
def ff_PK_1_comp_oral_md_CL(model_switch, xt, parameters: dict, poped_db):
##-- Model: One comp first order absorption
## -- Analytic solution for both mutiple and single dosing
y = xt
N = np.floor(xt/parameters["TAU"])+1
y = (parameters["DOSE"]*parameters["Favail"]/parameters["V"])*(parameters["KA"]/(parameters["KA"]-parameters["CL"]/parameters["V"]))*(np.exp(-parameters["CL"]/parameters["V"]*(xt-(N-1)*parameters["TAU"]))*(1-np.exp(-N*parameters["CL"]/parameters["V"]*parameters["TAU"]))/(1-np.exp(-parameters["CL"]/parameters["V"]*parameters["TAU"]))-np.exp(-parameters["KA"]*(xt-(N-1)*parameters["TAU"]))*(1-np.exp(-N*parameters["KA"]*parameters["TAU"]))/(1-np.exp(-parameters["KA"]*parameters["TAU"])))
return {"y": y, "poped_db": poped_db}
#' Structural model: one-compartment, oral absorption, single bolus dose, parameterized using KE.
#'
#' This is a structural model function that encodes a model that is
#' one-compartment, oral absorption, single bolus dose, parameterized using KE.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{ff_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family structural_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_ff.PK.1.comp.oral.sd.KE.R
#'
#' @export
## TODO: change the parameterization to be a function option
## TODO: only use md and then turn off if single dose
def ff_PK_1_comp_oral_sd_KE(model_switch, xt, parameters: dict, poped_db):
##-- Model: One comp first order absorption
y = xt
y = (parameters["DOSE"]*parameters["Favail"]*parameters["KA"]/(parameters["V"]*(parameters["KA"]-parameters["KE"])))*(np.exp(-parameters["KE"]*xt)-np.exp(-parameters["KA"]*xt))
return {"y": y, "poped_db": poped_db}
#' Structural model: one-compartment, oral absorption, single bolus dose, parameterized using CL.
#'
#' This is a structural model function that encodes a model that is
#' one-compartment, oral absorption, single bolus dose, parameterized using CL.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{ff_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family structural_models
#'
#' @example tests/testthat/examples_fcn_doc/warfarin_basic.R
#' @example tests/testthat/examples_fcn_doc/examples_ff.PK.1.comp.oral.sd.CL.R
#'
#' @export
def ff_PK_1_comp_oral_sd_CL(model_switch, xt, parameters: dict, poped_db):
##-- Model: One comp first order absorption
y = xt
y = (parameters["DOSE"]*parameters["Favail"]*parameters["KA"]/(parameters["V"]*(parameters["KA"]-parameters["CL"]/parameters["V"])))*(np.exp(-parameters["CL"]/parameters["V"]*xt)-np.exp(-parameters["KA"]*xt))
return {"y": y, "poped_db": poped_db}
#' Structural model: one-compartment, single bolus IV dose, parameterized using CL driving an EMAX model with a direct effect.
#'
#' This is a structural model function that encodes the model described above.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{ff_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family structural_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_ff.PKPD.1.comp.sd.CL.emax.R
#'
#' @export
def ff_PKPD_1_comp_sd_CL_emax(model_switch, xt, parameters: dict, poped_db):
y = xt
MS = model_switch
# PK model
CONC = parameters["DOSE"]/parameters["V"]*np.exp(-parameters["CL"]/parameters["V"]*xt)
# PD model
EFF = parameters["E0"] + CONC*parameters["EMAX"]/(parameters["EC50"] + CONC)
y[MS==1] = CONC[MS==1]
y[MS==2] = EFF[MS==2]
return {"y": y, "poped_db": poped_db}
#' Structural model: one-compartment, oral absorption, multiple bolus dose,
#' parameterized using CL driving an inhibitory IMAX model with a direct effect.
#'
#' This is a structural model function that encodes the model described above.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{ff_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family structural_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_ff.PKPD.1.comp.oral.md.CL.imax.R
#'
#' @export
def ff_PKPD_1_comp_oral_md_CL_imax(model_switch, xt, parameters: dict, poped_db):
##-- Model: One comp first order absorption + inhibitory imax
## -- works for both mutiple and single dosing
y = xt
MS = model_switch
# PK model
returnArgs = ff_PK_1_comp_oral_md_CL(model_switch, xt, parameters, poped_db)
CONC = returnArgs["y"]
# PD model
EFF = parameters["E0"]*(1 - CONC*["IMAX"]/(parameters["IC50"] + CONC))
y[MS==1] = CONC[MS==1]
y[MS==2] = EFF[MS==2]
return {"y": y, "poped_db": poped_db}
#' RUV model:
#' Additive and Proportional.
#'
#' This is a residual unexplained variability (RUV) model function that encodes the model described above.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{fError_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#' @param epsi A matrix with the same number of rows as the \code{xt} vector, columns match the numbers defined in this
#' function.
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family RUV_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_ff.PK.1.comp.oral.md.CL.R
#' @export
def feps_add_prop(model_switch, xt, parameters, epsi, poped_db):
## -- Residual Error function
## -- Additive + Proportional
returnArgs = feval(poped_db["model"]["ff_pointer"], model_switch, xt, parameters, poped_db)
y = returnArgs[0]
poped_db = returnArgs[1]
y = y*(1+epsi[:,0])+epsi[:,1]
return {"y": y, "poped_db": poped_db}
#' RUV model:
#' Additive .
#'
#' This is a residual unexplained variability (RUV) model function that encodes the model described above.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{fError_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#' @param epsi A matrix with the same number of rows as the \code{xt} vector, columns match the numbers defined in this
#' function.
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family RUV_models
#'
#' @example tests/testthat/examples_fcn_doc/examples_feps.add.R
#' @export
def feps_add(model_switch, xt, parameters, epsi, poped_db):
## -- Residual Error function
## -- Additive
returnArgs = feval(poped_db["model"]["ff_pointer"], model_switch, xt, parameters, poped_db)
y = returnArgs[0]
poped_db = returnArgs[1]
y = y+epsi[:,0]
return {"y": y, "poped_db": poped_db}
#' RUV model:
#' Proportional.
#'
#' This is a residual unexplained variability (RUV) model function that encodes the model described above.
#' The function is suitable for input to the \code{\link{create.poped.database}} function using the
#' \code{fError_file} argument.
#'
#' @inheritParams ff.PK.1.comp.oral.md.KE
#' @param epsi A matrix with the same number of rows as the \code{xt} vector, columns match the numbers defined in this
#' function.
#'
#' @return A list consisting of:
#' \enumerate{
#' \item y the values of the model at the specified points.
#' \item poped_db A (potentially modified) poped database.
#' }
#'
#' @family models
#' @family RUV_models
#'
#' @example tests/testthat/examples_fcn_doc/warfarin_basic.R
#' @example tests/testthat/examples_fcn_doc/examples_ff.PK.1.comp.oral.sd.CL.R
#'
#' @export
def feps_prop(model_switch, xt, parameters, epsi, poped_db):
## -- Residual Error function
## -- Proportional
returnArgs = feval(poped_db["model"]["ff_pointer"], model_switch, xt, parameters, poped_db)
y = returnArgs[0]
poped_db = returnArgs[1]
y = y*(1+epsi[:,0])
return {"y": y, "poped_db": poped_db}
| 37.780186 | 495 | 0.674342 | 1,728 | 12,203 | 4.667245 | 0.103588 | 0.040794 | 0.023435 | 0.021203 | 0.912089 | 0.903162 | 0.886671 | 0.86832 | 0.860012 | 0.838438 | 0 | 0.006375 | 0.177333 | 12,203 | 322 | 496 | 37.897516 | 0.796992 | 0.628698 | 0 | 0.581818 | 0 | 0 | 0.076438 | 0 | 0 | 0 | 0 | 0.003106 | 0 | 1 | 0.163636 | false | 0 | 0.036364 | 0 | 0.363636 | 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 |
684088102380d19a6477e957d049e3effea04947 | 19 | py | Python | trackerino/__init__.py | decaruju/trackerino | b8a621bf8e01c67342f5970b186169e033a430fe | [
"MIT"
] | null | null | null | trackerino/__init__.py | decaruju/trackerino | b8a621bf8e01c67342f5970b186169e033a430fe | [
"MIT"
] | null | null | null | trackerino/__init__.py | decaruju/trackerino | b8a621bf8e01c67342f5970b186169e033a430fe | [
"MIT"
] | null | null | null | from .db import DB
| 9.5 | 18 | 0.736842 | 4 | 19 | 3.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | 19 | 1 | 19 | 19 | 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 |
684c3405735a93d945bffa1eb40a3b4256545464 | 2,340 | py | Python | PyAlgorithm/testing/selection_unittest.py | allenliuzihao/PyAlgorithm | 0468f1fc90795d7524e8674aecbfbd2214b256a7 | [
"MIT"
] | null | null | null | PyAlgorithm/testing/selection_unittest.py | allenliuzihao/PyAlgorithm | 0468f1fc90795d7524e8674aecbfbd2214b256a7 | [
"MIT"
] | null | null | null | PyAlgorithm/testing/selection_unittest.py | allenliuzihao/PyAlgorithm | 0468f1fc90795d7524e8674aecbfbd2214b256a7 | [
"MIT"
] | null | null | null | import unittest
import random
import sys
sys.path.append("../Selection_Algorithm")
from deterministic_selection import d_select, randomized_selection
class DeterministicSelectionTestCase(unittest.TestCase):
def test_deterministic_selection_one_element(self):
a = [1]
k = 1
self.assertEqual(d_select(a, k), 1, 'Error when try to select the only element from array!')
def test_deterministic_selection_elements_sorted(self):
a = [i for i in xrange(1, 1000)]
k = 600
self.assertEqual(d_select(a, k), 600, 'Error when try to select the kth element from sorted array!')
def test_deterministic_selection_elements_reverse_sorted(self):
a = [i for i in reversed(xrange(1, 1000))]
k = 600
self.assertEqual(d_select(a, k), 600, 'Error when try to select the kth element from reverse sorted array!')
def test_deterministic_selection_random_elements(self):
a = random.sample(range(100000), 100000)
b = a[:]
b.sort()
k = random.randint(1, 100000)
self.assertEqual(d_select(a, k), b[k - 1], 'Error when try to select the kth element from random array!')
class RandomSelectionTestCase(unittest.TestCase):
def test_deterministic_selection_one_element(self):
a = [1]
k = 1
self.assertEqual(randomized_selection(a, k), 1, 'Error when try to select the only element from array!')
def test_deterministic_selection_elements_sorted(self):
a = [i for i in xrange(1, 1000)]
k = 600
self.assertEqual(d_select(a, k), 600, 'Error when try to select the kth element from sorted array!')
def test_deterministic_selection_elements_reverse_sorted(self):
a = [i for i in reversed(xrange(1, 1000))]
k = 600
self.assertEqual(randomized_selection(a, k), 600, 'Error when try to select the kth element from reverse sorted array!')
def test_deterministic_selection_random_elements(self):
a = random.sample(range(100000), 100000)
b = a[:]
b.sort()
k = random.randint(1, 100000)
self.assertEqual(randomized_selection(a, k), b[k - 1], 'Error when try to select the kth element from random array!')
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(DeterministicSelectionTestCase)
unittest.TextTestRunner(verbosity=2).run(suite)
suite2 = unittest.TestLoader().loadTestsFromTestCase(RandomSelectionTestCase)
unittest.TextTestRunner(verbosity=2).run(suite2) | 36.5625 | 122 | 0.750427 | 338 | 2,340 | 5.035503 | 0.180473 | 0.116334 | 0.094007 | 0.13631 | 0.79436 | 0.753231 | 0.711516 | 0.711516 | 0.711516 | 0.711516 | 0 | 0.04693 | 0.144017 | 2,340 | 64 | 123 | 36.5625 | 0.802796 | 0 | 0 | 0.625 | 0 | 0 | 0.216147 | 0.009398 | 0 | 0 | 0 | 0 | 0.166667 | 0 | null | null | 0 | 0.083333 | null | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
68915d1439b148c22306fb30c1f358d139c9bb5c | 131,328 | py | Python | sudoku/gui.py | danya02/slon-2019-games | cdfb0eeb1114f22bc3d537130c9b450c4f9d7123 | [
"MIT"
] | null | null | null | sudoku/gui.py | danya02/slon-2019-games | cdfb0eeb1114f22bc3d537130c9b450c4f9d7123 | [
"MIT"
] | null | null | null | sudoku/gui.py | danya02/slon-2019-games | cdfb0eeb1114f22bc3d537130c9b450c4f9d7123 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import pygame
import threading
import tkinter
import tkinter.filedialog
import traceback
import gzip
pygame.init()
# from https://stackoverflow.com/a/312464/5936187
def chunks(l, n):
"""Yield successive n-sized chunks from l."""
for i in range(0, len(l), n):
yield l[i:i + n]
class SudokuField:
def __init__(self, n, bx, by, surface=None, cellsize=32):
self.field = [[None for _x in range(n)] for _y in range(n)]
self.immutable = [[False for _x in range(n)] for _y in range(n)]
self.cellsize = cellsize
self.n = n
self.font = pygame.font.SysFont(pygame.font.get_default_font(), int(self.cellsize))
self.images_white = [self.font.render(str(i) if i>0 else '?', True, pygame.Color('white' if i>0 else 'red')) for i in range(self.n+1)]
self.images_green = [self.font.render(str(i) if i>0 else '?', True, pygame.Color('green' if i>0 else 'red')) for i in range(self.n+1)]
self.block = (bx, by)
self.cellsize=cellsize
self.selected = None
self.select_phase = 0
self.select_tick = 0
self.errors = []
self.error_ticks = 0
self.count = 0
try:
self.dump_sound()
self.err_sound = pygame.mixer.Sound('Oxygen-Sys-Warning.ogg')
except:
self.err_sound = None
self.cells = [[pygame.Rect(cellsize*_x, cellsize*_y, cellsize, cellsize) for _x in range(self.n)] for _y in range(self.n)]
if not surface:
self.surface = pygame.display.set_mode((n*self.cellsize, n*self.cellsize))
else:
self.surface = surface
def recreate_cache(self):
self.font = pygame.font.SysFont(pygame.font.get_default_font(), int(self.cellsize))
self.images_white = [self.font.render(str(i) if i>0 else '?', True, pygame.Color('white' if i>0 else 'red')) for i in range(self.n+1)]
self.images_green = [self.font.render(str(i) if i>0 else '?', True, pygame.Color('green' if i>0 else 'red')) for i in range(self.n+1)]
self.cells = [[pygame.Rect(self.cellsize*_x, self.cellsize*_y, self.cellsize, self.cellsize) for _x in range(self.n)] for _y in range(self.n)]
@staticmethod
def dump_sound():
sound = b'\x1f\x8b\x08\x00\xc6f3\\\x02\xff\xa4\xbbu@TO\xdb?<\xbbt7\x82"\xdd \xd2\x88\xd4\x02JIKH#)\xdd)\xb1(\x92\xd2!\r\x82\xa4\x80\x08R\xd2\xd2H)-J\x87\x08\x02")\xb1\xefY\xfc\xde\xcf}\xdf\xcf\xef\x8f\xe7\x8f\xf7pvv\xaesf\xe6\xcc|\xae\x9e\xb3h\xd8\xda\xde\x07p\xf0\xcfq\xde\x9f@\x88\xfe\xde2\x9bB\xc1\xe8a\xde.\xee\x16v\x1e\xe8\x0bpd\xd3?M\xb6\xff6n\x80i\xa0{\x82\xff\xec\t\x83\xbeKd\x1f\xfa\x93*\xa1\xfe\xebp\xc3\xf8;\xd0-\xe8\xbe\xac\x86\x04\xe3C\x17\x1d/=F\x0ba\x0bF#A~~\x11\x01\x01\x011\x13FN\x8b\x87\x1e\xd6V\x8c.\xce\x8c\x0f\xec\\\x1f\xf1i\xb8\xdbrx0:\xdaY\xe8]v\xe5B?\x03\x86\xf5w\x1c\x1e9y=\x18\xc0\x85\xae\x08\xa82v#G\xe3u\x01 \x05\xc0\x9c\x95\x8b8\xc9F\x99\xab0\xf9%\xa7_Z\xb2\x12\xba\xd6\xcd\x1f\x99\x96\x1c\xd9Mc\xf9\\\xa0\xe7_\x05\xa3\xb0\x15\x15\x00\x98\x00\xc9\x89\x17[\xb0\xa6l?,nK\xc3\x11\xeb\x9e\'n\xa7~\xab\x98\x11\'JkA\x1c\xef\xc3\x01\xbb\xa5s\xd1\xbb"\x07\xe7a.6\\"\x03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m\x829\x0b\x9f\xa3\xedp\xb2\xf6\xa5EV)M\x86\xae\xd1\x15\xea\xa8@d\xac67\x1b\xd4\x8d\x03\x8a\x87\xda!;\xd5\xae\x900\x84\xa7\xf0\x04\x9f\xc8\x00\x0f\xbc\x82\x03\x1a\xba\xdej\x088\xd5O\xc27\x94?\x0bkQ\xde\x85\x80\xba\x97\x88\x06BKD7\xc5\xda\x0e\r\x0e\x84\x0c\x04\x0b\x1a-Hp\x7f\xf8\x15\x95\x96A&@G\x7f\x1f\x12h\x13\xfd\xd4\x7f\xa3\x02\x03\x0bx\xc4\x00\x81%Z\x1e\xeb\xaa-L\xfd\xe0Q\x9f\n`\x84\x84J\x00\x9b\xc9\x8aP\xae\x8f&\x94R\x0e\x97\xab\x90\x94\x1c\x00\xfe\x05(J2\x97\xa3\xe5\x14\xb6b\x03\xf1\xf8\x90\xb3+H\x86\\\x96r\xa1\\\x84\xc0:c\xf2g\xedg\xa4\x96\xc3\xb2\x9c\x85\x85%\x02=\x8c\xc9\x89\xda\x0eZ\x96\xcfe9\xd9\n\'\xf3\x1d\x98 R\xa5\xe2\xee\x94\x1c\x9a4\x8c\xd6.\xd3Q\xb1\xaf\xe8\xa6)\xd4)M\x86H\x01\x95R\x0f\x15\x88\xb4L\xd6>J6\x8c~;\xc9Y\xe8)\x08\x05Z\x15C\xe2\xebVP\xc8eH\x00\x10\x8f\\\x01\x90\xa8z\xe8\x15\x9a\x94\xff\xb6\x1db\x17\x1c\xf8A6KN\x05\x1d\x90\x912\x15\xd2X\x0e\n\x84\xc7k\xa3\xe33\x9d(\x81\x1e:Kbh\xeaP\xb8\x86\xc3\x04\r\xb0\x9e\xf5\x94\x14=\xde\xb0,n\xb6G,4\xd7\xd0Q\xf1\xde4\x0fR\xb9\xf5,\xcbAq\xdc\x97\x1e\xcf\x05\xd6\xb2 \xd3\nG\x0b\xf8\xb5\xbb\xa2\x1c4x\xdc\xe85\x92B&\x83\xa63\xcd\xe3\xb98vv(>\xd3:\xa3\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xfb\xb0x!\xa4C\x90|%+qA\xf2\xa5\xae\xc2%\x85F7;4\xd9\xff\x92Q\\\\\x074\xf2\x9cL\x108\x9bo\xc3\xd4o\xe3\x16\xbe\x1bw \x81\x98bh_zD/X\xc2Y\x98\xa8\xbd#U\xab\xa9m\xcf\xd53\xf7\xf8\x1e[\xcdgC\x87\x96\xf5\xb9{\xdc\\=_\xfcw\xc4\xeb\x13\xb5UoP\x03s\xf2E\x80l0\xef\xfc\x81\xcbq\xd72\xe4\x19:\x9e\xb0\x80\x94G\x9ePN\xe9\xef<{\xfe+\xbd\xf9[\xc0\x00\x12\x0f\xed2\xf5\xaaxj\xde\xd9\x174\x94&5\x7f\x7f\xda\xce\xe1\xd9ec\xd5W\xa83\xb8rg\x94Ed\xdc\x82m\xfa%\xd5\xd7\x05,s\xb4O\x00\x82\x00ti\x95\x8b\xf4\x98\xf2X\xd0\x84&\xda\xf3\x12\xc9>\x97\x8dl\xb4\xee\xe1\\e]\x9b\x84\x9e\x94\xf4\xe0~_\xb2\xf6\xa0A\x14\x9b\xa7*\x97\x02W\x11\xb9\\O\xf2+\xe8Y\\\x9e\x9f\r\x87\xa5\xeauT\x08 \x0b\xcc\x08\xda\x11\xa1\x83\x98p,Ms\xc8\x0c\x11\x93\x92\xbf\x02\xc8\x0fp\xf9^W2\xd2\xf8{}\x9c\xfc\x9ct\x14\xc3\xca\xc5D\x00A\xca,t\x87\xd9B@I\xb5\x04;*j\x03\x98\xbb\x8501\x00Aa\xd1\xcf||y\x1f\xc1\x15O\xb7\xa9\x10\xd2\'\xa4\xa1\x8c\xd48\x9a\x088\xb1z\xc3b\xa4\x98\xe4"6\xc7w\xca\x94\xdb\xa4\x97\x96\x0f\x17\xf8B\xaeW\x14\x19\xf1\xc8f\xed\xd6mIi\x84\xdc\x1d\x05%\x15UuMm\x9d\xbf\xb1\x16)\x90\x06 \x91\x8a\x919#]<\x968\x8e$\x9e4\x81,\x91<\x89"\x99\x12\x8ab\x10\xe0\xd2\x86\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b\x8d(,\x7fU\xfc\xc0\xbb_\x95\x9b\x1dE\xd8\x03M\xd9\x873\x1d!\xa6-\xdd\xc5\xebJb\x166\xd8\xa0C\x0e\x98/k\x10U\x93Skn=\xaa\x93\x80\x87\xef\n3S\xf6\\\x9a\x86\x9c=J\xeceOq\x88\xaf\xc3\xad_\t\r\x14\x85\x92\x88\xe3\xc9\x127d\xceY\xe5N\xf6\xe3`dT\x8e\xed\xf8\x8f\xe5kXR\xe0rE\xd6\xef\xf5\xbb\x90\x00\x8e.\x837\xa3\xb7f\xeb\x8f\xc8\xd0*V\x1e\xcaFF\xd6_\xf7\x82a/\xf6\xff\xee\xc5\xf9\x812\xfb\x19Fw\xce7\xd4@j\x145\xf4\xefu\x92 j\x08\xf5\xf5\xb1\'\xff\x19\xe5\xf1\xa1\xfb\xf6\xf2\x84\x87+\xbf\x7f.\xbe\x01\x0e\xa1\x7f\x90A\x9c\x12\x1c\xd8\xc1\xdb\xcd\x94f\xcc\x03\t7\xed\x0b\xea\x8b\xc4p\xff\x19\x1c\xdb\x16&\x14\x9e\xd6\xa3\xfa\r|\xfc\x1c\r\x11]%\xd0\xea\xbcO4\x83\x10fV\xc6;\xeaL|VE9\xda\xf9EO\x15\xee@@\xbb`x\xd4\x0e\xe7\xf2\xde\x8d\xba\xbc\xd0/\xb9\xa6\x9e\xb5k[S\x81\xef\x1b\x1e\x86j\x18\xc2T\xa3\x9c\xac\xe9~w\xf0\xea\xbeB\xa9\x01\xae\xaf\xd2\xb1\x00\x84m\xcf\xe6[\x99\xf7\x17\xc4\x95y\xaa\x1c>\t\xfd\x11\xcf\xc0\xf2"\x00$\x85O\xee\xda+\xfb\xbe\xfc!\xc42\x88\xee\xe3:\x1d<\xd9 \xbfO\xd5\x98\xa6\x95q#|\xce\x00j\xdd\x99xn~/\x80[\x1d\xc2\x84\xed-\x89wb\x99~\xf6\xa2\x92\n\x10\x9f\x18\x01oh\xc2\'J\x944T,\x06\xbcL\x1b\x92\xd3~\x9c\xbd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03\xd6\x99\xd0\xa0&\x8eJ4\tO\xd1\n9%\xd6\x90\x88\x14\x1fb\x13\xcc\x98\x7fbb\xbd\'b\x02V\xc1\xba\x1d\xd4\xea\xb8<Hn\xc2\xa1I\xdcSEA\xe4\xb5\x8ck\xa3\xbf1_\xadL\xf9H\x07\x8a\xeb\xa9\x19\xbc\x97\x14\xbe\xa6!cW2\xe4\xb5@Tj(\xd7\xc4\x80\xf2\xc7\x12\xd0\xde<N\xf7:\xa0\x85$C;\xd0S\xc4\x8d\xd6\xbc6\xbf\n\xb2C\x89\xc4\x9c\xfa\xfb{\xbe\xa0~\x9e\x88\x8c\x8cD\x12<\x91\x9b\xea\x99|3\xea_\xef\x8d\x95K\x97m\x97\x1b+\xb6r\x80\xb0\xfcw\xc9\x94y*\x07%|\xc0\xc0r\x9c\xb43<\xf0\xe7\xd9,j\xdd\x8f\xc6\rM\xf6JR<\x88@Z<`,b\xe7\x1bv\x84J\x9dQ\xac\xc0\x10i\x94\x9d\x1b\x87\xbf\xbb\x0c*b:\x12\x86_o\x8e\xb2U\x89\x1a\x04\xaf\xbe\x96\xc3\x98B\xa5\xea\xa3\xc1\xeb\xf4\x00\xb7r\xa2u\xce\xf2\t\xb5\xdf\xb1\xbb\xc7\n\xb7=c\xf3\xcdl\xff\x11\xcd\xff\x00\xc9\xe6\x8aPy\xa1\x00\x00'
sound = gzip.decompress(sound)
with open('Oxygen-Sys-Warning.ogg', 'wb') as o:
o.write(sound)
def draw(self):
font=self.font
self.surface.fill(pygame.Color('black'))
for i in self.cells:
pygame.draw.line(self.surface, pygame.Color('white'), (0, i[0].y), (self.surface.get_width(), i[0].y))
for i in self.cells[0]:
pygame.draw.line(self.surface, pygame.Color('white'), (i.x, 0), (i.x, self.surface.get_height()))
drawcell = None
for fline, cline in zip(self.field, self.cells):
for value, cell in zip(fline, cline):
if value is None:
surface = self.images_green[0]
else:
if self.immutable[cell.y//self.cellsize][cell.x//self.cellsize]:
surface = self.images_white[value]
else:
surface = self.images_green[value]
tc = surface.get_rect()
tc.center=cell.center
self.surface.blit(surface, tc)
if self.selected:
if (self.selected[0]*self.cellsize, self.selected[1]*self.cellsize) == (cell.x, cell.y):
drawcell = cell
for i in range(0,len(self.field),self.block[1]): # drawing horizontally
pygame.draw.line(self.surface, pygame.Color('white'), (0, self.cells[i][0].y), (self.surface.get_width(), self.cells[i][0].y), 5)
for i in range(0,len(self.field[0]),self.block[0]): # drawing vertically
pygame.draw.line(self.surface, pygame.Color('white'), (self.cells[0][i].x, 0), (self.cells[0][i].x, self.surface.get_height()), 5)
if drawcell:
self.select_tick += 1
if self.select_tick>2:
self.select_tick=0
self.select_phase+=1
if self.select_phase==2:
self.select_phase=0
pygame.draw.rect(self.surface, pygame.Color('red'), drawcell, [4,1][self.select_phase])
if self.error_ticks>0:
self.error_ticks-=1
if self.error_ticks==0:
x,y=self.errors[-1]
self.field[y][x] = None
for i in self.errors:
pygame.draw.rect(self.surface, pygame.Color('red'), self.cells[i[1]][i[0]], 6)
def select(self, x, y):
for yl, l in enumerate(self.cells):
for xl, c in enumerate(l):
if c.collidepoint(x,y):
if not self.immutable[yl][xl]:
self.selected = (xl,yl)
def input_number(self, number):
if not self.selected:
return None
self.count+=1
sx, sy = self.selected
self.selected = None
if number==None:
self.field[sy][sx]=number
return []
problems = []
n=len(self.field)
for x in range(n):
if self.field[sy][x]==number:
problems.append((x,sy))
for y in range(n):
if self.field[y][sx]==number:
problems.append((sx,y))
for x in range((sx//self.block[0])*self.block[0], (sx//self.block[0] + 1)*self.block[0]):
for y in range((sy//self.block[1])*self.block[1], (sy//self.block[1] + 1)*self.block[1]):
if (x,y)!=(sx,sy):
if self.field[y][x]==number:
problems.append((x,y))
problems=list(set(problems))
if len(problems)==0:
self.field[sy][sx]=number
else:
problems.append((sx,sy))
return problems
def show_err(self, value, number):
if self.err_sound is not None:
self.err_sound.play()
self.errors = value
x,y = value[-1]
self.field[y][x] = number
self.error_ticks = 30
@classmethod
def from_file(cls, file, surface=None, cellsize=32):
with open(file) as f:
data=list(map(int, f.read().split()))
n, x, y = data[0:3]
if x*y!=n:
raise ValueError('Block area not equal to side length; is the file corrupt?')
if len(data)!=n*n+3:
raise IndexError(f'File is wrong length: expected {n*n+3} items, found {len(data)} items instead. Is the file corrupt?')
field = cls(n,x,y, surface, cellsize=cellsize)
data = data[3:]
data = [None if not i else i for i in data]
data = list(chunks(data, n))
field.field = data
field.immutable = [[bool(val) for val in line] for line in data]
field.draw()
return field
class SudokuNumberSelector:
def __init__(self, n, surface, cellsize):
self.surface = surface
self.cellsize = cellsize
self.cellnum = n
self.cells = [pygame.Rect((i*self.cellsize,0),(self.cellsize,self.cellsize)) for i in range(n+1)]
self.error = None
self.error_ticks = 0
self.n = n
self.font = pygame.font.SysFont(pygame.font.get_default_font(), int(self.cellsize))
def reset_cache(self):
self.font = pygame.font.SysFont(pygame.font.get_default_font(), int(self.cellsize))
self.cells = [pygame.Rect((i*self.cellsize,0),(self.cellsize,self.cellsize)) for i in range(self.n+1)]
def draw(self):
self.surface.fill(pygame.Color('black'))
font=self.font
for i,j in enumerate(self.cells):
i+=1
if i<=self.cellnum:
text = font.render(str(i), True, pygame.Color('white'))
else:
text = font.render('?', True, pygame.Color('red'))
tc = text.get_rect()
tc.center=j.center
self.surface.blit(text, tc)
pygame.draw.rect(self.surface, pygame.Color('white'), j, 2)
if self.error == i:
self.error_ticks-=1
if self.error_ticks==0:
self.error = None
pygame.draw.rect(self.surface, pygame.Color('red'), j, 6)
def check_click(self, x,y):
for i,j in enumerate(self.cells):
if j.collidepoint(x,y):
return i+1
def show_err(self, num):
self.error = num
self.error_ticks=30
class SudokuScoreCounter:
def __init__(self, score_from, surface):
self.target = score_from
self.surface = surface
self.font = pygame.font.SysFont(pygame.font.get_default_font(), 32)
self.brect = pygame.Rect(0,0,0,0)
def draw(self, custom=None):
self.surface.fill(pygame.Color('black'))
text = self.font.render(str(self.target.count), True, pygame.Color('white'))
trect = text.get_rect()
trect.x+=5
trect.y+=5
self.surface.blit(text, trect)
text = self.font.render("Restart", True, pygame.Color('white'))
rtrect = text.get_rect()
rtrect.y+=5
rtrect.x+=200+trect.x
self.surface.blit(text, rtrect)
pygame.draw.rect(self.surface, pygame.Color('white'), rtrect, 2)
self.brect = rtrect
def click(self, x, y):
if self.brect.collidepoint((x,y)):
for y in range(len(self.target.field)):
for x in range(len(self.target.field)):
if not self.target.immutable[y][x]:
self.target.field[y][x]=None
self.target.count=0
class SudokuGame:
def __init__(self, width, height, cellsize=32):
try:
dimension = min(width, height)
field = self.get_path()
self.running = True
self.surface = pygame.display.set_mode((dimension,dimension), pygame.RESIZABLE)
self.width = int(open(field).readline().split()[0])
cellsize = (dimension)//(self.width+2)
size=cellsize*self.width
self.fieldrect = pygame.Rect(0,0,size,size)
self.fieldrect.x+=10
self.fieldrect.y+=10
self.field = SudokuField.from_file(field, pygame.Surface((size, size)), cellsize)
self.selector = SudokuNumberSelector(len(self.field.field), pygame.Surface((size+cellsize,cellsize)), cellsize)
self.selectorrect = self.selector.surface.get_rect()
self.selectorrect.y = size+16+10
self.selectorrect.x+=10
self.score = SudokuScoreCounter(self.field, pygame.Surface((300, 30)))
self.scorerect = self.score.surface.get_rect()
self.scorerect.y+=self.selectorrect.y+self.selectorrect.height+5
self.scorerect.x+=self.selectorrect.x
self.ticks = 0
self.update=False
self.target=(800,600)
#pygame.display.toggle_fullscreen()
self.clock = pygame.time.Clock()
#self.listen_click_thread = threading.Thread(target=self.listen_click, daemon=True)
#self.listen_click_thread.start()
self.listen_click()
except:
self.draw_error(traceback.format_exc())
@staticmethod
def get_path():
a = tkinter.Tk()
w = tkinter.Label(a, text="Select file in dialog (may be minimized)", font=("Helvetica", 24))
w.pack()
file=None
while not file or file=='':
file = tkinter.filedialog.askopenfilename()
a.destroy()
return file
def reset_rects(self, width, height):
dimension = min(width, height)
cellsize = (dimension)//(self.width+2)
size=cellsize*self.width
self.fieldrect = pygame.Rect(0,0,size,size)
self.fieldrect.x+=10
self.fieldrect.y+=10
self.field.surface = pygame.Surface((size, size))
self.field.cellsize = cellsize
self.field.recreate_cache()
self.selector.surface = pygame.Surface((size+cellsize,cellsize))
self.selector.cellsize = cellsize
self.selector.reset_cache()
self.selectorrect = self.selector.surface.get_rect()
self.selectorrect.y = size+16+10
self.selectorrect.x+=10
self.scorerect = self.score.surface.get_rect()
self.scorerect.y+=self.selectorrect.y+self.selectorrect.height+5
self.scorerect.x+=self.selectorrect.x
self.update = True
self.ticks=0
self.target=(width, height)
def listen_click(self):
while self.running:
self.clock.tick(20)
if self.update:
print(self.ticks)
self.ticks+=1
if self.ticks>5:
self.ticks=0
self.update=False
self.surface = pygame.display.set_mode(self.target, pygame.RESIZABLE)
self.draw()
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
return None
if event.type == pygame.KEYDOWN:
if event.key in [eval('pygame.K_'+i) for i in ['q','e', 'RETURN', 'ESCAPE', 'DELETE']]:
pygame.quit()
return None
if event.type == pygame.VIDEORESIZE:
self.reset_rects(*event.size)
if event.type == pygame.MOUSEBUTTONDOWN:
x,y = event.pos
if self.fieldrect.collidepoint((x,y)):
self.field.select(x-self.fieldrect.x, y-self.fieldrect.y)
elif self.scorerect.collidepoint((x,y)):
self.score.click(x-self.scorerect.x, y-self.scorerect.y)
elif self.selectorrect.collidepoint((x,y)):
number = self.selector.check_click(x-self.selectorrect.x, y-self.selectorrect.y)
if number>self.width:
number=None
value = self.field.input_number(number)
if value:
self.field.show_err(value, number)
self.selector.show_err(number)
def draw(self):
self.surface.fill(pygame.Color('black'))
self.field.draw()
self.selector.draw()
self.score.draw()
self.surface.blit(self.field.surface, self.fieldrect)
self.surface.blit(self.selector.surface, self.selectorrect)
self.surface.blit(self.score.surface, self.scorerect)
pygame.draw.rect(self.surface, pygame.Color('white'), self.fieldrect, 3)
pygame.draw.rect(self.surface, pygame.Color('white'), self.selectorrect, 3)
pygame.display.update()
@staticmethod
def draw_error(error):
error=['Unhandled exception!']+error.split('\n')+['Please report this.']
font = pygame.font.SysFont(pygame.font.get_default_font(), 32)
error = [font.render(str(i), True, pygame.Color('red')) for i in error]
display = pygame.display.set_mode((max(error, key=lambda x: x.get_width()).get_width(), 32*(len(error)+1)))
for i,j in enumerate(error):
display.blit(j, (0, 32*i))
pygame.display.flip()
c=pygame.time.Clock()
while 1:
c.tick(5)
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
if __name__ == '__main__':
width=1920
height=600
game = SudokuGame(width, height)
#input()
| 350.208 | 115,669 | 0.714509 | 28,682 | 131,328 | 3.26093 | 0.181891 | 0.003764 | 0.000962 | 0.002587 | 0.036715 | 0.032685 | 0.029926 | 0.02689 | 0.022688 | 0.019245 | 0 | 0.209281 | 0.037128 | 131,328 | 374 | 115,670 | 351.144385 | 0.530367 | 0.002284 | 0 | 0.283186 | 0 | 0.309735 | 0.603763 | 0.598794 | 0 | 0 | 0 | 0 | 0 | 1 | 0.067847 | false | 0 | 0.017699 | 0 | 0.120944 | 0.00295 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 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 |
d79d64da8f19398a2ac28824c20b12aa1f99c88a | 134 | py | Python | saleor/blog/views.py | nittesh31/karat-farms-server | 4d53ef51c6b282029a49ce1d74fb5cf0ba07a6ae | [
"CC-BY-4.0"
] | null | null | null | saleor/blog/views.py | nittesh31/karat-farms-server | 4d53ef51c6b282029a49ce1d74fb5cf0ba07a6ae | [
"CC-BY-4.0"
] | null | null | null | saleor/blog/views.py | nittesh31/karat-farms-server | 4d53ef51c6b282029a49ce1d74fb5cf0ba07a6ae | [
"CC-BY-4.0"
] | 1 | 2021-02-10T14:41:11.000Z | 2021-02-10T14:41:11.000Z | from django.template.response import TemplateResponse
def blog(request):
return TemplateResponse(request, "blog/index.html", {}) | 33.5 | 59 | 0.776119 | 15 | 134 | 6.933333 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11194 | 134 | 4 | 59 | 33.5 | 0.87395 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 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 |
d7d66d8aaa57101a363dfc955bc09d29740c3dec | 71 | py | Python | src/__init__.py | grayondream/algorithm-forth | c2c21419ec7c42b10f229ab41ac10edf7afbe956 | [
"Apache-2.0"
] | null | null | null | src/__init__.py | grayondream/algorithm-forth | c2c21419ec7c42b10f229ab41ac10edf7afbe956 | [
"Apache-2.0"
] | null | null | null | src/__init__.py | grayondream/algorithm-forth | c2c21419ec7c42b10f229ab41ac10edf7afbe956 | [
"Apache-2.0"
] | null | null | null | import src.basic
import src.search
import src.sort
import src.string | 17.75 | 18 | 0.802817 | 12 | 71 | 4.75 | 0.5 | 0.631579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140845 | 71 | 4 | 19 | 17.75 | 0.934426 | 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 |
0bee0b0b6b60e00b937addb3c120950eba991932 | 5,546 | py | Python | osmchadjango/changeset/tests/test_whitelist_views.py | jbronn/osmcha-django | 0de03fa081205f3a43114c5eb25211217f2dc0af | [
"BSD-2-Clause"
] | 27 | 2015-09-06T00:39:39.000Z | 2021-12-09T10:30:52.000Z | osmchadjango/changeset/tests/test_whitelist_views.py | jbronn/osmcha-django | 0de03fa081205f3a43114c5eb25211217f2dc0af | [
"BSD-2-Clause"
] | 494 | 2015-09-10T19:39:38.000Z | 2022-03-29T08:07:37.000Z | osmchadjango/changeset/tests/test_whitelist_views.py | jbronn/osmcha-django | 0de03fa081205f3a43114c5eb25211217f2dc0af | [
"BSD-2-Clause"
] | 17 | 2015-08-10T22:58:56.000Z | 2021-09-24T17:03:16.000Z | from django.urls import reverse
from social_django.models import UserSocialAuth
from rest_framework.test import APITestCase
from ...users.models import User
from ..models import UserWhitelist
class TestWhitelistUserView(APITestCase):
def setUp(self):
self.user = User.objects.create_user(
username='test_2',
password='password',
email='a@a.com'
)
UserSocialAuth.objects.create(
user=self.user,
provider='openstreetmap',
uid='123123',
)
self.user_2 = User.objects.create_user(
username='test_user',
password='password',
email='b@a.com'
)
UserSocialAuth.objects.create(
user=self.user_2,
provider='openstreetmap',
uid='444444',
)
self.url = reverse('changeset:whitelist-user')
def test_list_whitelist_unauthenticated(self):
response = self.client.get(self.url)
self.assertEqual(response.status_code, 401)
def test_create_whitelist_unauthenticated(self):
response = self.client.post(self.url, {'whitelist_user': 'good_user'})
self.assertEqual(response.status_code, 401)
self.assertEqual(UserWhitelist.objects.count(), 0)
def test_create_and_list_whitelist(self):
# test whitelisting a user and getting the list of whitelisted users
self.client.login(username=self.user.username, password='password')
response = self.client.post(self.url, {'whitelist_user': 'good_user'})
self.assertEqual(response.status_code, 201)
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data.get('results')), 1)
self.client.logout()
# the same with another user
self.client.login(username=self.user_2.username, password='password')
response = self.client.post(self.url, {'whitelist_user': 'the_user'})
self.assertEqual(response.status_code, 201)
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data.get('results')), 1)
self.assertEqual(UserWhitelist.objects.count(), 2)
self.assertEqual(UserWhitelist.objects.filter(user=self.user).count(), 1)
self.assertEqual(UserWhitelist.objects.filter(user=self.user_2).count(), 1)
self.assertEqual(
UserWhitelist.objects.filter(whitelist_user='good_user').count(), 1
)
self.assertEqual(
UserWhitelist.objects.filter(whitelist_user='the_user').count(), 1
)
def test_whitelist_same_user_two_times(self):
self.client.login(username=self.user.username, password='password')
response = self.client.post(self.url, {'whitelist_user': 'good_user'})
self.assertEqual(response.status_code, 201)
response = self.client.post(self.url, {'whitelist_user': 'good_user'})
self.assertEqual(response.status_code, 403)
class TestUserWhitelistDestroyAPIView(APITestCase):
def setUp(self):
self.user = User.objects.create_user(
username='test_2',
password='password',
email='a@a.com'
)
UserSocialAuth.objects.create(
user=self.user,
provider='openstreetmap',
uid='123123',
)
UserWhitelist.objects.create(user=self.user, whitelist_user='good_user')
UserWhitelist.objects.create(user=self.user, whitelist_user='good user#23 %7á')
self.user_2 = User.objects.create_user(
username='test_user',
password='password',
email='b@a.com'
)
UserSocialAuth.objects.create(
user=self.user_2,
provider='openstreetmap',
uid='444444',
)
UserWhitelist.objects.create(user=self.user_2, whitelist_user='the_user')
def test_delete_whitelist_unauthenticated(self):
response = self.client.delete(
reverse('changeset:delete-whitelist-user', args=['good_user'])
)
self.assertEqual(response.status_code, 401)
response = self.client.delete(
reverse('changeset:delete-whitelist-user', args=['the_user'])
)
self.assertEqual(response.status_code, 401)
def test_delete_userwhitelist(self):
self.client.login(username=self.user.username, password='password')
response = self.client.delete(
reverse('changeset:delete-whitelist-user', args=['good_user'])
)
self.assertEqual(response.status_code, 204)
# test username with blankspaces and special chars
response = self.client.delete(
reverse('changeset:delete-whitelist-user', args=['good user#23 %7á'])
)
self.assertEqual(response.status_code, 204)
# test delete a whitelist of another user
response = self.client.delete(
reverse('changeset:delete-whitelist-user', args=['the_user'])
)
self.assertEqual(response.status_code, 404)
self.client.logout()
self.client.login(username=self.user_2.username, password='password')
response = self.client.delete(
reverse('changeset:delete-whitelist-user', args=['the_user'])
)
self.assertEqual(response.status_code, 204)
self.assertEqual(UserWhitelist.objects.count(), 0)
| 40.188406 | 87 | 0.635593 | 605 | 5,546 | 5.700826 | 0.133884 | 0.100029 | 0.073065 | 0.117715 | 0.828646 | 0.815889 | 0.756451 | 0.741084 | 0.699913 | 0.66512 | 0 | 0.021786 | 0.246845 | 5,546 | 137 | 88 | 40.481752 | 0.803926 | 0.032816 | 0 | 0.647059 | 0 | 0 | 0.121664 | 0.039186 | 0 | 0 | 0 | 0 | 0.193277 | 1 | 0.067227 | false | 0.07563 | 0.042017 | 0 | 0.12605 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
0bf1a35e40a194820550663548e77f7befa538d4 | 198 | py | Python | cycl/utils.py | alekseyev/cycl | 344859da4c231b582c23992fe1fdffc000c78e52 | [
"MIT"
] | null | null | null | cycl/utils.py | alekseyev/cycl | 344859da4c231b582c23992fe1fdffc000c78e52 | [
"MIT"
] | null | null | null | cycl/utils.py | alekseyev/cycl | 344859da4c231b582c23992fe1fdffc000c78e52 | [
"MIT"
] | null | null | null | import secrets
import string
ALPHABET = string.ascii_letters + string.digits
PASSWORD_LENGTH = 16
def gen_password():
return "".join(secrets.choice(ALPHABET) for i in range(PASSWORD_LENGTH))
| 19.8 | 76 | 0.772727 | 27 | 198 | 5.518519 | 0.703704 | 0.187919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011696 | 0.136364 | 198 | 9 | 77 | 22 | 0.859649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.5 | 0.333333 | 0.166667 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 6 |
042eaea8355441a278d0b3f22390d9932a84bdf0 | 40 | py | Python | __init__.py | catplotlib/Relabel | f16180a849293f5322134a071071ff9f2d04f864 | [
"MIT"
] | 3 | 2020-06-11T16:08:07.000Z | 2020-08-01T06:45:16.000Z | __init__.py | catplotlib/Relabel | f16180a849293f5322134a071071ff9f2d04f864 | [
"MIT"
] | null | null | null | __init__.py | catplotlib/Relabel | f16180a849293f5322134a071071ff9f2d04f864 | [
"MIT"
] | null | null | null | from relabel.relabel import change_name
| 20 | 39 | 0.875 | 6 | 40 | 5.666667 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 40 | 1 | 40 | 40 | 0.944444 | 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 |
0459b8d1dcc659ae4206659ab87324eab52651ba | 36 | py | Python | ML Notebooks/00--Practice Work/on pycharm/pandas1.py | Sahil-Chavan/ML_Playground | cd6b12db7f64e58aae88d7672343aa0406347bb1 | [
"Unlicense"
] | null | null | null | ML Notebooks/00--Practice Work/on pycharm/pandas1.py | Sahil-Chavan/ML_Playground | cd6b12db7f64e58aae88d7672343aa0406347bb1 | [
"Unlicense"
] | 9 | 2020-09-30T20:07:30.000Z | 2021-02-21T18:39:16.000Z | ML Notebooks/00--Practice Work/on pycharm/pandas1.py | Sahil-Chavan/ML_Playground | cd6b12db7f64e58aae88d7672343aa0406347bb1 | [
"Unlicense"
] | null | null | null |
print('Hi there love this course')
| 12 | 34 | 0.722222 | 6 | 36 | 4.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 36 | 2 | 35 | 18 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
045eaac94c6d020f1e4cdf0ee27caa5d86e0bb75 | 29 | py | Python | tejas/schemas/__init__.py | ProjektTejas/tejas-service | 82e2effbc3725115fac903ff807c4cd765659367 | [
"MIT"
] | null | null | null | tejas/schemas/__init__.py | ProjektTejas/tejas-service | 82e2effbc3725115fac903ff807c4cd765659367 | [
"MIT"
] | null | null | null | tejas/schemas/__init__.py | ProjektTejas/tejas-service | 82e2effbc3725115fac903ff807c4cd765659367 | [
"MIT"
] | null | null | null | from .msg import Msg, TaskId
| 14.5 | 28 | 0.758621 | 5 | 29 | 4.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172414 | 29 | 1 | 29 | 29 | 0.916667 | 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 |
0b0576ca4453f52d42e31e1a6335934efe341e59 | 11,557 | py | Python | tests/test_validate_input.py | pr/dos | 4f16183031966cab79c69e105e5ab080a828229e | [
"MIT"
] | 1 | 2020-03-02T03:03:37.000Z | 2020-03-02T03:03:37.000Z | tests/test_validate_input.py | pr/dos | 4f16183031966cab79c69e105e5ab080a828229e | [
"MIT"
] | null | null | null | tests/test_validate_input.py | pr/dos | 4f16183031966cab79c69e105e5ab080a828229e | [
"MIT"
] | null | null | null | from http import HTTPStatus
from dos import prop, prop_wrapper, validators
from dos.flask_wrappers import validate_input
def test_validate_input():
input_schema = {
"basic_string": prop.String(),
"basic_boolean": prop.Boolean()
}
given_request = {
"basic_string": "test string",
"basic_boolean": True,
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_input_unexpected_field():
input_schema = {
"basic_string": prop.String(),
"basic_boolean": prop.Boolean()
}
given_request = {
"basic_string": "test string",
"basic_boolean": True,
"what_the_heck": "is this????"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
"message": "An unexpected field was sent to the server: what_the_heck"
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_multiple_unexpected_fields():
input_schema = {
"basic_string": prop.String(),
"basic_boolean": prop.Boolean()
}
given_request = {
"basic_string": "test string",
"basic_boolean": True,
"what_the_heck": "is this????",
"more_BS": "SQL INJECTION!!"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
"message": "Unexpected fields were sent to the server: [\'what_the_heck\', \'more_BS\']"
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_missing_field():
input_schema = {
"basic_string": prop.String(required=True),
"basic_boolean": prop.Boolean()
}
given_request = {
"basic_boolean": True,
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
"message": "A required field is missing: basic_string"
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_multiple_missing_fields():
input_schema = {
"basic_string": prop.String(required=True),
"another_basic_string": prop.String(required=True),
"basic_boolean": prop.Boolean()
}
given_request = {
"basic_boolean": True,
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
"message": "Required fields are missing: ['basic_string', 'another_basic_string']",
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_wrong_type():
input_schema = {
"basic_string": prop.String(),
"basic_boolean": prop.Boolean()
}
given_request = {
"basic_string": ["what", "the", "heck", "is", "this"],
"basic_boolean": True,
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'basic_string': "The value ['what', 'the', 'heck', 'is', 'this'] from field "
"'basic_string' is the wrong type, expected: String"
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_string_id():
input_schema = {
"id": prop.Number(),
}
given_request = {
"id": "89"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_input_string_id_not_a_number():
input_schema = {
"id": prop.Number(),
}
given_request = {
"id": "banana_phone"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'id': "The value 'banana_phone' from field 'id' is "
"the wrong type, expected: Number"
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_numeric_string():
input_schema = {
"id": prop.Numeric()
}
given_request = {
"id": "1,000"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_number_string():
input_schema = {
"id": prop.Number()
}
given_request = {
"id": "1,000"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_input_one_of():
input_schema = {
"id": prop_wrapper.OneOf([
prop.String(validators=[validators.ExactLength(3)]),
prop.String(validators=[validators.ExactLength(8)]),
prop.Number()
])
}
given_request = {
"id": "abc"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_input_one_of_invalid():
input_schema = {
"id": prop_wrapper.OneOf([
prop.String(validators=[validators.ExactLength(3)]),
prop.String(validators=[validators.ExactLength(8)]),
prop.Number()
])
}
given_request = {
"id": "banana_phone"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'id': ("The value 'banana_phone' from field 'id' is not valid for one of the defined props for "
"the following reasons: String is not the correct length! The string 'banana_phone' is "
"12 characters long, not 3!, String is not the correct length! The string 'banana_phone' is "
"12 characters long, not 8!, The value 'banana_phone' from field 'id' is the wrong "
'type, expected: Number')
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_string_id_not_an_integer():
input_schema = {
"id": prop.Number(),
}
given_request = {
"id": "56.32"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_input_string_id_not_negative_number():
input_schema = {
"id": prop.Number(),
}
given_request = {
"id": "-2"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {}
assert http_status is HTTPStatus.OK
def test_validate_input_multiple_input_issues():
input_schema = {
"basic_string": prop.String(),
"basic_boolean": prop.Boolean(),
"not_present_required_field": prop.String(required=True)
}
given_request = {
"basic_string": "test string",
"basic_boolean": True,
"what_the_heck": "is this????",
"more_BS": "SQL INJECTION!!"
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
"message": ("Unexpected fields were sent to the server: [\'what_the_heck\', \'more_BS\'] /// "
"A required field is missing: not_present_required_field")
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_exact_length_string():
input_schema = {
"basic_string": prop.String(validators=[validators.ExactLength(8)]),
}
given_request = {
"basic_string": "noteightlong",
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'basic_string': 'String is not the correct length! The string \'noteightlong\' is 12 characters long, not 8!'
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_input_exact_length_object():
input_schema = {
"basic_object": prop.Object(
structure={
"basic_string": prop.String()
},
validators=[validators.ExactLength(8)]
),
}
given_request = {
"basic_object": {
"basic_string": "this is irrelevant",
}
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {'basic_object': 'ExactLength is not supported for class Object!!'}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_social_security_number():
input_schema = {
"social_security_number": prop.String(validators=[validators.SocialSecurityNumber()]),
}
given_request = {
"social_security_number": "219099999",
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'social_security_number': '219099999 is not a valid social security number!'
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_validate_number_social_security_number():
input_schema = {
"social_security_number": prop.Number(validators=[validators.SocialSecurityNumber()]),
}
given_request = {
"social_security_number": "219099999",
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'social_security_number': 'SocialSecurityNumber is not supported for class Number!!'
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_impossible_validation():
input_schema = {
"social_security_number": prop.String(validators=[validators.SocialSecurityNumber(), validators.ExactLength(3)]),
}
given_request = {
"social_security_number": "578271234",
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'A field has an error.',
'field_error_messages': {
'social_security_number': 'String is not the correct length! The string \'578271234\' is 9 characters long, not 3!'
}
}
assert http_status == HTTPStatus.BAD_REQUEST
def test_multiple_invalid_fields_validation():
input_schema = {
"social_security_number": prop.String(validators=[validators.SocialSecurityNumber()]),
"exact_length_string": prop.String(validators=[validators.ExactLength(3)]),
}
given_request = {
"social_security_number": "578234",
"exact_length_string": "not three long",
}
http_status, reject_dict = validate_input(given_request, input_schema)
assert reject_dict == {
'message': 'Multiple fields have an error.',
'field_error_messages': {
'exact_length_string': "String is not the correct length! "
"The string 'not three long' is 14 characters long, not 3!",
'social_security_number': '578234 is not a valid social security number!'
}
}
assert http_status == HTTPStatus.BAD_REQUEST | 27.321513 | 127 | 0.635286 | 1,292 | 11,557 | 5.356811 | 0.087461 | 0.066753 | 0.048548 | 0.060685 | 0.879497 | 0.849588 | 0.840919 | 0.83355 | 0.784569 | 0.739055 | 0 | 0.010916 | 0.25491 | 11,557 | 423 | 128 | 27.321513 | 0.792823 | 0 | 0 | 0.549839 | 0 | 0 | 0.257917 | 0.02933 | 0 | 0 | 0 | 0 | 0.135048 | 1 | 0.067524 | false | 0 | 0.009646 | 0 | 0.07717 | 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 |
0b1843e1abf43bce69a9df45be599e4ce31d6d89 | 141 | py | Python | tests/collection/__init__.py | caputomarcos/mongorest | 57d6b28d75e18afed5cef7160522958153b5be15 | [
"BSD-3-Clause"
] | 16 | 2015-04-18T02:51:09.000Z | 2020-12-15T18:05:16.000Z | tests/collection/__init__.py | caputomarcos/mongorest | 57d6b28d75e18afed5cef7160522958153b5be15 | [
"BSD-3-Clause"
] | 8 | 2015-11-24T23:06:03.000Z | 2016-07-21T17:57:59.000Z | tests/collection/__init__.py | caputomarcos/mongorest | 57d6b28d75e18afed5cef7160522958153b5be15 | [
"BSD-3-Clause"
] | 2 | 2015-12-04T13:45:32.000Z | 2016-06-11T13:44:53.000Z | # -*- encoding: UTF-8 -*-
from __future__ import absolute_import, unicode_literals
from .collection import *
from .collection_meta import *
| 23.5 | 56 | 0.765957 | 17 | 141 | 5.941176 | 0.647059 | 0.277228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008197 | 0.134752 | 141 | 5 | 57 | 28.2 | 0.819672 | 0.163121 | 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 |
9bdb1172a9de99b3cea0043cbd4adb5285fcbe1c | 10,821 | py | Python | tests/stats_test.py | fareedmirza/silverpieces | 930edb9d962cb322a19e66aa3cc29eebe6d1d037 | [
"MIT"
] | 1 | 2019-07-17T04:30:37.000Z | 2019-07-17T04:30:37.000Z | tests/stats_test.py | fareedmirza/silverpieces | 930edb9d962cb322a19e66aa3cc29eebe6d1d037 | [
"MIT"
] | 5 | 2019-07-17T03:49:19.000Z | 2019-07-18T04:41:20.000Z | tests/stats_test.py | fareedmirza/silverpieces | 930edb9d962cb322a19e66aa3cc29eebe6d1d037 | [
"MIT"
] | 3 | 2020-03-01T22:15:52.000Z | 2020-07-29T05:44:54.000Z | import logging
logging.getLogger().setLevel(logging.DEBUG)
logging.debug('hi from the logger!')
import unittest
import os
import sys
import yaml
import xarray as xr
root_pkg_dir = os.path.join(os.path.dirname(__file__),'..')
sys.path.append(root_pkg_dir)
from silverpieces.functions import *
from utilities import *
class TestStatMethods(unittest.TestCase):
def test_dummy_data_shape(self):
try:
t, x, y, src_data = get_data_src_seq(nt=5, nx=3, ny=2)
f = create_file(t, 't', x, 'latitude', y, 'longitude', src_data, 'band')
band = read_var(f, 'band')
self.assertEqual(band.shape, (5, 3, 2))
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_dummy_xarray_read(self):
from calendar import monthrange
try:
year = 2011
day_offsets = [0]
for i in range(2, 12):
day_offsets.append(day_offsets[-1] + monthrange(year, i)[1])
day_offsets = np.array(day_offsets)
t,x,y,src_data=get_spatial_data_src_seq(t=day_offsets, lat_start=-10.0, lat_end=-44.0, lat_size=681, lon_start=112.0, lon_end=154.0, lon_size=841)
f=create_file(t,'time',x,'latitude',y,'longitude',src_data,'band', year)
with xr.open_dataset(f) as ds:
self.assertAlmostEqual(ds.latitude.values.min(), -44.0)
self.assertAlmostEqual(ds.latitude.values.max(), -10.0)
self.assertAlmostEqual(ds.longitude.values.min(), 112.0)
self.assertAlmostEqual(ds.longitude.values.max(), 154.0)
self.assertEqual(len(ds.latitude), 681)
self.assertEqual(len(ds.longitude), 841)
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_monthly_mean(self):
with open("./tests/testArg.yaml", 'r') as stream:
try:
args_file = yaml.safe_load(stream)
t, x, y, src_data = get_data_src_seq(nt=365, nx=3, ny=2)
f = create_file(t, 'time', x, 'latitude', y, 'longitude', src_data, 'band')
#replace the product name with filename with dummy data
args_file['Args']['product'] = f
result = monthly_mean(args_file)
jan_mean = np.arange(0, 31).sum()/31
feb_mean = np.arange(31, 59).sum()/28
self.assertEqual(result[0][0][0], jan_mean)
self.assertEqual(result[1][0][0], feb_mean)
self.assertEqual(result.shape, (2, 3, 2))
#The time dimension changes to month only when we use groupby functionality
#for calculating means.
# self.assertEqual(result.dims[0], 'month')
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_monthly_mean_over_multiple_years(self):
try:
ymlStr = """Args:
product: 'AWRA' #fill in the name of the test file created with dummy data
timespan:
startDate:
endDate:
shape_file:
variablename: 'band'"""
args_file = yaml.safe_load(ymlStr)
t, x, y, src_data = get_data_src_seq(nt=730, nx=3, ny=2)
f = create_file(t, 'time', x, 'latitude', y, 'longitude', src_data, 'band')
#replace the product name with filename with dummy data
args_file['Args']['product'] = f
result = monthly_mean(args_file)
jan_mean = np.arange(0, 31).sum()/31
feb_mean = np.arange(31, 59).sum()/28
self.assertEqual(result[0][0][0], jan_mean)
self.assertEqual(result[1][0][0], feb_mean)
self.assertEqual(result.shape, (24, 3, 2))
# self.assertEqual(result.dims[0], 'month')
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_yearly_mean(self):
try:
ymlStr = """Args:
product: 'AWRA' #fill in the name of the test file created with dummy data
timespan:
startDate:
endDate:
variablename: 'band'"""
args_file = yaml.safe_load(ymlStr)
t, x, y, src_data = get_data_src_seq(nt=730, nx=3, ny=2)
f = create_file(t, 'time', x, 'latitude', y, 'longitude', src_data, 'band')
#replace the product name with filename with dummy data
args_file['Args']['product'] = f
result = yearly_mean(args_file)
yearly_2010_mean = np.arange(0, 365).sum()/365
yearly_2011_mean = np.arange(365, 730).sum()/365
self.assertEqual(result[0][0][0], yearly_2010_mean)
self.assertEqual(result[1][0][0], yearly_2011_mean)
self.assertEqual(result.shape, (2, 3, 2))
#The time dimension changes to year only when we use groupby functionality
#for calculating means.
#self.assertEqual(result.dims[0], 'year')
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_seasonal_mean(self):
try:
ymlStr = """Args:
product: 'AWRA' #fill in the name of the test file created with dummy data
timespan:
startDate:
endDate:
variablename: 'band'"""
args_file = yaml.safe_load(ymlStr)
t,x,y,src_data=get_data_src_seq(nt=730,nx=3,ny=2)
f=create_file(t,'time',x,'latitude',y,'longitude',src_data,'band')
#replace the product name with filename with dummy data
args_file['Args']['product'] = f
result = seasonal_mean(args_file)
seasonal_2010_feb_mean = np.arange(0,59).sum()/(31+28)
seasonal_2010_may_mean = np.arange(59,59+31+30+31).sum()/(31+30+31)
#for the last period, it jumps over to feb/2012 even when we have data till dec/2011
#but for averaging it only considers the days when we have data
seasonal_2012_feb_mean = np.arange(699,730).sum()/31
self.assertEqual(result[0][0][0], seasonal_2010_feb_mean)
self.assertEqual(result[1][0][0], seasonal_2010_may_mean)
self.assertEqual(result[8][0][0], seasonal_2012_feb_mean)
self.assertEqual(result.shape, (9, 3, 2))
#The time dimension changes to year only when we use groupby functionality
#for calculating means.
#self.assertEqual(result.dims[0], 'year')
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_seasonal_mean_partial_dataset1(self):
try:
ymlStr = """Args:
product: 'AWRA' #fill in the name of the test file created with dummy data
timespan:
startDate:
endDate: 2010-12-31
variablename: 'band'"""
args_file = yaml.safe_load(ymlStr)
t, x, y, src_data = get_data_src_seq(nt=730, nx=3, ny=2)
f = create_file(t, 'time', x, 'latitude', y, 'longitude', src_data, 'band')
#replace the product name with filename with dummy data
args_file['Args']['product'] = f
result = seasonal_mean(args_file)
seasonal_2010_feb_mean = np.arange(0, 59).sum()/(31+28)
seasonal_2010_may_mean = np.arange(
59, 59+31+30+31).sum()/(31+30+31)
#for the last period, it jumps over to feb/2011 as the time boundary even when we have requested till dec/2011.
#But for averaging it only considers the days falling in the date bounds.
seasonal_2011_feb_mean = np.arange(334, 365).sum()/31
self.assertEqual(result[0][0][0], seasonal_2010_feb_mean)
self.assertEqual(result[1][0][0], seasonal_2010_may_mean)
self.assertEqual(result[4][0][0], seasonal_2011_feb_mean)
self.assertEqual(result.shape, (5, 3, 2))
#The time dimension changes to year only when we use groupby functionality
#for calculating means.
#self.assertEqual(result.dims[0], 'year')
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
def test_seasonal_mean_partial_dataset2(self):
try:
ymlStr = """Args:
product: 'AWRA' #fill in the name of the test file created with dummy data
timespan:
startDate:
endDate: 2010-12-30
variablename: 'band'"""
args_file = yaml.safe_load(ymlStr)
t, x, y, src_data = get_data_src_seq(nt=730, nx=3, ny=2)
f = create_file(t, 'time', x, 'latitude', y, 'longitude', src_data, 'band')
#replace the product name with filename with dummy data
args_file['Args']['product'] = f
result = seasonal_mean(args_file)
seasonal_2010_feb_mean = np.arange(0, 59).sum()/(31+28)
seasonal_2010_may_mean = np.arange(
59, 59+31+30+31).sum()/(31+30+31)
#for the last period, it jumps over to feb/2011 as the time boundary even when we have requested till dec/2011.
#But for averaging it only considers the days falling in the date bounds.
seasonal_2011_feb_mean = np.arange(334, 364).sum()/30
self.assertEqual(result[0][0][0], seasonal_2010_feb_mean)
self.assertEqual(result[1][0][0], seasonal_2010_may_mean)
self.assertEqual(result[4][0][0], seasonal_2011_feb_mean)
self.assertEqual(result.shape, (5, 3, 2))
#The time dimension changes to year only when we use groupby functionality
#for calculating means.
#self.assertEqual(result.dims[0], 'year')
except Exception as ex:
print(ex)
self.fail(ex)
finally:
os.unlink(f)
if __name__ == '__main__':
unittest.main()
| 42.940476 | 158 | 0.545144 | 1,371 | 10,821 | 4.153173 | 0.134209 | 0.079031 | 0.099579 | 0.065859 | 0.817352 | 0.800843 | 0.774851 | 0.764665 | 0.761503 | 0.761503 | 0 | 0.05894 | 0.346179 | 10,821 | 251 | 159 | 43.111554 | 0.745866 | 0.143517 | 0 | 0.684211 | 0 | 0 | 0.1921 | 0 | 0 | 0 | 0 | 0 | 0.147368 | 1 | 0.042105 | false | 0 | 0.047368 | 0 | 0.094737 | 0.042105 | 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 |
500fe86ee8620e963916c20a78d42d0c4b60fa60 | 120 | py | Python | application/modules/api_error.py | Alveo/transcriber-segmentor | af296ab93994daab8cc924684f7901deb2948eca | [
"BSD-3-Clause"
] | null | null | null | application/modules/api_error.py | Alveo/transcriber-segmentor | af296ab93994daab8cc924684f7901deb2948eca | [
"BSD-3-Clause"
] | null | null | null | application/modules/api_error.py | Alveo/transcriber-segmentor | af296ab93994daab8cc924684f7901deb2948eca | [
"BSD-3-Clause"
] | 2 | 2017-10-31T05:24:09.000Z | 2018-05-21T03:16:30.000Z | from flask import jsonify
def api_error(message):
return jsonify({'error': True, 'code': 400, 'message': message})
| 24 | 68 | 0.7 | 16 | 120 | 5.1875 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.029412 | 0.15 | 120 | 4 | 69 | 30 | 0.784314 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 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 |
5028b0b5e4b937dcf99ee595e9753b98a7412186 | 171 | py | Python | tavern/testutils/pytesthook/__init__.py | dkmalav/tavern | e8ecab9bc876523997d61c57d572c330c08124a2 | [
"MIT"
] | null | null | null | tavern/testutils/pytesthook/__init__.py | dkmalav/tavern | e8ecab9bc876523997d61c57d572c330c08124a2 | [
"MIT"
] | null | null | null | tavern/testutils/pytesthook/__init__.py | dkmalav/tavern | e8ecab9bc876523997d61c57d572c330c08124a2 | [
"MIT"
] | null | null | null | from .hooks import pytest_collect_file, pytest_addoption
from .util import add_parser_options
__all__ = ["pytest_addoption", "pytest_collect_file", "add_parser_options"]
| 34.2 | 75 | 0.830409 | 23 | 171 | 5.565217 | 0.521739 | 0.203125 | 0.265625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.087719 | 171 | 4 | 76 | 42.75 | 0.820513 | 0 | 0 | 0 | 0 | 0 | 0.309942 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
503b840c51869de8ca11a160ed2d10b9a3cfcfac | 27,604 | py | Python | src/tfchain/tests/types/transactions.py | GlenDC/threefold-wallet-electron | 440662a793d98781eb3bbf415ba8a482abed0288 | [
"MIT"
] | null | null | null | src/tfchain/tests/types/transactions.py | GlenDC/threefold-wallet-electron | 440662a793d98781eb3bbf415ba8a482abed0288 | [
"MIT"
] | 201 | 2019-05-20T15:06:05.000Z | 2019-07-16T12:48:59.000Z | src/tfchain/tests/types/transactions.py | GlenDC/threefold-wallet-electron | 440662a793d98781eb3bbf415ba8a482abed0288 | [
"MIT"
] | 1 | 2019-12-20T21:45:39.000Z | 2019-12-20T21:45:39.000Z | from tfchain.types.transactions.Base import TransactionBaseClass, TransactionVersion
from tfchain.types.transactions.Standard import TransactionV1
# from tfchain.types.transactions.Minting import TransactionV128, TransactionV129
# from tfchain.types.transactions.ThreeBot import BotTransactionBaseClass, TransactionV144, TransactionV145, TransactionV146
# from tfchain.types.transactions.ERC20 import TransactionV208, TransactionV209, TransactionV210
from tfchain.types import transactions as tftransactions
import tfchain.errors
import tfchain.polyfill.encoding.json as jsjson
import tfchain.tests.jsassert as jsass
def test_standard_transactions():
# v1 Transactions are supported
v1_txn_json = jsjson.json_loads('{"version":1,"data":{"coininputs":[{"parentid":"5b907d6e4d34cdd825484d2f9f14445377fb8b4f8cab356a390a7fe4833a3085","fulfillment":{"type":1,"data":{"publickey":"ed25519:bd5e0e345d5939f5f9eb330084c7f0ffb8fc7fc5bdb07a94c304620eb4e2d99a","signature":"55dace7ccbc9cdd23220a8ef3ec09e84ce5c5acc202c5f270ea0948743ebf52135f3936ef7477170b4f9e0fe141a61d8312ab31afbf926a162982247e5d2720a"}}}],"coinoutputs":[{"value":"1000000000","condition":{"type":1,"data":{"unlockhash":"010009a2b6a482da73204ccc586f6fab5504a1a69c0d316cdf828a476ae7c91c9137fd6f1b62bb"}}},{"value":"8900000000","condition":{"type":1,"data":{"unlockhash":"01b81f9e02d6be3a7de8440365a7c799e07dedf2ccba26fd5476c304e036b87c1ab716558ce816"}}}],"blockstakeinputs":[{"parentid":"782e4819d6e199856ba1bff3def5d7cc37ae2a0dabecb05359d6072156190d68","fulfillment":{"type":1,"data":{"publickey":"ed25519:95990ca3774de81309932302f74dfe9e540d6c29ca5cb9ee06e999ad46586737","signature":"70be2115b82a54170c94bf4788e2a6dd154a081f61e97999c2d9fcc64c41e7df2e8a8d4f82a57a04a1247b9badcb6bffbd238e9a6761dd59e5fef7ff6df0fc01"}}}],"blockstakeoutputs":[{"value":"99","condition":{"type":1,"data":{"unlockhash":"01fdf10836c119186f1d21666ae2f7dc62d6ecc46b5f41449c3ee68aea62337dad917808e46799"}}}],"minerfees":["100000000"],"arbitrarydata":"ZGF0YQ=="}}')
v1_txn = tftransactions.from_json(v1_txn_json)
# assert v1_txn.json() == v1_txn_json
jsass.equals(v1_txn.signature_hash_get(0), v1_txn.signature_hash_get(0))
jsass.equals(v1_txn.binary_encode(), v1_txn.binary_encode())
jsass.equals(v1_txn.coin_outputid_new(0).str(), v1_txn.coin_outputid_new(0).str())
jsass.equals(v1_txn.blockstake_outputid_new(0).str(), v1_txn.blockstake_outputid_new(0).str())
# v1 transactions do not have block stakes when used just for coins
v1_txn_json = jsjson.json_loads('{"version":1,"data":{"coininputs":[{"parentid":"5b907d6e4d34cdd825484d2f9f14445377fb8b4f8cab356a390a7fe4833a3085","fulfillment":{"type":1,"data":{"publickey":"ed25519:bd5e0e345d5939f5f9eb330084c7f0ffb8fc7fc5bdb07a94c304620eb4e2d99a","signature":"55dace7ccbc9cdd23220a8ef3ec09e84ce5c5acc202c5f270ea0948743ebf52135f3936ef7477170b4f9e0fe141a61d8312ab31afbf926a162982247e5d2720a"}}}],"coinoutputs":[{"value":"1000000000","condition":{"type":1,"data":{"unlockhash":"010009a2b6a482da73204ccc586f6fab5504a1a69c0d316cdf828a476ae7c91c9137fd6f1b62bb"}}},{"value":"8900000000","condition":{"type":1,"data":{"unlockhash":"01b81f9e02d6be3a7de8440365a7c799e07dedf2ccba26fd5476c304e036b87c1ab716558ce816"}}}],"minerfees":["100000000"],"arbitrarydata":"ZGF0YQ=="}}')
v1_txn = tftransactions.from_json(v1_txn_json)
# assert v1_txn.json() == v1_txn_json
jsass.equals(v1_txn.signature_hash_get(0), v1_txn.signature_hash_get(0))
jsass.equals(v1_txn.binary_encode(), v1_txn.binary_encode())
jsass.equals(v1_txn.coin_outputid_new(0).str(), v1_txn.coin_outputid_new(0).str())
# v0 Transactions are supported, but are not recommend or created by this client
v0_txn_json = jsjson.json_loads('{"version":0,"data":{"coininputs":[{"parentid":"abcdef012345abcdef012345abcdef012345abcdef012345abcdef012345abcd","unlocker":{"type":1,"condition":{"publickey":"ed25519:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"fulfillment":{"signature":"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefab"}}}],"coinoutputs":[{"value":"3","unlockhash":"0142e9458e348598111b0bc19bda18e45835605db9f4620616d752220ae8605ce0df815fd7570e"},{"value":"5","unlockhash":"01a6a6c5584b2bfbd08738996cd7930831f958b9a5ed1595525236e861c1a0dc353bdcf54be7d8"}],"blockstakeinputs":[{"parentid":"dfd23dfd23dfd23dfd23dfd23dfd23dfd23dfd23dfd23dfd23dfd23dfd23dfde","unlocker":{"type":1,"condition":{"publickey":"ed25519:ef1234ef1234ef1234ef1234ef1234ef1234ef1234ef1234ef1234ef1234ef12"},"fulfillment":{"signature":"01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def01234def"}}}],"blockstakeoutputs":[{"value":"4","unlockhash":"0142e9458e348598111b0bc19bda18e45835605db9f4620616d752220ae8605ce0df815fd7570e"},{"value":"2","unlockhash":"01a6a6c5584b2bfbd08738996cd7930831f958b9a5ed1595525236e861c1a0dc353bdcf54be7d8"}],"minerfees":["1","2","3"],"arbitrarydata":"ZGF0YQ=="}}')
v0_txn = tftransactions.from_json(v0_txn_json)
jsass.equals(v0_txn.signature_hash_get(0), v0_txn.signature_hash_get(0))
jsass.equals(v0_txn.binary_encode(), v0_txn.binary_encode())
jsass.equals(v0_txn.coin_outputid_new(0).str(), v0_txn.coin_outputid_new(0).str())
jsass.equals(v0_txn.blockstake_outputid_new(0).str(), v0_txn.blockstake_outputid_new(0).str())
# v0 Transactions do not have block stakes when used just for coins
v0_txn_json = jsjson.json_loads('{"version":0,"data":{"coininputs":[{"parentid":"abcdef012345abcdef012345abcdef012345abcdef012345abcdef012345abcd","unlocker":{"type":1,"condition":{"publickey":"ed25519:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"fulfillment":{"signature":"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefab"}}}],"coinoutputs":[{"value":"3","unlockhash":"0142e9458e348598111b0bc19bda18e45835605db9f4620616d752220ae8605ce0df815fd7570e"},{"value":"5","unlockhash":"01a6a6c5584b2bfbd08738996cd7930831f958b9a5ed1595525236e861c1a0dc353bdcf54be7d8"}],"minerfees":["1","2","3"],"arbitrarydata":"ZGF0YQ=="}}')
v0_txn = tftransactions.from_json(v0_txn_json)
jsass.equals(v0_txn.signature_hash_get(0), v0_txn.signature_hash_get(0))
jsass.equals(v0_txn.binary_encode(), v0_txn.binary_encode())
jsass.equals(v0_txn.coin_outputid_new(0).str(), v0_txn.coin_outputid_new(0).str())
# Coin Creation Transactions
# v128 Transactions are supported
v128_txn_json = jsjson.json_loads('{"version":128,"data":{"nonce":"FoAiO8vN2eU=","mintfulfillment":{"type":1,"data":{"publickey":"ed25519:d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780","signature":"bdf023fbe7e0efec584d254b111655e1c2f81b9488943c3a712b91d9ad3a140cb0949a8868c5f72e08ccded337b79479114bdb4ed05f94dfddb359e1a6124602"}},"mintcondition":{"type":1,"data":{"unlockhash":"01e78fd5af261e49643dba489b29566db53fa6e195fa0e6aad4430d4f06ce88b73e047fe6a0703"}},"minerfees":["1000000000"],"arbitrarydata":"YSBtaW50ZXIgZGVmaW5pdGlvbiB0ZXN0"}}')
v128_txn = tftransactions.from_json(v128_txn_json)
jsass.equals(v128_txn.json(), v128_txn_json)
jsass.equals(v128_txn.signature_hash_get(0), 'c0b865dd6980f377c9bc6fb195bca3cf169ea06e6bc658b29639bdb6fc387f8d')
jsass.equals(v128_txn.binary_encode(), '801680223bcbcdd9e5018000000000000000656432353531390000000000000000002000000000000000d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d77804000000000000000bdf023fbe7e0efec584d254b111655e1c2f81b9488943c3a712b91d9ad3a140cb0949a8868c5f72e08ccded337b79479114bdb4ed05f94dfddb359e1a612460201210000000000000001e78fd5af261e49643dba489b29566db53fa6e195fa0e6aad4430d4f06ce88b73010000000000000004000000000000003b9aca00180000000000000061206d696e74657220646566696e6974696f6e2074657374')
# v129 Transactions are supported
v129_txn_json = jsjson.json_loads('{"version":129,"data":{"nonce":"1oQFzIwsLs8=","mintfulfillment":{"type":1,"data":{"publickey":"ed25519:d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780","signature":"ad59389329ed01c5ee14ce25ae38634c2b3ef694a2bdfa714f73b175f979ba6613025f9123d68c0f11e8f0a7114833c0aab4c8596d4c31671ec8a73923f02305"}},"coinoutputs":[{"value":"500000000000000","condition":{"type":1,"data":{"unlockhash":"01e3cbc41bd3cdfec9e01a6be46a35099ba0e1e1b793904fce6aa5a444496c6d815f5e3e981ccf"}}}],"minerfees":["1000000000"],"arbitrarydata":"dGVzdC4uLiAxLCAyLi4uIDM="}}')
v129_txn = tftransactions.from_json(v129_txn_json)
jsass.equals(v129_txn.json(), v129_txn_json)
jsass.equals(v129_txn.signature_hash_get(0), '984ccc3da2107e86f67ef618886f9144040d84d9f65f617c64fa34de68c0018b')
jsass.equals(v129_txn.binary_encode(), '81d68405cc8c2c2ecf018000000000000000656432353531390000000000000000002000000000000000d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d77804000000000000000ad59389329ed01c5ee14ce25ae38634c2b3ef694a2bdfa714f73b175f979ba6613025f9123d68c0f11e8f0a7114833c0aab4c8596d4c31671ec8a73923f023050100000000000000070000000000000001c6bf5263400001210000000000000001e3cbc41bd3cdfec9e01a6be46a35099ba0e1e1b793904fce6aa5a444496c6d81010000000000000004000000000000003b9aca001100000000000000746573742e2e2e20312c20322e2e2e2033')
jsass.equals(v129_txn.coin_outputid_new(0).str(), 'f4b8569f430a29af187a8b97e78167b63895c51339255ea5198a35f4b162b4c6')
# v130 Transactions are supported
v130_txn_json = jsjson.json_loads('{"version":130,"data":{"coininputs":[{"parentid":"1100000000000000000000000000000000000000000000000000000000000011","fulfillment":{"type":1,"data":{"publickey":"ed25519:def123def123def123def123def123def123def123def123def123def123def1","signature":"ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef"}}}],"coinoutputs":[{"value":"500000000000000","condition":{"type":1,"data":{"unlockhash":"01e3cbc41bd3cdfec9e01a6be46a35099ba0e1e1b793904fce6aa5a444496c6d815f5e3e981ccf"}}}],"minerfees":["1000000000"],"arbitrarydata":"dGVzdC4uLiAxLCAyLi4uIDM="}}')
v130_txn = tftransactions.from_json(v130_txn_json)
jsass.equals(v130_txn.json(), v130_txn_json)
jsass.equals(v130_txn.signature_hash_get(0), '44c953f3531cf50dbbb9e60ce401d7588854f66e7163056066713defb08f511d')
jsass.equals(v130_txn.binary_encode(), '8202110000000000000000000000000000000000000000000000000000000000001101c401def123def123def123def123def123def123def123def123def123def123def180ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef12345ef020e01c6bf52634000014201e3cbc41bd3cdfec9e01a6be46a35099ba0e1e1b793904fce6aa5a444496c6d8102083b9aca0022746573742e2e2e20312c20322e2e2e2033')
jsass.equals(v130_txn.coin_outputid_new(0).str(), '986756eafd889faa7e9a2bcfebe744a3ce7880280e78ac0d027d0766e44647c4')
# # 3Bot Transactions
# # v144 Transactions are supported
# v144_txn_json = {"version":144,"data":{"addresses":["91.198.174.192","example.org"],"names":["chatbot.example"],"nrofmonths":1,"txfee":"1000000000","coininputs":[{"parentid":"a3c8f44d64c0636018a929d2caeec09fb9698bfdcbfa3a8225585a51e09ee563","fulfillment":{"type":1,"data":{"publickey":"ed25519:d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780","signature":"909a7df820ec3cee1c99bd2c297b938f830da891439ef7d78452e29efb0c7e593683274c356f72d3b627c2954a24b2bc2276fed47b24cd62816c540c88f13d05"}}}],"refundcoinoutput":{"value":"99999899000000000","condition":{"type":1,"data":{"unlockhash":"01b49da2ff193f46ee0fc684d7a6121a8b8e324144dffc7327471a4da79f1730960edcb2ce737f"}}},"identification":{"publickey":"ed25519:00bde9571b30e1742c41fcca8c730183402d967df5b17b5f4ced22c677806614","signature":"98e71668dfe7726a357039d7c0e871b6c0ca8fa49dc1fcdccb5f23f5f0a5cab95cfcfd72a9fd2c5045ba899ecb0207ff01125a0151f3e35e3c6e13a7538b340a"}}}
# v144_txn = tftransactions.from_json(v144_txn_json)
# # assert v144_txn.json() == v144_txn_json
# assert v144_txn.signature_hash_get(BotTransactionBaseClass.SPECIFIER_SENDER) == 'f9204641c6a945af6d262154f3d1dfa82aa291c4fc4000936ee72fc3506cfd2c'
# assert v144_txn.binary_encode() == '90e112115bc6aec02c6578616d706c652e6f72671e63686174626f742e6578616d706c65083b9aca0002a3c8f44d64c0636018a929d2caeec09fb9698bfdcbfa3a8225585a51e09ee56301c401d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d778080909a7df820ec3cee1c99bd2c297b938f830da891439ef7d78452e29efb0c7e593683274c356f72d3b627c2954a24b2bc2276fed47b24cd62816c540c88f13d051001634560d9784e00014201b49da2ff193f46ee0fc684d7a6121a8b8e324144dffc7327471a4da79f1730960100bde9571b30e1742c41fcca8c730183402d967df5b17b5f4ced22c67780661498e71668dfe7726a357039d7c0e871b6c0ca8fa49dc1fcdccb5f23f5f0a5cab95cfcfd72a9fd2c5045ba899ecb0207ff01125a0151f3e35e3c6e13a7538b340a'
# # ensure no constants are mutated
# assert BotTransactionBaseClass.BOT_FEE_REGISTRATION == 90
# assert v144_txn.required_bot_fees == '100 TFT'
# assert BotTransactionBaseClass.BOT_FEE_REGISTRATION == 90
# # v145 Transactions are supported
# v145_txn_json = {"version":145,"data":{"id":3,"addresses":{"add":["example.com","127.0.0.1"],"remove":["example.org"]},"names":{"add":["giveme.yourfeedback","thisis.anexample"],"remove":["chatbot.example"]},"nrofmonths":4,"txfee":"1000000000","coininputs":[{"parentid":"81a0c1f3094b99b0858da8ebc95b52f2c3593ea399d7b72a66a930521aae61bb","fulfillment":{"type":1,"data":{"publickey":"ed25519:880ee50bd7efa4c8b2b5949688a09818a652727fd3c0cb406013be442df68b34","signature":"d612b679377298e6ccb8a877f7a129d34c65b8850cff1806b9f62d392b6ab173020c3698658275c748047642f8012a4ac75ea23e319bcc405c9d7f2b462b6a0b"}}}],"refundcoinoutput":{"value":"99998737000000000","condition":{"type":1,"data":{"unlockhash":"01972837ee396f22f96846a0c700f9cf7c8fa83ab4110da91a1c7d02f94f28ff03e45f1470df82"}}},"signature":"f76e7ed808a9efe405804109d5e3c8695daf8b9bc7abf1e471fef94b3c4d36789b460f9e45cdf27d83d270b0836fef56bd499e1be8e1f279d367e961bbe62f03"}}
# v145_txn = tftransactions.from_json(v145_txn_json)
# # assert v145_txn.json() == v145_txn_json
# assert v145_txn.signature_hash_get(BotTransactionBaseClass.SPECIFIER_SENDER) == '3d86ed117c97718a9d0d644188e019b4fa55ec22f2c32c187d223d4e73a1ab72'
# assert v145_txn.binary_encode() == '9103000000e4122c6578616d706c652e636f6d117f0000012c6578616d706c652e6f72671226676976656d652e796f7572666565646261636b207468697369732e616e6578616d706c651e63686174626f742e6578616d706c65083b9aca000281a0c1f3094b99b0858da8ebc95b52f2c3593ea399d7b72a66a930521aae61bb01c401880ee50bd7efa4c8b2b5949688a09818a652727fd3c0cb406013be442df68b3480d612b679377298e6ccb8a877f7a129d34c65b8850cff1806b9f62d392b6ab173020c3698658275c748047642f8012a4ac75ea23e319bcc405c9d7f2b462b6a0b10016344524cdf6a00014201972837ee396f22f96846a0c700f9cf7c8fa83ab4110da91a1c7d02f94f28ff0380f76e7ed808a9efe405804109d5e3c8695daf8b9bc7abf1e471fef94b3c4d36789b460f9e45cdf27d83d270b0836fef56bd499e1be8e1f279d367e961bbe62f03'
# # ensure no constants are mutated
# assert BotTransactionBaseClass.BOT_FEE_NETWORK_ADDRESS_UPDATE == 20
# assert BotTransactionBaseClass.BOT_FEE_ADDITIONAL_NAME == 50
# assert BotTransactionBaseClass.BOT_FEE_MONTHLY == 10
# assert v145_txn.required_bot_fees == '160 TFT'
# assert BotTransactionBaseClass.BOT_FEE_NETWORK_ADDRESS_UPDATE == 20
# assert BotTransactionBaseClass.BOT_FEE_ADDITIONAL_NAME == 50
# assert BotTransactionBaseClass.BOT_FEE_MONTHLY == 10
# # v146 Transactions are supported
# v146_txn_json = {"version":146,"data":{"sender":{"id":1,"signature":"f1c6109c685c7452efaf20cec6b170817f1faeb6f0a4ff49a7a0872343e62810f51dee051d8eb7883fb0ad7a848aa5bf18b8bd30fe109daa04f13e7d76af750a"},"receiver":{"id":2,"signature":"ae9dc9fa308e76de123b5f889fed93d6d9a701dc8d5369787dc25095f3d6eb833f6d47302697d2da22e05854d08f26d723463f328cc6ec445529cff583903308"},"names":["hello.threebot"],"txfee":"1000000000","coininputs":[{"parentid":"572635ceed12c61cd78e97391c75fefb01cc969211aa827de4c44eb66285a37c","fulfillment":{"type":1,"data":{"publickey":"ed25519:3079d97d169f96b996ff87677483bb601150c1bae8b1061ecbb137b9597d7cb9","signature":"88e8c0d168ac60c1c6b47caad1bf660192064f2cd74ea38def15ff91d50e50b9bf2046c70c363d2ba152c51fcdaa017a27ab26a75bca76252df852785dd47007"}}}],"refundcoinoutput":{"value":"99993832000000000","condition":{"type":1,"data":{"unlockhash":"014195d5ada0434d0766bf9e3d9b87d2f63ef7b1820739cff88335d45cbae2dac58ec00841c570"}}}}}
# v146_txn = tftransactions.from_json(v146_txn_json)
# # assert v146_txn.json() == v146_txn_json
# assert v146_txn.signature_hash_get(BotTransactionBaseClass.SPECIFIER_SENDER) == 'ade263bfbc693e95463f19c201dd672bbd2616412362217c70317dfb42ab73cb'
# assert v146_txn.signature_hash_get(BotTransactionBaseClass.SPECIFIER_RECEIVER) == '36445975184c68e13f8b74e2e87dd72f23cb47ff3bd4f22e80c4654ec63015d9'
# assert v146_txn.binary_encode() == '920100000080f1c6109c685c7452efaf20cec6b170817f1faeb6f0a4ff49a7a0872343e62810f51dee051d8eb7883fb0ad7a848aa5bf18b8bd30fe109daa04f13e7d76af750a0200000080ae9dc9fa308e76de123b5f889fed93d6d9a701dc8d5369787dc25095f3d6eb833f6d47302697d2da22e05854d08f26d723463f328cc6ec445529cff583903308111c68656c6c6f2e7468726565626f74083b9aca0002572635ceed12c61cd78e97391c75fefb01cc969211aa827de4c44eb66285a37c01c4013079d97d169f96b996ff87677483bb601150c1bae8b1061ecbb137b9597d7cb98088e8c0d168ac60c1c6b47caad1bf660192064f2cd74ea38def15ff91d50e50b9bf2046c70c363d2ba152c51fcdaa017a27ab26a75bca76252df852785dd470071001633fdc441710000142014195d5ada0434d0766bf9e3d9b87d2f63ef7b1820739cff88335d45cbae2dac5'
# # ensure no constants are mutated
# assert BotTransactionBaseClass.BOT_FEE_ADDITIONAL_NAME == 50
# assert v146_txn.required_bot_fees == '50 TFT'
# assert BotTransactionBaseClass.BOT_FEE_ADDITIONAL_NAME == 50
# # another v146 Txn, to guarantee the signature hash with how rivine expects it
# v146_txn_json = {'version': 146, 'data': {'sender': {'id': 3, 'signature': ''}, 'receiver': {'id': 4, 'signature': ''}, 'names': ['foobar', 'thisis.justan.example'], 'txfee': '1000000000', 'coininputs': [{'parentid': '825eecc33a194e087c7d6f711cae384c1b0f7515f3aa3feb590fd04fd1f22613', 'fulfillment': {'type': 1, 'data': {'publickey': ':0000000000000000000000000000000000000000000000000000000000000000', 'signature': ''}}}], 'refundcoinoutput': {'value': '99000000000', 'condition': {'type': 1, 'data': {'unlockhash': '01b73c4e869b6167abe6180ebe7a907f56e0357b4a2f65eb53d22baad84650eb62fce66ba036d0'}}}}}
# v146_txn = tftransactions.from_json(v146_txn_json)
# # assert v146_txn.json() == v146_txn_json
# assert v146_txn.signature_hash_get(BotTransactionBaseClass.SPECIFIER_SENDER) == '0e9cac3de589d283b2f25b59eaf4d4797028f14bc3a5f188180e9214311e624f'
# assert v146_txn.signature_hash_get(BotTransactionBaseClass.SPECIFIER_RECEIVER) == '74d949499a0c76e09c642b879c7f7b2da7ba047a2adcad477d7211e67be5d031'
# # 3Bot Transactions also have extra fees,
# # part of these fees are monthly fees
# assert BotTransactionBaseClass.compute_monthly_bot_fees(0) == '0 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(1) == '10 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(2) == '20 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(11) == '110 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(12) == '84 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(21) == '147 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(23) == '161 TFT'
# assert BotTransactionBaseClass.compute_monthly_bot_fees(24) == '120 TFT'
# Auth Coin Transactions
v176_txn_json = jsjson.json_loads('{"version":176,"data":{"nonce":"FoAiO8vN2eU=","authaddresses":["0112210f9efa5441ab705226b0628679ed190eb4588b662991747ea3809d93932c7b41cbe4b732","01450aeb140c58012cb4afb48e068f976272fefa44ffe0991a8a4350a3687558d66c8fc753c37e"],"deauthaddresses":["019e9b6f2d43a44046b62836ce8d75c935ff66cbba1e624b3e9755b98ac176a08dac5267b2c8ee"],"arbitrarydata":"dGVzdC4uLiAxLCAyLi4uIDM=","authfulfillment":{"type":1,"data":{"publickey":"ed25519:d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780","signature":"bdf023fbe7e0efec584d254b111655e1c2f81b9488943c3a712b91d9ad3a140cb0949a8868c5f72e08ccded337b79479114bdb4ed05f94dfddb359e1a6124602"}}}}')
v176_txn = tftransactions.from_json(v176_txn_json)
jsass.equals(v176_txn.json(), v176_txn_json)
jsass.equals(v176_txn.signature_hash_get(0), 'b99fb24c0d7f1976f3b4672142a289094e2d6e323af0d08a7bf5361055fb73c3')
jsass.equals(v176_txn.binary_encode(), 'b01680223bcbcdd9e5040112210f9efa5441ab705226b0628679ed190eb4588b662991747ea3809d93932c01450aeb140c58012cb4afb48e068f976272fefa44ffe0991a8a4350a3687558d602019e9b6f2d43a44046b62836ce8d75c935ff66cbba1e624b3e9755b98ac176a08d22746573742e2e2e20312c20322e2e2e203301c401d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d778080bdf023fbe7e0efec584d254b111655e1c2f81b9488943c3a712b91d9ad3a140cb0949a8868c5f72e08ccded337b79479114bdb4ed05f94dfddb359e1a6124602')
v177_txn_json = jsjson.json_loads('{"version":177,"data":{"nonce":"1oQFzIwsLs8=","arbitrarydata":"dGVzdC4uLiAxLCAyLi4uIDM=","authcondition":{"type":1,"data":{"unlockhash":"01e78fd5af261e49643dba489b29566db53fa6e195fa0e6aad4430d4f06ce88b73e047fe6a0703"}},"authfulfillment":{"type":1,"data":{"publickey":"ed25519:d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780","signature":"ad59389329ed01c5ee14ce25ae38634c2b3ef694a2bdfa714f73b175f979ba6613025f9123d68c0f11e8f0a7114833c0aab4c8596d4c31671ec8a73923f02305"}}}}')
v177_txn = tftransactions.from_json(v177_txn_json)
jsass.equals(v177_txn.json(), v177_txn_json)
jsass.equals(v177_txn.signature_hash_get(0), '09df686a90c5edd07d4325cf6b2fe7c1f311a29340d45c6a5f898a7fb8c06d96')
jsass.equals(v177_txn.binary_encode(), 'b1d68405cc8c2c2ecf22746573742e2e2e20312c20322e2e2e2033014201e78fd5af261e49643dba489b29566db53fa6e195fa0e6aad4430d4f06ce88b7301c401d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d778080ad59389329ed01c5ee14ce25ae38634c2b3ef694a2bdfa714f73b175f979ba6613025f9123d68c0f11e8f0a7114833c0aab4c8596d4c31671ec8a73923f02305')
# # ERC20 Transactions
# # v208 Transactions are supported
# v208_txn_json = {"version":208,"data":{"address":"0x1255abe9f2bf09f8e6c748e3819ac9f2dbf843c4","value":"200000000000","txfee":"1000000000","coininputs":[{"parentid":"9c61ec964105ec48bc95ffc0ac820ada600a2914a8dd4ef511ed7f218a3bf469","fulfillment":{"type":1,"data":{"publickey":"ed25519:7469d51063cdb690cc8025db7d28faadc71ff69f7c372779bf3a1e801a923e02","signature":"a0c683e8728710b4d3cd7eed4e1bd38a4be8145a2cf91b875986870aa98c6265d76cbb637d78500010e3ab1b651e31ab26b05de79938d7d0aee01f8566d08b09"}}}],"refundcoinoutput":{"value":"99999476000000000","condition":{"type":1,"data":{"unlockhash":"011c17aaf2d54f63644f9ce91c06ff984182483d1b943e96b5e77cc36fdb887c846b60460bceb0"}}}}}
# v208_txn = tftransactions.from_json(v208_txn_json)
# # assert v208_txn.json() == v208_txn_json
# assert v208_txn.signature_hash_get(0) == 'c7b48b96e24b73a341903b1bb2e838ae7abb969ec645e55241e51d6379da3763'
# assert v208_txn.signature_hash_get(1) == '09dd543df119633addb9ed6753924b451dc498d2ad958476eeae9c70841b2839'
# assert v208_txn.binary_encode() == 'd01255abe9f2bf09f8e6c748e3819ac9f2dbf843c40a2e90edd000083b9aca00029c61ec964105ec48bc95ffc0ac820ada600a2914a8dd4ef511ed7f218a3bf46901c4017469d51063cdb690cc8025db7d28faadc71ff69f7c372779bf3a1e801a923e0280a0c683e8728710b4d3cd7eed4e1bd38a4be8145a2cf91b875986870aa98c6265d76cbb637d78500010e3ab1b651e31ab26b05de79938d7d0aee01f8566d08b090110016344fe5cb488000142011c17aaf2d54f63644f9ce91c06ff984182483d1b943e96b5e77cc36fdb887c84'
# # the coin outputs contains the refund coin output
# assert len(v208_txn.coin_outputs) == 1
# assert v208_txn.coin_outputs[0].condition.unlockhash == '011c17aaf2d54f63644f9ce91c06ff984182483d1b943e96b5e77cc36fdb887c846b60460bceb0'
# assert v208_txn.coin_outputs[0].value == '99999476.0'
# # v209 Transactions are supported
# v209_txn_json = {"version":209,"data":{"address":"01f68299b26a89efdb4351a61c3a062321d23edbc1399c8499947c1313375609adbbcd3977363c","value":"100000000000","txfee":"1000000000","blockid":"0xf3c001075d527bea48f087cbfaa7c4950beaf9a2ad66bf787760d751c7bcf6bd","txid":"0x3322e1d8cc985cc4f26ace9e4468612c50a05516161a3362c941955d34f91c85"}}
# v209_txn = tftransactions.from_json(v209_txn_json)
# assert v209_txn.json() == v209_txn_json
# assert v209_txn.signature_hash_get(42) == 'dacb89c4b44d542e415d517f745ce51f56dab76d1062fa6da691b9a9fa8efa11'
# assert v209_txn.binary_encode() == 'd101f68299b26a89efdb4351a61c3a062321d23edbc1399c8499947c1313375609ad0a174876e800083b9aca00f3c001075d527bea48f087cbfaa7c4950beaf9a2ad66bf787760d751c7bcf6bd3322e1d8cc985cc4f26ace9e4468612c50a05516161a3362c941955d34f91c85'
# # the coin outputs contains the received value
# assert len(v209_txn.coin_outputs) == 1
# assert v209_txn.coin_outputs[0].condition.unlockhash == '01f68299b26a89efdb4351a61c3a062321d23edbc1399c8499947c1313375609adbbcd3977363c'
# assert v209_txn.coin_outputs[0].value == '100 TFT'
# # v210 Transactions are supported
# v210_txn_json = {"version":210,"data":{"pubkey":"ed25519:a271b9d4c1258f070e1e8d95250e6d29f683649829c2227564edd5ddeb75819d","tftaddress":"01b49da2ff193f46ee0fc684d7a6121a8b8e324144dffc7327471a4da79f1730960edcb2ce737f","erc20address":"0x828de486adc50aa52dab52a2ec284bcac75be211","signature":"fe13823a96928a573f20a63f3b8d3cde08c506fa535d458120fdaa5f1c78f6939c81bf91e53393130fbfee32ff4e9cb6022f14ae7750d126a7b6c0202c674b02","regfee":"10000000000","txfee":"1000000000","coininputs":[{"parentid":"a3c8f44d64c0636018a929d2caeec09fb9698bfdcbfa3a8225585a51e09ee563","fulfillment":{"type":1,"data":{"publickey":"ed25519:d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780","signature":"4fe14adcbded85476680bfd4fa8ff35d51ac34bb8a9b3f4904eac6eee4f53e19b6a39c698463499b9961524f026db2fb5c8173307f483c6458d401ecec2e7a0c"}}}],"refundcoinoutput":{"value":"99999999000000000","condition":{"type":1,"data":{"unlockhash":"01370af706b547dd4e562a047e6265d7e7750771f9bff633b1a12dbd59b11712c6ef65edb1690d"}}}}}
# v210_txn = tftransactions.from_json(v210_txn_json)
# assert v210_txn.json() == v210_txn_json
# assert v210_txn.signature_hash_get(0) == 'd6ccdb92956034f981182f5a311c84b45b01c30967327aaf9847b6fc04ba5e14'
# assert v210_txn.signature_hash_get(1) == 'd7172f55e756232bb38b11a47466062f3b26330d87d291c7049658fedb819cca'
# assert v210_txn.binary_encode() == 'd201a271b9d4c1258f070e1e8d95250e6d29f683649829c2227564edd5ddeb75819d80fe13823a96928a573f20a63f3b8d3cde08c506fa535d458120fdaa5f1c78f6939c81bf91e53393130fbfee32ff4e9cb6022f14ae7750d126a7b6c0202c674b020a02540be400083b9aca0002a3c8f44d64c0636018a929d2caeec09fb9698bfdcbfa3a8225585a51e09ee56301c401d285f92d6d449d9abb27f4c6cf82713cec0696d62b8c123f1627e054dc6d7780804fe14adcbded85476680bfd4fa8ff35d51ac34bb8a9b3f4904eac6eee4f53e19b6a39c698463499b9961524f026db2fb5c8173307f483c6458d401ecec2e7a0c01100163457821ef3600014201370af706b547dd4e562a047e6265d7e7750771f9bff633b1a12dbd59b11712c6'
# # the coin outputs contains the refund coin output
# assert len(v210_txn.coin_outputs) == 1
# assert v210_txn.coin_outputs[0].condition.unlockhash == '01370af706b547dd4e562a047e6265d7e7750771f9bff633b1a12dbd59b11712c6ef65edb1690d'
# assert v210_txn.coin_outputs[0].value == 99999999
def tests():
test_standard_transactions()
| 151.67033 | 1,344 | 0.849949 | 1,748 | 27,604 | 13.200229 | 0.184211 | 0.018202 | 0.011311 | 0.019763 | 0.39161 | 0.36552 | 0.329592 | 0.294401 | 0.228179 | 0.215654 | 0 | 0.375029 | 0.049196 | 27,604 | 181 | 1,345 | 152.508287 | 0.504115 | 0.517824 | 0 | 0.275862 | 0 | 0.155172 | 0.717698 | 0.717698 | 0 | 0 | 0 | 0 | 0.017241 | 1 | 0.034483 | false | 0 | 0.103448 | 0 | 0.137931 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
505b729cbda0d87453be80ca873ba78d1d32c972 | 192 | py | Python | tests/test_module.py | brownjl/hue2mqtt-python | 8bbeed59fd7bb18c42131590e6d25544db3091fa | [
"MIT"
] | 5 | 2021-07-18T16:41:18.000Z | 2022-02-03T14:42:15.000Z | tests/test_module.py | brownjl/hue2mqtt-python | 8bbeed59fd7bb18c42131590e6d25544db3091fa | [
"MIT"
] | 3 | 2021-09-16T23:56:29.000Z | 2022-03-29T21:08:54.000Z | tests/test_module.py | brownjl/hue2mqtt-python | 8bbeed59fd7bb18c42131590e6d25544db3091fa | [
"MIT"
] | 2 | 2021-07-25T16:08:22.000Z | 2021-09-17T15:05:10.000Z | """Test that the hue2mqtt imports as expected."""
import hue2mqtt
def test_module() -> None:
"""Test that the module behaves as expected."""
assert hue2mqtt.__version__ is not None
| 21.333333 | 51 | 0.708333 | 26 | 192 | 5.038462 | 0.615385 | 0.122137 | 0.167939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019231 | 0.1875 | 192 | 8 | 52 | 24 | 0.820513 | 0.442708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
4a13557a115409a096ed41e7cf7dcfe04a4118ed | 134 | py | Python | app/eventFrameAttributeTemplates/__init__.py | DeschutesBrewery/brewerypi | 5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f | [
"MIT"
] | 27 | 2017-11-27T05:01:05.000Z | 2020-11-14T19:52:26.000Z | app/eventFrameAttributeTemplates/__init__.py | DeschutesBrewery/brewerypi | 5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f | [
"MIT"
] | 259 | 2017-11-23T00:43:26.000Z | 2020-11-03T01:07:30.000Z | app/eventFrameAttributeTemplates/__init__.py | DeschutesBrewery/brewerypi | 5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f | [
"MIT"
] | 8 | 2018-10-29T04:39:29.000Z | 2020-10-01T22:18:12.000Z | from flask import Blueprint
eventFrameAttributeTemplates = Blueprint("eventFrameAttributeTemplates", __name__)
from . import routes
| 22.333333 | 82 | 0.843284 | 11 | 134 | 9.909091 | 0.636364 | 0.678899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104478 | 134 | 5 | 83 | 26.8 | 0.908333 | 0 | 0 | 0 | 0 | 0 | 0.208955 | 0.208955 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
4a19488b7518e11550f4c9050ea8bb16561262f8 | 379 | py | Python | src/time_functions.py | joseph-mccarthy/night-sky-pi | 045b54c8ae8d551e951cd35bc40a94d3a4171975 | [
"MIT"
] | null | null | null | src/time_functions.py | joseph-mccarthy/night-sky-pi | 045b54c8ae8d551e951cd35bc40a94d3a4171975 | [
"MIT"
] | null | null | null | src/time_functions.py | joseph-mccarthy/night-sky-pi | 045b54c8ae8d551e951cd35bc40a94d3a4171975 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
def _get_now() -> datetime:
return datetime.now()
def get_today() -> datetime:
return _get_now()
def get_tomorrow() -> datetime:
return _get_now() + timedelta(1)
def get_yesterday() -> datetime:
return _get_now() - timedelta(1)
def get_dates() -> tuple():
return (get_yesterday(), get_today(), get_tomorrow())
| 18.95 | 57 | 0.6781 | 48 | 379 | 5.041667 | 0.291667 | 0.123967 | 0.210744 | 0.247934 | 0.297521 | 0.297521 | 0.297521 | 0.297521 | 0 | 0 | 0 | 0.006452 | 0.182058 | 379 | 19 | 58 | 19.947368 | 0.774194 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
c58a9f003241e7dfa809b3f532c464dbf8a51330 | 15,550 | py | Python | pybind/nos/v7_1_0/vcenter/credentials/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/vcenter/credentials/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/vcenter/credentials/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
class credentials(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module brocade-vswitch - based on the path /vcenter/credentials. Each member element of
the container is represented as a class variable - with a specific
YANG type.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__url','__username','__password','__vrf_name',)
_yang_name = 'credentials'
_rest_name = ''
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
path_helper_ = kwargs.pop("path_helper", None)
if path_helper_ is False:
self._path_helper = False
elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper):
self._path_helper = path_helper_
elif hasattr(self, "_parent"):
path_helper_ = getattr(self._parent, "_path_helper", False)
self._path_helper = path_helper_
else:
self._path_helper = False
extmethods = kwargs.pop("extmethods", None)
if extmethods is False:
self._extmethods = False
elif extmethods is not None and isinstance(extmethods, dict):
self._extmethods = extmethods
elif hasattr(self, "_parent"):
extmethods = getattr(self._parent, "_extmethods", None)
self._extmethods = extmethods
else:
self._extmethods = False
self.__url = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[h][t][t][p]([s]{0,1})[:][/][/]([-a-zA-Z0-9\\.\\\\\\\\@#\\+\\*\\(\\)=\\{~\\}%<>=$_:\\[\\]\\|]{1,57})', 'length': [u'1 .. 64']}), is_leaf=True, yang_name="url", rest_name="url", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'URL', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='vcenter-url', is_config=True)
self.__username = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="username", rest_name="username", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'User name', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
self.__password = YANGDynClass(base=unicode, is_leaf=True, yang_name="password", rest_name="password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Password', u'suppress-echo': u'true', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
self.__vrf_name = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="vrf-name", rest_name="use-vrf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'VRF name of the vCenter server', u'alt-name': u'use-vrf'}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'vcenter', u'credentials']
def _rest_path(self):
if hasattr(self, "_parent"):
if self._rest_name:
return self._parent._rest_path()+[self._rest_name]
else:
return self._parent._rest_path()
else:
return [u'vcenter']
def _get_url(self):
"""
Getter method for url, mapped from YANG variable /vcenter/credentials/url (vcenter-url)
YANG Description: URL
"""
return self.__url
def _set_url(self, v, load=False):
"""
Setter method for url, mapped from YANG variable /vcenter/credentials/url (vcenter-url)
If this variable is read-only (config: false) in the
source YANG file, then _set_url is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_url() directly.
YANG Description: URL
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[h][t][t][p]([s]{0,1})[:][/][/]([-a-zA-Z0-9\\.\\\\\\\\@#\\+\\*\\(\\)=\\{~\\}%<>=$_:\\[\\]\\|]{1,57})', 'length': [u'1 .. 64']}), is_leaf=True, yang_name="url", rest_name="url", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'URL', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='vcenter-url', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """url must be of a type compatible with vcenter-url""",
'defined-type': "brocade-vswitch:vcenter-url",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[h][t][t][p]([s]{0,1})[:][/][/]([-a-zA-Z0-9\\.\\\\\\\\@#\\+\\*\\(\\)=\\{~\\}%<>=$_:\\[\\]\\|]{1,57})', 'length': [u'1 .. 64']}), is_leaf=True, yang_name="url", rest_name="url", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'URL', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='vcenter-url', is_config=True)""",
})
self.__url = t
if hasattr(self, '_set'):
self._set()
def _unset_url(self):
self.__url = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'[h][t][t][p]([s]{0,1})[:][/][/]([-a-zA-Z0-9\\.\\\\\\\\@#\\+\\*\\(\\)=\\{~\\}%<>=$_:\\[\\]\\|]{1,57})', 'length': [u'1 .. 64']}), is_leaf=True, yang_name="url", rest_name="url", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'URL', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='vcenter-url', is_config=True)
def _get_username(self):
"""
Getter method for username, mapped from YANG variable /vcenter/credentials/username (string)
YANG Description: User name
"""
return self.__username
def _set_username(self, v, load=False):
"""
Setter method for username, mapped from YANG variable /vcenter/credentials/username (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_username is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_username() directly.
YANG Description: User name
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="username", rest_name="username", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'User name', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """username must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="username", rest_name="username", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'User name', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)""",
})
self.__username = t
if hasattr(self, '_set'):
self._set()
def _unset_username(self):
self.__username = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="username", rest_name="username", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'User name', u'cli-incomplete-command': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
def _get_password(self):
"""
Getter method for password, mapped from YANG variable /vcenter/credentials/password (string)
YANG Description: Password
"""
return self.__password
def _set_password(self, v, load=False):
"""
Setter method for password, mapped from YANG variable /vcenter/credentials/password (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_password is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_password() directly.
YANG Description: Password
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="password", rest_name="password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Password', u'suppress-echo': u'true', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """password must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=unicode, is_leaf=True, yang_name="password", rest_name="password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Password', u'suppress-echo': u'true', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)""",
})
self.__password = t
if hasattr(self, '_set'):
self._set()
def _unset_password(self):
self.__password = YANGDynClass(base=unicode, is_leaf=True, yang_name="password", rest_name="password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Password', u'suppress-echo': u'true', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
def _get_vrf_name(self):
"""
Getter method for vrf_name, mapped from YANG variable /vcenter/credentials/vrf_name (string)
YANG Description: Name of the VRF that the vCenter server is within
"""
return self.__vrf_name
def _set_vrf_name(self, v, load=False):
"""
Setter method for vrf_name, mapped from YANG variable /vcenter/credentials/vrf_name (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_vrf_name is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_vrf_name() directly.
YANG Description: Name of the VRF that the vCenter server is within
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="vrf-name", rest_name="use-vrf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'VRF name of the vCenter server', u'alt-name': u'use-vrf'}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
except (TypeError, ValueError):
raise ValueError({
'error-string': """vrf_name must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="vrf-name", rest_name="use-vrf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'VRF name of the vCenter server', u'alt-name': u'use-vrf'}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)""",
})
self.__vrf_name = t
if hasattr(self, '_set'):
self._set()
def _unset_vrf_name(self):
self.__vrf_name = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1 .. 255']}), is_leaf=True, yang_name="vrf-name", rest_name="use-vrf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'VRF name of the vCenter server', u'alt-name': u'use-vrf'}}, namespace='urn:brocade.com:mgmt:brocade-vswitch', defining_module='brocade-vswitch', yang_type='string', is_config=True)
url = __builtin__.property(_get_url, _set_url)
username = __builtin__.property(_get_username, _set_username)
password = __builtin__.property(_get_password, _set_password)
vrf_name = __builtin__.property(_get_vrf_name, _set_vrf_name)
_pyangbind_elements = {'url': url, 'username': username, 'password': password, 'vrf_name': vrf_name, }
| 63.729508 | 627 | 0.702637 | 2,126 | 15,550 | 4.929445 | 0.088429 | 0.043893 | 0.048092 | 0.021374 | 0.78416 | 0.759351 | 0.749046 | 0.738836 | 0.738836 | 0.726622 | 0 | 0.005825 | 0.138842 | 15,550 | 243 | 628 | 63.99177 | 0.77679 | 0.139614 | 0 | 0.425676 | 0 | 0.047297 | 0.36722 | 0.163522 | 0 | 0 | 0 | 0 | 0 | 1 | 0.101351 | false | 0.087838 | 0.054054 | 0 | 0.283784 | 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 |
c5a8273f07ad0d000c743170fca0936bb86aa55f | 44 | py | Python | autorop/turnkey/__init__.py | mariuszskon/autorop | 5735073008f722fab00f3866ef4a05f04620593b | [
"MIT"
] | 15 | 2020-10-03T05:20:31.000Z | 2022-03-20T06:19:29.000Z | autorop/turnkey/__init__.py | mariuszskon/autorop | 5735073008f722fab00f3866ef4a05f04620593b | [
"MIT"
] | 8 | 2020-10-02T09:51:39.000Z | 2021-04-24T03:14:18.000Z | autorop/turnkey/__init__.py | mariuszskon/autorop | 5735073008f722fab00f3866ef4a05f04620593b | [
"MIT"
] | 2 | 2021-04-16T06:33:49.000Z | 2021-09-03T09:21:10.000Z | from autorop.turnkey.Classic import Classic
| 22 | 43 | 0.863636 | 6 | 44 | 6.333333 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 44 | 1 | 44 | 44 | 0.95 | 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 |
c5d0c0cc85771f44bb44b15e859febcd3280018c | 10,463 | py | Python | trading_mechanisms/utils.py | xenophonlabs/dydx-trader-rewards | 9d04847621518102786c62a8f298ef206078e931 | [
"MIT"
] | 1 | 2022-03-31T22:40:40.000Z | 2022-03-31T22:40:40.000Z | trading_mechanisms/utils.py | xenophonlabs/dydx-trader-rewards | 9d04847621518102786c62a8f298ef206078e931 | [
"MIT"
] | null | null | null | trading_mechanisms/utils.py | xenophonlabs/dydx-trader-rewards | 9d04847621518102786c62a8f298ef206078e931 | [
"MIT"
] | null | null | null | import sympy as sp
import numpy as np
def dist(v1, v2):
"""
Root-mean-squared-error between vector 1 and vector 2
"""
return (sum([(v1[i]-v2[i])**2 for i in range(len(v1))])/len(v1))**(1/2)
def cur_mkt_score(ds, fs):
"""
Given a bunch of participants' open-interests and fees,
calculate the total current market score.
"""
total = 0
for d, f in zip(ds, fs):
total += (d**.3) * (f**.7)
return total
def single_mkt_score_stk(d, f, g):
return (d**.28) * (f**.67) * (g**0.05)
def cur_mkt_score_stk(ds, fs, gs):
"""
Given a bunch of participants' open-interests and fees,
calculate the total current market score.
"""
total = 0
for d, f, g in zip(ds, fs, gs):
total += single_mkt_score_stk(d, f, g)
return total
def setup(R, p, analysis=False):
"""
Generate the Sympy objects that perform the computation
of the profit function and its derivatives.
"""
f = sp.Symbol('f')
d = sp.Symbol('d')
T = sp.Symbol('T')
profit = R * p * d**0.3 * f**0.7 / (T + d**0.3 * f**0.7) - f
profit_prime = sp.diff(profit, f)
profit_prime_prime = sp.diff(profit_prime, f)
profit_prime_fast = sp.lambdify([f, d, T], profit_prime, "numpy")
profit_prime_prime_fast = sp.lambdify([f, d, T], profit_prime_prime, "numpy")
if analysis:
return profit, sp.lambdify([f, d, T], profit, "numpy")
return profit_prime_fast, profit_prime_prime_fast
def setup_stk(R, p):
"""
Generate the Sympy objects that perform the computation
of the profit function and its derivatives.
"""
f = sp.Symbol('f')
d = sp.Symbol('d')
T = sp.Symbol('T')
g = sp.Symbol('g')
profit = R * p * d**0.28 * f**0.67 * g**0.05 / (T + d**0.28 * f**0.67 * g**0.05) - f
profit_prime = sp.diff(profit, f)
profit_prime_prime = sp.diff(profit_prime, f)
profit_prime_fast = sp.lambdify([f, d, g, T], profit_prime, "numpy")
profit_prime_prime_fast = sp.lambdify([f, d, g, T], profit_prime_prime, "numpy")
return profit_prime_fast, profit_prime_prime_fast
def walk(alpha, d_mkt, f_mkt, profit_prime_fast, profit_prime_prime_fast):
"""
Perform a single iteration of Newton's method on the fees
vector F.
"""
mkt_score = cur_mkt_score(d_mkt, f_mkt)
T_mkt = mkt_score - f_mkt**0.7 * d_mkt**0.3
d1 = profit_prime_fast(f_mkt, d_mkt, T_mkt)
d2 = profit_prime_prime_fast(f_mkt, d_mkt, T_mkt)
new_f_mkt = f_mkt - alpha * d1 / d2
return new_f_mkt
def walk_stk(alpha, d_mkt, f_mkt, g_mkt, profit_prime_fast, profit_prime_prime_fast):
"""
Perform a single iteration of Newton's method on the fees
vector F.
"""
mkt_score = cur_mkt_score_stk(d_mkt, f_mkt, g_mkt)
T_mkt = mkt_score - f_mkt**0.67 * d_mkt**0.28 * g_mkt ** 0.05
d1 = profit_prime_fast(f_mkt, d_mkt, g_mkt, T_mkt)
d2 = profit_prime_prime_fast(f_mkt, d_mkt, g_mkt, T_mkt)
new_f_mkt = f_mkt - alpha * d1 / d2
return new_f_mkt
def get_mkt(total, n, num_whales, whale_alpha, fill=False):
"""
Randomly distrbute total amount into n buckets according to
Dirichlet distribution, where whale_alpha determines the alpha
parameter of the first num_whales trader, other traders default
to 1.
"""
whales = np.array([whale_alpha]*num_whales)
mkt = np.array(np.random.dirichlet(np.append(whales, np.ones(n-num_whales)), 1).ravel() * total)
if fill:
mkt = np.where(mkt < 10, 10, mkt)
return mkt
def find_equilibrium(D, n=1000, R=3_835_616, p=10, alpha=.01, num_whales=0, whale_alpha=1):
"""
Find Nash equilibrium given conditions specified by input parameters.
Warning: If learning rate is too small or fees vector is initialized at very high amounts,
Newton's method can update fees as negative values. This will crash the algorithm.
To avoid this, lower the learning rate or instantiate the fees vector at smaller amounts.
"""
profit_prime_fast, profit_prime_prime_fast = setup(R, p)
# d_mkt = np.random.exponential(scale=(D/n), size=n)
d_mkt = get_mkt(D, n, num_whales, whale_alpha)
f_mkt = np.random.rand(n)*((1/25) * D)/n
# simulate_market_optimal_fee_discovery, running until convergence
rmses = [] # the distances between fees on successive iterations of the algorithm; should tend to 0 as f_mkt convergest
while (rmses==[]) or (rmses[-1] > 10**-10):
new_f_mkt = walk(alpha, d_mkt, f_mkt, profit_prime_fast, profit_prime_prime_fast)
rmses.append(dist(new_f_mkt, f_mkt))
f_mkt = new_f_mkt
check_equilibrium(d_mkt, f_mkt, profit_prime_fast)
return d_mkt, f_mkt
def setup_a(a, R, p, analysis=False):
"""
Generate the Sympy objects that perform the computation
of the profit function and its derivatives.
"""
f = sp.Symbol('f')
d = sp.Symbol('d')
T = sp.Symbol('T')
profit = R * p * d**(1-a) * f**(a) / (T + d**(1-a) * f**a) - f
profit_prime = sp.diff(profit, f)
profit_prime_prime = sp.diff(profit_prime, f)
profit_prime_fast = sp.lambdify([f, d, T], profit_prime, "numpy")
profit_prime_prime_fast = sp.lambdify([f, d, T], profit_prime_prime, "numpy")
if analysis:
return profit, sp.lambdify([f, d, T], profit, "numpy")
return profit_prime_fast, profit_prime_prime_fast
def cur_mkt_score_a(a, ds, fs):
"""
Given a bunch of participants' open-interests and fees,
calculate the total current market score.
"""
total = 0
for d, f in zip(ds, fs):
total += (d**(1-a)) * (f**(a))
return total
def walk_a(a, alpha, d_mkt, f_mkt, profit_prime_fast, profit_prime_prime_fast):
"""
Perform a single iteration of Newton's method on the fees
vector F.
"""
mkt_score = cur_mkt_score_a(a, d_mkt, f_mkt)
T_mkt = mkt_score - f_mkt**a * d_mkt**(1-a)
d1 = profit_prime_fast(f_mkt, d_mkt, T_mkt)
d2 = profit_prime_prime_fast(f_mkt, d_mkt, T_mkt)
new_f_mkt = f_mkt - alpha * d1 / d2
return new_f_mkt
def find_equilibrium_a(a, D, n=1000, R=3_835_616, p=10, alpha=.01, num_whales=0, whale_alpha=1):
"""
Find Nash equilibrium given conditions specified by input parameters.
Warning: If learning rate is too small or fees vector is initialized at very high amounts,
Newton's method can update fees as negative values. This will crash the algorithm.
To avoid this, lower the learning rate or instantiate the fees vector at smaller amounts.
"""
profit_prime_fast, profit_prime_prime_fast = setup_a(a, R, p)
# d_mkt = np.random.exponential(scale=(D/n), size=n)
d_mkt = get_mkt(D, n, num_whales, whale_alpha)
f_mkt = np.random.rand(n)*((1/25) * D)/n
# simulate_market_optimal_fee_discovery, running until convergence
rmses = [] # the distances between fees on successive iterations of the algorithm; should tend to 0 as f_mkt convergest
while (rmses==[]) or (rmses[-1] > 10**-10):
new_f_mkt = walk_a(a, alpha, d_mkt, f_mkt, profit_prime_fast, profit_prime_prime_fast)
rmses.append(dist(new_f_mkt, f_mkt))
f_mkt = new_f_mkt
check_equilibrium_a(a, d_mkt, f_mkt, profit_prime_fast)
return d_mkt, f_mkt
def check_equilibrium_a(a, d_mkt, f_mkt, profit_prime_fast):
"""
Verify that evey trader's f_k minimizes their profit curve.
"""
mkt_score = cur_mkt_score_a(a, d_mkt, f_mkt)
T_mkt = mkt_score - f_mkt**a * d_mkt**(1-a)
err = profit_prime_fast(f_mkt, d_mkt, T_mkt)
if not np.all((err <= 10e-2)):
raise Exception("Newton's method did not find an equilibrium.")
return True
def find_equilibrium_stk(D, n=1000, R=3_835_616, p=10, alpha=.01, G=25_000_000, num_whales=0, whale_alpha=1):
"""
Find Nash equilibrium given conditions specified by input parameters.
Warning: If learning rate is too small or fees vector is initialized at very high amounts,
Newton's method can update fees as negative values. This will crash the algorithm.
To avoid this, lower the learning rate or instantiate the fees vector at smaller amounts.
"""
profit_prime_fast, profit_prime_prime_fast = setup_stk(R, p)
# d_mkt = np.random.exponential(scale=(D/n), size=n)
d_mkt = get_mkt(D, n, num_whales, whale_alpha)
f_mkt = np.random.rand(n)*((1/25) * D)/n
g_mkt = get_mkt(G, n, num_whales, whale_alpha*10, fill=True)
# simulate_market_optimal_fee_discovery, running until convergence
rmses = [] # the distances between fees on successive iterations of the algorithm; should tend to 0 as f_mkt convergest
while (rmses==[]) or (rmses[-1] > 10**-10):
new_f_mkt = walk_stk(alpha, d_mkt, f_mkt, g_mkt, profit_prime_fast, profit_prime_prime_fast)
rmses.append(dist(new_f_mkt, f_mkt))
f_mkt = new_f_mkt
check_equilibrium_stk(d_mkt, f_mkt, g_mkt, profit_prime_fast)
return d_mkt, f_mkt, g_mkt
###############
### TESTING ###
###############
def check_equilibrium(d_mkt, f_mkt, profit_prime_fast):
"""
Verify that evey trader's f_k minimizes their profit curve.
"""
mkt_score = cur_mkt_score(d_mkt, f_mkt)
T_mkt = mkt_score - f_mkt**0.7 * d_mkt**0.3
err = profit_prime_fast(f_mkt, d_mkt, T_mkt)
if not np.all((err <= 10e-2)):
raise Exception("Newton's method did not find an equilibrium.")
return True
def check_equilibrium_stk(d_mkt, f_mkt, g_mkt, profit_prime_fast):
"""
Verify that evey trader's f_k minimizes their profit curve.
"""
mkt_score = cur_mkt_score_stk(d_mkt, f_mkt, g_mkt)
T_mkt = mkt_score - f_mkt**0.67 * d_mkt**0.28 * g_mkt**0.05
err = profit_prime_fast(f_mkt, d_mkt, g_mkt, T_mkt)
if not np.all((err <= 10e-2)):
raise Exception("Newton's method did not find an equilibrium.")
return True
def check_profit(R, p, total_trader_score):
"""
Get profit function
"""
f = sp.Symbol('f')
d = sp.Symbol('d')
profit = R * p * d**0.3 * f**0.7 / total_trader_score - f
profit_fast = sp.lambdify([f, d], profit, "numpy")
return profit, profit_fast
def check_profit_stk(R, p, total_trader_score):
"""
Get profit function
"""
f = sp.Symbol('f')
d = sp.Symbol('d')
g = sp.Symbol('g')
profit = R * p * d**0.28 * f**0.67 * g**0.05 / total_trader_score - f
profit_fast = sp.lambdify([f, d, g], profit, "numpy")
return profit, profit_fast
| 34.760797 | 123 | 0.65746 | 1,766 | 10,463 | 3.663647 | 0.108154 | 0.042658 | 0.032458 | 0.025966 | 0.8949 | 0.882535 | 0.870634 | 0.870634 | 0.861824 | 0.852396 | 0 | 0.025459 | 0.219153 | 10,463 | 300 | 124 | 34.876667 | 0.766463 | 0.283093 | 0 | 0.629139 | 0 | 0 | 0.027801 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.13245 | false | 0 | 0.013245 | 0.006623 | 0.291391 | 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 |
c5d8c1bd9a51dbb2de30acf5ad43d2d9d52cbacc | 99 | py | Python | Inheritance/project_vehicle/cross_motorcycle.py | vasetousa/OOP | e4fedc497dd149c9800613ea11846e0e770d122c | [
"MIT"
] | null | null | null | Inheritance/project_vehicle/cross_motorcycle.py | vasetousa/OOP | e4fedc497dd149c9800613ea11846e0e770d122c | [
"MIT"
] | null | null | null | Inheritance/project_vehicle/cross_motorcycle.py | vasetousa/OOP | e4fedc497dd149c9800613ea11846e0e770d122c | [
"MIT"
] | null | null | null | from project_restaurant.motorcycle import Motorcycle
class CrossMotorcycle(Motorcycle):
pass
| 16.5 | 52 | 0.828283 | 10 | 99 | 8.1 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131313 | 99 | 5 | 53 | 19.8 | 0.94186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
c5df486575526fe52939ef55112f233d1aeb588e | 35 | py | Python | examples/Python.py | JStearsman/hello-worlds | 314ce36b4e7f38c357b87a6957afd1773b5f4ec5 | [
"Unlicense"
] | 81 | 2017-10-01T14:07:28.000Z | 2021-12-20T15:47:33.000Z | examples/Python.py | JStearsman/hello-worlds | 314ce36b4e7f38c357b87a6957afd1773b5f4ec5 | [
"Unlicense"
] | 333 | 2017-10-01T13:37:50.000Z | 2021-05-27T21:48:55.000Z | examples/Python.py | JStearsman/hello-worlds | 314ce36b4e7f38c357b87a6957afd1773b5f4ec5 | [
"Unlicense"
] | 739 | 2017-10-01T13:42:46.000Z | 2021-12-24T11:39:49.000Z | # Hello World
print("Hello World")
| 11.666667 | 20 | 0.714286 | 5 | 35 | 5 | 0.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 35 | 2 | 21 | 17.5 | 0.833333 | 0.314286 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
c5e26ab1885ff44c8f7a2a72d09007ae1c99220b | 34 | py | Python | lingua_franca/lang/parse_sl.py | NeonDaniel/lingua-franca | eee95702016b4013b0d81dc74da98cd2d2f53358 | [
"Apache-2.0"
] | 191 | 2022-01-18T10:24:01.000Z | 2022-03-31T10:12:22.000Z | lingua_franca/lang/parse_sl.py | NeonDaniel/lingua-franca | eee95702016b4013b0d81dc74da98cd2d2f53358 | [
"Apache-2.0"
] | 188 | 2019-08-06T02:00:17.000Z | 2022-03-31T21:50:22.000Z | lingua_franca/lang/parse_sl.py | NeonDaniel/lingua-franca | eee95702016b4013b0d81dc74da98cd2d2f53358 | [
"Apache-2.0"
] | 71 | 2019-04-16T18:12:22.000Z | 2022-03-27T07:37:18.000Z | # TODO implement parsing function
| 17 | 33 | 0.823529 | 4 | 34 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 34 | 1 | 34 | 34 | 0.965517 | 0.911765 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 1 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
a86d396825351f266364ed56bab343a8de26987c | 9,804 | py | Python | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/__init__.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/__init__.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/__init__.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
# import KmsClient
from huaweicloudsdkkms.v1.kms_client import KmsClient
from huaweicloudsdkkms.v1.kms_async_client import KmsAsyncClient
# import models into sdk package
from huaweicloudsdkkms.v1.model.action_resources import ActionResources
from huaweicloudsdkkms.v1.model.api_link import ApiLink
from huaweicloudsdkkms.v1.model.api_version_detail import ApiVersionDetail
from huaweicloudsdkkms.v1.model.batch_create_kms_tags_request import BatchCreateKmsTagsRequest
from huaweicloudsdkkms.v1.model.batch_create_kms_tags_request_body import BatchCreateKmsTagsRequestBody
from huaweicloudsdkkms.v1.model.batch_create_kms_tags_response import BatchCreateKmsTagsResponse
from huaweicloudsdkkms.v1.model.cancel_grant_request import CancelGrantRequest
from huaweicloudsdkkms.v1.model.cancel_grant_response import CancelGrantResponse
from huaweicloudsdkkms.v1.model.cancel_key_deletion_request import CancelKeyDeletionRequest
from huaweicloudsdkkms.v1.model.cancel_key_deletion_response import CancelKeyDeletionResponse
from huaweicloudsdkkms.v1.model.cancel_self_grant_request import CancelSelfGrantRequest
from huaweicloudsdkkms.v1.model.cancel_self_grant_response import CancelSelfGrantResponse
from huaweicloudsdkkms.v1.model.create_datakey_request import CreateDatakeyRequest
from huaweicloudsdkkms.v1.model.create_datakey_request_body import CreateDatakeyRequestBody
from huaweicloudsdkkms.v1.model.create_datakey_response import CreateDatakeyResponse
from huaweicloudsdkkms.v1.model.create_datakey_without_plaintext_request import CreateDatakeyWithoutPlaintextRequest
from huaweicloudsdkkms.v1.model.create_datakey_without_plaintext_response import CreateDatakeyWithoutPlaintextResponse
from huaweicloudsdkkms.v1.model.create_grant_request import CreateGrantRequest
from huaweicloudsdkkms.v1.model.create_grant_request_body import CreateGrantRequestBody
from huaweicloudsdkkms.v1.model.create_grant_response import CreateGrantResponse
from huaweicloudsdkkms.v1.model.create_key_request import CreateKeyRequest
from huaweicloudsdkkms.v1.model.create_key_request_body import CreateKeyRequestBody
from huaweicloudsdkkms.v1.model.create_key_response import CreateKeyResponse
from huaweicloudsdkkms.v1.model.create_kms_tag_request import CreateKmsTagRequest
from huaweicloudsdkkms.v1.model.create_kms_tag_request_body import CreateKmsTagRequestBody
from huaweicloudsdkkms.v1.model.create_kms_tag_response import CreateKmsTagResponse
from huaweicloudsdkkms.v1.model.create_parameters_for_import_request import CreateParametersForImportRequest
from huaweicloudsdkkms.v1.model.create_parameters_for_import_response import CreateParametersForImportResponse
from huaweicloudsdkkms.v1.model.create_random_request import CreateRandomRequest
from huaweicloudsdkkms.v1.model.create_random_response import CreateRandomResponse
from huaweicloudsdkkms.v1.model.decrypt_data_request import DecryptDataRequest
from huaweicloudsdkkms.v1.model.decrypt_data_request_body import DecryptDataRequestBody
from huaweicloudsdkkms.v1.model.decrypt_data_response import DecryptDataResponse
from huaweicloudsdkkms.v1.model.decrypt_datakey_request import DecryptDatakeyRequest
from huaweicloudsdkkms.v1.model.decrypt_datakey_request_body import DecryptDatakeyRequestBody
from huaweicloudsdkkms.v1.model.decrypt_datakey_response import DecryptDatakeyResponse
from huaweicloudsdkkms.v1.model.delete_imported_key_material_request import DeleteImportedKeyMaterialRequest
from huaweicloudsdkkms.v1.model.delete_imported_key_material_response import DeleteImportedKeyMaterialResponse
from huaweicloudsdkkms.v1.model.delete_key_request import DeleteKeyRequest
from huaweicloudsdkkms.v1.model.delete_key_response import DeleteKeyResponse
from huaweicloudsdkkms.v1.model.delete_tag_request import DeleteTagRequest
from huaweicloudsdkkms.v1.model.delete_tag_response import DeleteTagResponse
from huaweicloudsdkkms.v1.model.disable_key_request import DisableKeyRequest
from huaweicloudsdkkms.v1.model.disable_key_response import DisableKeyResponse
from huaweicloudsdkkms.v1.model.disable_key_rotation_request import DisableKeyRotationRequest
from huaweicloudsdkkms.v1.model.disable_key_rotation_response import DisableKeyRotationResponse
from huaweicloudsdkkms.v1.model.enable_key_request import EnableKeyRequest
from huaweicloudsdkkms.v1.model.enable_key_response import EnableKeyResponse
from huaweicloudsdkkms.v1.model.enable_key_rotation_request import EnableKeyRotationRequest
from huaweicloudsdkkms.v1.model.enable_key_rotation_response import EnableKeyRotationResponse
from huaweicloudsdkkms.v1.model.encrypt_data_request import EncryptDataRequest
from huaweicloudsdkkms.v1.model.encrypt_data_request_body import EncryptDataRequestBody
from huaweicloudsdkkms.v1.model.encrypt_data_response import EncryptDataResponse
from huaweicloudsdkkms.v1.model.encrypt_datakey_request import EncryptDatakeyRequest
from huaweicloudsdkkms.v1.model.encrypt_datakey_request_body import EncryptDatakeyRequestBody
from huaweicloudsdkkms.v1.model.encrypt_datakey_response import EncryptDatakeyResponse
from huaweicloudsdkkms.v1.model.gen_random_request_body import GenRandomRequestBody
from huaweicloudsdkkms.v1.model.get_parameters_for_import_request_body import GetParametersForImportRequestBody
from huaweicloudsdkkms.v1.model.grants import Grants
from huaweicloudsdkkms.v1.model.import_key_material_request import ImportKeyMaterialRequest
from huaweicloudsdkkms.v1.model.import_key_material_request_body import ImportKeyMaterialRequestBody
from huaweicloudsdkkms.v1.model.import_key_material_response import ImportKeyMaterialResponse
from huaweicloudsdkkms.v1.model.ke_k_info import KeKInfo
from huaweicloudsdkkms.v1.model.key_alias_info import KeyAliasInfo
from huaweicloudsdkkms.v1.model.key_description_info import KeyDescriptionInfo
from huaweicloudsdkkms.v1.model.key_details import KeyDetails
from huaweicloudsdkkms.v1.model.key_status_info import KeyStatusInfo
from huaweicloudsdkkms.v1.model.list_grants_request import ListGrantsRequest
from huaweicloudsdkkms.v1.model.list_grants_request_body import ListGrantsRequestBody
from huaweicloudsdkkms.v1.model.list_grants_response import ListGrantsResponse
from huaweicloudsdkkms.v1.model.list_key_detail_request import ListKeyDetailRequest
from huaweicloudsdkkms.v1.model.list_key_detail_response import ListKeyDetailResponse
from huaweicloudsdkkms.v1.model.list_keys_request import ListKeysRequest
from huaweicloudsdkkms.v1.model.list_keys_request_body import ListKeysRequestBody
from huaweicloudsdkkms.v1.model.list_keys_response import ListKeysResponse
from huaweicloudsdkkms.v1.model.list_kms_by_tags_request import ListKmsByTagsRequest
from huaweicloudsdkkms.v1.model.list_kms_by_tags_request_body import ListKmsByTagsRequestBody
from huaweicloudsdkkms.v1.model.list_kms_by_tags_response import ListKmsByTagsResponse
from huaweicloudsdkkms.v1.model.list_kms_tags_request import ListKmsTagsRequest
from huaweicloudsdkkms.v1.model.list_kms_tags_response import ListKmsTagsResponse
from huaweicloudsdkkms.v1.model.list_retirable_grants_request import ListRetirableGrantsRequest
from huaweicloudsdkkms.v1.model.list_retirable_grants_request_body import ListRetirableGrantsRequestBody
from huaweicloudsdkkms.v1.model.list_retirable_grants_response import ListRetirableGrantsResponse
from huaweicloudsdkkms.v1.model.operate_key_request_body import OperateKeyRequestBody
from huaweicloudsdkkms.v1.model.quotas import Quotas
from huaweicloudsdkkms.v1.model.resources import Resources
from huaweicloudsdkkms.v1.model.revoke_grant_request_body import RevokeGrantRequestBody
from huaweicloudsdkkms.v1.model.schedule_key_deletion_request_body import ScheduleKeyDeletionRequestBody
from huaweicloudsdkkms.v1.model.show_key_rotation_status_request import ShowKeyRotationStatusRequest
from huaweicloudsdkkms.v1.model.show_key_rotation_status_response import ShowKeyRotationStatusResponse
from huaweicloudsdkkms.v1.model.show_kms_tags_request import ShowKmsTagsRequest
from huaweicloudsdkkms.v1.model.show_kms_tags_response import ShowKmsTagsResponse
from huaweicloudsdkkms.v1.model.show_user_instances_request import ShowUserInstancesRequest
from huaweicloudsdkkms.v1.model.show_user_instances_response import ShowUserInstancesResponse
from huaweicloudsdkkms.v1.model.show_user_quotas_request import ShowUserQuotasRequest
from huaweicloudsdkkms.v1.model.show_user_quotas_response import ShowUserQuotasResponse
from huaweicloudsdkkms.v1.model.show_version_request import ShowVersionRequest
from huaweicloudsdkkms.v1.model.show_version_response import ShowVersionResponse
from huaweicloudsdkkms.v1.model.show_versions_request import ShowVersionsRequest
from huaweicloudsdkkms.v1.model.show_versions_response import ShowVersionsResponse
from huaweicloudsdkkms.v1.model.tag import Tag
from huaweicloudsdkkms.v1.model.tag_item import TagItem
from huaweicloudsdkkms.v1.model.update_key_alias_request import UpdateKeyAliasRequest
from huaweicloudsdkkms.v1.model.update_key_alias_request_body import UpdateKeyAliasRequestBody
from huaweicloudsdkkms.v1.model.update_key_alias_response import UpdateKeyAliasResponse
from huaweicloudsdkkms.v1.model.update_key_description_request import UpdateKeyDescriptionRequest
from huaweicloudsdkkms.v1.model.update_key_description_request_body import UpdateKeyDescriptionRequestBody
from huaweicloudsdkkms.v1.model.update_key_description_response import UpdateKeyDescriptionResponse
from huaweicloudsdkkms.v1.model.update_key_rotation_interval_request import UpdateKeyRotationIntervalRequest
from huaweicloudsdkkms.v1.model.update_key_rotation_interval_request_body import UpdateKeyRotationIntervalRequestBody
from huaweicloudsdkkms.v1.model.update_key_rotation_interval_response import UpdateKeyRotationIntervalResponse
| 81.024793 | 118 | 0.917075 | 1,109 | 9,804 | 7.827773 | 0.165915 | 0.273356 | 0.299389 | 0.358023 | 0.520793 | 0.492224 | 0.371386 | 0.161272 | 0.037093 | 0 | 0 | 0.012215 | 0.048042 | 9,804 | 120 | 119 | 81.7 | 0.917926 | 0.006222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 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 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a8745b236ed9503f3e13dd36194b2e432f378461 | 26 | py | Python | sketchy/terminal/plot/__init__.py | mbhall88/sketchy | 5ed26d28f104710f6d425053eae41fd0e99f8760 | [
"MIT"
] | null | null | null | sketchy/terminal/plot/__init__.py | mbhall88/sketchy | 5ed26d28f104710f6d425053eae41fd0e99f8760 | [
"MIT"
] | null | null | null | sketchy/terminal/plot/__init__.py | mbhall88/sketchy | 5ed26d28f104710f6d425053eae41fd0e99f8760 | [
"MIT"
] | null | null | null | from .commands import plot | 26 | 26 | 0.846154 | 4 | 26 | 5.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 26 | 1 | 26 | 26 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a88c843d683c7faf9d9c2b6004aad779cdb2c244 | 7,958 | py | Python | tests/test_client.py | mmorita44/py3pocket | 4fcc11fe6108136a40d09c51784f2f52663b9752 | [
"MIT"
] | null | null | null | tests/test_client.py | mmorita44/py3pocket | 4fcc11fe6108136a40d09c51784f2f52663b9752 | [
"MIT"
] | null | null | null | tests/test_client.py | mmorita44/py3pocket | 4fcc11fe6108136a40d09c51784f2f52663b9752 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from unittest.mock import patch, MagicMock
from py3pocket import Client, authorize, PocketError
from requests import Session
class StubClient(Client):
def __init__(self):
self._Client__consumer_key = ''
self._Client__access_token = ''
self._Client__session = Session()
# noinspection PyUnresolvedReferences
class TestClient(unittest.TestCase):
"""
Test Case of Pocket API Client.
"""
@classmethod
def setUpClass(cls):
cls.__client = StubClient()
def test_initial_access_error(self):
get_obj = type('', (), dict(status_code=400))
with patch.object(Session, 'get', MagicMock(return_value=get_obj)):
with self.assertRaises(PocketError) as e:
Client('', '', '')
self.assertEqual(str(e.exception), 'Pocket Initial Access Error')
def test_login_error(self):
get_obj = type('', (), dict(status_code=200, content='<input name="form_check" value="value">'.encode()))
post_obj = type('', (), {'status_code': 400})
with patch.object(Session, 'get', MagicMock(return_value=get_obj)):
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
with self.assertRaises(PocketError) as e:
Client('', '', '')
self.assertEqual(str(e.exception), 'Pocket Login Error')
def test_confirming_login_result_error(self):
get_obj = type('', (), dict(status_code=200, content='<input name="form_check" value="value">'.encode()))
post_obj = type('', (), dict(status_code=200, json=lambda: dict(status=0)))
with patch.object(Session, 'get', MagicMock(return_value=get_obj)):
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
with self.assertRaises(PocketError) as e:
Client('', '', '')
self.assertEqual(str(e.exception), 'Pocket Confirming Login Result Error: username or password is incorrect.')
def test_getting_request_token_via_oauth_error(self):
get_obj = type('', (), dict(status_code=200, content='<input name="form_check" value="value">'.encode()))
post_obj = [
type('', (), dict(status_code=200, json=lambda: dict(status=1))),
type('', (), dict(status_code=400))
]
with patch.object(Session, 'get', MagicMock(return_value=get_obj)):
with patch.object(Session, 'post', MagicMock(side_effect=post_obj)):
with self.assertRaises(PocketError) as e:
Client('', '', '')
self.assertEqual(str(e.exception), 'Pocket Getting Request Token via OAuth Error')
def test_authorizing_via_oauth_error(self):
get_obj = [
type('', (), dict(status_code=200, content='<input name="form_check" value="value">'.encode())),
type('', (), dict(status_code=400, request=type('', (), dict(url='localhost'))))
]
post_obj = [
type('', (), dict(status_code=200, json=lambda: dict(status=1))),
type('', (), dict(status_code=200, json=lambda: dict(code='code')))
]
with patch.object(Session, 'get', MagicMock(side_effect=get_obj)):
with patch.object(Session, 'post', MagicMock(side_effect=post_obj)):
with self.assertRaises(PocketError) as e:
Client('', '', '')
self.assertEqual(
str(e.exception),
'Pocket Authorizing via OAuth Error: possible to not yet complete the authorization. ' +
'Please execute py3pocket.authorize.'
)
def test_getting_access_token_via_oauth_error(self):
get_obj = [
type('', (), dict(status_code=200, content='<input name="form_check" value="value">'.encode())),
type('', (), dict(status_code=302))
]
post_obj = [
type('', (), dict(status_code=200, json=lambda: dict(status=1))),
type('', (), dict(status_code=200, json=lambda: dict(code='code'))),
type('', (), dict(status_code=400))
]
with patch.object(Session, 'get', MagicMock(side_effect=get_obj)):
with patch.object(Session, 'post', MagicMock(side_effect=post_obj)):
with self.assertRaises(PocketError) as e:
Client('', '', '')
self.assertEqual(str(e.exception), 'Pocket Getting Access Token via OAuth Error')
def test_init_success(self):
get_obj = [
type('', (), dict(status_code=200, content='<input name="form_check" value="value">'.encode())),
type('', (), dict(status_code=302))
]
post_obj = [
type('', (), dict(status_code=200, json=lambda: dict(status=1))),
type('', (), dict(status_code=200, json=lambda: dict(code='code'))),
type('', (), dict(status_code=200, json=lambda: dict(access_token='access token')))
]
with patch.object(Session, 'get', MagicMock(side_effect=get_obj)):
with patch.object(Session, 'post', MagicMock(side_effect=post_obj)):
client = Client('consumer key', '', '')
self.assertEqual(client._Client__consumer_key, 'consumer key')
self.assertEqual(client._Client__access_token, 'access token')
def test_adding_error(self):
post_obj = type('', (), dict(status_code=400))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
with self.assertRaises(PocketError) as e:
TestClient.__client.add({})
self.assertEqual(str(e.exception), 'Pocket Adding Error')
def test_adding_success(self):
post_obj = type('', (), dict(status_code=200, json=lambda: dict(item_id=1)))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
resp = TestClient.__client.add({})
self.assertEqual(resp, dict(item_id=1))
def test_modifying_error(self):
post_obj = type('', (), dict(status_code=400))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
with self.assertRaises(PocketError) as e:
TestClient.__client.modify({})
self.assertEqual(str(e.exception), 'Pocket Modifying Error')
def test_modifying_success(self):
post_obj = type('', (), dict(status_code=200, json=lambda: dict(item_id=1)))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
resp = TestClient.__client.modify({})
self.assertEqual(resp, dict(item_id=1))
def test_retrieving_error(self):
post_obj = type('', (), dict(status_code=400))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
with self.assertRaises(PocketError) as e:
TestClient.__client.retrieve()
self.assertEqual(str(e.exception), 'Pocket Retrieving Error')
def test_retrieving_success(self):
post_obj = type('', (), dict(status_code=200, json=lambda: dict(item_id=1)))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
resp = TestClient.__client.retrieve()
self.assertEqual(resp, dict(item_id=1))
# noinspection PyUnresolvedReferences
class TestAuthorize(unittest.TestCase):
def test_getting_request_token_via_oauth_error(self):
post_obj = type('', (), dict(status_code=400))
with patch.object(Session, 'post', MagicMock(return_value=post_obj)):
with self.assertRaises(PocketError) as e:
authorize('')
self.assertEqual(str(e.exception), 'Pocket Getting Request Token via OAuth Error')
def test_getting_access_token_via_oauth_error(self):
"""Very complicated, avoid this unit test."""
pass
def test_authorize_success(self):
"""Very complicated, avoid this unit test."""
pass
| 37.186916 | 118 | 0.615733 | 923 | 7,958 | 5.100758 | 0.12026 | 0.070093 | 0.083263 | 0.107052 | 0.800977 | 0.793118 | 0.748726 | 0.742353 | 0.720051 | 0.680969 | 0 | 0.016631 | 0.236869 | 7,958 | 213 | 119 | 37.361502 | 0.758604 | 0.025886 | 0 | 0.557971 | 0 | 0 | 0.105904 | 0 | 0 | 0 | 0 | 0 | 0.181159 | 1 | 0.130435 | false | 0.021739 | 0.028986 | 0 | 0.181159 | 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 |
763477ea33aacbeeb0b065cc8b5b545a767f9b09 | 4,458 | py | Python | src/HABApp/rule/interfaces/_http.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 44 | 2018-12-13T08:46:44.000Z | 2022-03-07T03:23:21.000Z | src/HABApp/rule/interfaces/_http.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 156 | 2019-03-02T20:53:31.000Z | 2022-03-23T13:13:58.000Z | src/HABApp/rule/interfaces/_http.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 18 | 2019-03-08T07:13:21.000Z | 2022-03-22T19:52:31.000Z | from typing import Any, Optional, Mapping
import aiohttp
from HABApp.core.const import loop
from HABApp.core.const.json import dump_json
CLIENT: Optional[aiohttp.ClientSession] = None
async def create_client():
global CLIENT
assert CLIENT is None
CLIENT = aiohttp.ClientSession(json_serialize=dump_json, loop=loop)
from HABApp.runtime import shutdown
shutdown.register_func(CLIENT.close, msg='Closing generic http connection')
def get(url: str, params: Optional[Mapping[str, str]] = None, **kwargs: Any)\
-> aiohttp.client._RequestContextManager:
"""http get request
:param url: Request URL
:param params: Mapping, iterable of tuple of key/value pairs (e.g. dict)
to be sent as parameters in the query string of the new request.
`Params example
<https://docs.aiohttp.org/en/stable/client_quickstart.html#passing-parameters-in-urls>`_
:param kwargs: See `aiohttp request <https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request>`_
for further possible kwargs
:return: awaitable
"""
assert CLIENT is not None
return CLIENT.get(url, params=params, **kwargs)
def post(url: str, params: Optional[Mapping[str, str]] = None,
data: Any = None, json: Any = None, **kwargs: Any) -> aiohttp.client._RequestContextManager:
"""http post request
:param url: Request URL
:param params: Mapping, iterable of tuple of key/value pairs (e.g. dict)
to be sent as parameters in the query string of the new request.
`Params example
<https://docs.aiohttp.org/en/stable/client_quickstart.html#passing-parameters-in-urls>`_
:param data: Dictionary, bytes, or file-like object to send in the body of the request
(optional)
:param json: Any json compatible python object, json and data parameters could not be used at the same time.
(optional)
:param kwargs: See `aiohttp request <https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request>`_
for further possible kwargs
:return: awaitable
"""
assert CLIENT is not None
return CLIENT.post(url, params=params, data=data, json=json, **kwargs)
def put(url: str, params: Optional[Mapping[str, str]] = None,
data: Any = None, json: Any = None, **kwargs: Any) -> aiohttp.client._RequestContextManager:
"""http put request
:param url: Request URL
:param params: Mapping, iterable of tuple of key/value pairs (e.g. dict)
to be sent as parameters in the query string of the new request.
`Params example
<https://docs.aiohttp.org/en/stable/client_quickstart.html#passing-parameters-in-urls>`_
:param data: Dictionary, bytes, or file-like object to send in the body of the request
(optional)
:param json: Any json compatible python object, json and data parameters could not be used at the same time.
(optional)
:param kwargs: See `aiohttp request <https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request>`_
for further possible kwargs
:return: awaitable
"""
assert CLIENT is not None
return CLIENT.put(url, params=params, data=data, json=json, **kwargs)
def delete(url: str, params: Optional[Mapping[str, str]] = None, **kwargs: Any)\
-> aiohttp.client._RequestContextManager:
"""http delete request
:param url: Request URL
:param params: Mapping, iterable of tuple of key/value pairs (e.g. dict)
to be sent as parameters in the query string of the new request.
`Params example
<https://docs.aiohttp.org/en/stable/client_quickstart.html#passing-parameters-in-urls>`_
:param kwargs: See `aiohttp request <https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request>`_
for further possible kwargs
:return: awaitable
"""
assert CLIENT is not None
return CLIENT.delete(url, params=params, **kwargs)
def get_client_session() -> aiohttp.ClientSession:
"""Return the aiohttp
`client session object <https://docs.aiohttp.org/en/stable/client_reference.html#client-session>`_
for use in aiohttp libraries
:return: session object
"""
assert CLIENT is not None
return CLIENT
| 41.663551 | 116 | 0.666891 | 581 | 4,458 | 5.067126 | 0.173838 | 0.027514 | 0.048913 | 0.058084 | 0.820992 | 0.804688 | 0.804688 | 0.793478 | 0.793478 | 0.750679 | 0 | 0 | 0.236205 | 4,458 | 106 | 117 | 42.056604 | 0.864611 | 0.601839 | 0 | 0.3 | 0 | 0 | 0.019974 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0.166667 | false | 0 | 0.166667 | 0 | 0.5 | 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 |
76525abeb85609dc6e6e792fcf64af01f9585241 | 7,174 | py | Python | cirq-core/cirq/transformers/align_test.py | LLcat1217/Cirq | b88069f7b01457e592ad69d6b413642ef11a56b8 | [
"Apache-2.0"
] | 1 | 2022-02-05T22:17:39.000Z | 2022-02-05T22:17:39.000Z | cirq-core/cirq/transformers/align_test.py | LLcat1217/Cirq | b88069f7b01457e592ad69d6b413642ef11a56b8 | [
"Apache-2.0"
] | 4 | 2022-01-16T14:12:15.000Z | 2022-02-24T03:58:46.000Z | cirq-core/cirq/transformers/align_test.py | LLcat1217/Cirq | b88069f7b01457e592ad69d6b413642ef11a56b8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import cirq
def test_align_basic_no_context():
q1 = cirq.NamedQubit('q1')
q2 = cirq.NamedQubit('q2')
c = cirq.Circuit(
[
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1), cirq.X(q2)]),
cirq.Moment([cirq.X(q1)]),
]
)
cirq.testing.assert_same_circuits(
cirq.align_left(c),
cirq.Circuit(
cirq.Moment([cirq.X(q1), cirq.X(q2)]),
cirq.Moment([cirq.Y(q1)]),
cirq.Moment([cirq.X(q1)]),
),
)
cirq.testing.assert_same_circuits(
cirq.align_right(c),
cirq.Circuit(
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1)]),
cirq.Moment([cirq.X(q1), cirq.X(q2)]),
),
)
def test_align_left_no_compile_context():
q1 = cirq.NamedQubit('q1')
q2 = cirq.NamedQubit('q2')
cirq.testing.assert_same_circuits(
cirq.align_left(
cirq.Circuit(
[
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1), cirq.X(q2)]),
cirq.Moment([cirq.X(q1), cirq.Y(q2).with_tags("nocompile")]),
cirq.Moment([cirq.Y(q1)]),
cirq.measure(*[q1, q2], key='a'),
]
),
context=cirq.TransformerContext(tags_to_ignore=["nocompile"]),
),
cirq.Circuit(
[
cirq.Moment([cirq.X(q1), cirq.X(q2)]),
cirq.Moment([cirq.Y(q1)]),
cirq.Moment([cirq.X(q1), cirq.Y(q2).with_tags("nocompile")]),
cirq.Moment([cirq.Y(q1)]),
cirq.measure(*[q1, q2], key='a'),
]
),
)
def test_align_left_deep():
q1, q2 = cirq.LineQubit.range(2)
c_nested = cirq.FrozenCircuit(
[
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q2)]),
cirq.Moment([cirq.Z(q1), cirq.Y(q2).with_tags("nocompile")]),
cirq.Moment([cirq.Y(q1)]),
cirq.measure(q2, key='a'),
cirq.Z(q1).with_classical_controls('a'),
]
)
c_nested_aligned = cirq.FrozenCircuit(
cirq.Moment(cirq.X(q1), cirq.Y(q2)),
cirq.Moment(cirq.Z(q1)),
cirq.Moment([cirq.Y(q1), cirq.Y(q2).with_tags("nocompile")]),
cirq.measure(q2, key='a'),
cirq.Z(q1).with_classical_controls('a'),
)
c_orig = cirq.Circuit(
c_nested,
cirq.CircuitOperation(c_nested).repeat(6).with_tags("nocompile"),
c_nested,
cirq.CircuitOperation(c_nested).repeat(5).with_tags("preserve_tag"),
)
c_expected = cirq.Circuit(
c_nested_aligned,
cirq.CircuitOperation(c_nested).repeat(6).with_tags("nocompile"),
c_nested_aligned,
cirq.CircuitOperation(c_nested_aligned).repeat(5).with_tags("preserve_tag"),
)
context = cirq.TransformerContext(tags_to_ignore=["nocompile"], deep=True)
cirq.testing.assert_same_circuits(cirq.align_left(c_orig, context=context), c_expected)
def test_align_left_subset_of_operations():
q1 = cirq.NamedQubit('q1')
q2 = cirq.NamedQubit('q2')
tag = "op_to_align"
c_orig = cirq.Circuit(
[
cirq.Moment([cirq.Y(q1)]),
cirq.Moment([cirq.X(q2)]),
cirq.Moment([cirq.X(q1).with_tags(tag)]),
cirq.Moment([cirq.Y(q2)]),
cirq.measure(*[q1, q2], key='a'),
]
)
c_exp = cirq.Circuit(
[
cirq.Moment([cirq.Y(q1)]),
cirq.Moment([cirq.X(q1).with_tags(tag), cirq.X(q2)]),
cirq.Moment(),
cirq.Moment([cirq.Y(q2)]),
cirq.measure(*[q1, q2], key='a'),
]
)
cirq.testing.assert_same_circuits(
cirq.toggle_tags(
cirq.align_left(
cirq.toggle_tags(c_orig, [tag]),
context=cirq.TransformerContext(tags_to_ignore=[tag]),
),
[tag],
),
c_exp,
)
def test_align_right_no_compile_context():
q1 = cirq.NamedQubit('q1')
q2 = cirq.NamedQubit('q2')
cirq.testing.assert_same_circuits(
cirq.align_right(
cirq.Circuit(
[
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1), cirq.X(q2).with_tags("nocompile")]),
cirq.Moment([cirq.X(q1), cirq.Y(q2)]),
cirq.Moment([cirq.Y(q1)]),
cirq.measure(*[q1, q2], key='a'),
]
),
context=cirq.TransformerContext(tags_to_ignore=["nocompile"]),
),
cirq.Circuit(
[
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1), cirq.X(q2).with_tags("nocompile")]),
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1), cirq.Y(q2)]),
cirq.measure(*[q1, q2], key='a'),
]
),
)
def test_align_right_deep():
q1, q2 = cirq.LineQubit.range(2)
c_nested = cirq.FrozenCircuit(
cirq.Moment([cirq.X(q1)]),
cirq.Moment([cirq.Y(q1), cirq.X(q2).with_tags("nocompile")]),
cirq.Moment([cirq.X(q2)]),
cirq.Moment([cirq.Y(q1)]),
cirq.measure(q1, key='a'),
cirq.Z(q2).with_classical_controls('a'),
)
c_nested_aligned = cirq.FrozenCircuit(
cirq.Moment([cirq.X(q1), cirq.X(q2).with_tags("nocompile")]),
[cirq.Y(q1), cirq.Y(q1)],
cirq.Moment(cirq.measure(q1, key='a'), cirq.X(q2)),
cirq.Z(q2).with_classical_controls('a'),
)
c_orig = cirq.Circuit(
c_nested,
cirq.CircuitOperation(c_nested).repeat(6).with_tags("nocompile"),
c_nested,
cirq.CircuitOperation(c_nested).repeat(5).with_tags("preserve_tag"),
)
c_expected = cirq.Circuit(
c_nested_aligned,
cirq.CircuitOperation(c_nested).repeat(6).with_tags("nocompile"),
cirq.Moment(),
c_nested_aligned,
cirq.CircuitOperation(c_nested_aligned).repeat(5).with_tags("preserve_tag"),
)
context = cirq.TransformerContext(tags_to_ignore=["nocompile"], deep=True)
cirq.testing.assert_same_circuits(cirq.align_right(c_orig, context=context), c_expected)
def test_classical_control():
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit(
cirq.H(q0), cirq.measure(q0, key='m'), cirq.X(q1).with_classical_controls('m')
)
cirq.testing.assert_same_circuits(cirq.align_left(circuit), circuit)
cirq.testing.assert_same_circuits(cirq.align_right(circuit), circuit)
| 34 | 92 | 0.56203 | 902 | 7,174 | 4.314856 | 0.13082 | 0.120761 | 0.165468 | 0.084789 | 0.804985 | 0.801644 | 0.779034 | 0.767729 | 0.701439 | 0.6426 | 0 | 0.024696 | 0.27753 | 7,174 | 210 | 93 | 34.161905 | 0.72622 | 0.077641 | 0 | 0.60989 | 0 | 0 | 0.03559 | 0 | 0 | 0 | 0 | 0 | 0.049451 | 1 | 0.038462 | false | 0 | 0.005495 | 0 | 0.043956 | 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 |
768f45d6fb5cfd61633a14782802132aeb222136 | 23 | py | Python | coremltools/converters/nnssa/frontend/tensorflow/__init__.py | Gerzer/coremltools | 47e2010a68668bd1960dca040f5f87c0e66a0cbd | [
"BSD-3-Clause"
] | 65 | 2019-10-02T09:56:22.000Z | 2022-03-16T22:41:14.000Z | coremltools/converters/nnssa/frontend/tensorflow/__init__.py | Gerzer/coremltools | 47e2010a68668bd1960dca040f5f87c0e66a0cbd | [
"BSD-3-Clause"
] | 51 | 2020-01-13T07:54:13.000Z | 2022-03-17T09:11:56.000Z | coremltools/converters/nnssa/frontend/tensorflow/__init__.py | Gerzer/coremltools | 47e2010a68668bd1960dca040f5f87c0e66a0cbd | [
"BSD-3-Clause"
] | 16 | 2020-03-06T09:26:03.000Z | 2022-02-05T05:35:05.000Z | from .load import load
| 11.5 | 22 | 0.782609 | 4 | 23 | 4.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173913 | 23 | 1 | 23 | 23 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
76937959c03da9eacfab1fca3d3550768d1bf128 | 1,064 | py | Python | SRC/currency_package/Wallets2.py | asmith785/Package_Project | 0b0f62ac23596aa0679f40786a356e54005bb32e | [
"MIT"
] | null | null | null | SRC/currency_package/Wallets2.py | asmith785/Package_Project | 0b0f62ac23596aa0679f40786a356e54005bb32e | [
"MIT"
] | null | null | null | SRC/currency_package/Wallets2.py | asmith785/Package_Project | 0b0f62ac23596aa0679f40786a356e54005bb32e | [
"MIT"
] | null | null | null | # %%
class WalletEuro:
coversion_rates = {"usd" :1.16, "gbp": 0.86, "yen": 131.79, "franc": 1.06}
#shows euro conversion rates for each each currency starting at $1
def __init__(self,currency_amount):
self.currency_amount = currency_amount
self.currency_type = "euro"
def convert_currency(self,currency_type):
conversion_rate = WalletEuro.coversion_rates[currency_type]
converted_amount = self.currency_amount * conversion_rate
return converted_amount
class WalletYen:
coversion_rates = {"usd" :0.088, "euro": 0.0076, "gbp": 0.0064, "franc": 0.0081 }
#shows yen conversion rates for each each currency starting at $1
def __init__(self,currency_amount):
self.currency_amount = currency_amount
self.currency_type = "yen"
def convert_currency(self,currency_type):
conversion_rate = WalletYen.coversion_rates[currency_type]
converted_amount = self.currency_amount * conversion_rate
return converted_amount
# TODO Updating conversion rate function
# %%
| 29.555556 | 85 | 0.706767 | 133 | 1,064 | 5.383459 | 0.300752 | 0.167598 | 0.150838 | 0.145251 | 0.726257 | 0.726257 | 0.726257 | 0.726257 | 0.592179 | 0.592179 | 0 | 0.041128 | 0.200188 | 1,064 | 35 | 86 | 30.4 | 0.800235 | 0.162594 | 0 | 0.555556 | 0 | 0 | 0.040678 | 0 | 0 | 0 | 0 | 0.028571 | 0 | 1 | 0.222222 | false | 0 | 0 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
76af71697aef6d538fbc86715d9a3775ffc07870 | 35 | py | Python | effects.py | OrionDark7/pyweek26 | daa767a412194360fda568f1885d6ca219db85db | [
"MIT"
] | null | null | null | effects.py | OrionDark7/pyweek26 | daa767a412194360fda568f1885d6ca219db85db | [
"MIT"
] | null | null | null | effects.py | OrionDark7/pyweek26 | daa767a412194360fda568f1885d6ca219db85db | [
"MIT"
] | 1 | 2018-11-21T22:00:19.000Z | 2018-11-21T22:00:19.000Z | import pygame, entities, structures | 35 | 35 | 0.857143 | 4 | 35 | 7.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 35 | 1 | 35 | 35 | 0.9375 | 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 |
76c8aa0547062a8d5c4fcac66f1616a0813e237b | 11,557 | py | Python | annotater/memetext/tests/test_new_test_annotation.py | stricoff92/annotater | 8ca471477e2d567945e14f09d3d763d379e7587e | [
"MIT"
] | null | null | null | annotater/memetext/tests/test_new_test_annotation.py | stricoff92/annotater | 8ca471477e2d567945e14f09d3d763d379e7587e | [
"MIT"
] | null | null | null | annotater/memetext/tests/test_new_test_annotation.py | stricoff92/annotater | 8ca471477e2d567945e14f09d3d763d379e7587e | [
"MIT"
] | null | null | null |
from io import BytesIO
from decimal import Decimal
from dateutil import parser as dateutil_parser
from unittest import mock
from django.urls import reverse
from rest_framework import status
from django.conf import settings
import jwt
from freezegun import freeze_time
from .base import BaseTestCase
from website.constants import WIDGET_NAMES
from memetext.services.storage_backend import get_backend_class
from memetext.models import TestAnnotation
StorageBackend = get_backend_class()
class TestNewTestAnnotation(BaseTestCase):
def setUp(self):
super().setUp()
self.user.userprofile.assigned_widgets = f"derrrrpp,{WIDGET_NAMES.memetext},fooobaaar"
self.user.userprofile.save()
self.rate = self.create_payout_rate(Decimal("0.1"))
self.batch = self.create_annotation_batch()
self.s3image = self.create_s3_image(self.batch)
self.url = reverse("memetext-api-new-test-annotation")
self.mock_s3_upload = mock.patch.object(
StorageBackend,
"upload_fp",
return_value=None,
).start()
def tearDown(self):
self.mock_s3_upload.stop()
super().tearDown()
def test_anon_user_cannot_create_new_test_annotations(self):
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertFalse(TestAnnotation.objects.exists())
def test_tokens_are_required_to_create_new_test_annotation(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertFalse(TestAnnotation.objects.exists())
def test_user_cannot_create_new_test_annotation_if_no_associated_assignment(self):
self.client.force_login(self.user)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertTrue("No assignment." in str(response.data))
self.assertFalse(TestAnnotation.objects.exists())
def test_user_cannot_create_new_test_assignment_for_s3_image_that_does_not_exists(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': "FOOOOBAAAAR",
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertFalse(TestAnnotation.objects.exists())
def test_api_returns_400_if_invalid_tokens_are_sent(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token + "foooobaaar", # mess this token up
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertTrue("Tokens are not valid." in str(response.data))
self.assertFalse(TestAnnotation.objects.exists())
def test_api_returns_400_if_user_is_not_assigned_to_the_s3_image(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = "foobaaarrr" # incorrect assigned_item
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertTrue("Image not assigned." in str(response.data))
self.assertFalse(TestAnnotation.objects.exists())
def test_api_returns_400_if_assignment_is_complete(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch, assigned_count=0)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertTrue("No assignment." in str(response.data))
self.assertFalse(TestAnnotation.objects.exists())
def test_user_cannot_create_annotation_for_Another_users_assignment(self):
self.client.force_login(self.other_user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_401_UNAUTHORIZED)
self.client.force_login(self.user)
response = self.client.post(self.url, data, format="json")
self.assertTrue(response.status_code == status.HTTP_201_CREATED)
def test_user_can_create_new_test_annotation(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_201_CREATED)
self.assertEquals(TestAnnotation.objects.count(), 1)
ta = TestAnnotation.objects.first()
self.assertEquals(ta.s3_image, self.s3image)
self.assertEquals(ta.get_data(), {'data': 'hello world'})
def test_users_assigned_item_is_set_to_null_after_uploading_a_new_test_annotation(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_201_CREATED)
self.user.userprofile.refresh_from_db()
self.assertIsNone(self.user.userprofile.assigned_item)
def test_new_annotation_data_is_uploaded_to_s3(self):
self.client.force_login(self.user)
annotation_assignment = self.create_assigned_annotation(self.batch)
self.user.userprofile.assigned_item = self.s3image.slug
self.user.userprofile.save()
load_image_token = self.s3image.get_load_image_token()
annotate_image_token = self.s3image.get_annotate_image_token(load_image_token)
data = {
'text': 'hello world',
'image_slug': self.s3image.slug,
'annotate_image_token': annotate_image_token,
'load_image_token': load_image_token,
}
response = self.client.post(self.url, data, format="json")
self.assertEquals(response.status_code, status.HTTP_201_CREATED)
self.assertEquals(TestAnnotation.objects.count(), 1)
ta = TestAnnotation.objects.first()
self.assertEquals(
self.mock_s3_upload.call_args_list[0][0][0].getvalue(),
b'{"data": "hello world"}',
)
self.assertEquals(
self.mock_s3_upload.call_args_list[0][0][1],
settings.MEMETEXT_S3_BUCKET,
)
self.assertEquals(
self.mock_s3_upload.call_args_list[0][0][2],
ta.s3_path,
)
| 44.621622 | 94 | 0.693606 | 1,403 | 11,557 | 5.384177 | 0.11618 | 0.125761 | 0.098226 | 0.077972 | 0.805798 | 0.79865 | 0.794943 | 0.772836 | 0.772836 | 0.772836 | 0 | 0.012593 | 0.20983 | 11,557 | 258 | 95 | 44.794574 | 0.814608 | 0.003634 | 0 | 0.663717 | 0 | 0 | 0.078707 | 0.006429 | 0 | 0 | 0 | 0 | 0.137168 | 1 | 0.057522 | false | 0 | 0.057522 | 0 | 0.119469 | 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 |
4f53e3781f95f1292fe2919cc8148b76aebebea4 | 10,160 | py | Python | python/tests/test-4-qfunction.py | DiffeoInvariant/libCEED | fef6d6185073a4ded914e81d25fd2b60cc92d311 | [
"BSD-2-Clause"
] | null | null | null | python/tests/test-4-qfunction.py | DiffeoInvariant/libCEED | fef6d6185073a4ded914e81d25fd2b60cc92d311 | [
"BSD-2-Clause"
] | 1 | 2019-01-10T19:51:55.000Z | 2019-01-10T19:51:55.000Z | python/tests/test-4-qfunction.py | DiffeoInvariant/libCEED | fef6d6185073a4ded914e81d25fd2b60cc92d311 | [
"BSD-2-Clause"
] | 1 | 2021-03-30T23:13:18.000Z | 2021-03-30T23:13:18.000Z | # Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
# reserved. See files LICENSE and NOTICE for details.
#
# This file is part of CEED, a collection of benchmarks, miniapps, software
# libraries and APIs for efficient high-order finite element and spectral
# element discretizations for exascale applications. For more information and
# source code availability see http://github.com/ceed.
#
# The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
# a collaborative effort of two U.S. Department of Energy organizations (Office
# of Science and the National Nuclear Security Administration) responsible for
# the planning and preparation of a capable exascale ecosystem, including
# software, applications, hardware, advanced system engineering and early
# testbed platforms, in support of the nation's exascale computing imperative.
# @file
# Test Ceed QFunction functionality
import os
import libceed
import numpy as np
import check
# -------------------------------------------------------------------------------
# Utility
# -------------------------------------------------------------------------------
def load_qfs_so():
from distutils.sysconfig import get_config_var
import ctypes
file_dir = os.path.dirname(os.path.abspath(__file__))
qfs_so = os.path.join(
file_dir,
"libceed_qfunctions" + get_config_var("EXT_SUFFIX"))
# Load library
return ctypes.cdll.LoadLibrary(qfs_so)
# -------------------------------------------------------------------------------
# Test creation, evaluation, and destruction for qfunction
# -------------------------------------------------------------------------------
def test_400(ceed_resource):
ceed = libceed.Ceed(ceed_resource)
file_dir = os.path.dirname(os.path.abspath(__file__))
qfs = load_qfs_so()
qf_setup = ceed.QFunction(1, qfs.setup_mass,
os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
qf_setup.add_input("w", 1, libceed.EVAL_WEIGHT)
qf_setup.add_input("dx", 1, libceed.EVAL_GRAD)
qf_setup.add_output("qdata", 1, libceed.EVAL_NONE)
qf_mass = ceed.QFunction(1, qfs.apply_mass,
os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
qf_mass.add_input("qdata", 1, libceed.EVAL_NONE)
qf_mass.add_input("u", 1, libceed.EVAL_INTERP)
qf_mass.add_output("v", 1, libceed.EVAL_INTERP)
q = 8
w_array = np.zeros(q, dtype="float64")
u_array = np.zeros(q, dtype="float64")
v_true = np.zeros(q, dtype="float64")
for i in range(q):
x = 2. * i / (q - 1) - 1
w_array[i] = 1 - x * x
u_array[i] = 2 + 3 * x + 5 * x * x
v_true[i] = w_array[i] * u_array[i]
dx = ceed.Vector(q)
dx.set_value(1)
w = ceed.Vector(q)
w.set_array(w_array, cmode=libceed.USE_POINTER)
u = ceed.Vector(q)
u.set_array(u_array, cmode=libceed.USE_POINTER)
v = ceed.Vector(q)
v.set_value(0)
qdata = ceed.Vector(q)
qdata.set_value(0)
inputs = [dx, w]
outputs = [qdata]
qf_setup.apply(q, inputs, outputs)
inputs = [qdata, u]
outputs = [v]
qf_mass.apply(q, inputs, outputs)
with v.array_read() as v_array:
for i in range(q):
assert v_array[i] == v_true[i]
# -------------------------------------------------------------------------------
# Test creation, evaluation, and destruction for qfunction
# -------------------------------------------------------------------------------
def test_401(ceed_resource):
ceed = libceed.Ceed(ceed_resource)
file_dir = os.path.dirname(os.path.abspath(__file__))
qfs = load_qfs_so()
qf_setup = ceed.QFunction(1, qfs.setup_mass,
os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
qf_setup.add_input("w", 1, libceed.EVAL_WEIGHT)
qf_setup.add_input("dx", 1, libceed.EVAL_GRAD)
qf_setup.add_output("qdata", 1, libceed.EVAL_NONE)
qf_mass = ceed.QFunction(1, qfs.apply_mass,
os.path.join(file_dir, "t400-qfunction.h:apply_mass"))
qf_mass.add_input("qdata", 1, libceed.EVAL_NONE)
qf_mass.add_input("u", 1, libceed.EVAL_INTERP)
qf_mass.add_output("v", 1, libceed.EVAL_INTERP)
ctx_data = np.array([1., 2., 3., 4., 5.])
ctx = ceed.QFunctionContext()
ctx.set_data(ctx_data)
qf_mass.set_context(ctx)
q = 8
w_array = np.zeros(q, dtype="float64")
u_array = np.zeros(q, dtype="float64")
v_true = np.zeros(q, dtype="float64")
for i in range(q):
x = 2. * i / (q - 1) - 1
w_array[i] = 1 - x * x
u_array[i] = 2 + 3 * x + 5 * x * x
v_true[i] = 5 * w_array[i] * u_array[i]
dx = ceed.Vector(q)
dx.set_value(1)
w = ceed.Vector(q)
w.set_array(w_array, cmode=libceed.USE_POINTER)
u = ceed.Vector(q)
u.set_array(u_array, cmode=libceed.USE_POINTER)
v = ceed.Vector(q)
v.set_value(0)
qdata = ceed.Vector(q)
qdata.set_value(0)
inputs = [dx, w]
outputs = [qdata]
qf_setup.apply(q, inputs, outputs)
inputs = [qdata, u]
outputs = [v]
qf_mass.apply(q, inputs, outputs)
with v.array_read() as v_array:
for i in range(q):
assert v_array[i] == v_true[i]
# -------------------------------------------------------------------------------
# Test viewing of qfunction
# -------------------------------------------------------------------------------
def test_402(ceed_resource, capsys):
ceed = libceed.Ceed(ceed_resource)
file_dir = os.path.dirname(os.path.abspath(__file__))
qfs = load_qfs_so()
qf_setup = ceed.QFunction(1, qfs.setup_mass,
os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
qf_setup.add_input("w", 1, libceed.EVAL_WEIGHT)
qf_setup.add_input("dx", 1, libceed.EVAL_GRAD)
qf_setup.add_output("qdata", 1, libceed.EVAL_NONE)
qf_mass = ceed.QFunction(1, qfs.apply_mass,
os.path.join(file_dir, "t400-qfunction.h:apply_mass"))
qf_mass.add_input("qdata", 1, libceed.EVAL_NONE)
qf_mass.add_input("u", 1, libceed.EVAL_INTERP)
qf_mass.add_output("v", 1, libceed.EVAL_INTERP)
print(qf_setup)
print(qf_mass)
ctx_data = np.array([1., 2., 3., 4., 5.])
ctx = ceed.QFunctionContext()
ctx.set_data(ctx_data)
print(ctx)
stdout, stderr, ref_stdout = check.output(capsys)
assert not stderr
assert stdout == ref_stdout
# -------------------------------------------------------------------------------
# Test creation, evaluation, and destruction for qfunction by name
# -------------------------------------------------------------------------------
def test_410(ceed_resource):
ceed = libceed.Ceed(ceed_resource)
qf_setup = ceed.QFunctionByName("Mass1DBuild")
qf_mass = ceed.QFunctionByName("MassApply")
q = 8
j_array = np.zeros(q, dtype="float64")
w_array = np.zeros(q, dtype="float64")
u_array = np.zeros(q, dtype="float64")
v_true = np.zeros(q, dtype="float64")
for i in range(q):
x = 2. * i / (q - 1) - 1
j_array[i] = 1
w_array[i] = 1 - x * x
u_array[i] = 2 + 3 * x + 5 * x * x
v_true[i] = w_array[i] * u_array[i]
j = ceed.Vector(q)
j.set_array(j_array, cmode=libceed.USE_POINTER)
w = ceed.Vector(q)
w.set_array(w_array, cmode=libceed.USE_POINTER)
u = ceed.Vector(q)
u.set_array(u_array, cmode=libceed.USE_POINTER)
v = ceed.Vector(q)
v.set_value(0)
qdata = ceed.Vector(q)
qdata.set_value(0)
inputs = [j, w]
outputs = [qdata]
qf_setup.apply(q, inputs, outputs)
inputs = [w, u]
outputs = [v]
qf_mass.apply(q, inputs, outputs)
with v.array_read() as v_array:
for i in range(q):
assert v_array[i] == v_true[i]
# -------------------------------------------------------------------------------
# Test creation, evaluation, and destruction of identity qfunction
# -------------------------------------------------------------------------------
def test_411(ceed_resource):
ceed = libceed.Ceed(ceed_resource)
qf = ceed.IdentityQFunction(1, libceed.EVAL_INTERP, libceed.EVAL_INTERP)
q = 8
u_array = np.zeros(q, dtype="float64")
for i in range(q):
u_array[i] = i * i
u = ceed.Vector(q)
u.set_array(u_array, cmode=libceed.USE_POINTER)
v = ceed.Vector(q)
v.set_value(0)
inputs = [u]
outputs = [v]
qf.apply(q, inputs, outputs)
with v.array_read() as v_array:
for i in range(q):
assert v_array[i] == i * i
# -------------------------------------------------------------------------------
# Test creation, evaluation, and destruction of identity qfunction with size>1
# -------------------------------------------------------------------------------
def test_412(ceed_resource):
ceed = libceed.Ceed(ceed_resource)
size = 3
qf = ceed.IdentityQFunction(size, libceed.EVAL_INTERP, libceed.EVAL_INTERP)
q = 8
u_array = np.zeros(q * size, dtype="float64")
for i in range(q * size):
u_array[i] = i * i
u = ceed.Vector(q * size)
u.set_array(u_array, cmode=libceed.USE_POINTER)
v = ceed.Vector(q * size)
v.set_value(0)
inputs = [u]
outputs = [v]
qf.apply(q, inputs, outputs)
with v.array_read() as v_array:
for i in range(q * size):
assert v_array[i] == i * i
# -------------------------------------------------------------------------------
# Test viewing of qfunction by name
# -------------------------------------------------------------------------------
def test_413(ceed_resource, capsys):
ceed = libceed.Ceed(ceed_resource)
qf_setup = ceed.QFunctionByName("Mass1DBuild")
qf_mass = ceed.QFunctionByName("MassApply")
print(qf_setup)
print(qf_mass)
stdout, stderr, ref_stdout = check.output(capsys)
assert not stderr
assert stdout == ref_stdout
# -------------------------------------------------------------------------------
| 31.65109 | 85 | 0.55689 | 1,352 | 10,160 | 3.99926 | 0.147929 | 0.044757 | 0.042168 | 0.026447 | 0.781025 | 0.76142 | 0.74681 | 0.722582 | 0.706122 | 0.670427 | 0 | 0.017516 | 0.202067 | 10,160 | 320 | 86 | 31.75 | 0.649439 | 0.268701 | 0 | 0.830846 | 0 | 0 | 0.049147 | 0.022475 | 0 | 0 | 0 | 0 | 0.044776 | 1 | 0.039801 | false | 0 | 0.029851 | 0 | 0.074627 | 0.024876 | 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 |
4f6183c328fe971913ecc88594bf95c7bc6d27cd | 29 | py | Python | tools/ucdcompiler/__init__.py | al45tair/libucd | 6cbc5c4646b01b536e8914c6d9c7884a2bf1aba0 | [
"MIT"
] | null | null | null | tools/ucdcompiler/__init__.py | al45tair/libucd | 6cbc5c4646b01b536e8914c6d9c7884a2bf1aba0 | [
"MIT"
] | null | null | null | tools/ucdcompiler/__init__.py | al45tair/libucd | 6cbc5c4646b01b536e8914c6d9c7884a2bf1aba0 | [
"MIT"
] | null | null | null | from .main import build_data
| 14.5 | 28 | 0.827586 | 5 | 29 | 4.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137931 | 29 | 1 | 29 | 29 | 0.92 | 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 |
4f868985c30231fbd283523dd7890465a343568c | 27,469 | py | Python | app/models/utils.py | jobsta/albumapp-flask | 2bac8c4ff3557782f72a984b229dfa2d499b6beb | [
"MIT"
] | 5 | 2020-08-31T14:08:14.000Z | 2022-03-05T02:37:35.000Z | app/models/utils.py | jobsta/albumapp-flask | 2bac8c4ff3557782f72a984b229dfa2d499b6beb | [
"MIT"
] | null | null | null | app/models/utils.py | jobsta/albumapp-flask | 2bac8c4ff3557782f72a984b229dfa2d499b6beb | [
"MIT"
] | 1 | 2021-05-28T10:41:05.000Z | 2021-05-28T10:41:05.000Z | import datetime
import decimal
def create_album_report_template():
# use a predefined report definition so you don't have to start from scratch in this demo app,
# for a real word app you would probably start with an empty report if nothing was saved previously
from app.models import db
report_definition = {"docElements": [
{"elementType": "text", "id": 3, "containerId": "0_header", "x": 0, "y": 20, "width": 575, "height": 40,
"content": "My Albums", "eval": False, "styleId": "", "bold": True, "italic": False, "underline": False,
"horizontalAlignment": "center", "verticalAlignment": "middle", "textColor": "#741b47", "backgroundColor": "",
"font": "helvetica", "fontSize": "24", "lineSpacing": 1, "borderColor": "#000000", "borderWidth": 1,
"borderAll": False, "borderLeft": False, "borderTop": False, "borderRight": False, "borderBottom": False,
"paddingLeft": 2, "paddingTop": 2, "paddingRight": 2, "paddingBottom": 2, "printIf": "",
"removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "", "cs_condition": "",
"cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_borderColor": "#000000", "cs_borderWidth": "1", "cs_borderAll": False, "cs_borderLeft": False,
"cs_borderTop": False, "cs_borderRight": False, "cs_borderBottom": False, "cs_paddingLeft": 2,
"cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "spreadsheet_hide": False,
"spreadsheet_column": "", "spreadsheet_colspan": "", "spreadsheet_addEmptyRow": False},
{"elementType": "text", "id": 5, "containerId": "0_content", "x": 0, "y": 10, "width": 575, "height": 20,
"content": "List of all available albums:", "eval": False, "styleId": "", "bold": True, "italic": False,
"underline": False, "horizontalAlignment": "left", "verticalAlignment": "middle", "textColor": "#000000",
"backgroundColor": "", "font": "helvetica", "fontSize": 12, "lineSpacing": 1, "borderColor": "#000000",
"borderWidth": 1, "borderAll": False, "borderLeft": False, "borderTop": False, "borderRight": False,
"borderBottom": False, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2, "paddingBottom": 2,
"printIf": "${year} == None", "removeEmptyElement": True, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_borderColor": "#000000", "cs_borderWidth": "1", "cs_borderAll": False, "cs_borderLeft": False,
"cs_borderTop": False, "cs_borderRight": False, "cs_borderBottom": False, "cs_paddingLeft": 2,
"cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "spreadsheet_hide": False,
"spreadsheet_column": "", "spreadsheet_colspan": "", "spreadsheet_addEmptyRow": False},
{"elementType": "text", "id": 11, "containerId": "0_content", "x": 0, "y": 30, "width": 575, "height": 20,
"content": "List of all available albums for the year ${year}:", "eval": False, "styleId": "", "bold": True,
"italic": False, "underline": False, "horizontalAlignment": "left", "verticalAlignment": "middle",
"textColor": "#000000", "backgroundColor": "", "font": "helvetica", "fontSize": 12, "lineSpacing": 1,
"borderColor": "#000000", "borderWidth": 1, "borderAll": False, "borderLeft": False, "borderTop": False,
"borderRight": False, "borderBottom": False, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "printIf": "${year} != None", "removeEmptyElement": True, "alwaysPrintOnSamePage": True,
"pattern": "", "cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False,
"cs_underline": False, "cs_horizontalAlignment": "left", "cs_verticalAlignment": "top",
"cs_textColor": "#000000", "cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12,
"cs_lineSpacing": 1, "cs_borderColor": "#000000", "cs_borderWidth": "1", "cs_borderAll": False,
"cs_borderLeft": False, "cs_borderTop": False, "cs_borderRight": False, "cs_borderBottom": False,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2,
"spreadsheet_hide": False, "spreadsheet_column": "", "spreadsheet_colspan": "",
"spreadsheet_addEmptyRow": False},
{"elementType": "table", "id": 17, "containerId": "0_content", "x": 0, "y": 50, "dataSource": "${albums}",
"columns": 4, "header": True, "contentRows": "1", "footer": False, "border": "grid", "borderColor": "#000000",
"borderWidth": "1", "spreadsheet_hide": False, "spreadsheet_column": "", "spreadsheet_addEmptyRow": False,
"headerData": {"elementType": "none", "id": 18, "height": 20, "backgroundColor": "#f3f3f3",
"repeatHeader": True, "columnData": [
{"elementType": "table_text", "id": 19, "width": 220, "height": 20, "content": "Name", "eval": False,
"styleId": "33", "bold": True, "italic": False, "underline": False, "horizontalAlignment": "center",
"verticalAlignment": "middle", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "printIf": "",
"borderWidth": 1},
{"elementType": "table_text", "id": 20, "width": 215, "height": 20, "content": "Artist", "eval": False,
"styleId": "33", "bold": True, "italic": False, "underline": False, "horizontalAlignment": "center",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "printIf": "",
"borderWidth": 1},
{"elementType": "table_text", "id": 27, "width": 80, "height": 20, "content": "Year", "eval": False,
"styleId": "33", "bold": True, "italic": False, "underline": False, "horizontalAlignment": "center",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "printIf": "",
"borderWidth": 1},
{"elementType": "table_text", "id": 28, "width": 60, "height": 20, "content": "Best Of", "eval": False,
"styleId": "33", "bold": True, "italic": False, "underline": False, "horizontalAlignment": "center",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "printIf": "",
"borderWidth": 1}]}, "contentDataRows": [
{"elementType": "none", "id": 21, "height": 20, "backgroundColor": "", "alternateBackgroundColor": "",
"groupExpression": "", "printIf": "", "alwaysPrintOnSamePage": True, "columnData": [
{"elementType": "table_text", "id": 22, "width": 220, "height": 20, "content": "${name}", "eval": False,
"styleId": "34", "bold": False, "italic": False, "underline": False, "horizontalAlignment": "left",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2,
"borderWidth": 1},
{"elementType": "table_text", "id": 23, "width": 215, "height": 20, "content": "${artist}",
"eval": False, "styleId": "34", "bold": False, "italic": False, "underline": False,
"horizontalAlignment": "left", "verticalAlignment": "top", "textColor": "#000000",
"backgroundColor": "", "font": "helvetica", "fontSize": 12, "lineSpacing": 1, "paddingLeft": 2,
"paddingTop": 2, "paddingRight": 2, "paddingBottom": 2, "removeEmptyElement": False,
"alwaysPrintOnSamePage": True, "pattern": "", "cs_condition": "", "cs_styleId": "", "cs_bold": False,
"cs_italic": False, "cs_underline": False, "cs_horizontalAlignment": "left",
"cs_verticalAlignment": "top", "cs_textColor": "#000000", "cs_backgroundColor": "",
"cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1, "cs_paddingLeft": 2,
"cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "borderWidth": 1},
{"elementType": "table_text", "id": 29, "width": 80, "height": 20, "content": "${year}", "eval": False,
"styleId": "34", "bold": False, "italic": False, "underline": False, "horizontalAlignment": "left",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2,
"borderWidth": 1}, {"elementType": "table_text", "id": 30, "width": 60, "height": 20,
"content": "'Yes' if ${best_of_compilation} else ''", "eval": True,
"styleId": "34", "bold": False, "italic": False, "underline": False,
"horizontalAlignment": "left", "verticalAlignment": "top", "textColor": "#000000",
"backgroundColor": "", "font": "helvetica", "fontSize": 12, "lineSpacing": 1,
"paddingLeft": 2, "paddingTop": 2, "paddingRight": 2, "paddingBottom": 2,
"removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "${best_of_compilation} ", "cs_styleId": "35", "cs_bold": False,
"cs_italic": False, "cs_underline": False, "cs_horizontalAlignment": "left",
"cs_verticalAlignment": "top", "cs_textColor": "#000000", "cs_backgroundColor": "",
"cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2,
"cs_paddingBottom": 2, "borderWidth": 1}]}],
"footerData": {"elementType": "none", "id": 24, "height": 20, "backgroundColor": "", "columnData": [
{"elementType": "table_text", "id": 25, "width": 220, "height": 20, "content": "", "eval": False,
"styleId": "", "bold": False, "italic": False, "underline": False, "horizontalAlignment": "left",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "borderWidth": 1},
{"elementType": "table_text", "id": 26, "width": 215, "height": 20, "content": "", "eval": False,
"styleId": "", "bold": False, "italic": False, "underline": False, "horizontalAlignment": "left",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "borderWidth": 1},
{"elementType": "table_text", "id": 31, "width": 80, "height": 20, "content": "", "eval": False,
"styleId": "", "bold": False, "italic": False, "underline": False, "horizontalAlignment": "left",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "borderWidth": 1},
{"elementType": "table_text", "id": 32, "width": 60, "height": 20, "content": "", "eval": False,
"styleId": "", "bold": False, "italic": False, "underline": False, "horizontalAlignment": "left",
"verticalAlignment": "top", "textColor": "#000000", "backgroundColor": "", "font": "helvetica",
"fontSize": 12, "lineSpacing": 1, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2,
"paddingBottom": 2, "removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "",
"cs_condition": "", "cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_paddingLeft": 2, "cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2,
"borderWidth": 1}]}},
{"elementType": "text", "id": 7, "containerId": "0_footer", "x": 320, "y": 0, "width": 255, "height": 30,
"content": "Page ${page_number} / ${page_count}", "eval": False, "styleId": "", "bold": False, "italic": False,
"underline": False, "horizontalAlignment": "right", "verticalAlignment": "middle", "textColor": "#666666",
"backgroundColor": "", "font": "helvetica", "fontSize": 12, "lineSpacing": 1, "borderColor": "#000000",
"borderWidth": 1, "borderAll": False, "borderLeft": False, "borderTop": False, "borderRight": False,
"borderBottom": False, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2, "paddingBottom": 2, "printIf": "",
"removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "", "cs_condition": "",
"cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_borderColor": "#000000", "cs_borderWidth": "1", "cs_borderAll": False, "cs_borderLeft": False,
"cs_borderTop": False, "cs_borderRight": False, "cs_borderBottom": False, "cs_paddingLeft": 2,
"cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "spreadsheet_hide": False,
"spreadsheet_column": "", "spreadsheet_colspan": "", "spreadsheet_addEmptyRow": False},
{"elementType": "text", "id": 8, "containerId": "0_footer", "x": 0, "y": 0, "width": 290, "height": 30,
"content": "Created on ${current_date}", "eval": False, "styleId": "", "bold": False, "italic": False,
"underline": False, "horizontalAlignment": "left", "verticalAlignment": "middle", "textColor": "#666666",
"backgroundColor": "", "font": "helvetica", "fontSize": 12, "lineSpacing": 1, "borderColor": "#000000",
"borderWidth": 1, "borderAll": False, "borderLeft": False, "borderTop": False, "borderRight": False,
"borderBottom": False, "paddingLeft": 2, "paddingTop": 2, "paddingRight": 2, "paddingBottom": 2, "printIf": "",
"removeEmptyElement": False, "alwaysPrintOnSamePage": True, "pattern": "", "cs_condition": "",
"cs_styleId": "", "cs_bold": False, "cs_italic": False, "cs_underline": False,
"cs_horizontalAlignment": "left", "cs_verticalAlignment": "top", "cs_textColor": "#000000",
"cs_backgroundColor": "", "cs_font": "helvetica", "cs_fontSize": 12, "cs_lineSpacing": 1,
"cs_borderColor": "#000000", "cs_borderWidth": "1", "cs_borderAll": False, "cs_borderLeft": False,
"cs_borderTop": False, "cs_borderRight": False, "cs_borderBottom": False, "cs_paddingLeft": 2,
"cs_paddingTop": 2, "cs_paddingRight": 2, "cs_paddingBottom": 2, "spreadsheet_hide": False,
"spreadsheet_column": "", "spreadsheet_colspan": "", "spreadsheet_addEmptyRow": False}], "parameters": [
{"id": 1, "name": "page_count", "type": "number", "arrayItemType": "string", "eval": False, "nullable": False,
"pattern": "", "expression": "", "showOnlyNameType": True, "testData": ""},
{"id": 2, "name": "page_number", "type": "number", "arrayItemType": "string", "eval": False, "nullable": False,
"pattern": "", "expression": "", "showOnlyNameType": True, "testData": ""},
{"id": 9, "name": "current_date", "type": "date", "arrayItemType": "string", "eval": False, "nullable": False,
"pattern": "d. MMMM yyyy, H:mm", "expression": "", "showOnlyNameType": False, "testData": ""},
{"id": 10, "name": "year", "type": "number", "arrayItemType": "string", "eval": False, "nullable": True,
"pattern": "0", "expression": "", "showOnlyNameType": False, "testData": ""},
{"id": 12, "name": "albums", "type": "array", "arrayItemType": "string", "eval": False, "nullable": False,
"pattern": "", "expression": "", "showOnlyNameType": False,
"testData": "[{\"name\":\"¿Dónde Jugarán las Niñas?\",\"artist\":\"Molotov\",\"year\":\"1997\",\"best_of_compilation\":\"\"},{\"name\":\"Big Ones\",\"artist\":\"Aerosmith\",\"year\":\"1995\",\"best_of_compilation\":\"1\"},{\"name\":\"The Greatest Hits\",\"artist\":\"INXS\",\"year\":\"1996\",\"best_of_compilation\":\"true\"},{\"name\":\"Coming Home\",\"artist\":\"Pain\",\"year\":\"2016\",\"best_of_compilation\":\"\"}]",
"children": [
{"id": 13, "name": "name", "type": "string", "arrayItemType": "string", "eval": False, "nullable": False,
"pattern": "", "expression": "", "showOnlyNameType": False, "testData": ""},
{"id": 14, "name": "artist", "type": "string", "arrayItemType": "string", "eval": False, "nullable": False,
"pattern": "", "expression": "", "showOnlyNameType": False, "testData": ""},
{"id": 15, "name": "year", "type": "number", "arrayItemType": "string", "eval": False, "nullable": True,
"pattern": "", "expression": "", "showOnlyNameType": False, "testData": ""},
{"id": 16, "name": "best_of_compilation", "type": "boolean", "arrayItemType": "string", "eval": False,
"nullable": False, "pattern": "", "expression": "", "showOnlyNameType": False, "testData": ""}]}],
"styles": [
{"id": 33, "name": "Table Header", "bold": True, "italic": False, "underline": False,
"horizontalAlignment": "center", "verticalAlignment": "middle", "textColor": "#000000",
"backgroundColor": "", "font": "helvetica", "fontSize": "10", "lineSpacing": 1,
"borderColor": "#000000", "borderWidth": "1", "borderAll": False, "borderLeft": False,
"borderTop": False, "borderRight": False, "borderBottom": False, "paddingLeft": "2",
"paddingTop": "2", "paddingRight": "2", "paddingBottom": "2"},
{"id": 34, "name": "Table Content", "bold": False, "italic": False, "underline": False,
"horizontalAlignment": "left", "verticalAlignment": "middle", "textColor": "#000000",
"backgroundColor": "", "font": "helvetica", "fontSize": "9", "lineSpacing": 1,
"borderColor": "#000000", "borderWidth": "1", "borderAll": False, "borderLeft": False,
"borderTop": False, "borderRight": False, "borderBottom": False, "paddingLeft": "2",
"paddingTop": "2", "paddingRight": "2", "paddingBottom": "2"},
{"id": 35, "name": "Table Content Highlight", "bold": True, "italic": False,
"underline": False, "horizontalAlignment": "center", "verticalAlignment": "middle",
"textColor": "#3d85c6", "backgroundColor": "", "font": "helvetica", "fontSize": "9",
"lineSpacing": 1, "borderColor": "#000000", "borderWidth": "1", "borderAll": False,
"borderLeft": False, "borderTop": False, "borderRight": False, "borderBottom": False,
"paddingLeft": "2", "paddingTop": "2", "paddingRight": "2", "paddingBottom": "2"}],
"version": 2,
"documentProperties": {"pageFormat": "A4", "pageWidth": "", "pageHeight": "", "unit": "mm",
"orientation": "portrait", "contentHeight": "", "marginLeft": "10",
"marginTop": "10", "marginRight": "10", "marginBottom": "10",
"header": True, "headerSize": "80", "headerDisplay": "always",
"footer": True, "footerSize": "30", "footerDisplay": "always",
"patternLocale": "en", "patternCurrencySymbol": "$"}}
db_engine = db.get_db()
db_engine.execute(
db.report_definition.insert(),
report_type='albums_report', report_definition=report_definition, last_modified_at=datetime.datetime.now())
def get_menu_items(controller):
"""Returns application menu items with special class for active menu item."""
from flask import url_for
from flask_babel import _
return (
{'url': url_for('album.index'), 'label': _('menu.albums'),
'id': 'menu_album', 'class': 'activeMenuItem' if controller == 'album' else ''},
{'url': url_for('report.edit'), 'label': _('menu.report'),
'id': 'menu_report', 'class': 'activeMenuItem' if controller == 'report' else ''})
def json_default(obj):
"""Serializes decimal and date values, can be used for json encoder."""
if isinstance(obj, decimal.Decimal):
return float(obj)
if isinstance(obj, datetime.date):
return str(obj)
raise TypeError
| 97.407801 | 431 | 0.570024 | 2,502 | 27,469 | 6.101119 | 0.111111 | 0.034851 | 0.026204 | 0.032755 | 0.846708 | 0.834392 | 0.819522 | 0.816377 | 0.816377 | 0.805634 | 0 | 0.038272 | 0.230478 | 27,469 | 281 | 432 | 97.754448 | 0.68384 | 0.011977 | 0 | 0.520599 | 0 | 0 | 0.485181 | 0.036088 | 0 | 0 | 0 | 0 | 0 | 1 | 0.011236 | false | 0 | 0.018727 | 0 | 0.041199 | 0.037453 | 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 |
4f9956300cc3c9876a6c6a57e6d17fd64ebc4475 | 20,488 | py | Python | src/test/python/_tests_definitions.py | stefano-bragaglia/DePYsible | 6b53ede459a10f5e24da89d3ebaa05f08ec7af12 | [
"BSD-2-Clause"
] | 4 | 2018-09-24T23:51:05.000Z | 2021-01-06T09:13:52.000Z | src/test/python/_tests_definitions.py | stefano-bragaglia/DefeasiblePython | 6b53ede459a10f5e24da89d3ebaa05f08ec7af12 | [
"BSD-2-Clause"
] | 1 | 2020-05-26T01:14:44.000Z | 2020-05-27T07:54:15.000Z | src/test/python/_tests_definitions.py | stefano-bragaglia/DePYsible | 6b53ede459a10f5e24da89d3ebaa05f08ec7af12 | [
"BSD-2-Clause"
] | null | null | null | from unittest import TestCase
from arpeggio import NoMatch
from assertpy import assert_that
from assertpy import fail
from depysible.domain.definitions import Atom
from depysible.domain.definitions import Literal
from depysible.domain.definitions import Rule
from depysible.domain.definitions import RuleType
class TestAtom(TestCase):
def test__atom___eq___0(self):
assert_that(Atom('a', ['b', 5, True]) == None) \
.is_false()
def test__atom___eq___1(self):
assert_that(Atom('a', ['b', 5, True]) == 'a(b, 5, True)') \
.is_false()
def test__atom___eq___2(self):
assert_that(Atom('a', ['b', 5, True]) == Atom('a', [])) \
.is_false()
def test__atom___eq___3(self):
assert_that(Atom('a', ['b', 5, True]) == Atom('a', [True, 5, 'b'])) \
.is_false()
def test__atom___eq___4(self):
assert_that(Atom('a', ['b', 5, True]) == Atom('c', ['b', 5, True])) \
.is_false()
def test__atom___eq___5(self):
assert_that(Atom('a', ['b', 5, True]) == Atom('a', ['b', 'b', 5, True])) \
.is_false()
def test__atom___eq___6(self):
assert_that(Atom('a', ['b', 5, True]) == Atom('a', ['b', 5, True])) \
.is_true()
def test__atom___hash___00(self):
assert_that(hash(Atom('a', ['b', 5, True]))) \
.is_not_none()
def test__atom___init___00(self):
assert_that(Atom.__init__) \
.raises(ValueError) \
.when_called_with(Atom, None, ['b', 5, True]) \
.is_equal_to("'functor' is none or empty")
def test__atom___init___01(self):
assert_that(Atom.__init__) \
.raises(ValueError) \
.when_called_with(Atom, ' ', ['b', 5, True]) \
.is_equal_to("'functor' is none or empty")
def test__atom___init___02(self):
assert_that(Atom.__init__) \
.raises(ValueError) \
.when_called_with(Atom, 'a', None) \
.is_equal_to("'terms' is none")
def test__atom___init___03(self):
atom = Atom('a', [])
assert_that(atom.functor) \
.is_equal_to('a')
assert_that(atom.terms) \
.is_empty()
def test__atom___init___04(self):
atom = Atom('a', ['b', 5, True])
assert_that(atom.functor) \
.is_equal_to('a')
assert_that(atom.terms).contains_sequence('b', 5, True)
def test__atom___lt___00(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = None
try:
result = item_1 < item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Atom() < NoneType()")
def test__atom___lt___01(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = 'a(b, 5, True)'
try:
result = item_1 < item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Atom() < str()")
def test__atom___lt___02(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', [])
assert_that(item_1 < item_2) \
.is_false()
def test__atom___lt___03(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', [True, 5, 'b'])
assert_that(item_1 < item_2) \
.is_false()
def test__atom___lt___04(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('c', ['b', 5, True])
assert_that(item_1 < item_2) \
.is_true()
def test__atom___lt___05(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', ['b', 'b', 5, True])
assert_that(item_1 < item_2) \
.is_true()
def test__atom___lt___06(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', ['b', 5, True])
assert_that(item_1 < item_2) \
.is_false()
def test__atom___lt___07(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = None
try:
result = item_1 > item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Atom() > NoneType()")
def test__atom___lt___08(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = 'a(b, 5, True)'
try:
result = item_1 > item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Atom() > str()")
def test__atom___lt___09(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', [])
assert_that(item_1 > item_2) \
.is_true()
def test__atom___lt___10(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', [True, 5, 'b'])
assert_that(item_1 > item_2) \
.is_true()
def test__atom___lt___11(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('c', ['b', 5, True])
assert_that(item_1 > item_2) \
.is_false()
def test__atom___lt___12(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', ['b', 'b', 5, True])
assert_that(item_1 > item_2) \
.is_false()
def test__atom___lt___13(self):
item_1 = Atom('a', ['b', 5, True])
item_2 = Atom('a', ['b', 5, True])
assert_that(item_1 > item_2) \
.is_false()
def test__atom___repr___0(self):
atom = Atom('a', [])
assert_that(repr(atom)) \
.is_equal_to('a')
def test__atom___repr___1(self):
atom = Atom('a', ['b', 5, True])
assert_that(repr(atom)) \
.is_equal_to('a(b, 5, True)')
class TestLiteral(TestCase):
def test__literal_parse__0(self):
expected = Literal(False, Atom('a', []))
assert_that(Literal.parse('a')) \
.is_equal_to(expected)
def test__literal_parse__1(self):
expected = Literal(True, Atom('a', []))
assert_that(Literal.parse('~a')) \
.is_equal_to(expected)
def test__literal_parse__2(self):
expected = Literal(False, Atom('a', ['b', 5, True]))
assert_that(Literal.parse('a(b, 5, True)')) \
.is_equal_to(expected)
def test__literal_parse__3(self):
expected = Literal(True, Atom('a', ['b', 5, True]))
assert_that(Literal.parse('~a(b, 5, True)')) \
.is_equal_to(expected)
def test__literal___eq___0(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == None) \
.is_false()
def test__literal___eq___1(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == 'a(b, 5, True)') \
.is_false()
def test__literal___eq___2(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(True, Atom('a', ['b', 5, True]))) \
.is_false()
def test__literal___eq___3(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(False, Atom('a', []))) \
.is_false()
def test__literal___eq___4(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(False, Atom('c', ['b', 5, True]))) \
.is_false()
def test__literal___eq___5(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(False, Atom('a', [5, True]))) \
.is_false()
def test__literal___eq___6(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(False, Atom('a', [True, 5, 'b']))) \
.is_false()
def test__literal___eq___7(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(False, Atom('a', ['b', 'b', 5, True]))) \
.is_false()
def test__literal___eq___8(self):
assert_that(Literal(False, Atom('a', ['b', 5, True])) == Literal(False, Atom('a', ['b', 5, True]))) \
.is_true()
def test__literal___hash___00(self):
assert_that(hash(Literal(False, Atom('a', ['b', 5, True])))) \
.is_not_none()
def test__literal___init___0(self):
assert_that(Literal.__init__) \
.raises(ValueError) \
.when_called_with(Literal, None, Atom('a', ['b', 5, True])) \
.is_equal_to("'negated' is none")
def test__literal___init___1(self):
assert_that(Literal.__init__) \
.raises(ValueError) \
.when_called_with(Literal, False, None) \
.is_equal_to("'atom' is none")
def test__literal___init___2(self):
literal = Literal(False, Atom('a', ['b', 5, True]))
assert_that(literal.negated) \
.is_false()
assert_that(literal.atom) \
.is_equal_to(Atom('a', ['b', 5, True]))
def test__literal___lt___00(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = None
try:
result = item_1 < item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Literal() < NoneType()")
def test__literal___lt___01(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Atom('a', ['b', 5, True])
try:
result = item_1 < item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Literal() < Atom()")
def test__literal___lt___02(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = 'a(b, 5, True)'
try:
result = item_1 < item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Literal() < str()")
def test__literal___lt___03(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(True, Atom('a', ['b', 5, True]))
assert_that(item_1 < item_2) \
.is_true()
def test__literal___lt___04(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('c', ['b', 5, True]))
assert_that(item_1 < item_2) \
.is_true()
def test__literal___lt___05(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', [5, True]))
assert_that(item_1 < item_2) \
.is_false()
def test__literal___lt___06(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', ['b', 5, True]))
assert_that(item_1 < item_2) \
.is_false()
def test__literal___lt___07(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', ['b', 'b', 5, True]))
assert_that(item_1 < item_2) \
.is_true()
def test__literal___lt___08(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', [True, 5, 'b']))
assert_that(item_1 < item_2) \
.is_false()
def test__literal___lt___09(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = None
try:
result = item_1 > item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Literal() > NoneType()")
def test__literal___lt___10(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Atom('a', ['b', 5, True])
try:
result = item_1 > item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Literal() > Atom()")
def test__literal___lt___11(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = 'a(b, 5, True)'
try:
result = item_1 > item_2
fail('should have raised error')
except TypeError as e:
assert_that(str(e)) \
.is_equal_to("unorderable types: Literal() > str()")
def test__literal___lt___12(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(True, Atom('a', ['b', 5, True]))
assert_that(item_1 > item_2) \
.is_false()
def test__literal___lt___13(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('c', ['b', 5, True]))
assert_that(item_1 > item_2) \
.is_false()
def test__literal___lt___14(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', [5, True]))
assert_that(item_1 > item_2) \
.is_true()
def test__literal___lt___15(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', ['b', 5, True]))
assert_that(item_1 > item_2) \
.is_false()
def test__literal___lt___16(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', ['b', 'b', 5, True]))
assert_that(item_1 > item_2) \
.is_false()
def test__literal___lt___17(self):
item_1 = Literal(False, Atom('a', ['b', 5, True]))
item_2 = Literal(False, Atom('a', [True, 5, 'b']))
assert_that(item_1 > item_2) \
.is_true()
def test__literal___repr___0(self):
literal = Literal(False, Atom('a', []))
assert_that(repr(literal)) \
.is_equal_to('a')
def test__literal___repr___1(self):
literal = Literal(True, Atom('a', []))
assert_that(repr(literal)) \
.is_equal_to('~a')
def test__literal___repr___2(self):
literal = Literal(False, Atom('a', ['b', 5, True]))
assert_that(repr(literal)) \
.is_equal_to('a(b, 5, True)')
def test__literal___repr___3(self):
literal = Literal(True, Atom('a', ['b', 5, True]))
assert_that(repr(literal)) \
.is_equal_to('~a(b, 5, True)')
class TestRule(TestCase):
"""
none
str
head.
head -< .
~head.
~head -< .
head -< body.
~head -< body.
head -< body, 'body'(b, 5, True).
~head -< body, 'body'(b, 5, True).
head -< body, 'body'(b, 5, True), body.
~head -< body, 'body'(b, 5, True), body.
"""
def test__rule__parse__failure(self):
for content, expected in {
'': "Expected comment or '~' or '\"' or ''' or identifier or '~' or '\"' or ''' or identifier "
"at position (1, 1) => '*'.",
'head': "Expected '(' or '-<' or '(' or '<-' or '.' at position (1, 5) => 'head*'.",
'head <-': "Expected '~' or '\"' or ''' or identifier or '.' at position (1, 8) => 'head <-*'.",
'head -<': "Expected '~' or '\"' or ''' or identifier or '.' at position (1, 8) => 'head -<*'.",
'head <- body': "Expected '(' or ',' or '.' at position (1, 13) => 'ad <- body*'.",
'head -< body': "Expected '(' or ',' or '.' at position (1, 13) => 'ad -< body*'.",
'head <- body,': "Expected '~' or '\"' or ''' or identifier at position (1, 14) => 'd <- body,*'.",
'head -< body,': "Expected '~' or '\"' or ''' or identifier at position (1, 14) => 'd -< body,*'.",
'head <- body, ~"body"(b, 5, True)': "Expected ',' or '.' at position (1, 34) => ', 5, True)*'.",
'head -< body, ~"body"(b, 5, True)': "Expected ',' or '.' at position (1, 34) => ', 5, True)*'.",
}.items():
with self.subTest(msg=content if content else '<empty>'):
assert_that(Rule.parse) \
.raises(NoMatch) \
.when_called_with(content) \
.is_equal_to(expected)
def test__rule_parse__success(self):
for content, expected in {
'head.': Rule(
Literal(False, Atom('head', [])),
RuleType.STRICT
),
'head <- .': Rule(
Literal(False, Atom('head', [])),
RuleType.STRICT
),
'head -< .': Rule(
Literal(False, Atom('head', [])),
RuleType.DEFEASIBLE
),
'head <- body.': Rule(
Literal(False, Atom('head', [])),
RuleType.STRICT,
Literal(False, Atom('body', [])),
),
'head -< body.': Rule(
Literal(False, Atom('head', [])),
RuleType.DEFEASIBLE,
Literal(False, Atom('body', [])),
),
'head <- body, ~"body"(b, 5, True).': Rule(
Literal(False, Atom('head', [])),
RuleType.STRICT,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'head -< body, ~"body"(b, 5, True).': Rule(
Literal(False, Atom('head', [])),
RuleType.DEFEASIBLE,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'head <- body, body, ~"body"(b, 5, True).': Rule(
Literal(False, Atom('head', [])),
RuleType.STRICT,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'head -< body, body, ~"body"(b, 5, True).': Rule(
Literal(False, Atom('head', [])),
RuleType.DEFEASIBLE,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'~head.': Rule(
Literal(True, Atom('head', [])),
RuleType.STRICT
),
'~head <- .': Rule(
Literal(True, Atom('head', [])),
RuleType.STRICT
),
'~head -< .': Rule(
Literal(True, Atom('head', [])),
RuleType.DEFEASIBLE
),
'~head <- body.': Rule(
Literal(True, Atom('head', [])),
RuleType.STRICT,
Literal(False, Atom('body', [])),
),
'~head -< body.': Rule(
Literal(True, Atom('head', [])),
RuleType.DEFEASIBLE,
Literal(False, Atom('body', [])),
),
'~head <- body, ~"body"(b, 5, True).': Rule(
Literal(True, Atom('head', [])),
RuleType.STRICT,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'~head -< body, ~"body"(b, 5, True).': Rule(
Literal(True, Atom('head', [])),
RuleType.DEFEASIBLE,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'~head <- body, body, ~"body"(b, 5, True).': Rule(
Literal(True, Atom('head', [])),
RuleType.STRICT,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
'~head -< body, body, ~"body"(b, 5, True).': Rule(
Literal(True, Atom('head', [])),
RuleType.DEFEASIBLE,
Literal(False, Atom('body', [])),
Literal(True, Atom('body', ['b', 5, True])),
),
}.items():
with self.subTest(msg=content):
assert_that(Rule.parse(content)) \
.described_as(content) \
.is_equal_to(expected)
def test__rule___eq__00(self):
item_1 = None
item_2 = None
assert_that(item_1 == item_2) \
.is_true()
def test__rule___eq__01(self):
item_1 = None
item_2 = "~head -< body, 'body'(b, 5, True)."
assert_that(item_1 == item_2) \
.is_true()
| 35.94386 | 114 | 0.500146 | 2,536 | 20,488 | 3.682177 | 0.046136 | 0.066395 | 0.076462 | 0.06072 | 0.938424 | 0.893339 | 0.852538 | 0.840116 | 0.807882 | 0.780788 | 0 | 0.029062 | 0.323165 | 20,488 | 569 | 115 | 36.00703 | 0.644335 | 0.010884 | 0 | 0.631579 | 0 | 0.006316 | 0.117842 | 0 | 0 | 0 | 0 | 0 | 0.162105 | 1 | 0.151579 | false | 0 | 0.016842 | 0 | 0.174737 | 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 |
96f9f763f001edc54c216af1644b2fe6a1e11982 | 129 | py | Python | python/mccc3j1.py | ThePeeps191/dmoj-solutions | 7137e945f3f595c481ad4d29e1dc3a77d8b26e55 | [
"MIT"
] | 1 | 2022-01-23T16:02:14.000Z | 2022-01-23T16:02:14.000Z | python/mccc3j1.py | ThePeeps191/dmoj-solutions | 7137e945f3f595c481ad4d29e1dc3a77d8b26e55 | [
"MIT"
] | 5 | 2022-01-23T00:16:49.000Z | 2022-01-30T04:37:45.000Z | python/mccc3j1.py | ThePeeps191/dmoj-solutions | 7137e945f3f595c481ad4d29e1dc3a77d8b26e55 | [
"MIT"
] | 1 | 2022-01-23T00:03:47.000Z | 2022-01-23T00:03:47.000Z | N, i, j = int(input()), int(input()), int(input())
dif1, dif2 = abs(N - i ** 2), abs(N - j ** 2)
print(1 if dif1 < dif2 else 2) | 25.8 | 50 | 0.527132 | 26 | 129 | 2.615385 | 0.5 | 0.352941 | 0.323529 | 0.470588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079208 | 0.217054 | 129 | 5 | 51 | 25.8 | 0.594059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8c2d2d177215f1b6216e43abf0867be197ccf8a2 | 138 | py | Python | app/db/__init__.py | Klafyvel/porygon-ftp | 40b9c7a1318d703fa3037559b072c918c38dc496 | [
"MIT"
] | 24 | 2015-10-25T22:33:35.000Z | 2022-02-16T22:44:20.000Z | app/db/__init__.py | Klafyvel/porygon-ftp | 40b9c7a1318d703fa3037559b072c918c38dc496 | [
"MIT"
] | 3 | 2015-04-04T12:26:16.000Z | 2015-10-26T20:20:11.000Z | app/db/__init__.py | Klafyvel/porygon-ftp | 40b9c7a1318d703fa3037559b072c918c38dc496 | [
"MIT"
] | 7 | 2015-10-25T22:35:44.000Z | 2021-11-26T19:02:03.000Z | def get_backend(name):
from importlib import import_module
return import_module('{}.{}'.format(__name__, name), package=__name__)
| 34.5 | 74 | 0.73913 | 17 | 138 | 5.352941 | 0.647059 | 0.263736 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 138 | 3 | 75 | 46 | 0.758333 | 0 | 0 | 0 | 0 | 0 | 0.036232 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.666667 | 0 | 1.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
8c361db6fa905748eb51114dd8ad9a73b6ba59bc | 39 | py | Python | kawaiiapi/__init__.py | Keksiuwu/kawaii-api | ce96e4bf882510d87bba577f258887f0ad20fd63 | [
"MIT"
] | null | null | null | kawaiiapi/__init__.py | Keksiuwu/kawaii-api | ce96e4bf882510d87bba577f258887f0ad20fd63 | [
"MIT"
] | null | null | null | kawaiiapi/__init__.py | Keksiuwu/kawaii-api | ce96e4bf882510d87bba577f258887f0ad20fd63 | [
"MIT"
] | 1 | 2021-11-28T18:16:07.000Z | 2021-11-28T18:16:07.000Z | from kawaiiapi.kawaiiapi import kawaii
| 19.5 | 38 | 0.871795 | 5 | 39 | 6.8 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102564 | 39 | 1 | 39 | 39 | 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 |
4fb61632585c41f7bf7e525eaf371ebfd200b879 | 28 | py | Python | new_python_test/main/test.py | ecosml-dev/new-python-test | cbe188539000e6863575da1ffe523d33b0fabc54 | [
"MIT"
] | null | null | null | new_python_test/main/test.py | ecosml-dev/new-python-test | cbe188539000e6863575da1ffe523d33b0fabc54 | [
"MIT"
] | null | null | null | new_python_test/main/test.py | ecosml-dev/new-python-test | cbe188539000e6863575da1ffe523d33b0fabc54 | [
"MIT"
] | null | null | null | print "Hello package world"
| 14 | 27 | 0.785714 | 4 | 28 | 5.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 28 | 1 | 28 | 28 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0.678571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
4ff00ab0c2677f785fd9c0a047723f3316eb1d9e | 141 | py | Python | uiflow_custom_block_generator/__init__.py | 3110/uiflow-custom-block-generator | 66ac171c002071391ae96d8544adce44026d1998 | [
"MIT"
] | null | null | null | uiflow_custom_block_generator/__init__.py | 3110/uiflow-custom-block-generator | 66ac171c002071391ae96d8544adce44026d1998 | [
"MIT"
] | null | null | null | uiflow_custom_block_generator/__init__.py | 3110/uiflow-custom-block-generator | 66ac171c002071391ae96d8544adce44026d1998 | [
"MIT"
] | null | null | null | from uiflow_custom_block_generator.uiflow_custom_block_generator import UiFlowCustomBlockGenerator
__all__ = ["UiFlowCustomBlockGenerator"]
| 35.25 | 98 | 0.900709 | 13 | 141 | 9 | 0.615385 | 0.205128 | 0.290598 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.056738 | 141 | 3 | 99 | 47 | 0.879699 | 0 | 0 | 0 | 0 | 0 | 0.184397 | 0.184397 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
8c8c96c0e7b09e205524c98f3562a37360374393 | 2,598 | py | Python | examples/fft_test.py | dbstein/field_ops | 70359a1be37d911b879746e5c61d6d10da1c0f3b | [
"Apache-2.0"
] | null | null | null | examples/fft_test.py | dbstein/field_ops | 70359a1be37d911b879746e5c61d6d10da1c0f3b | [
"Apache-2.0"
] | null | null | null | examples/fft_test.py | dbstein/field_ops | 70359a1be37d911b879746e5c61d6d10da1c0f3b | [
"Apache-2.0"
] | null | null | null | import numpy as np
import numexpr as ne
import numba
import time
print('--- Testing 3D FFTS ---')
n = 1024
LL = 3
A = np.random.rand(n,n,n)
@numba.njit(parallel=True)
def ccopy(x, y):
for i in numba.prange(n):
for j in range(n):
for k in range(n):
y[i,j,k] = x[i,j,k]
C = np.empty(A.shape, dtype=complex)
ccopy(A, C)
def my_fft1(X):
B = np.empty(X.shape, dtype=complex)
ne.evaluate('X', out=B)
return np.fft.fftn(B)
def my_fft2(X, C):
ccopy(X, C)
return np.fft.fftn(C)
def timeit(expr, loops=LL):
exec(expr)
st = time.time();
for ii in range(10):
exec(expr)
et = time.time()
print('...{:0.2f}'.format((et-st)*1000/10))
print('\nTime for Intel MKL FFT of real array')
timeit('O = np.fft.fftn(A)')
print('Time for Intel MKL RFFT of real array')
timeit('O = np.fft.rfftn(A)')
print('Time for Intel MKL FFT of complex array, copied from real array')
timeit('O = my_fft1(A)')
print('Time for Intel MKL FFT of complex array, copied from real array')
timeit('O = my_fft2(A,C)')
A = A + 0j
print('Time for Intel MKL FFT of complex array')
timeit('O = np.fft.fftn(A)')
A = np.random.rand(n,n,n) + 1j
B = np.random.rand(n,n,int(n/2)+1) + 1j
print('\nTime for Intel MKL IFFT of complex array')
timeit('O = np.fft.ifftn(A).real')
print('Time for Intel MKL IRFFT of complex array')
timeit('O = np.fft.irfftn(B)')
print('\n\n--- Testing 2D FFTS ---')
n = 2048
LL = 10
A = np.random.rand(n,n)
@numba.njit(parallel=True)
def ccopy(x, y):
for i in numba.prange(n):
for j in range(n):
y[i,j] = complex(x[i,j])
C = np.empty(A.shape, dtype=complex)
ccopy(A, C)
def my_fft1(X):
B = np.empty(X.shape, dtype=complex)
ne.evaluate('X', out=B)
return np.fft.fft2(B)
def my_fft2(X, C):
ccopy(X, C)
return np.fft.fft2(C)
print('\nTime for Intel MKL FFT of real array')
timeit('O = np.fft.fft2(A)')
print('Time for Intel MKL RFFT of real array')
timeit('O = np.fft.rfft2(A)')
print('Time for Intel MKL FFT of complex array, copied from real array')
timeit('O = my_fft1(A)')
print('Time for Intel MKL FFT of complex array, copied from real array')
timeit('O = my_fft2(A,C)')
A = A + 0j
print('Time for Intel MKL FFT of complex array')
timeit('O = np.fft.fft2(A)')
A = np.random.rand(n,n) + 1j
B = np.random.rand(n,int(n/2)+1) + 1j
print('\nTime for Intel MKL IFFT of complex array')
timeit('O = np.fft.ifft2(A).real')
print('Time for Intel MKL IRFFT of complex array')
timeit('O = np.fft.irfft2(A).real')
timeit('O = np.fft.irfftn(A).real')
# A = np.random.rand(n,n)
# B = np.empty(A.shape, dtype=complex)
# %timeit np.add(A, 0j, B)
# ccopy(A, B)
# %timeit ccopy(A, B)
| 23.405405 | 72 | 0.651655 | 519 | 2,598 | 3.246628 | 0.163776 | 0.04451 | 0.091395 | 0.078338 | 0.814837 | 0.800593 | 0.760831 | 0.725816 | 0.705045 | 0.705045 | 0 | 0.022487 | 0.161278 | 2,598 | 110 | 73 | 23.618182 | 0.750803 | 0.045035 | 0 | 0.578313 | 0 | 0 | 0.402424 | 0.01697 | 0 | 0 | 0 | 0 | 0 | 1 | 0.084337 | false | 0 | 0.048193 | 0 | 0.180723 | 0.204819 | 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 |
8cd0d9f673bc818a420a8ddaa834dae4d7f55c42 | 108 | py | Python | kube/tools/timekeeping.py | nearmap/kubefs | e2f6c019f04e436d031874e40c59ba0ee61d8c58 | [
"MIT"
] | 3 | 2021-05-31T06:45:37.000Z | 2021-10-05T22:36:37.000Z | kube/tools/timekeeping.py | nearmap/kubefs | e2f6c019f04e436d031874e40c59ba0ee61d8c58 | [
"MIT"
] | 8 | 2021-09-06T00:43:13.000Z | 2021-10-01T00:22:53.000Z | kube/tools/timekeeping.py | nearmap/kubefs | e2f6c019f04e436d031874e40c59ba0ee61d8c58 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
def date_now() -> datetime:
return datetime.now(timezone.utc)
| 18 | 39 | 0.75 | 14 | 108 | 5.714286 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157407 | 108 | 5 | 40 | 21.6 | 0.879121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 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 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 6 |
50f2c37beddc4bab7fcca5fd31439fca6760aa1d | 7,512 | py | Python | Tests/test_github_update.py | KwiatQIM/Quantum-Tomography | e10d03b9dc5c8c1bb61a081db1aef70a4b2bb6ca | [
"MIT"
] | 11 | 2020-06-23T13:44:30.000Z | 2021-10-22T02:55:14.000Z | Tests/test_github_update.py | KwiatQIM/Quantum-Tomography | e10d03b9dc5c8c1bb61a081db1aef70a4b2bb6ca | [
"MIT"
] | 3 | 2020-06-23T00:09:46.000Z | 2021-09-12T23:25:05.000Z | Tests/test_github_update.py | KwiatQIM/Quantum-Tomography | e10d03b9dc5c8c1bb61a081db1aef70a4b2bb6ca | [
"MIT"
] | 4 | 2020-08-11T09:11:17.000Z | 2021-11-06T05:47:47.000Z | from __future__ import print_function
from TestRun import runTests
from test_properties import Test_Properties
from test_functions import Test_Functions
import unittest
import warnings
warnings.filterwarnings("ignore")
"""
Copyright 2020 University of Illinois Board of Trustees.
Licensed under the terms of an MIT license
"""
"""CHECK OUT THE REFERENCE PAGE ON OUR WEBSITE :
https://quantumtomo.web.illinois.edu/Doc/"""
"""This test script is the one used by github when there is a pull request or push. This will automatically
run and the results can be see in the actions tab"""
"Attention! These tests run on the version that your environment uses. see readme for details"
class TestQuick(unittest.TestCase):
# 1 Qubit
def test_N1_e0_a0_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(1,50)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N1_e3_a0_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(1,20,errBounds=3)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N1_e0_a0_d1_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(1,20,test2Det=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N1_e0_a0_d0_c1_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(1,20,testCrossTalk=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N1_e0_a0_d0_c0_b0_dr1(self):
numTotalErrors = 0
Tomographys = runTests(1,20,testDrift=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
# 2 qubits
def test_N2_e0_a0_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(2,15)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N2_e3_a0_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(2,5,errBounds=3)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N2_e0_a1_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(2,5,testAccCorr=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N2_e0_a0_d1_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(2,5,test2Det=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N2_e0_a0_d0_c1_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(2,5,testCrossTalk=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N2_e0_a0_d0_c0_b1_dr0(self):
numTotalErrors = 0
Tomographys = runTests(2,5,testBell=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
def test_N2_e0_a0_d0_c0_b0_dr1(self):
numTotalErrors = 0
Tomographys = runTests(2,5,testDrift=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors,0)
# 3 qubits
def test_N3_e0_a0_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(3, 1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
def test_N3_e3_a0_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(3, 1, errBounds=3)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
def test_N3_e0_a1_d0_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(3, 1, testAccCorr=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
def test_N3_e0_a0_d1_c0_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(3, 1, test2Det=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
def test_N3_e0_a0_d0_c1_b0_dr0(self):
numTotalErrors = 0
Tomographys = runTests(3, 1, testCrossTalk=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
def test_N3_e0_a0_d0_c0_b1_dr0(self):
numTotalErrors = 0
Tomographys = runTests(3, 1, testBell=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
def test_N3_e0_a0_d0_c0_b0_dr1(self):
numTotalErrors = 0
Tomographys = runTests(3, 1, testDrift=1)
for t in Tomographys:
[Tomo_Object, Fidelity_with_Original, Original_Purity, Total_Time] = t
if Original_Purity < 0:
numTotalErrors += 1
self.assertEqual(numTotalErrors, 0)
if __name__ == '__main__':
unittest.TestLoader().loadTestsFromTestCase(Test_Properties)
unittest.TestLoader().loadTestsFromTestCase(Test_Functions)
unittest.main() | 38.92228 | 107 | 0.646965 | 921 | 7,512 | 4.988056 | 0.140065 | 0.124075 | 0.078581 | 0.124075 | 0.844145 | 0.844145 | 0.844145 | 0.842621 | 0.835873 | 0.834349 | 0 | 0.051724 | 0.281949 | 7,512 | 193 | 108 | 38.92228 | 0.799963 | 0.003328 | 0 | 0.690909 | 0 | 0 | 0.014886 | 0 | 0 | 0 | 0 | 0 | 0.115152 | 1 | 0.115152 | false | 0 | 0.036364 | 0 | 0.157576 | 0.006061 | 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 |
0f9ca6b3483da180665f621f1f8102016be1062d | 238 | py | Python | lwh/23MessageBoard/app/views.py | saurabh896/python-1 | f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7 | [
"MIT"
] | 3,976 | 2015-01-01T15:49:39.000Z | 2022-03-31T03:47:56.000Z | lwh/23MessageBoard/app/views.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 97 | 2015-01-11T02:59:46.000Z | 2022-03-16T14:01:56.000Z | lwh/23MessageBoard/app/views.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 3,533 | 2015-01-01T06:19:30.000Z | 2022-03-28T13:14:54.000Z | from app import app
from flask import render_template
@app.route('/')
def index():
return render_template('index.html')
@app.route('/postmessage',methods=["POST",])
def postMessage():
return render_template('handlemessage.html') | 23.8 | 48 | 0.731092 | 30 | 238 | 5.7 | 0.5 | 0.245614 | 0.233918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113445 | 238 | 10 | 48 | 23.8 | 0.810427 | 0 | 0 | 0 | 0 | 0 | 0.188285 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0 | 0.25 | 0.25 | 0.75 | 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 |
0fe6518828b01b29d5cd2af2ddc6735f0490730a | 75 | py | Python | apps/post/queries/__init__.py | rmdes/tanzawa | d53baa10bd6c217cd18628437a88a43e3bd02b70 | [
"Apache-2.0"
] | 25 | 2021-06-13T03:38:44.000Z | 2022-03-15T15:53:31.000Z | apps/post/queries/__init__.py | rmdes/tanzawa | d53baa10bd6c217cd18628437a88a43e3bd02b70 | [
"Apache-2.0"
] | 59 | 2021-06-12T23:35:06.000Z | 2022-03-24T21:40:24.000Z | apps/post/queries/__init__.py | rmdes/tanzawa | d53baa10bd6c217cd18628437a88a43e3bd02b70 | [
"Apache-2.0"
] | null | null | null | from ._t_post import get_t_post_by_uuid
__all__ = ("get_t_post_by_uuid",)
| 18.75 | 39 | 0.8 | 15 | 75 | 3.066667 | 0.533333 | 0.326087 | 0.347826 | 0.434783 | 0.608696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106667 | 75 | 3 | 40 | 25 | 0.686567 | 0 | 0 | 0 | 0 | 0 | 0.24 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
e899d871041eac715ef89eada5ef81d4e554a952 | 16,120 | py | Python | dfirtrack_main/tests/system/test_system_datatables_processing.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 273 | 2018-04-18T22:09:15.000Z | 2021-06-04T09:15:48.000Z | dfirtrack_main/tests/system/test_system_datatables_processing.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 75 | 2018-08-31T11:05:37.000Z | 2021-06-08T14:15:07.000Z | dfirtrack_main/tests/system/test_system_datatables_processing.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 61 | 2018-11-12T22:55:48.000Z | 2021-06-06T15:16:16.000Z | import datetime
import json
import urllib.parse
import pytz
from django.contrib.auth.models import User
from django.test import TestCase
from dfirtrack_main.models import (
Analysisstatus,
Case,
System,
Systemstatus,
Tag,
Tagcolor,
)
class SystemDatatablesProcessingTestCase(TestCase):
"""system datatables (server-side) processing tests"""
@classmethod
def setUpTestData(cls):
# create user
test_user = User.objects.create_user(
username='testuser_system', password='LqShcoecDud6JLRxhfKV'
)
# create object
systemstatus_1 = Systemstatus.objects.create(systemstatus_name='systemstatus_1')
systemstatus_2 = Systemstatus.objects.create(systemstatus_name='systemstatus_2')
# create object
tagcolor_1 = Tagcolor.objects.create(tagcolor_name='tagcolor_1')
# create object
tag_1 = Tag.objects.create(
tag_name='tag_1',
tagcolor=tagcolor_1,
)
# create object
case_1 = Case.objects.create(
case_name='case_1',
case_is_incident=True,
case_created_by_user_id=test_user,
)
# create object
analysisstatus_1 = Analysisstatus.objects.create(
analysisstatus_name='analysisstatus_1'
)
# create object
system_1 = System.objects.create(
system_name='system_1',
systemstatus=systemstatus_1,
analysisstatus=analysisstatus_1,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
system_1.case.add(case_1)
system_1.tag.add(tag_1)
# create object
System.objects.create(
system_name='system_2',
systemstatus=systemstatus_2,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
# create object
system_3 = System.objects.create(
system_name='system_3',
systemstatus=systemstatus_1,
analysisstatus=analysisstatus_1,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
system_3.case.add(case_1)
system_3.tag.add(tag_1)
# create object
mod_time_naive = datetime.datetime(2021, 1, 17, 13, 39, 29, 35025)
mod_time_tz = mod_time_naive.replace(tzinfo=pytz.timezone("GMT"))
System.objects.create(
system_name='system_4',
systemstatus=systemstatus_2,
system_modify_time=mod_time_tz,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
# create object
System.objects.create(
system_name='system_5',
systemstatus=systemstatus_2,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
# create object
System.objects.create(
system_name='system_6',
systemstatus=systemstatus_2,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
def test_dt_processing_not_logged_in(self):
"""test system datatables processing"""
# create url
destination = '/login/?next=' + urllib.parse.quote('/system/json/', safe='')
# get response
response = self.client.get('/system/json/', follow=True)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_dt_processing_logged_in(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER='/system/',
)
# compare
self.assertEqual(response.status_code, 200)
def test_dt_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': 'system_1',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER='/system/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 1)
self.assertTrue('system_1' in data['data'][0]['system_name'])
def test_dt_no_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER='/system/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 6)
self.assertTrue(len(data['data']) == 6)
def test_dt_search_irregular_string(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': 'system_1!',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER='/system/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 6)
def test_dt_referer_systemstatus_wo_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
systemstatus_id = Systemstatus.objects.get(
systemstatus_name='systemstatus_1'
).systemstatus_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/systemstatus/{systemstatus_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 2)
self.assertTrue(
'system_1' in data['data'][0]['system_name']
or 'system_1' in data['data'][1]['system_name']
)
def test_dt_referer_systemstatus_w_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
systemstatus_id = Systemstatus.objects.get(
systemstatus_name='systemstatus_1'
).systemstatus_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': 'system_1',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/systemstatus/{systemstatus_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 1)
self.assertTrue('system_1' in data['data'][0]['system_name'])
def test_dt_referer_case_wo_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
case_id = Case.objects.get(case_name='case_1').case_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/case/{case_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 2)
self.assertTrue(
'system_1' in data['data'][0]['system_name']
or 'system_1' in data['data'][1]['system_name']
)
def test_dt_referer_case_w_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
case_id = Case.objects.get(case_name='case_1').case_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': 'system_1',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/case/{case_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 1)
self.assertTrue('system_1' in data['data'][0]['system_name'])
def test_dt_referer_analysisstatus_wo_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
analysisstatus_id = Analysisstatus.objects.get(
analysisstatus_name='analysisstatus_1'
).analysisstatus_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/analysisstatus/{analysisstatus_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 2)
self.assertTrue(
'system_1' in data['data'][0]['system_name']
or 'system_1' in data['data'][1]['system_name']
)
def test_dt_referer_analysisstatus_w_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
analysisstatus_id = Analysisstatus.objects.get(
analysisstatus_name='analysisstatus_1'
).analysisstatus_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': 'system_1',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/analysisstatus/{analysisstatus_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 1)
self.assertTrue('system_1' in data['data'][0]['system_name'])
def test_dt_referer_tag_wo_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
tag_id = Tag.objects.get(tag_name='tag_1').tag_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/tag/{tag_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 2)
self.assertTrue(
'system_1' in data['data'][0]['system_name']
or 'system_1' in data['data'][1]['system_name']
)
def test_dt_referer_tag_w_search(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get data
tag_id = Tag.objects.get(tag_name='tag_1').tag_id
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': 'system_1',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER=f'/tag/{tag_id}/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 1)
self.assertTrue('system_1' in data['data'][0]['system_name'])
def test_dt_search_cleanup(self):
"""test system datatables processing"""
# login testuser
self.client.login(username='testuser_system', password='LqShcoecDud6JLRxhfKV')
# get response
response = self.client.get(
'/system/json/',
{
'order[0][column]': '1',
'order[0][dir]': 'asc',
'start': '0',
'length': '25',
'search[value]': '35025',
'columns[1][data]': 'system_name',
'columns[2][data]': 'systemstatus',
'draw': '1',
},
HTTP_REFERER='/system/',
)
data = json.loads(response.content)
# compare
self.assertEqual(int(data['recordsFiltered']), 0)
| 34.741379 | 88 | 0.526489 | 1,567 | 16,120 | 5.220804 | 0.077856 | 0.039115 | 0.037648 | 0.051338 | 0.868842 | 0.849774 | 0.813837 | 0.799169 | 0.78829 | 0.78829 | 0 | 0.023694 | 0.337593 | 16,120 | 463 | 89 | 34.816415 | 0.742461 | 0.077543 | 0 | 0.658263 | 0 | 0 | 0.219153 | 0.00923 | 0 | 0 | 0 | 0 | 0.067227 | 1 | 0.042017 | false | 0.039216 | 0.019608 | 0 | 0.064426 | 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 |
e8c1032c53c0a638d026da9ec40c551c8016ec65 | 219 | py | Python | 0x0A-python-inheritance/100-my_int.py | johncoleman83/bootcampschool-higher_level_programming | a83c3b7092cfe893c87e495f8d8eec9228c9b808 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/100-my_int.py | johncoleman83/bootcampschool-higher_level_programming | a83c3b7092cfe893c87e495f8d8eec9228c9b808 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/100-my_int.py | johncoleman83/bootcampschool-higher_level_programming | a83c3b7092cfe893c87e495f8d8eec9228c9b808 | [
"MIT"
] | 1 | 2020-09-25T17:54:36.000Z | 2020-09-25T17:54:36.000Z | #!/usr/bin/python3
class MyInt(int):
"""class to override int comparrisons"""
def __eq__(self, other):
return int(self) != int(other)
def __ne__(self, other):
return int(self) == int(other)
| 24.333333 | 44 | 0.611872 | 29 | 219 | 4.344828 | 0.517241 | 0.142857 | 0.238095 | 0.285714 | 0.47619 | 0.47619 | 0.47619 | 0 | 0 | 0 | 0 | 0.005952 | 0.232877 | 219 | 8 | 45 | 27.375 | 0.744048 | 0.237443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.4 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 6 |
e8d01638867545d34fd63987dd2f11b13ba8290c | 157 | py | Python | intents/SetAge/intent.py | artex-development/Patt-Discord-Bot | 3aa32fc8b645812bbf51c7ddd7f361314776267e | [
"Apache-2.0"
] | 3 | 2018-04-06T05:59:06.000Z | 2018-04-13T16:04:42.000Z | intents/SetAge/intent.py | artex-development/Patt | 3aa32fc8b645812bbf51c7ddd7f361314776267e | [
"Apache-2.0"
] | 1 | 2017-07-12T01:35:44.000Z | 2017-07-15T09:05:04.000Z | intents/SetAge/intent.py | artex-development/Patt | 3aa32fc8b645812bbf51c7ddd7f361314776267e | [
"Apache-2.0"
] | 2 | 2017-10-10T00:06:22.000Z | 2017-11-25T22:53:47.000Z | import aiohttp
import discord
import utils as u
class Intent(u.Intent):
@staticmethod
async def handle(context: u.IntentContext):
pass
| 15.7 | 47 | 0.694268 | 20 | 157 | 5.45 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242038 | 157 | 9 | 48 | 17.444444 | 0.915966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.142857 | 0.428571 | 0 | 0.571429 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
2cdbec303c9c06c9d6605f431270c5618f1ca9a3 | 130 | py | Python | blackjack_components/Dealer.py | rosshughduncan/Python-games | b56b12a24b690bf69664eab9512b0ce0783156ae | [
"MIT"
] | null | null | null | blackjack_components/Dealer.py | rosshughduncan/Python-games | b56b12a24b690bf69664eab9512b0ce0783156ae | [
"MIT"
] | null | null | null | blackjack_components/Dealer.py | rosshughduncan/Python-games | b56b12a24b690bf69664eab9512b0ce0783156ae | [
"MIT"
] | null | null | null | from .Player import Player
class Dealer(Player):
def __init__(self, chips, name):
Player.__init__(self, chips, name)
| 21.666667 | 42 | 0.692308 | 17 | 130 | 4.823529 | 0.588235 | 0.195122 | 0.317073 | 0.414634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 130 | 5 | 43 | 26 | 0.788462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
2ce2ea2a9fb4e71b4ed0f2a96142d969e2993b95 | 136 | py | Python | test/test_utils.py | Funk66/ledger | b06f39281b81cebb75a6c5f92fa3b8e47b65800c | [
"MIT"
] | null | null | null | test/test_utils.py | Funk66/ledger | b06f39281b81cebb75a6c5f92fa3b8e47b65800c | [
"MIT"
] | 3 | 2021-11-16T06:38:48.000Z | 2021-11-16T06:43:18.000Z | test/test_utils.py | Funk66/ledger | b06f39281b81cebb75a6c5f92fa3b8e47b65800c | [
"MIT"
] | null | null | null | from datetime import date
from ledger.utils import isodate
def test_isodate():
assert date(2020, 2, 20) == isodate('2020-02-20')
| 17 | 53 | 0.713235 | 21 | 136 | 4.571429 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132743 | 0.169118 | 136 | 7 | 54 | 19.428571 | 0.716814 | 0 | 0 | 0 | 0 | 0 | 0.073529 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.25 | true | 0 | 0.5 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fa4538c6bca4667f956821f85deb21ed41e5d823 | 8,062 | py | Python | src/prod-stag-migrations/versions/7d327a0fb0cf_.py | andela/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 1 | 2018-09-13T16:33:20.000Z | 2018-09-13T16:33:20.000Z | src/prod-stag-migrations/versions/7d327a0fb0cf_.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 6 | 2019-03-11T17:50:27.000Z | 2019-08-26T11:00:40.000Z | src/prod-stag-migrations/versions/7d327a0fb0cf_.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 9 | 2019-01-09T12:23:12.000Z | 2021-05-28T04:58:31.000Z | """empty message
Revision ID: 7d327a0fb0cf
Revises:
Create Date: 2018-07-24 17:10:37.313600
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7d327a0fb0cf'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('activity_types',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('value', sa.Integer(), nullable=True),
sa.Column('supports_multiple_participants', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('centers',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('roles',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('societies',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('name', sa.String(), nullable=False),
sa.Column('color_scheme', sa.String(), nullable=True),
sa.Column('logo', sa.String(), nullable=True),
sa.Column('_total_points', sa.Integer(), nullable=True),
sa.Column('_used_points', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('uuid'),
sa.UniqueConstraint('name')
)
op.create_table('cohorts',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('center_id', sa.String(), nullable=True),
sa.Column('society_id', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['center_id'], ['centers.uuid'], ),
sa.ForeignKeyConstraint(['society_id'], ['societies.uuid'], ),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('users',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('name', sa.String(), nullable=False),
sa.Column('email', sa.String(), nullable=False),
sa.Column('society_id', sa.String(), nullable=True),
sa.Column('center_id', sa.String(), nullable=True),
sa.Column('cohort_id', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['center_id'], ['centers.uuid'], ),
sa.ForeignKeyConstraint(['cohort_id'], ['cohorts.uuid'], ),
sa.ForeignKeyConstraint(['society_id'], ['societies.uuid'], ),
sa.PrimaryKeyConstraint('uuid'),
sa.UniqueConstraint('email')
)
op.create_table('activities',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('activity_type_id', sa.String(), nullable=True),
sa.Column('activity_date', sa.Date(), nullable=True),
sa.Column('added_by_id', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['activity_type_id'], ['activity_types.uuid'], ),
sa.ForeignKeyConstraint(['added_by_id'], ['users.uuid'], ),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('redemptions',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('user_id', sa.String(), nullable=False),
sa.Column('society_id', sa.String(), nullable=True),
sa.Column('value', sa.Integer(), nullable=False),
sa.Column('status', sa.String(), nullable=False),
sa.Column('center_id', sa.String(), nullable=False),
sa.Column('comment', sa.String(), nullable=True),
sa.Column('rejection', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['center_id'], ['centers.uuid'], ),
sa.ForeignKeyConstraint(['society_id'], ['societies.uuid'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.uuid'], ),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('user_role',
sa.Column('user_uuid', sa.String(), nullable=False),
sa.Column('role_uuid', sa.String(), nullable=False),
sa.ForeignKeyConstraint(['role_uuid'], ['roles.uuid'], ),
sa.ForeignKeyConstraint(['user_uuid'], ['users.uuid'], )
)
op.create_table('logged_activities',
sa.Column('uuid', sa.String(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('photo', sa.String(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('value', sa.Integer(), nullable=False),
sa.Column('status', sa.String(), nullable=True),
sa.Column('approved_at', sa.DateTime(), nullable=True),
sa.Column('activity_date', sa.Date(), nullable=True),
sa.Column('redeemed', sa.Boolean(), nullable=False),
sa.Column('no_of_participants', sa.Integer(), nullable=True),
sa.Column('approver_id', sa.String(), nullable=True),
sa.Column('reviewer_id', sa.String(), nullable=True),
sa.Column('activity_type_id', sa.String(), nullable=False),
sa.Column('user_id', sa.String(), nullable=False),
sa.Column('society_id', sa.String(), nullable=False),
sa.Column('activity_id', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['activity_id'], ['activities.uuid'], ),
sa.ForeignKeyConstraint(['activity_type_id'], ['activity_types.uuid'], ),
sa.ForeignKeyConstraint(['society_id'], ['societies.uuid'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.uuid'], ),
sa.PrimaryKeyConstraint('uuid')
)
op.create_table('user_activity',
sa.Column('user_uuid', sa.String(), nullable=False),
sa.Column('activity_uuid', sa.String(), nullable=False),
sa.ForeignKeyConstraint(['activity_uuid'], ['activities.uuid'], ),
sa.ForeignKeyConstraint(['user_uuid'], ['users.uuid'], )
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user_activity')
op.drop_table('logged_activities')
op.drop_table('user_role')
op.drop_table('redemptions')
op.drop_table('activities')
op.drop_table('users')
op.drop_table('cohorts')
op.drop_table('societies')
op.drop_table('roles')
op.drop_table('centers')
op.drop_table('activity_types')
# ### end Alembic commands ###
| 44.541436 | 77 | 0.664971 | 1,000 | 8,062 | 5.252 | 0.096 | 0.140137 | 0.178599 | 0.220868 | 0.834158 | 0.822734 | 0.783511 | 0.723724 | 0.682788 | 0.671935 | 0 | 0.00459 | 0.135202 | 8,062 | 180 | 78 | 44.788889 | 0.748709 | 0.035103 | 0 | 0.549383 | 0 | 0 | 0.191165 | 0.003875 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012346 | false | 0 | 0.012346 | 0 | 0.024691 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
fa57931570a290975ede0202fc956c6652a2aef7 | 24 | py | Python | ithkuil/__init__.py | absentabyss/ithkuil | 2f10841189550c19d7f951c87e0b020969356cda | [
"MIT"
] | 20 | 2016-03-01T04:21:21.000Z | 2021-04-28T06:52:30.000Z | ithkuil/__init__.py | absentabyss/ithkuil | 2f10841189550c19d7f951c87e0b020969356cda | [
"MIT"
] | 5 | 2016-01-07T16:22:25.000Z | 2019-12-26T01:49:16.000Z | ithkuil/__init__.py | absentabyss/ithkuil | 2f10841189550c19d7f951c87e0b020969356cda | [
"MIT"
] | 6 | 2017-05-08T20:46:43.000Z | 2020-05-09T23:54:56.000Z | from . import morphology | 24 | 24 | 0.833333 | 3 | 24 | 6.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 24 | 1 | 24 | 24 | 0.952381 | 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 |
d71683f56fed6ba960efe7a660c637527d38306a | 4,772 | py | Python | tests/visualization_test.py | TUT-ARG/sed_vis | 41ae82ce4191caf1c3d9cdd985c53b135d7550a0 | [
"MIT"
] | 79 | 2016-03-07T01:35:55.000Z | 2022-03-31T02:52:08.000Z | sed_vis/tests/visualization_test.py | jim-schwoebel/sound_event_detection | 24cd385d23da6382ab92c37587d9478e4324cda0 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2017-10-11T09:41:29.000Z | 2021-10-15T23:55:34.000Z | tests/visualization_test.py | TUT-ARG/sed_vis | 41ae82ce4191caf1c3d9cdd985c53b135d7550a0 | [
"MIT"
] | 27 | 2016-05-21T15:59:52.000Z | 2021-12-03T07:06:31.000Z | #!/usr/bin/env python
import sed_vis
import dcase_util
import os
mode = 'probability'
current_path = os.path.dirname(os.path.realpath(__file__))
if mode == 'dcase2016':
audio_container = dcase_util.containers.AudioContainer().load(
os.path.join(current_path, 'data', 'a001.wav')
)
event_lists = {
'reference': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001.ann')
)
}
vis = sed_vis.visualization.EventListVisualizer(
event_lists=event_lists,
event_list_order=['reference'],
audio_signal=audio_container.data,
sampling_rate=audio_container.fs,
spec_cmap='jet',
spec_interpolation='bicubic',
spec_win_size=1024,
spec_hop_size=1024/2,
spec_fft_size=1024,
publication_mode=True
)
vis.show()
elif mode == 'publication':
# Example how to create plots for publications, use "save the figure" button and
# select svg format. Open figure in e.g. inkscape and edit to your liking.
audio_container = dcase_util.containers.AudioContainer().load(
os.path.join(current_path, 'data', 'a001.wav')
)
event_lists = {
'reference': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001.ann')
),
'full': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001_full.ann')
),
'estimated': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001_system_output.ann')
)
}
vis = sed_vis.visualization.EventListVisualizer(
event_lists=event_lists,
event_list_order=['reference', 'full', 'estimated'],
audio_signal=audio_container.data,
sampling_rate=audio_container.fs,
spec_cmap='jet',
spec_interpolation='bicubic',
spec_win_size=1024,
spec_hop_size=1024/8,
spec_fft_size=1024,
publication_mode=True
)
vis.show()
elif mode == 'sync':
# Test for audio and visual synchronization during the playback.
audio_container = dcase_util.containers.AudioContainer().load(
os.path.join(current_path, 'data', 'sync', 'sin_silence.wav')
)
event_lists = {
'reference': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'sync', 'sin_silence.txt')
)
}
vis = sed_vis.visualization.EventListVisualizer(
event_lists=event_lists,
audio_signal=audio_container.data,
sampling_rate=audio_container.fs,
mode='time_domain'
)
vis.show()
elif mode == 'multiple':
# Test visualization of multiple system outputs
audio_container = dcase_util.containers.AudioContainer().load(
os.path.join(current_path, 'data', 'a001.wav')
)
event_lists = {
'reference': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001.ann')
),
'estimated1': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001_system_output.ann')
),
'estimated2': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001_system_output_2.ann')
)
}
vis = sed_vis.visualization.EventListVisualizer(
event_lists=event_lists,
event_list_order=['reference', 'estimated1', 'estimated2'],
audio_signal=audio_container.data,
sampling_rate=audio_container.fs,
spec_cmap='jet',
spec_interpolation='bicubic',
spec_win_size=1024,
spec_hop_size=1024/8,
spec_fft_size=1024,
publication_mode=True
)
vis.show()
elif mode == 'probability':
audio_container = dcase_util.containers.AudioContainer().load(
os.path.join(current_path, 'data', 'a001.wav')
)
event_lists = {
'reference': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001.ann')
),
'estimated': dcase_util.containers.MetaDataContainer().load(
os.path.join(current_path, 'data', 'a001_system_output_prob.csv')
)
}
vis = sed_vis.visualization.EventListVisualizer(
event_lists=event_lists,
event_list_order=['reference','estimated'], # 'full', 'estimated'],
audio_signal=audio_container.data,
sampling_rate=audio_container.fs,
spec_cmap='jet',
spec_interpolation='bicubic',
spec_win_size=1024,
spec_hop_size=1024/8,
spec_fft_size=1024,
publication_mode=True
)
vis.show() | 32.243243 | 84 | 0.644384 | 539 | 4,772 | 5.445269 | 0.191095 | 0.034753 | 0.097104 | 0.07155 | 0.841227 | 0.841227 | 0.841227 | 0.841227 | 0.841227 | 0.820443 | 0 | 0.027367 | 0.234283 | 4,772 | 148 | 85 | 32.243243 | 0.775862 | 0.063495 | 0 | 0.645161 | 0 | 0 | 0.120968 | 0.021281 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.024194 | 0 | 0.024194 | 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 |
d76faa8b20b6d93bfdaa10eb42e16dc09198164a | 2,416 | py | Python | python/ql/test/library-tests/frameworks/yaml/Decoding.py | angie1148/codeql | ab3cad749cabe762437d2eb0aab554acea6ce84d | [
"MIT"
] | 643 | 2018-08-03T11:16:54.000Z | 2020-04-27T23:10:55.000Z | python/ql/test/library-tests/frameworks/yaml/Decoding.py | angie1148/codeql | ab3cad749cabe762437d2eb0aab554acea6ce84d | [
"MIT"
] | 1,880 | 2018-08-03T11:28:32.000Z | 2020-04-28T13:18:51.000Z | python/ql/test/library-tests/frameworks/yaml/Decoding.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 218 | 2018-08-03T11:16:58.000Z | 2020-04-24T02:24:00.000Z | import yaml
# Unsafe:
yaml.load(payload) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML decodeMayExecuteInput
yaml.load(stream=payload) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML decodeMayExecuteInput
yaml.load(payload, yaml.Loader) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML decodeMayExecuteInput
yaml.unsafe_load(payload) # $ decodeInput=payload decodeOutput=yaml.unsafe_load(..) decodeFormat=YAML decodeMayExecuteInput
yaml.full_load(payload) # $ decodeInput=payload decodeOutput=yaml.full_load(..) decodeFormat=YAML decodeMayExecuteInput
# Safe:
yaml.load(payload, yaml.SafeLoader) # $ decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML
yaml.load(payload, Loader=yaml.SafeLoader) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML
yaml.load(payload, yaml.BaseLoader) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML
yaml.safe_load(payload) # $ decodeInput=payload decodeOutput=yaml.safe_load(..) decodeFormat=YAML
################################################################################
# load_all variants
################################################################################
# Unsafe:
yaml.load_all(payload) # $ decodeInput=payload decodeOutput=yaml.load_all(..) decodeFormat=YAML decodeMayExecuteInput
yaml.unsafe_load_all(payload) # $ decodeInput=payload decodeOutput=yaml.unsafe_load_all(..) decodeFormat=YAML decodeMayExecuteInput
yaml.full_load_all(payload) # $ decodeInput=payload decodeOutput=yaml.full_load_all(..) decodeFormat=YAML decodeMayExecuteInput
# Safe:
yaml.safe_load_all(payload) # $ decodeInput=payload decodeOutput=yaml.safe_load_all(..) decodeFormat=YAML
################################################################################
# C-based loaders with `libyaml`
################################################################################
# Unsafe:
yaml.load(payload, yaml.CLoader) # $ decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML decodeMayExecuteInput
yaml.load(payload, yaml.CFullLoader) # $ decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML decodeMayExecuteInput
# Safe:
yaml.load(payload, yaml.CSafeLoader) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML
yaml.load(payload, yaml.CBaseLoader) # $decodeInput=payload decodeOutput=yaml.load(..) decodeFormat=YAML
| 61.948718 | 131 | 0.696606 | 234 | 2,416 | 7.102564 | 0.111111 | 0.11071 | 0.306859 | 0.347774 | 0.876655 | 0.847774 | 0.746089 | 0.495187 | 0.439832 | 0.31769 | 0 | 0 | 0.064983 | 2,416 | 38 | 132 | 63.578947 | 0.735724 | 0.61755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.055556 | 0 | 0.055556 | 0 | 0 | 0 | 0 | null | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
d7900fa4cf7605801289921d5cbcea7fead689f2 | 20,293 | py | Python | model/fusionDataset.py | chiang9/NLP-Chinese_couplet_generation | c569433bb87db7f765f688ca8c69589aa9d26558 | [
"MIT"
] | 1 | 2021-12-03T05:56:51.000Z | 2021-12-03T05:56:51.000Z | model/fusionDataset.py | chiang9/NLP-Chinese_couplet_generation | c569433bb87db7f765f688ca8c69589aa9d26558 | [
"MIT"
] | null | null | null | model/fusionDataset.py | chiang9/NLP-Chinese_couplet_generation | c569433bb87db7f765f688ca8c69589aa9d26558 | [
"MIT"
] | null | null | null | __author__ = "Shihao Lin"
__time__ = "2021/11/30"
__version__= "4.0"
from tqdm import tqdm
import torch,re
import jieba
import jieba.posseg as pseg
import paddle
from pypinyin import pinyin, Style
from torch.utils.data import Dataset
class FusionDataset(Dataset):
def __init__(self,X,tokenizer,glyph2ix,pinyin2ix,
pos2ix=None,Y=None, pos_ids_X=None,
pos_ids_Y=None,skip_error=False,device=None):
"""
Notes: set device to current device to load dataset into gpu
input_ids,token_type_ids,attention_mask are related to Bert embedding
pinyin_ids : related to pinyin embedding
glyph_ids : related to glyph embedding
pos_ids : related to pos tag embedding
y_true_ids: related to true y decoder output id that links to Bert vocab
Return:
self.x_input_ids[idx], \
self.x_token_type_ids[idx], \
self.x_attention_mask[idx], \
self.x_pinyin_ids[idx], \
self.x_glyph_ids[idx], \
self.x_pos_ids[idx], \
self.y_input_ids[idx], \
self.y_token_type_ids[idx], \
self.y_attention_mask[idx], \
self.y_pinyin_ids[idx], \
self.y_glyph_ids[idx], \
self.y_pos_ids[idx],\
self.y_true_ids[idx]
"""
temp = self.prepare_sequence(X,tokenizer,glyph2ix,
pinyin2ix,pos2ix,
pos_ids_X,skip_error=skip_error,
device=device)
self.x_input_ids= temp[0]
self.x_token_type_ids= temp[1]
self.x_attention_mask= temp[2]
self.x_pinyin_ids= temp[3]
self.x_glyph_ids= temp[4]
self.x_pos_ids= temp[5]
if Y:
temp = self.prepare_sequence(Y,tokenizer,glyph2ix,
pinyin2ix,pos2ix,
pos_ids_Y,encode=False,
skip_error=skip_error,
device=device)
self.y_input_ids= temp[0]
self.y_token_type_ids= temp[1]
self.y_attention_mask= temp[2]
self.y_pinyin_ids= temp[3]
self.y_glyph_ids= temp[4]
self.y_pos_ids= temp[5]
self.y_true_ids = temp[6]
self.y_mask_ids = temp[7]
else:
if device:
self.y_input_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_token_type_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_attention_mask= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_pinyin_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_glyph_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_pos_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_true_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
self.y_mask_ids = torch.zeros(0)
else:
self.y_input_ids= [0]*len(self.x_input_ids)
self.y_token_type_ids= [0]*len(self.x_input_ids)
self.y_attention_mask= [0]*len(self.x_input_ids)
self.y_pinyin_ids= [0]*len(self.x_input_ids)
self.y_glyph_ids= [0]*len(self.x_input_ids)
self.y_pos_ids= [0]*len(self.x_input_ids)
self.y_true_ids= [0]*len(self.x_input_ids)
self.y_mask_ids = 0
def __len__(self):
return len(self.x_input_ids)
def __getitem__(self,idx):
return self.x_input_ids[idx], \
self.x_token_type_ids[idx], \
self.x_attention_mask[idx], \
self.x_pinyin_ids[idx], \
self.x_glyph_ids[idx], \
self.x_pos_ids[idx], \
self.y_input_ids[idx], \
self.y_token_type_ids[idx], \
self.y_attention_mask[idx], \
self.y_pinyin_ids[idx], \
self.y_glyph_ids[idx], \
self.y_pos_ids[idx],\
self.y_true_ids[idx],\
self.y_mask_ids
@classmethod
def generate_square_subsequent_mask(cls, sz):
mask = (torch.triu(torch.ones(sz, sz)) == 1).transpose(0, 1)
mask = mask.float().masked_fill(mask == 0, float('-inf')).masked_fill(mask == 1, float(0.0))
return mask
@classmethod
def prepare_sequence(cls,sents, tokenizer, glyph2ix,pinyin2ix,pos2ix=None,
unpad_sents_pos_ids=None,encode=True,skip_error=True,
device=None
):
# tranform the wrong Chinese Char in dataset to match Char in pinyin library
char_correct = {'凉':'凉','裏':'裹','郎':'郎','ㄚ':'丫','—':'一'}
trans2pinyin = lambda sent: [_[0] for _ in pinyin(sent,style=Style.TONE2, heteronym=False,neutral_tone_with_five=True)]
sents_input_ids= []
sents_token_type_ids= []
sents_attention_mask= []
sents_pinyin_ids= []
sents_glyph_ids= []
sents_pos_ids= []
if not encode:
sents_true_ids=[]
if not unpad_sents_pos_ids:
unpad_sents_pos_ids = [None]*len(sents)
paddle.enable_static()
jieba.enable_paddle()
max_len = max([len(_) for _ in sents])
for (sent,sent_pos_ids) in tqdm(zip(sents,unpad_sents_pos_ids)):
bert_tmp = []
flag = True
for i in range(len(sent)):
if re.match(r'[\ue2a5-\ue8f0]+',sent[i]):
if skip_error:
flag = False
break
bert_tmp.append('[UNK]')
sent[i] = '_'
elif sent[i] == '_':
bert_tmp.append('[UNK]')
else:
if sent[i] in char_correct:
sent[i] = char_correct[sent[i]]
bert_tmp.append(sent[i])
if flag:
# +2 FOR [CLS] & [SEP] +1 FOR [CLS]
input_ids= torch.zeros(max_len+2,dtype=torch.int) if encode else torch.zeros(max_len+1,dtype=torch.int)
token_type_ids= input_ids.clone()
attention_mask= input_ids.clone()
pinyin_ids= input_ids.clone()
glyph_ids= input_ids.clone()
pos_ids= input_ids.clone()
if not encode:
true_ids = torch.zeros(max_len+1,dtype=torch.long)
token_res = tokenizer(''.join(bert_tmp),return_tensors='pt')
cur_l = len(sent)
if encode:
input_ids[:cur_l+2] = token_res['input_ids']
token_type_ids[:cur_l+2] = token_res['token_type_ids']
attention_mask[:cur_l+2] = token_res['attention_mask']
else:
input_ids[:cur_l+1] = token_res['input_ids'][0,:cur_l+1]
token_type_ids[:cur_l+1] = token_res['token_type_ids'][0,:cur_l+1]
attention_mask[:cur_l+1] = token_res['attention_mask'][0,:cur_l+1]
counter = 1
for res in trans2pinyin(''.join(sent)):
if '_' in res:
for c in res:
pinyin_ids[counter] = pinyin2ix[c]
counter+=1
else:
pinyin_ids[counter] = pinyin2ix[res]
counter+=1
glyph_ids[1:cur_l+1] = torch.tensor([glyph2ix[_] for _ in sent],dtype=torch.int)
if not encode:
true_ids[:cur_l] = torch.tensor([glyph2ix[_] for _ in sent],dtype=torch.int)
if not sent_pos_ids:
sent_pos_ids = []
for word in pseg.cut(''.join(sent), use_paddle=True):
sent_pos_ids.extend([pos2ix[word.flag.lower()]]*len(word.word))
pos_ids[1:cur_l+1] = torch.tensor(sent_pos_ids)
sents_input_ids.append(input_ids)
sents_token_type_ids.append(token_type_ids)
sents_attention_mask.append(attention_mask)
sents_pinyin_ids.append(pinyin_ids)
sents_glyph_ids.append(glyph_ids)
sents_pos_ids.append(pos_ids)
if not encode:
sents_true_ids.append(true_ids)
if device:
sents_input_ids = torch.stack(sents_input_ids).to(device)
sents_token_type_ids= torch.stack(sents_token_type_ids).to(device)
sents_attention_mask= torch.stack(sents_attention_mask).to(device)
sents_pinyin_ids= torch.stack(sents_pinyin_ids).to(device)
sents_glyph_ids= torch.stack(sents_glyph_ids).to(device)
sents_pos_ids= torch.stack(sents_pos_ids).to(device)
if not encode:
sents_true_ids = torch.stack(sents_true_ids).to(device)
masks = cls.generate_square_subsequent_mask(max_len+1).to(device)
else:
if not encode:
masks = cls.generate_square_subsequent_mask(max_len+1)
if encode:
return sents_input_ids,sents_token_type_ids, \
sents_attention_mask,sents_pinyin_ids, \
sents_glyph_ids,sents_pos_ids
else:
return sents_input_ids,sents_token_type_ids, \
sents_attention_mask,sents_pinyin_ids, \
sents_glyph_ids,sents_pos_ids, \
sents_true_ids, masks
## Save it for old method with output dim == Bert Word dim
# class FusionDataset(Dataset):
# def __init__(self,X,tokenizer,glyph2ix,pinyin2ix,
# pos2ix=None,Y=None, pos_ids_X=None,
# pos_ids_Y=None,skip_error=False,device=None):
# """
# Notes: set device to current device to load dataset into gpu
# input_ids,token_type_ids,attention_mask are related to Bert embedding
# pinyin_ids : related to pinyin embedding
# glyph_ids : related to glyph embedding
# pos_ids : related to pos tag embedding
# y_true_ids: related to true y decoder output id that links to Bert vocab
# Return:
# self.x_input_ids[idx], \
# self.x_token_type_ids[idx], \
# self.x_attention_mask[idx], \
# self.x_pinyin_ids[idx], \
# self.x_glyph_ids[idx], \
# self.x_pos_ids[idx], \
# self.y_input_ids[idx], \
# self.y_token_type_ids[idx], \
# self.y_attention_mask[idx], \
# self.y_pinyin_ids[idx], \
# self.y_glyph_ids[idx], \
# self.y_pos_ids[idx],\
# self.y_true_ids[idx]
# """
# temp = self.prepare_sequence(X,tokenizer,glyph2ix,
# pinyin2ix,pos2ix,
# pos_ids_X,skip_error=skip_error,
# device=device)
# self.x_input_ids= temp[0]
# self.x_token_type_ids= temp[1]
# self.x_attention_mask= temp[2]
# self.x_pinyin_ids= temp[3]
# self.x_glyph_ids= temp[4]
# self.x_pos_ids= temp[5]
# if Y:
# temp = self.prepare_sequence(Y,tokenizer,glyph2ix,
# pinyin2ix,pos2ix,
# pos_ids_Y,encode=False,
# skip_error=skip_error,
# device=device)
# self.y_input_ids= temp[0]
# self.y_token_type_ids= temp[1]
# self.y_attention_mask= temp[2]
# self.y_pinyin_ids= temp[3]
# self.y_glyph_ids= temp[4]
# self.y_pos_ids= temp[5]
# self.y_true_ids = temp[6]
# self.y_mask_ids = temp[7]
# else:
# if device:
# self.y_input_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_token_type_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_attention_mask= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_pinyin_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_glyph_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_pos_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_true_ids= torch.zeros(len(self.x_input_ids), dtype=torch.long).to(device)
# self.y_mask_ids = torch.zeros(0)
# else:
# self.y_input_ids= [0]*len(self.x_input_ids)
# self.y_token_type_ids= [0]*len(self.x_input_ids)
# self.y_attention_mask= [0]*len(self.x_input_ids)
# self.y_pinyin_ids= [0]*len(self.x_input_ids)
# self.y_glyph_ids= [0]*len(self.x_input_ids)
# self.y_pos_ids= [0]*len(self.x_input_ids)
# self.y_true_ids= [0]*len(self.x_input_ids)
# self.y_mask_ids = 0
# def __len__(self):
# return len(self.x_input_ids)
# def __getitem__(self,idx):
# return self.x_input_ids[idx], \
# self.x_token_type_ids[idx], \
# self.x_attention_mask[idx], \
# self.x_pinyin_ids[idx], \
# self.x_glyph_ids[idx], \
# self.x_pos_ids[idx], \
# self.y_input_ids[idx], \
# self.y_token_type_ids[idx], \
# self.y_attention_mask[idx], \
# self.y_pinyin_ids[idx], \
# self.y_glyph_ids[idx], \
# self.y_pos_ids[idx],\
# self.y_true_ids[idx],\
# self.y_mask_ids
# @classmethod
# def generate_square_subsequent_mask(cls, sz):
# mask = (torch.triu(torch.ones(sz, sz)) == 1).transpose(0, 1)
# mask = mask.float().masked_fill(mask == 0, float('-inf')).masked_fill(mask == 1, float(0.0))
# return mask
# @classmethod
# def prepare_sequence(cls,sents, tokenizer, glyph2ix,pinyin2ix,pos2ix=None,
# unpad_sents_pos_ids=None,encode=True,skip_error=True,
# device=None
# ):
# # tranform the wrong Chinese Char in dataset to match Char in pinyin library
# char_correct = {'凉':'凉','裏':'裹','郎':'郎','ㄚ':'丫','—':'一'}
# trans2pinyin = lambda sent: [_[0] for _ in pinyin(sent,style=Style.TONE2, heteronym=False,neutral_tone_with_five=True)]
# sents_input_ids= []
# sents_token_type_ids= []
# sents_attention_mask= []
# sents_pinyin_ids= []
# sents_glyph_ids= []
# sents_pos_ids= []
# if not encode:
# sents_true_ids=[]
# if not unpad_sents_pos_ids:
# unpad_sents_pos_ids = [None]*len(sents)
# paddle.enable_static()
# jieba.enable_paddle()
# max_len = max([len(_) for _ in sents])
# for (sent,sent_pos_ids) in tqdm(zip(sents,unpad_sents_pos_ids)):
# bert_tmp = []
# flag = True
# for i in range(len(sent)):
# if re.match(r'[\ue2a5-\ue8f0]+',sent[i]):
# if skip_error:
# flag = False
# break
# bert_tmp.append('[UNK]')
# sent[i] = '_'
# elif sent[i] == '_':
# bert_tmp.append('[UNK]')
# else:
# if sent[i] in char_correct:
# sent[i] = char_correct[sent[i]]
# bert_tmp.append(sent[i])
# if flag:
# # +2 FOR [CLS] & [SEP] +1 FOR [CLS]
# input_ids= torch.zeros(max_len+2,dtype=torch.int) if encode else torch.zeros(max_len+1,dtype=torch.int)
# token_type_ids= input_ids.clone()
# attention_mask= input_ids.clone()
# pinyin_ids= input_ids.clone()
# glyph_ids= input_ids.clone()
# pos_ids= input_ids.clone()
# if not encode:
# true_ids = torch.zeros(max_len+1,dtype=torch.long)
# token_res = tokenizer(''.join(bert_tmp),return_tensors='pt')
# cur_l = len(sent)
# if encode:
# input_ids[:cur_l+2] = token_res['input_ids']
# token_type_ids[:cur_l+2] = token_res['token_type_ids']
# attention_mask[:cur_l+2] = token_res['attention_mask']
# else:
# input_ids[:cur_l+1] = token_res['input_ids'][0,:cur_l+1]
# token_type_ids[:cur_l+1] = token_res['token_type_ids'][0,:cur_l+1]
# attention_mask[:cur_l+1] = token_res['attention_mask'][0,:cur_l+1]
# true_ids[:cur_l+1] = token_res['input_ids'][0,1:cur_l+2]
# counter = 1
# for res in trans2pinyin(''.join(sent)):
# if '_' in res:
# for c in res:
# # try:
# pinyin_ids[counter] = pinyin2ix[c]
# counter+=1
# # except:
# # print(bert_tmp,sent,res)
# # raise
# else:
# pinyin_ids[counter] = pinyin2ix[res]
# counter+=1
# glyph_ids[1:cur_l+1] = torch.tensor([glyph2ix[_] for _ in sent],dtype=torch.int)
# if not sent_pos_ids:
# sent_pos_ids = []
# for word in pseg.cut(''.join(sent), use_paddle=True):
# sent_pos_ids.extend([pos2ix[word.flag.lower()]]*len(word.word))
# pos_ids[1:cur_l+1] = torch.tensor(sent_pos_ids)
# sents_input_ids.append(input_ids)
# sents_token_type_ids.append(token_type_ids)
# sents_attention_mask.append(attention_mask)
# sents_pinyin_ids.append(pinyin_ids)
# sents_glyph_ids.append(glyph_ids)
# sents_pos_ids.append(pos_ids)
# if not encode:
# sents_true_ids.append(true_ids)
# if device:
# sents_input_ids = torch.stack(sents_input_ids).to(device)
# sents_token_type_ids= torch.stack(sents_token_type_ids).to(device)
# sents_attention_mask= torch.stack(sents_attention_mask).to(device)
# sents_pinyin_ids= torch.stack(sents_pinyin_ids).to(device)
# sents_glyph_ids= torch.stack(sents_glyph_ids).to(device)
# sents_pos_ids= torch.stack(sents_pos_ids).to(device)
# if not encode:
# sents_true_ids = torch.stack(sents_true_ids).to(device)
# masks = cls.generate_square_subsequent_mask(max_len+1).to(device)
# else:
# if not encode:
# masks = cls.generate_square_subsequent_mask(max_len+1)
# if encode:
# return sents_input_ids,sents_token_type_ids, \
# sents_attention_mask,sents_pinyin_ids, \
# sents_glyph_ids,sents_pos_ids
# else:
# return sents_input_ids,sents_token_type_ids, \
# sents_attention_mask,sents_pinyin_ids, \
# sents_glyph_ids,sents_pos_ids, \
# sents_true_ids, masks | 45.095556 | 129 | 0.52422 | 2,526 | 20,293 | 3.885194 | 0.068884 | 0.067658 | 0.051355 | 0.047687 | 0.973303 | 0.971979 | 0.971979 | 0.96505 | 0.96505 | 0.962503 | 0 | 0.013604 | 0.366087 | 20,293 | 450 | 130 | 45.095556 | 0.749145 | 0.521461 | 0 | 0.171271 | 0 | 0 | 0.015119 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.027624 | false | 0 | 0.038674 | 0.01105 | 0.099448 | 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 |
ad2977121d04251e090618a073584c4c6949cbfa | 2,839 | py | Python | tests/test_html.py | elisong/pycmd | 3d65ee6f914797cce6ce444ae2b51b705dee3d4b | [
"MIT"
] | null | null | null | tests/test_html.py | elisong/pycmd | 3d65ee6f914797cce6ce444ae2b51b705dee3d4b | [
"MIT"
] | null | null | null | tests/test_html.py | elisong/pycmd | 3d65ee6f914797cce6ce444ae2b51b705dee3d4b | [
"MIT"
] | null | null | null | import subprocess
from pathlib import Path
from pycmd.utils import Console
class TestHTML:
def test_no_table_found(self):
html_file = "tests/data/no_table.html"
result = subprocess.run(["python", "-m", "pycmd.html", html_file], capture_output=True)
assert Console.escape(result.stdout) == "! No tables found"
def test_one_table(self):
html_file = "tests/data/one_table.html"
result = subprocess.run(["python", "-m", "pycmd.html", html_file], capture_output=True)
assert "Crawl 1 tables" in Console.escape(result.stdout)
def test_two_table(self):
html_file = "tests/data/two_table.html"
result = subprocess.run(["python", "-m", "pycmd.html", html_file], capture_output=True)
assert "Crawl 2 tables" in Console.escape(result.stdout)
def test_save_one_table(self):
html_file = "tests/data/one_table.html"
csv_file = "tests/data/table.csv"
csv_path = Path(csv_file)
if csv_path.is_file():
csv_path.unlink()
assert not csv_path.is_file()
subprocess.run(["python", "-m", "pycmd.html", html_file, "-o", csv_file], stdout=subprocess.DEVNULL)
assert csv_path.is_file()
def test_save_two_table(self):
html_file = "tests/data/two_table.html"
csv_file = "tests/data/table.csv"
csv_path = Path(csv_file)
if csv_path.is_file():
csv_path.unlink()
assert not csv_path.is_file()
if Path(csv_path.parent, f"{csv_path.stem}_00{csv_path.suffix}").is_file():
Path(csv_path.parent, f"{csv_path.stem}_00{csv_path.suffix}").unlink()
assert not Path(csv_path.parent, f"{csv_path.stem}_00{csv_path.suffix}").is_file()
if Path(csv_path.parent, f"{csv_path.stem}_01{csv_path.suffix}").is_file():
Path(csv_path.parent, f"{csv_path.stem}_01{csv_path.suffix}").unlink()
assert not Path(csv_path.parent, f"{csv_path.stem}_01{csv_path.suffix}").is_file()
subprocess.run(["python", "-m", "pycmd.html", html_file, "-o", csv_file], stdout=subprocess.DEVNULL)
assert not csv_path.is_file()
assert Path(csv_path.parent, f"{csv_path.stem}_00{csv_path.suffix}").is_file()
assert Path(csv_path.parent, f"{csv_path.stem}_01{csv_path.suffix}").is_file()
def test_match(self):
html_file = "tests/data/two_table.html"
result = subprocess.run(["python", "-m", "pycmd.html", html_file, "-m", "Lily"], capture_output=True)
assert "Crawl 1 tables" in Console.escape(result.stdout)
def test_attrs(self):
html_file = "tests/data/two_table.html"
result = subprocess.run(["python", "-m", "pycmd.html", html_file, "-a", "id=table1"], capture_output=True)
assert "Crawl 1 tables" in Console.escape(result.stdout)
| 47.316667 | 114 | 0.652342 | 414 | 2,839 | 4.229469 | 0.137681 | 0.135922 | 0.066819 | 0.07767 | 0.884066 | 0.872073 | 0.866362 | 0.866362 | 0.843518 | 0.843518 | 0 | 0.009235 | 0.199014 | 2,839 | 59 | 115 | 48.118644 | 0.760774 | 0 | 0 | 0.5 | 0 | 0 | 0.251497 | 0.159915 | 0 | 0 | 0 | 0 | 0.26 | 1 | 0.14 | false | 0 | 0.06 | 0 | 0.22 | 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 |
ad6204e8e25ba39d0fdbc5bb182a544e58cdba71 | 64 | py | Python | src/reconstruction_methods/lasso.py | canbakiskan/cython-omp | a26f8cf8eca62ea7b0ad2272610a8f616eb0f9f3 | [
"Apache-2.0"
] | null | null | null | src/reconstruction_methods/lasso.py | canbakiskan/cython-omp | a26f8cf8eca62ea7b0ad2272610a8f616eb0f9f3 | [
"Apache-2.0"
] | null | null | null | src/reconstruction_methods/lasso.py | canbakiskan/cython-omp | a26f8cf8eca62ea7b0ad2272610a8f616eb0f9f3 | [
"Apache-2.0"
] | null | null | null | def lasso_numba():
pass
def lasso_batch_numba():
pass
| 9.142857 | 24 | 0.65625 | 9 | 64 | 4.333333 | 0.555556 | 0.410256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 64 | 6 | 25 | 10.666667 | 0.8125 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
a8db10da0366c9cb337cf9e2f8964ef74d81175a | 86 | py | Python | blog/admin.py | yeraydiazdiaz/nonrel-blog | fc5179561a15ada8cd30fd178aa5356d38d937ff | [
"BSD-3-Clause"
] | null | null | null | blog/admin.py | yeraydiazdiaz/nonrel-blog | fc5179561a15ada8cd30fd178aa5356d38d937ff | [
"BSD-3-Clause"
] | null | null | null | blog/admin.py | yeraydiazdiaz/nonrel-blog | fc5179561a15ada8cd30fd178aa5356d38d937ff | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from blog.models import *
admin.site.register(Post)
| 17.2 | 32 | 0.802326 | 13 | 86 | 5.307692 | 0.769231 | 0.318841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116279 | 86 | 4 | 33 | 21.5 | 0.907895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
d128806ab27e4031667dc1fb190f4635f1ae6864 | 119 | py | Python | dadata/exceptions.py | f213/dadata-client | dbd619d752a96bc0d48be51e07b53e8f9a795079 | [
"MIT"
] | 8 | 2018-06-11T13:35:30.000Z | 2021-11-12T12:17:52.000Z | dadata/exceptions.py | f213/dadata-client | dbd619d752a96bc0d48be51e07b53e8f9a795079 | [
"MIT"
] | 74 | 2018-06-12T17:29:15.000Z | 2020-05-18T02:13:36.000Z | dadata/exceptions.py | f213/dadata-client | dbd619d752a96bc0d48be51e07b53e8f9a795079 | [
"MIT"
] | 2 | 2018-06-12T16:05:37.000Z | 2018-08-05T21:39:18.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class DadataPaymentRequired(BaseException):
pass
| 17 | 43 | 0.747899 | 12 | 119 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009901 | 0.151261 | 119 | 6 | 44 | 19.833333 | 0.821782 | 0.176471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
66fbc24134464e61d4da8474c659a3d2e0442373 | 143 | py | Python | laxpy/__init__.py | brycefrank/laxpy | faa995ee786f44cfd09cb24fd6670ba427901105 | [
"MIT"
] | 5 | 2018-11-19T09:47:21.000Z | 2022-01-26T17:55:19.000Z | laxpy/__init__.py | brycefrank/laxpy | faa995ee786f44cfd09cb24fd6670ba427901105 | [
"MIT"
] | 3 | 2018-11-19T17:11:11.000Z | 2020-09-09T18:01:54.000Z | laxpy/__init__.py | brycefrank/laxpy | faa995ee786f44cfd09cb24fd6670ba427901105 | [
"MIT"
] | 2 | 2019-04-27T01:22:35.000Z | 2020-04-19T15:52:36.000Z | from __future__ import absolute_import
__version__ = '0.2.2'
from laxpy import file
from laxpy import tree
from laxpy.query import IndexedLAS | 20.428571 | 38 | 0.818182 | 22 | 143 | 4.909091 | 0.545455 | 0.25 | 0.277778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02439 | 0.13986 | 143 | 7 | 39 | 20.428571 | 0.853659 | 0 | 0 | 0 | 0 | 0 | 0.034722 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
0f0279903aafafcf39d1a6cedd7f020b5b53a078 | 38 | py | Python | layers/__init__.py | YusukeSuzuki/castanea2 | 69337b5c3034d2b8106df7591eb354749b2d40ce | [
"MIT"
] | null | null | null | layers/__init__.py | YusukeSuzuki/castanea2 | 69337b5c3034d2b8106df7591eb354749b2d40ce | [
"MIT"
] | null | null | null | layers/__init__.py | YusukeSuzuki/castanea2 | 69337b5c3034d2b8106df7591eb354749b2d40ce | [
"MIT"
] | null | null | null | # __init__.py
from .conv2d import *
| 7.6 | 21 | 0.684211 | 5 | 38 | 4.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033333 | 0.210526 | 38 | 4 | 22 | 9.5 | 0.7 | 0.289474 | 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 |
0f124968fdb1ce7c2b670729e6147882b0f3a178 | 149 | py | Python | mmdet/version.py | Gugan0905/steel-defect-detection | fd2f177ec0f04d319d1f47d93d44dc11d283b833 | [
"Apache-2.0"
] | 2 | 2021-06-29T05:51:30.000Z | 2021-10-17T17:42:47.000Z | mmdet/version.py | Gugan0905/steel-defect-detection | fd2f177ec0f04d319d1f47d93d44dc11d283b833 | [
"Apache-2.0"
] | null | null | null | mmdet/version.py | Gugan0905/steel-defect-detection | fd2f177ec0f04d319d1f47d93d44dc11d283b833 | [
"Apache-2.0"
] | null | null | null | # GENERATED VERSION FILE
# TIME: Tue Jul 21 13:51:13 2020
__version__ = '2.3.0rc0+c8f250d'
short_version = '2.3.0rc0'
version_info = (2, 3, "0rc0")
| 21.285714 | 32 | 0.691275 | 26 | 149 | 3.730769 | 0.615385 | 0.061856 | 0.185567 | 0.268041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 0.154362 | 149 | 6 | 33 | 24.833333 | 0.547619 | 0.355705 | 0 | 0 | 1 | 0 | 0.301075 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 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 |
0f62c80a1d191f4d2aed880e21f468134cb6a0eb | 260 | py | Python | backend/registry/models/__init__.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 10 | 2021-03-12T17:46:38.000Z | 2022-03-11T10:59:01.000Z | backend/registry/models/__init__.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 214 | 2021-03-10T19:24:17.000Z | 2022-03-15T07:34:24.000Z | backend/registry/models/__init__.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 9 | 2021-03-16T19:47:54.000Z | 2022-03-11T11:01:22.000Z | from .conformity import * # noqa
from .document import * # noqa
from .harvest import * # noqa
from .mapcontext import * # noqa
from .metadata import * # noqa
from .monitoring import * # noqa
from .security import * # noqa
from .service import * # noqa
| 28.888889 | 33 | 0.692308 | 32 | 260 | 5.625 | 0.34375 | 0.444444 | 0.544444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.215385 | 260 | 8 | 34 | 32.5 | 0.882353 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 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 | 1 | 0 | 0 | 6 |
0f6501e719a7a890172402b4bd6ae16358ca1b2f | 2,699 | py | Python | _unittests/ut_metrics/test_metrics.py | sdpython/lightmlboard | 15e3f9522e2b5f5ef9d358d2d42b9c1f271fc143 | [
"MIT"
] | null | null | null | _unittests/ut_metrics/test_metrics.py | sdpython/lightmlboard | 15e3f9522e2b5f5ef9d358d2d42b9c1f271fc143 | [
"MIT"
] | 1 | 2018-04-19T19:58:08.000Z | 2021-12-29T10:58:07.000Z | _unittests/ut_metrics/test_metrics.py | sdpython/lightmlboard | 15e3f9522e2b5f5ef9d358d2d42b9c1f271fc143 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@brief test log(time=1s)
"""
import unittest
from pyquickhelper.pycode import ExtTestCase
from lightmlboard.competition import Competition
class TestMetrics(ExtTestCase):
def test_mse(self):
compet = Competition(0, link="/compet", name="compet1",
description="description", metric="mse",
expected_values=[[0, 1, 2]])
res = compet.evaluate([[0, 1, 2]])
self.assertEqual(res, {'mse': 0.0})
res = compet.evaluate([[0, 4, 2]])
self.assertEqual(res, {'mse': 3.0})
def test_mean_squared_error(self):
compet = Competition(0, link="/compet", name="compet1",
description="description", metric="mean_squared_error",
expected_values=[[0, 1, 2]])
res = compet.evaluate([[0, 1, 2]])
self.assertEqual(res, {'mean_squared_error': 0.0})
res = compet.evaluate([[0, 4, 2]])
self.assertEqual(res, {'mean_squared_error': 3.0})
def test_roc_auc_score(self):
compet = Competition(0, link="/compet", name="compet1",
description="description", metric="roc_auc_score_micro",
expected_values=[0, 1, 0, 1])
res = compet.evaluate([[0, 1, 0, 1]])
self.assertEqual(res, {'roc_auc_score_micro': 1.0})
res = compet.evaluate(
[[0.1, 0.9], [0.1, 0.9], [0.1, 0.9], [0.9, 0.1]])
self.assertEqual(res, {'roc_auc_score_micro': 0.25})
res = compet.evaluate(
[[0.1, 0.9], [0.9, 0.1], [0.1, 0.9], [0.9, 0.1]])
self.assertEqual(res, {'roc_auc_score_micro': 0.0})
res = compet.evaluate(
[[0.9, 0.1], [0.1, 0.9], [0.9, 0.1], [0.1, 0.9]])
self.assertEqual(res, {'roc_auc_score_micro': 1.0})
compet = Competition(0, link="/compet", name="compet1",
description="description", metric="roc_auc_score_macro",
expected_values=[0, 1, 0, 1])
res = compet.evaluate([0, 1, 0, 1])
self.assertEqual(res, {'roc_auc_score_macro': 1.0})
res = compet.evaluate(
[[0.1, 0.9], [0.1, 0.9], [0.1, 0.9], [0.9, 0.1]])
self.assertEqual(res, {'roc_auc_score_macro': 0.25})
compet = Competition(0, link="/compet", name="compet1",
description="description", metric="roc_auc_score_micro",
expected_values=[0, 1, 0, 1])
res = compet.evaluate([[0.1, 0.9, 0.1, 0.9]])
self.assertEqual(res, {'roc_auc_score_micro': 1.0})
if __name__ == "__main__":
unittest.main()
| 42.171875 | 85 | 0.531678 | 354 | 2,699 | 3.89548 | 0.138418 | 0.04641 | 0.04351 | 0.034808 | 0.812183 | 0.807832 | 0.794779 | 0.771574 | 0.759246 | 0.748368 | 0 | 0.07628 | 0.290848 | 2,699 | 63 | 86 | 42.84127 | 0.644201 | 0.019266 | 0 | 0.5 | 0 | 0 | 0.146268 | 0 | 0 | 0 | 0 | 0 | 0.22 | 1 | 0.06 | false | 0 | 0.06 | 0 | 0.14 | 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 |
0f7981afcd5855d715bbf1e4cb50b68d3db6025f | 60 | py | Python | src/blueprints/multilingual/__init__.py | PseuToPy/PseuToPy-web | fe0d43b0c91b6ae115ba06cb5453df4ad7ca1292 | [
"MIT"
] | 1 | 2020-10-04T08:59:00.000Z | 2020-10-04T08:59:00.000Z | src/blueprints/multilingual/__init__.py | PseuToPy/PseuToPy-api | fe0d43b0c91b6ae115ba06cb5453df4ad7ca1292 | [
"MIT"
] | 4 | 2020-06-19T12:59:18.000Z | 2021-01-31T08:13:41.000Z | src/blueprints/multilingual/__init__.py | PseuToPy/PseuToPy-web | fe0d43b0c91b6ae115ba06cb5453df4ad7ca1292 | [
"MIT"
] | null | null | null | from src.blueprints.multilingual.routes import multilingual
| 30 | 59 | 0.883333 | 7 | 60 | 7.571429 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 60 | 1 | 60 | 60 | 0.946429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
7e1f20856183b95732bc52d24350f260a844eb41 | 8,082 | py | Python | polliwog/polyline/test_slice_by_plane.py | lace/polliwog | 7744ce171738e4739e391fcff4f4689d9f177196 | [
"BSD-2-Clause"
] | 18 | 2019-05-03T02:08:12.000Z | 2022-03-24T11:49:59.000Z | polliwog/polyline/test_slice_by_plane.py | lace/polliwog | 7744ce171738e4739e391fcff4f4689d9f177196 | [
"BSD-2-Clause"
] | 76 | 2019-04-03T15:24:01.000Z | 2022-03-01T14:07:04.000Z | polliwog/polyline/test_slice_by_plane.py | lace/polliwog | 7744ce171738e4739e391fcff4f4689d9f177196 | [
"BSD-2-Clause"
] | 3 | 2019-11-04T16:22:07.000Z | 2022-03-09T08:50:52.000Z | import numpy as np
from polliwog import Plane
import pytest
from vg.compat import v2 as vg
from ._slice_by_plane import slice_open_polyline_by_plane
point_on_plane = np.array([1.0, 2.0, 3.0])
plane_normal = vg.normalize(np.array([3.0, 4.0, 5.0]))
plane = Plane(point_on_plane=point_on_plane, unit_normal=plane_normal)
def rand_nonzero(*shape):
return 128 * np.random.rand(*shape) + 1e-6
def vertices_with_signs(signs):
num_verts = len(signs)
random_points_on_plane = plane.project_point(rand_nonzero(num_verts, 3))
random_displacement_along_normal = (
rand_nonzero(num_verts).reshape(-1, 1) * plane_normal
)
vertices = (
random_points_on_plane + signs.reshape(-1, 1) * random_displacement_along_normal
)
# Because of rounding, the random points don't necessarily return 0 for
# sign, so pick one that does.
vertices[signs == 0] = plane.reference_point
np.testing.assert_array_equal(plane.sign(vertices), signs)
return vertices
def intersect_segment_with_plane(p1, p2):
from ..plane import intersect_segment_with_plane as _intersect_segment_with_plane
return _intersect_segment_with_plane(
start_points=p1,
segment_vectors=p2 - p1,
points_on_plane=point_on_plane,
plane_normals=plane_normal,
)
def test_open_starts_in_front_ends_in_back():
signs = np.array([1, 1, 1, 1, 1, -1, -1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_almost_equal(
result,
np.vstack(
[
vertices[signs == 1],
[intersect_segment_with_plane(vertices[4], vertices[5])],
]
),
)
def test_open_starts_in_front_ends_in_back_with_vertex_on_plane():
signs = np.array([1, 1, 1, 0, -1, -1, -1, -1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices[signs >= 0])
def test_open_starts_in_back_ends_in_front():
signs = np.array([-1, -1, 1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_almost_equal(
result,
np.vstack(
[
[intersect_segment_with_plane(vertices[1], vertices[2])],
vertices[signs == 1],
]
),
)
def test_open_starts_in_back_ends_in_front_with_vertex_on_plane():
signs = np.array([-1, -1, -1, -1, -1, 0, 1, 1, 1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices[signs >= 0])
def test_open_starts_on_plane_ends_in_front():
signs = np.array([0, 1, 1, 1, 1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices)
def test_open_starts_with_edges_along_plane_ends_in_front():
signs = np.array([0, 0, 1, 1, 1, 1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices[1:])
def test_open_starts_on_plane_ends_in_back():
signs = np.array([0, -1, -1, -1, -1])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline has no vertices in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_starts_in_front_ends_on_plane():
signs = np.array([1, 1, 1, 1, 0])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices)
def test_open_starts_in_front_ends_with_edges_along_plane():
signs = np.array([1, 1, 1, 1, 0, 0])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices[:-1])
def test_open_in_back_then_ends_on_plane():
signs = np.array([-1, -1, -1, -1, 0])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline has no vertices in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_starts_in_front_then_along_plane_then_in_front_again():
signs = np.array([1, 1, 0, 0, 1])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline intersects the plane too many times"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_starts_in_back_then_in_front_then_in_back_again():
signs = np.array([-1, -1, 1, 1, 1, -1, -1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_almost_equal(
result,
np.vstack(
[
[intersect_segment_with_plane(vertices[1], vertices[2])],
vertices[signs == 1],
[intersect_segment_with_plane(vertices[4], vertices[5])],
]
),
)
def test_open_starts_in_back_then_along_plane_then_in_front_then_in_back_again():
signs = np.array([-1, -1, 0, 0, 1, 1, 1, -1, -1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_almost_equal(
result,
np.vstack(
[
vertices[3],
vertices[signs == 1],
[intersect_segment_with_plane(vertices[6], vertices[7])],
]
),
)
def test_open_starts_in_front_then_along_plane_then_in_back():
signs = np.array([1, 1, 0, 0, -1])
vertices = vertices_with_signs(signs)
result = slice_open_polyline_by_plane(vertices, plane)
np.testing.assert_array_equal(result, vertices[0:3])
def test_open_all_in_front():
signs = np.array([1, 1, 1])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline lies entirely in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_all_in_back():
signs = np.array([-1, -1, -1])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline has no vertices in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_all_in_plane():
signs = np.array([0, 0])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline has no vertices in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_one_vert_in_front():
signs = np.array([1])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline lies entirely in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_one_vert_in_back():
signs = np.array([-1])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline has no vertices in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_one_vert_on_plane():
signs = np.array([0])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="Polyline has no vertices in front of the plane"
):
slice_open_polyline_by_plane(vertices, plane)
def test_open_not_a_plane():
signs = np.array([1, -1])
vertices = vertices_with_signs(signs)
not_a_plane = []
with pytest.raises(
ValueError, match="plane should be an instance of polliwog.Plane"
):
slice_open_polyline_by_plane(vertices, not_a_plane)
def test_open_no_points():
signs = np.array([])
vertices = vertices_with_signs(signs)
with pytest.raises(
ValueError, match="A plane can't intersect a polyline with no points"
):
slice_open_polyline_by_plane(vertices, plane)
| 28.258741 | 88 | 0.682133 | 1,144 | 8,082 | 4.467657 | 0.092657 | 0.022305 | 0.020544 | 0.085502 | 0.800626 | 0.767756 | 0.758951 | 0.732538 | 0.70945 | 0.685384 | 0 | 0.023483 | 0.214922 | 8,082 | 285 | 89 | 28.357895 | 0.782033 | 0.012126 | 0 | 0.51269 | 0 | 0 | 0.062899 | 0 | 0 | 0 | 0 | 0 | 0.060914 | 1 | 0.126904 | false | 0 | 0.030457 | 0.005076 | 0.172589 | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.