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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bc455f2bf6db3b8691f8df5938fc8cc198437df9
| 189
|
py
|
Python
|
source_py2/combi/_python_toolbox/_bootstrap/__init__.py
|
cool-RR/combi
|
9c5c143a792ffd8fb38b6470f926268c8bacbc31
|
[
"MIT"
] | 23
|
2015-01-16T03:45:10.000Z
|
2021-08-11T20:46:44.000Z
|
source_py2/combi/_python_toolbox/_bootstrap/__init__.py
|
cool-RR/combi
|
9c5c143a792ffd8fb38b6470f926268c8bacbc31
|
[
"MIT"
] | 3
|
2015-01-30T15:59:45.000Z
|
2021-09-18T08:52:38.000Z
|
source_py3/combi/_python_toolbox/_bootstrap/__init__.py
|
cool-RR/combi
|
9c5c143a792ffd8fb38b6470f926268c8bacbc31
|
[
"MIT"
] | 1
|
2021-08-11T19:57:47.000Z
|
2021-08-11T19:57:47.000Z
|
# Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
'''A bootstrap package for `python_toolbox`. See module `bootstrap` here.'''
from . import bootstrap
| 31.5
| 76
| 0.756614
| 26
| 189
| 5.461538
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.049689
| 0.148148
| 189
| 6
| 77
| 31.5
| 0.832298
| 0.814815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bc6c8fb2a5e57539f0cef688a64d44aa88fae1b4
| 46
|
py
|
Python
|
server/django_project1/__init__.py
|
nullpointers-FZU/WeLearn
|
97a788a487916ced16dde876781f4adbe91aec49
|
[
"MIT"
] | 11
|
2019-05-19T02:48:37.000Z
|
2022-02-07T10:14:14.000Z
|
server/django_project1/__init__.py
|
nullpointers-FZU/WeLearn
|
97a788a487916ced16dde876781f4adbe91aec49
|
[
"MIT"
] | 20
|
2020-01-28T22:35:15.000Z
|
2022-03-11T23:38:45.000Z
|
server/django_project1/__init__.py
|
nullpointers-FZU/WeLearn
|
97a788a487916ced16dde876781f4adbe91aec49
|
[
"MIT"
] | 2
|
2019-11-01T07:11:27.000Z
|
2021-04-16T08:37:05.000Z
|
import pymysql
pymysql.install_as_MySQLdb()
| 15.333333
| 28
| 0.826087
| 6
| 46
| 6
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 3
| 28
| 15.333333
| 0.878049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bc74edf0bf0d8ef9e4bf133c259cbae80ffbd6de
| 280
|
py
|
Python
|
aminute/apps/api/__init__.py
|
zy0851/get-news
|
491166acb7b48315eb785a463021b5b8a88b0e60
|
[
"Apache-2.0"
] | 1
|
2019-11-19T00:16:45.000Z
|
2019-11-19T00:16:45.000Z
|
aminute/apps/api/__init__.py
|
zy0851/get-news
|
491166acb7b48315eb785a463021b5b8a88b0e60
|
[
"Apache-2.0"
] | 2
|
2021-03-31T19:46:46.000Z
|
2021-12-13T19:57:12.000Z
|
aminute/apps/api/__init__.py
|
zy0851/get-news
|
491166acb7b48315eb785a463021b5b8a88b0e60
|
[
"Apache-2.0"
] | 6
|
2019-07-23T09:47:52.000Z
|
2020-11-01T17:55:10.000Z
|
#!/usr/bin/env python
# encoding: utf-8
"""
@version: v1.0
@author: xag
@license: Apache Licence
@contact: xinganguo@gmail.com
@site: http://www.xingag.top
@software: PyCharm
@file: __init__.py.py
@time: 2018/7/24 22:26
@description:TODO
"""
from .views import bp
| 16.470588
| 30
| 0.671429
| 42
| 280
| 4.380952
| 0.97619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059829
| 0.164286
| 280
| 16
| 31
| 17.5
| 0.726496
| 0.860714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bc8c8c124b47d34bca95b4b7c780b56b3a29f225
| 429
|
py
|
Python
|
python/2020/august/aug-13/test.py
|
lineville/Daily-Coding-Problem
|
9088616669c5f183457c9238128f0d47b85097d9
|
[
"MIT"
] | null | null | null |
python/2020/august/aug-13/test.py
|
lineville/Daily-Coding-Problem
|
9088616669c5f183457c9238128f0d47b85097d9
|
[
"MIT"
] | 4
|
2021-08-09T00:30:32.000Z
|
2021-10-04T21:38:12.000Z
|
python/2020/august/aug-13/test.py
|
lineville/Daily-Coding-Problem
|
9088616669c5f183457c9238128f0d47b85097d9
|
[
"MIT"
] | null | null | null |
from main import closestDegrees, zero
# * ____________________________TESTS_________________________________
def testMidnight():
assert closestDegrees("12:00") == 0
def testSix():
assert closestDegrees("6:00") == 180
def testNine():
assert closestDegrees("9:00") == 90
def testFiveFortyEight():
assert closestDegrees("5:48") == 114
def testZero():
assert zero() == ['12:00']
| 17.875
| 71
| 0.657343
| 40
| 429
| 5.525
| 0.575
| 0.361991
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077151
| 0.214452
| 429
| 23
| 72
| 18.652174
| 0.578635
| 0.158508
| 0
| 0
| 0
| 0
| 0.065476
| 0
| 0
| 0
| 0
| 0
| 0.454545
| 1
| 0.454545
| true
| 0
| 0.090909
| 0
| 0.545455
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
bc9fe085be2f4f49b4e0fa3bdc546b2e3c2e3e54
| 110
|
py
|
Python
|
attic/testsuite/mock.py
|
AaronWebster/attic
|
be7e636b6de677776d57b788c9a435070063575d
|
[
"BSD-3-Clause"
] | 1
|
2022-02-11T21:46:40.000Z
|
2022-02-11T21:46:40.000Z
|
attic/testsuite/mock.py
|
AaronWebster/attic
|
be7e636b6de677776d57b788c9a435070063575d
|
[
"BSD-3-Clause"
] | 20
|
2022-02-14T07:54:49.000Z
|
2022-02-14T07:57:38.000Z
|
attic/testsuite/mock.py
|
AaronWebster/attic
|
be7e636b6de677776d57b788c9a435070063575d
|
[
"BSD-3-Clause"
] | null | null | null |
try:
# Only available in python 3.3+
from unittest.mock import *
except ImportError:
from mock import *
| 18.333333
| 33
| 0.718182
| 16
| 110
| 4.9375
| 0.75
| 0.253165
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022989
| 0.209091
| 110
| 5
| 34
| 22
| 0.885057
| 0.263636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bca8017a8e768f0402692899806998e72c0d3bf5
| 10,983
|
py
|
Python
|
BandoodleBackEnd/bands/tests.py
|
enriquefromojaro/Bandoodle-back-public
|
c5e391e886ac1e75ebc5820c90da44fdbec44f30
|
[
"MIT"
] | null | null | null |
BandoodleBackEnd/bands/tests.py
|
enriquefromojaro/Bandoodle-back-public
|
c5e391e886ac1e75ebc5820c90da44fdbec44f30
|
[
"MIT"
] | null | null | null |
BandoodleBackEnd/bands/tests.py
|
enriquefromojaro/Bandoodle-back-public
|
c5e391e886ac1e75ebc5820c90da44fdbec44f30
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.models import User
from django.test import TestCase
# Create your tests here.
from rest_framework import status
from rest_framework.test import APITestCase, APIClient
from bands.models import Band
URL_PREFIX = 'http://localhost:8000/api/bands/'
class BandTest(APITestCase):
def setUp(self):
self.user = User.objects.create_user('usuario', 'usuario@mail.com', 'usuario')
self.user.is_staff = False
self.admin = User.objects.create_superuser('admin', 'admin@mail.com', 'admin')
self.user.save()
self.band = Band.objects.create( name='nueva banda', genre='Rock')
Band.objects.create( name='baked potato', genre='Rock')
self.band.users.add(self.user)
self.band.users.add(self.admin)
# Creamos el cliente para realizar las peticiones y nos logueamos
self.client = APIClient()
# Iniciamos sesión con el usuario para que se le creen sesiones y así poder probar si se destruyen al borrarlo, etc.
# Se usa otro objeto APIClient porque de otra manera, al volver a loguearse con el administrador para hacer los tests,
# automáticamente hace logout y elimina su sesión, de manera que no podemos probar el que elimine las sesiones del usuario eliminado
test_client = APIClient()
test_client.login(username=self.user.username, password='usuario')
# Nos logueamos como administrador
self.client.login(username=self.admin.username, password='admin')
'''
------------------------------------------------------------------------------------------------------------------
***************** Tests CRUD OK **********************************************************************
------------------------------------------------------------------------------------------------------------------
'''
def test_list_ok(self):
response = self.client.get(URL_PREFIX)
self.assertEqual(response.status_code, status.HTTP_200_OK, 'Se esperaba un código de respuesta 200 (OK)')
def test_detail_ok(self):
response = self.client.get(URL_PREFIX + str(self.band.id) + '/')
self.assertEqual(response.status_code, status.HTTP_200_OK, 'Se esperaba un código de respuesta 200 (OK)')
def test_delete_ok(self):
#TODO: HACER EL TEST PARA LAS BANDAS
response = self.client.delete(URL_PREFIX + str(self.band.id) + '/')
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT,
'Se esperaba un código de respuesta 204 (NO CONTENT)')
def test_update_patch_ok(self):
#TODO: Hacer para una banda
data = {
'email': 'usuario@usu.com',
}
response = self.client.patch(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_200_OK, 'Se esperaba un código de respuesta 200 (OK)')
'''
------------------------------------------------------------------------------------------------------------------
***************** Tests ERRORES DE AUTENTICACIÓN / PERMISOS **********************************************
------------------------------------------------------------------------------------------------------------------
'''
def test_list_not_authenticated_ko(self):
self.client.logout()
response = self.client.get(URL_PREFIX)
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED,
'Se esperaba un código de respuesta 401 (UNAUTHORIZED')
def test_detail_not_authenticated_ko(self):
self.client.logout()
response = self.client.get(URL_PREFIX + str(self.admin) + '/')
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED,
'Se esperaba un código de respuesta 401 (UNAUTHORIZED')
def test_delete_not_authenticated_ko(self):
self.client.logout()
response = self.client.delete(URL_PREFIX + str(self.admin) + '/')
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED,
'Se esperaba un código de respuesta 401 (UNAUTHORIZED')
def test_create_not_authenticated_ko(self):
self.client.logout()
data = {
}
response = self.client.post(URL_PREFIX, data=data)
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED,
'Se esperaba un código de respuesta 401 (UNAUTHORIZED)')
def test_update_put_not_authenticated_ko(self):
self.client.logout()
data = {
'username': 'usuario_modificado',
'email': 'usuario@usu.com',
"first_name": "usuario",
"last_name": "usuarin"
}
response = self.client.put(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED,
'Se esperaba un código de respuesta 401 (UNAUTHORIZED')
def test_update_patch_not_authenticated_ko(self):
self.client.logout()
data = {
'email': 'usuario@usu.com',
}
response = self.client.patch(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED,
'Se esperaba un código de respuesta 401 (UNAUTHORIZED')
def test_list_unauthorized_user_ko(self):
self.client.logout()
self.client.login(username='usuario', password='usuario')
response = self.client.get(URL_PREFIX)
self.assertEqual(response.status_code, status.HTTP_200_OK,
'Se esperaba un código de respuesta 200 (OK')
def test_update_patch_authorized_user_ok(self):
#TODO: Hacer para una banda
self.client.logout()
self.client.login(username='usuario', password='usuario')
data = {
'email': 'usuario@usu.com',
}
response = self.client.patch(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_200_OK,
'Se esperaba un código de respuesta 200 (OK')
'''
------------------------------------------------------------------------------------------------------------------
***************** Tests ERRORES CRUD ******************************************************************
------------------------------------------------------------------------------------------------------------------
'''
def test_create_username_repetido_ko(self):
data = {
'username': 'usuario',
'email': 'usu@usu.com',
"first_name": "usuario",
"last_name": "usuarin"
}
response = self.client.post(URL_PREFIX, data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_create_no_datos_ko(self):
data = {}
response = self.client.post(URL_PREFIX, data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_create_falta_campo_obligatorio(self):
data = {
'email': 'usu@usu.com',
"first_name": "usuario",
"last_name": "usuarin"
}
response = self.client.post(URL_PREFIX, data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_create_username_blank_ko(self):
data = {
'username': '',
'email': 'usu@usu.com',
"first_name": "usuario",
"last_name": "usuarin"
}
response = self.client.post(URL_PREFIX, data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_detail_no_existe_ko(self):
response = self.client.get(URL_PREFIX + '9999999/')
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND,
'Se esperaba un código de respuesta 404 (NOT FOUND)')
def test_delete_no_existe_ko(self):
response = self.client.delete(URL_PREFIX + '9999999/')
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND,
'Se esperaba un código de respuesta 404 (NOT FOUND)')
def test_update_put_no_existe_ko(self):
data = {
'username': 'usuario_modificado',
'email': 'usuario@usu.com',
"first_name": "usuario",
"last_name": "usuarin"
}
response = self.client.put(URL_PREFIX + '9999999999/', data=data)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND,
'Se esperaba un código de respuesta 404 (NOT FOUND)')
def test_update_patch_no_existe_ko(self):
data = {
'email': 'usuario@usu.com',
}
response = self.client.patch(URL_PREFIX + '9999999999/', data=data)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND,
'Se esperaba un código de respuesta 404 (NOT FOUND)')
def test_update_put_username_repetido_ko(self):
# TODO: Hacer para una banda
data = {
'name': 'admin'
}
response = self.client.put(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_update_patch_name_repetido_ko(self):
# TODO: Hacer para una banda
data = {
'name': 'baked potato',
}
response = self.client.patch(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_update_put_name_blank_ko(self):
# TODO: Hacer para una banda
data = {
'name': ''
}
response = self.client.put(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
def test_update_patch_username_blank_ko(self):
#TODO: Hacer para una banda
data = {
'name': '',
}
response = self.client.patch(URL_PREFIX + str(self.band.id) + '/', data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST,
'Se esperaba un código de respuesta 400 (BAD REQUEST)')
| 42.902344
| 140
| 0.571884
| 1,217
| 10,983
| 4.974528
| 0.130649
| 0.059465
| 0.071358
| 0.114965
| 0.768087
| 0.751734
| 0.745953
| 0.725966
| 0.696729
| 0.696729
| 0
| 0.022082
| 0.249568
| 10,983
| 255
| 141
| 43.070588
| 0.712448
| 0.061641
| 0
| 0.575419
| 0
| 0
| 0.199826
| 0
| 0
| 0
| 0
| 0.011765
| 0.134078
| 1
| 0.139665
| false
| 0.022346
| 0.027933
| 0
| 0.173184
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
bcc13adb7e9598a5ca1649348ca7dfd7800cec17
| 201
|
py
|
Python
|
rook/core/responses.py
|
lysnikolaou/fastapi-boilerplate
|
84ea54b5172a24cec716ccacaf4c3805d7b02850
|
[
"MIT"
] | null | null | null |
rook/core/responses.py
|
lysnikolaou/fastapi-boilerplate
|
84ea54b5172a24cec716ccacaf4c3805d7b02850
|
[
"MIT"
] | null | null | null |
rook/core/responses.py
|
lysnikolaou/fastapi-boilerplate
|
84ea54b5172a24cec716ccacaf4c3805d7b02850
|
[
"MIT"
] | null | null | null |
import typing
from fastapi.responses import JSONResponse
class CustomJSONResponse(JSONResponse):
def render(self, content: typing.Any) -> bytes:
return super().render({"data": content})
| 22.333333
| 51
| 0.731343
| 22
| 201
| 6.681818
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159204
| 201
| 8
| 52
| 25.125
| 0.869822
| 0
| 0
| 0
| 0
| 0
| 0.019901
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
bcca5000c0e54a01e0ebd0f7aeae862d4a639ab8
| 39,391
|
py
|
Python
|
tensorflow_quantum/core/ops/tfq_ps_util_ops_test.py
|
sarvex/tensorflow-quantum
|
09ba5d35b082d8229458522471a0c1ca8b77198d
|
[
"Apache-2.0"
] | 1,501
|
2020-03-09T00:40:31.000Z
|
2022-03-28T19:59:57.000Z
|
tensorflow_quantum/core/ops/tfq_ps_util_ops_test.py
|
sarvex/tensorflow-quantum
|
09ba5d35b082d8229458522471a0c1ca8b77198d
|
[
"Apache-2.0"
] | 381
|
2020-03-09T18:31:04.000Z
|
2022-03-28T18:47:32.000Z
|
tensorflow_quantum/core/ops/tfq_ps_util_ops_test.py
|
sarvex/tensorflow-quantum
|
09ba5d35b082d8229458522471a0c1ca8b77198d
|
[
"Apache-2.0"
] | 410
|
2020-03-09T03:05:48.000Z
|
2022-03-31T12:08:14.000Z
|
# Copyright 2020 The TensorFlow Quantum 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.
# ==============================================================================
"""Test for ParameterShift specific C++ ops."""
import numpy as np
import tensorflow as tf
import sympy
import cirq
from tensorflow_quantum.core.ops import tfq_ps_util_ops
from tensorflow_quantum.python import util
def _complex_test_circuit():
t = sympy.Symbol('t')
r = sympy.Symbol('r')
qubits = cirq.GridQubit.rect(1, 6)
circuit_batch = [
cirq.Circuit(
cirq.Moment([cirq.H(q) for q in qubits]),
cirq.Moment([
cirq.X(qubits[4]),
cirq.PhasedXPowGate(phase_exponent=np.random.random() * t).on(
qubits[5]),
cirq.ISwapPowGate(exponent=np.random.random() * t).on(
qubits[0], qubits[1]),
cirq.FSimGate(theta=np.random.random() * t,
phi=np.random.random() * r).on(
qubits[2], qubits[3])
]), cirq.Moment([cirq.H(q) for q in qubits])),
cirq.Circuit(
cirq.FSimGate(theta=np.random.random() * t,
phi=np.random.random() * r).on(*qubits[:2]),
cirq.FSimGate(theta=np.random.random() * r,
phi=np.random.random() * t).on(qubits[1], qubits[0])),
cirq.Circuit(
cirq.Moment([
cirq.ISwapPowGate(exponent=np.random.random() *
t).on(*qubits[:2]),
cirq.PhasedXPowGate(phase_exponent=np.random.random() * r).on(
qubits[2]),
cirq.ISwapPowGate(exponent=np.random.random() *
r).on(*qubits[3:5])
]))
]
return circuit_batch
class PSDecomposeTest(tf.test.TestCase):
"""Tests on tfq_ps_decompose"""
def test_iswap_gate_test(self):
"""Test 1 ISwapPowGate decomposition."""
t = sympy.Symbol('t')
qubits = cirq.GridQubit.rect(1, 2)
circuit = cirq.Circuit(
cirq.ISwapPowGate(exponent=np.random.random() * t).on(*qubits))
inputs = util.convert_to_tensor([circuit])
outputs = tfq_ps_util_ops.tfq_ps_decompose(inputs)
decomposed_programs = util.from_tensor(outputs)
rand_resolver = {'t': np.random.random()}
self.assertAllClose(cirq.unitary(
cirq.resolve_parameters(circuit, rand_resolver)),
cirq.unitary(
cirq.resolve_parameters(decomposed_programs[0],
rand_resolver)),
atol=1e-5)
def test_phased_x_pow_gate_test(self):
"""Test 1 PhasedXPowGate decomposition."""
t = sympy.Symbol('t')
r = sympy.Symbol('r')
q = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(
cirq.PhasedXPowGate(phase_exponent=np.random.random() * r,
exponent=np.random.random() * t).on(q))
inputs = util.convert_to_tensor([circuit])
outputs = tfq_ps_util_ops.tfq_ps_decompose(inputs)
decomposed_programs = util.from_tensor(outputs)
rand_resolver = {'t': np.random.random(), 'r': np.random.random()}
self.assertAllClose(cirq.unitary(
cirq.resolve_parameters(circuit, rand_resolver)),
cirq.unitary(
cirq.resolve_parameters(decomposed_programs[0],
rand_resolver)),
atol=1e-5)
def test_fsim_gate_test(self):
"""Test 1 FSimPowGate decomposition."""
t = sympy.Symbol('t')
r = sympy.Symbol('r')
qubits = cirq.GridQubit.rect(1, 2)
circuit = cirq.Circuit(
cirq.FSimGate(theta=np.random.random() * r,
phi=np.random.random() * t).on(*qubits))
inputs = util.convert_to_tensor([circuit])
outputs = tfq_ps_util_ops.tfq_ps_decompose(inputs)
decomposed_programs = util.from_tensor(outputs)
rand_resolver = {'t': np.random.random(), 'r': np.random.random()}
self.assertAllClose(cirq.unitary(
cirq.resolve_parameters(circuit, rand_resolver)),
cirq.unitary(
cirq.resolve_parameters(decomposed_programs[0],
rand_resolver)),
atol=1e-5)
def test_decompose_with_complex_circuit(self):
"""Test decompose with complex circuit."""
names = ['CLAE', 'HRYV', 'IRKB', 'LKRV', 'PJOU', 'CJKX', 'NASW']
# Test circuit has a Moment with 1) FSimGate & PhasedXPowGate,
# 2) PhasedXPowGate & ISwapPowGate and 3) FSimGate & ISwapPowGate.
# Be careful, they are not decomposed if not parameterized.
circuit_batch = [
cirq.Circuit([
cirq.Moment([
cirq.FSimGate(
theta=0.10338130973488413 * sympy.Symbol('CLAE'),
phi=0.10338130973488413 * sympy.Symbol('IRKB')).on(
cirq.GridQubit(0, 2), cirq.GridQubit(0, 3)),
cirq.PhasedXPowGate(phase_exponent=1.0,
exponent=0.86426029696045281 *
sympy.Symbol('HRYV')).on(
cirq.GridQubit(0, 1)),
]),
cirq.Moment([
cirq.Y.on(cirq.GridQubit(0, 3)),
cirq.Z.on(cirq.GridQubit(0, 0)),
cirq.FSimGate(theta=1, phi=1).on(cirq.GridQubit(0, 1),
cirq.GridQubit(0, 2)),
]),
cirq.Moment([
(cirq.CNOT**(0.92874230274398684 *
sympy.Symbol('IRKB'))).on(
cirq.GridQubit(0, 1), cirq.GridQubit(0,
2)),
]),
cirq.Moment([
cirq.PhasedXPowGate(phase_exponent=sympy.Symbol('PJOU'),
exponent=0.2081415255258906 *
sympy.Symbol('LKRV')).on(
cirq.GridQubit(0, 2)),
(cirq.ISWAP**(0.32860954996781722 *
sympy.Symbol('PJOU'))).on(
cirq.GridQubit(0, 1),
cirq.GridQubit(0, 3)),
]),
cirq.Moment([
cirq.PhasedXPowGate(phase_exponent=sympy.Symbol('CJKX')).on(
cirq.GridQubit(0, 1)),
cirq.ZZ.on(cirq.GridQubit(0, 0), cirq.GridQubit(0, 3)),
(cirq.X**(0.6826594585474709 * sympy.Symbol('HRYV'))).on(
cirq.GridQubit(0, 2)),
]),
cirq.Moment([
(cirq.ZZ**(0.18781276022427218 * sympy.Symbol('PJOU'))).on(
cirq.GridQubit(0, 0), cirq.GridQubit(0, 3)),
]),
cirq.Moment([
cirq.Y.on(cirq.GridQubit(0, 0)),
]),
cirq.Moment([
cirq.FSimGate(
theta=0.13793763138552417 * sympy.Symbol('CJKX'),
phi=0.13793763138552417 * sympy.Symbol('PJOU')).on(
cirq.GridQubit(0, 2), cirq.GridQubit(0, 3)),
(cirq.ISWAP**(0.028165738453673095 *
sympy.Symbol('NASW'))).on(
cirq.GridQubit(0, 0),
cirq.GridQubit(0, 1)),
]),
cirq.Moment([
cirq.FSimGate(
theta=0.74356520426349459 * sympy.Symbol('CJKX'),
phi=0.74356520426349459 * sympy.Symbol('NASW')).on(
cirq.GridQubit(0, 3), cirq.GridQubit(0, 0)),
]),
cirq.Moment([
cirq.CNOT.on(cirq.GridQubit(0, 0), cirq.GridQubit(0, 2)),
cirq.SWAP.on(cirq.GridQubit(0, 3), cirq.GridQubit(0, 1)),
]),
cirq.Moment([
cirq.H.on(cirq.GridQubit(0, 3)),
cirq.H.on(cirq.GridQubit(0, 2)),
cirq.CNOT.on(cirq.GridQubit(0, 1), cirq.GridQubit(0, 0)),
]),
cirq.Moment([
cirq.CNOT.on(cirq.GridQubit(0, 0), cirq.GridQubit(0, 1)),
cirq.YY.on(cirq.GridQubit(0, 2), cirq.GridQubit(0, 3)),
]),
cirq.Moment([
cirq.CZ.on(cirq.GridQubit(0, 1), cirq.GridQubit(0, 0)),
cirq.CNOT.on(cirq.GridQubit(0, 2), cirq.GridQubit(0, 3)),
]),
cirq.Moment([
cirq.FSimGate(theta=1, phi=1).on(cirq.GridQubit(0, 0),
cirq.GridQubit(0, 2)),
cirq.CNOT.on(cirq.GridQubit(0, 3), cirq.GridQubit(0, 1)),
]),
cirq.Moment([
cirq.FSimGate(theta=1, phi=1).on(cirq.GridQubit(0, 0),
cirq.GridQubit(0, 3)),
cirq.SWAP.on(cirq.GridQubit(0, 2), cirq.GridQubit(0, 1)),
]),
cirq.Moment([
cirq.Y.on(cirq.GridQubit(0, 0)),
cirq.PhasedXPowGate(phase_exponent=1.0).on(
cirq.GridQubit(0, 2)),
cirq.FSimGate(theta=1, phi=1).on(cirq.GridQubit(0, 1),
cirq.GridQubit(0, 3)),
]),
])
]
# Decompose programs.
inputs = util.convert_to_tensor(circuit_batch)
outputs = tfq_ps_util_ops.tfq_ps_decompose(inputs)
decomposed_programs = util.from_tensor(outputs)
self.assertEqual(len(decomposed_programs), len(circuit_batch))
# Original programs has parameterized ISP, PXP, FSIM, but this result
# has no such gates at all. All parameterized gates have at most two
# eigenvalues. There are still ISwap and PhasedX(1.0) because they are
# not parameterized, which doesn't affect ParameterShift differentiation
# at all.
for program in decomposed_programs:
for moment in program:
for gate_op in moment:
# Consider parameterized gates only
if cirq.is_parameterized(gate_op.gate):
# Check I. The gate should have _eigen_components.
self.assertTrue(
hasattr(gate_op.gate, '_eigen_components'))
# Check II. The gate should have two eigen values.
self.assertEqual(len(gate_op.gate._eigen_components()),
2, gate_op.gate)
# Now all programs don't have ISWAP & PhasedXPowGate because ISWAP has
# 3 eigenvalues and PhasedXPowGate doesn't have _eigen_components.
# Check if two programs are identical.
rand_resolver = {name: np.random.random() for name in names}
self.assertAllClose(cirq.unitary(
cirq.resolve_parameters(circuit_batch[0], rand_resolver)),
cirq.unitary(
cirq.resolve_parameters(decomposed_programs[0],
rand_resolver)),
atol=1e-5)
def test_moment_preservation(self):
"""Test Moment-structure preservation."""
t = sympy.Symbol('t')
r = sympy.Symbol('r')
qubits = cirq.LineQubit.range(6)
circuit_batch = [
cirq.Circuit(
cirq.Moment([cirq.H(q) for q in qubits]),
cirq.Moment([
cirq.X(qubits[4]),
cirq.PhasedXPowGate(phase_exponent=np.random.random() *
t).on(qubits[5]),
cirq.ISwapPowGate(exponent=np.random.random() * t).on(
qubits[0], qubits[1]),
cirq.FSimGate(theta=np.random.random() * t,
phi=np.random.random() * r).on(
qubits[2], qubits[3])
]), cirq.Moment([cirq.H(q) for q in qubits]))
]
inputs = util.convert_to_tensor(circuit_batch)
outputs = tfq_ps_util_ops.tfq_ps_decompose(inputs)
decomposed_programs = util.from_tensor(outputs)
# Now all programs don't have ISWAP & PhasedXPowGate because ISWAP has
# 3 eigenvalues and PhasedXPowGate doesn't have _eigen_components.
# Check if two programs are identical.
rand_resolver = {'t': np.random.random(), 'r': np.random.random()}
self.assertAllClose(cirq.unitary(
cirq.resolve_parameters(circuit_batch[0], rand_resolver)),
cirq.unitary(
cirq.resolve_parameters(decomposed_programs[0],
rand_resolver)),
atol=1e-5)
# Check if the Moments are conserved.
max_decomposed_length = 3
n_non_decomposed_moments = 2
self.assertEqual(len(decomposed_programs[0]),
n_non_decomposed_moments + max_decomposed_length)
# Total length of Moments = 5
# The non-decomposed moments should be the same.
self.assertEqual(decomposed_programs[0][0], circuit_batch[0][0])
self.assertEqual(decomposed_programs[0][-1], circuit_batch[0][-1])
# Check paralellized decompose gates in Moment[1]~[3].
# The target ops are replaced by the first decomposition gates. It means
# the first Moment has exactly the same number of gate ops.
self.assertEqual(len(decomposed_programs[0][1]),
len(circuit_batch[0][1]))
# From the second Moments, the Moments only have decomposition gates.
# In this example, two ISwapPowGate & one PhasedXPowGate are located.
# Since PhasedXPowGate, ISwapPowGate, FSimGate has 3, 2, 3 result gates
# Moment[2] have 3 gate ops and Moment[3] have 2 gate ops.
self.assertEqual(len(decomposed_programs[0][2]), 3)
self.assertEqual(len(decomposed_programs[0][3]), 2)
def test_more_complex_moment_preservation(self):
"""Test Moment-structure preservation."""
circuit_batch = _complex_test_circuit()
inputs = util.convert_to_tensor(circuit_batch)
outputs = tfq_ps_util_ops.tfq_ps_decompose(inputs)
decomposed_programs = util.from_tensor(outputs)
# Now all programs don't have ISWAP & PhasedXPowGate because ISWAP has
# 3 eigenvalues and PhasedXPowGate doesn't have _eigen_components.
# Check if two programs are identical.
rand_resolver = {'t': np.random.random(), 'r': np.random.random()}
for i in range(3):
self.assertAllClose(cirq.unitary(
cirq.resolve_parameters(circuit_batch[i], rand_resolver)),
cirq.unitary(
cirq.resolve_parameters(
decomposed_programs[i], rand_resolver)),
atol=1e-5)
# Check if the Moments are conserved.
# Circuit 1.
max_decomposed_length = 3
n_non_decomposed_moments = 2
self.assertEqual(len(decomposed_programs[0]),
n_non_decomposed_moments + max_decomposed_length)
# Total length of Moments = 5
# The non-decomposed moments should be the same.
self.assertEqual(decomposed_programs[0][0], circuit_batch[0][0])
self.assertEqual(decomposed_programs[0][-1], circuit_batch[0][-1])
# Check paralellized decompose gates in Moment[1]~[3].
# The target ops are replaced by the first decomposition gates. It means
# the first Moment has exactly the same number of gate ops.
self.assertEqual(len(decomposed_programs[0][1]),
len(circuit_batch[0][1]))
# From the second Moments, the Moments only have decomposition gates.
# In this example, two ISwapPowGate & one PhasedXPowGate are located.
# Since PhasedXPowGate, ISwapPowGate, FSimGate has 3, 2, 3 result gates
# Moment[2] have 3 gate ops and Moment[3] have 2 gate ops.
self.assertEqual(len(decomposed_programs[0][2]), 3)
self.assertEqual(len(decomposed_programs[0][3]), 2)
# Circuit 2. two FSimGates.
self.assertEqual(len(decomposed_programs[1]), 2 * max_decomposed_length)
# Circuit 3. one PXP between two ISwapPowGates.
self.assertEqual(len(decomposed_programs[2]), max_decomposed_length)
class PSSymbolReplaceTest(tf.test.TestCase):
"""Tests tfq_ps_symbol_replace."""
def test_simple_case(self):
"""Test trivial case."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor(['alpha'])
new = tf.convert_to_tensor(['new'])
res = tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, new)
output = util.from_tensor(res)
correct_00 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('new'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
correct_01 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('new'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
correct_02 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('new'),
)
self.assertEqual(correct_00, output[0][0][0])
self.assertEqual(correct_01, output[0][0][1])
self.assertEqual(correct_02, output[0][0][2])
def test_error(self):
"""Ensure that errors happen with bad inputs."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(cirq.X(bit)**(sympy.Symbol('alpha') * 2))
inputs = util.convert_to_tensor([[circuit]])
symbols = tf.convert_to_tensor(['test'])
replacements = tf.convert_to_tensor(['nothing'])
with self.assertRaisesRegex(Exception,
expected_regex='rank 1. Got rank 2.'):
tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, replacements)
inputs = tf.convert_to_tensor(['junk'])
with self.assertRaisesRegex(Exception,
expected_regex='Unparseable proto:'):
tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, replacements)
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor([['test']])
replacements = tf.convert_to_tensor(['nothing'])
with self.assertRaisesRegex(Exception,
expected_regex='rank 1. Got rank 2.'):
tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, replacements)
symbols = tf.convert_to_tensor(['test'])
replacements = tf.convert_to_tensor([['nothing']])
with self.assertRaisesRegex(Exception,
expected_regex='rank 1. Got rank 2.'):
tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, replacements)
symbols = tf.convert_to_tensor(['test'])
replacements = tf.convert_to_tensor(['nothing', 'too long'])
with self.assertRaisesRegex(
Exception,
expected_regex=
'symbols.shape is not equal to replacement_symbols.shape'):
tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, replacements)
def test_weight_coefficient(self):
"""Test that scalar multiples of trivial case work."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.4),
cirq.Y(bit)**(sympy.Symbol('alpha') * 3.4),
cirq.Z(bit)**(sympy.Symbol('alpha') * 4.4),
)
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor(['alpha'])
new = tf.convert_to_tensor(['new'])
res = tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, new)
output = util.from_tensor(res)
correct_00 = cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('new') * 2.4),
cirq.Y(bit)**(sympy.Symbol('alpha') * 3.4),
cirq.Z(bit)**(sympy.Symbol('alpha') * 4.4),
)
correct_01 = cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.4),
cirq.Y(bit)**(sympy.Symbol('new') * 3.4),
cirq.Z(bit)**(sympy.Symbol('alpha') * 4.4),
)
correct_02 = cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.4),
cirq.Y(bit)**(sympy.Symbol('alpha') * 3.4),
cirq.Z(bit)**(sympy.Symbol('new') * 4.4),
)
for i, c in enumerate([correct_00, correct_01, correct_02]):
u1 = cirq.unitary(
cirq.resolve_parameters(c,
param_resolver={
'alpha': 1.23,
'new': 4.56
}))
u2 = cirq.unitary(
cirq.resolve_parameters(output[0][0][i],
param_resolver={
'alpha': 1.23,
'new': 4.56
}))
self.assertTrue(cirq.approx_eq(u1, u2, atol=1e-5))
def test_simple_pad(self):
"""Test simple padding."""
bit = cirq.LineQubit(1)
circuit = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
circuit2 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('beta'),
)
circuit3 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
inputs = util.convert_to_tensor([circuit, circuit2, circuit3])
symbols = tf.convert_to_tensor(['alpha', 'beta', 'gamma'])
new = tf.convert_to_tensor(['new', 'old', 'nothing'])
res = tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, new)
output = util.from_tensor(res)
correct_00 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('new'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
correct_01 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('new'),
cirq.Z(bit)**sympy.Symbol('alpha'),
)
correct_02 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('new'),
)
self.assertEqual(correct_00, output[0][0][0])
self.assertEqual(correct_01, output[0][0][1])
self.assertEqual(correct_02, output[0][0][2])
self.assertEqual(correct_00, output[2][0][0])
self.assertEqual(correct_01, output[2][0][1])
self.assertEqual(correct_02, output[2][0][2])
correct_10 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('old'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('beta'),
)
correct_11 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('old'),
cirq.Z(bit)**sympy.Symbol('beta'),
)
correct_12 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('old'),
)
self.assertEqual(correct_10, output[1][1][0])
self.assertEqual(correct_11, output[1][1][1])
self.assertEqual(correct_12, output[1][1][2])
correct_20 = cirq.Circuit()
correct_21 = cirq.Circuit()
correct_22 = cirq.Circuit()
self.assertEqual(correct_20, output[2][2][0])
self.assertEqual(correct_21, output[2][2][1])
self.assertEqual(correct_22, output[2][2][2])
correct = cirq.Circuit()
for i in range(3):
for j in range(3):
for k in range(3):
if i != j and (not (i == 2 and j == 0)):
self.assertEqual(correct, output[i][j][k])
def test_complex_pad(self):
"""Test trickier padding."""
bit = cirq.GridQubit(0, 0)
bit2 = cirq.GridQubit(0, 1)
circuit = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
circuit2 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('beta'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
circuit3 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
inputs = util.convert_to_tensor([circuit, circuit2, circuit3])
symbols = tf.convert_to_tensor(['alpha', 'beta', 'gamma'])
new = tf.convert_to_tensor(['new', 'old', 'nothing'])
res = tfq_ps_util_ops.tfq_ps_symbol_replace(inputs, symbols, new)
output = util.from_tensor(res)
correct_000 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('new'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
correct_001 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('new'),
cirq.Z(bit)**sympy.Symbol('alpha'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
correct_002 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('new'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
correct_003 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('alpha'),
cirq.Y(bit)**sympy.Symbol('alpha'),
cirq.Z(bit)**sympy.Symbol('alpha'),
cirq.XX(bit, bit2)**sympy.Symbol('new'))
self.assertEqual(correct_000, output[0][0][0])
self.assertEqual(correct_001, output[0][0][1])
self.assertEqual(correct_002, output[0][0][2])
self.assertEqual(correct_003, output[0][0][3])
self.assertEqual(correct_000, output[2][0][0])
self.assertEqual(correct_001, output[2][0][1])
self.assertEqual(correct_002, output[2][0][2])
self.assertEqual(correct_003, output[2][0][3])
correct_110 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('old'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('beta'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
correct_111 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('old'),
cirq.Z(bit)**sympy.Symbol('beta'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
correct_112 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('old'),
cirq.XX(bit, bit2)**sympy.Symbol('alpha'))
correct_113 = cirq.Circuit()
self.assertEqual(correct_110, output[1][1][0])
self.assertEqual(correct_111, output[1][1][1])
self.assertEqual(correct_112, output[1][1][2])
self.assertEqual(correct_113, output[1][1][3])
correct_100 = cirq.Circuit(
cirq.X(bit)**sympy.Symbol('beta'),
cirq.Y(bit)**sympy.Symbol('beta'),
cirq.Z(bit)**sympy.Symbol('beta'),
cirq.XX(bit, bit2)**sympy.Symbol('new'))
correct_101 = cirq.Circuit()
correct_102 = cirq.Circuit()
correct_103 = cirq.Circuit()
self.assertEqual(correct_100, output[1][0][0])
self.assertEqual(correct_101, output[1][0][1])
self.assertEqual(correct_102, output[1][0][2])
self.assertEqual(correct_103, output[1][0][3])
correct_220 = cirq.Circuit()
correct_221 = cirq.Circuit()
correct_222 = cirq.Circuit()
correct_223 = cirq.Circuit()
self.assertEqual(correct_220, output[2][2][0])
self.assertEqual(correct_221, output[2][2][1])
self.assertEqual(correct_222, output[2][2][2])
self.assertEqual(correct_223, output[2][2][3])
correct = cirq.Circuit()
for i in range(3):
for j in range(3):
for k in range(3):
if i != j and (not (i == 2 and j == 0)) \
and (not (i == 1 and j == 0)):
self.assertEqual(correct, output[i][j][k])
class PSWeightsFromSymbolTest(tf.test.TestCase):
"""Tests tfq_ps_weights_from_symbols."""
def test_simple(self):
"""Ensure that weight extraction works."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(cirq.X(bit)**(sympy.Symbol('alpha') * 2))
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor(['alpha'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(res, np.array([[[2.0]]]))
def test_empty(self):
"""Test empty circuit. and symbol free circuit. does nothing."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(cirq.X(bit))
circuit2 = cirq.Circuit()
inputs = util.convert_to_tensor([circuit, circuit2])
symbols = tf.convert_to_tensor(['alpha'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(res, np.array([[[]], [[]]]))
def test_rotation_gates(self):
"""Test that rotation gates work."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(cirq.rx(sympy.Symbol('alpha') * 5.0)(bit))
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor(['alpha'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(res, np.array([[[5.0 / np.pi]]]))
def test_error(self):
"""Ensure if a symbol can't be found the op errors."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(cirq.X(bit)**(sympy.Symbol('delta') * 2))
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor(['alpha', 'delta'])
tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
symbols = tf.convert_to_tensor(['alpha'])
with self.assertRaisesRegex(Exception, expected_regex='sympy.Symbol'):
tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
symbols = tf.convert_to_tensor([['delta']])
with self.assertRaisesRegex(Exception,
expected_regex='rank 1. Got rank 2.'):
tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
inputs = tf.convert_to_tensor(['junk'])
symbols = tf.convert_to_tensor(['delta'])
with self.assertRaisesRegex(Exception,
expected_regex='Unparseable proto:'):
tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
inputs = util.convert_to_tensor([[circuit]])
with self.assertRaisesRegex(Exception,
expected_regex='rank 1. Got rank 2.'):
tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
def test_many_values(self):
"""Ensure that padding with few symbols and many values works."""
bit = cirq.LineQubit(1)
circuits = [
cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.0),
cirq.Y(bit)**(sympy.Symbol('alpha') * 3.0),
cirq.Z(bit)**(sympy.Symbol('alpha')),
cirq.X(bit)**(sympy.Symbol('alpha') * 4.0)),
cirq.Circuit(cirq.X(bit)**(sympy.Symbol('alpha') * 9.0)),
cirq.Circuit(cirq.X(bit)**sympy.Symbol('beta'))
]
inputs = util.convert_to_tensor(circuits)
symbols = tf.convert_to_tensor(['alpha', 'beta'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(
res,
np.array([[[2.0, 3.0, 1.0, 4.0], [0.0, 0.0, 0.0, 0.0]],
[[9.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]],
[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0]]]))
def test_many_symbols(self):
"""Ensure that padding with few values and many symbols works."""
bit = cirq.GridQubit(0, 0)
circuits = [
cirq.Circuit(cirq.X(bit)**(sympy.Symbol('alpha') * 2.0)),
cirq.Circuit(cirq.X(bit)**(sympy.Symbol('beta') * 6)),
cirq.Circuit(cirq.X(bit)**(sympy.Symbol('alpha') * 5.0)),
cirq.Circuit(cirq.X(bit)**(sympy.Symbol('gamma') * 8)),
cirq.Circuit(cirq.X(bit)**(sympy.Symbol('delta') * 9))
]
inputs = util.convert_to_tensor(circuits)
symbols = tf.convert_to_tensor(['alpha', 'beta', 'gamma', 'delta'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(
res,
np.array([[[2.0], [0.0], [0.0], [0.0]], [[0.0], [6.0], [0.0],
[0.0]],
[[5.0], [0.0], [0.0], [0.0]], [[0.0], [0.0], [8.0],
[0.0]],
[[0.0], [0.0], [0.0], [9.0]]]))
def test_out_of_order(self):
"""Test that discovery order of symbols in circuits doesn't matter."""
bit = cirq.GridQubit(0, 0)
circuit = cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2),
cirq.Y(bit)**(sympy.Symbol('beta') * 3))
inputs = util.convert_to_tensor([circuit])
symbols = tf.convert_to_tensor(['alpha', 'beta'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(res, np.array([[[2.0], [3.0]]]))
symbols = tf.convert_to_tensor(['beta', 'alpha'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(res, np.array([[[3.0], [2.0]]]))
def test_padding(self):
"""Ensure that the padding is correct in a complex example."""
bit = cirq.GridQubit(0, 0)
circuits = [
cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.0),
cirq.Y(bit)**(sympy.Symbol('alpha') * 3.0),
cirq.Z(bit)**(sympy.Symbol('beta') * 4.0),
),
cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.0),
cirq.Y(bit)**(sympy.Symbol('beta') * 3.0),
cirq.Z(bit)**(sympy.Symbol('beta') * 4.0),
),
cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.0),
cirq.Y(bit)**(sympy.Symbol('beta') * 3.0),
cirq.Z(bit)**(sympy.Symbol('gamma') * 4.0),
)
]
inputs = util.convert_to_tensor(circuits)
symbols = tf.convert_to_tensor(['alpha', 'beta', 'gamma'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(
res,
np.array([[[2.0, 3.0], [4.0, 0.0], [0.0, 0.0]],
[[2.0, 0.0], [3.0, 4.0], [0.0, 0.0]],
[[2.0, 0.0], [3.0, 0.0], [4.0, 0.0]]]))
def test_padding_with_non_parameterized_gates(self):
"""Ensure that the padding is correct in a complex example."""
bit = cirq.GridQubit(0, 0)
circuits = [
cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.0),
cirq.Y(bit)**3.0,
cirq.Z(bit)**(sympy.Symbol('beta') * 4.0),
),
cirq.Circuit(
cirq.X(bit)**(sympy.Symbol('alpha') * 2.0),
cirq.Y(bit)**(sympy.Symbol('beta') * 3.0),
cirq.Z(bit)**4.0,
),
cirq.Circuit(
cirq.X(bit)**2.0,
cirq.Y(bit)**(sympy.Symbol('beta') * 3.0),
cirq.Z(bit)**(sympy.Symbol('gamma') * 4.0),
)
]
inputs = util.convert_to_tensor(circuits)
symbols = tf.convert_to_tensor(['alpha', 'beta', 'gamma'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
self.assertAllClose(
res,
np.array([[[2.0], [4.0], [0.0]], [[2.0], [3.0], [0.0]],
[[0.0], [3.0], [4.0]]]))
def test_ignorance(self):
"""Test ignorance of ISP, PXP, FSIM gates."""
circuit_batch = _complex_test_circuit()
inputs = util.convert_to_tensor(circuit_batch)
symbols = tf.convert_to_tensor(['r', 't'])
res = tfq_ps_util_ops.tfq_ps_weights_from_symbols(inputs, symbols)
# Because there are no weights to be gathered, the last dimension = 0
self.assertAllClose(tf.shape(res), [len(circuit_batch), 2, 0])
if __name__ == "__main__":
tf.test.main()
| 46.561466
| 80
| 0.530654
| 4,607
| 39,391
| 4.406555
| 0.075971
| 0.08236
| 0.079306
| 0.057091
| 0.827299
| 0.785084
| 0.756958
| 0.705532
| 0.680853
| 0.662233
| 0
| 0.041362
| 0.326699
| 39,391
| 845
| 81
| 46.616568
| 0.724078
| 0.103602
| 0
| 0.640114
| 0
| 0
| 0.032882
| 0.000712
| 0
| 0
| 0
| 0
| 0.113798
| 1
| 0.031294
| false
| 0
| 0.008535
| 0
| 0.045519
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
bcec0feb384c1fe94e70bca3e014e1d56c4e537e
| 20,316
|
py
|
Python
|
app/src/thirdparty/telemetry/internal/backends/remote/trybot_browser_finder_unittest.py
|
ta2edchimp/big-rig
|
d08ffaa34b1496ca6c8e69a8797d280583472156
|
[
"Apache-2.0"
] | 925
|
2015-11-06T03:04:46.000Z
|
2017-09-16T19:08:43.000Z
|
app/src/thirdparty/telemetry/internal/backends/remote/trybot_browser_finder_unittest.py
|
ta2edchimp/big-rig
|
d08ffaa34b1496ca6c8e69a8797d280583472156
|
[
"Apache-2.0"
] | 29
|
2015-11-09T17:37:28.000Z
|
2017-08-16T17:50:11.000Z
|
app/src/thirdparty/telemetry/internal/backends/remote/trybot_browser_finder_unittest.py
|
ta2edchimp/big-rig
|
d08ffaa34b1496ca6c8e69a8797d280583472156
|
[
"Apache-2.0"
] | 51
|
2015-11-08T07:06:38.000Z
|
2017-08-21T07:27:19.000Z
|
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
import StringIO
import unittest
from telemetry.internal.backends.remote import trybot_browser_finder
from telemetry.internal.browser import browser_options
from telemetry.testing import simple_mock
from telemetry.testing import system_stub
class TrybotBrowserFinderTest(unittest.TestCase):
def setUp(self):
self.log_output = StringIO.StringIO()
self.stream_handler = logging.StreamHandler(self.log_output)
logging.getLogger().addHandler(self.stream_handler)
self._real_subprocess = trybot_browser_finder.subprocess
self._real_urllib2 = trybot_browser_finder.urllib2
self._stubs = system_stub.Override(trybot_browser_finder,
['sys', 'open', 'os'])
def tearDown(self):
logging.getLogger().removeHandler(self.stream_handler)
self.log_output.close()
trybot_browser_finder.subprocess = self._real_subprocess
trybot_browser_finder.urllib2 = self._real_urllib2
self._stubs.Restore()
def _ExpectProcesses(self, args):
mock_subprocess = simple_mock.MockObject()
mock_subprocess.SetAttribute('PIPE', simple_mock.MockObject())
for arg in args:
mock_popen = simple_mock.MockObject()
mock_popen.ExpectCall('communicate').WillReturn(arg[1][1:])
mock_popen.ExpectCall('poll').WillReturn(arg[1][0])
mock_subprocess.ExpectCall(
'Popen').WithArgs(arg[0]).WillReturn(mock_popen)
trybot_browser_finder.subprocess = mock_subprocess
def _MockTryserverJson(self, bots_dict):
trybot_browser_finder.urllib2 = simple_mock.MockObject()
trybot_browser_finder.urllib2.ExpectCall('urlopen').WithArgs(
'http://build.chromium.org/p/tryserver.chromium.perf/json').WillReturn(
StringIO.StringIO(json.dumps({'builders': bots_dict})))
def test_find_all_browser_types_list(self):
finder_options = browser_options.BrowserFinderOptions(browser_type='list')
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'mac_10_9_perf_bisect': 'otherstuff',
'win_perf_bisect_builder': 'not a trybot',
})
expected_trybots_list = [
'trybot-all',
'trybot-all-android',
'trybot-all-linux',
'trybot-all-mac',
'trybot-all-win',
'trybot-android-nexus4',
'trybot-mac-10-9'
]
self.assertEquals(
expected_trybots_list,
sorted(trybot_browser_finder.FindAllBrowserTypes(finder_options)))
def test_find_all_browser_types_trybot(self):
finder_options = browser_options.BrowserFinderOptions(
browser_type='trybot-win')
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'mac_10_9_perf_bisect': 'otherstuff',
'win_perf_bisect_builder': 'not a trybot',
})
expected_trybots_list = [
'trybot-all',
'trybot-all-android',
'trybot-all-linux',
'trybot-all-mac',
'trybot-all-win',
'trybot-android-nexus4',
'trybot-mac-10-9'
]
self.assertEquals(
expected_trybots_list,
sorted(trybot_browser_finder.FindAllBrowserTypes(finder_options)))
def test_find_all_browser_types_non_trybot_browser(self):
finder_options = browser_options.BrowserFinderOptions(
browser_type='release')
trybot_browser_finder.urllib2 = simple_mock.MockObject()
self.assertEquals(
[],
# pylint: disable=W0212
sorted(trybot_browser_finder.FindAllBrowserTypes(finder_options)))
def test_constructor(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'mac_10_9_perf_bisect': 'otherstuff',
'win_perf_bisect_builder': 'not a trybot',
})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self.assertEquals('android', browser.target_os)
# pylint: disable=W0212
self.assertTrue('android' in browser._builder_names)
self.assertEquals(['android_nexus4_perf_bisect'],
browser._builder_names.get('android'))
def test_constructor_trybot_all(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'android_nexus5_perf_bisect': 'stuff2',
'mac_10_9_perf_bisect': 'otherstuff',
'mac_perf_bisect': 'otherstuff1',
'win_perf_bisect': 'otherstuff2',
'linux_perf_bisect': 'otherstuff3',
'win_x64_perf_bisect': 'otherstuff4',
'win_perf_bisect_builder': 'not a trybot',
})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-all', finder_options)
self.assertEquals('all', browser.target_os)
# pylint: disable=W0212
self.assertEquals(
['android', 'linux', 'mac', 'win', 'win-x64'],
sorted(browser._builder_names))
self.assertEquals(
['android_nexus4_perf_bisect', 'android_nexus5_perf_bisect'],
sorted(browser._builder_names.get('android')))
self.assertEquals(
['mac_10_9_perf_bisect', 'mac_perf_bisect'],
sorted(browser._builder_names.get('mac')))
self.assertEquals(
['linux_perf_bisect'], sorted(browser._builder_names.get('linux')))
self.assertEquals(
['win_perf_bisect'], sorted(browser._builder_names.get('win')))
self.assertEquals(
['win_x64_perf_bisect'], sorted(browser._builder_names.get('win-x64')))
def test_constructor_trybot_all_win(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'android_nexus5_perf_bisect': 'stuff2',
'win_8_perf_bisect': 'otherstuff',
'win_perf_bisect': 'otherstuff2',
'linux_perf_bisect': 'otherstuff3',
'win_x64_perf_bisect': 'otherstuff4',
'win_perf_bisect_builder': 'not a trybot',
})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-all-win', finder_options)
self.assertEquals('all', browser.target_os)
# pylint: disable=W0212
self.assertEquals(
['win', 'win-x64'],
sorted(browser._builder_names))
self.assertEquals(
['win_8_perf_bisect', 'win_perf_bisect'],
sorted(browser._builder_names.get('win')))
self.assertEquals(
['win_x64_perf_bisect'], sorted(browser._builder_names.get('win-x64')))
def test_constructor_trybot_all_android(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'android_nexus5_perf_bisect': 'stuff2',
'win_8_perf_bisect': 'otherstuff',
'win_perf_bisect': 'otherstuff2',
'linux_perf_bisect': 'otherstuff3',
'win_x64_perf_bisect': 'otherstuff4',
'win_perf_bisect_builder': 'not a trybot',
})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-all-android', finder_options)
self.assertEquals(
['android_nexus4_perf_bisect', 'android_nexus5_perf_bisect'],
sorted(browser._builder_names.get('android')))
def test_constructor_trybot_all_mac(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'win_8_perf_bisect': 'otherstuff',
'mac_perf_bisect': 'otherstuff2',
'win_perf_bisect_builder': 'not a trybot',
})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-all-mac', finder_options)
self.assertEquals('all', browser.target_os)
# pylint: disable=W0212
self.assertEquals(
['mac'],
sorted(browser._builder_names))
self.assertEquals(
['mac_perf_bisect'],
sorted(browser._builder_names.get('mac')))
def test_constructor_trybot_all_linux(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({
'android_nexus4_perf_bisect': 'stuff',
'linux_perf_bisect': 'stuff1',
'win_8_perf_bisect': 'otherstuff',
'mac_perf_bisect': 'otherstuff2',
'win_perf_bisect_builder': 'not a trybot',
})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-all-linux', finder_options)
self.assertEquals('all', browser.target_os)
# pylint: disable=W0212
self.assertEquals(
['linux'],
sorted(browser._builder_names))
self.assertEquals(
['linux_perf_bisect'],
sorted(browser._builder_names.get('linux')))
def test_no_git(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (128, None, None)),
))
browser.RunRemote()
self.assertEquals(
'Must be in a git repository to send changes to trybots.\n',
self.log_output.getvalue())
def test_dirty_tree(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (0, 'br', None)),
(['git', 'update-index', '--refresh', '-q'], (0, None, None,)),
(['git', 'diff-index', 'HEAD'], (0, 'dirty tree', None)),
))
browser.RunRemote()
self.assertEquals(
'Cannot send a try job with a dirty tree. Commit locally first.\n',
self.log_output.getvalue())
def test_no_local_commits(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (0, 'br', None)),
(['git', 'update-index', '--refresh', '-q'], (0, None, None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'log', 'origin/master..HEAD'], (0, '', None)),
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (0, 'br', None)),
(['git', 'update-index', '--refresh', '-q'], (0, None, None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'log', 'origin/master..HEAD'], (0, '', None)),
))
browser.RunRemote()
self.assertEquals(
('No local changes found in chromium or blink trees. '
'browser=trybot-android-nexus4 argument sends local changes to the '
'perf trybot(s): '
'[[\'android_nexus4_perf_bisect\']].\n'),
self.log_output.getvalue())
def test_branch_checkout_fails(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (0, 'br', None)),
(['git', 'update-index', '--refresh', '-q'], (0, None, None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'log', 'origin/master..HEAD'], (0, 'logs here', None)),
(['git', 'checkout', '-b', 'telemetry-tryjob'],
(1, None, 'fatal: A branch named \'telemetry-try\' already exists.')),
))
browser.RunRemote()
self.assertEquals(
('Error creating branch telemetry-tryjob. '
'Please delete it if it exists.\n'
'fatal: A branch named \'telemetry-try\' already exists.\n'),
self.log_output.getvalue())
def _GetConfigForBrowser(self, name, platform, branch, cfg_filename,
is_blink=False):
finder_options = browser_options.BrowserFinderOptions()
bot = '%s_perf_bisect' % name.replace('trybot-', '').replace('-', '_')
self._MockTryserverJson({bot: 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(name, finder_options)
first_processes = ()
if is_blink:
first_processes = (
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (0, 'br', None)),
(['git', 'update-index', '--refresh', '-q'], (0, None, None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'log', 'origin/master..HEAD'], (0, '', None))
)
self._ExpectProcesses(first_processes + (
(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], (0, branch, None)),
(['git', 'update-index', '--refresh', '-q'], (0, None, None,)),
(['git', 'diff-index', 'HEAD'], (0, '', None)),
(['git', 'log', 'origin/master..HEAD'], (0, 'logs here', None)),
(['git', 'checkout', '-b', 'telemetry-tryjob'], (0, None, None)),
(['git', 'branch', '--set-upstream-to', 'origin/master'],
(0, None, None)),
(['git', 'commit', '-a', '-m', 'bisect config: %s' % platform],
(0, None, None)),
(['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
'CL for perf tryjob on %s' % platform],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf', '-b', bot],
(0, None, None)),
(['git', 'checkout', branch], (0, None, None)),
(['git', 'branch', '-D', 'telemetry-tryjob'], (0, None, None))
))
self._stubs.sys.argv = [
'tools/perf/run_benchmark',
'--browser=%s' % browser,
'sunspider']
cfg = StringIO.StringIO()
self._stubs.open.files = {cfg_filename: cfg}
browser.RunRemote()
return cfg.getvalue()
def test_config_android(self):
config = self._GetConfigForBrowser(
'trybot-android-nexus4', 'android', 'somebranch',
'tools/run-perf-test.cfg')
self.assertEquals(
('config = {\n'
' "command": "./tools/perf/run_benchmark '
'--browser=android-chromium sunspider",\n'
' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n'
' "target_arch": "ia32",\n'
' "truncate_percent": "0"\n'
'}'), config)
def test_config_mac(self):
config = self._GetConfigForBrowser(
'trybot-mac-10-9', 'mac', 'currentwork', 'tools/run-perf-test.cfg')
self.assertEquals(
('config = {\n'
' "command": "./tools/perf/run_benchmark '
'--browser=release sunspider",\n'
' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n'
' "target_arch": "ia32",\n'
' "truncate_percent": "0"\n'
'}'), config)
def test_config_win_x64(self):
config = self._GetConfigForBrowser(
'trybot-win-x64', 'win-x64', 'currentwork', 'tools/run-perf-test.cfg')
self.assertEquals(
('config = {\n'
' "command": "python tools\\\\perf\\\\run_benchmark '
'--browser=release_x64 sunspider",\n'
' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n'
' "target_arch": "x64",\n'
' "truncate_percent": "0"\n'
'}'), config)
def test_config_blink(self):
config = self._GetConfigForBrowser(
'trybot-mac-10-9', 'mac', 'blinkbranch',
'Tools/run-perf-test.cfg', True)
self.assertEquals(
('config = {\n'
' "command": "./tools/perf/run_benchmark '
'--browser=release sunspider",\n'
' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n'
' "target_arch": "ia32",\n'
' "truncate_percent": "0"\n'
'}'), config)
def test_update_config_git_commit_tryboterror(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'commit', '-a', '-m', 'bisect config: android'],
(128, 'None', 'commit failed')),
(['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
'CL for perf tryjob on android'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf', '-b',
'android_nexus4_perf_bisect'], (0, None, None))))
self._stubs.sys.argv = [
'tools/perf/run_benchmark',
'--browser=%s' % browser,
'sunspider']
cfg_filename = 'tools/run-perf-test.cfg'
cfg = StringIO.StringIO()
self._stubs.open.files = {cfg_filename: cfg}
self.assertRaises(trybot_browser_finder.TrybotError,
browser._UpdateConfigAndRunTryjob, 'android', cfg_filename)
def test_update_config_git_upload_tryboterror(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'commit', '-a', '-m', 'bisect config: android'],
(0, 'None', None)),
(['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
'CL for perf tryjob on android'],
(128, None, 'error')),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf', '-b',
'android_nexus4_perf_bisect'], (0, None, None))))
self._stubs.sys.argv = [
'tools/perf/run_benchmark',
'--browser=%s' % browser,
'sunspider']
cfg_filename = 'tools/run-perf-test.cfg'
cfg = StringIO.StringIO()
self._stubs.open.files = {cfg_filename: cfg}
self.assertRaises(trybot_browser_finder.TrybotError,
browser._UpdateConfigAndRunTryjob, 'android', cfg_filename)
def test_update_config_git_try_tryboterror(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'commit', '-a', '-m', 'bisect config: android'],
(0, 'None', None)),
(['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
'CL for perf tryjob on android'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf', '-b',
'android_nexus4_perf_bisect'], (128, None, None))))
self._stubs.sys.argv = [
'tools/perf/run_benchmark',
'--browser=%s' % browser,
'sunspider']
cfg_filename = 'tools/run-perf-test.cfg'
cfg = StringIO.StringIO()
self._stubs.open.files = {cfg_filename: cfg}
self.assertRaises(trybot_browser_finder.TrybotError,
browser._UpdateConfigAndRunTryjob, 'android', cfg_filename)
def test_update_config_git_try(self):
finder_options = browser_options.BrowserFinderOptions()
self._MockTryserverJson({'android_nexus4_perf_bisect': 'stuff'})
browser = trybot_browser_finder.PossibleTrybotBrowser(
'trybot-android-nexus4', finder_options)
self._ExpectProcesses((
(['git', 'commit', '-a', '-m', 'bisect config: android'],
(0, 'None', None)),
(['git', 'cl', 'upload', '-f', '--bypass-hooks', '-m',
'CL for perf tryjob on android'],
(0, 'stuff https://codereview.chromium.org/12345 stuff', None)),
(['git', 'cl', 'try', '-m', 'tryserver.chromium.perf', '-b',
'android_nexus4_perf_bisect'], (0, None, None))))
self._stubs.sys.argv = [
'tools/perf/run_benchmark',
'--browser=%s' % browser,
'sunspider']
cfg_filename = 'tools/run-perf-test.cfg'
cfg = StringIO.StringIO()
self._stubs.open.files = {cfg_filename: cfg}
self.assertEquals((0, 'https://codereview.chromium.org/12345'),
browser._UpdateConfigAndRunTryjob('android', cfg_filename))
| 41.376782
| 79
| 0.63546
| 2,218
| 20,316
| 5.563571
| 0.112263
| 0.055916
| 0.047731
| 0.044733
| 0.810778
| 0.769449
| 0.738088
| 0.720583
| 0.698703
| 0.659806
| 0
| 0.0162
| 0.203928
| 20,316
| 490
| 80
| 41.461224
| 0.7468
| 0.014127
| 0
| 0.696629
| 0
| 0
| 0.301279
| 0.08842
| 0
| 0
| 0
| 0
| 0.080899
| 1
| 0.058427
| false
| 0.011236
| 0.017978
| 0
| 0.080899
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4c2ac7fef64884be4cb9a8c8930be3a4e673d4f8
| 198
|
py
|
Python
|
applications/baseapp/management/template_structures/application/__init__.py
|
ajitjasrotia/django-project-skeleton
|
70e3e06384dfb018f59b1af8c7c3febf2bbcd47c
|
[
"MIT"
] | 48
|
2018-01-10T11:21:35.000Z
|
2021-09-08T23:28:07.000Z
|
applications/baseapp/management/template_structures/application/__init__.py
|
ajitjasrotia/django-project-skeleton
|
70e3e06384dfb018f59b1af8c7c3febf2bbcd47c
|
[
"MIT"
] | 26
|
2018-04-20T10:46:00.000Z
|
2019-09-21T06:47:13.000Z
|
applications/baseapp/management/template_structures/application/__init__.py
|
ajitjasrotia/django-project-skeleton
|
70e3e06384dfb018f59b1af8c7c3febf2bbcd47c
|
[
"MIT"
] | 20
|
2019-03-09T19:46:10.000Z
|
2022-03-27T14:57:03.000Z
|
# isort:skip_file
# flake8: noqa
from .html import TEMPLATE_HTML
from .apps import TEMPLATE_APPS
from .urls import TEMPLATE_URLS
from .views import TEMPLATE_VIEWS
from .tests import TEMPLATE_TESTS
| 22
| 33
| 0.823232
| 30
| 198
| 5.233333
| 0.433333
| 0.44586
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005814
| 0.131313
| 198
| 8
| 34
| 24.75
| 0.906977
| 0.141414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4c36979022d0799b8c5397f94f60dbacee0c116e
| 125
|
py
|
Python
|
Python Advanced/File Handling/Lab/file_delete.py
|
DonikaChervenkova/SoftUni
|
bff579c037ec48f39ed193b34bc3502a32e90732
|
[
"MIT"
] | null | null | null |
Python Advanced/File Handling/Lab/file_delete.py
|
DonikaChervenkova/SoftUni
|
bff579c037ec48f39ed193b34bc3502a32e90732
|
[
"MIT"
] | null | null | null |
Python Advanced/File Handling/Lab/file_delete.py
|
DonikaChervenkova/SoftUni
|
bff579c037ec48f39ed193b34bc3502a32e90732
|
[
"MIT"
] | 1
|
2021-12-04T12:30:57.000Z
|
2021-12-04T12:30:57.000Z
|
import os
if os.path.exists("my_first_file.txt"):
os.remove("my_first_file.txt")
else:
print('File already deleted!')
| 25
| 39
| 0.712
| 21
| 125
| 4.047619
| 0.666667
| 0.164706
| 0.258824
| 0.329412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128
| 125
| 5
| 40
| 25
| 0.779817
| 0
| 0
| 0
| 0
| 0
| 0.436508
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4c394f7cb473fc210d695106d10aef302a2cd2cc
| 2,164
|
py
|
Python
|
auth0_client/commands/user_blocks.py
|
rubelw/auth0_client
|
51e68239babcf7c40e40491d1aaa3f8547a67f63
|
[
"MIT"
] | 2
|
2020-10-08T21:42:56.000Z
|
2021-03-21T08:17:52.000Z
|
auth0_client/commands/user_blocks.py
|
rubelw/auth0_client
|
51e68239babcf7c40e40491d1aaa3f8547a67f63
|
[
"MIT"
] | null | null | null |
auth0_client/commands/user_blocks.py
|
rubelw/auth0_client
|
51e68239babcf7c40e40491d1aaa3f8547a67f63
|
[
"MIT"
] | null | null | null |
import click
from auth0_client.Auth0Client import Auth0Client
from auth0_client.cli_util import ( get_config_dict, group, highlight)
@group(short_help='User Blocks')
def user_blocks():
""" Connections """
user_blocks.help = highlight(user_blocks.help, ['Create:', 'Delete:', 'Update:'], 'green')
@user_blocks.command()
@click.option('--ini', '-i', help='INI file with needed information', required=True)
@click.option('--identifier', '-d', help=' Should be any of: username, phone_number, email.', required=True)
@click.option('--debug', help='Turn on debugging', required=False, is_flag=True)
def get_blocks_by_identifier(
ini,
identifier,
debug
):
client = Auth0Client(get_config_dict(ini, debug))
print(client.get_blocks_by_identifier(identifier))
@user_blocks.command()
@click.option('--ini', '-i', help='INI file with needed information', required=True)
@click.option('--identifier', '-d', help=' Should be any of: username, phone_number, email.', required=True)
@click.option('--debug', help='Turn on debugging', required=False, is_flag=True)
def unblock_by_identifier(
ini,
identifier,
debug
):
client = Auth0Client(get_config_dict(ini, debug))
print(client.unblock_by_identifier(identifier))
@user_blocks.command()
@click.option('--ini', '-i', help='INI file with needed information', required=True)
@click.option('--user-id', '-u', help='user id', required=True)
@click.option('--debug', help='Turn on debugging', required=False, is_flag=True)
def get_a_users_blocks(
ini,
user_id,
debug
):
client = Auth0Client(get_config_dict(ini, debug))
print(client.list_user_blocks(user_id))
@user_blocks.command()
@click.option('--ini', '-i', help='INI file with needed information', required=True)
@click.option('--user-id', '-u', help='The user_id of the user to update.', required=True)
@click.option('--debug', help='Turn on debugging', required=False, is_flag=True)
def unblock_a_user(
ini,
user_id,
debug
):
client = Auth0Client(get_config_dict(ini, debug))
print(client.unblock_a_user(user_id))
| 32.298507
| 108
| 0.689002
| 290
| 2,164
| 4.965517
| 0.206897
| 0.091667
| 0.094444
| 0.127778
| 0.783333
| 0.783333
| 0.783333
| 0.783333
| 0.783333
| 0.783333
| 0
| 0.004364
| 0.152957
| 2,164
| 66
| 109
| 32.787879
| 0.781233
| 0.005083
| 0
| 0.68
| 0
| 0
| 0.223156
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| false
| 0
| 0.06
| 0
| 0.16
| 0.08
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4c587f01efe7f5ae9c758f2b998b88a75d0bae0e
| 33
|
py
|
Python
|
eisenmann-backend/core/models/__init__.py
|
RubenRodrigo/Eisenmann-Inventory
|
5abb59a11d43987db3d1742b6f0978c6aa6ee81d
|
[
"MIT"
] | 2
|
2016-12-12T21:45:12.000Z
|
2016-12-19T23:53:43.000Z
|
lib/FluentDB/model/__init__.py
|
olavoasantos/FluentDB
|
ab645d2c4e3c73971ca259e89feaa2b967b22e8e
|
[
"MIT"
] | null | null | null |
lib/FluentDB/model/__init__.py
|
olavoasantos/FluentDB
|
ab645d2c4e3c73971ca259e89feaa2b967b22e8e
|
[
"MIT"
] | null | null | null |
from .BaseModel import BaseModel
| 16.5
| 32
| 0.848485
| 4
| 33
| 7
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 1
| 33
| 33
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d5bcc9eb2794c1a37e8ff3481c1e4c3af9499aa8
| 47
|
py
|
Python
|
python/testData/resolve/DunderClassInDeclaration.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/resolve/DunderClassInDeclaration.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/resolve/DunderClassInDeclaration.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
class A:
print(__class__)
# <ref>
| 15.666667
| 20
| 0.489362
| 5
| 47
| 3.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.382979
| 47
| 3
| 21
| 15.666667
| 0.655172
| 0.106383
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
d5f8968aa1fb7330a4249efdabd32d4783069ef2
| 181
|
py
|
Python
|
ppsystem/anmelden/admin.py
|
holytortoise/ppsystem
|
639efbc25f6d0c0c03be9c8688c551ba71cad560
|
[
"MIT"
] | null | null | null |
ppsystem/anmelden/admin.py
|
holytortoise/ppsystem
|
639efbc25f6d0c0c03be9c8688c551ba71cad560
|
[
"MIT"
] | null | null | null |
ppsystem/anmelden/admin.py
|
holytortoise/ppsystem
|
639efbc25f6d0c0c03be9c8688c551ba71cad560
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Rfid,Schüler,Zeit
# Register your models here.
admin.site.register(Rfid)
admin.site.register(Schüler)
admin.site.register(Zeit)
| 25.857143
| 37
| 0.812155
| 27
| 181
| 5.444444
| 0.481481
| 0.183673
| 0.346939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088398
| 181
| 6
| 38
| 30.166667
| 0.890909
| 0.143646
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d5ffd34b8509a681c1399b6f4f78e2a422646ceb
| 275
|
py
|
Python
|
src/vendoring/errors.py
|
domdfcoding/vendoring
|
227aece55127fc304980f930c57fbd55bb4408ca
|
[
"MIT"
] | 33
|
2019-11-21T13:46:59.000Z
|
2022-03-03T15:13:36.000Z
|
src/vendoring/errors.py
|
domdfcoding/vendoring
|
227aece55127fc304980f930c57fbd55bb4408ca
|
[
"MIT"
] | 37
|
2019-12-14T22:19:20.000Z
|
2022-02-19T07:09:01.000Z
|
src/vendoring/errors.py
|
domdfcoding/vendoring
|
227aece55127fc304980f930c57fbd55bb4408ca
|
[
"MIT"
] | 10
|
2020-02-06T06:13:41.000Z
|
2021-07-26T21:54:29.000Z
|
class VendoringError(Exception):
"""Errors originating from this package."""
class ConfigurationError(VendoringError):
"""Errors related to configuration handling."""
class RequirementsError(VendoringError):
"""Errors related to requirements.txt handling."""
| 25
| 54
| 0.752727
| 25
| 275
| 8.28
| 0.64
| 0.193237
| 0.26087
| 0.280193
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134545
| 275
| 10
| 55
| 27.5
| 0.869748
| 0.450909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
9131335014df51d8225351a11daacd99dcf3b739
| 3,672
|
py
|
Python
|
tests/test_user/test_handlers/test_logout.py
|
nknaian/album_recs
|
b96981befb355261b4c02eadc8690863a1e9b285
|
[
"MIT"
] | 2
|
2021-02-11T02:44:42.000Z
|
2021-02-25T01:37:48.000Z
|
tests/test_user/test_handlers/test_logout.py
|
nknaian/album_recs
|
b96981befb355261b4c02eadc8690863a1e9b285
|
[
"MIT"
] | 79
|
2020-10-06T12:47:42.000Z
|
2022-03-03T17:56:03.000Z
|
tests/test_user/test_handlers/test_logout.py
|
nknaian/albumrecs
|
b96981befb355261b4c02eadc8690863a1e9b285
|
[
"MIT"
] | null | null | null |
from musicrecs.enums import MusicType, SnoozinRecType
from flask.helpers import url_for
from musicrecs.database.helpers import add_round_to_db, add_user_to_db
from tests.test_user import UserTestCase
class UserLogoutTestCase(UserTestCase):
"""Test flows involving POST to the user.logout route
"""
def test_logout_user_from_mainindex(self):
# Add a fake user to the database
add_user_to_db(self.DUMMY_USER_SP_ID, self.DUMMY_USER_DISPLAY_NAME)
# Mock authentication of the fake user
self.auth_dummy_user()
# Make POST to logout page from the main index page
response = self.client.post(
url_for('user.logout'),
data=dict(logout_from_spotify="Log out"),
follow_redirects=True,
headers={
"Referer": url_for('main.index') # set 'request.referrer' ('Referer' is not a typo lol)
}
)
# Verify that post was successful and redirected back to the main page
# NOTE: I have a hacky solution of puttting in a string of text I know
# will be on the main page. I can't figure out how to check the url
# of the response so this is the best I could come up with.
self.assert200(response)
self.assertIn(bytes("Musicrecs is a platform", 'utf-8'), response.data)
def test_logout_user_from_userprofile(self):
# Add a fake user to the database
add_user_to_db(self.DUMMY_USER_SP_ID, self.DUMMY_USER_DISPLAY_NAME)
# Mock authentication of the fake user
self.auth_dummy_user()
# Make POST to logout page from the user profile page
response = self.client.post(
url_for('user.logout'),
data=dict(logout_from_spotify="Log out"),
follow_redirects=True,
headers={
"Referer": url_for('user.profile') # set 'request.referrer' ('Referer' is not a typo lol)
}
)
# Verify that post was successful and redirected back to the main page
# NOTE: I have a hacky solution of puttting in a string of text I know
# will be on the main page. I can't figure out how to check the url
# of the response so this is the best I could come up with.
self.assert200(response)
self.assertIn(bytes("Musicrecs is a platform", 'utf-8'), response.data)
def test_logout_user_from_round(self):
# Add a fake user to the database
add_user_to_db(self.DUMMY_USER_SP_ID, self.DUMMY_USER_DISPLAY_NAME)
# Mock authentication of the fake user
self.auth_dummy_user()
# Add a round to logout from
round = add_round_to_db(
description="Trackrecs random round",
music_type=MusicType.track,
snoozin_rec_type=SnoozinRecType.random,
)
# Make POST to logout page from the round page
response = self.client.post(
url_for('user.logout'),
data=dict(logout_from_spotify="Log out"),
follow_redirects=True,
headers={
# set 'request.referrer' ('Referer' is not a typo lol)
"Referer": url_for('round.index', long_id=round.long_id)
}
)
# Verify that post was successful and redirected back to the round page
# NOTE: I have a hacky solution of puttting in a string of text I know
# will be on the round page. I can't figure out how to check the url
# of the response so this is the best I could come up with.
self.assert200(response)
self.assertIn(bytes("Share the Round Link", 'utf-8'), response.data)
| 40.351648
| 106
| 0.641068
| 524
| 3,672
| 4.347328
| 0.219466
| 0.035558
| 0.034241
| 0.019315
| 0.770413
| 0.761194
| 0.761194
| 0.749342
| 0.749342
| 0.73266
| 0
| 0.004582
| 0.286765
| 3,672
| 90
| 107
| 40.8
| 0.865216
| 0.376906
| 0
| 0.530612
| 0
| 0
| 0.093446
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 1
| 0.061224
| false
| 0
| 0.081633
| 0
| 0.163265
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
913275782ed82535b16403894a64d90bfcb53250
| 1,249
|
py
|
Python
|
nonbonded/tests/backend/crud/test_force_field.py
|
SimonBoothroyd/nonbonded
|
3efbb7d943d936b47248975f9ad0d8a006ea8684
|
[
"MIT"
] | 5
|
2020-05-11T18:25:00.000Z
|
2022-01-27T10:55:09.000Z
|
nonbonded/tests/backend/crud/test_force_field.py
|
SimonBoothroyd/nonbonded
|
3efbb7d943d936b47248975f9ad0d8a006ea8684
|
[
"MIT"
] | 88
|
2020-06-02T14:40:05.000Z
|
2022-03-02T09:20:39.000Z
|
nonbonded/tests/backend/crud/test_force_field.py
|
SimonBoothroyd/nonbonded
|
3efbb7d943d936b47248975f9ad0d8a006ea8684
|
[
"MIT"
] | null | null | null |
from sqlalchemy.orm import Session
from nonbonded.backend.database import models
from nonbonded.backend.database.crud.forcefield import ParameterCRUD
from nonbonded.library.models.forcefield import Parameter
def test_create(db: Session):
parameter = Parameter(handler_type="vdW", smirks="[#6:1]", attribute_name="epsilon")
db_parameter = ParameterCRUD.create(db, parameter)
db.add(db_parameter)
db.commit()
assert db.query(models.Parameter.id).count() == 1
def test_duplicate_separate_commits(db: Session):
parameter = Parameter(handler_type="vdW", smirks="[#6:1]", attribute_name="epsilon")
db_parameter = ParameterCRUD.create(db, parameter)
db.add(db_parameter)
db.commit()
db_parameter = ParameterCRUD.create(db, parameter)
db.add(db_parameter)
db.commit()
assert db.query(models.Parameter.id).count() == 1
def test_duplicate_same_commit(db: Session):
parameter = Parameter(handler_type="vdW", smirks="[#6:1]", attribute_name="epsilon")
db_parameter = ParameterCRUD.create(db, parameter)
db.add(db_parameter)
db_parameter_2 = ParameterCRUD.create(db, parameter)
db.add(db_parameter_2)
db.commit()
assert db.query(models.Parameter.id).count() == 1
| 26.574468
| 88
| 0.729384
| 162
| 1,249
| 5.469136
| 0.234568
| 0.18623
| 0.132054
| 0.1693
| 0.739278
| 0.739278
| 0.739278
| 0.739278
| 0.687359
| 0.687359
| 0
| 0.01029
| 0.144115
| 1,249
| 46
| 89
| 27.152174
| 0.818522
| 0
| 0
| 0.666667
| 0
| 0
| 0.038431
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.111111
| false
| 0
| 0.148148
| 0
| 0.259259
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e68a59301020a293e699130eeebae088276da4ff
| 175
|
py
|
Python
|
seq_experiment/io/__init__.py
|
campenr/seq-experiment
|
68d389777c8e3b6af1318212196fda974802779a
|
[
"BSD-3-Clause"
] | 1
|
2018-01-04T15:04:14.000Z
|
2018-01-04T15:04:14.000Z
|
seq_experiment/io/__init__.py
|
campenr/seq-experiment
|
68d389777c8e3b6af1318212196fda974802779a
|
[
"BSD-3-Clause"
] | null | null | null |
seq_experiment/io/__init__.py
|
campenr/seq-experiment
|
68d389777c8e3b6af1318212196fda974802779a
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Copyright (c) 2018, Richard Campen
All rights reserved.
Licensed under the Modified BSD License.
For full license terms see LICENSE.txt
"""
from .mothur import MothurIO
| 17.5
| 40
| 0.765714
| 25
| 175
| 5.36
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027211
| 0.16
| 175
| 9
| 41
| 19.444444
| 0.884354
| 0.771429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e696bc724e333d98035845ea96c476820ebbab05
| 45
|
py
|
Python
|
week_2_Feb_5/front_times/ron_solution.py
|
FunWithPythonProgramming/coding-bat-exercises
|
0383fb5ebbea2befac21791e3cfc8a393abf9b4a
|
[
"MIT"
] | null | null | null |
week_2_Feb_5/front_times/ron_solution.py
|
FunWithPythonProgramming/coding-bat-exercises
|
0383fb5ebbea2befac21791e3cfc8a393abf9b4a
|
[
"MIT"
] | 8
|
2020-02-18T03:18:09.000Z
|
2022-01-13T02:53:27.000Z
|
week_2_Feb_5/front_times/ron_solution.py
|
FunWithPythonProgramming/coding-bat-exercises
|
0383fb5ebbea2befac21791e3cfc8a393abf9b4a
|
[
"MIT"
] | null | null | null |
def front_times(str, n):
return str[0:3]*n
| 15
| 24
| 0.666667
| 10
| 45
| 2.9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.155556
| 45
| 2
| 25
| 22.5
| 0.710526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
e6a64d62b8aad84c69d50fddb7754013e2ef5572
| 91
|
py
|
Python
|
yk_utils/objects/__init__.py
|
jppdpf/yk-utils-python
|
2c101feda900713c8cbb0223326031ba09cd48e9
|
[
"MIT"
] | null | null | null |
yk_utils/objects/__init__.py
|
jppdpf/yk-utils-python
|
2c101feda900713c8cbb0223326031ba09cd48e9
|
[
"MIT"
] | null | null | null |
yk_utils/objects/__init__.py
|
jppdpf/yk-utils-python
|
2c101feda900713c8cbb0223326031ba09cd48e9
|
[
"MIT"
] | 1
|
2022-02-16T19:04:33.000Z
|
2022-02-16T19:04:33.000Z
|
""" Objects Module Init """
from .object_operations import convert_to_string, datetime2str
| 30.333333
| 62
| 0.802198
| 11
| 91
| 6.363636
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012346
| 0.10989
| 91
| 2
| 63
| 45.5
| 0.851852
| 0.208791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e6bc8aa41f9835981043ab98e8430b1de0969f6f
| 1,770
|
py
|
Python
|
FoodScan/ShopList/ShopList.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | 1
|
2017-03-16T00:59:01.000Z
|
2017-03-16T00:59:01.000Z
|
FoodScan/ShopList/ShopList.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | null | null | null |
FoodScan/ShopList/ShopList.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from FoodScan.items import *
class ShopList:
def __init__(self):
pass
@abc.abstractmethod
def is_meta_item(self, task):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def create_web_hook(self, url, port):
raise NotImplementedError('users must define __str__ to use this base class')
def list_tasks(self):
raise NotImplementedError('users must define __str__ to use this base class')
def list_items(self):
for task in self.list_tasks():
if not self.is_meta_item(task):
yield task, self.item_from_task(task)
@abc.abstractmethod
def list_revision(self):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def task_sub_tasks(self, iid):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def item_from_task(self, task, with_selects=True):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def create_item(self, item):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def update_item(self, task, item, rebuild_notes=False, rebuild_subs=False):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def delete_item(self, task):
raise NotImplementedError('users must define __str__ to use this base class')
@abc.abstractmethod
def task_position(self, iid, position):
raise NotImplementedError('users must define __str__ to use this base class')
| 33.396226
| 85
| 0.702825
| 229
| 1,770
| 5.139738
| 0.235808
| 0.203908
| 0.246389
| 0.280374
| 0.684792
| 0.684792
| 0.684792
| 0.684792
| 0.684792
| 0.684792
| 0
| 0.000725
| 0.220904
| 1,770
| 52
| 86
| 34.038462
| 0.852792
| 0.011864
| 0
| 0.513514
| 0
| 0
| 0.274757
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.324324
| false
| 0.027027
| 0.027027
| 0
| 0.378378
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e6d61f871894d2bb7b7c32bcc884558a7fef6a91
| 82
|
py
|
Python
|
utilities/console.py
|
nlowery/org-sandbox
|
6e570331424310a8ca78a6c928f98a16dddb9b1c
|
[
"MIT"
] | null | null | null |
utilities/console.py
|
nlowery/org-sandbox
|
6e570331424310a8ca78a6c928f98a16dddb9b1c
|
[
"MIT"
] | null | null | null |
utilities/console.py
|
nlowery/org-sandbox
|
6e570331424310a8ca78a6c928f98a16dddb9b1c
|
[
"MIT"
] | null | null | null |
from layers.console import ConsoleLayer
def log(txt):
ConsoleLayer().log(txt)
| 20.5
| 39
| 0.756098
| 11
| 82
| 5.636364
| 0.727273
| 0.193548
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134146
| 82
| 4
| 40
| 20.5
| 0.873239
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e6f232bc18415c79ccfdbdf512f3e059f04112fd
| 192
|
py
|
Python
|
day2/day2-02 remind 2.py
|
hajin-kim/2020-HighSchool-Python-Tutoring
|
352025a954bff37d21cc3d59e7d5e0f0269a1f17
|
[
"MIT"
] | null | null | null |
day2/day2-02 remind 2.py
|
hajin-kim/2020-HighSchool-Python-Tutoring
|
352025a954bff37d21cc3d59e7d5e0f0269a1f17
|
[
"MIT"
] | null | null | null |
day2/day2-02 remind 2.py
|
hajin-kim/2020-HighSchool-Python-Tutoring
|
352025a954bff37d21cc3d59e7d5e0f0269a1f17
|
[
"MIT"
] | null | null | null |
a = float( input('give a number: ') )
b = float( input('give a number: ') )
print(a, '+', b, '=', a+b)
print(a, '-', b, '=', a-b)
print(a, '*', b, '=', a*b)
print(a, '/', b, '=', a/b)
| 24
| 38
| 0.416667
| 32
| 192
| 2.5
| 0.21875
| 0.2
| 0.35
| 0.4
| 0.975
| 0.45
| 0.45
| 0.45
| 0.45
| 0.45
| 0
| 0
| 0.229167
| 192
| 7
| 39
| 27.428571
| 0.540541
| 0
| 0
| 0
| 0
| 0
| 0.205405
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
fc0a353568bae61ac71a343eaf8f5d19d6a33dd9
| 1,765
|
gyp
|
Python
|
deps/cld/binding.gyp
|
LaudateCorpus1/node-cld
|
3fa8589a82fd1308550a1902a8e82f468bad8985
|
[
"Apache-2.0"
] | 206
|
2015-02-18T00:31:16.000Z
|
2022-02-27T04:18:39.000Z
|
deps/cld/binding.gyp
|
pkrumins/node-cld
|
91ccd59345022cf8f03e9ffb369ada40212d7daf
|
[
"Apache-2.0"
] | 55
|
2015-03-02T10:40:33.000Z
|
2022-02-18T10:01:22.000Z
|
deps/cld/binding.gyp
|
pkrumins/node-cld
|
91ccd59345022cf8f03e9ffb369ada40212d7daf
|
[
"Apache-2.0"
] | 39
|
2015-02-23T09:43:05.000Z
|
2022-02-03T09:43:13.000Z
|
{
"targets": [
{
"target_name": "cld-c",
"type": "static_library",
"include_dirs": [
"internal",
],
"sources": [
"internal/cldutil.cc",
"internal/cldutil_shared.cc",
"internal/compact_lang_det.cc",
"internal/compact_lang_det_hint_code.cc",
"internal/compact_lang_det_impl.cc",
"internal/debug.cc",
"internal/fixunicodevalue.cc",
"internal/generated_entities.cc",
"internal/generated_language.cc",
"internal/generated_ulscript.cc",
"internal/getonescriptspan.cc",
"internal/lang_script.cc",
"internal/offsetmap.cc",
"internal/scoreonescriptspan.cc",
"internal/tote.cc",
"internal/utf8statetable.cc",
"internal/cld_generated_cjk_uni_prop_80.cc",
"internal/cld2_generated_cjk_compatible.cc",
"internal/cld_generated_cjk_delta_bi_32.cc",
"internal/generated_distinct_bi_0.cc",
"internal/cld2_generated_quad0122.cc",
"internal/cld2_generated_deltaocta0122.cc",
"internal/cld2_generated_deltaoctachrome.cc",
"internal/cld2_generated_distinctocta0122.cc",
"internal/cld2_generated_distinctoctachrome.cc",
"internal/cld2_generated_quadchrome_16.cc",
"internal/cld2_generated_quadchrome_2.cc",
"internal/cld_generated_score_quad_octa_0122.cc",
"internal/cld_generated_score_quad_octa_2.cc"
],
"defines": [],
"cflags_cc": ["-w", "-std=gnu++98"],
"cflags_cc!": ["-std=gnu++0x"],
"link_settings" : {
"ldflags": ["-z", "muldefs"]
},
"xcode_settings": {
"OTHER_CFLAGS": ["-w"],
'CLANG_CXX_LANGUAGE_STANDARD': 'c++98'
}
}
]
}
| 33.301887
| 57
| 0.616997
| 183
| 1,765
| 5.584699
| 0.398907
| 0.273973
| 0.109589
| 0.180039
| 0.252446
| 0.068493
| 0.068493
| 0
| 0
| 0
| 0
| 0.029039
| 0.239093
| 1,765
| 52
| 58
| 33.942308
| 0.731943
| 0
| 0
| 0.038462
| 0
| 0
| 0.658357
| 0.525779
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
fc111c92d7eca0d2743ef911c4877d1053561649
| 52
|
py
|
Python
|
src/exceptions/CircuitGrammarException.py
|
wesrer/QCEQ
|
91b020363e034ea1a8a320c2e813a2b46f3ee76a
|
[
"MIT"
] | null | null | null |
src/exceptions/CircuitGrammarException.py
|
wesrer/QCEQ
|
91b020363e034ea1a8a320c2e813a2b46f3ee76a
|
[
"MIT"
] | null | null | null |
src/exceptions/CircuitGrammarException.py
|
wesrer/QCEQ
|
91b020363e034ea1a8a320c2e813a2b46f3ee76a
|
[
"MIT"
] | null | null | null |
class CircuitGrammarException(Exception):
pass
| 13
| 41
| 0.788462
| 4
| 52
| 10.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 52
| 3
| 42
| 17.333333
| 0.931818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
fc423f7a065dd869e68711edcb306c1b034efc91
| 17
|
py
|
Python
|
sale.py
|
gaochenjian/second_hand_business
|
291affba4648f19f9b0a4535725aa4b0cedd71cb
|
[
"MIT"
] | null | null | null |
sale.py
|
gaochenjian/second_hand_business
|
291affba4648f19f9b0a4535725aa4b0cedd71cb
|
[
"MIT"
] | null | null | null |
sale.py
|
gaochenjian/second_hand_business
|
291affba4648f19f9b0a4535725aa4b0cedd71cb
|
[
"MIT"
] | null | null | null |
#this is sale.py
| 8.5
| 16
| 0.705882
| 4
| 17
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 17
| 1
| 17
| 17
| 0.857143
| 0.882353
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
fc665b5805488e0a7fc6c4575e0e17cb2957b16c
| 19,193
|
py
|
Python
|
fbpic/fields/numba_methods.py
|
kcdodd/fbpic
|
267c812c6c99fcfbf3f0e3f1833d1338e22ceb54
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
fbpic/fields/numba_methods.py
|
kcdodd/fbpic
|
267c812c6c99fcfbf3f0e3f1833d1338e22ceb54
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
fbpic/fields/numba_methods.py
|
kcdodd/fbpic
|
267c812c6c99fcfbf3f0e3f1833d1338e22ceb54
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
# Copyright 2016, FBPIC contributors
# Authors: Remi Lehe, Manuel Kirchen
# License: 3-Clause-BSD-LBNL
"""
This file is part of the Fourier-Bessel Particle-In-Cell code (FB-PIC)
It defines the optimized fields methods that use numba on a CPU
"""
from scipy.constants import c, epsilon_0, mu_0
c2 = c**2
import numba
from fbpic.utils.threading import njit_parallel, prange
@njit_parallel
def numba_filter_scalar( field, Nz, Nr, filter_array_z, filter_array_r ) :
"""
Multiply the input field by the filter_array
Parameters :
------------
field : 2darray of complexs
An array that represent the fields in spectral space
filter_array_z, filter_array_r : 1darray of reals
An array that damps the fields at high k, in z and r respectively
Nz, Nr : ints
Dimensions of the arrays
"""
# Loop over the 2D grid (parallel in z, if threading is installed)
for iz in prange(Nz):
for ir in range(Nr):
field[iz,ir] = filter_array_z[iz]*filter_array_r[ir]*field[iz,ir]
@njit_parallel
def numba_filter_vector( fieldr, fieldt, fieldz, Nz, Nr,
filter_array_z, filter_array_r ):
"""
Multiply the input field by the filter_array
Parameters :
------------
field : 2darray of complexs
An array that represent the fields in spectral space
filter_array_z, filter_array_r : 1darray of reals
An array that damps the fields at high k, in z and r respectively
Nz, Nr : ints
Dimensions of the arrays
"""
# Loop over the 2D grid (parallel in z, if threading is installed)
for iz in prange(Nz):
for ir in range(Nr):
fieldr[iz,ir] = filter_array_z[iz]*filter_array_r[ir]*fieldr[iz,ir]
fieldt[iz,ir] = filter_array_z[iz]*filter_array_r[ir]*fieldt[iz,ir]
fieldz[iz,ir] = filter_array_z[iz]*filter_array_r[ir]*fieldz[iz,ir]
@njit_parallel
def numba_correct_currents_curlfree_standard( rho_prev, rho_next, Jp, Jm, Jz,
kz, kr, inv_k2, inv_dt, Nz, Nr ):
"""
Correct the currents in spectral space, using the curl-free correction
which is adapted to the standard psatd
"""
# Loop over the 2D grid (parallel in z, if threading is installed)
for iz in prange(Nz):
for ir in range(Nr):
# Calculate the intermediate variable F
F = - inv_k2[iz, ir] * (
(rho_next[iz, ir] - rho_prev[iz, ir])*inv_dt \
+ 1.j*kz[iz, ir]*Jz[iz, ir] \
+ kr[iz, ir]*( Jp[iz, ir] - Jm[iz, ir] ) )
# Correct the currents accordingly
Jp[iz, ir] += 0.5 * kr[iz, ir] * F
Jm[iz, ir] += -0.5 * kr[iz, ir] * F
Jz[iz, ir] += -1.j * kz[iz, ir] * F
return
@njit_parallel
def numba_correct_currents_crossdeposition_standard( rho_prev, rho_next,
rho_next_z, rho_next_xy, Jp, Jm, Jz, kz, kr, inv_dt, Nz, Nr ):
"""
Correct the currents in spectral space, using the cross-deposition
algorithm adapted to the standard psatd.
"""
# Loop over the 2D grid
for iz in prange(Nz):
# Loop through the radial points
# (Note: a while loop is used here, because numba 0.34 does
# not support nested prange and range loops)
ir = 0
while ir < Nr:
# Calculate the intermediate variable Dz and Dxy
# (Such that Dz + Dxy is the error in the continuity equation)
Dz = 1.j*kz[iz, ir]*Jz[iz, ir] + 0.5 * inv_dt * \
( rho_next[iz, ir] - rho_next_xy[iz, ir] + \
rho_next_z[iz, ir] - rho_prev[iz, ir] )
Dxy = kr[iz, ir]*( Jp[iz, ir] - Jm[iz, ir] ) + 0.5 * inv_dt * \
( rho_next[iz, ir] - rho_next_z[iz, ir] + \
rho_next_xy[iz, ir] - rho_prev[iz, ir] )
# Correct the currents accordingly
if kr[iz, ir] != 0:
inv_kr = 1./kr[iz, ir]
Jp[iz, ir] += -0.5 * Dxy * inv_kr
Jm[iz, ir] += 0.5 * Dxy * inv_kr
if kz[iz, ir] != 0:
inv_kz = 1./kz[iz, ir]
Jz[iz, ir] += 1.j * Dz * inv_kz
# Increment ir
ir += 1
return
@njit_parallel
def numba_push_eb_standard( Ep, Em, Ez, Bp, Bm, Bz, Jp, Jm, Jz,
rho_prev, rho_next,
rho_prev_coef, rho_next_coef, j_coef,
C, S_w, kr, kz, dt,
use_true_rho, Nz, Nr) :
"""
Push the fields over one timestep, using the standard psatd algorithm
See the documentation of SpectralGrid.push_eb_with
"""
# Loop over the 2D grid (parallel in z, if threading is installed)
for iz in prange(Nz):
for ir in range(Nr):
# Save the electric fields, since it is needed for the B push
Ep_old = Ep[iz, ir]
Em_old = Em[iz, ir]
Ez_old = Ez[iz, ir]
# Calculate useful auxiliary arrays
if use_true_rho:
# Evaluation using the rho projected on the grid
rho_diff = rho_next_coef[iz, ir] * rho_next[iz, ir] \
- rho_prev_coef[iz, ir] * rho_prev[iz, ir]
else:
# Evaluation using div(E) and div(J)
divE = kr[iz, ir]*( Ep[iz, ir] - Em[iz, ir] ) \
+ 1.j*kz[iz, ir]*Ez[iz, ir]
divJ = kr[iz, ir]*( Jp[iz, ir] - Jm[iz, ir] ) \
+ 1.j*kz[iz, ir]*Jz[iz, ir]
rho_diff = (rho_next_coef[iz, ir] - rho_prev_coef[iz, ir]) \
* epsilon_0 * divE - rho_next_coef[iz, ir] * dt * divJ
# Push the E field
Ep[iz, ir] = C[iz, ir]*Ep[iz, ir] + 0.5*kr[iz, ir]*rho_diff \
+ c2*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Bz[iz, ir] \
+ kz[iz, ir]*Bp[iz, ir] - mu_0*Jp[iz, ir] )
Em[iz, ir] = C[iz, ir]*Em[iz, ir] - 0.5*kr[iz, ir]*rho_diff \
+ c2*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Bz[iz, ir] \
- kz[iz, ir]*Bm[iz, ir] - mu_0*Jm[iz, ir] )
Ez[iz, ir] = C[iz, ir]*Ez[iz, ir] - 1.j*kz[iz, ir]*rho_diff \
+ c2*S_w[iz, ir]*( 1.j*kr[iz, ir]*Bp[iz, ir] \
+ 1.j*kr[iz, ir]*Bm[iz, ir] - mu_0*Jz[iz, ir] )
# Push the B field
Bp[iz, ir] = C[iz, ir]*Bp[iz, ir] \
- S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez_old \
+ kz[iz, ir]*Ep_old ) \
+ j_coef[iz, ir]*( -1.j*0.5*kr[iz, ir]*Jz[iz, ir] \
+ kz[iz, ir]*Jp[iz, ir] )
Bm[iz, ir] = C[iz, ir]*Bm[iz, ir] \
- S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez_old \
- kz[iz, ir]*Em_old ) \
+ j_coef[iz, ir]*( -1.j*0.5*kr[iz, ir]*Jz[iz, ir] \
- kz[iz, ir]*Jm[iz, ir] )
Bz[iz, ir] = C[iz, ir]*Bz[iz, ir] \
- S_w[iz, ir]*( 1.j*kr[iz, ir]*Ep_old \
+ 1.j*kr[iz, ir]*Em_old ) \
+ j_coef[iz, ir]*( 1.j*kr[iz, ir]*Jp[iz, ir] \
+ 1.j*kr[iz, ir]*Jm[iz, ir] )
return
@njit_parallel
def numba_push_eb_pml_standard( Ep_pml, Em_pml, Bp_pml, Bm_pml,
Ez, Bz, C, S_w, kr, kz, Nz, Nr):
"""
Push the PML split fields over one timestep, using the standard psatd algorithm
See the documentation of SpectralGrid.push_eb_with
"""
# Loop over the 2D grid
for iz in prange(Nz):
for ir in range(Nr):
# Push the PML E field
Ep_pml[iz, ir] = C[iz, ir]*Ep_pml[iz, ir] \
+ c2*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Bz[iz, ir] )
Em_pml[iz, ir] = C[iz, ir]*Em_pml[iz, ir] \
+ c2*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Bz[iz, ir] )
# Push the PML B field
Bp_pml[iz, ir] = C[iz, ir]*Bp_pml[iz, ir] \
- S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez[iz, ir] )
Bm_pml[iz, ir] = C[iz, ir]*Bm_pml[iz, ir] \
- S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez[iz, ir] )
return
@njit_parallel
def numba_correct_currents_curlfree_comoving( rho_prev, rho_next, Jp, Jm, Jz,
kz, kr, inv_k2,
j_corr_coef, T_eb, T_cc,
inv_dt, Nz, Nr ) :
"""
Correct the currents in spectral space, using the curl-free correction
which is adapted to the galilean/comoving-currents assumption
"""
# Loop over the 2D grid (parallel in z, if threading is installed)
for iz in prange(Nz):
for ir in range(Nr):
# Calculate the intermediate variable F
F = - inv_k2[iz, ir] * ( T_cc[iz, ir]*j_corr_coef[iz, ir] \
* (rho_next[iz, ir] - rho_prev[iz, ir]*T_eb[iz, ir]) \
+ 1.j*kz[iz, ir]*Jz[iz, ir] \
+ kr[iz, ir]*( Jp[iz, ir] - Jm[iz, ir] ) )
# Correct the currents accordingly
Jp[iz, ir] += 0.5 * kr[iz, ir] * F
Jm[iz, ir] += -0.5 * kr[iz, ir] * F
Jz[iz, ir] += -1.j * kz[iz, ir] * F
return
@njit_parallel
def numba_correct_currents_crossdeposition_comoving(
rho_prev, rho_next, rho_next_z, rho_next_xy, Jp, Jm, Jz,
kz, kr, j_corr_coef, T_eb, T_cc, inv_dt, Nz, Nr ) :
"""
Correct the currents in spectral space, using the cross-deposition
algorithm adapted to the galilean/comoving-currents assumption.
"""
# Loop over the 2D grid
for iz in prange(Nz):
# Loop through the radial points
# (Note: a while loop is used here, because numba 0.34 does
# not support nested prange and range loops)
ir = 0
while ir < Nr:
# Calculate the intermediate variable Dz and Dxy
# (Such that Dz + Dxy is the error in the continuity equation)
Dz = 1.j*kz[iz, ir]*Jz[iz, ir] \
+ 0.5 * T_cc[iz, ir]*j_corr_coef[iz, ir] * \
( rho_next[iz, ir] - T_eb[iz, ir] * rho_next_xy[iz, ir] \
+ rho_next_z[iz, ir] - T_eb[iz, ir] * rho_prev[iz, ir] )
Dxy = kr[iz, ir]*( Jp[iz, ir] - Jm[iz, ir] ) \
+ 0.5 * T_cc[iz, ir]*j_corr_coef[iz, ir] * \
( rho_next[iz, ir] + T_eb[iz, ir] * rho_next_xy[iz, ir] \
- rho_next_z[iz, ir] - T_eb[iz, ir] * rho_prev[iz, ir] )
# Correct the currents accordingly
if kr[iz, ir] != 0:
inv_kr = 1./kr[iz, ir]
Jp[iz, ir] += -0.5 * Dxy * inv_kr
Jm[iz, ir] += 0.5 * Dxy * inv_kr
if kz[iz, ir] != 0:
inv_kz = 1./kz[iz, ir]
Jz[iz, ir] += 1.j * Dz * inv_kz
# Increment ir
ir += 1
return
@njit_parallel
def numba_push_eb_comoving( Ep, Em, Ez, Bp, Bm, Bz, Jp, Jm, Jz,
rho_prev, rho_next,
rho_prev_coef, rho_next_coef, j_coef,
C, S_w, T_eb, T_cc, T_rho,
kr, kz, dt, V, use_true_rho, Nz, Nr):
"""
Push the fields over one timestep, using the psatd algorithm,
with the assumptions of comoving currents
(either with the galilean scheme or comoving scheme, depending on
the values of the coefficients that are passed)
See the documentation of SpectralGrid.push_eb_with
"""
# Loop over the grid (parallel in z, if threading is installed)
for iz in prange(Nz):
for ir in range(Nr):
# Save the electric fields, since it is needed for the B push
Ep_old = Ep[iz, ir]
Em_old = Em[iz, ir]
Ez_old = Ez[iz, ir]
# Calculate useful auxiliary arrays
if use_true_rho:
# Evaluation using the rho projected on the grid
rho_diff = rho_next_coef[iz, ir] * rho_next[iz, ir] \
- rho_prev_coef[iz, ir] * rho_prev[iz, ir]
else:
# Evaluation using div(E) and div(J)
divE = kr[iz, ir]*( Ep[iz, ir] - Em[iz, ir] ) \
+ 1.j*kz[iz, ir]*Ez[iz, ir]
divJ = kr[iz, ir]*( Jp[iz, ir] - Jm[iz, ir] ) \
+ 1.j*kz[iz, ir]*Jz[iz, ir]
rho_diff = ( T_eb[iz,ir] * rho_next_coef[iz, ir] \
- rho_prev_coef[iz, ir] ) \
* epsilon_0 * divE + T_rho[iz, ir] \
* rho_next_coef[iz, ir] * divJ
# Push the E field
Ep[iz, ir] = \
T_eb[iz, ir]*C[iz, ir]*Ep[iz, ir] + 0.5*kr[iz, ir]*rho_diff \
+ j_coef[iz, ir]*1.j*kz[iz, ir]*V*Jp[iz, ir] \
+ c2*T_eb[iz, ir]*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Bz[iz, ir] \
+ kz[iz, ir]*Bp[iz, ir] - mu_0*T_cc[iz, ir]*Jp[iz, ir] )
Em[iz, ir] = \
T_eb[iz, ir]*C[iz, ir]*Em[iz, ir] - 0.5*kr[iz, ir]*rho_diff \
+ j_coef[iz, ir]*1.j*kz[iz, ir]*V*Jm[iz, ir] \
+ c2*T_eb[iz, ir]*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Bz[iz, ir] \
- kz[iz, ir]*Bm[iz, ir] - mu_0*T_cc[iz, ir]*Jm[iz, ir] )
Ez[iz, ir] = \
T_eb[iz, ir]*C[iz, ir]*Ez[iz, ir] - 1.j*kz[iz, ir]*rho_diff \
+ j_coef[iz, ir]*1.j*kz[iz, ir]*V*Jz[iz, ir] \
+ c2*T_eb[iz, ir]*S_w[iz, ir]*( 1.j*kr[iz, ir]*Bp[iz, ir] \
+ 1.j*kr[iz, ir]*Bm[iz, ir] - mu_0*T_cc[iz, ir]*Jz[iz, ir] )
# Push the B field
Bp[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Bp[iz, ir] \
- T_eb[iz, ir]*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez_old \
+ kz[iz, ir]*Ep_old ) \
+ j_coef[iz, ir]*( -1.j*0.5*kr[iz, ir]*Jz[iz, ir] \
+ kz[iz, ir]*Jp[iz, ir] )
Bm[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Bm[iz, ir] \
- T_eb[iz, ir]*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez_old \
- kz[iz, ir]*Em_old ) \
+ j_coef[iz, ir]*( -1.j*0.5*kr[iz, ir]*Jz[iz, ir] \
- kz[iz, ir]*Jm[iz, ir] )
Bz[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Bz[iz, ir] \
- T_eb[iz, ir]*S_w[iz, ir]*( 1.j*kr[iz, ir]*Ep_old \
+ 1.j*kr[iz, ir]*Em_old ) \
+ j_coef[iz, ir]*( 1.j*kr[iz, ir]*Jp[iz, ir] \
+ 1.j*kr[iz, ir]*Jm[iz, ir] )
return
@njit_parallel
def numba_push_eb_pml_comoving( Ep_pml, Em_pml, Bp_pml, Bm_pml,
Ez, Bz, C, S_w, T_eb, kr, kz, Nz, Nr):
"""
Push the PML split fields over one timestep,
using the galilean/comoving psatd algorithm
See the documentation of SpectralGrid.push_eb_with
"""
# Loop over the 2D grid
for iz in prange(Nz):
for ir in range(Nr):
# Push the E field
Ep_pml[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Ep_pml[iz, ir] \
+ c2*T_eb[iz, ir]*S_w[iz, ir]*(-1.j*0.5*kr[iz, ir]*Bz[iz, ir])
Em_pml[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Em_pml[iz, ir] \
+ c2*T_eb[iz, ir]*S_w[iz, ir]*(-1.j*0.5*kr[iz, ir]*Bz[iz, ir])
# Push the B field
Bp_pml[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Bp_pml[iz, ir] \
- T_eb[iz, ir]*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez[iz, ir] )
Bm_pml[iz, ir] = T_eb[iz, ir]*C[iz, ir]*Bm_pml[iz, ir] \
- T_eb[iz, ir]*S_w[iz, ir]*( -1.j*0.5*kr[iz, ir]*Ez[iz, ir] )
return
@njit_parallel
def numba_correct_divE( Ez, Ep, Em, inv_k2, kz, kr, rho, Nz, Nr ):
"""
Correct the electric field, so that it satisfies the equation
div(E) - rho/epsilon_0 = 0
"""
# Loop over the 2D grid
for iz in prange(Nz):
for ir in range(Nr):
F = - inv_k2[iz, ir] * (
- rho[iz, ir] / epsilon_0 \
+ 1.j*kz[iz, ir]*Ez[iz, ir] + kr[iz, ir]*( Ep[iz, ir] - Em[iz, ir] ) )
# Correct the current accordingly
Ep[iz, ir] += 0.5*kr[iz, ir]*F
Em[iz, ir] += -0.5*kr[iz, ir]*F
Ez[iz, ir] += -1.j*kz[iz, ir]*F
# -----------------------------------------------------------------------
# Parallel reduction of the global arrays for threads into a single array
# -----------------------------------------------------------------------
@njit_parallel
def numba_erase_threading_buffer( global_array ):
"""
Set the threading buffer `global_array` to 0
Parameter:
----------
global_array: 4darray of complexs
An array that contains the duplicated charge/current for each thread
"""
nthreads, Nm, Nz, Nr = global_array.shape
# Loop in parallel along nthreads
for i_thread in prange(nthreads):
# Loop through the modes and the grid
for m in range(Nm):
for iz in range(Nz):
for ir in range(Nr):
# Erase values
global_array[i_thread, m, iz, ir] = 0.
@njit_parallel
def sum_reduce_2d_array( global_array, reduced_array, m ):
"""
Sum the array `global_array` along its first axis and
add it into `reduced_array`, and fold the deposition guard cells of
global_array into the regular cells of reduced_array.
Parameters:
-----------
global_array: 4darray of complexs
Field array of shape (nthreads, Nm, 2+Nz+2, 2+Nr+2)
where the additional 2's in z and r correspond to deposition guard cells
that were used during the threaded deposition kernel.
reduced array: 2darray of complex
Field array of shape (Nz, Nr)
m: int
The azimuthal mode for which the reduction should be performed
"""
# Extract size of each dimension
Nz = reduced_array.shape[0]
# Parallel loop over z
for iz in prange(Nz):
# Get index inside reduced_array
iz_global = iz + 2
reduce_slice( reduced_array, iz, global_array, iz_global, m )
# Handle deposition guard cells in z
reduce_slice( reduced_array, Nz-2, global_array, 0, m )
reduce_slice( reduced_array, Nz-1, global_array, 1, m )
reduce_slice( reduced_array, 0, global_array, Nz+2, m )
reduce_slice( reduced_array, 1, global_array, Nz+3, m )
@numba.njit
def reduce_slice( reduced_array, iz, global_array, iz_global, m ):
"""
Sum the array `global_array` into `reduced_array` for one given slice in z
"""
Nreduce = global_array.shape[0]
Nr = reduced_array.shape[1]
# Loop over the reduction dimension (slow dimension)
for it in range( Nreduce ):
# First fold the low-radius deposition guard cells in
reduced_array[iz, 1] += global_array[it, m, iz_global, 0]
reduced_array[iz, 0] += global_array[it, m, iz_global, 1]
# Then loop over regular cells
for ir in range( Nr ):
reduced_array[iz, ir] += global_array[it, m, iz_global, ir+2]
# Finally fold the high-radius guard cells in
reduced_array[iz, Nr-1] += global_array[it, m, iz_global, Nr+2]
reduced_array[iz, Nr-1] += global_array[it, m, iz_global, Nr+3]
| 38.852227
| 86
| 0.515657
| 3,070
| 19,193
| 3.088599
| 0.088925
| 0.147648
| 0.034803
| 0.028475
| 0.790023
| 0.760072
| 0.733495
| 0.721789
| 0.706918
| 0.700907
| 0
| 0.017945
| 0.340906
| 19,193
| 493
| 87
| 38.931034
| 0.731621
| 0.27385
| 0
| 0.536965
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.054475
| false
| 0
| 0.011673
| 0
| 0.097276
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5d8a2757259db88205573f985a0bedd908948e45
| 118
|
py
|
Python
|
snmp_orm/devices/__init__.py
|
blackwithwhite666/snmp_orm
|
324a98a18772997ce9853ae2a269842af8b718bb
|
[
"MIT"
] | 1
|
2015-04-29T20:48:50.000Z
|
2015-04-29T20:48:50.000Z
|
snmp_orm/devices/__init__.py
|
blackwithwhite666/snmp_orm
|
324a98a18772997ce9853ae2a269842af8b718bb
|
[
"MIT"
] | null | null | null |
snmp_orm/devices/__init__.py
|
blackwithwhite666/snmp_orm
|
324a98a18772997ce9853ae2a269842af8b718bb
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from .base import AbstractDevice
from .default import Device as DefaultDevice
| 23.6
| 44
| 0.855932
| 15
| 118
| 6.4
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127119
| 118
| 4
| 45
| 29.5
| 0.932039
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5d9f3f5d468ef17a3416e3cd53547dd434b25a61
| 19
|
py
|
Python
|
quantstats/version.py
|
devwolff/quantstats
|
e73529a3a3e3ea919fdad18bb1a339dec35e41bd
|
[
"Apache-2.0"
] | null | null | null |
quantstats/version.py
|
devwolff/quantstats
|
e73529a3a3e3ea919fdad18bb1a339dec35e41bd
|
[
"Apache-2.0"
] | null | null | null |
quantstats/version.py
|
devwolff/quantstats
|
e73529a3a3e3ea919fdad18bb1a339dec35e41bd
|
[
"Apache-2.0"
] | null | null | null |
version = "0.0.35"
| 9.5
| 18
| 0.578947
| 4
| 19
| 2.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.157895
| 19
| 1
| 19
| 19
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5dd55a54564d72882bd1e82f0b8d5a80044ac431
| 4,538
|
py
|
Python
|
src/SigasiProjectCreator/DotF/DotFLexer.py
|
nordicneurolab/SigasiProjectCreator
|
21e289ea080a063c8c31038ed78ce57a1bf20126
|
[
"BSD-3-Clause"
] | 11
|
2015-09-16T16:29:08.000Z
|
2020-10-10T17:17:07.000Z
|
src/SigasiProjectCreator/DotF/DotFLexer.py
|
nordicneurolab/SigasiProjectCreator
|
21e289ea080a063c8c31038ed78ce57a1bf20126
|
[
"BSD-3-Clause"
] | 21
|
2016-06-11T18:27:25.000Z
|
2022-01-04T10:52:11.000Z
|
src/SigasiProjectCreator/DotF/DotFLexer.py
|
nordicneurolab/SigasiProjectCreator
|
21e289ea080a063c8c31038ed78ce57a1bf20126
|
[
"BSD-3-Clause"
] | 11
|
2016-06-11T15:16:12.000Z
|
2022-03-24T20:30:23.000Z
|
# Generated from C:/Users/Wim Meeus/git/SigasiProjectCreator/src/SigasiProjectCreator/DotF\DotF.g4 by ANTLR 4.9.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\2\21")
buf.write("p\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
buf.write("\t\16\4\17\t\17\4\20\t\20\3\2\3\2\3\3\3\3\3\4\3\4\6\4")
buf.write("(\n\4\r\4\16\4)\3\5\3\5\6\5.\n\5\r\5\16\5/\3\6\3\6\3\7")
buf.write("\3\7\3\7\3\b\3\b\3\t\6\t:\n\t\r\t\16\t;\3\t\3\t\3\n\3")
buf.write("\n\3\13\3\13\3\f\3\f\3\r\3\r\3\r\3\r\7\rJ\n\r\f\r\16\r")
buf.write("M\13\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\7\16X\n")
buf.write("\16\f\16\16\16[\13\16\3\16\3\16\3\17\3\17\7\17a\n\17\f")
buf.write("\17\16\17d\13\17\3\17\3\17\3\20\3\20\7\20j\n\20\f\20\16")
buf.write("\20m\13\20\3\20\3\20\3K\2\21\3\3\5\4\7\5\t\6\13\7\r\b")
buf.write("\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21\3\2")
buf.write("\n\5\2\f\f--^^\4\2\f\f^^\n\2&&,,\60;C\\^^aac}\177\177")
buf.write("\6\2##..\60\60AA\5\2\13\13\17\17\"\"\3\2\f\f\3\2^^\3\2")
buf.write("$$\2v\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2")
buf.write("\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2")
buf.write("\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33")
buf.write("\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\3!\3\2\2\2\5#\3\2\2")
buf.write("\2\7%\3\2\2\2\t+\3\2\2\2\13\61\3\2\2\2\r\63\3\2\2\2\17")
buf.write("\66\3\2\2\2\219\3\2\2\2\23?\3\2\2\2\25A\3\2\2\2\27C\3")
buf.write("\2\2\2\31E\3\2\2\2\33S\3\2\2\2\35^\3\2\2\2\37g\3\2\2\2")
buf.write("!\"\7<\2\2\"\4\3\2\2\2#$\7^\2\2$\6\3\2\2\2%\'\7-\2\2&")
buf.write("(\n\2\2\2\'&\3\2\2\2()\3\2\2\2)\'\3\2\2\2)*\3\2\2\2*\b")
buf.write("\3\2\2\2+-\7/\2\2,.\n\3\2\2-,\3\2\2\2./\3\2\2\2/-\3\2")
buf.write("\2\2/\60\3\2\2\2\60\n\3\2\2\2\61\62\t\4\2\2\62\f\3\2\2")
buf.write("\2\63\64\5\21\t\2\64\65\7^\2\2\65\16\3\2\2\2\66\67\t\5")
buf.write("\2\2\67\20\3\2\2\28:\t\6\2\298\3\2\2\2:;\3\2\2\2;9\3\2")
buf.write("\2\2;<\3\2\2\2<=\3\2\2\2=>\b\t\2\2>\22\3\2\2\2?@\t\7\2")
buf.write("\2@\24\3\2\2\2AB\t\b\2\2B\26\3\2\2\2CD\t\t\2\2D\30\3\2")
buf.write("\2\2EF\7\61\2\2FG\7,\2\2GK\3\2\2\2HJ\13\2\2\2IH\3\2\2")
buf.write("\2JM\3\2\2\2KL\3\2\2\2KI\3\2\2\2LN\3\2\2\2MK\3\2\2\2N")
buf.write("O\7,\2\2OP\7\61\2\2PQ\3\2\2\2QR\b\r\2\2R\32\3\2\2\2ST")
buf.write("\7\61\2\2TU\7\61\2\2UY\3\2\2\2VX\n\7\2\2WV\3\2\2\2X[\3")
buf.write("\2\2\2YW\3\2\2\2YZ\3\2\2\2Z\\\3\2\2\2[Y\3\2\2\2\\]\b\16")
buf.write("\2\2]\34\3\2\2\2^b\7%\2\2_a\n\7\2\2`_\3\2\2\2ad\3\2\2")
buf.write("\2b`\3\2\2\2bc\3\2\2\2ce\3\2\2\2db\3\2\2\2ef\b\17\2\2")
buf.write("f\36\3\2\2\2gk\7#\2\2hj\n\7\2\2ih\3\2\2\2jm\3\2\2\2ki")
buf.write("\3\2\2\2kl\3\2\2\2ln\3\2\2\2mk\3\2\2\2no\b\20\2\2o \3")
buf.write("\2\2\2\n\2)/;KYbk\3\b\2\2")
return buf.getvalue()
class DotFLexer(Lexer):
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
T__0 = 1
T__1 = 2
PLUS_OPTION = 3
DASH_OPTION = 4
FILEPATH_CHAR = 5
CONT = 6
LT = 7
WS = 8
NL = 9
ESC = 10
DQ = 11
C_COMMENT = 12
CC_COMMENT = 13
SH_COMMENT = 14
EX_COMMENT = 15
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE" ]
literalNames = [ "<INVALID>",
"':'", "'\\'" ]
symbolicNames = [ "<INVALID>",
"PLUS_OPTION", "DASH_OPTION", "FILEPATH_CHAR", "CONT", "LT",
"WS", "NL", "ESC", "DQ", "C_COMMENT", "CC_COMMENT", "SH_COMMENT",
"EX_COMMENT" ]
ruleNames = [ "T__0", "T__1", "PLUS_OPTION", "DASH_OPTION", "FILEPATH_CHAR",
"CONT", "LT", "WS", "NL", "ESC", "DQ", "C_COMMENT", "CC_COMMENT",
"SH_COMMENT", "EX_COMMENT" ]
grammarFileName = "DotF.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.9.1")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None
| 44.930693
| 113
| 0.527325
| 1,117
| 4,538
| 2.102059
| 0.176365
| 0.139693
| 0.102215
| 0.081772
| 0.272998
| 0.206559
| 0.148637
| 0.127342
| 0.106048
| 0.106048
| 0
| 0.241563
| 0.17078
| 4,538
| 100
| 114
| 45.38
| 0.382408
| 0.02446
| 0
| 0
| 1
| 0.463415
| 0.523174
| 0.463486
| 0
| 0
| 0
| 0
| 0
| 1
| 0.02439
| false
| 0
| 0.04878
| 0
| 0.378049
| 0
| 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
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f8d6485dc583a9dd5998b93ae82afc44782e0e02
| 74
|
py
|
Python
|
certbot-dns-gehirn/certbot_dns_gehirn/_internal/__init__.py
|
vivithemage/certbot
|
828be0071ea1fd41808b56d3a0024637091198bd
|
[
"Apache-2.0"
] | 16,789
|
2016-05-06T19:49:59.000Z
|
2022-03-31T20:01:47.000Z
|
certbot-dns-gehirn/certbot_dns_gehirn/_internal/__init__.py
|
vivithemage/certbot
|
828be0071ea1fd41808b56d3a0024637091198bd
|
[
"Apache-2.0"
] | 5,737
|
2016-05-06T19:26:43.000Z
|
2022-03-31T20:27:38.000Z
|
certbot-dns-gehirn/certbot_dns_gehirn/_internal/__init__.py
|
vivithemage/certbot
|
828be0071ea1fd41808b56d3a0024637091198bd
|
[
"Apache-2.0"
] | 2,974
|
2016-05-06T19:51:23.000Z
|
2022-03-31T21:01:36.000Z
|
"""Internal implementation of `~certbot_dns_gehirn.dns_gehirn` plugin."""
| 37
| 73
| 0.783784
| 9
| 74
| 6.111111
| 0.777778
| 0.327273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067568
| 74
| 1
| 74
| 74
| 0.797101
| 0.905405
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5d0a1d32fb5fd151832bb5a96392819d1a18e589
| 84
|
py
|
Python
|
elementary/python/hello_world(ex1).py
|
Leofariasrj25/simple-programming-problems
|
49fe5c20692efbcd751b0c5bc92fb1b5dc6b4dd9
|
[
"MIT"
] | null | null | null |
elementary/python/hello_world(ex1).py
|
Leofariasrj25/simple-programming-problems
|
49fe5c20692efbcd751b0c5bc92fb1b5dc6b4dd9
|
[
"MIT"
] | null | null | null |
elementary/python/hello_world(ex1).py
|
Leofariasrj25/simple-programming-problems
|
49fe5c20692efbcd751b0c5bc92fb1b5dc6b4dd9
|
[
"MIT"
] | null | null | null |
# 1. Write a program thar prints 'Hello World' to the screen.
print("Hello World")
| 21
| 61
| 0.714286
| 14
| 84
| 4.285714
| 0.857143
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.178571
| 84
| 3
| 62
| 28
| 0.855072
| 0.702381
| 0
| 0
| 0
| 0
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
5d1af3211fd99f069a34a2de4f806b67651b6ff9
| 70
|
py
|
Python
|
notebooks/01_broadband_analysis/__init__.py
|
hpparvi/Parviainen-2017-WASP-80b
|
e0d544e0815146acbb5f1bf97a950331c6e322da
|
[
"MIT"
] | null | null | null |
notebooks/01_broadband_analysis/__init__.py
|
hpparvi/Parviainen-2017-WASP-80b
|
e0d544e0815146acbb5f1bf97a950331c6e322da
|
[
"MIT"
] | null | null | null |
notebooks/01_broadband_analysis/__init__.py
|
hpparvi/Parviainen-2017-WASP-80b
|
e0d544e0815146acbb5f1bf97a950331c6e322da
|
[
"MIT"
] | null | null | null |
import sys
from os.path import join
sys.path.append(join('..','..'))
| 14
| 32
| 0.657143
| 11
| 70
| 4.181818
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 70
| 4
| 33
| 17.5
| 0.741935
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5d20be927aec97afbb537282a101ae97b78a39e6
| 21
|
py
|
Python
|
skyly-project/screens/chat.py
|
genisyskernel/skyly-project
|
ea65350ae0ff4b58c0c8c4e9905e851ca24e93d5
|
[
"MIT"
] | 1
|
2020-10-26T00:22:12.000Z
|
2020-10-26T00:22:12.000Z
|
skyly-project/screens/chat.py
|
genisyskernel/skyly-project
|
ea65350ae0ff4b58c0c8c4e9905e851ca24e93d5
|
[
"MIT"
] | null | null | null |
skyly-project/screens/chat.py
|
genisyskernel/skyly-project
|
ea65350ae0ff4b58c0c8c4e9905e851ca24e93d5
|
[
"MIT"
] | null | null | null |
print("Chat Screen")
| 10.5
| 20
| 0.714286
| 3
| 21
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 21
| 1
| 21
| 21
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0.52381
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
538d3473326866197812f92988a6ea1a62265caf
| 421
|
py
|
Python
|
tigercontrol/planners/__init__.py
|
MinRegret/TigerControl
|
b1ca0617cbb2198f9d5cb37f725f3d7accbab08f
|
[
"Apache-2.0"
] | 31
|
2019-11-08T06:01:54.000Z
|
2021-11-20T04:50:43.000Z
|
tigercontrol/planners/__init__.py
|
johnhallman/ctsb
|
b1ca0617cbb2198f9d5cb37f725f3d7accbab08f
|
[
"Apache-2.0"
] | 32
|
2019-06-27T15:05:04.000Z
|
2019-08-07T04:23:47.000Z
|
tigercontrol/planners/__init__.py
|
MinRegret/tigercontrol
|
b1ca0617cbb2198f9d5cb37f725f3d7accbab08f
|
[
"Apache-2.0"
] | 3
|
2020-09-30T17:06:50.000Z
|
2021-04-12T22:39:34.000Z
|
# control init file
from tigercontrol.planners.registration import planner_registry, planner_register, planner
from tigercontrol.planners.custom import CustomPlanner, register_custom_planner
from tigercontrol.planners.core import Planner
# planners
from tigercontrol.planners.ilqr import ILQR
# ---------- Control Planners ----------
planner_register(
id='ILQR',
entry_point='tigercontrol.planners:ILQR',
)
| 23.388889
| 90
| 0.776722
| 46
| 421
| 6.978261
| 0.391304
| 0.311526
| 0.299065
| 0.193146
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114014
| 421
| 17
| 91
| 24.764706
| 0.86059
| 0.154394
| 0
| 0
| 0
| 0
| 0.085227
| 0.073864
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 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
| 0
| 0
|
0
| 5
|
5392fbdac025d24130c2f047c432877ec78e3d6a
| 63
|
py
|
Python
|
wk9_practice/Phone/__init__.py
|
philuu12/PYTHON_4_NTWK_ENGRS
|
ac0126ed687a5201031a6295d0094a536547cb92
|
[
"Apache-2.0"
] | 1
|
2016-03-01T14:39:17.000Z
|
2016-03-01T14:39:17.000Z
|
wk9_practice/Phone/__init__.py
|
philuu12/PYTHON_4_NTWK_ENGRS
|
ac0126ed687a5201031a6295d0094a536547cb92
|
[
"Apache-2.0"
] | null | null | null |
wk9_practice/Phone/__init__.py
|
philuu12/PYTHON_4_NTWK_ENGRS
|
ac0126ed687a5201031a6295d0094a536547cb92
|
[
"Apache-2.0"
] | null | null | null |
from Pots import Pots
from Isdn import Isdn
from G3 import G3
| 12.6
| 21
| 0.793651
| 12
| 63
| 4.166667
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.206349
| 63
| 4
| 22
| 15.75
| 0.96
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
53c22f61ad71ee2b79027ec676dee4b33df9593e
| 72
|
py
|
Python
|
bin/main.py
|
IdiosyncraticDragon/OpenNMT-tf
|
99f17c2c2436b45d8a730c662530f4428f9632ca
|
[
"MIT"
] | 2
|
2018-09-28T14:44:59.000Z
|
2018-11-29T02:31:28.000Z
|
bin/main.py
|
Nourhene95/Film_Translation
|
52538d992abcce044911ee945ffaabd1d12ffe9d
|
[
"MIT"
] | null | null | null |
bin/main.py
|
Nourhene95/Film_Translation
|
52538d992abcce044911ee945ffaabd1d12ffe9d
|
[
"MIT"
] | 1
|
2019-06-17T21:36:56.000Z
|
2019-06-17T21:36:56.000Z
|
if __name__ == "__main__":
from opennmt.bin import main
main.main()
| 18
| 30
| 0.694444
| 10
| 72
| 4.2
| 0.7
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180556
| 72
| 3
| 31
| 24
| 0.711864
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
53cff554418b0580fa83cc6d0b6c05ed4203e9e9
| 1,125
|
py
|
Python
|
tests/test_003_invert.py
|
fezde/plingo
|
847abc9600a9fc280afa2243e31703ec3cf51d85
|
[
"MIT"
] | null | null | null |
tests/test_003_invert.py
|
fezde/plingo
|
847abc9600a9fc280afa2243e31703ec3cf51d85
|
[
"MIT"
] | 5
|
2020-12-08T23:09:34.000Z
|
2020-12-20T15:22:52.000Z
|
tests/test_003_invert.py
|
fezde/plingo
|
847abc9600a9fc280afa2243e31703ec3cf51d85
|
[
"MIT"
] | null | null | null |
from copy import deepcopy
from plingo import Plingo
def test_simple():
lingo = Plingo()
input = [
# Row 1
[[3, 0, 0], [3, 4, 3]],
# Row 1
[[3, 1, 0], [0, 2, 2]],
]
expected = [
# Row 1
[[252, 255, 255], [252, 251, 252]],
# Row 1
[[252, 254, 255], [0, 2, 2]],
]
lingo._next_image_data = deepcopy(input)
lingo._height = 2
lingo._width = 2
lingo.execute(show_progressbar=False, iterations=1, save_output=False)
assert lingo._next_image_data == expected
def test_modulo():
lingo = Plingo()
cmds = len(lingo._command_names)
input = [
# Row 1
[[3 + cmds, 0, 0], [3, 4, 3]],
# Row 1
[[3, 1, 0], [0, 2, 2]],
]
expected = [
# Row 1
[[255 - (3 + cmds), 255, 255], [252, 251, 252]],
# Row 1
[[252, 254, 255], [0, 2, 2]],
]
lingo._next_image_data = deepcopy(input)
lingo._height = 2
lingo._width = 2
lingo.execute(show_progressbar=False, iterations=1, save_output=False)
assert lingo._next_image_data == expected
| 20.833333
| 74
| 0.514667
| 150
| 1,125
| 3.7
| 0.26
| 0.057658
| 0.036036
| 0.12973
| 0.727928
| 0.727928
| 0.727928
| 0.727928
| 0.727928
| 0.727928
| 0
| 0.1313
| 0.329778
| 1,125
| 53
| 75
| 21.226415
| 0.604775
| 0.041778
| 0
| 0.606061
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 1
| 0.060606
| false
| 0
| 0.060606
| 0
| 0.121212
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
53e9094eda43e837e7843a23cdc8995ff636bcfe
| 35
|
py
|
Python
|
handwritten_multi_digit_number_recognition/__init__.py
|
kingyiusuen/handwritten-digit-string-recognition
|
a1527c72258ba374df5be38a7e76a82e845028fa
|
[
"MIT"
] | 1
|
2021-08-24T10:10:02.000Z
|
2021-08-24T10:10:02.000Z
|
handwritten_multi_digit_number_recognition/__init__.py
|
kingyiusuen/handwritten-multi-digit-number-recognition
|
a1527c72258ba374df5be38a7e76a82e845028fa
|
[
"MIT"
] | null | null | null |
handwritten_multi_digit_number_recognition/__init__.py
|
kingyiusuen/handwritten-multi-digit-number-recognition
|
a1527c72258ba374df5be38a7e76a82e845028fa
|
[
"MIT"
] | 1
|
2021-08-24T19:09:08.000Z
|
2021-08-24T19:09:08.000Z
|
from .recognizer import Recognizer
| 17.5
| 34
| 0.857143
| 4
| 35
| 7.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 35
| 1
| 35
| 35
| 0.967742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
53f4c8f50808c53e1a607d667dd3bb042d6f3ea9
| 7,279
|
py
|
Python
|
assrunit/tests/tests.py
|
ChristophMetzner/ASSRUn
|
45e91d2ed3178bc656a724bb5be544ff1c12eb7c
|
[
"CC-BY-4.0"
] | 3
|
2017-12-23T18:57:01.000Z
|
2020-12-09T12:19:41.000Z
|
assrunit/tests/tests.py
|
ChristophMetzner/ASSRUn
|
45e91d2ed3178bc656a724bb5be544ff1c12eb7c
|
[
"CC-BY-4.0"
] | 2
|
2018-01-22T10:28:58.000Z
|
2020-04-14T14:15:08.000Z
|
assrunit/tests/tests.py
|
ChristophMetzner/ASSRUn
|
45e91d2ed3178bc656a724bb5be544ff1c12eb7c
|
[
"CC-BY-4.0"
] | 3
|
2019-03-21T10:24:49.000Z
|
2020-11-11T00:19:35.000Z
|
import sciunit
from sciunit.scores import (
BooleanScore,
RatioScore,
) # Two of several SciUnit score types.
from assrunit.capabilities import ProduceXY
### The test classes ###
# 40Hz/40Hz
class Test4040(sciunit.Test):
"""Tests if the model predicts the reduction of 40Hz power in the
'schizophrenia-like' network compared to the control network."""
def __init__(
self, observation={"ratio": 0.4}, name="Reduction of 40Hz power to 40Hz drive"
):
# Call the base constructor.
sciunit.Test.__init__(self, observation, name)
self.required_capabilities = (ProduceXY,)
# This test's 'judge' method will return a BooleanScore.
score_type = BooleanScore
def generate_prediction(self, model):
[control4040, schiz4040] = model.produce_XY(
40.0, 40.0
) # The model has this method if it inherits from the 'ProduceXY' capability.
return [control4040, schiz4040]
def compute_score(self, observation, prediction):
if prediction[0] > 0.0:
result = {"ratio": prediction[1] / prediction[0]}
score = self.score_type(
result["ratio"] < observation["ratio"]
) # Returns a BooleanScore.
score.description = (
"Passing score if the prediction is smaller than the observation"
)
return score
# 30Hz/30Hz
class Test3030(sciunit.Test):
"""Tests if the model predicts the unchanged 30Hz power in the
'schizophrenia-like' network compared to the control network."""
def __init__(
self, observation={"ratio": 1.0}, name="No change of 30Hz power to 30Hz drive"
):
# Call the base constructor.
sciunit.Test.__init__(self, observation, name)
self.required_capabilities = (ProduceXY,)
# This test's 'judge' method will return a BooleanScore.
score_type = BooleanScore
def generate_prediction(self, model):
[control3030, schiz3030] = model.produce_XY(
30.0, 30.0
) # The model has this method if it inherits from the 'ProduceXY' capability.
return [control3030, schiz3030]
def compute_score(self, observation, prediction):
epsilon = 0.1
if prediction[0] > 0.0:
result = {"ratio": prediction[1] / prediction[0]}
score = self.score_type(
(abs(result["ratio"] - observation["ratio"]) < epsilon)
) # Returns a BooleanScore.
score.description = "Passing score if the prediction equals the observation (witin a given range)"
return score
# 20Hz/20Hz
class Test2020(sciunit.Test):
"""Tests if the model predicts the increase in 20Hz power in the
'schizophrenia-like' network compared to the control network."""
def __init__(
self, observation={"ratio": 1.4}, name="Increase of 20Hz power to 20Hz drive"
):
# Call the base constructor.
sciunit.Test.__init__(self, observation, name)
self.required_capabilities = (ProduceXY,)
# This test's 'judge' method will return a BooleanScore.
score_type = BooleanScore
def generate_prediction(self, model):
[control2020, schiz2020] = model.produce_XY(
20.0, 20.0
) # The model has this method if it inherits from the 'ProduceXY' capability.
return [control2020, schiz2020]
def compute_score(self, observation, prediction):
if prediction[0] > 0.0:
result = {"ratio": prediction[1] / prediction[0]}
score = self.score_type(
result["ratio"] > observation["ratio"]
) # Returns a BooleanScore.
score.description = (
"Passing score if the prediction is larger than the observation"
)
return score
# 20Hz/40Hz
class Test2040(sciunit.Test):
"""Tests if the model predicts the increase in 20Hz power at 40Hz drive in the
'schizophrenia-like' network compared to the control network."""
def __init__(
self, observation={"ratio": 1.4}, name="Increase of 20Hz power to 40Hz drive"
):
# Call the base constructor.
sciunit.Test.__init__(self, observation, name)
self.required_capabilities = (ProduceXY,)
# This test's 'judge' method will return a BooleanScore.
score_type = BooleanScore
def generate_prediction(self, model):
[control2040, schiz2040] = model.produce_XY(
20.0, 40.0
) # The model has this method if it inherits from the 'ProduceXY' capability.
return [control2040, schiz2040]
def compute_score(self, observation, prediction):
if prediction[0] > 0.0:
result = {"ratio": prediction[1] / prediction[0]}
score = self.score_type(
result["ratio"] > observation["ratio"]
) # Returns a BooleanScore.
score.description = (
"Passing score if the prediction is larger than the observation"
)
return score
# 40Hz/20Hz
class Test4020(sciunit.Test):
"""Tests if the model predicts the decrease in 40Hz power at 20Hz drive in the
'schizophrenia-like' network compared to the control network."""
def __init__(
self, observation={"ratio": 1.4}, name="Decrease of 40Hz power to 20Hz drive"
):
# Call the base constructor.
sciunit.Test.__init__(self, observation, name)
self.required_capabilities = (ProduceXY,)
# This test's 'judge' method will return a BooleanScore.
score_type = BooleanScore
def generate_prediction(self, model):
[control4020, schiz4020] = model.produce_XY(
40.0, 20.0
) # The model has this method if it inherits from the 'ProduceXY' capability.
return [control4020, schiz4020]
def compute_score(self, observation, prediction):
if prediction[0] > 0.0:
result = {"ratio": prediction[1] / prediction[0]}
score = self.score_type(
result["ratio"] > observation["ratio"]
) # Returns a BooleanScore.
score.description = (
"Passing score if the prediction is larger than the observation"
)
return score
# 10Hz/10Hz - Prediction test
class PredictionTest1010(sciunit.Test):
"""Tests the model response at the 10Hz power band at 10Hz drive in the
'schizophrenia-like' condition compared to the control condition."""
def __init__(
self, observation={"ratio": 1.4}, name="Prediction: 10Hz power to 10Hz drive"
):
# Call the base constructor.
sciunit.Test.__init__(self, observation, name)
self.required_capabilities = (ProduceXY,)
score_type = RatioScore
def generate_prediction(self, model):
[control1010, schiz1010] = model.produce_XY(
10.0, 10.0
) # The model has this method if it inherits from the 'ProduceXY' capability.
return [control1010, schiz1010]
def compute_score(self, observation, prediction):
if prediction[0] > 0.0:
result = {"ratio": prediction[1] / prediction[0]}
score = self.score_type(result["ratio"] / observation["ratio"])
score.description = "Prediction: Score reflects the ratio between power in the control and schizo-like network."
return score
| 35.857143
| 120
| 0.644182
| 858
| 7,279
| 5.367133
| 0.134033
| 0.058632
| 0.049511
| 0.028665
| 0.775896
| 0.743322
| 0.734636
| 0.734636
| 0.703366
| 0.703366
| 0
| 0.049406
| 0.260338
| 7,279
| 202
| 121
| 36.034653
| 0.805906
| 0.26391
| 0
| 0.556391
| 0
| 0
| 0.142911
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.135338
| false
| 0.037594
| 0.022556
| 0
| 0.338346
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9906881b6586101afb45d77ff7931f96318b04a5
| 11
|
py
|
Python
|
my_classes/Tuples/.history/name_tuples_20210721182417.py
|
minefarmer/deep-Dive-1
|
b0675b853180c5b5781888266ea63a3793b8d855
|
[
"Unlicense"
] | null | null | null |
my_classes/Tuples/.history/name_tuples_20210721182417.py
|
minefarmer/deep-Dive-1
|
b0675b853180c5b5781888266ea63a3793b8d855
|
[
"Unlicense"
] | null | null | null |
my_classes/Tuples/.history/name_tuples_20210721182417.py
|
minefarmer/deep-Dive-1
|
b0675b853180c5b5781888266ea63a3793b8d855
|
[
"Unlicense"
] | null | null | null |
print("HI")
| 11
| 11
| 0.636364
| 2
| 11
| 3.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 11
| 1
| 11
| 11
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
073aeb959f2d0269c003c0e754f2664f238673cb
| 46
|
py
|
Python
|
cupy_alias/manipulation/basic.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 142
|
2018-06-07T07:43:10.000Z
|
2021-10-30T21:06:32.000Z
|
cupy_alias/manipulation/basic.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 282
|
2018-06-07T08:35:03.000Z
|
2021-03-31T03:14:32.000Z
|
cupy_alias/manipulation/basic.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 19
|
2018-06-19T11:07:53.000Z
|
2021-05-13T20:57:04.000Z
|
from clpy.manipulation.basic import * # NOQA
| 23
| 45
| 0.76087
| 6
| 46
| 5.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 1
| 46
| 46
| 0.897436
| 0.086957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
073d71b85d5a411bec2cc9edd250f24de1d33b00
| 212
|
py
|
Python
|
blog_project/blog/templatetags/extras.py
|
athallahmaajid/My_Blog
|
3399889829d92f9a054512ea28fcceefbcc76f48
|
[
"MIT"
] | null | null | null |
blog_project/blog/templatetags/extras.py
|
athallahmaajid/My_Blog
|
3399889829d92f9a054512ea28fcceefbcc76f48
|
[
"MIT"
] | null | null | null |
blog_project/blog/templatetags/extras.py
|
athallahmaajid/My_Blog
|
3399889829d92f9a054512ea28fcceefbcc76f48
|
[
"MIT"
] | 1
|
2021-05-23T16:13:18.000Z
|
2021-05-23T16:13:18.000Z
|
from django import template
register = template.Library()
@register.filter(name='get_type')
def get_type(value):
return type(value)
@register.filter(name='string')
def string(value):
return str(value)
| 17.666667
| 33
| 0.735849
| 29
| 212
| 5.310345
| 0.517241
| 0.181818
| 0.233766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132075
| 212
| 11
| 34
| 19.272727
| 0.836957
| 0
| 0
| 0
| 0
| 0
| 0.066038
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.25
| 0.625
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
4ae2e5014b424052986ad407ad4a883e0d874d45
| 172
|
py
|
Python
|
lessons/1_django/simpleApp/articles/urls.py
|
OmarThinks/django-cheat-sheet
|
dd8ca772301c443aa6c8a0845e9b10c182a00efa
|
[
"MIT"
] | null | null | null |
lessons/1_django/simpleApp/articles/urls.py
|
OmarThinks/django-cheat-sheet
|
dd8ca772301c443aa6c8a0845e9b10c182a00efa
|
[
"MIT"
] | null | null | null |
lessons/1_django/simpleApp/articles/urls.py
|
OmarThinks/django-cheat-sheet
|
dd8ca772301c443aa6c8a0845e9b10c182a00efa
|
[
"MIT"
] | null | null | null |
from django.urls import path
from .views import (articles_list_page, article_page)
urlpatterns = [
path('', articles_list_page),
path('<int:id>', article_page),
]
| 21.5
| 53
| 0.715116
| 23
| 172
| 5.086957
| 0.565217
| 0.205128
| 0.273504
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151163
| 172
| 7
| 54
| 24.571429
| 0.80137
| 0
| 0
| 0
| 0
| 0
| 0.046512
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4ae43d7df3a5e7d59abd19efc6482eddf3b87650
| 787
|
py
|
Python
|
tests/snippets/elephant:more.py
|
admariner/jurigged
|
34459a5fd3300447ecbc1f943a9939d350639083
|
[
"MIT"
] | null | null | null |
tests/snippets/elephant:more.py
|
admariner/jurigged
|
34459a5fd3300447ecbc1f943a9939d350639083
|
[
"MIT"
] | 1
|
2021-11-11T16:49:33.000Z
|
2021-11-11T16:49:33.000Z
|
tests/snippets/elephant:more.py
|
admariner/jurigged
|
34459a5fd3300447ecbc1f943a9939d350639083
|
[
"MIT"
] | null | null | null |
class Rememberer:
def __init__(self):
self.funcs = []
def register(self, fn):
self.funcs.append(fn)
fn.__conform__ = lambda new: self.recode(fn, new)
return self
def recode(self, fn, new):
if new is None:
self.funcs.remove(fn)
else:
fn.__code__ = new.__code__
def __call__(self, *args):
return [fn(*args) for fn in self.funcs]
activities = Rememberer()
@activities.register
def do(x):
return f"Paint {x} canvasses"
@activities.register
def do(x):
return f"Sing {x} songs"
@activities.register
def do(x):
return f"Worship the {x} suns"
@activities.register
def do(x):
return f"Dance for {x} hours"
@activities.register
def do(x):
return f"Do {x} push-ups"
| 16.744681
| 57
| 0.606099
| 110
| 787
| 4.154545
| 0.354545
| 0.039387
| 0.229759
| 0.251641
| 0.339168
| 0.339168
| 0.339168
| 0
| 0
| 0
| 0
| 0
| 0.270648
| 787
| 46
| 58
| 17.108696
| 0.796167
| 0
| 0
| 0.333333
| 0
| 0
| 0.110687
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0
| 0.2
| 0.566667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
ab0504eaf9f6f867d620bea16e93836e8ad6b3f0
| 19,137
|
py
|
Python
|
Source/Game_of_Life.py
|
Crbakc/Game-of-Life
|
ac9c1065df003520f474354dc3ddc1f7f527e25c
|
[
"MIT"
] | null | null | null |
Source/Game_of_Life.py
|
Crbakc/Game-of-Life
|
ac9c1065df003520f474354dc3ddc1f7f527e25c
|
[
"MIT"
] | null | null | null |
Source/Game_of_Life.py
|
Crbakc/Game-of-Life
|
ac9c1065df003520f474354dc3ddc1f7f527e25c
|
[
"MIT"
] | null | null | null |
import os
import time
import random
import shutil
import colorama
def pos (y, x):
return "\x1b[" + str(y) + ";" + str(x) + "H"
def getGridSize():
gridX, gridY = input("Input grid's size(4x4) Enter '0x0' for current terminal size: ").split('x')
if gridX == '0' and gridY == '0':
gridX , gridY = shutil.get_terminal_size()[0], shutil.get_terminal_size()[1]-5
return gridX, gridY
#add checks for user input
#add size warning
def getGridMethod():
print("#Completely dead with\n 1- random number and location of alive cells\n 2- max number and random location of alive cells")
print(" 3- set number and random location of alive cells\n 4- random number of alive cells at a set distance")
print(" 5- max number of alive cells at a set distance\n 6- set number of alive cells at a set distance")
print(" 7- set number and set location of alive cells")
print("#Completely alive with\n 8- random number and location of dead cells\n 9- max number and random location of alive cells")
print(" 10- set number and random location of dead cells\n 11- random number of dead cells at a set distance")
print(" 12- max number of dead cells at a set distance\n 13- set number of dead cells at a set distance")
print(" 14- set number and set location of dead cells")
print("\n15- Completely random with adjustable bias\n")
gridCreationMethod = int(input("Choose your grid creation method: "))
os.system("cls")
return gridCreationMethod
#add checks for user input
def progressBar(x, y, interval):
if x%interval == 0:
progress = int((x*100)/y)
print(pos(1,1)+"finding {} random points".format(y))
print(pos(2,1)+"|"*progress+" "*(100-progress)+"{}%".format(progress))
def getRandomLocations(numberOfLocations):
randomLocations = []
while len(randomLocations) < numberOfLocations:
randomPoint = [0 , 0]
randomPoint[0] = random.randint(0,gridY-1)
randomPoint[1] = random.randint(0,gridX-1)
if randomPoint not in randomLocations:
randomLocations.append(randomPoint)
progressBar(len(randomLocations), numberOfLocations, 5000)
return randomLocations
def getRandomLocationsAtDistance(numberOfLocations, seperationDistance, gridX, gridY, type):
tryCount = 0
offset = 0
randomLocations = []
if type == 1:
randomPoint = [0 , 0]
randomPoint[0] = random.randint(0,gridY-1)
randomPoint[1] = random.randint(0,gridX-1)
randomLocations.append(randomPoint)
while len(randomLocations) < numberOfLocations:
randomPoint = [0 , 0]
randomPoint[0] = random.randint(randomLocations[len(randomLocations)-1-offset][0] - seperationDistance,randomLocations[len(randomLocations)-1-offset][0] + seperationDistance)
randomPoint[1] = random.randint(randomLocations[len(randomLocations)-1-offset][1] - seperationDistance,randomLocations[len(randomLocations)-1-offset][1] + seperationDistance)
if randomPoint[0] < 0:
randomPoint[0] += gridY-1
elif randomPoint[0] > gridY-1:
randomPoint[0] -= gridY-1
if randomPoint[1] < 0:
randomPoint[1] += gridX-1
elif randomPoint[1] > gridX-1:
randomPoint[1] -= gridX-1
if randomPoint not in randomLocations:
randomLocations.append(randomPoint)
progressBar(len(randomLocations), numberOfLocations, 5000)
offset, tryCount = 0, 0
elif tryCount > 4:
offset += 1
tryCount = 0
else:
tryCount += 1
return randomLocations
def alterGrid(grid, locationsToBeAltered, alterTo):
for i in range(len(locationsToBeAltered)):
grid[locationsToBeAltered[i][0]][locationsToBeAltered[i][1]] = alterTo
def setGridDead(grid, gridY, gridX):
grid.clear()
for y in range(gridY):
new = []
for x in range(gridX):
new.append(0)
grid.append(new)
def setGridAlive(grid, gridY, gridX):
grid.clear()
for y in range(gridY):
new = []
for x in range(gridX):
new.append(1)
grid.append(new)
def createGrid(gridX, gridY, gridCreationMethod):
grid = []
#Completely dead
if gridCreationMethod < 8:
#2d Array creation
for y in range(gridY):
new = []
for x in range(gridX):
new.append(0)
grid.append(new)
#Alterations for given methods
if gridCreationMethod == 1:
generateAgain = 'y'
while generateAgain != 'n' and generateAgain != 'N':
numberOfAliveCells = random.randint(0,gridX*gridY)
randomLocations = getRandomLocations(numberOfAliveCells).copy()
alterGrid(grid, randomLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
elif gridCreationMethod == 2:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
maxNumberOfAliveCells = int(input("Enter the maximum number of alive cells: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
numberOfAliveCells = random.randint(0,maxNumberOfAliveCells)
randomLocations = getRandomLocations(maxNumberOfAliveCells).copy()
alterGrid(grid, randomLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
elif gridCreationMethod == 3:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
numberOfAliveCells = int(input("Enter the number of alive cells: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
randomLocations = getRandomLocations(numberOfAliveCells).copy()
alterGrid(grid, randomLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
elif gridCreationMethod == 4:
generateAgain = 'y'
os.system("cls")
seperationDistance = int(input("Enter the seperation distance: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
numberOfAliveCells = random.randint(0,gridX*gridY)
randomLocations = getRandomLocationsAtDistance(numberOfAliveCells, seperationDistance, gridX, gridY, 1).copy()
alterGrid(grid, randomLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
elif gridCreationMethod == 5:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
maxNumberOfAliveCells = int(input("Enter the maximum number of alive cells: ")) #add checks for user input
seperationDistance = int(input("Enter the seperation distance: "))
while generateAgain != 'n' and generateAgain != 'N':
numberOfAliveCells = random.randint(0,maxNumberOfAliveCells)
randomLocations = getRandomLocationsAtDistance(numberOfAliveCells, seperationDistance, gridX, gridY, 1).copy()
alterGrid(grid, randomLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
elif gridCreationMethod == 6:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
numberOfAliveCells = int(input("Enter the maximum number of alive cells: ")) #add checks for user input
seperationDistance = int(input("Enter the seperation distance: "))
while generateAgain != 'n' and generateAgain != 'N':
randomLocations = getRandomLocationsAtDistance(numberOfAliveCells, seperationDistance, gridX, gridY, 1).copy()
alterGrid(grid, randomLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
#needs optimizing
elif gridCreationMethod == 7:
generateAgain = 'y'
os.system("cls")
cellLocations = []
cellCoordinates = [0,0]
print("Total number of cells {}".format(gridX*gridY))
numberOfAliveCells = int(input("Enter the number of alive cells: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
for i in range(numberOfAliveCells):
cellCoordinates = [0,0]
cellCoordinates[0],cellCoordinates[1] = input("Enter cell coordinates as 'row,column': ").split(',')
cellCoordinates[0],cellCoordinates[1] = int(cellCoordinates[0]), int(cellCoordinates[1])
cellLocations.append(cellCoordinates)
alterGrid(grid, cellLocations, 1)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridDead(grid, gridY, gridX)
return grid
#needs input checks and improvements
#Completely alive
elif gridCreationMethod != 15:
#2d Array creation
for y in range(gridY):
new = []
for x in range(gridX):
new.append(1)
grid.append(new)
#Alterations for given methods
if gridCreationMethod == 8:
generateAgain = 'y'
while generateAgain != 'n' and generateAgain != 'N':
numberOfDeadCells = random.randint(0,gridX*gridY)
randomLocations = getRandomLocations(numberOfDeadCells).copy()
alterGrid(grid, randomLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
elif gridCreationMethod == 9:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
maxNumberOfDeadCells = int(input("Enter the maximum number of dead cells: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
numberOfDeadCells = random.randint(0,maxNumberOfDeadCells)
randomLocations = getRandomLocations(maxNumberOfDeadCells).copy()
alterGrid(grid, randomLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
elif gridCreationMethod == 10:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
numberOfDeadCells = int(input("Enter the number of dead cells: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
randomLocations = getRandomLocations(numberOfDeadCells).copy()
alterGrid(grid, randomLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
elif gridCreationMethod == 11:
generateAgain = 'y'
os.system("cls")
seperationDistance = int(input("Enter the seperation distance: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
numberOfDeadCells = random.randint(0,gridX*gridY)
randomLocations = getRandomLocationsAtDistance(numberOfDeadCells, seperationDistance, gridX, gridY, 1).copy()
alterGrid(grid, randomLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
elif gridCreationMethod == 12:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
maxNumberOfDeadCells = int(input("Enter the maximum number of dead cells: ")) #add checks for user input
seperationDistance = int(input("Enter the seperation distance: "))
while generateAgain != 'n' and generateAgain != 'N':
numberOfDeadCells = random.randint(0,maxNumberOfDeadCells)
randomLocations = getRandomLocationsAtDistance(numberOfDeadCells, seperationDistance, gridX, gridY, 1).copy()
alterGrid(grid, randomLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
elif gridCreationMethod == 13:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
numberOfDeadCells = int(input("Enter the maximum number of dead cells: ")) #add checks for user input
seperationDistance = int(input("Enter the seperation distance: "))
while generateAgain != 'n' and generateAgain != 'N':
randomLocations = getRandomLocationsAtDistance(numberOfDeadCells, seperationDistance, gridX, gridY, 1).copy()
alterGrid(grid, randomLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
#needs optimizing
elif gridCreationMethod == 14:
generateAgain = 'y'
os.system("cls")
cellLocations = []
cellCoordinates = [0,0]
print("Total number of cells {}".format(gridX*gridY))
numberOfDeadCells = int(input("Enter the number of dead cells: ")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
for i in range(numberOfDeadCells):
cellCoordinates = [0,0]
cellCoordinates[0],cellCoordinates[1] = input("Enter cell coordinates as 'row,column': ").split(',')
cellCoordinates[0],cellCoordinates[1] = int(cellCoordinates[0]), int(cellCoordinates[1])
cellLocations.append(cellCoordinates)
alterGrid(grid, cellLocations, 0)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
setGridAlive(grid, gridY, gridX)
return grid
#needs input checks and improvements
#Random with bias
else:
generateAgain = 'y'
os.system("cls")
print("Total number of cells {}".format(gridX*gridY))
biastowardsAlive = int(input("Enter bias towards being alive: %")) #add checks for user input
while generateAgain != 'n' and generateAgain != 'N':
for y in range(gridY):
new = []
for x in range(gridX):
if random.randint(0, 100) < (50*biastowardsAlive/100)+50:
new.append(1)
else:
new.append(0)
progressBar((y+1)*(x+1), gridY*gridX, 5)
grid.append(new)
displayGrid(grid)
print("Generate again(y/n)? ", end = '')
generateAgain = input("('d' for choosing a different method or size) ")
if generateAgain == 'd' and 'D':
return [[-1], [-1]]
elif generateAgain == 'y' and 'Y':
grid.clear()
return grid
def displayGrid(grid):
for y in range(len(grid)):
#print("")
for x in range(len(grid[0])):
if grid[y][x] == 1:
print(pos(y+1,x+1) + "#", end = '')
#print("#", end ='')
else:
print(pos(y+1,x+1) + " ", end = '')
#print(" ", end ='')
#print("")
def updateGrid(x,y,status):
if status:
print(pos(y,x) + "#", end = '')
else:
print(pos(y,x) + " ", end = '')
def playClassic(grid):
changedPoint = [0,0,0]
changes = []
for y in range(len(grid)):
for x in range(len(grid[0])):
aliveNeighbours = 0
deadNeighbours = 0
if x + 1 > len(grid[0])-1:
offsetXRight = 1 - len(grid[0])
else:
offsetXRight = 1
if x - 1 < 0:
offsetXLeft = -1 + len(grid[0])
else:
offsetXLeft = -1
if y + 1 > len(grid)-1:
offsetYRight = 1 - len(grid)
else:
offsetYRight = 1
if y - 1 < 0:
offsetYLeft = -1 + len(grid)
else:
offsetYLeft = -1
offsetXList = [offsetXRight, offsetXLeft, 0]
offsetYList = [offsetYRight, offsetYLeft, 0]
for yOffset in offsetYList:
for xOffset in offsetXList:
if xOffset == 0 and yOffset == 0:
selfStatuts = grid[y+yOffset][x+xOffset]
elif grid[y+yOffset][x+xOffset] == 1:
aliveNeighbours += 1
elif grid[y+yOffset][x+xOffset] == 0:
deadNeighbours += 1
if selfStatuts:
if aliveNeighbours > 3:
#grid[y][x] = 0
changedPoint = [0,0,0]
changedPoint[0] = y
changedPoint[1] = x
changedPoint[2] = 0
changes.append(changedPoint)
updateGrid(x+1,y+1,0)
elif aliveNeighbours < 2:
#grid[y][x] = 0
changedPoint = [0,0,0]
changedPoint[0] = y
changedPoint[1] = x
changedPoint[2] = 0
changes.append(changedPoint)
updateGrid(x+1,y+1,0)
else:
if aliveNeighbours == 3:
#grid[y][x] = 1
changedPoint = [0,0,0]
changedPoint[0] = y
changedPoint[1] = x
changedPoint[2] = 1
changes.append(changedPoint)
updateGrid(x+1,y+1,1)
for i in range(len(changes)):
grid[changes[i][0]][changes[i][1]] = changes[i][2]
#updateGrid(changes[i][1]+1,changes[i][0]+1,changes[i][2])
if __name__ == "__main__":
generateAgain = 'y'
while generateAgain != 'n' and generateAgain != 'N':
os.system("cls")
gridX , gridY = getGridSize()
gridX, gridY = int(gridX), int(gridY)
gridCreationMethod = getGridMethod()
grid = createGrid(gridX, gridY, gridCreationMethod).copy()
if grid[0][0] == -1:
generateAgain = 'y'
else:
generateAgain = 'n'
stopAtEach = int(input("At how many iterations you should be asked to stop? ")) #Add cheks for user input
stop = 'n'
os.system('mode con: cols={} lines={}'.format(gridX+10,gridY+10))
os.system("cls")
generation = 1
while stop == 'n':
for i in range(stopAtEach):
#time.sleep(2)
playClassic(grid)
#print ("\n" * shutil.get_terminal_size()[1])
#displayGrid(grid)
generation += 1
print('\n')
print(generation)
stop = input("Would you like to stop(y/n)? ")
| 36.039548
| 177
| 0.662957
| 2,362
| 19,137
| 5.365368
| 0.07917
| 0.036455
| 0.017439
| 0.027776
| 0.787738
| 0.761856
| 0.745364
| 0.719956
| 0.705752
| 0.671506
| 0
| 0.020897
| 0.197314
| 19,137
| 531
| 178
| 36.039548
| 0.804114
| 0.046193
| 0
| 0.69281
| 0
| 0.013072
| 0.17492
| 0
| 0
| 0
| 0.000165
| 0
| 0
| 1
| 0.028322
| false
| 0
| 0.010893
| 0.002179
| 0.115468
| 0.093682
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ab2ff4d6064b4975052bd51ba0948bf5f8ad5917
| 348
|
py
|
Python
|
rasa_core/nlg/__init__.py
|
TiboC/rasa_core
|
5c025fad44302164af0d6c2767fc1b6a49131b67
|
[
"Apache-2.0"
] | 2
|
2021-04-20T03:20:26.000Z
|
2022-01-20T02:04:52.000Z
|
rasa_core/nlg/__init__.py
|
farooqarahim/rasa_core
|
acbf97ff1923a553eadd5cf881e64c50e622ae90
|
[
"Apache-2.0"
] | null | null | null |
rasa_core/nlg/__init__.py
|
farooqarahim/rasa_core
|
acbf97ff1923a553eadd5cf881e64c50e622ae90
|
[
"Apache-2.0"
] | 1
|
2019-03-07T16:37:48.000Z
|
2019-03-07T16:37:48.000Z
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from rasa_core.nlg.generator import NaturalLanguageGenerator
from rasa_core.nlg.template import TemplatedNaturalLanguageGenerator
from rasa_core.nlg.callback import CallbackNaturalLanguageGenerator
| 38.666667
| 68
| 0.899425
| 40
| 348
| 7.275
| 0.45
| 0.137457
| 0.219931
| 0.154639
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 348
| 8
| 69
| 43.5
| 0.912226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.142857
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ab334613e3262999c5b2f3bad21826b4ae912519
| 16,437
|
py
|
Python
|
test/torchaudio_unittest/sox_effect/sox_effect_test.py
|
majabojarska/audio
|
765fde0873ee52be9c1db1fdc7fddedb721f4d0c
|
[
"BSD-2-Clause"
] | 1
|
2021-05-07T16:33:15.000Z
|
2021-05-07T16:33:15.000Z
|
test/torchaudio_unittest/sox_effect/sox_effect_test.py
|
majabojarska/audio
|
765fde0873ee52be9c1db1fdc7fddedb721f4d0c
|
[
"BSD-2-Clause"
] | null | null | null |
test/torchaudio_unittest/sox_effect/sox_effect_test.py
|
majabojarska/audio
|
765fde0873ee52be9c1db1fdc7fddedb721f4d0c
|
[
"BSD-2-Clause"
] | null | null | null |
import io
import itertools
from pathlib import Path
import tarfile
from parameterized import parameterized
from torchaudio import sox_effects
from torchaudio._internal import module_utils as _mod_utils
from torchaudio_unittest.common_utils import (
TempDirMixin,
HttpServerMixin,
PytorchTestCase,
skipIfNoExtension,
skipIfNoModule,
skipIfNoExec,
get_asset_path,
get_sinusoid,
get_wav_data,
save_wav,
load_wav,
sox_utils,
)
from .common import (
load_params,
name_func,
)
if _mod_utils.is_module_available("requests"):
import requests
@skipIfNoExtension
class TestSoxEffects(PytorchTestCase):
def test_init(self):
"""Calling init_sox_effects multiple times does not crush"""
for _ in range(3):
sox_effects.init_sox_effects()
@skipIfNoExtension
class TestSoxEffectsTensor(TempDirMixin, PytorchTestCase):
"""Test suite for `apply_effects_tensor` function"""
@parameterized.expand(list(itertools.product(
['float32', 'int32', 'int16', 'uint8'],
[8000, 16000],
[1, 2, 4, 8],
[True, False]
)), name_func=name_func)
def test_apply_no_effect(self, dtype, sample_rate, num_channels, channels_first):
"""`apply_effects_tensor` without effects should return identical data as input"""
original = get_wav_data(dtype, num_channels, channels_first=channels_first)
expected = original.clone()
found, output_sample_rate = sox_effects.apply_effects_tensor(
expected, sample_rate, [], channels_first)
assert output_sample_rate == sample_rate
# SoxEffect should not alter the input Tensor object
self.assertEqual(original, expected)
# SoxEffect should not return the same Tensor object
assert expected is not found
# Returned Tensor should equal to the input Tensor
self.assertEqual(expected, found)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects(self, args):
"""`apply_effects_tensor` should return identical data as sox command"""
effects = args['effects']
num_channels = args.get("num_channels", 2)
input_sr = args.get("input_sample_rate", 8000)
output_sr = args.get("output_sample_rate")
input_path = self.get_temp_path('input.wav')
reference_path = self.get_temp_path('reference.wav')
original = get_sinusoid(
frequency=800, sample_rate=input_sr,
n_channels=num_channels, dtype='float32')
save_wav(input_path, original, input_sr)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_sample_rate=output_sr)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_tensor(original, input_sr, effects)
assert sr == expected_sr
self.assertEqual(expected, found)
@skipIfNoExtension
class TestSoxEffectsFile(TempDirMixin, PytorchTestCase):
"""Test suite for `apply_effects_file` function"""
@parameterized.expand(list(itertools.product(
['float32', 'int32', 'int16', 'uint8'],
[8000, 16000],
[1, 2, 4, 8],
[False, True],
)), name_func=name_func)
def test_apply_no_effect(self, dtype, sample_rate, num_channels, channels_first):
"""`apply_effects_file` without effects should return identical data as input"""
path = self.get_temp_path('input.wav')
expected = get_wav_data(dtype, num_channels, channels_first=channels_first)
save_wav(path, expected, sample_rate, channels_first=channels_first)
found, output_sample_rate = sox_effects.apply_effects_file(
path, [], normalize=False, channels_first=channels_first)
assert output_sample_rate == sample_rate
self.assertEqual(expected, found)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_str(self, args):
"""`apply_effects_file` should return identical data as sox command"""
dtype = 'int32'
channels_first = True
effects = args['effects']
num_channels = args.get("num_channels", 2)
input_sr = args.get("input_sample_rate", 8000)
output_sr = args.get("output_sample_rate")
input_path = self.get_temp_path('input.wav')
reference_path = self.get_temp_path('reference.wav')
data = get_wav_data(dtype, num_channels, channels_first=channels_first)
save_wav(input_path, data, input_sr, channels_first=channels_first)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_sample_rate=output_sr)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_file(
input_path, effects, normalize=False, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
def test_apply_effects_path(self):
"""`apply_effects_file` should return identical data as sox command when file path is given as a Path Object"""
dtype = 'int32'
channels_first = True
effects = [["hilbert"]]
num_channels = 2
input_sr = 8000
output_sr = 8000
input_path = self.get_temp_path('input.wav')
reference_path = self.get_temp_path('reference.wav')
data = get_wav_data(dtype, num_channels, channels_first=channels_first)
save_wav(input_path, data, input_sr, channels_first=channels_first)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_sample_rate=output_sr)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_file(
Path(input_path), effects, normalize=False, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@skipIfNoExtension
class TestFileFormats(TempDirMixin, PytorchTestCase):
"""`apply_effects_file` gives the same result as sox on various file formats"""
@parameterized.expand(list(itertools.product(
['float32', 'int32', 'int16', 'uint8'],
[8000, 16000],
[1, 2],
)), name_func=lambda f, _, p: f'{f.__name__}_{"_".join(str(arg) for arg in p.args)}')
def test_wav(self, dtype, sample_rate, num_channels):
"""`apply_effects_file` works on various wav format"""
channels_first = True
effects = [['band', '300', '10']]
input_path = self.get_temp_path('input.wav')
reference_path = self.get_temp_path('reference.wav')
data = get_wav_data(dtype, num_channels, channels_first=channels_first)
save_wav(input_path, data, sample_rate, channels_first=channels_first)
sox_utils.run_sox_effect(input_path, reference_path, effects)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_file(
input_path, effects, normalize=False, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@parameterized.expand(list(itertools.product(
[8000, 16000],
[1, 2],
)), name_func=lambda f, _, p: f'{f.__name__}_{"_".join(str(arg) for arg in p.args)}')
def test_mp3(self, sample_rate, num_channels):
"""`apply_effects_file` works on various mp3 format"""
channels_first = True
effects = [['band', '300', '10']]
input_path = self.get_temp_path('input.mp3')
reference_path = self.get_temp_path('reference.wav')
sox_utils.gen_audio_file(input_path, sample_rate, num_channels)
sox_utils.run_sox_effect(input_path, reference_path, effects)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_file(
input_path, effects, channels_first=channels_first)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected, atol=1e-4, rtol=1e-8)
@parameterized.expand(list(itertools.product(
[8000, 16000],
[1, 2],
)), name_func=lambda f, _, p: f'{f.__name__}_{"_".join(str(arg) for arg in p.args)}')
def test_flac(self, sample_rate, num_channels):
"""`apply_effects_file` works on various flac format"""
channels_first = True
effects = [['band', '300', '10']]
input_path = self.get_temp_path('input.flac')
reference_path = self.get_temp_path('reference.wav')
sox_utils.gen_audio_file(input_path, sample_rate, num_channels)
sox_utils.run_sox_effect(input_path, reference_path, effects, output_bitdepth=32)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_file(
input_path, effects, channels_first=channels_first)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@parameterized.expand(list(itertools.product(
[8000, 16000],
[1, 2],
)), name_func=lambda f, _, p: f'{f.__name__}_{"_".join(str(arg) for arg in p.args)}')
def test_vorbis(self, sample_rate, num_channels):
"""`apply_effects_file` works on various vorbis format"""
channels_first = True
effects = [['band', '300', '10']]
input_path = self.get_temp_path('input.vorbis')
reference_path = self.get_temp_path('reference.wav')
sox_utils.gen_audio_file(input_path, sample_rate, num_channels)
sox_utils.run_sox_effect(input_path, reference_path, effects, output_bitdepth=32)
expected, expected_sr = load_wav(reference_path)
found, sr = sox_effects.apply_effects_file(
input_path, effects, channels_first=channels_first)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@skipIfNoExtension
class TestApplyEffectFileWithoutExtension(PytorchTestCase):
def test_mp3(self):
"""Providing format allows to read mp3 without extension
libsox does not check header for mp3
https://github.com/pytorch/audio/issues/1040
The file was generated with the following command
ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" -ar 16000 -f mp3 test_noext
"""
effects = [['band', '300', '10']]
path = get_asset_path("mp3_without_ext")
_, sr = sox_effects.apply_effects_file(path, effects, format="mp3")
assert sr == 16000
@skipIfNoExec('sox')
@skipIfNoExtension
class TestFileObject(TempDirMixin, PytorchTestCase):
@parameterized.expand([
('wav', None),
('mp3', 128),
('mp3', 320),
('flac', 0),
('flac', 5),
('flac', 8),
('vorbis', -1),
('vorbis', 10),
('amb', None),
])
def test_fileobj(self, ext, compression):
"""Applying effects via file object works"""
sample_rate = 16000
channels_first = True
effects = [['band', '300', '10']]
format_ = ext if ext in ['mp3'] else None
input_path = self.get_temp_path(f'input.{ext}')
reference_path = self.get_temp_path('reference.wav')
sox_utils.gen_audio_file(
input_path, sample_rate, num_channels=2, compression=compression)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_bitdepth=32)
expected, expected_sr = load_wav(reference_path)
with open(input_path, 'rb') as fileobj:
found, sr = sox_effects.apply_effects_file(
fileobj, effects, channels_first=channels_first, format=format_)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@parameterized.expand([
('wav', None),
('mp3', 128),
('mp3', 320),
('flac', 0),
('flac', 5),
('flac', 8),
('vorbis', -1),
('vorbis', 10),
('amb', None),
])
def test_bytesio(self, ext, compression):
"""Applying effects via BytesIO object works"""
sample_rate = 16000
channels_first = True
effects = [['band', '300', '10']]
format_ = ext if ext in ['mp3'] else None
input_path = self.get_temp_path(f'input.{ext}')
reference_path = self.get_temp_path('reference.wav')
sox_utils.gen_audio_file(
input_path, sample_rate, num_channels=2, compression=compression)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_bitdepth=32)
expected, expected_sr = load_wav(reference_path)
with open(input_path, 'rb') as file_:
fileobj = io.BytesIO(file_.read())
found, sr = sox_effects.apply_effects_file(
fileobj, effects, channels_first=channels_first, format=format_)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@parameterized.expand([
('wav', None),
('mp3', 128),
('mp3', 320),
('flac', 0),
('flac', 5),
('flac', 8),
('vorbis', -1),
('vorbis', 10),
('amb', None),
])
def test_tarfile(self, ext, compression):
"""Applying effects to compressed audio via file-like file works"""
sample_rate = 16000
channels_first = True
effects = [['band', '300', '10']]
format_ = ext if ext in ['mp3'] else None
audio_file = f'input.{ext}'
input_path = self.get_temp_path(audio_file)
reference_path = self.get_temp_path('reference.wav')
archive_path = self.get_temp_path('archive.tar.gz')
sox_utils.gen_audio_file(
input_path, sample_rate, num_channels=2, compression=compression)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_bitdepth=32)
expected, expected_sr = load_wav(reference_path)
with tarfile.TarFile(archive_path, 'w') as tarobj:
tarobj.add(input_path, arcname=audio_file)
with tarfile.TarFile(archive_path, 'r') as tarobj:
fileobj = tarobj.extractfile(audio_file)
found, sr = sox_effects.apply_effects_file(
fileobj, effects, channels_first=channels_first, format=format_)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
@skipIfNoExtension
@skipIfNoExec('sox')
@skipIfNoModule("requests")
class TestFileObjectHttp(HttpServerMixin, PytorchTestCase):
@parameterized.expand([
('wav', None),
('mp3', 128),
('mp3', 320),
('flac', 0),
('flac', 5),
('flac', 8),
('vorbis', -1),
('vorbis', 10),
('amb', None),
])
def test_requests(self, ext, compression):
sample_rate = 16000
channels_first = True
effects = [['band', '300', '10']]
format_ = ext if ext in ['mp3'] else None
audio_file = f'input.{ext}'
input_path = self.get_temp_path(audio_file)
reference_path = self.get_temp_path('reference.wav')
sox_utils.gen_audio_file(
input_path, sample_rate, num_channels=2, compression=compression)
sox_utils.run_sox_effect(
input_path, reference_path, effects, output_bitdepth=32)
expected, expected_sr = load_wav(reference_path)
url = self.get_url(audio_file)
with requests.get(url, stream=True) as resp:
found, sr = sox_effects.apply_effects_file(
resp.raw, effects, channels_first=channels_first, format=format_)
save_wav(self.get_temp_path('result.wav'), found, sr, channels_first=channels_first)
assert sr == expected_sr
self.assertEqual(found, expected)
| 38.766509
| 119
| 0.654012
| 2,030
| 16,437
| 4.997044
| 0.100493
| 0.085864
| 0.033616
| 0.04584
| 0.790024
| 0.773955
| 0.75138
| 0.728214
| 0.699132
| 0.699132
| 0
| 0.023721
| 0.233133
| 16,437
| 423
| 120
| 38.858156
| 0.781039
| 0.083835
| 0
| 0.719403
| 0
| 0.01791
| 0.0785
| 0.017683
| 0
| 0
| 0
| 0
| 0.086567
| 1
| 0.044776
| false
| 0
| 0.029851
| 0
| 0.095522
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
db490636a5ff2be33e1dcb855349eedbd44b75a8
| 126
|
py
|
Python
|
code/ejercicio02.py
|
laonrd0/lcm_2021-2
|
0e580033b7c02ccb37744a1f995c3985e32b8399
|
[
"CC0-1.0"
] | 1
|
2021-07-06T18:28:49.000Z
|
2021-07-06T18:28:49.000Z
|
code/ejercicio02.py
|
laonrd0/lcm_2021-2
|
0e580033b7c02ccb37744a1f995c3985e32b8399
|
[
"CC0-1.0"
] | null | null | null |
code/ejercicio02.py
|
laonrd0/lcm_2021-2
|
0e580033b7c02ccb37744a1f995c3985e32b8399
|
[
"CC0-1.0"
] | null | null | null |
def print_header(cadena_texto):
print("Hola ", cadena_texto)
nombre = input("¿Cuál es tu nombre? ")
print_header(nombre)
| 21
| 38
| 0.722222
| 19
| 126
| 4.631579
| 0.631579
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 126
| 6
| 39
| 21
| 0.805556
| 0
| 0
| 0
| 0
| 0
| 0.19685
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0.75
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
dba7d4cef9626e1f33acd7690312f26b6aa2db7e
| 41,804
|
py
|
Python
|
cmt/modis/learned_adaboost.py
|
erichilarysmithsr/CrisisMappingToolkit
|
33eb4f158cf7ae4c3e58025b2639186d17fe8d01
|
[
"Apache-2.0"
] | null | null | null |
cmt/modis/learned_adaboost.py
|
erichilarysmithsr/CrisisMappingToolkit
|
33eb4f158cf7ae4c3e58025b2639186d17fe8d01
|
[
"Apache-2.0"
] | null | null | null |
cmt/modis/learned_adaboost.py
|
erichilarysmithsr/CrisisMappingToolkit
|
33eb4f158cf7ae4c3e58025b2639186d17fe8d01
|
[
"Apache-2.0"
] | null | null | null |
# -----------------------------------------------------------------------------
# Copyright * 2014, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The Crisis Mapping Toolkit (CMT) v1 platform is 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.
# -----------------------------------------------------------------------------
# this file stores variously previously learned Adaboost classifiers
modis_classifiers = dict()
radar_classifiers = dict()
# default classifier, learned from ['unflooded_mississippi_2010.xml', 'unflooded_new_orleans_2004.xml', 'sf_bay_area_2011_4.xml', 'unflooded_bosnia_2013.xml']
modis_classifiers['default'] = [(u'dartmouth', 0.30887438055782945, 1.4558371112080295), (u'b2', 2020.1975382568198, 0.9880130793929531), (u'MNDWI', 0.3677501330908955, 0.5140443440746121), (u'b2', 1430.1463073852296, 0.15367606716883875), (u'b1', 1108.5241042345276, 0.13193086117959033), (u'dartmouth', 0.7819758531686796, -0.13210548296374583), (u'dartmouth', 0.604427824270283, 0.12627962195951867), (u'b2', 1725.1719228210247, -0.07293616881105353), (u'b2', 1872.6847305389224, -0.09329031467870501), (u'b2', 1577.659115103127, 0.1182474134065663), (u'b2', 1946.441134397871, -0.13595282841411163), (u'b2', 2610.24876912841, 0.10010381165310277), (u'b2', 1983.3193363273454, -0.0934455057392682), (u'b2', 1503.9027112441784, 0.13483194249576771), (u'b2', 2001.7584372920826, -0.10099203054937314), (u'b2', 2905.2743845642053, 0.1135686859467779), (u'dartmouth', 0.5156538098210846, 0.07527677772747364), (u'b2', 2010.9779877744513, -0.09535260187161688), (u'b2', 1798.9283266799735, 0.07889358547222977), (u'dartmouth', 0.36787708796485785, -0.07370319016383906), (u'MNDWI', -0.6422574132273133, 0.06922934793487515), (u'dartmouth', 0.33837573426134365, -0.10266747186797487), (u'dartmouth', 0.4712668025964854, 0.09612545197834421), (u'dartmouth', 0.3236250574095866, -0.10754218805531587), (u'MNDWI', -0.48248013602276113, 0.111365639029263), (u'dartmouth', 0.316249718983708, -0.10620217821842894), (u'dartmouth', 0.4490732989841858, 0.09743861137429623), (u'dartmouth', 0.31256204977076874, -0.08121162639185005), (u'MNDWI', -0.5623687746250372, 0.10344420165347998), (u'dartmouth', 0.3107182151642991, -0.08899821447581886), (u'LSWI', -0.29661326544921773, 0.08652882218688322), (u'dartmouth', 0.3097962978610643, -0.07503568257204306), (u'MNDWI', 0.022523637136343283, 0.08765150582301148), (u'b2', 2015.5877630156356, -0.06978548014829108), (u'b2', 3052.7871922821028, 0.08567389991115743), (u'LSWI', -0.19275063787434812, 0.08357667312445341), (u'dartmouth', 0.3093353392094469, -0.08053950648462435), (u'LSWI', -0.14081932408691333, 0.07186342090261867), (u'dartmouth', 0.30910485988363817, -0.05720223719278896), (u'MNDWI', 0.19513688511361937, 0.07282637257701345), (u'NDWI', -0.361068160450533, 0.06565995208358431), (u'NDWI', -0.2074005503754442, -0.0522715989389411), (u'b1', 775.4361563517915, 0.05066415016422507), (u'b2', 2017.8926506362277, -0.0596357907686033), (u'b2', 1762.050124750499, 0.06600172638129476), (u'b2', 2019.0450944465238, -0.05498763067596745), (u'b1', 941.9801302931596, 0.06500771792028737), (u'dartmouth', 0.24987167315080105, 0.06409775979747406), (u'b2', 2979.0307884231543, 0.06178896578945445), (u'dartmouth', 0.22037031944728686, 0.04708770942378687), (u'dartmouth', 0.30898962022073384, -0.06357932266591948), (u'EVI', -0.13991172174597732, 0.061167901067941045), (u'dartmouth', 0.30893200038928165, -0.047538992866687814), (u'dartmouth', 0.23512099629904396, 0.055800430467148325), (u'dartmouth', 0.3089031904735555, -0.04993911823852714), (u'dartmouth', 0.22774565787316542, 0.045917043382747345), (u'b1', 232.32231270358304, -0.04624672841408699), (u'LSWIminusEVI', -1.3902019910129537, 0.044122210356250594), (u'fai', 914.8719936250361, 0.04696283008449494), (u'b2', 2019.6213163516718, -0.051114386132496435), (u'b2', 2315.2231536926147, 0.048898662215419296), (u'fai', 1434.706585047812, -0.05352547959475242), (u'diff', -544.4250000000001, -0.04459039609050114), (u'dartmouth', 0.39737844166837205, 0.045452678171318414), (u'dartmouth', 0.3088887855156925, -0.03891014191130265), (u'dartmouth', 0.22405798866022614, 0.042128457713671935), (u'diff', -777.2958333333333, -0.03902784979889064), (u'dartmouth', 0.2222141540537565, 0.03788131334473313), (u'dartmouth', 0.30888158303676094, -0.037208213701295255), (u'dartmouth', 0.3531264111131007, 0.0375648736301961), (u'dartmouth', 0.3088779817972952, -0.03427856593613819), (u'LSWI', -0.16678498098063071, 0.03430983541990538), (u'fai', -425.5957838307736, -0.03348006551810443), (u'NDWI', -0.13056674533789978, -0.03552899660957818), (u'b2', 2019.3332053990978, -0.0344936369203531), (u'b2', 1835.806528609448, 0.03856210900250611), (u'b2', 1467.0245093147041, -0.0345449746977328), (u'fai', 395.0374022022602, 0.031130251540884356), (u'fai', 654.9546979136481, 0.04214466417320743), (u'b2', 1448.5854083499669, -0.05667775728680656), (u'fai', 135.12010649087222, 0.03948338203848539), (u'dartmouth', 0.493460306208785, -0.045802615250103394), (u'fai', 784.9133457693422, 0.03128133499873274), (u'fai', 1174.7892893364242, -0.04413487095880613), (u'b2', 3015.9089903526283, 0.04133685218791008), (u'fai', 1304.7479371921181, -0.04107557606064173), (u'b2', 2462.7359614105126, 0.03777625735990945), (u'fai', 1369.727261119965, -0.03524600268462714), (u'b2', 2997.4698893878913, 0.03864830537283341), (u'dartmouth', 0.22313607135699132, 0.0348041704038284), (u'fai', -575.9950811359025, -0.036345846940478974), (u'fai', 1402.2169230838886, -0.03481517966048645), (u'fai', 719.9340218414952, 0.032833655233338276), (u'b2', 2019.1891499228109, -0.03272953788499046), (u'b2', 2388.9795575515636, 0.03713369823962704), (u'b2', 2019.1171221846673, -0.027949075715791222), (u'b2', 1743.611023785762, 0.03310357200312585), (u'LSWIminusNDVI', -0.3990346417915731, 0.029045726328998267), (u'NDWI', -0.16898364785667197, -0.025735337614573982), (u'dartmouth', 0.3088761811775623, -0.02973898070330325)]
## Trained only on Mississippi MODIS x 30
#classifier = [(u'dartmouth', 0.4601187028446295, 1.3933244326017509), (u'b2', 2354.099683544304, 0.8009263433881945), (u'LSWIminusNDVI', -0.37403464179157314, -0.19660698864485893), (u'b2', 997.0490506329114, -0.22609471240379023), (u'LSWI', 0.7307270024497643, -0.19371590131103372), (u'b2', 2862.799841772152, 0.1958087739665682), (u'LSWI', 0.6519079187081369, -0.10411467161095657), (u'b2', 827.2238924050632, -0.1627002183497957), (u'LSWI', 0.6124983768373232, -0.1164763151056205), (u'b2', 3117.149920886076, 0.14045495336435712), (u'dartmouth', 0.8979830751809463, -0.12738474810727388), (u'b2', 1845.3995253164558, 0.09053474497663075), (u'LSWIminusNDVI', -0.4337695820901687, 0.0857764518831651), (u'dartmouth', 1.4135180226982098, 0.07075600803587892), (u'LSWIminusNDVI', 0.7774358230593219, -0.11418946709797562), (u'dartmouth', 1.3146504355818416, 0.10739211371940653), (u'dartmouth', 1.0568829618232098, -0.11015352163127118), (u'b2', 2989.974881329114, 0.08685181198332771), (u'LSWI', 0.8095460861913917, -0.08786494584616246), (u'b2', 912.1364715189873, -0.10303455995441295), (u'MNDWI', -0.29396969047077653, 0.07596098140939918), (u'dartmouth', 1.3640842291400257, 0.09266573131480345), (u'LSWI', 0.8489556280622054, -0.0783584759736119), (u'NDVI', 0.7748969641121193, 0.07406876644625034), (u'dartmouth', 0.9774330185020781, -0.08325113592851094), (u'dartmouth', 0.739083188538683, 0.07799308375292567), (u'dartmouth', 0.9377080468415122, -0.07468962616015257), (u'b2', 3053.562401107595, 0.08334191996627335), (u'LSWI', 0.8686603989976123, -0.05795058684040472), (u'b2', 954.5927610759493, -0.0764128019856413)]
# Trained only on Bosnia data set
# 30
#classifier = [(u'fai', -105.57184246833049, 2.011175093865707), (u'diff', 1251.7560240963855, 0.8824534628772853), (u'LSWI', -0.1950396228838406, -0.34104836216017687), (u'MNDWI', 0.3156758628856189, 0.3971974262249763), (u'diff', 1652.1280120481929, 0.2301851751240506), (u'fai', 21.356797943057927, -0.25320140980424466), (u'ratio', 8.124320652173912, -0.27487135740578195), (u'MNDWI', 0.4338371139090058, 0.23183008491145138), (u'fai', -42.10752226263628, -0.2838952387654039), (u'ratio', 9.051290760869565, -0.18060837756218376), (u'MNDWI', 0.4929177394206993, 0.26151319350647706), (u'dartmouth', 0.7715202347815262, -0.19603377110432904), (u'MNDWI', 0.46337742666485254, 0.16945766306122212), (u'ratio', 9.51477581521739, -0.19326781484568353), (u'fai', -73.83968236548338, -0.1914520350524376), (u'dartmouth', 0.8985318397001062, 0.1320588534810869), (u'ratio', 9.746518342391305, -0.19297983361086213), (u'dartmouth', 0.9620376421593961, 0.138279854734148), (u'dartmouth', 0.8350260372408163, -0.11171574068467803), (u'fai', 84.82111814875213, 0.10168445603729025), (u'fai', -89.70576241690694, -0.14899335489218352), (u'NDVI', 0.7246944616336632, -0.12905505976725612), (u'MNDWI', 0.5224580521765461, 0.13393714338762214), (u'MNDWI', -0.09581370874173237, 0.0971904083985509), (u'fai', -97.63880244261871, -0.12420188150947246), (u'fai', 116.55327825159924, 0.1379596068377162), (u'fai', -101.6053224554746, -0.13973920004492527), (u'ratio', 9.862389605978262, -0.13788473854143857), (u'dartmouth', 0.9302847409297512, 0.12752031805931177), (u'dartmouth', 0.8032731360111712, -0.12615703892605462)]
# 100
#classifier = [(u'fai', -105.57184246833049, 2.011175093865707), (u'diff', 1251.7560240963855, 0.8824534628772853), (u'LSWI', -0.1950396228838406, -0.34104836216017687), (u'MNDWI', 0.3156758628856189, 0.3971974262249763), (u'diff', 1652.1280120481929, 0.2301851751240506), (u'fai', 21.356797943057927, -0.25320140980424466), (u'ratio', 8.124320652173912, -0.27487135740578195), (u'MNDWI', 0.4338371139090058, 0.23183008491145138), (u'fai', -42.10752226263628, -0.2838952387654039), (u'ratio', 9.051290760869565, -0.18060837756218376), (u'MNDWI', 0.4929177394206993, 0.26151319350647706), (u'dartmouth', 0.7715202347815262, -0.19603377110432904), (u'MNDWI', 0.46337742666485254, 0.16945766306122212), (u'ratio', 9.51477581521739, -0.19326781484568353), (u'fai', -73.83968236548338, -0.1914520350524376), (u'dartmouth', 0.8985318397001062, 0.1320588534810869), (u'ratio', 9.746518342391305, -0.19297983361086213), (u'dartmouth', 0.9620376421593961, 0.138279854734148), (u'dartmouth', 0.8350260372408163, -0.11171574068467803), (u'fai', 84.82111814875213, 0.10168445603729025), (u'fai', -89.70576241690694, -0.14899335489218352), (u'NDVI', 0.7246944616336632, -0.12905505976725612), (u'MNDWI', 0.5224580521765461, 0.13393714338762214), (u'MNDWI', -0.09581370874173237, 0.0971904083985509), (u'fai', -97.63880244261871, -0.12420188150947246), (u'fai', 116.55327825159924, 0.1379596068377162), (u'fai', -101.6053224554746, -0.13973920004492527), (u'ratio', 9.862389605978262, -0.13788473854143857), (u'dartmouth', 0.9302847409297512, 0.12752031805931177), (u'dartmouth', 0.8032731360111712, -0.12615703892605462), (u'fai', 53.08895804590503, 0.11280108368230035), (u'fai', -103.58858246190255, -0.1323621639708806), (u'fai', 68.95503809732858, 0.11111732544776452), (u'fai', -104.58021246511652, -0.09561460982792948), (u'ratio', 9.920325237771738, -0.11350588718525503), (u'MNDWI', 0.5372282085544694, 0.12457806680434337), (u'ratio', 9.949293053668477, -0.10142947278348549), (u'b1', 1024.4102564102564, 0.12769119462941034), (u'LSWIminusEVI', 1.2275397718573775, -0.10736324339508174), (u'b2', 3027.5, 0.11335627686056896), (u'LSWIminusEVI', 0.9969081432144813, -0.09855102339735189), (u'b2', 2856.25, 0.12341099685812779), (u'LSWIminusEVI', 1.1122239575359294, -0.09888830150850089), (u'fai', -105.0760274667235, -0.10867185036244718), (u'LSWI', -0.22884831003114736, 0.09390617010433257), (u'b1', 855.3653846153845, 0.09224267581066231), (u'dartmouth', 0.7873966853963488, -0.08654968485638263), (u'MNDWI', 0.5076878957986226, 0.08281065550953068), (u'LSWIminusEVI', 1.0545660503752052, -0.10070544168373859), (u'b1', 939.8878205128204, 0.09546509230524551), (u'LSWIminusEVI', 1.0257370967948432, -0.07512157753132792), (u'dartmouth', 0.9144082903149287, 0.08334614008782373), (u'MNDWI', 0.37475648839731235, -0.09347621062767539), (u'EVI', -0.5354007283235324, 0.07174011237019035), (u'MNDWI', 0.5298431303655078, 0.09325407788460913), (u'LSWIminusEVI', 1.011322620004662, -0.07094468512780058), (u'fai', -105.323934967527, -0.08699012823035202), (u'fai', 37.22287799448148, 0.0825373235212839), (u'dartmouth', 0.7794584600889375, -0.07138166975482693), (u'dartmouth', 0.8667789384704612, 0.07712045798967725), (u'dartmouth', 0.7754893474352318, -0.06762386155357324), (u'dartmouth', 0.6445086298629463, 0.07866161620559303), (u'fai', -105.44788871792875, -0.06872185637143167), (u'LSWI', -0.21194396645749397, 0.07899481836422567), (u'b1', 982.1490384615383, 0.067325499150263), (u'dartmouth', 0.773504791108379, -0.06463211254050916), (u'dartmouth', 0.5810028274036563, 0.07334871420010625), (u'b1', 770.8429487179487, -0.059061001597415036), (u'fai', -105.50986559312962, -0.0589202777929247), (u'EVI', -0.7131758497107877, 0.07543805485058235), (u'b2', 2941.875, 0.0769994468975548), (u'ratio', 9.934809145720108, -0.06559718164524614), (u'MNDWI', 0.5150729739875843, 0.0716339467915095), (u'dartmouth', 0.7725125129449526, -0.051293672818369905), (u'LSWI', -0.2034917946706673, 0.05938789552971963), (u'b1', 961.0184294871794, 0.07318340098162476), (u'b1', 813.1041666666666, -0.06572293073399683), (u'fai', 735.022130941929, 0.060554277275912824), (u'fai', 1028.3904772356705, -0.05029509963366562), (u'dartmouth', 0.9223465156223399, 0.0603999613021688), (u'ratio', 9.927567191745922, -0.059891901340974205), (u'fai', -105.54085403073006, -0.07731554985749788), (u'EVI', -0.62428828901716, 0.06719923296302845), (u'b1', 950.453125, 0.07579445528659902), (u'LSWIminusEVI', 1.0041153816095716, -0.056489892194208524), (u'MNDWI', 0.5113804348931035, 0.05913619958443161), (u'MNDWI', 0.4042968011531591, -0.05075066212771365), (u'diff', 44.518072289156635, 0.04720084087401721), (u'fai', -105.55634824953027, -0.05663241244401389), (u'diff', 247.76506024096386, 0.0590397873216613), (u'b2', 2899.0625, 0.05140907548559329), (u'NDVI', 0.678130801361386, -0.05420275867925114), (u'fai', -105.56409535893039, -0.0578072448545363), (u'NDVI', 0.6548489712252474, -0.07016682881460558), (u'dartmouth', 0.9183774029686342, 0.07612486244144435), (u'NDVI', 0.6664898862933167, -0.06024946186606819), (u'MNDWI', 0.544613286743431, 0.07203803995934993), (u'NDVI', 0.660669428759282, -0.055733385225458454), (u'b2', 2877.65625, 0.05993217671898275), (u'b1', 834.2347756410256, -0.05155918752640494)]
# New Orleans 30
#classifier = [(u'b2', 396.6109850939728, 1.4807909625958868), (u'b2', 1768.9536616979908, 0.8924003455619385), (u'b1', 854.8195364238411, 0.40691523803721014), (u'MNDWI', 0.3892345080908955, 0.36259940088550857), (u'dartmouth', 0.30135484930782946, -0.14337027100064728), (u'NDWI', -0.08016322692474476, -0.15831813233382272), (u'b2', 2281.2268308489956, 0.1353187435748396), (u'dartmouth', 0.7479193288987777, -0.16003727715630708), (u'b2', 2537.363415424498, 0.14061137727842032), (u'ratio', 6.880495612552257, -0.1166499595177218), (u'dartmouth', 0.3565977910898579, -0.11078288758401122), (u'NDWI', -0.2159195980788689, -0.10724023529180131), (u'dartmouth', 0.3289763201988437, -0.10755196279513543), (u'LSWI', -0.0569956547430914, 0.13659163207872768), (u'ratio', 3.9894934188283853, -0.10611849585590673), (u'b2', 2665.4317077122487, 0.14308264148123284), (u'ratio', 5.434994515690321, -0.0863607116606289), (u'b2', 2729.4658538561243, 0.08311291715506125), (u'fai', 902.9220972795897, -0.09359740396097607), (u'NDWI', -0.14804141250180683, -0.0705379771355723), (u'dartmouth', 0.31516558475333656, -0.08259143592340348), (u'LSWI', -0.14982826386693998, 0.08733446419322317), (u'ratio', 9.771497806276129, 0.08172740412577022), (u'MNDWI', -0.6315152257273133, 0.09657359625983933), (u'ratio', 11.216998903138064, 0.08246857226665376), (u'MNDWI', -0.7966635966818656, 0.07605162061421399), (u'dartmouth', 0.32207095247609013, -0.08295128868296117), (u'MNDWI', -0.7140894112045895, 0.0793663117501679), (u'ratio', 10.494248354707096, 0.08231229722793916), (u'LSWIminusEVI', -0.08557300521224676, -0.07043790156684442)]
# 87 on a full set including a dozen lakes
modis_classifiers['lakes'] = [(u'dartmouth', 0.3191065854189406, 1.557305460141852), (u'MNDWI', 0.36596171757859164, 0.6348226054395288), (u'fai', 1076.7198220279101, 0.30760696551024047), (u'b1', 2490.1666666666665, 0.15428815637057783), (u'b1', 1382.4166666666665, 0.23468676605683622), (u'MNDWI', 0.016043270812331922, 0.2328762729873063), (u'diff', 1348.2627965043696, 0.0893530403812219), (u'EVI', -0.936229495395644, -0.0634313110230615), (u'EVI', 0.15713514272585227, -0.1369834357186273), (u'MNDWI', 0.19100249419546178, 0.1396065269707512), (u'EVI', -0.3895471763348959, -0.0699137042914175), (u'fai', -167.53021645595163, 0.09996436618217863), (u'diff', 3321.3055555555557, 0.09048885842380311), (u'fai', -39.46036556514488, 0.10447135022949844), (u'LSWIminusEVI', -1.8703796507388168, -0.08555612086933119), (u'fai', 24.57455988025849, 0.06788717248868892), (u'EVI', -0.1162060168045218, -0.07076437875624517), (u'EVI', 0.020464562960665234, -0.06640347420417587), (u'MNDWI', 0.2784821058870267, 0.0724098935614613), (u'LSWIminusEVI', -1.4401890608008658, -0.07070792766742959), (u'fai', -7.442902842443196, 0.07045138322018761), (u'EVI', -0.047870726921928286, -0.07285420746159146), (u'LSWIminusEVI', -1.2250937658318906, -0.055977386707896926), (u'b2', 3161.583333333333, -0.06589191057236488), (u'b2', 4305.708333333333, 0.04837026087353021), (u'dartmouth', 0.38322539525652455, 0.06306567258296356), (u'b2', 3733.645833333333, 0.054927931406532564), (u'dartmouth', 0.41528480017531655, 0.06032232647772757), (u'b2', 4019.677083333333, 0.0519316593408497), (u'dartmouth', 0.43131450263471255, 0.04868064475460096), (u'EVI', -0.013703081980631526, -0.052847995106752886), (u'b1', 828.5416666666666, -0.045046979840081554), (u'dartmouth', 0.4393293538644105, 0.03393621379393856), (u'b2', 436.6666666666667, -0.058719990230070525), (u'dartmouth', 0.44333677947925954, 0.055475163457599744), (u'dartmouth', 0.35116599033773255, -0.04464212550237975), (u'diff', 1956.9369538077403, -0.044786403818468996), (u'fai', 582.664653676786, 0.034362389553391215), (u'dartmouth', 0.3351362878783366, -0.03792028656513705), (u'dartmouth', 0.44534049228668404, 0.05187952065328861), (u'dartmouth', 0.3271214366486386, -0.05470657728868695), (u'MNDWI', -0.6666113750420029, 0.05405507219193603), (u'dartmouth', 0.32311401103378956, -0.05376528359478583), (u'dartmouth', 0.4463423486903963, 0.05449932480484019), (u'dartmouth', 0.32111029822636505, -0.0508089033370553), (u'MNDWI', -0.5002432754979653, 0.05120260867296932), (u'dartmouth', 0.32010844182265286, -0.0486732927468307), (u'dartmouth', 0.44684327689225245, 0.04692181887347917), (u'dartmouth', 0.31960751362079676, -0.04268244773234967), (u'MNDWI', -0.5834273252699841, 0.04712231236239887), (u'dartmouth', 0.31935704951986865, -0.04401637387406991), (u'MNDWI', -0.6250193501559935, 0.040914589219895145), (u'dartmouth', 0.31923181746940466, -0.038101469357921955), (u'dartmouth', 0.4470937409931805, 0.03911555294126862), (u'fai', 335.6370695012239, -0.0367701043425464), (u'fai', 212.12327741344288, -0.029512647597407196), (u'diff', 739.5886392009988, 0.04428176152799306), (u'diff', 1043.925717852684, 0.03722820575844798), (u'fai', 273.8801734573334, -0.04948130454705945), (u'dartmouth', 0.2549877755813566, 0.03377180068269043), (u'MNDWI', 0.3222219117328092, -0.04255121251198512), (u'diff', 1196.0942571785267, 0.045470427081376316), (u'MNDWI', 0.3440918146557004, -0.047085347000781985), (u'MNDWI', 0.23474230004124425, 0.04054075125347783), (u'MNDWI', 0.355026766117146, -0.046736584848805475), (u'MNDWI', 0.30035200880991797, 0.04078965556380944), (u'MNDWI', 0.3604942418478688, -0.04776704868198665), (u'LSWIminusNDVI', -0.5568084053554159, -0.04437083563150389), (u'MNDWI', 0.3112869602713636, 0.036248827530157374), (u'MNDWI', 0.36322797971323023, -0.04875479813967596), (u'MNDWI', 0.3167544360020864, 0.04123070622165848), (u'MNDWI', 0.36459484864591096, -0.03810930893128258), (u'diff', 1120.0099875156054, 0.035777913949894054), (u'fai', 829.6922378523481, -0.047446531409649384), (u'diff', 1081.9678526841449, 0.03507927976215228), (u'fai', 953.2060299401292, -0.04108410252021359), (u'b2', 4162.692708333333, 0.04836338373525389), (u'dartmouth', 0.44721897304364455, 0.03740129289331726), (u'dartmouth', 0.3191692014441726, -0.03601093736536919), (u'fai', 1014.9629259840196, -0.03601118264855319), (u'diff', 1158.052122347066, 0.04506611179539899), (u'fai', 1045.841374005965, -0.03593891978458228), (u'diff', 1652.599875156055, 0.03514766129091426), (u'fai', 1061.2805980169376, -0.034972506816040166), (u'fai', 1570.7749903790343, 0.03247104395760117), (u'MNDWI', -0.6042233377129889, 0.03328561186493601), (u'b2', 4091.184895833333, 0.03369074877033)]
# Gloucester
#classifier = [(u'Red', 106.25, 2.6908694873435546), (u'EVI', 1.8180788840643158, -1.6880493518661959), (u'MNDWI', 0.46606862179569125, 0.6759920285041151), (u'b1', 304.25, 0.6781297845583472), (u'Red', 145.5, -0.9332055109286996)]
# New Bedford
# Sumatra
# BAD!!!
#classifier = [(u'MNDWI', 0.4333154844558887, 1.493003861830998), (u'LSWI', 0.37775474450370045, -1.8148849780535137), (u'MNDWI', 0.44980066412990727, -0.7511626994787829), (u'NDWI', -0.6339380319013941, -0.8071101617753624), (u'LSWI', 0.39116467763045004, -0.6801609455151723), (u'Red_idm', 0.13091442790613322, -0.5990066511447246), (u'MNDWI', 0.5321794476425439, 1.0282918260098124), (u'b1', 534.25, 0.8524646445337082), (u'b2', 3215.75, 1.039598641718185), (u'LSWIminusEVI', -1.34846955925935, 0.5222328913364728), (u'MNDWI', 0.4168303047818701, 0.7765206583109537), (u'b1', 523.375, 0.8634569486904281), (u'NDVI', 0.7289698882981454, 1.2326959603643795), (u'b1', 366.25, 0.8382830454882036), (u'EVI', 1.422945109473755, 1.1928188689191888), (u'b1', 349.125, 0.7785531677333495), (u'LSWIminusEVI', -1.3167488924224617, 1.0260639426964406), (u'MNDWI', 0.40858771494486085, 1.4027451684417347), (u'LSWIminusEVI', -1.332609225840906, 1.9664195043168113), (u'MNDWI', 0.40446642002635624, 2.492961637332882), (u'EVI', 1.50922532584799, 3.6046473932813488), (u'LSWIminusEVI', -1.4332960268996904, 1.6903927811081079), (u'b1', 340.5625, 2.3605074347987642), (u'NDVI', 0.7122812759311696, 3.37782938914105), (u'b1', 517.9375, 1.6428199426052579), (u'MNDWI', 0.5321873001187866, 2.1599753462719047), (u'LSWIminusEVI', -1.340539392550128, 1.4453448840683698), (u'b1', 336.28125, 2.3208302513464885), (u'NDVI', 0.7039369697476817, 3.2525521714322845), (u'b1', 515.21875, 1.314512950758647), (u'MNDWI', 0.532191226356908, 1.617127359609984), (u'b2', 3156.375, 1.8784471643971616), (u'b1', 334.140625, 1.0400732285323449), (u'NDVI', 0.7959284553377698, 1.193027997994037), (u'b1', 333.0703125, 1.0099517832242602), (u'MNDWI', 0.5321931894759686, 1.0361885558471728), (u'EVI', 1.3797149514279692, 1.2523657802915276), (u'LSWIminusEVI', -1.344504475904739, 0.8719989740804845), (u'b1', 332.53515625, 1.0839084753587287), (u'NDVI', 0.6997648166559378, 1.7315726665929243), (u'b1', 332.267578125, 0.996052880739089), (u'NDVI', 0.7791377841849334, 1.0759593744171274), (u'b1', 332.1337890625, 0.9513482878953953), (u'MNDWI', 0.4024057725671039, 0.9086363886393817), (u'LSWIminusEVI', -1.3464870175820445, 1.8026760313828059), (u'Red', 86.875, 2.427801754929139), (u'b1', 513.859375, 1.058023863094511), (u'NDVI', 0.7875331197613515, 1.483041632820267), (u'b1', 332.06689453125, 1.052590647877841), (u'diff', 2716.75, 1.0137422040649617)]
# Malawi
#classifier = [(u'Red', 211.375, -1.4978661367770034), (u'NIR', 171.875, 1.5677471079645802), (u'Red', 208.6875, -0.7549541585435253), (u'b1', 1460.25, 0.6831800731095334), (u'EVI', 0.29952058003806714, 0.5210102026304385)]
# trained on Landsat and MODIS
# trained on Landsat multiple floods and MODIS (doesn't work well)
#classifier = [(u'dartmouth', 0.31990953680782946, 1.3532525832292066), (u'LSWIminusNDVI', -0.41260886054157314, -2.2975599250672945), (u'LSWIminusNDVI', -0.3721610296179776, 0.8951755042386669), (u'LSWIminusNDVI', -0.4530566914651687, 0.6168756052926035), (u'b2', 2031.3975382568196, 0.4928850390139595), (u'B5', 59.35646171559858, 0.396967826941809), (u'B3', 115.2403564453125, -0.5827723329456356), (u'NDVI', -0.499185231572826, -0.8206139450883484), (u'NDVI', 15.27728981864239, -0.9612414977608352), (u'b1', 164.72231270358304, -1.1021978514482116), (u'ratio', 20.830495612552255, -0.8400239901683402), (u'B1', 14.01019038342401, -1.179673542586125), (u'B5', 7.458179092108224, 0.6191675239346668), (u'B5', 37.11245136246036, 0.45205356755293613), (u'LSWIminusNDVI', -0.4328327760033709, 0.2929427581041321), (u'LSWIminusNDVI', -0.35193711415617984, -0.3282316089074475), (u'MNDWI', -0.6320035069773133, -0.5077801803359128), (u'NDVI', 7.549723790463586, -0.7433972707850641), (u'MNDWI', -0.7969077373068656, -0.9734434265642887), (u'NDVI', 3.6859407763741845, -1.1185334743968922), (u'MNDWI', -0.8793598524716417, -1.2191574474417988), (u'dartmouth', 0.25538925127580103, 0.68557400171212), (u'b1', 93.5093648208469, -0.3183118201605347), (u'NDVI', 1.7540492693294836, -0.47533945354750357), (u'b1', 57.902890879478825, -0.5350006454963759), (u'NDVI', 0.7881035158071331, -0.488488980846825), (u'B1', 7.068814236390512, -0.43090497876107114), (u'B5', 11.163310050715186, 0.49166007962734726), (u'LSWIminusNDVI', -0.422720818272472, 0.24376142023795544), (u'LSWIminusEVI', -1.467155116012954, -0.2949111121125788), (u'NDVI', 1.2710763925683084, -0.3532787638045371), (u'b1', 40.099653908794785, -0.35440607970179305), (u'NDVI', 1.0295899541877207, -0.31164486232315497), (u'B1', 3.5981261628737626, -0.3626550539485778), (u'B5', 13.015875530018668, 0.21001981049372742), (u'LSWIminusNDVI', -0.4176648394070226, 0.22155949367640532), (u'LSWIminusNDVI', -0.47328060692696644, -0.25778054247623255), (u'LSWIminusNDVI', -0.4151368499742979, 0.22653206426504116), (u'LSWIminusNDVI', -0.3620490718870787, -0.22717813859342045), (u'LSWIminusNDVI', -0.4138728552579355, 0.22124896614628006), (u'LSWIminusNDVI', -0.4631686491960676, -0.22046149882433666), (u'LSWIminusNDVI', -0.4132408578997543, 0.20278657322608665), (u'B1', 74.36108315515176, -0.19698717197097967), (u'LSWIminusNDVI', -0.36710505075252814, -0.16603353237141502), (u'diff', -3.4819277108433653, -0.2138109964074318), (u'NDVI', 1.1503331733780144, -0.20132627230609748), (u'diff', -182.7289156626506, -0.29647898630599173), (u'LSWI', 22.59461849485026, -0.27478785278729473), (u'b1', 31.198035423452765, -0.3858949394312004), (u'LSWI', 11.28157617977539, -0.35278992723251107)]
# trained on default, plus training data
#classifier = [(u'diff', 7.851405622489949, 1.1499210570729492), (u'dartmouth', 0.8282223665130863, 0.8336847949898812), (u'LSWIminusNDVI', -0.4029517424860176, -0.4969022650114408), (u'B5', 67.74833454545968, 0.3966703235020681), (u'NDVI', 15.214214631938633, -0.34964556047496637), (u'B6', 83.3055415045817, -0.48622666016349725), (u'B5', 42.37932419232148, 0.3589512700830869), (u'diff', 1463.1726907630523, -0.33190674445403395), (u'dartmouth', 0.6501106091055225, 0.2663771427981788), (u'B1', 13.950356873100874, -0.21287499601676665), (u'NDVI', 7.477843215269061, -0.1659665288248955), (u'diff', -177.06224899598394, -0.23543668173775398), (u'NDVI', 3.6096575069342753, -0.23525924970683706), (u'diff', -84.605421686747, -0.23398869224812702), (u'NDVI', 1.6755646527668824, -0.21432187901910843), (u'MNDWI', -0.6460009028106466, -0.21133622170592178), (u'NDVI', 2.642611079850579, -0.19832033019573156), (u'MNDWI', -0.8039064352235321, -0.21902250388685324), (u'NDVI', 2.159087866308731, -0.21759471721995757), (u'MNDWI', -0.882859201429975, -0.22462325352727264), (u'NDVI', 1.9173262595378067, -0.22133287794719197), (u'MNDWI', -0.9223355845331964, -0.21912707745520124), (u'NDVI', 1.7964454561523446, -0.212352900657123)]
# trained on unflooded_mississippi with landsat
modis_classifiers['mississippi_5'] = [(u'B5', 22.5, 1.424016860332339)]#, (u'NDWI', -0.3488199979104613, -1.1643319348488192)]#, (u'MNDWI', 0.2060761675061745, -0.8190562053615513), (u'NDWI', 0.12342893439063468, -0.5539167295936754), (u'B6', 128.5625, -0.676969969487169)]#, (u'NDWI', -0.050652615441503096, -0.6038609463852692), (u'MNDWI', 0.0688502702628284, -0.5667166676298596), (u'NDWI', 0.6956693010823654, -0.5326141290666078), (u'MNDWI', -0.29396969047077653, -0.4977145365280558), (u'NDWI', -0.137693390357572, -0.5296068483657974), (u'MNDWI', 0.00023732164115535664, -0.40996366647279703), (u'NDWI', 0.2975104842227725, -0.45039955994958353)]
modis_classifiers['mississippi'] = [(u'B5', 20.25, 1.4064982148857947), (u'NDWI', -0.3488199979104613, -1.1281588137098968), (u'MNDWI', 0.2060761675061745, -0.6204705541547991), (u'NDWI', 0.12342893439063468, -0.43739127359050894), (u'B6', 130.03125, -0.7385587172087229), (u'NDWI', -0.050652615441503096, -0.6351588979749766), (u'MNDWI', 0.0688502702628284, -0.7096006602751659), (u'NDWI', -0.137693390357572, -0.6767143211075154), (u'MNDWI', 0.00023732164115535664, -0.4784325526693348), (u'NDWI', 0.6956693010823654, -0.5175430073894397), (u'B6', 129.515625, -0.7658727652948186), (u'NDWI', 0.5836306675686378, -0.8230539867550758)]#, (u'MNDWI', -0.29396969047077653, -1.010378000263949), (u'NDWI', 0.2975104842227725, -1.3470307294716275), (u'MNDWI', -0.40676672221590593, -2.2975599250672945), (u'LSWIminusNDVI', 0.7774358230593219, -2.2975599250672945), (u'b1', 462.17105263157896, -2.2975599250672945), (u'ratio', 1.4121003963517729, -2.2975599250672945), (u'b2', 997.0490506329114, 1.708867948280161), (u'NDWI', -0.41086291422887156, -1.42020845722415), (u'b1', 519.8092105263158, 1.5190611577702313), (u'NDWI', -0.37984145606966646, 0.6952464401700104), (u'NDWI', 0.03638815947456579, -0.7169989507219887), (u'b2', 2354.099683544304, 0.3890029333764627), (u'MNDWI', 0.3433020647495206, -0.41277191754557085), (u'B5', 72.5, 0.3363970042121114), (u'NDWI', 0.38455125913884136, -0.3114385403162398), (u'B5', 15.125, -0.42367907943593436), (u'ratio', 1.7288336636264774, 0.29873586627097254), (u'b2', 827.2238924050632, -0.3807266400174877), (u'b1', 490.9901315789474, 0.35653058641342855), (u'ratio', 1.5704670299891252, 0.4029986460707291), (u'b2', 912.1364715189873, -0.2884661529282731), (u'NDWI', -0.395352185149269, 0.28270986674046317), (u'B1', 79.0625, -0.33478669976778425), (u'NDWI', 0.4280716465968758, -0.27808569593125426), (u'MNDWI', -0.1811726587256471, -0.4277643212788643), (u'NDWI', 0.21046970930670358, -0.47535345223600173), (u'MNDWI', -0.1247741428530824, -0.4532532405442839), (u'NDWI', 0.25399009676473805, -0.3579646150883709), (u'B6', 136.8125, 0.433260616467046), (u'b1', 476.5805921052632, 0.3387323994289085), (u'B3', 29.625, -0.2228446437747992), (u'b1', 469.37582236842104, 0.17408297061563255), (u'ratio', 1.491283713170449, 0.1900202691541482), (u'b2', 954.5927610759493, -0.28090682024123353), (u'ratio', 1.451692054761111, 0.2696401463438538), (u'NDVI', 0.4442480887479201, -0.26025283609038974), (u'LSWIminusEVI', -1.269889491012954, -0.2179140715466851), (u'b1', 465.7734375, 0.2120846094538366)]
# trained on unflooded_new_orleans with landsat
modis_classifiers['new_orleans'] = [(u'B4', 13.375, 1.4669571862477135), (u'b2', 1768.9536616979908, 0.7191964118271637), (u'B3', 18.3125, -0.4070155359645522), (u'LSWIminusEVI', -0.08557300521224676, -0.5810809746072104), (u'B4', 10.6875, -0.5291029708890636), (u'NDWI', 0.6135381706131, -0.42333042815387417), (u'MNDWI', -0.6315152257273133, -0.4508129543642559), (u'NDWI', 0.40244384299830177, -0.4529011567813934), (u'MNDWI', -0.7966635966818656, -0.4229803773880765), (u'NDWI', 0.8246324982278983, -0.4069177636794863), (u'MNDWI', -0.8792377821591417, -0.4443473879013045), (u'NDWI', 0.7190853344204992, -0.4883209250265058), (u'MNDWI', -0.9205248748977797, -0.49636567364951045), (u'NDWI', 0.7718589163241987, -0.47532398301078105), (u'MNDWI', -0.9411684212670988, -0.46105794712582865), (u'NDWI', 0.9301796620352974, -0.44708336474163696), (u'MNDWI', -0.9514901944517582, -0.4449868419505934), (u'NDWI', 0.8774060801315979, -0.4471999560229246), (u'MNDWI', -0.956651081044088, -0.44724569495404887), (u'NDWI', 0.8510192891797481, -0.4452132576283198), (u'MNDWI', -0.9592315243402529, -0.4429423461902555), (u'NDWI', 0.8378258937038232, -0.4412914152487152), (u'MNDWI', -0.46636685477276113, -0.44065814160370703), (u'NDWI', 0.7454721253723489, -0.42970202497381904), (u'MNDWI', -0.9605217459883353, -0.48957048644758405), (u'NDWI', 0.8312291959658608, -0.5099369404270232), (u'MNDWI', -0.9611668568123766, -0.5177206937846746), (u'NDWI', 0.8279308470968796, -0.5208055090499037), (u'MNDWI', -0.9614894122243971, -0.5218294172269368), (u'NDWI', 0.8262816726623889, -0.5221839375535151), (u'MNDWI', -0.9616506899304074, -0.5222930845903063), (u'NDWI', 0.8254570854451436, -0.5222798634644608), (u'MNDWI', -0.9617313287834126, -0.5221948879561688), (u'NDWI', 0.8250447918365209, -0.5221108271103068), (u'MNDWI', -0.9617716482099152, -0.5220471206666469), (u'NDWI', 0.8248386450322096, -0.5220049728945718), (u'MNDWI', -0.9617918079231664, -0.5219766049261293), (u'NDWI', 0.824735571630054, -0.5219580845269158), (u'MNDWI', -0.961801887779792, -0.5219465310519422), (u'NDWI', 0.8246840349289761, -0.5219393305356076), (u'MNDWI', -0.9618069277081049, -0.5219349735701074), (u'NDWI', 0.8246582665784372, -0.521932312793635), (u'MNDWI', -0.9618094476722614, -0.5219307253356017)]
# radar classifiers
# Rome TODO
radar_classifiers['rome'] = [(u'diff', 178.90461847389557, 2.46177797269142), (u'dartmouth', 0.695180948525906, 0.5636808582048225), (u'b2', 3259.75, 0.40623813335255893), (u'vh', 60.0, 0.512954469752306), (u'b1', 600.7550251256282, 0.2801037593761655), (u'diff', 2154.25, 0.22719741605005747), (u'vh', 48.375, 0.1929392221948245), (u'EVI', -0.39797892895956055, -0.26067596700783746), (u'vh', 42.5625, 0.20882052714352622), (u'diff', 263.7538487282463, -0.211052953848031), (u'LSWI', 0.5436867478118161, -0.16553174402115256), (u'diff', 221.32923360107094, -0.15858370383683376), (u'LSWI', 0.45046812317651347, -0.19487772605927273), (u'EVI', -0.40180875045282066, -0.18574586377612953), (u'LSWI', 0.4038588108588621, -0.1607083937449329), (u'dartmouth', 1.0862723406778199, 0.14520750017543604), (u'b1', 365.38253768844226, 0.13710337373549727), (u'diff', 200.11692603748327, -0.12794110582183135), (u'LSWI', 0.38055415470003645, -0.14473310752902216), (u'b1', 1459.25, 0.13486298225301327), (u'MNDWI', 0.45613992940110276, 0.13252409515935595), (u'b1', 483.0687814070352, 0.1234375368417903), (u'vh', 39.65625, 0.10828147089675809), (u'b1', 1653.125, 0.14309662904293483), (u'vh', 30.875, 0.12050226416705825), (u'diff', 189.5107722556894, -0.13029115438110866), (u'dartmouth', 0.567399392562919, 0.12046203774769106), (u'diff', 184.20769536479247, -0.11034439591730216), (u'vh', 33.8125, 0.12078156192671918), (u'EVI', -0.4037236611994507, -0.11025517176478977), (u'LSWIminusEVI', -1.0112946701259427, -0.11523798706849528), (u'diff', 1909.875, -0.10464945907884636), (u'diff', 2032.0625, 0.07976450393456289), (u'dartmouth', 1.15403648079079, -0.1117066685929633), (u'diff', 2093.15625, 0.0968477259918149), (u'b1', 541.9119032663317, 0.07969028249670798), (u'b1', 836.1275125628141, -0.08405908949318663), (u'diff', 181.556156919344, -0.09346085859259494), (u'LSWI', 0.49707743549416483, -0.1085325347020279), (u'EVI', -0.40468111657276573, -0.09747783097236294), (u'vh', 32.34375, 0.09782288286234157), (u'b1', 1750.0625, 0.10205751464991006), (u'b1', 718.4412688442212, -0.09593339090882935), (u'b1', 424.2256595477387, 0.10473543924639585), (u'MNDWI', 0.5560647563672181, 0.06538569127220625), (u'MNDWI', 0.5061023428841604, 0.12118441764008514), (u'vh', 31.609375, 0.1342091965527664), (u'diff', 1787.6875, -0.10241482447678286), (u'MNDWI', 0.5310835496256893, 0.09017490496680071), (u'dartmouth', 1.187918550847275, -0.07281106494462425)]
# Malawi
radar_classifiers['malawi'] = [(u'b1', 1206.75, -1.4978661367770034), (u'vv', 92.25, 1.7076910083270624), (u'vv', 155.625, 0.7927423357058031), (u'LSWI', 0.17814903701073945, -0.5656867478534681), (u'b2', 2386.5, 0.39133434117158), (u'vv', 101.625, 0.494237798312077), (u'EVI', 0.29952058003806714, 0.4815500071179563), (u'vv', 106.3125, 0.3791369535317837), (u'LSWIminusNDVI', -0.16354986340261995, -0.3392309042314572), (u'vv', 108.65625, 0.2514716832021546), (u'b2', 2386.75, 0.3450772215737547), (u'vv', 107.484375, 0.2546137126854733), (u'LSWIminusNDVI', -0.16492926771972327, -0.2120703141095119), (u'vv', 106.8984375, 0.1745865336139307), (u'b2', 2386.875, 0.20753425729944486), (u'vv', 106.60546875, 0.17151475757505275), (u'LSWIminusNDVI', -0.16561896987827493, -0.15231935160185775), (u'vv', 106.458984375, 0.13206764439243204), (u'b2', 2386.9375, 0.14843573703920598), (u'vv', 106.3857421875, 0.1291434356120595), (u'LSWIminusNDVI', -0.16596382095755075, -0.11830301992251846), (u'b2', 2242.25, -0.11673694258002199), (u'vv', 154.4375, 0.14908876959293232), (u'LSWI', 0.1611832167953936, -0.13132406390088658), (u'vv', 153.84375, 0.11576377977859459), (u'vv', 106.34912109375, 0.10789584424489668), (u'b2', 2386.96875, 0.09128013378839395), (u'LSWI', 0.1527003066877207, -0.10621539361861156), (u'vv', 153.546875, 0.09035974506503541), (u'LSWI', 0.14845885163388423, -0.08265186904318825), (u'vv', 153.3984375, 0.07612663467721505), (u'vv', 106.330810546875, 0.08087104691133243), (u'EVI', 0.29940517086505597, 0.08383365337627942), (u'vv', 106.3216552734375, 0.0773362495526882), (u'LSWIminusNDVI', -0.16613624649718867, -0.07278061333579333), (u'vv', 106.31707763671875, 0.06783538228239976), (u'b2', 2386.984375, 0.07162768046483561), (u'LSWI', 0.146338124106966, -0.06916246665080311), (u'vv', 153.32421875, 0.06162461812861291), (u'vv', 106.31478881835938, 0.06613725906318095), (u'EVI', 0.29934746627855036, 0.06260671123906972), (u'vv', 106.31364440917969, 0.05891377646208847), (u'b2', 2386.9921875, 0.06026476394466554), (u'LSWI', 0.1452777603435069, -0.05929864988094706), (u'vv', 153.287109375, 0.053562732376205416), (u'vv', 106.31307220458984, 0.05635435997933675), (u'LSWIminusNDVI', -0.16622245926700763, -0.05460616467334437), (u'vv', 106.31278610229492, 0.051776199455337915), (u'b2', 2386.99609375, 0.053322901499510564), (u'LSWI', 0.14580794222523646, -0.05070452620576959)]
# Mississippi
radar_classifiers['mississippi'] = [(u'NDWI', -0.11622393735660222, -0.8115012757343506), (u'b2', 2985.5263157894738, 0.702679351118156), (u'vv', 5217.619047619048, 0.32062701131953586), (u'MNDWI', 0.26416074525030153, 0.3471969659874681), (u'b1', 1168.775, 0.23958804098018174), (u'b2', 3260.7631578947367, 0.1757460665061179), (u'MNDWI', 0.23640999604191795, 0.16849237965344419), (u'MNDWI', -0.051449424342105275, 0.21073597217765677), (u'LSWIminusNDVI', -0.15381863239050603, 0.261929215268214), (u'MNDWI', 0.10345585696939877, 0.17522339053409086), (u'NDVI', 0.37550520655709846, -0.11678248102474162), (u'ratio', 1.5808138542284427, 0.1307997498783867), (u'MNDWI', 0.22253462143772618, 0.15496439880003274), (u'vv', 23686.289682539682, 0.12065151422211098), (u'LSWIminusNDVI', -0.16578319612225706, 0.10079262433049868), (u'NDWI', 0.01798571473181413, -0.11427381786395764), (u'MNDWI', 0.15605755190146658, 0.12846750517442398), (u'LSWIminusNDVI', -0.15980091425638154, 0.12183307890098613), (u'b2', 3398.3815789473683, 0.0966718411565018), (u'NDWI', -0.035607830086293674, -0.1132584559163686), (u'hv', 4575.416666666667, -0.10741868882123311), (u'NDWI', 0.07157925954992193, -0.10737359754159287), (u'b2', 3467.190789473684, 0.13415083578467207), (u'b1', 1191.3125, -0.11146696782543182), (u'LSWIminusEVI', -2.5247238686545077, 0.11340603990862676), (u'vv', 31272.89484126984, 0.08425074607028928), (u'NDWI', 0.044782487140868035, -0.08653314042576717), (u'b2', 3792.0, 0.1044832325795063), (u'NDVI', 0.43088596754931874, -0.08847969070316128), (u'MNDWI', 0.18235839936750048, 0.07058671161786771), (u'NDWI', 0.058180873345394984, -0.08947323800356782), (u'b2', 3664.0, 0.08796628891143386), (u'NDWI', 0.06488006644765845, -0.07018091636763152), (u'b1', 1180.04375, -0.08727299235554262), (u'LSWIminusNDVI', -0.15680977332344379, 0.08425838412482411), (u'MNDWI', 0.19550882310051743, 0.0619919718523082), (u'NDWI', 0.09837603195897585, -0.08165793068280822), (u'b2', 3600.0, 0.08026689946353305), (u'NDWI', -0.008811057677239772, -0.059679375901025386), (u'hv', 5903.513888888889, -0.06982902975780846), (u'vv', 27479.592261904763, 0.06622628594867959), (u'hv', 51808.0, -0.06271609598725954), (u'vv', 16099.684523809523, -0.06691035524355445), (u'vv', 29376.2435515873, 0.06455229511493261), (u'vv', 19892.9871031746, -0.05233305018274409), (u'b2', 2710.289473684211, 0.05121585389944283), (u'b2', 2847.9078947368425, -0.06272919860762075), (u'b2', 2572.671052631579, 0.083277023990062), (u'b2', 2916.7171052631584, -0.11017977593192452), (u'b2', 2503.8618421052633, 0.08271694814319466)]
| 522.55
| 5,397
| 0.751196
| 4,851
| 41,804
| 6.467945
| 0.372294
| 0.021226
| 0.024764
| 0.002295
| 0.106706
| 0.077766
| 0.077766
| 0.077766
| 0.077766
| 0.077766
| 0
| 0.656449
| 0.062721
| 41,804
| 79
| 5,398
| 529.164557
| 0.144326
| 0.502847
| 0
| 0
| 0
| 0
| 0.089339
| 0
| 0
| 0
| 0
| 0.012658
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9186f08335fe523c2fbce97cd7a632f8843e4064
| 42
|
py
|
Python
|
dev_main.py
|
RyouMon/FavoritesCrawler
|
c11750ea4094cd7e4d91a0dd79c9ee21a066c0ee
|
[
"MIT"
] | 2
|
2022-02-05T04:24:55.000Z
|
2022-02-22T23:50:23.000Z
|
dev_main.py
|
RyouMon/FavoritesCrawler
|
c11750ea4094cd7e4d91a0dd79c9ee21a066c0ee
|
[
"MIT"
] | 3
|
2022-02-22T13:35:29.000Z
|
2022-02-28T13:29:56.000Z
|
dev_main.py
|
RyouMon/FavoritesCrawler
|
c11750ea4094cd7e4d91a0dd79c9ee21a066c0ee
|
[
"MIT"
] | null | null | null |
from favorites_crawler import main
main()
| 14
| 34
| 0.833333
| 6
| 42
| 5.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 42
| 2
| 35
| 21
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
91b768d7822eaf3bdf4f0faded8b296d259a5551
| 120
|
py
|
Python
|
mezzanine/utils/__init__.py
|
arundalal/mezzanine-blog
|
116f3c2595098a83757f1c6b00ceb7f65ef30d51
|
[
"BSD-2-Clause"
] | 4
|
2015-02-05T03:57:02.000Z
|
2021-11-08T12:24:58.000Z
|
mezzanine/utils/__init__.py
|
arundalal/mezzanine-blog
|
116f3c2595098a83757f1c6b00ceb7f65ef30d51
|
[
"BSD-2-Clause"
] | 9
|
2020-03-24T16:20:31.000Z
|
2022-03-11T23:32:38.000Z
|
mezzanine/utils/__init__.py
|
arundalal/mezzanine-blog
|
116f3c2595098a83757f1c6b00ceb7f65ef30d51
|
[
"BSD-2-Clause"
] | 19
|
2017-01-12T09:20:03.000Z
|
2019-06-18T14:53:32.000Z
|
"""
Various utility functions used throughout the different Mezzanine apps.
"""
from __future__ import unicode_literals
| 24
| 71
| 0.816667
| 14
| 120
| 6.642857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 120
| 4
| 72
| 30
| 0.885714
| 0.591667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
91bb74d4c90fa2a76eb4095cef2de9c6d17415f0
| 46
|
py
|
Python
|
tests/__init__.py
|
mberz/frontend_control
|
ae69e75570db59aa045e6fd061027d1982f8a75a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
mberz/frontend_control
|
ae69e75570db59aa045e6fd061027d1982f8a75a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
mberz/frontend_control
|
ae69e75570db59aa045e6fd061027d1982f8a75a
|
[
"MIT"
] | 1
|
2021-10-07T09:03:47.000Z
|
2021-10-07T09:03:47.000Z
|
"""Unit test package for frontend_control."""
| 23
| 45
| 0.73913
| 6
| 46
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 1
| 46
| 46
| 0.804878
| 0.847826
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
37da10de4683afa3615da1c18dc786f3f2a358df
| 39,180
|
py
|
Python
|
tests/test.py
|
e2jk/actioncam-upload
|
9db140cdd0d78ec4e50179a6b4f1db89df0b0256
|
[
"MIT"
] | null | null | null |
tests/test.py
|
e2jk/actioncam-upload
|
9db140cdd0d78ec4e50179a6b4f1db89df0b0256
|
[
"MIT"
] | 8
|
2019-02-02T19:11:29.000Z
|
2019-07-07T08:55:00.000Z
|
tests/test.py
|
e2jk/actioncam-upload
|
9db140cdd0d78ec4e50179a6b4f1db89df0b0256
|
[
"MIT"
] | 1
|
2020-03-28T03:05:45.000Z
|
2020-03-28T03:05:45.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# https://realpython.com/python-testing/
# Running the tests:
# $ python -m unittest -v test
# Checking the coverage of the tests:
# $ coverage run --include=actioncam-upload.py test.py && coverage html
import unittest
import sys
import logging
import datetime
import tempfile
import shutil
import os
import copy
import socket
sys.path.append('.')
target = __import__("actioncam-upload")
# Check if we're connected to the Internet
def is_connected():
try:
# see if we can resolve the host name -- tells us if there is
# a DNS listening
host = socket.gethostbyname("duckduckgo.com")
# connect to the host -- tells us if the host is actually
# reachable
s = socket.create_connection((host, 80), 2)
return True
except:
pass
return False
# Used to test manual entry when using the --interactive flag
mock_raw_input_counter = 0
mock_raw_input_values = []
def mock_raw_input(s):
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter += 1
return mock_raw_input_values[mock_raw_input_counter - 1]
target.input = mock_raw_input
sample_sequences = [
[
{'duration': 300.0, 'file_path': '/tmp/vids/20190121_085007.MOV', 'creation_time': datetime.datetime(2019, 1, 21, 8, 50, 7)},
{'duration': 300.0, 'file_path': '/tmp/vids/20190121_085508.MOV', 'creation_time': datetime.datetime(2019, 1, 21, 8, 55, 8)},
{'duration': 300.0, 'file_path': '/tmp/vids/20190121_090008.MOV', 'creation_time': datetime.datetime(2019, 1, 21, 9, 0, 8)},
{'duration': 216.75, 'file_path': '/tmp/vids/20190121_090508.MOV', 'creation_time': datetime.datetime(2019, 1, 21, 9, 5, 8)}
],
[
{'duration': 300.0, 'file_path': '/tmp/vids/20190125_162220.MOV', 'creation_time': datetime.datetime(2019, 1, 25, 16, 22, 20)},
{'duration': 300.0, 'file_path': '/tmp/vids/20190125_162721.MOV', 'creation_time': datetime.datetime(2019, 1, 25, 16, 27, 21)},
{'duration': 300.0, 'file_path': '/tmp/vids/20190125_163221.MOV', 'creation_time': datetime.datetime(2019, 1, 25, 16, 32, 21)},
{'duration': 300.0, 'file_path': '/tmp/vids/20190125_163721.MOV', 'creation_time': datetime.datetime(2019, 1, 25, 16, 37, 21)}
],
[
{'duration': 300.0, 'file_path': '/tmp/vids/20190129_082825.MOV', 'creation_time': datetime.datetime(2019, 1, 29, 8, 28, 26)},
{'duration': 300.0, 'file_path': '/tmp/vids/20190129_083327.MOV', 'creation_time': datetime.datetime(2019, 1, 29, 8, 33, 27)},
{'duration': 286.0, 'file_path': '/tmp/vids/20190129_083826.MOV', 'creation_time': datetime.datetime(2019, 1, 29, 8, 38, 27)}
]
]
def createTempFolderWithDummyMOVFiles():
"""
Create a temporary folder with 5 dummy files, 3 of which with .MOV extension
"""
tempdir = tempfile.mkdtemp()
(ignore, mov_file_1) = tempfile.mkstemp(suffix=".MOV", dir=tempdir)
(ignore, mov_file_2) = tempfile.mkstemp(suffix=".MOV", dir=tempdir)
(ignore, mov_file_3) = tempfile.mkstemp(suffix=".MOV", dir=tempdir)
tempfile.mkstemp(dir=tempdir)
tempfile.mkstemp(dir=tempdir)
return (tempdir, mov_file_1, mov_file_2, mov_file_3)
# class TestCompressMergeAndUploadSequences(unittest.TestCase):
# def test_compress_merge_and_upload_sequences_no_net(self):
# """
# Test the compress_merge_and_upload_sequences() function with --no-net
# """
# args = target.parse_args(['--no-net', '--verbose'])
# youtube = None
# # Using a deep copy of the sequence, otherwise running compress_sequence()
# # without --dry-run modifies the elements, and the sample_sequences array
# # gets modified which messes up other tests later on.
# target.compress_merge_and_upload_sequences(copy.deepcopy(sample_sequences), [], youtube, args)
# # Nothing to assert (the individual functions are tested separately for
# # their returns), just confirming no Exception is thrown.
#
# def test_compress_merge_and_upload_sequences_dry_run(self):
# """
# Test the compress_merge_and_upload_sequences() function with --dry-run
# """
# args = target.parse_args(['--dry-run', '--verbose'])
# youtube = None
# # Using a deep copy of the sequence, otherwise running compress_sequence()
# # without --dry-run modifies the elements, and the sample_sequences array
# # gets modified which messes up other tests later on.
# target.compress_merge_and_upload_sequences(copy.deepcopy(sample_sequences), [], youtube, args)
# # Nothing to assert (the individual functions are tested separately for
# # their returns), just confirming no Exception is thrown.
#
# def test_compress_merge_and_upload_sequences_no_net_no_compression(self):
# """
# Test the compress_merge_and_upload_sequences() function
# """
# args = target.parse_args(['--no-net', '--verbose', '--no-compression'])
# youtube = None
# target.compress_merge_and_upload_sequences(sample_sequences, [], youtube, args)
# # Nothing to assert (the individual functions are tested separately for
# # their returns), just confirming no Exception is thrown.
# def test_compress_merge_and_upload_sequences_no_arguments(self):
# """
# Test the compress_merge_and_upload_sequences() function with our sample video, without arguments
# """
# args = target.parse_args(['--verbose'])
# youtube = None
# # Using a deep copy of the sequence, otherwise running compress_sequence()
# # without --dry-run modifies the elements, and the sample_sequences array
# # gets modified which messes up other tests later on.
# # Since we're not passing a real "youtube" argument, this call will raise an Exception
# with self.assertRaises(AttributeError) as cm:
# target.compress_merge_and_upload_sequences(copy.deepcopy(sample_sequences), [], youtube, args)
# self.assertEqual(str(cm.exception), "'NoneType' object has no attribute 'videos'")
class TestMergeSequence(unittest.TestCase):
def test_merge_sequence_dry_run(self):
"""
Test the merge_sequence() function with --dry-run (doesn't run the ffmpeg command)
"""
args = target.parse_args(['--dry-run', '--verbose'])
file_to_upload = target.merge_sequence(sample_sequences[0], args.dry_run, args.logging_level)
self.assertEqual(file_to_upload, "/tmp/%s" % os.path.split(sample_sequences[0][0]["file_path"])[1])
# def test_merge_sequence_ffmpeg_verbose(self):
# """
# Test the merge_sequence() function, running the FFmpeg merge command with --verbose
# """
# args = target.parse_args(['--verbose'])
# file_to_upload = target.merge_sequence(sample_sequences[0], args.dry_run, args.logging_level)
# self.assertEqual(file_to_upload, "/tmp/%s" % os.path.split(sample_sequences[0][0]["file_path"])[1])
# def test_merge_sequence_ffmpeg_debug(self):
# """
# Test the merge_sequence() function, running the FFmpeg merge command with --debug
# This will cause the output of ffmpeg (including the following error
# message) to be displayed in the output of the test suite, this is NOT a problem:
# Impossible to open '/tmp/vids/20190121_085007.MOV'
# /tmp/actioncam-upload-files.txt: No such file or directory
# """
# args = target.parse_args(['--debug'])
# file_to_upload = target.merge_sequence(sample_sequences[0], args.dry_run, args.logging_level)
# self.assertEqual(file_to_upload, "/tmp/%s" % os.path.split(sample_sequences[0][0]["file_path"])[1])
class TestCompressSequence(unittest.TestCase):
def test_compress_sequence_invalid_file(self):
"""
Test the compress_sequence() function with --dry-run
Nothing should change to the sequence
"""
args = target.parse_args(['--dry-run', '--verbose'])
tempdir = tempfile.mkdtemp()
with self.assertRaises(SystemExit) as cm:
# Call the function with the first sequence from sample_sequences
# Since it's a non-existing file, process will close with code 15
seq = target.compress_sequence(sample_sequences[0], tempdir, args.dry_run, args.logging_level, 1, len(sample_sequences))
the_exception = cm.exception
self.assertEqual(the_exception.code, 15)
# Delete the temporary folder
shutil.rmtree(tempdir)
# def test_compress_sequence_dry_run(self):
# """
# Test the compress_sequence() function with --dry-run
# Nothing should change to the sequence
# """
# args = target.parse_args(['--dry-run', '--verbose'])
# tempdir = tempfile.mkdtemp()
# # Call the function with the first sequence from sample_sequences
# seq = target.compress_sequence(sample_sequences[0], tempdir, args.dry_run, args.logging_level, 1, len(sample_sequences))
# # The returned sequence should be the same as the first sample_sequences (due to --dry-run)
# for idx, files in enumerate(seq):
# for data in ["creation_time", "duration", "file_path"]:
# self.assertEqual(files[data], sample_sequences[0][idx][data])
# # Delete the temporary folder
# shutil.rmtree(tempdir)
#
# def test_compress_sequence_ffmpeg_verbose(self):
# """
# Test the compress_sequence() function, running the FFmpeg merge command with --verbose
# The path to the files will be different (compressed to a temporary file)
# """
# args = target.parse_args(['--verbose'])
# tempdir = tempfile.mkdtemp()
# # Call the function with the first sequence from sample_sequences
# # Using a deep copy of the sequence, otherwise running compress_sequence()
# # without --dry-run modifies the elements, and the sample_sequences array
# # gets modified which messes up other tests later on.
# seq = target.compress_sequence(copy.deepcopy(sample_sequences[0]), tempdir, args.dry_run, args.logging_level, 1, len(sample_sequences))
# # The returned sequence should be the same as the first sample_sequences (due to --dry-run)
# for idx, files in enumerate(seq):
# for data in ["creation_time", "duration"]:
# self.assertEqual(files[data], sample_sequences[0][idx][data])
# # The file path is different, now a new temporary folder (because the file has been compressed)
# # Should start with the path to the temporary folder and end with the sequence's first file name.
# self.assertTrue(files["file_path"].startswith(tempfile.gettempdir()))
# self.assertTrue(files["file_path"].endswith(os.path.split(sample_sequences[0][idx]["file_path"])[1]))
# # Delete the temporary folder
# shutil.rmtree(tempdir)
#
# def test_compress_sequence_ffmpeg_debug(self):
# """
# Test the compress_sequence() function, running the FFmpeg merge command with --debug
# The path to the files will be different (compressed to a temporary file)
# This will cause the output of ffmpeg (including the following error
# message) to be displayed in the output of the test suite, this is NOT a problem:
# /tmp/vids/20190121_085007.MOV: No such file or directory
# """
# args = target.parse_args(['--debug'])
# tempdir = tempfile.mkdtemp()
# # Call the function with the first sequence from sample_sequences
# # Using a deep copy of the sequence, otherwise running compress_sequence()
# # without --dry-run modifies the elements, and the sample_sequences array
# # gets modified which messes up other tests later on.
# seq = target.compress_sequence(copy.deepcopy(sample_sequences[0]), tempdir, args.dry_run, args.logging_level, 1, len(sample_sequences))
# # The returned sequence should be the same as the first sample_sequences (due to --dry-run)
# for idx, files in enumerate(seq):
# for data in ["creation_time", "duration"]:
# self.assertEqual(files[data], sample_sequences[0][idx][data])
# # The file path is different, now a new temporary folder (because the file has been compressed)
# # Should start with the path to the temporary folder and end with the sequence's first file name.
# self.assertTrue(files["file_path"].startswith(tempfile.gettempdir()))
# self.assertTrue(files["file_path"].endswith(os.path.split(sample_sequences[0][idx]["file_path"])[1]))
# # Delete the temporary folder
# shutil.rmtree(tempdir)
class TestPreCopy(unittest.TestCase):
def test_pre_copy(self):
"""
Test the pre_copy() function
"""
# Simulate files on the actioncam
temp_actioncam_dir = tempfile.mkdtemp()
new_sequences = copy.deepcopy(sample_sequences)
# Create temporary files and use these in the sample_sequences
mov_files = {}
for idx, seq in enumerate(new_sequences):
mov_files[idx] = {}
for idx2, files in enumerate(seq):
(ignore, mov_files[idx][idx2]) = tempfile.mkstemp(suffix=".MOV", dir=temp_actioncam_dir)
files["file_path"] = mov_files[idx][idx2]
# Confirm that there are 11 dummy files in the temporary actioncam folder
self.assertEqual(len([name for name in os.listdir(temp_actioncam_dir) if os.path.isfile(os.path.join(temp_actioncam_dir, name))]), 11)
# Copy the files from the "actioncam" folder to new temporary folders
(new_sequences, pre_copy_folders) = target.pre_copy(new_sequences)
for idx, seq in enumerate(new_sequences):
# Confirm the number of files in that sequence's temporary folder is correct
self.assertEqual(len([name for name in os.listdir(pre_copy_folders[idx]) if os.path.isfile(os.path.join(pre_copy_folders[idx], name))]), len(seq))
for idx2, files in enumerate(seq):
# concatenate that sequence's temp folder with that file's filename
fname = os.path.join(pre_copy_folders[idx], os.path.split(mov_files[idx][idx2])[1])
self.assertEqual(files["file_path"], fname)
# Delete the new temporary folders (and files)
shutil.rmtree(pre_copy_folders[idx])
# Confirm the original files are still left in the temporary actioncam folder (it's a copy, not a move)
self.assertEqual(len([name for name in os.listdir(temp_actioncam_dir) if os.path.isfile(os.path.join(temp_actioncam_dir, name))]), 11)
# Delete the temporary actioncam folder
shutil.rmtree(temp_actioncam_dir)
class TestAnalyzeSequences(unittest.TestCase):
def test_analyze_sequences_no_net(self):
"""
Test the analyze_sequences() function, passing a valid sequences array and only --no-net
This means all the sequences should be identified as new
"""
args = target.parse_args(['--no-net'])
youtube = None
new_sequences = target.analyze_sequences(sample_sequences, youtube, args)
# Confirm 3 sequences were identified as new
self.assertEqual(len(new_sequences), 3)
# Check the content of each sequence
for idx, seq in enumerate(new_sequences):
self.assertEqual(len(seq), len(sample_sequences[idx]))
for idx2, files in enumerate(seq):
for data in ["creation_time", "duration", "file_path"]:
self.assertEqual(files[data], sample_sequences[idx][idx2][data])
def test_analyze_sequences_empty_sequence(self):
"""
Test the analyze_sequences() function, passing an invalid sequences array
"""
args = target.parse_args(['--no-net'])
youtube = None
with self.assertRaises(Exception) as cm:
new_sequences = target.analyze_sequences([[]], youtube, args)
self.assertEqual(str(cm.exception), "No files in sequence (should never happen, something has gone wrong...)")
def test_analyze_sequences_interactive_no_net(self):
"""
Test the analyze_sequences() function, passing a valid sequences array, --interactive (just Enter) and --no-net
This means all the sequences should be identified as new
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = [""]
args = target.parse_args(['--interactive', '--no-net'])
youtube = None
new_sequences = target.analyze_sequences(sample_sequences, youtube, args)
# Confirm 3 sequences were identified as new
self.assertEqual(len(new_sequences), 3)
# Check the content of each sequence
for idx, seq in enumerate(new_sequences):
self.assertEqual(len(seq), len(sample_sequences[idx]))
for idx2, files in enumerate(seq):
for data in ["creation_time", "duration", "file_path"]:
self.assertEqual(files[data], sample_sequences[idx][idx2][data])
def test_analyze_sequences_length_restriction(self):
"""
Test the analyze_sequences() function, passing a valid sequences array and both --min-length and --max-length
Only one sequence should be identified as new
"""
args = target.parse_args(['--no-net', '--min-length', '15', '--max-length', '19'])
youtube = None
new_sequences = target.analyze_sequences(sample_sequences, youtube, args)
# Confirm only one sequence were identified as new, the first of the sample sequences
self.assertEqual(len(new_sequences), 1)
# Check the content of each sequence
for idx, seq in enumerate(new_sequences):
self.assertEqual(len(seq), len(sample_sequences[0]))
for idx2, files in enumerate(seq):
for data in ["creation_time", "duration", "file_path"]:
self.assertEqual(files[data], sample_sequences[0][idx2][data])
def test_analyze_sequences_interactive_length_restriction(self):
"""
Test the analyze_sequences() function, passing a valid sequences array, --interactive (just Enter) and both --min-length and --max-length
Only one sequence should be identified as new
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = [""]
args = target.parse_args(['--interactive', '--no-net', '--min-length', '15', '--max-length', '19'])
youtube = None
new_sequences = target.analyze_sequences(sample_sequences, youtube, args)
# Confirm only one sequence were identified as new, the first of the sample sequences
self.assertEqual(len(new_sequences), 1)
# Check the content of each sequence
for idx, seq in enumerate(new_sequences):
self.assertEqual(len(seq), len(sample_sequences[0]))
for idx2, files in enumerate(seq):
for data in ["creation_time", "duration", "file_path"]:
self.assertEqual(files[data], sample_sequences[0][idx2][data])
class TestIdentifySequences(unittest.TestCase):
def test_identify_sequences_valid(self):
"""
Test the identify_sequences() function, passing a valid array of files
"""
videos_by_creation_time = {
datetime.datetime(2019, 1, 21, 8, 50, 7): {'duration': 300.0, 'file_path': '/tmp/vids/20190121_085007.MOV'},
datetime.datetime(2019, 1, 25, 16, 22, 20): {'duration': 300.0, 'file_path': '/tmp/vids/20190125_162220.MOV'},
datetime.datetime(2019, 1, 21, 9, 5, 8): {'duration': 216.75, 'file_path': '/tmp/vids/20190121_090508.MOV'},
datetime.datetime(2019, 1, 29, 8, 28, 26): {'duration': 300.0, 'file_path': '/tmp/vids/20190129_082825.MOV'},
datetime.datetime(2019, 1, 29, 8, 38, 27): {'duration': 286.0, 'file_path': '/tmp/vids/20190129_083826.MOV'},
datetime.datetime(2019, 1, 29, 8, 33, 27): {'duration': 300.0, 'file_path': '/tmp/vids/20190129_083327.MOV'},
datetime.datetime(2019, 1, 25, 16, 37, 21): {'duration': 300.0, 'file_path': '/tmp/vids/20190125_163721.MOV'},
datetime.datetime(2019, 1, 25, 16, 27, 21): {'duration': 300.0, 'file_path': '/tmp/vids/20190125_162721.MOV'},
datetime.datetime(2019, 1, 21, 8, 55, 8): {'duration': 300.0, 'file_path': '/tmp/vids/20190121_085508.MOV'},
datetime.datetime(2019, 1, 21, 9, 0, 8): {'duration': 300.0, 'file_path': '/tmp/vids/20190121_090008.MOV'},
datetime.datetime(2019, 1, 25, 16, 32, 21): {'duration': 300.0, 'file_path': '/tmp/vids/20190125_163221.MOV'}
}
creation_times = [
datetime.datetime(2019, 1, 25, 16, 37, 21),
datetime.datetime(2019, 1, 25, 16, 27, 21),
datetime.datetime(2019, 1, 25, 16, 32, 21),
datetime.datetime(2019, 1, 21, 8, 55, 8),
datetime.datetime(2019, 1, 25, 16, 22, 20),
datetime.datetime(2019, 1, 29, 8, 33, 27),
datetime.datetime(2019, 1, 21, 9, 5, 8),
datetime.datetime(2019, 1, 29, 8, 28, 26),
datetime.datetime(2019, 1, 21, 8, 50, 7),
datetime.datetime(2019, 1, 21, 9, 0, 8),
datetime.datetime(2019, 1, 29, 8, 38, 27)
]
sequences = target.identify_sequences(videos_by_creation_time, creation_times)
# Confirm 3 sequences were identified
self.assertEqual(len(sequences), 3)
# Check the content of each sequence
for idx, seq in enumerate(sequences):
self.assertEqual(len(seq), len(sample_sequences[idx]))
for idx2, files in enumerate(seq):
for data in ["creation_time", "duration", "file_path"]:
self.assertEqual(files[data], sample_sequences[idx][idx2][data])
class TestInteractiveSequenceSelection(unittest.TestCase):
def test_interactive_sequence_selection_empty_sequences(self):
"""
Test the interactive_sequence_selection() function, passing an empty list of sequences
(This scenario should not ever happen)
"""
with self.assertRaises(Exception) as cm:
new_sequences = target.interactive_sequence_selection([], [])
self.assertEqual(str(cm.exception), "No sequences were passed (should never happen, something has gone wrong...)")
def test_interactive_sequence_selection_quit(self):
"""
Test the interactive_sequence_selection() function, mock quitting (enter "q")
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["q"]
with self.assertRaises(SystemExit) as cm:
new_sequences = target.interactive_sequence_selection([None, None], [None])
the_exception = cm.exception
self.assertEqual(the_exception.code, 18)
def test_interactive_sequence_selection_quit_no_new_sequences(self):
"""
Same as previous test, but passing no suggested new_sequences
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["q"]
with self.assertRaises(SystemExit) as cm:
new_sequences = target.interactive_sequence_selection([None, None], [])
the_exception = cm.exception
self.assertEqual(the_exception.code, 18)
def test_interactive_sequence_selection_dummy_enter(self):
"""
Test the interactive_sequence_selection() function, using dummy sequences and just pressing "Enter" (validating the automatic new_sequences)
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = [""]
new_sequences = target.interactive_sequence_selection(["A", "B", "C"], ["C", "A"])
self.assertEqual(new_sequences, ["C", "A"])
def test_interactive_sequence_selection_dummy_2_0_1(self):
"""
Test the interactive_sequence_selection() function, using dummy sequences and passing "2", "0" and "1"
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["2", "0", "1", ""]
new_sequences = target.interactive_sequence_selection(["A", "B", "C"], [None])
self.assertEqual(new_sequences, ["C", "A", "B"])
def test_interactive_sequence_selection_dummy_2_0_2_1(self):
"""
Test the interactive_sequence_selection() function, using dummy sequences and repeating one of the inputs
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["2", "0", "2", "1", ""]
new_sequences = target.interactive_sequence_selection(["A", "B", "C"], [None])
self.assertEqual(new_sequences, ["C", "A", "B"])
def test_interactive_sequence_selection_dummy_2_0_A_1(self):
"""
Test the interactive_sequence_selection() function, using dummy sequences and entering a non-digit
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["2", "0", "A", "1", ""]
new_sequences = target.interactive_sequence_selection(["A", "B", "C"], [None])
self.assertEqual(new_sequences, ["C", "A", "B"])
def test_interactive_sequence_selection_dummy_2_0_99_1(self):
"""
Test the interactive_sequence_selection() function, using dummy sequences and entering a positve out of range number
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["2", "0", "99", "1", ""]
new_sequences = target.interactive_sequence_selection(["A", "B", "C"], [None])
self.assertEqual(new_sequences, ["C", "A", "B"])
def test_interactive_sequence_selection_dummy_2_0_min4_1(self):
"""
Test the interactive_sequence_selection() function, using dummy sequences and entering a negative out of range number
"""
global mock_raw_input_counter
global mock_raw_input_values
mock_raw_input_counter = 0
mock_raw_input_values = ["2", "0", "-4", "1", ""]
new_sequences = target.interactive_sequence_selection(["A", "B", "C"], [None])
self.assertEqual(new_sequences, ["C", "A", "B"])
class TestAnalyzeFiles(unittest.TestCase):
def test_analyze_files_no_files(self):
"""
Test the analyze_files() function, passing an empty list of files
(This scenario should not ever happen)
"""
sequences = target.analyze_files([])
self.assertEqual(sequences, [])
def test_analyze_files_invalid_files(self):
"""
Test the analyze_files() function, passing list of non-existing files
(This scenario should not ever happen)
"""
with self.assertRaises(Exception) as cm:
sequences = target.analyze_files([""])
self.assertEqual(str(cm.exception), "There is no file to analyze at ''")
class TestDetectFolder(unittest.TestCase):
def test_detect_folder_explicit_path_valid(self):
"""
Test the detect_folder() function, explicitly passing it a valid path
"""
# Create a temporary folder with 5 dummy files, 3 of which with .MOV extension
(tempdir, mov_file_1, mov_file_2, mov_file_3) = createTempFolderWithDummyMOVFiles()
# Run detect_folder()
args = target.parse_args(['--folder', tempdir])
(folder, files) = target.detect_folder(args)
# Validate the return of detect_folder()
self.assertEqual(folder, tempdir)
self.assertEqual(len(files), 3)
self.assertTrue(mov_file_1 in files)
self.assertTrue(mov_file_2 in files)
self.assertTrue(mov_file_3 in files)
# Delete the temporary folder and files
shutil.rmtree(tempdir)
def test_detect_folder_explicit_path_invalid(self):
"""
Test the detect_folder() function, explicitly passing it a invalid path
"""
# Create a temporary folder and delete it directly
tempdir = tempfile.mkdtemp()
shutil.rmtree(tempdir)
# Temporarily disable the logging output (we know this is "Critical")
logger = logging.getLogger()
logger.disabled = True
# Pass that now non-existing path to detect_folder()
args = target.parse_args(['--folder', tempdir])
with self.assertRaises(SystemExit) as cm:
(folder, files) = target.detect_folder(args)
the_exception = cm.exception
self.assertEqual(the_exception.code, 10)
logger.disabled = False
def test_detect_folder_explicit_path_no_video_files(self):
"""
Test the detect_folder() function, explicitly passing it a valid path containing no video files
"""
# Create a temporary folder with a non .MOV file
tempdir = tempfile.mkdtemp()
tempfile.mkstemp(dir=tempdir)
# Temporarily disable the logging output (we know this is "Critical")
logger = logging.getLogger()
logger.disabled = True
# Pass that now non-existing path to detect_folder()
args = target.parse_args(['--folder', tempdir])
with self.assertRaises(SystemExit) as cm:
(folder, files) = target.detect_folder(args)
the_exception = cm.exception
self.assertEqual(the_exception.code, 11)
logger.disabled = False
# Delete the temporary folder and file
shutil.rmtree(tempdir)
def test_detect_folder_automatic_detection_fail(self):
"""
Test the detect_folder() function, failing at automatic discovery
"""
# Temporarily disable the logging output (we know this is "Critical")
logger = logging.getLogger()
logger.disabled = True
# Pass that now non-existing path to detect_folder()
args = target.parse_args([])
with self.assertRaises(SystemExit) as cm:
(folder, files) = target.detect_folder(args)
the_exception = cm.exception
self.assertEqual(the_exception.code, 12)
logger.disabled = False
class TestDeleteTemporaryFiles(unittest.TestCase):
def test_delete_temporary_files_compressed_files(self):
"""
Test the delete_temporary_files() function deletes the temporary folder
where compressed files would be placed in
"""
args = target.parse_args([])
tempdir = tempfile.mkdtemp()
self.assertTrue(os.path.isdir(tempdir))
target.delete_temporary_files([], None, None, None, args, tempdir, [])
self.assertFalse(os.path.isdir(tempdir))
def test_delete_temporary_files_merged_files_no_compression(self):
"""
Test the delete_temporary_files() function deletes the temporary merged file
"""
# target.delete_temporary_files(seq, file_to_upload, idx, num_sequences, args, tempdir, pre_copy_folders)
args = target.parse_args(["--no-compression"])
(ignore, file_to_upload) = tempfile.mkstemp(suffix=".MOV")
self.assertTrue(os.path.exists(file_to_upload))
target.delete_temporary_files([[], []], file_to_upload, 0, 2, args, None, [])
self.assertFalse(os.path.exists(file_to_upload))
def test_delete_temporary_files_pre_copy_folders_no_compression(self):
"""
Test the delete_temporary_files() function deletes the temporary merged file
"""
# target.delete_temporary_files(seq, file_to_upload, idx, num_sequences, args, tempdir, pre_copy_folders)
args = target.parse_args(["--pre-copy", "--no-compression"])
tempdir = tempfile.mkdtemp()
self.assertTrue(os.path.isdir(tempdir))
target.delete_temporary_files([], None, 0, None, args, None, [tempdir])
self.assertFalse(os.path.isdir(tempdir))
class TestGetSequenceTitle(unittest.TestCase):
def test_get_sequence_title(self):
"""
Test the get_sequence_title() function
"""
creation_time = datetime.datetime(2019, 1, 25, 16, 42, 21)
sequence_title = target.get_sequence_title(creation_time)
self.assertEqual(sequence_title, "2019-01-25 16:42:21")
class TestParseArgs(unittest.TestCase):
def test_parse_args_dry_run(self):
"""
Test the --dry-run argument
"""
parser = target.parse_args(['--dry-run'])
self.assertTrue(parser.dry_run)
def test_parse_args_dry_run_shorthand(self):
"""
Test the -dr argument
"""
parser = target.parse_args(['-dr'])
self.assertTrue(parser.dry_run)
def test_parse_args_no_net(self):
"""
Test the --no-net argument
"""
parser = target.parse_args(['--no-net'])
self.assertTrue(parser.no_net)
def test_parse_args_no_net_shorthand(self):
"""
Test the -nn argument
"""
parser = target.parse_args(['-nn'])
self.assertTrue(parser.no_net)
def test_parse_args_debug(self):
"""
Test the --debug argument
"""
parser = target.parse_args(['--debug'])
self.assertEqual(parser.loglevel, logging.DEBUG)
self.assertEqual(parser.logging_level, "DEBUG")
def test_parse_args_debug_shorthand(self):
"""
Test the -d argument
"""
parser = target.parse_args(['-d'])
self.assertEqual(parser.loglevel, logging.DEBUG)
self.assertEqual(parser.logging_level, "DEBUG")
def test_parse_args_verbose(self):
"""
Test the --verbose argument
"""
parser = target.parse_args(['--verbose'])
self.assertEqual(parser.loglevel, logging.INFO)
self.assertEqual(parser.logging_level, "INFO")
def test_parse_args_verbose_shorthand(self):
"""
Test the -v argument
"""
parser = target.parse_args(['-v'])
self.assertEqual(parser.loglevel, logging.INFO)
self.assertEqual(parser.logging_level, "INFO")
def test_parse_args_privacyStatus_valid(self):
"""
Test the --privacyStatus argument with a valid value
"""
parser = target.parse_args(['--privacyStatus', 'private'])
self.assertEqual(parser.privacyStatus, 'private')
def test_parse_args_min_length_valid(self):
"""
Test the --min-length argument with a valid value
"""
parser = target.parse_args(['--min-length', '6'])
self.assertEqual(parser.min_length, 6)
def test_parse_args_max_length_valid(self):
"""
Test the --max-length argument with a valid value
"""
parser = target.parse_args(['--max-length', '48'])
self.assertEqual(parser.max_length, 48)
class TestInitMain(unittest.TestCase):
def test_init_main_no_arguments(self):
"""
Test the initialization code without any parameter
"""
# Make the script believe we ran it directly
target.__name__ = "__main__"
# Pass it no arguments
target.sys.argv = ["scriptname.py"]
# Temporarily disable the logging output (we know this is "Critical")
logger = logging.getLogger()
logger.disabled = True
# Expect the script to return with code 12 (automatic folder detection failed)
with self.assertRaises(SystemExit) as cm:
target.init()
the_exception = cm.exception
self.assertEqual(the_exception.code, 12)
logger.disabled = False
def test_init_main_help(self):
"""
Test the initialization code like we had passed --help
"""
# Make the script believe we ran it directly
target.__name__ = "__main__"
# Pass it the --test argument
target.sys.argv = ["scriptname.py", "--help"]
# Expect the script to return with code 0
with self.assertRaises(SystemExit) as cm:
target.init()
the_exception = cm.exception
self.assertEqual(the_exception.code, 0)
def test_init_main_folder_no_net_no_compression(self):
"""
Test the initialization code like we had passed --folder, --no-net and --no-compression
This simulates a full run of the program with a single file, without uploading or compressing
"""
# Make the script believe we ran it directly
target.__name__ = "__main__"
target.sys.argv = ["scriptname.py", "--no-net", "--no-compression", "--folder", "sample_videos"]
target.init()
# Nothing to assert (the individual functions are tested separately for
# their returns), just confirming no Exception is thrown.
def test_init_main_folder_with_net(self):
"""
Test the initialization code like we had passed --folder and network
"""
# Make the script believe we ran it directly
target.__name__ = "__main__"
# Create a temporary folder with 5 dummy files, 3 of which with .MOV extension
(tempdir, mov_file_1, mov_file_2, mov_file_3) = createTempFolderWithDummyMOVFiles()
# Pass it the --folder argument pointing to our dummy folder and files
target.sys.argv = ["scriptname.py", "--folder", tempdir]
# Temporarily disable the logging output (we know this is "Critical")
logger = logging.getLogger()
logger.disabled = True
# Test differently if we have the files for YouTube authentication (local) or not (Travis)
if os.path.isfile("client_secret.json"):
# Expect the script to throw an Exception since these are not real MOV files
with self.assertRaises(Exception) as cm:
target.init()
if is_connected():
self.assertEqual(str(cm.exception), "I found no duration")
else:
self.assertEqual(str(cm.exception), "Unable to find the server at www.googleapis.com")
else:
# Expect the script to throw an Exception since these are not real MOV files
with self.assertRaises(SystemExit) as cm:
target.init()
self.assertTrue(str(cm.exception).startswith("The client secrets were invalid:"))
logger.disabled = False
# Delete the temporary folder and files
shutil.rmtree(tempdir)
if __name__ == '__main__':
unittest.main()
| 47.72229
| 158
| 0.650995
| 4,914
| 39,180
| 4.999797
| 0.092593
| 0.036632
| 0.022834
| 0.029061
| 0.812487
| 0.762261
| 0.729374
| 0.701982
| 0.670438
| 0.619805
| 0
| 0.034234
| 0.238795
| 39,180
| 820
| 159
| 47.780488
| 0.789565
| 0.382006
| 0
| 0.473684
| 0
| 0
| 0.098537
| 0.027866
| 0
| 0
| 0
| 0
| 0.203008
| 1
| 0.115288
| false
| 0.005013
| 0.025063
| 0
| 0.180451
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
37fd7d5a076e78a560bf0282ba9601dc07758ca5
| 38,564
|
py
|
Python
|
datasets/imagenet.py
|
jimilee/image-classification
|
abd07abbbf3ed2e38bb7fda6f4bfeb28dd7ffaae
|
[
"MIT"
] | 57
|
2021-08-23T03:36:15.000Z
|
2022-03-29T14:07:10.000Z
|
datasets/imagenet.py
|
jimilee/image-classification
|
abd07abbbf3ed2e38bb7fda6f4bfeb28dd7ffaae
|
[
"MIT"
] | null | null | null |
datasets/imagenet.py
|
jimilee/image-classification
|
abd07abbbf3ed2e38bb7fda6f4bfeb28dd7ffaae
|
[
"MIT"
] | 12
|
2021-08-15T17:56:02.000Z
|
2022-03-31T02:26:22.000Z
|
from torchvision.datasets import ImageFolder
from typing import Optional, Callable
from pathlib import Path
class ImageNet(ImageFolder):
WNIDS = ['n01440764', 'n01443537', 'n01484850', 'n01491361', 'n01494475', 'n01496331', 'n01498041', 'n01514668', 'n01514859', 'n01518878', 'n01530575', 'n01531178', 'n01532829', 'n01534433', 'n01537544', 'n01558993', 'n01560419', 'n01580077', 'n01582220', 'n01592084', 'n01601694', 'n01608432', 'n01614925', 'n01616318', 'n01622779', 'n01629819', 'n01630670', 'n01631663', 'n01632458', 'n01632777', 'n01641577', 'n01644373', 'n01644900', 'n01664065', 'n01665541', 'n01667114', 'n01667778', 'n01669191', 'n01675722', 'n01677366', 'n01682714', 'n01685808', 'n01687978', 'n01688243', 'n01689811', 'n01692333', 'n01693334', 'n01694178', 'n01695060', 'n01697457', 'n01698640', 'n01704323', 'n01728572', 'n01728920', 'n01729322', 'n01729977', 'n01734418', 'n01735189', 'n01737021', 'n01739381', 'n01740131', 'n01742172', 'n01744401', 'n01748264', 'n01749939', 'n01751748', 'n01753488', 'n01755581', 'n01756291', 'n01768244', 'n01770081', 'n01770393', 'n01773157', 'n01773549', 'n01773797', 'n01774384', 'n01774750', 'n01775062', 'n01776313', 'n01784675', 'n01795545', 'n01796340', 'n01797886', 'n01798484', 'n01806143', 'n01806567', 'n01807496', 'n01817953', 'n01818515', 'n01819313', 'n01820546', 'n01824575', 'n01828970', 'n01829413', 'n01833805', 'n01843065', 'n01843383', 'n01847000', 'n01855032', 'n01855672', 'n01860187', 'n01871265', 'n01872401', 'n01873310', 'n01877812', 'n01882714', 'n01883070', 'n01910747', 'n01914609', 'n01917289', 'n01924916', 'n01930112', 'n01943899', 'n01944390', 'n01945685', 'n01950731', 'n01955084', 'n01968897', 'n01978287', 'n01978455', 'n01980166', 'n01981276', 'n01983481', 'n01984695', 'n01985128', 'n01986214', 'n01990800', 'n02002556', 'n02002724', 'n02006656', 'n02007558', 'n02009229', 'n02009912', 'n02011460', 'n02012849', 'n02013706', 'n02017213', 'n02018207', 'n02018795', 'n02025239', 'n02027492', 'n02028035', 'n02033041', 'n02037110', 'n02051845', 'n02056570', 'n02058221', 'n02066245', 'n02071294', 'n02074367', 'n02077923', 'n02085620', 'n02085782', 'n02085936', 'n02086079', 'n02086240', 'n02086646', 'n02086910', 'n02087046', 'n02087394', 'n02088094', 'n02088238', 'n02088364', 'n02088466', 'n02088632', 'n02089078', 'n02089867', 'n02089973', 'n02090379', 'n02090622', 'n02090721', 'n02091032', 'n02091134', 'n02091244', 'n02091467', 'n02091635', 'n02091831', 'n02092002', 'n02092339', 'n02093256', 'n02093428', 'n02093647', 'n02093754', 'n02093859', 'n02093991', 'n02094114', 'n02094258', 'n02094433', 'n02095314', 'n02095570', 'n02095889', 'n02096051', 'n02096177', 'n02096294', 'n02096437', 'n02096585', 'n02097047', 'n02097130', 'n02097209', 'n02097298', 'n02097474', 'n02097658', 'n02098105', 'n02098286', 'n02098413', 'n02099267', 'n02099429', 'n02099601', 'n02099712', 'n02099849', 'n02100236', 'n02100583', 'n02100735', 'n02100877', 'n02101006', 'n02101388', 'n02101556', 'n02102040', 'n02102177', 'n02102318', 'n02102480', 'n02102973', 'n02104029', 'n02104365', 'n02105056', 'n02105162', 'n02105251', 'n02105412', 'n02105505', 'n02105641', 'n02105855', 'n02106030', 'n02106166', 'n02106382', 'n02106550', 'n02106662', 'n02107142', 'n02107312', 'n02107574', 'n02107683', 'n02107908', 'n02108000', 'n02108089', 'n02108422', 'n02108551', 'n02108915', 'n02109047', 'n02109525', 'n02109961', 'n02110063', 'n02110185', 'n02110341', 'n02110627', 'n02110806', 'n02110958', 'n02111129', 'n02111277', 'n02111500', 'n02111889', 'n02112018', 'n02112137', 'n02112350', 'n02112706', 'n02113023', 'n02113186', 'n02113624', 'n02113712', 'n02113799', 'n02113978', 'n02114367', 'n02114548', 'n02114712', 'n02114855', 'n02115641', 'n02115913', 'n02116738', 'n02117135', 'n02119022', 'n02119789', 'n02120079', 'n02120505', 'n02123045', 'n02123159', 'n02123394', 'n02123597', 'n02124075', 'n02125311', 'n02127052', 'n02128385', 'n02128757', 'n02128925', 'n02129165', 'n02129604', 'n02130308', 'n02132136', 'n02133161', 'n02134084', 'n02134418', 'n02137549', 'n02138441', 'n02165105', 'n02165456', 'n02167151', 'n02168699', 'n02169497', 'n02172182', 'n02174001', 'n02177972', 'n02190166', 'n02206856', 'n02219486', 'n02226429', 'n02229544', 'n02231487', 'n02233338', 'n02236044', 'n02256656', 'n02259212', 'n02264363', 'n02268443', 'n02268853', 'n02276258', 'n02277742', 'n02279972', 'n02280649', 'n02281406', 'n02281787', 'n02317335', 'n02319095', 'n02321529', 'n02325366', 'n02326432', 'n02328150', 'n02342885', 'n02346627', 'n02356798', 'n02361337', 'n02363005', 'n02364673', 'n02389026', 'n02391049', 'n02395406', 'n02396427', 'n02397096', 'n02398521', 'n02403003', 'n02408429', 'n02410509', 'n02412080', 'n02415577', 'n02417914', 'n02422106', 'n02422699', 'n02423022', 'n02437312', 'n02437616', 'n02441942', 'n02442845', 'n02443114', 'n02443484', 'n02444819', 'n02445715', 'n02447366', 'n02454379', 'n02457408', 'n02480495', 'n02480855', 'n02481823', 'n02483362', 'n02483708', 'n02484975', 'n02486261', 'n02486410', 'n02487347', 'n02488291', 'n02488702', 'n02489166', 'n02490219', 'n02492035', 'n02492660', 'n02493509', 'n02493793', 'n02494079', 'n02497673', 'n02500267', 'n02504013', 'n02504458', 'n02509815', 'n02510455', 'n02514041', 'n02526121', 'n02536864', 'n02606052', 'n02607072', 'n02640242', 'n02641379', 'n02643566', 'n02655020', 'n02666196', 'n02667093', 'n02669723', 'n02672831', 'n02676566', 'n02687172', 'n02690373', 'n02692877', 'n02699494', 'n02701002', 'n02704792', 'n02708093', 'n02727426', 'n02730930', 'n02747177', 'n02749479', 'n02769748', 'n02776631', 'n02777292', 'n02782093', 'n02783161', 'n02786058', 'n02787622', 'n02788148', 'n02790996', 'n02791124', 'n02791270', 'n02793495', 'n02794156', 'n02795169', 'n02797295', 'n02799071', 'n02802426', 'n02804414', 'n02804610', 'n02807133', 'n02808304', 'n02808440', 'n02814533', 'n02814860', 'n02815834', 'n02817516', 'n02823428', 'n02823750', 'n02825657', 'n02834397', 'n02835271', 'n02837789', 'n02840245', 'n02841315', 'n02843684', 'n02859443', 'n02860847', 'n02865351', 'n02869837', 'n02870880', 'n02871525', 'n02877765', 'n02879718', 'n02883205', 'n02892201', 'n02892767', 'n02894605', 'n02895154', 'n02906734', 'n02909870', 'n02910353', 'n02916936', 'n02917067', 'n02927161', 'n02930766', 'n02939185', 'n02948072', 'n02950826', 'n02951358', 'n02951585', 'n02963159', 'n02965783', 'n02966193', 'n02966687', 'n02971356', 'n02974003', 'n02977058', 'n02978881', 'n02979186', 'n02980441', 'n02981792', 'n02988304', 'n02992211', 'n02992529', 'n02999410', 'n03000134', 'n03000247', 'n03000684', 'n03014705', 'n03016953', 'n03017168', 'n03018349', 'n03026506', 'n03028079', 'n03032252', 'n03041632', 'n03042490', 'n03045698', 'n03047690', 'n03062245', 'n03063599', 'n03063689', 'n03065424', 'n03075370', 'n03085013', 'n03089624', 'n03095699', 'n03100240', 'n03109150', 'n03110669', 'n03124043', 'n03124170', 'n03125729', 'n03126707', 'n03127747', 'n03127925', 'n03131574', 'n03133878', 'n03134739', 'n03141823', 'n03146219', 'n03160309', 'n03179701', 'n03180011', 'n03187595', 'n03188531', 'n03196217', 'n03197337', 'n03201208', 'n03207743', 'n03207941', 'n03208938', 'n03216828', 'n03218198', 'n03220513', 'n03223299', 'n03240683', 'n03249569', 'n03250847', 'n03255030', 'n03259280', 'n03271574', 'n03272010', 'n03272562', 'n03290653', 'n03291819', 'n03297495', 'n03314780', 'n03325584', 'n03337140', 'n03344393', 'n03345487', 'n03347037', 'n03355925', 'n03372029', 'n03376595', 'n03379051', 'n03384352', 'n03388043', 'n03388183', 'n03388549', 'n03393912', 'n03394916', 'n03400231', 'n03404251', 'n03417042', 'n03424325', 'n03425413', 'n03443371', 'n03444034', 'n03445777', 'n03445924', 'n03447447', 'n03447721', 'n03450230', 'n03452741', 'n03457902', 'n03459775', 'n03461385', 'n03467068', 'n03476684', 'n03476991', 'n03478589', 'n03481172', 'n03482405', 'n03483316', 'n03485407', 'n03485794', 'n03492542', 'n03494278', 'n03495258', 'n03496892', 'n03498962', 'n03527444', 'n03529860', 'n03530642', 'n03532672', 'n03534580', 'n03535780', 'n03538406', 'n03544143', 'n03584254', 'n03584829', 'n03590841', 'n03594734', 'n03594945', 'n03595614', 'n03598930', 'n03599486', 'n03602883', 'n03617480', 'n03623198', 'n03627232', 'n03630383', 'n03633091', 'n03637318', 'n03642806', 'n03649909', 'n03657121', 'n03658185', 'n03661043', 'n03662601', 'n03666591', 'n03670208', 'n03673027', 'n03676483', 'n03680355', 'n03690938', 'n03691459', 'n03692522', 'n03697007', 'n03706229', 'n03709823', 'n03710193', 'n03710637', 'n03710721', 'n03717622', 'n03720891', 'n03721384', 'n03724870', 'n03729826', 'n03733131', 'n03733281', 'n03733805', 'n03742115', 'n03743016', 'n03759954', 'n03761084', 'n03763968', 'n03764736', 'n03769881', 'n03770439', 'n03770679', 'n03773504', 'n03775071', 'n03775546', 'n03776460', 'n03777568', 'n03777754', 'n03781244', 'n03782006', 'n03785016', 'n03786901', 'n03787032', 'n03788195', 'n03788365', 'n03791053', 'n03792782', 'n03792972', 'n03793489', 'n03794056', 'n03796401', 'n03803284', 'n03804744', 'n03814639', 'n03814906', 'n03825788', 'n03832673', 'n03837869', 'n03838899', 'n03840681', 'n03841143', 'n03843555', 'n03854065', 'n03857828', 'n03866082', 'n03868242', 'n03868863', 'n03871628', 'n03873416', 'n03874293', 'n03874599', 'n03876231', 'n03877472', 'n03877845', 'n03884397', 'n03887697', 'n03888257', 'n03888605', 'n03891251', 'n03891332', 'n03895866', 'n03899768', 'n03902125', 'n03903868', 'n03908618', 'n03908714', 'n03916031', 'n03920288', 'n03924679', 'n03929660', 'n03929855', 'n03930313', 'n03930630', 'n03933933', 'n03935335', 'n03937543', 'n03938244', 'n03942813', 'n03944341', 'n03947888', 'n03950228', 'n03954731', 'n03956157', 'n03958227', 'n03961711', 'n03967562', 'n03970156', 'n03976467', 'n03976657', 'n03977966', 'n03980874', 'n03982430', 'n03983396', 'n03991062', 'n03992509', 'n03995372', 'n03998194', 'n04004767', 'n04005630', 'n04008634', 'n04009552', 'n04019541', 'n04023962', 'n04026417', 'n04033901', 'n04033995', 'n04037443', 'n04039381', 'n04040759', 'n04041544', 'n04044716', 'n04049303', 'n04065272', 'n04067472', 'n04069434', 'n04070727', 'n04074963', 'n04081281', 'n04086273', 'n04090263', 'n04099969', 'n04111531', 'n04116512', 'n04118538', 'n04118776', 'n04120489', 'n04125021', 'n04127249', 'n04131690', 'n04133789', 'n04136333', 'n04141076', 'n04141327', 'n04141975', 'n04146614', 'n04147183', 'n04149813', 'n04152593', 'n04153751', 'n04154565', 'n04162706', 'n04179913', 'n04192698', 'n04200800', 'n04201297', 'n04204238', 'n04204347', 'n04208210', 'n04209133', 'n04209239', 'n04228054', 'n04229816', 'n04235860', 'n04238763', 'n04239074', 'n04243546', 'n04251144', 'n04252077', 'n04252225', 'n04254120', 'n04254680', 'n04254777', 'n04258138', 'n04259630', 'n04263257', 'n04264628', 'n04265275', 'n04266014', 'n04270147', 'n04273569', 'n04275548', 'n04277352', 'n04285008', 'n04286575', 'n04296562', 'n04310018', 'n04311004', 'n04311174', 'n04317175', 'n04325704', 'n04326547', 'n04328186', 'n04330267', 'n04332243', 'n04335435', 'n04336792', 'n04344873', 'n04346328', 'n04347754', 'n04350905', 'n04355338', 'n04355933', 'n04356056', 'n04357314', 'n04366367', 'n04367480', 'n04370456', 'n04371430', 'n04371774', 'n04372370', 'n04376876', 'n04380533', 'n04389033', 'n04392985', 'n04398044', 'n04399382', 'n04404412', 'n04409515', 'n04417672', 'n04418357', 'n04423845', 'n04428191', 'n04429376', 'n04435653', 'n04442312', 'n04443257', 'n04447861', 'n04456115', 'n04458633', 'n04461696', 'n04462240', 'n04465501', 'n04467665', 'n04476259', 'n04479046', 'n04482393', 'n04483307', 'n04485082', 'n04486054', 'n04487081', 'n04487394', 'n04493381', 'n04501370', 'n04505470', 'n04507155', 'n04509417', 'n04515003', 'n04517823', 'n04522168', 'n04523525', 'n04525038', 'n04525305', 'n04532106', 'n04532670', 'n04536866', 'n04540053', 'n04532670', 'n04536866', 'n04540053', 'n04542943', 'n04552348', 'n04553703', 'n04554684', 'n04557648', 'n04560804', 'n04562935', 'n04579145', 'n04579432', 'n04584207', 'n04589890', 'n04590129', 'n04591157', 'n04591713', 'n04592741', 'n04596742', 'n04597913', 'n04599235', 'n04604644', 'n04606251', 'n04612504', 'n04613696', 'n06359193', 'n06596364', 'n06785654', 'n06794110', 'n06874185', 'n07248320', 'n07565083', 'n07579787', 'n07583066', 'n07584110', 'n07590611', 'n07613480', 'n07614500', 'n07615774', 'n07684084', 'n07693725', 'n07695742', 'n07697313', 'n07697537', 'n07711569', 'n07714571', 'n07714990', 'n07715103', 'n07716358', 'n07716906', 'n07717410', 'n07717556', 'n07718472', 'n07718747', 'n07720875', 'n07730033', 'n07734744', 'n07742313', 'n07745940', 'n07747607', 'n07749582', 'n07753113', 'n07753275', 'n07753592', 'n07754684', 'n07760859', 'n07768694', 'n07802026', 'n07831146', 'n07836838', 'n07860988', 'n07871810', 'n07873807', 'n07875152', 'n07880968', 'n07892512', 'n07920052', 'n07930864', 'n07932039', 'n09193705', 'n09229709', 'n09246464', 'n09256479', 'n09288635', 'n09332890', 'n09399592', 'n09421951', 'n09428293', 'n09468604', 'n09472597', 'n09835506', 'n10148035', 'n10565667', 'n11879895', 'n11939491', 'n12057211', 'n12144580', 'n12267677', 'n12620546', 'n12768682', 'n12985857', 'n12998815', 'n13037406', 'n13040303', 'n13044778', 'n13052670', 'n13054560', 'n13133613', 'n15075141']
CLASSES = ['tench, Tinca tinca', 'goldfish, Carassius auratus', 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', 'tiger shark, Galeocerdo cuvieri', 'hammerhead, hammerhead shark', 'electric ray, crampfish, numbfish, torpedo', 'stingray', 'cock', 'hen', 'ostrich, Struthio camelus', 'brambling, Fringilla montifringilla', 'goldfinch, Carduelis carduelis', 'house finch, linnet, Carpodacus mexicanus', 'junco, snowbird', 'indigo bunting, indigo finch, indigo bird, Passerina cyanea', 'robin, American robin, Turdus migratorius', 'bulbul', 'jay', 'magpie', 'chickadee', 'water ouzel, dipper', 'kite', 'bald eagle, American eagle, Haliaeetus leucocephalus', 'vulture', 'great grey owl, great gray owl, Strix nebulosa', 'European fire salamander, Salamandra salamandra', 'common newt, Triturus vulgaris', 'eft', 'spotted salamander, Ambystoma maculatum', 'axolotl, mud puppy, Ambystoma mexicanum', 'bullfrog, Rana catesbeiana', 'tree frog, tree-frog', 'tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui', 'loggerhead, loggerhead turtle, Caretta caretta', 'leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea', 'mud turtle', 'terrapin', 'box turtle, box tortoise', 'banded gecko', 'common iguana, iguana, Iguana iguana', 'American chameleon, anole, Anolis carolinensis', 'whiptail, whiptail lizard', 'agama', 'frilled lizard, Chlamydosaurus kingi', 'alligator lizard', 'Gila monster, Heloderma suspectum', 'green lizard, Lacerta viridis', 'African chameleon, Chamaeleo chamaeleon', 'Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis', 'African crocodile, Nile crocodile, Crocodylus niloticus', 'American alligator, Alligator mississipiensis', 'triceratops', 'thunder snake, worm snake, Carphophis amoenus', 'ringneck snake, ring-necked snake, ring snake', 'hognose snake, puff adder, sand viper', 'green snake, grass snake', 'king snake, kingsnake', 'garter snake, grass snake', 'water snake', 'vine snake', 'night snake, Hypsiglena torquata', 'boa constrictor, Constrictor constrictor', 'rock python, rock snake, Python sebae', 'Indian cobra, Naja naja', 'green mamba', 'sea snake', 'horned viper, cerastes, sand viper, horned asp, Cerastes cornutus', 'diamondback, diamondback rattlesnake, Crotalus adamanteus', 'sidewinder, horned rattlesnake, Crotalus cerastes', 'trilobite', 'harvestman, daddy longlegs, Phalangium opilio', 'scorpion', 'black and gold garden spider, Argiope aurantia', 'barn spider, Araneus cavaticus', 'garden spider, Aranea diademata', 'black widow, Latrodectus mactans', 'tarantula', 'wolf spider, hunting spider', 'tick', 'centipede', 'black grouse', 'ptarmigan', 'ruffed grouse, partridge, Bonasa umbellus', 'prairie chicken, prairie grouse, prairie fowl', 'peacock', 'quail', 'partridge', 'African grey, African gray, Psittacus erithacus', 'macaw', 'sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita', 'lorikeet', 'coucal', 'bee eater', 'hornbill', 'hummingbird', 'jacamar', 'toucan', 'drake', 'red-breasted merganser, Mergus serrator', 'goose', 'black swan, Cygnus atratus', 'tusker', 'echidna, spiny anteater, anteater', 'platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus', 'wallaby, brush kangaroo', 'koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus', 'wombat', 'jellyfish', 'sea anemone, anemone', 'brain coral', 'flatworm, platyhelminth', 'nematode, nematode worm, roundworm', 'conch', 'snail', 'slug', 'sea slug, nudibranch', 'chiton, coat-of-mail shell, sea cradle, polyplacophore', 'chambered nautilus, pearly nautilus, nautilus', 'Dungeness crab, Cancer magister', 'rock crab, Cancer irroratus', 'fiddler crab', 'king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica', 'American lobster, Northern lobster, Maine lobster, Homarus americanus', 'spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish', 'crayfish, crawfish, crawdad, crawdaddy', 'hermit crab', 'isopod', 'white stork, Ciconia ciconia', 'black stork, Ciconia nigra', 'spoonbill', 'flamingo', 'little blue heron, Egretta caerulea', 'American egret, great white heron, Egretta albus', 'bittern', 'crane', 'limpkin, Aramus pictus', 'European gallinule, Porphyrio porphyrio', 'American coot, marsh hen, mud hen, water hen, Fulica americana', 'bustard', 'ruddy turnstone, Arenaria interpres', 'red-backed sandpiper, dunlin, Erolia alpina', 'redshank, Tringa totanus', 'dowitcher', 'oystercatcher, oyster catcher', 'pelican', 'king penguin, Aptenodytes patagonica', 'albatross, mollymawk', 'grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus', 'killer whale, killer, orca, grampus, sea wolf, Orcinus orca', 'dugong, Dugong dugon', 'sea lion', 'Chihuahua', 'Japanese spaniel', 'Maltese dog, Maltese terrier, Maltese', 'Pekinese, Pekingese, Peke', 'Shih-Tzu', 'Blenheim spaniel', 'papillon', 'toy terrier', 'Rhodesian ridgeback', 'Afghan hound, Afghan', 'basset, basset hound', 'beagle', 'bloodhound, sleuthhound', 'bluetick', 'black-and-tan coonhound', 'Walker hound, Walker foxhound', 'English foxhound', 'redbone', 'borzoi, Russian wolfhound', 'Irish wolfhound', 'Italian greyhound', 'whippet', 'Ibizan hound, Ibizan Podenco', 'Norwegian elkhound, elkhound', 'otterhound, otter hound', 'Saluki, gazelle hound', 'Scottish deerhound, deerhound', 'Weimaraner', 'Staffordshire bullterrier, Staffordshire bull terrier', 'American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier', 'Bedlington terrier', 'Border terrier', 'Kerry blue terrier', 'Irish terrier', 'Norfolk terrier', 'Norwich terrier', 'Yorkshire terrier', 'wire-haired fox terrier', 'Lakeland terrier', 'Sealyham terrier, Sealyham', 'Airedale, Airedale terrier', 'cairn, cairn terrier', 'Australian terrier', 'Dandie Dinmont, Dandie Dinmont terrier', 'Boston bull, Boston terrier', 'miniature schnauzer', 'giant schnauzer', 'standard schnauzer', 'Scotch terrier, Scottish terrier, Scottie', 'Tibetan terrier, chrysanthemum dog', 'silky terrier, Sydney silky', 'soft-coated wheaten terrier', 'West Highland white terrier', 'Lhasa, Lhasa apso', 'flat-coated retriever', 'curly-coated retriever', 'golden retriever', 'Labrador retriever', 'Chesapeake Bay retriever', 'German short-haired pointer', 'vizsla, Hungarian pointer', 'English setter', 'Irish setter, red setter', 'Gordon setter', 'Brittany spaniel', 'clumber, clumber spaniel', 'English springer, English springer spaniel', 'Welsh springer spaniel', 'cocker spaniel, English cocker spaniel, cocker', 'Sussex spaniel', 'Irish water spaniel', 'kuvasz', 'schipperke', 'groenendael', 'malinois', 'briard', 'kelpie', 'komondor', 'Old English sheepdog, bobtail', 'Shetland sheepdog, Shetland sheep dog, Shetland', 'collie', 'Border collie', 'Bouvier des Flandres, Bouviers des Flandres', 'Rottweiler', 'German shepherd, German shepherd dog, German police dog, alsatian', 'Doberman, Doberman pinscher', 'miniature pinscher', 'Greater Swiss Mountain dog', 'Bernese mountain dog', 'Appenzeller', 'EntleBucher', 'boxer', 'bull mastiff', 'Tibetan mastiff', 'French bulldog', 'Great Dane', 'Saint Bernard, St Bernard', 'Eskimo dog, husky', 'malamute, malemute, Alaskan malamute', 'Siberian husky', 'dalmatian, coach dog, carriage dog', 'affenpinscher, monkey pinscher, monkey dog', 'basenji', 'pug, pug-dog', 'Leonberg', 'Newfoundland, Newfoundland dog', 'Great Pyrenees', 'Samoyed, Samoyede', 'Pomeranian', 'chow, chow chow', 'keeshond', 'Brabancon griffon', 'Pembroke, Pembroke Welsh corgi', 'Cardigan, Cardigan Welsh corgi', 'toy poodle', 'miniature poodle', 'standard poodle', 'Mexican hairless', 'timber wolf, grey wolf, gray wolf, Canis lupus', 'white wolf, Arctic wolf, Canis lupus tundrarum', 'red wolf, maned wolf, Canis rufus, Canis niger', 'coyote, prairie wolf, brush wolf, Canis latrans', 'dingo, warrigal, warragal, Canis dingo', 'dhole, Cuon alpinus', 'African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus', 'hyena, hyaena', 'red fox, Vulpes vulpes', 'kit fox, Vulpes macrotis', 'Arctic fox, white fox, Alopex lagopus', 'grey fox, gray fox, Urocyon cinereoargenteus', 'tabby, tabby cat', 'tiger cat', 'Persian cat', 'Siamese cat, Siamese', 'Egyptian cat', 'cougar, puma, catamount, mountain lion, painter, panther, Felis concolor', 'lynx, catamount', 'leopard, Panthera pardus', 'snow leopard, ounce, Panthera uncia', 'jaguar, panther, Panthera onca, Felis onca', 'lion, king of beasts, Panthera leo', 'tiger, Panthera tigris', 'cheetah, chetah, Acinonyx jubatus', 'brown bear, bruin, Ursus arctos', 'American black bear, black bear, Ursus americanus, Euarctos americanus', 'ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus', 'sloth bear, Melursus ursinus, Ursus ursinus', 'mongoose', 'meerkat, mierkat', 'tiger beetle', 'ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle', 'ground beetle, carabid beetle', 'long-horned beetle, longicorn, longicorn beetle', 'leaf beetle, chrysomelid', 'dung beetle', 'rhinoceros beetle', 'weevil', 'fly', 'bee', 'ant, emmet, pismire', 'grasshopper, hopper', 'cricket', 'walking stick, walkingstick, stick insect', 'cockroach, roach', 'mantis, mantid', 'cicada, cicala', 'leafhopper', 'lacewing, lacewing fly', "dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk", 'damselfly', 'admiral', 'ringlet, ringlet butterfly', 'monarch, monarch butterfly, milkweed butterfly, Danaus plexippus', 'cabbage butterfly', 'sulphur butterfly, sulfur butterfly', 'lycaenid, lycaenid butterfly', 'starfish, sea star', 'sea urchin', 'sea cucumber, holothurian', 'wood rabbit, cottontail, cottontail rabbit', 'hare', 'Angora, Angora rabbit', 'hamster', 'porcupine, hedgehog', 'fox squirrel, eastern fox squirrel, Sciurus niger', 'marmot', 'beaver', 'guinea pig, Cavia cobaya', 'sorrel', 'zebra', 'hog, pig, grunter, squealer, Sus scrofa', 'wild boar, boar, Sus scrofa', 'warthog', 'hippopotamus, hippo, river horse, Hippopotamus amphibius', 'ox', 'water buffalo, water ox, Asiatic buffalo, Bubalus bubalis', 'bison', 'ram, tup', 'bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis', 'ibex, Capra ibex', 'hartebeest', 'impala, Aepyceros melampus', 'gazelle', 'Arabian camel, dromedary, Camelus dromedarius', 'llama', 'weasel', 'mink', 'polecat, fitch, foulmart, foumart, Mustela putorius', 'black-footed ferret, ferret, Mustela nigripes', 'otter', 'skunk, polecat, wood pussy', 'badger', 'armadillo', 'three-toed sloth, ai, Bradypus tridactylus', 'orangutan, orang, orangutang, Pongo pygmaeus', 'gorilla, Gorilla gorilla', 'chimpanzee, chimp, Pan troglodytes', 'gibbon, Hylobates lar', 'siamang, Hylobates syndactylus, Symphalangus syndactylus', 'guenon, guenon monkey', 'patas, hussar monkey, Erythrocebus patas', 'baboon', 'macaque', 'langur', 'colobus, colobus monkey', 'proboscis monkey, Nasalis larvatus', 'marmoset', 'capuchin, ringtail, Cebus capucinus', 'howler monkey, howler', 'titi, titi monkey', 'spider monkey, Ateles geoffroyi', 'squirrel monkey, Saimiri sciureus', 'Madagascar cat, ring-tailed lemur, Lemur catta', 'indri, indris, Indri indri, Indri brevicaudatus', 'Indian elephant, Elephas maximus', 'African elephant, Loxodonta africana', 'lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens', 'giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca', 'barracouta, snoek', 'eel', 'coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch', 'rock beauty, Holocanthus tricolor', 'anemone fish', 'sturgeon', 'gar, garfish, garpike, billfish, Lepisosteus osseus', 'lionfish', 'puffer, pufferfish, blowfish, globefish', 'abacus', 'abaya', "academic gown, academic robe, judge's robe", 'accordion, piano accordion, squeeze box', 'acoustic guitar', 'aircraft carrier, carrier, flattop, attack aircraft carrier', 'airliner', 'airship, dirigible', 'altar', 'ambulance', 'amphibian, amphibious vehicle', 'analog clock', 'apiary, bee house', 'apron', 'ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin', 'assault rifle, assault gun', 'backpack, back pack, knapsack, packsack, rucksack, haversack', 'bakery, bakeshop, bakehouse', 'balance beam, beam', 'balloon', 'ballpoint, ballpoint pen, ballpen, Biro', 'Band Aid', 'banjo', 'bannister, banister, balustrade, balusters, handrail', 'barbell', 'barber chair', 'barbershop', 'barn', 'barometer', 'barrel, cask', 'barrow, garden cart, lawn cart, wheelbarrow', 'baseball', 'basketball', 'bassinet', 'bassoon', 'bathing cap, swimming cap', 'bath towel', 'bathtub, bathing tub, bath, tub', 'beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon', 'beacon, lighthouse, beacon light, pharos', 'beaker', 'bearskin, busby, shako', 'beer bottle', 'beer glass', 'bell cote, bell cot', 'bib', 'bicycle-built-for-two, tandem bicycle, tandem', 'bikini, two-piece', 'binder, ring-binder', 'binoculars, field glasses, opera glasses', 'birdhouse', 'boathouse', 'bobsled, bobsleigh, bob', 'bolo tie, bolo, bola tie, bola', 'bonnet, poke bonnet', 'bookcase', 'bookshop, bookstore, bookstall', 'bottlecap', 'bow', 'bow tie, bow-tie, bowtie', 'brass, memorial tablet, plaque', 'brassiere, bra, bandeau', 'breakwater, groin, groyne, mole, bulwark, seawall, jetty', 'breastplate, aegis, egis', 'broom', 'bucket, pail', 'buckle', 'bulletproof vest', 'bullet train, bullet', 'butcher shop, meat market', 'cab, hack, taxi, taxicab', 'caldron, cauldron', 'candle, taper, wax light', 'cannon', 'canoe', 'can opener, tin opener', 'cardigan', 'car mirror', 'carousel, carrousel, merry-go-round, roundabout, whirligig', "carpenter's kit, tool kit", 'carton', 'car wheel', 'cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM', 'cassette', 'cassette player', 'castle', 'catamaran', 'CD player', 'cello, violoncello', 'cellular telephone, cellular phone, cellphone, cell, mobile phone', 'chain', 'chainlink fence', 'chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour', 'chain saw, chainsaw', 'chest', 'chiffonier, commode', 'chime, bell, gong', 'china cabinet, china closet', 'Christmas stocking', 'church, church building', 'cinema, movie theater, movie theatre, movie house, picture palace', 'cleaver, meat cleaver, chopper', 'cliff dwelling', 'cloak', 'clog, geta, patten, sabot', 'cocktail shaker', 'coffee mug', 'coffeepot', 'coil, spiral, volute, whorl, helix', 'combination lock', 'computer keyboard, keypad', 'confectionery, confectionary, candy store', 'container ship, containership, container vessel', 'convertible', 'corkscrew, bottle screw', 'cornet, horn, trumpet, trump', 'cowboy boot', 'cowboy hat, ten-gallon hat', 'cradle', 'crane', 'crash helmet', 'crate', 'crib, cot', 'Crock Pot', 'croquet ball', 'crutch', 'cuirass', 'dam, dike, dyke', 'desk', 'desktop computer', 'dial telephone, dial phone', 'diaper, nappy, napkin', 'digital clock', 'digital watch', 'dining table, board', 'dishrag, dishcloth', 'dishwasher, dish washer, dishwashing machine', 'disk brake, disc brake', 'dock, dockage, docking facility', 'dogsled, dog sled, dog sleigh', 'dome', 'doormat, welcome mat', 'drilling platform, offshore rig', 'drum, membranophone, tympan', 'drumstick', 'dumbbell', 'Dutch oven', 'electric fan, blower', 'electric guitar', 'electric locomotive', 'entertainment center', 'envelope', 'espresso maker', 'face powder', 'feather boa, boa', 'file, file cabinet, filing cabinet', 'fireboat', 'fire engine, fire truck', 'fire screen, fireguard', 'flagpole, flagstaff', 'flute, transverse flute', 'folding chair', 'football helmet', 'forklift', 'fountain', 'fountain pen', 'four-poster', 'freight car', 'French horn, horn', 'frying pan, frypan, skillet', 'fur coat', 'garbage truck, dustcart', 'gasmask, respirator, gas helmet', 'gas pump, gasoline pump, petrol pump, island dispenser', 'goblet', 'go-kart', 'golf ball', 'golfcart, golf cart', 'gondola', 'gong, tam-tam', 'gown', 'grand piano, grand', 'greenhouse, nursery, glasshouse', 'grille, radiator grille', 'grocery store, grocery, food market, market', 'guillotine', 'hair slide', 'hair spray', 'half track', 'hammer', 'hamper', 'hand blower, blow dryer, blow drier, hair dryer, hair drier', 'hand-held computer, hand-held microcomputer', 'handkerchief, hankie, hanky, hankey', 'hard disc, hard disk, fixed disk', 'harmonica, mouth organ, harp, mouth harp', 'harp', 'harvester, reaper', 'hatchet', 'holster', 'home theater, home theatre', 'honeycomb', 'hook, claw', 'hoopskirt, crinoline', 'horizontal bar, high bar', 'horse cart, horse-cart', 'hourglass', 'iPod', 'iron, smoothing iron', "jack-o'-lantern", 'jean, blue jean, denim', 'jeep, landrover', 'jersey, T-shirt, tee shirt', 'jigsaw puzzle', 'jinrikisha, ricksha, rickshaw', 'joystick', 'kimono', 'knee pad', 'knot', 'lab coat, laboratory coat', 'ladle', 'lampshade, lamp shade', 'laptop, laptop computer', 'lawn mower, mower', 'lens cap, lens cover', 'letter opener, paper knife, paperknife', 'library', 'lifeboat', 'lighter, light, igniter, ignitor', 'limousine, limo', 'liner, ocean liner', 'lipstick, lip rouge', 'Loafer', 'lotion', 'loudspeaker, speaker, speaker unit, loudspeaker system, speaker system', "loupe, jeweler's loupe", 'lumbermill, sawmill', 'magnetic compass', 'mailbag, postbag', 'mailbox, letter box', 'maillot', 'maillot, tank suit', 'manhole cover', 'maraca', 'marimba, xylophone', 'mask', 'matchstick', 'maypole', 'maze, labyrinth', 'measuring cup', 'medicine chest, medicine cabinet', 'megalith, megalithic structure', 'microphone, mike', 'microwave, microwave oven', 'military uniform', 'milk can', 'minibus', 'miniskirt, mini', 'minivan', 'missile', 'mitten', 'mixing bowl', 'mobile home, manufactured home', 'Model T', 'modem', 'monastery', 'monitor', 'moped', 'mortar', 'mortarboard', 'mosque', 'mosquito net', 'motor scooter, scooter', 'mountain bike, all-terrain bike, off-roader', 'mountain tent', 'mouse, computer mouse', 'mousetrap', 'moving van', 'muzzle', 'nail', 'neck brace', 'necklace', 'nipple', 'notebook, notebook computer', 'obelisk', 'oboe, hautboy, hautbois', 'ocarina, sweet potato', 'odometer, hodometer, mileometer, milometer', 'oil filter', 'organ, pipe organ', 'oscilloscope, scope, cathode-ray oscilloscope, CRO', 'overskirt', 'oxcart', 'oxygen mask', 'packet', 'paddle, boat paddle', 'paddlewheel, paddle wheel', 'padlock', 'paintbrush', "pajama, pyjama, pj's, jammies", 'palace', 'panpipe, pandean pipe, syrinx', 'paper towel', 'parachute, chute', 'parallel bars, bars', 'park bench', 'parking meter', 'passenger car, coach, carriage', 'patio, terrace', 'pay-phone, pay-station', 'pedestal, plinth, footstall', 'pencil box, pencil case', 'pencil sharpener', 'perfume, essence', 'Petri dish', 'photocopier', 'pick, plectrum, plectron', 'pickelhaube', 'picket fence, paling', 'pickup, pickup truck', 'pier', 'piggy bank, penny bank', 'pill bottle', 'pillow', 'ping-pong ball', 'pinwheel', 'pirate, pirate ship', 'pitcher, ewer', "plane, carpenter's plane, woodworking plane", 'planetarium', 'plastic bag', 'plate rack', 'plow, plough', "plunger, plumber's helper", 'Polaroid camera, Polaroid Land camera', 'pole', 'police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria', 'poncho', 'pool table, billiard table, snooker table', 'pop bottle, soda bottle', 'pot, flowerpot', "potter's wheel", 'power drill', 'prayer rug, prayer mat', 'printer', 'prison, prison house', 'projectile, missile', 'projector', 'puck, hockey puck', 'punching bag, punch bag, punching ball, punchball', 'purse', 'quill, quill pen', 'quilt, comforter, comfort, puff', 'racer, race car, racing car', 'racket, racquet', 'radiator', 'radio, wireless', 'radio telescope, radio reflector', 'rain barrel', 'recreational vehicle, RV, R.V.', 'reel', 'reflex camera', 'refrigerator, icebox', 'remote control, remote', 'restaurant, eating house, eating place, eatery', 'revolver, six-gun, six-shooter', 'rifle', 'rocking chair, rocker', 'rotisserie', 'rubber eraser, rubber, pencil eraser', 'rugby ball', 'rule, ruler', 'running shoe', 'safe', 'safety pin', 'saltshaker, salt shaker', 'sandal', 'sarong', 'sax, saxophone', 'scabbard', 'scale, weighing machine', 'school bus', 'schooner', 'scoreboard', 'screen, CRT screen', 'screw', 'screwdriver', 'seat belt, seatbelt', 'sewing machine', 'shield, buckler', 'shoe shop, shoe-shop, shoe store', 'shoji', 'shopping basket', 'shopping cart', 'shovel', 'shower cap', 'shower curtain', 'ski', 'ski mask', 'sleeping bag', 'slide rule, slipstick', 'sliding door', 'slot, one-armed bandit', 'snorkel', 'snowmobile', 'snowplow, snowplough', 'soap dispenser', 'soccer ball', 'sock', 'solar dish, solar collector, solar furnace', 'sombrero', 'soup bowl', 'space bar', 'space heater', 'space shuttle', 'spatula', 'speedboat', "spider web, spider's web", 'spindle', 'sports car, sport car', 'spotlight, spot', 'stage', 'steam locomotive', 'steel arch bridge', 'steel drum', 'stethoscope', 'stole', 'stone wall', 'stopwatch, stop watch', 'stove', 'strainer', 'streetcar, tram, tramcar, trolley, trolley car', 'stretcher', 'studio couch, day bed', 'stupa, tope', 'submarine, pigboat, sub, U-boat', 'suit, suit of clothes', 'sundial', 'sunglass', 'sunglasses, dark glasses, shades', 'sunscreen, sunblock, sun blocker', 'suspension bridge', 'swab, swob, mop', 'sweatshirt', 'swimming trunks, bathing trunks', 'swing', 'switch, electric switch, electrical switch', 'syringe', 'table lamp', 'tank, army tank, armored combat vehicle, armoured combat vehicle', 'tape player', 'teapot', 'teddy, teddy bear', 'television, television system', 'tennis ball', 'thatch, thatched roof', 'theater curtain, theatre curtain', 'thimble', 'thresher, thrasher, threshing machine', 'throne', 'tile roof', 'toaster', 'tobacco shop, tobacconist shop, tobacconist', 'toilet seat', 'torch', 'totem pole', 'tow truck, tow car, wrecker', 'toyshop', 'tractor', 'trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi', 'tray', 'trench coat', 'tricycle, trike, velocipede', 'trimaran', 'tripod', 'triumphal arch', 'trolleybus, trolley coach, trackless trolley', 'trombone', 'tub, vat', 'turnstile', 'typewriter keyboard', 'umbrella', 'unicycle, monocycle', 'upright, upright piano', 'vacuum, vacuum cleaner', 'vase', 'vault', 'velvet', 'vending machine', 'vestment', 'viaduct', 'violin, fiddle', 'volleyball', 'waffle iron', 'wall clock', 'wallet, billfold, notecase, pocketbook', 'wardrobe, closet, press', 'warplane, military plane', 'washbasin, handbasin, washbowl, lavabo, wash-hand basin', 'washer, automatic washer, washing machine', 'water bottle', 'water jug', 'water tower', 'whiskey jug', 'whistle', 'wig', 'window screen', 'window shade', 'Windsor tie', 'wine bottle', 'wing', 'wok', 'wooden spoon', 'wool, woolen, woollen', 'worm fence, snake fence, snake-rail fence, Virginia fence', 'wreck', 'yawl', 'yurt', 'web site, website, internet site, site', 'comic book', 'crossword puzzle, crossword', 'street sign', 'traffic light, traffic signal, stoplight', 'book jacket, dust cover, dust jacket, dust wrapper', 'menu', 'plate', 'guacamole', 'consomme', 'hot pot, hotpot', 'trifle', 'ice cream, icecream', 'ice lolly, lolly, lollipop, popsicle', 'French loaf', 'bagel, beigel', 'pretzel', 'cheeseburger', 'hotdog, hot dog, red hot', 'mashed potato', 'head cabbage', 'broccoli', 'cauliflower', 'zucchini, courgette', 'spaghetti squash', 'acorn squash', 'butternut squash', 'cucumber, cuke', 'artichoke, globe artichoke', 'bell pepper', 'cardoon', 'mushroom', 'Granny Smith', 'strawberry', 'orange', 'lemon', 'fig', 'pineapple, ananas', 'banana', 'jackfruit, jak, jack', 'custard apple', 'pomegranate', 'hay', 'carbonara', 'chocolate sauce, chocolate syrup', 'dough', 'meat loaf, meatloaf', 'pizza, pizza pie', 'potpie', 'burrito', 'red wine', 'espresso', 'cup', 'eggnog', 'alp', 'bubble', 'cliff, drop, drop-off', 'coral reef', 'geyser', 'lakeside, lakeshore', 'promontory, headland, head, foreland', 'sandbar, sand bar', 'seashore, coast, seacoast, sea-coast', 'valley, vale', 'volcano', 'ballplayer, baseball player', 'groom, bridegroom', 'scuba diver', 'rapeseed', 'daisy', "yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum", 'corn', 'acorn', 'hip, rose hip, rosehip', 'buckeye, horse chestnut, conker', 'coral fungus', 'agaric', 'gyromitra', 'stinkhorn, carrion fungus', 'earthstar', 'hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa', 'bolete', 'ear, spike, capitulum', 'toilet tissue, toilet paper, bathroom tissue']
def __init__(self, root: str, split: str = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None):
assert split in ('train', 'val')
split_folder = Path(root) / split
super().__init__(split_folder, transform=transform, target_transform=target_transform)
self.classes = self.WNIDS
self.class_to_idx = {cls: idx for idx, cls in enumerate(self.classes)}
if __name__ == '__main__':
from torch.utils.data import DataLoader
imagenet = ImageNet('C:\\Users\\sithu\\Documents\\Datasets\\imagenet-mini', split='val')
dataloader = DataLoader(imagenet, batch_size=4)
print(len(imagenet))
print(len(dataloader))
| 1,377.285714
| 24,689
| 0.713645
| 4,009
| 38,564
| 6.858818
| 0.724869
| 0.001309
| 0.001964
| 0.000946
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.231531
| 0.103905
| 38,564
| 28
| 24,690
| 1,377.285714
| 0.564169
| 0
| 0
| 0
| 0
| 0.166667
| 0.771451
| 0.001919
| 0
| 0
| 0
| 0
| 0.055556
| 1
| 0.055556
| false
| 0.055556
| 0.222222
| 0
| 0.444444
| 0.166667
| 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
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
530e49518c31185f025e4383a16217feb99758dd
| 15,291
|
py
|
Python
|
dev/ceti_pru.py
|
mlares/hearsay
|
27e833f49eaea1c3d185c27036f149bc6f834edc
|
[
"MIT"
] | null | null | null |
dev/ceti_pru.py
|
mlares/hearsay
|
27e833f49eaea1c3d185c27036f149bc6f834edc
|
[
"MIT"
] | null | null | null |
dev/ceti_pru.py
|
mlares/hearsay
|
27e833f49eaea1c3d185c27036f149bc6f834edc
|
[
"MIT"
] | null | null | null |
# coding: utf-8
#
#def ceti_exp(
# GHZ_inner, GHZ_outer, tau_awakening, tau_survive, D_max, t_max
#):
##{{{
#
# import ceti_tools as ct
#
# random.seed(420)
# np.random.seed(420)
#
# # lista de CETIs alguna vez activas
# CETIs = dict()
#
# # lista de CETIs actualmente activas
# CHATs = []
# CHATs_idx = []
#
# # inicializacion del tiempo: scalar
# t_now = 0
# # inicializacion del ID: index
# ID = 0
#
# # lista de tiempos de eventos futuros: ordered list
# # [time, ID_emit, ID_receive, case]
# t_forthcoming = ct.OrderedList()
#
# # estructura de arbol para buscar vecinos
# try:
# del tree
# except NameError:
# pass
#
# # INITIALIZATION
# # Simulation starts when the first CETI appears:
# next_event = [0., 0, None, 1]
# t_forthcoming.add(next_event)
#
# # SIMULATION LOOP OVER TIME
# while (t_now < t_max):
#
# t_now, ID_emit, ID_hear, case = t_forthcoming.head.getData()
#
# if case == 1:
#
# # print('desaparece CETI con id:%d' % ID_emit)
# ID_new = ID_emit
# ID_next = ID_new + 1
# t_new_hola = t_now
#
# # sortear el lugar donde aparece dentro de la GHZ
# r = np.sqrt(random.random()*GHZ_outer**2 + GHZ_inner**2)
# o = random.random()*2.*np.pi
# x = r * np.cos(o) # X position on the galactic plane
# y = r * np.sin(o) # Y position on the galactic plane
#
# # sortear el tiempo de actividad
# t_new_active = np.random.exponential(tau_survive, 1)[0]
# t_new_chau = t_new_hola + t_new_active
#
# # agregar el tiempo de desaparición a la lista de tiempos
# next_event = [t_new_chau, ID_new, None, 2]
# t_forthcoming.add(next_event)
#
# # agregar la CETI a la lista histórica
# CETIs[ID_new] = list()
# CETIs[ID_new].append(
# (ID_new, ID_new, x, y, t_new_hola, t_new_chau))
#
# # sortear el tiempo de aparición de la próxima CETI
# t_next_awakening = np.random.exponential(tau_awakening, 1)[0]
# t_next_awakening = t_new_hola + t_next_awakening
# if t_next_awakening < t_max:
# next_event = [t_next_awakening, ID_next, None, 1]
# t_forthcoming.add(next_event)
#
# if len(CHATs_idx) > 0:
#
# # if there are other CETIs, compute contacts:
# # encontrar todas (los IDs de) las CETIs dentro del radio D_max
# query_point = [x, y]
# idx = tree.query_ball_point(query_point, r=D_max)
#
# # traverse all CETIs within reach
# for k in idx:
#
# ID_old = CHATs_idx[k]
#
# Dx = np.sqrt(
# ((np.array(query_point) -
# np.array(CETIs[ID_old][0][2:4]))**2).sum()
# )
#
# t_old_hola, t_old_chau = CETIs[ID_old][0][4:6]
#
# # check if contact is possible
# new_can_see_old = (
# (Dx < D_max) &
# (t_new_hola < t_old_chau + Dx) &
# (t_new_chau > t_old_hola + Dx))
#
# if new_can_see_old: # (·) new sees old
#
# # :start (type 3 event)
# t_new_see_old_start = max(t_old_hola + Dx, t_new_hola)
# next_event = [t_new_see_old_start, ID_new, ID_old, 3]
# t_forthcoming.add(next_event)
#
# # :end (type 4 event)
# t_new_see_old_end = min(t_old_chau + Dx, t_new_chau)
# next_event = [t_new_see_old_end, ID_new, ID_old, 4]
# t_forthcoming.add(next_event)
#
# contact = (ID_new, ID_old,
# CETIs[ID_old][0][2], CETIs[ID_old][0][3],
# t_new_see_old_start, t_new_see_old_end)
# CETIs[ID_new].append(contact)
#
# # check if contact is possible
# old_can_see_new = (
# (Dx < D_max) & (t_new_hola+Dx > t_old_hola) &
# (t_new_hola+Dx < t_old_chau))
#
# if old_can_see_new: # (·) old sees new
#
# # :start (type 3 event)
# t_old_see_new_start = t_new_hola + Dx
# next_event = [t_old_see_new_start, ID_old, ID_new, 3]
# t_forthcoming.add(next_event)
#
# # :end (type 4 event)
# t_old_see_new_end = min(t_new_chau+Dx, t_old_chau)
# next_event = [t_old_see_new_end, ID_old, ID_new, 4]
# t_forthcoming.add(next_event)
#
# contact = (ID_old, ID_new,
# CETIs[ID_new][0][2], CETIs[ID_new][0][3],
# t_old_see_new_start, t_old_see_new_end)
# CETIs[ID_old].append(contact)
#
# # agregar la CETI a la lista de posiciones de CETIs activas (CHATs)
# CHATs.append([x, y])
# CHATs_idx.append(ID_new)
#
# # rehacer el árbol
# tree = sp.cKDTree(data=CHATs)
#
# if case == 2:
# ID_bye = ID_emit
#
# # eliminar la CETI a la lista de CETIs activas
# # [ID, x, y, t_new_hola, t_new_chau]
# try:
# id_loc = CHATs_idx.index(ID_bye)
# del CHATs[id_loc]
# del CHATs_idx[id_loc]
#
# except TypeError:
# pass
#
# # rehacer el árbol
# if len(CHATs) > 0:
# tree = sp.cKDTree(data=CHATs)
#
# if case == 3: pass
# if case == 4: pass
#
# # eliminar el tiempo actual
# t_forthcoming.remove_first()
# # salir si no queda nada para hacer:
# if t_forthcoming.size() < 1:
# break
# t_forthcoming.show()
#
# return(CETIs)
##}}}
#
import ceti_exp
import numpy as np
import random
import pandas as pd
from scipy import spatial as sp
import time
import sys
import pickle
import ceti_tools as ct
# para recargar el modulo si se hacen modificaciones:
from importlib import reload
ct = reload(ct)
# para guardar la salida
from io import StringIO
# DEBUGING
# import pdb; pdb.set_trace()
# CASES:
# 1 - awakening
# 2 - doomsday
# 3 - contact
# 4 - blackout
random.seed(420)
np.random.seed(420)
message = "PRESS%ENTER%TO%CONTINUE"
message = "~~~~~~~~~~~~~~~~~~~~~~~"
message = "\n"+message*3+"\n"
message = ""
state = ['awakening','doomsday','contact ','blackout']
# FIXED AND SIMULATION VARIABLES
# {{{
# PARAMETERS :::
# radio interno de la zona galactica habitable, años luz
GHZ_inner = 1000.0
# radio interno de la zona galactica habitable, años luz
GHZ_outer = 5000.0
# tiempo medio, en años, que hay que esperar para que
# aparezca otra CETI en la galaxia
tau_awakening = 500.
# Tiempo medio, en años, durante el cual una CETI esta activa
tau_survive = 1000.
# Maxima distancia, en años luz, a la cual una CETI puede
# enviar o recibir mensajes
D_max = 3000.
# maximo tiempo para simular
t_max = 5000.
# flag to set interactive session
interactive = True
# }}}
# {{{
# VARIABLES :::
# lista de CETIs alguna vez activas: dictionary
CETIs = dict()
# lista de CETIs actualmente activas: ndarray
CHATs = []
CHATs_idx = []
# inicializacion del tiempo: scalar
t_now = 0
# inicializacion del ID: index
ID = 0
# lista de tiempos de eventos futuros: ordered list
# [time, ID_emit, ID_receive, case]
t_forthcoming = ct.OrderedList()
# estructura de arbol para buscar vecinos
try:
del tree
except NameError:
pass
# INITIALIZATION
# Simulation starts when the first CETI appears:
next_event = [0., 0, None, 1]
t_forthcoming.add(next_event)
if not interactive:
old_stdout = sys.stdout
result = StringIO()
sys.stdout = result
# SIMULATION LOOP OVER TIME
while (t_now < t_max):
t_now, ID_emit, ID_hear, case = t_forthcoming.head.getData()
if interactive: wait = input(message)
print('<<< t = %f >>> %10s of %3d' % (t_now, state[case-1], ID_emit))
#print('[ case:%d | id:%d ] <<< t = %f >>>' % (case, ID_emit, t_now))
#print(' active CETIs', CHATs_idx)
print(CHATs_idx)
#t_forthcoming.show()
# sys.stdout.write("\rTime: %f (max=%f)\n" % (t_now, t_max))
# sys.stdout.flush()
# print('tiempo: %9.3f | ID_emit: %5d|CASE %1d'%(t_now,ID_emit,case))
if case == 1:
# -------------------------------------
# NEW CETI
# -------------------------------------
# {{{
# print('desaparece CETI con id:%d' % ID_emit)
ID_new = ID_emit
ID_next = ID_new + 1
t_new_hola = t_now
# sortear el lugar donde aparece dentro de la GHZ
r = np.sqrt(random.random()*GHZ_outer**2 + GHZ_inner**2)
o = random.random()*2.*np.pi
x = r * np.cos(o) # X position on the galactic plane
y = r * np.sin(o) # Y position on the galactic plane
#print('posiciones para el ID %5d :::: %8.3f %8.3f' % (ID_new, x, y))
# sortear el tiempo de actividad
t_new_active = np.random.exponential(tau_survive, 1)[0]
t_new_chau = t_new_hola + t_new_active
#print('tiempos para el ID %2d :::: %8.3f %8.3f' % (ID_new, t_new_active, t_new_chau))
# agregar el tiempo de desaparición a la lista de tiempos
next_event = [t_new_chau, ID_new, None, 2]
t_forthcoming.add(next_event)
# agregar la CETI a la lista histórica
CETIs[ID_new] = list()
CETIs[ID_new].append(
(ID_new, ID_new, x, y, t_new_hola, t_new_chau))
# sortear el tiempo de aparición de la próxima CETI
t_next_awakening = np.random.exponential(tau_awakening, 1)[0]
t_next_awakening = t_new_hola + t_next_awakening
if t_next_awakening < t_max:
next_event = [t_next_awakening, ID_next, None, 1]
t_forthcoming.add(next_event)
if len(CHATs_idx) > 0:
#print('entering loop to compute contacts')
# if there are other CETIs, compute contacts:
# encontrar todas (los IDs de) las CETIs dentro del radio D_max
query_point = [x, y]
idx = tree.query_ball_point(query_point, r=D_max)
# traverse all CETIs within reach
for k in idx:
#print(k)
ID_old = CHATs_idx[k]
Dx = np.sqrt(
((np.array(query_point) -
np.array(CETIs[ID_old][0][2:4]))**2).sum()
)
t_old_hola, t_old_chau = CETIs[ID_old][0][4:6]
# check if contact is possible
new_can_see_old = (
(Dx < D_max) &
(t_new_hola < t_old_chau + Dx) &
(t_new_chau > t_old_hola + Dx))
if new_can_see_old: # (·) new sees old
# :start (type 3 event)
t_new_see_old_start = max(t_old_hola + Dx, t_new_hola)
next_event = [t_new_see_old_start, ID_new, ID_old, 3]
t_forthcoming.add(next_event)
# :end (type 4 event)
t_new_see_old_end = min(t_old_chau + Dx, t_new_chau)
next_event = [t_new_see_old_end, ID_new, ID_old, 4]
t_forthcoming.add(next_event)
contact = (ID_new, ID_old,
CETIs[ID_old][0][2], CETIs[ID_old][0][3],
t_new_see_old_start, t_new_see_old_end)
CETIs[ID_new].append(contact)
# check if contact is possible
old_can_see_new = (
(Dx < D_max) & (t_new_hola+Dx > t_old_hola) &
(t_new_hola+Dx < t_old_chau))
if old_can_see_new: # (·) old sees new
# :start (type 3 event)
t_old_see_new_start = t_new_hola + Dx
next_event = [t_old_see_new_start, ID_old, ID_new, 3]
t_forthcoming.add(next_event)
# :end (type 4 event)
t_old_see_new_end = min(t_new_chau+Dx, t_old_chau)
next_event = [t_old_see_new_end, ID_old, ID_new, 4]
t_forthcoming.add(next_event)
contact = (ID_old, ID_new,
CETIs[ID_new][0][2], CETIs[ID_new][0][3],
t_old_see_new_start, t_old_see_new_end)
CETIs[ID_old].append(contact)
# agregar la CETI a la lista de posiciones de CETIs activas (CHATs)
CHATs.append([x, y])
CHATs_idx.append(ID_new)
# rehacer el árbol
tree = sp.cKDTree(data=CHATs)
# }}}
if case == 2:
# -------------------------------------
# END CETI
# -------------------------------------
# {{{
# print('desaparece CETI con id:%d' % ID_emit)
ID_bye = ID_emit
# eliminar la CETI a la lista de CETIs activas
# [ID, x, y, t_new_hola, t_new_chau]
try:
id_loc = CHATs_idx.index(ID_bye)
del CHATs[id_loc]
del CHATs_idx[id_loc]
except TypeError:
pass
# rehacer el árbol
if len(CHATs) > 0:
tree = sp.cKDTree(data=CHATs)
# }}}
if case == 3:
# -------------------------------------
# NEW CONTACT
# -------------------------------------
# {{{
pass
# print('primer contacto entre %d y %d' % (ID_emit, ID_hear))
# }}}
if case == 4:
# -------------------------------------
# END CONTACT
# -------------------------------------
# {{{
pass
# print('ultimo contacto entre %d y %d' % (ID_emit, ID_hear))
# }}}
# eliminar el tiempo actual
t_forthcoming.remove_first()
# salir si no queda nada para hacer:
if t_forthcoming.size() < 1:
break
t_forthcoming.show()
print(CHATs_idx)
print('\n\n')
ct.ShowCETIs(CETIs)
if not interactive:
sys.stdout = old_stdout
result_string = result.getvalue()
i = input('experiment code: ').zfill(3)
fname = 'experiment_' + i + '.dat'
savef = open(fname,'w')
savef.write(result_string)
savef.close()
# El experimento consiste es correr interactivamente hasta que se
# corrobora que anda bien. Luego puse la funcion en un modulo, la
# llamo con la misma semilla y anda igual
#
#fCETIs = ceti_exp.ceti_exp(
# GHZ_inner, GHZ_outer, tau_awakening, tau_survive, D_max, t_max
#)
#ct.ShowCETIs(fCETIs)
| 30.520958
| 96
| 0.518083
| 1,982
| 15,291
| 3.748739
| 0.154894
| 0.027995
| 0.021534
| 0.035801
| 0.779946
| 0.774832
| 0.764334
| 0.746299
| 0.74603
| 0.738493
| 0
| 0.015526
| 0.359754
| 15,291
| 500
| 97
| 30.582
| 0.743003
| 0.602511
| 0
| 0.137681
| 0
| 0
| 0.025347
| 0.007986
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.028986
| 0.07971
| 0
| 0.07971
| 0.028986
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5338ec3a2c4201670910e9e85c4e4f363185939c
| 174
|
py
|
Python
|
activity/views_admin.py
|
ranadeepmitra21/WeVoteServer_Ranadeep
|
505945209aad5cef21e118b5bfa7f63d0bd462da
|
[
"MIT"
] | 44
|
2015-11-19T04:52:39.000Z
|
2021-03-17T02:08:26.000Z
|
activity/views_admin.py
|
ranadeepmitra21/WeVoteServer_Ranadeep
|
505945209aad5cef21e118b5bfa7f63d0bd462da
|
[
"MIT"
] | 748
|
2015-09-03T04:18:33.000Z
|
2022-03-10T14:08:10.000Z
|
activity/views_admin.py
|
ranadeepmitra21/WeVoteServer_Ranadeep
|
505945209aad5cef21e118b5bfa7f63d0bd462da
|
[
"MIT"
] | 145
|
2015-09-19T10:10:44.000Z
|
2022-03-04T21:01:12.000Z
|
# activity/views_admin.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
import wevote_functions.admin
logger = wevote_functions.admin.get_logger(__name__)
| 19.333333
| 52
| 0.741379
| 26
| 174
| 4.653846
| 0.807692
| 0.247934
| 0.330579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006667
| 0.137931
| 174
| 8
| 53
| 21.75
| 0.8
| 0.465517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 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
| 0
| 0
|
0
| 5
|
536ea67ff27d6632069b6eedda2c4ab9d88d60c0
| 21
|
py
|
Python
|
hello_world.py
|
Sparrow-veer/profiles-rest-api
|
7194c412f80ec7cbc88a37e10225320f25c13caf
|
[
"MIT"
] | null | null | null |
hello_world.py
|
Sparrow-veer/profiles-rest-api
|
7194c412f80ec7cbc88a37e10225320f25c13caf
|
[
"MIT"
] | null | null | null |
hello_world.py
|
Sparrow-veer/profiles-rest-api
|
7194c412f80ec7cbc88a37e10225320f25c13caf
|
[
"MIT"
] | null | null | null |
print("helo world")
| 10.5
| 20
| 0.666667
| 3
| 21
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 21
| 1
| 21
| 21
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
72827d082b7fa914cf3c20149bf2e9b61b34b3ec
| 159
|
py
|
Python
|
test.py
|
bfordham/sushibots
|
d9e629b83ae9d7b12e11f0cd51bd4884aca9320b
|
[
"MIT"
] | null | null | null |
test.py
|
bfordham/sushibots
|
d9e629b83ae9d7b12e11f0cd51bd4884aca9320b
|
[
"MIT"
] | null | null | null |
test.py
|
bfordham/sushibots
|
d9e629b83ae9d7b12e11f0cd51bd4884aca9320b
|
[
"MIT"
] | null | null | null |
import zenaton_client
from app.workflows.hourly_workflow import HourlyWorkflow
from app.tasks.send_tweet_task import SendTweetTask
HourlyWorkflow().dispatch()
| 31.8
| 56
| 0.874214
| 20
| 159
| 6.75
| 0.75
| 0.103704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069182
| 159
| 5
| 57
| 31.8
| 0.912162
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
728c85716b295e539131801056e9e599c168a935
| 89
|
py
|
Python
|
nmoscommon/__init__.py
|
pkeroulas/nmos-common
|
b650bad276819d794624f4ff6ea08fbdecd915d7
|
[
"Apache-2.0"
] | 7
|
2017-12-08T08:05:51.000Z
|
2020-10-21T07:32:42.000Z
|
nmoscommon/__init__.py
|
pkeroulas/nmos-common
|
b650bad276819d794624f4ff6ea08fbdecd915d7
|
[
"Apache-2.0"
] | 63
|
2017-12-13T08:46:58.000Z
|
2020-12-02T08:48:40.000Z
|
nmoscommon/__init__.py
|
pkeroulas/nmos-common
|
b650bad276819d794624f4ff6ea08fbdecd915d7
|
[
"Apache-2.0"
] | 7
|
2017-11-22T10:49:23.000Z
|
2022-03-15T22:00:17.000Z
|
from __future__ import absolute_import
from .nmoscommonconfig import config # noqa F401
| 29.666667
| 49
| 0.842697
| 11
| 89
| 6.363636
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038961
| 0.134831
| 89
| 2
| 50
| 44.5
| 0.87013
| 0.101124
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
72913e70b4cf9b4577ae5aac3fb6c179ac89ff85
| 43
|
py
|
Python
|
exp_nms.py
|
ooooverflow/DigestPath2019
|
db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8
|
[
"Apache-2.0"
] | 1
|
2021-04-22T02:38:38.000Z
|
2021-04-22T02:38:38.000Z
|
exp_nms.py
|
ooooverflow/DigestPath2019
|
db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8
|
[
"Apache-2.0"
] | 1
|
2020-02-18T12:09:10.000Z
|
2021-04-24T16:28:53.000Z
|
exp_nms.py
|
ooooverflow/DigestPath2019
|
db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8
|
[
"Apache-2.0"
] | null | null | null |
from nms_maskrcnn import _C
nms = _C.nms
| 14.333333
| 28
| 0.744186
| 8
| 43
| 3.625
| 0.625
| 0.275862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.209302
| 43
| 3
| 29
| 14.333333
| 0.852941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
72a27ff16b57bad4f9472eb182ecd486526c1596
| 88
|
py
|
Python
|
danny_project/stats.py
|
df3960/APW1
|
2a7c4da19c6077cddbe24d172df281b59c2a8fef
|
[
"CC0-1.0"
] | null | null | null |
danny_project/stats.py
|
df3960/APW1
|
2a7c4da19c6077cddbe24d172df281b59c2a8fef
|
[
"CC0-1.0"
] | null | null | null |
danny_project/stats.py
|
df3960/APW1
|
2a7c4da19c6077cddbe24d172df281b59c2a8fef
|
[
"CC0-1.0"
] | null | null | null |
import Pandas as pd
import numpy as np
import matplotlib.pyplot as plt
pd.read_csv("")
| 14.666667
| 31
| 0.772727
| 16
| 88
| 4.1875
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 88
| 5
| 32
| 17.6
| 0.905405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
72c65ef91a666da93e1cb8f3a9e0ff4e20072ccd
| 124
|
py
|
Python
|
noolite_api/__init__.py
|
andvikt/noolite_api
|
12bdcc98ec19bbfa5ea833305ff0e9764f48d416
|
[
"BSD-2-Clause"
] | null | null | null |
noolite_api/__init__.py
|
andvikt/noolite_api
|
12bdcc98ec19bbfa5ea833305ff0e9764f48d416
|
[
"BSD-2-Clause"
] | null | null | null |
noolite_api/__init__.py
|
andvikt/noolite_api
|
12bdcc98ec19bbfa5ea833305ff0e9764f48d416
|
[
"BSD-2-Clause"
] | null | null | null |
from .nl_serial import NooliteSerial, dispatch_command
from .nl_ethernet import NooliteEthernet
from . import typing, const
| 31
| 54
| 0.846774
| 16
| 124
| 6.375
| 0.6875
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112903
| 124
| 3
| 55
| 41.333333
| 0.927273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
72e74ed61aec87e94c6a3d4e79bf56efd18f269f
| 123
|
py
|
Python
|
pi/tcp/__init__.py
|
maxschwe/PiCar
|
81d83cd0f8a32d4c0faf8c36a13e09da732244d3
|
[
"MIT"
] | null | null | null |
pi/tcp/__init__.py
|
maxschwe/PiCar
|
81d83cd0f8a32d4c0faf8c36a13e09da732244d3
|
[
"MIT"
] | null | null | null |
pi/tcp/__init__.py
|
maxschwe/PiCar
|
81d83cd0f8a32d4c0faf8c36a13e09da732244d3
|
[
"MIT"
] | null | null | null |
from .actions import ACTIONS
from .blueprint import Blueprint
from .tcp_server import TcpServer
from .config import Config
| 24.6
| 33
| 0.837398
| 17
| 123
| 6
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130081
| 123
| 4
| 34
| 30.75
| 0.953271
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
72ea26ddb6a44967f061f5edd9d150037133e0cd
| 266
|
py
|
Python
|
criterions/__init__.py
|
zhaoguangxiang/OFA
|
cc1719df2713f0a046f34acb0afd8782e08ea6be
|
[
"Apache-2.0"
] | null | null | null |
criterions/__init__.py
|
zhaoguangxiang/OFA
|
cc1719df2713f0a046f34acb0afd8782e08ea6be
|
[
"Apache-2.0"
] | null | null | null |
criterions/__init__.py
|
zhaoguangxiang/OFA
|
cc1719df2713f0a046f34acb0afd8782e08ea6be
|
[
"Apache-2.0"
] | null | null | null |
from .scst_loss import ScstRewardCriterion
from .label_smoothed_cross_entropy import AdjustLabelSmoothedCrossEntropyCriterion
from .clip_scst_loss import ClipScstRewardCriterion
from .label_smoothed_encouraging_loss import AjustLabelSmoothedEncouragingLossCriterion
| 53.2
| 87
| 0.924812
| 25
| 266
| 9.48
| 0.56
| 0.126582
| 0.118143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06015
| 266
| 4
| 88
| 66.5
| 0.948
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f4313140e49891235e808ec6b24188a7e55b41c9
| 2,193
|
py
|
Python
|
cricket/models.py
|
joysdo/MyApps
|
0a5b032257f82360405346533893d57dcd616abc
|
[
"CC0-1.0"
] | null | null | null |
cricket/models.py
|
joysdo/MyApps
|
0a5b032257f82360405346533893d57dcd616abc
|
[
"CC0-1.0"
] | null | null | null |
cricket/models.py
|
joysdo/MyApps
|
0a5b032257f82360405346533893d57dcd616abc
|
[
"CC0-1.0"
] | null | null | null |
from django.db import models
# Create your models here.
from django.urls import reverse
#
# class cricket(models.Model):
# Name = models.CharField(max_length=50)
class Match_Regi(models.Model):
choices = (
('a', 'ODI'),
('b', 'Test'),
('c', 'T20'),
)
toss=(
('a', 'Team 1'),
('b', 'Team 2')
)
Match_Name = models.CharField(max_length=1, choices=choices, default='a')
First_Team_Name = models.CharField(max_length=50, unique=True)
Second_Team_Name = models.CharField(max_length=50, unique=True)
Bat_First = models.CharField(max_length=1, choices=toss, default='a')
Over = models.IntegerField(unique=True)
class Add_Team(models.Model):
Team1_Player1 = models.CharField(max_length=50)
Team1_Player2 = models.CharField(max_length=50)
Team1_Player3 = models.CharField(max_length=50)
Team1_Player4 = models.CharField(max_length=50)
Team1_Player5 = models.CharField(max_length=50)
Team1_Player6 = models.CharField(max_length=50)
Team1_Player7 = models.CharField(max_length=50)
Team1_Player8 = models.CharField(max_length=50)
Team1_Player9 = models.CharField(max_length=50)
Team1_Player10 = models.CharField(max_length=50)
Team1_Player11 = models.CharField(max_length=50)
Team2_Player1 = models.CharField(max_length=50)
Team2_Player2 = models.CharField(max_length=50)
Team2_Player3 = models.CharField(max_length=50)
Team2_Player4 = models.CharField(max_length=50)
Team2_Player5 = models.CharField(max_length=50)
Team2_Player6 = models.CharField(max_length=50)
Team2_Player7 = models.CharField(max_length=50)
Team2_Player8 = models.CharField(max_length=50)
Team2_Player9 = models.CharField(max_length=50)
Team2_Player10 = models.CharField(max_length=50)
Team2_Player11 = models.CharField(max_length=50)
def get_absolute_url(self):
return reverse('book-detail', args=[str(self.id)])
def get_absolute_url(self):
return reverse('cricket.views.match_name', args=[self.Match_Name])
def __str__(self):
return self.Match_Name
class Go_Live(models.Model):
name = models.CharField(max_length=10)
| 36.55
| 77
| 0.714546
| 295
| 2,193
| 5.074576
| 0.230508
| 0.280561
| 0.336673
| 0.448898
| 0.760855
| 0.758183
| 0.156313
| 0.058784
| 0.058784
| 0
| 0
| 0.057955
| 0.165983
| 2,193
| 59
| 78
| 37.169492
| 0.760525
| 0.043776
| 0
| 0.041667
| 0
| 0
| 0.030593
| 0.011472
| 0
| 0
| 0
| 0
| 0
| 1
| 0.0625
| false
| 0
| 0.041667
| 0.0625
| 0.854167
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
f4795e9a431e8f71a64631c12395d230f8d0cd86
| 8,161
|
py
|
Python
|
ENIAC/api/loop_stack/loop_indicators/cci_indicator.py
|
Ahrli/fast_tools
|
144d764e4f169d3ab3753dcc6a79db9f9449de59
|
[
"Apache-2.0"
] | 1
|
2021-12-11T16:33:47.000Z
|
2021-12-11T16:33:47.000Z
|
ENIAC/api/loop_stack/loop_indicators/cci_indicator.py
|
webclinic017/fast_tools
|
144d764e4f169d3ab3753dcc6a79db9f9449de59
|
[
"Apache-2.0"
] | null | null | null |
ENIAC/api/loop_stack/loop_indicators/cci_indicator.py
|
webclinic017/fast_tools
|
144d764e4f169d3ab3753dcc6a79db9f9449de59
|
[
"Apache-2.0"
] | 3
|
2021-11-22T09:46:43.000Z
|
2022-01-28T22:33:07.000Z
|
import backtrader.indicators as btind
from . import compare_price as compare
from .base_indicator import iBaseIndicator
class iCciCompare(iBaseIndicator):
'''
因子:相对强弱指数比较数值
传入参数:
# rule = {"args": ["5", "30", "50", "70", "100"], #rsi周期,"极弱区", "弱区", "强区", "极强区"
rule = {"args": ["5"], #rsi周期
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, # 周期结果比较
}
'''
lines = ('cc',)
params = dict(rule=list())
def __init__(self):
super(iCciCompare, self).__init__()
# self.rsi = btind.RSI(self.data.close, period=self.args[0], lowerband=self.args[1],
# safelow=self.args[2], upperband=self.args[3], safehigh=self.args[4])
self.cci = btind.CommodityChannelIndex( period=self.args[0])
def next(self):
self.lines.cc[0] = compare(self.cci[0], self.logic)
@classmethod
def judge(cls, cond):
return int(cond['args'][0])
class iCciCrossGolden(iBaseIndicator):
'''
因子:短期RSI线在低位向上突破长期RSI线时,一般为RSI指标的“黄金交叉”
传入参数:
rule = {"args": ["5", "10", "30"], #短均线周期, 长均线周期,低位点
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, # 死叉情况比较大小,长比短高多少
}
'''
lines = ('ccigoldencross',)
params = dict(rule=list())
def __init__(self):
super(iCciCrossGolden, self).__init__()
self.cci_short = btind.CommodityChannelIndex( period=self.args[0])
self.cci_long = btind.CommodityChannelIndex( period=self.args[1])
self.cross = btind.CrossOver(self.cci_short, self.cci_long)
def next(self):
if self.cross[0] == 1:
if self.logic["position"] == 1: # 出现在上部 > 0
self.lines.ccigoldencross[0] = compare(self.cci_short[0] - self.cci_long[0], self.logic) and \
self.cci_short[0] > 0
elif self.logic["position"] == -1: # 出现在下部 < 0
self.lines.ccigoldencross[0] = compare(self.cci_short[0] - self.cci_long[0], self.logic) and \
self.cci_short[0] < 0
else:
self.lines.ccigoldencross[0] = compare(self.cci_short[0] - self.cci_long[0], self.logic)
else:
self.lines.ccigoldencross[0] = False
@classmethod
def judge(cls, cond):
return int(cond['args'][1])
class iCciCrossDie(iBaseIndicator):
'''
因子:死叉:短期RSI线在高位向下突破长期RSI线, 一般为RSI指标的“死亡交叉”
传入参数:
rule = {"args": ["5", "10", "70"], #短均线周期, 长均线周期,高位点
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, # 死叉情况比较大小,长比短高多少
}
'''
lines = ('ccidiecross',)
params = dict(rule=list())
def __init__(self):
super(iCciCrossDie, self).__init__()
self.cci_short = btind.CommodityChannelIndex( period=self.args[0], )
self.cci_long = btind.CommodityChannelIndex( period=self.args[1])
self.cross = btind.CrossOver(self.cci_short, self.cci_long)
def next(self):
if self.cross[0] == -1:
if self.logic["position"] == 1: # 出现在上部 > 0
self.lines.ccidiecross[0] = compare(self.cci_long[0] - self.cci_short[0], self.logic) and \
self.cci_short[0] > 0
elif self.logic["position"] == -1: # 出现在下部 < 0
self.lines.ccidiecross[0] = compare(self.cci_long[0] - self.cci_short[0], self.logic) and \
self.cci_short[0] < 0
else:
self.lines.ccidiecross[0] = compare(self.cci_long[0] - self.cci_short[0], self.logic)
else:
self.lines.ccidiecross[0] = False
@classmethod
def judge(cls, cond):
return int(cond['args'][1])
class iCciLong(iBaseIndicator):
'''
因子:rsi多头,收盘价 > 短线rsi > 长线rsi
传入参数:
# rule = {"args": ["5", "10", "30", "50", "70", "100", "3"], #短均线周期, 长均线周期,"极弱区", "弱区", "强区", "极强区", "连续多少天多头"
rule = {"args": ["5", "10", "3"], #短均线周期, 长均线周期, "连续多少天多头"
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, #无用
}
'''
lines = ('ccilong',)
params = dict(rule=list())
def __init__(self):
super(iCciLong, self).__init__()
self.cci_short = btind.CommodityChannelIndex( period=self.args[0])
self.cci_long = btind.CommodityChannelIndex( period=self.args[1])
def next(self):
ccilong = set([self.data.close[i] > self.cci_short[i] > self.cci_long[i] for i in range(1 - self.args[2], 1)])
if len(ccilong) == 1 and True in ccilong:
if self.logic["position"] == 1: # 出现在上部 > 0
self.lines.ccilong[0] = True and self.cci_short[0] > 0
elif self.logic["position"] == -1: # 出现在下部 > 0
self.lines.ccilong[0] = True and self.cci_short[0] < 0
else:
self.lines.ccilong[0] = True
else:
self.lines.ccilong[0] = False
@classmethod
def judge(cls, cond):
return int(cond['args'][1]) + int(cond['args'][2])
class iCciShort(iBaseIndicator):
'''
因子:rsi多头,收盘价 > 短线rsi > 长线rsi
传入参数:
# rule = {"args": ["5", "10", "30", "50", "70", "100", "3"], #短均线周期, 长均线周期,"极弱区", "弱区", "强区", "极强区", "连续多少天多头"
rule = {"args": ["5", "10", "3"], #短均线周期, 长均线周期 "连续多少天空头"
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, #无用
}
'''
lines = ('ccishort',)
params = dict(rule=list())
def __init__(self):
super(iCciShort, self).__init__()
self.cci_short = btind.CommodityChannelIndex( period=self.args[0])
self.cci_long = btind.CommodityChannelIndex( period=self.args[1])
def next(self):
ccishort = set([self.data.close[i] < self.cci_short[i] < self.cci_long[i] for i in range(1 - self.args[2], 1)])
if len(ccishort) == 1 and True in ccishort:
if self.logic["position"] == 1: # 出现在上部 > 0
self.lines.ccishort[0] = True and self.cci_short[0] > 0
elif self.logic["position"] == -1: # 出现在下部 < 0
self.lines.ccishort[0] = True and self.cci_short[0] < 0
else:
self.lines.ccishort[0] = True
else:
self.lines.ccishort[0] = False
@classmethod
def judge(cls, cond):
return int(cond['args'][1]) + int(cond['args'][2])
class iCciTop(iBaseIndicator):
'''
因子:最近 n 天 最高点
传入参数:
rule = {"args": [30] ,
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, #无意义
'''
lines = ('ctop',)
params = dict(rule=list())
def __init__(self):
super(iCciTop, self).__init__()
self.cci = btind.CommodityChannelIndex( period=self.args[0])
def next(self):
_list = list(self.cci.get(size=self.args[1]))
if len(_list) == self.args[1] and self.cci[0] == max(_list):
if self.logic["position"] == 1: # 出现在上部 > 0
self.lines.ctop[0] = True and _list[-1] > 0
elif self.logic["position"] == -1: # 出现在下部 < 0
self.lines.ctop[0] = True and _list[-1] < 0
else:
self.lines.ctop[0] = True
else:
self.lines.ctop[0] = False
class iCciBottom(iBaseIndicator):
'''
因子:最近 n 天 最低点
传入参数:
rule = {"args": [5,30] ,
"logic":{"compare": "eq","byValue": 1,"byMax": 5,}, #无意义
'''
lines = ('cbottom',)
params = dict(rule=list())
def __init__(self):
super(iCciBottom, self).__init__()
self.cci = btind.CommodityChannelIndex( period=self.args[0])
def next(self):
_list = list(self.cci.get(size=self.args[1]))
if len(_list) == self.args[1] and self.cci[0] == min(_list):
if self.logic["position"] == 1: # 出现在上部 > 0
self.lines.cbottom[0] = True and _list[-1] > 0
elif self.logic["position"] == -1: # 出现在下部 < 0
self.lines.cbottom[0] = True and _list[-1] < 0
else:
self.lines.cbottom[0] = True
else:
self.lines.cbottom[0] = False
| 36.433036
| 119
| 0.532655
| 997
| 8,161
| 4.255767
| 0.125376
| 0.07259
| 0.06222
| 0.042894
| 0.815461
| 0.760311
| 0.750177
| 0.743578
| 0.687485
| 0.642941
| 0
| 0.035011
| 0.296532
| 8,161
| 223
| 120
| 36.596413
| 0.704059
| 0.210636
| 0
| 0.595588
| 0
| 0
| 0.028516
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.139706
| false
| 0
| 0.022059
| 0.036765
| 0.352941
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
be34ddfcf7d345e4e376ba5f7ac226cb5a3ad409
| 169
|
py
|
Python
|
dvcw/api.py
|
benouinirachid/dvcw
|
81b4384169bf47f69fa7787650398f441ffbddf1
|
[
"Apache-2.0"
] | null | null | null |
dvcw/api.py
|
benouinirachid/dvcw
|
81b4384169bf47f69fa7787650398f441ffbddf1
|
[
"Apache-2.0"
] | null | null | null |
dvcw/api.py
|
benouinirachid/dvcw
|
81b4384169bf47f69fa7787650398f441ffbddf1
|
[
"Apache-2.0"
] | null | null | null |
import dvc.api
def get_url(path: str, repo: str = None, rev: str = None, remote: str = None):
return dvc.api.get_url(path=path, repo=repo, rev=rev, remote=remote)
| 28.166667
| 78
| 0.686391
| 30
| 169
| 3.8
| 0.433333
| 0.184211
| 0.175439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16568
| 169
| 5
| 79
| 33.8
| 0.808511
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
be480b503acc233d0ea9a8a0175453f9d8fadcd9
| 44
|
py
|
Python
|
external/netdef_models/netdef_slim/core/phase.py
|
zhuhu00/MOTSFusion_modify
|
190224a7c3fbded69fedf9645a0ebbf08227fb6d
|
[
"MIT"
] | null | null | null |
external/netdef_models/netdef_slim/core/phase.py
|
zhuhu00/MOTSFusion_modify
|
190224a7c3fbded69fedf9645a0ebbf08227fb6d
|
[
"MIT"
] | null | null | null |
external/netdef_models/netdef_slim/core/phase.py
|
zhuhu00/MOTSFusion_modify
|
190224a7c3fbded69fedf9645a0ebbf08227fb6d
|
[
"MIT"
] | null | null | null |
import netdef_slim as nd
nd.phase = 'train'
| 14.666667
| 24
| 0.75
| 8
| 44
| 4
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 44
| 3
| 25
| 14.666667
| 0.864865
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
22b7bdf94212371e1627299852ca2e9b3127b430
| 2,003
|
py
|
Python
|
tests/test_run_app.py
|
bcb/aiohttp
|
77638364958c74fff7719fdc028a79aa2281c3ad
|
[
"Apache-2.0"
] | null | null | null |
tests/test_run_app.py
|
bcb/aiohttp
|
77638364958c74fff7719fdc028a79aa2281c3ad
|
[
"Apache-2.0"
] | 2
|
2018-06-12T15:22:48.000Z
|
2018-06-12T15:31:13.000Z
|
tests/test_run_app.py
|
datarobot/aiohttp
|
19d95a5ad84cf1453b8091b9bd8640317831e15f
|
[
"Apache-2.0"
] | 1
|
2019-08-31T04:45:14.000Z
|
2019-08-31T04:45:14.000Z
|
import ssl
from unittest import mock
from aiohttp import web
def test_run_app_http(loop, mocker):
mocker.spy(loop, 'create_server')
loop.call_later(0.05, loop.stop)
app = web.Application(loop=loop)
mocker.spy(app, 'startup')
web.run_app(app, print=lambda *args: None)
assert loop.is_closed()
loop.create_server.assert_called_with(mock.ANY, '0.0.0.0', 8080,
ssl=None, backlog=128)
app.startup.assert_called_once_with()
def test_run_app_https(loop, mocker):
mocker.spy(loop, 'create_server')
loop.call_later(0.05, loop.stop)
app = web.Application(loop=loop)
mocker.spy(app, 'startup')
ssl_context = ssl.create_default_context()
web.run_app(app, ssl_context=ssl_context, print=lambda *args: None)
assert loop.is_closed()
loop.create_server.assert_called_with(mock.ANY, '0.0.0.0', 8443,
ssl=ssl_context, backlog=128)
app.startup.assert_called_once_with()
def test_run_app_nondefault_host_port(loop, unused_port, mocker):
port = unused_port()
host = 'localhost'
mocker.spy(loop, 'create_server')
loop.call_later(0.05, loop.stop)
app = web.Application(loop=loop)
mocker.spy(app, 'startup')
web.run_app(app, host=host, port=port, print=lambda *args: None)
assert loop.is_closed()
loop.create_server.assert_called_with(mock.ANY, host, port,
ssl=None, backlog=128)
app.startup.assert_called_once_with()
def test_run_app_custom_backlog(loop, mocker):
mocker.spy(loop, 'create_server')
loop.call_later(0.05, loop.stop)
app = web.Application(loop=loop)
mocker.spy(app, 'startup')
web.run_app(app, backlog=10, print=lambda *args: None)
assert loop.is_closed()
loop.create_server.assert_called_with(mock.ANY, '0.0.0.0', 8080,
ssl=None, backlog=10)
app.startup.assert_called_once_with()
| 28.614286
| 71
| 0.654019
| 286
| 2,003
| 4.36014
| 0.171329
| 0.014435
| 0.102646
| 0.0417
| 0.785084
| 0.785084
| 0.761026
| 0.761026
| 0.761026
| 0.761026
| 0
| 0.031572
| 0.225162
| 2,003
| 69
| 72
| 29.028986
| 0.771907
| 0
| 0
| 0.608696
| 0
| 0
| 0.054918
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 1
| 0.086957
| false
| 0
| 0.065217
| 0
| 0.152174
| 0.086957
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
22c4d38f65dc6725705c4954b165358f429e85d5
| 68
|
py
|
Python
|
old-visualizer-py/lib/__init__.py
|
tintinp/swarm
|
a7e185fb1a49361def23b042d0e3aea2fab87b5d
|
[
"MIT"
] | 1
|
2020-07-22T19:11:26.000Z
|
2020-07-22T19:11:26.000Z
|
old-visualizer-py/lib/__init__.py
|
tintinp/swarm
|
a7e185fb1a49361def23b042d0e3aea2fab87b5d
|
[
"MIT"
] | 1
|
2021-05-11T04:29:11.000Z
|
2021-05-11T04:29:11.000Z
|
old-visualizer-py/lib/__init__.py
|
tintinp/swarm
|
a7e185fb1a49361def23b042d0e3aea2fab87b5d
|
[
"MIT"
] | null | null | null |
from .FlightVisualizer import FlightVisualizer
from .UAV import UAV
| 22.666667
| 46
| 0.852941
| 8
| 68
| 7.25
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 68
| 2
| 47
| 34
| 0.966667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
22fa0e703eb152ec3458a84d2f53e394417c871b
| 81
|
py
|
Python
|
tbcscrapper/__init__.py
|
Denniskamau/TextbookcentreWebScrapper
|
c6b0a6225fb130ce335372d14624127dde2cb213
|
[
"MIT"
] | 3
|
2020-04-11T15:53:10.000Z
|
2020-04-14T09:31:11.000Z
|
tbcscrapper/__init__.py
|
Denniskamau/TextbookcentreWebScrapper
|
c6b0a6225fb130ce335372d14624127dde2cb213
|
[
"MIT"
] | null | null | null |
tbcscrapper/__init__.py
|
Denniskamau/TextbookcentreWebScrapper
|
c6b0a6225fb130ce335372d14624127dde2cb213
|
[
"MIT"
] | null | null | null |
from . import bookscrapper
from . import textbookcentreGUI
__version__ = "0.1.2"
| 20.25
| 31
| 0.777778
| 10
| 81
| 5.9
| 0.8
| 0.338983
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042857
| 0.135802
| 81
| 4
| 32
| 20.25
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.060976
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fe106ea5f32a278b54b0e16af84e31df4505c789
| 55
|
py
|
Python
|
src/test_placeholder.py
|
EOEPCA/um-login-gluu-oxauth
|
4f3d72335808dd9f8979d89c7f63aed0b5814ca0
|
[
"Apache-2.0"
] | null | null | null |
src/test_placeholder.py
|
EOEPCA/um-login-gluu-oxauth
|
4f3d72335808dd9f8979d89c7f63aed0b5814ca0
|
[
"Apache-2.0"
] | null | null | null |
src/test_placeholder.py
|
EOEPCA/um-login-gluu-oxauth
|
4f3d72335808dd9f8979d89c7f63aed0b5814ca0
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
def test_placeholder():
pass
| 18.333333
| 23
| 0.709091
| 8
| 55
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.145455
| 55
| 3
| 24
| 18.333333
| 0.787234
| 0.381818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
a3adad76dd741ed554e53b658280adec4cddcfcc
| 42
|
py
|
Python
|
departure/board/commons.py
|
Woll78/departure-python
|
86eccd40291ad560d5859a120dd6c99aa5c4bd12
|
[
"MIT"
] | 4
|
2020-10-18T18:12:04.000Z
|
2022-03-31T19:13:08.000Z
|
departure/board/commons.py
|
Woll78/departure-python
|
86eccd40291ad560d5859a120dd6c99aa5c4bd12
|
[
"MIT"
] | null | null | null |
departure/board/commons.py
|
Woll78/departure-python
|
86eccd40291ad560d5859a120dd6c99aa5c4bd12
|
[
"MIT"
] | 1
|
2021-11-19T10:37:26.000Z
|
2021-11-19T10:37:26.000Z
|
class BoardException(Exception):
pass
| 14
| 32
| 0.761905
| 4
| 42
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 42
| 2
| 33
| 21
| 0.914286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
4322d134c33ef9200a8f12f2573a9e232eac3eb5
| 470
|
py
|
Python
|
tests/plots/test_image.py
|
santanaangel/shap
|
1c1c4a45440f3475b8544251f9d9e5b43977cd0e
|
[
"MIT"
] | 13
|
2019-07-04T11:40:24.000Z
|
2021-09-10T09:54:36.000Z
|
tests/plots/test_image.py
|
santanaangel/shap
|
1c1c4a45440f3475b8544251f9d9e5b43977cd0e
|
[
"MIT"
] | 3
|
2022-02-13T19:32:27.000Z
|
2022-02-27T09:45:10.000Z
|
tests/plots/test_image.py
|
santanaangel/shap
|
1c1c4a45440f3475b8544251f9d9e5b43977cd0e
|
[
"MIT"
] | 10
|
2019-09-09T13:56:49.000Z
|
2021-10-01T20:08:35.000Z
|
import matplotlib
import numpy as np
matplotlib.use('Agg')
import shap
def test_random_single_image():
""" Just make sure the image_plot function doesn't crash.
"""
shap.image_plot(np.random.randn(3, 20,20), np.random.randn(3, 20,20), show=False)
def test_random_multi_image():
""" Just make sure the image_plot function doesn't crash.
"""
shap.image_plot([np.random.randn(3, 20,20) for i in range(3)], np.random.randn(3, 20,20), show=False)
| 27.647059
| 105
| 0.697872
| 80
| 470
| 3.975
| 0.4
| 0.113208
| 0.163522
| 0.176101
| 0.666667
| 0.666667
| 0.666667
| 0.666667
| 0.496855
| 0.496855
| 0
| 0.053165
| 0.159574
| 470
| 16
| 106
| 29.375
| 0.751899
| 0.238298
| 0
| 0
| 0
| 0
| 0.008824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.375
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
433e46143aada8d391d64216ed69faacd87ae5a0
| 12,317
|
py
|
Python
|
Tests/ManualSearch/searching.py
|
yupasik/AT
|
8f4f6535cef8b7714cb325a32dadf36f6f8664ee
|
[
"Apache-2.0"
] | null | null | null |
Tests/ManualSearch/searching.py
|
yupasik/AT
|
8f4f6535cef8b7714cb325a32dadf36f6f8664ee
|
[
"Apache-2.0"
] | null | null | null |
Tests/ManualSearch/searching.py
|
yupasik/AT
|
8f4f6535cef8b7714cb325a32dadf36f6f8664ee
|
[
"Apache-2.0"
] | null | null | null |
# Test name = ManualSearch
# Script dir = R:\Stingray\Tests\ManualSearch\searching\searching.py
from time import sleep
from device import handler, updateTestResult
import RC
import UART
import DO
import GRAB
import MOD
import os
from DO import status
def runTest():
status("active")
TestName = "ManualSearch"
ScriptName = "searching"
ScriptIndex = "2"
Grabber = DO.grab_define()
platform = DO.load_platform()
Modulation = "DVBS"
FEC = "3/4"
SR = "27500000"
Stream = "\\X_0000_00000_MUX_32000_EPG_Software_20130328a.ts"
Stream_2 = "\\S_036E_12226_ASI_27500_3k_TTX_20110707a.ts"
Frequency = 1476
Modulator = "1"
COM = "COM7"
settings = [ScriptName, ScriptIndex, Grabber, Modulation, FEC, SR, Stream, Frequency, Modulator, COM]
DO.save_settings(settings)
GRAB.start_capture()
MOD.stop(Modulator)
############################ TestCase 1 ##########################################
testcase = 1
status("active")
MOD.play_stream(Modulation, FEC, SR, Stream_2, Frequency, Modulator)
UART.default_settings()
RC.push(["exit 2 2400"])
UART.activate_app("dvbsmanualscanner")
UART.start_app("dvbsmanualscanner")
RC.push(["1", "2", "2", "2", "6", "ok 1 1000"])
GRAB.compare(testcase)
############################ TestCase 2 ##########################################
testcase = 2
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 1500", "menu 1 3000"])
GRAB.compare(testcase)
############################ TestCase 3 ##########################################
testcase = 3
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 2500", "exit 1 3000"])
GRAB.compare(testcase)
############################ TestCase 4 ##########################################
testcase = 4
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 2500", "last 1 3000"])
GRAB.compare(testcase)
############################ TestCase 5 ##########################################
testcase = 5
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 1500", "standby 1 5000", "standby 1 15000"])
GRAB.compare(testcase)
############################ TestCase 6 ##########################################
testcase = 6
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 1500", "ok 1 3000"])
GRAB.compare(testcase)
############################ TestCase 7 ##########################################
testcase = 7
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 2500", "VolUp 1 2400"])
GRAB.compare(testcase)
############################ TestCase 8 ##########################################
testcase = 8
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 2500", "VolDown 1 2400"])
GRAB.compare(testcase)
############################ TestCase 9 ##########################################
testcase = 9
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 2500", "mute 1 3000"])
GRAB.compare(testcase)
############################ TestCase 10 ##########################################
testcase = 10
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000"])
GRAB.compare(testcase)
############################ TestCase 11 ##########################################
testcase = 11
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 2500", "ok 1 3000"])
GRAB.compare(testcase)
############################ TestCase 12 ##########################################
testcase = 12
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 1500", "exit 1 3000"])
GRAB.compare(testcase)
############################ TestCase 13 ##########################################
testcase = 13
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6", "ok 1 7500", "menu 1 3000"])
GRAB.compare(testcase)
############################ TestCase 14 ##########################################
testcase = 14
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 70000"])
GRAB.compare(testcase)
############################ TestCase 15 ##########################################
testcase = 15
status("active")
RC.push(["left 1 2400"])
GRAB.compare(testcase)
############################ TestCase 16 ##########################################
testcase = 16
status("active")
RC.push(["right 1 2400"])
GRAB.compare(testcase)
############################ TestCase 17 ##########################################
testcase = 17
status("active")
MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator)
UART.default_settings()
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "right", "ok 1 5000", "exit 3 5000"])
GRAB.compare(testcase)
############################ TestCase 18 ##########################################
testcase = 18
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "ok 1 5000", "exit 3 5000"])
GRAB.compare(testcase)
############################ TestCase 19 ##########################################
testcase = 19
status("active")
UART.default_settings()
RC.push(["exit 2 2400"])
UART.activate_app("dvbsmanualscanner")
UART.start_app("dvbsmanualscanner")
RC.push(["1", "2", "2", "2", "6 1 2000", "ok 1 20000", "exit 3 5000"])
GRAB.compare(testcase)
############################ TestCase 20 ##########################################
testcase = 20
status("active")
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "standby 1 5000", "standby 1 15000"])
GRAB.compare(testcase)
############################ TestCase 21 ##########################################
testcase = 21
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "mute 1 2400"])
GRAB.compare(testcase)
############################ TestCase 22 ##########################################
testcase = 22
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "VolUp 1 2400"])
GRAB.compare(testcase)
############################ TestCase 23 ##########################################
testcase = 23
status("active")
RC.push(["VolDown 1 2400"])
GRAB.compare(testcase)
############################ TestCase 24 ##########################################
testcase = 24
status("active")
MOD.stop(Modulator)
UART.default_settings()
RC.push(["exit 2 2400"])
UART.activate_app("dvbsmanualscanner")
UART.start_app("dvbsmanualscanner")
RC.push(["1", "2", "2", "2", "6", "ok 1 70000"])
GRAB.compare(testcase)
############################ TestCase 25 ##########################################
testcase = 25
status("active")
RC.push(["left 1 2400"])
GRAB.compare(testcase)
############################ TestCase 26 ##########################################
testcase = 26
status("active")
RC.push(["right 1 2400"])
GRAB.compare(testcase)
############################ TestCase 27 ##########################################
testcase = 27
status("active")
RC.push(["left 1 2400", "ok 1 30000"])
GRAB.compare(testcase)
############################ TestCase 28 ##########################################
testcase = 28
status("active")
RC.push(["ok 1 3000"])
GRAB.compare(testcase)
############################ TestCase 29 ##########################################
testcase = 29
status("active")
RC.push(["ok 1 30400", "right 1 2000", "ok 1 5000"])
GRAB.compare(testcase)
############################ TestCase 30 ##########################################
testcase = 30
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "exit 1 2400"])
GRAB.compare(testcase)
############################ TestCase 31 ##########################################
testcase = 31
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "standby 1 5000", "standby 1 15000"])
GRAB.compare(testcase)
############################ TestCase 32 ##########################################
testcase = 32
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "mute 1 2400"])
GRAB.compare(testcase)
############################ TestCase 33 ##########################################
testcase = 33
status("active")
RC.push(["VolUp 1 2400"])
GRAB.compare(testcase)
############################ TestCase 34 ##########################################
testcase = 34
status("active")
RC.push(["VolDown 1 2400"])
GRAB.compare(testcase)
############################ TestCase 35 ##########################################
testcase = 35
status("active")
MOD.pause(Modulator)
UART.default_settings()
RC.push(["exit 2 2400"])
UART.activate_app("dvbsmanualscanner")
UART.start_app("dvbsmanualscanner")
RC.push(["3 1 2000", "4 1 2000", "0 1 2000", "0 1 2000", "down 5 2400", "ok 1 5000"])
GRAB.compare(testcase)
############################ TestCase 36 ##########################################
testcase = 36
status("active")
RC.push(["ok 1 2400"])
GRAB.compare(testcase)
############################ TestCase 37 ##########################################
testcase = 37
status("active")
RC.push(["ok 1 5000", "left", "ok 1 3000"])
GRAB.compare(testcase)
############################ TestCase 38 ##########################################
testcase = 38
status("active")
RC.push(["right", "ok 1 3000"])
GRAB.compare(testcase)
############################ TestCase 39 ##########################################
testcase = 39
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 6 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000"])
GRAB.compare(testcase)
############################ TestCase 40 ##########################################
testcase = 40
status("active")
RC.push(["right", "ok 1 5000", "exit 3 5000"])
GRAB.compare(testcase)
############################ TestCase 41 ##########################################
testcase = 41
status("active")
RC.push(["exit 2 2400"])
UART.start_app("dvbsmanualscanner")
RC.push(["left 5 2400", "1", "2", "2", "2", "6 1 2000", "ok 1 20000", "ok 1 5000", "exit 3 5000"])
GRAB.compare(testcase)
###################################################################################
status("active")
MOD.stop(Modulator)
GRAB.stop_capture()
| 39.732258
| 111
| 0.457254
| 1,327
| 12,317
| 4.200452
| 0.107762
| 0.072121
| 0.139756
| 0.193757
| 0.778436
| 0.766954
| 0.722641
| 0.597775
| 0.597775
| 0.58127
| 0
| 0.103579
| 0.167573
| 12,317
| 309
| 112
| 39.860841
| 0.439969
| 0.04985
| 0
| 0.624521
| 0
| 0
| 0.287707
| 0.010749
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.034483
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4a4c81d0c033b181474d8661d94597498dc13a30
| 167,419
|
py
|
Python
|
Simple Problem Demo/lib.py
|
regevjohn/continuous-service
|
470015e4c33db2c28a217f2eadfe0d66e3c99600
|
[
"Apache-2.0"
] | null | null | null |
Simple Problem Demo/lib.py
|
regevjohn/continuous-service
|
470015e4c33db2c28a217f2eadfe0d66e3c99600
|
[
"Apache-2.0"
] | null | null | null |
Simple Problem Demo/lib.py
|
regevjohn/continuous-service
|
470015e4c33db2c28a217f2eadfe0d66e3c99600
|
[
"Apache-2.0"
] | null | null | null |
import web3
import time
import eth_account.messages
import web3.contract
import random
import json
from SimpleValidator import *
from eth_keys import keys
w3 = web3.Web3(web3.HTTPProvider("http://127.0.0.1:7545"))
BLOCKLEN = 1024
APPEAL_PERIOD = 10 # the appeal period in blocks.
SUBSCRIPTION_COST = 10 ** 18
SUBSCRIPTION_PERIOD = 100
MAX_QUERIES = 1
SUBSCRIPTION_ABI = '''[
{
"inputs": [
{
"internalType": "address payable",
"name": "_costumer",
"type": "address"
},
{
"internalType": "uint256",
"name": "_appeal_period_len",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_cost",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_blocks_per_service",
"type": "uint256"
},
{
"internalType": "address",
"name": "_validator",
"type": "address"
},
{
"internalType": "uint256",
"name": "_max_queries",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"constant": false,
"inputs": [],
"name": "activate",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32[]",
"name": "question",
"type": "bytes32[]"
},
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "appeal",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "appeal_period_len",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "blocks_per_service",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "can_exec_demand",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "cost",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "customer",
"outputs": [
{
"internalType": "address payable",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32[]",
"name": "question",
"type": "bytes32[]"
},
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
},
{
"internalType": "bytes32[]",
"name": "answer",
"type": "bytes32[]"
}
],
"name": "demand_signature",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "dismiss",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "exec_demand",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_answer_demanded",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_answer_resolved",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_end_of_service_block",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_other_owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_question_appealed",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_question_demanded",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_question_hashes_demanded",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_r_appealed",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_r_provided",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_s_appealed",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_s_provided",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_start_of_service_block",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_unanswered_demanded",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_v_appealed",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_v_provided",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "get_validator_address",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes32[]",
"name": "question",
"type": "bytes32[]"
}
],
"name": "hash_question",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "is_active",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "is_customer_appealing",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "is_provider_demanding",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "max_queries",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "overflow",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "provide_signature",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "provider",
"outputs": [
{
"internalType": "address payable",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32[]",
"name": "answer",
"type": "bytes32[]"
}
],
"name": "resolve",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes32[]",
"name": "question",
"type": "bytes32[]"
},
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "try_appeal",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "validator",
"outputs": [
{
"internalType": "contract Validator",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes32[]",
"name": "questions_hashes",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "unanswered",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
},
{
"internalType": "address",
"name": "signerPubKey",
"type": "address"
}
],
"name": "verifySig",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address payable",
"name": "dest_address",
"type": "address"
}
],
"name": "withdraw_funds",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "withdraw_funds_amount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
]'''
SUBSCRIPTION_SOL = {
"linkReferences": {},
"object": "60806040523480156200001157600080fd5b5060405162004be738038062004be78339818101604052620000379190810190620001b1565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600381905550836004819055508260058190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806006819055506000600c819055506000600a819055506000601581905550600060078190555060006008819055506000600b819055506000600d60006101000a81548160ff021916908315150217905550505050505050620002e7565b6000815190506200017d8162000299565b92915050565b6000815190506200019481620002b3565b92915050565b600081519050620001ab81620002cd565b92915050565b60008060008060008060c08789031215620001cb57600080fd5b6000620001db89828a0162000183565b9650506020620001ee89828a016200019a565b95505060406200020189828a016200019a565b94505060606200021489828a016200019a565b93505060806200022789828a016200016c565b92505060a06200023a89828a016200019a565b9150509295509295509295565b600062000254826200026f565b9050919050565b600062000268826200026f565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620002a48162000247565b8114620002b057600080fd5b50565b620002be816200025b565b8114620002ca57600080fd5b50565b620002d8816200028f565b8114620002e457600080fd5b50565b6148f080620002f76000396000f3fe60806040526004361061023b5760003560e01c80636d3f89981161012e57806393c3da8c116100ab578063d914e4e01161006f578063d914e4e0146108c9578063e5f03799146108f4578063eecb5ded14610931578063f13bd54c1461095c578063fbac9443146109875761023b565b806393c3da8c146107f4578063b0433e941461081f578063b107d50c1461084a578063bfae1d0f14610875578063d14867fe1461089e5761023b565b806376c3d965116100f257806376c3d9651461071f5780638463eedd146107485780638ab6fad1146107735780638f0c1a141461079e5780638f145525146107c95761023b565b80636d3f89981461065e5780636ddf2254146106895780637317d73f146106b257806373398395146106dd57806375b6a366146106f45761023b565b80631c08fbc6116101bc5780633a5381b5116101805780633a5381b51461058b5780634e621157146105b6578063630c24a1146105df5780636b34c8c21461060a5780636b5e332a146106335761023b565b80631c08fbc6146104a25780631cc368f8146104df5780631e550b131461050a57806324ed685d146105355780632804b2c0146105605761023b565b8063121273b911610203578063121273b9146103bb57806313faede6146103e457806314e1306c1461040f5780631595be3a1461043a5780631a8012e4146104775761023b565b8063057489fa14610307578063085d4883146103305780630bc2fde31461035b5780630f15f4c0146103865780631177f72d14610390575b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102a65734600860008282540192505081905550610305565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561030057600080fd5b600080fd5b005b34801561031357600080fd5b5061032e600480360361032991908101906133f2565b6109b2565b005b34801561033c57600080fd5b50610345610c7c565b6040516103529190614237565b60405180910390f35b34801561036757600080fd5b50610370610ca1565b60405161037d9190614303565b60405180910390f35b61038e610cab565b005b34801561039c57600080fd5b506103a5610e04565b6040516103b29190614303565b60405180910390f35b3480156103c757600080fd5b506103e260048036036103dd9190810190613437565b610e0e565b005b3480156103f057600080fd5b506103f961119d565b60405161040691906145de565b60405180910390f35b34801561041b57600080fd5b506104246111a3565b604051610431919061428d565b60405180910390f35b34801561044657600080fd5b50610461600480360361045c919081019061367f565b6111fb565b60405161046e9190614303565b60405180910390f35b34801561048357600080fd5b5061048c611230565b60405161049991906142e8565b60405180910390f35b3480156104ae57600080fd5b506104c960048036036104c49190810190613779565b61123c565b6040516104d691906142e8565b60405180910390f35b3480156104eb57600080fd5b506104f4611322565b604051610501919061421c565b60405180910390f35b34801561051657600080fd5b5061051f611510565b60405161052c91906142e8565b60405180910390f35b34801561054157600080fd5b5061054a611527565b60405161055791906145de565b60405180910390f35b34801561056c57600080fd5b5061057561152d565b6040516105829190614237565b60405180910390f35b34801561059757600080fd5b506105a0611553565b6040516105ad9190614363565b60405180910390f35b3480156105c257600080fd5b506105dd60048036036105d891908101906135ed565b611579565b005b3480156105eb57600080fd5b506105f46119a4565b60405161060191906145de565b60405180910390f35b34801561061657600080fd5b50610631600480360361062c91908101906135ed565b6119aa565b005b34801561063f57600080fd5b50610648611e08565b60405161065591906145de565b60405180910390f35b34801561066a57600080fd5b50610673611e12565b604051610680919061428d565b60405180910390f35b34801561069557600080fd5b506106b060048036036106ab91908101906133c9565b611e6a565b005b3480156106be57600080fd5b506106c7612121565b6040516106d49190614303565b60405180910390f35b3480156106e957600080fd5b506106f261212b565b005b34801561070057600080fd5b506107096122d4565b60405161071691906142e8565b60405180910390f35b34801561072b57600080fd5b50610746600480360361074191908101906134fa565b6122f9565b005b34801561075457600080fd5b5061075d612710565b60405161076a91906145f9565b60405180910390f35b34801561077f57600080fd5b50610788612727565b604051610795919061428d565b60405180910390f35b3480156107aa57600080fd5b506107b361277f565b6040516107c091906145de565b60405180910390f35b3480156107d557600080fd5b506107de612789565b6040516107eb91906145f9565b60405180910390f35b34801561080057600080fd5b506108096127a0565b604051610816919061421c565b60405180910390f35b34801561082b57600080fd5b506108346127ca565b6040516108419190614303565b60405180910390f35b34801561085657600080fd5b5061085f6127d4565b60405161086c91906145de565b60405180910390f35b34801561088157600080fd5b5061089c600480360361089791908101906135ed565b6127de565b005b3480156108aa57600080fd5b506108b3612a70565b6040516108c0919061428d565b60405180910390f35b3480156108d557600080fd5b506108de612ac8565b6040516108eb91906145de565b60405180910390f35b34801561090057600080fd5b5061091b600480360361091691908101906136c0565b612cdd565b60405161092891906142e8565b60405180910390f35b34801561093d57600080fd5b50610946613047565b604051610953919061428d565b60405180910390f35b34801561096857600080fd5b5061097161309f565b60405161097e91906145de565b60405180910390f35b34801561099357600080fd5b5061099c6130a5565b6040516109a991906142e8565b60405180910390f35b600d60009054906101000a900460ff16610a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f89061449e565b60405180910390fd5b610a09611230565b610a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3f9061457e565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610af05750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b26906144fe565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166351428bc0600e84846040518463ffffffff1660e01b8152600401610b8f939291906142af565b60206040518083038186803b158015610ba757600080fd5b505afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610bdf919081019061381a565b610c1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c159061443e565b60405180910390fd5b600a54600c819055506004546007600082825401925050819055506004546008600082825403925050819055506000600d60006101000a81548160ff021916908315150217905550818160119190610c779291906131eb565b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601454905090565b610cb3611230565b15610cf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cea906144de565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7a9061451e565b60405180910390fd5b3460086000828254019250508190555060045460085410610e02576004546008600082825403925050819055506004546007600082825401925050819055506005544301600c8190555043600981905550600c54600a81905550600c546015819055506000600d60006101000a81548160ff0219169083151502179055505b565b6000601c54905090565b600d60009054906101000a900460ff1615610e5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e55906144be565b60405180910390fd5b610e66611230565b610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c9061457e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2c9061451e565b60405180910390fd5b610fc5888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086868686612cdd565b611004576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffb906143be565b60405180910390fd5b600080905060006110558a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506111fb565b9050600086898990500390505b888890508110156110975788888281811061107957fe5b9050602002013582141561108c57600192505b600181019050611062565b50816110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf9061445e565b60405180910390fd5b6001600d60006101000a81548160ff0219169083151502179055508787600f91906111049291906131eb565b508560108190555084601260006101000a81548160ff021916908360ff16021790555083601381905550826014819055506003544301600c54111561114f576003544301600c819055505b6004546007600082825403925050819055506004546008600082825401925050819055508989600e91906111849291906131eb565b50858888905003600b8190555050505050505050505050565b60045481565b6060601a8054806020026020016040519081016040528092919081815260200182805480156111f157602002820191906000526020600020905b8154815260200190600101908083116111dd575b5050505050905090565b6000808260405160200161120f91906141a6565b60405160208183030381529060405280519060200120905080915050919050565b600043600c5411905090565b600080878730604051602001611254939291906141bd565b60405160208183030381529060405280519060200120905060008160405160200161127f91906141f6565b6040516020818303038152906040528051906020012090508373ffffffffffffffffffffffffffffffffffffffff16600182898989604051600081526020016040526040516112d1949392919061431e565b6020604051602081039080840390855afa1580156112f3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614925050509695505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806113cc5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61140b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611402906144fe565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561148a576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061150d565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561150957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061150d565b3090505b90565b6000600d60009054906101000a900460ff16905090565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900460ff166115c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115bf9061449e565b60405180910390fd5b6115d0611230565b61160f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116069061457e565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806116b75750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6116f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ed906144fe565b60405180910390fd5b611767868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505085858585600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661123c565b6117a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179d906143fe565b60405180910390fd5b838686905003600b54116117c157838686905003600b819055505b611860600f80548060200260200160405190810160405280929190818152602001828054801561181057602002820191906000526020600020905b8154815260200190600101908083116117fc575b5050505050601054888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050876130bc565b806119075750611905868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505085600f8054806020026020016040519081016040528092919081815260200182805480156118f857602002820191906000526020600020905b8154815260200190600101908083116118e4575b50505050506010546130bc565b155b611946576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193d9061455e565b60405180910390fd5b600a54600c819055506004546007600082825401925050819055506004546008600082825403925050819055506000600d60006101000a81548160ff0219169083151502179055506011600061199c9190613238565b505050505050565b60055481565b601660009054906101000a900460ff166119f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f0906145be565b60405180910390fd5b611a01611230565b611a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a379061457e565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611ae85750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611b27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1e906144fe565b60405180910390fd5b611b98868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505085858585600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661123c565b611bd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bce906143fe565b60405180910390fd5b60008090506000611c376017805480602002602001604051908101604052809291908181526020018280548015611c2d57602002820191906000526020600020905b815481526020019060010190808311611c19575b50505050506111fb565b905060008090505b868989905003811015611c7657888882818110611c5857fe5b90506020020135821415611c6b57600192505b600181019050611c3f565b5081611cb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cae9061437e565b60405180910390fd5b611d566018805480602002602001604051908101604052809291908181526020018280548015611d0657602002820191906000526020600020905b815481526020019060010190808311611cf2575b50505050506019548a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050896130bc565b611d95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8c9061447e565b60405180910390fd5b6000601660006101000a81548160ff021916908315150217905550858888905003600b81905550878760189190611dcd9291906131eb565b508560198190555084601b60006101000a81548160ff021916908360ff16021790555083601c8190555082601d819055505050505050505050565b6000600c54905090565b60606011805480602002602001604051908101604052809291908181526020018280548015611e6057602002820191906000526020600020905b815481526020019060010190808311611e4c575b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611f125750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611f51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f48906144fe565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612037576000600754905043600c54118015611fcb5750600d60009054906101000a900460ff16155b15611fda576004546007540390505b806007600082825403925050819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612030573d6000803e3d6000fd5b505061211e565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561211d576000600854905043600c541180156120b15750600d60009054906101000a900460ff165b156120c0576004546008540390505b806008600082825403925050819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612116573d6000803e3d6000fd5b505061211e565b5b50565b6000601354905090565b601660009054906101000a900460ff1661217a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612171906145be565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806122225750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612261576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612258906144fe565b60405180910390fd5b6122696122d4565b156122d25743600c8190555043600a81905550600d60009054906101000a900460ff16156122d1576004546007600082825401925050819055506004546008600082825403925050819055506000600d60006101000a81548160ff0219169083151502179055505b5b565b600043601554111580156122f45750601660009054906101000a900460ff165b905090565b601660009054906101000a900460ff1615612349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123409061459e565b60405180910390fd5b612351611230565b612390576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123879061457e565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461241f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124169061451e565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166351428bc08b8b85856040518563ffffffff1660e01b81526004016124809493929190614252565b60206040518083038186803b15801561249857600080fd5b505afa1580156124ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506124d0919081019061381a565b61250f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125069061443e565b60405180910390fd5b612580888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505087878787600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661123c565b6125bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b6906143fe565b60405180910390fd5b600080905060006126108c8c80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506111fb565b90506000888b8b90500390505b8a8a9050811015612652578a8a8281811061263457fe5b9050602002013582141561264757600192505b60018101905061261d565b5081612693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268a9061441e565b60405180910390fd5b6001601660006101000a81548160ff0219169083151502179055508989601891906126bf9291906131eb565b50876019819055508b8b601791906126d89291906131eb565b508383601a91906126ea9291906131eb565b506003544301601581905550878a8a905003600b81905550505050505050505050505050565b6000601b60009054906101000a900460ff16905090565b6060601880548060200260200160405190810160405280929190818152602001828054801561277557602002820191906000526020600020905b815481526020019060010190808311612761575b5050505050905090565b6000601954905090565b6000601260009054906101000a900460ff16905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000601d54905090565b6000600954905090565b6127e6611230565b612825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281c9061457e565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806128cd5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61290c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612903906144fe565b60405180910390fd5b61297d868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505085858585600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661123c565b6129bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129b3906143fe565b60405180910390fd5b60065484878790500311612a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129fc9061453e565b60405180910390fd5b600d60009054906101000a900460ff1615612a5a576004546007600082825401925050819055506004546008600082825403925050819055506000600d60006101000a81548160ff0219169083151502179055505b43600c8190555043600a81905550505050505050565b6060600e805480602002602001604051908101604052809291908181526020018280548015612abe57602002820191906000526020600020905b815481526020019060010190808311612aaa575b5050505050905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612b725750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612bb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ba8906144fe565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c43576000600754905043600c54118015612c2b5750600d60009054906101000a900460ff16155b15612c3a576004546007540390505b80915050612cda565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612cd5576000600854905043600c54118015612cbd5750600d60009054906101000a900460ff165b15612ccc576004546008540390505b80915050612cda565b600090505b90565b6000600d60009054906101000a900460ff1615612d2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d26906144be565b60405180910390fd5b612d37611230565b612d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d6d9061457e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612e06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dfd9061451e565b60405180910390fd5b84865103600b541115612e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e459061439e565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631bf28f83886040518263ffffffff1660e01b8152600401612ea9919061428d565b60206040518083038186803b158015612ec157600080fd5b505afa158015612ed5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612ef9919081019061381a565b612f38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f2f906143de565b60405180910390fd5b612f688686868686600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661123c565b612fa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f9e906143fe565b60405180910390fd5b60008090506000612fb7896111fb565b905060008789510390505b8851811015612ff657888181518110612fd757fe5b6020026020010151821415612feb57600192505b600181019050612fc2565b5081613037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161302e9061441e565b60405180910390fd5b6001925050509695505050505050565b6060601780548060200260200160405190810160405280929190818152602001828054801561309557602002820191906000526020600020905b815481526020019060010190808311613081575b5050505050905090565b60065481565b6000601660009054906101000a900460ff16905090565b60008060008060008090505b8789510381101561314e578881815181106130df57fe5b602002602001015192506000935060008090505b868851038110156131305787818151811061310a57fe5b60200260200101519250828414156131255760019450613130565b6001810190506130f3565b50836131435760009450505050506131e3565b6001810190506130c8565b5060008789510390505b88518110156131da5788818151811061316d57fe5b602002602001015192506000935060008090505b87518110156131bc5787818151811061319657fe5b60200260200101519250828414156131b157600194506131bc565b600181019050613181565b50836131cf5760009450505050506131e3565b600181019050613158565b50600193505050505b949350505050565b828054828255906000526020600020908101928215613227579160200282015b8281111561322657823582559160200191906001019061320b565b5b5090506132349190613259565b5090565b50805460008255906000526020600020908101906132569190613259565b50565b61327b91905b8082111561327757600081600090555060010161325f565b5090565b90565b60008135905061328d81614823565b92915050565b6000813590506132a28161483a565b92915050565b60008083601f8401126132ba57600080fd5b8235905067ffffffffffffffff8111156132d357600080fd5b6020830191508360208202830111156132eb57600080fd5b9250929050565b600082601f83011261330357600080fd5b813561331661331182614641565b614614565b9150818183526020840193506020810190508385602084028201111561333b57600080fd5b60005b8381101561336b5781613351888261338a565b84526020840193506020830192505060018101905061333e565b5050505092915050565b60008151905061338481614851565b92915050565b60008135905061339981614868565b92915050565b6000813590506133ae8161487f565b92915050565b6000813590506133c381614896565b92915050565b6000602082840312156133db57600080fd5b60006133e984828501613293565b91505092915050565b6000806020838503121561340557600080fd5b600083013567ffffffffffffffff81111561341f57600080fd5b61342b858286016132a8565b92509250509250929050565b60008060008060008060008060c0898b03121561345357600080fd5b600089013567ffffffffffffffff81111561346d57600080fd5b6134798b828c016132a8565b9850985050602089013567ffffffffffffffff81111561349857600080fd5b6134a48b828c016132a8565b965096505060406134b78b828c0161339f565b94505060606134c88b828c016133b4565b93505060806134d98b828c0161338a565b92505060a06134ea8b828c0161338a565b9150509295985092959890939650565b60008060008060008060008060008060e08b8d03121561351957600080fd5b60008b013567ffffffffffffffff81111561353357600080fd5b61353f8d828e016132a8565b9a509a505060208b013567ffffffffffffffff81111561355e57600080fd5b61356a8d828e016132a8565b9850985050604061357d8d828e0161339f565b965050606061358e8d828e016133b4565b955050608061359f8d828e0161338a565b94505060a06135b08d828e0161338a565b93505060c08b013567ffffffffffffffff8111156135cd57600080fd5b6135d98d828e016132a8565b92509250509295989b9194979a5092959850565b60008060008060008060a0878903121561360657600080fd5b600087013567ffffffffffffffff81111561362057600080fd5b61362c89828a016132a8565b9650965050602061363f89828a0161339f565b945050604061365089828a016133b4565b935050606061366189828a0161338a565b925050608061367289828a0161338a565b9150509295509295509295565b60006020828403121561369157600080fd5b600082013567ffffffffffffffff8111156136ab57600080fd5b6136b7848285016132f2565b91505092915050565b60008060008060008060c087890312156136d957600080fd5b600087013567ffffffffffffffff8111156136f357600080fd5b6136ff89828a016132f2565b965050602087013567ffffffffffffffff81111561371c57600080fd5b61372889828a016132f2565b955050604061373989828a0161339f565b945050606061374a89828a016133b4565b935050608061375b89828a0161338a565b92505060a061376c89828a0161338a565b9150509295509295509295565b60008060008060008060c0878903121561379257600080fd5b600087013567ffffffffffffffff8111156137ac57600080fd5b6137b889828a016132f2565b96505060206137c989828a0161339f565b95505060406137da89828a016133b4565b94505060606137eb89828a0161338a565b93505060806137fc89828a0161338a565b92505060a061380d89828a0161327e565b9150509295509295509295565b60006020828403121561382c57600080fd5b600061383a84828501613375565b91505092915050565b600061384f8383613a30565b60208301905092915050565b60006138678383613a4e565b60208301905092915050565b61387c81614712565b82525050565b61389361388e82614712565b6147be565b82525050565b6138a281614700565b82525050565b60006138b483856146be565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156138e357600080fd5b6020830292506138f4838584614795565b82840190509392505050565b600061390b8261468e565b61391581856146be565b935061392083614669565b8060005b838110156139515781516139388882613843565b9750613943836146a4565b925050600181019050613924565b5085935050505092915050565b60006139698261468e565b61397381856146cf565b935061397e83614669565b8060005b838110156139af578151613996888261385b565b97506139a1836146a4565b925050600181019050613982565b5085935050505092915050565b60006139c782614699565b6139d181856146be565b93506139dc83614679565b8060005b83811015613a14576139f1826147f6565b6139fb8882613843565b9750613a06836146b1565b9250506001810190506139e0565b5085935050505092915050565b613a2a81614724565b82525050565b613a3981614730565b82525050565b613a4881614730565b82525050565b613a5781614730565b82525050565b613a6e613a6982614730565b6147d0565b82525050565b613a7d81614771565b82525050565b6000613a90601c836146eb565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000613ad0602f836146da565b91507f5175657374696f6e206973206e6f7420696e2074686520616e7377657265642060008301527f6861736865732070726f766964656400000000000000000000000000000000006020830152604082019050919050565b6000613b366039836146da565b91507f43616e27742061707065616c206f6e206c65737320616e73776572656420717560008301527f657374696f6e73207468616e2073686f776e206265666f7265000000000000006020830152604082019050919050565b6000613b9c600f836146da565b91507f436f756c646e27742061707065616c00000000000000000000000000000000006000830152602082019050919050565b6000613bdc6019836146da565b91507f5175657374696f6e2073686f756c642062652076616c69642e000000000000006000830152602082019050919050565b6000613c1c601f836146da565b91507f48617368657320617265206e6f74207369676e656420636f72726563746c79006000830152602082019050919050565b6000613c5c6031836146da565b91507f5175657374696f6e206973206e6f7420696e2074686520756e616e737765726560008301527f64206861736865732070726f76696465640000000000000000000000000000006020830152604082019050919050565b6000613cc2601d836146da565b91507f416e737765722073686f756c64206d61746368207175657374696f6e2e0000006000830152602082019050919050565b6000613d02602f836146da565b91507f7175657374696f6e2061707065616c6564206d75737420626520696e20756e6160008301527f6e737765726564206861736865737300000000000000000000000000000000006020830152604082019050919050565b6000613d68602a836146da565b91507f43616e27742070726f76696465206f6c646572206f7220646966666572656e7460008301527f207369676e6174757265000000000000000000000000000000000000000000006020830152604082019050919050565b6000613dce602c836146da565b91507f43616e27742075736520746869732066756e6374696f6e207768696c65206e6f60008301527f742061707065616c696e672e00000000000000000000000000000000000000006020830152604082019050919050565b6000613e346028836146da565b91507f43616e27742075736520746869732066756e6374696f6e207768696c6520617060008301527f7065616c696e672e0000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613e9a6024836146da565b91507f43616e27742075736520746869732066756e6374696f6e207768656e2061637460008301527f6976652e000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613f006025836146da565b91507f4f6e6c7920616e206f776e65722063616e2063616c6c20746869732066756e6360008301527f74696f6e2e0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613f666029836146da565b91507f4f6e6c792074686520636f7374756d65722063616e2063616c6c20746869732060008301527f66756e6374696f6e2e00000000000000000000000000000000000000000000006020830152604082019050919050565b6000613fcc6017836146da565b91507f6469646e74207265616368206d617820717565726965730000000000000000006000830152602082019050919050565b600061400c601c836146da565b91507f6469736d6973732077697468206f6c646572207369676e6174757265000000006000830152602082019050919050565b600061404c6028836146da565b91507f43616e27742075736520746869732066756e6374696f6e207768656e206e6f7460008301527f206163746976652e0000000000000000000000000000000000000000000000006020830152604082019050919050565b60006140b26028836146da565b91507f43616e27742075736520746869732066756e6374696f6e207768696c6520646560008301527f6d616e64696e672e0000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614118602c836146da565b91507f43616e27742075736520746869732066756e6374696f6e207768696c65206e6f60008301527f742064656d616e64696e672e00000000000000000000000000000000000000006020830152604082019050919050565b61417a8161475a565b82525050565b61419161418c8261475a565b6147ec565b82525050565b6141a081614764565b82525050565b60006141b2828461395e565b915081905092915050565b60006141c9828661395e565b91506141d58285614180565b6020820191506141e58284613882565b601482019150819050949350505050565b600061420182613a83565b915061420d8284613a5d565b60208201915081905092915050565b60006020820190506142316000830184613899565b92915050565b600060208201905061424c6000830184613873565b92915050565b6000604082019050818103600083015261426d8186886138a8565b905081810360208301526142828184866138a8565b905095945050505050565b600060208201905081810360008301526142a78184613900565b905092915050565b600060408201905081810360008301526142c981866139bc565b905081810360208301526142de8184866138a8565b9050949350505050565b60006020820190506142fd6000830184613a21565b92915050565b60006020820190506143186000830184613a3f565b92915050565b60006080820190506143336000830187613a3f565b6143406020830186614197565b61434d6040830185613a3f565b61435a6060830184613a3f565b95945050505050565b60006020820190506143786000830184613a74565b92915050565b6000602082019050818103600083015261439781613ac3565b9050919050565b600060208201905081810360008301526143b781613b29565b9050919050565b600060208201905081810360008301526143d781613b8f565b9050919050565b600060208201905081810360008301526143f781613bcf565b9050919050565b6000602082019050818103600083015261441781613c0f565b9050919050565b6000602082019050818103600083015261443781613c4f565b9050919050565b6000602082019050818103600083015261445781613cb5565b9050919050565b6000602082019050818103600083015261447781613cf5565b9050919050565b6000602082019050818103600083015261449781613d5b565b9050919050565b600060208201905081810360008301526144b781613dc1565b9050919050565b600060208201905081810360008301526144d781613e27565b9050919050565b600060208201905081810360008301526144f781613e8d565b9050919050565b6000602082019050818103600083015261451781613ef3565b9050919050565b6000602082019050818103600083015261453781613f59565b9050919050565b6000602082019050818103600083015261455781613fbf565b9050919050565b6000602082019050818103600083015261457781613fff565b9050919050565b600060208201905081810360008301526145978161403f565b9050919050565b600060208201905081810360008301526145b7816140a5565b9050919050565b600060208201905081810360008301526145d78161410b565b9050919050565b60006020820190506145f36000830184614171565b92915050565b600060208201905061460e6000830184614197565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561463757600080fd5b8060405250919050565b600067ffffffffffffffff82111561465857600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081549050919050565b6000602082019050919050565b6000600182019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000819050919050565b600061470b8261473a565b9050919050565b600061471d8261473a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061477c82614783565b9050919050565b600061478e8261473a565b9050919050565b82818337600083830152505050565b60006147b76147b283614816565b6146f6565b9050919050565b60006147c9826147da565b9050919050565b6000819050919050565b60006147e582614809565b9050919050565b6000819050919050565b600061480282546147a4565b9050919050565b60008160601b9050919050565b60008160001c9050919050565b61482c81614700565b811461483757600080fd5b50565b61484381614712565b811461484e57600080fd5b50565b61485a81614724565b811461486557600080fd5b50565b61487181614730565b811461487c57600080fd5b50565b6148888161475a565b811461489357600080fd5b50565b61489f81614764565b81146148aa57600080fd5b5056fea365627a7a72315820dc05e4e158a538e1b5741a373d911fe531827e01d1a10cb626a9adee6b6d17c86c6578706572696d656e74616cf564736f6c63430005110040",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x4BE7 CODESIZE SUB DUP1 PUSH3 0x4BE7 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH3 0x37 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH3 0x1B1 JUMP JUMPDEST CALLER PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP6 PUSH1 0x1 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP5 PUSH1 0x3 DUP2 SWAP1 SSTORE POP DUP4 PUSH1 0x4 DUP2 SWAP1 SSTORE POP DUP3 PUSH1 0x5 DUP2 SWAP1 SSTORE POP DUP2 PUSH1 0x2 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0x6 DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xC DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xA DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0x15 DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0x7 DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0x8 DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xB DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP POP POP POP POP POP POP PUSH3 0x2E7 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH3 0x17D DUP2 PUSH3 0x299 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH3 0x194 DUP2 PUSH3 0x2B3 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH3 0x1AB DUP2 PUSH3 0x2CD JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH3 0x1CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH3 0x1DB DUP10 DUP3 DUP11 ADD PUSH3 0x183 JUMP JUMPDEST SWAP7 POP POP PUSH1 0x20 PUSH3 0x1EE DUP10 DUP3 DUP11 ADD PUSH3 0x19A JUMP JUMPDEST SWAP6 POP POP PUSH1 0x40 PUSH3 0x201 DUP10 DUP3 DUP11 ADD PUSH3 0x19A JUMP JUMPDEST SWAP5 POP POP PUSH1 0x60 PUSH3 0x214 DUP10 DUP3 DUP11 ADD PUSH3 0x19A JUMP JUMPDEST SWAP4 POP POP PUSH1 0x80 PUSH3 0x227 DUP10 DUP3 DUP11 ADD PUSH3 0x16C JUMP JUMPDEST SWAP3 POP POP PUSH1 0xA0 PUSH3 0x23A DUP10 DUP3 DUP11 ADD PUSH3 0x19A JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 PUSH3 0x254 DUP3 PUSH3 0x26F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x268 DUP3 PUSH3 0x26F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x2A4 DUP2 PUSH3 0x247 JUMP JUMPDEST DUP2 EQ PUSH3 0x2B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH3 0x2BE DUP2 PUSH3 0x25B JUMP JUMPDEST DUP2 EQ PUSH3 0x2CA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH3 0x2D8 DUP2 PUSH3 0x28F JUMP JUMPDEST DUP2 EQ PUSH3 0x2E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x48F0 DUP1 PUSH3 0x2F7 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x23B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6D3F8998 GT PUSH2 0x12E JUMPI DUP1 PUSH4 0x93C3DA8C GT PUSH2 0xAB JUMPI DUP1 PUSH4 0xD914E4E0 GT PUSH2 0x6F JUMPI DUP1 PUSH4 0xD914E4E0 EQ PUSH2 0x8C9 JUMPI DUP1 PUSH4 0xE5F03799 EQ PUSH2 0x8F4 JUMPI DUP1 PUSH4 0xEECB5DED EQ PUSH2 0x931 JUMPI DUP1 PUSH4 0xF13BD54C EQ PUSH2 0x95C JUMPI DUP1 PUSH4 0xFBAC9443 EQ PUSH2 0x987 JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x93C3DA8C EQ PUSH2 0x7F4 JUMPI DUP1 PUSH4 0xB0433E94 EQ PUSH2 0x81F JUMPI DUP1 PUSH4 0xB107D50C EQ PUSH2 0x84A JUMPI DUP1 PUSH4 0xBFAE1D0F EQ PUSH2 0x875 JUMPI DUP1 PUSH4 0xD14867FE EQ PUSH2 0x89E JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x76C3D965 GT PUSH2 0xF2 JUMPI DUP1 PUSH4 0x76C3D965 EQ PUSH2 0x71F JUMPI DUP1 PUSH4 0x8463EEDD EQ PUSH2 0x748 JUMPI DUP1 PUSH4 0x8AB6FAD1 EQ PUSH2 0x773 JUMPI DUP1 PUSH4 0x8F0C1A14 EQ PUSH2 0x79E JUMPI DUP1 PUSH4 0x8F145525 EQ PUSH2 0x7C9 JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x6D3F8998 EQ PUSH2 0x65E JUMPI DUP1 PUSH4 0x6DDF2254 EQ PUSH2 0x689 JUMPI DUP1 PUSH4 0x7317D73F EQ PUSH2 0x6B2 JUMPI DUP1 PUSH4 0x73398395 EQ PUSH2 0x6DD JUMPI DUP1 PUSH4 0x75B6A366 EQ PUSH2 0x6F4 JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x1C08FBC6 GT PUSH2 0x1BC JUMPI DUP1 PUSH4 0x3A5381B5 GT PUSH2 0x180 JUMPI DUP1 PUSH4 0x3A5381B5 EQ PUSH2 0x58B JUMPI DUP1 PUSH4 0x4E621157 EQ PUSH2 0x5B6 JUMPI DUP1 PUSH4 0x630C24A1 EQ PUSH2 0x5DF JUMPI DUP1 PUSH4 0x6B34C8C2 EQ PUSH2 0x60A JUMPI DUP1 PUSH4 0x6B5E332A EQ PUSH2 0x633 JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x1C08FBC6 EQ PUSH2 0x4A2 JUMPI DUP1 PUSH4 0x1CC368F8 EQ PUSH2 0x4DF JUMPI DUP1 PUSH4 0x1E550B13 EQ PUSH2 0x50A JUMPI DUP1 PUSH4 0x24ED685D EQ PUSH2 0x535 JUMPI DUP1 PUSH4 0x2804B2C0 EQ PUSH2 0x560 JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x121273B9 GT PUSH2 0x203 JUMPI DUP1 PUSH4 0x121273B9 EQ PUSH2 0x3BB JUMPI DUP1 PUSH4 0x13FAEDE6 EQ PUSH2 0x3E4 JUMPI DUP1 PUSH4 0x14E1306C EQ PUSH2 0x40F JUMPI DUP1 PUSH4 0x1595BE3A EQ PUSH2 0x43A JUMPI DUP1 PUSH4 0x1A8012E4 EQ PUSH2 0x477 JUMPI PUSH2 0x23B JUMP JUMPDEST DUP1 PUSH4 0x57489FA EQ PUSH2 0x307 JUMPI DUP1 PUSH4 0x85D4883 EQ PUSH2 0x330 JUMPI DUP1 PUSH4 0xBC2FDE3 EQ PUSH2 0x35B JUMPI DUP1 PUSH4 0xF15F4C0 EQ PUSH2 0x386 JUMPI DUP1 PUSH4 0x1177F72D EQ PUSH2 0x390 JUMPI JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x2A6 JUMPI CALLVALUE PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH2 0x305 JUMP JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x300 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x313 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x32E PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x329 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x33F2 JUMP JUMPDEST PUSH2 0x9B2 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x33C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x345 PUSH2 0xC7C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x352 SWAP2 SWAP1 PUSH2 0x4237 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x367 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x370 PUSH2 0xCA1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x37D SWAP2 SWAP1 PUSH2 0x4303 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x38E PUSH2 0xCAB JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x39C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3A5 PUSH2 0xE04 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x3B2 SWAP2 SWAP1 PUSH2 0x4303 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3E2 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x3DD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x3437 JUMP JUMPDEST PUSH2 0xE0E JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3F0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3F9 PUSH2 0x119D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x406 SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x41B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x424 PUSH2 0x11A3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x431 SWAP2 SWAP1 PUSH2 0x428D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x446 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x461 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x45C SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x367F JUMP JUMPDEST PUSH2 0x11FB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x46E SWAP2 SWAP1 PUSH2 0x4303 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x483 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x48C PUSH2 0x1230 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x499 SWAP2 SWAP1 PUSH2 0x42E8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4C9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x4C4 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x3779 JUMP JUMPDEST PUSH2 0x123C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x4D6 SWAP2 SWAP1 PUSH2 0x42E8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4EB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4F4 PUSH2 0x1322 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x501 SWAP2 SWAP1 PUSH2 0x421C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x516 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x51F PUSH2 0x1510 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x52C SWAP2 SWAP1 PUSH2 0x42E8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x541 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x54A PUSH2 0x1527 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x557 SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x56C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x575 PUSH2 0x152D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x582 SWAP2 SWAP1 PUSH2 0x4237 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x597 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5A0 PUSH2 0x1553 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5AD SWAP2 SWAP1 PUSH2 0x4363 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5C2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5DD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x5D8 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x35ED JUMP JUMPDEST PUSH2 0x1579 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5EB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5F4 PUSH2 0x19A4 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x601 SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x616 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x631 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x62C SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x35ED JUMP JUMPDEST PUSH2 0x19AA JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x63F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x648 PUSH2 0x1E08 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x655 SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x66A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x673 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x680 SWAP2 SWAP1 PUSH2 0x428D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x695 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6B0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x6AB SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x33C9 JUMP JUMPDEST PUSH2 0x1E6A JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x6BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6C7 PUSH2 0x2121 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6D4 SWAP2 SWAP1 PUSH2 0x4303 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x6E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6F2 PUSH2 0x212B JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x700 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x709 PUSH2 0x22D4 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x716 SWAP2 SWAP1 PUSH2 0x42E8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x72B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x746 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x741 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x34FA JUMP JUMPDEST PUSH2 0x22F9 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x754 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x75D PUSH2 0x2710 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x76A SWAP2 SWAP1 PUSH2 0x45F9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x77F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x788 PUSH2 0x2727 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x795 SWAP2 SWAP1 PUSH2 0x428D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x7B3 PUSH2 0x277F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x7C0 SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x7DE PUSH2 0x2789 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x7EB SWAP2 SWAP1 PUSH2 0x45F9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x800 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x809 PUSH2 0x27A0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x816 SWAP2 SWAP1 PUSH2 0x421C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x82B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x834 PUSH2 0x27CA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x841 SWAP2 SWAP1 PUSH2 0x4303 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x856 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x85F PUSH2 0x27D4 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x86C SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x881 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x89C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x897 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x35ED JUMP JUMPDEST PUSH2 0x27DE JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x8B3 PUSH2 0x2A70 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C0 SWAP2 SWAP1 PUSH2 0x428D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x8DE PUSH2 0x2AC8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8EB SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x900 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x91B PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH2 0x916 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x36C0 JUMP JUMPDEST PUSH2 0x2CDD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x928 SWAP2 SWAP1 PUSH2 0x42E8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x93D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x946 PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x953 SWAP2 SWAP1 PUSH2 0x428D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x968 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x971 PUSH2 0x309F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x97E SWAP2 SWAP1 PUSH2 0x45DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x993 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x99C PUSH2 0x30A5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x9A9 SWAP2 SWAP1 PUSH2 0x42E8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND PUSH2 0xA01 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x9F8 SWAP1 PUSH2 0x449E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xA09 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0xA48 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA3F SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0xAF0 JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0xB2F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xB26 SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x51428BC0 PUSH1 0xE DUP5 DUP5 PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xB8F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x42AF JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xBA7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBBB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0xBDF SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x381A JUMP JUMPDEST PUSH2 0xC1E JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xC15 SWAP1 PUSH2 0x443E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0xA SLOAD PUSH1 0xC DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP2 DUP2 PUSH1 0x11 SWAP2 SWAP1 PUSH2 0xC77 SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x14 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0xCB3 PUSH2 0x1230 JUMP JUMPDEST ISZERO PUSH2 0xCF3 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCEA SWAP1 PUSH2 0x44DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xD83 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD7A SWAP1 PUSH2 0x451E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST CALLVALUE PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x8 SLOAD LT PUSH2 0xE02 JUMPI PUSH1 0x4 SLOAD PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x5 SLOAD NUMBER ADD PUSH1 0xC DUP2 SWAP1 SSTORE POP NUMBER PUSH1 0x9 DUP2 SWAP1 SSTORE POP PUSH1 0xC SLOAD PUSH1 0xA DUP2 SWAP1 SSTORE POP PUSH1 0xC SLOAD PUSH1 0x15 DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP JUMPDEST JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1C SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0xE5E JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE55 SWAP1 PUSH2 0x44BE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xE66 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0xEA5 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE9C SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xF35 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xF2C SWAP1 PUSH2 0x451E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xFC5 DUP9 DUP9 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP8 DUP8 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP7 DUP7 DUP7 DUP7 PUSH2 0x2CDD JUMP JUMPDEST PUSH2 0x1004 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xFFB SWAP1 PUSH2 0x43BE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 POP PUSH1 0x0 PUSH2 0x1055 DUP11 DUP11 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP PUSH2 0x11FB JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 DUP10 DUP10 SWAP1 POP SUB SWAP1 POP JUMPDEST DUP9 DUP9 SWAP1 POP DUP2 LT ISZERO PUSH2 0x1097 JUMPI DUP9 DUP9 DUP3 DUP2 DUP2 LT PUSH2 0x1079 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP3 EQ ISZERO PUSH2 0x108C JUMPI PUSH1 0x1 SWAP3 POP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x1062 JUMP JUMPDEST POP DUP2 PUSH2 0x10D8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x10CF SWAP1 PUSH2 0x445E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP8 DUP8 PUSH1 0xF SWAP2 SWAP1 PUSH2 0x1104 SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP DUP6 PUSH1 0x10 DUP2 SWAP1 SSTORE POP DUP5 PUSH1 0x12 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP DUP4 PUSH1 0x13 DUP2 SWAP1 SSTORE POP DUP3 PUSH1 0x14 DUP2 SWAP1 SSTORE POP PUSH1 0x3 SLOAD NUMBER ADD PUSH1 0xC SLOAD GT ISZERO PUSH2 0x114F JUMPI PUSH1 0x3 SLOAD NUMBER ADD PUSH1 0xC DUP2 SWAP1 SSTORE POP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP10 DUP10 PUSH1 0xE SWAP2 SWAP1 PUSH2 0x1184 SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP DUP6 DUP9 DUP9 SWAP1 POP SUB PUSH1 0xB DUP2 SWAP1 SSTORE POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x1A DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x11F1 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x11DD JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x120F SWAP2 SWAP1 PUSH2 0x41A6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP DUP1 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 NUMBER PUSH1 0xC SLOAD GT SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP8 DUP8 ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1254 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x41BD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x127F SWAP2 SWAP1 PUSH2 0x41F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x1 DUP3 DUP10 DUP10 DUP10 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x12D1 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x431E JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x12F3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD SUB MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ SWAP3 POP POP POP SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x13CC JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x140B JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1402 SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x148A JUMPI PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP PUSH2 0x150D JUMP JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x1509 JUMPI PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP PUSH2 0x150D JUMP JUMPDEST ADDRESS SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND PUSH2 0x15C8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15BF SWAP1 PUSH2 0x449E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x15D0 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0x160F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1606 SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x16B7 JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x16F6 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x16ED SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1767 DUP7 DUP7 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP6 DUP6 DUP6 DUP6 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x123C JUMP JUMPDEST PUSH2 0x17A6 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x179D SWAP1 PUSH2 0x43FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP4 DUP7 DUP7 SWAP1 POP SUB PUSH1 0xB SLOAD GT PUSH2 0x17C1 JUMPI DUP4 DUP7 DUP7 SWAP1 POP SUB PUSH1 0xB DUP2 SWAP1 SSTORE POP JUMPDEST PUSH2 0x1860 PUSH1 0xF DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x1810 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x17FC JUMPI JUMPDEST POP POP POP POP POP PUSH1 0x10 SLOAD DUP9 DUP9 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP8 PUSH2 0x30BC JUMP JUMPDEST DUP1 PUSH2 0x1907 JUMPI POP PUSH2 0x1905 DUP7 DUP7 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP6 PUSH1 0xF DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x18F8 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x18E4 JUMPI JUMPDEST POP POP POP POP POP PUSH1 0x10 SLOAD PUSH2 0x30BC JUMP JUMPDEST ISZERO JUMPDEST PUSH2 0x1946 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x193D SWAP1 PUSH2 0x455E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0xA SLOAD PUSH1 0xC DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP PUSH1 0x11 PUSH1 0x0 PUSH2 0x199C SWAP2 SWAP1 PUSH2 0x3238 JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x5 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x16 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND PUSH2 0x19F9 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x19F0 SWAP1 PUSH2 0x45BE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1A01 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0x1A40 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1A37 SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x1AE8 JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x1B27 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1B1E SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1B98 DUP7 DUP7 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP6 DUP6 DUP6 DUP6 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x123C JUMP JUMPDEST PUSH2 0x1BD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1BCE SWAP1 PUSH2 0x43FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 POP PUSH1 0x0 PUSH2 0x1C37 PUSH1 0x17 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x1C2D JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x1C19 JUMPI JUMPDEST POP POP POP POP POP PUSH2 0x11FB JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 SWAP1 POP JUMPDEST DUP7 DUP10 DUP10 SWAP1 POP SUB DUP2 LT ISZERO PUSH2 0x1C76 JUMPI DUP9 DUP9 DUP3 DUP2 DUP2 LT PUSH2 0x1C58 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP3 EQ ISZERO PUSH2 0x1C6B JUMPI PUSH1 0x1 SWAP3 POP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x1C3F JUMP JUMPDEST POP DUP2 PUSH2 0x1CB7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1CAE SWAP1 PUSH2 0x437E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1D56 PUSH1 0x18 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x1D06 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x1CF2 JUMPI JUMPDEST POP POP POP POP POP PUSH1 0x19 SLOAD DUP11 DUP11 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP10 PUSH2 0x30BC JUMP JUMPDEST PUSH2 0x1D95 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1D8C SWAP1 PUSH2 0x447E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x16 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP6 DUP9 DUP9 SWAP1 POP SUB PUSH1 0xB DUP2 SWAP1 SSTORE POP DUP8 DUP8 PUSH1 0x18 SWAP2 SWAP1 PUSH2 0x1DCD SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP DUP6 PUSH1 0x19 DUP2 SWAP1 SSTORE POP DUP5 PUSH1 0x1B PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP DUP4 PUSH1 0x1C DUP2 SWAP1 SSTORE POP DUP3 PUSH1 0x1D DUP2 SWAP1 SSTORE POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xC SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x11 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x1E60 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x1E4C JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x1F12 JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x1F51 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1F48 SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x2037 JUMPI PUSH1 0x0 PUSH1 0x7 SLOAD SWAP1 POP NUMBER PUSH1 0xC SLOAD GT DUP1 ISZERO PUSH2 0x1FCB JUMPI POP PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO JUMPDEST ISZERO PUSH2 0x1FDA JUMPI PUSH1 0x4 SLOAD PUSH1 0x7 SLOAD SUB SWAP1 POP JUMPDEST DUP1 PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC DUP3 SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x2030 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH2 0x211E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x211D JUMPI PUSH1 0x0 PUSH1 0x8 SLOAD SWAP1 POP NUMBER PUSH1 0xC SLOAD GT DUP1 ISZERO PUSH2 0x20B1 JUMPI POP PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0x20C0 JUMPI PUSH1 0x4 SLOAD PUSH1 0x8 SLOAD SUB SWAP1 POP JUMPDEST DUP1 PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC DUP3 SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x2116 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH2 0x211E JUMP JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x13 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x16 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND PUSH2 0x217A JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2171 SWAP1 PUSH2 0x45BE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x2222 JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x2261 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2258 SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2269 PUSH2 0x22D4 JUMP JUMPDEST ISZERO PUSH2 0x22D2 JUMPI NUMBER PUSH1 0xC DUP2 SWAP1 SSTORE POP NUMBER PUSH1 0xA DUP2 SWAP1 SSTORE POP PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x22D1 JUMPI PUSH1 0x4 SLOAD PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP JUMPDEST JUMPDEST JUMP JUMPDEST PUSH1 0x0 NUMBER PUSH1 0x15 SLOAD GT ISZERO DUP1 ISZERO PUSH2 0x22F4 JUMPI POP PUSH1 0x16 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x16 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x2349 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2340 SWAP1 PUSH2 0x459E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2351 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0x2390 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2387 SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x241F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2416 SWAP1 PUSH2 0x451E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x51428BC0 DUP12 DUP12 DUP6 DUP6 PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2480 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4252 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2498 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x24AC JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x24D0 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x381A JUMP JUMPDEST PUSH2 0x250F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2506 SWAP1 PUSH2 0x443E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2580 DUP9 DUP9 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP8 DUP8 DUP8 DUP8 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x123C JUMP JUMPDEST PUSH2 0x25BF JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x25B6 SWAP1 PUSH2 0x43FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 POP PUSH1 0x0 PUSH2 0x2610 DUP13 DUP13 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP PUSH2 0x11FB JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP9 DUP12 DUP12 SWAP1 POP SUB SWAP1 POP JUMPDEST DUP11 DUP11 SWAP1 POP DUP2 LT ISZERO PUSH2 0x2652 JUMPI DUP11 DUP11 DUP3 DUP2 DUP2 LT PUSH2 0x2634 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP3 EQ ISZERO PUSH2 0x2647 JUMPI PUSH1 0x1 SWAP3 POP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x261D JUMP JUMPDEST POP DUP2 PUSH2 0x2693 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x268A SWAP1 PUSH2 0x441E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x16 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP10 DUP10 PUSH1 0x18 SWAP2 SWAP1 PUSH2 0x26BF SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP DUP8 PUSH1 0x19 DUP2 SWAP1 SSTORE POP DUP12 DUP12 PUSH1 0x17 SWAP2 SWAP1 PUSH2 0x26D8 SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP DUP4 DUP4 PUSH1 0x1A SWAP2 SWAP1 PUSH2 0x26EA SWAP3 SWAP2 SWAP1 PUSH2 0x31EB JUMP JUMPDEST POP PUSH1 0x3 SLOAD NUMBER ADD PUSH1 0x15 DUP2 SWAP1 SSTORE POP DUP8 DUP11 DUP11 SWAP1 POP SUB PUSH1 0xB DUP2 SWAP1 SSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1B PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x18 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x2775 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x2761 JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x19 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x12 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1D SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x9 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x27E6 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0x2825 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x281C SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x28CD JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x290C JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2903 SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x297D DUP7 DUP7 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP DUP6 DUP6 DUP6 DUP6 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x123C JUMP JUMPDEST PUSH2 0x29BC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x29B3 SWAP1 PUSH2 0x43FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x6 SLOAD DUP5 DUP8 DUP8 SWAP1 POP SUB GT PUSH2 0x2A05 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x29FC SWAP1 PUSH2 0x453E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x2A5A JUMPI PUSH1 0x4 SLOAD PUSH1 0x7 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x4 SLOAD PUSH1 0x8 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0xD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP JUMPDEST NUMBER PUSH1 0xC DUP2 SWAP1 SSTORE POP NUMBER PUSH1 0xA DUP2 SWAP1 SSTORE POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0xE DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x2ABE JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x2AAA JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x2B72 JUMPI POP PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST PUSH2 0x2BB1 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2BA8 SWAP1 PUSH2 0x44FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x2C43 JUMPI PUSH1 0x0 PUSH1 0x7 SLOAD SWAP1 POP NUMBER PUSH1 0xC SLOAD GT DUP1 ISZERO PUSH2 0x2C2B JUMPI POP PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO JUMPDEST ISZERO PUSH2 0x2C3A JUMPI PUSH1 0x4 SLOAD PUSH1 0x7 SLOAD SUB SWAP1 POP JUMPDEST DUP1 SWAP2 POP POP PUSH2 0x2CDA JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x2CD5 JUMPI PUSH1 0x0 PUSH1 0x8 SLOAD SWAP1 POP NUMBER PUSH1 0xC SLOAD GT DUP1 ISZERO PUSH2 0x2CBD JUMPI POP PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0x2CCC JUMPI PUSH1 0x4 SLOAD PUSH1 0x8 SLOAD SUB SWAP1 POP JUMPDEST DUP1 SWAP2 POP POP PUSH2 0x2CDA JUMP JUMPDEST PUSH1 0x0 SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x2D2F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2D26 SWAP1 PUSH2 0x44BE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2D37 PUSH2 0x1230 JUMP JUMPDEST PUSH2 0x2D76 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2D6D SWAP1 PUSH2 0x457E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x2E06 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2DFD SWAP1 PUSH2 0x451E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP5 DUP7 MLOAD SUB PUSH1 0xB SLOAD GT ISZERO PUSH2 0x2E4E JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2E45 SWAP1 PUSH2 0x439E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x1BF28F83 DUP9 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2EA9 SWAP2 SWAP1 PUSH2 0x428D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2EC1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x2ED5 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x2EF9 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x381A JUMP JUMPDEST PUSH2 0x2F38 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2F2F SWAP1 PUSH2 0x43DE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x2F68 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x123C JUMP JUMPDEST PUSH2 0x2FA7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2F9E SWAP1 PUSH2 0x43FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SWAP1 POP PUSH1 0x0 PUSH2 0x2FB7 DUP10 PUSH2 0x11FB JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP8 DUP10 MLOAD SUB SWAP1 POP JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x2FF6 JUMPI DUP9 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x2FD7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 EQ ISZERO PUSH2 0x2FEB JUMPI PUSH1 0x1 SWAP3 POP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x2FC2 JUMP JUMPDEST POP DUP2 PUSH2 0x3037 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x302E SWAP1 PUSH2 0x441E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 SWAP3 POP POP POP SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x17 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x3095 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x3081 JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x16 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 SWAP1 POP JUMPDEST DUP8 DUP10 MLOAD SUB DUP2 LT ISZERO PUSH2 0x314E JUMPI DUP9 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x30DF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP3 POP PUSH1 0x0 SWAP4 POP PUSH1 0x0 DUP1 SWAP1 POP JUMPDEST DUP7 DUP9 MLOAD SUB DUP2 LT ISZERO PUSH2 0x3130 JUMPI DUP8 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x310A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP3 POP DUP3 DUP5 EQ ISZERO PUSH2 0x3125 JUMPI PUSH1 0x1 SWAP5 POP PUSH2 0x3130 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x30F3 JUMP JUMPDEST POP DUP4 PUSH2 0x3143 JUMPI PUSH1 0x0 SWAP5 POP POP POP POP POP PUSH2 0x31E3 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x30C8 JUMP JUMPDEST POP PUSH1 0x0 DUP8 DUP10 MLOAD SUB SWAP1 POP JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x31DA JUMPI DUP9 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x316D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP3 POP PUSH1 0x0 SWAP4 POP PUSH1 0x0 DUP1 SWAP1 POP JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x31BC JUMPI DUP8 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x3196 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP3 POP DUP3 DUP5 EQ ISZERO PUSH2 0x31B1 JUMPI PUSH1 0x1 SWAP5 POP PUSH2 0x31BC JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x3181 JUMP JUMPDEST POP DUP4 PUSH2 0x31CF JUMPI PUSH1 0x0 SWAP5 POP POP POP POP POP PUSH2 0x31E3 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x3158 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 POP POP POP POP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x3227 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x3226 JUMPI DUP3 CALLDATALOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x320B JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x3234 SWAP2 SWAP1 PUSH2 0x3259 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x0 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH2 0x3256 SWAP2 SWAP1 PUSH2 0x3259 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x327B SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x3277 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x325F JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x328D DUP2 PUSH2 0x4823 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x32A2 DUP2 PUSH2 0x483A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0x32BA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x32D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP3 MUL DUP4 ADD GT ISZERO PUSH2 0x32EB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3303 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x3316 PUSH2 0x3311 DUP3 PUSH2 0x4641 JUMP JUMPDEST PUSH2 0x4614 JUMP JUMPDEST SWAP2 POP DUP2 DUP2 DUP4 MSTORE PUSH1 0x20 DUP5 ADD SWAP4 POP PUSH1 0x20 DUP2 ADD SWAP1 POP DUP4 DUP6 PUSH1 0x20 DUP5 MUL DUP3 ADD GT ISZERO PUSH2 0x333B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x336B JUMPI DUP2 PUSH2 0x3351 DUP9 DUP3 PUSH2 0x338A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP4 POP PUSH1 0x20 DUP4 ADD SWAP3 POP POP PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x333E JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x3384 DUP2 PUSH2 0x4851 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x3399 DUP2 PUSH2 0x4868 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x33AE DUP2 PUSH2 0x487F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x33C3 DUP2 PUSH2 0x4896 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x33E9 DUP5 DUP3 DUP6 ADD PUSH2 0x3293 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x20 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3405 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP4 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x341F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x342B DUP6 DUP3 DUP7 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP10 DUP12 SUB SLT ISZERO PUSH2 0x3453 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP10 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x346D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x3479 DUP12 DUP3 DUP13 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP9 POP SWAP9 POP POP PUSH1 0x20 DUP10 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3498 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x34A4 DUP12 DUP3 DUP13 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP7 POP SWAP7 POP POP PUSH1 0x40 PUSH2 0x34B7 DUP12 DUP3 DUP13 ADD PUSH2 0x339F JUMP JUMPDEST SWAP5 POP POP PUSH1 0x60 PUSH2 0x34C8 DUP12 DUP3 DUP13 ADD PUSH2 0x33B4 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x80 PUSH2 0x34D9 DUP12 DUP3 DUP13 ADD PUSH2 0x338A JUMP JUMPDEST SWAP3 POP POP PUSH1 0xA0 PUSH2 0x34EA DUP12 DUP3 DUP13 ADD PUSH2 0x338A JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 SWAP1 SWAP4 SWAP7 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xE0 DUP12 DUP14 SUB SLT ISZERO PUSH2 0x3519 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3533 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x353F DUP14 DUP3 DUP15 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP11 POP SWAP11 POP POP PUSH1 0x20 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x355E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x356A DUP14 DUP3 DUP15 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP9 POP SWAP9 POP POP PUSH1 0x40 PUSH2 0x357D DUP14 DUP3 DUP15 ADD PUSH2 0x339F JUMP JUMPDEST SWAP7 POP POP PUSH1 0x60 PUSH2 0x358E DUP14 DUP3 DUP15 ADD PUSH2 0x33B4 JUMP JUMPDEST SWAP6 POP POP PUSH1 0x80 PUSH2 0x359F DUP14 DUP3 DUP15 ADD PUSH2 0x338A JUMP JUMPDEST SWAP5 POP POP PUSH1 0xA0 PUSH2 0x35B0 DUP14 DUP3 DUP15 ADD PUSH2 0x338A JUMP JUMPDEST SWAP4 POP POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x35CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x35D9 DUP14 DUP3 DUP15 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP SWAP3 SWAP6 SWAP9 SWAP12 SWAP2 SWAP5 SWAP8 SWAP11 POP SWAP3 SWAP6 SWAP9 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xA0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x3606 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP8 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3620 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x362C DUP10 DUP3 DUP11 ADD PUSH2 0x32A8 JUMP JUMPDEST SWAP7 POP SWAP7 POP POP PUSH1 0x20 PUSH2 0x363F DUP10 DUP3 DUP11 ADD PUSH2 0x339F JUMP JUMPDEST SWAP5 POP POP PUSH1 0x40 PUSH2 0x3650 DUP10 DUP3 DUP11 ADD PUSH2 0x33B4 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x60 PUSH2 0x3661 DUP10 DUP3 DUP11 ADD PUSH2 0x338A JUMP JUMPDEST SWAP3 POP POP PUSH1 0x80 PUSH2 0x3672 DUP10 DUP3 DUP11 ADD PUSH2 0x338A JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3691 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x36AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x36B7 DUP5 DUP3 DUP6 ADD PUSH2 0x32F2 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x36D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP8 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x36F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x36FF DUP10 DUP3 DUP11 ADD PUSH2 0x32F2 JUMP JUMPDEST SWAP7 POP POP PUSH1 0x20 DUP8 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x371C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x3728 DUP10 DUP3 DUP11 ADD PUSH2 0x32F2 JUMP JUMPDEST SWAP6 POP POP PUSH1 0x40 PUSH2 0x3739 DUP10 DUP3 DUP11 ADD PUSH2 0x339F JUMP JUMPDEST SWAP5 POP POP PUSH1 0x60 PUSH2 0x374A DUP10 DUP3 DUP11 ADD PUSH2 0x33B4 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x80 PUSH2 0x375B DUP10 DUP3 DUP11 ADD PUSH2 0x338A JUMP JUMPDEST SWAP3 POP POP PUSH1 0xA0 PUSH2 0x376C DUP10 DUP3 DUP11 ADD PUSH2 0x338A JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x3792 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP8 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x37AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x37B8 DUP10 DUP3 DUP11 ADD PUSH2 0x32F2 JUMP JUMPDEST SWAP7 POP POP PUSH1 0x20 PUSH2 0x37C9 DUP10 DUP3 DUP11 ADD PUSH2 0x339F JUMP JUMPDEST SWAP6 POP POP PUSH1 0x40 PUSH2 0x37DA DUP10 DUP3 DUP11 ADD PUSH2 0x33B4 JUMP JUMPDEST SWAP5 POP POP PUSH1 0x60 PUSH2 0x37EB DUP10 DUP3 DUP11 ADD PUSH2 0x338A JUMP JUMPDEST SWAP4 POP POP PUSH1 0x80 PUSH2 0x37FC DUP10 DUP3 DUP11 ADD PUSH2 0x338A JUMP JUMPDEST SWAP3 POP POP PUSH1 0xA0 PUSH2 0x380D DUP10 DUP3 DUP11 ADD PUSH2 0x327E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x382C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x383A DUP5 DUP3 DUP6 ADD PUSH2 0x3375 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x384F DUP4 DUP4 PUSH2 0x3A30 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3867 DUP4 DUP4 PUSH2 0x3A4E JUMP JUMPDEST PUSH1 0x20 DUP4 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x387C DUP2 PUSH2 0x4712 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x3893 PUSH2 0x388E DUP3 PUSH2 0x4712 JUMP JUMPDEST PUSH2 0x47BE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x38A2 DUP2 PUSH2 0x4700 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38B4 DUP4 DUP6 PUSH2 0x46BE JUMP JUMPDEST SWAP4 POP PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 GT ISZERO PUSH2 0x38E3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP4 MUL SWAP3 POP PUSH2 0x38F4 DUP4 DUP6 DUP5 PUSH2 0x4795 JUMP JUMPDEST DUP3 DUP5 ADD SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x390B DUP3 PUSH2 0x468E JUMP JUMPDEST PUSH2 0x3915 DUP2 DUP6 PUSH2 0x46BE JUMP JUMPDEST SWAP4 POP PUSH2 0x3920 DUP4 PUSH2 0x4669 JUMP JUMPDEST DUP1 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x3951 JUMPI DUP2 MLOAD PUSH2 0x3938 DUP9 DUP3 PUSH2 0x3843 JUMP JUMPDEST SWAP8 POP PUSH2 0x3943 DUP4 PUSH2 0x46A4 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x3924 JUMP JUMPDEST POP DUP6 SWAP4 POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3969 DUP3 PUSH2 0x468E JUMP JUMPDEST PUSH2 0x3973 DUP2 DUP6 PUSH2 0x46CF JUMP JUMPDEST SWAP4 POP PUSH2 0x397E DUP4 PUSH2 0x4669 JUMP JUMPDEST DUP1 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x39AF JUMPI DUP2 MLOAD PUSH2 0x3996 DUP9 DUP3 PUSH2 0x385B JUMP JUMPDEST SWAP8 POP PUSH2 0x39A1 DUP4 PUSH2 0x46A4 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x3982 JUMP JUMPDEST POP DUP6 SWAP4 POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x39C7 DUP3 PUSH2 0x4699 JUMP JUMPDEST PUSH2 0x39D1 DUP2 DUP6 PUSH2 0x46BE JUMP JUMPDEST SWAP4 POP PUSH2 0x39DC DUP4 PUSH2 0x4679 JUMP JUMPDEST DUP1 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x3A14 JUMPI PUSH2 0x39F1 DUP3 PUSH2 0x47F6 JUMP JUMPDEST PUSH2 0x39FB DUP9 DUP3 PUSH2 0x3843 JUMP JUMPDEST SWAP8 POP PUSH2 0x3A06 DUP4 PUSH2 0x46B1 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x39E0 JUMP JUMPDEST POP DUP6 SWAP4 POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x3A2A DUP2 PUSH2 0x4724 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x3A39 DUP2 PUSH2 0x4730 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x3A48 DUP2 PUSH2 0x4730 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x3A57 DUP2 PUSH2 0x4730 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x3A6E PUSH2 0x3A69 DUP3 PUSH2 0x4730 JUMP JUMPDEST PUSH2 0x47D0 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x3A7D DUP2 PUSH2 0x4771 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3A90 PUSH1 0x1C DUP4 PUSH2 0x46EB JUMP JUMPDEST SWAP2 POP PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x1C DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3AD0 PUSH1 0x2F DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x5175657374696F6E206973206E6F7420696E2074686520616E73776572656420 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x6861736865732070726F76696465640000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3B36 PUSH1 0x39 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742061707065616C206F6E206C65737320616E737765726564207175 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x657374696F6E73207468616E2073686F776E206265666F726500000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3B9C PUSH1 0xF DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x436F756C646E27742061707065616C0000000000000000000000000000000000 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3BDC PUSH1 0x19 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x5175657374696F6E2073686F756C642062652076616C69642E00000000000000 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3C1C PUSH1 0x1F DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x48617368657320617265206E6F74207369676E656420636F72726563746C7900 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3C5C PUSH1 0x31 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x5175657374696F6E206973206E6F7420696E2074686520756E616E7377657265 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x64206861736865732070726F7669646564000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3CC2 PUSH1 0x1D DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x416E737765722073686F756C64206D61746368207175657374696F6E2E000000 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3D02 PUSH1 0x2F DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x7175657374696F6E2061707065616C6564206D75737420626520696E20756E61 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x6E73776572656420686173686573730000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3D68 PUSH1 0x2A DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742070726F76696465206F6C646572206F7220646966666572656E74 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x207369676E617475726500000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3DCE PUSH1 0x2C DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742075736520746869732066756E6374696F6E207768696C65206E6F PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x742061707065616C696E672E0000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3E34 PUSH1 0x28 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742075736520746869732066756E6374696F6E207768696C65206170 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x7065616C696E672E000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3E9A PUSH1 0x24 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742075736520746869732066756E6374696F6E207768656E20616374 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x6976652E00000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3F00 PUSH1 0x25 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x4F6E6C7920616E206F776E65722063616E2063616C6C20746869732066756E63 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x74696F6E2E000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3F66 PUSH1 0x29 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x4F6E6C792074686520636F7374756D65722063616E2063616C6C207468697320 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x66756E6374696F6E2E0000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3FCC PUSH1 0x17 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x6469646E74207265616368206D61782071756572696573000000000000000000 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x400C PUSH1 0x1C DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x6469736D6973732077697468206F6C646572207369676E617475726500000000 PUSH1 0x0 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x404C PUSH1 0x28 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742075736520746869732066756E6374696F6E207768656E206E6F74 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x206163746976652E000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x40B2 PUSH1 0x28 DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742075736520746869732066756E6374696F6E207768696C65206465 PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x6D616E64696E672E000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4118 PUSH1 0x2C DUP4 PUSH2 0x46DA JUMP JUMPDEST SWAP2 POP PUSH32 0x43616E27742075736520746869732066756E6374696F6E207768696C65206E6F PUSH1 0x0 DUP4 ADD MSTORE PUSH32 0x742064656D616E64696E672E0000000000000000000000000000000000000000 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x417A DUP2 PUSH2 0x475A JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x4191 PUSH2 0x418C DUP3 PUSH2 0x475A JUMP JUMPDEST PUSH2 0x47EC JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x41A0 DUP2 PUSH2 0x4764 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x41B2 DUP3 DUP5 PUSH2 0x395E JUMP JUMPDEST SWAP2 POP DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x41C9 DUP3 DUP7 PUSH2 0x395E JUMP JUMPDEST SWAP2 POP PUSH2 0x41D5 DUP3 DUP6 PUSH2 0x4180 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0x41E5 DUP3 DUP5 PUSH2 0x3882 JUMP JUMPDEST PUSH1 0x14 DUP3 ADD SWAP2 POP DUP2 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4201 DUP3 PUSH2 0x3A83 JUMP JUMPDEST SWAP2 POP PUSH2 0x420D DUP3 DUP5 PUSH2 0x3A5D JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP2 POP DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x4231 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x3899 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x424C PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x3873 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x426D DUP2 DUP7 DUP9 PUSH2 0x38A8 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x4282 DUP2 DUP5 DUP7 PUSH2 0x38A8 JUMP JUMPDEST SWAP1 POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x42A7 DUP2 DUP5 PUSH2 0x3900 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x42C9 DUP2 DUP7 PUSH2 0x39BC JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x42DE DUP2 DUP5 DUP7 PUSH2 0x38A8 JUMP JUMPDEST SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x42FD PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x3A21 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x4318 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x3A3F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 ADD SWAP1 POP PUSH2 0x4333 PUSH1 0x0 DUP4 ADD DUP8 PUSH2 0x3A3F JUMP JUMPDEST PUSH2 0x4340 PUSH1 0x20 DUP4 ADD DUP7 PUSH2 0x4197 JUMP JUMPDEST PUSH2 0x434D PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x3A3F JUMP JUMPDEST PUSH2 0x435A PUSH1 0x60 DUP4 ADD DUP5 PUSH2 0x3A3F JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x4378 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x3A74 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4397 DUP2 PUSH2 0x3AC3 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x43B7 DUP2 PUSH2 0x3B29 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x43D7 DUP2 PUSH2 0x3B8F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x43F7 DUP2 PUSH2 0x3BCF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4417 DUP2 PUSH2 0x3C0F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4437 DUP2 PUSH2 0x3C4F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4457 DUP2 PUSH2 0x3CB5 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4477 DUP2 PUSH2 0x3CF5 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4497 DUP2 PUSH2 0x3D5B JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x44B7 DUP2 PUSH2 0x3DC1 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x44D7 DUP2 PUSH2 0x3E27 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x44F7 DUP2 PUSH2 0x3E8D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4517 DUP2 PUSH2 0x3EF3 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4537 DUP2 PUSH2 0x3F59 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4557 DUP2 PUSH2 0x3FBF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4577 DUP2 PUSH2 0x3FFF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x4597 DUP2 PUSH2 0x403F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x45B7 DUP2 PUSH2 0x40A5 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x45D7 DUP2 PUSH2 0x410B JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x45F3 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x4171 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x460E PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x4197 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP DUP2 DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x4637 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x40 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x4658 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP3 MUL SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP DUP2 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x470B DUP3 PUSH2 0x473A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x471D DUP3 PUSH2 0x473A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 ISZERO ISZERO SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x477C DUP3 PUSH2 0x4783 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x478E DUP3 PUSH2 0x473A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x47B7 PUSH2 0x47B2 DUP4 PUSH2 0x4816 JUMP JUMPDEST PUSH2 0x46F6 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x47C9 DUP3 PUSH2 0x47DA JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x47E5 DUP3 PUSH2 0x4809 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4802 DUP3 SLOAD PUSH2 0x47A4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x60 SHL SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 SHR SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x482C DUP2 PUSH2 0x4700 JUMP JUMPDEST DUP2 EQ PUSH2 0x4837 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x4843 DUP2 PUSH2 0x4712 JUMP JUMPDEST DUP2 EQ PUSH2 0x484E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x485A DUP2 PUSH2 0x4724 JUMP JUMPDEST DUP2 EQ PUSH2 0x4865 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x4871 DUP2 PUSH2 0x4730 JUMP JUMPDEST DUP2 EQ PUSH2 0x487C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x4888 DUP2 PUSH2 0x475A JUMP JUMPDEST DUP2 EQ PUSH2 0x4893 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x489F DUP2 PUSH2 0x4764 JUMP JUMPDEST DUP2 EQ PUSH2 0x48AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 0xDC SDIV 0xE4 0xE1 PC 0xA5 CODESIZE 0xE1 0xB5 PUSH21 0x1A373D911FE531827E01D1A10CB626A9ADEE6B6D17 0xC8 PUSH13 0x6578706572696D656E74616CF5 PUSH5 0x736F6C6343 STOP SDIV GT STOP BLOCKHASH ",
"sourceMap": "146:15668:0:-;;;4605:590;8:9:-1;5:2;;;30:1;27;20:12;5:2;4605:590:0;;;;;;;;;;;;;;;;;;;;;;;;4799:10;4788:8;;:21;;;;;;;;;;;;;;;;;;4824:9;4813:8;;:20;;;;;;;;;;;;;;;;;;4857:18;4837:17;:38;;;;4886:5;4879:4;:12;;;;4916:19;4895:18;:40;;;;4961:10;4939:9;;:33;;;;;;;;;;;;;;;;;;4993:12;4979:11;:26;;;;5035:1;5012:20;:24;;;;5068:1;5040:25;:29;;;;5095:1;5073:19;:23;;;;5119:1;5100:16;:20;;;;5143:1;5124:16;:20;;;;5163:1;5148:12;:16;;;;5186:5;5168:15;;:23;;;;;;;;;;;;;;;;;;4605:590;;;;;;146:15668;;5:134:-1;;89:6;83:13;74:22;;101:33;128:5;101:33;;;68:71;;;;;146:150;;238:6;232:13;223:22;;250:41;285:5;250:41;;;217:79;;;;;303:134;;387:6;381:13;372:22;;399:33;426:5;399:33;;;366:71;;;;;444:962;;;;;;;652:3;640:9;631:7;627:23;623:33;620:2;;;669:1;666;659:12;620:2;704:1;721:72;785:7;776:6;765:9;761:22;721:72;;;711:82;;683:116;830:2;848:64;904:7;895:6;884:9;880:22;848:64;;;838:74;;809:109;949:2;967:64;1023:7;1014:6;1003:9;999:22;967:64;;;957:74;;928:109;1068:2;1086:64;1142:7;1133:6;1122:9;1118:22;1086:64;;;1076:74;;1047:109;1187:3;1206:64;1262:7;1253:6;1242:9;1238:22;1206:64;;;1196:74;;1166:110;1307:3;1326:64;1382:7;1373:6;1362:9;1358:22;1326:64;;;1316:74;;1286:110;614:792;;;;;;;;;1413:91;;1475:24;1493:5;1475:24;;;1464:35;;1458:46;;;;1511:99;;1581:24;1599:5;1581:24;;;1570:35;;1564:46;;;;1617:121;;1690:42;1683:5;1679:54;1668:65;;1662:76;;;;1745:72;;1807:5;1796:16;;1790:27;;;;1824:117;1893:24;1911:5;1893:24;;;1886:5;1883:35;1873:2;;1932:1;1929;1922:12;1873:2;1867:74;;1948:133;2025:32;2051:5;2025:32;;;2018:5;2015:43;2005:2;;2072:1;2069;2062:12;2005:2;1999:82;;2088:117;2157:24;2175:5;2157:24;;;2150:5;2147:35;2137:2;;2196:1;2193;2186:12;2137:2;2131:74;;146:15668:0;;;;;;;"
}
class Signer:
@staticmethod
def hash(s):
return w3.soliditySha3(['bytes32[]'], [s])
@staticmethod
def get_v_r_s(sig):
if type(sig) == tuple:
return sig
v,r,s = w3.toInt(sig[-1]+27), w3.toHex(sig[:32]), w3.toHex(sig[32:64])
return v,r,s
@staticmethod
def check_sig(questions_hashes, unanswered, contract_address, sig, signerPubKey):
h1 = w3.soliditySha3(['bytes32[]', 'uint256', 'address'],
[questions_hashes, unanswered, contract_address])
msg_hash = eth_account.messages.defunct_hash_message(h1)
if type(sig) is tuple:
v,r,s = sig
contract = w3.eth.contract(
address=contract_address,
abi=SUBSCRIPTION_ABI,
)
return contract.functions.verifySig(questions_hashes, unanswered, v, r, s, signerPubKey)
else:
return w3.eth.account.recoverHash(msg_hash, signature=sig) == signerPubKey
@staticmethod
def sign(questions_hashes, unanswered, contract_address, signer_account):
#print("Signing: ", questions_hashes, unanswered, contract_address)
msg_hash = w3.soliditySha3(['bytes32[]', 'uint256', 'address'],
[questions_hashes, unanswered, contract_address])
return w3.eth.sign(signer_account, msg_hash)
def bytes_to_str(chunk):
if type(chunk) is not list:
return chunk.hex()
ret = []
for c in chunk:
ret.append(c.hex())
return ret
def str_to_bytes(chunk):
if type(chunk) is not list:
ret = None
try:
ret = bytes.fromhex(chunk)
except:
ret = bytes.fromhex(chunk[2:])
return ret
ret = []
for c in chunk:
try:
ret.append(bytes.fromhex(c))
except:
ret.append(bytes.fromhex(c[2:]))
return ret
def dict_to_bytes(d):
s = json.dumps(d)
s += " "*(BLOCKLEN - (len(s) % BLOCKLEN))
return s.encode('utf-8')
def bytes_to_dict(b):
d = json.loads(b.decode('utf-8'))
return d
def int_to_bytes(x: int) -> bytes:
return x.to_bytes(BLOCKLEN, 'big')
def bytes_to_int(xbytes: bytes) -> int:
return int.from_bytes(xbytes, 'big')
def receive_dict(conn):
data = conn.recv(BLOCKLEN)
#print("LenData: " + str(data))
if (not data) or data == b'':
#print("ERROR: not data")
return None
length = bytes_to_int(data)
total_len = 0
bdict = bytes()
while total_len < length:
data = conn.recv(BLOCKLEN)
if (not data) or data == b'':
#print("ERROR: not data")
return None
#print("Data: " + str(data))
total_len += len(data)
bdict += data
return bytes_to_dict(bdict)
def send_dict(conn, d):
bdict = dict_to_bytes(d)
conn.sendall(int_to_bytes(len(bdict)))
conn.sendall(bdict)
class QA:
# receives encoded
def __init__(self, question, answer=None, asker=None):
self.question = question
self.answer = answer
self.hash = Signer.hash(question)
self.asker = asker
def is_answered(self):
return self.answer is not None
def get_asker(self):
return self.asker
def get_hash(self):
return self.hash
def get_question(self):
return self.question
def get_answer(self):
return self.answer
def set_answer(self, answer):
self.answer = answer
class Appeal:
def __init__(self, eos_block, question, ack, address = None):
self.eos_block = eos_block
self.question = question
self.ack = ack
self.address = address
def get_question(self):
return self.question
def get_end_of_service_block(self):
return self.eos_block
def get_ack(self):
return self.ack
def get_customer_address(self):
return self.address
class Ack:
def __init__(self, _hashes, _unanswered, _signature):
self.hashes = _hashes
self.unanswered = _unanswered
self.signature = _signature
def get_all(self):
return self.hashes, self.unanswered, self.signature
def get_hashes(self):
return self.hashes
def get_unanswered_hashes(self):
if self.unanswered == 0:
return []
return self.hashes[-self.unanswered:]
def get_answered_hashes(self):
if self.unanswered == 0:
return self.hashes
return self.hashes[:-self.unanswered]
def is_newer_than(self, other):
if other is None:
return True
other_answered = other.get_answered_hashes()
for h in other_answered:
if h not in self.get_answered_hashes():
return False
other_unanswered = other.get_unanswered_hashes()
for h in other_unanswered:
if h not in self.get_hashes():
return False
return True
def is_different(self, other):
return not (self.is_newer_than(other) or other.is_newer_than(self))
class Validator: # This class validates answers and questions of all problem types.
# Questions and answers should be encoded.
def __init__(self, validator_address):
self.contract = w3.eth.contract(
address = validator_address,
abi = VALIDATOR_ABI)
def is_valid_question(self, question):
return self.contract.functions.is_valid_question(question).call()
def is_answer_correct(self, question, answer):
return self.contract.functions.is_answer_correct(question, answer).call()
class Provider: # This class is intended for the provider to interact with the blockchain.
# It doesn't do any computing itself, and doesn't interact with the customers.
def __init__(self, address, validator_address):
# creates the validator contract
self.address = address
self.validator_address = validator_address
self.validator = Validator(validator_address)
self.channels = {}
def get_contract_address(self, customer_address):
contract = self.channels[customer_address]
return contract.address
def get_validator(self):
return self.validator
def get_customers(self):
return self.channels.keys()
def create_subscription(self, customer_address):
# creates a single subscription contract, returns contract address
# uses the constants in the beginning of this file
# Should hold a list/dict of all subscriptions by customer address
service_contract = w3.eth.contract(
abi = SUBSCRIPTION_ABI,
bytecode= SUBSCRIPTION_SOL["object"])
txn_dict = {
'from': self.address,
}
tx_hash = service_contract.constructor(customer_address, APPEAL_PERIOD, SUBSCRIPTION_COST, SUBSCRIPTION_PERIOD, self.validator_address, MAX_QUERIES).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
contract = w3.eth.contract(
address=tx_receipt.contractAddress,
abi = SUBSCRIPTION_ABI
)
self.channels[customer_address] = contract
return contract.address
def is_subscription_active(self, customer_address):
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
status = contract.functions.is_active().call(txn_dict)
return status
def check_for_appeal(self, customer_address):
# returns None or a question appealed by the specified customer
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
appeal_status = contract.functions.is_customer_appealing().call(txn_dict)
if not appeal_status:
return None
eos_block = contract.functions.get_end_of_service_block().call(txn_dict)
question = contract.functions.get_question_appealed().call(txn_dict)
hashes = contract.functions.get_question_hashes_demanded().call(txn_dict)
unanswered = contract.functions.get_unanswered_demanded().call(txn_dict)
v = contract.functions.get_v_provided().call(txn_dict)
r = contract.functions.get_r_provided().call(txn_dict)
s = contract.functions.get_s_provided().call(txn_dict)
ack = Ack(hashes, unanswered, (v,r,s))
appeal = Appeal(eos_block, question, ack, address=customer_address)
return appeal
def resolve_appeal(self, customer_address, answer):
# submit answer to resolve appeal by the specified customer
#print("Resolving: ", answer)
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
#print("Resolving with:",answer)
tx_hash = contract.functions.resolve(answer).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
def dismiss_appeal(self, customer_address, questions_hashes, unanswered, signature):
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
v, r, s = Signer.get_v_r_s(signature)
tx_hash = contract.functions.dismiss(questions_hashes, unanswered, v, r, s).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
def demand_signature(self, customer_address, question, questions_hashes, unanswered, signature, answer):
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
is_provider_demanding = contract.functions.is_provider_demanding().call(txn_dict)
if is_provider_demanding:
return False
v, r, s = Signer.get_v_r_s(signature)
tx_hash = contract.functions.demand_signature(question, questions_hashes, unanswered, v, r, s, answer).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
return True
def exec_demand(self, customer_address):
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
if(contract.functions.can_exec_demand().call(txn_dict)):
tx_hash = contract.functions.exec_demand().transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
ret = contract.functions.is_active().call(txn_dict)
return not ret
return False
def overflow(self, customer_address, questions_hashes, unanswered, signature):
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
v, r, s = Signer.get_v_r_s(signature)
tx_hash = contract.functions.overflow(questions_hashes, unanswered, v, r, s).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
def check_demand(self, customer_address):
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
is_provider_demanding = contract.functions.is_provider_demanding().call(txn_dict)
if is_provider_demanding:
return None
hashes = contract.functions.get_question_hashes_demanded().call(txn_dict)
unanswered = contract.functions.get_unanswered_demanded().call(txn_dict)
v = contract.functions.get_v_provided().call(txn_dict)
r = contract.functions.get_r_provided().call(txn_dict)
s = contract.functions.get_s_provided().call(txn_dict)
return hashes, unanswered, (v,r,s)
def withdraw(self, customer_address):
# withdraws money from the subscription of the specified customer
contract = self.channels[customer_address]
txn_dict = {
'from': self.address,
}
amount = contract.functions.withdraw_funds_amount().call(txn_dict);
if amount > 0:
tx_hash = contract.functions.withdraw_funds(self.address).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
return amount
class Customer: # This class is intended for the customer to interact with the blockchain.
# It doesn't generate any questions, and doesn't interact with the provider.
def __init__(self, address):
self.address = address
self.contract = None
self.validator = None
def is_subscription_active(self):
txn_dict = {
'from': self.address,
}
status = self.contract.functions.is_active().call(txn_dict)
return status
def get_validator(self):
return self.validator
def join_subscription(self, subscription_address):
self.contract = w3.eth.contract(
address=subscription_address,
abi=SUBSCRIPTION_ABI,
)
txn_dict = {
'from': self.address,
'value': SUBSCRIPTION_COST,
}
tx_hash = self.contract.functions.activate().transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
self.validator = Validator(self.get_validator_address())
def get_validator_address(self):
txn_dict = {
'from': self.address,
}
address = self.contract.functions.get_validator_address().call(txn_dict)
return address
def check_demand(self):
txn_dict = {
'from': self.address,
}
if not self.is_subscription_active():
return None
is_provider_demanding = self.contract.functions.is_provider_demanding().call(txn_dict)
if not is_provider_demanding:
return None
question = self.contract.functions.get_question_demanded().call(txn_dict)
answer = self.contract.functions.get_answer_demanded().call(txn_dict)
return question, answer
def provide_signature(self, questions_hashes, unanswered, signature):
txn_dict = {
'from': self.address,
}
if not self.is_subscription_active():
return False
v, r, s = Signer.get_v_r_s(signature)
tx_hash = self.contract.functions.provide_signature(questions_hashes, unanswered, v, r, s).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
return True
def appeal(self, question, questions_hashes, unanswered, signature):
txn_dict = {
'from': self.address,
}
if not self.is_subscription_active():
print("Couldn't appeal: subscription not active")
return False
v, r, s = Signer.get_v_r_s(signature)
#print("Appealing with:",question, questions_hashes, unanswered, v, r, s)
#print(type(question), type(questions_hashes), type(unanswered), type(v), type(r), type(s))
try:
x = self.contract.functions.try_appeal(question, questions_hashes, unanswered, v, r, s).call(txn_dict)
if not x:
raise Exception("Appeal failed.")
except Exception as e:
print("Coundnt appeal:",e)
return False
tx_hash = self.contract.functions.appeal(question, questions_hashes, unanswered, v, r, s).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
return True
def check_appeal(self):
txn_dict = {
'from': self.address,
}
if not self.is_subscription_active():
return None
appeal_status = self.contract.functions.is_customer_appealing().call(txn_dict)
if appeal_status:
return None
answer = self.contract.functions.get_answer_resolved().call(txn_dict)
return answer
def get_question_appealed(self):
if not self.is_subscription_active():
return None
txn_dict = {
'from': self.address,
}
return self.contract.functions.get_question_appealed().call(txn_dict)
def withdraw(self):
txn_dict = {
'from': self.address,
}
amount = self.contract.functions.withdraw_funds_amount().call(txn_dict);
if amount > 0:
tx_hash = self.contract.functions.withdraw_funds(self.address).transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
return amount
def wait_k_blocks(k: int, sleep_interval: int = 2):
start = w3.eth.blockNumber
time.sleep(sleep_interval)
while w3.eth.blockNumber < start + k:
time.sleep(sleep_interval)
def Scene_1(address1, address2):
print("Creating Validator contract...")
ValidatorContract = w3.eth.contract(
abi = VALIDATOR_ABI,
bytecode=VALIDATOR_SOL["object"])
txn_dict = {'from': address1}
tx_hash = ValidatorContract.constructor().transact(txn_dict)
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
validator_address = tx_receipt.contractAddress
customer = Customer(address1)
provider = Provider(address2, validator_address)
print("Creating Subscription contract...")
sub_address = provider.create_subscription(address1)
customer.join_subscription(sub_address)
for i in range(3):
# Customer running
question = Solver.generate()
print("Customer: Appealing for question:", question)
customer.appeal(question)
print("Customer: Checking for appeal...")
question = customer.check_appeal()
print("Got: ", question)
wait_k_blocks(1)
# Provider running
print("Provider: Checking for appeal...")
appeal = provider.check_for_appeal(address1)
if appeal is None:
print("ERROR: coudn't find an appeal")
return -1
question = appeal[1]
print("Provider: Found appeal for question:", question)
answer = Solver.solve(question)
print("Provider: Resolving appeal with answer:", answer)
provider.resolve_appeal(address1, answer)
question = provider.check_for_appeal(address1)
if question is not None:
print("ERROR: appeal still active")
return -1
# Customer running
print("Customer: Checking appeal...")
answer = customer.check_appeal()
if answer is None:
print("ERROR: appeal didn't resolve")
return -1
c = Coder.decode_answer(answer)
print("Customer: found answer: " + str(c))
print("~~~\n")
if __name__ == "__main__":
address1 = "0x2577d3ceb68148E2e22A314ad99A26B67A7F26EC"
address2 = "0x8408861D0C5cf6b52Eb7c799D1C0B05365FF65cd"
Scene_1(address1, address2)
| 123.192789
| 86,308
| 0.786577
| 17,147
| 167,419
| 7.648452
| 0.087537
| 0.050233
| 0.036165
| 0.021197
| 0.55352
| 0.52944
| 0.502104
| 0.487381
| 0.44921
| 0.43258
| 0
| 0.371123
| 0.17894
| 167,419
| 1,358
| 86,309
| 123.283505
| 0.582951
| 0.007693
| 0
| 0.54322
| 0
| 0.001586
| 0.895875
| 0.308944
| 0
| 1
| 0.130025
| 0
| 0
| 1
| 0.048374
| false
| 0
| 0.006344
| 0.01586
| 0.11816
| 0.012688
| 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
| 0
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4a7074bc45cb9295a8548a5aaac51d7c6e07607a
| 91
|
py
|
Python
|
build/lib.linux-x86_64-2.7/error_generator/strategies/typos/__init__.py
|
BigDaMa/error-generator
|
7d8949fc8fb00b6285c7c220dbda7451dc152e44
|
[
"Apache-2.0"
] | 2
|
2018-11-11T07:52:51.000Z
|
2019-06-19T05:44:55.000Z
|
build/lib.linux-x86_64-2.7/error_generator/strategies/typos/__init__.py
|
BigDaMa/error-generator
|
7d8949fc8fb00b6285c7c220dbda7451dc152e44
|
[
"Apache-2.0"
] | 5
|
2018-07-20T15:08:23.000Z
|
2018-11-21T13:18:01.000Z
|
error_generator/strategies/typos/__init__.py
|
BigDaMa/error-generator
|
7d8949fc8fb00b6285c7c220dbda7451dc152e44
|
[
"Apache-2.0"
] | 1
|
2020-11-25T15:16:16.000Z
|
2020-11-25T15:16:16.000Z
|
from .typo_keyboard import Typo_Keyboard
from .typo_butterfingers import Typo_Butterfingers
| 45.5
| 50
| 0.901099
| 12
| 91
| 6.5
| 0.416667
| 0.205128
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 91
| 2
| 50
| 45.5
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
43699e0415eba55b47d3486a88f60f2681c11386
| 18
|
py
|
Python
|
__init__.py
|
gitbugr/s4c-anki-plugin
|
b212abb4142b232bf8e2ee79b9069da2f997edd0
|
[
"Unlicense"
] | null | null | null |
__init__.py
|
gitbugr/s4c-anki-plugin
|
b212abb4142b232bf8e2ee79b9069da2f997edd0
|
[
"Unlicense"
] | null | null | null |
__init__.py
|
gitbugr/s4c-anki-plugin
|
b212abb4142b232bf8e2ee79b9069da2f997edd0
|
[
"Unlicense"
] | null | null | null |
from . import s4c
| 9
| 17
| 0.722222
| 3
| 18
| 4.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.222222
| 18
| 1
| 18
| 18
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4381272cc7d2c76beb3168084ddc3915b1a73136
| 56
|
py
|
Python
|
update_cache.py
|
szabgab/python-maven.com
|
600077745ba83d222c72a76094142d03ec8a1f05
|
[
"MIT"
] | 18
|
2016-05-09T05:03:54.000Z
|
2022-02-20T19:39:48.000Z
|
update_cache.py
|
szabgab/python-maven.com
|
600077745ba83d222c72a76094142d03ec8a1f05
|
[
"MIT"
] | 73
|
2016-10-26T14:59:41.000Z
|
2022-02-20T08:48:57.000Z
|
update_cache.py
|
szabgab/python-maven.com
|
600077745ba83d222c72a76094142d03ec8a1f05
|
[
"MIT"
] | 6
|
2016-04-29T12:31:28.000Z
|
2022-02-20T08:58:40.000Z
|
from PyDigger.common import update_cache
update_cache()
| 18.666667
| 40
| 0.857143
| 8
| 56
| 5.75
| 0.75
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089286
| 56
| 2
| 41
| 28
| 0.901961
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
43850536b034c235e3edfbe811dde10d29ea917e
| 736
|
py
|
Python
|
repos/fdbt-reference-data-service/src/uploaders/tests/test_csv_uploader.py
|
fares-data-build-tool/create-data
|
d4e73228e76a4c6dc24ef8ed78c73cc62cf45c77
|
[
"MIT"
] | 6
|
2021-06-22T09:01:17.000Z
|
2022-03-04T12:48:25.000Z
|
repos/fdbt-reference-data-service/src/uploaders/tests/test_csv_uploader.py
|
fares-data-build-tool/create-data
|
d4e73228e76a4c6dc24ef8ed78c73cc62cf45c77
|
[
"MIT"
] | 18
|
2021-08-04T09:23:10.000Z
|
2022-02-18T10:07:18.000Z
|
src/uploaders/tests/test_csv_uploader.py
|
fares-data-build-tool/fdbt-reference-data-service
|
d60506edf24c723a7d56a7ff7b6586f1c1e9989d
|
[
"MIT"
] | 1
|
2021-06-30T16:27:27.000Z
|
2021-06-30T16:27:27.000Z
|
from csv_uploader.db_queries import *
class TestClass:
def test_public_name_bucket_insertion(self):
bucket = 'unit-test-bucket'
result = public_name_query(bucket)
assert result[2].__contains__(bucket)
def test_noc_table_bucket_insertion(self):
bucket = 'unit-test-bucket'
result = noc_table_query(bucket)
assert result[2].__contains__(bucket)
def test_noc_lines_bucket_insertion(self):
bucket = 'unit-test-bucket'
result = noc_lines_query(bucket)
assert result[2].__contains__(bucket)
def test_stops_bucket_insertion(self):
bucket = 'unit-test-bucket'
result = stops_query(bucket)
assert result[2].__contains__(bucket)
| 30.666667
| 48
| 0.6875
| 90
| 736
| 5.177778
| 0.277778
| 0.060086
| 0.16309
| 0.214592
| 0.783262
| 0.783262
| 0.783262
| 0.701717
| 0.508584
| 0.206009
| 0
| 0.006981
| 0.221467
| 736
| 23
| 49
| 32
| 0.806283
| 0
| 0
| 0.444444
| 0
| 0
| 0.086957
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.222222
| false
| 0
| 0.055556
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
43867a999b01cd7d7aedf5fb68f033ed472c6556
| 1,361
|
py
|
Python
|
tests/vds.py
|
FidelityInternational/nsxramlclient
|
002aca6cf1151afad66c9a4c6384646a86ee29f3
|
[
"MIT"
] | 44
|
2015-09-03T11:50:01.000Z
|
2019-12-09T18:11:03.000Z
|
tests/vds.py
|
FidelityInternational/nsxramlclient
|
002aca6cf1151afad66c9a4c6384646a86ee29f3
|
[
"MIT"
] | 18
|
2015-11-08T16:34:56.000Z
|
2019-10-18T21:17:05.000Z
|
tests/vds.py
|
FidelityInternational/nsxramlclient
|
002aca6cf1151afad66c9a4c6384646a86ee29f3
|
[
"MIT"
] | 36
|
2015-09-24T02:06:19.000Z
|
2020-09-28T08:34:41.000Z
|
# coding=utf-8
#
# Copyright © 2015 VMware, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
# to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions
# of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
# TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
__author__ = 'yfauser'
from tests.config import *
from nsxramlclient.client import NsxClient
import time
client_session = NsxClient(nsxraml_file, nsxmanager, nsx_username, nsx_password, debug=True)
#TODO: add tests for all vds operations
| 48.607143
| 115
| 0.786187
| 206
| 1,361
| 5.160194
| 0.587379
| 0.082785
| 0.024459
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004378
| 0.160911
| 1,361
| 28
| 116
| 48.607143
| 0.925569
| 0.824394
| 0
| 0
| 0
| 0
| 0.031674
| 0
| 0
| 0
| 0
| 0.035714
| 0
| 1
| 0
| false
| 0.2
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
78deaafb13727de67f7c66ad21b488f2b892dd1b
| 74
|
py
|
Python
|
fileconversions/conversions/odt_to_pdf_conversion.py
|
wilbertom/fileconversions
|
c48fda9b2804524fc57d1f6963d09645825b0da6
|
[
"MIT"
] | null | null | null |
fileconversions/conversions/odt_to_pdf_conversion.py
|
wilbertom/fileconversions
|
c48fda9b2804524fc57d1f6963d09645825b0da6
|
[
"MIT"
] | null | null | null |
fileconversions/conversions/odt_to_pdf_conversion.py
|
wilbertom/fileconversions
|
c48fda9b2804524fc57d1f6963d09645825b0da6
|
[
"MIT"
] | null | null | null |
from .conversion import Conversion
class OdtToPdf(Conversion):
pass
| 12.333333
| 34
| 0.77027
| 8
| 74
| 7.125
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175676
| 74
| 5
| 35
| 14.8
| 0.934426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
60052b06aadb653d150317a7e3d95bd7854451f4
| 4,492
|
py
|
Python
|
scripts/data/training_set_20sims.py
|
finn-dodgson/DeepHalos
|
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
|
[
"MIT"
] | 2
|
2021-07-26T10:56:33.000Z
|
2021-12-20T17:30:53.000Z
|
scripts/data/training_set_20sims.py
|
finn-dodgson/DeepHalos
|
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
|
[
"MIT"
] | 1
|
2021-11-25T21:01:19.000Z
|
2021-12-05T01:40:53.000Z
|
scripts/data/training_set_20sims.py
|
finn-dodgson/DeepHalos
|
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
|
[
"MIT"
] | 1
|
2021-11-27T02:35:10.000Z
|
2021-11-27T02:35:10.000Z
|
import dlhalos_code.data_processing as tn
from pickle import dump
import numpy as np
if __name__ == "__main__":
path_random = "/mnt/beegfs/work/ati/pearl037/regression/training_set_13.4/20sims/random/"
path_uniform = "/mnt/beegfs/work/ati/pearl037/regression/training_set_13.4/20sims/uniform/"
path_sims = "/mnt/beegfs/work/ati/pearl037/"
all_sims = ["%i" % i for i in np.arange(22)]
all_sims.remove("3")
all_sims.remove("6")
all_sims.append("6")
s = tn.SimulationPreparation(all_sims, path=path_sims)
train_sims = all_sims[:-1]
val_sim = all_sims[-1]
# Save training sets sampled at random from 9 simulations, with n=200,000
n_samples = 200000
saving_path = path_random + "200k/"
training_set = tn.InputsPreparation(train_sims, shuffle=True, scaler_type="minmax", return_rescaled_outputs=True,
output_range=(-1, 1), log_high_mass_limit=13.4,
load_ids=False, random_subset_each_sim=None,
random_style="random", random_subset_all=n_samples,
path=path_sims)
dump(training_set.particle_IDs, open(saving_path + 'training_set.pkl', 'wb'))
dump(training_set.labels_particle_IDS, open(saving_path + 'labels_training_set.pkl', 'wb'))
dump(training_set.scaler_output, open(saving_path + 'scaler_output.pkl', 'wb'))
v_set = tn.InputsPreparation([val_sim], scaler_type="minmax", load_ids=False, shuffle=True,
random_style="random", log_high_mass_limit=13.4,
random_subset_all=5000, random_subset_each_sim=1000000,
scaler_output=training_set.scaler_output, path=path_sims)
dump(v_set.particle_IDs, open(saving_path + 'validation_set.pkl', 'wb'))
dump(v_set.labels_particle_IDS, open(saving_path + 'labels_validation_set.pkl', 'wb'))
v_set2 = tn.InputsPreparation([val_sim], scaler_type="minmax", load_ids=False, log_high_mass_limit=13.4,
random_style="random", random_subset_all=50000, random_subset_each_sim=1000000,
scaler_output=training_set.scaler_output, path=path_sims)
dump(v_set2.particle_IDs, open(saving_path + 'larger_validation_set.pkl', 'wb'))
dump(v_set2.labels_particle_IDS, open(saving_path + 'larger_labels_validation_set.pkl', 'wb'))
del saving_path
del n_samples
del training_set
del v_set
del v_set2
# Save training sets sampled uniformly from 80 bins, with n=4000 per mass bin
saving_path = path_uniform + "5k_in_each_80bins/"
n_samples = 5000
training_set = tn.InputsPreparation(train_sims, shuffle=True, scaler_type="minmax", return_rescaled_outputs=True,
output_range=(-1, 1), load_ids=False, random_subset_each_sim=None,
log_high_mass_limit=13.4,
random_style="uniform", num_per_mass_bin=n_samples, num_bins=80,
path=path_sims)
dump(training_set.particle_IDs, open(saving_path + 'training_set.pkl', 'wb'))
dump(training_set.labels_particle_IDS, open(saving_path + 'labels_training_set.pkl', 'wb'))
dump(training_set.scaler_output, open(saving_path + 'scaler_output.pkl', 'wb'))
v_set = tn.InputsPreparation([val_sim], scaler_type="minmax", load_ids=False, shuffle=True,
random_style="random", random_subset_all=5000, random_subset_each_sim=1000000,
log_high_mass_limit=13.4,
scaler_output=training_set.scaler_output, path=path_sims)
dump(v_set.particle_IDs, open(saving_path + 'validation_set.pkl', 'wb'))
dump(v_set.labels_particle_IDS, open(saving_path + 'labels_validation_set.pkl', 'wb'))
v_set2 = tn.InputsPreparation([val_sim], scaler_type="minmax", load_ids=False,
log_high_mass_limit=13.4, random_style="random", random_subset_all=50000,
random_subset_each_sim=1000000,
scaler_output=training_set.scaler_output, path=path_sims)
dump(v_set2.particle_IDs, open(saving_path + 'larger_validation_set.pkl', 'wb'))
dump(v_set2.labels_particle_IDS, open(saving_path + 'larger_labels_validation_set.pkl', 'wb'))
| 54.780488
| 117
| 0.648486
| 590
| 4,492
| 4.566102
| 0.176271
| 0.07758
| 0.072754
| 0.093541
| 0.790275
| 0.781366
| 0.755382
| 0.74833
| 0.71121
| 0.687454
| 0
| 0.039042
| 0.247329
| 4,492
| 81
| 118
| 55.45679
| 0.757764
| 0.032725
| 0
| 0.419355
| 0
| 0.032258
| 0.14424
| 0.089171
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.048387
| 0
| 0.048387
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
606f92f5b05e4f9f4a20ba0b3a844ea83cbfc939
| 119
|
py
|
Python
|
src/modules_packages/MyMainPackage/SubPackage/my_sub_script.py
|
sachithdickwella/python-tute
|
42583d04db0ab907288b9bef0b022730eec0aa7d
|
[
"Apache-2.0"
] | null | null | null |
src/modules_packages/MyMainPackage/SubPackage/my_sub_script.py
|
sachithdickwella/python-tute
|
42583d04db0ab907288b9bef0b022730eec0aa7d
|
[
"Apache-2.0"
] | null | null | null |
src/modules_packages/MyMainPackage/SubPackage/my_sub_script.py
|
sachithdickwella/python-tute
|
42583d04db0ab907288b9bef0b022730eec0aa7d
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
def sub_report():
print("Hey, I'm a function inside my subscript.")
| 23.8
| 53
| 0.630252
| 19
| 119
| 3.894737
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020202
| 0.168067
| 119
| 5
| 53
| 23.8
| 0.727273
| 0.361345
| 0
| 0
| 0
| 0
| 0.533333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
60a487f4568c25e6cf903ff9eaa4a51900dd0786
| 103
|
py
|
Python
|
day2/list.py
|
zhenchengit/pynet_test
|
b8e8a3477c6886f23f93f8d9923a5b1c03a5fc97
|
[
"Apache-2.0"
] | null | null | null |
day2/list.py
|
zhenchengit/pynet_test
|
b8e8a3477c6886f23f93f8d9923a5b1c03a5fc97
|
[
"Apache-2.0"
] | null | null | null |
day2/list.py
|
zhenchengit/pynet_test
|
b8e8a3477c6886f23f93f8d9923a5b1c03a5fc97
|
[
"Apache-2.0"
] | null | null | null |
# list = range(1,50)
for i in range(1,50):
if i!=13: print i
if i==39:
print ("stop")
break
| 11.444444
| 21
| 0.543689
| 21
| 103
| 2.666667
| 0.619048
| 0.214286
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 0.271845
| 103
| 8
| 22
| 12.875
| 0.613333
| 0.174757
| 0
| 0
| 0
| 0
| 0.04878
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.4
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
60be22fbd4bfca6654336da5a65e63de133cc519
| 134
|
py
|
Python
|
vigobusbot/telegram_bot/services/generic_request_handler/__init__.py
|
David-Lor/VigoBus-TelegramBot
|
2cbba9a6565e7f8c92953e79b9ca4247d53f4b33
|
[
"Apache-2.0"
] | 8
|
2019-07-18T21:33:04.000Z
|
2022-03-26T15:07:14.000Z
|
vigobusbot/telegram_bot/services/generic_request_handler/__init__.py
|
EnforcerZhukov/VigoBus-TelegramBot
|
9a0258edf5ff34ecedab6bcf4a8238f07bc318fa
|
[
"Apache-2.0"
] | 3
|
2021-09-10T19:53:36.000Z
|
2021-09-10T19:53:37.000Z
|
vigobusbot/telegram_bot/services/generic_request_handler/__init__.py
|
EnforcerZhukov/VigoBus-TelegramBot
|
9a0258edf5ff34ecedab6bcf4a8238f07bc318fa
|
[
"Apache-2.0"
] | 3
|
2019-09-24T15:43:23.000Z
|
2020-04-18T17:48:29.000Z
|
"""SERVICE - GENERIC REQUEST HANDLER
Handler used on all request handling functions
"""
from .request_handler import request_handler
| 22.333333
| 46
| 0.80597
| 17
| 134
| 6.235294
| 0.647059
| 0.396226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134328
| 134
| 5
| 47
| 26.8
| 0.913793
| 0.597015
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
71aaf248baf0d46ab7a8d8f9a0c8edb9ca0b607b
| 89
|
py
|
Python
|
raymon/exceptions.py
|
pbonte/raymon
|
83912d7a5ff22d61289688828169a7178fa34a2d
|
[
"MIT"
] | 21
|
2021-06-14T08:37:22.000Z
|
2022-03-08T05:41:54.000Z
|
raymon/exceptions.py
|
pbonte/raymon
|
83912d7a5ff22d61289688828169a7178fa34a2d
|
[
"MIT"
] | 57
|
2021-01-30T08:45:13.000Z
|
2022-02-21T16:15:00.000Z
|
raymon/exceptions.py
|
pbonte/raymon
|
83912d7a5ff22d61289688828169a7178fa34a2d
|
[
"MIT"
] | 1
|
2021-06-18T09:53:58.000Z
|
2021-06-18T09:53:58.000Z
|
class NetworkException(Exception):
pass
class SecretException(Exception):
pass
| 12.714286
| 34
| 0.752809
| 8
| 89
| 8.375
| 0.625
| 0.38806
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179775
| 89
| 6
| 35
| 14.833333
| 0.917808
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
e0c949245927584ae2cc832b73f840eaea5912b0
| 46
|
py
|
Python
|
latent/modules/__init__.py
|
quadbiolab/latent-lego
|
691b256ce1784a4bae2b7cdf27c8efcbbcd0ba65
|
[
"MIT"
] | 18
|
2021-01-20T08:02:04.000Z
|
2022-02-14T09:41:24.000Z
|
latent/modules/__init__.py
|
quadbiolab/latent-lego
|
691b256ce1784a4bae2b7cdf27c8efcbbcd0ba65
|
[
"MIT"
] | 1
|
2021-09-14T14:27:37.000Z
|
2021-11-05T09:20:10.000Z
|
latent/modules/__init__.py
|
quadbiolab/latent-lego
|
691b256ce1784a4bae2b7cdf27c8efcbbcd0ba65
|
[
"MIT"
] | null | null | null |
from .decoder import *
from .encoder import *
| 15.333333
| 22
| 0.73913
| 6
| 46
| 5.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 46
| 2
| 23
| 23
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
e0ee951ab5ad2918d3837bf8abfeba6b03815545
| 179
|
py
|
Python
|
app/utils/async_action.py
|
conatel-i-d/sm-api
|
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
|
[
"MIT"
] | 1
|
2020-09-20T07:44:33.000Z
|
2020-09-20T07:44:33.000Z
|
app/utils/async_action.py
|
conatel-i-d/sm-api
|
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
|
[
"MIT"
] | 2
|
2019-12-10T13:00:36.000Z
|
2021-04-30T21:04:42.000Z
|
app/utils/async_action.py
|
conatel-i-d/sm-api
|
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
|
[
"MIT"
] | null | null | null |
import asyncio
from functools import wraps
def async_action(f):
@wraps(f)
def wrapped(*args, **kwargs):
return asyncio.run(f(*args, **kwargs))
return wrapped
| 19.888889
| 46
| 0.664804
| 24
| 179
| 4.916667
| 0.583333
| 0.169492
| 0.271186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.212291
| 179
| 8
| 47
| 22.375
| 0.836879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.142857
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
e0f465883d83db134ebc2b8f8be69856c700b59b
| 119
|
py
|
Python
|
resources/Health.py
|
helderklemp/python_rest_app
|
b76e8beac4db693c75127bdfe596627d14b631e9
|
[
"MIT"
] | null | null | null |
resources/Health.py
|
helderklemp/python_rest_app
|
b76e8beac4db693c75127bdfe596627d14b631e9
|
[
"MIT"
] | null | null | null |
resources/Health.py
|
helderklemp/python_rest_app
|
b76e8beac4db693c75127bdfe596627d14b631e9
|
[
"MIT"
] | null | null | null |
from flask_restful import Resource
class Health(Resource):
def get(self):
return {"message": "All Good!"}
| 19.833333
| 39
| 0.672269
| 15
| 119
| 5.266667
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210084
| 119
| 6
| 39
| 19.833333
| 0.840426
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
e0f4e9ad67d9bdd970f2537459c5102787784e45
| 40
|
py
|
Python
|
silverware/exceptions.py
|
idin/silverware
|
2c47931937f4b1d34e97a1dfa3e58255e57e3545
|
[
"MIT"
] | 1
|
2021-08-30T01:12:59.000Z
|
2021-08-30T01:12:59.000Z
|
silverware/exceptions.py
|
idin/silverware
|
2c47931937f4b1d34e97a1dfa3e58255e57e3545
|
[
"MIT"
] | null | null | null |
silverware/exceptions.py
|
idin/silverware
|
2c47931937f4b1d34e97a1dfa3e58255e57e3545
|
[
"MIT"
] | null | null | null |
class ElementTypeError(TypeError):
pass
| 20
| 34
| 0.85
| 4
| 40
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075
| 40
| 2
| 35
| 20
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
e0fbdb9a8d8c0a777204a7d300d3cf305ab2340c
| 734
|
py
|
Python
|
django_network/network/models.py
|
takatux/django-router-interface-list
|
3a1686566d9653e02db2245d1df355fe097c4cf2
|
[
"MIT"
] | 11
|
2019-11-16T13:43:28.000Z
|
2021-12-22T08:42:57.000Z
|
django_network/network/models.py
|
takatux/django-router-interface-list
|
3a1686566d9653e02db2245d1df355fe097c4cf2
|
[
"MIT"
] | 6
|
2020-02-11T23:39:21.000Z
|
2021-12-13T19:54:49.000Z
|
django_network/network/models.py
|
ArRosid/django-router-interface-list
|
c60b91e81554314585544ff57a0cbf344de73e5f
|
[
"MIT"
] | 5
|
2019-11-29T01:29:21.000Z
|
2022-02-16T08:10:55.000Z
|
from django.db import models
NAPALM_MAPPING = {
'cisco_ios': 'ios',
'cisco_iosxe': 'ios'
}
class Device(models.Model):
name = models.CharField(max_length=100)
host = models.CharField(max_length=70)
username = models.CharField(max_length=100)
password = models.CharField(max_length=100, blank=True)
device_type = models.CharField(max_length=100, choices=(('router', 'Router'),('switch', 'Switch')), blank=True)
platform = models.CharField(max_length=100, choices=(('cisco_ios', 'Cisco IOS'),('cisco_iosxe', 'Cisco IOS XE')), blank=True)
def __str__(self):
return '{}. {}'.format(self.id, self.name)
@property
def napalm_driver(self):
return NAPALM_MAPPING[self.platform]
| 33.363636
| 129
| 0.679837
| 94
| 734
| 5.117021
| 0.404255
| 0.18711
| 0.224532
| 0.299376
| 0.309771
| 0.141372
| 0
| 0
| 0
| 0
| 0
| 0.027642
| 0.162125
| 734
| 22
| 130
| 33.363636
| 0.754472
| 0
| 0
| 0
| 0
| 0
| 0.131973
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.117647
| false
| 0.058824
| 0.058824
| 0.117647
| 0.705882
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
1ca37c016768cd966ba2ef500b7adfbf49babc3f
| 343
|
py
|
Python
|
nineml/user/multi/__init__.py
|
INCF/nineml-python
|
062a2ac8a9be97cee4dad02938e3858e051cf07c
|
[
"BSD-3-Clause"
] | 6
|
2017-12-26T14:15:28.000Z
|
2021-10-10T22:45:51.000Z
|
nineml/user/multi/__init__.py
|
INCF/nineml-python
|
062a2ac8a9be97cee4dad02938e3858e051cf07c
|
[
"BSD-3-Clause"
] | 25
|
2017-07-05T03:53:53.000Z
|
2021-01-19T14:14:05.000Z
|
nineml/user/multi/__init__.py
|
INCF/nineml-python
|
062a2ac8a9be97cee4dad02938e3858e051cf07c
|
[
"BSD-3-Clause"
] | 5
|
2017-12-26T14:15:12.000Z
|
2021-10-10T22:45:39.000Z
|
from .dynamics import (
MultiDynamics, MultiDynamicsProperties, SubDynamics, SubDynamicsProperties)
from .port_exposures import (
AnalogReceivePortExposure, AnalogReducePortExposure, BasePortExposure,
EventReceivePortExposure, AnalogSendPortExposure, EventSendPortExposure)
from .namespace import append_namespace, split_namespace
| 49
| 79
| 0.851312
| 24
| 343
| 12.041667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102041
| 343
| 6
| 80
| 57.166667
| 0.938312
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
e81b13f6ebaa9ecd3d27e69102d15385198217ee
| 327
|
py
|
Python
|
magic_log.py
|
mat-elisee/panama-bot
|
062ad5ec44adfe4741a8e52b25d48abbd3f3c68d
|
[
"MIT"
] | null | null | null |
magic_log.py
|
mat-elisee/panama-bot
|
062ad5ec44adfe4741a8e52b25d48abbd3f3c68d
|
[
"MIT"
] | null | null | null |
magic_log.py
|
mat-elisee/panama-bot
|
062ad5ec44adfe4741a8e52b25d48abbd3f3c68d
|
[
"MIT"
] | 1
|
2022-03-06T10:01:11.000Z
|
2022-03-06T10:01:11.000Z
|
class Log():
def log(self,text):
pass
def force_p(self,text):
print(text)
class Print(Log):
def log(self,text):
print(text)
class NoLog(Log) :
def log(self,text):
pass
class MessageLog(Log):
def set_channel(self,channel):
self.channel = channel
async def log(self,text):
await self.channel.send(text)
| 15.571429
| 31
| 0.685015
| 52
| 327
| 4.269231
| 0.307692
| 0.18018
| 0.18018
| 0.252252
| 0.427928
| 0.189189
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174312
| 327
| 21
| 32
| 15.571429
| 0.822222
| 0
| 0
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3125
| false
| 0.125
| 0
| 0
| 0.5625
| 0.125
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
e8207c71df8ee3661480d42a6008777007e6581d
| 232
|
py
|
Python
|
geedataextract/ebosursy_phen_buf10km.py
|
ehurme/geedataextract
|
48fac9e6883bc6a4fd33dca7d66368e2f861e9ed
|
[
"MIT"
] | null | null | null |
geedataextract/ebosursy_phen_buf10km.py
|
ehurme/geedataextract
|
48fac9e6883bc6a4fd33dca7d66368e2f861e9ed
|
[
"MIT"
] | null | null | null |
geedataextract/ebosursy_phen_buf10km.py
|
ehurme/geedataextract
|
48fac9e6883bc6a4fd33dca7d66368e2f861e9ed
|
[
"MIT"
] | null | null | null |
from downloadData import GEEviMODIS
GEEviMODIS('EboSursyPhen',metric = ['NDVI','EVI'], timeStep = 'lowest',buf =10000,poly=0, QC='Op2',username = 'edwardhurme',folderOut = "GreenWave", scalePix = 250,startYear = 2010,endYear = 2020)
| 116
| 196
| 0.737069
| 27
| 232
| 6.333333
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 0.094828
| 232
| 2
| 196
| 116
| 0.728571
| 0
| 0
| 0
| 0
| 0
| 0.206009
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
08fa8afc51203e5457365bd75085b14a9a3edb3b
| 90
|
py
|
Python
|
orbit/forecaster/__init__.py
|
juanitorduz/orbit
|
850818077feb7bdfbeee6b49e38bce392ad6b465
|
[
"Apache-2.0"
] | null | null | null |
orbit/forecaster/__init__.py
|
juanitorduz/orbit
|
850818077feb7bdfbeee6b49e38bce392ad6b465
|
[
"Apache-2.0"
] | null | null | null |
orbit/forecaster/__init__.py
|
juanitorduz/orbit
|
850818077feb7bdfbeee6b49e38bce392ad6b465
|
[
"Apache-2.0"
] | null | null | null |
from .map import *
from .svi import *
from .full_bayes import *
from .forecaster import *
| 18
| 25
| 0.733333
| 13
| 90
| 5
| 0.538462
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177778
| 90
| 4
| 26
| 22.5
| 0.878378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
08fee6f7f31362a4517636fe1109dba5a8a401da
| 51
|
py
|
Python
|
SOA/paf-cython/Extension/test.py
|
awaiswill/present
|
1cfbc8d1f31ade6c21e3ed1d0685c31b3a772485
|
[
"Apache-2.0"
] | 120
|
2019-02-15T18:46:59.000Z
|
2022-03-30T14:49:05.000Z
|
SOA/paf-cython/Extension/test.py
|
smartquark/present
|
21a31ab2f38474a68e5560a3330aa42d0847c9b3
|
[
"Apache-2.0"
] | 9
|
2020-04-20T14:20:00.000Z
|
2022-03-12T00:23:35.000Z
|
SOA/paf-cython/Extension/test.py
|
awaiswill/present
|
1cfbc8d1f31ade6c21e3ed1d0685c31b3a772485
|
[
"Apache-2.0"
] | 116
|
2017-01-05T20:05:32.000Z
|
2022-03-19T23:04:00.000Z
|
import Calculate as c
print(c.sdev([1,2,3,4,5]))
| 10.2
| 26
| 0.647059
| 12
| 51
| 2.75
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113636
| 0.137255
| 51
| 4
| 27
| 12.75
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
1c756a092abde75221eb06333af7e93b9c10214b
| 119
|
py
|
Python
|
server/__init__.py
|
vagnes/ask_and_receive
|
d13f36cda21200d32b62a65205802d262a2f6838
|
[
"MIT"
] | 2
|
2018-10-05T11:32:57.000Z
|
2018-10-05T23:49:53.000Z
|
server/__init__.py
|
vagnes/ask_and_receive
|
d13f36cda21200d32b62a65205802d262a2f6838
|
[
"MIT"
] | 4
|
2021-06-08T19:50:11.000Z
|
2022-03-11T23:46:25.000Z
|
server/__init__.py
|
vagnes/ask_and_receive
|
d13f36cda21200d32b62a65205802d262a2f6838
|
[
"MIT"
] | 5
|
2018-10-21T13:49:15.000Z
|
2021-01-27T03:01:38.000Z
|
from flask import Flask
from flask_restful import Api
app = Flask(__name__)
api = Api(app)
from server import routes
| 14.875
| 29
| 0.781513
| 19
| 119
| 4.631579
| 0.473684
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168067
| 119
| 7
| 30
| 17
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.