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
1a3797269cc9f510ddd449f32834670da5b034b5
24
py
Python
milarun/models/ssd/__init__.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
67
2020-09-22T10:17:53.000Z
2022-02-16T10:24:17.000Z
milarun/models/ssd/__init__.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
6
2020-07-02T08:58:39.000Z
2021-02-01T20:31:28.000Z
milarun/models/ssd/__init__.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
8
2020-06-19T17:16:19.000Z
2022-03-31T19:34:49.000Z
from .train import main
12
23
0.791667
4
24
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
24
1
24
24
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1a4315521e410535022480f1787d8082ba26bce9
24
py
Python
tpau_gtfsutilities/gtfs/process/__init__.py
anniekfifer/tpau-gtfsutils
a022d4c8465b7f736023ecc294ff0d7d0201b0e9
[ "BSD-3-Clause" ]
3
2019-09-25T10:05:42.000Z
2019-11-26T13:30:29.000Z
tpau_gtfsutilities/gtfs/process/__init__.py
anniekfifer/tpau-gtfsutils
a022d4c8465b7f736023ecc294ff0d7d0201b0e9
[ "BSD-3-Clause" ]
null
null
null
tpau_gtfsutilities/gtfs/process/__init__.py
anniekfifer/tpau-gtfsutils
a022d4c8465b7f736023ecc294ff0d7d0201b0e9
[ "BSD-3-Clause" ]
null
null
null
from . import preprocess
24
24
0.833333
3
24
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.125
24
1
24
24
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1a4dc0ed40e0f9a9a400f39481d67c44613f9b9c
1,766
py
Python
src/test_sudoku_solver.py
tillschallau/sudoku-solver
c1de723b5c61776b9194abd9b93faf56c7ed9039
[ "MIT" ]
null
null
null
src/test_sudoku_solver.py
tillschallau/sudoku-solver
c1de723b5c61776b9194abd9b93faf56c7ed9039
[ "MIT" ]
null
null
null
src/test_sudoku_solver.py
tillschallau/sudoku-solver
c1de723b5c61776b9194abd9b93faf56c7ed9039
[ "MIT" ]
null
null
null
import src.sudoku_solver as sudoku_solver from src.sudoku import Sudoku correct_sudoku = Sudoku([[9, 5, 7, 6, 1, 3, 2, 8, 4], [4, 8, 3, 2, 5, 7, 1, 9, 6], [6, 1, 2, 8, 4, 9, 5, 3, 7], [1, 7, 8, 3, 6, 4, 9, 5, 2], [5, 2, 4, 9, 7, 1, 3, 6, 8], [3, 6, 9, 5, 2, 8, 7, 4, 1], [8, 4, 5, 7, 9, 2, 6, 1, 3], [2, 9, 1, 4, 3, 6, 8, 7, 5], [7, 3, 6, 1, 8, 5, 4, 2, 9]]) starting_sudoku = Sudoku([[0, 0, 0, 0, 0, 0, 2, 0, 0], [0, 8, 0, 0, 0, 7, 0, 9, 0], [6, 0, 2, 0, 0, 0, 5, 0, 0], [0, 7, 0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 9, 0, 1, 0, 0, 0], [0, 0, 0, 0, 2, 0, 0, 4, 0], [0, 0, 5, 0, 0, 0, 6, 0, 3], [0, 9, 0, 4, 0, 0, 0, 7, 0], [0, 0, 6, 0, 0, 0, 0, 0, 0]]) starting_sudoku_current_cell_test = Sudoku([[1, 3, 4, 5, 6, 7, 2, 0, 0], [0, 8, 0, 0, 0, 7, 0, 9, 0], [6, 0, 2, 0, 0, 0, 5, 0, 0], [0, 7, 0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 9, 0, 1, 0, 0, 0], [0, 0, 0, 0, 2, 0, 0, 4, 0], [0, 0, 5, 0, 0, 0, 6, 0, 3], [0, 9, 0, 4, 0, 0, 0, 7, 0], [0, 0, 6, 0, 0, 0, 0, 0, 0]]) starting_sudoku_current_cell_test2 = Sudoku([[1, 1, 1, 1, 1, 1, 2, 1, 1], [1, 8, 1, 1, 1, 7, 1, 9, 1], [6, 0, 2, 0, 0, 0, 5, 0, 0], [0, 7, 0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 9, 0, 1, 0, 0, 0], [0, 0, 0, 0, 2, 0, 0, 4, 0], [0, 0, 5, 0, 0, 0, 6, 0, 3], [0, 9, 0, 4, 0, 0, 0, 7, 0], [0, 0, 6, 0, 0, 0, 0, 0, 0]])
73.583333
113
0.286523
354
1,766
1.39548
0.062147
0.42915
0.412955
0.291498
0.55668
0.544534
0.544534
0.544534
0.544534
0.532389
0
0.353261
0.479049
1,766
23
114
76.782609
0.183696
0
0
0.210526
0
0
0
0
0
0
0
0
0
1
0
false
0
0.105263
0
0.105263
0
0
0
1
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
1a90e4152f8eb4914f77ba3c276a65abf4a75f61
13,600
py
Python
tests/dialog/test_router.py
uezo/minette-python
dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f
[ "Apache-2.0" ]
31
2017-12-18T15:35:42.000Z
2021-12-16T07:27:33.000Z
tests/dialog/test_router.py
uezo/minette-python
dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f
[ "Apache-2.0" ]
17
2017-07-13T22:25:08.000Z
2020-11-02T14:19:32.000Z
tests/dialog/test_router.py
uezo/minette-python
dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f
[ "Apache-2.0" ]
2
2017-09-14T09:28:35.000Z
2021-01-17T12:31:54.000Z
import sys import os sys.path.append(os.pardir) import pytest from pytz import timezone from minette import DialogRouter, DialogService, EchoDialogService, ErrorDialogService from minette import ( Message, Context, PerformanceInfo, Priority ) class PizzaDialogService(DialogService): pass class SobaDialogService(DialogService): pass class AdhocDialogService(DialogService): pass class MyDialogRouter(DialogRouter): def register_intents(self): self.intent_resolver = { "PizzaIntent": PizzaDialogService, "SobaIntent": SobaDialogService, "AdhocIntent": AdhocDialogService, "NotRegisteredIntent": None, } def extract_intent(self, request, context, connection): if "pizza" in request.text: return "PizzaIntent" elif "lower" in request.text: return "SobaIntent", {"soba_name": "tanuki soba", "is_hot": True}, Priority.Low elif "soba" in request.text: return "SobaIntent", {"soba_name": "tanuki soba", "is_hot": True}, Priority.High elif "highest p" in request.text: return "PizzaIntent", {}, Priority.Highest elif "highest s" in request.text: return "SobaIntent", {}, Priority.Highest elif "adhoc" in request.text: request.is_adhoc = True return "AdhocIntent", {}, Priority.Highest elif "not_registered" in request.text: return "NotRegisteredIntent" elif "unknown" in request.text: return "UnknownIntent" elif "error" in request.text: 1 / 0 def test_init_base(): dr = DialogRouter(timezone=timezone("Asia/Tokyo")) assert dr.timezone == timezone("Asia/Tokyo") assert dr.default_dialog_service is DialogService def test_extract_intent(): dr = DialogRouter(timezone=timezone("Asia/Tokyo")) context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "PizzaIntent" request.entities = {"key1": "value1"} intent, entities = dr.extract_intent(request, context, None) assert intent == "PizzaIntent" assert entities == {"key1": "value1"} def test_init(): dr = MyDialogRouter(timezone=timezone("Asia/Tokyo"), default_dialog_service=EchoDialogService) assert dr.timezone == timezone("Asia/Tokyo") assert dr.default_dialog_service is EchoDialogService def test_route(): # update topic dr = MyDialogRouter(timezone=timezone("Asia/Tokyo"), default_dialog_service=EchoDialogService) context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "PizzaIntent" ds = dr.route(request, context, None) assert ds is PizzaDialogService # adhoc topic context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "AdhocIntent" request.is_adhoc = True ds = dr.route(request, context, None) assert ds is AdhocDialogService assert context.topic.name == "" # adhoc topic (keep previous topic) context = Context("TEST", "test_user") context.topic.name = "pizza" request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "AdhocIntent" request.is_adhoc = True request.intent_priority = Priority.High ds = dr.route(request, context, None) assert ds is AdhocDialogService assert context.topic.name == "pizza" assert context.topic.keep_on is True # continue topic context = Context("TEST", "test_user") context.topic.name = "pizza" request = Message(channel="TEST", channel_user_id="test_user", text="Hello") ds = dr.route(request, context, None) assert ds is PizzaDialogService assert context.topic.priority == Priority.Normal # not updated by same priority request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "SobaIntent" ds = dr.route(request, context, None) assert ds is PizzaDialogService assert context.topic.priority == Priority.Normal # highest topic updated by highest intent context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "PizzaIntent" request.intent_priority = Priority.Highest ds = dr.route(request, context, None) assert ds is PizzaDialogService assert context.topic.priority == Priority.Highest - 1 # next message (not updated by lower than highest) request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "SobaIntent" request.intent_priority = Priority.Highest - 1 ds = dr.route(request, context, None) assert ds is PizzaDialogService assert context.topic.priority == Priority.Highest - 1 # last message (updated by highest) request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "SobaIntent" request.intent_priority = Priority.Highest ds = dr.route(request, context, None) assert ds is SobaDialogService assert context.topic.priority == Priority.Highest - 1 # no intent context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") ds = dr.route(request, context, None) assert ds is dr.default_dialog_service # unknown intent context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "UnknownIntent" ds = dr.route(request, context, None) assert ds is dr.default_dialog_service # dialog for intent not registered context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "NotRegisteredIntent" ds = dr.route(request, context, None) assert ds is DialogService # update topic by higher priority intent context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "PizzaIntent" ds = dr.route(request, context, None) assert ds is PizzaDialogService context.topic.keep_on = True # intent continue without intent request = Message(channel="TEST", channel_user_id="test_user", text="Hello") ds = dr.route(request, context, None) assert ds is PizzaDialogService context.topic.keep_on = True # soba intent with normal priority (not updated) request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "SobaIntent" ds = dr.route(request, context, None) assert ds is PizzaDialogService context.topic.keep_on = True # soba intent with higher priority (updated) request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "SobaIntent" request.intent_priority = Priority.High ds = dr.route(request, context, None) assert ds is SobaDialogService # update topic by normal priority intent context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "PizzaIntent" request.intent_priority = Priority.Low ds = dr.route(request, context, None) assert ds is PizzaDialogService context.topic.keep_on = True # intent continue without intent request = Message(channel="TEST", channel_user_id="test_user", text="Hello") ds = dr.route(request, context, None) assert ds is PizzaDialogService context.topic.keep_on = True # soba intent with normal priority (updated) request = Message(channel="TEST", channel_user_id="test_user", text="Hello") request.intent = "SobaIntent" ds = dr.route(request, context, None) assert ds is SobaDialogService def test_handle_exception(): dr = MyDialogRouter(timezone=timezone("Asia/Tokyo"), default_dialog_service=EchoDialogService) context = Context("TEST", "test_user") request = Message(channel="TEST", channel_user_id="test_user", text="Hello") ds = dr.handle_exception(request, context, ValueError("test error"), None) assert isinstance(ds, ErrorDialogService) assert context.error["exception"] == "test error" def test_execute(): dr = MyDialogRouter(timezone=timezone("Asia/Tokyo"), default_dialog_service=EchoDialogService) performance = PerformanceInfo() # default context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="Hello") ds = dr.execute(request, context, None, performance) assert isinstance(ds, dr.default_dialog_service) # pizza context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="give me pizza") ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) # continue pizza request = Message(channel="TEST", channel_user_id="test_user", text="seafood") ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) # soba lower priority (continume pizza) request = Message(channel="TEST", channel_user_id="test_user", text="lower") ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) # soba higher priority (update to soba) request = Message(channel="TEST", channel_user_id="test_user", text="give me soba") ds = dr.execute(request, context, None, performance) assert isinstance(ds, SobaDialogService) # pizza highest (update pizza) request = Message(channel="TEST", channel_user_id="test_user", text="highest p") ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) assert context.topic.priority == Priority.Highest - 1 # soba with high priority (continue pizza) request = Message(channel="TEST", channel_user_id="test_user", text="give me soba") ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) assert context.topic.priority == Priority.Highest - 1 # soba with highest priority (update soba) request = Message(channel="TEST", channel_user_id="test_user", text="highest s") ds = dr.execute(request, context, None, performance) assert isinstance(ds, SobaDialogService) # adhoc context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="pizza") # start pizza ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) request = Message(channel="TEST", channel_user_id="test_user", text="adhoc") # adhoc ds = dr.execute(request, context, None, performance) assert isinstance(ds, AdhocDialogService) request = Message(channel="TEST", channel_user_id="test_user", text="seafood") # continue pizza ds = dr.execute(request, context, None, performance) assert isinstance(ds, PizzaDialogService) # no intent context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="_") ds = dr.execute(request, context, None, performance) assert isinstance(ds, dr.default_dialog_service) # unknown context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="unknown") ds = dr.execute(request, context, None, performance) assert isinstance(ds, dr.default_dialog_service) # dialog for intent not registered context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="not_registered") ds = dr.execute(request, context, None, performance) assert isinstance(ds, DialogService) # error context = Context("TEST", "test_user") context.topic.is_new = True request = Message(channel="TEST", channel_user_id="test_user", text="error") ds = dr.execute(request, context, None, performance) assert isinstance(ds, ErrorDialogService) def test_intent_resolver_as_arg(): # init dr = MyDialogRouter( timezone=timezone("Asia/Tokyo"), default_dialog_service=EchoDialogService, intent_resolver={ "PizzaIntent": PizzaDialogService, "SobaIntent": SobaDialogService, }) assert dr.timezone == timezone("Asia/Tokyo") assert dr.default_dialog_service is EchoDialogService # route context = Context("TEST", "test_user") request = Message( channel="TEST", channel_user_id="test_user", text="Hello", intent="PizzaIntent") assert dr.route(request, context, None) is PizzaDialogService context = Context("TEST", "test_user") request = Message( channel="TEST", channel_user_id="test_user", text="Hello", intent="SobaIntent") assert dr.route(request, context, None) is SobaDialogService context = Context("TEST", "test_user") request = Message( channel="TEST", channel_user_id="test_user", text="Hello") assert dr.route(request, context, None) is EchoDialogService
38.857143
98
0.693529
1,605
13,600
5.745794
0.072897
0.052049
0.086532
0.103015
0.812405
0.801236
0.777055
0.760681
0.760681
0.756669
0
0.00109
0.190662
13,600
349
99
38.968481
0.83674
0.064632
0
0.677903
0
0
0.130716
0
0
0
0
0
0.209738
1
0.033708
false
0.011236
0.022472
0
0.101124
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
1aa865526377a0edc68f44ca28d256cfe6780eb3
99
py
Python
prohmr/models/heads/__init__.py
akashsengupta1997/ProHMR
7015a3d070c79b4571d43abdf5e522468091a94d
[ "BSD-3-Clause" ]
120
2021-08-27T23:21:17.000Z
2022-03-30T03:34:07.000Z
prohmr/models/heads/__init__.py
akashsengupta1997/ProHMR
7015a3d070c79b4571d43abdf5e522468091a94d
[ "BSD-3-Clause" ]
17
2021-09-08T10:10:37.000Z
2022-03-17T02:40:21.000Z
prohmr/models/heads/__init__.py
akashsengupta1997/ProHMR
7015a3d070c79b4571d43abdf5e522468091a94d
[ "BSD-3-Clause" ]
10
2021-08-31T06:08:49.000Z
2022-03-29T21:51:14.000Z
from .smpl_flow import SMPLFlow from .skeleton_flow import SkeletonFlow from .fc_head import FCHead
33
39
0.858586
15
99
5.466667
0.666667
0.243902
0
0
0
0
0
0
0
0
0
0
0.111111
99
3
40
33
0.931818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1ac820cbcf7d0d98431fa2fed01dad0baafedf01
99
py
Python
apps/test_find_application_with_mainflow/views.py
HeMan/jobbergate
1381821aafe3d217ee22078be09104a566ec2420
[ "MIT" ]
4
2019-11-05T09:30:43.000Z
2020-04-22T15:24:31.000Z
apps/test_find_application_with_mainflow/views.py
HeMan/jobbergate
1381821aafe3d217ee22078be09104a566ec2420
[ "MIT" ]
52
2019-10-17T09:46:09.000Z
2020-05-19T07:39:19.000Z
apps/test_find_application_with_mainflow/views.py
HeMan/jobbergate
1381821aafe3d217ee22078be09104a566ec2420
[ "MIT" ]
1
2020-02-18T13:38:25.000Z
2020-02-18T13:38:25.000Z
from jobbergate import appform def mainflow(data): return [appform.Const("val", default=10)]
16.5
45
0.727273
13
99
5.538462
0.923077
0
0
0
0
0
0
0
0
0
0
0.02381
0.151515
99
5
46
19.8
0.833333
0
0
0
0
0
0.030303
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
6
203e507cc3f602e592e2839827155a78ab5500d6
47
py
Python
wk/cv/utils/__init__.py
Peiiii/wk
dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4
[ "MIT" ]
null
null
null
wk/cv/utils/__init__.py
Peiiii/wk
dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4
[ "MIT" ]
null
null
null
wk/cv/utils/__init__.py
Peiiii/wk
dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4
[ "MIT" ]
null
null
null
from .imutils import * from .boxutils import *
15.666667
23
0.744681
6
47
5.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.170213
47
2
24
23.5
0.897436
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
645fc4bf818569364ce3bf0cb6225d48dc5020d1
13,890
py
Python
tests/test_deploy.py
lobziik/ocdeployer
092e65fb6d8868f262980d6221518433de1345f4
[ "MIT" ]
null
null
null
tests/test_deploy.py
lobziik/ocdeployer
092e65fb6d8868f262980d6221518433de1345f4
[ "MIT" ]
null
null
null
tests/test_deploy.py
lobziik/ocdeployer
092e65fb6d8868f262980d6221518433de1345f4
[ "MIT" ]
null
null
null
import pytest from ocdeployer.secrets import SecretImporter from ocdeployer.deploy import DeployRunner from ocdeployer.env import EnvConfigHandler, LegacyEnvConfigHandler def patched_runner(env_values, mock_load_vars_per_env, legacy=False): if not env_values: handler = None elif legacy: handler = LegacyEnvConfigHandler(env_files=env_values) handler.env_names = env_values else: handler = EnvConfigHandler(env_names=env_values, env_dir_name="envTEST") runner = DeployRunner(None, "test-project", handler, None, ["service"], None, None, []) runner.base_env_path = "base/envTEST" if handler: runner.env_config_handler._load_vars_per_env = mock_load_vars_per_env return runner def build_mock_loader(base_env_data, service_set_env_data={}): def mock_load_vars_per_env(path=None): print(f"Mock loader received path: {path}") if path is None: return base_env_data if "base" in "path" and path.endswith("envTEST"): print("Loading mock base data") return base_env_data if "templates" in path and "service" in path and path.endswith("envTEST"): print("Loading mock service set data") return service_set_env_data return {} return mock_load_vars_per_env def test__no_env_given(): expected = { "parameters": { "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(None, None, legacy=False) assert runner._get_variables("service", "templates/service", "some_component") == expected @pytest.mark.parametrize("legacy", (True, False), ids=("legacy=true", "legacy=false")) def test__get_variables_sanity(legacy, patch_os_path): mock_var_data = { "test_env": { "service": { "enable_routes": False, "enable_db": False, "parameters": {"STUFF": "things"}, } } } expected = { "enable_routes": False, "enable_db": False, "parameters": { "STUFF": "things", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(mock_var_data), legacy) assert runner._get_variables("service", "templates/service", "some_component") == expected @pytest.mark.parametrize("legacy", (True, False), ids=("legacy=true", "legacy=false")) def test__get_variables_merge_from_global(legacy, patch_os_path): mock_var_data = { "test_env": { "global": {"global_variable": "global-value", "parameters": {"GLOBAL": "things"}}, "service": {"service_variable": True, "parameters": {"STUFF": "service-stuff"}}, "service/component": { "component_variable": "component", "parameters": {"COMPONENT": "component-param"}, }, } } expected = { "component_variable": "component", "global_variable": "global-value", "service_variable": True, "parameters": { "COMPONENT": "component-param", "GLOBAL": "things", "STUFF": "service-stuff", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(mock_var_data), legacy) assert runner._get_variables("service", "templates/service", "component") == expected @pytest.mark.parametrize("legacy", (True, False), ids=("legacy=true", "legacy=false")) def test__get_variables_service_overwrite_parameter(legacy, patch_os_path): mock_var_data = { "test_env": { "global": {"parameters": {"STUFF": "things"}}, "service": {"parameters": {"STUFF": "service-stuff"}}, } } expected = { "parameters": { "STUFF": "service-stuff", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, } } runner = patched_runner(["test_env"], build_mock_loader(mock_var_data), legacy) assert runner._get_variables("service", "templates/service", "component") == expected @pytest.mark.parametrize("legacy", (True, False), ids=("legacy=true", "legacy=false")) def test__get_variables_service_overwrite_variable(legacy, patch_os_path): mock_var_data = {"test_env": {"global": {"enable_db": False}, "service": {"enable_db": True}}} expected = { "enable_db": True, "parameters": { "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(mock_var_data), legacy) assert runner._get_variables("service", "templates/service", "component") == expected @pytest.mark.parametrize("legacy", (True, False), ids=("legacy=true", "legacy=false")) def test__get_variables_component_overwrite_parameter(legacy, patch_os_path): mock_var_data = { "test_env": { "global": {"parameters": {"STUFF": "things"}}, "service": {"parameters": {"THINGS": "service-things"}}, "service/component": {"parameters": {"THINGS": "component-things"}}, } } expected = { "parameters": { "STUFF": "things", "THINGS": "component-things", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, } } runner = patched_runner(["test_env"], build_mock_loader(mock_var_data), legacy) assert runner._get_variables("service", "templates/service", "component") == expected @pytest.mark.parametrize("legacy", (True, False), ids=("legacy=true", "legacy=false")) def test__get_variables_component_overwrite_variable(legacy, patch_os_path): mock_var_data = { "test_env": { "global": {"enable_routes": False}, "service": {"enable_db": True}, "service/component": {"enable_db": False}, } } expected = { "enable_routes": False, "enable_db": False, "parameters": { "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(mock_var_data), legacy) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_base_and_service_set(patch_os_path): base_var_data = { "test_env": { "global": {"global_var": "base_global", "parameters": {"GLOBAL_PARAM": "things"}} } } service_set_var_data = { "test_env": { "global": {"global_set_var": "set_global", "parameters": {"PARAM": "something"}}, "component": {"component_var": "something", "parameters": {"ANOTHER_PARAM": "stuff"}}, } } expected = { "global_var": "base_global", "global_set_var": "set_global", "component_var": "something", "parameters": { "GLOBAL_PARAM": "things", "PARAM": "something", "ANOTHER_PARAM": "stuff", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(base_var_data, service_set_var_data)) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_service_set_only(patch_os_path): base_var_data = {} service_set_var_data = { "test_env": { "global": {"global_set_var": "set_global", "parameters": {"PARAM": "something"}}, "component": {"component_var": "something", "parameters": {"ANOTHER_PARAM": "stuff"}}, } } expected = { "global_set_var": "set_global", "component_var": "something", "parameters": { "PARAM": "something", "ANOTHER_PARAM": "stuff", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(base_var_data, service_set_var_data)) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_service_set_overrides(patch_os_path): base_var_data = { "test_env": { "global": {"global_var": "base_global", "parameters": {"GLOBAL_PARAM": "things"}}, "service": {"global_set_var": "blah", "parameters": {"PARAM": "blah"}}, "service/component": {"component_var": "override this"}, } } service_set_var_data = { "test_env": { "global": {"global_set_var": "set_global", "parameters": {"PARAM": "something"}}, "component": {"component_var": "something", "parameters": {"ANOTHER_PARAM": "stuff"}}, } } expected = { "global_var": "base_global", "global_set_var": "set_global", "component_var": "something", "parameters": { "GLOBAL_PARAM": "things", "PARAM": "something", "ANOTHER_PARAM": "stuff", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner(["test_env"], build_mock_loader(base_var_data, service_set_var_data)) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_multiple_envs(patch_os_path): base_var_data = { "test_env": { "global": {"global_var": "base_global1", "parameters": {"GLOBAL_PARAM": "things1"}}, }, "test_env2": { "global": {"global_var": "base_global2"}, "service/component": {"component_var": "comp2"}, }, "test_env3": { "global": { "global_var": "base_global3", "parameters": {"GLOBAL_PARAM": "things3", "ENV3_PARAM": "env3"}, }, "service/component": {"component_var": "comp3"}, }, } service_set_var_data = { "test_env": {"global": {"global_set_var": "set_global1"}}, "test_env2": { "service/component": { "component_var": "comp2-set", "parameters": {"ENV2_PARAM": "env2"}, } }, } expected = { "global_var": "base_global1", "global_set_var": "set_global1", "component_var": "comp2-set", "parameters": { "GLOBAL_PARAM": "things1", "ENV3_PARAM": "env3", "ENV2_PARAM": "env2", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner( ["test_env", "test_env2", "test_env3"], build_mock_loader(base_var_data, service_set_var_data), ) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_multiple_envs_legacy(patch_os_path): base_var_data = { "test_env": { "global": {"global_var": "base_global1", "parameters": {"GLOBAL_PARAM": "things1"}}, }, "test_env2": { "global": {"global_var": "base_global2"}, "service/component": {"component_var": "comp2"}, }, "test_env3": { "global": { "global_var": "base_global3", "parameters": {"GLOBAL_PARAM": "things3", "ENV3_PARAM": "env3"}, }, "service/component": {"component_var": "comp3"}, }, } expected = { "global_var": "base_global1", "component_var": "comp2", "parameters": { "GLOBAL_PARAM": "things1", "ENV3_PARAM": "env3", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner( ["test_env", "test_env2", "test_env3"], build_mock_loader(base_var_data), legacy=True ) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_multiple_envs_precedence(patch_os_path): base_var_data = { "test_env1": { "service/component": {"parameters": {"PARAM": "things1"}}, }, } service_set_var_data = { "test_env2": { "component": {"parameters": {"PARAM": "things2"}}, }, } expected = { "parameters": { "PARAM": "things1", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner( ["test_env1", "test_env2"], build_mock_loader(base_var_data, service_set_var_data), ) assert runner._get_variables("service", "templates/service", "component") == expected def test__get_variables_multiple_envs_precedence_reversed(patch_os_path): base_var_data = { "test_env1": { "service/component": {"parameters": {"PARAM": "things1"}}, }, } service_set_var_data = { "test_env2": { "component": {"parameters": {"PARAM": "things2"}}, }, } expected = { "parameters": { "PARAM": "things2", "NAMESPACE": "test-project", "SECRETS_PROJECT": SecretImporter.source_project, }, } runner = patched_runner( ["test_env2", "test_env1"], build_mock_loader(base_var_data, service_set_var_data), ) assert runner._get_variables("service", "templates/service", "component") == expected
33.229665
98
0.589561
1,355
13,890
5.683395
0.077491
0.034541
0.04441
0.049085
0.809246
0.769121
0.766913
0.754837
0.748864
0.714453
0
0.005646
0.260475
13,890
417
99
33.309353
0.744062
0
0
0.563218
0
0
0.308855
0
0
0
0
0
0.04023
1
0.048851
false
0
0.051724
0
0.117816
0.008621
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
647f046c31c221244ebc2df5f266fb6c4c36a234
223
py
Python
apps/integrations/github/resources/__init__.py
wizzzet/github_backend
9e4b5d3273e850e4ac0f425d22911987be7a7eff
[ "MIT" ]
null
null
null
apps/integrations/github/resources/__init__.py
wizzzet/github_backend
9e4b5d3273e850e4ac0f425d22911987be7a7eff
[ "MIT" ]
null
null
null
apps/integrations/github/resources/__init__.py
wizzzet/github_backend
9e4b5d3273e850e4ac0f425d22911987be7a7eff
[ "MIT" ]
null
null
null
from .users import UsersListResource # NOQA from .users import UserResource # NOQA from .followers import FollowersListResource # NOQA from .repos import ReposListResource # NOQA from .repos import RepoResource # NOQA
37.166667
52
0.798206
25
223
7.12
0.44
0.179775
0.168539
0.213483
0
0
0
0
0
0
0
0
0.156951
223
5
53
44.6
0.946809
0.107623
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
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
648c2c20bd854f69e485a8cf34eeda1f41447e10
9,434
py
Python
tests/contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/test_michelson_coding_KT1BDM.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-08-11T02:31:24.000Z
2020-08-11T02:31:24.000Z
tests/contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/test_michelson_coding_KT1BDM.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/test_michelson_coding_KT1BDM.py
tqtezos/pytezos
a4ac0b022d35d4c9f3062609d8ce09d584b5faa8
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import get_data from pytezos.michelson.micheline import michelson_to_micheline from pytezos.michelson.formatter import micheline_to_michelson class MichelsonCodingTestKT1BDM(TestCase): def setUp(self): self.maxDiff = None def test_michelson_parse_code_KT1BDM(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/code_KT1BDM.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/code_KT1BDM.tz')) self.assertEqual(expected, actual) def test_michelson_format_code_KT1BDM(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/code_KT1BDM.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/code_KT1BDM.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_code_KT1BDM(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/code_KT1BDM.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_storage_KT1BDM(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/storage_KT1BDM.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/storage_KT1BDM.tz')) self.assertEqual(expected, actual) def test_michelson_format_storage_KT1BDM(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/storage_KT1BDM.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/storage_KT1BDM.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_storage_KT1BDM(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/storage_KT1BDM.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_ooMDoN(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooMDoN.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooMDoN.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_ooMDoN(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooMDoN.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooMDoN.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_ooMDoN(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooMDoN.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_ooT7Uy(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooT7Uy.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooT7Uy.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_ooT7Uy(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooT7Uy.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooT7Uy.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_ooT7Uy(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooT7Uy.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_onuB3S(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onuB3S.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onuB3S.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_onuB3S(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onuB3S.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onuB3S.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_onuB3S(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onuB3S.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_ooArSr(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooArSr.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooArSr.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_ooArSr(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooArSr.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooArSr.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_ooArSr(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooArSr.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_onrCFo(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onrCFo.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onrCFo.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_onrCFo(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onrCFo.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onrCFo.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_onrCFo(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_onrCFo.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_ongBCW(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ongBCW.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ongBCW.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_ongBCW(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ongBCW.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ongBCW.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_ongBCW(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ongBCW.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual) def test_michelson_parse_parameter_ooe4gB(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooe4gB.json') actual = michelson_to_micheline(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooe4gB.tz')) self.assertEqual(expected, actual) def test_michelson_format_parameter_ooe4gB(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooe4gB.tz') actual = micheline_to_michelson(get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooe4gB.json'), inline=True) self.assertEqual(expected, actual) def test_michelson_inverse_parameter_ooe4gB(self): expected = get_data( path='contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/parameter_ooe4gB.json') actual = michelson_to_micheline(micheline_to_michelson(expected)) self.assertEqual(expected, actual)
46.935323
89
0.734683
880
9,434
7.563636
0.05
0.048377
0.074369
0.135216
0.963341
0.963341
0.963341
0.963341
0.947416
0.947416
0
0.023049
0.190587
9,434
200
90
47.17
0.848612
0
0
0.639053
0
0
0.316833
0.316833
0
0
0
0
0.159763
1
0.16568
false
0
0.023669
0
0.195266
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
6495674227e2d4f327739dbc79ec0dbe607aeede
189
py
Python
simplepush/__init__.py
bobquest33/django-simplepush
af53ba086e51976a346e7741cb101c509ca9de0f
[ "BSD-3-Clause" ]
1
2021-07-30T21:00:49.000Z
2021-07-30T21:00:49.000Z
simplepush/__init__.py
bobquest33/django-simplepush
af53ba086e51976a346e7741cb101c509ca9de0f
[ "BSD-3-Clause" ]
null
null
null
simplepush/__init__.py
bobquest33/django-simplepush
af53ba086e51976a346e7741cb101c509ca9de0f
[ "BSD-3-Clause" ]
null
null
null
import json from .helpers import send_notification_to_user def send_user_notification(user, payload, ttl=0): payload = json.dumps(payload) send_notification_to_user(user, payload, ttl)
23.625
49
0.814815
28
189
5.214286
0.464286
0.219178
0.246575
0.30137
0
0
0
0
0
0
0
0.005917
0.10582
189
8
50
23.625
0.857988
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.6
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
6
64c8811a09b8f045e85e90b5c5ecbc4676c90930
1,148
py
Python
good_spot/places/migrations/0086_auto_20180813_1225.py
jasmine92122/NightClubBackend
7f59129b78baaba0e0c25de2b493033b858f1b00
[ "MIT" ]
null
null
null
good_spot/places/migrations/0086_auto_20180813_1225.py
jasmine92122/NightClubBackend
7f59129b78baaba0e0c25de2b493033b858f1b00
[ "MIT" ]
5
2020-02-12T03:13:11.000Z
2022-01-13T01:41:14.000Z
good_spot/places/migrations/0086_auto_20180813_1225.py
jasmine92122/NightClubBackend
7f59129b78baaba0e0c25de2b493033b858f1b00
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-08-13 12:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('places', '0085_placetype_name_plural'), ] operations = [ migrations.AddField( model_name='placetype', name='name_plural_en', field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Place type'), ), migrations.AddField( model_name='placetype', name='name_plural_fr', field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Place type'), ), migrations.AddField( model_name='placetype', name='name_plural_ru', field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Place type'), ), migrations.AddField( model_name='placetype', name='name_plural_uk', field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Place type'), ), ]
31.888889
100
0.611498
129
1,148
5.224806
0.379845
0.096439
0.136499
0.160237
0.700297
0.700297
0.700297
0.700297
0.626113
0.626113
0
0.034483
0.267422
1,148
35
101
32.8
0.766944
0.059233
0
0.571429
1
0
0.152275
0.024141
0
0
0
0
0
1
0
false
0
0.071429
0
0.178571
0
0
0
0
null
0
0
1
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
64d58b123468ff248ecdc2ae08b02067e31303dc
32
py
Python
src/ultimateml/dummy.py
EmilMachine/ultimateml
f5c58e882b120bb99e4a56ea3f9ac5a636ae3a00
[ "MIT" ]
null
null
null
src/ultimateml/dummy.py
EmilMachine/ultimateml
f5c58e882b120bb99e4a56ea3f9ac5a636ae3a00
[ "MIT" ]
null
null
null
src/ultimateml/dummy.py
EmilMachine/ultimateml
f5c58e882b120bb99e4a56ea3f9ac5a636ae3a00
[ "MIT" ]
null
null
null
def fancyfunction(): return 42
10.666667
20
0.75
4
32
6
1
0
0
0
0
0
0
0
0
0
0
0.074074
0.15625
32
3
21
10.666667
0.814815
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
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
1
0
0
1
0
0
0
6
b382e7cca2b06372222238d82ac27e4fe771b94d
52,650
py
Python
tests/test_aiotapioca.py
ilindrey/aiotapioca-wrapper
9fc84b8b5c7e11df3ee9a3c8aa6615bc94948524
[ "MIT" ]
null
null
null
tests/test_aiotapioca.py
ilindrey/aiotapioca-wrapper
9fc84b8b5c7e11df3ee9a3c8aa6615bc94948524
[ "MIT" ]
null
null
null
tests/test_aiotapioca.py
ilindrey/aiotapioca-wrapper
9fc84b8b5c7e11df3ee9a3c8aa6615bc94948524
[ "MIT" ]
null
null
null
import pickle from collections import OrderedDict from itertools import product import orjson import pytest import pytest_asyncio import xmltodict from aiohttp.client_reqrep import ClientResponse from pydantic import BaseModel from yarl import URL from aiotapioca.adapters import TapiocaAdapter, generate_wrapper_from_adapter from aiotapioca.aiotapioca import TapiocaClient, TapiocaClientExecutor from aiotapioca.exceptions import ClientError, ServerError from aiotapioca.serializers import SimpleSerializer from .callbacks import callback_201, callback_401 from .clients import ( ClassParserClient, CustomModel, CustomModelDT, DictParserClient, FailTokenRefreshClient, FuncParserClient, NoneSemaphoreClient, PydanticDefaultClientAdapter, PydanticForcedClient, RetryRequestClient, RootModel, RootModelDT, SimpleClient, StaticMethodParserClient, TokenRefreshByDefaultClient, TokenRefreshClient, XMLClient, ) @pytest_asyncio.fixture async def retry_request_client(): async with RetryRequestClient() as c: yield c @pytest_asyncio.fixture async def xml_client(): async with XMLClient() as c: yield c @pytest_asyncio.fixture async def token_refresh_by_default_client(): async with TokenRefreshByDefaultClient(token="token") as c: yield c @pytest.fixture def refresh_token_possible_false_values(): yield False, None, 1, 0, "511", -22, 41, [], tuple(), {}, set(), [41], { "key": "value" } def check_response(response, data, status=200, refresh_data=None): executor = response() assert type(response) == TapiocaClient assert type(executor) == TapiocaClientExecutor assert executor.data == data assert executor.refresh_data == refresh_data assert isinstance(executor.response, ClientResponse) assert executor.status == status async def check_pages_responses( response, total_pages=1, max_pages=None, max_items=None ): result_response = { response: { "data": [{"key": "value"}], "paging": {"next": "http://api.example.org/next_batch"}, }, response.data: [{"key": "value"}], response.paging: {"next": "http://api.example.org/next_batch"}, response.paging.next: "http://api.example.org/next_batch", } for resp, data in result_response.items(): check_response(resp, data) iterations_count = 0 async for item in response().pages(max_pages=max_pages, max_items=max_items): result_page = {item: {"key": "value"}, item.key: "value"} for resp, data in result_page.items(): check_response(resp, data) iterations_count += 1 assert iterations_count == total_pages """ test TapiocaClient """ def test_adapter_class_default_attributes(): assert isinstance(TapiocaAdapter.refresh_token, bool) assert isinstance(TapiocaAdapter.semaphore, int) assert isinstance(TapiocaAdapter.serializer_class, object) assert TapiocaAdapter.refresh_token is False assert TapiocaAdapter.semaphore == 10 assert TapiocaAdapter.serializer_class == SimpleSerializer def test_fill_url_template(client): expected_url = "https://api.example.org/user/123/" resource = client.user(id="123") assert resource.data == expected_url def test_fill_another_root_url_template(client): expected_url = "https://api.another.com/another-root/" resource = client.another_root() assert resource.data == expected_url def test_calling_len_on_tapioca_list(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) assert len(wrap_client) == 3 def test_iterated_client_items_should_be_tapioca_instances(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) for item in wrap_client: assert isinstance(item, TapiocaClient) def test_iterated_client_items_should_contain_list_items(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) for i, item in enumerate(wrap_client): assert item().data == i async def test_in_operator(mocked, client): mocked.get( client.test().data, body='{"data": 1, "other": 2}', status=200, content_type="application/json", ) response = await client.test().get() assert "data" in response assert "other" in response assert "wat" not in response async def test_transform_camelCase_in_snake_case(mocked, client): next_url = "http://api.example.org/next_batch" response_data = { "data": { "key_snake": "value", "camelCase": "data in camel case", "NormalCamelCase": "data in camel case", }, "paging": {"next": "%s" % next_url}, } mocked.add( client.test().data, body=orjson.dumps(response_data), status=200, content_type="application/json", ) response = await client.test().get() assert response.data.key_snake().data == "value" assert response.data.camel_case().data == "data in camel case" assert response.data.normal_camel_case().data == "data in camel case" async def test_should_be_able_to_access_by_index(mocked, client): mocked.get( client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await client.test().get() assert response[0]().data == "a" assert response[1]().data == "b" assert response[2]().data == "c" async def test_accessing_index_out_of_bounds_should_raise_index_error(mocked, client): mocked.get( client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await client.test().get() with pytest.raises(IndexError): response[3] async def test_accessing_empty_list_should_raise_index_error(mocked, client): mocked.get( client.test().data, body="[]", status=200, content_type="application/json" ) response = await client.test().get() with pytest.raises(IndexError): response[3] def test_fill_url_from_default_params(): client = SimpleClient(default_url_params={"id": 123}) assert client.user().data == "https://api.example.org/user/123/" async def test_is_pickleable(mocked): pickle_client = pickle.loads(pickle.dumps(SimpleClient())) # ensure requests keep working after pickle: next_url = "http://api.example.org/next_batch" mocked.get( pickle_client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) async with pickle_client: response = await pickle_client.test().get() iterations_count = 0 async for item in response().pages(): assert "value" in item.key().data iterations_count += 1 assert iterations_count == 2 """ test TapiocaExecutor """ def test_resource_executor_data_should_be_composed_url(client): expected_url = "https://api.example.org/test/" resource = client.test() assert resource.data == expected_url def test_docs(client): assert "\n".join(client.resource.__doc__.split("\n")[1:]) == ( "Resource: " + client.resource._resource["resource"] + "\n" "Docs: " + client.resource._resource["docs"] + "\n" "Foo: " + client.resource._resource["foo"] + "\n" "Spam: " + client.resource._resource["spam"] ) def test_access_data_attributres_through_executor(client): wrap_client = client._wrap_in_tapioca({"test": "value"}) items = wrap_client().items() assert isinstance(items, TapiocaClient) data = dict(items().data) assert data == {"test": "value"} def test_is_possible_to_reverse_a_list_through_executor(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) wrap_client().reverse() assert wrap_client().data == [2, 1, 0] def test_cannot__getittem__(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) with pytest.raises(Exception): wrap_client()[0] def test_cannot_iterate(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) with pytest.raises(Exception): for item in wrap_client(): pass def test_dir_call_returns_executor_methods(client): wrap_client = client._wrap_in_tapioca([0, 1, 2]) e_dir = dir(wrap_client()) assert "data" in e_dir assert "response" in e_dir assert "get" in e_dir assert "post" in e_dir assert "post_batch" in e_dir assert "pages" in e_dir assert "open_docs" in e_dir assert "open_in_browser" in e_dir async def test_response_executor_object_has_a_response(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() executor = response() assert executor.response is not None assert executor._response is not None assert executor.response.status == 200 assert executor._response.status == 200 def test_raises_error_if_executor_does_not_have_a_response_object(client): with pytest.raises(Exception): client().response async def test_response_executor_has_a_status_code(mocked, client): mocked.get( client.test().data, body='{"data": {"key": "value"}}', status=200, content_type="application/json", ) response = await client.test().get() assert response().status == 200 """ test TapiocaExecutor requests """ def test_when_executor_has_no_response(client): with pytest.raises(Exception) as context: client.test().response exception = context.exception assert "has no response" == str(exception) async def test_access_response_field(mocked, client): mocked.get( client.test().data, body='{"data": {"key": "value"}}', status=200, content_type="application/json", ) response = await client.test().get() response_data = response.data() assert response_data.data == {"key": "value"} async def test_carries_request_kwargs_over_calls(mocked, client): mocked.get( client.test().data, body='{"data": {"key": "value"}}', status=200, content_type="application/json", ) response = await client.test().get() request_kwargs = response.data.key()._request_kwargs assert "url" in request_kwargs assert "data" in request_kwargs assert "headers" in request_kwargs async def test_thrown_tapioca_exception_with_client_error_data(mocked, client): mocked.get( client.test().data, body='{"error": "bad request test"}', status=400, content_type="application/json", ) with pytest.raises(ClientError) as client_exception: await client.test().get() assert "bad request test" in client_exception.value.args async def test_thrown_tapioca_exception_with_server_error_data(mocked, client): mocked.get( client.test().data, body='{"error": "server error test"}', status=500, content_type="application/json", ) with pytest.raises(ServerError) as server_exception: await client.test().get() assert "server error test" in server_exception.value.args async def test_retry_request(mocked, retry_request_client): for _ in range(10): mocked.get( retry_request_client.test().data, body='{"error": "bad request test"}', status=400, content_type="application/json", ) mocked.get( retry_request_client.test().data, body='{"data": "success!"}', status=200, content_type="application/json", ) response = await retry_request_client.test().get() assert response.data().data == "success!" for _ in range(3): mocked.get( retry_request_client.test().data, body='{"error": "bad request test"}', status=400, content_type="application/json", ) mocked.get( retry_request_client.test().data, body='{"data": "success!"}', status=200, content_type="application/json", ) response = await retry_request_client.test().get() assert response.data().data == "success!" for _ in range(3): mocked.get( retry_request_client.test().data, body='{"error": "bad request test"}', status=403, content_type="application/json", ) with pytest.raises(ClientError): await retry_request_client.test().get() async def test_requests(mocked, client): semaphores = (3, None) types_request = ("get", "post", "put", "patch", "delete") for semaphore, type_request in product(semaphores, types_request): executor = client.test() status = 200 if type_request == "get" else 201 mocked_method = getattr(mocked, type_request) executor_method = getattr(executor, type_request) mocked_method( executor.data, body='{"data": {"key": "value"}}', status=status, content_type="application/json", ) kwargs = {} if semaphore: kwargs.update({"semaphore": semaphore}) response = await executor_method(**kwargs) result_response = { response: {"data": {"key": "value"}}, response.data: {"key": "value"}, response.data.key: "value", } for response, data in result_response.items(): check_response(response, data, status) async def test_batch_requests(mocked, client): response_data = [ {"data": {"key": "value"}}, {"data": {"key": "value"}}, {"data": {"key": "value"}}, ] semaphores = (3, None) types_request = ("post", "put", "patch", "delete") for semaphore, type_request in product(semaphores, types_request): executor = client.test() mocked_method = getattr(mocked, type_request) executor_method = getattr(executor, type_request + "_batch") for data_row in response_data: mocked_method( executor.data, body=orjson.dumps(data_row), status=201, content_type="application/json", ) kwargs = dict(data=response_data) if semaphore: kwargs.update({"semaphore": semaphore}) results = await executor_method(**kwargs) for i, response in enumerate(results): result_response = { response: response_data[i], response.data: response_data[i]["data"], response.data.key: response_data[i]["data"]["key"], } for resp, data in result_response.items(): check_response(resp, data, 201) assert len(results) == len(response_data) async def test_as_api_params_requests(mocked): semaphores = (4, None, False) types_request = ("get", "post", "put", "patch", "delete") for semaphore, type_request in product(semaphores, types_request): async with SimpleClient(semaphore=semaphore) as simple_client: executor = simple_client.test() status = 200 if type_request == "get" else 201 mocked_method = getattr(mocked, type_request) executor_method = getattr(executor, type_request) mocked_method( executor.data, body='{"data": {"key": "value"}}', status=status, content_type="application/json", ) kwargs = dict() response = await executor_method(**kwargs) result_response = { response: {"data": {"key": "value"}}, response.data: {"key": "value"}, response.data.key: "value", } for response, data in result_response.items(): check_response(response, data, status) assert response()._api_params.get("semaphore") == semaphore async def test_as_api_params_batch_requests(mocked): response_data = [ {"data": {"key": "value"}}, {"data": {"key": "value"}}, {"data": {"key": "value"}}, ] semaphores = (4, None, False) types_request = ("post", "put", "patch", "delete") for semaphore, type_request in product(semaphores, types_request): async with SimpleClient(semaphore=semaphore) as simple_client: executor = simple_client.test() mocked_method = getattr(mocked, type_request) executor_method = getattr(executor, type_request + "_batch") for data_row in response_data: mocked_method( executor.data, body=orjson.dumps(data_row), status=201, content_type="application/json", ) kwargs = dict(data=response_data) if semaphore: kwargs.update({"semaphore": semaphore}) results = await executor_method(**kwargs) for i, response in enumerate(results): result_response = { response: response_data[i], response.data: response_data[i]["data"], response.data.key: response_data[i]["data"]["key"], } for resp, data in result_response.items(): check_response(resp, data, 201) assert resp()._api_params.get("semaphore") == semaphore assert len(results) == len(response_data) async def test_failed_semaphore(mocked): async with NoneSemaphoreClient() as none_semaphore_client: mocked.get( none_semaphore_client.test().data, body='{"data": {"key": "value"}}', status=200, content_type="application/json", ) with pytest.raises(TypeError): await none_semaphore_client.test().get() """ test iterator features """ async def test_simple_pages_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=2) async def test_simple_pages_with_max_pages_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=7, max_pages=3) async def test_simple_pages_with_max_items_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=3, max_items=3) async def test_simple_pages_with_max_pages_and_max_items_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}, {"key": "value"}, {"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=3, max_pages=2, max_items=3) async def test_simple_pages_max_pages_zero_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.add( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=0, max_pages=0) async def test_simple_pages_max_items_zero_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=0, max_items=0) async def test_simple_pages_max_pages_ans_max_items_zero_iterator(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() await check_pages_responses(response, total_pages=0, max_pages=0, max_items=0) async def test_pages_iterator_with_client_error(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=408, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() result_response = { response: { "data": [{"key": "value"}], "paging": {"next": "http://api.example.org/next_batch"}, }, response.data: [{"key": "value"}], response.paging: {"next": "http://api.example.org/next_batch"}, response.paging.next: "http://api.example.org/next_batch", } for resp, data in result_response.items(): check_response(resp, data) iterations_count = 0 with pytest.raises(ClientError): async for item in response().pages(): result_page = {item: {"key": "value"}, item.key: "value"} for resp, data in result_page.items(): check_response(resp, data) iterations_count += 1 assert iterations_count == 2 async def test_pages_iterator_with_server_error(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=504, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() result_response = { response: { "data": [{"key": "value"}], "paging": {"next": "http://api.example.org/next_batch"}, }, response.data: [{"key": "value"}], response.paging: {"next": "http://api.example.org/next_batch"}, response.paging.next: "http://api.example.org/next_batch", } for resp, data in result_response.items(): check_response(resp, data) iterations_count = 0 with pytest.raises(ServerError): async for item in response().pages(): result_page = {item: {"key": "value"}, item.key: "value"} for resp, data in result_page.items(): check_response(resp, data) iterations_count += 1 assert iterations_count == 2 async def test_pages_iterator_with_error_on_single_page(mocked, client): next_url = "http://api.example.org/next_batch" mocked.get( client.test().data, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": "%s"}}' % next_url, status=200, content_type="application/json", ) mocked.get( next_url, body='{"data": [{}], "paging": {"next": "%s"}}' % next_url, status=204, content_type="application/json", ) mocked.get( next_url, body='{"data": [{"key": "value"}], "paging": {"next": ""}}', status=200, content_type="application/json", ) response = await client.test().get() result_response = { response: { "data": [{"key": "value"}], "paging": {"next": "http://api.example.org/next_batch"}, }, response.data: [{"key": "value"}], response.paging: {"next": "http://api.example.org/next_batch"}, response.paging.next: "http://api.example.org/next_batch", } for resp, data in result_response.items(): check_response(resp, data) iterations_count = 0 async for item in response().pages(): if iterations_count == 2: status = 204 result_page = {item: dict()} else: status = 200 result_page = {item: {"key": "value"}, item.key: "value"} for resp, data in result_page.items(): check_response(resp, data, status) iterations_count += 1 assert iterations_count == 4 """ test XML requests """ async def test_xml_post_string(mocked, xml_client): mocked.post( xml_client.test().data, body="Any response", status=200, content_type="application/json", ) data = '<tag1 attr1="val1">' "<tag2>text1</tag2>" "<tag3>text2</tag3>" "</tag1>" await xml_client.test().post(data=data) request_body = mocked.requests[("POST", URL(xml_client.test().data))][0].kwargs[ "data" ] assert request_body == data.encode("utf-8") async def test_xml_post_dict(mocked, xml_client): mocked.post( xml_client.test().data, body="Any response", status=200, content_type="application/json", ) data = OrderedDict( [ ( "tag1", OrderedDict([("@attr1", "val1"), ("tag2", "text1"), ("tag3", "text2")]), ) ] ) await xml_client.test().post(data=data) request_body = mocked.requests[("POST", URL(xml_client.test().data))][0].kwargs[ "data" ] assert request_body == xmltodict.unparse(data).encode("utf-8") async def test_xml_post_dict_passes_unparse_param(mocked, xml_client): mocked.post( xml_client.test().data, body="Any response", status=200, content_type="application/json", ) data = OrderedDict( [ ( "tag1", OrderedDict([("@attr1", "val1"), ("tag2", "text1"), ("tag3", "text2")]), ) ] ) await xml_client.test().post(data=data, xmltodict_unparse__full_document=False) request_body = mocked.requests[("POST", URL(xml_client.test().data))][0].kwargs[ "data" ] assert request_body == xmltodict.unparse(data, full_document=False).encode("utf-8") async def test_xml_returns_text_if_response_not_xml(mocked, xml_client): mocked.post( xml_client.test().data, body="Any response", status=200, content_type="any content", ) data = OrderedDict( [ ( "tag1", OrderedDict([("@attr1", "val1"), ("tag2", "text1"), ("tag3", "text2")]), ) ] ) response = await xml_client.test().post(data=data) assert "Any response" == response().data["text"] async def test_xml_post_dict_returns_dict_if_response_xml(mocked, xml_client): xml_body = '<tag1 attr1="val1">text1</tag1>' mocked.post( xml_client.test().data, body=xml_body, status=200, content_type="application/xml", ) data = OrderedDict( [ ( "tag1", OrderedDict([("@attr1", "val1"), ("tag2", "text1"), ("tag3", "text2")]), ) ] ) response = await xml_client.test().post(data=data) assert response().data == xmltodict.parse(xml_body) """ test token refreshing """ async def test_not_token_refresh_client_propagates_client_error(mocked, client): no_refresh_client = client mocked.post( no_refresh_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await no_refresh_client.test().post() async def test_disable_token_refreshing(mocked, refresh_token_possible_false_values): async with TokenRefreshClient(token="token") as token_refreshing_client: mocked.post( token_refreshing_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await token_refreshing_client.test().post() for refresh_token in refresh_token_possible_false_values: async with TokenRefreshClient( token="token", refresh_token=refresh_token ) as token_refreshing_client: mocked.post( token_refreshing_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await token_refreshing_client.test().post() async with TokenRefreshClient(token="token") as token_refreshing_client: mocked.post( token_refreshing_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await token_refreshing_client.test().post(refresh_token=refresh_token) async def test_token_expired_automatically_refresh_authentication(mocked): async with TokenRefreshClient(token="token") as token_refresh_client: mocked.post( token_refresh_client.test().data, callback=callback_401, content_type="application/json", ) mocked.post( token_refresh_client.test().data, callback=callback_201, content_type="application/json", ) response = await token_refresh_client.test().post(refresh_token=True) # refresh_authentication method should be able to update api_params assert response._api_params["token"] == "new_token" mocked.post( token_refresh_client.test().data, callback=callback_401, content_type="application/json", ) mocked.post( token_refresh_client.test().data, callback=callback_401, content_type="application/json", ) # check that the refresh_token flag is not cyclic with pytest.raises(ClientError): await token_refresh_client.test().post(refresh_token=True) async with TokenRefreshClient( token="token", refresh_token=True ) as token_refresh_client: mocked.post( token_refresh_client.test().data, callback=callback_401, content_type="application/json", ) mocked.post( token_refresh_client.test().data, callback=callback_201, content_type="application/json", ) response = await token_refresh_client.test().post() # refresh_authentication method should be able to update api_params assert response._api_params["token"] == "new_token" mocked.post( token_refresh_client.test().data, callback=callback_401, content_type="application/json", ) mocked.post( token_refresh_client.test().data, callback=callback_401, content_type="application/json", ) # check that the refresh_token flag is not cyclic with pytest.raises(ClientError): await token_refresh_client.test().post() async def test_token_expired_automatically_refresh_authentication_by_default( mocked, token_refresh_by_default_client ): mocked.post( token_refresh_by_default_client.test().data, callback=callback_401, content_type="application/json", ) mocked.post( token_refresh_by_default_client.test().data, callback=callback_201, content_type="application/json", ) response = await token_refresh_by_default_client.test().post() # refresh_authentication method should be able to update api_params assert response._api_params["token"] == "new_token" mocked.post( token_refresh_by_default_client.test().data, callback=callback_401, content_type="application/json", ) mocked.post( token_refresh_by_default_client.test().data, callback=callback_401, content_type="application/json", ) # check that the refresh_token flag is not cyclic with pytest.raises(ClientError): await token_refresh_by_default_client.test().post() async def test_raises_error_if_refresh_authentication_method_returns_false_value( mocked, refresh_token_possible_false_values ): async with FailTokenRefreshClient(token="token") as fail_client: mocked.post( fail_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await fail_client.test().post() for refresh_token in (True, *refresh_token_possible_false_values): async with FailTokenRefreshClient( token="token", refresh_token=refresh_token ) as fail_client: mocked.post( fail_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await fail_client.test().post() async with FailTokenRefreshClient(token="token") as fail_client: mocked.post( fail_client.test().data, callback=callback_401, content_type="application/json", ) with pytest.raises(ClientError): await fail_client.test().post(refresh_token=refresh_token) """ Test PydanticAdapterMixin. """ async def test_pydantic_model_not_found(mocked): async with PydanticForcedClient() as client: mocked.get( client.test_not_found().data, body="{}", status=200, content_type="application/json", ) with pytest.raises(ValueError): await client.test_not_found().get() async def test_bad_pydantic_model(mocked): async with PydanticForcedClient() as client: mocked.get( client.test_bad_pydantic_model().data, body="{}", status=200, content_type="application/json", ) with pytest.raises(ValueError): await client.test_bad_pydantic_model().get() async def test_bad_dataclass_model(mocked): async with PydanticForcedClient() as client: mocked.get( client.test_bad_dataclass_model().data, body="{}", status=200, content_type="application/json", ) with pytest.raises(TypeError): await client.test_bad_dataclass_model().get() async def test_pydantic_mixin_response_to_native(mocked): response_body_root = ( '[{"key1": "value1", "key2": 123}, {"key1": "value2", "key2": 321}]' ) response_body = '{"data": %s}' % response_body_root validate_data_received_list = [True, False] validate_data_sending_list = [True, False] extract_root_list = [True, False] convert_to_dict_list = [True, False] for validate_received, validate_sending, extract, convert in product( validate_data_received_list, validate_data_sending_list, extract_root_list, convert_to_dict_list, ): class PidanticClientAdapter(PydanticDefaultClientAdapter): validate_data_received = validate_received validate_data_sending = validate_sending extract_root = extract convert_to_dict = convert PydanticClient = generate_wrapper_from_adapter(PidanticClientAdapter) async with PydanticClient() as client: mocked.get( client.test().data, body=response_body, status=200, content_type="application/json", ) response = await client.test().get() if convert or not validate_received: assert isinstance(response().data, dict) assert response().data == orjson.loads(response_body) else: assert isinstance(response().data, BaseModel) assert response().data.dict() == orjson.loads(response_body) mocked.get( client.test_root().data, body=response_body_root, status=200, content_type="application/json", ) response = await client.test_root().get() data = response().data if extract: assert isinstance(data, list) else: if not validate_received: assert isinstance(data, list) elif convert: assert isinstance(data, dict) data = data["__root__"] else: assert isinstance(data, BaseModel) data = data.__root__ for response_data, expected_data in zip( data, orjson.loads(response_body_root) ): if convert or not validate_received: assert isinstance(response_data, dict) assert response_data == expected_data else: assert isinstance(response_data, BaseModel) assert response_data.dict() == expected_data mocked.get( client.test_dataclass().data, body=response_body, status=200, content_type="application/json", ) response = await client.test_dataclass().get() if convert or not validate_received: assert isinstance(response().data, dict) assert response().data == orjson.loads(response_body) else: assert isinstance(response().data, BaseModel) assert response().data.dict() == orjson.loads(response_body) mocked.get( client.test_dataclass_root().data, body=response_body_root, status=200, content_type="application/json", ) response = await client.test_dataclass_root().get() data = response().data if extract: assert isinstance(data, list) else: if not validate_received: assert isinstance(data, list) elif convert: assert isinstance(data, dict) data = data["__root__"] else: assert isinstance(data, BaseModel) data = data.__root__ for response_data, expected_data in zip( data, orjson.loads(response_body_root) ): if convert or not validate_received: assert isinstance(response_data, dict) assert response_data == expected_data else: assert isinstance(response_data, BaseModel) assert response_data.dict() == expected_data async def test_pydantic_mixin_format_data_to_request(mocked): response_body_root = ( '[{"key1": "value1", "key2": 123}, {"key1": "value2", "key2": 321}]' ) response_body = '{"data": %s}' % response_body_root validate_data_received_list = [True, False] validate_data_sending_list = [True, False] extract_root_list = [True, False] convert_to_dict_list = [True, False] for validate_received, validate_sending, extract, convert in product( validate_data_received_list, validate_data_sending_list, extract_root_list, convert_to_dict_list, ): class PidanticClientAdapter(PydanticDefaultClientAdapter): validate_data_received = validate_received validate_data_sending = validate_sending extract_root = extract convert_to_dict = convert PydanticClient = generate_wrapper_from_adapter(PidanticClientAdapter) async with PydanticClient() as client: mocked.post( client.test().data, body='{"id": 100500}', status=200, content_type="application/json", ) if validate_sending: data = orjson.loads(response_body) response = await client.test().post(data=data) assert response().data == {"id": 100500} else: data = CustomModel.parse_raw(response_body) response = await client.test().post(data=data) assert response().data == {"id": 100500} if validate_sending: data = orjson.loads(response_body_root) for _ in range(len(data)): mocked.post( client.test_root().data, body='{"id": 100500}', status=200, content_type="application/json", ) responses = await client.test_root().post_batch(data=data) assert len(responses) == len(data) for response in responses: assert response().data == {"id": 100500} else: data = RootModel.parse_raw(response_body_root) for _ in range(len(data.__root__)): mocked.post( client.test_root().data, body='{"id": 100500}', status=200, content_type="application/json", ) responses = await client.test_root().post_batch(data=data.__root__) assert len(responses) == len(data.__root__) for response in responses: assert response().data == {"id": 100500} mocked.post( client.test().data, body='{"id": 100500}', status=200, content_type="application/json", ) if validate_sending: data = orjson.loads(response_body) response = await client.test_dataclass().post(data=data) assert response().data == {"id": 100500} else: data = CustomModelDT.__pydantic_model__.parse_raw(response_body) response = await client.test_dataclass().post(data=data) assert response().data == {"id": 100500} if validate_sending: data = orjson.loads(response_body_root) for _ in range(len(data)): mocked.post( client.test_root().data, body='{"id": 100500}', status=200, content_type="application/json", ) responses = await client.test_root().post_batch(data=data) assert len(responses) == len(data) for response in responses: assert response().data == {"id": 100500} else: data = RootModelDT.__pydantic_model__.parse_raw(response_body_root) for _ in range(len(data.__root__)): mocked.post( client.test_root().data, body='{"id": 100500}', status=200, content_type="application/json", ) responses = await client.test_root().post_batch(data=data.__root__) assert len(responses) == len(data.__root__) for response in responses: assert response().data == {"id": 100500} class PidanticClientAdapter(PydanticDefaultClientAdapter): forced_to_have_model = True validate_data_sending = False validate_data_received = False PydanticClient = generate_wrapper_from_adapter(PidanticClientAdapter) async with PydanticClient() as client: data = orjson.loads(response_body_root) for _ in range(len(data)): mocked.post( client.test_root().data, body='{"id": 100500}', status=200, content_type="application/json", ) responses = await client.test_root().post_batch(data=data) assert len(responses) == len(data) for response in responses: assert response().data == {"id": 100500} class TestParsers: @pytest_asyncio.fixture async def func_parser_client(self): async with FuncParserClient() as client: yield client @pytest_asyncio.fixture async def static_method_parser_client(self): async with StaticMethodParserClient() as client: yield client @pytest_asyncio.fixture async def class_parser_client(self): async with ClassParserClient() as client: yield client @pytest_asyncio.fixture async def dict_parser_client(self): async with DictParserClient() as client: yield client async def test_parsers_not_found(self, mocked, func_parser_client): mocked.get( func_parser_client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await func_parser_client.test().get() with pytest.raises(AttributeError): response().blablabla() async def test_func_parser(self, mocked, func_parser_client): mocked.get( func_parser_client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await func_parser_client.test().get() assert response().foo_parser() == ["a", "b", "c"] assert response().foo_parser(0) == "a" assert response().foo_parser(1) == "b" assert response().foo_parser(2) == "c" with pytest.raises(IndexError): response().foo_parser(3) async def test_static_method_parser(self, mocked, static_method_parser_client): mocked.get( static_method_parser_client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await static_method_parser_client.test().get() assert response().foo() == ["a", "b", "c"] assert response().foo(0) == "a" assert response().foo(1) == "b" assert response().foo(2) == "c" with pytest.raises(IndexError): response().foo(3) async def test_class_parser(self, mocked, class_parser_client): mocked.get( class_parser_client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await class_parser_client.test().get() parser = response().foo_parser() assert parser.bar() == ["a", "b", "c"] assert parser.bar(0) == "a" assert parser.bar(1) == "b" assert parser.bar(2) == "c" with pytest.raises(IndexError): parser.bar(3) async def test_dict_parser(self, mocked, dict_parser_client): mocked.get( dict_parser_client.test().data, body='["a", "b", "c"]', status=200, content_type="application/json", ) response = await dict_parser_client.test().get() assert response().func_parser() == ["a", "b", "c"] assert response().func_parser(1) == "b" assert response().static_method_parser() == ["a", "b", "c"] assert response().static_method_parser(1) == "b" assert response().class_parser().bar() == ["a", "b", "c"] assert response().class_parser().bar(1) == "b"
30.363322
105
0.586667
5,663
52,650
5.224439
0.058626
0.04901
0.071385
0.083485
0.810654
0.772697
0.746874
0.719496
0.702021
0.681302
0
0.016144
0.283533
52,650
1,733
106
30.380842
0.768172
0.007293
0
0.65139
0
0.006762
0.127149
0.00048
0
0
0
0
0.096168
1
0.013524
false
0.001503
0.012021
0
0.036814
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b3ceb7bacaabc9d374ce9e5489d90bcedfbf69ad
159
py
Python
dp_tornado/helper/security/web/__init__.py
donghak-shin/dp-tornado
095bb293661af35cce5f917d8a2228d273489496
[ "MIT" ]
18
2015-04-07T14:28:39.000Z
2020-02-08T14:03:38.000Z
dp_tornado/helper/security/web/__init__.py
donghak-shin/dp-tornado
095bb293661af35cce5f917d8a2228d273489496
[ "MIT" ]
7
2016-10-05T05:14:06.000Z
2021-05-20T02:07:22.000Z
dp_tornado/helper/security/web/__init__.py
donghak-shin/dp-tornado
095bb293661af35cce5f917d8a2228d273489496
[ "MIT" ]
11
2015-12-15T09:49:39.000Z
2021-09-06T18:38:21.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from dp_tornado.engine.helper import Helper as dpHelper class WebHelper(dpHelper): pass
15.9
55
0.748428
21
159
5.380952
0.761905
0
0
0
0
0
0
0
0
0
0
0.007519
0.163522
159
9
56
17.666667
0.842105
0.132075
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
b3d5be07df5ced34dc59e990bef205aa91454a35
36
py
Python
python/cendalytics/core/__init__.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/cendalytics/core/__init__.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/cendalytics/core/__init__.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
from .cendant_api import CendantAPI
18
35
0.861111
5
36
6
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
1
36
36
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
b609f4b1ffa24614e7665b9913e37d343760b745
341
py
Python
Introducao python/exercicios/ex009.py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
null
null
null
Introducao python/exercicios/ex009.py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
null
null
null
Introducao python/exercicios/ex009.py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
null
null
null
n = int(input('Insira um número: ')) print('_' * 12) print(f'{n} X 1 = {n*1}') print(f'{n} X 2 = {n*2}') print(f'{n} X 3 = {n*3}') print(f'{n} X 4 = {n*4}') print(f'{n} X 5 = {n*5}') print(f'{n} x 6 = {n*6}') print(f'{n} X 7 = {n*7}') print(f'{n} X 8 = {n*8}') print(f'{n} X 9 = {n*9}') print(f'{n} X 10 = {n*10}') print('_' * 12)
22.733333
36
0.442815
80
341
1.8625
0.25
0.402685
0.469799
0.536913
0
0
0
0
0
0
0
0.096654
0.211144
341
14
37
24.357143
0.457249
0
0
0.153846
0
0
0.532353
0
0
0
0
0
0
1
0
false
0
0
0
0
0.923077
0
0
1
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
6
b611137ed77fff3f1dc6cb533c989b3abe68b3ac
99
py
Python
tests/test_fill.py
NioGreek/Clashgap
8e066de522b139fbb30f742eea64a549c57d9b00
[ "MIT" ]
2
2021-07-20T17:09:06.000Z
2021-07-22T03:05:24.000Z
tests/test_fill.py
NioGreek/Clashgap
8e066de522b139fbb30f742eea64a549c57d9b00
[ "MIT" ]
2
2021-07-22T12:57:33.000Z
2021-07-24T08:28:56.000Z
tests/test_fill.py
NioGreek/Clashgap
8e066de522b139fbb30f742eea64a549c57d9b00
[ "MIT" ]
1
2021-07-21T07:03:19.000Z
2021-07-21T07:03:19.000Z
import clashgap as cg def test_fill(): assert cg.fill([["sp", "h"], "am"]) == ["spam", "ham"]
19.8
58
0.545455
15
99
3.533333
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.181818
99
4
59
24.75
0.654321
0
0
0
0
0
0.121212
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
3774af41dcc95d857b67d1577a491813ead4a946
4,664
py
Python
tests/system/action/meeting/test_delete_all_speakers_of_all_lists.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
tests/system/action/meeting/test_delete_all_speakers_of_all_lists.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
19
2021-11-22T16:25:54.000Z
2021-11-25T13:38:13.000Z
tests/system/action/meeting/test_delete_all_speakers_of_all_lists.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
from openslides_backend.permissions.permissions import Permissions from tests.system.action.base import BaseActionTestCase class MeetingDeleteAllSpeakersOfAllListsActionTest(BaseActionTestCase): def setUp(self) -> None: super().setUp() self.permission_test_model = { "list_of_speakers/11": {"meeting_id": 1, "speaker_ids": [1]}, "speaker/1": {"list_of_speakers_id": 11, "meeting_id": 1}, "meeting/1": { "name": "name_srtgb123", "list_of_speakers_ids": [11], "speaker_ids": [1], "is_active_in_organization_id": 1, }, } def test_no_los(self) -> None: self.create_model( "meeting/110", { "name": "name_srtgb123", "list_of_speakers_ids": [], "is_active_in_organization_id": 1, }, ) response = self.request("meeting.delete_all_speakers_of_all_lists", {"id": 110}) self.assert_status_code(response, 200) def test_one_los_empty(self) -> None: self.set_models( { "list_of_speakers/11": {"meeting_id": 110, "speaker_ids": []}, "meeting/110": { "name": "name_srtgb123", "list_of_speakers_ids": [11], "is_active_in_organization_id": 1, }, } ) response = self.request("meeting.delete_all_speakers_of_all_lists", {"id": 110}) self.assert_status_code(response, 200) def test_1_los_1_speaker(self) -> None: self.set_models( { "list_of_speakers/11": {"meeting_id": 110, "speaker_ids": [1]}, "speaker/1": {"list_of_speakers_id": 11, "meeting_id": 110}, "meeting/110": { "name": "name_srtgb123", "list_of_speakers_ids": [11], "speaker_ids": [1], "is_active_in_organization_id": 1, }, } ) response = self.request("meeting.delete_all_speakers_of_all_lists", {"id": 110}) self.assert_status_code(response, 200) self.assert_model_deleted("speaker/1") def test_1_los_2_speakers(self) -> None: self.set_models( { "list_of_speakers/11": {"meeting_id": 110, "speaker_ids": [1, 2]}, "speaker/1": {"list_of_speakers_id": 11, "meeting_id": 110}, "speaker/2": {"list_of_speakers_id": 11, "meeting_id": 110}, "meeting/110": { "name": "name_srtgb123", "list_of_speakers_ids": [11], "speaker_ids": [1, 2], "is_active_in_organization_id": 1, }, } ) response = self.request("meeting.delete_all_speakers_of_all_lists", {"id": 110}) self.assert_status_code(response, 200) self.assert_model_deleted("speaker/1") self.assert_model_deleted("speaker/2") def test_3_los(self) -> None: self.set_models( { "list_of_speakers/11": {"meeting_id": 110, "speaker_ids": [1, 2]}, "speaker/1": {"list_of_speakers_id": 11, "meeting_id": 110}, "speaker/2": {"list_of_speakers_id": 11, "meeting_id": 110}, "list_of_speakers/12": {"meeting_id": 110, "speaker_ids": []}, "list_of_speakers/13": {"meeting_id": 110, "speaker_ids": [3]}, "speaker/3": {"list_of_speakers_id": 13, "meeting_id": 110}, "meeting/110": { "name": "name_srtgb123", "list_of_speakers_ids": [11, 12, 13], "speaker_ids": [1, 2, 3], "is_active_in_organization_id": 1, }, } ) response = self.request("meeting.delete_all_speakers_of_all_lists", {"id": 110}) self.assert_status_code(response, 200) self.assert_model_deleted("speaker/1") self.assert_model_deleted("speaker/2") self.assert_model_deleted("speaker/3") def test_no_permissions(self) -> None: self.base_permission_test( self.permission_test_model, "meeting.delete_all_speakers_of_all_lists", {"id": 1}, ) def test_permissions(self) -> None: self.base_permission_test( self.permission_test_model, "meeting.delete_all_speakers_of_all_lists", {"id": 1}, Permissions.ListOfSpeakers.CAN_MANAGE, )
39.193277
88
0.534091
504
4,664
4.545635
0.119048
0.052379
0.122217
0.054998
0.802706
0.770842
0.75993
0.75993
0.75993
0.741161
0
0.059278
0.334477
4,664
118
89
39.525424
0.678802
0
0
0.518519
0
0
0.298456
0.096055
0
0
0
0
0.101852
1
0.074074
false
0
0.018519
0
0.101852
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
378fa60e9ce1cd0fbc51113706daba7125c8fc17
163
py
Python
src/adafruit_blinka/microcontroller/amlogic/s905x3/pin.py
Jcc99/Adafruit_Blinka
41f8155bab83039ed9d45276addd3d501e83f3e6
[ "MIT" ]
294
2018-06-30T19:08:27.000Z
2022-03-26T21:08:47.000Z
src/adafruit_blinka/microcontroller/amlogic/s905x3/pin.py
Jcc99/Adafruit_Blinka
41f8155bab83039ed9d45276addd3d501e83f3e6
[ "MIT" ]
421
2018-06-30T20:54:46.000Z
2022-03-31T15:08:37.000Z
src/adafruit_blinka/microcontroller/amlogic/s905x3/pin.py
Jcc99/Adafruit_Blinka
41f8155bab83039ed9d45276addd3d501e83f3e6
[ "MIT" ]
234
2018-07-23T18:49:16.000Z
2022-03-28T16:59:48.000Z
"""AmLogic s905x3 pin names""" # pylint: disable=wildcard-import,unused-wildcard-import from adafruit_blinka.microcontroller.amlogic.meson_g12_common.pin import *
40.75
74
0.822086
21
163
6.238095
0.761905
0.21374
0
0
0
0
0
0
0
0
0
0.039474
0.067485
163
3
75
54.333333
0.822368
0.490798
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
3792f978ea808a632abc7ad8cfbb0bfad7875985
209
py
Python
my_dataclasses/plays.py
GudniNatan/GSKI-PA6
a0f9a38bc0d2f6710f803a77276e6a76cd6f4471
[ "MIT" ]
null
null
null
my_dataclasses/plays.py
GudniNatan/GSKI-PA6
a0f9a38bc0d2f6710f803a77276e6a76cd6f4471
[ "MIT" ]
null
null
null
my_dataclasses/plays.py
GudniNatan/GSKI-PA6
a0f9a38bc0d2f6710f803a77276e6a76cd6f4471
[ "MIT" ]
null
null
null
from dataclasses import dataclass from my_dataclasses.member import Member from my_dataclasses.sport import Sport @dataclass(order=True, frozen=True) class Plays(object): member: Member sport: Sport
20.9
40
0.794258
28
209
5.857143
0.464286
0.073171
0.207317
0
0
0
0
0
0
0
0
0
0.143541
209
9
41
23.222222
0.916201
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
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
0
1
0
1
0
1
0
0
6
80a31b978430a03712aa6e4c30f664c12e4e5cee
44
py
Python
stdplugins/__init__.py
ppppspsljdhdd/Pepe
1e57825ddb0ab3ba15a19cad0ecfbf2622f6b851
[ "Apache-2.0" ]
20
2020-01-25T05:08:26.000Z
2022-01-18T07:37:53.000Z
stdplugins/__init__.py
ishaizz/PepeBot
7440cadc8228106d221fc8e436a0809a86be5159
[ "Apache-2.0" ]
15
2019-11-07T07:53:56.000Z
2022-01-23T09:21:17.000Z
stdplugins/__init__.py
ishaizz/PepeBot
7440cadc8228106d221fc8e436a0809a86be5159
[ "Apache-2.0" ]
62
2019-10-20T06:35:19.000Z
2021-01-23T17:26:05.000Z
from uniborg import * from userbot import *
14.666667
21
0.772727
6
44
5.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.181818
44
2
22
22
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
80b8628f26ab382aefa545b0fb3740e9e53b5e22
70
py
Python
not_tf_opt/__init__.py
gergely-flamich/not-tf-opt
18e2c0024f1179a51190751d22ba4eb8b25bf3db
[ "MIT" ]
null
null
null
not_tf_opt/__init__.py
gergely-flamich/not-tf-opt
18e2c0024f1179a51190751d22ba4eb8b25bf3db
[ "MIT" ]
null
null
null
not_tf_opt/__init__.py
gergely-flamich/not-tf-opt
18e2c0024f1179a51190751d22ba4eb8b25bf3db
[ "MIT" ]
null
null
null
from .variables import * from .optimize import * from .utils import *
17.5
24
0.742857
9
70
5.777778
0.555556
0.384615
0
0
0
0
0
0
0
0
0
0
0.171429
70
3
25
23.333333
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
80fcaf869f884bfa65105bd82efb6048d76b37ce
38
py
Python
test/test-sys.py
xupingmao/minipy
5bce2f238925eb92fe9ff7d935f59ef68daa257a
[ "MIT" ]
52
2016-07-11T10:14:35.000Z
2021-12-09T09:10:43.000Z
test/test_case/060_test_sys.py
xupingmao/snake
c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4
[ "MIT" ]
13
2016-07-24T13:50:37.000Z
2019-03-02T06:56:18.000Z
test/test_case/060_test_sys.py
xupingmao/snake
c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4
[ "MIT" ]
9
2017-01-27T10:46:04.000Z
2021-12-09T09:10:46.000Z
import sys assert len(sys.argv) == 1
9.5
25
0.684211
7
38
3.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0.032258
0.184211
38
4
25
9.5
0.806452
0
0
0
0
0
0
0
0
0
0
0
0.5
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
1
0
0
1
0
1
0
0
0
0
6
038ef106b20c259dc5c6a88c1f1d3f5f223b4129
289
py
Python
src/evidently/profile_sections/__init__.py
jenoOvchi/evidently
6ca36d633ee258442410ef47a219ff40b8a5097b
[ "Apache-2.0" ]
null
null
null
src/evidently/profile_sections/__init__.py
jenoOvchi/evidently
6ca36d633ee258442410ef47a219ff40b8a5097b
[ "Apache-2.0" ]
null
null
null
src/evidently/profile_sections/__init__.py
jenoOvchi/evidently
6ca36d633ee258442410ef47a219ff40b8a5097b
[ "Apache-2.0" ]
null
null
null
import warnings import evidently.model_profile.sections from evidently.model_profile.sections import * __path__ = evidently.model_profile.sections.__path__ # type: ignore warnings.warn("'import evidently.profile_sections' is deprecated, use 'import evidently.model_profile.sections'")
32.111111
113
0.83045
35
289
6.485714
0.4
0.330396
0.370044
0.511013
0.30837
0
0
0
0
0
0
0
0.086505
289
8
114
36.125
0.859848
0.041522
0
0
0
0
0.349091
0.218182
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
6
0392a06f401816010aba9707153aeba037ae42bf
217,226
py
Python
pirates/leveleditor/worldData/CubaIsland.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
3
2021-02-25T06:38:13.000Z
2022-03-22T07:00:15.000Z
pirates/leveleditor/worldData/CubaIsland.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
null
null
null
pirates/leveleditor/worldData/CubaIsland.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
1
2021-02-25T06:38:17.000Z
2021-02-25T06:38:17.000Z
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.leveleditor.worldData.CubaIsland from pandac.PandaModules import Point3, VBase3, Vec4, Vec3 objectStruct = {'Locator Links': [['1161732578.11sdnaik', '1161732370.86sdnaik', 'Bi-directional'], ['1161732317.95sdnaik', '1161732370.88sdnaik', 'Bi-directional'], ['1161732322.52sdnaik', '1161732705.72sdnaik', 'Bi-directional'], ['1161732578.08sdnaik', '1161732705.7sdnaik', 'Bi-directional']], 'Objects': {'1160614528.73sdnaik': {'Type': 'Island', 'Name': 'CubaIsland', 'File': '', 'Environment': 'OpenSky', 'Footstep Sound': 'Sand', 'Minimap': False, 'Objects': {'1161732317.95sdnaik': {'Type': 'Locator Node', 'Name': 'portal_exterior_1', 'Hpr': VBase3(180.0, 0.0, 0.0), 'Pos': Point3(471.383, -559.794, -2.597), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (1.0, 1.0, 1.0, 1.0)}}, '1161732322.52sdnaik': {'Type': 'Locator Node', 'Name': 'portal_exterior_2', 'Hpr': VBase3(-101.237, 0.0, 0.0), 'Pos': Point3(107.301, -127.258, 0.205), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1161732370.84sdnaik': {'Type': 'Connector Tunnel', 'File': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Objects': {'1161732370.86sdnaik': {'Type': 'Locator Node', 'Name': 'portal_connector_1', 'GridPos': Point3(1127.779, -170.628, 33.329), 'Hpr': VBase3(-88.748, 0.0, 0.0), 'Pos': Point3(-3.613, 0.304, 4.651), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1161732370.88sdnaik': {'Type': 'Locator Node', 'Name': 'portal_connector_2', 'GridPos': Point3(1061.428, -327.097, 32.474), 'Hpr': VBase3(72.65, -1.426, -0.516), 'Pos': Point3(-103.188, 135.024, 3.777), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(95.277, -622.544, 241.267), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/tunnels/tunnel_swamp'}}, '1161732578.06sdnaik': {'Type': 'Island Game Area', 'File': 'cuba_area_swamp_1', 'Hpr': VBase3(83.644, 0.105, -0.94), 'Objects': {'1161732578.08sdnaik': {'Type': 'Locator Node', 'Name': 'portal_interior_1', 'GridPos': Point3(1533.649, 436.867, 94.327), 'Hpr': VBase3(-177.386, -0.684, -0.017), 'Pos': Point3(400.751, 192.485, 6.419), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1161732578.11sdnaik': {'Type': 'Locator Node', 'Name': 'portal_interior_2', 'GridPos': Point3(900.096, 220.241, 102.291), 'Hpr': VBase3(2.192, 0.683, 0.039), 'Pos': Point3(-232.802, -24.141, 14.383), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(1132.898, 244.382, 597.635), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/swamps/pir_m_are_swm_a'}}, '1161732705.67sdnaik': {'Type': 'Connector Tunnel', 'File': '', 'Hpr': VBase3(-47.944, -3.89, 3.503), 'Objects': {'1161732705.72sdnaik': {'Type': 'Locator Node', 'Name': 'portal_connector_2', 'GridPos': Point3(708.83, 396.283, 89.205), 'Hpr': VBase3(72.65, -1.426, -0.516), 'Pos': Point3(-103.188, 135.024, 3.777), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1161732705.7sdnaik': {'Type': 'Locator Node', 'Name': 'portal_connector_1', 'GridPos': Point3(775.181, 552.752, 90.061), 'Hpr': VBase3(-88.748, 0.0, 0.0), 'Pos': Point3(-3.613, 0.304, 4.651), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(-163.185, 26.795, 316.996), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/tunnels/tunnel_swamp'}}, '1162496104.57dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-121.98, 5.318, 2.905), 'Pos': Point3(194.391, -145.836, 1.786), 'Scale': VBase3(1.14, 1.14, 1.14), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496561.59dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-174.43, 3.494, 3.134), 'Pos': Point3(248.807, -187.757, -1.425), 'Scale': VBase3(1.749, 1.749, 1.749), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496585.79dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(102.954, -3.649, 0.624), 'Pos': Point3(228.148, -194.805, -0.104), 'Scale': VBase3(1.749, 1.749, 1.749), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496638.89dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-178.512, 0.068, -5.979), 'Pos': Point3(221.706, -161.475, -3.687), 'Scale': VBase3(1.212, 1.212, 1.212), 'Visual': {'Color': (0.800000011920929, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496693.54dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-81.75, 5.236, 2.288), 'Pos': Point3(306.624, -244.912, 2.29), 'Scale': VBase3(1.846, 1.846, 1.846), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496757.15dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-162.582, -1.433, 5.53), 'Pos': Point3(288.119, -213.242, 5.442), 'Scale': VBase3(1.846, 1.846, 1.846), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496818.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-95.42, 2.604, -0.358), 'Pos': Point3(262.002, -197.86, -1.237), 'Scale': VBase3(1.813, 1.813, 1.813), 'Visual': {'Color': (0.800000011920929, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496857.71dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-49.89, 1.57, -2.109), 'Pos': Point3(290.286, -233.631, 1.056), 'Scale': VBase3(1.685, 1.685, 1.685), 'Visual': {'Color': (0.800000011920929, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496880.34dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-49.89, 1.57, -2.109), 'Pos': Point3(203.311, -212.777, 2.077), 'Scale': VBase3(1.685, 1.685, 1.685), 'Visual': {'Color': (0.800000011920929, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496889.81dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-132.466, 2.295, 1.283), 'Pos': Point3(159.066, -132.814, 2.534), 'Scale': VBase3(1.685, 1.685, 1.685), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162496999.35dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-76.632, 2.351, -1.177), 'Pos': Point3(185.402, -156.567, -1.333), 'Scale': VBase3(1.181, 1.181, 1.181), 'Visual': {'Color': (0.8, 0.87, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162497015.78dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(175.664, -2.875, 4.677), 'Pos': Point3(132.299, -158.771, 0.088), 'Scale': VBase3(1.181, 1.181, 1.181), 'Visual': {'Color': (0.8, 0.87, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162497038.53dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-93.151, 1.894, 1.69), 'Pos': Point3(174.318, -174.436, -2.428), 'Scale': VBase3(1.477, 1.477, 1.477), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162497249.64dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-27.472, 2.32, -1.029), 'Pos': Point3(61.752, -128.37, 0.0), 'Scale': VBase3(2.466, 2.466, 2.466), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162497329.21dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-55.834, 1.221, 0.0), 'Pos': Point3(86.467, -131.751, -2.015), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162497460.96dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(158.083, -7.978, -0.962), 'Pos': Point3(28.162, -66.255, -8.54), 'Scale': VBase3(2.788, 2.788, 2.788), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162497568.12dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(16.872, -119.363, -2.0), 'Scale': VBase3(0.895, 0.895, 0.895), 'Visual': {'Color': (1.0, 0.9900000095367432, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162497591.24dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-27.12, 0.0, 0.0), 'Pos': Point3(-9.666, -73.007, -2.0), 'Scale': VBase3(0.872, 0.872, 0.872), 'Visual': {'Model': 'models/vegetation/swamp_tree_b'}}, '1162497648.96dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-96.431, -90.501, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.8500000238418579, 0.8199999928474426, 0.7300000190734863, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162497681.26dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-6.462, -124.144, -2.0), 'Scale': VBase3(1.172, 1.172, 1.172), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162497693.48dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(11.047, -132.343, 1.061), 'Scale': VBase3(1.172, 1.172, 1.172), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1162497709.17dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-7.714, -131.882, -4.475), 'Scale': VBase3(1.018, 1.018, 1.018), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162498231.46dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(92.824, 1.752, 1.371), 'Pos': Point3(289.328, -322.038, -1.973), 'Scale': VBase3(2.391, 2.391, 2.391), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498233.67dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-81.75, 5.236, 2.288), 'Pos': Point3(311.02, -330.127, -2.0), 'Scale': VBase3(1.846, 1.846, 1.846), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498236.93dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-81.75, 5.236, 2.288), 'Pos': Point3(291.992, -284.872, -2.0), 'Scale': VBase3(1.846, 1.846, 1.846), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498256.79dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-175.195, -2.608, 5.084), 'Pos': Point3(351.684, -338.435, 6.714), 'Scale': VBase3(2.484, 2.484, 2.484), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498287.12dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-55.834, 0.0, 0.0), 'Pos': Point3(330.397, -323.928, -2.0), 'Scale': VBase3(0.868, 0.868, 0.868), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162498321.2dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-163.404, -2.394, 1.296), 'Pos': Point3(-105.028, -386.378, -0.932), 'Scale': VBase3(1.729, 1.729, 1.729), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498369.29dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-156.824, -2.23, 1.562), 'Pos': Point3(-39.408, -430.211, -4.527), 'Scale': VBase3(1.942, 1.942, 1.942), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498390.34dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(56.286, 1.014, -2.526), 'Pos': Point3(-12.316, -534.81, -2.0), 'Scale': VBase3(2.072, 2.072, 2.072), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498400.56dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-138.604, -1.63, 4.472), 'Pos': Point3(-6.568, -563.456, -2.0), 'Scale': VBase3(1.924, 1.924, 1.924), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498416.74dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-115.464, 0.262, -0.36), 'Pos': Point3(-32.335, -543.622, 0.636), 'Scale': VBase3(2.21, 2.21, 2.21), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498428.64dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(177.628, -4.27, 2.103), 'Pos': Point3(-37.621, -560.769, 0.288), 'Scale': VBase3(1.591, 1.591, 1.591), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498500.51dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-125.283, -101.993, -2.0), 'Scale': VBase3(0.779, 0.779, 0.779), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162498514.14dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-96.751, 0.0, 0.0), 'Pos': Point3(-133.251, -114.765, -2.0), 'Scale': VBase3(0.7, 0.7, 0.7), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162498585.56dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-131.038, -155.049, -2.0), 'Scale': VBase3(1.276, 1.276, 1.276), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498611.99dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-95.057, 0.0, 0.0), 'Pos': Point3(-122.674, -137.024, 3.248), 'Scale': VBase3(1.372, 1.372, 1.372), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162498633.87dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-89.806, -151.497, -2.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162498653.28dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-106.137, -96.349, -1.129), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162501202.2dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-58.658, 0.0, 0.0), 'Pos': Point3(-257.241, -565.015, 15.245), 'Scale': VBase3(1.692, 1.692, 1.692), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501211.4dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-290.342, -852.048, 8.106), 'Scale': VBase3(1.364, 1.364, 1.364), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501216.51dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-283.447, -583.547, 20.569), 'Scale': VBase3(1.364, 1.364, 1.364), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501218.89dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-276.987, -1036.227, -2.0), 'Scale': VBase3(1.364, 1.364, 1.364), 'Visual': {'Color': (0.72, 0.79, 0.788235294117647, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501221.32dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(86.035, 0.0, 0.0), 'Pos': Point3(-247.343, -951.268, -1.225), 'Scale': VBase3(1.364, 1.364, 1.364), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501223.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(31.708, -1.565, -0.47), 'Pos': Point3(-279.114, -872.037, 2.431), 'Scale': VBase3(1.278, 1.278, 1.278), 'Visual': {'Color': (0.75, 0.75, 0.7529411764705882, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501264.03dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(174.015, -1.384, -1.516), 'Pos': Point3(-275.049, -895.262, 2.226), 'Scale': VBase3(1.324, 1.324, 1.324), 'Visual': {'Color': (0.699999988079071, 0.7300000190734863, 0.5799999833106995, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501292.92dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(2.058, 1.989, 3.485), 'Pos': Point3(-269.343, -916.458, 2.4), 'Scale': VBase3(1.845, 1.845, 1.845), 'Visual': {'Color': (0.71, 0.82, 0.7019607843137254, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501329.71dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-95.508, -3.718, 1.51), 'Pos': Point3(-269.887, -984.059, -1.318), 'Scale': VBase3(1.431, 1.431, 1.431), 'Visual': {'Color': (0.78, 0.77, 0.5058823529411764, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501346.57dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(86.721, 3.656, -1.653), 'Pos': Point3(-23.837, -466.188, -7.102), 'Scale': VBase3(1.546, 1.546, 1.546), 'Visual': {'Color': (0.75, 0.98, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501361.39dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Holiday': '', 'Hpr': VBase3(-103.846, -3.897, 0.955), 'Pos': Point3(-217.634, -540.937, 18.079), 'Scale': VBase3(1.479, 1.479, 1.479), 'VisSize': '', 'Visual': {'Color': (0.800000011920929, 0.8700000047683716, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501378.34dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-96.283, -3.737, 1.459), 'Pos': Point3(-357.62, -161.217, -2.0), 'Scale': VBase3(1.624, 1.624, 1.624), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501380.67dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-96.283, -3.737, 1.459), 'Pos': Point3(-357.62, -161.217, -2.0), 'Scale': VBase3(1.624, 1.624, 1.624), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501506.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-61.432, -3.526, 1.918), 'Pos': Point3(-230.972, -1023.899, -2.592), 'Scale': VBase3(1.479, 1.479, 1.479), 'Visual': {'Color': (0.62, 0.72, 0.7568627450980392, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501515.84dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(88.974, 3.588, -1.795), 'Pos': Point3(-290.512, -1072.11, -8.037), 'Scale': VBase3(1.479, 1.479, 1.479), 'Visual': {'Color': (1.0, 0.9900000095367432, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501551.93dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(28.831, 3.346, 2.215), 'Pos': Point3(-274.776, -943.157, 1.978), 'Scale': VBase3(1.479, 1.479, 1.479), 'Visual': {'Color': (0.87, 0.87, 0.6196078431372549, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501577.87dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(13.203, -3.603, 3.052), 'Pos': Point3(-164.497, -476.962, 8.161), 'Scale': VBase3(1.489, 1.489, 1.489), 'Visual': {'Color': (1.0, 0.9900000095367432, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501603.15dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-59.997, -3.967, -2.561), 'Pos': Point3(-188.222, -504.262, 14.045), 'Scale': VBase3(1.275, 1.275, 1.275), 'Visual': {'Color': (1.0, 0.9900000095367432, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162501641.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-90.357, -94.791, -2.0), 'Scale': VBase3(0.86, 0.86, 0.86), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162501646.46dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-48.359, -71.927, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1162501650.07dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-38.622, 0.0, 0.0), 'Pos': Point3(-46.673, -61.255, -2.0), 'Scale': VBase3(0.93, 0.93, 0.93), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1162501671.89dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-6.162, 0.0, 0.0), 'Pos': Point3(-109.827, -75.473, -1.193), 'Scale': VBase3(0.563, 0.563, 0.563), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162501689.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-33.613, 0.0, 0.0), 'Pos': Point3(-44.023, -93.572, -2.0), 'Scale': VBase3(0.605, 0.605, 0.605), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162501722.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-140.898, 0.105, 1.216), 'Pos': Point3(-40.76, -76.109, -2.0), 'Scale': VBase3(0.822, 0.822, 0.822), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162501750.34dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-32.019, 0.0, 0.0), 'Pos': Point3(-117.391, -205.372, -2.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Color': (0.5, 0.5, 0.5, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162501776.62dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-13.269, 0.0, 0.0), 'Pos': Point3(-72.482, -272.37, -2.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Color': (0.800000011920929, 0.800000011920929, 0.800000011920929, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162501796.43dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-13.269, 0.0, 0.0), 'Pos': Point3(56.456, -177.916, 0.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162501799.67dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-13.269, 0.0, 0.0), 'Pos': Point3(-49.421, -254.503, -2.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162501880.84dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-55.834, 1.221, 0.0), 'Pos': Point3(64.544, -147.513, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162502780.21dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-56.618, 0.0, 0.0), 'Pos': Point3(238.848, -441.555, 0.0), 'Scale': VBase3(0.868, 0.868, 0.868), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162504044.29dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(80.734, -0.123, -2.72), 'Pos': Point3(-119.407, -428.205, 0.956), 'Scale': VBase3(1.729, 1.729, 1.729), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504062.54dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-18.895, 2.702, 0.334), 'Pos': Point3(-141.666, -446.35, 7.427), 'Scale': VBase3(1.488, 1.488, 1.488), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504090.14dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-13.269, 0.0, 0.0), 'Pos': Point3(-67.554, -342.621, -2.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504101.34dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-13.269, 0.0, 0.0), 'Pos': Point3(-71.952, -260.648, -2.0), 'Scale': VBase3(0.745, 0.745, 0.745), 'Visual': {'Color': (0.7900000214576721, 0.6499999761581421, 0.5299999713897705, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504103.39dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-13.269, 0.0, 0.0), 'Pos': Point3(-83.681, -350.664, -2.0), 'Scale': VBase3(0.641, 0.641, 0.641), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504362.84dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-55.834, 1.221, 0.0), 'Pos': Point3(109.058, -288.79, -2.0), 'Scale': VBase3(0.877, 0.877, 0.877), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504374.53dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-134.441, 0.241, 1.197), 'Pos': Point3(-57.046, -228.005, 0.0), 'Scale': VBase3(0.804, 0.804, 0.804), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504384.23dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-142.166, 0.095, 1.217), 'Pos': Point3(227.3, -465.162, 0.0), 'Scale': VBase3(0.804, 0.804, 0.804), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504406.53dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-145.594, 0.251, 5.707), 'Pos': Point3(185.073, -205.108, -2.0), 'Scale': VBase3(2.21, 2.21, 2.21), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504452.48dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(175.153, -3.425, 4.575), 'Pos': Point3(-107.083, -370.161, -3.838), 'Scale': VBase3(2.408, 2.408, 2.408), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504463.24dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(55.708, -2.313, -5.225), 'Pos': Point3(-36.583, -340.483, -2.0), 'Scale': VBase3(2.228, 2.228, 2.228), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504470.51dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(55.708, -2.313, -5.225), 'Pos': Point3(-108.99, -412.732, -0.098), 'Scale': VBase3(2.012, 2.012, 2.012), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504493.21dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-115.124, 3.117, 4.789), 'Pos': Point3(-112.092, -484.478, -9.504), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504510.79dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(375.199, -363.599, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504512.71dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(379.228, -395.531, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504513.99dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(344.415, -416.725, -3.103), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504515.7dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(392.737, -486.368, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504517.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(408.232, -487.761, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504518.45dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-156.061, -0.793, 5.657), 'Pos': Point3(420.874, -500.259, -2.0), 'Scale': VBase3(1.819, 1.819, 1.819), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504520.09dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(457.577, -504.001, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504563.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-174.648, -2.559, 5.108), 'Pos': Point3(380.532, -434.393, -1.918), 'Scale': VBase3(1.819, 1.819, 1.819), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504565.28dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(161.081, -4.434, 3.606), 'Pos': Point3(376.171, -469.964, -2.0), 'Scale': VBase3(2.094, 2.094, 2.094), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504579.32dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(161.081, -4.434, 3.606), 'Pos': Point3(412.314, -435.24, -2.0), 'Scale': VBase3(2.094, 2.094, 2.094), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504581.82dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(161.081, -4.434, 3.606), 'Pos': Point3(470.863, -525.388, -2.0), 'Scale': VBase3(2.094, 2.094, 2.094), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504589.29dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(161.081, -4.434, 3.606), 'Pos': Point3(507.166, -510.536, -2.0), 'Scale': VBase3(2.094, 2.094, 2.094), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504613.95dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(53.269, 0.0, 0.0), 'Pos': Point3(473.617, -539.435, -0.625), 'Scale': VBase3(0.868, 0.868, 0.868), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504615.65dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-55.834, 0.0, 0.0), 'Pos': Point3(470.252, -579.967, -2.0), 'Scale': VBase3(0.868, 0.868, 0.868), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162504622.87dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(460.295, -590.002, 0.0), 'Scale': VBase3(1.417, 1.417, 1.417), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504625.28dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-148.266, -6.577, -3.666), 'Pos': Point3(442.589, -600.058, 0.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.8500000238418579, 0.8199999928474426, 0.7300000190734863, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504626.54dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(464.441, -643.422, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504628.01dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(513.888, -652.936, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504629.42dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(493.592, -653.513, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504630.82dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-111.991, 3.374, 4.612), 'Pos': Point3(545.894, -678.517, -2.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504635.54dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-55.834, 0.0, 0.0), 'Pos': Point3(471.228, -729.263, -2.0), 'Scale': VBase3(0.868, 0.868, 0.868), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162504651.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-55.834, 0.0, 0.0), 'Pos': Point3(-131.543, -219.835, -2.0), 'Scale': VBase3(0.868, 0.868, 0.868), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162504683.95dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-130.455, 16.842, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162504691.23dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-126.7, -27.748, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1162504697.12dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-76.974, 58.572, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162504701.23dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-44.268, 51.753, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1162504709.56dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-45.704, 57.451, -2.0), 'Scale': VBase3(0.546, 0.546, 0.546), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162504732.4dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-156.623, -31.079, -2.0), 'Scale': VBase3(0.546, 0.546, 0.546), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162504754.37dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-76.495, -286.104, -2.0), 'Scale': VBase3(0.546, 0.546, 0.546), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1162504802.04dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-25.52, 27.068, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504808.48dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-141.043, 0.0, 0.0), 'Pos': Point3(-21.642, 11.532, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162504824.68dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-31.21, 4.01, -2.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1162505050.93dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(190.77, -487.635, -1.37), 'Scale': VBase3(1.454, 1.454, 1.454), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505128.43dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(69.079, 0.0, 0.0), 'Pos': Point3(191.501, -487.204, -0.256), 'Scale': VBase3(1.114, 1.114, 1.114), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505210.81dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(43.056, 0.0, 0.0), 'Pos': Point3(191.159, -481.078, -1.405), 'Scale': VBase3(0.935, 0.935, 0.935), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505214.28dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(46.454, 0.0, 0.0), 'Pos': Point3(190.649, -479.107, -0.431), 'Scale': VBase3(0.893, 0.893, 0.893), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505293.49dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-10.798, 0.0, 0.0), 'Pos': Point3(191.62, -486.729, -0.14), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505296.51dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(46.454, 0.0, 0.0), 'Pos': Point3(190.472, -488.612, -0.203), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505308.45dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(46.454, 0.0, 0.0), 'Pos': Point3(185.497, -478.535, -2.29), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505330.64dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(46.454, 0.0, 0.0), 'Pos': Point3(294.657, -542.887, -0.842), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162505333.48dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(46.454, 0.0, 0.0), 'Pos': Point3(300.606, -545.852, -0.915), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162575738.25dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(92.147, 5.514, -7.297), 'Pos': Point3(-203.283, -515.135, 5.177), 'Scale': VBase3(1.794, 1.794, 1.794), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162575755.71dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(148.307, 4.157, -19.181), 'Pos': Point3(-249.184, -557.096, 12.971), 'Scale': VBase3(2.029, 2.029, 2.029), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162575900.62dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-17.49, 0.0, 0.0), 'Pos': Point3(-324.384, -1095.936, -3.407), 'Scale': VBase3(1.811, 1.811, 1.811), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots'}}, '1162576043.68dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, -3.114), 'Pos': Point3(121.584, -137.254, -2.913), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162576078.71dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(145.113, -134.736, 0.0), 'Scale': VBase3(0.525, 0.525, 0.525), 'Visual': {'Model': 'models/vegetation/swamp_tree_b'}}, '1162576335.14dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(315.575, -271.262, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576483.87dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(301.403, -323.476, 0.0), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576530.06dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(482.967, -204.012, 0.0), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576533.54dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(290.001, -326.597, -4.449), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576597.46dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(324.318, -253.808, 54.758), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576602.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(277.52, -268.28, -3.084), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576619.82dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, -3.866, 0.0), 'Pos': Point3(354.38, -394.409, -4.883), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Color': (0.800000011920929, 0.6000000238418579, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576649.89dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, -3.866, 0.0), 'Pos': Point3(349.251, -444.049, 5.853), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Color': (0.75, 0.9300000071525574, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576682.79dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 3.651, 3.614), 'Pos': Point3(386.805, -407.068, -26.618), 'Scale': VBase3(1.869, 1.869, 1.869), 'Visual': {'Color': (0.800000011920929, 0.6000000238418579, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576722.81dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(79.561, 4.221, -2.928), 'Pos': Point3(363.335, -465.418, -1.41), 'Scale': VBase3(1.34, 1.34, 1.34), 'Visual': {'Color': (0.800000011920929, 0.6000000238418579, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162576805.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, -1.758, 0.0), 'Pos': Point3(-86.915, -90.111, -2.123), 'Scale': VBase3(0.797, 0.797, 0.797), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162576816.26dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-108.078, -105.697, -62.869), 'Scale': VBase3(0.936, 0.936, 0.936), 'Visual': {'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162576895.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.06, 0.0), 'Pos': Point3(-41.678, -102.308, -8.363), 'Scale': VBase3(0.736, 0.736, 0.736), 'Visual': {'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162576950.03dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, -1.758, 0.0), 'Pos': Point3(-116.174, -26.237, -3.135), 'Scale': VBase3(0.643, 0.643, 0.643), 'Visual': {'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162576969.61dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-24.171, -1.604, -0.72), 'Pos': Point3(-29.692, 31.725, 0.102), 'Scale': VBase3(0.643, 0.643, 0.643), 'Visual': {'Color': (0.75, 0.9300000071525574, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162576986.5dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-24.171, -1.604, -0.72), 'Pos': Point3(-182.008, 71.806, -63.602), 'Scale': VBase3(0.643, 0.643, 0.643), 'Visual': {'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162576998.25dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-24.171, -1.604, -0.72), 'Pos': Point3(-181.717, 29.795, -70.83), 'Scale': VBase3(0.643, 0.643, 0.643), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162577044.42dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-41.182, -1.323, -1.157), 'Pos': Point3(-82.963, -195.76, 0.0), 'Scale': VBase3(0.732, 0.732, 0.732), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162577094.82dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-39.645, -240.447, -20.215), 'Scale': VBase3(0.956, 0.956, 0.956), 'Visual': {'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162577152.48dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-8.806, -279.214, -36.906), 'Scale': VBase3(0.854, 0.854, 0.854), 'Visual': {'Model': 'models/vegetation/swamp_tree_canopy'}}, '1162577320.84dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(108.215, 5.123, -3.235), 'Pos': Point3(449.692, -619.545, -0.489), 'Scale': VBase3(1.84, 1.84, 1.84), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162577355.15dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(437.004, -609.408, 20.708), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162577566.42dzlu': {'Type': 'Swamp_props_small', 'DisableCollision': False, 'Hpr': VBase3(-158.68, 0.0, 0.0), 'Pos': Point3(379.469, -503.431, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/swamp_boat'}}, '1162577813.76dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(285.231, -543.089, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577835.12dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(283.706, -542.153, -0.659), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577839.92dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(286.137, -546.313, -1.246), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577843.75dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(276.088, -544.595, -0.828), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577867.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(370.702, -485.211, 0.0), 'Scale': VBase3(2.209, 2.209, 2.209), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577870.71dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(367.014, -487.09, -2.071), 'Scale': VBase3(1.998, 1.998, 1.998), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577884.96dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(370.107, -479.469, 0.0), 'Scale': VBase3(2.209, 2.209, 2.209), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577982.15dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(276.339, -548.121, -1.189), 'Scale': VBase3(1.583, 1.583, 1.583), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162577996.29dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-72.138, -11.409, 0.0), 'Pos': Point3(280.375, -555.086, -1.704), 'Scale': VBase3(1.583, 1.583, 1.583), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578006.14dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(276.393, -550.524, 0.0), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578016.5dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(292.14, -570.623, -1.631), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578019.04dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(294.999, -577.17, -0.541), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578024.62dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(320.253, -629.48, 0.0), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578025.75dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(323.649, -628.406, -1.866), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578026.78dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-30.189, 0.0, 0.0), 'Pos': Point3(321.532, -628.769, -1.643), 'Scale': VBase3(2.112, 2.112, 2.112), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578038.0dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-38.112, 0.0, -13.852), 'Pos': Point3(316.948, -625.273, -1.35), 'Scale': VBase3(1.198, 1.198, 1.198), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578047.75dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-125.812, 0.0, 0.0), 'Pos': Point3(311.178, -627.427, -1.526), 'Scale': VBase3(1.198, 1.198, 1.198), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578056.12dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-38.112, 0.0, 0.0), 'Pos': Point3(309.187, -573.984, -1.051), 'Scale': VBase3(1.198, 1.198, 1.198), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578057.4dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-38.112, 0.0, 0.0), 'Pos': Point3(309.738, -573.679, -0.606), 'Scale': VBase3(1.198, 1.198, 1.198), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578070.86dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-38.112, 0.0, 0.0), 'Pos': Point3(283.348, -383.938, -1.192), 'Scale': VBase3(1.198, 1.198, 1.198), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578075.4dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-38.112, 0.0, 0.0), 'Pos': Point3(282.696, -382.364, -0.641), 'Scale': VBase3(1.198, 1.198, 1.198), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578081.51dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(332.729, -462.495, -1.052), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578094.39dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-40.563, 0.0, 0.0), 'Pos': Point3(334.295, -461.528, -0.914), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578096.17dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-106.705, 0.0, 0.0), 'Pos': Point3(333.465, -465.382, -0.852), 'Scale': VBase3(1.399, 1.399, 1.399), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578108.39dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-61.921, 0.0, 0.0), 'Pos': Point3(340.54, -464.982, -1.988), 'Scale': VBase3(1.931, 1.931, 1.506), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578113.9dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-124.097, 0.0, 0.0), 'Pos': Point3(331.864, -453.649, -1.143), 'Scale': VBase3(1.199, 1.199, 1.166), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578121.26dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-124.097, 0.0, 0.0), 'Pos': Point3(284.828, -383.294, 0.0), 'Scale': VBase3(1.152, 1.152, 1.152), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578126.61dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-74.895, 0.0, 0.0), 'Pos': Point3(289.473, -386.795, -1.012), 'Scale': VBase3(1.152, 1.152, 1.152), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162578259.32dzlu': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(164.725, 1.618, -0.376), 'Pos': Point3(437.692, -501.002, -4.014), 'Scale': VBase3(3.887, 3.887, 3.887), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/props/rock_group_4_sphere'}}, '1162578426.64dzlu': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(128.086, 0.0, 0.0), 'Pos': Point3(478.996, -632.527, -0.866), 'Scale': VBase3(1.523, 1.523, 1.523), 'Visual': {'Color': (0.45, 0.54, 0.82, 1.0), 'Model': 'models/props/zz_dont_use_rocks_Dk_group_2F'}}, '1162578793.03dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-78.746, 3.272, 3.365), 'Pos': Point3(510.015, -662.867, -2.009), 'Scale': VBase3(2.049, 2.049, 2.049), 'Visual': {'Color': (0.7900000214576721, 0.6499999761581421, 0.5299999713897705, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162578861.75dzlu': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(-11.629, -3.641, -0.749), 'Pos': Point3(525.404, -675.711, -0.473), 'Scale': VBase3(2.523, 2.523, 2.523), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/props/rock_group_2_sphere'}}, '1162578920.61dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(479.384, -666.297, 21.059), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162578961.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(541.198, -708.802, 27.942), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162578998.36dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-28.111, 4.951, 2.127), 'Pos': Point3(583.253, -677.403, 15.897), 'Scale': VBase3(1.911, 1.911, 1.911), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579001.46dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-112.519, 9.832, 4.673), 'Pos': Point3(546.451, -711.086, -5.558), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579041.9dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-32.947, 5.173, -2.425), 'Pos': Point3(587.067, -740.43, 17.701), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579056.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-32.947, 5.173, -2.425), 'Pos': Point3(645.594, -605.485, 0.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579058.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-32.947, 5.173, -2.425), 'Pos': Point3(611.287, -573.076, -1.942), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579060.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-28.111, 4.951, -2.852), 'Pos': Point3(636.011, -642.186, 0.0), 'Scale': VBase3(2.128, 2.128, 2.128), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579199.21dzlu': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(47.744, -6.893, -24.723), 'Pos': Point3(580.916, -732.395, 8.128), 'Scale': VBase3(4.334, 4.334, 4.334), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/props/rock_group_1_sphere'}}, '1162579331.75dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-73.655, 5.504, 1.529), 'Pos': Point3(632.005, -818.121, 0.0), 'Scale': VBase3(2.296, 2.296, 2.296), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579341.32dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-73.655, 5.504, 1.529), 'Pos': Point3(610.397, -807.52, 3.503), 'Scale': VBase3(2.296, 2.296, 2.296), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579346.82dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-74.018, 3.433, -9.889), 'Pos': Point3(611.612, -780.956, 6.711), 'Scale': VBase3(2.296, 2.296, 2.296), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579382.68dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-73.655, 5.504, 1.529), 'Pos': Point3(587.418, -775.26, 0.386), 'Scale': VBase3(2.758, 2.758, 2.758), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579401.92dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-33.558, -9.216, -2.447), 'Pos': Point3(578.094, -713.307, 12.02), 'Scale': VBase3(3.5, 3.5, 3.5), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1162579450.07dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-32.512, 4.664, 0.0), 'Pos': Point3(593.209, -787.988, 3.967), 'Scale': VBase3(2.178, 2.178, 2.178), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162579477.28dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(29.511, -3.952, 7.392), 'Pos': Point3(541.052, -765.265, 23.137), 'Scale': VBase3(2.178, 2.178, 2.178), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162579495.23dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(29.511, -3.952, 7.392), 'Pos': Point3(586.636, -636.216, 0.0), 'Scale': VBase3(2.178, 2.178, 2.178), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162579496.87dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-31.653, -8.376, 0.125), 'Pos': Point3(532.338, -673.668, 24.436), 'Scale': VBase3(2.178, 2.178, 2.178), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162579552.36dzlu': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(-51.838, 0.0, 0.0), 'Pos': Point3(564.672, -764.757, 0.0), 'Scale': VBase3(4.098, 4.098, 4.098), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/props/rock_1_sphere'}}, '1162579651.42dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-32.512, -5.078, 0.0), 'Pos': Point3(497.166, -662.155, -17.54), 'Scale': VBase3(2.178, 2.178, 2.178), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1162579990.07dzlu': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(66.911, -2.792, 6.518), 'Pos': Point3(207.844, -185.499, -2.0), 'Scale': VBase3(0.659, 0.659, 0.659), 'Visual': {'Color': (0.25999999046325684, 0.3499999940395355, 0.38999998569488525, 1.0), 'Model': 'models/props/rock_2_sphere'}}, '1162580050.34dzlu': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(66.911, -2.792, 6.518), 'Pos': Point3(243.967, -201.603, -3.383), 'Scale': VBase3(3.035, 3.035, 3.035), 'Visual': {'Color': (0.25999999046325684, 0.3499999940395355, 0.38999998569488525, 1.0), 'Model': 'models/props/rock_2_sphere'}}, '1162580134.26dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-160.943, 112.688, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.44999998807907104, 0.5400000214576721, 0.8199999928474426, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162580160.11dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-44.49, 0.0, 0.0), 'Pos': Point3(-156.604, 163.007, 0.0), 'Scale': VBase3(0.8, 0.8, 0.8), 'Visual': {'Color': (0.44999998807907104, 0.5400000214576721, 0.8199999928474426, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162580232.92dzlu': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(24.147, 0.0, 0.0), 'Pos': Point3(-18.696, -38.561, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.47999998927116394, 0.5699999928474426, 0.5600000023841858, 1.0), 'Model': 'models/vegetation/swamp_tree_thin'}}, '1162580882.43dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-141.382, 0.095, 1.217), 'Pos': Point3(356.264, -488.07, 0.0), 'Scale': VBase3(0.804, 0.804, 0.804), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162580923.68dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-164.53, -0.392, 1.157), 'Pos': Point3(78.234, -365.675, 0.0), 'Scale': VBase3(0.804, 0.804, 0.804), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/swamp_tree_a'}}, '1162581117.26dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(398.317, -600.067, -2.702), 'Scale': VBase3(1.469, 1.469, 1.469), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581120.68dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(405.001, -605.904, -2.763), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581126.39dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-34.585, 0.0, 0.0), 'Pos': Point3(404.004, -604.363, -0.572), 'Scale': VBase3(0.795, 0.795, 0.795), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581133.0dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(395.308, -597.602, -1.009), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581141.04dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(384.9, -610.758, -1.807), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581144.36dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(389.232, -621.779, -1.571), 'Scale': VBase3(1.668, 1.668, 1.668), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581145.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(387.319, -620.824, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581162.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(395.799, -619.491, -2.062), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581164.37dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(366.265, -648.756, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581164.98dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(371.651, -649.648, -2.216), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581166.56dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(407.408, -608.957, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581167.39dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(403.408, -607.635, -0.981), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581168.25dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(412.959, -610.534, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581168.79dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(418.696, -611.483, -1.508), 'Scale': VBase3(0.86, 0.86, 0.86), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581169.65dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(406.897, -618.523, -1.178), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581170.36dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(409.577, -609.645, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581171.11dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(411.358, -611.579, -1.948), 'Scale': VBase3(1.149, 1.149, 0.93), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581171.96dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(409.626, -611.292, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581173.79dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(407.546, -610.948, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581176.57dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(424.085, -612.375, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581177.9dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(413.632, -616.473, -3.38), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581181.67dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(375.524, -597.658, -1.887), 'Scale': VBase3(0.906, 0.906, 0.906), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581182.32dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(380.798, -605.211, -1.342), 'Scale': VBase3(1.66, 1.66, 1.66), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581183.29dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(390.45, -599.788, -0.824), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581183.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(390.136, -604.776, -1.205), 'Scale': VBase3(1.085, 1.085, 1.085), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581184.18dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(396.887, -598.459, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581185.78dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(346.427, -619.499, -2.216), 'Scale': VBase3(2.001, 2.001, 2.001), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581187.11dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(290.641, -614.373, -1.295), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581188.48dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, -20.885), 'Pos': Point3(292.543, -612.486, -1.215), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581188.82dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(291.46, -614.799, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581189.76dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, -12.712, 0.0), 'Pos': Point3(295.874, -614.075, -1.646), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581190.51dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 28.677), 'Pos': Point3(293.445, -615.906, -0.884), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581192.04dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(292.871, -599.964, -1.685), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581194.96dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(435.95, -631.628, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581195.62dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(446.847, -628.558, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581196.4dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(414.889, -679.682, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581198.9dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-36.591, -4.63, 0.0), 'Pos': Point3(369.75, -647.131, -1.782), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581199.73dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-98.678, 0.0, 0.0), 'Pos': Point3(366.458, -646.173, -1.448), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581201.07dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 20.788, 0.0), 'Pos': Point3(364.402, -649.497, -1.48), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581201.68dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-75.303, 0.0, 0.0), 'Pos': Point3(366.828, -649.107, -1.439), 'Scale': VBase3(0.781, 0.781, 0.781), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581202.34dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-53.777, 0.0, 0.0), 'Pos': Point3(364.625, -649.767, 0.0), 'Scale': VBase3(1.149, 1.149, 1.149), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581230.31dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-30.189, 0.0, 0.0), 'Pos': Point3(366.756, -488.935, 0.0), 'Scale': VBase3(1.273, 1.273, 1.273), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581230.92dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-30.189, 0.0, 0.0), 'Pos': Point3(368.096, -489.157, 0.0), 'Scale': VBase3(1.273, 1.273, 1.273), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162581234.92dzlu': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-30.189, 0.0, 0.0), 'Pos': Point3(375.018, -513.072, -1.199), 'Scale': VBase3(1.273, 1.273, 1.273), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1162600301.39sdnaik': {'Type': 'Port Collision Sphere', 'Name': '', 'Hpr': VBase3(-21.848, 0.0, 0.0), 'Pos': Point3(174.854, -853.185, -2.0), 'Scale': VBase3(1079.46, 1079.46, 1079.46), 'Visual': {'Color': (0.5, 0.5, 1.0, 0.2), 'Model': 'models/misc/smiley'}}, '1163119773.31sdnaik': {'Type': 'Locator Node', 'Name': 'portal_exterior_1', 'Hpr': VBase3(-180.0, 0.0, 0.0), 'Pos': Point3(474.323, -559.42, -0.943), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1163119776.08sdnaik': {'Type': 'Locator Node', 'Name': 'portal_exterior_2', 'Hpr': VBase3(-122.603, 0.0, 0.0), 'Pos': Point3(107.301, -127.258, 0.205), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1163130907.42sdnaik': {'Type': 'Locator Node', 'Name': 'portal_exterior_1', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(471.383, -559.794, -2.597), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1163130908.98sdnaik': {'Type': 'Locator Node', 'Name': 'portal_exterior_2', 'Hpr': VBase3(-101.237, 0.0, 0.0), 'Pos': Point3(103.631, -123.494, -2.529), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1163462918.28sdnaik': {'Type': 'Player Spawn Node', 'Hpr': Point3(0.0, 0.0, 0.0), 'Index': -1, 'Pos': Point3(194.884, -615.123, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'All', 'Visual': {'Model': 'models/misc/smiley'}}, '1171314304.0dxschafe': {'Type': 'Building Exterior', 'File': 'Cuba_jail_interior', 'ExtUid': '1171314304.0dxschafe0', 'Holiday': '', 'Hpr': VBase3(58.558, 0.0, 1.06), 'Objects': {'1201041678.38dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(-180.0, 0.0, 0.0), 'Pos': Point3(12.899, -22.494, 0.283), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(-333.987, -619.709, 27.958), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Name': '', 'Color': (0.7, 0.7, 0.7, 1.0), 'Door': 'models/buildings/shanty_guildhall_door', 'Interior': 'models/buildings/navy_jail_interior', 'Model': 'models/buildings/jail_exterior', 'SignImage': 'models/buildings/sign1_eng_a_icon_doctor'}}, '1171315072.0dxschafe': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-6.279, -0.862, 7.781), 'Pos': Point3(-199.537, -773.193, 2.416), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-76.672, 5.284, 1.846), 'Pos': Point3(-285.512, -606.503, 25.88), 'Scale': VBase3(0.829, 0.829, 0.829), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe0': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(-35.024, 12.51, 17.522), 'Pos': Point3(-202.949, -789.058, 0.554), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe1': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-17.26, 5.387, 7.542), 'Pos': Point3(-193.68, -788.419, 1.426), 'Scale': VBase3(0.744, 0.744, 0.744), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (1.0, 0.93, 0.8509803921568627, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe2': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(-20.254, -3.793, 13.121), 'Pos': Point3(-192.776, -633.153, 11.116), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe3': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-36.173, -4.639, 19.768), 'Pos': Point3(-347.684, -752.909, 24.386), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (0.55, 0.67, 0.6901960784313725, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe4': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(74.217, 13.753, 4.957), 'Pos': Point3(-379.833, -728.54, 26.258), 'Scale': VBase3(1.176, 1.176, 1.176), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (0.71, 0.67, 0.5686274509803921, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe5': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(76.729, 7.622, 1.792), 'Pos': Point3(-339.218, -732.857, 23.816), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (0.93, 0.87, 0.7764705882352941, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe6': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-1.294, 5.793, 12.616), 'Pos': Point3(-334.943, -742.422, 22.706), 'Scale': VBase3(0.856, 0.856, 0.856), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe7': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(0.0, 0.0, 7.829), 'Pos': Point3(-293.975, -605.243, 26.434), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (1.0, 1.0, 0.8509803921568627, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe8': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(8.838, -2.369, 4.157), 'Pos': Point3(-372.098, -650.87, 27.918), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe9': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-49.999, 9.933, 5.223), 'Pos': Point3(-374.047, -662.824, 27.26), 'Scale': VBase3(0.72, 0.72, 0.72), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (0.75, 0.72, 0.6352941176470588, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe:': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(-101.309, -4.414, -1.533), 'Pos': Point3(-206.707, -559.092, 18.329), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe;': {'Type': 'Tree - Animated', 'DisableCollision': True, 'Hpr': VBase3(0.0, 0.0, 13.303), 'Pos': Point3(-204.403, -564.043, 17.606), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (1.0, 1.0, 0.8509803921568627, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe<': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(-48.156, -6.558, 4.285), 'Pos': Point3(-157.612, -591.007, 3.037), 'Scale': VBase3(0.74, 0.74, 0.74), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315200.0dxschafe=': {'Type': 'Tree - Animated', 'DisableCollision': False, 'Hpr': VBase3(8.576, 0.0, 20.786), 'Pos': Point3(-159.203, -583.839, 3.061), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': {'Top Model': {'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}}, 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Color': (1.0, 1.0, 0.8509803921568627, 1.0), 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1171315712.0dxschafe': {'Type': 'Well', 'DisableCollision': False, 'Hpr': VBase3(48.58, 0.0, 0.0), 'Pos': Point3(-282.536, -681.893, 24.96), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/wellA'}}, '1171315840.0dxschafe': {'Type': 'Trellis', 'DisableCollision': True, 'Hpr': VBase3(-13.255, -8.917, 0.0), 'Pos': Point3(-340.755, -651.328, 24.456), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/trellis_d'}}, '1171315968.0dxschafe': {'Type': 'Swamp_props_small', 'DisableCollision': False, 'Hpr': VBase3(44.133, -0.124, 0.95), 'Pos': Point3(-299.978, -615.327, 26.982), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/swamp_bench'}}, '1171315968.0dxschafe1': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-284.632, -885.184, -15.189), 'Scale': VBase3(2.831, 2.831, 2.831), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1171316096.0dxschafe': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, 3.63), 'Pos': Point3(-264.811, -579.308, -4.364), 'Scale': VBase3(2.831, 2.831, 2.831), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1171316096.0dxschafe0': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, -2.013), 'Pos': Point3(-175.505, -498.597, -37.061), 'Scale': VBase3(3.643, 3.643, 3.643), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1171316096.0dxschafe1': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, -2.013), 'Pos': Point3(-82.649, -424.379, -34.183), 'Scale': VBase3(3.643, 3.643, 3.643), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1171316224.0dxschafe': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, -2.013), 'Pos': Point3(-242.122, -980.327, -54.296), 'Scale': VBase3(3.643, 3.643, 3.643), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1171316224.0dxschafe0': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, -2.013), 'Pos': Point3(-311.461, -827.956, -42.249), 'Scale': VBase3(3.643, 3.643, 3.643), 'Visual': {'Model': 'models/vegetation/swamp_tree_roots_canopy'}}, '1171316224.0dxschafe1': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(-33.626, 0.0, 0.0), 'Objects': {}, 'Pos': Point3(-201.285, -785.155, 1.43), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Model': 'models/props/rock_group_1_floor'}}, '1171316224.0dxschafe2': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(-33.626, 0.0, 0.0), 'Objects': {'1184718841.62kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-341.25, -726.337, 26.104), 'Hpr': VBase3(165.261, 0.0, 0.0), 'Pos': Point3(-5.829, 5.141, 1.051), 'Scale': VBase3(0.725, 0.616, 0.689), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}}, 'Pos': Point3(-337.368, -740.866, 24.07), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/rock_group_1_floor'}}, '1171316224.0dxschafe3': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(-25.05, 0.0, 0.0), 'Pos': Point3(-158.907, -596.686, 2.573), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Model': 'models/props/rock_group_1_floor'}}, '1171316224.0dxschafe4': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(154.877, 2.608, -3.7), 'Pos': Point3(-284.701, -836.427, 10.167), 'Scale': VBase3(1.222, 1.222, 1.222), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/rock_group_1_sphere'}}, '1171316224.0dxschafe5': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(94.132, -0.065, -0.006), 'Pos': Point3(-265.121, -576.052, 25.379), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/rock_group_1_floor'}}, '1171316224.0dxschafe6': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(-44.627, 0.0, 0.0), 'Pos': Point3(-293.592, -601.992, 25.908), 'Scale': VBase3(1.165, 1.165, 1.165), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/rock_group_1_sphere'}}, '1171316352.0dxschafe': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(104.908, 0.301, -3.731), 'Pos': Point3(-374.373, -657.124, 27.514), 'Scale': VBase3(1.124, 1.124, 1.124), 'Visual': {'Color': (0.5, 0.5, 0.5, 1.0), 'Model': 'models/props/rock_group_2_sphere'}}, '1171316480.0dxschafe0': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(104.908, 0.301, -3.731), 'Pos': Point3(-349.236, -752.373, 25.045), 'Scale': VBase3(1.53, 1.53, 1.53), 'Visual': {'Color': (0.5, 0.5, 0.5, 1.0), 'Model': 'models/props/rock_group_2_sphere'}}, '1171316480.0dxschafe1': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(40.562, 5.236, 8.064), 'Pos': Point3(-194.106, -627.554, 13.373), 'Scale': VBase3(2.034, 2.034, 2.034), 'Visual': {'Model': 'models/props/rock_group_2_sphere'}}, '1171316480.0dxschafe2': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(-141.706, -6.318, -7.136), 'Pos': Point3(-177.118, -636.279, 11.289), 'Scale': VBase3(1.572, 1.572, 1.572), 'Visual': {'Model': 'models/props/rock_group_5_floor'}}, '1171316864.0dxschafe': {'Type': 'Building Exterior', 'File': 'cuba_building_int_tailor', 'ExtUid': '1171316864.0dxschafe0', 'Hpr': VBase3(88.811, 0.0, 0.0), 'Objects': {'1201041677.5dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(-180.0, 0.0, 0.0), 'Pos': Point3(0.162, -4.354, 0.599), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(-368.014, -694.339, 28.233), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Name': '', 'Color': (0.85, 0.83, 0.7411764705882353, 1.0), 'Door': 'models/buildings/shanty_guildhall_door', 'Interior': 'models/buildings/interior_shanty_guildhall', 'Model': 'models/buildings/shanty_npc_house_combo_G', 'SignFrame': 'models/buildings/sign1_shanty_a_frame', 'SignImage': 'models/buildings/sign1_eng_a_icon_tailor'}}, '1171316864.0dxschafe1': {'Type': 'Building Exterior', 'File': 'cuba_building_int_tattoo', 'ExtUid': '1171316864.0dxschafe2', 'Hpr': VBase3(67.089, 0.0, 4.171), 'Objects': {'1201041678.91dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(-180.0, 0.0, 0.0), 'Pos': Point3(0.313, -4.248, 1.444), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(-165.409, -499.223, 9.61), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Name': '', 'Color': (0.86, 0.86, 0.8588235294117647, 1.0), 'Door': 'models/buildings/shanty_guildhall_door', 'Interior': 'models/buildings/interior_shanty_guildhall', 'Model': 'models/buildings/shanty_npc_house_combo_J', 'SignFrame': 'models/buildings/sign1_shanty_a_frame', 'SignImage': 'models/buildings/sign1_eng_a_icon_tattoo'}}, '1171317248.0dxschafe': {'Type': 'Building Exterior', 'File': '', 'ExtUid': '1171317248.0dxschafe0', 'Holiday': '', 'Hpr': VBase3(110.324, 0.0, 0.0), 'Objects': {}, 'Pos': Point3(-289.272, -827.364, 11.794), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Name': '', 'Color': (0.7, 0.7, 0.7, 1.0), 'Door': 'models/buildings/shanty_guildhall_door', 'Interior': 'models/buildings/interior_shanty_guildhall', 'Model': 'models/buildings/shanty_npc_house_combo_D', 'SignFrame': '', 'SignImage': 'models/buildings/sign1_eng_a_icon_doctor'}}, '1171317760.0dxschafe': {'Type': 'Wall', 'DisableCollision': False, 'Hpr': VBase3(76.725, 0.0, 0.417), 'Pos': Point3(-364.738, -682.879, 27.909), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/pir_m_prp_fnc_wood60'}}, '1171317760.0dxschafe0': {'Type': 'Wall', 'DisableCollision': False, 'Hpr': VBase3(100.931, -0.147, -2.003), 'Pos': Point3(-354.916, -759.608, 25.737), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.699999988079071, 0.699999988079071, 0.699999988079071, 1.0), 'Model': 'models/props/pir_m_prp_fnc_wood60'}}, '1171318016.0dxschafe': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(174.015, -1.384, -1.516), 'Pos': Point3(-315.867, -807.895, 18.608), 'Scale': VBase3(1.324, 1.324, 1.324), 'Visual': {'Color': (0.7019607843137254, 0.84, 0.6509803921568628, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1171318016.0dxschafe0': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(42.53, 2.053, 12.816), 'Pos': Point3(-332.123, -785.348, 18.625), 'Scale': VBase3(1.324, 1.324, 1.324), 'Visual': {'Color': (0.96, 0.96, 0.9372549019607843, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1171318016.0dxschafe1': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(174.015, -1.384, -12.349), 'Pos': Point3(-372.147, -615.81, 20.95), 'Scale': VBase3(1.739, 1.739, 1.739), 'Visual': {'Color': (0.699999988079071, 0.7300000190734863, 0.5799999833106995, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1171318016.0dxschafe2': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(-104.832, 6.689, -11.126), 'Pos': Point3(-342.548, -770.489, 23.537), 'Scale': VBase3(1.324, 1.324, 1.324), 'Visual': {'Color': (0.699999988079071, 0.7300000190734863, 0.5799999833106995, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1171318144.0dxschafe': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(174.015, -1.384, -1.516), 'Pos': Point3(-242.418, -547.412, 21.945), 'Scale': VBase3(1.324, 1.324, 1.324), 'Visual': {'Color': (0.699999988079071, 0.7300000190734863, 0.5799999833106995, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1171318144.0dxschafe0': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(-102.342, -1.661, 1.207), 'Pos': Point3(-308.624, -582.81, 23.457), 'Scale': VBase3(1.324, 1.324, 1.324), 'Visual': {'Color': (0.7, 0.73, 0.58, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1171319168.0dxschafe': {'Type': 'Wall', 'DisableCollision': False, 'Hpr': VBase3(73.631, 0.036, 359.332), 'Pos': Point3(-333.435, -684.617, 27.253), 'Scale': VBase3(1.0, 1.0, 1.146), 'VisSize': '', 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/pir_m_prp_fnc_wood60'}}, '1171319168.0dxschafe0': {'Type': 'Wall', 'DisableCollision': False, 'Hpr': VBase3(1.345, 0.862, 0.28), 'Pos': Point3(-393.734, -685.211, 27.965), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/props/pir_m_prp_fnc_wood60'}}, '1171319424.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(134.89, -3.563, -3.569), 'Pos': Point3(-371.999, -713.504, 27.482), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_a'}}, '1171319424.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(154.824, -4.565, -2.142), 'Pos': Point3(-370.918, -635.954, 28.577), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_a'}}, '1171319424.0dxschafe1': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-142.021, -3.978, 3.1), 'Pos': Point3(-374.971, -674.349, 28.074), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_a'}}, '1171319424.0dxschafe2': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-142.021, -3.978, 3.1), 'Pos': Point3(-364.271, -744.154, 26.403), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_a'}}, '1171319552.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(89.587, 0.0, 0.0), 'Pos': Point3(-345.824, -763.628, 24.667), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319680.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(70.418, 0.0, -5.372), 'Pos': Point3(-375.646, -731.158, 26.489), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319680.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-82.382, 2.461, 4.776), 'Pos': Point3(-379.378, -723.104, 27.348), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319680.0dxschafe2': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-133.989, -5.375, 0.099), 'Pos': Point3(-341.151, -750.03, 25.761), 'Scale': VBase3(1.251, 1.251, 1.251), 'Visual': {'Color': (0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0), 'Model': 'models/vegetation/bush_b'}}, '1171319808.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-155.254, -1.124, 5.253), 'Pos': Point3(-303.177, -809.415, 15.781), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319808.0dxschafe2': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(175.717, -1.124, 5.253), 'Pos': Point3(592.907, -798.972, 0.159), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319808.0dxschafe4': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(36.364, -1.124, 5.253), 'Pos': Point3(592.284, -797.455, -1.197), 'Scale': VBase3(1.935, 1.935, 1.935), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319808.0dxschafe5': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-280.878, -837.764, 10.574), 'Hpr': VBase3(30.143, 0.0, 0.0), 'Pos': Point3(-280.878, -837.764, 10.574), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319808.0dxschafe6': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(10.396, 0.0, 0.0), 'Pos': Point3(-264.55, -577.318, 24.378), 'Scale': VBase3(1.595, 1.595, 1.595), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319936.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(10.396, 0.0, 4.167), 'Pos': Point3(-188.435, -515.677, 13.628), 'Scale': VBase3(1.595, 1.595, 1.595), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319936.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(10.396, 0.0, 4.167), 'Pos': Point3(-290.971, -585.907, 26.919), 'Scale': VBase3(1.775, 1.775, 1.775), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319936.0dxschafe1': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(10.396, 0.0, 4.167), 'Pos': Point3(-290.971, -864.503, 8.611), 'Scale': VBase3(1.775, 1.775, 1.775), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319936.0dxschafe2': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(103.439, 4.161, -0.221), 'Pos': Point3(-203.235, -560.818, 17.232), 'Scale': VBase3(1.775, 1.775, 1.775), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319936.0dxschafe3': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(24.204, 0.996, 4.046), 'Pos': Point3(-205.917, -569.068, 17.84), 'Scale': VBase3(1.775, 1.775, 1.775), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171319936.0dxschafe4': {'Type': 'Bush', 'DisableCollision': False, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(100.939, 4.126, 0.582), 'Pos': Point3(-188.231, -638.274, 14.392), 'Scale': VBase3(1.775, 1.775, 1.775), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171320064.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(24.5, 1.023, 5.25), 'Pos': Point3(-160.085, -485.298, 9.374), 'Scale': VBase3(1.391, 1.391, 1.391), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171320064.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'GridPos': Point3(-277.701, -841.101, 10.574), 'Hpr': VBase3(-153.042, -1.248, -5.202), 'Pos': Point3(-156.365, -467.801, 9.347), 'Scale': VBase3(1.391, 1.391, 1.391), 'Visual': {'Model': 'models/vegetation/bush_b'}}, '1171320832.0dxschafe': {'Type': 'Bush', 'DisableCollision': False, 'Hpr': VBase3(22.759, 10.417, -1.703), 'Pos': Point3(-206.729, -777.82, 5.521), 'Scale': VBase3(0.739, 0.739, 0.739), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320832.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-1.712, 10.196, 2.741), 'Pos': Point3(-294.622, -833.425, 13.44), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320832.0dxschafe1': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(132.892, 4.002, -1.679), 'Pos': Point3(606.193, -837.635, -3.384), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320832.0dxschafe2': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-116.594, 10.417, -1.703), 'Pos': Point3(620.037, -845.385, -0.281), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320832.0dxschafe3': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-157.241, -5.59, -6.894), 'Pos': Point3(-300.613, -827.068, 15.281), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320832.0dxschafe4': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-120.691, -8.586, -2.225), 'Pos': Point3(-319.293, -796.378, 20.273), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320960.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'Holiday': '', 'Hpr': VBase3(-13.349, 0.429, 8.857), 'Pos': Point3(-206.803, -526.927, 17.119), 'Scale': VBase3(1.16, 1.16, 1.16), 'VisSize': '', 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171320960.0dxschafe0': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(170.705, -1.059, -8.804), 'Pos': Point3(-151.201, -460.804, 9.186), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171321088.0dxschafe': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-165.437, -4.549, -7.62), 'Pos': Point3(-342.28, -739.438, 26.037), 'Scale': VBase3(1.16, 1.16, 1.16), 'Visual': {'Model': 'models/vegetation/bush_d'}}, '1171321088.0dxschafe0': {'Type': 'Animal', 'Hpr': VBase3(-169.923, 0.0, 0.0), 'Patrol Radius': '5.1084', 'Pos': Point3(-342.453, -681.228, 28.032), 'PoseAnim': '', 'PoseFrame': '', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'Species': 'Pig', 'Start State': 'Idle', 'StartFrame': '0', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1171321216.0dxschafe': {'Type': 'Animal', 'Hpr': VBase3(-101.132, 0.0, 0.0), 'Patrol Radius': '5.2410', 'Pos': Point3(-336.727, -661.427, 28.026), 'PoseAnim': '', 'PoseFrame': '', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'Species': 'Pig', 'Start State': 'Walk', 'StartFrame': '0', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1171321216.0dxschafe0': {'Type': 'Animal', 'Hpr': VBase3(-101.132, 0.0, 0.0), 'Patrol Radius': '12.0000', 'Pos': Point3(-281.902, -692.238, 24.702), 'PoseAnim': '', 'PoseFrame': '', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'Species': 'Rooster', 'Start State': 'Walk', 'StartFrame': '0', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1171321216.0dxschafe1': {'Type': 'Animal', 'Hpr': VBase3(-101.132, 0.0, 0.0), 'Patrol Radius': '12.0000', 'Pos': Point3(-266.781, -682.498, 23.137), 'PoseAnim': '', 'PoseFrame': '', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'Species': 'Chicken', 'Start State': 'Walk', 'StartFrame': '0', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1171321216.0dxschafe2': {'Type': 'Animal', 'Hpr': VBase3(-101.132, 0.0, 0.0), 'Patrol Radius': 12, 'Pos': Point3(-261.136, -659.03, 23.744), 'PoseAnim': '', 'PoseFrame': '', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'Species': 'Rooster', 'Start State': 'Walk', 'StartFrame': '0', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1172863796.36kmuller': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(66.911, -2.792, 6.518), 'Pos': Point3(326.362, 26.621, -2.0), 'Scale': VBase3(6.057, 6.057, 6.057), 'Visual': {'Color': (0.25999999046325684, 0.3499999940395355, 0.38999998569488525, 1.0), 'Model': 'models/props/rock_2_sphere'}}, '1172863850.45kmuller': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(3.368, -0.137, 4.704), 'Pos': Point3(212.361, -229.269, -0.091), 'Scale': VBase3(5.606, 5.606, 5.606), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/props/rock_4_sphere'}}, '1176186151.42mike': {'Type': 'Townsperson', 'Category': 'Gypsy', 'AnimSet': 'bar_talk03', 'AuraFX': 'None', 'Boss': False, 'CustomModel': 'None', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': '', 'HelpID': 'NONE', 'Holiday': '', 'Hpr': VBase3(194.702, 0.0, 0.0), 'Instanced World': 'None', 'Level': '37', 'Notice Animation 1': '', 'Notice Animation 2': '', 'Patrol Radius': '8.0904', 'Pos': Point3(-329.386, -675.124, 27.384), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Requires Quest Interest': False, 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'ShopID': 'PORT_ROYAL_DEFAULTS', 'Start State': 'Idle', 'StartFrame': '0', 'Team': 'Villager', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'VisSize': '', 'Zombie': False, 'rolOffset': VBase3(0.0, 0.0, 0.0), 'spawnTimeAlt': '', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1176258388.82kmuller': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(41.325, -124.235, -4.357), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_a'}}, '1176258538.6kmuller': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-27.599, -86.053, -4.727), 'Scale': VBase3(4.077, 4.077, 4.077), 'Visual': {'Color': (0.41999998688697815, 0.5799999833106995, 0.7200000286102295, 1.0), 'Model': 'models/props/rock_2_sphere'}}, '1176258603.27kmuller': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-49.053, -100.206, -2.976), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1176258613.43kmuller': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-57.458, -105.108, -6.347), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1176258631.8kmuller': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-67.927, -105.152, -1.229), 'Scale': VBase3(3.271, 3.271, 3.271), 'Visual': {'Color': (0.49000000953674316, 0.6100000143051147, 0.9200000166893005, 1.0), 'Model': 'models/props/rock_3_sphere'}}, '1176258756.88kmuller': {'Type': 'Swamp_props', 'DisableCollision': True, 'Hpr': VBase3(5.171, 41.577, -84.933), 'Pos': Point3(-57.645, -109.688, -1.483), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_tree_thin'}}, '1176258807.22kmuller': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-122.855, -123.625, -1.68), 'Scale': VBase3(2.1, 2.1, 2.1), 'Visual': {'Model': 'models/props/rock_2_sphere'}}, '1176258867.93kmuller': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-40.483, -109.599, -2.4), 'Scale': VBase3(0.648, 0.648, 0.648), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1176258898.99kmuller': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(0.702, -87.743, -1.109), 'Scale': VBase3(1.0, 1.0, 1.383), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1176258906.33kmuller': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(3.118, -96.117, -1.037), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1176258927.07kmuller': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(17.995, -107.384, -0.878), 'Scale': VBase3(3.296, 3.296, 2.501), 'Visual': {'Model': 'models/vegetation/swamp_bush_a'}}, '1176258938.58kmuller': {'Type': 'Rock', 'DisableCollision': True, 'Hpr': VBase3(-92.166, 0.0, 0.0), 'Pos': Point3(8.119, -104.756, -3.156), 'Scale': VBase3(7.184, 7.184, 7.184), 'Visual': {'Color': (0.5, 0.5799999833106995, 0.5899999737739563, 1.0), 'Model': 'models/props/rock_4_sphere'}}, '1179791064.29Aholdun': {'Type': 'Spawn Node', 'Aggro Radius': '12.0000', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': VBase3(-108.17, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': '100', 'Pause Duration': '30', 'Pos': Point3(-319.939, -759.868, 22.895), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1179791120.18Aholdun': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-272.299, -807.439, 12.475), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1179791134.46Aholdun': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-262.084, -857.896, 6.657), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1179791701.57Aholdun': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': VBase3(-161.67, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '7.2952', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-10.276, -477.541, -1.327), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1179793974.72Aholdun': {'Type': 'Spawn Node', 'Aggro Radius': '12.0000', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': VBase3(144.658, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '6.2651', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-112.853, -459.391, -0.618), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1184716513.73kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(118.656, 0.0, 0.0), 'Pos': Point3(-282.475, -860.838, 6.787), 'Scale': VBase3(1.0, 1.0, 3.146), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184716531.9kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(116.072, 0.0, 0.0), 'Pos': Point3(-274.672, -882.702, 3.365), 'Scale': VBase3(1.0, 1.0, 3.497), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184716542.28kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(118.023, 0.0, 0.0), 'Pos': Point3(-267.455, -902.252, -0.361), 'Scale': VBase3(1.0, 1.0, 3.619), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184717296.78kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-279.242, -841.955, 8.594), 'Hpr': VBase3(77.613, 0.0, 0.0), 'Pos': Point3(-279.242, -841.955, 8.594), 'Scale': VBase3(1.975, 1.807, 2.096), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184717358.28kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-286.708, -832.001, 11.316), 'Hpr': VBase3(-179.707, 0.0, 0.0), 'Pos': Point3(-286.708, -832.001, 11.316), 'Scale': VBase3(1.792, 1.792, 1.792), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184717384.58kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-296.947, -819.412, 12.195), 'Hpr': VBase3(119.548, 0.0, -4.688), 'Pos': Point3(-296.947, -819.412, 12.195), 'Scale': VBase3(2.894, 1.46, 2.73), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184717452.25kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(137.257, 0.0, -3.56), 'Pos': Point3(-312.435, -799.391, 16.132), 'Scale': VBase3(2.564, 1.997, 3.379), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184717774.17kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(38.538, 0.0, 0.0), 'Pos': Point3(-253.242, -575.139, 15.784), 'Scale': VBase3(8.433, 5.903, 5.903), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184717903.14kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-5.496, 0.0, 0.0), 'Pos': Point3(-204.018, -562.348, 11.991), 'Scale': VBase3(2.392, 4.901, 2.809), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1184717982.65kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(31.759, 0.0, 0.0), 'Pos': Point3(-197.119, -523.265, 12.405), 'Scale': VBase3(3.446, 3.446, 1.862), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184718346.58kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(50.493, 0.0, 0.0), 'Pos': Point3(-143.146, -459.234, 4.424), 'Scale': VBase3(5.785, 2.186, 2.186), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184718408.0kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(80.042, 0.0, 0.0), 'Pos': Point3(-156.558, -481.447, 7.87), 'Scale': VBase3(1.647, 1.586, 1.586), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184718756.09kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(116.714, 0.0, 0.0), 'Pos': Point3(-336.226, -767.127, 23.465), 'Scale': VBase3(2.559, 1.888, 1.888), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184718783.67kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(81.452, 0.0, 0.0), 'Pos': Point3(-338.845, -744.705, 23.506), 'Scale': VBase3(2.877, 1.685, 1.685), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184718870.54kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-166.203, 0.0, 0.0), 'Pos': Point3(-348.336, -721.977, 26.051), 'Scale': VBase3(0.602, 1.0, 1.335), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184718946.59kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-85.948, 0.0, 0.0), 'Pos': Point3(-350.32, -732.694, 25.196), 'Scale': VBase3(1.995, 1.429, 1.429), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184719009.84kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-176.754, 0.0, 0.0), 'Pos': Point3(-352.852, -742.675, 25.386), 'Scale': VBase3(1.0, 1.0, 1.386), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184719101.83kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(11.051, 0.0, 0.0), 'Pos': Point3(-294.921, -607.314, 26.788), 'Scale': VBase3(0.801, 1.0, 1.0), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184719164.21kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-72.385, 0.0, 0.0), 'Pos': Point3(-46.593, -542.406, -18.838), 'Scale': VBase3(2.647, 2.647, 8.776), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184719190.71kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-22.245, -563.691, -4.271), 'Scale': VBase3(1.0, 1.0, 4.834), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184719277.87kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(100.696, 0.0, 0.0), 'Pos': Point3(-2.572, -548.712, -3.941), 'Scale': VBase3(0.488, 1.0, 2.697), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184719296.98kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(172.417, 0.0, 0.0), 'Pos': Point3(-36.554, -532.038, -0.105), 'Scale': VBase3(2.779, 2.476, 5.133), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184720985.21kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(35.205, 0.0, 0.0), 'Pos': Point3(79.502, -138.629, -6.594), 'Scale': VBase3(2.293, 2.293, 4.515), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721040.78kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(243.699, -207.921, 0.0), 'Scale': VBase3(2.704, 2.704, 2.704), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721161.87kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-20.497, 0.0, 0.0), 'Pos': Point3(395.657, -500.026, -12.135), 'Scale': VBase3(6.587, 4.342, 4.342), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721215.28kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-26.999, 0.0, 0.0), 'Pos': Point3(445.877, -510.059, -7.858), 'Scale': VBase3(3.986, 3.696, 3.696), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721233.95kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(41.742, 0.0, 0.0), 'Pos': Point3(430.517, -507.735, -2.914), 'Scale': VBase3(1.222, 1.0, 3.159), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721291.89kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(165.907, 0.0, 0.0), 'Pos': Point3(418.533, -477.362, -11.395), 'Scale': VBase3(8.882, 8.419, 8.419), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721406.87kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(132.152, 0.0, 0.0), 'Pos': Point3(489.104, -633.97, 0.0), 'Scale': VBase3(3.714, 2.777, 2.777), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721426.18kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(164.262, 0.0, 0.0), 'Pos': Point3(469.196, -633.133, -1.26), 'Scale': VBase3(1.726, 2.464, 2.901), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721812.36kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-11.304, 0.0, 0.0), 'Pos': Point3(465.739, -655.873, -4.272), 'Scale': VBase3(2.878, 2.878, 2.878), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721823.17kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-71.597, 0.0, 0.0), 'Pos': Point3(445.567, -632.786, -1.355), 'Scale': VBase3(4.425, 2.405, 2.405), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721880.11kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(96.012, 0.0, 0.0), 'Pos': Point3(461.205, -615.181, -3.647), 'Scale': VBase3(3.559, 3.159, 3.159), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721907.79kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-123.568, 0.0, 0.0), 'Pos': Point3(471.884, -627.656, -9.972), 'Scale': VBase3(1.863, 1.863, 4.774), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721953.51kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(45.775, 0.0, 0.0), 'Pos': Point3(466.141, -594.241, -3.326), 'Scale': VBase3(2.179, 2.179, 3.091), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184721971.46kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-151.881, 0.0, 0.0), 'Pos': Point3(454.64, -582.71, -8.004), 'Scale': VBase3(1.789, 1.405, 4.494), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184722024.71kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-35.565, 0.0, 0.0), 'Pos': Point3(500.403, -671.125, -8.22), 'Scale': VBase3(1.919, 2.373, 4.389), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1184722304.54kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(5.496, 0.0, 0.0), 'Pos': Point3(604.613, -839.789, -5.012), 'Scale': VBase3(1.288, 1.288, 1.288), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1184891648.0dxschafe': {'Type': 'Dinghy', 'Aggro Radius': 20, 'Hpr': VBase3(40.217, 5.058, 0.0), 'Location': 'Water', 'Pos': Point3(-144.25, -717.336, 1.117), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/shipparts/dingy-geometry_High'}}, '1184891776.0dxschafe0': {'Type': 'Player Spawn Node', 'Hpr': Point3(0.0, 0.0, 0.0), 'Index': 1, 'Pos': Point3(-140.128, -651.976, 2.377), 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'All', 'Visual': {'Color': (0.5, 0.5, 0.5, 1), 'Model': 'models/misc/smiley'}}, '1184891776.0dxschafe1': {'Type': 'Player Spawn Node', 'Hpr': Point3(0.0, 0.0, 0.0), 'Index': 1, 'Pos': Point3(-184.722, -758.28, 2.699), 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'All', 'Visual': {'Color': (0.5, 0.5, 0.5, 1), 'Model': 'models/misc/smiley'}}, '1185921614.52kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(18.837, 0.0, 0.0), 'Pos': Point3(-305.391, -813.387, 26.631), 'Scale': VBase3(1.59, 1.59, 1.59), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1186006891.46kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': VBase3(69.221, 0.0, 0.0), 'Pos': Point3(-306.308, -819.284, 27.342), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.72, 0.78, 0.7529411764705882, 1.0), 'Model': 'models/props/crate_04'}}, '1186007092.14kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-304.305, -823.26, 29.649), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.71, 0.8, 0.7607843137254902, 1.0), 'Model': 'models/props/crate'}}, '1186007187.37kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(108.406, 0.0, 0.0), 'Pos': Point3(-301.8, -822.736, 26.72), 'Scale': VBase3(1.0, 1.0, 1.955), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1186007215.54kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(161.324, 0.0, 0.0), 'Pos': Point3(-307.586, -817.184, 26.407), 'Scale': VBase3(1.0, 1.0, 2.024), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1186007267.03kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Objects': {}, 'Pos': Point3(-292.103, -841.622, 27.342), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.73, 0.78, 0.7568627450980392, 1.0), 'Model': 'models/props/crates_group_1'}}, '1186007415.7kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(98.834, 0.0, 0.0), 'Pos': Point3(-289.516, -840.404, 26.219), 'Scale': VBase3(1.0, 1.0, 1.651), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187913949.14akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-128.874, 0.0, 0.0), 'Pos': Point3(454.734, -484.921, -11.51), 'Scale': VBase3(1.878, 1.878, 8.431), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914011.44akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-42.248, 0.0, 0.0), 'Pos': Point3(358.995, -356.361, -4.153), 'Scale': VBase3(1.0, 1.0, 2.585), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914045.25akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-67.838, 0.0, 0.0), 'Pos': Point3(369.831, -379.882, -2.0), 'Scale': VBase3(1.0, 1.0, 2.585), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914073.11akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(110.197, 0.0, 0.0), 'Pos': Point3(384.244, -377.965, -2.0), 'Scale': VBase3(1.0, 1.0, 2.585), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914104.39akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-42.248, 0.0, 0.0), 'Pos': Point3(347.259, -341.046, -2.0), 'Scale': VBase3(1.0, 1.0, 2.585), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914121.33akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-6.709, 0.0, 0.0), 'Pos': Point3(327.875, -338.618, -2.0), 'Scale': VBase3(1.796, 1.796, 3.425), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914162.75akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-26.96, 0.0, 0.0), 'Pos': Point3(271.414, -210.79, -2.0), 'Scale': VBase3(2.704, 2.704, 2.704), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914199.86akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-110.168, 0.0, 0.0), 'Pos': Point3(293.678, -262.519, 0.0), 'Scale': VBase3(2.101, 2.101, 2.101), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914236.7akelts': {'Type': 'Swamp_props', 'DisableCollision': False, 'Hpr': VBase3(178.851, -3.122, 4.786), 'Pos': Point3(301.413, -302.12, -1.385), 'Scale': VBase3(1.846, 1.846, 1.846), 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/vegetation/swamp_tree_roots'}}, '1187914264.97akelts': {'Type': 'Rock', 'DisableCollision': False, 'Hpr': VBase3(3.368, -0.137, 4.704), 'Pos': Point3(302.212, -264.111, -7.994), 'Scale': VBase3(10.072, 10.072, 10.072), 'Visual': {'Color': (0.28999999165534973, 0.4000000059604645, 0.46000000834465027, 1.0), 'Model': 'models/props/rock_4_sphere'}}, '1187914386.67akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(17.622, 0.0, 0.0), 'Pos': Point3(206.577, -145.923, -0.939), 'Scale': VBase3(1.346, 1.346, 1.346), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914411.34akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-64.455, 0.0, 0.0), 'Pos': Point3(184.517, -137.759, -1.635), 'Scale': VBase3(1.346, 1.346, 1.346), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914475.81akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-67.009, 0.0, 0.0), 'Pos': Point3(0.822, -105.142, -1.998), 'Scale': VBase3(3.006, 0.257, 1.385), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914641.95akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-16.882, 0.0, 0.0), 'Pos': Point3(27.072, -124.314, -4.181), 'Scale': VBase3(0.678, 0.372, 2.225), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914830.53akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(77.413, 0.0, 0.0), 'Pos': Point3(-73.571, -407.45, 0.0), 'Scale': VBase3(0.525, 1.259, 1.259), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187914874.69akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(4.408, 0.0, 0.0), 'Pos': Point3(-95.124, -422.22, -2.0), 'Scale': VBase3(0.468, 1.123, 1.123), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1187993555.97akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, 0.0), 'Pos': Point3(-193.985, -788.725, 1.073), 'Scale': VBase3(0.711, 0.719, 1.871), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1187993700.22akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(39.363, 0.0, 0.0), 'Pos': Point3(-198.947, -773.149, 3.772), 'Scale': VBase3(1.0, 1.0, 1.854), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1187995354.27akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-199.38, -789.316, 2.818), 'Hpr': VBase3(0.0, 14.537, 5.684), 'Pos': Point3(-202.599, -789.944, 2.707), 'Scale': VBase3(0.598, 0.819, 1.733), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1189212260.31kmuller': {'Type': 'Building Exterior', 'File': '', 'ExtUid': '1189212260.31kmuller0', 'Hpr': VBase3(-128.508, 0.527, -1.189), 'Objects': {'1189456314.77kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-39.156, -453.783, -15.774), 'Holiday': '', 'Hpr': VBase3(-136.109, 2.634, 2.735), 'Pos': Point3(-41.913, 2.173, -14.63), 'Scale': VBase3(3.212, 1.0, 8.981), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1189456447.08kmuller': {'Type': 'Townsperson', 'Category': 'Shipwright', 'Aggro Radius': '12.0000', 'AnimSet': 'default', 'AuraFX': 'None', 'Boss': False, 'CustomModel': 'None', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': '', 'GridPos': Point3(-72.355, -489.439, 0.343), 'Hpr': VBase3(-70.979, 3.589, -1.236), 'Instanced World': 'None', 'Level': '37', 'Notice Animation 1': '', 'Notice Animation 2': '', 'Patrol Radius': '1.0000', 'Pos': Point3(21.292, -1.475, 0.0), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Requires Quest Interest': False, 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'Start State': 'Idle', 'StartFrame': '0', 'Team': 'Villager', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Zombie': False, 'rolOffset': VBase3(0.0, 0.0, 0.0), 'spawnTimeAlt': '', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1251247369.96caoconno': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-97.628, -474.345, -11.857), 'Holiday': '', 'Hpr': VBase3(-45.963, -1.221, 0.448), 'Pos': Point3(10.66, -30.742, -11.501), 'Scale': VBase3(2.409, 1.0, 5.4), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1251247425.66caoconno': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-30.615, -479.316, -3.936), 'Holiday': '', 'Hpr': VBase3(163.563, 0.842, -0.991), 'Pos': Point3(-27.012, 24.862, -3.307), 'Scale': VBase3(1.443, 1.0, 3.288), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}}, 'Pos': Point3(-66.869, -484.894, -0.298), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Door': 'models/buildings/shanty_guildhall_door', 'Model': 'models/buildings/shanty_repairshop_exterior', 'SignImage': 'models/buildings/sign1_eng_a_icon_blacksmith'}}, '1189456366.97kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-126.219, 0.0, 0.0), 'Pos': Point3(-58.252, -443.342, -8.95), 'Scale': VBase3(3.042, 1.19, 5.679), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1190666496.0dxschafe': {'Type': 'Animated Avatar - Navy', 'Animation Track': 'sit_sleep', 'Hpr': VBase3(-35.554, 28.688, 2.895), 'Pos': Point3(-299.244, -614.407, 27.064), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1190666880.0dxschafe': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-31.482, 0.0, 0.0), 'Pos': Point3(-300.724, -614.498, 26.702), 'Scale': VBase3(1.242, 1.488, 1.205), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1190741504.0dxschafe': {'Type': 'Building Exterior', 'File': 'cuba_building_int_tavern', 'ExtUid': '1190741504.0dxschafe0', 'Hpr': VBase3(43.111, 0.0, 2.086), 'Objects': {'1201041675.97dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(-179.829, 0.0, 0.0), 'Pos': Point3(-0.498, -4.914, 0.952), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1201041677.36dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator_2', 'Hpr': VBase3(0.0, 0.0, 0.0), 'Pos': Point3(-6.626, 20.947, 1.006), 'Scale': VBase3(1.0, 1.0, 1.0)}}, 'Pos': Point3(-166.222, -609.364, 14.521), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.65, 0.67, 0.7254901960784313, 1.0), 'Door': 'models/buildings/shanty_guildhall_door', 'Model': 'models/buildings/shanty_tavern_exterior', 'SignImage': 'models/buildings/sign1_eng_a_icon_blacksmith'}}, '1191629336.42kmuller': {'Type': 'Stairs', 'DisableCollision': False, 'Hpr': VBase3(41.465, 0.0, 0.0), 'Pos': Point3(-154.369, -622.269, 8.323), 'Scale': VBase3(0.973, 1.0, 1.0), 'Visual': {'Color': (0.36, 0.44, 0.5, 1.0), 'Model': 'models/buildings/stone_stairs_double'}}, '1191629553.64kmuller': {'Type': 'Stairs', 'DisableCollision': False, 'Hpr': VBase3(42.295, 0.0, 0.0), 'Pos': Point3(-146.961, -630.23, 1.915), 'Scale': VBase3(0.762, 1.0, 1.0), 'Visual': {'Color': (0.36000001430511475, 0.4399999976158142, 0.5, 1.0), 'Model': 'models/buildings/stone_stairs_double'}}, '1191629599.67kmuller': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(36.897, 0.0, 0.0), 'Pos': Point3(-153.414, -608.288, 7.57), 'Scale': VBase3(0.76, 0.76, 0.76), 'Visual': {'Model': 'models/vegetation/bush_a'}}, '1191629616.42kmuller': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': VBase3(-18.577, 0.0, 0.0), 'Pos': Point3(-165.963, -624.1, 10.167), 'Scale': VBase3(0.659, 0.659, 0.659), 'Visual': {'Model': 'models/vegetation/bush_c'}}, '1191629698.66kmuller': {'Type': 'Bush', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-158.788, -598.788, 8.404), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/vegetation/bush_c'}}, '1191629817.2kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(126.054, 0.0, 0.0), 'Pos': Point3(-151.785, -598.595, 6.556), 'Scale': VBase3(2.507, 2.507, 2.507), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1191629838.92kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(43.161, 0.0, 0.0), 'Pos': Point3(-148.854, -612.866, 5.699), 'Scale': VBase3(1.225, 1.225, 2.864), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1191629854.09kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-43.63, 0.0, 0.0), 'Pos': Point3(-156.953, -613.242, 8.88), 'Scale': VBase3(1.09, 1.09, 3.751), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1191629933.37kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(45.217, 0.0, 0.0), 'Pos': Point3(-169.664, -631.311, 8.863), 'Scale': VBase3(2.621, 1.855, 2.096), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1191629959.37kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-7.406, 0.0, 0.0), 'Pos': Point3(-182.264, -640.102, 12.636), 'Scale': VBase3(0.724, 1.0, 1.333), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1191629982.17kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(125.106, 0.0, 0.0), 'Pos': Point3(-163.15, -618.235, 8.931), 'Scale': VBase3(1.0, 1.0, 3.513), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1191630016.62kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-106.537, 0.0, 0.0), 'Pos': Point3(-190.914, -616.698, 15.546), 'Scale': VBase3(1.0, 1.0, 2.315), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1192043971.0kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-79.363, 0.0, 0.0), 'Pos': Point3(175.154, -189.323, -2.684), 'Scale': VBase3(1.674, 1.674, 4.468), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1192044061.55kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-66.827, 0.0, 0.0), 'Pos': Point3(126.316, -150.761, -1.654), 'Scale': VBase3(1.0, 1.0, 3.962), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1192044102.02kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(53.799, 0.0, 0.0), 'Pos': Point3(143.19, -154.164, -2.369), 'Scale': VBase3(1.0, 1.0, 2.87), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1192228480.0dxschafe': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(26.869, -359.892, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(148.457, -233.669, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe0': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-27.17, -156.317, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Big Gator', 'Start State': 'Ambush', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe1': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(51.014, -214.437, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe2': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(363.513, -547.292, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe3': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(409.275, -595.765, -1.327), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe4': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(330.853, -437.092, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe5': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(223.516, -546.544, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe6': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(215.664, -309.744, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe7': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-69.322, -165.851, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Big Gator', 'Start State': 'Ambush', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228608.0dxschafe8': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-90.742, -210.405, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Ambush', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(255.22, -245.849, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe0': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(325.088, -639.495, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe1': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(265.244, -605.764, -1.327), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe2': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(310.809, -372.223, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0.0, 0.0, 0.65, 1.0), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe3': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-49.478, -297.461, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe4': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-22.994, -218.547, -2.0), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192228736.0dxschafe5': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(76.849, -324.094, -1.327), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Alligator', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1192733824.0dxschafe': {'Type': 'Movement Node', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pause Chance': '100', 'Pause Duration': '30', 'Pos': Point3(-212.788, -770.382, 7.013), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Color': (0.65, 0, 0, 1), 'Model': 'models/misc/smiley'}}, '1192733952.0dxschafe': {'Type': 'Movement Node', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pause Chance': '100', 'Pause Duration': '30', 'Pos': Point3(-225.931, -895.237, -5.479), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.65, 0, 0, 1), 'Model': 'models/misc/smiley'}}, '1192836222.09kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-11.592, 0.0, 0.0), 'Pos': Point3(-337.636, -684.906, 27.34), 'Scale': VBase3(0.811, 1.0, 1.472), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1201041679.88dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(-180.0, 0.0, 0.0), 'Pos': Point3(0.313, -4.248, 1.444), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1201041679.89dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator_2', 'Hpr': VBase3(0.0, 0.0, 0.0), 'Pos': Point3(-6.626, 20.947, 1.006), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1210704118.17kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-97.912, 0.0, 0.0), 'Pos': Point3(460.304, -573.978, -2.094), 'Scale': VBase3(1.86, 1.86, 3.402), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1210704165.86kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-82.933, 0.0, -2.169), 'Pos': Point3(457.725, -535.476, -3.064), 'Scale': VBase3(4.18, 3.824, 3.824), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1241909300.25ian': {'Type': 'Townsperson', 'Category': 'Stowaway', 'AnimSet': 'cargomaster', 'AuraFX': 'None', 'Boss': False, 'CustomModel': 'None', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': '', 'HelpID': 'NONE', 'Holiday': '', 'Hpr': VBase3(347.905, 0.0, 0.0), 'Instanced World': 'None', 'Level': '37', 'Notice Animation 1': '', 'Notice Animation 2': '', 'Patrol Radius': '12.0000', 'Pos': Point3(-201.181, -765.469, 5.135), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Requires Quest Interest': False, 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'ShopID': 'PORT_ROYAL_DEFAULTS', 'Start State': 'Idle', 'StartFrame': '0', 'Team': 'Player', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'VisSize': '', 'Zombie': False, 'rolOffset': VBase3(0.0, 0.0, 0.0), 'spawnTimeAlt': '', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1241909665.5ian': {'Type': 'Crate', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(100.024, 8.973, -8.978), 'Pos': Point3(-194.823, -767.801, 3.577), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Color': (0.699999988079071, 0.699999988079071, 0.699999988079071, 1.0), 'Model': 'models/props/pir_m_prp_cnt_crateStowaway'}}, '1242332258.36kmuller': {'Type': 'Pier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(154.739, 0.0, 0.0), 'Pos': Point3(-171.371, -750.487, -0.819), 'Scale': VBase3(0.375, 0.375, 0.375), 'VisSize': '', 'Visual': {'Model': 'models/islands/pier_walkway'}}, '1242332511.27kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Holiday': '', 'Hpr': VBase3(31.05, 5.218, 8.59), 'Pos': Point3(-199.308, -764.029, 4.786), 'Scale': VBase3(0.961, 0.961, 0.961), 'VisSize': '', 'Visual': {'Color': (0.5, 0.5, 0.5, 1.0), 'Model': 'models/props/crate_04'}}, '1242332757.48kmuller': {'Type': 'Sack', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-73.023, -1.291, -68.071), 'Pos': Point3(-193.531, -769.122, 4.57), 'Scale': VBase3(0.621, 0.621, 0.621), 'VisSize': '', 'Visual': {'Model': 'models/props/Sack'}}, '1242332822.32kmuller': {'Type': 'Sack', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-0.452, 2.351, 10.886), 'Pos': Point3(-204.79, -768.917, 5.569), 'Scale': VBase3(0.323, 0.323, 0.323), 'VisSize': '', 'Visual': {'Model': 'models/props/sack_18stack'}}, '1242332871.57kmuller': {'Type': 'Sack', 'DisableCollision': False, 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-195.891, -768.73, 3.705), 'Scale': VBase3(1.326, 1.326, 1.326), 'VisSize': '', 'Visual': {'Model': 'models/props/package_sack'}}, '1242332937.68kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(25.533, 0.0, 0.0), 'Pos': Point3(-198.89, -764.772, 3.188), 'Scale': VBase3(0.757, 1.171, 1.013), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1242332966.9kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-41.885, 0.0, 4.203), 'Pos': Point3(-198.653, -768.691, 3.361), 'Scale': VBase3(0.218, 0.604, 0.96), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1248385792.0jloehrle': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-251.774, -584.307, 23.852), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Bat T1', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'VisSize': '', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1248385792.0jloehrle0': {'Type': 'Spawn Node', 'AnimSet': 'default', 'AuraFX': 'None', 'Hpr': Point3(0.0, 0.0, 0.0), 'Min Population': '1', 'Patrol Radius': '12.0000', 'Pause Chance': 100, 'Pause Duration': 30, 'Pos': Point3(-223.199, -558.898, 19.878), 'PoseAnim': '', 'PoseFrame': '', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Scale': VBase3(1.0, 1.0, 1.0), 'Spawnables': 'Bat T1', 'Start State': 'Patrol', 'StartFrame': '0', 'Team': 'default', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'VisSize': '', 'Visual': {'Color': (0, 0, 0.65, 1), 'Model': 'models/misc/smiley'}, 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1257284346.42caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(56.033, 0.0, 0.0), 'Pos': Point3(-160.171, -638.435, 7.858), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_snowman_jack_winter09'}}, '1257284362.29caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(72.895, 0.0, 0.0), 'Pos': Point3(-163.315, -639.753, 7.868), 'Scale': VBase3(1.852, 1.852, 1.852), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_sandpile01_winter09'}}, '1257284384.94caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-161.037, -635.779, 7.868), 'Scale': VBase3(1.852, 1.852, 1.852), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_sandpile01_winter09'}}, '1267728993.08Jared': {'Type': 'PotionTable', 'Hpr': VBase3(-20.072, 0.0, 3.1), 'Objects': {'1269464043.62akelts': {'Type': 'Jugs_and_Jars', 'DisableCollision': False, 'GridPos': Point3(-330.818, -694.55, 29.961), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-2.92, 1.177, 2.977), 'Scale': VBase3(0.685, 0.685, 0.685), 'VisSize': '', 'Visual': {'Model': 'models/props/jar'}}, '1269464058.34akelts': {'Type': 'Jugs_and_Jars', 'DisableCollision': False, 'GridPos': Point3(-325.309, -696.252, 29.961), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(2.589, -0.525, 2.977), 'Scale': VBase3(0.537, 0.537, 0.97), 'VisSize': '', 'Visual': {'Model': 'models/props/jar'}}, '1269464073.87akelts': {'Type': 'Jugs_and_Jars', 'DisableCollision': False, 'GridPos': Point3(-324.978, -696.137, 29.961), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(2.92, -0.41, 2.977), 'Scale': VBase3(0.537, 0.537, 0.537), 'VisSize': '', 'Visual': {'Model': 'models/props/jar'}}, '1269464088.19akelts': {'Type': 'Jugs_and_Jars', 'DisableCollision': False, 'GridPos': Point3(-325.313, -696.812, 29.961), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(2.585, -1.085, 2.977), 'Scale': VBase3(1.175, 1.175, 1.175), 'VisSize': '', 'Visual': {'Model': 'models/props/winebottle_B'}}, '1269464139.18akelts': {'Type': 'Jugs_and_Jars', 'DisableCollision': False, 'GridPos': Point3(-325.824, -695.314, 29.962), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(2.074, 0.413, 2.978), 'Scale': VBase3(0.79, 0.79, 0.79), 'VisSize': '', 'Visual': {'Model': 'models/props/bottle_tan'}}, '1269464174.37akelts': {'Type': 'Jugs_and_Jars', 'DisableCollision': False, 'GridPos': Point3(-330.382, -696.296, 29.962), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-2.484, -0.569, 2.978), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/bottle_red'}}, '1269464413.98akelts': {'Type': 'Mortar_Pestle', 'DisableCollision': False, 'GridPos': Point3(-329.687, -695.9, 29.961), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-1.789, -0.173, 2.977), 'Scale': VBase3(1.007, 1.007, 1.007), 'VisSize': '', 'Visual': {'Model': 'models/props/mortar_pestle_wood'}}, '1269464456.65akelts': {'Type': 'Mortar_Pestle', 'DisableCollision': False, 'GridPos': Point3(-326.578, -695.53, 29.961), 'Holiday': '', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(1.32, 0.197, 2.977), 'Scale': VBase3(0.676, 0.676, 0.676), 'VisSize': '', 'Visual': {'Model': 'models/props/mortar_pestle_stone'}}}, 'Pos': Point3(-328.594, -682.984, 27.173), 'Potion Zone': '3', 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/minigames/pir_m_gam_pot_table'}}, '1270764606.85akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(46.759, 0.0, 0.0), 'Pos': Point3(-416.63, -1300.635, -9.4), 'Scale': VBase3(19.924, 2.047, 6.536), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_barrier_plane'}}, '1270764673.88akelts': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(73.7, 0.0, 0.0), 'Pos': Point3(-332.041, -1171.865, -9.4), 'Scale': VBase3(11.981, 2.047, 6.536), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_barrier_plane'}}, '1286984549.68gcarranza': {'Type': 'Townsperson', 'Category': 'CatalogRep', 'AnimSet': 'coin_flip', 'AuraFX': 'None', 'Boss': False, 'CustomModel': 'None', 'DNA': '1286984549.68gcarranza', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': 'emote_yawn', 'HelpID': 'NONE', 'Holiday': '', 'Hpr': VBase3(-147.764, -2.811, -1.612), 'Instanced World': 'None', 'Level': '37', 'Notice Animation 1': 'emote_wink', 'Notice Animation 2': 'emote_smile', 'Patrol Radius': '12.0000', 'Pos': Point3(-186.314, -540.718, 14.402), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropFXLeft': 'None', 'PropFXRight': 'None', 'PropLeft': 'None', 'PropRight': 'None', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'ShopID': 'PORT_ROYAL_DEFAULTS', 'Start State': 'Walk', 'StartFrame': '0', 'Team': 'Player', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'VisSize': '', 'Zombie': False, 'rolOffset': VBase3(0.0, 0.0, 0.0), 'spawnTimeAlt': '', 'spawnTimeBegin': 0.0, 'spawnTimeEnd': 0.0}, '1287611070.99kmuller': {'Type': 'Building Exterior', 'File': '', 'ExtUid': '1287611070.99kmuller0', 'Holiday': '', 'Hpr': VBase3(71.081, 0.0, 0.0), 'Objects': {'1287611234.14kmuller': {'Type': 'Prop_Groups', 'DisableCollision': True, 'GridPos': Point3(-194.793, -544.071, 16.961), 'Holiday': '', 'Hpr': VBase3(-41.155, 0.0, 0.0), 'Pos': Point3(1.017, -6.057, 0.101), 'Scale': VBase3(1.037, 1.037, 1.037), 'VisSize': '', 'Visual': {'Model': 'models/props/prop_group_B'}}, '1287612652.97kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'GridPos': Point3(-191.824, -546.233, 15.359), 'Holiday': '', 'Hpr': VBase3(-1.202, 0.0, 0.0), 'Pos': Point3(-0.383, -10.596, -1.971), 'Scale': VBase3(2.161, 2.145, 3.185), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}}, 'Pos': Point3(-199.479, -543.296, 16.883), 'Scale': VBase3(0.773, 0.773, 0.773), 'VisSize': '', 'Visual': {'Door': 'models/buildings/shanty_guildhall_door', 'Model': 'models/buildings/shanty_leanto_A', 'SignFrame': '', 'SignImage': 'models/buildings/sign1_eng_a_icon_barber'}}, '1287612604.35kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-8.797, 0.0, 0.0), 'Pos': Point3(-216.769, -550.687, 17.258), 'Scale': VBase3(1.825, 1.825, 1.825), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1287612731.53kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(99.746, 0.0, 0.0), 'Pos': Point3(-199.918, -529.652, 14.94), 'Scale': VBase3(1.0, 1.0, 1.461), 'VisSize': '', 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}}, 'Phase': 1, 'Undockable': False, 'Visibility': 'Grid', 'Visual': {'Model': 'models/islands/pir_m_are_isl_cuba'}}}, 'TodSettings': {'AmbientColors': {0: Vec4(0.207843, 0.243137, 0.447059, 1), 2: Vec4(1, 1, 1, 1), 4: Vec4(0.721569, 0.611765, 0.619608, 1), 6: Vec4(0.207843, 0.243137, 0.447059, 1), 8: Vec4(0.388235, 0.423529, 0.568627, 1), 12: Vec4(0.34, 0.28, 0.41, 1), 13: Vec4(0.34, 0.28, 0.41, 1), 16: Vec4(0.25, 0.25, 0.25, 1), 17: Vec4(0.34, 0.28, 0.41, 1)}, 'DirectionalColors': {0: Vec4(0.956863, 0.909804, 0.894118, 1), 2: Vec4(1, 1, 1, 1), 4: Vec4(0.439216, 0.176471, 0, 1), 6: Vec4(0.513726, 0.482353, 0.639216, 1), 8: Vec4(0.447059, 0.439216, 0.537255, 1), 12: Vec4(0.66, 0.76, 0.05, 1), 13: Vec4(0.66, 0.76, 0.05, 1), 16: Vec4(0, 0, 0, 1), 17: Vec4(0.66, 0.76, 0.05, 1)}, 'FogColors': {0: Vec4(0.172549, 0.180392, 0.290196, 1), 2: Vec4(0.894118, 0.894118, 1, 1), 4: Vec4(0.231373, 0.203922, 0.184314, 1), 6: Vec4(0.172549, 0.180392, 0.290196, 1), 8: Vec4(0.129412, 0.137255, 0.203922, 1), 12: Vec4(0.1, 0.12, 0.03, 0), 13: Vec4(0.1, 0.12, 0.03, 0), 16: Vec4(0.25, 0.25, 0.25, 1), 17: Vec4(0.1, 0.12, 0.03, 0)}, 'FogRanges': {0: 0.000699999975040555, 2: 0.00019999999494757503, 4: 0.00039999998989515007, 6: 0.000699999975040555, 8: 0.0, 12: 0.00025, 13: 0.00025, 16: 0.0001, 17: 0.005}, 'LinearFogRanges': {0: (0.0, 100.0), 2: (0.0, 100.0), 4: (0.0, 100.0), 6: (0.0, 100.0), 8: (0.0, 100.0), 12: (0.0, 100.0), 13: (0.0, 100.0), 16: (0.0, 100.0), 17: (0.0, 100.0)}}, 'Node Links': [['1192733952.0dxschafe', '1192733824.0dxschafe', 'Bi-directional'], ['1179791064.29Aholdun', '1192733824.0dxschafe', 'Bi-directional'], ['1179791064.29Aholdun', '1192733952.0dxschafe', 'Bi-directional']], 'Layers': {'Collisions': ['1184008208.59kmuller', '1184016064.62kmuller', '1184013852.84kmuller', '1185822696.06kmuller', '1184006140.32kmuller', '1184002350.98kmuller', '1184007573.29kmuller', '1184021176.59kmuller', '1184005963.59kmuller', '1188324241.31akelts', '1184006537.34kmuller', '1184006605.81kmuller', '1187139568.33kmuller', '1188324186.98akelts', '1184006730.66kmuller', '1184007538.51kmuller', '1184006188.41kmuller', '1184021084.27kmuller', '1185824396.94kmuller', '1185824250.16kmuller', '1185823630.52kmuller', '1185823760.23kmuller', '1185824497.83kmuller', '1185824751.45kmuller', '1187739103.34akelts', '1188323993.34akelts', '1184016538.29kmuller', '1185822200.97kmuller', '1184016225.99kmuller', '1195241421.34akelts', '1195242796.08akelts', '1184020642.13kmuller', '1195237994.63akelts', '1184020756.88kmuller', '1184020833.4kmuller', '1185820992.97kmuller', '1185821053.83kmuller', '1184015068.54kmuller', '1184014935.82kmuller', '1185821432.88kmuller', '1185821701.86kmuller', '1195240137.55akelts', '1195241539.38akelts', '1195238422.3akelts', '1195238473.22akelts', '1185821453.17kmuller', '1184021269.96kmuller', '1185821310.89kmuller', '1185821165.59kmuller', '1185821199.36kmuller', '1185822035.98kmuller', '1184015806.59kmuller', '1185822059.48kmuller', '1185920461.76kmuller', '1194984449.66akelts', '1185824206.22kmuller', '1184003446.23kmuller', '1184003254.85kmuller', '1184003218.74kmuller', '1184002700.44kmuller', '1186705073.11kmuller', '1187658531.86akelts', '1186705214.3kmuller', '1185824927.28kmuller', '1184014204.54kmuller', '1184014152.84kmuller']}, 'ObjectIds': {'1160614528.73sdnaik': '["Objects"]["1160614528.73sdnaik"]', '1161732317.95sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732317.95sdnaik"]', '1161732322.52sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732322.52sdnaik"]', '1161732370.84sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732370.84sdnaik"]', '1161732370.86sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732370.84sdnaik"]["Objects"]["1161732370.86sdnaik"]', '1161732370.88sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732370.84sdnaik"]["Objects"]["1161732370.88sdnaik"]', '1161732578.06sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732578.06sdnaik"]', '1161732578.08sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732578.06sdnaik"]["Objects"]["1161732578.08sdnaik"]', '1161732578.11sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732578.06sdnaik"]["Objects"]["1161732578.11sdnaik"]', '1161732705.67sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732705.67sdnaik"]', '1161732705.72sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732705.67sdnaik"]["Objects"]["1161732705.72sdnaik"]', '1161732705.7sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1161732705.67sdnaik"]["Objects"]["1161732705.7sdnaik"]', '1162496104.57dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496104.57dzlu"]', '1162496561.59dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496561.59dzlu"]', '1162496585.79dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496585.79dzlu"]', '1162496638.89dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496638.89dzlu"]', '1162496693.54dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496693.54dzlu"]', '1162496757.15dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496757.15dzlu"]', '1162496818.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496818.98dzlu"]', '1162496857.71dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496857.71dzlu"]', '1162496880.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496880.34dzlu"]', '1162496889.81dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496889.81dzlu"]', '1162496999.35dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162496999.35dzlu"]', '1162497015.78dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497015.78dzlu"]', '1162497038.53dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497038.53dzlu"]', '1162497249.64dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497249.64dzlu"]', '1162497329.21dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497329.21dzlu"]', '1162497460.96dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497460.96dzlu"]', '1162497568.12dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497568.12dzlu"]', '1162497591.24dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497591.24dzlu"]', '1162497648.96dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497648.96dzlu"]', '1162497681.26dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497681.26dzlu"]', '1162497693.48dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497693.48dzlu"]', '1162497709.17dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162497709.17dzlu"]', '1162498231.46dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498231.46dzlu"]', '1162498233.67dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498233.67dzlu"]', '1162498236.93dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498236.93dzlu"]', '1162498256.79dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498256.79dzlu"]', '1162498287.12dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498287.12dzlu"]', '1162498321.2dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498321.2dzlu"]', '1162498369.29dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498369.29dzlu"]', '1162498390.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498390.34dzlu"]', '1162498400.56dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498400.56dzlu"]', '1162498416.74dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498416.74dzlu"]', '1162498428.64dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498428.64dzlu"]', '1162498500.51dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498500.51dzlu"]', '1162498514.14dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498514.14dzlu"]', '1162498585.56dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498585.56dzlu"]', '1162498611.99dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498611.99dzlu"]', '1162498633.87dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498633.87dzlu"]', '1162498653.28dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162498653.28dzlu"]', '1162501202.2dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501202.2dzlu"]', '1162501211.4dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501211.4dzlu"]', '1162501216.51dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501216.51dzlu"]', '1162501218.89dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501218.89dzlu"]', '1162501221.32dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501221.32dzlu"]', '1162501223.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501223.18dzlu"]', '1162501264.03dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501264.03dzlu"]', '1162501292.92dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501292.92dzlu"]', '1162501329.71dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501329.71dzlu"]', '1162501346.57dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501346.57dzlu"]', '1162501361.39dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501361.39dzlu"]', '1162501378.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501378.34dzlu"]', '1162501380.67dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501380.67dzlu"]', '1162501506.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501506.98dzlu"]', '1162501515.84dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501515.84dzlu"]', '1162501551.93dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501551.93dzlu"]', '1162501577.87dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501577.87dzlu"]', '1162501603.15dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501603.15dzlu"]', '1162501641.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501641.98dzlu"]', '1162501646.46dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501646.46dzlu"]', '1162501650.07dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501650.07dzlu"]', '1162501671.89dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501671.89dzlu"]', '1162501689.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501689.73dzlu"]', '1162501722.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501722.73dzlu"]', '1162501750.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501750.34dzlu"]', '1162501776.62dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501776.62dzlu"]', '1162501796.43dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501796.43dzlu"]', '1162501799.67dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501799.67dzlu"]', '1162501880.84dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162501880.84dzlu"]', '1162502780.21dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162502780.21dzlu"]', '1162504044.29dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504044.29dzlu"]', '1162504062.54dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504062.54dzlu"]', '1162504090.14dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504090.14dzlu"]', '1162504101.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504101.34dzlu"]', '1162504103.39dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504103.39dzlu"]', '1162504362.84dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504362.84dzlu"]', '1162504374.53dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504374.53dzlu"]', '1162504384.23dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504384.23dzlu"]', '1162504406.53dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504406.53dzlu"]', '1162504452.48dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504452.48dzlu"]', '1162504463.24dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504463.24dzlu"]', '1162504470.51dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504470.51dzlu"]', '1162504493.21dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504493.21dzlu"]', '1162504510.79dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504510.79dzlu"]', '1162504512.71dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504512.71dzlu"]', '1162504513.99dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504513.99dzlu"]', '1162504515.7dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504515.7dzlu"]', '1162504517.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504517.18dzlu"]', '1162504518.45dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504518.45dzlu"]', '1162504520.09dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504520.09dzlu"]', '1162504563.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504563.18dzlu"]', '1162504565.28dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504565.28dzlu"]', '1162504579.32dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504579.32dzlu"]', '1162504581.82dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504581.82dzlu"]', '1162504589.29dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504589.29dzlu"]', '1162504613.95dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504613.95dzlu"]', '1162504615.65dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504615.65dzlu"]', '1162504622.87dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504622.87dzlu"]', '1162504625.28dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504625.28dzlu"]', '1162504626.54dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504626.54dzlu"]', '1162504628.01dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504628.01dzlu"]', '1162504629.42dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504629.42dzlu"]', '1162504630.82dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504630.82dzlu"]', '1162504635.54dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504635.54dzlu"]', '1162504651.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504651.18dzlu"]', '1162504683.95dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504683.95dzlu"]', '1162504691.23dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504691.23dzlu"]', '1162504697.12dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504697.12dzlu"]', '1162504701.23dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504701.23dzlu"]', '1162504709.56dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504709.56dzlu"]', '1162504732.4dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504732.4dzlu"]', '1162504754.37dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504754.37dzlu"]', '1162504802.04dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504802.04dzlu"]', '1162504808.48dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504808.48dzlu"]', '1162504824.68dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162504824.68dzlu"]', '1162505050.93dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505050.93dzlu"]', '1162505128.43dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505128.43dzlu"]', '1162505210.81dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505210.81dzlu"]', '1162505214.28dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505214.28dzlu"]', '1162505293.49dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505293.49dzlu"]', '1162505296.51dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505296.51dzlu"]', '1162505308.45dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505308.45dzlu"]', '1162505330.64dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505330.64dzlu"]', '1162505333.48dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162505333.48dzlu"]', '1162575738.25dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162575738.25dzlu"]', '1162575755.71dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162575755.71dzlu"]', '1162575900.62dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162575900.62dzlu"]', '1162576043.68dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576043.68dzlu"]', '1162576078.71dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576078.71dzlu"]', '1162576335.14dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576335.14dzlu"]', '1162576483.87dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576483.87dzlu"]', '1162576530.06dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576530.06dzlu"]', '1162576533.54dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576533.54dzlu"]', '1162576597.46dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576597.46dzlu"]', '1162576602.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576602.98dzlu"]', '1162576619.82dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576619.82dzlu"]', '1162576649.89dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576649.89dzlu"]', '1162576682.79dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576682.79dzlu"]', '1162576722.81dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576722.81dzlu"]', '1162576805.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576805.98dzlu"]', '1162576816.26dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576816.26dzlu"]', '1162576895.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576895.73dzlu"]', '1162576950.03dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576950.03dzlu"]', '1162576969.61dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576969.61dzlu"]', '1162576986.5dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576986.5dzlu"]', '1162576998.25dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162576998.25dzlu"]', '1162577044.42dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577044.42dzlu"]', '1162577094.82dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577094.82dzlu"]', '1162577152.48dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577152.48dzlu"]', '1162577320.84dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577320.84dzlu"]', '1162577355.15dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577355.15dzlu"]', '1162577566.42dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577566.42dzlu"]', '1162577813.76dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577813.76dzlu"]', '1162577835.12dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577835.12dzlu"]', '1162577839.92dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577839.92dzlu"]', '1162577843.75dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577843.75dzlu"]', '1162577867.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577867.18dzlu"]', '1162577870.71dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577870.71dzlu"]', '1162577884.96dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577884.96dzlu"]', '1162577982.15dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577982.15dzlu"]', '1162577996.29dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162577996.29dzlu"]', '1162578006.14dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578006.14dzlu"]', '1162578016.5dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578016.5dzlu"]', '1162578019.04dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578019.04dzlu"]', '1162578024.62dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578024.62dzlu"]', '1162578025.75dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578025.75dzlu"]', '1162578026.78dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578026.78dzlu"]', '1162578038.0dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578038.0dzlu"]', '1162578047.75dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578047.75dzlu"]', '1162578056.12dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578056.12dzlu"]', '1162578057.4dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578057.4dzlu"]', '1162578070.86dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578070.86dzlu"]', '1162578075.4dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578075.4dzlu"]', '1162578081.51dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578081.51dzlu"]', '1162578094.39dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578094.39dzlu"]', '1162578096.17dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578096.17dzlu"]', '1162578108.39dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578108.39dzlu"]', '1162578113.9dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578113.9dzlu"]', '1162578121.26dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578121.26dzlu"]', '1162578126.61dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578126.61dzlu"]', '1162578259.32dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578259.32dzlu"]', '1162578426.64dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578426.64dzlu"]', '1162578793.03dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578793.03dzlu"]', '1162578861.75dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578861.75dzlu"]', '1162578920.61dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578920.61dzlu"]', '1162578961.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578961.18dzlu"]', '1162578998.36dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162578998.36dzlu"]', '1162579001.46dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579001.46dzlu"]', '1162579041.9dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579041.9dzlu"]', '1162579056.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579056.73dzlu"]', '1162579058.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579058.98dzlu"]', '1162579060.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579060.73dzlu"]', '1162579199.21dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579199.21dzlu"]', '1162579331.75dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579331.75dzlu"]', '1162579341.32dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579341.32dzlu"]', '1162579346.82dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579346.82dzlu"]', '1162579382.68dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579382.68dzlu"]', '1162579401.92dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579401.92dzlu"]', '1162579450.07dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579450.07dzlu"]', '1162579477.28dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579477.28dzlu"]', '1162579495.23dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579495.23dzlu"]', '1162579496.87dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579496.87dzlu"]', '1162579552.36dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579552.36dzlu"]', '1162579651.42dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579651.42dzlu"]', '1162579990.07dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162579990.07dzlu"]', '1162580050.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162580050.34dzlu"]', '1162580134.26dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162580134.26dzlu"]', '1162580160.11dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162580160.11dzlu"]', '1162580232.92dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162580232.92dzlu"]', '1162580882.43dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162580882.43dzlu"]', '1162580923.68dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162580923.68dzlu"]', '1162581117.26dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581117.26dzlu"]', '1162581120.68dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581120.68dzlu"]', '1162581126.39dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581126.39dzlu"]', '1162581133.0dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581133.0dzlu"]', '1162581141.04dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581141.04dzlu"]', '1162581144.36dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581144.36dzlu"]', '1162581145.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581145.98dzlu"]', '1162581162.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581162.73dzlu"]', '1162581164.37dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581164.37dzlu"]', '1162581164.98dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581164.98dzlu"]', '1162581166.56dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581166.56dzlu"]', '1162581167.39dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581167.39dzlu"]', '1162581168.25dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581168.25dzlu"]', '1162581168.79dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581168.79dzlu"]', '1162581169.65dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581169.65dzlu"]', '1162581170.36dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581170.36dzlu"]', '1162581171.11dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581171.11dzlu"]', '1162581171.96dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581171.96dzlu"]', '1162581173.79dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581173.79dzlu"]', '1162581176.57dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581176.57dzlu"]', '1162581177.9dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581177.9dzlu"]', '1162581181.67dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581181.67dzlu"]', '1162581182.32dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581182.32dzlu"]', '1162581183.29dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581183.29dzlu"]', '1162581183.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581183.73dzlu"]', '1162581184.18dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581184.18dzlu"]', '1162581185.78dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581185.78dzlu"]', '1162581187.11dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581187.11dzlu"]', '1162581188.48dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581188.48dzlu"]', '1162581188.82dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581188.82dzlu"]', '1162581189.76dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581189.76dzlu"]', '1162581190.51dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581190.51dzlu"]', '1162581192.04dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581192.04dzlu"]', '1162581194.96dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581194.96dzlu"]', '1162581195.62dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581195.62dzlu"]', '1162581196.4dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581196.4dzlu"]', '1162581198.9dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581198.9dzlu"]', '1162581199.73dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581199.73dzlu"]', '1162581201.07dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581201.07dzlu"]', '1162581201.68dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581201.68dzlu"]', '1162581202.34dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581202.34dzlu"]', '1162581230.31dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581230.31dzlu"]', '1162581230.92dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581230.92dzlu"]', '1162581234.92dzlu': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162581234.92dzlu"]', '1162600301.39sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1162600301.39sdnaik"]', '1163119773.31sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1163119773.31sdnaik"]', '1163119776.08sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1163119776.08sdnaik"]', '1163130907.42sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1163130907.42sdnaik"]', '1163130908.98sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1163130908.98sdnaik"]', '1163462918.28sdnaik': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1163462918.28sdnaik"]', '1171314304.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171314304.0dxschafe"]', '1171314304.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171314304.0dxschafe"]', '1171315072.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315072.0dxschafe"]', '1171315200.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe"]', '1171315200.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe0"]', '1171315200.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe1"]', '1171315200.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe2"]', '1171315200.0dxschafe3': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe3"]', '1171315200.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe4"]', '1171315200.0dxschafe5': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe5"]', '1171315200.0dxschafe6': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe6"]', '1171315200.0dxschafe7': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe7"]', '1171315200.0dxschafe8': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe8"]', '1171315200.0dxschafe9': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe9"]', '1171315200.0dxschafe:': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe:"]', '1171315200.0dxschafe;': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe;"]', '1171315200.0dxschafe<': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe<"]', '1171315200.0dxschafe=': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315200.0dxschafe="]', '1171315712.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315712.0dxschafe"]', '1171315840.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315840.0dxschafe"]', '1171315968.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315968.0dxschafe"]', '1171315968.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171315968.0dxschafe1"]', '1171316096.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316096.0dxschafe"]', '1171316096.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316096.0dxschafe0"]', '1171316096.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316096.0dxschafe1"]', '1171316224.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe"]', '1171316224.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe0"]', '1171316224.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe1"]', '1171316224.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe2"]', '1171316224.0dxschafe3': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe3"]', '1171316224.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe4"]', '1171316224.0dxschafe5': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe5"]', '1171316224.0dxschafe6': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe6"]', '1171316352.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316352.0dxschafe"]', '1171316480.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316480.0dxschafe0"]', '1171316480.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316480.0dxschafe1"]', '1171316480.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316480.0dxschafe2"]', '1171316864.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316864.0dxschafe"]', '1171316864.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316864.0dxschafe"]', '1171316864.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316864.0dxschafe1"]', '1171316864.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316864.0dxschafe1"]', '1171317248.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171317248.0dxschafe"]', '1171317248.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171317248.0dxschafe"]', '1171317760.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171317760.0dxschafe"]', '1171317760.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171317760.0dxschafe0"]', '1171318016.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171318016.0dxschafe"]', '1171318016.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171318016.0dxschafe0"]', '1171318016.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171318016.0dxschafe1"]', '1171318016.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171318016.0dxschafe2"]', '1171318144.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171318144.0dxschafe"]', '1171318144.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171318144.0dxschafe0"]', '1171319168.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319168.0dxschafe"]', '1171319168.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319168.0dxschafe0"]', '1171319424.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319424.0dxschafe"]', '1171319424.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319424.0dxschafe0"]', '1171319424.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319424.0dxschafe1"]', '1171319424.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319424.0dxschafe2"]', '1171319552.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319552.0dxschafe0"]', '1171319680.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319680.0dxschafe"]', '1171319680.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319680.0dxschafe0"]', '1171319680.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319680.0dxschafe2"]', '1171319808.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319808.0dxschafe"]', '1171319808.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319808.0dxschafe2"]', '1171319808.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319808.0dxschafe4"]', '1171319808.0dxschafe5': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319808.0dxschafe5"]', '1171319808.0dxschafe6': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319808.0dxschafe6"]', '1171319936.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319936.0dxschafe"]', '1171319936.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319936.0dxschafe0"]', '1171319936.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319936.0dxschafe1"]', '1171319936.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319936.0dxschafe2"]', '1171319936.0dxschafe3': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319936.0dxschafe3"]', '1171319936.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171319936.0dxschafe4"]', '1171320064.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320064.0dxschafe"]', '1171320064.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320064.0dxschafe0"]', '1171320832.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320832.0dxschafe"]', '1171320832.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320832.0dxschafe0"]', '1171320832.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320832.0dxschafe1"]', '1171320832.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320832.0dxschafe2"]', '1171320832.0dxschafe3': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320832.0dxschafe3"]', '1171320832.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320832.0dxschafe4"]', '1171320960.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320960.0dxschafe"]', '1171320960.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171320960.0dxschafe0"]', '1171321088.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171321088.0dxschafe"]', '1171321088.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171321088.0dxschafe0"]', '1171321216.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171321216.0dxschafe"]', '1171321216.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171321216.0dxschafe0"]', '1171321216.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171321216.0dxschafe1"]', '1171321216.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171321216.0dxschafe2"]', '1172863796.36kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1172863796.36kmuller"]', '1172863850.45kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1172863850.45kmuller"]', '1176186151.42mike': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176186151.42mike"]', '1176258388.82kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258388.82kmuller"]', '1176258538.6kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258538.6kmuller"]', '1176258603.27kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258603.27kmuller"]', '1176258613.43kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258613.43kmuller"]', '1176258631.8kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258631.8kmuller"]', '1176258756.88kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258756.88kmuller"]', '1176258807.22kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258807.22kmuller"]', '1176258867.93kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258867.93kmuller"]', '1176258898.99kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258898.99kmuller"]', '1176258906.33kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258906.33kmuller"]', '1176258927.07kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258927.07kmuller"]', '1176258938.58kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1176258938.58kmuller"]', '1179791064.29Aholdun': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1179791064.29Aholdun"]', '1179791120.18Aholdun': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1179791120.18Aholdun"]', '1179791134.46Aholdun': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1179791134.46Aholdun"]', '1179791701.57Aholdun': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1179791701.57Aholdun"]', '1179793974.72Aholdun': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1179793974.72Aholdun"]', '1184716513.73kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184716513.73kmuller"]', '1184716531.9kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184716531.9kmuller"]', '1184716542.28kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184716542.28kmuller"]', '1184717296.78kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717296.78kmuller"]', '1184717358.28kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717358.28kmuller"]', '1184717384.58kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717384.58kmuller"]', '1184717452.25kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717452.25kmuller"]', '1184717774.17kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717774.17kmuller"]', '1184717903.14kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717903.14kmuller"]', '1184717982.65kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184717982.65kmuller"]', '1184718346.58kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184718346.58kmuller"]', '1184718408.0kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184718408.0kmuller"]', '1184718756.09kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184718756.09kmuller"]', '1184718783.67kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184718783.67kmuller"]', '1184718841.62kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316224.0dxschafe2"]["Objects"]["1184718841.62kmuller"]', '1184718870.54kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184718870.54kmuller"]', '1184718946.59kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184718946.59kmuller"]', '1184719009.84kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184719009.84kmuller"]', '1184719101.83kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184719101.83kmuller"]', '1184719164.21kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184719164.21kmuller"]', '1184719190.71kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184719190.71kmuller"]', '1184719277.87kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184719277.87kmuller"]', '1184719296.98kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184719296.98kmuller"]', '1184720985.21kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184720985.21kmuller"]', '1184721040.78kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721040.78kmuller"]', '1184721161.87kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721161.87kmuller"]', '1184721215.28kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721215.28kmuller"]', '1184721233.95kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721233.95kmuller"]', '1184721291.89kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721291.89kmuller"]', '1184721406.87kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721406.87kmuller"]', '1184721426.18kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721426.18kmuller"]', '1184721812.36kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721812.36kmuller"]', '1184721823.17kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721823.17kmuller"]', '1184721880.11kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721880.11kmuller"]', '1184721907.79kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721907.79kmuller"]', '1184721953.51kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721953.51kmuller"]', '1184721971.46kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184721971.46kmuller"]', '1184722024.71kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184722024.71kmuller"]', '1184722304.54kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184722304.54kmuller"]', '1184891648.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184891648.0dxschafe"]', '1184891776.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184891776.0dxschafe0"]', '1184891776.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1184891776.0dxschafe1"]', '1185921614.52kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1185921614.52kmuller"]', '1186006891.46kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1186006891.46kmuller"]', '1186007092.14kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1186007092.14kmuller"]', '1186007187.37kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1186007187.37kmuller"]', '1186007215.54kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1186007215.54kmuller"]', '1186007267.03kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1186007267.03kmuller"]', '1186007415.7kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1186007415.7kmuller"]', '1187913949.14akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187913949.14akelts"]', '1187914011.44akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914011.44akelts"]', '1187914045.25akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914045.25akelts"]', '1187914073.11akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914073.11akelts"]', '1187914104.39akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914104.39akelts"]', '1187914121.33akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914121.33akelts"]', '1187914162.75akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914162.75akelts"]', '1187914199.86akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914199.86akelts"]', '1187914236.7akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914236.7akelts"]', '1187914264.97akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914264.97akelts"]', '1187914386.67akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914386.67akelts"]', '1187914411.34akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914411.34akelts"]', '1187914475.81akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914475.81akelts"]', '1187914641.95akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914641.95akelts"]', '1187914830.53akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914830.53akelts"]', '1187914874.69akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187914874.69akelts"]', '1187993555.97akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187993555.97akelts"]', '1187993700.22akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187993700.22akelts"]', '1187995354.27akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1187995354.27akelts"]', '1189212260.31kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189212260.31kmuller"]', '1189212260.31kmuller0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189212260.31kmuller"]', '1189456314.77kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189212260.31kmuller"]["Objects"]["1189456314.77kmuller"]', '1189456366.97kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189456366.97kmuller"]', '1189456447.08kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189212260.31kmuller"]["Objects"]["1189456447.08kmuller"]', '1190666496.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1190666496.0dxschafe"]', '1190666880.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1190666880.0dxschafe"]', '1190741504.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1190741504.0dxschafe"]', '1190741504.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1190741504.0dxschafe"]', '1191629336.42kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629336.42kmuller"]', '1191629553.64kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629553.64kmuller"]', '1191629599.67kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629599.67kmuller"]', '1191629616.42kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629616.42kmuller"]', '1191629698.66kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629698.66kmuller"]', '1191629817.2kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629817.2kmuller"]', '1191629838.92kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629838.92kmuller"]', '1191629854.09kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629854.09kmuller"]', '1191629933.37kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629933.37kmuller"]', '1191629959.37kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629959.37kmuller"]', '1191629982.17kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191629982.17kmuller"]', '1191630016.62kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1191630016.62kmuller"]', '1192043971.0kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192043971.0kmuller"]', '1192044061.55kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192044061.55kmuller"]', '1192044102.02kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192044102.02kmuller"]', '1192228480.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228480.0dxschafe"]', '1192228608.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe"]', '1192228608.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe0"]', '1192228608.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe1"]', '1192228608.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe2"]', '1192228608.0dxschafe3': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe3"]', '1192228608.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe4"]', '1192228608.0dxschafe5': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe5"]', '1192228608.0dxschafe6': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe6"]', '1192228608.0dxschafe7': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe7"]', '1192228608.0dxschafe8': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228608.0dxschafe8"]', '1192228736.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe"]', '1192228736.0dxschafe0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe0"]', '1192228736.0dxschafe1': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe1"]', '1192228736.0dxschafe2': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe2"]', '1192228736.0dxschafe3': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe3"]', '1192228736.0dxschafe4': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe4"]', '1192228736.0dxschafe5': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192228736.0dxschafe5"]', '1192733824.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192733824.0dxschafe"]', '1192733952.0dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192733952.0dxschafe"]', '1192836222.09kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1192836222.09kmuller"]', '1201041675.97dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1190741504.0dxschafe"]["Objects"]["1201041675.97dxschafe"]', '1201041677.36dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1190741504.0dxschafe"]["Objects"]["1201041677.36dxschafe"]', '1201041677.5dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316864.0dxschafe"]["Objects"]["1201041677.5dxschafe"]', '1201041678.38dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171314304.0dxschafe"]["Objects"]["1201041678.38dxschafe"]', '1201041678.91dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1171316864.0dxschafe1"]["Objects"]["1201041678.91dxschafe"]', '1201041679.88dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1201041679.88dxschafe"]', '1201041679.89dxschafe': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1201041679.89dxschafe"]', '1210704118.17kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1210704118.17kmuller"]', '1210704165.86kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1210704165.86kmuller"]', '1241909300.25ian': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1241909300.25ian"]', '1241909665.5ian': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1241909665.5ian"]', '1242332258.36kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332258.36kmuller"]', '1242332511.27kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332511.27kmuller"]', '1242332757.48kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332757.48kmuller"]', '1242332822.32kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332822.32kmuller"]', '1242332871.57kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332871.57kmuller"]', '1242332937.68kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332937.68kmuller"]', '1242332966.9kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1242332966.9kmuller"]', '1248385792.0jloehrle': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1248385792.0jloehrle"]', '1248385792.0jloehrle0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1248385792.0jloehrle0"]', '1251247369.96caoconno': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189212260.31kmuller"]["Objects"]["1251247369.96caoconno"]', '1251247425.66caoconno': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1189212260.31kmuller"]["Objects"]["1251247425.66caoconno"]', '1257284346.42caoconno': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1257284346.42caoconno"]', '1257284362.29caoconno': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1257284362.29caoconno"]', '1257284384.94caoconno': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1257284384.94caoconno"]', '1267728993.08Jared': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]', '1269464043.62akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464043.62akelts"]', '1269464058.34akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464058.34akelts"]', '1269464073.87akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464073.87akelts"]', '1269464088.19akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464088.19akelts"]', '1269464139.18akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464139.18akelts"]', '1269464174.37akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464174.37akelts"]', '1269464413.98akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464413.98akelts"]', '1269464456.65akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1267728993.08Jared"]["Objects"]["1269464456.65akelts"]', '1270764606.85akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1270764606.85akelts"]', '1270764673.88akelts': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1270764673.88akelts"]', '1286984549.68gcarranza': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1286984549.68gcarranza"]', '1287611070.99kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1287611070.99kmuller"]', '1287611070.99kmuller0': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1287611070.99kmuller"]', '1287611234.14kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1287611070.99kmuller"]["Objects"]["1287611234.14kmuller"]', '1287612604.35kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1287612604.35kmuller"]', '1287612652.97kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1287611070.99kmuller"]["Objects"]["1287612652.97kmuller"]', '1287612731.53kmuller': '["Objects"]["1160614528.73sdnaik"]["Objects"]["1287612731.53kmuller"]'}} extraInfo = {'camPos': Point3(-122.569, -547.187, 17.3722), 'camHpr': VBase3(76.7509, -0.849717, 0), 'focalLength': 0.657999992371, 'skyState': 2, 'fog': 0}
31,032.285714
216,785
0.666099
29,412
217,226
4.858391
0.073303
0.020253
0.019126
0.015536
0.70761
0.577508
0.552035
0.48896
0.430743
0.420428
0
0.276275
0.070484
217,226
7
216,786
31,032.285714
0.431424
0.000994
0
0
0
0
0.544063
0.272877
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
6
03f31a2a63dceed013a3bf2dd7cfcd908654b692
48
py
Python
rmp2/rmpgraph/__init__.py
UWRobotLearning/rmp2
c612a014f517204b38c552619a441be4b3d7b67f
[ "MIT" ]
17
2021-07-05T19:53:27.000Z
2022-03-28T18:10:20.000Z
rmp2/rmpgraph/__init__.py
UWRobotLearning/rmp2
c612a014f517204b38c552619a441be4b3d7b67f
[ "MIT" ]
null
null
null
rmp2/rmpgraph/__init__.py
UWRobotLearning/rmp2
c612a014f517204b38c552619a441be4b3d7b67f
[ "MIT" ]
2
2022-03-15T01:13:27.000Z
2022-03-21T08:30:54.000Z
from rmp2.rmpgraph.robotics import RobotRMPGraph
48
48
0.895833
6
48
7.166667
1
0
0
0
0
0
0
0
0
0
0
0.022222
0.0625
48
1
48
48
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ff1a0432ebfc110c3ff64a1bfb40a9d6b66b4a53
157
py
Python
pyz3r/exceptions.py
mgius/pyz3r
f6de06db25a06353b73e9ef7003c80de7073373d
[ "Apache-2.0" ]
null
null
null
pyz3r/exceptions.py
mgius/pyz3r
f6de06db25a06353b73e9ef7003c80de7073373d
[ "Apache-2.0" ]
null
null
null
pyz3r/exceptions.py
mgius/pyz3r
f6de06db25a06353b73e9ef7003c80de7073373d
[ "Apache-2.0" ]
null
null
null
class alttprException(Exception): pass class alttprFailedToRetrieve(Exception): pass class alttprFailedToGenerate(Exception): pass
14.272727
41
0.719745
12
157
9.416667
0.5
0.345133
0.318584
0
0
0
0
0
0
0
0
0
0.22293
157
10
42
15.7
0.92623
0
0
0.5
1
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
6
2082afade3820d1cb8855f41bc4382f224e85fa9
200
py
Python
rest_framework_social_oauth2/settings.py
hrahmadi71/django-rest-framework-social-oauth2
f9de220606bd08981b9d81ab80dd69d70ceb1988
[ "MIT" ]
613
2018-03-31T01:59:00.000Z
2022-03-19T14:40:42.000Z
rest_framework_social_oauth2/settings.py
hrahmadi71/django-rest-framework-social-oauth2
f9de220606bd08981b9d81ab80dd69d70ceb1988
[ "MIT" ]
132
2015-04-08T17:31:55.000Z
2018-03-15T13:32:06.000Z
rest_framework_social_oauth2/settings.py
hrahmadi71/django-rest-framework-social-oauth2
f9de220606bd08981b9d81ab80dd69d70ceb1988
[ "MIT" ]
118
2018-03-29T02:47:23.000Z
2022-02-17T12:14:07.000Z
from django.conf import settings DRFSO2_PROPRIETARY_BACKEND_NAME = getattr(settings, 'DRFSO2_PROPRIETARY_BACKEND_NAME', "Django") DRFSO2_URL_NAMESPACE = getattr(settings, 'DRFSO2_URL_NAMESPACE', "")
40
96
0.83
24
200
6.5
0.5
0.269231
0.320513
0.410256
0.461538
0
0
0
0
0
0
0.021622
0.075
200
4
97
50
0.821622
0
0
0
0
0
0.285
0.155
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
6
20a44fcf51e45dd5f7265e5493d7dc9c9faccbd3
48
py
Python
mltools/train/__init__.py
msc5/ml-tools
75ca504bdc0495e8a929ad73501b7de692b3089a
[ "Apache-2.0" ]
null
null
null
mltools/train/__init__.py
msc5/ml-tools
75ca504bdc0495e8a929ad73501b7de692b3089a
[ "Apache-2.0" ]
null
null
null
mltools/train/__init__.py
msc5/ml-tools
75ca504bdc0495e8a929ad73501b7de692b3089a
[ "Apache-2.0" ]
null
null
null
from .train import * from .logger import Logger
16
26
0.770833
7
48
5.285714
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.166667
48
2
27
24
0.925
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
20b1f95c01cfbfd10bb97b6e92d962f1bcbd59c0
3,992
py
Python
etf_data_loader.py
xSakix/etf_data
b622064fd4c8e1c2e1d477a2731f51ff1cb08e4d
[ "Apache-2.0" ]
null
null
null
etf_data_loader.py
xSakix/etf_data
b622064fd4c8e1c2e1d477a2731f51ff1cb08e4d
[ "Apache-2.0" ]
null
null
null
etf_data_loader.py
xSakix/etf_data
b622064fd4c8e1c2e1d477a2731f51ff1cb08e4d
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np import os import sys def load_data(assets, start_date, end_date): df_open = load_data_from_file('etf_data_open.csv', assets, start_date, end_date) df_close = load_data_from_file('etf_data_close.csv', assets, start_date, end_date) df_high = load_data_from_file('etf_data_high.csv', assets, start_date, end_date) df_low = load_data_from_file('etf_data_low.csv', assets, start_date, end_date) df_adj_close = load_data_from_file('etf_data_adj_close.csv', assets, start_date, end_date) return df_open, df_close, df_high, df_low, df_adj_close def load_data_from_file(file, assets, start_date, end_date): if not os.path.isfile(file): file = '../etf_data/' + file if not os.path.isfile(file): file = '../../etf_data/' + file if not os.path.isfile(file): file = '../../../etf_data/' + file print('Loading file ',file) df = pd.read_csv(file) df = df.loc[df.Date > start_date] df = df.loc[df.Date < end_date] df = df[assets] indexes = [] for key in df.keys(): for i in df[key].index: val = df[key][i] try: if np.isnan(val) and not indexes.__contains__(i): indexes.append(i) except TypeError: if not indexes.__contains__(i): indexes.append(i) df.drop(indexes, inplace=True) return df def load_data_from_file2(file, assets, start_date, end_date): if not os.path.isfile(file): file = '../etf_data/' + file if not os.path.isfile(file): file = '../../etf_data/' + file if not os.path.isfile(file): file = '../../../etf_data/' + file print('Loading file ',file) df = pd.read_csv(file) df = df.loc[df.date > start_date] df = df.loc[df.date < end_date] df = df[assets] indexes = [] for key in df.keys(): for i in df[key].index: val = df[key][i] try: if np.isnan(val) and not indexes.__contains__(i): indexes.append(i) except TypeError: if not indexes.__contains__(i): indexes.append(i) df.drop(indexes, inplace=True) return df def load_all_data_from_file(file, start_date, end_date): if not os.path.isfile(file): file = '../etf_data/' + file if not os.path.isfile(file): file = '../' + file if not os.path.isfile(file): file = '../' + file print('Loading file ',file) df = pd.read_csv(file) df = df.loc[df.Date > start_date] df = df.loc[df.Date < end_date] # indexes = [] # # for key in df.keys(): # for i in df[key].index: # val = df[key][i] # try: # if np.isnan(val) and not indexes.__contains__(i): # indexes.append(i) # except TypeError: # if not indexes.__contains__(i): # indexes.append(i) # df.drop(indexes, inplace=True) return df def load_all_data_from_file2(file, start_date, end_date): if not os.path.isfile(file): file = '../etf_data/' + file if not os.path.isfile(file): file = '../' + file if not os.path.isfile(file): file = '../' + file print('Loading file ',file) df = pd.read_csv(file) df = df.loc[df.date > start_date] df = df.loc[df.date < end_date] return df def load_all_data(start_date, end_date): df_open = load_all_data_from_file('etf_data_open.csv', start_date, end_date) df_close = load_all_data_from_file('etf_data_close.csv', start_date, end_date) df_high = load_all_data_from_file('etf_data_high.csv', start_date, end_date) df_low = load_all_data_from_file('etf_data_low.csv', start_date, end_date) df_adj_close = load_all_data_from_file('etf_data_adj_close.csv', start_date, end_date) return df_open, df_close, df_high, df_low, df_adj_close
29.57037
94
0.600952
600
3,992
3.708333
0.09
0.079101
0.098876
0.115056
0.956854
0.955056
0.942472
0.750562
0.681348
0.681348
0
0.000686
0.26979
3,992
134
95
29.791045
0.762607
0.082916
0
0.777778
0
0
0.098136
0.012061
0
0
0
0
0
1
0.066667
false
0
0.044444
0
0.177778
0.044444
0
0
0
null
0
0
0
1
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
6
20bf7567661d1841f7671da7c9253c4e59abf9f8
48
py
Python
gen_util/__init__.py
CUrW-SL/DSS-Framework
43a39b322ffb0eb92dd116e77cf9a8479357a121
[ "MIT" ]
null
null
null
gen_util/__init__.py
CUrW-SL/DSS-Framework
43a39b322ffb0eb92dd116e77cf9a8479357a121
[ "MIT" ]
null
null
null
gen_util/__init__.py
CUrW-SL/DSS-Framework
43a39b322ffb0eb92dd116e77cf9a8479357a121
[ "MIT" ]
null
null
null
from .controller_util import get_triggering_dags
48
48
0.916667
7
48
5.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.0625
48
1
48
48
0.911111
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
20e3e3987464531bc5bd471dbee340a002da3c03
45
py
Python
networks/std/__init__.py
Chappie733/MLPack
223b142ff22dc35b9122183435afdc473a2c0b47
[ "MIT" ]
null
null
null
networks/std/__init__.py
Chappie733/MLPack
223b142ff22dc35b9122183435afdc473a2c0b47
[ "MIT" ]
null
null
null
networks/std/__init__.py
Chappie733/MLPack
223b142ff22dc35b9122183435afdc473a2c0b47
[ "MIT" ]
null
null
null
from .layers import * from .network import *
15
22
0.733333
6
45
5.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.177778
45
2
23
22.5
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
457c9e761df0197d87df1e4c38c0d31c4acad3b3
46
py
Python
je_auto_control/utils/exception/__init__.py
JE-Chen/Python_JEAutoControl
477bf9612e28e9ab6d0a8e269db2f699e50a3744
[ "MIT" ]
9
2020-10-12T06:33:36.000Z
2021-09-13T07:07:36.000Z
je_auto_control/utils/exception/__init__.py
JE-Chen/Python_JEAutoControl
477bf9612e28e9ab6d0a8e269db2f699e50a3744
[ "MIT" ]
null
null
null
je_auto_control/utils/exception/__init__.py
JE-Chen/Python_JEAutoControl
477bf9612e28e9ab6d0a8e269db2f699e50a3744
[ "MIT" ]
null
null
null
from je_auto_control.utils.exception import *
23
45
0.847826
7
46
5.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.086957
46
1
46
46
0.880952
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
45940e2e0c52d01e63ad0d9f207ac4852d537161
4,664
py
Python
tests/test_losses.py
p768lwy3/torecsys
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
[ "MIT" ]
92
2019-08-15T11:03:50.000Z
2022-03-12T01:21:05.000Z
tests/test_losses.py
p768lwy3/torecsys
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
[ "MIT" ]
3
2020-03-11T08:57:50.000Z
2021-01-06T01:39:47.000Z
tests/test_losses.py
p768lwy3/torecsys
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
[ "MIT" ]
16
2019-10-12T11:28:53.000Z
2022-03-28T14:04:12.000Z
import unittest import torch from parameterized import parameterized from torecsys.losses import * device = 'cuda:0' if torch.cuda.is_available() else 'cpu' class AdaptiveHingeLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32,), (16, 16,), (32, 4,), ]) def test_forward(self, batch_size: int, num_neg: int): criterion = AdaptiveHingeLoss() criterion = criterion.to(device) pos_out = torch.rand(batch_size, 1) neg_out = torch.rand(batch_size, num_neg) mask = torch.randint(0, 1, (batch_size,)) mask = mask == 1 loss = criterion(pos_out, neg_out, mask) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') class BayesianPersonalizedRankingLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32,), (16, 16,), (32, 4,), ]) def test_forward(self, batch_size: int, num_neg: int): criterion = BayesianPersonalizedRankingLoss(reduction='sum') criterion = criterion.to(device) pos_out = torch.rand(batch_size, 1) neg_out = torch.rand(batch_size, num_neg) mask = torch.randint(0, 1, (batch_size,)) mask = mask == 1 loss = criterion(pos_out, neg_out, mask) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') class HingeLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32,), (16, 16,), (32, 4,), ]) def test_forward(self, batch_size: int, num_neg: int): criterion = HingeLoss() criterion = criterion.to(device) pos_out = torch.rand(batch_size, 1) neg_out = torch.rand(batch_size, num_neg) mask = torch.randint(0, 1, (batch_size,)) mask = mask == 1 loss = criterion(pos_out, neg_out, mask) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') class ListnetLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32,), (16, 16,), (32, 4,), ]) def test_forward(self, batch_size: int, length: int): criterion = ListnetLoss() criterion = criterion.to(device) y_hat = torch.rand(batch_size, length) y_true = torch.rand(batch_size, length) mask = torch.randint(0, 1, (batch_size,)) mask = mask == 1 loss = criterion(y_hat, y_true, mask) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') class PointwiseLogisticLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32,), (16, 16,), (32, 4,), ]) def test_forward(self, batch_size: int, num_neg: int): criterion = PointwiseLogisticLoss() criterion = criterion.to(device) pos_out = torch.rand(batch_size, 1) neg_out = torch.rand(batch_size, num_neg) mask = torch.randint(0, 1, (batch_size,)) mask = mask == 1 loss = criterion(pos_out, neg_out, mask) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') class SkipGramLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32, 32,), (16, 64, 16,), (32, 128, 4,), ]) def test_forward(self, batch_size: int, embed_size: int, num_neg: int): criterion = SkipGramLoss() criterion = criterion.to(device) content_inp = torch.rand(batch_size, 1, embed_size) pos_inp = torch.rand(batch_size, 1, embed_size) neg_inp = torch.rand(batch_size, num_neg, embed_size) loss = criterion(content_inp, pos_inp, neg_inp) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') class TripletLossTestCase(unittest.TestCase): @parameterized.expand([ (4, 32, 32,), (16, 64, 16,), (32, 128, 4,), ]) def test_forward(self, batch_size: int, embed_size: int, num_neg: int): criterion = TripletLoss(margin=1.0, reduction='sum') criterion = criterion.to(device) pos_out = torch.rand(batch_size, 1) neg_out = torch.rand(batch_size, num_neg) mask = torch.randint(0, 1, (batch_size,)) mask = mask == 1 loss = criterion(pos_out, neg_out, mask) self.assertEqual(loss.size(), torch.Size([])) print(f'Loss Size: {loss.size()}; Loss: {loss.item()}') if __name__ == '__main__': unittest.main()
30.684211
75
0.596698
573
4,664
4.69808
0.123909
0.093611
0.078009
0.100297
0.782689
0.763744
0.754829
0.754829
0.731798
0.731798
0
0.032156
0.253216
4,664
151
76
30.887417
0.740741
0
0
0.754237
0
0
0.07247
0
0
0
0
0
0.059322
1
0.059322
false
0
0.033898
0
0.152542
0.059322
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b3088829bd55a0d983de8c705f56417ea4a54ac3
46
py
Python
graphgallery/gallery/linkpred/pyg/__init__.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
300
2020-08-09T04:27:41.000Z
2022-03-30T07:43:41.000Z
graphgallery/gallery/linkpred/pyg/__init__.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
5
2020-11-05T06:16:50.000Z
2021-12-11T05:05:22.000Z
graphgallery/gallery/linkpred/pytorch/__init__.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
51
2020-09-23T15:37:12.000Z
2022-03-05T01:28:56.000Z
from .gae import GAE from .vgae import VGAE
15.333333
23
0.73913
8
46
4.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0.217391
46
2
24
23
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
b31df60e00166612398f3b8eb16174c35e86d989
42,680
py
Python
competition/scenarios.py
xfuzzycomp/FuzzyChallenge2021
5876450fdb913c6707352bfe9fcc25748f041f52
[ "MIT" ]
null
null
null
competition/scenarios.py
xfuzzycomp/FuzzyChallenge2021
5876450fdb913c6707352bfe9fcc25748f041f52
[ "MIT" ]
null
null
null
competition/scenarios.py
xfuzzycomp/FuzzyChallenge2021
5876450fdb913c6707352bfe9fcc25748f041f52
[ "MIT" ]
null
null
null
from fuzzy_asteroids.util import Scenario import numpy as np # "Simple" Scenarios --------------------------------------------------------------------------------------------------# # Threat priority tests threat_test_1 = Scenario( name="threat_test_1", asteroid_states=[{"position": (0, 300), "angle": -90.0, "speed": 40}, {"position": (700, 300), "angle": 0.0, "speed": 0}, ], ship_state={"position": (600, 300)}, seed=0 ) threat_test_2 = Scenario( name="threat_test_2", asteroid_states=[{"position": (800, 300), "angle": 90.0, "speed": 40}, {"position": (100, 300), "angle": 0.0, "speed": 0}, ], ship_state={"position": (200, 300)}, seed=0 ) threat_test_3 = Scenario( name="threat_test_3", asteroid_states=[{"position": (400, 0), "angle": 0.0, "speed": 40}, {"position": (400, 550), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 450)}, seed=0 ) threat_test_4 = Scenario( name="threat_test_4", asteroid_states=[{"position": (400, 600), "angle": 180.0, "speed": 40}, {"position": (400, 50), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 150)}, seed=0 ) # Accuracy tests accuracy_test_1 = Scenario( name="accuracy_test_1", asteroid_states=[{"position": (400, 500), "angle": 90.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100)}, seed=0 ) accuracy_test_2 = Scenario( name="accuracy_test_2", asteroid_states=[{"position": (400, 500), "angle": -90.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100)}, seed=0 ) accuracy_test_3 = Scenario( name="accuracy_test_3", asteroid_states=[{"position": (100, 100), "angle": 0.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100)}, seed=0 ) accuracy_test_4 = Scenario( name="accuracy_test_4", asteroid_states=[{"position": (700, 100), "angle": 0.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100)}, seed=0 ) accuracy_test_5 = Scenario( name="accuracy_test_5", asteroid_states=[{"position": (100, 500), "angle": 180.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100)}, seed=0 ) accuracy_test_6 = Scenario( name="accuracy_test_6", asteroid_states=[{"position": (700, 500), "angle": 180.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100)}, seed=0 ) accuracy_test_7 = Scenario( name="accuracy_test_7", asteroid_states=[{"position": (400, 500), "angle": 180.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100), "angle": 90.0}, seed=0 ) accuracy_test_8 = Scenario( name="accuracy_test_8", asteroid_states=[{"position": (400, 500), "angle": 180.0, "speed": 120, "size": 1}, ], ship_state={"position": (400, 100), "angle": -90.0}, seed=0 ) accuracy_test_9 = Scenario( name="accuracy_test_9", asteroid_states=[{"position": (100, 500), "angle": -135.0, "speed": 120, "size": 1}, ], ship_state={"position": (700, 100), "angle": -90.0}, seed=0 ) accuracy_test_10 = Scenario( name="accuracy_test_10", asteroid_states=[{"position": (700, 500), "angle": 135.0, "speed": 120, "size": 1}, ], ship_state={"position": (100, 100), "angle": 90.0}, seed=0 ) # "Easy" wall scenario with default ship state, starts on left and moves right wall_left_easy = Scenario( name="wall_left_easy", asteroid_states=[{"position": (0, 100), "angle": -90.0, "speed": 60}, {"position": (0, 200), "angle": -90.0, "speed": 60}, {"position": (0, 300), "angle": -90.0, "speed": 60}, {"position": (0, 400), "angle": -90.0, "speed": 60}, {"position": (0, 500), "angle": -90.0, "speed": 60}, ], ship_state={"position": (400, 300)}, seed=0 ) # "Easy" wall scenario with default ship state, starts on right and moves left wall_right_easy = Scenario( name="wall_right_easy", asteroid_states=[{"position": (800, 100), "angle": 90.0, "speed": 60}, {"position": (800, 200), "angle": 90.0, "speed": 60}, {"position": (800, 300), "angle": 90.0, "speed": 60}, {"position": (800, 400), "angle": 90.0, "speed": 60}, {"position": (800, 500), "angle": 90.0, "speed": 60}, ], ship_state={"position": (400, 300)}, seed=0 ) # "Easy" wall scenario with default ship state, starts at the top and moves downward wall_top_easy = Scenario( name="wall_top_easy", asteroid_states=[{"position": (100, 600), "angle": 180.0, "speed": 60}, {"position": (200, 600), "angle": 180.0, "speed": 60}, {"position": (300, 600), "angle": 180.0, "speed": 60}, {"position": (400, 600), "angle": 180.0, "speed": 60}, {"position": (500, 600), "angle": 180.0, "speed": 60}, {"position": (600, 600), "angle": 180.0, "speed": 60}, {"position": (700, 600), "angle": 180.0, "speed": 60}, ], ship_state={"position": (400, 300)}, seed=0 ) # "Easy" wall scenario with default ship state, starts at the top and moves downward wall_bottom_easy = Scenario( name="wall_bottom_easy", asteroid_states=[{"position": (100, 0), "angle": 0.0, "speed": 60}, {"position": (200, 0), "angle": 0.0, "speed": 60}, {"position": (300, 0), "angle": 0.0, "speed": 60}, {"position": (400, 0), "angle": 0.0, "speed": 60}, {"position": (500, 0), "angle": 0.0, "speed": 60}, {"position": (600, 0), "angle": 0.0, "speed": 60}, {"position": (700, 0), "angle": 0.0, "speed": 60}, ], ship_state={"position": (400, 300)}, seed=0 ) # Ring scenarios ------------------------------------------------------------------------------------------------------# # Scenario where a ring of asteroids close in on the vehicle # calculating initial states R = 300 theta = np.linspace(0, 2 * np.pi, 17)[:-1] ast_x = [R * np.cos(angle) + 400 for angle in theta] ast_y = [R * np.sin(angle) + 300 for angle in theta] init_angle = [90 + val * 180 / np.pi for val in theta] ast_states = [] for ii in range(len(init_angle)): ast_states.append({"position": (ast_x[ii], ast_y[ii]), "angle": init_angle[ii], "speed": 30}) ring_closing = Scenario( name="ring_closing", asteroid_states=ast_states, ship_state={"position": (400, 300)}, seed=0 ) # Static ring scenarios # Static ring left R = 150 theta = np.linspace(0, 2 * np.pi, 17)[1:-2] ast_x = [R * np.cos(angle + np.pi) + 400 for angle in theta] ast_y = [R * np.sin(angle + np.pi) + 300 for angle in theta] init_angle = [90 + val * 180 / np.pi for val in theta] ast_states = [] for ii in range(len(init_angle)): ast_states.append({"position": (ast_x[ii], ast_y[ii]), "angle": init_angle[ii], "speed": 0}) ring_static_left = Scenario( name="ring_static_left", asteroid_states=ast_states, ship_state={"position": (400, 300)}, seed=0 ) # Static ring right R = 150 theta = np.linspace(0, 2 * np.pi, 17)[1:-2] ast_x = [R * np.cos(angle) + 400 for angle in theta] ast_y = [R * np.sin(angle) + 300 for angle in theta] init_angle = [90 + val * 180 / np.pi for val in theta] ast_states = [] for ii in range(len(init_angle)): ast_states.append({"position": (ast_x[ii], ast_y[ii]), "angle": init_angle[ii], "speed": 0}) ring_static_right = Scenario( name="ring_static_right", asteroid_states=ast_states, ship_state={"position": (400, 300)}, seed=0 ) # Static ring top R = 150 theta = np.linspace(0, 2 * np.pi, 17)[1:-2] ast_x = [R * np.cos(angle + np.pi / 2) + 400 for angle in theta] ast_y = [R * np.sin(angle + np.pi / 2) + 300 for angle in theta] init_angle = [90 + val * 180 / np.pi for val in theta] ast_states = [] for ii in range(len(init_angle)): ast_states.append({"position": (ast_x[ii], ast_y[ii]), "angle": init_angle[ii], "speed": 0}) ring_static_top = Scenario( name="ring_static_top", asteroid_states=ast_states, ship_state={"position": (400, 300)}, seed=0 ) # Static ring bottom R = 150 theta = np.linspace(0, 2 * np.pi, 17)[1:-2] ast_x = [R * np.cos(angle + 3 * np.pi / 2) + 400 for angle in theta] ast_y = [R * np.sin(angle + 3 * np.pi / 2) + 300 for angle in theta] init_angle = [90 + val * 180 / np.pi for val in theta] ast_states = [] for ii in range(len(init_angle)): ast_states.append({"position": (ast_x[ii], ast_y[ii]), "angle": init_angle[ii], "speed": 0}) ring_static_bottom = Scenario( name="ring_static_bottom", asteroid_states=ast_states, ship_state={"position": (400, 300)}, seed=0 ) # ---------------------------------------------------------------------------------------------------------------------# # Normal corridor scenarios -------------------------------------------------------------------------------------------# # Scenario where ship is in a corridor and forced to shoot its way through # calculating corridor states num_x = 17 num_y = 10 x = np.linspace(0, 800, num_x) y = np.concatenate((np.linspace(0, 200, int(num_y / 2)), np.linspace(400, 600, int(num_y / 2)))) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": 0.0, "speed": 0}) # calculate wall asteroid states ast_states.append({"position": (50, 266), "angle": -90.0, "speed": 0}) ast_states.append({"position": (50, 332), "angle": -90.0, "speed": 0}) corridor_left = Scenario( name="corridor_left", asteroid_states=ast_states, ship_state={"position": (700, 300)}, seed=0 ) # calculate wall asteroid states ast_states = ast_states[:-2] ast_states.append({"position": (800, 266), "angle": 90.0, "speed": 20}) ast_states.append({"position": (800, 332), "angle": 90.0, "speed": 20}) corridor_right = Scenario( name="corridor_right", asteroid_states=ast_states, ship_state={"position": (100, 300)}, seed=0 ) # Corridor top scenario num_x = 14 num_y = 13 x = np.concatenate((np.linspace(0, 300, int(num_x / 2)), np.linspace(500, 800, int(num_x / 2)))) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": 0.0, "speed": 0}) # calculate wall asteroid states ast_states.append({"position": (366, 600), "angle": 180.0, "speed": 20}) ast_states.append({"position": (432, 600), "angle": 180.0, "speed": 20}) corridor_top = Scenario( name="corridor_top", asteroid_states=ast_states, ship_state={"position": (400, 100)}, seed=0 ) # Corridor bottom scenario # calculate wall asteroid states ast_states = ast_states[:-2] ast_states.append({"position": (366, 0), "angle": 0.0, "speed": 20}) ast_states.append({"position": (432, 0), "angle": 0.0, "speed": 20}) corridor_bottom = Scenario( name="corridor_bottom", asteroid_states=ast_states, ship_state={"position": (400, 500)}, seed=0 ) # ---------------------------------------------------------------------------------------------------------------------# # Moving Corridor Scenarios -------------------------------------------------------------------------------------------# # Corridor moving right # calculating corridor states num_x = 17 num_y = 10 x = np.linspace(0, 800, num_x) y = np.concatenate((np.linspace(0, 200, int(num_y / 2)), np.linspace(400, 600, int(num_y / 2)))) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": -90.0, "speed": 120}) moving_corridor_1 = Scenario( name="moving_corridor_1", asteroid_states=ast_states, ship_state={"position": (400, 300), "angle": 90}, seed=0 ) # Corridor moving left # calculating corridor states num_x = 17 num_y = 10 x = np.linspace(0, 800, num_x) y = np.concatenate((np.linspace(0, 200, int(num_y / 2)), np.linspace(400, 600, int(num_y / 2)))) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": 90.0, "speed": 120}) moving_corridor_2 = Scenario( name="moving_corridor_2", asteroid_states=ast_states, ship_state={"position": (400, 300), "angle": -90}, seed=0 ) # Corridor moving down # calculating corridor states num_x = 14 num_y = 13 x = np.concatenate((np.linspace(0, 300, int(num_x / 2)), np.linspace(500, 800, int(num_x / 2)))) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": 180.0, "speed": 120}) moving_corridor_3 = Scenario( name="moving_corridor_3", asteroid_states=ast_states, ship_state={"position": (400, 300), "angle": 0}, seed=0 ) # Corridor moving up # calculating corridor states num_x = 14 num_y = 13 x = np.concatenate((np.linspace(0, 300, int(num_x / 2)), np.linspace(500, 800, int(num_x / 2)))) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": 0.0, "speed": 120}) moving_corridor_4 = Scenario( name="moving_corridor_4", asteroid_states=ast_states, ship_state={"position": (400, 300), "angle": 180}, seed=0 ) # Angled corridor scenario 1 # calculating corridor states num_x = 17 num_y = 13 x = np.linspace(0, 800, num_x) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): if not (abs(1.5 * ast_x[ii, jj] - ast_y[ii, jj]) <= 160) and not ( abs(-1.5 * ast_x[ii, jj] + 1200 - ast_y[ii, jj]) <= 160): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": -90.0, "speed": 30}) moving_corridor_angled_1 = Scenario( name="moving_corridor_angled_1", asteroid_states=ast_states, ship_state={"position": (750, 50), "angle": 90}, seed=0 ) # Angled corridor scenario 2 # calculating corridor states num_x = 17 num_y = 13 x = np.linspace(0, 800, num_x) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): if not (abs(-1.5 * ast_x[ii, jj] + 600 - ast_y[ii, jj]) <= 160) and not ( abs(1.5 * ast_x[ii, jj] - 600 - ast_y[ii, jj]) <= 160): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": -90.0, "speed": 30}) moving_corridor_angled_2 = Scenario( name="moving_corridor_angled_2", asteroid_states=ast_states, ship_state={"position": (750, 550), "angle": 90}, seed=0 ) # Curved corridor scenario 1 # calculating corridor states num_x = 17 num_y = 13 x = np.linspace(0, 800, num_x) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): if not (abs(-(1 / 300) * (ast_x[ii, jj] - 400) ** 2 + 600 - ast_y[ii, jj]) <= 200): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": -90.0, "speed": 30}) moving_corridor_curve_1 = Scenario( name="moving_corridor_curve_1", asteroid_states=ast_states, ship_state={"position": (550, 500), "angle": 90}, seed=0 ) # Curved corridor scenario 2 # calculating corridor states num_x = 30 num_y = 45 x = np.linspace(0, 800, num_x) y = np.linspace(0, 600, num_y) ast_x, ast_y = np.meshgrid(x, y, sparse=False, indexing='ij') ast_states = [] for ii in range(num_x): for jj in range(num_y): if not (abs((1 / 300) * (ast_x[ii, jj] - 400) ** 2 - ast_y[ii, jj]) <= 200) and not ( abs((1 / 300) * (ast_x[ii, jj] - 400) ** 2 - ast_y[ii, jj]) >= 300): ast_states.append({"position": (ast_x[ii, jj], ast_y[ii, jj]), "angle": -90.0, "speed": 120, "size": 1}) moving_corridor_curve_2 = Scenario( name="moving_corridor_curve_2", asteroid_states=ast_states, ship_state={"position": (550, 100), "angle": 90}, seed=0 ) # ---------------------------------------------------------------------------------------------------------------------# # Apocalypse scenarios-------------------------------------------------------------------------------------------------# # Scenario meant to be difficult, probably can't be totally cleared # currently the vehicle spawns on top of asteroids. It won't kill the vehicle until you fire though scenario_apocalypse_1 = Scenario(name="apocalypse_1", num_asteroids=50, seed=1) # ---------------------------------------------------------------------------------------------------------------------# # Forcing wrap scenarios-----------------------------------------------------------------------------------------------# # Wrap right scenarios wall_right_wrap_1 = Scenario( name="wall_right_wrap_1", asteroid_states=[{"position": (600, 0), "angle": -90.0, "speed": 80}, {"position": (600, 100), "angle": -90.0, "speed": 80}, {"position": (600, 200), "angle": -90.0, "speed": 80}, {"position": (600, 300), "angle": -90.0, "speed": 80}, {"position": (600, 400), "angle": -90.0, "speed": 80}, {"position": (600, 500), "angle": -90.0, "speed": 80}, {"position": (600, 600), "angle": -90.0, "speed": 80}, ], ship_state={"position": (750, 300)}, seed=0 ) wall_right_wrap_2 = Scenario( name="wall_right_wrap_2", asteroid_states=[{"position": (750, 0), "angle": -90.0, "speed": 80}, {"position": (750, 100), "angle": -90.0, "speed": 80}, {"position": (750, 200), "angle": -90.0, "speed": 80}, {"position": (750, 300), "angle": -90.0, "speed": 80}, {"position": (750, 400), "angle": -90.0, "speed": 80}, {"position": (750, 500), "angle": -90.0, "speed": 80}, {"position": (750, 600), "angle": -90.0, "speed": 80}, ], ship_state={"position": (50, 300)}, seed=0 ) wall_right_wrap_3 = Scenario( name="wall_right_wrap_3", asteroid_states=[{"position": (600, 0), "angle": -90.0, "speed": 80}, {"position": (600, 100), "angle": -90.0, "speed": 80}, {"position": (600, 200), "angle": -90.0, "speed": 80}, {"position": (600, 300), "angle": -90.0, "speed": 80}, {"position": (600, 400), "angle": -90.0, "speed": 80}, {"position": (600, 500), "angle": -90.0, "speed": 80}, {"position": (600, 600), "angle": -90.0, "speed": 80}, {"position": (200, 0), "angle": -90.0, "speed": 0}, {"position": (200, 100), "angle": -90.0, "speed": 0}, {"position": (200, 200), "angle": -90.0, "speed": 0}, {"position": (200, 300), "angle": -90.0, "speed": 0}, {"position": (200, 400), "angle": -90.0, "speed": 0}, {"position": (200, 500), "angle": -90.0, "speed": 0}, {"position": (200, 600), "angle": -90.0, "speed": 0}, ], ship_state={"position": (750, 300)}, seed=0 ) wall_right_wrap_4 = Scenario( name="wall_right_wrap_4", asteroid_states=[{"position": (750, 0), "angle": -90.0, "speed": 80}, {"position": (750, 100), "angle": -90.0, "speed": 80}, {"position": (750, 200), "angle": -90.0, "speed": 80}, {"position": (750, 300), "angle": -90.0, "speed": 80}, {"position": (750, 400), "angle": -90.0, "speed": 80}, {"position": (750, 500), "angle": -90.0, "speed": 80}, {"position": (750, 600), "angle": -90.0, "speed": 80}, {"position": (200, 0), "angle": -90.0, "speed": 0}, {"position": (200, 100), "angle": -90.0, "speed": 0}, {"position": (200, 200), "angle": -90.0, "speed": 0}, {"position": (200, 300), "angle": -90.0, "speed": 0}, {"position": (200, 400), "angle": -90.0, "speed": 0}, {"position": (200, 500), "angle": -90.0, "speed": 0}, {"position": (200, 600), "angle": -90.0, "speed": 0}, ], ship_state={"position": (50, 300)}, seed=0 ) # Wrap left scenarios wall_left_wrap_1 = Scenario( name="wall_left_wrap_1", asteroid_states=[{"position": (200, 0), "angle": 90.0, "speed": 80}, {"position": (200, 100), "angle": 90.0, "speed": 80}, {"position": (200, 200), "angle": 90.0, "speed": 80}, {"position": (200, 300), "angle": 90.0, "speed": 80}, {"position": (200, 400), "angle": 90.0, "speed": 80}, {"position": (200, 500), "angle": 90.0, "speed": 80}, {"position": (200, 600), "angle": 90.0, "speed": 80}, ], ship_state={"position": (50, 300)}, seed=0 ) wall_left_wrap_2 = Scenario( name="wall_left_wrap_2", asteroid_states=[{"position": (50, 0), "angle": 90.0, "speed": 80}, {"position": (50, 100), "angle": 90.0, "speed": 80}, {"position": (50, 200), "angle": 90.0, "speed": 80}, {"position": (50, 300), "angle": 90.0, "speed": 80}, {"position": (50, 400), "angle": 90.0, "speed": 80}, {"position": (50, 500), "angle": 90.0, "speed": 80}, {"position": (50, 600), "angle": 90.0, "speed": 80}, ], ship_state={"position": (750, 300)}, seed=0 ) wall_left_wrap_3 = Scenario( name="wall_left_wrap_3", asteroid_states=[{"position": (200, 0), "angle": 90.0, "speed": 80}, {"position": (200, 100), "angle": 90.0, "speed": 80}, {"position": (200, 200), "angle": 90.0, "speed": 80}, {"position": (200, 300), "angle": 90.0, "speed": 80}, {"position": (200, 400), "angle": 90.0, "speed": 80}, {"position": (200, 500), "angle": 90.0, "speed": 80}, {"position": (200, 600), "angle": 90.0, "speed": 80}, {"position": (600, 0), "angle": -90.0, "speed": 0}, {"position": (600, 100), "angle": -90.0, "speed": 0}, {"position": (600, 200), "angle": -90.0, "speed": 0}, {"position": (600, 300), "angle": -90.0, "speed": 0}, {"position": (600, 400), "angle": -90.0, "speed": 0}, {"position": (600, 500), "angle": -90.0, "speed": 0}, {"position": (600, 600), "angle": -90.0, "speed": 0}, ], ship_state={"position": (50, 300)}, seed=0 ) wall_left_wrap_4 = Scenario( name="wall_left_wrap_4", asteroid_states=[{"position": (50, 0), "angle": 90.0, "speed": 80}, {"position": (50, 100), "angle": 90.0, "speed": 80}, {"position": (50, 200), "angle": 90.0, "speed": 80}, {"position": (50, 300), "angle": 90.0, "speed": 80}, {"position": (50, 400), "angle": 90.0, "speed": 80}, {"position": (50, 500), "angle": 90.0, "speed": 80}, {"position": (50, 600), "angle": 90.0, "speed": 80}, {"position": (600, 0), "angle": -90.0, "speed": 0}, {"position": (600, 100), "angle": -90.0, "speed": 0}, {"position": (600, 200), "angle": -90.0, "speed": 0}, {"position": (600, 300), "angle": -90.0, "speed": 0}, {"position": (600, 400), "angle": -90.0, "speed": 0}, {"position": (600, 500), "angle": -90.0, "speed": 0}, {"position": (600, 600), "angle": -90.0, "speed": 0}, ], ship_state={"position": (750, 300)}, seed=0 ) # Wrap top scenarios wall_top_wrap_1 = Scenario( name="wall_top_wrap_1", asteroid_states=[{"position": (0, 400), "angle": 0.0, "speed": 80}, {"position": (100, 400), "angle": 0.0, "speed": 80}, {"position": (200, 400), "angle": 0.0, "speed": 80}, {"position": (300, 400), "angle": 0.0, "speed": 80}, {"position": (400, 400), "angle": 0.0, "speed": 80}, {"position": (500, 400), "angle": 0.0, "speed": 80}, {"position": (600, 400), "angle": 0.0, "speed": 80}, {"position": (700, 400), "angle": 0.0, "speed": 80}, {"position": (800, 400), "angle": 0.0, "speed": 80}, ], ship_state={"position": (400, 550)}, seed=0 ) wall_top_wrap_2 = Scenario( name="wall_top_wrap_2", asteroid_states=[{"position": (0, 400), "angle": 0.0, "speed": 80}, {"position": (100, 400), "angle": 0.0, "speed": 80}, {"position": (200, 400), "angle": 0.0, "speed": 80}, {"position": (300, 400), "angle": 0.0, "speed": 80}, {"position": (400, 400), "angle": 0.0, "speed": 80}, {"position": (500, 400), "angle": 0.0, "speed": 80}, {"position": (600, 400), "angle": 0.0, "speed": 80}, {"position": (700, 400), "angle": 0.0, "speed": 80}, {"position": (800, 400), "angle": 0.0, "speed": 80}, ], ship_state={"position": (400, 50)}, seed=0 ) wall_top_wrap_3 = Scenario( name="wall_top_wrap_3", asteroid_states=[{"position": (0, 400), "angle": 0.0, "speed": 80}, {"position": (100, 400), "angle": 0.0, "speed": 80}, {"position": (200, 400), "angle": 0.0, "speed": 80}, {"position": (300, 400), "angle": 0.0, "speed": 80}, {"position": (400, 400), "angle": 0.0, "speed": 80}, {"position": (500, 400), "angle": 0.0, "speed": 80}, {"position": (600, 400), "angle": 0.0, "speed": 80}, {"position": (700, 400), "angle": 0.0, "speed": 80}, {"position": (800, 400), "angle": 0.0, "speed": 80}, {"position": (0, 200), "angle": 0.0, "speed": 0}, {"position": (100, 200), "angle": 0.0, "speed": 0}, {"position": (200, 200), "angle": 0.0, "speed": 0}, {"position": (300, 200), "angle": 0.0, "speed": 0}, {"position": (400, 200), "angle": 0.0, "speed": 0}, {"position": (500, 200), "angle": 0.0, "speed": 0}, {"position": (600, 200), "angle": 0.0, "speed": 0}, {"position": (700, 200), "angle": 0.0, "speed": 0}, {"position": (800, 200), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 550)}, seed=0 ) wall_top_wrap_4 = Scenario( name="wall_top_wrap_4", asteroid_states=[{"position": (0, 400), "angle": 0.0, "speed": 80}, {"position": (100, 400), "angle": 0.0, "speed": 80}, {"position": (200, 400), "angle": 0.0, "speed": 80}, {"position": (300, 400), "angle": 0.0, "speed": 80}, {"position": (400, 400), "angle": 0.0, "speed": 80}, {"position": (500, 400), "angle": 0.0, "speed": 80}, {"position": (600, 400), "angle": 0.0, "speed": 80}, {"position": (700, 400), "angle": 0.0, "speed": 80}, {"position": (800, 400), "angle": 0.0, "speed": 80}, {"position": (0, 200), "angle": 0.0, "speed": 0}, {"position": (100, 200), "angle": 0.0, "speed": 0}, {"position": (200, 200), "angle": 0.0, "speed": 0}, {"position": (300, 200), "angle": 0.0, "speed": 0}, {"position": (400, 200), "angle": 0.0, "speed": 0}, {"position": (500, 200), "angle": 0.0, "speed": 0}, {"position": (600, 200), "angle": 0.0, "speed": 0}, {"position": (700, 200), "angle": 0.0, "speed": 0}, {"position": (800, 200), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 50)}, seed=0 ) # Wrap bottom scenarios wall_bottom_wrap_1 = Scenario( name="wall_bottom_wrap_1", asteroid_states=[{"position": (0, 200), "angle": 180.0, "speed": 80}, {"position": (100, 200), "angle": 180.0, "speed": 80}, {"position": (200, 200), "angle": 180.0, "speed": 80}, {"position": (300, 200), "angle": 180.0, "speed": 80}, {"position": (400, 200), "angle": 180.0, "speed": 80}, {"position": (500, 200), "angle": 180.0, "speed": 80}, {"position": (600, 200), "angle": 180.0, "speed": 80}, {"position": (700, 200), "angle": 180.0, "speed": 80}, {"position": (800, 200), "angle": 180.0, "speed": 80}, ], ship_state={"position": (400, 50)}, seed=0 ) wall_bottom_wrap_2 = Scenario( name="wall_bottom_wrap_2", asteroid_states=[{"position": (0, 200), "angle": 180.0, "speed": 80}, {"position": (100, 200), "angle": 180.0, "speed": 80}, {"position": (200, 200), "angle": 180.0, "speed": 80}, {"position": (300, 200), "angle": 180.0, "speed": 80}, {"position": (400, 200), "angle": 180.0, "speed": 80}, {"position": (500, 200), "angle": 180.0, "speed": 80}, {"position": (600, 200), "angle": 180.0, "speed": 80}, {"position": (700, 200), "angle": 180.0, "speed": 80}, {"position": (800, 200), "angle": 180.0, "speed": 80}, ], ship_state={"position": (400, 550)}, seed=0 ) wall_bottom_wrap_3 = Scenario( name="wall_bottom_wrap_3", asteroid_states=[{"position": (0, 200), "angle": 180.0, "speed": 80}, {"position": (100, 200), "angle": 180.0, "speed": 80}, {"position": (200, 200), "angle": 180.0, "speed": 80}, {"position": (300, 200), "angle": 180.0, "speed": 80}, {"position": (400, 200), "angle": 180.0, "speed": 80}, {"position": (500, 200), "angle": 180.0, "speed": 80}, {"position": (600, 200), "angle": 180.0, "speed": 80}, {"position": (700, 200), "angle": 180.0, "speed": 80}, {"position": (800, 200), "angle": 180.0, "speed": 80}, {"position": (0, 400), "angle": 0.0, "speed": 0}, {"position": (100, 400), "angle": 0.0, "speed": 0}, {"position": (200, 400), "angle": 0.0, "speed": 0}, {"position": (300, 400), "angle": 0.0, "speed": 0}, {"position": (400, 400), "angle": 0.0, "speed": 0}, {"position": (500, 400), "angle": 0.0, "speed": 0}, {"position": (600, 400), "angle": 0.0, "speed": 0}, {"position": (700, 400), "angle": 0.0, "speed": 0}, {"position": (800, 400), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 50)}, seed=0 ) wall_bottom_wrap_4 = Scenario( name="wall_bottom_wrap_4", asteroid_states=[{"position": (0, 200), "angle": 180.0, "speed": 80}, {"position": (100, 200), "angle": 180.0, "speed": 80}, {"position": (200, 200), "angle": 180.0, "speed": 80}, {"position": (300, 200), "angle": 180.0, "speed": 80}, {"position": (400, 200), "angle": 180.0, "speed": 80}, {"position": (500, 200), "angle": 180.0, "speed": 80}, {"position": (600, 200), "angle": 180.0, "speed": 80}, {"position": (700, 200), "angle": 180.0, "speed": 80}, {"position": (800, 200), "angle": 180.0, "speed": 80}, {"position": (0, 400), "angle": 0.0, "speed": 0}, {"position": (100, 400), "angle": 0.0, "speed": 0}, {"position": (200, 400), "angle": 0.0, "speed": 0}, {"position": (300, 400), "angle": 0.0, "speed": 0}, {"position": (400, 400), "angle": 0.0, "speed": 0}, {"position": (500, 400), "angle": 0.0, "speed": 0}, {"position": (600, 400), "angle": 0.0, "speed": 0}, {"position": (700, 400), "angle": 0.0, "speed": 0}, {"position": (800, 400), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 550)}, seed=0 ) # A scenario with a big non moving box scenario_big_box = Scenario( name="big_box", asteroid_states=[{"position": (100, 600), "angle": 0.0, "speed": 0}, {"position": (200, 600), "angle": 0.0, "speed": 0}, {"position": (300, 600), "angle": 0.0, "speed": 0}, {"position": (400, 600), "angle": 0.0, "speed": 0}, {"position": (500, 600), "angle": 0.0, "speed": 0}, {"position": (600, 600), "angle": 0.0, "speed": 0}, {"position": (700, 600), "angle": 0.0, "speed": 0}, {"position": (100, 0), "angle": 0.0, "speed": 0}, {"position": (200, 0), "angle": 0.0, "speed": 0}, {"position": (300, 0), "angle": 0.0, "speed": 0}, {"position": (400, 0), "angle": 0.0, "speed": 0}, {"position": (500, 0), "angle": 0.0, "speed": 0}, {"position": (600, 0), "angle": 0.0, "speed": 0}, {"position": (700, 0), "angle": 0.0, "speed": 0}, {"position": (800, 0), "angle": 0.0, "speed": 0}, {"position": (0, 0), "angle": 0.0, "speed": 0}, {"position": (0, 100), "angle": 0.0, "speed": 0}, {"position": (0, 200), "angle": 0.0, "speed": 0}, {"position": (0, 300), "angle": 0.0, "speed": 0}, {"position": (0, 400), "angle": 0.0, "speed": 0}, {"position": (0, 500), "angle": 0.0, "speed": 0}, {"position": (0, 600), "angle": 0.0, "speed": 0}, {"position": (800, 100), "angle": 0.0, "speed": 0}, {"position": (800, 200), "angle": 0.0, "speed": 0}, {"position": (800, 300), "angle": 0.0, "speed": 0}, {"position": (800, 400), "angle": 0.0, "speed": 0}, {"position": (800, 500), "angle": 0.0, "speed": 0}, {"position": (800, 600), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 300)}, seed=0 ) # A scenario with a little non moving box scenario_small_box = Scenario( name="small_box", asteroid_states=[{"position": (200, 500), "angle": 0.0, "speed": 0}, {"position": (300, 500), "angle": 0.0, "speed": 0}, {"position": (400, 500), "angle": 0.0, "speed": 0}, {"position": (500, 500), "angle": 0.0, "speed": 0}, {"position": (200, 100), "angle": 0.0, "speed": 0}, {"position": (300, 100), "angle": 0.0, "speed": 0}, {"position": (400, 100), "angle": 0.0, "speed": 0}, {"position": (500, 100), "angle": 0.0, "speed": 0}, {"position": (600, 100), "angle": 0.0, "speed": 0}, {"position": (200, 200), "angle": 0.0, "speed": 0}, {"position": (200, 300), "angle": 0.0, "speed": 0}, {"position": (200, 400), "angle": 0.0, "speed": 0}, {"position": (600, 200), "angle": 0.0, "speed": 0}, {"position": (600, 300), "angle": 0.0, "speed": 0}, {"position": (600, 400), "angle": 0.0, "speed": 0}, {"position": (600, 500), "angle": 0.0, "speed": 0}, ], ship_state={"position": (400, 300)}, seed=0 ) # A scenario with a big non moving box scenario_2_still_corridors = Scenario( name="scenario_2_still_corridors", asteroid_states=[{"position": (0, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (50, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (100, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (150, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (200, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (250, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (300, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (0, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (50, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (100, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (150, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (200, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (250, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (300, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (500, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (550, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (600, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (650, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (700, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (750, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (800, 250), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (500, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (550, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (600, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (650, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (700, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (750, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (800, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 0), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 50), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 100), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 150), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 200), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 0), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 50), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 100), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 150), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 200), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 400), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 450), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 500), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 550), "angle": 0.0, "speed": 0, "size": 2}, {"position": (350, 600), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 350), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 400), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 450), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 500), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 550), "angle": 0.0, "speed": 0, "size": 2}, {"position": (450, 600), "angle": 0.0, "speed": 0, "size": 2}, ], ship_state={"position": (400, 300)}, seed=0 )
43.462322
120
0.471954
5,352
42,680
3.656577
0.031577
0.107307
0.067603
0.115892
0.899387
0.847011
0.832243
0.755238
0.727849
0.639346
0
0.14103
0.292924
42,680
981
121
43.506626
0.507456
0.064691
0
0.576923
0
0
0.201621
0.003011
0
0
0
0
0
1
0
false
0
0.002481
0
0.002481
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b354da045a8c2383221fb2caac0d79e36dd3ab7f
25,921
py
Python
riskfolio/RiskFunctions.py
xiaolongguo/Riskfolio-Lib
4e74c4f27a48ced7dcc0ab4a9e96c922cd54f0b4
[ "BSD-3-Clause" ]
2
2022-02-07T11:16:46.000Z
2022-02-23T06:57:41.000Z
riskfolio/RiskFunctions.py
xiaolongguo/Riskfolio-Lib
4e74c4f27a48ced7dcc0ab4a9e96c922cd54f0b4
[ "BSD-3-Clause" ]
null
null
null
riskfolio/RiskFunctions.py
xiaolongguo/Riskfolio-Lib
4e74c4f27a48ced7dcc0ab4a9e96c922cd54f0b4
[ "BSD-3-Clause" ]
1
2022-02-07T11:38:34.000Z
2022-02-07T11:38:34.000Z
import numpy as np from scipy.optimize import minimize from scipy.optimize import Bounds __all__ = [ "MAD", "SemiDeviation", "VaR_Hist", "CVaR_Hist", "WR", "LPM", "Entropic_RM", "EVaR_Hist", "MaxAbsDD", "AvgAbsDD", "ConAbsDD", "MaxRelDD", "AvgRelDD", "ConRelDD", "Sharpe_Risk", "Sharpe", "Risk_Contribution", ] def MAD(X): r""" Calculates the Mean Absolute Deviation (MAD) of a returns series. .. math:: \text{MAD}(X) = \frac{1}{T}\sum_{t=1}^{T} | X_{t} - \mathbb{E}(X_{t}) | Parameters ---------- X : 1d-array a returns series, must have Tx1 size. Returns ------- value : float MAD of a returns series. Raises ------ ValueError When the value cannot be calculated. Examples -------- Examples should be written in doctest format, and should illustrate how to use the function. >>> print([i for i in example_generator(4)]) [0, 1, 2, 3] """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") value = np.mean(np.absolute(a - np.mean(a, axis=0)), axis=0) value = value.item() return value def SemiDeviation(X): r""" Calculates the Semi Deviation of a returns series. .. math:: \text{SemiDev}(X) = \left [ \frac{1}{T-1}\sum_{t=1}^{T} (X_{t} - \mathbb{E}(X_{t}))^2 \right ]^{1/2} Parameters ---------- X : 1d-array Returns series, must have Tx1 size. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float Semi Deviation of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") mu = np.mean(a, axis=0) value = mu - a n = value.shape[0] - 1 value = np.sum(np.power(value[np.where(value <= mu)], 2)) / n value = np.power(value, 0.5).item() return value def VaR_Hist(X, alpha=0.01): r""" Calculates the Value at Risk (VaR) of a returns series. .. math:: \text{VaR}_{\alpha}(X) = -\inf_{t \in (0,T)} \left \{ X_{t} \in \mathbb{R}: F_{X}(X_{t})>\alpha \right \} Parameters ---------- X : 1d-array Returns series, must have Tx1 size. alpha : float, optional Significance level of VaR. The default is 0.01. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float VaR of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") sorted_a = np.sort(a, axis=0) index = int(np.ceil(alpha * len(sorted_a)) - 1) value = -sorted_a[index] value = value.item() return value def CVaR_Hist(X, alpha=0.01): r""" Calculates the Conditional Value at Risk (CVaR) of a returns series. .. math:: \text{CVaR}_{\alpha}(X) = \text{VaR}_{\alpha}(X) + \frac{1}{\alpha T} \sum_{t=1}^{T} \max(-X_{t} - \text{VaR}_{\alpha}(X), 0) Parameters ---------- X : 1d-array Returns series, must have Tx1 size. alpha : float, optional Significance level of CVaR. The default is 0.01. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float CVaR of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") sorted_a = np.sort(a, axis=0) index = int(np.ceil(alpha * len(sorted_a)) - 1) sum_var = 0 for i in range(0, index + 1): sum_var = sum_var + sorted_a[i] - sorted_a[index] value = -sorted_a[index] - sum_var / (alpha * len(sorted_a)) value = value.item() return value def WR(X): r""" Calculates the Worst Realization (WR) or Worst Scenario of a returns series. .. math:: \text{WR}(X) = \max(-X) Parameters ---------- X : 1d-array Returns series, must have Tx1 size. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float WR of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") sorted_a = np.sort(a, axis=0) value = -sorted_a[0] value = value.item() return value def LPM(X, MAR=0, p=1): r""" Calculates the p-th Lower Partial Moment of a returns series. .. math:: \text{LPM}(X, \text{MAR}, p) = \left [ \frac{1}{T}\sum_{t=1}^{T} \max(\text{MAR} - X_{t}, 0) \right ]^{\frac{1}{p}} Where: :math:`\text{MAR}` is the minimum acceptable return. Parameters ---------- X : 1d-array Returns series, must have Tx1 size. MAR : float, optional Minimum acceptable return. The default is 0. p : float, optional order of the :math:`\text{LPM}`. The default is 1. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float p-th Lower Partial Moment of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") value = MAR - a if p > 1: n = value.shape[0] - 1 else: n = value.shape[0] value = np.sum(np.power(value[np.where(value > 0)], p)) / n value = np.power(value, 1 / p).item() return value def Entropic_RM(X, theta=1): r""" Calculates the Entropic Risk Measure (ERM) of a returns series. .. math:: \text{ERM}(X) = \theta \log\left(\mathbb{E} [e^{-\frac{1}{\theta} X}]\right) Parameters ---------- X : 1d-array Returns series, must have Tx1 size. theta : float, optional Risk aversion parameter, must be greater than zero. The default is 1. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float ERM of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") value = np.mean(np.exp(-1 / theta * np.array(a)), axis=0) value = theta * (np.log(value)) value = value.item() return value def _Entropic_RM(X, theta=1, alpha=0.01): a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") value = np.mean(np.exp(-1 / theta * np.array(a)), axis=0) value = theta * (np.log(value) - np.log(alpha)) value = value.item() return value def EVaR_Hist(X, alpha=0.01): r""" Calculates the Entropic Value at Risk (EVaR) of a returns series. .. math:: \text{EVaR}_{\alpha}(X) = \inf_{z>0} \left \{ z^{-1} \ln \left (\frac{M_X(z)}{\alpha} \right ) \right \} Where: :math:`M_X(z)` is the moment generating function of X. Parameters ---------- X : 1d-array Returns series, must have Tx1 size. alpha : float, optional Significance level of EVaR. The default is 0.01. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float EVaR of a returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") bnd = Bounds([0.00000000001], [np.inf]) result = minimize(_Entropic_RM, [0.01], args=(X, alpha), bounds=bnd) t = result.x t = t.item() value = _Entropic_RM(t, X, alpha) return value def MaxAbsDD(X): r""" Calculates the Maximum Drawdown (MDD) of a returns series using uncumpound cumulated returns. .. math:: \text{MDD}(X) = \max_{j \in (0,T)} \left [\max_{t \in (0,T)} \left ( \sum_{i=0}^{t}X_{i} - \sum_{i=0}^{j}X_{i} \right ) \right ] Parameters ---------- X : 1d-array Returns series, must have Tx1 size. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float MDD of a uncumpound cumulated returns. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") prices = np.insert(np.array(a), 0, 1, axis=0) NAV = np.cumsum(np.array(prices), axis=0) value = 0 peak = -99999 for i in NAV: if i > peak: peak = i DD = peak - i if DD > value: value = DD value = value.item() return value def AvgAbsDD(X): r""" Calculates the Average Drawdown (ADD) of a returns series using uncumpound cumulated returns. .. math:: \text{ADD}(X) = \frac{1}{T}\sum_{i=0}^{T}\max_{t \in (0,T)} \left ( \sum_{i=0}^{t}X_{i} - \sum_{i=0}^{j}X_{i} \right ) Parameters ---------- X : 1d-array Returns series, must have Tx1 size. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float ADD of a uncumpound cumulated returns. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") prices = np.insert(np.array(a), 0, 1, axis=0) NAV = np.cumsum(np.array(prices), axis=0) value = 0 peak = -99999 n = 0 for i in NAV: if i > peak: peak = i DD = peak - i if DD > 0: value += DD n += 1 if n == 0: value = 0 else: value = value / n value = value.item() return value def ConAbsDD(X, alpha=0.01): r""" Calculates the Conditional Drawdown at Risk (CDaR) of a returns series using uncumpound cumulated returns. .. math:: \text{CDaR}_{\alpha}(X) = \text{DaR}_{\alpha}(X) + \frac{1}{\alpha T} \sum_{i=0}^{T} \max \left [ \max_{t \in (0,T)} \left ( \sum_{i=0}^{t}X_{i} - \sum_{i=0}^{j}X_{i} \right ) - \text{DaR}_{\alpha}(X), 0 \right ] Where: :math:`\text{DaR}_{\alpha}` is the Drawdown at Risk of an uncumpound cumulated return series :math:`X`. Parameters ---------- X : 1d-array Returns series, must have Tx1 size.. alpha : float, optional Significance level of CDaR. The default is 0.01. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float CDaR of a uncumpound cumulated returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") prices = np.insert(np.array(a), 0, 1, axis=0) NAV = np.cumsum(np.array(prices), axis=0) DD = [] peak = -99999 for i in NAV: if i > peak: peak = i DD.append(-(peak - i)) del DD[0] sorted_DD = np.sort(np.array(DD), axis=0) index = int(np.ceil(alpha * len(sorted_DD)) - 1) sum_var = 0 for i in range(0, index + 1): sum_var = sum_var + sorted_DD[i] - sorted_DD[index] value = -sorted_DD[index] - sum_var / (alpha * len(sorted_DD)) value = value.item() return value def MaxRelDD(X): r""" Calculates the Maximum Drawdown (MDD) of a returns series using cumpound cumulated returns. .. math:: \text{MDD}(X) = \max_{j \in (0,T)}\left[\max_{t \in (0,T)} \left ( \prod_{i=0}^{t}(1+X_{i}) - \prod_{i=0}^{j}(1+X_{i}) \right ) \right] Parameters ---------- X : 1d-array Returns series, must have Tx1 size. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float MDD of a cumpound cumulated returns. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") prices = 1 + np.insert(np.array(a), 0, 0, axis=0) NAV = np.cumprod(prices, axis=0) value = 0 peak = -99999 for i in NAV: if i > peak: peak = i DD = (peak - i) / peak if DD > value: value = DD value = value.item() return value def AvgRelDD(X): r""" Calculates the Average Drawdown (ADD) of a returns series using cumpound acumulated returns. .. math:: \text{ADD}(X) = \frac{1}{T}\sum_{i=0}^{T}\max_{t \in (0,T)} \left ( \prod_{i=0}^{t}(1+X_{i}) - \prod_{i=0}^{j}(1+X_{i}) \right ) Parameters ---------- X : 1d-array Returns series, must have Tx1 size. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float ADD of a cumpound acumulated returns. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("returns must have Tx1 size") prices = 1 + np.insert(np.array(a), 0, 0, axis=0) NAV = np.cumprod(prices, axis=0) value = 0 peak = -99999 n = 0 for i in NAV: if i > peak: peak = i DD = (peak - i) / peak if DD > 0: value += DD n += 1 if n == 0: value = 0 else: value = value / n value = value.item() return value def ConRelDD(X, alpha=0.01): r""" Calculates the Conditional Drawdown at Risk (CDaR) of a returns series using cumpound cumulated returns. .. math:: \text{CDaR}_{\alpha}(X) = \text{DaR}_{\alpha}(X) + \frac{1}{\alpha T} \sum_{i=0}^{T} \max \left [ \max_{t \in (0,T)} \left ( \prod_{i=0}^{t}(1+X_{i}) - \prod_{i=0}^{j}(1+X_{i}) \right ) - \text{DaR}_{\alpha}(X), 0 \right ] Where: :math:`\text{DaR}_{\alpha}` is the Drawdown at Risk of a cumpound acumulated return series :math:`X`. Parameters ---------- X : 1d-array Returns series, must have Tx1 size.. alpha : float, optional Significance level of CDaR. The default is 0.01. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float CDaR of a cumpound cumulated returns series. """ a = np.array(X, ndmin=2) if a.shape[0] == 1 and a.shape[1] > 1: a = a.T if a.shape[0] > 1 and a.shape[1] > 1: raise ValueError("X must have Tx1 size") prices = 1 + np.insert(np.array(a), 0, 0, axis=0) NAV = np.cumprod(prices, axis=0) DD = [] peak = -99999 for i in NAV: if i > peak: peak = i DD.append(-(peak - i) / peak) del DD[0] sorted_DD = np.sort(np.array(DD), axis=0) index = int(np.ceil(alpha * len(sorted_DD)) - 1) sum_var = 0 for i in range(0, index + 1): sum_var = sum_var + sorted_DD[i] - sorted_DD[index] value = -sorted_DD[index] - sum_var / (alpha * len(sorted_DD)) value = value.item() return value ############################################################################### # Risk Adjusted Return Ratios ############################################################################### def Sharpe_Risk(w, cov=None, returns=None, rm="MV", rf=0, alpha=0.01): r""" Calculate the risk measure available on the Sharpe function. Parameters ---------- w : DataFrame or 1d-array of shape (n_assets, 1) Weights matrix, where n_assets is the number of assets. cov : DataFrame or nd-array of shape (n_features, n_features) Covariance matrix, where n_features is the number of features. returns : DataFrame or nd-array of shape (n_samples, n_features) Features matrix, where n_samples is the number of samples and n_features is the number of features. rm : str, optional Risk measure used in the denominator of the ratio. The default is 'MV'. Posible values are: - 'MV': Standard Deviation. - 'MAD': Mean Absolute Deviation. - 'MSV': Semi Standard Deviation. - 'FLPM': First Lower Partial Moment (Omega Ratio). - 'SLPM': Second Lower Partial Moment (Sortino Ratio). - 'VaR': Value at Risk. - 'CVaR': Conditional Value at Risk. - 'WR': Worst Realization (Minimax) - 'MDD': Maximum Drawdown of uncompounded returns (Calmar Ratio). - 'ADD': Average Drawdown of uncompounded returns. - 'CDaR': Conditional Drawdown at Risk of uncompounded returns. rf : float, optional Risk free rate. The default is 0. **kwargs : dict Other arguments that depends on the risk measure. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float Risk measure of the portfolio. """ w_ = np.array(w, ndmin=2) if cov is not None: cov_ = np.array(cov, ndmin=2) if returns is not None: returns_ = np.array(returns, ndmin=2) a = returns_ @ w_ if rm == "MV": risk = w_.T @ cov_ @ w_ risk = np.sqrt(risk.item()) elif rm == "MAD": risk = MAD(a) elif rm == "MSV": risk = SemiDeviation(a) elif rm == "FLPM": risk = LPM(a, MAR=rf, p=1) elif rm == "SLPM": risk = LPM(a, MAR=rf, p=2) elif rm == "VaR": risk = VaR_Hist(a, alpha=alpha) elif rm == "CVaR": risk = CVaR_Hist(a, alpha=alpha) elif rm == "WR": risk = WR(a) elif rm == "MDD": risk = MaxAbsDD(a) elif rm == "ADD": risk = AvgAbsDD(a) elif rm == "CDaR": risk = ConAbsDD(a, alpha=alpha) value = risk return value def Sharpe(w, mu, cov=None, returns=None, rm="MV", rf=0, alpha=0.01): r""" Calculate the Risk Adjusted Return Ratio from a portfolio returns series. .. math:: \text{Sharpe}(X) = \frac{\mathbb{E}(X) - r_{f}}{\phi(X)} Where: :math:`X` is the vector of portfolio returns. :math:`r_{f}` is the risk free rate, when the risk measure is :math:`\text{LPM}` uses instead of :math:`r_{f}` the :math:`\text{MAR}`. :math:`\phi(X)` is a convex risk measure. The risk measures availabe are: Parameters ---------- w : DataFrame or 1d-array of shape (n_assets, 1) Weights matrix, where n_assets is the number of assets. mu : DataFrame or nd-array of shape (1, n_assets) Vector of expected returns, where n_assets is the number of assets. cov : DataFrame or nd-array of shape (n_features, n_features) Covariance matrix, where n_features is the number of features. returns : DataFrame or nd-array of shape (n_samples, n_features) Features matrix, where n_samples is the number of samples and n_features is the number of features. rm : str, optional Risk measure used in the denominator of the ratio. The default is 'MV'. Posible values are: - 'MV': Standard Deviation. - 'MAD': Mean Absolute Deviation. - 'MSV': Semi Standard Deviation. - 'FLPM': First Lower Partial Moment (Omega Ratio). - 'SLPM': Second Lower Partial Moment (Sortino Ratio). - 'VaR': Value at Risk. - 'CVaR': Conditional Value at Risk. - 'WR': Worst Realization (Minimax) - 'MDD': Maximum Drawdown of uncompounded returns (Calmar Ratio). - 'ADD': Average Drawdown of uncompounded returns. - 'CDaR': Conditional Drawdown at Risk of uncompounded returns. rf : float, optional Risk free rate. The default is 0. **kwargs : dict Other arguments that depends on the risk measure. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float Risk adjusted return ratio of :math:`X`. """ if cov is None and rm == "MV": raise ValueError("covariance matrix is necessary to calculate the sharpe ratio") elif returns is None and rm != "MV": raise ValueError( "returns scenarios are necessary to calculate the sharpe ratio" ) w_ = np.array(w, ndmin=2) mu_ = np.array(mu, ndmin=2) if cov is not None: cov_ = np.array(cov, ndmin=2) if returns is not None: returns_ = np.array(returns, ndmin=2) ret = mu_ @ w_ ret = ret.item() risk = Sharpe_Risk(w, cov=cov_, returns=returns_, rm=rm, rf=rf, alpha=alpha) value = (ret - rf) / risk return value ############################################################################### # Risk Contribution Vectors ############################################################################### def Risk_Contribution(w, cov=None, returns=None, rm="MV", rf=0, alpha=0.01): r""" Calculate the risk contribution for each asset based on the risk measure selected. Parameters ---------- w : DataFrame or 1d-array of shape (n_assets, 1) Weights matrix, where n_assets is the number of assets. cov : DataFrame or nd-array of shape (n_features, n_features) Covariance matrix, where n_features is the number of features. returns : DataFrame or nd-array of shape (n_samples, n_features) Features matrix, where n_samples is the number of samples and n_features is the number of features. rm : str, optional Risk measure used in the denominator of the ratio. The default is 'MV'. Posible values are: - 'MV': Standard Deviation. - 'MAD': Mean Absolute Deviation. - 'MSV': Semi Standard Deviation. - 'FLPM': First Lower Partial Moment (Omega Ratio). - 'SLPM': Second Lower Partial Moment (Sortino Ratio). - 'VaR': Value at Risk. - 'CVaR': Conditional Value at Risk. - 'WR': Worst Realization (Minimax) - 'MDD': Maximum Drawdown of uncompounded returns (Calmar Ratio). - 'ADD': Average Drawdown of uncompounded returns. - 'CDaR': Conditional Drawdown at Risk of uncompounded returns. rf : float, optional Risk free rate. The default is 0. **kwargs : dict Other arguments that depends on the risk measure. Raises ------ ValueError When the value cannot be calculated. Returns ------- value : float Risk measure of the portfolio. """ w_ = np.array(w, ndmin=2) if cov is not None: cov_ = np.array(cov, ndmin=2) if returns is not None: returns_ = np.array(returns, ndmin=2) # risk = Sharpe_Risk(w, cov=cov_, returns=returns_, rm=rm, rf=rf, alpha=alpha) RC = [] d_i = 0.0000001 for i in range(0, w_.shape[0]): delta = np.zeros((w_.shape[0], 1)) delta[i, 0] = d_i w_1 = w_ + delta w_2 = w_ - delta a_1 = returns_ @ w_1 a_2 = returns_ @ w_2 if rm == "MV": risk_1 = w_1.T @ cov_ @ w_1 risk_1 = np.sqrt(risk_1.item()) risk_2 = w_2.T @ cov_ @ w_2 risk_2 = np.sqrt(risk_2.item()) elif rm == "MAD": risk_1 = MAD(a_1) risk_2 = MAD(a_2) elif rm == "MSV": risk_1 = SemiDeviation(a_1) risk_2 = SemiDeviation(a_2) elif rm == "FLPM": risk_1 = LPM(a_1, MAR=rf, p=1) risk_2 = LPM(a_2, MAR=rf, p=1) elif rm == "SLPM": risk_1 = LPM(a_1, MAR=rf, p=2) risk_2 = LPM(a_2, MAR=rf, p=2) elif rm == "VaR": risk_1 = VaR_Hist(a_1, alpha=alpha) risk_2 = VaR_Hist(a_2, alpha=alpha) elif rm == "CVaR": risk_1 = CVaR_Hist(a_1, alpha=alpha) risk_2 = CVaR_Hist(a_2, alpha=alpha) elif rm == "WR": risk_1 = WR(a_1) risk_2 = WR(a_2) elif rm == "MDD": risk_1 = MaxAbsDD(a_1) risk_2 = MaxAbsDD(a_2) elif rm == "ADD": risk_1 = AvgAbsDD(a_1) risk_2 = AvgAbsDD(a_2) elif rm == "CDaR": risk_1 = ConAbsDD(a_1, alpha=alpha) risk_2 = ConAbsDD(a_2, alpha=alpha) RC_i = (risk_1 - risk_2) / (2 * d_i) * w_[i, 0] RC.append(RC_i) RC = np.array(RC, ndmin=1) return RC
25.998997
88
0.532078
3,657
25,921
3.701121
0.067542
0.026598
0.017067
0.019948
0.801995
0.785888
0.743554
0.725748
0.705948
0.691467
0
0.0292
0.319586
25,921
996
89
26.0251
0.738221
0.477528
0
0.618667
0
0
0.064154
0
0
0
0
0
0
1
0.048
false
0
0.008
0
0.104
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b366f48606841fe29fdccd25f0931d6c51909f80
14,396
py
Python
DailyProgrammer/DP20160722C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
2
2020-12-23T18:59:22.000Z
2021-04-14T13:16:09.000Z
DailyProgrammer/DP20160722C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
DailyProgrammer/DP20160722C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
""" [2016-07-22] Challenge #276 [Hard] ∞ Loop solver part 2 https://www.reddit.com/r/dailyprogrammer/comments/4u3e96/20160722_challenge_276_hard_loop_solver_part_2/ This is the same challenge as /u/jnazario's excellent [∞ Loop solver](https://www.reddit.com/r/dailyprogrammer/comments/4rug59/20160708_challenge_274_hard_loop_solver/) but for larger inputs. The input format is different, as you will be given a presolved partial grid, where each cell is the possible rotations that line up with a possible rotation of neighbour cells. The challenge is to find ALL of the valid grid solutions # 20x20 input visualization ┌─┬─────┬────┬───────┬────┬───┬───┬────┬─────┬────────┬────┬────────┬────┬─────┬──┬──┬──┬──┬──┬──┐ │6│12 │6 │10 │10 │12 │6 │12 │6 │12 │6 │14 │12 │6 │10│10│10│14│14│12│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│13 │3 │14 │12 │3 │9 │7 │15 │9 │5 │7 │11 │9 │6 │12│6 │13│5 │5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│9 │6 │9 │7 │10 │10 │9 │7 │10 │13 │7 │10 │10 │9 │5 │5 │5 │3 │9 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │5│6 │15 │12 │5 │6 │14 │14 │15 │12 │5 │3 │10 │14 │10│11│11│15│10│12│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│13 │3 │9 │3 │15 │11 │13 │7 │9 │7 │12 │6 │11 │10│10│10│9 │6 │9 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│11 │14 │14 │14 │9 │6 │15 │15 │12 │5 │3 │15 │14 │14│12│6 │12│3 │12│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │5│6 │9 │3 │9 │6 │9 │5 │7 │13 │5 │6 │15 │15 │15│13│7 │13│6 │13│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │5│5 │6 │10 │10 │13 │6 │15 │15 │11 13 │13 7│7 13 11 │11 7│11 │15│11│9 │3 │15│9 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│9 │5 │6 │10 │11 │9 │7 │9 │6 3 │11 │11 13 14│14 7│10 │11│14│12│6 │15│12│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │5│6 │9 │3 │12 │6 │10 │9 │6 │13 11 14│6 12│14 7 │9 │6 │10│9 │7 │9 │5 │5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│11 │14 │10 │9 │7 │10 │14 │13 11│7 14 │11 │11 │10 │13 │6 │14│9 │6 │13│5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│12 │7 │12 │6 │13 │6 │9 │3 6 │13 │6 │10 │12 │7 │11│11│14│15│13│5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│13 11│3 9 │11 13 7│13 7│3 9│9 3│6 12│14 7 │15 │11 │10 │9 │3 │14│10│9 │3 │9 │5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│13 14│6 12│14 7 │11 │12 │6 │13 │5 │3 │14 │12 │6 │12 │5 │6 │14│14│12│5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │5│3 │15 │11 │12 │7 │9 │7 │11 │12 │5 │7 │9 │7 │15│11│13│7 │13│5 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │5│6 │9 │6 │11 │13 │6 │13 │6 │15 │9 │7 │10 │13 │3 │10│9 │3 │15│13│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │3│13 │6 │15 │12 │7 │15 │9 │3 │13 │6 │13 11 │6 12│11 7 │14│10│12│6 │15│9 │ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │6│13 │3 │11 │15 │15 │13 │6 │10 │15 │11 │11 14 │11 │14 11│13│6 │15│9 │3 │12│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │7│11 │12 │6 │15 │9 │5 │7 │14 │9 │6 │14 13 │12 6│7 14 │9 │5 │7 │12│6 │13│ ├─┼─────┼────┼───────┼────┼───┼───┼────┼─────┼────────┼────┼────────┼────┼─────┼──┼──┼──┼──┼──┼──┤ │3│10 │9 │3 │11 │10 │11 │11 │11 │10 │9 │3 │11 │11 │10│11│11│9 │3 │9 │ └─┴─────┴────┴───────┴────┴───┴───┴────┴─────┴────────┴────┴────────┴────┴─────┴──┴──┴──┴──┴──┴──┘ 1. The numbers in each cell are indexes (0-based) into the looper tiles `╹╺┗╻┃┏┣╸┛━┻┓┫┳╋` (leading index 0 is space) 2. The 4 digit binary representation of each index indicates whether there is a tick that points `WSEN` 3. Cells with a single index are forced moves. Cells with multiple indexes are potential moves. 4. The general strategy for finding all valid final (ones with single indexes per cell) grids is to repeatedly split the grid based on one multiple cell (where each grid has a unique index in that cell), and then find all forced moves in each independent grid. 5. A forced move by row is one where the left cells' East tick is equal to the right cell's West tick. By column, the top cell's South tick is equal to the lower cell's North tick. **input** (each row separated by LF, each cell by comma, each candidate by space) 20x20 6,12,6,10,10,12,6,12,6,12,6,14,12,6,10,10,10,14,14,12 7,13,3,14,12,3,9,7,15,9,5,7,11,9,6,12,6,13,5,5 7,9,6,9,7,10,10,9,7,10,13,7,10,10,9,5,5,5,3,9 5,6,15,12,5,6,14,14,15,12,5,3,10,14,10,11,11,15,10,12 7,13,3,9,3,15,11,13,7,9,7,12,6,11,10,10,10,9,6,9 7,11,14,14,14,9,6,15,15,12,5,3,15,14,14,12,6,12,3,12 5,6,9,3,9,6,9,5,7,13,5,6,15,15,15,13,7,13,6,13 5,5,6,10,10,13,6,15,15,11 13,13 7,7 13 11,11 7,11,15,11,9,3,15,9 7,9,5,6,10,11,9,7,9,6 3,11,11 13 14,14 7,10,11,14,12,6,15,12 5,6,9,3,12,6,10,9,6,13 11 14,6 12,14 7,9,6,10,9,7,9,5,5 7,11,14,10,9,7,10,14,13 11,7 14,11,11,10,13,6,14,9,6,13,5 7,12,7,12,6,13,6,9,3 6,13,6,10,12,7,11,11,14,15,13,5 7,13 11,3 9,11 13 7,13 7,3 9,9 3,6 12,14 7,15,11,10,9,3,14,10,9,3,9,5 7,13 14,6 12,14 7,11,12,6,13,5,3,14,12,6,12,5,6,14,14,12,5 5,3,15,11,12,7,9,7,11,12,5,7,9,7,15,11,13,7,13,5 5,6,9,6,11,13,6,13,6,15,9,7,10,13,3,10,9,3,15,13 3,13,6,15,12,7,15,9,3,13,6,13 11,6 12,11 7,14,10,12,6,15,9 6,13,3,11,15,15,13,6,10,15,11,11 14,11,14 11,13,6,15,9,3,12 7,11,12,6,15,9,5,7,14,9,6,14 13,12 6,7 14,9,5,7,12,6,13 3,10,9,3,11,10,11,11,11,10,9,3,11,11,10,11,11,9,3,9 **output** to save space just provide the number of distinct valid grids. (I get 12) # 30x30 challenges thanks to /u/bearific for creating a generator for this challenge. The above and larger inputs are available here: https://gist.github.com/FrankRuis/0aa761b9562a32ea7fdcff32f1768eb0 "reduced input" (above) formats of the 30x30 challenges: (you may use the original input format and solve these anyway you like) **first input** 6,10,14,12,6,14,10,12,6,12,6,14,10,12,6,10,14,14,14,12,6,14,12,6,10,14,10,12,6,12 3,14,13,7,13,3,14,15,15,15,11,13,6,9,5,6,11,9,5,3,15,15,13,5,6,15,10,15,13,5 6,11,15,15,15,10,13 11,7 11,15,9,6,9,7,12,3,13,6,10,11,14,11,15,15,11,15,9,6,13,7,13 7,12,3,13,5,6,13 14,7 14,11,14,9,6,15,11,14,15,11,10,12,7,12,7,13 11,6 12,13 7,6 12,11 7,13,5,5 7,11,14,9,3,9,7,13,6,15,14,13,5,6,9,3,10,10,13,3,15,13,3 6,15,15,11 13,14 7,13,5,5 7,14,13,6,14,12,5,7,15,15,9,3,9,5,6,12,6,14,9,6,15,13 11,6 12 3 9,9 3,7 13,14 7,15,13,7,9 7,15,13,5,5,3,9,5,5,5,6,14,14,9,3,11,11,13,6,15,15,13 14,7 11 14,14,15,15,15,11,11,12 7,11,9,5,7,12,6,13,3,13,3,13,3,10,10,10,14,11 7,9,5,3,11,13 14,7 11,15,11,11,10,12,5 5,6,10,9,5,5,5,7,12,5,6,9,6,12,6,14,13 11,6 12 3 9,12 6,7 13,12 6,6 12,9 3,7 14,15,10,12,6,15,13 7,9,6,12,3,9,5,5,3,9,3,14,11 13,11 13 7,11 13 7,13 11 7,5 10,7 13 14,11 7,13,5,7,14,11,9,6,11,13,3,13 5,6,11,9,6,12,3,13,6,14,14,13,6,10,14 11,11,11 14,13,6 3,15,11,15,9,6,12,7,10,9,6,13 3,11,10,10,9,3,10,15,9,7,15,13,5,6,13 14,6 12,14 13 7,9 3,7 13 14,11 7,14,9,6,11,13,3,12,6,11,9 6,10,14,10,10,12,6,15,10,11 13,13 7,7 11,13,5,5,3,11,14,13,6 3,15,12,5,6,15,12,5,7,14,12 5,6,9,6,14,11,15,15,10,12 9,7,11 14,13,7,13,6,12,5,3,11 14,9,5,5,7,15,15,11,15,15,9 3,15,14,15,13,6,9,5,6,13 11 14,3 9,14 13 7,13 7,3 9,11 7,11,15,9,6,14 11,10,11,15,11 13,11 7,13,6,11,11,12 6,15,15,15,11,15,14,11 13,13 7,7 14,12,3,15,10,12 9,6,9,6,11 13,11 7 14,10,12,3,14 13,14 7,15,11,12,6,13 3,9,7,9,6,13 11,7 13 11,14 11 7,15,11,15,12,5,6,13 14,3 9,12 6,3 9,10 5,14 11 7,10,15,14,13,5,3,10,15,11,13 6,14,11,14,15,13 11 14,7 13 11 14,11 13 7 14,11 7,10,9,3,11,13,5,6,13,6,12 9,3 6,10,13,3,13,5,6,12,3,10,9 3,13,6,13,3,13 14,7 13 14,14 13 11 7,14 11 7,14,12,6,10,9,5,5,3,15,11 13 14,14 7,10,13,6,15,11,13,5,6,10,12 6,15,9,3,14,9,7,13 14,7 14,15,11,11,10,12,3,15,12,3,14 13,9 3,6 12,11 7,13,7,10,11,11,15,12,5 7,13,6,10,15,14,9,5,3,11,14,12,6,9,6,9,3,14,9,6,15,12 9,5,7,10,10,12,3,13,5 7,9,7,14,11,11,12,5,6,10,11,13,7,12,5,6,12,7,10,11,13 11,3 9 6 12,13 11 7,7 11,14,14,11,12,5,5 5,6,13,7,12,6,13,5,3,14,14,13,3,15,11,11,11,13,6,12,7 13 14,10 5,11 7 14,9 12,3,15,14,11,11,13 7,9,7,9,5,7,11,15,14,13,5,7,12,3,10,14,12,3,13 11,3 9,9 3,6 12 3 9,14 13 7,14 7,10,11,15,14,12,5 7,12,3,10,11,15,14,11,9,3,9,3,15,12,6,13,3,10,13 14,6 12,12 6,7 14,11,15,14,12,3,13,5,5 3,9,6,10,12,7,9,6,14,10,12,6,13,7,15,15,12,6,9,7,15,11,12,3,13,3,12,3,9,5 6,12,7,14,9,7,14,9,7,12,3,9,3,15,11 13,11 7,9,5,6,15,15,14,15,12,3,14,13,6,14,9 7,15,13,7,10,11,11,10,13,5,6,10,14,13,6 3,14 11,10,9,5,5,3,13,5,5,6,15,11,15,15,12 7,9,3,13,6,14,12,6,15,11,11,10,11,11,13 14,7 14,14,12,7,15,12,7,15,13,3,13,6,11,15,13 3,10,10,9,3,9,3,9,3,10,10,10,10,10,9,3,9,3,9,3,11,9,3,11,10,9,3,10,11,9 **input 2** 6,10,14,12,6,14,10,12,6,12,6,14,10,12,6,10,14,14,14,12,6,14,12,6,10,14,10,12,6,12 3,14,13,7,13,3,14,15,15,15,11,13,6,9,5,6,11,9,5,3,15,15,13,5,6,15,10,15,13,5 6,11,15,15,15,10,13 11,7 11,15,9,6,9,7,12,3,13,6,10,11,14,11,15,15,11,15,9,6,13,7,13 7,12,3,13,5,6,13 14,7 14,11,14,9,6,15,11,14,15,11,10,12,7,12,7,13 11,6 12,13 7,6 12,11 7,13,5,5 7,11,14,9,3,9,7,13,6,15,14,13,5,6,9,3,10,10,13,3,15,13,3 6,15,15,13 11,14 7,13,5,5 7,14,13,6,14,12,5,7,15,15,9,3,9,5,6,12,6,14,9,6,15,11 13,12 6 9 3,3 9,13 7,7 14,15,13,7,9 7,15,13,5,5,3,9,5,5,5,6,14,14,9,3,11,11,13,6,15,15,14 13,11 7 14,14,15,15,15,11,11,12 7,11,9,5,7,12,6,13,3,13,3,13,3,10,10,10,14,11 7,9,5,3,11,14 13,11 7,15,11,11,10,12,5 5,6,10,9,5,5,5,7,12,5,6,9,6,12,6,14,13 11,6 12 3 9,12 6,7 13,12 6,6 12,9 3,14 7,15,10,12,6,15,13 7,9,6,12,3,9,5,5,3,9,3,14,13 11,7 13 11,13 11 7,7 13 11,5 10,13 7 14,7 11,13,5,7,14,11,9,6,11,13,3,13 5,6,11,9,6,12,3,13,6,14,14,13,6,10,11 14,11,11 14,13,6 3,15,11,15,9,6,12,7,10,9,6,13 3,11,10,10,9,3,10,15,9,7,15,13,5,6,14 13,12 6,14 7 13,9 3,7 13 14,11 7,14,9,6,11,13,3,12,6,11,9 6,10,14,10,10,12,6,15,10,13 11,7 13,11 7,13,5,5,3,11,14,13,6 3,15,12,5,6,15,12,5,7,14,12 5,6,9,6,14,11,15,15,10,9 12,7,14 11,13,7,13,6,12,5,3,11 14,9,5,5,7,15,15,11,15,15,9 3,15,14,15,13,6,9,5,6,14 13 11,9 3,7 13 14,13 7,3 9,11 7,11,15,9,6,14 11,10,11,15,13 11,7 11,13,6,11,11,12 6,15,15,15,11,15,14,13 11,7 13,7 14,12,3,15,10,12 9,6,9,6,13 11,7 11 14,10,12,3,13 14,7 14,15,11,12,6,13 3,9,7,9,6,13 11,7 13 11,11 7 14,15,11,15,12,5,6,13 14,9 3,6 12,9 3,5 10,7 11 14,10,15,14,13,5,3,10,15,11,13 6,14,11,14,15,13 11 14,7 13 11 14,14 13 11 7,11 7,10,9,3,11,13,5,6,13,6,9 12,3 6,10,13,3,13,5,6,12,3,10,9 3,13,6,13,3,13 14,7 13 14,13 11 7 14,14 7 11,14,12,6,10,9,5,5,3,15,14 13 11,14 7,10,13,6,15,11,13,5,6,10,12 6,15,9,3,14,9,7,13 14,7 14,15,11,11,10,12,3,15,12,3,13 14,3 9,12 6,7 11,13,7,10,11,11,15,12,5 7,13,6,10,15,14,9,5,3,11,14,12,6,9,6,9,3,14,9,6,15,9 12,5,7,10,10,12,3,13,5 7,9,7,14,11,11,12,5,6,10,11,13,7,12,5,6,12,7,10,11,11 13,12 6 9 3,7 13 11,11 7,14,14,11,12,5,5 5,6,13,7,12,6,13,5,3,14,14,13,3,15,11,11,11,13,6,12,14 13 7,5 10,11 7 14,12 9,3,15,14,11,11,13 7,9,7,9,5,7,11,15,14,13,5,7,12,3,10,14,12,3,13 11,3 9,9 3,3 9 6 12,14 13 7,7 14,10,11,15,14,12,5 7,12,3,10,11,15,14,11,9,3,9,3,15,12,6,13,3,10,13 14,6 12,12 6,14 7,11,15,14,12,3,13,5,5 3,9,6,10,12,7,9,6,14,10,12,6,13,7,15,15,12,6,9,7,15,11,12,3,13,3,12,3,9,5 6,12,7,14,9,7,14,9,7,12,3,9,3,15,13 11,7 11,9,5,6,15,15,14,15,12,3,14,13,6,14,9 7,15,13,7,10,11,11,10,13,5,6,10,14,13,3 6,11 14,10,9,5,5,3,13,5,5,6,15,11,15,15,12 7,9,3,13,6,14,12,6,15,11,11,10,11,11,14 13,14 7,14,12,7,15,12,7,15,13,3,13,6,11,15,13 3,10,10,9,3,9,3,9,3,10,10,10,10,10,9,3,9,3,9,3,11,9,3,11,10,9,3,10,11,9 """ def main(): pass if __name__ == "__main__": main()
88.319018
119
0.427549
3,760
14,396
2.295213
0.047872
0.017613
0.016686
0.00927
0.724913
0.669061
0.646929
0.499768
0.480765
0.366165
0
0.432832
0.242984
14,396
162
120
88.864198
0.130116
0.994304
0
0
0
0
0.125
0
0
0
0
0
0
1
0.25
true
0.25
0
0
0.25
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
0
0
0
6
2fa406a1d9616f7c6d29469b8cff1b0491bb7fd2
122
py
Python
resources/files/__init__.py
vishu221b/bookme-flask-REST-API-Collection
9ee923e13d786af9b11421370edac718743855af
[ "MIT" ]
null
null
null
resources/files/__init__.py
vishu221b/bookme-flask-REST-API-Collection
9ee923e13d786af9b11421370edac718743855af
[ "MIT" ]
null
null
null
resources/files/__init__.py
vishu221b/bookme-flask-REST-API-Collection
9ee923e13d786af9b11421370edac718743855af
[ "MIT" ]
null
null
null
from .documentFileUpload import DocumentFileUploadResource from .documentFileDownload import DocumentFileDownloadResource
40.666667
62
0.918033
8
122
14
0.75
0
0
0
0
0
0
0
0
0
0
0
0.065574
122
2
63
61
0.982456
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
2fb9281e34c7da3db73175b83cad1e4923b159c2
1,950
py
Python
process.py
SuperMaxine/Gaze_Tracking_Exp
fbecc09bf084faa881d63d2f1bc196104941ffb5
[ "MIT" ]
null
null
null
process.py
SuperMaxine/Gaze_Tracking_Exp
fbecc09bf084faa881d63d2f1bc196104941ffb5
[ "MIT" ]
null
null
null
process.py
SuperMaxine/Gaze_Tracking_Exp
fbecc09bf084faa881d63d2f1bc196104941ffb5
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- """ opencv实现人脸识别 参考: 1、https://github.com/opencv/opencv/tree/master/data/haarcascades 2、http://www.cnblogs.com/hanson1/p/7105265.html """ import cv2 def detect_face(image): gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) ''' # 获取人脸识别训练数据 对于人脸特征的一些描述,opencv在读取完数据后很据训练中的样品数据, 就可以感知读取到的图片上的特征,进而对图片进行人脸识别。 xml数据下载, 参考:https://github.com/opencv/opencv/tree/master/data/haarcascades ''' face_cascade = cv2.CascadeClassifier(r'./haarcascade_frontalface_default.xml') # 探测人脸 # 根据训练的数据来对新图片进行识别的过程。 faces = face_cascade.detectMultiScale( gray, scaleFactor=1.15, minNeighbors=5, minSize=(5, 5), # flags = cv2.HAAR_SCALE_IMAGE ) # 我们可以随意的指定里面参数的值,来达到不同精度下的识别。返回值就是opencv对图片的探测结果的体现。 # 处理人脸探测的结果 print("发现{0}个人脸!".format(len(faces))) for (x, y, w, h) in faces: cv2.rectangle(image, (x, y), (x + w, y + w), (0, 255, 0), 2) # cv2.circle(image,((x+x+w)/2,(y+y+h)/2),w/2,(0,255,0),2) return image # # 待检测的图片路径 # imagepath="nba.jpg" # # image = cv2.imread(imagepath) # gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) # # # ''' # # 获取人脸识别训练数据 # # 对于人脸特征的一些描述,opencv在读取完数据后很据训练中的样品数据, # 就可以感知读取到的图片上的特征,进而对图片进行人脸识别。 # xml数据下载, # 参考:https://github.com/opencv/opencv/tree/master/data/haarcascades # ''' # face_cascade = cv2.CascadeClassifier(r'./haarcascade_frontalface_default.xml') # # # 探测人脸 # # 根据训练的数据来对新图片进行识别的过程。 # faces = face_cascade.detectMultiScale( # gray, # scaleFactor = 1.15, # minNeighbors = 5, # minSize = (5,5), # #flags = cv2.HAAR_SCALE_IMAGE # ) # # # 我们可以随意的指定里面参数的值,来达到不同精度下的识别。返回值就是opencv对图片的探测结果的体现。 # # # 处理人脸探测的结果 # print ("发现{0}个人脸!".format(len(faces))) # for(x,y,w,h) in faces: # cv2.rectangle(image,(x,y),(x+w,y+w),(0,255,0),2) # # cv2.circle(image,((x+x+w)/2,(y+y+h)/2),w/2,(0,255,0),2) # # cv2.imshow("image",image) # cv2.waitKey(0) # cv2.destroyAllWindows()
22.941176
82
0.650769
249
1,950
5.036145
0.341365
0.025518
0.015949
0.019139
0.846093
0.8437
0.8437
0.8437
0.8437
0.802233
0
0.046239
0.168205
1,950
84
83
23.214286
0.72688
0.587179
0
0
0
0
0.082437
0.066308
0
0
0
0
0
1
0.071429
false
0
0.071429
0
0.214286
0.071429
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
2fdcb0a723367a5527e63bd7e6909f29ebc28c3f
38,912
py
Python
ziggurat_foundations/tests/test_permissions.py
ergo/ziggurat_foundations
613adf1b6022e9b5401ef7de9f5a066c88cfb6e8
[ "BSD-3-Clause" ]
59
2015-02-18T10:58:57.000Z
2021-06-15T19:52:29.000Z
ziggurat_foundations/tests/test_permissions.py
ergo/ziggurat_foundations
613adf1b6022e9b5401ef7de9f5a066c88cfb6e8
[ "BSD-3-Clause" ]
50
2015-02-18T10:12:17.000Z
2021-09-09T20:13:17.000Z
ziggurat_foundations/tests/test_permissions.py
ergo/ziggurat_foundations
613adf1b6022e9b5401ef7de9f5a066c88cfb6e8
[ "BSD-3-Clause" ]
24
2015-02-18T10:29:47.000Z
2020-03-28T20:28:56.000Z
# -*- coding: utf-8 -*- from __future__ import with_statement, unicode_literals import pytest from ziggurat_foundations.models.services.group_permission import GroupPermissionService from ziggurat_foundations.models.services.group_resource_permission import ( GroupResourcePermissionService, ) from ziggurat_foundations.models.services.user_permission import UserPermissionService from ziggurat_foundations.models.services.user_resource_permission import ( UserResourcePermissionService, ) from ziggurat_foundations.models.services.resource import ResourceService from ziggurat_foundations.permissions import PermissionTuple, ALL_PERMISSIONS from ziggurat_foundations.tests import ( add_user, check_one_in_other, add_resource, add_resource_b, add_group, BaseTestCase, ) from ziggurat_foundations.tests.conftest import ( User, UserPermission, GroupPermission, UserResourcePermission, GroupResourcePermission, ResourceTestobjB, ) from ziggurat_foundations.models.services.group import GroupService from ziggurat_foundations.models.services.user import UserService class TestUserPermissions(BaseTestCase): def test_user_permissions(self, db_session): created_user = add_user(db_session) permissions = UserService.permissions(created_user, db_session=db_session) expected = [ PermissionTuple( created_user, "alter_users", "user", None, None, False, True ), PermissionTuple(created_user, "root", "user", None, None, False, True), ] check_one_in_other(permissions, expected) def test_owned_permissions(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") created_user.resources.append(resource) db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], db_session=db_session ).all() assert resources[0] == resource permission = ResourceService.direct_perms_for_user(resource, created_user)[0] assert permission.owner is True assert permission.allowed is True assert permission.user.id == created_user.id def test_resources_with_perm(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], db_session=db_session ).all() assert resources[0] == resource def test_mixed_perms(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) resource2 = add_resource(db_session, 2, "test_resource") created_user.resources.append(resource2) add_resource(db_session, 3, "test_resource") add_resource_b(db_session, 4, "test_resource") db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], db_session=db_session ).all() found_ids = [r.resource_id for r in resources] assert sorted(found_ids) == [1, 2] def test_resources_with_perm_type_found(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], resource_types=["test_resource"], db_session=db_session, ).all() assert resources[0] == resource def test_resources_with_perm_type_not_found(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], resource_types=["test_resource_b"], db_session=db_session, ).all() assert resources == [] def test_resources_with_perm_type_other_found(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") resource2 = add_resource_b(db_session, 2, "test_resource") resource3 = add_resource(db_session, 3, "test_resource") resource4 = add_resource_b(db_session, 4, "test_resource") db_session.flush() permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) permission2 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource2.resource_id, ) resource2.user_permissions.append(permission2) permission3 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource3.resource_id, ) resource3.user_permissions.append(permission3) permission4 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource4.resource_id, ) resource4.user_permissions.append(permission4) db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], resource_types=["test_resource_b"], db_session=db_session, ).all() assert len(resources) == 2 def test_resources_with_wrong_perm(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm_bad", user_id=created_user.id, resource_id=resource.resource_id, ) with pytest.raises(AssertionError): resource.user_permissions.append(permission) def test_multiple_resources_with_perm(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) resource2 = add_resource(db_session, 2, "test_resource2") permission2 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource2.resource_id, ) resource2.user_permissions.append(permission2) resources = UserService.resources_with_perms( created_user, ["test_perm"], db_session=db_session ).all() assert resources == [resource, resource2] def test_resources_ids_with_perm(self, db_session): created_user = add_user(db_session) resource1 = add_resource(db_session, 1, "test_resource1") resource2 = add_resource(db_session, 2, "test_resource2") resource3 = add_resource(db_session, 3, "test_resource3") permission1 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource1.resource_id, ) permission2 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource2.resource_id, ) permission3 = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource3.resource_id, ) resource1.user_permissions.append(permission1) resource2.user_permissions.append(permission2) resource3.user_permissions.append(permission3) db_session.flush() resources = UserService.resources_with_perms( created_user, ["test_perm"], resource_ids=[1, 3], db_session=db_session ).all() assert resources == [resource1, resource3] def test_resources_with_wrong_group_permission(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") group = add_group(db_session) group.users.append(created_user) group_permission = GroupResourcePermission( perm_name="test_perm_bad", group_id=group.id, resource_id=resource.resource_id, ) with pytest.raises(AssertionError): resource.group_permissions.append(group_permission) def test_resources_with_group_permission(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") resource2 = add_resource(db_session, 2, "test_resource2") add_resource(db_session, 3, "test_resource3") group = add_group(db_session) group.users.append(created_user) group_permission = GroupResourcePermission( perm_name="test_perm", group_id=1, resource_id=resource.resource_id ) group_permission2 = GroupResourcePermission( perm_name="foo_perm", group_id=1, resource_id=resource2.resource_id ) resource.group_permissions.append(group_permission) resource2.group_permissions.append(group_permission2) db_session.flush() resources = UserService.resources_with_perms( created_user, ["foo_perm"], db_session=db_session ).all() assert resources[0] == resource2 def test_resources_with_direct_user_perms(self, db_session): self.set_up_user_group_and_perms(db_session) # test_perm1 from group perms should be ignored perms = ResourceService.direct_perms_for_user( self.resource, self.user, db_session=db_session ) second = [ PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resources_with_direct_group_perms(self, db_session): self.set_up_user_group_and_perms(db_session) # test_perm1 from group perms should be ignored perms = ResourceService.group_perms_for_user( self.resource, self.user, db_session=db_session ) second = [ PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ) ] check_one_in_other(perms, second) def test_resources_with_user_perms(self, db_session): self.maxDiff = 9999 self.set_up_user_group_and_perms(db_session) perms = ResourceService.perms_for_user( self.resource, self.user, db_session=db_session ) second = [ PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_users_for_perm(self, db_session): self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource, "foo_perm", db_session=db_session ) second = [ PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ) ] check_one_in_other(perms, second) def test_resource_users_for_any_perm(self, db_session): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", db_session=db_session ) second = [ PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( self.user4, "group_perm", "group", self.group2, self.resource, False, True, ), ] check_one_in_other(perms, second) def test_resource_users_for_any_perm_resource_2(self, db_session): self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource2, "__any_permission__", db_session=db_session ) second = [ PermissionTuple( self.user2, "foo_perm", "user", None, self.resource2, False, True ), PermissionTuple( self.user3, "test_perm", "user", None, self.resource2, False, True ), ] check_one_in_other(perms, second) def test_resource_users_limited_users(self, db_session): self.maxDiff = 9999 self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", user_ids=[self.user.id], db_session=db_session, ) second = [ PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_users_limited_group(self, db_session): self.maxDiff = 9999 self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", user_ids=[self.user.id], group_ids=[self.group2.id], db_session=db_session, ) second = [ PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_users_limited_group_other_user_3(self, db_session): self.maxDiff = 9999 self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource2, "__any_permission__", user_ids=[self.user3.id], db_session=db_session, ) second = [ PermissionTuple( self.user3, "test_perm", "user", None, self.resource2, False, True ) ] check_one_in_other(perms, second) def test_resource_users_limited_group_other_user_4(self, db_session): self.maxDiff = 9999 self.set_up_user_group_and_perms(db_session) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", user_ids=[self.user4.id], group_ids=[self.group2.id], db_session=db_session, ) second = [ PermissionTuple( self.user4, "group_perm", "group", self.group2, self.resource, False, True, ) ] check_one_in_other(perms, second) def test_resource_users_limited_group_ownage(self, db_session): self.maxDiff = 9999 self.set_up_user_group_and_perms(db_session) resource = ResourceTestobjB( resource_id=99, resource_name="other", owner_user_id=self.user2.id ) group3 = add_group(db_session, "group 3") user2_permission = UserResourcePermission( perm_name="foo_perm", user_id=self.user2.id ) group3_permission = GroupResourcePermission( perm_name="group_perm", group_id=group3.id ) resource.group_permissions.append(group3_permission) resource.user_permissions.append(user2_permission) group3.users.append(self.user3) self.user.resources.append(resource) self.group2.resources.append(resource) db_session.flush() perms = ResourceService.users_for_perm( resource, "__any_permission__", db_session=db_session ) second = [ PermissionTuple( self.user2, "foo_perm", "user", None, resource, False, True ), PermissionTuple( self.user, ALL_PERMISSIONS, "user", None, resource, True, True ), PermissionTuple( self.user4, ALL_PERMISSIONS, "group", self.group2, resource, True, True ), PermissionTuple( self.user3, "group_perm", "group", group3, resource, False, True ), ] check_one_in_other(perms, second) def test_users_for_perms(self, db_session): user = User(user_name="aaa", email="aaa", status=0) UserService.set_password(user, "password") aaa_perm = UserPermission(perm_name="aaa") bbb_perm = UserPermission(perm_name="bbb") bbb2_perm = UserPermission(perm_name="bbb") user.user_permissions.append(aaa_perm) user.user_permissions.append(bbb_perm) user2 = User(user_name="bbb", email="bbb", status=0) UserService.set_password(user2, "password") user2.user_permissions.append(bbb2_perm) user3 = User(user_name="ccc", email="ccc", status=0) UserService.set_password(user3, "password") group = add_group(db_session) group.users.append(user3) db_session.add(user) db_session.add(user2) db_session.flush() users = UserService.users_for_perms(["aaa"], db_session=db_session) assert len(users.all()) == 1 assert users[0].user_name == "aaa" users = UserService.users_for_perms(["bbb"], db_session=db_session).all() assert len(users) == 2 assert ["aaa", "bbb"] == sorted([u.user_name for u in users]) users = UserService.users_for_perms( ["aaa", "bbb", "manage_apps"], db_session=db_session ) assert ["aaa", "bbb", "ccc"] == sorted([u.user_name for u in users]) def test_resources_with_possible_perms(self, db_session): self.set_up_user_group_and_perms(db_session) resource = ResourceTestobjB( resource_id=3, resource_name="other", owner_user_id=self.user.id ) self.user.resources.append(resource) resource_g = ResourceTestobjB(resource_id=4, resource_name="group owned") self.group.resources.append(resource_g) db_session.flush() perms = UserService.resources_with_possible_perms( self.user, db_session=db_session ) second = [ PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, ALL_PERMISSIONS, "user", None, resource, True, True ), PermissionTuple( self.user, ALL_PERMISSIONS, "group", self.group, resource_g, True, True ), ] check_one_in_other(perms, second) def test_resource_users_for_any_perm_additional_users(self, db_session): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", db_session=db_session ) second = [ PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( user6, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( user7, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "group_perm2", "group", self.group, self.resource, False, True, ), PermissionTuple( user6, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( user7, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( self.user4, "group_perm", "group", self.group2, self.resource, False, True, ), ] check_one_in_other(perms, second) def test_resource_users_for_any_perm_limited_group_perms(self, db_session): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", limit_group_permissions=True, db_session=db_session, ) second = [ PermissionTuple( None, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( None, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( None, "group_perm", "group", self.group2, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_groups_for_any_perm_additional_users(self, db_session): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) perms = ResourceService.groups_for_perm( self.resource, "__any_permission__", db_session=db_session ) second = [ PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( user6, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( user7, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "group_perm2", "group", self.group, self.resource, False, True, ), PermissionTuple( user6, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( user7, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( self.user4, "group_perm", "group", self.group2, self.resource, False, True, ), ] check_one_in_other(perms, second) def test_resource_groups_for_any_perm_just_group_perms_limited(self, db_session): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) perms = ResourceService.groups_for_perm( self.resource, "__any_permission__", limit_group_permissions=True, db_session=db_session, ) second = [ PermissionTuple( None, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( None, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( None, "group_perm", "group", self.group2, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_users_for_any_perm_excluding_group_perms(self, db_session): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", limit_group_permissions=True, skip_group_perms=True, db_session=db_session, ) second = [ PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_groups_for_any_perm_just_group_perms_limited_empty_group( self, db_session ): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) group3 = add_group(db_session, "Empty group") perm3 = GroupResourcePermission( perm_name="group_permx", resource_id=self.resource.resource_id ) group3.resource_permissions.append(perm3) perms = ResourceService.groups_for_perm( self.resource, "__any_permission__", limit_group_permissions=True, db_session=db_session, ) second = [ PermissionTuple( None, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( None, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( None, "group_perm", "group", self.group2, self.resource, False, True ), PermissionTuple( None, "group_permx", "group", group3, self.resource, False, True ), ] check_one_in_other(perms, second) def test_resource_users_for_any_perm_limited_group_perms_empty_group( self, db_session ): self.maxDiff = 99999 self.set_up_user_group_and_perms(db_session) user6 = add_user(db_session, 6, "user 6") user7 = add_user(db_session, 7, "user 7") perm2 = GroupResourcePermission( perm_name="group_perm2", resource_id=self.resource.resource_id ) self.group.resource_permissions.append(perm2) self.group.users.append(user6) self.group.users.append(user7) group3 = add_group(db_session, "Empty group") perm3 = GroupResourcePermission( perm_name="group_permx", resource_id=self.resource.resource_id ) group3.resource_permissions.append(perm3) perms = ResourceService.users_for_perm( self.resource, "__any_permission__", limit_group_permissions=True, db_session=db_session, ) second = [ PermissionTuple( None, "group_perm", "group", self.group, self.resource, False, True ), PermissionTuple( None, "group_perm2", "group", self.group, self.resource, False, True ), PermissionTuple( self.user, "test_perm2", "user", None, self.resource, False, True ), PermissionTuple( self.user, "foo_perm", "user", None, self.resource, False, True ), PermissionTuple( None, "group_perm", "group", self.group2, self.resource, False, True ), PermissionTuple( None, "group_permx", "group", group3, self.resource, False, True ), ] check_one_in_other(perms, second) def test_get_resource_permission(self, db_session): created_user = add_user(db_session) resource = add_resource(db_session, 1, "test_resource") permission = UserResourcePermission( perm_name="test_perm", user_id=created_user.id, resource_id=resource.resource_id, ) resource.user_permissions.append(permission) db_session.flush() perm = UserResourcePermissionService.get( user_id=created_user.id, resource_id=resource.resource_id, perm_name="test_perm", db_session=db_session, ) assert perm.perm_name == "test_perm" assert perm.resource_id == resource.resource_id assert perm.user_id == created_user.id class TestGroupPermission(BaseTestCase): def test_repr(self, db_session): group_permission = GroupPermission(group_id=1, perm_name="perm") assert repr(group_permission) == "<GroupPermission: perm>" def test_get(self, db_session): org_group = add_group(db_session, "group1") group = GroupPermissionService.get( group_id=org_group.id, perm_name="manage_apps", db_session=db_session ) assert group.group_id == 1 assert group.perm_name == "manage_apps" def test_by_group_and_perm(self, db_session): add_group(db_session) queried = GroupPermissionService.by_group_and_perm( 1, "manage_apps", db_session=db_session ) assert queried.group_id == 1 assert queried.perm_name == "manage_apps" def test_by_group_and_perm_wrong_group(self, db_session): add_group(db_session) queried = GroupPermissionService.by_group_and_perm( 2, "manage_apps", db_session=db_session ) assert queried is None def test_by_group_and_perm_wrong_perm(self, db_session): add_group(db_session) queried = GroupPermissionService.by_group_and_perm( 1, "wrong_perm", db_session=db_session ) assert queried is None def test_resources_with_possible_perms(self, db_session): self.set_up_user_group_and_perms(db_session) perms = GroupService.resources_with_possible_perms(self.group) second = [ PermissionTuple( None, "group_perm", "group", self.group, self.resource, False, True ) ] check_one_in_other(perms, second) def test_resources_with_possible_perms_group2(self, db_session): self.set_up_user_group_and_perms(db_session) resource3 = add_resource_b(db_session, 3, "other resource") self.group2.resources.append(resource3) group_permission2 = GroupResourcePermission( perm_name="group_perm2", group_id=self.group2.id ) self.resource2.group_permissions.append(group_permission2) perms = GroupService.resources_with_possible_perms(self.group2) second = [ PermissionTuple( None, "group_perm", "group", self.group2, self.resource, False, True ), PermissionTuple( None, "group_perm2", "group", self.group2, self.resource2, False, True ), PermissionTuple( None, ALL_PERMISSIONS, "group", self.group2, resource3, True, True ), ] check_one_in_other(perms, second) def test_group_resource_permission(self, db_session): self.set_up_user_group_and_perms(db_session) add_resource_b(db_session, 3, "other resource") db_session.flush() group_permission2 = GroupResourcePermission( perm_name="group_perm2", group_id=self.group2.id ) row = GroupResourcePermissionService.get( group_id=self.group2.id, resource_id=self.resource2.resource_id, perm_name="group_perm2", db_session=db_session, ) assert row is None self.resource2.group_permissions.append(group_permission2) row = GroupResourcePermissionService.get( group_id=self.group2.id, resource_id=self.resource2.resource_id, perm_name="group_perm2", db_session=db_session, ) assert row is not None def test_group_resource_permission_wrong(self, db_session): self.set_up_user_group_and_perms(db_session) perm_name = "group_permX" perm = ResourceService.perm_by_group_and_perm_name( resource_id=self.resource.resource_id, group_id=self.group.id, perm_name=perm_name, db_session=db_session, ) assert perm is None def test_group_resource_permission2(self, db_session): self.set_up_user_group_and_perms(db_session) perm_name = "group_perm" perm = ResourceService.perm_by_group_and_perm_name( resource_id=self.resource.resource_id, group_id=self.group.id, perm_name=perm_name, db_session=db_session, ) assert perm.group_id == self.group.id assert perm.resource_id == self.resource.resource_id assert perm.perm_name == perm_name class TestUserPermission(BaseTestCase): def test_repr(self, db_session): user_permission = UserPermission(user_id=1, perm_name="perm") assert repr(user_permission) == "<UserPermission: perm>" def test_get(self, db_session): user = add_user(db_session) perm = UserPermissionService.get( user_id=user.id, perm_name="root", db_session=db_session ) assert perm.user_id == user.id assert perm.perm_name == "root" def test_by_user_and_perm(self, db_session): add_user(db_session) user_permission = UserPermissionService.by_user_and_perm( 1, "root", db_session=db_session ) assert user_permission.user_id == 1 assert user_permission.perm_name == "root" def test_by_user_and_perm_wrong_username(self, db_session): add_user(db_session) user_permission = UserPermissionService.by_user_and_perm( 999, "root", db_session=db_session ) assert user_permission is None def test_by_user_and_perm_wrong_permname(self, db_session): add_user(db_session) user_permission = UserPermissionService.by_user_and_perm( 1, "wrong", db_session=db_session ) assert user_permission is None
37.34357
88
0.612022
4,176
38,912
5.365182
0.037835
0.098014
0.045526
0.054363
0.879848
0.823031
0.780317
0.743539
0.727561
0.718947
0
0.013762
0.297852
38,912
1,041
89
37.379443
0.806273
0.002904
0
0.679285
0
0
0.062534
0
0
0
0
0
0.044164
1
0.050473
false
0.003155
0.012618
0
0.066246
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
641dfd3f82c50b129dcf2d935fc5c8f6104d2c1a
161
py
Python
revscoring/revscoring/languages/features/dictionary/tests/test_util.py
yafeunteun/wikipedia-spam-classifier
fca782b39b287fbc0b2dd54f8e2bf33c6d3bc519
[ "MIT" ]
2
2016-10-26T18:58:53.000Z
2017-06-22T20:11:20.000Z
revscoring/revscoring/languages/features/dictionary/tests/test_util.py
yafeunteun/wikipedia-spam-classifier
fca782b39b287fbc0b2dd54f8e2bf33c6d3bc519
[ "MIT" ]
null
null
null
revscoring/revscoring/languages/features/dictionary/tests/test_util.py
yafeunteun/wikipedia-spam-classifier
fca782b39b287fbc0b2dd54f8e2bf33c6d3bc519
[ "MIT" ]
null
null
null
from nose.tools import eq_ from ..util import utf16_cleanup def test_utf16_cleanup(): eq_(utf16_cleanup("Foobar" + chr(2 ** 16)), "Foobar\uFFFD")
17.888889
47
0.677019
23
161
4.478261
0.652174
0.349515
0
0
0
0
0
0
0
0
0
0.069231
0.192547
161
8
48
20.125
0.723077
0
0
0
0
0
0.111801
0
0
0
0
0
0
1
0.2
true
0
0.4
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
1
0
1
0
1
0
0
6
643356b0b42e24450c9db6f057bc342c9400746c
116
py
Python
guildwars2/guild/__init__.py
n1tr0-5urf3r/GW2Bot
788e94926766ac16661211cb528be47629b0ad07
[ "MIT" ]
75
2017-05-06T18:53:34.000Z
2022-01-10T08:02:48.000Z
guildwars2/guild/__init__.py
n1tr0-5urf3r/GW2Bot
788e94926766ac16661211cb528be47629b0ad07
[ "MIT" ]
81
2017-05-07T18:04:06.000Z
2021-12-13T13:34:45.000Z
guildwars2/guild/__init__.py
n1tr0-5urf3r/GW2Bot
788e94926766ac16661211cb528be47629b0ad07
[ "MIT" ]
56
2017-05-07T06:58:29.000Z
2022-03-28T23:23:42.000Z
from .general import GeneralGuild from .sync import GuildSync class GuildMixin(GeneralGuild, GuildSync): pass
16.571429
42
0.793103
13
116
7.076923
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.155172
116
6
43
19.333333
0.938776
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
ff390f1c78c4b2350ac89e8b55df3651f99bb7d5
36
py
Python
vnpy/gateway/sec/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
19,529
2015-03-02T12:17:35.000Z
2022-03-31T17:18:27.000Z
vnpy/gateway/sec/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
2,186
2015-03-04T23:16:33.000Z
2022-03-31T03:44:01.000Z
vnpy/gateway/sec/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
8,276
2015-03-02T05:21:04.000Z
2022-03-31T13:13:13.000Z
from .sec_gateway import SecGateway
18
35
0.861111
5
36
6
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
1
36
36
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ff3d3ed279a1850ba4785d212475832f6102bcfe
288
py
Python
test/unit/metrics/utils.py
alliesaizan/fairlearn
846ce6cdaf188e32a545d3f90197515a4a5bc471
[ "MIT" ]
1,142
2019-10-14T18:05:46.000Z
2022-03-30T06:56:54.000Z
test/unit/metrics/utils.py
alliesaizan/fairlearn
846ce6cdaf188e32a545d3f90197515a4a5bc471
[ "MIT" ]
623
2019-10-14T17:11:25.000Z
2022-03-31T17:46:54.000Z
test/unit/metrics/utils.py
alliesaizan/fairlearn
846ce6cdaf188e32a545d3f90197515a4a5bc471
[ "MIT" ]
299
2019-10-15T00:09:53.000Z
2022-03-30T12:35:27.000Z
# Copyright (c) Microsoft Corporation and Fairlearn contributors. # Licensed under the MIT License. import fairlearn.metrics as metrics def _get_raw_MetricFrame(): # Gets an uninitialised MetricFrame for testing purposes return metrics.MetricFrame.__new__(metrics.MetricFrame)
28.8
65
0.802083
34
288
6.588235
0.794118
0.160714
0
0
0
0
0
0
0
0
0
0
0.142361
288
9
66
32
0.906883
0.520833
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
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
1
0
1
1
1
0
0
6
ff8af24bea3735f79c333dd490eca9b96b47bda2
113
py
Python
cytominer_eval/operations/__init__.py
hillsbury/cytominer-eval
56bd9e545d4ce5dea8c2d3897024a4eb241d06db
[ "BSD-3-Clause" ]
null
null
null
cytominer_eval/operations/__init__.py
hillsbury/cytominer-eval
56bd9e545d4ce5dea8c2d3897024a4eb241d06db
[ "BSD-3-Clause" ]
null
null
null
cytominer_eval/operations/__init__.py
hillsbury/cytominer-eval
56bd9e545d4ce5dea8c2d3897024a4eb241d06db
[ "BSD-3-Clause" ]
null
null
null
from .percent_strong import percent_strong from .precision_recall import precision_recall from .grit import grit
28.25
46
0.867257
16
113
5.875
0.4375
0.276596
0
0
0
0
0
0
0
0
0
0
0.106195
113
3
47
37.666667
0.930693
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
44162499513d25160459c56fac5a7f8e586c1da1
2,244
py
Python
tests/math/unary/test_hyperbolictrig.py
Zac-HD/MyGrad
fbc375d28842e1af1ebaf62ca6da479609a6baf6
[ "MIT" ]
null
null
null
tests/math/unary/test_hyperbolictrig.py
Zac-HD/MyGrad
fbc375d28842e1af1ebaf62ca6da479609a6baf6
[ "MIT" ]
2
2017-08-02T01:47:51.000Z
2017-08-12T22:34:50.000Z
tests/math/unary/test_hyperbolictrig.py
Zac-HD/MyGrad
fbc375d28842e1af1ebaf62ca6da479609a6baf6
[ "MIT" ]
null
null
null
import numpy as np from mygrad import cosh, coth, csch, sech, sinh, tanh from tests.wrappers.uber import backprop_test_factory, fwdprop_test_factory def _is_nonzero(x): return np.all(np.abs(x.data) > 1e-8) @fwdprop_test_factory( mygrad_func=sinh, true_func=np.sinh, index_to_bnds={0: (-10, 10)}, num_arrays=1 ) def test_sinh_fwd(): pass @backprop_test_factory( mygrad_func=sinh, true_func=np.sinh, index_to_bnds={0: (-10, 10)}, num_arrays=1 ) def test_sinh_backward(): pass @fwdprop_test_factory( mygrad_func=cosh, true_func=np.cosh, index_to_bnds={0: (-10, 10)}, num_arrays=1 ) def test_cosh_fwd(): pass @backprop_test_factory( mygrad_func=cosh, true_func=np.cosh, index_to_bnds={0: (-10, 10)}, atol=1e-5, num_arrays=1, ) def test_cosh_backward(): pass @fwdprop_test_factory( mygrad_func=tanh, true_func=np.tanh, index_to_bnds={0: (-10, 10)}, num_arrays=1 ) def test_tanh_fwd(): pass @backprop_test_factory( mygrad_func=tanh, true_func=np.tanh, index_to_bnds={0: (-10, 10)}, atol=1e-5, num_arrays=1, ) def test_tanh_backward(): pass @fwdprop_test_factory( mygrad_func=csch, true_func=lambda x: 1 / np.sinh(x), index_to_bnds={0: (0.001, 10)}, num_arrays=1, ) def test_csch_fwd(): pass @backprop_test_factory( mygrad_func=csch, true_func=lambda x: 1 / np.sinh(x), index_to_bnds={0: (0.001, 10)}, num_arrays=1, ) def test_csch_backward(): pass @fwdprop_test_factory( mygrad_func=sech, true_func=lambda x: 1 / np.cosh(x), index_to_bnds={0: (-10, 10)}, num_arrays=1, ) def test_sech_fwd(): pass @backprop_test_factory( mygrad_func=sech, true_func=lambda x: 1 / np.cosh(x), index_to_bnds={0: (0.001, 10)}, atol=1e-5, num_arrays=1, ) def test_sech_backward(): pass @fwdprop_test_factory( mygrad_func=coth, true_func=lambda x: 1 / np.tanh(x), index_to_bnds={0: (-10, 10)}, assumptions=_is_nonzero, num_arrays=1, ) def test_coth_fwd(): pass @backprop_test_factory( mygrad_func=coth, true_func=lambda x: 1 / np.tanh(x), index_to_bnds={0: (0.001, 10)}, atol=1e-5, num_arrays=1, ) def test_coth_backward(): pass
18.393443
83
0.667558
368
2,244
3.755435
0.127717
0.111433
0.147612
0.182344
0.863965
0.8589
0.823444
0.686686
0.686686
0.686686
0
0.052863
0.190731
2,244
121
84
18.545455
0.70815
0
0
0.617021
0
0
0
0
0
0
0
0
0
1
0.138298
false
0.12766
0.031915
0.010638
0.180851
0
0
0
0
null
0
0
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
6
9244ebfd6d415914bf8fb0696b6cfab97096c3f1
19,961
py
Python
src/ezdxf/tools/pattern.py
hh-wu/ezdxf
62509ba39b826ee9b36f19c0a5abad7f3518186a
[ "MIT" ]
null
null
null
src/ezdxf/tools/pattern.py
hh-wu/ezdxf
62509ba39b826ee9b36f19c0a5abad7f3518186a
[ "MIT" ]
null
null
null
src/ezdxf/tools/pattern.py
hh-wu/ezdxf
62509ba39b826ee9b36f19c0a5abad7f3518186a
[ "MIT" ]
null
null
null
# Purpose: Standard definitions # Created: 08.07.2015 # Copyright (c) 2015-2020, Manfred Moitzi # License: MIT License # pattern type: predefined (1) from ezdxf.math import Vec2 PATTERN_NEW = { "ANSI31": [[45.0, (0.0, 0.0), (-2.2627, 2.2627), []]], "ANSI32": [ [45.0, (0.0, 0.0), (-6.7882, 6.7882), []], [45.0, (4.5255, 0.0), (-6.7882, 6.7882), []], ], "ANSI33": [ [45.0, (512.0, 0.0), (-4.5255, 4.5255), []], [45.0, (516.5255, 0.0), (-4.5255, 4.5255), [3.2, -1.6]], ], "ANSI34": [ [45.0, (0.0, 0.0), (-13.5765, 13.5765), []], [45.0, (4.5255, 0.0), (-13.5765, 13.5765), []], [45.0, (9.051, 0.0), (-13.5765, 13.5765), []], [45.0, (13.5765, 0.0), (-13.5765, 13.5765), []], ], "ANSI35": [ [45.0, (-1024.0, -256.0), (-4.5255, 4.5255), []], [45.0, (-1019.4745, -256.0), (-4.5255, 4.5255), [8.0, -1.6, 0.0, -1.6]], ], "ANSI36": [[45.0, (-1024.0, -256.0), (1.6971, 6.2225), [8.0, -1.6, 0.0, -1.6]]], "ANSI37": [ [45.0, (0.0, 0.0), (-2.2627, 2.2627), []], [135.0, (0.0, 0.0), (-2.2627, -2.2627), []], ], "ANSI38": [ [45.0, (0.0, 0.0), (-2.2627, 2.2627), []], [135.0, (0.0, 0.0), (-6.7882, 2.2627), [8.0, -4.8]], ], "ACAD_ISO02W100": [[0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68]]], "ACAD_ISO03W100": [[0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -46.08]]], "ACAD_ISO04W100": [[0.0, (0.0, 0.0), (0.0, 12.8), [61.44, -7.68, 1.28, -7.68]]], "ACAD_ISO05W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [61.44, -7.68, 1.28, -7.68, 1.28, -7.68]] ], "ACAD_ISO06W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [61.44, -7.68, 1.28, -7.68, 1.28, -16.64]], [0.0, (0.0, 0.0), (0.0, 12.8), [-87.04, 1.28, -7.68]], ], "ACAD_ISO07W100": [[0.0, (0.0, 0.0), (0.0, 12.8), [1.28, -7.68]]], "ACAD_ISO08W100": [[0.0, (0.0, 0.0), (0.0, 12.8), [61.44, -7.68, 15.36, -7.68]]], "ACAD_ISO09W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [61.44, -7.68, 15.36, -7.68, 15.36, -7.68]] ], "ACAD_ISO10W100": [[0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68, 1.28, -7.68]]], "ACAD_ISO11W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68, 30.72, -7.68, 1.28, -7.68]] ], "ACAD_ISO12W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68, 1.28, -7.68, 1.28, -7.68]] ], "ACAD_ISO13W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68, 30.72, -7.68, 1.28, -16.64]], [0.0, (0.0, 0.0), (0.0, 12.8), [-85.76, 1.28, -7.68]], ], "ACAD_ISO14W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68, 1.28, -7.68, 1.28, -16.64]], [0.0, (0.0, 0.0), (0.0, 12.8), [-56.32, 1.28, -7.68]], ], "ACAD_ISO15W100": [ [0.0, (0.0, 0.0), (0.0, 12.8), [30.72, -7.68, 30.72, -7.68, 1.28, -25.6]], [0.0, (0.0, 0.0), (0.0, 12.8), [-85.76, 1.28, -7.68, 1.28, -7.68]], ], "ANGLE": [ [0.0, (0.0, 0.0), (0.0, 7.04), [5.12, -1.92]], [90.0, (0.0, 0.0), (-7.04, 0.0), [5.12, -1.92]], ], "AR-B816": [ [0.0, (0.0, 0.0), (0.0, 20.48), []], [90.0, (0.0, 0.0), (-20.48, 20.48), [20.48, -20.48]], ], "AR-B816C": [ [0.0, (0.0, 0.0), (20.48, 20.48), [40.0, -0.96]], [0.0, (-20.48, 0.96), (20.48, 20.48), [40.0, -0.96]], [90.0, (0.0, 0.0), (-20.48, 20.48), [-21.44, 19.52]], [90.0, (-0.96, 0.0), (-20.48, 20.48), [-21.44, 19.52]], ], "AR-B88": [ [0.0, (0.0, 0.0), (0.0, 20.48), []], [90.0, (0.0, 0.0), (-10.24, 20.48), [20.48, -20.48]], ], "AR-BRELM": [ [0.0, (0.0, 0.0), (0.0, 68.2752), [97.6, -4.8]], [0.0, (0.0, 28.8), (0.0, 68.2752), [97.6, -4.8]], [0.0, (25.6, 34.1376), (0.0, 68.2752), [46.4, -4.8]], [0.0, (25.6, 62.9376), (0.0, 68.2752), [46.4, -4.8]], [90.0, (0.0, 0.0), (-102.4, 0.0), [28.8, -39.4752]], [90.0, (-4.8, 0.0), (-102.4, 0.0), [28.8, -39.4752]], [90.0, (25.6, 34.1376), (-51.2, 0.0), [28.8, -39.4752]], [90.0, (20.8, 34.1376), (-51.2, 0.0), [28.8, -39.4752]], ], "AR-BRSTD": [ [0.0, (0.0, 0.0), (0.0, 68.2752), []], [90.0, (0.0, 0.0), (-102.4, 68.2752), [68.2752, -68.2752]], ], "AR-CONC": [ [50.0, (0.0, 0.0), (36.7237, -3.2129), [3.84, -42.24]], [355.0, (0.0, 0.0), (-7.1041, 38.5122), [3.072, -33.792]], [100.4514, (3.0603, -0.2677), (29.6197, 35.2993), [3.2635, -35.8985]], [46.1842, (0.0, 10.24), (54.6428, -8.4746), [5.76, -63.36]], [96.6356, (4.5536, 9.5338), (47.8547, 49.8749), [4.8952, -53.8477]], [351.1842, (0.0, 10.24), (47.8547, 49.8749), [4.608, -50.688]], [21.0, (5.12, 7.68), (30.5616, -20.6141), [3.84, -42.24]], [326.0, (5.12, 7.68), (12.4577, 37.1277), [3.072, -33.792]], [71.4514, (7.6668, 5.9622), (43.0194, 16.5136), [3.2635, -35.8985]], [ 37.5, (0.0, 0.0), (0.6226, 17.0442), [0.0, -33.3824, 0.0, -34.304, 0.0, -33.92], ], [ 7.5, (0.0, 0.0), (13.4692, 20.1939), [0.0, -19.5584, 0.0, -32.6144, 0.0, -12.928], ], [ 327.5, (-11.4176, 0.0), (27.3317, -1.1548), [0.0, -12.8, 0.0, -39.936, 0.0, -52.992], ], [ 317.5, (-16.5376, 0.0), (29.8591, 5.1254), [0.0, -16.64, 0.0, -26.5216, 0.0, -37.632], ], ], "AR-HBONE": [ [45.0, (0.0, 0.0), (0.0, 28.9631), [61.44, -20.48]], [135.0, (14.4815, 14.4815), (0.0, 28.9631), [61.44, -20.48]], ], "AR-PARQ1": [ [90.0, (0.0, 0.0), (-61.44, 61.44), [61.44, -61.44]], [90.0, (10.24, 0.0), (-61.44, 61.44), [61.44, -61.44]], [90.0, (20.48, 0.0), (-61.44, 61.44), [61.44, -61.44]], [90.0, (30.72, 0.0), (-61.44, 61.44), [61.44, -61.44]], [90.0, (40.96, 0.0), (-61.44, 61.44), [61.44, -61.44]], [90.0, (51.2, 0.0), (-61.44, 61.44), [61.44, -61.44]], [90.0, (61.44, 0.0), (-61.44, 61.44), [61.44, -61.44]], [0.0, (0.0, 61.44), (61.44, -61.44), [61.44, -61.44]], [0.0, (0.0, 71.68), (61.44, -61.44), [61.44, -61.44]], [0.0, (0.0, 81.92), (61.44, -61.44), [61.44, -61.44]], [0.0, (0.0, 92.16), (61.44, -61.44), [61.44, -61.44]], [0.0, (0.0, 102.4), (61.44, -61.44), [61.44, -61.44]], [0.0, (0.0, 112.64), (61.44, -61.44), [61.44, -61.44]], [0.0, (0.0, 122.88), (61.44, -61.44), [61.44, -61.44]], ], "AR-RROOF": [ [0.0, (0.0, 0.0), (56.32, 25.6), [384.0, -51.2, 128.0, -25.6]], [0.0, (34.048, 12.8), (-25.6, 34.048), [76.8, -8.448, 153.6, -19.2]], [0.0, (12.8, 21.76), (133.12, 17.152), [204.8, -35.84, 102.4, -25.6]], ], "AR-RSHKE": [ [0.0, (0.0, 0.0), (65.28, 30.72), [15.36, -12.8, 17.92, -7.68, 23.04, -10.24]], [0.0, (15.36, 1.28), (65.28, 30.72), [12.8, -48.64, 10.24, -15.36]], [0.0, (46.08, -1.92), (65.28, 30.72), [7.68, -79.36]], [90.0, (0.0, 0.0), (-21.76, 30.72), [29.44, -93.44]], [90.0, (15.36, 0.0), (-21.76, 30.72), [28.8, -94.08]], [90.0, (28.16, 0.0), (-21.76, 30.72), [26.88, -96.0]], [90.0, (46.08, -1.92), (-21.76, 30.72), [29.44, -93.44]], [90.0, (53.76, -1.92), (-21.76, 30.72), [29.44, -93.44]], [90.0, (76.8, 0.0), (-21.76, 30.72), [28.16, -94.72]], ], "AR-SAND": [ [37.5, (0.0, 0.0), (-1.6126, 49.3267), [0.0, -38.912, 0.0, -43.52, 0.0, -41.6]], [ 7.5, (0.0, 0.0), (45.3063, 72.2469), [0.0, -20.992, 0.0, -35.072, 0.0, -13.44], ], [ 327.5, (-31.488, 0.0), (79.722, 0.1449), [0.0, -12.8, 0.0, -46.08, 0.0, -60.16], ], [ 317.5, (-31.488, 0.0), (76.9568, 22.4685), [0.0, -6.4, 0.0, -30.208, 0.0, -34.56], ], ], "BOX": [ [90.0, (0.0, 0.0), (-25.6, 0.0), []], [90.0, (6.4, 0.0), (-25.6, 0.0), []], [0.0, (0.0, 0.0), (0.0, 25.6), [-6.4, 6.4]], [0.0, (0.0, 6.4), (0.0, 25.6), [-6.4, 6.4]], [0.0, (0.0, 12.8), (0.0, 25.6), [6.4, -6.4]], [0.0, (0.0, 19.2), (0.0, 25.6), [6.4, -6.4]], [90.0, (12.8, 0.0), (-25.6, 0.0), [6.4, -6.4]], [90.0, (19.2, 0.0), (-25.6, 0.0), [6.4, -6.4]], ], "BRASS": [ [0.0, (0.0, 0.0), (0.0, 6.4), []], [0.0, (0.0, 3.2), (0.0, 6.4), [3.2, -1.6]], ], "BRICK": [ [0.0, (0.0, 0.0), (0.0, 6.4), []], [90.0, (0.0, 0.0), (-12.8, 0.0), [6.4, -6.4]], [90.0, (6.4, 0.0), (-12.8, 0.0), [-6.4, 6.4]], ], "BRSTONE": [ [0.0, (0.0, 0.0), (0.0, 8.448), []], [90.0, (23.04, 0.0), (-12.8, 8.448), [8.448, -8.448]], [90.0, (20.48, 0.0), (-12.8, 8.448), [8.448, -8.448]], [0.0, (23.04, 1.408), (12.8, 8.448), [-23.04, 2.56]], [0.0, (23.04, 2.816), (12.8, 8.448), [-23.04, 2.56]], [0.0, (23.04, 4.224), (12.8, 8.448), [-23.04, 2.56]], [0.0, (23.04, 5.632), (12.8, 8.448), [-23.04, 2.56]], [0.0, (23.04, 7.04), (12.8, 8.448), [-23.04, 2.56]], ], "CLAY": [ [0.0, (0.0, 0.0), (0.0, 4.8), []], [0.0, (0.0, 0.8), (0.0, 4.8), []], [0.0, (0.0, 1.6), (0.0, 4.8), []], [0.0, (0.0, 3.2), (0.0, 4.8), [4.8, -3.2]], ], "CORK": [ [0.0, (0.0, 0.0), (0.0, 3.2), []], [135.0, (1.6, -1.6), (-6.4, -6.4), [4.5255, -4.5255]], [135.0, (2.4, -1.6), (-6.4, -6.4), [4.5255, -4.5255]], [135.0, (3.2, -1.6), (-6.4, -6.4), [4.5255, -4.5255]], ], "CROSS": [ [0.0, (0.0, 0.0), (6.4, 6.4), [3.2, -9.6]], [90.0, (1.6, -1.6), (-6.4, 6.4), [3.2, -9.6]], ], "DASH": [[0.0, (0.0, 0.0), (3.2, 3.2), [3.2, -3.2]]], "DOLMIT": [ [0.0, (0.0, 0.0), (0.0, 6.4), []], [45.0, (0.0, 0.0), (-12.8, 12.8), [9.051, -18.1019]], ], "DOTS": [[0.0, (0.0, 0.0), (0.8, 1.6), [0.0, -1.6]]], "EARTH": [ [0.0, (0.0, 0.0), (6.4, 6.4), [6.4, -6.4]], [0.0, (0.0, 2.4), (6.4, 6.4), [6.4, -6.4]], [0.0, (0.0, 4.8), (6.4, 6.4), [6.4, -6.4]], [90.0, (0.8, 5.6), (-6.4, 6.4), [6.4, -6.4]], [90.0, (3.2, 5.6), (-6.4, 6.4), [6.4, -6.4]], [90.0, (5.6, 5.6), (-6.4, 6.4), [6.4, -6.4]], ], "ESCHER": [ [60.0, (0.0, 0.0), (-30.72, -0.0), [28.16, -2.56]], [180.0, (0.0, 0.0), (15.36, -26.6043), [28.16, -2.56]], [300.0, (0.0, 0.0), (30.72, -0.0), [28.16, -2.56]], [60.0, (2.56, 0.0), (-30.72, -0.0), [5.12, -25.6]], [300.0, (2.56, 0.0), (30.72, -0.0), [5.12, -25.6]], [60.0, (-1.28, 2.217), (-30.72, -0.0), [5.12, -25.6]], [180.0, (-1.28, 2.217), (15.36, -26.6043), [5.12, -25.6]], [300.0, (-1.28, -2.217), (30.72, -0.0), [5.12, -25.6]], [180.0, (-1.28, -2.217), (15.36, -26.6043), [5.12, -25.6]], [60.0, (-10.24, 0.0), (-30.72, -0.0), [5.12, -25.6]], [300.0, (-10.24, 0.0), (30.72, -0.0), [5.12, -25.6]], [60.0, (5.12, -8.8681), (-30.72, -0.0), [5.12, -25.6]], [180.0, (5.12, -8.8681), (15.36, -26.6043), [5.12, -25.6]], [300.0, (5.12, 8.8681), (30.72, -0.0), [5.12, -25.6]], [180.0, (5.12, 8.8681), (15.36, -26.6043), [5.12, -25.6]], [0.0, (5.12, 4.4341), (-15.36, 26.6043), [17.92, -12.8]], [0.0, (5.12, -4.4341), (-15.36, 26.6043), [17.92, -12.8]], [120.0, (1.28, 6.6511), (-30.72, 0.0), [17.92, -12.8]], [120.0, (-6.4, 2.217), (-30.72, 0.0), [17.92, -12.8]], [240.0, (-6.4, -2.217), (15.36, -26.6043), [17.92, -12.8]], [240.0, (1.28, -6.6511), (15.36, -26.6043), [17.92, -12.8]], ], "FLEX": [ [0.0, (0.0, 0.0), (0.0, 6.4), [6.4, -6.4]], [45.0, (6.4, 0.0), (0.0, 6.4), [1.6, -5.851, 1.6, -9.051]], ], "GOST_GLASS": [ [45.0, (0.0, 0.0), (21.7223, -0.0), [12.8, -17.92]], [45.0, (5.4306, 0.0), (21.7223, -0.0), [5.12, -25.6]], [45.0, (0.0, 5.4306), (21.7223, -0.0), [5.12, -25.6]], ], "GOST_WOOD": [ [90.0, (0.0, 0.0), (30.72, -0.0), [51.2, -10.24]], [90.0, (10.24, -10.24), (30.72, -0.0), [30.72, -7.68, 15.36, -7.68]], [90.0, (20.48, -25.6), (30.72, -0.0), [51.2, -10.24]], ], "GOST_GROUND": [ [45.0, (0.0, 0.0), (72.4077, -0.0), [102.4]], [45.0, (15.36, 0.0), (72.4077, -0.0), [102.4]], [45.0, (30.72, 0.0), (72.4077, -0.0), [102.4]], ], "GRASS": [ [90.0, (0.0, 0.0), (-18.1019, 18.1019), [4.8, -31.4039]], [45.0, (0.0, 0.0), (-18.1019, 18.1019), [4.8, -20.8]], [135.0, (0.0, 0.0), (-18.1019, -18.1019), [4.8, -20.8]], ], "GRATE": [[0.0, (0.0, 0.0), (0.0, 0.8), []], [90.0, (0.0, 0.0), (-3.2, 0.0), []]], "GRAVEL": [ [228.0128, (18.432, 25.6), (-204.8, -230.4), [3.4441, -340.9687]], [184.9697, (16.128, 23.04), (307.2, 25.6), [5.9102, -585.1117]], [132.5104, (10.24, 22.528), (256.0, -281.6), [4.1674, -412.5704]], [267.2737, (0.256, 16.128), (25.6, 512.0), [5.3821, -532.8271]], [292.8337, (0.0, 10.752), (-128.0, 307.2), [5.2776, -522.48]], [357.2737, (2.048, 5.888), (-512.0, 25.6), [5.3821, -532.8271]], [37.6942, (7.424, 5.632), (-332.8, -256.0), [7.1175, -704.6361]], [72.2553, (13.056, 9.984), (179.2, 563.2), [6.7197, -665.2498]], [121.4296, (15.104, 16.384), (-204.8, 332.8), [5.4003, -534.6323]], [175.2364, (12.288, 20.992), (281.6, -25.6), [6.1653, -302.0995]], [222.3974, (6.144, 21.504), (-307.2, -281.6), [7.9731, -789.3344]], [138.8141, (25.6, 15.872), (-179.2, 153.6), [2.7213, -269.4104]], [171.4692, (23.552, 17.664), (332.8, -51.2), [5.1773, -512.5507]], [225.0, (18.432, 18.432), (-0.0, -25.6), [3.6204, -32.5835]], [203.1986, (16.64, 21.504), (128.0, 51.2), [1.9496, -193.0141]], [291.8014, (14.848, 20.736), (-25.6, 76.8), [2.7572, -135.103]], [30.9638, (15.872, 18.176), (76.8, 51.2), [4.4782, -144.7942]], [161.5651, (19.712, 20.48), (51.2, -25.6), [3.2382, -77.7161]], [16.3895, (0.0, 20.736), (256.0, 76.8), [4.5363, -449.0968]], [70.3462, (4.352, 22.016), (-102.4, -281.6), [3.8057, -376.7656]], [293.1986, (19.712, 25.6), (-51.2, 128.0), [3.8993, -191.0645]], [343.6105, (21.248, 22.016), (-256.0, 76.8), [4.5363, -449.0968]], [339.444, (0.0, 4.864), (-128.0, 51.2), [4.3745, -214.352]], [294.7751, (4.096, 3.328), (-128.0, 281.6), [3.6654, -362.8709]], [66.8014, (19.968, 0.0), (51.2, 128.0), [3.8993, -191.0645]], [17.354, (21.504, 3.584), (-332.8, -102.4), [4.2914, -424.8428]], [69.444, (7.424, 0.0), (-51.2, -128.0), [2.1873, -216.5392]], [101.3099, (18.432, 0.0), (-25.6, 102.4), [1.3053, -129.2296]], [165.9638, (18.176, 1.28), (76.8, -25.6), [5.2776, -100.2739]], [186.009, (13.056, 2.56), (256.0, 25.6), [4.8909, -484.1964]], [303.6901, (15.872, 15.872), (-25.6, 51.2), [3.6921, -88.61]], [353.1572, (17.92, 12.8), (435.2, -51.2), [6.4459, -638.1456]], [60.9454, (24.32, 12.032), (-102.4, -179.2), [2.6357, -260.9325]], [90.0, (25.6, 14.336), (-25.6, 25.6), [1.536, -24.064]], [120.2564, (12.544, 3.328), (102.4, -179.2), [3.5565, -352.0901]], [48.0128, (10.752, 6.4), (204.8, 230.4), [6.8882, -337.5245]], [0.0, (15.36, 11.52), (25.6, 25.6), [6.656, -18.944]], [325.3048, (22.016, 11.52), (256.0, -179.2), [4.0477, -400.7238]], [254.0546, (25.344, 9.216), (-25.6, -102.4), [3.7274, -182.6434]], [207.646, (24.32, 5.632), (-486.4, -256.0), [6.0689, -600.8185]], [175.4261, (18.944, 2.816), (-332.8, 25.6), [6.4205, -635.6243]], ], "HEX": [ [0.0, (0.0, 0.0), (0.0, 5.5426), [3.2, -6.4]], [120.0, (0.0, 0.0), (-4.8, -2.7713), [3.2, -6.4]], [60.0, (3.2, 0.0), (-4.8, 2.7713), [3.2, -6.4]], ], "HONEY": [ [0.0, (0.0, 0.0), (4.8, 2.7713), [3.2, -6.4]], [120.0, (0.0, 0.0), (-4.8, 2.7713), [3.2, -6.4]], [60.0, (0.0, 0.0), (0.0, 5.5426), [-6.4, 3.2]], ], "HOUND": [ [0.0, (0.0, 0.0), (6.4, 1.6), [25.6, -12.8]], [90.0, (0.0, 0.0), (-1.6, -6.4), [25.6, -12.8]], ], "INSUL": [ [0.0, (0.0, 0.0), (0.0, 9.6), []], [0.0, (0.0, 3.2), (0.0, 9.6), [3.2, -3.2]], [0.0, (0.0, 6.4), (0.0, 9.6), [3.2, -3.2]], ], "LINE": [[0.0, (0.0, 0.0), (0.0, 3.2), []]], "MUDST": [[0.0, (0.0, 0.0), (12.8, 6.4), [6.4, -6.4, 0.0, -6.4, 0.0, -6.4]]], "NET": [[0.0, (0.0, 0.0), (0.0, 3.2), []], [90.0, (0.0, 0.0), (-3.2, 0.0), []]], "NET3": [ [0.0, (0.0, 0.0), (0.0, 3.2), []], [60.0, (0.0, 0.0), (-2.7713, 1.6), []], [120.0, (0.0, 0.0), (-2.7713, -1.6), []], ], "PLAST": [ [0.0, (0.0, 0.0), (0.0, 6.4), []], [0.0, (0.0, 0.8), (0.0, 6.4), []], [0.0, (0.0, 1.6), (0.0, 6.4), []], ], "PLASTI": [ [0.0, (0.0, 0.0), (0.0, 6.4), []], [0.0, (0.0, 0.8), (0.0, 6.4), []], [0.0, (0.0, 1.6), (0.0, 6.4), []], [0.0, (0.0, 4.0), (0.0, 6.4), []], ], "SACNCR": [ [45.0, (0.0, 0.0), (-1.6971, 1.6971), []], [45.0, (1.6971, 0.0), (-1.6971, 1.6971), [0.0, -2.4]], ], "SQUARE": [ [0.0, (0.0, 0.0), (0.0, 3.2), [3.2, -3.2]], [90.0, (0.0, 0.0), (-3.2, 0.0), [3.2, -3.2]], ], "STARS": [ [0.0, (0.0, 0.0), (0.0, 5.5426), [3.2, -3.2]], [60.0, (0.0, 0.0), (-4.8, 2.7713), [3.2, -3.2]], [120.0, (1.6, 2.7713), (-4.8, -2.7713), [3.2, -3.2]], ], "STEEL": [ [45.0, (0.0, 0.0), (-2.2627, 2.2627), []], [45.0, (0.0, 1.6), (-2.2627, 2.2627), []], ], "SWAMP": [ [0.0, (0.0, 0.0), (12.8, 22.1703), [3.2, -22.4]], [90.0, (1.6, 0.0), (-12.8, 22.1703), [1.6, -42.7405]], [90.0, (2.0, 0.0), (-12.8, 22.1703), [1.28, -43.0605]], [90.0, (1.2, 0.0), (-12.8, 22.1703), [1.28, -43.0605]], [60.0, (2.4, 0.0), (-12.8, 22.1703), [1.024, -24.576]], [120.0, (0.8, 0.0), (-25.6, 0.0), [1.024, -24.576]], ], "TRANS": [ [0.0, (0.0, 0.0), (0.0, 6.4), []], [0.0, (0.0, 3.2), (0.0, 6.4), [3.2, -3.2]], ], "TRIANG": [ [60.0, (0.0, 0.0), (-4.8, 8.3138), [4.8, -4.8]], [120.0, (0.0, 0.0), (-9.6, 0.0), [4.8, -4.8]], [0.0, (-2.4, 4.1569), (4.8, 8.3138), [4.8, -4.8]], ], "ZIGZAG": [ [0.0, (0.0, 0.0), (3.2, 3.2), [3.2, -3.2]], [90.0, (3.2, 0.0), (-3.2, 3.2), [3.2, -3.2]], ], } def load(old_pattern=None): from ezdxf.options import options if old_pattern is not None: use_old = bool(old_pattern) options.use_old_predefined_pattern_scaling = use_old else: use_old = options.use_old_predefined_pattern_scaling return PATTERN_OLD if use_old else PATTERN_NEW def scale_pattern(pattern, factor: float = 1, angle: float = 0, ndigits: int = 4): def _scale(iterable): return [round(i * factor, ndigits) for i in iterable] def _scale_line(line): angle0, base_point, offset, dash_length_items = line if angle: base_point = Vec2(base_point).rotate_deg(angle) offset = Vec2(offset).rotate_deg(angle) angle0 = (angle0 + angle) % 360.0 return [ round(angle0, ndigits), tuple(_scale(base_point)), tuple(_scale(offset)), _scale(dash_length_items) ] return [_scale_line(line) for line in pattern] def scale_all(pattern: dict, factor: float = 1, angle: float = 0, ndigits: int = 4): return {name: scale_pattern(p, factor, angle, ndigits) for name, p in pattern.items()} PATTERN_OLD = scale_all(PATTERN_NEW, factor=0.03906836964688205)
43.299349
90
0.38475
4,015
19,961
1.898132
0.134247
0.208896
0.200367
0.197349
0.529196
0.499278
0.439312
0.40992
0.329484
0.302716
0
0.435041
0.267722
19,961
460
91
43.393478
0.086338
0.006964
0
0.208145
0
0
0.026696
0
0
0
0
0
0
1
0.011312
false
0
0.004525
0.004525
0.027149
0
0
0
1
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
2bd1d28b58763f72536e86090757cedb32c8e0f0
193
py
Python
source/piclient/camerapi/camerahandler_faker.py
rveshovda/pifog
127c2de6ff2666ebc9987d8c2cfd5431ce5ff888
[ "Apache-2.0" ]
1
2017-07-05T06:47:57.000Z
2017-07-05T06:47:57.000Z
source/piclient/camerapi/camerahandler_faker.py
royveshovda/pifog
127c2de6ff2666ebc9987d8c2cfd5431ce5ff888
[ "Apache-2.0" ]
null
null
null
source/piclient/camerapi/camerahandler_faker.py
royveshovda/pifog
127c2de6ff2666ebc9987d8c2cfd5431ce5ff888
[ "Apache-2.0" ]
null
null
null
def capture_high_res(filename): return "./camerapi/tmp_large.jpg" def capture_low_res(filename): return "./camerapi/tmp_small.jpg" def init(): return def deinit(): return
12.866667
37
0.689119
26
193
4.884615
0.538462
0.15748
0.267717
0.393701
0.440945
0
0
0
0
0
0
0
0.186529
193
14
38
13.785714
0.808917
0
0
0.25
0
0
0.248705
0.248705
0
0
0
0
0
1
0.5
false
0
0
0.5
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
1
0
0
0
1
1
0
0
6
921be83bfe8f9a489861abaead3be210cb7d7e10
9,107
py
Python
python/miind/connections.py
dekamps/miind
4b321c62c2bd27eb0d5d8336a16a9e840ba63856
[ "MIT" ]
13
2015-09-15T17:28:25.000Z
2022-03-22T20:26:47.000Z
python/miind/connections.py
dekamps/miind
4b321c62c2bd27eb0d5d8336a16a9e840ba63856
[ "MIT" ]
41
2015-08-25T07:50:55.000Z
2022-03-21T16:20:37.000Z
python/miind/connections.py
dekamps/miind
4b321c62c2bd27eb0d5d8336a16a9e840ba63856
[ "MIT" ]
9
2015-09-14T20:52:07.000Z
2022-03-08T12:18:18.000Z
# -*- coding: utf-8 -*- """ Created on Sat Jan 17 16:51:56 2015 @author: scsmdk """ import miind.nodes as nodes import miind.variables as variables TALLY = {} def register(i,o): tup = (i,o) if tup not in TALLY: TALLY[tup] = 1 return 0 else: TALLY[tup] += 1 return TALLY[tup] - 1 def parse_connection(connection, weighttype): i = str(nodes.NODE_NAMES[connection.attrib['In']]) o = str(nodes.NODE_NAMES[connection.attrib['Out']]) # Multiple connections with same label are allowed, so we need to keep a tally count = register(i,o) tally = '_' + str(count) s = '' if weighttype.text == 'DelayedConnection': s += '\tDelayedConnection con_' + i + '_' + o + tally + '(' s += connection.text.split()[0] + ',' s += connection.text.split()[1] + ',' s += connection.text.split()[2] + ');\n' elif weighttype.text == "CustomConnectionParameters": s += '\tCustomConnectionParameters con_' + i + '_' + o + tally + ';\n' for ak,av in connection.attrib.items(): if ak == 'In' or ak == 'Out': continue s += '\tcon_' + i + '_' + o + tally + '.setParam(\"' + ak + '\", std::to_string(' + av +'));\n' else: if weighttype.text == 'double': s += '\tdouble con_' + i + '_' + o + tally + '(' s += connection.text + ');\n' s += '\tnetwork.makeFirstInputOfSecond(' s += 'id_' + i + ',' s += 'id_' + o + ',' s += 'con_' + i + '_' + o + tally + ');\n' return s def parse_external_outgoing_connection(connection, nodemap, network_name='network',looped_definition=False): o = str(nodemap[connection.attrib['Node']]) if looped_definition: o = str(len(nodemap))+'*i+'+o return '\t\t\t' + network_name + '.addExternalMonitor('+ o +');\n' def parse_grid_connection(connection, nodemap, network_name='network',looped_definition=False): i = str(nodemap[connection.attrib['In']]) o = str(nodemap[connection.attrib['Out']]) if looped_definition: i = str(len(nodemap))+'*i+'+i o = str(len(nodemap))+'*i+'+o eff = connection.attrib['efficacy'] num_cons = connection.attrib['num_connections'] delay = connection.attrib['delay'] return '\t\t\t' + network_name + '.addGridConnection('+ i +','+ o +','+ eff +','+ num_cons +','+ delay +');\n' def parse_external_incoming_grid_connection(connection, nodemap, id, network_name='network',looped_definition=False): o = str(nodemap[connection.attrib['Node']]) nid = str(id) if looped_definition: o = str(len(nodemap))+'*i+'+o eff = connection.attrib['efficacy'] num_cons = connection.attrib['num_connections'] delay = connection.attrib['delay'] return '\t\t\t' + network_name + '.addGridConnection('+ o +','+ eff +','+ num_cons +',(double)'+ delay +','+ nid +');\n' def parse_grid_vectorized_connection(connection, nodemap, network_name='network',looped_definition=False): node_i = str(nodemap[connection.attrib['In']]) node_o = str(nodemap[connection.attrib['Out']]) s = '\t\t\tstd::map<std::string, std::string> params_' + node_i + '_' + node_o + ';\n' for ak,av in connection.attrib.items(): if ak in ['In', 'Out']: continue s += '\t\t\tparams_' + node_i + '_' + node_o + '[\"' + ak + '\"] = std::to_string(' + av + ');\n' if looped_definition: i = str(len(nodemap))+'*i+'+node_i o = str(len(nodemap))+'*i+'+node_o else: i = node_i o = node_o s += '\t\t\t' + network_name + '.addGridConnection('+ i +','+ o +', params_' + node_i + '_' + node_o + ');\n' return s def parse_external_incoming_grid_vectorized_connection(connection, nodemap, id, network_name='network',looped_definition=False): node_o = str(nodemap[connection.attrib['Node']]) s = '\t\t\tstd::map<std::string, std::string> params_extern_' + node_o + ';\n' for ak,av in connection.attrib.items(): if ak in ['Node']: continue s += '\t\t\tparams_extern_' + node_o + '[\"' + ak + '\"] = std::to_string(' + av + ');\n' nid = str(id) if looped_definition: o = str(len(nodemap))+'*i+'+node_o else: o = node_o s += '\t\t\t' + network_name + '.addGridConnection('+ o +', params_extern_' + node_o + ',' + nid + ');\n' return s def parse_mesh_connection(connection, nodemap, mat_name, network_name='network',looped_definition=False): i = str(nodemap[connection.attrib['In']]) o = str(nodemap[connection.attrib['Out']]) if looped_definition: i = str(len(nodemap))+'*i+'+i o = str(len(nodemap))+'*i+'+o num_cons = connection.text.split()[0] eff = connection.text.split()[1] delay = connection.text.split()[2] return '\t\t\t' + network_name + '.addMeshConnection('+ i +','+ o +','+ eff +','+ num_cons +','+delay+',&'+ mat_name +');\n' def parse_external_incoming_mesh_connection(connection, nodemap, mat_name, id, network_name='network',looped_definition=False): o = str(nodemap[connection.attrib['Node']]) nid = str(id) if looped_definition: o = str(len(nodemap))+'*i+'+o num_cons = connection.text.split()[0] eff = connection.text.split()[1] delay = connection.text.split()[2] return '\t\t\t' + network_name + '.addMeshConnection('+ o +','+ eff +','+ num_cons +',(double)'+delay+',&'+ mat_name +','+ nid +');\n' def parse_mesh_vectorized_connection(connection, nodemap, mat_name, network_name='network',looped_definition=False): node_i = str(nodemap[connection.attrib['In']]) node_o = str(nodemap[connection.attrib['Out']]) s = '\t\t\tstd::map<std::string, std::string> params_' + node_i + '_' + node_o + ';\n' if looped_definition: i = str(len(nodemap))+'*i+'+node_i o = str(len(nodemap))+'*i+'+node_o else: i = node_i o = node_o for ak,av in connection.attrib.items(): if ak in ['In', 'Out']: continue s += '\t\t\tparams_' + node_i + '_' + node_o + '[\"' + ak + '\"] = std::to_string(' + av + ');\n' s += '\t\t\t' + network_name + '.addMeshCustomConnection('+ i +','+ o +', params_' + node_i + '_' + node_o + ',&'+ mat_name +');\n' return s def parse_external_incoming_mesh_vectorized_connection(connection, nodemap, mat_name, id, network_name='network',looped_definition=False): node_o = str(nodemap[connection.attrib['Node']]) s = '\t\t\tstd::map<std::string, std::string> params_extern_' + node_o + ';\n' for ak,av in connection.attrib.items(): if ak in ['Node']: continue s += '\t\t\tparams_extern_' + node_o + '[\"' + ak + '\"] = \"' + av + '\";\n' nid = str(id) if looped_definition: o = str(len(nodemap))+'*i+'+node_o else: o = node_o s += '\t\t\t' + network_name + '.addMeshCustomConnection('+ o +', params_extern_' + node_o + ',&'+ mat_name +',' + nid + ');\n' return s def parse_connections(connection_list,weighttype,outfile): for connection in connection_list: s = parse_connection(connection,weighttype) outfile.write(s) def parse_incoming_connections(connection_list,weighttype,outfile): for connection in connection_list: s = parse_incoming_connection(connection,weighttype) outfile.write(s) def parse_outgoing_connections(connection_list,outfile): for connection in connection_list: s = parse_outgoing_connection(connection) outfile.write(s) def parse_incoming_connection(connection, weighttype): node = str(nodes.NODE_NAMES[connection.attrib['Node']]) # Multiple connections with same label are allowed, so we need to keep a tally count = register('EXTERNAL',node) tally = '_' + str(count) s = '' if weighttype.text == 'DelayedConnection': s += '\tDelayedConnection con_EXTERNAL_' + node + tally + '(' s += connection.text.split()[0] + ',' s += connection.text.split()[1] + ',' s += connection.text.split()[2] + ');\n' elif weighttype.text == "CustomConnectionParameters": s += '\tCustomConnectionParameters con_EXTERNAL_' + node + tally + ';\n' for ak,av in connection.attrib.items(): if ak == 'Node': continue s += '\tcon_EXTERNAL_' + node + tally + '.setParam(\"' + ak + '\", std::to_string(' + av +'));\n' else: if weighttype.text == 'double': s += '\tdouble con_EXTERNAL_' + node + tally + '(' s += connection.text + ');\n' s += '\t\t\tnetwork.setNodeExternalPrecursor(' s += 'id_' + node + ',' s += 'con_EXTERNAL_' + node + tally + ');\n' return s def parse_outgoing_connection(connection): node = str(nodes.NODE_NAMES[connection.attrib['Node']]) # Multiple connections with same label are allowed, so we need to keep a tally count = register(node,'EXTERNAL') tally = '_' + str(count) s = '' s += '\t\t\tnetwork.setNodeExternalSuccessor(' s += 'id_' + node + ');\n' return s
37.788382
138
0.595037
1,145
9,107
4.556332
0.100437
0.08894
0.008051
0.064788
0.879241
0.842438
0.785317
0.736055
0.705578
0.683535
0
0.004093
0.222027
9,107
240
139
37.945833
0.732251
0.033601
0
0.657609
0
0
0.177816
0.04289
0
0
0
0
0
1
0.086957
false
0
0.01087
0
0.173913
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
a60f536104bc0bea65187e1ff26469082c3a5ca1
10,344
py
Python
py/pysparkling/ml/algo.py
gerbenoostra/sparkling-water
0e996b80124bf6cf4bfb2cd274625f3ddb7bd9fb
[ "Apache-2.0" ]
null
null
null
py/pysparkling/ml/algo.py
gerbenoostra/sparkling-water
0e996b80124bf6cf4bfb2cd274625f3ddb7bd9fb
[ "Apache-2.0" ]
null
null
null
py/pysparkling/ml/algo.py
gerbenoostra/sparkling-water
0e996b80124bf6cf4bfb2cd274625f3ddb7bd9fb
[ "Apache-2.0" ]
null
null
null
from pyspark import since, keyword_only from pyspark.ml.param.shared import * from pyspark.ml.util import JavaMLReadable, JavaMLWritable from pyspark.ml.wrapper import JavaEstimator, JavaModel, JavaTransformer, _jvm from pyspark.sql import SparkSession from pysparkling import * from .params import H2OGBMParams, H2ODeepLearningParams, H2OAutoMLParams java_max_double_value = (2-2**(-52))*(2**1023) def set_double_values(kwargs, values): for v in values: if v in kwargs: kwargs[v] = float(kwargs[v]) class H2OGBM(JavaEstimator, H2OGBMParams, JavaMLReadable, JavaMLWritable): @keyword_only def __init__(self, ratio=1.0, predictionCol=None, featuresCols=[], allStringColumnsToCategorical=True, nfolds=0, keepCrossValidationPredictions=False, keepCrossValidationFoldAssignment=False, parallelizeCrossValidation=True, seed=-1, distribution="AUTO", ntrees=50, maxDepth=5, minRows=10.0, nbins=20, nbinsCats=1024, minSplitImprovement=1e-5, histogramType="AUTO", r2Stopping=java_max_double_value, nbinsTopLevel=1<<10, buildTreeOneNode=False, scoreTreeInterval=0, sampleRate=1.0, sampleRatePerClass=None, colSampleRateChangePerLevel=1.0, colSampleRatePerTree=1.0, learnRate=0.1, learnRateAnnealing=1.0, colSampleRate=1.0, maxAbsLeafnodePred=java_max_double_value, predNoiseBandwidth=0.0, convertUnknownCategoricalLevelsToNa=False): super(H2OGBM, self).__init__() self._hc = H2OContext.getOrCreate(SparkSession.builder.getOrCreate(), verbose=False) self._java_obj = self._new_java_obj("org.apache.spark.ml.h2o.algos.H2OGBM", self.uid, self._hc._jhc.h2oContext(), self._hc._jsql_context) self._setDefault(ratio=1.0, predictionCol=None, featuresCols=[], allStringColumnsToCategorical=True, nfolds=0, keepCrossValidationPredictions=False, keepCrossValidationFoldAssignment=False, parallelizeCrossValidation=True, seed=-1, distribution=self._hc._jvm.hex.genmodel.utils.DistributionFamily.valueOf("AUTO"), ntrees=50, maxDepth=5, minRows=10.0, nbins=20, nbinsCats=1024, minSplitImprovement=1e-5, histogramType=self._hc._jvm.hex.tree.SharedTreeModel.SharedTreeParameters.HistogramType.valueOf("AUTO"), r2Stopping=self._hc._jvm.Double.MAX_VALUE, nbinsTopLevel=1<<10, buildTreeOneNode=False, scoreTreeInterval=0, sampleRate=1.0, sampleRatePerClass=None, colSampleRateChangePerLevel=1.0, colSampleRatePerTree=1.0, learnRate=0.1, learnRateAnnealing=1.0, colSampleRate=1.0, maxAbsLeafnodePred=self._hc._jvm.Double.MAX_VALUE, predNoiseBandwidth=0.0, convertUnknownCategoricalLevelsToNa=False) kwargs = self._input_kwargs self.setParams(**kwargs) @keyword_only def setParams(self, ratio=1.0, predictionCol=None, featuresCols=[], allStringColumnsToCategorical=True, nfolds=0, keepCrossValidationPredictions=False, keepCrossValidationFoldAssignment=False,parallelizeCrossValidation=True, seed=-1, distribution="AUTO", ntrees=50, maxDepth=5, minRows=10.0, nbins=20, nbinsCats=1024, minSplitImprovement=1e-5, histogramType="AUTO", r2Stopping=java_max_double_value, nbinsTopLevel=1<<10, buildTreeOneNode=False, scoreTreeInterval=0, sampleRate=1.0, sampleRatePerClass=None, colSampleRateChangePerLevel=1.0, colSampleRatePerTree=1.0, learnRate=0.1, learnRateAnnealing=1.0, colSampleRate=1.0, maxAbsLeafnodePred=java_max_double_value, predNoiseBandwidth=0.0, convertUnknownCategoricalLevelsToNa=False): kwargs = self._input_kwargs if "distribution" in kwargs: kwargs["distribution"] = self._hc._jvm.hex.genmodel.utils.DistributionFamily.valueOf(kwargs["distribution"]) if "histogramType" in kwargs: kwargs["histogramType"] = self._hc._jvm.hex.tree.SharedTreeModel.SharedTreeParameters.HistogramType.valueOf(kwargs["histogramType"]) # we need to convert double arguments manually to floats as if we assign integer to double, py4j thinks that # the whole type is actually int and we get class cast exception double_types = ["minRows", "predNoiseBandwidth", "ratio", "learnRate", "colSampleRate", "learnRateAnnealing", "maxAbsLeafnodePred" "minSplitImprovement", "r2Stopping", "sampleRate", "colSampleRateChangePerLevel", "colSampleRatePerTree"] set_double_values(kwargs, double_types) # We need to also map all doubles in the arrays if "sampleRatePerClass" in kwargs: kwargs["sampleRatePerClass"] = map(float, kwargs["sampleRatePerClass"]) return self._set(**kwargs) def _create_model(self, java_model): return H2OGBMModel(java_model) class H2OGBMModel(JavaModel, JavaMLWritable, JavaMLReadable): pass class H2ODeepLearning(JavaEstimator, H2ODeepLearningParams, JavaMLReadable, JavaMLWritable): @keyword_only def __init__(self, ratio=1.0, predictionCol=None, featuresCols=[], allStringColumnsToCategorical=True, nfolds=0, keepCrossValidationPredictions=False, keepCrossValidationFoldAssignment=False, parallelizeCrossValidation=True, seed=-1, distribution="AUTO", epochs=10.0, l1=0.0, l2=0.0, hidden=[200,200], reproducible=False, convertUnknownCategoricalLevelsToNa=False): super(H2ODeepLearning, self).__init__() self._hc = H2OContext.getOrCreate(SparkSession.builder.getOrCreate(), verbose=False) self._java_obj = self._new_java_obj("org.apache.spark.ml.h2o.algos.H2ODeepLearning", self.uid, self._hc._jhc.h2oContext(), self._hc._jsql_context) self._setDefault(ratio=1.0, predictionCol=None, featuresCols=[], allStringColumnsToCategorical=True, nfolds=0, keepCrossValidationPredictions=False, keepCrossValidationFoldAssignment=False, parallelizeCrossValidation=True, seed=-1, distribution=self._hc._jvm.hex.genmodel.utils.DistributionFamily.valueOf("AUTO"), epochs=10.0, l1=0.0, l2=0.0, hidden=[200,200], reproducible=False, convertUnknownCategoricalLevelsToNa=False) kwargs = self._input_kwargs self.setParams(**kwargs) @keyword_only def setParams(self, ratio=1.0, predictionCol=None, featuresCols=[], allStringColumnsToCategorical=True, nfolds=0, keepCrossValidationPredictions=False, keepCrossValidationFoldAssignment=False, parallelizeCrossValidation=True, seed=-1, distribution="AUTO", epochs=10.0, l1=0.0, l2=0.0, hidden=[200,200], reproducible=False, convertUnknownCategoricalLevelsToNa=False): kwargs = self._input_kwargs if "distribution" in kwargs: kwargs["distribution"] = self._hc._jvm.hex.genmodel.utils.DistributionFamily.valueOf(kwargs["distribution"]) # we need to convert double arguments manually to floats as if we assign integer to double, py4j thinks that # the whole type is actually int and we get class cast exception double_types = ["ratio", "epochs", "l1", "l2"] set_double_values(kwargs, double_types) return self._set(**kwargs) def _create_model(self, java_model): return H2ODeepLearningModel(java_model) class H2ODeepLearningModel(JavaModel, JavaMLWritable, JavaMLReadable): pass class H2OAutoML(JavaEstimator, H2OAutoMLParams, JavaMLWritable, JavaMLReadable): @keyword_only def __init__(self, predictionCol=None, allStringColumnsToCategorical=True, ratio=1.0, foldColumn=None, weightsColumn=None, ignoredColumns=[], tryMutations=True, excludeAlgos=None, projectName=None, loss="AUTO", maxRuntimeSecs=3600.0, stoppingRounds=3, stoppingTolerance=0.001, stoppingMetric="AUTO", nfolds=5, convertUnknownCategoricalLevelsToNa=False): super(H2OAutoML, self).__init__() self._hc = H2OContext.getOrCreate(SparkSession.builder.getOrCreate(), verbose=False) self._java_obj = self._new_java_obj("org.apache.spark.ml.h2o.algos.H2OAutoML", self.uid, self._hc._jhc.h2oContext(), self._hc._jsql_context) self._setDefault(predictionCol=None, allStringColumnsToCategorical=True, ratio=1.0, foldColumn=None, weightsColumn=None, ignoredColumns=[], tryMutations=True, excludeAlgos=None, projectName=None, loss="AUTO", maxRuntimeSecs=3600.0, stoppingRounds=3, stoppingTolerance=0.001, stoppingMetric=self._hc._jvm.hex.ScoreKeeper.StoppingMetric.valueOf("AUTO"), nfolds=5, convertUnknownCategoricalLevelsToNa=False) kwargs = self._input_kwargs self.setParams(**kwargs) @keyword_only def setParams(self, predictionCol=None, allStringColumnsToCategorical=True, ratio=1.0, foldColumn=None, weightsColumn=None, ignoredColumns=[], tryMutations=True, excludeAlgos=None, projectName=None, loss="AUTO", maxRuntimeSecs=3600.0, stoppingRounds=3, stoppingTolerance=0.001, stoppingMetric="AUTO", nfolds=5, convertUnknownCategoricalLevelsToNa=False): kwargs = self._input_kwargs if "stoppingMetric" in kwargs: kwargs["stoppingMetric"] = self._hc._jvm.hex.ScoreKeeper.StoppingMetric.valueOf(kwargs["stoppingMetric"]) # we need to convert double arguments manually to floats as if we assign integer to double, py4j thinks that double_types = ["maxRuntimeSecs", "stoppingTolerance", "ratio"] set_double_values(kwargs, double_types) return self._set(**kwargs) def _create_model(self, java_model): return H2OAutoMLModel(java_model) class H2OAutoMLModel(JavaModel, JavaMLWritable, JavaMLReadable): pass
64.248447
179
0.688128
1,016
10,344
6.862205
0.17126
0.006885
0.012909
0.013769
0.819277
0.8035
0.793746
0.79346
0.77883
0.77424
0
0.030996
0.214037
10,344
161
180
64.248447
0.826568
0.047564
0
0.576
0
0
0.062157
0.01493
0
0
0
0
0
1
0.08
false
0.024
0.056
0.024
0.232
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
a66166246703189297b327b36845062d1af73e37
29,651
py
Python
btclib/tests/test_dh.py
giubby84/btclib
0dd7e4e8ca43451a03b577fd7ec95715a1a21711
[ "MIT" ]
null
null
null
btclib/tests/test_dh.py
giubby84/btclib
0dd7e4e8ca43451a03b577fd7ec95715a1a21711
[ "MIT" ]
null
null
null
btclib/tests/test_dh.py
giubby84/btclib
0dd7e4e8ca43451a03b577fd7ec95715a1a21711
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (C) 2017-2020 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except according to the terms contained in the LICENSE file. "Tests for `btclib.dh` module." from hashlib import sha1, sha224, sha256, sha384, sha512 import pytest from btclib import dsa from btclib.curve import CURVES, mult from btclib.dh import ansi_x9_63_kdf, diffie_hellman from btclib.secpoint import bytes_from_point def test_ecdh() -> None: ec = CURVES["secp256k1"] hf = sha256 a, A = dsa.gen_keys() # Alice b, B = dsa.gen_keys() # Bob # Alice computes the shared secret using Bob's public key shared_secret_a = mult(a, B) # Bob computes the shared secret using Alice's public key shared_secret_b = mult(b, A) assert shared_secret_a == shared_secret_b assert shared_secret_a == mult(a * b, ec.G) # hash the shared secret to remove weak bits shared_secret_field_element = shared_secret_a[0] z = shared_secret_field_element.to_bytes(ec.psize, "big") shared_info = b"deadbeef" hsize = hf().digest_size for size in (hsize - 1, hsize, hsize + 1): shared_key = ansi_x9_63_kdf(z, size, hf, None) assert len(shared_key) == size assert shared_key == diffie_hellman(a, B, size, None, ec, hf) assert shared_key == diffie_hellman(b, A, size, None, ec, hf) shared_key = ansi_x9_63_kdf(z, size, hf, shared_info) assert len(shared_key) == size assert shared_key == diffie_hellman(a, B, size, shared_info, ec, hf) assert shared_key == diffie_hellman(b, A, size, shared_info, ec, hf) max_size = hsize * (2 ** 32 - 1) size = max_size + 1 with pytest.raises(ValueError, match="cannot derive a key larger than "): ansi_x9_63_kdf(z, size, hf, None) def test_gec_2() -> None: """GEC 2: Test Vectors for SEC 1, section 4.1 http://read.pudn.com/downloads168/doc/772358/TestVectorsforSEC%201-gec2.pdf """ # 4.1.1 ec = CURVES["secp160r1"] hf = sha1 # 4.1.2 dU = 971761939728640320549601132085879836204587084162 assert dU == 0xAA374FFC3CE144E6B073307972CB6D57B2A4E982 QU = mult(dU, ec.G, ec) assert QU == ( 466448783855397898016055842232266600516272889280, 1110706324081757720403272427311003102474457754220, ) assert ( bytes_from_point(QU, ec).hex() == "0251b4496fecc406ed0e75a24a3c03206251419dc0" ) # 4.1.3 dV = 399525573676508631577122671218044116107572676710 assert dV == 0x45FB58A92A17AD4B15101C66E74F277E2B460866 QV = mult(dV, ec.G, ec) assert QV == ( 420773078745784176406965940076771545932416607676, 221937774842090227911893783570676792435918278531, ) assert ( bytes_from_point(QV, ec).hex() == "0349b41e0e9c0369c2328739d90f63d56707c6e5bc" ) # expected results z_exp = 1155982782519895915997745984453282631351432623114 assert z_exp == 0xCA7C0F8C3FFA87A96E1B74AC8E6AF594347BB40A size = 20 # 4.1.4 z, _ = mult(dU, QV, ec) # x coordinate only assert z == z_exp keyingdata = ansi_x9_63_kdf(z.to_bytes(ec.psize, "big"), size, hf, None) assert keyingdata.hex() == "744ab703f5bc082e59185f6d049d2d367db245c2" # 4.1.5 z, _ = mult(dV, QU, ec) # x coordinate only assert z == z_exp keyingdata = ansi_x9_63_kdf(z.to_bytes(ec.psize, "big"), size, hf, None) assert keyingdata.hex() == "744ab703f5bc082e59185f6d049d2d367db245c2" def test_capv() -> None: """Component testing of the Cryptographic Algorithm Validation Program. https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/component-testing https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/components/800-135testvectors/ansx963_2001.zip """ # fmt: off test_vectors = [ (sha1, 128, "1c7d7b5f0597b03d06a018466ed1a93e30ed4b04dc64ccdd", None, "bf71dffd8f4d99223936beb46fee8ccc"), (sha1, 128, "5ed096510e3fcf782ceea98e9737993e2b21370f6cda2ab1", None, "ec3e224446bfd7b3be1df404104af953"), (sha1, 128, "9fb06aa8dd20e947c9216359630e588b6cd522dd71865ab0", None, "a1f9cef361c26fb9280f582851ecd5f2"), (sha1, 128, "613411bedfba26cbddec4fd68c3ae2c40a2255ae0f5c46ee", None, "d8106c1ee5e7be18fa2e3550459e24f7"), (sha1, 128, "445776ec51f2c9aae125dd6d6832210eee69249c4c7ad2db", None, "96f1cac19f41a8ce5f5bdd84856b89ba"), (sha1, 128, "1c3a4b420de31f5092e0568847d8ba9f84376ccfe5224c19", None, "5c2e39b7571111ba6cad54b63abd3536"), (sha1, 128, "0147fee06dd9918cd1654132227313b104bf99b1ad1f1c46", None, "098758b7ed8dac02a5991411b76b3d2c"), (sha1, 128, "50ee47d625dcb6a6196c148d452e99bb0a1cf1fa82cdc3a9", None, "9e2a45a4a8984a563f5776ee7ebfd5c6"), (sha1, 128, "ea2c79dc2ef00afa448cb8d390998d5a18f27f5d888e472c", None, "c5d126d15ca3d358ee78db4c1ba0df44"), (sha1, 128, "424d414d4b63c7cafe05d4d8bf8b6ce4438eb329a650354f", None, "a5370056ae13f6270490ded98b08c68b"), (sha1, 1024, "fd17198b89ab39c4ab5d7cca363b82f9fd7e23c3984dc8a2", "856a53f3e36a26bbc5792879f307cce2", "6e5fad865cb4a51c95209b16df0cc490bc2c9064405c5bccd4ee4832a531fbe7f10cb79e2eab6ab1149fbd5a23cfdabc41242269c9df22f628c4424333855b64e95e2d4fb8469c669f17176c07d103376b10b384ec5763d8b8c610409f19aca8eb31f9d85cc61a8d6d4a03d03e5a506b78d6847e93d295ee548c65afedd2efec"), (sha1, 1024, "6e1373b2dd31b74b638e86988eb9e918d0c96f46cd5b3a92", "19743dfab297303399c4197c4346ee3a", "57ef215679ca589af756ad2208761fd26fc828da6ebb28bfdd9bc8028d264b3a5c6f6d2dd3de7e1d914e99cb6522e233c26d9ab51e3d27ff532785889a553e44538a085b900cb9209849350df7183e3b0ba73077e42b9c5a769b843e25ef507b9c5ed88d54302e71e16f986a1b20d93948d61f208eff1741e5b7aa490734bde8"), (sha1, 1024, "b195b8c3c7bb7ceba50ea27c3c2e364559e1fe3578aa715e", "d5b35fd5f49cc116c019029b08c85ef1", "ba02df6edf41d941703e407572820310eb9db401d71c91f392bc18039e2fb5b250df267f3cdc244313b6c016f247e65cf3006270806495189e97015bbb0b3774b9b147303be32c41b8878ca57a6a4768675688a61ec859e3d4bcef4c5ec97eb654591879c85207a21f5dac6f51e1133bcb08c518817fd6c249011e44af678b50"), (sha1, 1024, "6858a77d2b9db2281238103faf6829bfcb631b9d936b127a", "332a4693ddf068f331b1cf9db9ef6a73", "e1ce87a741be93af506bd2a49a8b88cabd5f7ab370de3a0d943d5a10b3deb4088bf7f26d863915cb9d5cbf491c816a570bb021adb7348355b942d6551e8f783475d4f448514f92190d380bf31535eb1af49779eed6f2ffe7f6aee4e0095e8e7a3505cad3ca531b12d51cb5ee742cb46fddcb0740c8ef7e9c208b38f780f98e3c"), (sha1, 1024, "c94d3dac0f574192b54e254c211336eec808bd84caf986a8", "8f6d41388cc7f75da870ed81caa645dc", "4b6ba78ed72a11eac83048df87caa92ebcb0ea0f3d4ed3124c6193e806d2cb12862a0dab34c0b1ebe873526dd9c354ed0491f71b00f425988e74276f288f966d7bc12dd6346fa073137dc03365591642c876c93b870e0df8cfecac587a6e8718f980aa8d625e4183dadaba8990e958a0849bbd6a7524fb7e6f7ae0963284ae71"), (sha1, 1024, "6abda986108e8a5134057f679850dcf088ea3c43658996ab", "a5bb20b7e8196838e40239b08737f481", "8e2bf5df0c82175e165745ce45808e0006665c0bc44a46b9ece98d2335a06aeaadbc0194437529303627d01488793f9797b343a2c20114715e5fdbfe04b58190d9721857aa00524ec817dc9f479142906119f72e05a6bc01e6c17b74f5ce597de61400939d640aea23831531e42e6d92fbf0b29e4ce6b9656e59d2356dc54a50"), (sha1, 1024, "74c1ff417476636d3fa4ee48f5eab876d661d67128348db6", "4f34bd9a38b57dba2b5a4e97c99eb4c2", "65f81d448eaa84c53a3261d4a8894ee38c7b1cdbe8f0118fe9140093323795fd8bdde40ae27d18dfe37207b295d70e0c92dc9e63980f2b3ec0ecd6a5e908aa319dbb0ca1a9e275d32a479f86e6ab3102c380efec1d22ab4c6e21b045ef7ed75b35e7b357065857deec39580850b3881645bf42a3d903fb9ede4c04a6887c382e"), (sha1, 1024, "a655d8b0f737061eaa5a692dcc1c92a19b3103c876ccab31", "e7796de6ae29ce6f8e1f4eb8a81d1727", "583918aa2f85ccb17c624266afae509909a9be9121453a526aaf6cc87f903122dcdc14bafde13e2b878f270e1f86f569ab15e12a227c843d361fd8230e465453d5f3b5fb32b3175ba2e8e4aa473c3792f57485f6b022bece57651f7bbe95f1bfb9d7bb9ce712eb30233972dfb6258620822e496305bef740115312e808db039a"), (sha1, 1024, "3f6d287da6237895c4ed10dd5c4fbb5fe08eaac5bb314c7b", "0151cb9a7944494ce88eed12b05a3aaf", "d52041563204a69dc1f6f72d9b12e40d4efa35be050b2a677ae43717fa51ab21c75f9853fc701d9270ed2e8e493e15453cc98c0cb7ab07b3b23aa9e241eb3dcc8e401328e86df4c5b83256738782605271f52b17434eff72a1a3b4f45c4a52bb493f9cfd0e9bfd8decd86ce844c0888221abbc08e827cbbba12618ca39f54f1c"), (sha1, 1024, "9a71e94ab0b17f0b219fa95ac061d553a4639e89539b023b", "e274ffac839cf3c16266c058627e63fc", "974c1ca2ed816208862029ade68cee9a2877e3e6c7f320dfe6336c3d5ebf57d4fbd40766fe42cca6a91f7092542857560de5fec7813e79e0412fa773adb3a4e43fc13b7e899a6c5acad0848d6156087d0431509dadb55469cac922565bca451505c4f18fe97f9ab71016fc4e641d016bcba34aa6ae7c1e3acfe08b5fd95aa484"), (sha224, 128, "9ba3226ba0fca6bd5ddaef5b8d763a4d3303bc258d90468c", None, "15ccbd7d6b8f918335799b3920e69c1f"), (sha224, 128, "fc87aaa2d23ebabdb912c153d3a675da556a57df0699e479", None, "e22c69198766563bf0cbc07628eff5f7"), (sha224, 128, "f557b1ba1162cdc06cd531d5376a6575cad3e3b0f1508cc0", None, "35183315fba3ffb68a97b1eb5c052021"), (sha224, 128, "daa88161947e99d50e0400a79fa70b13e0d0a578f38d7fa0", None, "c76ea452168ae2ae6f4b78c695e2ac76"), (sha224, 128, "30b694d1454a10bdd5993da1a5c466e0821bf426ad7b8b40", None, "bafc2a0a75b9bfbdf1356a60a7937aa8"), (sha224, 128, "79bf9d93badd5a3eff9ab4c30c44b1985f5e7266e246e777", None, "f3a3c2ed92eebdc35b403843fdb8cd97"), (sha224, 128, "79496976705d6edea6fe1d7113263ce1eff221020c89db0b", None, "27cb9631cbb1b4f86aee8c2cf1718be0"), (sha224, 128, "2adc3b158cb63d7afa417c5d832b01bfc0aa34ceb35411ca", None, "e648b78032930639e5c210d798203f98"), (sha224, 128, "c8ae013dbfa53e9806d21b4deb7e761dbc515f2249afcdb2", None, "44c96abaca4ac9373b58c5af34880dbc"), (sha224, 128, "9f562ec0869dce142d378909b3610b02108b158719b573f9", None, "252c6dcaf650d92c09c8dae4dc0934cf"), (sha224, 1024, "da67a73072d521a8272c69023573012ddf9b46bff65b3900", "727997aed53e78f74b1d66743a4ea4d2", "dfc3126c5eebf9a58d89730e8d8ff7cc772592f28c10b349b437d9d068698a22e532eae975dfaf9c5c6a9f2935eafb05353013c253444e61f07bc9ddd15948e614bdc7e445ba3b1893f42f87f18fb352d49956009a642c362d45410b43a9ab376e9261210739174759511d1f9e52f6ec73dfed446dbafaf7fd1a57113abc2e8d"), (sha224, 1024, "0aab8fffc75e03810fefe1d1f170e8fb860d3880b2206944", "d318ac8eb3c51d8e8e88b8297f79ff26", "9bb6698705db9646ed360a8247396efc92c3450bfaa177c07459dfa8cc108cc8eb98c1e92e8257443463f531c01518fe8d4355784a7df2eaef16908d91104fdc917950b3816146f24a6845a5adad248dda41fcf611954f4de41f357c48f48910a48a1f26b9eff1434b9138848d4b03f05ab6d928c6b9a1b9ba8081405ec45c5f"), (sha224, 1024, "ccd2f983a0462b12762392bb02f66ffc44da3155111518f6", "9f90a5a197f316275e4376c262f83345", "9b2c47c1edb54b01e6f26236299262270bb82b3de85f744756c1d811f5db1c95dae1484cfab9119b0f75161efbf3a8a69b5f663b7b484bea7009c53e020e8aa009fe8616de2c932bd41d3d2783ee488c024eda2806f0ef324d16a9a95370c5d9ea277fba8a9d23a2a3051524bccbdcabb62e3550170900da7cf403736fb41823"), (sha224, 1024, "384f91ff8495828524e558fbb5acbd1e8b0ac597d8dd8efa", "a389ee5959381ab6a7240ab3322a2c8b", "3ef814c4724372a48b05c6d2cdddef4b57c2cce711860429ab14d87df79a5ee97fbcc8db83f6bc8ad08deceb3e4c09a87691bdffe79791edb409d3af1121750acb9b4a35f76cfb96a707faf4c5a3a455f80637e162202a55d10ac977cea4e62df1536493c6e51f40f7ed76bc38071e192d33018381fcfe8655fe2d82f2052208"), (sha224, 1024, "0fea3ff05fdc02af194a4502c4f8968ea696589666e3e5a1", "8f1736597687a0e50f9795f5ce4a794b", "3276318049fb0f809e3eb919e628dde6c8a661147d68a843a0217d49066711652a77956a86eec57d56d62dd9f41149d815fa46416157a6793cc2e0bbaf7de75b78fd532e296064525406781229e6cf657bcfedb110fb6889d9c5d0fce5ae5d9129941f238db5f6de160b15d11bb01b42498a79c8b714ece7a6c50fc5919da383"), (sha224, 1024, "c425bb77c93b59bade4f0fade4f58a61ac3540a186b806ce", "46a7e50d6e084eaf34f997edd0e71324", "603cbf3606c22368c7dcb03c0ff22f94c4e7190af58715e8a630d48dd48acbb2eb72ad2e596c1373dcfd76b36e24461a3c6eb70d5a13217db5fa706fe7cb0004d6eb6b41ef87964262f3f71f588c1506e575051490c78cf1c87c495a31049b42f165cd468c2de294d840ee79f0d8a27ba5985fa37eddc14ccce7ed56a1cc73fb"), (sha224, 1024, "f5e674ecf26fcb110cbf6617ca81645552c95787e42b59b8", "791c6a02432eeb4e9e09d1666d80edb5", "e03f4a184cfd06361b87eecfa8277ed3bd5d176bb6a1ed7fbe0f1cb7432f394cbf3ec94bd64c275f2dd40531693c2d8c82c4f57057c29d6ca38551490ec66ad7f650a3aa7528fa3bfcb6dd5455cf2158254b7d3284cb91e2154d0042af7b38fb58268196865bdcac6326ef3ae4fa2a38f4844c716518506b6cd2b032681dc851"), (sha224, 1024, "e5036244d705de12354c712df9e9b45282fd7969b479601b", "2fd1ad5b6b5a6606ca8bbe1fdf651b37", "f7b412e63aa9fab0435f64ab9f5a6c90d924bf2057ecb311529ed761f7ef939bd765d38e9eadbc8d16667ac3751c3111a932f815bb00af80a78139a05b3ecf3c7074f4b17e81188b49c91b9bf681066d0a6c62561489f1b660a6a9626b23355cbe189bf4a7cf8667608b582dced3ce883b9cef9b2e01667b2e894d80599d2555"), (sha224, 1024, "34a8b50ddfe5643d8eb284cf817074955fe85251cc40c116", "79b1b79134f4bc2247bab4d401441f66", "69bea882176d4475bd68f6b040482da6c5287be9e9a773e1a4c70c7dcc16fec975b05c589886d0f67f69103a668c4f23908b9261b6cf81b6ebf2c24693e32d2814483a471a8e70e33e9c1fef5d1714fc1a2a55a22b9ea14868eff726da3c113dce79df3413129dfca11e331df57cc127094eff6b41b8e6e92b5bc7a8ad6679a1"), (sha224, 1024, "295bebb724f5bd120c97690d034487e60398fbed6facca88", "1a45c3460cf33d23209aa90a3c4ca708", "e72d4748fbc36b163efe655d19a0aca946baf35cbbfe4c9a69b81597348c53740fda2ece02baa6f7a9f2b64195c09840e4c2d1e11a229243e3014c7cfcbca5afb1a209af6955b3ef1234f1c45ad458bcfa458041eceff639756a2d81a2bfa64687df82a791f96f9441e9f72b5a11c4246acdb75f176c5a89bec7ad36da651f5c"), (sha256, 128, "96c05619d56c328ab95fe84b18264b08725b85e33fd34f08", None, "443024c3dae66b95e6f5670601558f71"), (sha256, 128, "96f600b73ad6ac5629577eced51743dd2c24c21b1ac83ee4", None, "b6295162a7804f5667ba9070f82fa522"), (sha256, 128, "de4ec3f6b2e9b7b5b6160acd5363c1b1f250e17ee731dbd6", None, "c8df626d5caaabf8a1b2a3f9061d2420"), (sha256, 128, "d38bdbe5c4fc164cdd967f63c04fe07b60cde881c246438c", None, "5e674db971bac20a80bad0d4514dc484"), (sha256, 128, "693937e6e8e89606df311048a59c4ab83e62c56d692e05ce", None, "5c3016128b7ee53a4d3b14c344b4db09"), (sha256, 128, "be91c4f176b067f465244742a9df72ca921a6acf462739a4", None, "41476c80696df4e87fb83e55524b89ce"), (sha256, 128, "1d5b0ad85bc7859ada93dd5ccaf9536761f3c1a49a42f642", None, "650192990bfcaf7366f536aa89f27dbc"), (sha256, 128, "265c33d66b341c3f5ae2497a4eff1bed1cd3e549095bb32a", None, "0066528a1bd57cd92bd619e60b605f1e"), (sha256, 128, "03213ad997fdd6921c9ffb440db597a5d867d9d232dd2e99", None, "5a00bd1c812c579507314b491e4e1dfc"), (sha256, 128, "3ede6083cd256016f820b69ea0dcd09f57cdab011a80bb6e", None, "026454370775578e3b4a3e09e97a67d2"), (sha256, 1024, "22518b10e70f2a3f243810ae3254139efbee04aa57c7af7d", "75eef81aa3041e33b80971203d2c0c52", "c498af77161cc59f2962b9a713e2b215152d139766ce34a776df11866a69bf2e52a13d9c7c6fc878c50c5ea0bc7b00e0da2447cfd874f6cf92f30d0097111485500c90c3af8b487872d04685d14c8d1dc8d7fa08beb0ce0ababc11f0bd496269142d43525a78e5bc79a17f59676a5706dc54d54d4d1f0bd7e386128ec26afc21"), (sha256, 1024, "7e335afa4b31d772c0635c7b0e06f26fcd781df947d2990a", "d65a4812733f8cdbcdfb4b2f4c191d87", "c0bd9e38a8f9de14c2acd35b2f3410c6988cf02400543631e0d6a4c1d030365acbf398115e51aaddebdc9590664210f9aa9fed770d4c57edeafa0b8c14f93300865251218c262d63dadc47dfa0e0284826793985137e0a544ec80abf2fdf5ab90bdaea66204012efe34971dc431d625cd9a329b8217cc8fd0d9f02b13f2f6b0b"), (sha256, 1024, "f148942fe6acdcd55d9196f9115b78f068da9b163a380fcf", "6d2748de2b48bb21fd9d1be67c0c68af", "6f61dcc517aa6a563dcadeabe1741637d9a6b093b68f19eb4311e0e7cc5ce704274331526ad3e3e0c8172ff2d92f7f07463bb4043e459ad4ed9ddffb9cc8690536b07379ba4aa8204ca25ec68c0d3639362fddf6648bcd2ce9334f091bd0167b7d38c771f632596599ef61ae0a93131b76c80d34e4926d26659ed57db7ba7555"), (sha256, 1024, "fd4413d60953a7f9358492046109f61253ceef3c0e362ba0", "824d7da4bc94b95259326160bf9c73a4", "1825f49839ae8238c8c51fdd19dddc46d309288545e56e29e31712fd19e91e5a3aeee277085acd7c055eb50ab028bbb9218477aeb58a5e0a130433b2124a5c3098a77434a873b43bd0fec8297057ece049430d37f8f0daa222e15287e0796434e7cf32293c14fc3a92c55a1c842b4c857dd918819c7635482225fe91a3751eba"), (sha256, 1024, "f365fe5360336c30a0b865785e3162d05d834596bb4034d0", "0530781d7d765d0d9a82b154eec78c3c", "92227b24b58da94b2803f6e7d0a8aab27e7c90a5e09afaecf136c3bab618104a694820178870c10b2933771aab6dedc893688122fffc5378f0eb178ed03bac4bfd3d7999f97c39aed64eeadb6801206b0f75cbd70ef96ae8f7c69b4947c1808ffc9ca589047803038d6310006924b934e8f3c1a15a59d99755a9a4e528daa201"), (sha256, 1024, "65989811f490718caa70d9bdca753f6c5bd44e4d7b7a0c98", "264a09349830c51726ca8918ae079e4a", "f5f6ef377871830807c741560a955542dcedb662784c3e87fba06bff83db0d9753b92a540e5c86acfe4a80e7657109ee3178879748d967635a0122dbf37d3158c2d214c3dcba8cc29d6292250f51a3b698280744f81040275e9a8b6ee5c9b0307db176364868deade3becc0711c1fb9028c79abad086459c3843f804db928c49"), (sha256, 1024, "9d598818649fc81b8c59f60dfd41784790c971eefcff6419", "435f06ac33386eaf3af9042d70b93b08", "970845c707dafb8699fa26b9f6c181f358ebed337f9504b04b515c9f01db12dd4965e65e8750af575c0934527183ccbe8e243f26398906089c11bc8a8f69bedbbcf651c19c219b5bd0dc1829931cc6994d71f0000b7e42b1b994aa332b4a0bc506cde8723cd8da879826c585ae12fafb3f3daf5784007006878f4ebc4eda7db2"), (sha256, 1024, "4f9c0a5c03c8c3a23f06847d0e1f86f7df8da47bf3ccde99", "45672212c5af77d7eb5c90c38e125b52", "80fd7658118370a7d790d708ddafe6e7a5ba22caaacbf46e73fce6d6e1516a465d8264b75b5286067ac57863949aae984dc00653bf151930b398d7f5478c7b954565c584c8ad36fe59692781f2398d71e0234cff09d3c175d86a6c7c0f1e387eda55da8300caee4173ad7ff74b2effd723defc20060fa69f92b8af858a87a4f7"), (sha256, 1024, "1980d2966d59ccbbf89f7fe9a5943da886f232ac02ee69ce", "c8af6665439efbbee8660701681d54ce", "2120434e863d1df7b9748a3cbc73d2680ede19437a13230a9dc4ef692feb5197afd4e9275d6ed00e1ff3a0fd026dc8a2adefc90bf0e8656912849094d7a515bf45dda69e574bf33211255dd78bfc2b83434f1e0f7795d468dd09c4ed88b691b3fb9ce876161b2f26b41614ff05228b3402f0d1f3044c2c3f9f7136c7aca53356"), (sha256, 1024, "0eaabe1f7ab668ccf171547d8d08f6f2e06bc5e5f32d521c", "e4e98a7d346906518305de3798959070", "b90a0069ad42b964e96d392e0f13c39e43203371b1eba48f7c41fbfd83df7505d564ce4bf0cf8d956d2a1e9aee6308471d22f70aedd19b24566974f54db2849a79528c9e3f5d4f93c2f6f0862311fca14a2df91635d112fbb05dcd7c0ee72a6d8e713216bc8777596244f724e4046ba134f9a811f8f504ee67b1683041690921"), (sha384, 128, "d8554db1b392cd55c3fe957bed76af09c13ac2a9392f88f6", None, "671a46aada145162f8ddf1ca586a1cda"), (sha384, 128, "070265bd04222fc1dcb67182fa797166eaa18a2a1e1a6c0f", None, "522d79f65430350cec5c59c014e1a2cd"), (sha384, 128, "4e7ef0743a0a14fe21eaa9cbcec68581e75a616c76814c61", None, "4ac7317e0f82ff9256f1584a24661446"), (sha384, 128, "8952079916141dca1ce53d0d221269db0130f99270129ea3", None, "5910e2945753e0d0a0d60afd54815a3b"), (sha384, 128, "646e92b7bf5e747bb7ba5afbe6d2028bb93147be73fcec60", None, "ec2c0633e51c78880bee00e63d40d103"), (sha384, 128, "cd09e15099aec9baa47bb343d156afe8e0cd33f8dbf104be", None, "f72c76cc83bf273c7e5129d1706e3330"), (sha384, 128, "bfd00866e7a7e147fd98e1defed9fa1ab32d3e785a3f3436", None, "10c4874e47a1032cb9307dd4b4cad9f9"), (sha384, 128, "f07d1c1d8d3435c9477303c87ae19a0b8acf890c11b19794", None, "ecc66ccf0bcfaa644787203178647091"), (sha384, 128, "eeb2e06aad13b543746a9e5411066d4ef5717bc753eee1a0", None, "2d750acfa410f23e6993747536aaee9e"), (sha384, 128, "ba3ef5d54aadb1824dd974edf1748d76b7b13d26e83fa9f9", None, "55182a2abb9dc1d79d64b09c4c4666ee"), (sha384, 1024, "c051fd22539c9de791d6c43a854b8f80a6bf70190050854a", "1317504aa34759bb4c931e3b78201945", "cf6a84434734ac6949e1d7976743277be789906908ad3ca3a8923da7f476abbeb574306d7243031a85566914bfd247d2519c479953d9d55b6b831e56260806c39af21b74e3ecf470e3bd8332791c8a23c13352514fdef00c2d1a408ba31b2d3f9fdcb373895484649a645d1845eec91b5bfdc5ad28c7824984482002dd4a8677"), (sha384, 1024, "2c9436cd85df982911df60d54f2d41d81660cdb37e457daf", "6b5910575296437a75c04371c8623cf6", "6efb45067e00024beaa9fa763ef2c701527cd9eb5697f7f77475f2d36495058e3558893006ab0169e9a9f78481f6f06e9b005413856af89cd764beba0fff6ed4a077ffd36f966b633e058793320febf52b937554539096838873171933c2b7f864000be1b3a01ad6c4e66c3190bbfc90d7deb31e8857cf272cdd2caea730839e"), (sha384, 1024, "04bac3eccc8730c441c12f050168643c3581c046067eb930", "6f75d4e7ec627f047589c588d20a8ae0", "64be249badec07779df8c40e3a75ebe7296f4c853e8c596d208f6c9cc7b41b75db28aa31a9199eabb750c28804739cbdabf81f2b9579c0e0bb3dbab77a0315ce1f7d4cad83e2cbd4258f132f3ccbe522da73ba0b389b6963d227c3aa61dbdde64517cd05599596dd9e73b85e0deede8a822821b4a27403116919f40f75cc7c42"), (sha384, 1024, "684ac84d726909080f8d6bd89d8a744ced207c5bdb4bf866", "ae59a73e8b3c3b59f01fec8e7efadef9", "e312c7c168c69e3c0e0894c7a4b561cf8e38c3dfcbc90c8934edb8b16f7031cf595a093d6289a01fd977c0bf216c04edaa21230e82bd0f066a60180174df85482dd6353111da24bf979422e3fb7b34720310075abba72c5f0ac6bfd7c6af331532ce7b1d3b9628ab4502614f9e324177ad33f7257a4c1efcecefb83f446242e1"), (sha384, 1024, "74a215aa43a7f59fac674d220c852e91a30e7ad05b1b7223", "8bd8cc5c429502d5ed0da3fe706a52d4", "3d836e700d223a088647eb9a323f7b7b19ad071818141182e216cd9644396b01d6b3d3e1fc2cefa2794bf7d9d27f10b0716ae3ec100e171cb6188c5a23da1b7500879b014b4878455b17f049060cb46c57c1b0670eb8cfa3b478ca0501ed5c258773b862f0eadb0991eb56a4f51aadb1287179bd7a366ac16c235d7b11d96048"), (sha384, 1024, "5318d9e0ec5d6f82bae244f01e3e5281e954b924d1554fee", "c0537c7929f6efe8399c8089552214a9", "38083a961d8967e11096a99d36c198b3527dfbda74c2f4e9cfc7b5a115333d2be242b192df027ba4c1f732f1c26ae94b8cd3fa2ecd59df9be5baed7c479da001798a4a623ae01fe1b1feb83f436fc4b3268bd56b17579c0d7ad0df9296db3f57f26a7de0d64b04311c81d70fdec19cd8acf0e5a03b60059172475b104aaf92cb"), (sha384, 1024, "d427c25cc0d5c499aa789cbd9a0f2a358596e0a586d6aaad", "b0db1a8f05b1ed0ac6594f882d61da82", "f800e7ed9cf7a632ceeda04ea75f6fd7efddcd96cf6ec03052cb4c71f52a61ea96d363f1d07704fe51765135624a55b64cefe6c7f7e653d6a404911a99ecd6f437a9e770b6c60601d6001165b37e6005548f454493429dce77ac3311f817a88f8b14a4a2bab4b2cb142f5154c9a23bf6818bcafad4b8d0fe50c1392b12196a62"), (sha384, 1024, "fff1206cd5e2aff982c47d5dd31c2ce50e6718f4d2126427", "74b3285de80d0c1962b6c9c6dc9cd5bf", "d8b2cc9655a2cfa338e76cdf17258501b69a04057947c4083fd76bdfd73d48a6cb9e8538317bff5e829e006661e0ab53a9dd5ff210c8b59ff6ae64220bcab7c84facd792583c34177a867c69e117688bec10d134c003f112ca600eb6c514df0be5daa73bc9b4800403f79424ff3313b95d009ff423655774487cc1465731936b"), (sha384, 1024, "75a43f6464c2954efd9558d2d9c76cfcafefec3f07fe14af", "6744c4a41d5bd7f4ca94ea488605c3d3", "5045a6252c9b6eb80debc67e0d11a028bf8e1f0b274d13aebcc7d565e1b73ed228c5f4195ebd1044aaf9a755c6945a729767f8f3697adb2941df0f449fdfca8f84abefc5011d4b968ad1f79b535bf124e3dcf131f8f894ee633a040c34a6470544497ae3d96c1e4bcdc5914d40c4a73f1e174b29bd5755d1aa0a3ddd3f9428d5"), (sha384, 1024, "09807be0ca8c534a0e2b326a845054a5389c85a1d60f84a5", "43b0be9359d0bbecb75958d566decdd3", "a00e22994f134f1a0da919fa43a779314c5e706ab3fa4c1d72912cf1109b958a141075d206a7befe467efa85ab2d1a83d1a438bda7df009e1eaf66649920d9dfb4110a36575f034ad0a63344968dc0e171ea2972fda011f66e8bda6867eb769281af23488b5166c85289ad3a68407010ae6f62227a1c1d19a6f527c735dc145d"), (sha512, 128, "87fc0d8c4477485bb574f5fcea264b30885dc8d90ad82782", None, "947665fbb9152153ef460238506a0245"), (sha512, 128, "293e901c8f43178794a9792f98861732faa4677e72b8ce1e", None, "883e84f877b05a092ada456571c58cb9"), (sha512, 128, "734315a823c278adb4517c952b0ae3f6fe2de6615b1c2650", None, "c8ee447ad8e7ff0a874e89b11616a824"), (sha512, 128, "fece4214eb02a10d11dd7dffb0bd884e4aedbf705fa3726f", None, "2491f93f072adca1c051d800b5d82dec"), (sha512, 128, "4ee79bcb0d621a7a0d42cd9a496b209dfd3f4276455139e0", None, "bdb3e1cf4414b0ba1829810defc94024"), (sha512, 128, "18447afe05107a7729661bd1b23935b30983ff614631dec8", None, "1d1c68eabdfcfdd62a42d43a3e98c772"), (sha512, 128, "c32dffc642ae400dfc21ade6adb936583999d5cf1379b783", None, "8a1abd901b090f808b2f1e355c6eb596"), (sha512, 128, "57d4d684aa3543d6097bc7c0d0430527e1937b0f936ab479", None, "33f781afd506a4206b9b3af2371a67a4"), (sha512, 128, "b7d969a749af87a02c0629c642bfc5e2e2aa10d015fde9ca", None, "dfbf12c462bc114997317b13c9cdda65"), (sha512, 128, "fb03ba6b357d26ee18a22bdab14da74ca5727ed4b69a687b", None, "8dcdf450dd810e20c472d485a78a2d5f"), (sha512, 1024, "00aa5bb79b33e389fa58ceadc047197f14e73712f452caa9fc4c9adb369348b81507392f1a86ddfdb7c4ff8231c4bd0f44e44a1b55b1404747a9e2e753f55ef05a2d", "e3b5b4c1b0d5cf1d2b3a2f9937895d31", "4463f869f3cc18769b52264b0112b5858f7ad32a5a2d96d8cffabf7fa733633d6e4dd2a599acceb3ea54a6217ce0b50eef4f6b40a5c30250a5a8eeee208002267089dbf351f3f5022aa9638bf1ee419dea9c4ff745a25ac27bda33ca08bd56dd1a59b4106cf2dbbc0ab2aa8e2efa7b17902d34276951ceccab87f9661c3e8816"), (sha512, 1024, "009dcd6ba5c8c803ca21f9996ca5dd86047d4ddc150fddace1b1ebe996c2007e3ee907c8ff03b9ef766e8ceb4dedf7489e5162e2278c0185e4be381bec17dd992cf8", "1e60e51c11a538b0ea8990d69a4c6358", "4e55036a32f32fc965046fdfbf686c108e43a69f8fc1a64ff1bd77763f2eedc8bf277d78b4ce31243e1adbe2c2d5dd59b47503b5b90b54f9d7a9a5aea49c7f0283cb64c3849a1d157000fd41ef6c1d1a5b62734e7c9a20dcfb57f2da974933f57ee619d72898d0e93d9a4254aaddf73941d6269298b4d49c0ac64a33802fe8f2"), (sha512, 1024, "01bbc44314f24db4d67a2a7fb5ca3f7a5022790f5875895d448050eda5611a2f39de48e394c5a3df26208eb01f804d0a1d68eece6b6fa96d6db895e133e129094f78", "433e3ee77d00e4a9634efd677e2ff21b", "f1255002293d5fbcf35ad0e532ae872171d11014616a2c52d7e5cb861b0251b9e505a77161c777bafc052b6525a6ecf34590605de72f13a1aff0a61a8a4a3364ebbe2f99224c13e043e497af8a26de749cd257e475b2f0e60e3b594901320a692a4af422f9636e4814b33f67d181a086265013b0d4efd9e1a94ea8a576afde66"), (sha512, 1024, "01a33032a2bf6f8e9d6972dd339536c9e248ae9881844ff1bd04af48085be4ca1834f2a94ce1019dd9620d1e3a68203a5b291f40b5f8e3238a2a036312b89061cc60", "d3297ad6b9757d1f5a9d5b0e72176d74", "63565d1d3443620fba4218c97887ff40d6d68bf56b429c22018be5d91c318187ebe8a9399c5cc6c4a849288ab784d4340714ae3fdb426c4a83db9ce2ba8aea80d448e50ad543749b47bcaae519f7f00badd8d48296e81069104dcd293c605b08159ef2ef14c7833739d0414274136ae4db05ba4fa31b29c59de46d9be539525f"), (sha512, 1024, "004b20a501776ea54cbdabffec2a664b7a93f8d67b17405a82bd9cbf3685a4659beb2deff1b6ecaa7ab187b6d4fd407f10db6992c65308410deb133be31a0de0c1c9", "fd5462cb37aa298e95f8e34bb49d85ca", "cafcbc117317661bf15277c2881e05e345c1720b0c1c4040c33fe4a3ecf8032802642d29828a077ca91b6fac216b7a06517740c7d633c279dd2115eb7a34fd337376247219f53da32df57070f47c2e0816710080d6492e1c3e8cac818c3cfca2a3ce5cf1515f066b1815d2d2f69fa3111a9e81570963b90a536da0376c12265b"), (sha512, 1024, "01fb44335b437771777f14d44e5b634c18c7f570b935228fd3073e3cbde299dfb9f4d64ad720d30e875e8c6bbe181027459c9d3f92a276a38e22faf25f208576a63f", "2359d18657243d61963ceca3fa93587d", "1544e54cd293e533959bdd893337f01ef0c7685a4d8d403d438b0223a7e18330c312a0f16bd819f4359fdd74ae85cc603d35e3d9cba896177452c8dee5214066fca420c3ab522a245af215beb7de52ebb0bdd15d0596b8b763cf7e25610a53efa726b899a1d9727b25ec673ee91ff2111f03cf761a7880d69625e784becfd4e0"), (sha512, 1024, "0109afa3904193690d3f2c49e42d08c8c5cd2ea907a0d699c876e418e303b485374c8d6cf5a32af1491b3ea8a3503692b4a0fd78f9b4082e2a6e72345db4532d749f", "7c19631d3cd65915fa4789cf7b1c0979", "fb60175568a66ef4202e110396663085fe2a9d6d2071e55d03c30ea499fee850c99c4e42a7227cca2eaf4d75e37dde205ae07260e84aeee6ef0819d98bd00d0ff5ba55994e7bf2a578baf2ee9aa862d94bf431fa14429010ebc30d7e602de726cdffacaeabc8541237fbc0c975abbf203c018c688ee354d07978654b90de9569"), (sha512, 1024, "00632e165775f3c5b6e81d4042f809e904b8167687747638874b39ffce1993f46e8fc44e2a1c3df59563003bad3e25c85b61819e9addc0fdbe173dd4115c38f62ef6", "2bf0f18b7f21c4ec9c20b84c75f66b7c", "c324fed01b75c37fc96703031403d5cc6857dc7ffa48192d9a10d5c69dd6274ecd0eb9a278f9e6b616c27bbf2e3e016635b311940390c52c61a4f4b3383ca6046961dbd2455ff6a982e8269864edd3cc1b1053da7daf9699c61b05f1acca7b79e68db655fd526fdc392bd36dcaf1c5b2fafb8975e318070d4bb948829ac41bb6"), (sha512, 1024, "0096172bf47d06d544ae98471490cf9e52ee59ea7a2208b33b26c52d4952bb8f41b2211d3f9ff32e77ca8cc906ba8d246ff266ddf1df8f53824ccb15b8fb39724703", "cf3a74ba86af42f1ae85477ead645583", "995d1ab8557dfeafcb347f8182583fa0ac5e6cb3912393592590989f38a0214f6cf7d6fbe23917b0966c6a870876de2a2c13a45fa7aa1715be137ed332e1ffc204ce4dcce33ece6dec7f3da61fa049780040e44142cc8a1e5121cf56b386f65b7c261a192f05e5fefae4221a602bc51c41ef175dc45fb7eab8642421b4f7e3e7"), (sha512, 1024, "0037cd001a0ad87f35ddf58ab355d6144ba2ed0749a7435dab548ba0bfbe723c047e2396b4eef99653412a92c8db74bb5c03063f2eb0525ae87356750ae3676faa86", "eb17da8851c41c7ac6710b1c49f324f8", "829a28b81f9e95b5f306604067499c07d5944ca034ed130d513951f7143e4e162bad8adb2833e53b8235c293cd2a809659ac7f7e392cba6a543660e5d95070c0c9e6a9cdc38123e22da61bb4cbb6ad6d1a58a069e934fc231bd9fe39a24afcbf322ccea385f0418f3b01c1edd6e7124593a1cefe3e48fcd95daaf72cfd973c59"), ] # fmt: on for hf, length, z, shared_info, key_data in test_vectors: result = ansi_x9_63_kdf( bytes.fromhex(z), length // 8, hf, None if shared_info is None else bytes.fromhex(shared_info), ) assert result == bytes.fromhex(key_data)
122.020576
455
0.868976
1,069
29,651
24.02058
0.413471
0.005141
0.002181
0.002999
0.031194
0.02251
0.02103
0.02103
0.020017
0.017914
0
0.542023
0.076254
29,651
242
456
122.524793
0.395473
0.036323
0
0.05618
0
0
0.767102
0.76374
0
0
0.004413
0
0.11236
1
0.016854
false
0
0.033708
0
0.050562
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
5b48b34a9e7a2aa7d8ebb9fa3eabb138aabac88b
15,103
py
Python
tests/test_transform.py
braedon/kong-log-bridge
a2f7622f1ad77af93036b221243f556853c34343
[ "MIT" ]
2
2021-03-10T20:12:28.000Z
2021-07-24T05:54:46.000Z
tests/test_transform.py
braedon/kong-log-bridge
a2f7622f1ad77af93036b221243f556853c34343
[ "MIT" ]
null
null
null
tests/test_transform.py
braedon/kong-log-bridge
a2f7622f1ad77af93036b221243f556853c34343
[ "MIT" ]
null
null
null
import unittest from kong_log_bridge.transform import transform_log class Test(unittest.TestCase): maxDiff = None def test_transform(self): test_log = { "latencies": { "request": 191, "kong": 0, "proxy": 191 }, "service": { "host": "example.default.80.svc", "created_at": 1595260351, "connect_timeout": 60000, "id": "adc094b9-1359-5576-8973-5f5aac508101", "protocol": "http", "name": "example.default.80", "read_timeout": 60000, "port": 80, "path": "/", "updated_at": 1595260351, "write_timeout": 60000, "retries": 5 }, "request": { "querystring": { "foo": "bar", "baz": True }, "size": "1430", "uri": "/login", "url": "https://example.com:8443/login", "headers": { "host": "example.com", "content-type": "application/x-www-form-urlencoded", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "authorization": "Bearer some_token", "cookie": "__Host-example_login_csrf-zK9kT=some_login_csrf", "upgrade-insecure-requests": "1", "connection": "keep-alive", "referer": "https://example.com/login?continue=https%3A%2F%2Fexample.com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3Dexample_client%26scope%3Dopenid%26state%3Dp2DOUg5DvzyFFxE9D%26nonce%3DFjKXc-cZLMHf3ohZQ_HQZQ%26redirect_uri%3Dhttps%253A%252F%252Fexample.com%252Fapp%252Foidc%252Fcallback%26new_login%3Dtrue&client_id=example_client", "accept-language": "en-US,en;q=0.5", "user-agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0", "content-length": "478", "origin": "https://example.com", "dnt": "1", "accept-encoding": "gzip, deflate, br" }, "method": "POST" }, "client_ip": "1.2.3.4", "tries": [ { "balancer_latency": 0, "port": 8080, "balancer_start": 1595326603251, "ip": "10.244.1.139" } ], "upstream_uri": "/login", "response": { "headers": { "content-type": "text/html; charset=UTF-8", "connection": "close", "referrer-policy": "no-referrer, strict-origin-when-cross-origin", "expect-ct": "max-age=86400, enforce", "strict-transport-security": "max-age=63072000; includeSubDomains; preload", "x-xss-protection": "1; mode=block", "x-kong-proxy-latency": "0", "x-frame-options": "DENY", "content-security-policy": "default-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; block-all-mixed-content; img-src 'self'; script-src 'self'; style-src 'self'; font-src 'self'", "content-length": "1252", "feature-policy": "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; battery 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; execution-while-not-rendered 'none'; execution-while-out-of-viewport 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; layout-animations 'none'; legacy-image-formats 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; navigation-override 'none'; oversized-images 'none'; payment 'none'; picture-in-picture 'none'; publickey-credentials 'none'; sync-xhr 'none'; usb 'none'; wake-lock 'none'; xr-spatial-tracking 'none'", "via": "kong/2.0.2", "set-cookie": [ "__Host-example_auth=some_auth; HttpOnly; Max-Age=86400; Path=/; SameSite=lax; Secure", "__Host-example_csrf=some_csrf; HttpOnly; Max-Age=86400; Path=/; SameSite=strict; Secure" ], "x-kong-upstream-latency": "191", "date": "Tue, 21 Jul 2020 10:16:44 GMT", "x-content-type-options": "nosniff" }, "status": 200, "size": "3552" }, "route": { "created_at": 1595260351, "path_handling": "v0", "id": "b01758b0-be33-5274-adfd-e53704dc2e4c", "service": { "id": "adc094b9-1359-5576-8973-5f5aac508101" }, "name": "example.default.00", "strip_path": False, "preserve_host": True, "regex_priority": 0, "updated_at": 1595260351, "paths": [ "/" ], "https_redirect_status_code": 426, "protocols": [ "http", "https" ], "hosts": [ "example.com" ] }, "started_at": 1595326603250 } expected = { "latencies": { "request": 191, "kong": 0, "proxy": 191 }, "service": { "host": "example.default.80.svc", "created_at": "2020-07-20T15:52:31+00:00", "connect_timeout": 60000, "id": "adc094b9-1359-5576-8973-5f5aac508101", "protocol": "http", "name": "example.default.80", "read_timeout": 60000, "port": 80, "path": "/", "updated_at": "2020-07-20T15:52:31+00:00", "write_timeout": 60000, "retries": 5 }, "request": { "querystring": { "foo": "bar", "baz": "" }, "size": "1430", "uri": "/login", "url": "https://example.com:8443/login", "headers": { "host": "example.com", "content-type": "application/x-www-form-urlencoded", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "authorization": "Bearer 0Mmt7PwMgQ9Z7oYvP4ypoQ", "cookie": "__Host-example_login_csrf-zK9kT=7xe0gvFR3iHPwx-B6ZIu8A", "upgrade-insecure-requests": "1", "connection": "keep-alive", "referer": "https://example.com/login?continue=https%3A%2F%2Fexample.com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3Dexample_client%26scope%3Dopenid%26state%3Dp2DOUg5DvzyFFxE9D%26nonce%3DFjKXc-cZLMHf3ohZQ_HQZQ%26redirect_uri%3Dhttps%253A%252F%252Fexample.com%252Fapp%252Foidc%252Fcallback%26new_login%3Dtrue&client_id=example_client", "accept-language": "en-US,en;q=0.5", "user-agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0", "content-length": "478", "origin": "https://example.com", "dnt": "1", "accept-encoding": "gzip, deflate, br" }, "method": "POST" }, "client_ip": "Pk7QhG5N_LBhKQyqtwiOSQ", "tries": [ { "balancer_latency": 0, "port": 8080, "balancer_start": "2020-07-21T10:16:43+00:00", "ip": "10.244.1.139" } ], "upstream_uri": "/login", "response": { "headers": { "content-type": "text/html; charset=UTF-8", "connection": "close", "referrer-policy": "no-referrer, strict-origin-when-cross-origin", "expect-ct": "max-age=86400, enforce", "strict-transport-security": "max-age=63072000; includeSubDomains; preload", "x-xss-protection": "1; mode=block", "x-kong-proxy-latency": "0", "x-frame-options": "DENY", "content-security-policy": "default-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; block-all-mixed-content; img-src 'self'; script-src 'self'; style-src 'self'; font-src 'self'", "content-length": "1252", "feature-policy": "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; battery 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; execution-while-not-rendered 'none'; execution-while-out-of-viewport 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; layout-animations 'none'; legacy-image-formats 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; navigation-override 'none'; oversized-images 'none'; payment 'none'; picture-in-picture 'none'; publickey-credentials 'none'; sync-xhr 'none'; usb 'none'; wake-lock 'none'; xr-spatial-tracking 'none'", "via": "kong/2.0.2", "set-cookie": [ "__Host-example_auth=vsXTPw-wyNDQcioekyXCcw; HttpOnly; Max-Age=86400; Path=/; SameSite=lax; Secure", "__Host-example_csrf=0-UmIYo1jhPDgnW5pHsEHw; HttpOnly; Max-Age=86400; Path=/; SameSite=strict; Secure" ], "x-kong-upstream-latency": "191", "date": "Tue, 21 Jul 2020 10:16:44 GMT", "x-content-type-options": "nosniff" }, "status": 200, "size": "3552" }, "route": { "created_at": "2020-07-20T15:52:31+00:00", "path_handling": "v0", "id": "b01758b0-be33-5274-adfd-e53704dc2e4c", "service": { "id": "adc094b9-1359-5576-8973-5f5aac508101" }, "name": "example.default.00", "strip_path": False, "preserve_host": True, "regex_priority": 0, "updated_at": "2020-07-20T15:52:31+00:00", "paths": [ "/" ], "https_redirect_status_code": 426, "protocols": [ "http", "https" ], "hosts": [ "example.com" ] }, "started_at": "2020-07-21T10:16:43+00:00" } result = transform_log(test_log, do_convert_ts=True, do_convert_qs_bools=True, do_hash_ip=True, do_hash_auth=True, do_hash_cookie=True) self.assertEqual(expected, result) def test_transform_bad_auth(self): test_log = { "request": { "headers": { "authorization": "some_token", }, }, } expected = { "request": { "headers": { "authorization": "0Mmt7PwMgQ9Z7oYvP4ypoQ", }, }, } result = transform_log(test_log, do_hash_auth=True) self.assertEqual(expected, result) def test_transform_bad_cookie(self): test_log = { "request": { "headers": { "cookie": "__Host-example_login_csrf-zK9kT-some_login_csrf", }, }, "response": { "headers": { "set-cookie": [ "__Host-example_auth/some_auth; HttpOnly; Max-Age=86400; Path=/; SameSite=lax; Secure", "__Host-example_csrf|some_csrf; HttpOnly; Max-Age=86400; Path=/; SameSite=strict; Secure" ], }, }, } expected = { "request": { "headers": { "cookie": "BPvPOrxZNo_DhGCLTtcO_A", }, }, "response": { "headers": { "set-cookie": [ "ceNEbDKXcwmC6WjnoB3xNw; HttpOnly; Max-Age=86400; Path=/; SameSite=lax; Secure", "AwdYctEnVuXiVepXBiXu-w; HttpOnly; Max-Age=86400; Path=/; SameSite=strict; Secure" ], }, }, } result = transform_log(test_log, do_hash_cookie=True) self.assertEqual(expected, result) def test_hash_paths(self): test_log = { 'foo': [ {'bar': 'a', 'baz': 'a'}, {'bar': 'a', 'baz': 'b'}, {'bar': 1, 'baz': 'c'}, {'bar': 1.1, 'baz': 'd'}, {'bar': ['a'], 'baz': 'e'}, {'bar': {'a': 'b'}, 'baz': 'f'}, ], } expected = { 'foo': [ {'bar': 'J8NebpNzh38p5WJGTkZJfg', 'baz': 'a'}, {'bar': 'J8NebpNzh38p5WJGTkZJfg', 'baz': 'b'}, {'bar': 'zqOHijNLJARp0Vn_hAtkNA', 'baz': 'c'}, {'bar': 'oduRJWsoVhEUGjoLDP2igA', 'baz': 'd'}, {'bar': '9TsxVbMCmC4Za3ZFt7YUsQ', 'baz': 'e'}, {'bar': 'WJqukeZh_5Vhv1BN0Cam4Q', 'baz': 'f'}, ], } result = transform_log(test_log, hash_paths=['foo[].bar']) self.assertEqual(expected, result) def test_null_paths(self): test_log = { 'foo': [ {'bar': 'a', 'baz': 'a'}, {'bar': 1, 'baz': 'b'}, {'bar': 1.1, 'baz': 'c'}, {'bar': ['a'], 'baz': 'd'}, {'bar': {'a': 'b'}, 'baz': 'e'}, ], } expected = { 'foo': [ {'bar': None, 'baz': 'a'}, {'bar': None, 'baz': 'b'}, {'bar': None, 'baz': 'c'}, {'bar': None, 'baz': 'd'}, {'bar': None, 'baz': 'e'}, ], } result = transform_log(test_log, null_paths=['foo[].bar']) self.assertEqual(expected, result)
44.683432
653
0.449315
1,323
15,103
5.018141
0.251701
0.021539
0.016569
0.022895
0.859166
0.844103
0.834312
0.808104
0.782949
0.748607
0
0.084954
0.400649
15,103
337
654
44.816024
0.648475
0
0
0.67284
0
0.049383
0.454612
0.119314
0
0
0
0
0.015432
1
0.015432
false
0
0.006173
0
0.027778
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
7515cac7e4d1ef43edd544d3910c5a6a20ce7a6c
98
py
Python
python/eet/__init__.py
SidaZh/EET
6414faa734abfdb666556304ca3df5b7f5e54c38
[ "Apache-2.0" ]
null
null
null
python/eet/__init__.py
SidaZh/EET
6414faa734abfdb666556304ca3df5b7f5e54c38
[ "Apache-2.0" ]
null
null
null
python/eet/__init__.py
SidaZh/EET
6414faa734abfdb666556304ca3df5b7f5e54c38
[ "Apache-2.0" ]
null
null
null
from .fairseq import * from .transformers import * from .utils import * from .pipelines import *
16.333333
27
0.744898
12
98
6.083333
0.5
0.410959
0
0
0
0
0
0
0
0
0
0
0.173469
98
5
28
19.6
0.901235
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
7547a91dafab9c7b229fe925a2917befdb556f92
158
py
Python
argentum-api/api/tests/utils/utils.py
devium/argentum
2bbb0f663fe9be78d106b1afa409b094da449519
[ "MIT" ]
1
2019-10-07T09:47:08.000Z
2019-10-07T09:47:08.000Z
argentum-api/api/tests/utils/utils.py
devium/argentum
2bbb0f663fe9be78d106b1afa409b094da449519
[ "MIT" ]
null
null
null
argentum-api/api/tests/utils/utils.py
devium/argentum
2bbb0f663fe9be78d106b1afa409b094da449519
[ "MIT" ]
null
null
null
import datetime def to_iso_format(time: datetime.datetime) -> str: return time.replace(tzinfo=datetime.timezone.utc).isoformat().replace('+00:00', 'Z')
26.333333
88
0.734177
22
158
5.181818
0.727273
0
0
0
0
0
0
0
0
0
0
0.028169
0.101266
158
5
89
31.6
0.774648
0
0
0
0
0
0.044304
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
6
75564ca95e8bf6b16deb4a7f6f2da20bce562a30
167
py
Python
osi_django_app/OSI/admin.py
godslayer201/open-source-list
5c708249a9a52603f26e3ad2f0b4a0ebd586b495
[ "MIT" ]
2
2020-09-16T14:10:03.000Z
2020-09-22T21:35:08.000Z
osi_django_app/OSI/admin.py
godslayer201/open-source-list
5c708249a9a52603f26e3ad2f0b4a0ebd586b495
[ "MIT" ]
null
null
null
osi_django_app/OSI/admin.py
godslayer201/open-source-list
5c708249a9a52603f26e3ad2f0b4a0ebd586b495
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import soc, osc, univ_soc_woc admin.site.register(soc) admin.site.register(osc) admin.site.register(univ_soc_woc)
23.857143
43
0.784431
27
167
4.703704
0.444444
0.212598
0.401575
0
0
0
0
0
0
0
0
0
0.11976
167
6
44
27.833333
0.863946
0
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
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
755e59a676f096d694c1bce55708827fd57f1854
68
py
Python
api/qr/__init__.py
TailorDev/pauling
3f616a24d3bdf6fc24308ba0ec0177c374a70707
[ "MIT" ]
7
2017-10-04T18:30:24.000Z
2018-03-08T12:41:09.000Z
api/qr/__init__.py
sarvesh107/pauling
3f616a24d3bdf6fc24308ba0ec0177c374a70707
[ "MIT" ]
27
2017-10-06T22:54:09.000Z
2018-03-08T12:37:28.000Z
api/qr/__init__.py
sarvesh107/pauling
3f616a24d3bdf6fc24308ba0ec0177c374a70707
[ "MIT" ]
3
2017-10-04T19:01:27.000Z
2020-10-01T02:42:26.000Z
from .svg import make_svg # noqa from .png import make_png # noqa
22.666667
33
0.735294
12
68
4
0.5
0.416667
0
0
0
0
0
0
0
0
0
0
0.205882
68
2
34
34
0.888889
0.132353
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
f33f047bd701a9285f93e58c03fcab26e4518b30
25
py
Python
test/json/des/__init__.py
vincent-musedev/libacvp
b11247d9d0b2fbd88954358272a43d35c059be7b
[ "BSD-2-Clause", "Apache-2.0" ]
45
2016-08-01T11:47:34.000Z
2022-02-22T21:27:27.000Z
test/json/des/__init__.py
vincent-musedev/libacvp
b11247d9d0b2fbd88954358272a43d35c059be7b
[ "BSD-2-Clause", "Apache-2.0" ]
221
2016-08-04T17:10:36.000Z
2022-01-21T19:53:36.000Z
test/json/des/__init__.py
vincent-musedev/libacvp
b11247d9d0b2fbd88954358272a43d35c059be7b
[ "BSD-2-Clause", "Apache-2.0" ]
94
2016-10-23T11:08:19.000Z
2022-01-21T11:50:16.000Z
from .des import main_des
25
25
0.84
5
25
4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.12
25
1
25
25
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
f390563b3cfae7b34b4fd4558f37190e60715548
32,834
py
Python
src/plotting_modules.py
kjdavidson/NoisePy
a7445dd2f68f64cb562d6a87096e5f12a2c3b612
[ "MIT" ]
74
2019-11-08T18:32:36.000Z
2022-03-27T11:26:53.000Z
src/plotting_modules.py
kjdavidson/NoisePy
a7445dd2f68f64cb562d6a87096e5f12a2c3b612
[ "MIT" ]
23
2019-11-10T01:30:04.000Z
2022-03-24T10:23:19.000Z
src/plotting_modules.py
kjdavidson/NoisePy
a7445dd2f68f64cb562d6a87096e5f12a2c3b612
[ "MIT" ]
36
2019-11-08T19:36:28.000Z
2022-02-17T06:31:42.000Z
import os import sys import glob import obspy import scipy import pyasdf import numpy as np import matplotlib import matplotlib.pyplot as plt from scipy.fftpack import next_fast_len from obspy.signal.filter import bandpass ''' Ensembles of plotting functions to display intermediate/final waveforms from the NoisePy package. by Chengxin Jiang @Harvard (May.04.2019) Specifically, this plotting module includes functions of: 1) plot_waveform -> display the downloaded waveform for specific station 2) plot_substack_cc -> plot 2D matrix of the CC functions for one time-chunck (e.g., 2 days) 3) plot_substack_all -> plot 2D matrix of the CC functions for all time-chunck (e.g., every 1 day in 1 year) 4) plot_all_moveout -> plot the moveout of the stacked CC functions for all time-chunk ''' ############################################################################# ###############PLOTTING FUNCTIONS FOR FILES FROM S0########################## ############################################################################# def plot_waveform(sfile,net,sta,freqmin,freqmax,savefig=False,sdir=None): ''' display the downloaded waveform for station A PARAMETERS: ----------------------- sfile: containing all wavefrom data for a time-chunck in ASDF format net,sta,comp: network, station name and component freqmin: min frequency to be filtered freqmax: max frequency to be filtered USAGE: ----------------------- plot_waveform('temp.h5','CI','BLC',0.01,0.5) ''' # open pyasdf file to read try: ds = pyasdf.ASDFDataSet(sfile,mode='r') sta_list = ds.waveforms.list() except Exception: print("exit! cannot open %s to read"%sfile);sys.exit() # check whether station exists tsta = net+'.'+sta if tsta not in sta_list: raise ValueError('no data for %s in %s'%(tsta,sfile)) tcomp = ds.waveforms[tsta].get_waveform_tags() ncomp = len(tcomp) if ncomp == 1: tr = ds.waveforms[tsta][tcomp[0]] dt = tr[0].stats.delta npts = tr[0].stats.npts tt = np.arange(0,npts)*dt data = tr[0].data data = bandpass(data,freqmin,freqmax,int(1/dt),corners=4, zerophase=True) plt.figure(figsize=(9,3)) plt.plot(tt,data,'k-',linewidth=1) plt.title('T\u2080:%s %s.%s.%s @%5.3f-%5.2f Hz' % (tr[0].stats.starttime,net,sta,tcomp[0].split('_')[0].upper(),freqmin,freqmax)) plt.xlabel('Time [s]') plt.ylabel('Amplitude') plt.tight_layout() plt.show() elif ncomp == 3: tr = ds.waveforms[tsta][tcomp[0]] dt = tr[0].stats.delta npts = tr[0].stats.npts tt = np.arange(0,npts)*dt data = np.zeros(shape=(ncomp,npts),dtype=np.float32) for ii in range(ncomp): data[ii] = ds.waveforms[tsta][tcomp[ii]][0].data data[ii] = bandpass(data[ii],freqmin,freqmax,int(1/dt),corners=4, zerophase=True) plt.figure(figsize=(9,6)) plt.subplot(311) plt.plot(tt,data[0],'k-',linewidth=1) plt.title('T\u2080:%s %s.%s @%5.3f-%5.2f Hz' % (tr[0].stats.starttime,net,sta,freqmin,freqmax)) plt.legend([tcomp[0].split('_')[0].upper()],loc='upper left') plt.subplot(312) plt.plot(tt,data[1],'k-',linewidth=1) plt.legend([tcomp[1].split('_')[0].upper()],loc='upper left') plt.subplot(313) plt.plot(tt,data[2],'k-',linewidth=1) plt.legend([tcomp[2].split('_')[0].upper()],loc='upper left') plt.xlabel('Time [s]') plt.tight_layout() if savefig: if not os.path.isdir(sdir):os.mkdir(sdir) outfname = sdir+'/{0:s}_{1:s}.{2:s}.pdf'.format(sfile.split('.')[0],net,sta) plt.savefig(outfname, format='pdf', dpi=400) plt.close() else: plt.show() ############################################################################# ###############PLOTTING FUNCTIONS FOR FILES FROM S1########################## ############################################################################# def plot_substack_cc(sfile,freqmin,freqmax,disp_lag=None,savefig=True,sdir='./'): ''' display the 2D matrix of the cross-correlation functions for a certain time-chunck. PARAMETERS: -------------------------- sfile: cross-correlation functions outputed by S1 freqmin: min frequency to be filtered freqmax: max frequency to be filtered disp_lag: time ranges for display USAGE: -------------------------- plot_substack_cc('temp.h5',0.1,1,100,True,'./') Note: IMPORTANT!!!! this script only works for cross-correlation with sub-stacks being set to True in S1. ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') try: ds = pyasdf.ASDFDataSet(sfile,mode='r') # extract common variables spairs = ds.auxiliary_data.list() path_lists = ds.auxiliary_data[spairs[0]].list() flag = ds.auxiliary_data[spairs[0]][path_lists[0]].parameters['substack'] dt = ds.auxiliary_data[spairs[0]][path_lists[0]].parameters['dt'] maxlag = ds.auxiliary_data[spairs[0]][path_lists[0]].parameters['maxlag'] except Exception: print("exit! cannot open %s to read"%sfile);sys.exit() # only works for cross-correlation with substacks generated if not flag: raise ValueError('seems no substacks have been done! not suitable for this plotting function') # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') # t is the time labels for plotting t = np.arange(-int(disp_lag),int(disp_lag)+dt,step=int(2*int(disp_lag)/4)) # windowing the data indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 for spair in spairs: ttr = spair.split('_') net1,sta1 = ttr[0].split('.') net2,sta2 = ttr[1].split('.') for ipath in path_lists: chan1,chan2 = ipath.split('_') try: dist = ds.auxiliary_data[spair][ipath].parameters['dist'] ngood= ds.auxiliary_data[spair][ipath].parameters['ngood'] ttime= ds.auxiliary_data[spair][ipath].parameters['time'] timestamp = np.empty(ttime.size,dtype='datetime64[s]') except Exception: print('continue! something wrong with %s %s'%(spair,ipath)) continue # cc matrix data = ds.auxiliary_data[spair][ipath].data[:,indx1:indx2] nwin = data.shape[0] amax = np.zeros(nwin,dtype=np.float32) if nwin==0 or len(ngood)==1: print('continue! no enough substacks!');continue tmarks = [] # load cc for each station-pair for ii in range(nwin): data[ii] = bandpass(data[ii],freqmin,freqmax,int(1/dt),corners=4, zerophase=True) amax[ii] = max(data[ii]) data[ii] /= amax[ii] timestamp[ii] = obspy.UTCDateTime(ttime[ii]) tmarks.append(obspy.UTCDateTime(ttime[ii]).strftime('%H:%M:%S')) # plotting if nwin>10: tick_inc = int(nwin/5) else: tick_inc = 2 fig = plt.figure(figsize=(10,6)) ax = fig.add_subplot(211) ax.matshow(data,cmap='seismic',extent=[-disp_lag,disp_lag,nwin,0],aspect='auto') ax.set_title('%s.%s.%s %s.%s.%s dist:%5.2fkm' % (net1,sta1,chan1,net2,sta2,chan2,dist)) ax.set_xlabel('time [s]') ax.set_xticks(t) ax.set_yticks(np.arange(0,nwin,step=tick_inc)) ax.set_yticklabels(timestamp[0:-1:tick_inc]) ax.xaxis.set_ticks_position('bottom') ax1 = fig.add_subplot(413) ax1.set_title('stacked and filtered at %4.2f-%4.2f Hz'%(freqmin,freqmax)) ax1.plot(np.arange(-disp_lag,disp_lag+dt,dt),np.mean(data,axis=0),'k-',linewidth=1) ax1.set_xticks(t) ax2 = fig.add_subplot(414) ax2.plot(amax/min(amax),'r-') ax2.plot(ngood,'b-') ax2.set_xlabel('waveform number') ax2.set_xticks(np.arange(0,nwin,step=tick_inc)) ax2.set_xticklabels(tmarks[0:nwin:tick_inc]) #for tick in ax[2].get_xticklabels(): # tick.set_rotation(30) ax2.legend(['relative amp','ngood'],loc='upper right') fig.tight_layout() # save figure or just show if savefig: if sdir==None:sdir = sfile.split('.')[0] if not os.path.isdir(sdir):os.mkdir(sdir) outfname = sdir+'/{0:s}.{1:s}.{2:s}_{3:s}.{4:s}.{5:s}.pdf'.format(net1,sta1,chan1,net2,sta2,chan2) fig.savefig(outfname, format='pdf', dpi=400) plt.close() else: fig.show() def plot_substack_cc_spect(sfile,freqmin,freqmax,disp_lag=None,savefig=True,sdir='./'): ''' display the 2D matrix of the cross-correlation functions for a time-chunck. PARAMETERS: ----------------------- sfile: cross-correlation functions outputed by S1 freqmin: min frequency to be filtered freqmax: max frequency to be filtered disp_lag: time ranges for display USAGE: ----------------------- plot_substack_cc('temp.h5',0.1,1,200,True,'./') Note: IMPORTANT!!!! this script only works for the cross-correlation with sub-stacks in S1. ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') try: ds = pyasdf.ASDFDataSet(sfile,mode='r') # extract common variables spairs = ds.auxiliary_data.list() path_lists = ds.auxiliary_data[spairs[0]].list() flag = ds.auxiliary_data[spairs[0]][path_lists[0]].parameters['substack'] dt = ds.auxiliary_data[spairs[0]][path_lists[0]].parameters['dt'] maxlag = ds.auxiliary_data[spairs[0]][path_lists[0]].parameters['maxlag'] except Exception: print("exit! cannot open %s to read"%sfile);sys.exit() # only works for cross-correlation with substacks generated if not flag: raise ValueError('seems no substacks have been done! not suitable for this plotting function') # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') t = np.arange(-int(disp_lag),int(disp_lag)+dt,step=int(2*int(disp_lag)/4)) indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 nfft = int(next_fast_len(indx2-indx1)) freq = scipy.fftpack.fftfreq(nfft,d=dt)[:nfft//2] for spair in spairs: ttr = spair.split('_') net1,sta1 = ttr[0].split('.') net2,sta2 = ttr[1].split('.') for ipath in path_lists: chan1,chan2 = ipath.split('_') try: dist = ds.auxiliary_data[spair][ipath].parameters['dist'] ngood= ds.auxiliary_data[spair][ipath].parameters['ngood'] ttime= ds.auxiliary_data[spair][ipath].parameters['time'] timestamp = np.empty(ttime.size,dtype='datetime64[s]') except Exception: print('continue! something wrong with %s %s'%(spair,ipath)) continue # cc matrix data = ds.auxiliary_data[spair][ipath].data[:,indx1:indx2] nwin = data.shape[0] amax = np.zeros(nwin,dtype=np.float32) spec = np.zeros(shape=(nwin,nfft//2),dtype=np.complex64) if nwin==0 or len(ngood)==1: print('continue! no enough substacks!');continue # load cc for each station-pair for ii in range(nwin): spec[ii] = scipy.fftpack.fft(data[ii],nfft,axis=0)[:nfft//2] spec[ii] /= np.max(np.abs(spec[ii]),axis=0) data[ii] = bandpass(data[ii],freqmin,freqmax,int(1/dt),corners=4, zerophase=True) amax[ii] = max(data[ii]) data[ii] /= amax[ii] timestamp[ii] = obspy.UTCDateTime(ttime[ii]) # plotting if nwin>10: tick_inc = int(nwin/5) else: tick_inc = 2 fig,ax = plt.subplots(3,sharex=False) ax[0].matshow(data,cmap='seismic',extent=[-disp_lag,disp_lag,nwin,0],aspect='auto') ax[0].set_title('%s.%s.%s %s.%s.%s dist:%5.2f km' % (net1,sta1,chan1,net2,sta2,chan2,dist)) ax[0].set_xlabel('time [s]') ax[0].set_xticks(t) ax[0].set_yticks(np.arange(0,nwin,step=tick_inc)) ax[0].set_yticklabels(timestamp[0:-1:tick_inc]) ax[0].xaxis.set_ticks_position('bottom') ax[1].matshow(np.abs(spec),cmap='seismic',extent=[freq[0],freq[-1],nwin,0],aspect='auto') ax[1].set_xlabel('freq [Hz]') ax[1].set_ylabel('amplitudes') ax[1].set_yticks(np.arange(0,nwin,step=tick_inc)) ax[1].xaxis.set_ticks_position('bottom') ax[2].plot(amax/min(amax),'r-') ax[2].plot(ngood,'b-') ax[2].set_xlabel('waveform number') #ax[1].set_xticks(np.arange(0,nwin,int(nwin/5))) ax[2].legend(['relative amp','ngood'],loc='upper right') fig.tight_layout() # save figure or just show if savefig: if sdir==None:sdir = sfile.split('.')[0] if not os.path.isdir(sdir):os.mkdir(sdir) outfname = sdir+'/{0:s}.{1:s}.{2:s}_{3:s}.{4:s}.{5:s}.pdf'.format(net1,sta1,chan1,net2,sta2,chan2) fig.savefig(outfname, format='pdf', dpi=400) plt.close() else: fig.show() ############################################################################# ###############PLOTTING FUNCTIONS FOR FILES FROM S2########################## ############################################################################# def plot_substack_all(sfile,freqmin,freqmax,ccomp,disp_lag=None,savefig=False,sdir=None): ''' display the 2D matrix of the cross-correlation functions stacked for all time windows. PARAMETERS: --------------------- sfile: cross-correlation functions outputed by S2 freqmin: min frequency to be filtered freqmax: max frequency to be filtered disp_lag: time ranges for display ccomp: cross component of the targeted cc functions USAGE: ---------------------- plot_substack_all('temp.h5',0.1,1,'ZZ',50,True,'./') ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') paths = ccomp try: ds = pyasdf.ASDFDataSet(sfile,mode='r') # extract common variables dtype_lists = ds.auxiliary_data.list() dt = ds.auxiliary_data[dtype_lists[0]][paths].parameters['dt'] dist = ds.auxiliary_data[dtype_lists[0]][paths].parameters['dist'] maxlag = ds.auxiliary_data[dtype_lists[0]][paths].parameters['maxlag'] except Exception: print("exit! cannot open %s to read"%sfile);sys.exit() if len(dtype_lists)==1: raise ValueError('Abort! seems no substacks have been done') # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') t = np.arange(-int(disp_lag),int(disp_lag)+dt,step=int(2*int(disp_lag)/4)) indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 # other parameters to keep nwin = len(dtype_lists)-1 data = np.zeros(shape=(nwin,indx2-indx1),dtype=np.float32) ngood= np.zeros(nwin,dtype=np.int16) ttime= np.zeros(nwin,dtype=np.int) timestamp = np.empty(ttime.size,dtype='datetime64[s]') amax = np.zeros(nwin,dtype=np.float32) for ii,itype in enumerate(dtype_lists[2:]): timestamp[ii] = obspy.UTCDateTime(np.float(itype[1:])) try: ngood[ii] = ds.auxiliary_data[itype][paths].parameters['ngood'] ttime[ii] = ds.auxiliary_data[itype][paths].parameters['time'] #timestamp[ii] = obspy.UTCDateTime(ttime[ii]) # cc matrix data[ii] = ds.auxiliary_data[itype][paths].data[indx1:indx2] data[ii] = bandpass(data[ii],freqmin,freqmax,int(1/dt),corners=4, zerophase=True) amax[ii] = np.max(data[ii]) data[ii] /= amax[ii] except Exception as e: print(e);continue if len(ngood)==1: raise ValueError('seems no substacks have been done! not suitable for this plotting function') # plotting if nwin>100: tick_inc = int(nwin/10) elif nwin>10: tick_inc = int(nwin/5) else: tick_inc = 2 fig,ax = plt.subplots(2,sharex=False) ax[0].matshow(data,cmap='seismic',extent=[-disp_lag,disp_lag,nwin,0],aspect='auto') ax[0].set_title('%s dist:%5.2f km filtered at %4.2f-%4.2fHz' % (sfile.split('/')[-1],dist,freqmin,freqmax)) ax[0].set_xlabel('time [s]') ax[0].set_ylabel('wavefroms') ax[0].set_xticks(t) ax[0].set_yticks(np.arange(0,nwin,step=tick_inc)) ax[0].set_yticklabels(timestamp[0:nwin:tick_inc]) ax[0].xaxis.set_ticks_position('bottom') ax[1].plot(amax/max(amax),'r-') ax[1].plot(ngood,'b-') ax[1].set_xlabel('waveform number') ax[1].set_xticks(np.arange(0,nwin,nwin//5)) ax[1].legend(['relative amp','ngood'],loc='upper right') # save figure or just show if savefig: if sdir==None:sdir = sfile.split('.')[0] if not os.path.isdir(sdir):os.mkdir(sdir) outfname = sdir+'/{0:s}_{1:4.2f}_{2:4.2f}Hz.pdf'.format(sfile.split('/')[-1],freqmin,freqmax) fig.savefig(outfname, format='pdf', dpi=400) plt.close() else: fig.show() def plot_substack_all_spect(sfile,freqmin,freqmax,ccomp,disp_lag=None,savefig=False,sdir=None): ''' display the 2D matrix of the cross-correlation functions stacked for all time windows. PARAMETERS: ----------------------- sfile: cross-correlation functions outputed by S2 freqmin: min frequency to be filtered freqmax: max frequency to be filtered disp_lag: time ranges for display ccomp: cross component of the targeted cc functions USAGE: ----------------------- plot_substack_all('temp.h5',0.1,1,'ZZ',50,True,'./') ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') paths = ccomp try: ds = pyasdf.ASDFDataSet(sfile,mode='r') # extract common variables dtype_lists = ds.auxiliary_data.list() dt = ds.auxiliary_data[dtype_lists[0]][paths].parameters['dt'] dist = ds.auxiliary_data[dtype_lists[0]][paths].parameters['dist'] maxlag = ds.auxiliary_data[dtype_lists[0]][paths].parameters['maxlag'] except Exception: print("exit! cannot open %s to read"%sfile);sys.exit() if len(dtype_lists)==1: raise ValueError('Abort! seems no substacks have been done') # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') t = np.arange(-int(disp_lag),int(disp_lag)+dt,step=int(2*int(disp_lag)/4)) indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 nfft = int(next_fast_len(indx2-indx1)) freq = scipy.fftpack.fftfreq(nfft,d=dt)[:nfft//2] # other parameters to keep nwin = len(dtype_lists)-1 data = np.zeros(shape=(nwin,indx2-indx1),dtype=np.float32) spec = np.zeros(shape=(nwin,nfft//2),dtype=np.complex64) ngood= np.zeros(nwin,dtype=np.int16) ttime= np.zeros(nwin,dtype=np.int) timestamp = np.empty(ttime.size,dtype='datetime64[s]') amax = np.zeros(nwin,dtype=np.float32) for ii,itype in enumerate(dtype_lists[1:]): timestamp[ii] = obspy.UTCDateTime(np.float(itype[1:])) try: ngood[ii] = ds.auxiliary_data[itype][paths].parameters['ngood'] ttime[ii] = ds.auxiliary_data[itype][paths].parameters['time'] #timestamp[ii] = obspy.UTCDateTime(ttime[ii]) # cc matrix tdata = ds.auxiliary_data[itype][paths].data[indx1:indx2] spec[ii] = scipy.fftpack.fft(tdata,nfft,axis=0)[:nfft//2] spec[ii] /= np.max(np.abs(spec[ii])) data[ii] = bandpass(tdata,freqmin,freqmax,int(1/dt),corners=4, zerophase=True) amax[ii] = np.max(data[ii]) data[ii] /= amax[ii] except Exception as e: print(e);continue if len(ngood)==1: raise ValueError('seems no substacks have been done! not suitable for this plotting function') # plotting tick_inc = 50 fig,ax = plt.subplots(3,sharex=False) ax[0].matshow(data,cmap='seismic',extent=[-disp_lag,disp_lag,nwin,0],aspect='auto') ax[0].set_title('%s dist:%5.2f km' % (sfile.split('/')[-1],dist)) ax[0].set_xlabel('time [s]') ax[0].set_ylabel('wavefroms') ax[0].set_xticks(t) ax[0].set_yticks(np.arange(0,nwin,step=tick_inc)) ax[0].set_yticklabels(timestamp[0:nwin:tick_inc]) ax[0].xaxis.set_ticks_position('bottom') ax[1].matshow(np.abs(spec),cmap='seismic',extent=[freq[0],freq[-1],nwin,0],aspect='auto') ax[1].set_xlabel('freq [Hz]') ax[1].set_ylabel('amplitudes') ax[1].set_yticks(np.arange(0,nwin,step=tick_inc)) ax[1].set_yticklabels(timestamp[0:nwin:tick_inc]) ax[1].xaxis.set_ticks_position('bottom') ax[2].plot(amax/max(amax),'r-') ax[2].plot(ngood,'b-') ax[2].set_xlabel('waveform number') ax[2].set_xticks(np.arange(0,nwin,nwin//15)) ax[2].legend(['relative amp','ngood'],loc='upper right') # save figure or just show if savefig: if sdir==None:sdir = sfile.split('.')[0] if not os.path.isdir(sdir):os.mkdir(sdir) outfname = sdir+'/{0:s}.pdf'.format(sfile.split('/')[-1]) fig.savefig(outfname, format='pdf', dpi=400) plt.close() else: fig.show() def plot_all_moveout(sfiles,dtype,freqmin,freqmax,ccomp,dist_inc,disp_lag=None,savefig=False,sdir=None): ''' display the moveout (2D matrix) of the cross-correlation functions stacked for all time chuncks. PARAMETERS: --------------------- sfile: cross-correlation functions outputed by S2 dtype: datatype either 'Allstack0pws' or 'Allstack0linear' freqmin: min frequency to be filtered freqmax: max frequency to be filtered ccomp: cross component dist_inc: distance bins to stack over disp_lag: lag times for displaying savefig: set True to save the figures (in pdf format) sdir: diresied directory to save the figure (if not provided, save to default dir) USAGE: ---------------------- plot_substack_moveout('temp.h5','Allstack0pws',0.1,0.2,1,'ZZ',200,True,'./temp') ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') path = ccomp # extract common variables try: ds = pyasdf.ASDFDataSet(sfiles[0],mode='r') dt = ds.auxiliary_data[dtype][path].parameters['dt'] maxlag= ds.auxiliary_data[dtype][path].parameters['maxlag'] stack_method = dtype.split('0')[-1] except Exception: print("exit! cannot open %s to read"%sfiles[0]);sys.exit() # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') t = np.arange(-int(disp_lag),int(disp_lag)+dt,step=(int(2*int(disp_lag)/4))) indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 # cc matrix nwin = len(sfiles) data = np.zeros(shape=(nwin,indx2-indx1),dtype=np.float32) dist = np.zeros(nwin,dtype=np.float32) ngood= np.zeros(nwin,dtype=np.int16) # load cc and parameter matrix for ii in range(len(sfiles)): sfile = sfiles[ii] ds = pyasdf.ASDFDataSet(sfile,mode='r') try: # load data to variables dist[ii] = ds.auxiliary_data[dtype][path].parameters['dist'] ngood[ii]= ds.auxiliary_data[dtype][path].parameters['ngood'] tdata = ds.auxiliary_data[dtype][path].data[indx1:indx2] except Exception: print("continue! cannot read %s "%sfile);continue data[ii] = bandpass(tdata,freqmin,freqmax,int(1/dt),corners=4, zerophase=True) # average cc ntrace = int(np.round(np.max(dist)+0.51)/dist_inc) ndata = np.zeros(shape=(ntrace,indx2-indx1),dtype=np.float32) ndist = np.zeros(ntrace,dtype=np.float32) for td in range(0,ntrace-1): tindx = np.where((dist>=td*dist_inc)&(dist<(td+1)*dist_inc))[0] if len(tindx): ndata[td] = np.mean(data[tindx],axis=0) ndist[td] = (td+0.5)*dist_inc # normalize waveforms indx = np.where(ndist>0)[0] ndata = ndata[indx] ndist = ndist[indx] for ii in range(ndata.shape[0]): print(ii,np.max(np.abs(ndata[ii]))) ndata[ii] /= np.max(np.abs(ndata[ii])) # plotting figures fig,ax = plt.subplots() ax.matshow(ndata,cmap='seismic',extent=[-disp_lag,disp_lag,ndist[-1],ndist[0]],aspect='auto') ax.set_title('allstack %s @%5.3f-%5.2f Hz'%(stack_method,freqmin,freqmax)) ax.set_xlabel('time [s]') ax.set_ylabel('distance [km]') ax.set_xticks(t) ax.xaxis.set_ticks_position('bottom') #ax.text(np.ones(len(ndist))*(disp_lag-5),dist[ndist],ngood[ndist],fontsize=8) # save figure or show if savefig: outfname = sdir+'/moveout_allstack_'+str(stack_method)+'_'+str(dist_inc)+'kmbin.pdf' fig.savefig(outfname, format='pdf', dpi=400) plt.close() else: fig.show() def plot_all_moveout_1D_1comp(sfiles,sta,dtype,freqmin,freqmax,ccomp,disp_lag=None,savefig=False,sdir=None): ''' display the moveout waveforms of the cross-correlation functions stacked for all time chuncks. PARAMETERS: --------------------- sfile: cross-correlation functions outputed by S2 sta: source station name dtype: datatype either 'Allstack0pws' or 'Allstack0linear' freqmin: min frequency to be filtered freqmax: max frequency to be filtered ccomp: cross component disp_lag: lag times for displaying savefig: set True to save the figures (in pdf format) sdir: diresied directory to save the figure (if not provided, save to default dir) USAGE: ---------------------- plot_substack_moveout('temp.h5','Allstack0pws',0.1,0.2,'ZZ',200,True,'./temp') ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') receiver = sta+'.h5' stack_method = dtype.split('_')[-1] # extract common variables try: ds = pyasdf.ASDFDataSet(sfiles[0],mode='r') dt = ds.auxiliary_data[dtype][ccomp].parameters['dt'] maxlag= ds.auxiliary_data[dtype][ccomp].parameters['maxlag'] except Exception: print("exit! cannot open %s to read"%sfiles[0]);sys.exit() # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') tt = np.arange(-int(disp_lag),int(disp_lag)+dt,dt) indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 # load cc and parameter matrix mdist = 0 for ii in range(len(sfiles)): sfile = sfiles[ii] iflip = 0 treceiver = sfile.split('_')[-1] if treceiver == receiver: iflip = 1 ds = pyasdf.ASDFDataSet(sfile,mode='r') try: # load data to variables dist = ds.auxiliary_data[dtype][ccomp].parameters['dist'] ngood= ds.auxiliary_data[dtype][ccomp].parameters['ngood'] tdata = ds.auxiliary_data[dtype][ccomp].data[indx1:indx2] except Exception: print("continue! cannot read %s "%sfile);continue tdata = bandpass(tdata,freqmin,freqmax,int(1/dt),corners=4, zerophase=True) tdata /= np.max(tdata,axis=0) if iflip: plt.plot(tt,np.flip(tdata,axis=0)+dist,'k',linewidth=0.8) else: plt.plot(tt,tdata+dist,'k',linewidth=0.8) plt.title('%s %s filtered @%4.1f-%4.1f Hz' % (sta,ccomp,freqmin,freqmax)) plt.xlabel('time (s)') plt.ylabel('offset (km)') plt.text(maxlag*0.9,dist+0.5,receiver,fontsize=6) #----use to plot o times------ if mdist < dist: mdist = dist plt.plot([0,0],[0,mdist],'r--',linewidth=1) # save figure or show if savefig: outfname = sdir+'/moveout_'+sta+'_1D_'+str(stack_method)+'.pdf' plt.savefig(outfname, format='pdf', dpi=400) plt.close() else: plt.show() def plot_all_moveout_1D_9comp(sfiles,sta,dtype,freqmin,freqmax,disp_lag=None,savefig=False,sdir=None): ''' display the moveout waveforms of the cross-correlation functions stacked for all time chuncks. PARAMETERS: --------------------- sfile: cross-correlation functions outputed by S2 sta: source station name dtype: datatype either 'Allstack0pws' or 'Allstack0linear' freqmin: min frequency to be filtered freqmax: max frequency to be filtered disp_lag: lag times for displaying savefig: set True to save the figures (in pdf format) sdir: diresied directory to save the figure (if not provided, save to default dir) USAGE: ---------------------- plot_substack_moveout('temp.h5','Allstack0pws',0.1,0.2,'ZZ',200,True,'./temp') ''' # open data for read if savefig: if sdir==None:print('no path selected! save figures in the default path') receiver = sta+'.h5' stack_method = dtype.split('_')[-1] ccomp = ['ZR','ZT','ZZ','RR','RT','RZ','TR','TT','TZ'] # extract common variables try: ds = pyasdf.ASDFDataSet(sfiles[0],mode='r') dt = ds.auxiliary_data[dtype][ccomp[0]].parameters['dt'] maxlag= ds.auxiliary_data[dtype][ccomp[0]].parameters['maxlag'] except Exception: print("exit! cannot open %s to read"%sfiles[0]);sys.exit() # lags for display if not disp_lag:disp_lag=maxlag if disp_lag>maxlag:raise ValueError('lag excceds maxlag!') tt = np.arange(-int(disp_lag),int(disp_lag)+dt,dt) indx1 = int((maxlag-disp_lag)/dt) indx2 = indx1+2*int(disp_lag/dt)+1 # load cc and parameter matrix mdist = 80 plt.figure(figsize=(14,10.5)) for ic in range(len(ccomp)): comp = ccomp[ic] tmp = '33'+str(ic+1) plt.subplot(tmp) for ii in range(len(sfiles)): sfile = sfiles[ii] iflip = 0 treceiver = sfile.split('_')[-1] if treceiver == receiver: iflip = 1 ds = pyasdf.ASDFDataSet(sfile,mode='r') try: # load data to variables dist = ds.auxiliary_data[dtype][comp].parameters['dist'] ngood= ds.auxiliary_data[dtype][comp].parameters['ngood'] tdata = ds.auxiliary_data[dtype][comp].data[indx1:indx2] except Exception: print("continue! cannot read %s "%sfile);continue if dist>mdist:continue tdata = bandpass(tdata,freqmin,freqmax,int(1/dt),corners=4, zerophase=True) tdata /= np.max(tdata,axis=0) if iflip: plt.plot(tt,np.flip(tdata,axis=0)+dist,'k',linewidth=0.8) else: plt.plot(tt,tdata+dist,'k',linewidth=0.8) if ic==1: plt.title('%s filtered @%4.1f-%4.1f Hz' % (sta,freqmin,freqmax)) plt.xlabel('time (s)') plt.ylabel('offset (km)') if ic==0: plt.plot([0,160],[0,80],'r--',linewidth=0.2) plt.plot([0,80],[0,80],'g--',linewidth=0.2) plt.text(disp_lag*1.1,dist+0.5,treceiver,fontsize=6) plt.plot([0,0],[0,mdist],'b--',linewidth=1) font = {'family': 'serif', 'color': 'red', 'weight': 'bold','size': 16} plt.text(disp_lag*0.65,80,comp,fontdict=font) plt.tight_layout() # save figure or show if savefig: outfname = sdir+'/moveout_'+sta+'_1D_'+str(stack_method)+'.pdf' plt.savefig(outfname, format='pdf', dpi=300) plt.close() else: plt.show()
39.895504
141
0.589663
4,532
32,834
4.197926
0.090909
0.030539
0.037057
0.022076
0.849777
0.823495
0.802996
0.775664
0.745808
0.741393
0
0.027796
0.238472
32,834
822
142
39.944039
0.733083
0.173601
0
0.698473
0
0.005725
0.106425
0.005193
0
0
0
0
0
1
0.015267
false
0.019084
0.020992
0
0.03626
0.04771
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
45f3c2d27aa4a16e31771b7d1672513375750f1f
64
py
Python
src/strokes.py
jafetimbre/pil-to-ps
003361a5b49b212500be6e64a27211691c65cd7b
[ "MIT" ]
null
null
null
src/strokes.py
jafetimbre/pil-to-ps
003361a5b49b212500be6e64a27211691c65cd7b
[ "MIT" ]
null
null
null
src/strokes.py
jafetimbre/pil-to-ps
003361a5b49b212500be6e64a27211691c65cd7b
[ "MIT" ]
null
null
null
def inner_stroke(im): pass def outer_stroke(im): pass
9.142857
21
0.65625
10
64
4
0.6
0.4
0.6
0
0
0
0
0
0
0
0
0
0.25
64
6
22
10.666667
0.833333
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
6
341ebe71ad93bbea2ec0dff9463d963049755d6d
87
py
Python
tests/test_demo.py
nielsonf/hello_world
90af4baa85900b3b5126b6dfc3031d3f2e149341
[ "MIT" ]
null
null
null
tests/test_demo.py
nielsonf/hello_world
90af4baa85900b3b5126b6dfc3031d3f2e149341
[ "MIT" ]
null
null
null
tests/test_demo.py
nielsonf/hello_world
90af4baa85900b3b5126b6dfc3031d3f2e149341
[ "MIT" ]
null
null
null
import pytest def test_cube(): from demo.demo import cube assert cube(2) == 8
14.5
30
0.666667
14
87
4.071429
0.714286
0
0
0
0
0
0
0
0
0
0
0.030303
0.241379
87
5
31
17.4
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
347c814616bfce0ed2381cbdbfdc2ba0cb647a74
72
py
Python
pys/classes/annotations.py
Xithrius/Examples
d29fe9510f1c62a807e09f9707d0b2f6de9ffeed
[ "MIT" ]
null
null
null
pys/classes/annotations.py
Xithrius/Examples
d29fe9510f1c62a807e09f9707d0b2f6de9ffeed
[ "MIT" ]
null
null
null
pys/classes/annotations.py
Xithrius/Examples
d29fe9510f1c62a807e09f9707d0b2f6de9ffeed
[ "MIT" ]
null
null
null
import typing as t def test0(a: t.Union[str, int]) -> t.Any: pass
12
41
0.611111
14
72
3.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0.018182
0.236111
72
5
42
14.4
0.781818
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
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
1
0
1
1
0
1
0
0
6
cae59e6b2b5461e084cfd5ef2de955cd7cc489f7
103
py
Python
test/models/__init__.py
Tomos-Evans/garrison
6a0eea6822f7a5a64e80852427d4576c9018d0b4
[ "MIT" ]
1
2018-10-20T15:53:15.000Z
2018-10-20T15:53:15.000Z
test/models/__init__.py
Tomos-Evans/garrison
6a0eea6822f7a5a64e80852427d4576c9018d0b4
[ "MIT" ]
null
null
null
test/models/__init__.py
Tomos-Evans/garrison
6a0eea6822f7a5a64e80852427d4576c9018d0b4
[ "MIT" ]
null
null
null
from .ingredient import * from .drink_component import * from .drink import * from .dispenser import *
20.6
30
0.76699
13
103
6
0.461538
0.384615
0.384615
0
0
0
0
0
0
0
0
0
0.15534
103
4
31
25.75
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
caf2e3c5025891a382a27aff6769ca77937b4ee1
137
py
Python
scripts/npc/autogen_kasandra.py
hsienjan/SideQuest-Server
3e88debaf45615b759d999255908f99a15283695
[ "MIT" ]
null
null
null
scripts/npc/autogen_kasandra.py
hsienjan/SideQuest-Server
3e88debaf45615b759d999255908f99a15283695
[ "MIT" ]
null
null
null
scripts/npc/autogen_kasandra.py
hsienjan/SideQuest-Server
3e88debaf45615b759d999255908f99a15283695
[ "MIT" ]
null
null
null
# Character field ID when accessed: 820000000 # ObjectID: 1000000 # ParentID: 9010010 # Object Position X: -449 # Object Position Y: 225
22.833333
45
0.751825
18
137
5.722222
0.888889
0.271845
0
0
0
0
0
0
0
0
0
0.254386
0.167883
137
5
46
27.4
0.649123
0.919708
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
1
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
1b0516b8ceec71b4a22f3512c68394f69f6ca430
36
py
Python
Pluto/Systems/__init__.py
n8vm/Foton
eacec2de9bf53d8fecff387b60604e6227baea28
[ "MIT" ]
10
2019-12-16T18:04:48.000Z
2021-05-06T00:40:11.000Z
Pluto/Systems/__init__.py
natevm/Foton
eacec2de9bf53d8fecff387b60604e6227baea28
[ "MIT" ]
35
2019-01-29T21:57:44.000Z
2019-04-29T02:40:20.000Z
Pluto/Systems/__init__.py
natevm/Foton
eacec2de9bf53d8fecff387b60604e6227baea28
[ "MIT" ]
1
2019-01-19T22:34:00.000Z
2019-01-19T22:34:00.000Z
from Pluto.Systems.Systems import *
18
35
0.805556
5
36
5.8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
1
36
36
0.90625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1b4e40b3667a2b8543c968bbe653fc8de682b7a8
99
py
Python
packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/connectors/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/connectors/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/connectors/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from .kafka import init_kafka, KafkaSettings from .rabbitmq import init_rabbitmq, RabbitmqSettings
33
53
0.858586
12
99
6.916667
0.583333
0.240964
0
0
0
0
0
0
0
0
0
0
0.10101
99
2
54
49.5
0.932584
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1b52e20e625677fa6203cae0d82c1a6e58aa1a2a
254
py
Python
django_tutorial/views/error_views.py
twtrubiks/django-tutorial
9cb92ca03ba3de574b124446ab49c94f9900dcc8
[ "MIT" ]
431
2017-04-09T11:44:30.000Z
2022-03-09T09:22:00.000Z
django_tutorial/views/error_views.py
zshen00/django-tutorial
9cb92ca03ba3de574b124446ab49c94f9900dcc8
[ "MIT" ]
1
2017-10-26T06:17:58.000Z
2018-04-27T06:52:01.000Z
django_tutorial/views/error_views.py
zshen00/django-tutorial
9cb92ca03ba3de574b124446ab49c94f9900dcc8
[ "MIT" ]
138
2017-04-10T13:36:03.000Z
2022-03-16T13:16:09.000Z
from django.shortcuts import render def view_404(request): return render(request, 'django_tutorial/error_pages/page_404.html', status=404) def view_500(request): return render(request, 'django_tutorial/error_pages/page_500.html', status=500)
25.4
83
0.783465
37
254
5.162162
0.459459
0.073298
0.198953
0.272251
0.565445
0.565445
0.565445
0.565445
0.565445
0
0
0.079646
0.110236
254
9
84
28.222222
0.765487
0
0
0
0
0
0.322835
0.322835
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
59f26542f2fe8d0ce4367beee404e46a3371d4b2
37,779
py
Python
src/PythonUnitTests/UFUNCTests/UFUNC_UINT64.py
thild/numpy.net
1a607cfb42263f92314a1e8dbec6f5436a7feb73
[ "BSD-3-Clause" ]
59
2019-01-20T19:43:05.000Z
2022-03-26T06:08:51.000Z
src/PythonUnitTests/UFUNCTests/UFUNC_UINT64.py
thild/numpy.net
1a607cfb42263f92314a1e8dbec6f5436a7feb73
[ "BSD-3-Clause" ]
21
2019-06-06T17:45:01.000Z
2022-03-30T10:37:24.000Z
src/PythonUnitTests/UFUNCTests/UFUNC_UINT64.py
thild/numpy.net
1a607cfb42263f92314a1e8dbec6f5436a7feb73
[ "BSD-3-Clause" ]
7
2019-05-12T21:06:18.000Z
2022-02-13T12:23:23.000Z
import unittest import numpy as np class Test_UFUNC_UINT64(unittest.TestCase): #region UFUNC UINT64 Tests #region OUTER Tests def test_AddOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.add.outer(a1,a2) print(b) def test_SubtractOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.subtract.outer(a1,a2) print(b) def test_SubtractOuter_UINT32(self): a1 = np.arange(0, 5, dtype=np.uint32); a2 = np.arange(3, 8, dtype=np.uint32); b = np.subtract.outer(a1,a2) print(b) def test_MultiplyOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.multiply.outer(a1,a2) print(b) def test_DivideOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.divide.outer(a1,a2) print(b) def test_RemainderOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.remainder.outer(a1,a2) print(b) def test_FModOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.fmod.outer(a1,a2) print(b) def test_SquareOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.square.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ReciprocalOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.reciprocal.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_OnesLikeOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.ones_like.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_SqrtOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.sqrt.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_NegativeOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.negative.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_AbsoluteOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.absolute.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_InvertOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.invert.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LeftShiftOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.left_shift.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_RightShiftOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.right_shift.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseAndOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.bitwise_and.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseOrOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.bitwise_or.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseXorOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.bitwise_xor.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LessOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.less.outer(a1,a2) print(b) def test_LessEqualOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.less_equal.outer(a1,a2) print(b) def test_EqualOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.equal.outer(a1,a2) print(b) def test_NotEqualOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.not_equal.outer(a1,a2) print(b) def test_GreaterOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.greater.outer(a1,a2) print(b) def test_GreaterEqualOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.greater_equal.outer(a1,a2) print(b) def test_FloorDivideOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.floor_divide.outer(a1,a2) print(b) def test_TrueDivideOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.true_divide.outer(a1,a2) print(b) def test_LogicalAndOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.logical_and.outer(a1,a2) print(b) def test_LogicalOrOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.logical_or.outer(a1,a2) print(b) def test_FloorOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.floor.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_CeilOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.ceil.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_MaximumOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.maximum.outer(a1,a2) print(b) def test_MinimumOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.minimum.outer(a1,a2) print(b) def test_RintOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.rint.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ConjugateOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.conjugate.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_IsNANOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); try : b = np.isnan.outer(a1,a2) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_FMaxOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.fmax.outer(a1,a2) print(b) def test_FMinOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.fmin.outer(a1,a2) print(b) def test_HeavisideOuter_UINT64(self): a1 = np.arange(0, 5, dtype=np.uint64); a2 = np.arange(3, 8, dtype=np.uint64); b = np.heaviside.outer(a1,a2) print(b) #endregion #region REDUCE Tests def test_AddReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.add.reduce(a1) print(b) def test_SubtractReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.subtract.reduce(a1) print(b) def test_SubtractReduce_UINT32(self): a1 = np.arange(0, 100, dtype=np.uint32).reshape((10,10)); b = np.subtract.reduce(a1) print(b) def test_MultiplyReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.multiply.reduce(a1) print(b) def test_MultiplyReduce_UINT32(self): a1 = np.arange(0, 100, dtype=np.uint32).reshape((10,10)); b = np.multiply.reduce(a1) print(b) def test_DivideReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.divide.reduce(a1) print(b) def test_RemainderReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.remainder.reduce(a1) print(b) def test_FModReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.fmod.reduce(a1) print(b) def test_SquareReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.square.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ReciprocalReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.reciprocal.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_OnesLikeReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.ones_like.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_SqrtReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.sqrt.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_NegativeReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.negative.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_AbsoluteReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.absolute.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_InvertReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.invert.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LeftShiftReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.left_shift.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_RightShiftReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.right_shift.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseAndReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.bitwise_and.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseOrReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.bitwise_or.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseXorReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.bitwise_xor.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LessReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.less.reduce(a1) print(b) def test_LessEqualReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.less_equal.reduce(a1) print(b) def test_EqualReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.equal.reduce(a1) print(b) def test_NotEqualReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.not_equal.reduce(a1) print(b) def test_GreaterReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.greater.reduce(a1) print(b) def test_GreaterEqualReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.greater_equal.reduce(a1) print(b) def test_FloorDivideReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.floor_divide.reduce(a1) print(b) def test_TrueDivideReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try: b = np.true_divide.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LogicalAndReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.logical_and.reduce(a1) print(b) def test_LogicalOrReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.logical_or.reduce(a1) print(b) def test_FloorReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.floor.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_CeilReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.ceil.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_MaximumReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.maximum.reduce(a1) print(b) def test_MinimumReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.minimum.reduce(a1) print(b) def test_RintReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.rint.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ConjugateReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.conjugate.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_IsNANReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try : b = np.isnan.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_FMaxReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.fmax.reduce(a1) print(b) def test_FMinReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); b = np.fmin.reduce(a1) print(b) def test_HeavisideReduce_UINT64(self): a1 = np.arange(0, 100, dtype=np.uint64).reshape((10,10)); try: b = np.heaviside.reduce(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") #endregion #region ACCUMULATE Tests def test_AddAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.add.accumulate(a1) print(b) def test_SubtractAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.subtract.accumulate(a1) print(b) def test_SubtractAccumulate_UINT32(self): a1 = np.arange(0, 9, dtype=np.uint32).reshape((3,3)); b = np.subtract.accumulate(a1) print(b) def test_MultiplyAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.multiply.accumulate(a1) print(b) def test_DivideAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.divide.accumulate(a1) print(b) def test_RemainderAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.remainder.accumulate(a1) print(b) def test_FModAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.fmod.accumulate(a1) print(b) def test_SquareAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.square.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ReciprocalAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.reciprocal.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_OnesLikeAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.ones_like.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_SqrtAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.sqrt.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_NegativeAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.negative.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_AbsoluteAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.absolute.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_InvertAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.invert.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LeftShiftAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.left_shift.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_RightShiftAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.right_shift.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseAndAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.bitwise_and.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseOrAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.bitwise_or.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseXorAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.bitwise_xor.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LessAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.less.accumulate(a1) print(b) def test_LessEqualAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.less_equal.accumulate(a1) print(b) def test_EqualAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.equal.accumulate(a1) print(b) def test_NotEqualAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.not_equal.accumulate(a1) print(b) def test_GreaterAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.greater.accumulate(a1) print(b) def test_GreaterEqualAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.greater_equal.accumulate(a1) print(b) def test_FloorDivideAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.floor_divide.accumulate(a1) print(b) def test_TrueDivideAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.true_divide.accumulate(a1) print(b) def test_LogicalAndAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.logical_and.accumulate(a1) print(b) def test_LogicalOrAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.logical_or.accumulate(a1) print(b) def test_FloorAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.floor.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_CeilAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.ceil.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_MaximumAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.maximum.accumulate(a1) print(b) def test_MinimumAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.minimum.accumulate(a1) print(b) def test_RintAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.rint.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ConjugateAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.conjugate.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_IsNANAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.isnan.accumulate(a1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_FMaxAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.fmax.accumulate(a1) print(b) def test_FMinAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.fmin.accumulate(a1) print(b) def test_HeavisideAccumulate_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.heaviside.accumulate(a1) print(b) #endregion #region REDUCEAT UINT64 Tests def test_AddReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.add.reduceat(a1, [0, 2], axis = 1) print(b) def test_SubtractReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.subtract.reduceat(a1, [0, 2], axis = 1) print(b) def test_SubtractReduceAt_UINT32(self): a1 = np.arange(0, 9, dtype=np.uint32).reshape((3,3)); b = np.subtract.reduceat(a1, [0, 2], axis = 1) print(b) def test_MultiplyReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.multiply.reduceat(a1, [0, 2], axis = 1) print(b) def test_DivideReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.divide.reduceat(a1, [0, 2], axis = 1) print(b) def test_RemainderReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.remainder.reduceat(a1, [0, 2], axis = 1) print(b) def test_FModReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.fmod.reduceat(a1, [0, 2], axis = 1) print(b) def test_SquareReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.square.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ReciprocalReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.reciprocal.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_OnesLikeReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.ones_like.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_SqrtReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.sqrt.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_NegativeReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.negative.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_AbsoluteReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.absolute.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_InvertReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.invert.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LeftShiftReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.left_shift.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_RightShiftReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.right_shift.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseAndReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.bitwise_and.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseOrReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.bitwise_or.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_BitwiseXorReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.bitwise_xor.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_LessReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.less.reduceat(a1, [0, 2], axis = 1) print(b) def test_LessEqualReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.less_equal.reduceat(a1, [0, 2], axis = 1) print(b) def test_EqualReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.equal.reduceat(a1, [0, 2], axis = 1) print(b) def test_NotEqualReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.not_equal.reduceat(a1, [0, 2], axis = 1) print(b) def test_GreaterReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.greater.reduceat(a1, [0, 2], axis = 1) print(b) def test_GreaterEqualReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.greater_equal.reduceat(a1, [0, 2], axis = 1) print(b) def test_FloorDivideReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.floor_divide.reduceat(a1, [0, 2], axis = 1) print(b) def test_TrueDivideReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.true_divide.reduceat(a1, [0, 2], axis = 1) print(b) def test_LogicalAndReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.logical_and.reduceat(a1, [0, 2], axis = 1) print(b) def test_LogicalOrReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.logical_or.reduceat(a1, [0, 2], axis = 1) print(b) def test_FloorReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.floor.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_CeilReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.ceil.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_MaximumReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.maximum.reduceat(a1, [0, 2], axis = 1) print(b) def test_MinimumReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.minimum.reduceat(a1, [0, 2], axis = 1) print(b) def test_RintReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.rint.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_ConjugateReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.conjugate.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_IsNANReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); try : b = np.isnan.reduceat(a1, [0, 2], axis = 1) print(b) self.fail("should have thrown exception") except: print("Exception occured") def test_FMaxReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.fmax.reduceat(a1, [0, 2], axis = 1) print(b) def test_FMinReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.fmin.reduceat(a1, [0, 2], axis = 1) print(b) def test_HeavisideReduceAt_UINT64(self): a1 = np.arange(0, 9, dtype=np.uint64).reshape((3,3)); b = np.heaviside.reduceat(a1, [0, 2], axis = 1) print(b) #endregion #endregion if __name__ == '__main__': unittest.main()
25.682529
73
0.541941
4,862
37,779
4.13369
0.048745
0.078018
0.122898
0.109364
0.865758
0.862225
0.837297
0.800876
0.786645
0.786645
0
0.078535
0.322878
37,779
1,470
74
25.7
0.707126
0.004182
0
0.673319
0
0
0.083967
0
0
0
0
0
0
1
0.164916
false
0
0.002101
0
0.168067
0.238445
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
94095a079d2202cdff5d27e376cc7dec1b8ab428
22
py
Python
startup.py
felixludos/adversary
bda1d7a07da736056b69903cb51b29ccdf1eb95e
[ "MIT" ]
null
null
null
startup.py
felixludos/adversary
bda1d7a07da736056b69903cb51b29ccdf1eb95e
[ "MIT" ]
null
null
null
startup.py
felixludos/adversary
bda1d7a07da736056b69903cb51b29ccdf1eb95e
[ "MIT" ]
null
null
null
import adversary
5.5
17
0.681818
2
22
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.318182
22
3
18
7.333333
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
944b3da25cd5066da7daf13b3dab234d95f0e9bd
9,727
py
Python
tests/test_vidkl.py
ziatdinovmax/gpax
a35374c178b66a3ea5640063a479b0b6be8d57db
[ "MIT" ]
13
2021-11-18T20:20:18.000Z
2022-03-23T12:53:51.000Z
tests/test_vidkl.py
ziatdinovmax/gpax
a35374c178b66a3ea5640063a479b0b6be8d57db
[ "MIT" ]
5
2022-02-25T09:50:44.000Z
2022-03-26T21:10:26.000Z
tests/test_vidkl.py
ziatdinovmax/gpax
a35374c178b66a3ea5640063a479b0b6be8d57db
[ "MIT" ]
null
null
null
import sys import pytest import numpy as onp import jax.numpy as jnp import jax import haiku as hk import numpyro from numpy.testing import assert_equal, assert_array_equal sys.path.insert(0, "../gpax/") from gpax.vidkl import viDKL, MLP from gpax.utils import get_keys def get_dummy_data(jax_ndarray=True): X = onp.random.randn(21, 36) y = onp.random.randn(21,) if jax_ndarray: return jnp.array(X), jnp.array(y) return X, y def get_dummy_image_data(jax_ndarray=True): X = onp.random.randn(21, 16, 16, 1) y = onp.random.randn(21,) if jax_ndarray: return jnp.array(X), jnp.array(y) return X, y def get_dummy_vector_data(jax_ndarray=True): X, y = get_dummy_data(jax_ndarray) X = X[None].repeat(3, axis=0) y = y[None].repeat(3, axis=0) return X, y class CustomConvNet(hk.Module): def __init__(self, embedim=2): super().__init__() self._embedim = embedim def __call__(self, x): x = hk.Conv2D(32, 3)(x) x = jax.nn.relu(x) x = hk.MaxPool(2, 2, 'SAME')(x) x = hk.Conv2D(64, 3)(x) x = jax.nn.relu(x) x = hk.Flatten()(x) x = hk.Linear(self._embedim)(x) return x @pytest.mark.parametrize("jax_ndarray", [True, False]) def test_single_fit(jax_ndarray): X, y = get_dummy_data(jax_ndarray) rng_key = get_keys()[0] m = viDKL(X.shape[-1]) nn_params, kernel_params, losses = m.single_fit( rng_key, X, y, num_steps=100, step_size=0.05) assert isinstance(kernel_params, dict) assert isinstance(nn_params, dict) assert isinstance(losses, jnp.ndarray) @pytest.mark.parametrize("jax_ndarray", [True, False]) def test_single_fit_custom_net(jax_ndarray): X, y = get_dummy_image_data(jax_ndarray) rng_key = get_keys()[0] m = viDKL(X.shape[1:], nn=CustomConvNet) nn_params, kernel_params, losses = m.single_fit( rng_key, X, y, num_steps=100, step_size=0.05) for i, val in enumerate(nn_params.values()): for k, v in val.items(): if 'w' in k and i < 2: assert_equal(v.ndim, 4) # confirm that this is a 4-dim weights tensor of CNN def test_get_mvn_posterior(): rng_key = get_keys()[0] X, y = get_dummy_data() X_test, _ = get_dummy_data() net = hk.transform(lambda x: MLP()(x)) nn_params = net.init(rng_key, X) kernel_params = {"k_length": jnp.array([1.0]), "k_scale": jnp.array(1.0), "noise": jnp.array(0.1)} m = viDKL(X.shape[-1]) mean, cov = m.get_mvn_posterior(X, y, X_test, nn_params, kernel_params) assert isinstance(mean, jnp.ndarray) assert isinstance(cov, jnp.ndarray) assert_equal(mean.shape, (X_test.shape[0],)) assert_equal(cov.shape, (X_test.shape[0], X_test.shape[0])) def test_get_mvn_posterior_noiseless(): rng_key = get_keys()[0] X, y = get_dummy_data() X_test, _ = get_dummy_data() net = hk.transform(lambda x: MLP()(x)) nn_params = net.init(rng_key, X) kernel_params = {"k_length": jnp.array([1.0]), "k_scale": jnp.array(1.0), "noise": jnp.array(0.1)} m = viDKL(X.shape[-1]) mean1, cov1 = m.get_mvn_posterior(X, y, X_test, nn_params, kernel_params, noiseless=False) mean1_, cov1_ = m.get_mvn_posterior(X, y, X_test, nn_params, kernel_params, noiseless=False) mean2, cov2 = m.get_mvn_posterior(X, y, X_test, nn_params, kernel_params, noiseless=True) assert_array_equal(mean1, mean1_) assert_array_equal(cov1, cov1_) assert_array_equal(mean1, mean2) assert onp.count_nonzero(cov1 - cov2) > 0 def test_fit_scalar_target(): X, y = get_dummy_data() rng_key = get_keys()[0] m = viDKL(X.shape[-1]) m.fit(rng_key, X, y, num_steps=100, step_size=0.05) for v in m.kernel_params.values(): assert v.ndim < 2 for val in m.nn_params.values(): for v in val.values(): assert v.ndim < 3 def test_fit_vector_target(): X, y = get_dummy_vector_data() rng_key = get_keys()[0] m = viDKL(X.shape[-1]) m.fit(rng_key, X, y, num_steps=100, step_size=0.05) for v in m.kernel_params.values(): assert v.ndim > 0 assert_equal(v.shape[0], 3) for val in m.nn_params.values(): for v in val.values(): assert v.ndim > 1 assert_equal(v.shape[0], 3) def test_predict_scalar(): rng_key = get_keys()[0] X, y = get_dummy_data() X_test, _ = get_dummy_data() net = hk.transform(lambda x: MLP()(x)) nn_params = net.init(rng_key, X) kernel_params = {"k_length": jnp.array([1.0]), "k_scale": jnp.array(1.0), "noise": jnp.array(0.1)} m = viDKL(X.shape[-1]) m.X_train = X m.y_train = y m.nn_params = nn_params m.kernel_params = kernel_params mean, var = m.predict(rng_key, X_test) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, (len(X_test),)) assert_equal(var.shape, (len(X_test),)) def test_predict_vector(): rng_key = get_keys()[0] X, y = get_dummy_vector_data() X_test, _ = get_dummy_vector_data() net = hk.transform(lambda x: MLP()(x)) clone = lambda x: net.init(rng_key, x) nn_params = jax.vmap(clone)(X) kernel_params = {"k_length": jnp.array([[1.0], [1.0], [1.0]]), "k_scale": jnp.array([1.0, 1.0, 1.0]), "noise": jnp.array([0.1, 0.1, 0.1])} m = viDKL(X.shape[-1]) m.X_train = X m.y_train = y m.nn_params = nn_params m.kernel_params = kernel_params mean, var = m.predict(rng_key, X_test) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, X_test.shape[:-1]) assert_equal(var.shape, X_test.shape[:-1]) def test_predict_in_batches_scalar(): rng_key = get_keys()[0] X, y = get_dummy_data() X_test, _ = get_dummy_data() net = hk.transform(lambda x: MLP()(x)) nn_params = net.init(rng_key, X) kernel_params = {"k_length": jnp.array([1.0]), "k_scale": jnp.array(1.0), "noise": jnp.array(0.1)} m = viDKL(X.shape[-1]) m.X_train = X m.y_train = y m.nn_params = nn_params m.kernel_params = kernel_params mean, var = m.predict_in_batches(rng_key, X_test, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, (len(X_test),)) assert_equal(var.shape, (len(X_test),)) def test_predict_in_batches_vector(): rng_key = get_keys()[0] X, y = get_dummy_vector_data() X_test, _ = get_dummy_vector_data() net = hk.transform(lambda x: MLP()(x)) clone = lambda x: net.init(rng_key, x) nn_params = jax.vmap(clone)(X) kernel_params = {"k_length": jnp.array([[1.0], [1.0], [1.0]]), "k_scale": jnp.array([1.0, 1.0, 1.0]), "noise": jnp.array([0.1, 0.1, 0.1])} m = viDKL(X.shape[-1]) m.X_train = X m.y_train = y m.nn_params = nn_params m.kernel_params = kernel_params mean, var = m.predict_in_batches(rng_key, X_test, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, X_test.shape[:-1]) assert_equal(var.shape, X_test.shape[:-1]) def test_fit_predict_scalar(): rng_key = get_keys()[0] X, y = get_dummy_data() X_test, _ = get_dummy_data() m = viDKL(X.shape[-1]) mean, var = m.fit_predict( rng_key, X, y, X_test, num_steps=100, step_size=0.05, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, (len(X_test),)) assert_equal(var.shape, (len(X_test),)) def test_fit_predict_vector(): rng_key = get_keys()[0] X, y = get_dummy_vector_data() X_test, _ = get_dummy_vector_data() m = viDKL(X.shape[-1]) mean, var = m.fit_predict( rng_key, X, y, X_test, num_steps=100, step_size=0.05, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, X_test.shape[:-1]) assert_equal(var.shape, X_test.shape[:-1]) def test_fit_predict_scalar_ensemble(): rng_key = get_keys()[0] X, y = get_dummy_data() X_test, _ = get_dummy_data() m = viDKL(X.shape[-1]) mean, var = m.fit_predict( rng_key, X, y, X_test, n_models=4, num_steps=100, step_size=0.05, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, (4, len(X_test),)) assert_equal(var.shape, (4, len(X_test),)) def test_fit_predict_vector_ensemble(): rng_key = get_keys()[0] X, y = get_dummy_vector_data() X_test, _ = get_dummy_vector_data() m = viDKL(X.shape[-1]) mean, var = m.fit_predict( rng_key, X, y, X_test, n_models=2, num_steps=100, step_size=0.05, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, (2, *X_test.shape[:-1])) assert_equal(var.shape, (2, *X_test.shape[:-1])) def test_fit_predict_scalar_ensemble_custom_net(): rng_key = get_keys()[0] X, y = get_dummy_image_data() X_test, _ = get_dummy_image_data() m = viDKL(X.shape[1:], nn=CustomConvNet) mean, var = m.fit_predict( rng_key, X, y, X_test, n_models=2, num_steps=100, step_size=0.05, batch_size=10) assert isinstance(mean, jnp.ndarray) assert isinstance(var, jnp.ndarray) assert_equal(mean.shape, (2, len(X_test),)) assert_equal(var.shape, (2, len(X_test),))
33.197952
96
0.631027
1,592
9,727
3.599246
0.08794
0.039267
0.055846
0.027923
0.855672
0.822513
0.802967
0.772426
0.761257
0.732286
0
0.031068
0.222371
9,727
292
97
33.311644
0.726467
0.00514
0
0.698413
0
0
0.016021
0
0
0
0
0
0.218254
1
0.079365
false
0
0.039683
0
0.146825
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
948bbd53e9c46defc98a1d5869983748d03b9a4f
103
py
Python
model.py
McHacks-2018/Retro-Reddit
a1620a5c374d535bb95151de466100234367451b
[ "MIT" ]
null
null
null
model.py
McHacks-2018/Retro-Reddit
a1620a5c374d535bb95151de466100234367451b
[ "MIT" ]
1
2019-10-22T02:52:07.000Z
2019-10-22T02:52:07.000Z
model.py
McHacks-2018/Retro-Reddit
a1620a5c374d535bb95151de466100234367451b
[ "MIT" ]
null
null
null
class Section: def get_display_text(self): pass def get_children(self): pass
12.875
31
0.601942
13
103
4.538462
0.692308
0.20339
0
0
0
0
0
0
0
0
0
0
0.330097
103
7
32
14.714286
0.855072
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0.4
0
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
1
0
1
0
0
1
0
0
6
84794719e66077b7bdf8b3053df34935cda4eda8
2,984
py
Python
thop/count_hooks.py
jwpleow/aanet
b83e7b11dfee117114ae7b35645b85e886d3d436
[ "Apache-2.0" ]
null
null
null
thop/count_hooks.py
jwpleow/aanet
b83e7b11dfee117114ae7b35645b85e886d3d436
[ "Apache-2.0" ]
null
null
null
thop/count_hooks.py
jwpleow/aanet
b83e7b11dfee117114ae7b35645b85e886d3d436
[ "Apache-2.0" ]
null
null
null
import argparse import torch import torch.nn as nn multiply_adds = 1 def count_convNd(m, x, y): cin = m.in_channels kernel_ops = m.weight.size()[2:].numel() ops_per_element = cin * kernel_ops output_elements = y.nelement() # cout x oW x oH total_ops = output_elements * ops_per_element // m.groups m.total_ops = torch.Tensor([int(total_ops)]) def count_dconv2d(m, x, y): x = x[0] # two inputs batch_size = x.size(0) height_in, width_in = x.size()[2:] cin = m.in_channels kernel_ops = m.weight.size()[2:].numel() # Add offset ops # Offset: [B, 18, H, W] add_offset_ops = 2 * kernel_ops * cin * batch_size * height_in * width_in ops_per_element = cin * kernel_ops output_elements = y.nelement() conv_ops = output_elements * ops_per_element // m.groups m.total_ops = torch.Tensor([int(add_offset_ops + conv_ops)]) def count_mdconv2d(m, x, y): x = x[0] # three inputs batch_size = x.size(0) height_in, width_in = x.size()[2:] cin = m.in_channels kernel_ops = m.weight.size()[2:].numel() # Add offset ops # Offset: [B, 18, H, W] add_offset_ops = 2 * kernel_ops * cin * batch_size * height_in * width_in # Modulation ops # Modulation: [B, 9, H, W] modulation_ops = kernel_ops * cin * batch_size * height_in * width_in ops_per_element = cin * kernel_ops output_elements = y.nelement() conv_ops = output_elements * ops_per_element // m.groups m.total_ops = torch.Tensor([int(add_offset_ops + conv_ops + modulation_ops)]) def count_conv2d(m, x, y): x = x[0] cin = m.in_channels cout = m.out_channels kh, kw = m.kernel_size batch_size = x.size()[0] out_h = y.size(2) out_w = y.size(3) kernel_ops = multiply_adds * kh * kw bias_ops = 1 if m.bias is not None else 0 ops_per_element = kernel_ops + bias_ops # total ops # num_out_elements = y.numel() output_elements = batch_size * out_w * out_h * cout total_ops = output_elements * ops_per_element * cin // m.groups m.total_ops = torch.Tensor([int(total_ops)]) def count_convtranspose2d(m, x, y): x = x[0] cin = m.in_channels cout = m.out_channels kh, kw = m.kernel_size # batch_size = x.size()[0] out_h = y.size(2) out_w = y.size(3) # ops per output element # kernel_mul = kh * kw * cin # kernel_add = kh * kw * cin - 1 kernel_ops = multiply_adds * kh * kw * cin // m.groups bias_ops = 1 if m.bias is not None else 0 ops_per_element = kernel_ops + bias_ops # total ops # num_out_elements = y.numel() # output_elements = batch_size * out_w * out_h * cout # ops_per_element = m.weight.nelement() output_elements = y.nelement() total_ops = output_elements * ops_per_element m.total_ops = torch.Tensor([int(total_ops)])
25.724138
82
0.614611
466
2,984
3.667382
0.143777
0.068461
0.083675
0.04096
0.818022
0.818022
0.781744
0.761264
0.719719
0.719719
0
0.015661
0.272453
2,984
115
83
25.947826
0.771534
0.142761
0
0.688525
0
0
0
0
0
0
0
0
0
1
0.081967
false
0
0.04918
0
0.131148
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
ca216d943f7740ec07946d833aa78c136cd07f3c
99
py
Python
cfdcode/__init__.py
pxr687/cfd2021
e4583e0b163817ddf360f35687d7939b06427868
[ "CC-BY-4.0" ]
1
2021-09-16T10:11:02.000Z
2021-09-16T10:11:02.000Z
cfdcode/__init__.py
pxr687/cfd2021
e4583e0b163817ddf360f35687d7939b06427868
[ "CC-BY-4.0" ]
10
2020-10-30T15:24:02.000Z
2021-08-30T12:16:31.000Z
cfdcode/__init__.py
pxr687/cfd2021
e4583e0b163817ddf360f35687d7939b06427868
[ "CC-BY-4.0" ]
5
2020-09-02T10:52:06.000Z
2021-11-07T08:32:42.000Z
""" Support code for textbook """ from . import ucb_page def setup(app): ucb_page.setup(app)
12.375
29
0.676768
15
99
4.333333
0.733333
0.215385
0
0
0
0
0
0
0
0
0
0
0.191919
99
7
30
14.142857
0.8125
0.252525
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
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
6
ca70d778f356f4e32a5b8375dbd0aec8219a8c49
20
py
Python
tefingerprint/util/__init__.py
timothymillar/TEFingerprint
3e812752f37554b791b6be74f8b8f481ab479622
[ "MIT" ]
null
null
null
tefingerprint/util/__init__.py
timothymillar/TEFingerprint
3e812752f37554b791b6be74f8b8f481ab479622
[ "MIT" ]
1
2020-05-20T01:53:51.000Z
2020-05-20T01:53:51.000Z
tefingerprint/util/__init__.py
timothymillar/TEFingerprint
3e812752f37554b791b6be74f8b8f481ab479622
[ "MIT" ]
2
2019-07-30T22:15:19.000Z
2020-10-25T01:34:51.000Z
from . import numpy
10
19
0.75
3
20
5
1
0
0
0
0
0
0
0
0
0
0
0
0.2
20
1
20
20
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ca70f8e2132f1bed9dbe991df4091bd595824cc6
30
py
Python
time_machine/analyze_data.py
ZviBaratz/time_machine
9aa0f7ccfcd8c29923944e745be5dac5c9109f6c
[ "MIT" ]
null
null
null
time_machine/analyze_data.py
ZviBaratz/time_machine
9aa0f7ccfcd8c29923944e745be5dac5c9109f6c
[ "MIT" ]
null
null
null
time_machine/analyze_data.py
ZviBaratz/time_machine
9aa0f7ccfcd8c29923944e745be5dac5c9109f6c
[ "MIT" ]
null
null
null
def analyze(data): return
10
18
0.666667
4
30
5
1
0
0
0
0
0
0
0
0
0
0
0
0.233333
30
2
19
15
0.869565
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
1
0
0
6
ca8f1de90b35c52b76240c48c004bf6f384fdad5
153
py
Python
pajbot/web/routes/playsound.py
leecopland/bullbot
52e463293097b58084afb4f9f1d85b0656a67d44
[ "MIT" ]
1
2020-10-01T23:36:38.000Z
2020-10-01T23:36:38.000Z
pajbot/web/routes/playsound.py
leecopland/bullbot
52e463293097b58084afb4f9f1d85b0656a67d44
[ "MIT" ]
1
2021-03-25T05:37:40.000Z
2021-03-25T05:37:40.000Z
pajbot/web/routes/playsound.py
leecopland/bullbot
52e463293097b58084afb4f9f1d85b0656a67d44
[ "MIT" ]
null
null
null
from flask import render_template def init(app): @app.route('/playsound') def playsound(): return render_template('playsoundlist.html')
21.857143
52
0.699346
18
153
5.833333
0.722222
0.266667
0
0
0
0
0
0
0
0
0
0
0.183007
153
6
53
25.5
0.84
0
0
0
0
0
0.183007
0
0
0
0
0
0
1
0.4
false
0
0.2
0.2
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
048ff5bd2b8df060a13293cecf1d4c55f4c69fee
18,632
py
Python
diffxpy/unit_test/test_single.py
SabrinaRichter/diffxpy
8eff054ca3ce097533134f490aac3580431eee15
[ "BSD-3-Clause" ]
null
null
null
diffxpy/unit_test/test_single.py
SabrinaRichter/diffxpy
8eff054ca3ce097533134f490aac3580431eee15
[ "BSD-3-Clause" ]
null
null
null
diffxpy/unit_test/test_single.py
SabrinaRichter/diffxpy
8eff054ca3ce097533134f490aac3580431eee15
[ "BSD-3-Clause" ]
null
null
null
import unittest import logging import numpy as np import pandas as pd import scipy.stats as stats from batchglm.api.models.glm_nb import Simulator import diffxpy.api as de class TestSingleNull(unittest.TestCase): def test_null_distribution_wald(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.wald() generates a uniform p-value distribution if it is given data simulated based on the null model. Returns the p-value of the two-side Kolmgorov-Smirnov test for equality of the observed p-value distribution and a uniform distribution. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=0) sim.generate() random_sample_description = pd.DataFrame({ "condition": np.random.randint(2, size=sim.num_observations), "batch": np.random.randint(2, size=sim.num_observations) }) test = de.test.wald( data=sim.X, factor_loc_totest="condition", formula_loc="~ 1 + condition + batch", sample_description=random_sample_description, batch_size=500, training_strategy="DEFAULT", dtype="float64" ) summary = test.summary() # Compare p-value distribution under null model against uniform distribution. pval_h0 = stats.kstest(test.pval, 'uniform').pvalue logging.getLogger("diffxpy").info('KS-test pvalue for null model match of wald(): %f' % pval_h0) assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!" return True def test_null_distribution_wald_multi(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.wald() (multivariate mode) generates a uniform p-value distribution if it is given data simulated based on the null model. Returns the p-value of the two-side Kolmgorov-Smirnov test for equality of the observed p-value distribution and a uniform distribution. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=0) sim.generate() random_sample_description = pd.DataFrame({ "condition": np.random.randint(4, size=sim.num_observations) }) test = de.test.wald( data=sim.X, factor_loc_totest="condition", formula_loc="~ 1 + condition", sample_description=random_sample_description, training_strategy="DEFAULT", dtype="float64" ) summary = test.summary() # Compare p-value distribution under null model against uniform distribution. pval_h0 = stats.kstest(test.pval, 'uniform').pvalue logging.getLogger("diffxpy").info('KS-test pvalue for null model match of wald(): %f' % pval_h0) assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!" return True def test_null_distribution_lrt(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.lrt() generates a uniform p-value distribution if it is given data simulated based on the null model. Returns the p-value of the two-side Kolmgorov-Smirnov test for equality of the observed p-value distribution and a uniform distribution. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=0) sim.generate() random_sample_description = pd.DataFrame({ "condition": np.random.randint(2, size=sim.num_observations) }) test = de.test.lrt( data=sim.X, full_formula_loc="~ 1 + condition", full_formula_scale="~ 1", reduced_formula_loc="~ 1", reduced_formula_scale="~ 1", sample_description=random_sample_description, training_strategy="DEFAULT", dtype="float64" ) summary = test.summary() # Compare p-value distribution under null model against uniform distribution. pval_h0 = stats.kstest(test.pval, 'uniform').pvalue logging.getLogger("diffxpy").info('KS-test pvalue for null model match of lrt(): %f' % pval_h0) assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!" return True def test_null_distribution_ttest(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.t_test() generates a uniform p-value distribution if it is given data simulated based on the null model. Returns the p-value of the two-side Kolmgorov-Smirnov test for equality of the observed p-value distribution and a uniform distribution. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=0) sim.generate() random_sample_description = pd.DataFrame({ "condition": np.random.randint(2, size=sim.num_observations) }) test = de.test.t_test( data=sim.X, grouping="condition", sample_description=random_sample_description, dtype="float64" ) summary = test.summary() # Compare p-value distribution under null model against uniform distribution. pval_h0 = stats.kstest(test.pval, 'uniform').pvalue logging.getLogger("diffxpy").info('KS-test pvalue for null model match of t_test(): %f' % pval_h0) assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!" return True def test_null_distribution_wilcoxon(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.wilcoxon() generates a uniform p-value distribution if it is given data simulated based on the null model. Returns the p-value of the two-side Kolmgorov-Smirnov test for equality of the observed p-value distribution and a uniform distribution. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=0) sim.generate() random_sample_description = pd.DataFrame({ "condition": np.random.randint(2, size=sim.num_observations) }) test = de.test.rank_test( data=sim.X, grouping="condition", sample_description=random_sample_description, dtype="float64" ) summary = test.summary() # Compare p-value distribution under null model against uniform distribution. pval_h0 = stats.kstest(test.pval, 'uniform').pvalue logging.getLogger("diffxpy").info('KS-test pvalue for null model match of wilcoxon(): %f' % pval_h0) assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!" return True class TestSingleDE(unittest.TestCase): def _prepare_data(self, n_cells: int = 2000, n_genes: int = 100): """ :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ num_non_de = n_genes // 2 sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=2) sim.generate_params( rand_fn_ave=lambda shape: np.random.poisson(500, shape) + 1, rand_fn=lambda shape: np.abs(np.random.uniform(1, 0.5, shape)) ) sim.params["a_var"][1, :num_non_de] = 0 sim.params["b_var"][1, :num_non_de] = 0 sim.params["isDE"] = ("features",), np.arange(n_genes) >= num_non_de sim.generate_data() return sim def _eval(self, sim, test): idx_de = np.where(sim.params["isDE"] == True)[0] idx_nonde = np.where(sim.params["isDE"] == False)[0] frac_de_of_non_de = np.sum(test.qval[idx_nonde] < 0.05) / len(idx_nonde) frac_de_of_de = np.sum(test.qval[idx_de] < 0.05) / len(idx_de) logging.getLogger("diffxpy").info( 'fraction of non-DE genes with q-value < 0.05: %.1f%%' % float(100 * frac_de_of_non_de) ) logging.getLogger("diffxpy").info( 'fraction of DE genes with q-value < 0.05: %.1f%%' % float(100 * frac_de_of_de) ) assert frac_de_of_non_de <= 0.1, "too many false-positives" assert frac_de_of_de >= 0.5, "too many false-negatives" return sim def test_wilcoxon_de(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.test.t_test() generates a uniform p-value distribution if it is given data simulated based on the null model. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = self._prepare_data(n_cells=n_cells, n_genes=n_genes) test = de.test.rank_test( data=sim.X, grouping="condition", sample_description=sim.sample_description, dtype="float64" ) self._eval(sim=sim, test=test) return True def test_t_test_de(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.test.t_test() generates a uniform p-value distribution if it is given data simulated based on the null model. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = self._prepare_data(n_cells=n_cells, n_genes=n_genes) test = de.test.t_test( data=sim.X, grouping="condition", sample_description=sim.sample_description, dtype="float64" ) self._eval(sim=sim, test=test) return True def test_wald_de(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.test.wald() generates a uniform p-value distribution if it is given data simulated based on the null model. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = self._prepare_data(n_cells=n_cells, n_genes=n_genes) test = de.test.wald( data=sim.X, factor_loc_totest="condition", formula_loc="~ 1 + condition", sample_description=sim.sample_description, training_strategy="DEFAULT", dtype="float64" ) self._eval(sim=sim, test=test) return True def test_lrt_de(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.test.lrt() generates a uniform p-value distribution if it is given data simulated based on the null model. Returns the p-value of the two-side Kolmgorov-Smirnov test for equality of the observed p-value distribution and a uniform distribution. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.WARNING) sim = self._prepare_data(n_cells=n_cells, n_genes=n_genes) test = de.test.lrt( data=sim.X, full_formula_loc="~ 1 + condition", full_formula_scale="~ 1", reduced_formula_loc="~ 1", reduced_formula_scale="~ 1", sample_description=sim.sample_description, training_strategy="DEFAULT", dtype="float64" ) self._eval(sim=sim, test=test) return True class TestSingleExternal(unittest.TestCase): def _prepare_data(self, n_cells: int = 2000, n_genes: int = 100): """ :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ sim = Simulator(num_observations=n_cells, num_features=n_genes) sim.generate_sample_description(num_batches=0, num_conditions=2) sim.generate_params( rand_fn_ave=lambda shape: np.random.poisson(500, shape) + 1, rand_fn=lambda shape: np.abs(np.random.uniform(1, 0.5, shape)) ) sim.generate_data() return sim def _eval(self, test, ref_pvals): test_pval = test.pval pval_dev = np.abs(test_pval - ref_pvals) log_pval_dev = np.abs(np.log(test_pval+1e-200) - np.log(ref_pvals+1e-200)) max_dev = np.max(pval_dev) max_log_dev = np.max(log_pval_dev) mean_dev = np.mean(log_pval_dev) logging.getLogger("diffxpy").info( 'maximum absolute p-value deviation: %f' % float(max_dev) ) logging.getLogger("diffxpy").info( 'maximum absolute log p-value deviation: %f' % float(max_log_dev) ) logging.getLogger("diffxpy").info( 'mean absolute log p-value deviation: %f' % float(mean_dev) ) assert max_dev < 1e-3, "maximum deviation too large" assert max_log_dev < 1e-1, "maximum deviation in log space too large" def test_t_test_ref(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.test.t_test() generates the same p-value distribution as scipy t-test. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.INFO) sim = self._prepare_data(n_cells=n_cells, n_genes=n_genes) test = de.test.t_test( data=sim.X, grouping="condition", sample_description=sim.sample_description, dtype="float64" ) # Run scipy t-tests as a reference. conds = np.unique(sim.sample_description["condition"].values) ind_a = np.where(sim.sample_description["condition"] == conds[0])[0] ind_b = np.where(sim.sample_description["condition"] == conds[1])[0] scipy_pvals = stats.ttest_ind(a=sim.X[ind_a, :], b=sim.X[ind_b, :], axis=0, equal_var=False).pvalue self._eval(test=test, ref_pvals=scipy_pvals) return True def test_wilcoxon_ref(self, n_cells: int = 2000, n_genes: int = 100): """ Test if de.test.t_test() generates the same p-value distribution as scipy t-test. :param n_cells: Number of cells to simulate (number of observations per test). :param n_genes: Number of genes to simulate (number of tests). """ logging.getLogger("tensorflow").setLevel(logging.ERROR) logging.getLogger("batchglm").setLevel(logging.WARNING) logging.getLogger("diffxpy").setLevel(logging.INFO) sim = self._prepare_data(n_cells=n_cells, n_genes=n_genes) test = de.test.rank_test( data=sim.X, grouping="condition", sample_description=sim.sample_description, dtype="float64" ) # Run scipy t-tests as a reference. conds = np.unique(sim.sample_description["condition"].values) ind_a = np.where(sim.sample_description["condition"] == conds[0])[0] ind_b = np.where(sim.sample_description["condition"] == conds[1])[0] scipy_pvals = np.array([ stats.mannwhitneyu(x=sim.X[ind_a, i], y=sim.X[ind_b, i], use_continuity=True, alternative="two-sided").pvalue for i in range(sim.X.shape[1]) ]) self._eval(test=test, ref_pvals=scipy_pvals) return True if __name__ == '__main__': unittest.main()
39.474576
108
0.63713
2,431
18,632
4.719457
0.081859
0.036259
0.036259
0.040791
0.911008
0.896365
0.890874
0.87135
0.861675
0.861675
0
0.019115
0.258748
18,632
471
109
39.558386
0.811599
0.234328
0
0.698582
0
0
0.116488
0
0
0
0
0
0.031915
1
0.053191
false
0
0.024823
0
0.138298
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
04ab050153e6c6a9c772495f8dcd2968d082dcec
26
py
Python
mpids/utils/__init__.py
edgargabriel/mpids
170f402ecea5af0db4eee39e8d426884dce12ad6
[ "BSD-2-Clause" ]
1
2020-01-22T03:27:31.000Z
2020-01-22T03:27:31.000Z
mpids/utils/__init__.py
jrodgers01d/mpids
f771b1d25eba5f5dc8e30e5d86ee0251775b9da1
[ "BSD-2-Clause" ]
1
2020-05-04T20:25:55.000Z
2020-05-04T20:25:55.000Z
mpids/utils/__init__.py
jrodgers01d/mpids
f771b1d25eba5f5dc8e30e5d86ee0251775b9da1
[ "BSD-2-Clause" ]
2
2019-04-08T03:01:31.000Z
2020-04-27T15:56:28.000Z
from .ParallelIO import *
13
25
0.769231
3
26
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
26
1
26
26
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
04e20b9b8ee4536762c316aa5271c0efd92cc39c
197
py
Python
vidaug/augmentors/__init__.py
redzhepdx/vidaug
47ed8605c8976c7cd46a0bfad187504ee6e99287
[ "MIT" ]
1
2020-09-14T14:05:24.000Z
2020-09-14T14:05:24.000Z
vidaug/augmentors/__init__.py
redzhepdx/vidaug
47ed8605c8976c7cd46a0bfad187504ee6e99287
[ "MIT" ]
null
null
null
vidaug/augmentors/__init__.py
redzhepdx/vidaug
47ed8605c8976c7cd46a0bfad187504ee6e99287
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .affine import * from .crop import * from .flip import * from .geometric import * from .group import * from .intensity import * from .temporal import *
19.7
38
0.761421
26
197
5.576923
0.423077
0.482759
0
0
0
0
0
0
0
0
0
0
0.167513
197
9
39
21.888889
0.884146
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
b6c87c07f3b3d6f191822064a21095e21cb66cf1
198
py
Python
alpha_amd/distances/__init__.py
Noodles-321/RegistrationEval
3631d3d5bd65acf980fcfed803fa6125970f3e88
[ "MIT" ]
14
2019-02-12T20:30:23.000Z
2021-11-04T01:10:34.000Z
alpha_amd/distances/__init__.py
Noodles-321/RegistrationEval
3631d3d5bd65acf980fcfed803fa6125970f3e88
[ "MIT" ]
2
2021-05-12T05:02:59.000Z
2021-10-11T14:40:10.000Z
alpha_amd/distances/__init__.py
Noodles-321/RegistrationEval
3631d3d5bd65acf980fcfed803fa6125970f3e88
[ "MIT" ]
7
2019-02-20T12:19:28.000Z
2021-02-09T10:12:06.000Z
from distances.q_image import QuantizedImage from distances.alpha_amd import AlphaAMD from distances.symmetric_amd_distance import SymmetricAMDDistance import distances.sdt import distances.jaccard
33
65
0.893939
25
198
6.92
0.56
0.225434
0
0
0
0
0
0
0
0
0
0
0.080808
198
5
66
39.6
0.950549
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
b6d982858370343ba6bff413962419dacf19d81d
9,188
py
Python
oxe-api/test/resource/private/test_update_my_article.py
CybersecurityLuxembourg/openxeco
8d4e5578bde6a07f5d6d569b16b4de224abf7bf0
[ "BSD-2-Clause" ]
null
null
null
oxe-api/test/resource/private/test_update_my_article.py
CybersecurityLuxembourg/openxeco
8d4e5578bde6a07f5d6d569b16b4de224abf7bf0
[ "BSD-2-Clause" ]
null
null
null
oxe-api/test/resource/private/test_update_my_article.py
CybersecurityLuxembourg/openxeco
8d4e5578bde6a07f5d6d569b16b4de224abf7bf0
[ "BSD-2-Clause" ]
null
null
null
from test.BaseCase import BaseCase import os import base64 class TestUpdateMyArticle(BaseCase): @BaseCase.login def test_ok(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"user_id": 1, "company_id": 3}, self.db.tables["UserCompanyAssignment"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = {"id": 2} response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual(200, response.status_code) @BaseCase.login def test_ok_with_image(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"user_id": 1, "company_id": 3}, self.db.tables["UserCompanyAssignment"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) self.db.insert({"property": "DEACTIVATE_REVIEW_ON_ECOSYSTEM_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_update_my_article", "original_image.png") target_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_update_my_article", "1") if os.path.exists(target_path): os.remove(target_path) f = open(path, 'rb') data = base64.b64encode(f.read()).decode("utf-8") payload = { "id": 2, "image": data } f.close() response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) articles = self.db.get(self.db.tables["Article"]) self.assertEqual(200, response.status_code) self.assertEqual(len(articles), 1) self.assertEqual(articles[0].image, 1) @BaseCase.login def test_ko_functionality_not_activated(self, token): payload = {"id": 2} response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("403 The article edition is deactivated", response.status) self.assertEqual(self.db.get_count(self.db.tables["Article"]), 0) self.assertEqual(self.db.get_count(self.db.tables["ArticleVersion"]), 0) @BaseCase.login def test_ko_update_unexisting(self, token): self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = {"id": 2} response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 Object not found : Article", response.status) @BaseCase.login def test_ko_article_no_company_assigned(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"user_id": 1, "company_id": 3}, self.db.tables["UserCompanyAssignment"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = {"id": 2} response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 The article has no company assigned", response.status) @BaseCase.login def test_ko_article_too_much_company_assigned(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"id": 4, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"article": 2, "company": 4}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = {"id": 2} response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 The article has too much companies assigned", response.status) @BaseCase.login def test_ko_user_not_assigned_to_company(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = {"id": 2} response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 The user is not assign to the company", response.status) @BaseCase.login def test_ko_article_handle_already_in_use(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 42, "title": "My title", "handle": "used_handle"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"user_id": 1, "company_id": 3}, self.db.tables["UserCompanyAssignment"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = { "id": 2, "handle": "used_handle" } response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 The article handle is already used", response.status) @BaseCase.login def test_ko_article_status_cant_be_public(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"user_id": 1, "company_id": 3}, self.db.tables["UserCompanyAssignment"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = { "id": 2, "status": "PUBLIC" } response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 The article status can't be set to 'PUBLIC'", response.status) @BaseCase.login def test_ko_article_status_cant_be_under_review(self, token): self.db.insert({"id": 2, "title": "My title"}, self.db.tables["Article"]) self.db.insert({"id": 3, "name": "My Company"}, self.db.tables["Company"]) self.db.insert({"article": 2, "company": 3}, self.db.tables["ArticleCompanyTag"]) self.db.insert({"user_id": 1, "company_id": 3}, self.db.tables["UserCompanyAssignment"]) self.db.insert({"property": "ALLOW_ECOSYSTEM_TO_EDIT_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) self.db.insert({"property": "DEACTIVATE_REVIEW_ON_ECOSYSTEM_ARTICLE", "value": "TRUE"}, self.db.tables["Setting"]) payload = { "id": 2, "status": "UNDER REVIEW" } response = self.application.post('/private/update_my_article', headers=self.get_standard_post_header(token), json=payload) self.assertEqual("422 The article status can't be set to 'UNDER REVIEW'", response.status)
48.104712
120
0.591968
1,086
9,188
4.845304
0.106814
0.104903
0.104903
0.047891
0.871152
0.849107
0.835424
0.835424
0.801026
0.785443
0
0.014524
0.250653
9,188
190
121
48.357895
0.749746
0
0
0.685315
0
0
0.24815
0.085438
0
0
0
0
0.097902
1
0.06993
false
0
0.020979
0
0.097902
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
8e1e1c4f5b20e35d952914703755a7f3f5d49a06
179
py
Python
synapse/servers/aha.py
ackroute/synapse
51197f89ab372d2e357bcd054358352ecca66840
[ "Apache-2.0" ]
216
2017-01-17T18:52:50.000Z
2022-03-31T18:44:49.000Z
synapse/servers/aha.py
ackroute/synapse
51197f89ab372d2e357bcd054358352ecca66840
[ "Apache-2.0" ]
2,189
2017-01-17T22:31:48.000Z
2022-03-31T20:41:45.000Z
synapse/servers/aha.py
ackroute/synapse
51197f89ab372d2e357bcd054358352ecca66840
[ "Apache-2.0" ]
44
2017-01-17T16:50:57.000Z
2022-03-16T18:35:52.000Z
# pragma: no cover import sys import asyncio import synapse.lib.aha as s_aha if __name__ == '__main__': # pragma: no cover asyncio.run(s_aha.AhaCell.execmain(sys.argv[1:]))
19.888889
53
0.726257
29
179
4.137931
0.655172
0.133333
0.216667
0
0
0
0
0
0
0
0
0.006579
0.150838
179
8
54
22.375
0.782895
0.184358
0
0
0
0
0.055944
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
8e4e5f7c32607d37a4cd3d64639b2c6b963ee419
14,739
py
Python
tests/test_credential.py
deepan10/python-jenkins
7166f872f50e8c246ee567ca56aeeceaa40e8c7a
[ "BSD-3-Clause" ]
2
2019-06-25T06:14:49.000Z
2019-06-25T06:14:50.000Z
tests/test_credential.py
deepan10/python-jenkins
7166f872f50e8c246ee567ca56aeeceaa40e8c7a
[ "BSD-3-Clause" ]
null
null
null
tests/test_credential.py
deepan10/python-jenkins
7166f872f50e8c246ee567ca56aeeceaa40e8c7a
[ "BSD-3-Clause" ]
1
2022-02-08T15:47:07.000Z
2022-02-08T15:47:07.000Z
import json from mock import patch import jenkins from tests.base import JenkinsTestBase class JenkinsCredentialTestBase(JenkinsTestBase): config_xml = """<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl> <scope>GLOBAL</scope> <id>Test Credential</id> <username>Test-User</username> <password>secret123</password> </com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>""" class JenkinsGetTagTextTest(JenkinsCredentialTestBase): def test_simple(self): name_to_return = self.j._get_tag_text('id', self.config_xml) self.assertEqual('Test Credential', name_to_return) def test_failed(self): with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j._get_tag_text('id', '<xml></xml>') self.assertEqual(str(context_manager.exception), 'tag[id] is invalidated') with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j._get_tag_text('id', '<xml><id></id></xml>') self.assertEqual(str(context_manager.exception), 'tag[id] is invalidated') with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j._get_tag_text('id', '<xml><id> </id></xml>') self.assertEqual(str(context_manager.exception), 'tag[id] is invalidated') class JenkinsIsFolderTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_is_folder(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), ] self.assertTrue(self.j.is_folder('Test Folder')) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_is_not_folder(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'org.jenkinsci.plugins.workflow.job.WorkflowJob'}), ] self.assertFalse(self.j.is_folder('Test Job')) class JenkinsAssertFolderTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_is_folder(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), ] self.j.assert_folder('Test Folder') @patch.object(jenkins.Jenkins, 'jenkins_open') def test_is_not_folder(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'org.jenkinsci.plugins.workflow.job.WorkflowJob'}), ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.assert_folder('Test Job') self.assertEqual(str(context_manager.exception), 'job[Test Job] is not a folder') class JenkinsAssertCredentialTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_credential_missing(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), jenkins.NotFoundException() ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.assert_credential_exists('NonExistent', 'TestFoler') self.assertEqual( str(context_manager.exception), 'credential[NonExistent] does not exist' ' in the domain[_] of [TestFoler]') self._check_requests(jenkins_mock.call_args_list) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_credential_exists(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'id': 'ExistingCredential'}) ] self.j.assert_credential_exists('ExistingCredential', 'TestFoler') self._check_requests(jenkins_mock.call_args_list) class JenkinsCredentialExistsTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_credential_missing(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), jenkins.NotFoundException() ] self.assertEqual(self.j.credential_exists('NonExistent', 'TestFolder'), False) self._check_requests(jenkins_mock.call_args_list) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_credential_exists(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'id': 'ExistingCredential'}) ] self.assertEqual(self.j.credential_exists('ExistingCredential', 'TestFolder'), True) self._check_requests(jenkins_mock.call_args_list) class JenkinsGetCredentialInfoTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_simple(self, jenkins_mock): credential_info_to_return = {'id': 'ExistingCredential'} jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps(credential_info_to_return) ] credential_info = self.j.get_credential_info('ExistingCredential', 'TestFolder') self.assertEqual(credential_info, credential_info_to_return) self.assertEqual( jenkins_mock.call_args[0][0].url, self.make_url('job/TestFolder/credentials/store/folder/' 'domain/_/credential/ExistingCredential/api/json?depth=0')) self._check_requests(jenkins_mock.call_args_list) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_nonexistent(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), None, ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.get_credential_info('NonExistent', 'TestFolder') self.assertEqual( str(context_manager.exception), 'credential[NonExistent] does not exist ' 'in the domain[_] of [TestFolder]') @patch.object(jenkins.Jenkins, 'jenkins_open') def test_invalid_json(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), '{invalid_json}' ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.get_credential_info('NonExistent', 'TestFolder') self.assertEqual( str(context_manager.exception), 'Could not parse JSON info for credential[NonExistent]' ' in the domain[_] of [TestFolder]') class JenkinsGetCredentialConfigTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_encodes_credential_name(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), None, ] self.j.get_credential_config(u'Test Credential', u'Test Folder') self.assertEqual( jenkins_mock.call_args_list[1][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/domain/' '_/credential/Test%20Credential/config.xml')) self._check_requests(jenkins_mock.call_args_list) class JenkinsCreateCredentialTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_simple(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), jenkins.NotFoundException(), None, json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'id': 'Test Credential'}), ] self.j.create_credential('Test Folder', self.config_xml) self.assertEqual( jenkins_mock.call_args_list[1][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/' 'domain/_/credential/Test%20Credential/api/json?depth=0')) self.assertEqual( jenkins_mock.call_args_list[2][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/' 'domain/_/createCredentials')) self.assertEqual( jenkins_mock.call_args_list[4][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/' 'domain/_/credential/Test%20Credential/api/json?depth=0')) self._check_requests(jenkins_mock.call_args_list) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_already_exists(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'id': 'Test Credential'}), ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.create_credential('Test Folder', self.config_xml) self.assertEqual( jenkins_mock.call_args_list[1][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/' 'domain/_/credential/Test%20Credential/api/json?depth=0')) self.assertEqual( str(context_manager.exception), 'credential[Test Credential] already exists' ' in the domain[_] of [Test Folder]') self._check_requests(jenkins_mock.call_args_list) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_failed(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), jenkins.NotFoundException(), None, json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), None, ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.create_credential('Test Folder', self.config_xml) self.assertEqual( jenkins_mock.call_args_list[1][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/' 'domain/_/credential/Test%20Credential/api/json?depth=0')) self.assertEqual( jenkins_mock.call_args_list[2][0][0].url, self.make_url('job/Test%20Folder/credentials/store/' 'folder/domain/_/createCredentials')) self.assertEqual( jenkins_mock.call_args_list[4][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/' 'domain/_/credential/Test%20Credential/api/json?depth=0')) self.assertEqual( str(context_manager.exception), 'create[Test Credential] failed in the domain[_] of [Test Folder]') self._check_requests(jenkins_mock.call_args_list) class JenkinsDeleteCredentialTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_simple(self, jenkins_mock): jenkins_mock.side_effect = [ True, json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), jenkins.NotFoundException(), ] self.j.delete_credential(u'Test Credential', 'TestFolder') self.assertEqual( jenkins_mock.call_args_list[0][0][0].url, self.make_url('job/TestFolder/credentials/store/folder/domain/' '_/credential/Test%20Credential/config.xml')) self._check_requests(jenkins_mock.call_args_list) @patch.object(jenkins.Jenkins, 'jenkins_open') def test_failed(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'id': 'ExistingCredential'}), json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'id': 'ExistingCredential'}) ] with self.assertRaises(jenkins.JenkinsException) as context_manager: self.j.delete_credential(u'ExistingCredential', 'TestFolder') self.assertEqual( jenkins_mock.call_args_list[0][0][0].url, self.make_url('job/TestFolder/credentials/store/folder/' 'domain/_/credential/ExistingCredential/config.xml')) self.assertEqual( str(context_manager.exception), 'delete credential[ExistingCredential] from ' 'domain[_] of [TestFolder] failed') self._check_requests(jenkins_mock.call_args_list) class JenkinsReconfigCredentialTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_simple(self, jenkins_mock): jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'id': 'Test Credential'}), None ] self.j.reconfig_credential(u'Test Folder', self.config_xml) self.assertEqual( jenkins_mock.call_args_list[1][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/domain/' '_/credential/Test%20Credential/api/json?depth=0')) self.assertEqual( jenkins_mock.call_args_list[2][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/domain/' '_/credential/Test%20Credential/config.xml')) self._check_requests(jenkins_mock.call_args_list) class JenkinsListCredentialConfigTest(JenkinsCredentialTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_simple(self, jenkins_mock): credentials_to_return = [{'id': 'Test Credential'}] jenkins_mock.side_effect = [ json.dumps({'_class': 'com.cloudbees.hudson.plugins.folder.Folder'}), json.dumps({'credentials': [{'id': 'Test Credential'}]}), ] credentials = self.j.list_credentials(u'Test Folder') self.assertEqual(credentials, credentials_to_return) self.assertEqual( jenkins_mock.call_args_list[1][0][0].url, self.make_url('job/Test%20Folder/credentials/store/folder/domain/' '_/api/json?tree=credentials[id]')) self._check_requests(jenkins_mock.call_args_list)
41.635593
92
0.646991
1,569
14,739
5.851498
0.078394
0.077878
0.044113
0.055876
0.8486
0.820717
0.793269
0.787387
0.772901
0.748285
0
0.008035
0.231563
14,739
353
93
41.753541
0.802578
0
0
0.672535
0
0
0.268268
0.167583
0
0
0
0
0.165493
1
0.073944
false
0.010563
0.014085
0
0.133803
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
ed99622ae1dd4a334318cf1ef4a3d20d64828d4e
29
py
Python
sparksetup/__init__.py
PKPDAI/PKDocClassifier
f37e6623185f3388c64322fc47fe6aaa8a597939
[ "MIT" ]
10
2021-03-12T17:01:14.000Z
2022-03-26T02:02:56.000Z
sparksetup/__init__.py
PKPDAI/PKDocClassifier
f37e6623185f3388c64322fc47fe6aaa8a597939
[ "MIT" ]
1
2021-02-10T19:09:07.000Z
2021-02-10T19:09:07.000Z
sparksetup/__init__.py
fgh95/PKDocClassifier
f37e6623185f3388c64322fc47fe6aaa8a597939
[ "MIT" ]
3
2021-03-18T12:37:39.000Z
2022-01-11T02:35:10.000Z
from .sparkconf import spark
14.5
28
0.827586
4
29
6
1
0
0
0
0
0
0
0
0
0
0
0
0.137931
29
1
29
29
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
edb3cc49d41e091837f0f7bacf06852173273f96
106
py
Python
python/hello-python/ko_message/__init__.py
le3t/ko-repo
50eb0b4cadb9db9bf608a9e5d36376f38ff5cce5
[ "Apache-2.0" ]
4
2019-10-26T01:25:30.000Z
2020-01-12T08:10:25.000Z
python/hello-python/ko_message/__init__.py
Artister/tutorials-java
50eb0b4cadb9db9bf608a9e5d36376f38ff5cce5
[ "Apache-2.0" ]
3
2019-08-26T13:41:57.000Z
2019-08-26T13:44:21.000Z
python/hello-python/ko_message/__init__.py
Artister/tutorials-java
50eb0b4cadb9db9bf608a9e5d36376f38ff5cce5
[ "Apache-2.0" ]
1
2019-12-30T12:27:38.000Z
2019-12-30T12:27:38.000Z
""" 如果打算让外部使用包的内容 需要在__init__.py中添加允许外面引用的文件 """ from . import receive_message from . import send_message
15.142857
29
0.801887
12
106
6.583333
0.75
0.253165
0
0
0
0
0
0
0
0
0
0
0.113208
106
6
30
17.666667
0.840426
0.377358
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
edea0d0f1f7b2c0628ccd521c65acf172d4e0817
79,147
py
Python
tcga_encoder/models/layers.py
tedmeeds/tcga_encoder
805f9a5bcc422a43faea45baa0996c88d346e3b4
[ "MIT" ]
2
2017-12-19T15:32:46.000Z
2018-01-12T11:24:24.000Z
tcga_encoder/models/layers.py
tedmeeds/tcga_encoder
805f9a5bcc422a43faea45baa0996c88d346e3b4
[ "MIT" ]
null
null
null
tcga_encoder/models/layers.py
tedmeeds/tcga_encoder
805f9a5bcc422a43faea45baa0996c88d346e3b4
[ "MIT" ]
null
null
null
from tcga_encoder.utils.helpers import * from tcga_encoder.utils.math_funcs import * import tensorflow as tf from tcga_encoder.models.layers import * from tcga_encoder.models.regularizers import * from tcga_encoder.definitions.nn import * from tcga_encoder.definitions.locations import * from tcga_encoder.definitions.tcga import * import pdb def MakeBatchShape( shape ): if shape is None: return None batch_shape = [s for s in shape] if len(shape)>0: if shape[0] is not None: batch_shape.insert(0,None) return batch_shape def MatDif( t1, t2 ): dims1 = t1.get_shape().dims ndims1 = len(dims1) dims2 = t2.get_shape().dims ndims2 = len(dims2) if ndims1 == ndims2 == 2: # eg t1=[None,20], t2 = [20,4] => t1*t2 => [None,4] return t1 - t2 if ndims1 == 2 and ndims2 == 3: # eg t1=[None,20], t2 = [20,4,10] => [None,20]*[20,40] => t1*t2 => [None,4,10] t2_reshaped = tf.reshape(t2, [-1,dims2[1].value*dims2[2].value]) inter_result = t1 - t2_reshaped #tf.matmul( t1, t2_reshaped ) return tf.reshape(inter_result, [-1,dims2[1].value,dims2[2].value] ) if ndims1 == 3 and ndims2 == 2: # eg t1=[None,10,4], t2 = [10,4] => [None,40]*[40] => t1*t2 => [None,] return tf.reshape(t1, [-1,dims1[1].value*dims1[2].value]) - t2 if ndims1 == 3 and ndims2 == 3: # eg t1=[None,4,10], t2 = [4,10,30] => [None,40]*[40,30] => t1*t2 => [None,30] return tf.reshape(t1, [-1,dims1[1].value*dims1[2].value]) - tf.reshape(t2, [dims2[0].value*dims2[1].value,-1]) assert False, "Cannot handle these sizes " print dims1, dims2 def MatMul( t1, t2, name ): dims1 = t1.get_shape().dims ndims1 = len(dims1) dims2 = t2.get_shape().dims ndims2 = len(dims2) if ndims1 == ndims2 == 2: # eg t1=[None,20], t2 = [20,4] => t1*t2 => [None,4] return tf.matmul( t1, t2, name=name ) if ndims1 == 2 and ndims2 == 3: # eg t1=[None,20], t2 = [20,4,10] => [None,20]*[20,40] => t1*t2 => [None,4,10] t2_reshaped = tf.reshape(t2, [-1,dims2[1].value*dims2[2].value]) inter_result = tf.matmul( t1, t2_reshaped ) return tf.reshape(inter_result, [-1,dims2[1].value,dims2[2].value] ) if ndims1 == 3 and ndims2 == 2: # eg t1=[None,10,4], t2 = [10,4] => [None,40]*[40] => t1*t2 => [None,] return tf.matmul( tf.reshape(t1, [-1,dims1[1].value*dims1[2].value]), t2 ) if ndims1 == 3 and ndims2 == 3: # eg t1=[None,4,10], t2 = [4,10,30] => [None,40]*[40,30] => t1*t2 => [None,30] return tf.matmul( tf.reshape(t1, [-1,dims1[1].value*dims1[2].value]), tf.reshape(t2, [dims2[0].value*dims2[1].value,-1]) ) assert False, "Cannot handle these sizes " print dims1, dims2 def SparseMatMul( t1, t2, name ): dims1 = t1.get_shape().dims ndims1 = len(dims1) dims2 = t2.get_shape().dims ndims2 = len(dims2) if ndims1 == ndims2 == 2: # eg t1=[None,20], t2 = [20,4] => t1*t2 => [None,4] return tf.matmul( t1, t2, a_is_sparse = True, name=name ) if ndims1 == 2 and ndims2 == 3: # eg t1=[None,20], t2 = [20,4,10] => [None,20]*[20,40] => t1*t2 => [None,4,10] t2_reshaped = tf.reshape(t2, [-1,dims2[1].value*dims2[2].value]) inter_result = tf.matmul( t1, t2_reshaped, a_is_sparse = True ) return tf.reshape(inter_result, [-1,dims2[1].value,dims2[2].value] ) if ndims1 == 3 and ndims2 == 2: # eg t1=[None,10,4], t2 = [10,4] => [None,40]*[40] => t1*t2 => [None,] return tf.matmul( tf.reshape(t1, [-1,dims1[1].value*dims1[2].value]), t2, a_is_sparse = True ) if ndims1 == 3 and ndims2 == 3: # eg t1=[None,4,10], t2 = [4,10,30] => [None,40]*[40,30] => t1*t2 => [None,30] return tf.matmul( tf.reshape(t1, [-1,dims1[1].value*dims1[2].value]), tf.reshape(t2, [dims2[0].value*dims2[1].value,-1]), a_is_sparse = True ) assert False, "Cannot handle these sizes " print dims1, dims2 def xavier_init(fan_in, fan_out, constant=0.1, positive = False): if positive is True: low = 0.0 else: low = -constant*np.sqrt(6.0/(fan_in + fan_out)) high = constant*np.sqrt(6.0/(fan_in + fan_out)) return tf.random_uniform((fan_in, fan_out), minval=low, maxval=high, dtype=tf.float32) def weight_init_old(in_shape, out_shape, constant=0.1): low = -constant*np.sqrt(6.0/(sum(in_shape) + sum(out_shape))) high = constant*np.sqrt(6.0/(sum(in_shape) + sum(out_shape))) s = in_shape + out_shape return tf.random_uniform(tuple(s), minval=low, maxval=high, dtype=tf.float32) def weight_init(weight_shape, constant=0.1, positive = False): n_weights = sum( weight_shape ) if positive is True: low = 0.0 else: low = -constant*np.sqrt(6.0/n_weights) high = constant*np.sqrt(6.0/n_weights) #s = in_shape + out_shape return tf.random_uniform( tuple(weight_shape), minval=low, maxval=high, dtype=tf.float32) def EstimateWeightShape( input_shape, output_shape ): # assume first dimension of input_shape is None or not used print "Estimating weights from ", input_shape, output_shape n_dims_in = len(input_shape) n_dims_out = len(output_shape) weight_shape = [] if n_dims_in > 0: if input_shape[0] is None: for idx in range(n_dims_in-1): weight_shape.append( input_shape[idx+1] ) else: for idx in range(n_dims_in): weight_shape.append( input_shape[idx] ) if n_dims_out > 0: if output_shape[0] is None: for idx in range(n_dims_out-1): weight_shape.append( output_shape[idx+1] ) else: for idx in range(n_dims_out): weight_shape.append( output_shape[idx] ) return weight_shape def MakeWeights( input_sources, output_shape, name = "", has_biases=True, constant=None, shared_layers = None, shared_idx = None, layer_specs=None, positive = False ): weights = [] default_constant = 0.001 input_idx = 0 is_trainable = True if layer_specs is not None: if layer_specs.has_key("trainable"): #pdb.set_trace() is_trainable = layer_specs["trainable"] for input_source in input_sources: weight_shape = EstimateWeightShape( input_source.shape, output_shape ) print "MAKE WEIGHTS for %s"%(name) print " shape: ", weight_shape # if constants is None: # const = default_constant # else: # const = constants[input_idx] is_shared = False if shared_layers is not None: assert shared_idx is not None, "should specify weight index for borrowed weight" for shared in shared_layers: borrowed_for = shared[0] borrowed_layer = shared[1] if input_source.name == borrowed_for: w = borrowed_layer.weights[shared_idx][0] is_shared = True if is_shared is False: #pdb.set_trace() w = tf.Variable( weight_init( weight_shape, constant=default_constant, positive=positive ), name = "w_"+input_source.name+"2"+name, trainable=is_trainable ) else: print "USING BORROWED WEIGHT" weights.append(w) biases = None if has_biases: biases = tf.Variable( tf.zeros(tuple(output_shape), dtype=tf.float32), name = "b_"+name, trainable=is_trainable ) return weights, biases def ForwardPropagate( input_layers, weights, biases, transfer_function = None, name = "", observation_layer = None, layer_specs={} ): input_activations = [] for idx,source, w in zip( range(len(input_layers)),input_layers, weights ): if hasattr(source,"is_sparse"): print "ForwardPropagate with SPARSE input" a_input = SparseMatMul( source.tensor, w, name = "act_input_"+source.name+"2h" ) else: if layer_specs.has_key( "tensor_ids"): if layer_specs["tensor_ids"].has_key(source.name): #pdb.set_trace() a_input = MatMul( source.tensor[layer_specs["tensor_ids"][source.name]], w, name = "act_input_"+source.name+"2h" ) else: a_input = MatMul( source.tensor, w, name = "act_input_"+source.name+"2h" ) else: a_input = MatMul( source.tensor, w, name = "act_input_"+source.name+"2h" ) if observation_layer is not None: source_w = observation_layer.tensor #expand_dims(t, 1) input_activations.append( tf.expand_dims(source_w[:,idx],1)*a_input ) #pdb.set_trace() else: input_activations.append( a_input ) added_activations = tf.add_n( input_activations ) if biases is not None: if transfer_function is not None: activations = transfer_function( tf.add( added_activations, biases ), name = "act_%s"%(name) ) else: activations = tf.add( added_activations, biases, name = "act_%s"%(name) ) else: if transfer_function is not None: activations = transfer_function( added_activations, name = "act_%s"%(name) ) else: activations = added_activations #, biases, name = "act_%s"%(name) ) return activations, input_activations def GetPenaltiesFromLayers( list_of_layers ): penalties = [] for layer in list_of_layers: if hasattr( layer, "penalties" ): print "Adding penalties ",layer.penalties penalties.append( layer.penalties ) return tf.add_n( penalties ) def Connect( layer_class, input_layers, layer_specs={}, shared_layers = None, name="" ): print "making ", layer_class if layer_class == HiddenLayer: #print "making HiddenLayer class" shape = layer_specs[SHAPE] transfer_function = layer_specs[TRANSFER] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] constant = 0.1 if layer_specs.has_key("weight_constant"): constant = layer_specs["weight_constant"] positive = False if layer_specs.has_key("positive"): positive = layer_specs["postive"] weights, biases = MakeWeights( input_layers, shape, name, has_biases=has_biases, constant=constant, layer_specs=layer_specs, positive=positive ) # if shared_layer is None: # weights, biases = MakeWeights( input_layers, shape, name, has_biases=has_biases ) # #total_penalty = tf.add_n( penalties ) # else: if shared_layers is not None: for idx, input_layer in zip( range(len(input_layers)), input_layers ): for shared in shared_layers: borrowed_for = shared[0] borrowed_layer = shared[1] pdb.set_trace() #weights = shared_weights.weights #biases = shared_weights.biases #pdb.set_trace() activation, activation_input = ForwardPropagate( input_layers, weights, biases, transfer_function, name, layer_specs=layer_specs ) model = {ACTIVATION:activation, ACTIVATION_INPUT:activation_input, WEIGHTS:weights,BIASES:biases} layer = layer_class( shape, model, name=name ) elif layer_class == WeightedMultiplyLayer: assert len(input_layers) == 2, "must provide 2 inputs" transfer = None if layer_specs.has_key(TRANSFER): transfer = layer_specs[TRANSFER] layer = layer_class( layer_specs[SHAPE], input_layers, name, transfer ) elif layer_class == SymmetricLogLayer: assert len(input_layers) == 1, "must provide 1 inputs" transfer = None layer = layer_class( input_layers[0], layer_specs[SHAPE], name ) elif layer_class == WeibullModelLayer: assert len(input_layers) == 2, "must provide 2 inputs" layer = layer_class( input_layers[0], input_layers[1], name ) elif layer_class == ScaledLayer: shape = layer_specs[SHAPE] input_layer = input_layers[0] weights_location = tf.Variable( weight_init( shape, constant=0.1 ), name = name+"_location" ) weights_scale = tf.Variable( weight_init( shape, constant=0.1 ), name = name+"_location" ) assert len(input_layers) == 1, "must provide 1 inputs" transfer = None if layer_specs.has_key(TRANSFER): transfer = layer_specs[TRANSFER] layer = layer_class( shape, input_layer, weights_location, weights_scale, name, transfer ) elif layer_class == BetaScaledLayer: assert len(input_layers)==2, "must have 2 only" shape = layer_specs[SHAPE] input_layer = input_layers[0] beta_layer = input_layers[1] layer = layer_class( shape, input_layer, beta_layer, name ) elif layer_class == GaussianScaledLayer: assert len(input_layers)==2, "must have 2 only" shape = layer_specs[SHAPE] input_layer = input_layers[0] gaussian_layer = input_layers[1] layer = layer_class( shape, input_layer, gaussian_layer, name ) elif layer_class == SumLayer: layer = layer_class( input_layers, name ) elif layer_class == DropoutLayer: assert len(input_layers) == 1, "only allow one layer" layer = layer_class( input_layers[0], name ) elif layer_class == DroppedSourceHiddenLayer: assert len(input_layers) >= 2, "requires at least 2 inputs" source_layers = input_layers[:-1] observation_layer = input_layers[-1] shape = layer_specs[SHAPE] transfer_function = layer_specs[TRANSFER] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] if shared_layers is None: weights, biases = MakeWeights( input_layers, shape, name, has_biases=has_biases, layer_specs=layer_specs ) #total_penalty = tf.add_n( penalties ) else: weights = shared_layers.weights biases = shared_layers.biases activation, activation_input = ForwardPropagate( source_layers, weights, biases, transfer_function, name, observation_layer=observation_layer, layer_specs=layer_specs ) model = {ACTIVATION:activation, ACTIVATION_INPUT:activation_input, WEIGHTS:weights,BIASES:biases} layer = layer_class( shape, model, name=name ) elif layer_class == GeneratedDataLayer: assert len(input_layers) >= 2, "requires 2 inputs" #pdb.set_trace() model_layer = input_layers[0] random_layers = input_layers[1:] if layer_specs.has_key("output"): output = layer_specs["output"] gen_data = model_layer.GenerateX( random_layers, output=output ) else: gen_data = model_layer.GenerateX( random_layers ) layer = layer_class( layer_specs[SHAPE], tensor=gen_data, name = name ) elif layer_class == GaussianStaticLayer: shape = layer_specs[SHAPE] prior = layer_specs[PRIOR] layer = layer_class( shape, prior, name=name ) elif layer_class == BetaModelLayer: shape = layer_specs[SHAPE] prior = layer_specs[PRIOR] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] weights_log_a, biases_log_a = MakeWeights( input_layers, shape, name+"_log_a", has_biases=has_biases, shared_layers=shared_layers, shared_idx = 0, layer_specs=layer_specs ) weights_log_b, biases_log_b = MakeWeights( input_layers, shape, name+"_log_b", has_biases=has_biases, shared_layers=shared_layers, shared_idx = 1, layer_specs=layer_specs ) a, a_input = ForwardPropagate( input_layers, weights_log_a, biases_log_a, \ transfer_function=tf.exp, name=name+"_"+A, layer_specs=layer_specs ) b, b_input = ForwardPropagate( input_layers, weights_log_b, biases_log_b, \ transfer_function=tf.exp, name=name+"_"+B, layer_specs=layer_specs ) #pdb.set_trace() a_clipped = tf.clip_by_value( a, 0.00001, 1000.0 ) b_clipped = tf.clip_by_value( b, 0.00001, 1000.0 ) model = { A: a_clipped, \ B: b_clipped, \ WEIGHTS:[weights_log_a,weights_log_b], \ BIASES:[biases_log_a,biases_log_b], PRIOR:prior } layer = layer_class( shape, model, name=name ) elif layer_class == GaussianModelLayer: shape = layer_specs[SHAPE] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] weights_mu, biases_mu = MakeWeights( input_layers, shape, name+"_"+MU, has_biases=has_biases, shared_layers=shared_layers, shared_idx = 0, layer_specs=layer_specs ) weights_var, biases_var = MakeWeights( input_layers, shape, name+"_"+VAR, has_biases=has_biases, shared_layers=shared_layers, shared_idx = 1, layer_specs=layer_specs ) # if shared_layers is None: # weights_mu, biases_mu = MakeWeights( input_layers, shape, name+"_"+MU, has_biases=has_biases, layer_specs=layer_specs ) # weights_var, biases_var = MakeWeights( input_layers, shape, name+"_"+VAR, has_biases=has_biases, layer_specs=layer_specs ) # else: # weights_mu = shared_weights.weights[0] # weights_var = shared_weights.weights[1] # biases_mu = shared_weights.biases[0] # biases_var = shared_weights.biases[1] z_mu, z_mu_input = ForwardPropagate( input_layers, weights_mu, biases_mu, \ transfer_function=None, name=name+"_"+MU, layer_specs=layer_specs ) z_var, z_var_input = ForwardPropagate( input_layers, weights_var, biases_var, \ transfer_function=tf.exp, name=name+"_"+VAR, layer_specs=layer_specs ) mu = {WEIGHTS:weights_mu, BIASES:biases_mu, Z:z_mu } var = {WEIGHTS:weights_var, BIASES:biases_var, Z:z_var } layer = layer_class( shape, {MU:mu, VAR:var}, name=name ) elif layer_class == GaussianLogNormalStaticLayer: shape = layer_specs[SHAPE] prior = layer_specs[PRIOR] layer = layer_class( shape, prior, name=name ) elif layer_class == LogNormalStudentModelLayer or layer_class == GaussianLogNormalModelLayer: shape = layer_specs[SHAPE] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] if shared_layers is None: weights_mu, biases_mu = MakeWeights( input_layers, shape, name+"_"+MU, has_biases=has_biases ) weights_logprec_mu, biases_logprec_mu = MakeWeights( input_layers, shape, name+"_"+LOG_PREC_MU, has_biases=has_biases, layer_specs=layer_specs ) weights_logprec_var, biases_logprec_var = MakeWeights( input_layers, shape, name+"_"+LOG_PREC_VAR, has_biases=has_biases, layer_specs=layer_specs ) else: weights_mu = shared_weights.weights[0] weights_var = shared_weights.weights[1] weights_nu = shared_weights.weights[2] biases_mu = shared_weights.biases[0] biases_var = shared_weights.biases[1] biases_nu = shared_weights.biases[2] z_mu, z_mu_input = ForwardPropagate( input_layers, weights_mu, biases_mu, \ transfer_function=None, name=name+"_"+MU, layer_specs=layer_specs ) z_logprec_mu, z_logprec_mu_input = ForwardPropagate( input_layers, weights_logprec_mu, biases_logprec_mu, \ transfer_function=None, name=name+"_"+LOG_PREC_MU,layer_specs=layer_specs ) z_logprec_var, z_logprec_var_input = ForwardPropagate( input_layers, weights_logprec_var, biases_logprec_var, \ transfer_function=tf.exp, name=name+"_"+LOG_PREC_VAR, layer_specs=layer_specs ) mu = {WEIGHTS:weights_mu, BIASES:biases_mu, Z:z_mu } logprec_mu = {WEIGHTS:weights_logprec_mu, BIASES:biases_logprec_mu, Z:z_logprec_mu } logprec_var = {WEIGHTS:weights_logprec_var, BIASES:biases_logprec_var, Z:z_logprec_var } layer = layer_class( shape, {MU:mu, LOG_PREC_MU:logprec_mu, LOG_PREC_VAR:logprec_var}, name=name ) elif layer_class == StudentModelLayer: shape = layer_specs[SHAPE] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] if shared_layers is None: weights_mu, biases_mu = MakeWeights( input_layers, shape, name+"_"+MU, has_biases=has_biases, layer_specs=layer_specs ) weights_var, biases_var = MakeWeights( input_layers, shape, name+"_"+VAR, has_biases=has_biases, layer_specs=layer_specs ) weights_nu, biases_nu = MakeWeights( input_layers, shape, name+"_"+NU, has_biases=has_biases, layer_specs=layer_specs ) else: weights_mu = shared_weights.weights[0] weights_var = shared_weights.weights[1] weights_nu = shared_weights.weights[2] biases_mu = shared_weights.biases[0] biases_var = shared_weights.biases[1] biases_nu = shared_weights.biases[2] z_mu, z_mu_input = ForwardPropagate( input_layers, weights_mu, biases_mu, \ transfer_function=None, name=name+"_"+MU, layer_specs=layer_specs ) z_var, z_var_input = ForwardPropagate( input_layers, weights_var, biases_var, \ transfer_function=tf.exp, name=name+"_"+VAR, layer_specs=layer_specs ) z_nu, z_nu_input = ForwardPropagate( input_layers, weights_nu, biases_nu, \ transfer_function=tf.exp, name=name+"_"+NU, layer_specs=layer_specs ) mu = {WEIGHTS:weights_mu, BIASES:biases_mu, Z:z_mu } var = {WEIGHTS:weights_var, BIASES:biases_var, Z:z_var } nu = {WEIGHTS:weights_nu, BIASES:biases_nu, Z:z_nu } layer = layer_class( shape, {MU:mu, VAR:var, NU:var}, name=name ) elif layer_class == HouseholderModelLayer: shape = layer_specs[SHAPE] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] if shared_layers is None: weights_mu, biases_mu = MakeWeights( input_layers, shape, name+"_"+MU, has_biases=has_biases, layer_specs=layer_specs ) weights_var, biases_var = MakeWeights( input_layers, shape, name+"_"+VAR, has_biases=has_biases, layer_specs=layer_specs ) weights_v, biases_v = MakeWeights( input_layers, shape, name+"_"+"V", has_biases=has_biases, layer_specs=layer_specs ) else: weights_mu = shared_weights.weights[0] weights_var = shared_weights.weights[1] weights_v = shared_weights.weights[2] biases_mu = shared_weights.biases[0] biases_var = shared_weights.biases[1] biases_v = shared_weights.biases[2] z_mu, z_mu_input = ForwardPropagate( input_layers, weights_mu, biases_mu, \ transfer_function=None, name=name+"_"+MU, layer_specs=layer_specs ) z_var, z_var_input = ForwardPropagate( input_layers, weights_var, biases_var, \ transfer_function=tf.exp, name=name+"_"+VAR, layer_specs=layer_specs ) z_v, z_v_input = ForwardPropagate( input_layers, weights_v, biases_v, \ transfer_function=None, name=name+"_"+"V", layer_specs=layer_specs ) mu = {WEIGHTS:weights_mu, BIASES:biases_mu, Z:z_mu } var = {WEIGHTS:weights_var, BIASES:biases_var, Z:z_var } v = {WEIGHTS:weights_v, BIASES:biases_v, Z:z_v } layer = layer_class( shape, {MU:mu, VAR:var, "V":v}, name=name ) elif layer_class == HouseholderLayer: shape = layer_specs[SHAPE] assert len(input_layers) == 2, "must have 2 inputs" y_layer = input_layers[0] v_layer = input_layers[0] # mu = {WEIGHTS:weights_mu, BIASES:biases_mu, Z:z_mu } # var = {WEIGHTS:weights_var, BIASES:biases_var, Z:z_var } # v = {WEIGHTS:weights_v, BIASES:biases_v, Z:z_v } layer = layer_class( shape, {"V":v_layer, "Y":y_layer}, name=name ) elif layer_class == GaussianProductLayer: assert len(input_layers) >= 2, "requires at least 2 inputs" source_layers = input_layers[:-1] observation_layer = input_layers[-1] shape = layer_specs[SHAPE] precisions = [] mu_div_var = [] #pdb.set_trace() product_prec = 0; product_mu_div_var=0 for idx,source in zip( range(len(source_layers)),source_layers ): precisions.append( 1.0/source.GetVariance() ) mu_div_var.append( source.GetMean()/source.GetVariance() ) source_w = observation_layer.tensor #expand_dims(t, 1) product_prec += tf.expand_dims(source_w[:,idx],1)*precisions[-1] product_mu_div_var += tf.expand_dims(source_w[:,idx],1)*mu_div_var[-1] product_var = 1.0 / product_prec product_mean = product_var*product_mu_div_var mu = {Z:product_mean } var = {Z:product_var } layer = layer_class( shape, {MU:mu, VAR:var}, name=name ) elif layer_class == BetaGivenModelLayer: assert len(input_layers) == 2, "must only have 2 input layers" shape = None #layer_specs[SHAPE] prior = layer_specs[PRIOR] model = { A: input_layers[0].tensor, \ B: input_layers[1].tensor, \ PRIOR:prior } layer = layer_class( shape, model, name=name ) elif layer_class == SigmoidModelLayer: shape = layer_specs[SHAPE] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] if shared_layers is None: weights, biases = MakeWeights( input_layers, shape, name, has_biases=has_biases , layer_specs=layer_specs ) else: weights = shared_weights.weights biases = shared_weights.biases a, a_input = ForwardPropagate( input_layers, weights, biases, \ transfer_function=tf.sigmoid, name=name, layer_specs=layer_specs ) model = dict(prob = a, \ weights = weights, \ biases = biases, \ shape = shape ) layer = layer_class( shape, model, name=name ) # elif layer_class == KumaModelLayer: # shape = layer_specs[SHAPE] # prior = layer_specs[PRIOR] # has_biases = True # if layer_specs.has_key("biases"): # has_biases = layer_specs["biases"] # # weights_log_a, \ # biases_log_a = MakeWeights( input_layers, weight_shape, name+"_log_a", has_biases=has_biases ) # # weights_log_b, \ # biases_log_b = MakeWeights( input_layers, weight_shape, name+"_log_b", has_biases=has_biases ) # # log_a, a_input = ForwardPropagate( input_layers, weights_log_a, biases_log_a, \ # transfer_function=None, name=name+"_log_a" ) # # log_b, b_input = ForwardPropagate( input_layers, weights_log_b, biases_log_b, \ # transfer_function=None, name=name+"_log_b" ) # # model = dict(log_a=log_a, log_b=log_b, \ # weights=[weights_log_a,weights_log_b], \ # biases=[biases_log_a,biases_log_b], # prior = prior ) # # layer = layer_class( shape, model, name=name ) elif layer_class == SoftmaxModelLayer or layer_class==EntropySoftmaxModelLayer or layer_class==EntropySoftmaxModelLayer2: shape = layer_specs[SHAPE] has_biases = True if layer_specs.has_key("biases"): has_biases = layer_specs["biases"] if shared_layers is None: weights, biases = MakeWeights( input_layers, shape, name, has_biases=has_biases, layer_specs=layer_specs ) else: weights = shared_weights.weights biases = shared_weights.biases a, a_input = ForwardPropagate( input_layers, weights, biases, \ transfer_function=tf.nn.softmax, name=name, layer_specs=layer_specs ) # the unbiases parts un_b, un_b_input = ForwardPropagate( input_layers, weights, None, \ transfer_function=tf.nn.softmax, name=name, layer_specs=layer_specs ) model = dict(prob=a, \ prob_no_bias = un_b,\ weights=weights, \ biases=biases, \ shape=shape ) layer = layer_class( shape, model, name=name ) else: raise NotImplemented, "No implementation for " + str(layer_class) return layer class MissingModel(object): def __init__( self, kind="full", name=None): self.type = kind self.observed = tf.placeholder( tf.float32, [None,1], name=name+"_observed" ) class DataLayer(object): def __init__( self, shape, dtype = tf.float32, tensor = None, is_sparse = False, name = "" ): self.shape = shape self.batch_shape = MakeBatchShape( shape ) self.name = name self.is_sparse = is_sparse if tensor is None: self.tensor = tf.placeholder( dtype, self.batch_shape, name=name ) else: self.tensor = tensor def EvalWeights(self): return [] def EvalBiases(self): return [] class MaskLayer(object): def __init__( self, name = "" ): self.shape = [] self.batch_shape = [None] self.name = name self.tensor = tf.placeholder( tf.bool, self.batch_shape, name=name ) def EvalWeights(self): return [] def EvalBiases(self): return [] class SymmetricLogLayer(object): def __init__( self, input_layer, shape, name = ""): self.log_input = tf.log( tf.maximum( input_layer.tensor, 0.01 ) ) self.log_flip_input = tf.log( tf.maximum( 1.0-input_layer.tensor, 0.01 ) ) #pdb.set_trace() self.tensor = tf.concat_v2( [self.log_input, self.log_flip_input],1) self.name = name self.shape = [2*shape[0]] # hack self.batch_shape = MakeBatchShape(self.shape) #pdb.set_trace() def EvalWeights(self): return [] def EvalBiases(self): return [] class WeightedMultiplyLayer(object): def __init__( self, shape, input_layers, name = "", transfer = None ): print "WARNING: WeightedMultiplyLayer assuming specific shapes" t1 = input_layers[0].tensor t2 = input_layers[1].tensor #t2 = tf.expand_dims( t2, 1 ) tensor = tf.reduce_sum( t1*tf.expand_dims( t2, 1 ), 2 ) if transfer is None: self.tensor = tensor else: self.tensor = transfer(tensor) self.shape = shape self.batch_shape = MakeBatchShape(shape) self.name = name def EvalWeights(self): return [] def EvalBiases(self): return [] class ScaledLayer(object): #shape, input_layer, weights_location, weights_scale, name, transfer def __init__( self, shape, input_layer, weights_location, weights_scale, name = "", transfer = None ): self.weights_location = weights_location self.weights_scale = weights_scale #pdb.set_trace() if transfer is None: tf.expand_dims( input_layer.tensor, -1 ) self.tensor = ( tf.expand_dims( input_layer.tensor, -1 ) - weights_location)*weights_scale else: self.tensor = ( tf.expand_dims( input_layer.tensor, -1 ) - weights_location)*transfer(weights_scale) self.shape = shape self.batch_shape = MakeBatchShape(shape) self.name = name self.weights = [self.weights_location,self.weights_scale] def EvalWeights(self): if self.weights.__class__ == list: return [w.eval() for w in self.weights] else: return self.weights.eval() def EvalBiases(self): return [] class BetaScaledLayer(object): #shape, input_layer, weights_location, weights_scale, name, transfer def __init__( self, shape, input_layer, beta_layer, name = "" ): #self.weights_location = weights_location #self.weights_scale = weights_scale #pdb.set_trace() self.a = tf.exp( tf.transpose( beta_layer.weights_a[0] ) ) self.b = tf.exp( tf.transpose( beta_layer.weights_b[0] ) ) res = [1] res.extend(shape) self.weights = [ tf.transpose( beta_layer.weights_a[0] ), tf.transpose( beta_layer.weights_b[0] )] a_plus_b = self.a+self.b self.mean = self.a / a_plus_b self.std = tf.sqrt( (self.a*self.b)/( tf.square(a_plus_b)*(a_plus_b+1.0) ) ) self.tensor = ( tf.expand_dims( input_layer.tensor, -1 ) - self.mean )/self.std #pdb.set_trace() self.shape = shape self.batch_shape = MakeBatchShape(shape) self.name = name #self.weights = beta_layer.weights def EvalWeights(self): if self.weights.__class__ == list: return [w.eval() for w in self.weights] else: return self.weights.eval() def EvalBiases(self): return [] class GaussianScaledLayer(object): #shape, input_layer, weights_location, weights_scale, name, transfer def __init__( self, shape, input_layer, gaussian_layer, name = "" ): #self.weights_location = weights_location #self.weights_scale = weights_scale #pdb.set_trace() self.mean = tf.transpose( gaussian_layer.mu_weights[0] ) self.std = tf.sqrt( tf.exp( tf.transpose( gaussian_layer.var_weights[0] ) ) ) res = [1] res.extend(shape) self.weights = [ tf.transpose( gaussian_layer.mu_weights[0] ), tf.transpose( gaussian_layer.var_weights[0] )] #a_plus_b = self.a+self.b #self.mean = self.a / a_plus_b #self.std = tf.sqrt( (self.a*self.b)/( tf.square(a_plus_b)*(a_plus_b+1.0) ) ) self.tensor = ( tf.expand_dims( input_layer.tensor, -1 ) - self.mean )/self.std #pdb.set_trace() self.shape = shape self.batch_shape = MakeBatchShape(shape) self.name = name #self.weights = beta_layer.weights def EvalWeights(self): if self.weights.__class__ == list: return [w.eval() for w in self.weights] else: return self.weights.eval() def EvalBiases(self): return [] class DifLayer(object): def __init__( self, input_layers, name = "" ): self.tensor = input_layers[0].tensor - input_layers[1].tensor self.shape = input_layers[0].shape self.batch_shape = input_layers[0].batch_shape self.name = name class SumLayer(object): def __init__( self, input_layers, name = "" ): tensors = [] for input_layer in input_layers: tensors.append( input_layer.tensor ) self.tensor = tf.add_n( tensors ) self.shape = input_layers[0].shape self.batch_shape = input_layers[0].batch_shape self.name = name def EvalWeights(self): return [] def EvalBiases(self): return [] class DropoutLayer(object): def __init__( self, input_layer, name = "" ): self.shape = input_layer.shape self.batch_shape = input_layer.batch_shape self.name = name self.keep_rate = tf.placeholder_with_default( 1.0, [], name=input_layer.name+KEEP_RATE ) self.dropout_scale = 1.0 / self.keep_rate self.tensor = tf.nn.dropout(input_layer.tensor, self.keep_rate ) #self.dropout_scale*input_layer.tensor def GetKeepRateTensor(self): return self.keep_rate def EvalWeights(self): return [] def EvalBiases(self): return [] class GeneratedDataLayer(DataLayer): def __init__( self, shape, tensor, dtype = tf.float32, name = "" ): DataLayer.__init__( self, shape, dtype=dtype, tensor=tensor, name = name ) # class MaskedLayer(DataLayer): # def __init__( self, shape, tensor, dtype = tf.float32, name = "" ): # DataLayer.__init__( self, shape, dtype=dtype, tensor=tensor, missing_model = missing_model, name = name ) class HiddenLayer(object): def __init__( self, shape, model, name="" ): #model = {"activation":activation, "activation_input":activation_input, "weights":weights,"biases":biases} self.model = model self.shape = shape self.batch_shape = MakeBatchShape(shape) self.weights = model[WEIGHTS] self.biases = model[BIASES] self.activation = model[ACTIVATION] self.activation_input = model[ACTIVATION_INPUT] self.name = name self.tensor = self.activation def EvalWeights(self): if self.weights.__class__ == list: return [w.eval() for w in self.weights] else: return self.weights.eval() def EvalBiases(self): if self.biases is None: return [] if self.biases.__class__ == list: b = [] for w in self.biases: if w is not None: b.append( w.eval()) return b #return [w.eval() for w in self.biases] else: return self.biases.eval() def SetWeights( self, sess, weights ): if self.weights.__class__ == list: assert weights.__class__ == list, "should assign same weights" assert len(weights) == len(self.weights), "should assign same weights" for tf_w, np_w in zip( self.weights, weights ): sess.run(tf_w.assign(np_w)) #return [w.eval() for w in self.weights] else: sess.run(self.weights.assign(weights)) #return self.weights.eval() def SetBiases( self, sess, biases ): if self.biases.__class__ == list: assert biases.__class__ == list, "should assign same biases" assert len(biases) == len(self.biases), "should assign same biases" for tf_w, np_w in zip( self.biases, biases ): sess.run(tf_w.assign(np_w)) else: sess.run(self.biases.assign(biases)) def AddRegularizer( self, reg, weight_idx = 0 ): if reg.__class__ == list: assert len(reg) == len(self.weights), "if reg is a list, must be one per weight" applied = [] for r,w in zip(reg, self.weights): applied.append( r.Apply(w) ) return tf.add_n( applied ) else: return reg.Apply( self.weights[ weight_idx ] ) class DroppedSourceHiddenLayer(HiddenLayer): pass # def __init__( self, shape, model, name="" ): # return __init__( self, shape, model, nam class WeibullModelLayer(object): def __init__( self, scale_var, shape_var, name="" ): # alpha == scale # beta == shape self.shape_var = shape_var.tensor self.scale_var = scale_var.tensor self.a = self.scale_var self.b = self.shape_var self.log_scale = tf.log( self.scale_var + 1e-12) self.log_shape = tf.log( self.shape_var + 1e-12) self.name = name def EvalWeights(self): return [] #return wa.extend(wb) #[w[0].eval() for w in self.weights] def EvalBiases(self): #wa = [w.eval() for w in self.biases_a] #wb = [w.eval() for w in self.biases_b] #wa.extend(wb) #[w[0].eval() for w in self.weights] return [] def SetWeights( self, sess, weights ): return None def SetBiases( self, sess, biases ): return None # def LogLikelihood( self, E, T, Z ): # # E: events, binary vector indicating "death" (n by 1) # # T: time of event or censor (n by 1) # # Z: matrix of covariates (n by dim) # log_hazard = self.LogHazard( T, Z ) # log_survival = self.LogSurvival( T, Z ) # # return E*log_hazard + log_survival def LogHazard( self, T ): return self.log_shape + self.log_scale + (self.scale_var-1.0)*tf.log( T ) def LogSurvival( self, T ): return -self.CumulativeHazard( T) def LogCumulativeHazard( self, T ): return self.log_shape + self.scale_var*tf.log(T) def CumulativeHazard( self, T ): return tf.exp( self.LogCumulativeHazard(T) ) def LogLikelihood( self, X, as_matrix = False, boolean_mask = None ): #pdb.set_trace() #Z = X[0] T = X[0] E = X[1] log_hazard = self.LogHazard( T.tensor ) log_survival = self.LogSurvival( T.tensor ) # # return E*log_hazard + log_survival self.loglik_matrix = E.tensor*log_hazard + log_survival if boolean_mask is not None: self.loglik_matrix = tf.boolean_mask( self.loglik_matrix, boolean_mask ) self.loglik = tf.reduce_sum(self.loglik_matrix ,name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik class GaussianModelLayer(HiddenLayer): def __init__( self, shape, model, prior = None, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = model[MU] self.var = model[VAR] self.activation = [self.mu[Z], self.var[Z]] self.prior = prior self.z_mu = self.mu[Z] self.expectation = self.z_mu self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_logvar = tf.log( self.z_var ) self.z_std = tf.sqrt( self.z_var ) self.mu_weights = self.mu[WEIGHTS] self.var_weights = self.var[WEIGHTS] #self.penalties = self.mu["penalties"] + self.var["penalties"] self.weights = [self.mu_weights,self.var_weights] self.biases = [self.mu[BIASES],self.var[BIASES]] self.name = name self.output_dims = [self.shape, self.shape] self.tensor = [self.z_mu, self.z_var] def GetVariance(self): return self.z_var def GetMean(self): return self.z_mu def EvalWeights(self): return [w[0].eval() for w in self.weights] def EvalBiases(self): if self.biases is None: return [] b = [] for w in self.biases: if w is not None: b.append( w.eval()) return b # if self.biases is None: # return [] # return [w.eval() for w in self.biases] def SetWeights( self, sess, weights ): assert weights.__class__ == list, "should assign same weights" assert len(weights) == len(self.weights), "should assign same weights" for tf_w, np_w in zip( self.weights, weights ): sess.run(tf_w[0].assign(np_w)) def SetBiases( self, sess, biases ): assert biases.__class__ == list, "should assign same biases" assert len(biases) == len(self.biases), "should assign same biases" for tf_w, np_w in zip( self.biases, biases ): sess.run(tf_w.assign(np_w)) def KL( self, model = None ): if model is None: if self.prior is None: self.latent_kl = -0.5*tf.reduce_sum(1 + self.z_logvar - tf.square(self.z_mu) - self.z_var ) else: print "KL using prior ", self.prior p_mu, p_var = self.prior log_p_var = np.log(p_var) self.latent_kl = -0.5*tf.reduce_sum(1 + self.z_logvar - log_p_var - tf.square(self.z_mu-p_mu)/p_var - self.z_var/p_var ) else: print "KL using previous layer as prior" self.latent_kl = -0.5*tf.reduce_sum(1 + self.z_logvar - model.z_logvar - tf.square(self.z_mu-model.z_mu)/model.z_var - self.z_var/model.z_var ) return self.latent_kl def KL_mat( self, model = None ): if model is None: if self.prior is None: self.latent_kl_mat = -0.5*(1 + self.z_logvar - tf.square(self.z_mu) - self.z_var ) else: print "KL using prior ", self.prior p_mu, p_var = self.prior log_p_var = np.log(p_var) self.latent_kl_mat = -0.5*(1 + self.z_logvar - log_p_var - tf.square(self.z_mu-p_mu)/p_var - self.z_var/p_var ) else: print "KL using previous layer as prior" self.latent_kl_mat = -0.5*(1 + self.z_logvar - model.z_logvar - tf.square(self.z_mu-model.z_mu)/model.z_var - self.z_var/model.z_var ) return self.latent_kl_mat def CustomDistance( self, model = None ): if model is None: self.custom_distance = tf.reduce_sum( tf.square(self.z_mu) + self.z_var ) else: #print "KL using previous layer as prior" self.custom_distance = tf.reduce_sum( tf.square(self.z_mu-model.z_mu) + tf.square( self.z_std - model.z_std ) ) #pdb.set_trace() return self.custom_distance def GenerateX( self, u_zs, use_expectation = False ): u_z = u_zs[0] if use_expectation: z = self.expectation else: # generate z using deterministic transform z = self.z_mu + self.z_std*u_z.tensor #pdb.set_trace() # return generic data layer return z def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # generate z using deterministic transform z = self.z_mu + self.z_std*u_z.tensor # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) def LogLikelihood( self, z, as_matrix = False, boolean_mask = None ): self.loglik_matrix = -0.5*np.log(2*np.pi) - 0.5*self.z_logvar - 0.5*tf.square( z.tensor-self.z_mu )/self.z_var self.loglik = tf.reduce_sum(self.loglik_matrix, name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik class HouseholderModelLayer(GaussianModelLayer): def __init__( self, shape, model, prior = None, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = model[MU] self.var = model[VAR] self.v = model["V"] self.activation = [self.mu[Z], self.var[Z], self.v[Z]] self.prior = prior self.z_mu = self.mu[Z] self.expectation = self.z_mu self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_logvar = tf.log( self.z_var ) self.z_std = tf.sqrt( self.z_var ) self.z_v = self.v[Z] self.norm_v = tf.reduce_sum( tf.square( self.z_v ), 1 ) self.normed_v = self.z_v / self.norm_v self.mu_weights = self.mu[WEIGHTS] self.var_weights = self.var[WEIGHTS] self.v_weights = self.v[WEIGHTS] #self.penalties = self.mu["penalties"] + self.var["penalties"] self.weights = [self.mu_weights,self.var_weights,self.v_weights] self.biases = [self.mu[BIASES],self.var[BIASES],self.v[BIASES]] self.name = name self.output_dims = [self.shape, self.shape, self.shape] self.tensor = [self.z_mu, self.z_var, self.z_v] def GenerateX( self, u_zs, output, use_expectation = False ): u_z = u_zs[0] if use_expectation: z = self.expectation else: # generate z using deterministic transform y = self.z_mu + self.z_std*u_z.tensor z = y - 2*self.normed_v*tf.reduce_sum( self.z_v*y, 1 ) #pdb.set_trace() # return generic data layer if output==0: return y else: return z def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # generate z using deterministic transform y = self.z_mu + self.z_std*u_z.tensor z = y - 2*self.normed_v*tf.dot( self.z_v.T, y ) # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) def LogLikelihood( self, z, as_matrix = False, boolean_mask = None ): self.loglik_matrix = -0.5*np.log(2*np.pi) - 0.5*self.z_logvar - 0.5*tf.square( z.tensor-self.z_mu )/self.z_var self.loglik = tf.reduce_sum(self.loglik_matrix, name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik class HouseholderLayer(HiddenLayer): def __init__( self, shape, model, prior = None, name="" ): self.model = model self.shape = shape self.batch_shape = MakeBatchShape(shape) self.weights = []#model[WEIGHTS] self.biases = []#model[BIASES] #self.activation = model[ACTIVATION] #self.activation_input = model[ACTIVATION_INPUT] self.name = name self.y_layer = model["Y"] self.v_layer = model["V"] self.v = self.v_layer.tensor self.y = self.y_layer.tensor #tf.expand_dims(source_w[:,idx],1) self.norm_v = tf.expand_dims(tf.reduce_sum( tf.square( self.v ), 1 ), 1) self.normed_v = self.v / self.norm_v self.z = self.y - 2*self.normed_v*tf.expand_dims(tf.reduce_sum( self.v*self.y, 1 ),1) #pdb.set_trace() self.activation = self.z self.weights = [] #self.mu_weights,self.var_weights,self.v_weights] self.biases = [] #self.mu[BIASES],self.var[BIASES],self.v[BIASES]] self.output_dims = self.shape self.tensor = self.activation class StudentModelLayer(GaussianModelLayer): def __init__( self, shape, model, prior = None, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = model[MU] self.var = model[VAR] self.nu = model[NU] self.activation = [self.mu[Z], self.var[Z], self.nu[Z]] self.prior = prior self.z_mu = self.mu[Z] self.expectation = self.z_mu self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_nu = tf.clip_by_value( self.nu[Z], 0.1, 1000.0 ) self.z_logvar = tf.log( self.z_var ) self.z_std = tf.sqrt( self.z_var ) self.mu_weights = self.mu[WEIGHTS] self.var_weights = self.var[WEIGHTS] self.nu_weights = self.nu[WEIGHTS] #self.penalties = self.mu["penalties"] + self.var["penalties"] self.weights = [self.mu_weights,self.var_weights,self.nu_weights] self.biases = [self.mu[BIASES],self.var[BIASES],self.nu[BIASES]] self.name = name self.output_dims = [self.shape, self.shape, self.shape] self.tensor = [self.z_mu, self.z_var, self.z_nu] self.log_norm_const = tf.lgamma( (self.z_nu+1)/2.0 ) \ - tf.lgamma( self.z_nu/2.0 ) \ -0.5*tf.log( self.z_nu ) \ - 0.5*self.z_logvar - 0.5*np.log(np.pi) def GetDof(self): return self.z_nu def GetNu(self): return self.z_nu def KL( self, model = None ): assert False, "Not Implemented" # if model is None: # if self.prior is None: # self.latent_kl = -0.5*tf.reduce_sum(1 + self.z_logvar - tf.square(self.z_mu) - self.z_var ) # else: # print "KL using prior ", self.prior # p_mu, p_var = self.prior # log_p_var = np.log(p_var) # # self.latent_kl = -0.5*tf.reduce_sum(1 + self.z_logvar - log_p_var - tf.square(self.z_mu-p_mu)/p_var - self.z_var/p_var ) # else: # print "KL using previous layer as prior" # self.latent_kl = -0.5*tf.reduce_sum(1 + self.z_logvar - model.z_logvar - tf.square(self.z_mu-model.z_mu)/model.z_var - self.z_var/model.z_var ) # # # return self.latent_kl def KL_mat( self, model = None ): assert False, "Not Implemented" # if model is None: # if self.prior is None: # self.latent_kl_mat = -0.5*(1 + self.z_logvar - tf.square(self.z_mu) - self.z_var ) # else: # print "KL using prior ", self.prior # p_mu, p_var = self.prior # log_p_var = np.log(p_var) # # self.latent_kl_mat = -0.5*(1 + self.z_logvar - log_p_var - tf.square(self.z_mu-p_mu)/p_var - self.z_var/p_var ) # else: # print "KL using previous layer as prior" # self.latent_kl_mat = -0.5*(1 + self.z_logvar - model.z_logvar - tf.square(self.z_mu-model.z_mu)/model.z_var - self.z_var/model.z_var ) # # # return self.latent_kl_mat def GenerateX( self, u_zs, use_expectation = False ): u_z = u_zs[0] if use_expectation: z = self.expectation else: # generate z using deterministic transform #z = self.z_mu + self.z_std*u_z.tensor #assert False, chi_sqr = tf.random_gamma(self.shape, self.z_nu/2.0, beta=0.5, dtype=tf.float32) z = self.z_mu + self.z_std*u_z.tensor*tf.sqrt(self.z_nu/chi_sqr) # return generic data layer return z def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # generate z using deterministic transform chi_sqr = tf.random_gamma(shape, self.z_nu/2.0, beta=0.5, dtype=tf.float32) z = self.z_mu + self.z_std*u_z.tensor*tf.sqrt(self.z_nu/chi_sqr) # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) def LogLikelihood( self, z, as_matrix = False, boolean_mask = None ): self.loglik_matrix = self.log_norm_const - ( (self.z_nu+1.0)/2.0)*tf.log( 1.0 + tf.square( (z.tensor-self.z_mu)/self.z_std )/self.z_nu ) #self.loglik_matrix = -0.5*np.log(2*np.pi) - 0.5*self.z_logvar - 0.5*tf.square( z.tensor-self.z_mu )/self.z_var self.loglik = tf.reduce_sum(self.loglik_matrix, name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik class GaussianLogNormalModelLayer(HiddenLayer): def __init__( self, shape, model, prior = None, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = model[MU] self.log_prec_mu = model[LOG_PREC_MU] self.log_prec_var = model[LOG_PREC_VAR] self.activation = [self.mu[Z], self.log_prec_mu[Z], self.log_prec_var[Z]] self.prior = prior self.z_mu = self.mu[Z] self.expectation = self.z_mu #self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_log_prec_var = tf.clip_by_value( self.log_prec_var[Z], 0.1, 1000.0 ) self.z_log_prec_mu = self.log_prec_mu[Z] self.z_log_prec_logvar = tf.log( self.z_log_prec_var ) self.z_log_prec_std = tf.sqrt( self.z_log_prec_var ) # self.mu_weights = self.mu[WEIGHTS] # self.var_weights = self.var[WEIGHTS] # self.nu_weights = self.nu[WEIGHTS] #self.penalties = self.mu["penalties"] + self.var["penalties"] self.weights = [self.mu[WEIGHTS],self.log_prec_mu[WEIGHTS],self.log_prec_var[WEIGHTS]] self.biases = [self.mu[BIASES],self.log_prec_mu[BIASES],self.log_prec_var[BIASES]] self.name = name self.output_dims = [self.shape, self.shape, self.shape] self.tensor = [self.z_mu, self.z_log_prec_mu, self.z_log_prec_var] # self.log_norm_const = tf.lgamma( (self.z_nu+1)/2.0 ) \ # - tf.lgamma( self.z_nu/2.0 ) \ # -0.5*tf.log( self.z_nu ) \ # - 0.5*self.z_logvar - 0.5*np.log(np.pi) def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # generate z using deterministic transform log_prec = self.z_log_prec_mu + u_z.tensor*self.z_log_prec_std self.z_prec = tf.exp( log_prec ) self.z_var = 1.0/self.z_prec self.z_std = tf.sqrt(self.z_var) self.z_logvar = -log_prec #chi_sqr = tf.random_gamma(shape, self.z_nu/2.0, beta=0.5, dtype=tf.float32) #z = self.z_mu + self.z_std*u_z.tensor*tf.sqrt(self.z_nu/chi_sqr) z = self.z_mu + self.z_std*u_z.tensor # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) def GenerateX( self, u_zs, output, use_expectation = False ): u_z = u_zs[0] u_prec = u_zs[1] if use_expectation: z = self.expectation else: # generate z using deterministic transform # generate z using deterministic transform log_prec = self.z_log_prec_mu + u_prec.tensor*self.z_log_prec_std self.z_log_prec = log_prec self.z_prec = tf.exp( log_prec ) self.z_var = 1.0/self.z_prec self.z_std = tf.sqrt(self.z_var) self.z_logvar = -log_prec #chi_sqr = tf.random_gamma(shape, self.z_nu/2.0, beta=0.5, dtype=tf.float32) #z = self.z_mu + self.z_std*u_z.tensor*tf.sqrt(self.z_nu/chi_sqr) z = self.z_mu + self.z_std*u_z.tensor # return generic data layer if output==0: return z elif output==1: return self.z_prec else: assert False, 'cant handle output' #return [z, self.z_prec] def LogLikelihood( self, z, as_matrix = False, boolean_mask = None ): assert z.__class__ == list, "must have list for this layer" #pdb.set_trace() # Gaussian part z_prec = tf.clip_by_value( z[1].tensor , 0.001, 1000.0 ) #z_prec = z[1].tensor #tf.clip_by_value( self.log_prec_var[Z], 0.001, 10.0 ) z_var = 1.0 / z_prec z_logvar = tf.log( z_var ) z_logprec = -z_logvar self.loglik_z = -0.5*np.log(2*np.pi) - 0.5*z_logvar - 0.5*tf.square( z[0].tensor-self.z_mu )/z_var # Lognormal part self.log_lik_prec = -z_logprec - 0.5*np.log(2*np.pi) - 0.5*self.z_log_prec_logvar - 0.5*tf.square( z_logprec-self.z_log_prec_mu )/self.z_log_prec_var self.loglik_matrix = self.loglik_z #+ self.log_lik_prec self.loglik = tf.reduce_sum(self.loglik_matrix, name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik class GaussianLogNormalStaticLayer(GaussianLogNormalModelLayer): def __init__( self, shape, prior, name="" ): self.weights = [] self.biases = [] self.shape = shape self.batch_shape = MakeBatchShape(shape) #self.mu = prior[0]*np.ones( self.shape, dtype=np.float32 ) #self.var = prior[1]*np.ones( self.shape, dtype=np.float32 ) self.mu = prior[0]*np.ones( self.shape, dtype=np.float32 ) self.log_prec_mu = prior[1]*np.ones( self.shape, dtype=np.float32 ) self.log_prec_var = prior[2]*np.ones( self.shape, dtype=np.float32 ) #self.activation = [self.mu[Z], self.log_prec_mu[Z], self.log_prec_var[Z]] self.prior = prior self.z_mu = self.mu self.expectation = self.z_mu #self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_log_prec_var = tf.clip_by_value( self.log_prec_var, 0.1, 1000.0 ) self.z_log_prec_mu = self.log_prec_mu self.z_log_prec_logvar = tf.log( self.z_log_prec_var ) self.z_log_prec_std = tf.sqrt( self.z_log_prec_var ) self.name = name self.output_dims = [self.shape, self.shape, self.shape] self.tensor = [self.z_mu, self.z_log_prec_mu, self.z_log_prec_var] def EvalWeights(self): return [] def EvalBiases(self): return [] def SetWeights( self, sess, weights ): pass def SetBiases( self, sess, biases ): pass class GaussianStaticLayer(GaussianModelLayer): def __init__( self, shape, prior, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = prior[0]*np.ones( self.shape, dtype=np.float32 ) self.var = prior[1]*np.ones( self.shape, dtype=np.float32 ) self.z_mu = self.mu self.z_var = self.var self.prior = prior self.expectation = self.z_mu self.z_logvar = tf.log( self.z_var ) self.z_std = tf.sqrt( self.z_var ) self.weights = [] self.biases = [] self.name = name self.output_dims = [self.shape, self.shape] self.tensor = [self.z_mu, self.z_var] def EvalWeights(self): return [] def EvalBiases(self): return [] def SetWeights( self, sess, weights ): pass def SetBiases( self, sess, biases ): pass class LogNormalStudentModelLayer(StudentModelLayer): def __init__( self, shape, model, prior = None, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = model[MU] self.log_prec_mu = model[LOG_PREC_MU] self.log_prec_var = model[LOG_PREC_VAR] self.activation = [self.mu[Z], self.log_prec_mu[Z], self.log_prec_var[Z]] self.prior = prior self.z_mu = self.mu[Z] self.expectation = self.z_mu #self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_log_prec_var = tf.clip_by_value( self.log_prec_var[Z], 0.1, 1000.0 ) self.z_log_prec_mu = self.log_prec_mu[Z] self.z_log_prec_logvar = tf.log( self.z_log_prec_var ) self.z_log_prec_std = tf.sqrt( self.z_log_prec_var ) # self.mu_weights = self.mu[WEIGHTS] # self.var_weights = self.var[WEIGHTS] # self.nu_weights = self.nu[WEIGHTS] #self.penalties = self.mu["penalties"] + self.var["penalties"] self.weights = [self.mu[WEIGHTS],self.log_prec_mu[WEIGHTS],self.log_prec_var[WEIGHTS]] self.biases = [self.mu[BIASES],self.log_prec_mu[BIASES],self.log_prec_var[BIASES]] self.name = name self.output_dims = [self.shape, self.shape, self.shape] self.tensor = [self.z_mu, self.z_log_prec_mu, self.z_log_prec_var] # self.log_norm_const = tf.lgamma( (self.z_nu+1)/2.0 ) \ # - tf.lgamma( self.z_nu/2.0 ) \ # -0.5*tf.log( self.z_nu ) \ # - 0.5*self.z_logvar - 0.5*np.log(np.pi) def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # generate z using deterministic transform log_prec = self.z_log_prec_mu + u_z.tensor*self.z_log_prec_std self.z_prec = tf.exp( log_prec ) self.z_var = 1.0/self.z_prec self.z_std = tf.sqrt(self.z_var) self.z_logvar = -log_prec #chi_sqr = tf.random_gamma(shape, self.z_nu/2.0, beta=0.5, dtype=tf.float32) #z = self.z_mu + self.z_std*u_z.tensor*tf.sqrt(self.z_nu/chi_sqr) z = self.z_mu + self.z_std*u_z.tensor # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) def GenerateX( self, u_zs, use_expectation = False ): u_z = u_zs[0] u_prec = u_zs[1] if use_expectation: z = self.expectation else: # generate z using deterministic transform # generate z using deterministic transform log_prec = self.z_log_prec_mu + u_prec.tensor*self.z_log_prec_std self.z_prec = tf.exp( log_prec ) self.z_var = 1.0/self.z_prec self.z_std = tf.sqrt(self.z_var) self.z_logvar = -log_prec #chi_sqr = tf.random_gamma(shape, self.z_nu/2.0, beta=0.5, dtype=tf.float32) #z = self.z_mu + self.z_std*u_z.tensor*tf.sqrt(self.z_nu/chi_sqr) z = self.z_mu + self.z_std*u_z.tensor # return generic data layer return z def LogLikelihood( self, z, as_matrix = False, boolean_mask = None ): self.loglik_matrix = -0.5*np.log(2*np.pi) - 0.5*self.z_logvar - 0.5*tf.square( z.tensor-self.z_mu )/self.z_var self.loglik = tf.reduce_sum(self.loglik_matrix, name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik class GaussianStaticLayer(GaussianModelLayer): def __init__( self, shape, prior, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = prior[0]*np.ones( self.shape, dtype=np.float32 ) self.var = prior[1]*np.ones( self.shape, dtype=np.float32 ) self.z_mu = self.mu self.z_var = self.var self.prior = prior self.expectation = self.z_mu self.z_logvar = tf.log( self.z_var ) self.z_std = tf.sqrt( self.z_var ) self.weights = [] self.biases = [] self.name = name self.output_dims = [self.shape, self.shape] self.tensor = [self.z_mu, self.z_var] def EvalWeights(self): return [] def EvalBiases(self): return [] def SetWeights( self, sess, weights ): pass def SetBiases( self, sess, biases ): pass class GaussianProductLayer(GaussianModelLayer): def __init__( self, shape, model, prior = None, name="" ): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.mu = model[MU] self.var = model[VAR] #self.activation = [self.mu[Z], self.var[Z]] self.prior = prior self.z_mu = self.mu[Z] self.expectation = self.z_mu self.z_var = tf.clip_by_value( self.var[Z], 0.1, 1000.0 ) self.z_logvar = tf.log( self.z_var ) self.z_std = tf.sqrt( self.z_var ) #self.mu_weights = self.mu[WEIGHTS] #self.var_weights = self.var[WEIGHTS] #self.penalties = self.mu["penalties"] + self.var["penalties"] #self.weights = [self.mu_weights,self.var_weights] #self.biases = [self.mu[BIASES],self.var[BIASES]] self.name = name self.output_dims = [self.shape, self.shape] self.tensor = [self.z_mu, self.z_var] def GetVariance(self): return self.z_var def GetMean(self): return self.z_mu def EvalWeights(self): return [] def EvalBiases(self): return [] def SetWeights( self, sess, weights ): assert False, "no weights" def SetBiases( self, sess, biases ): assert False, "no biases" class BetaModelLayer(HiddenLayer): def __init__( self, shape, model, name = ""): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.model = model self.weights = model[WEIGHTS] self.weights_a = self.weights[0] self.weights_b = self.weights[1] self.biases = model[BIASES] self.biases_a = self.biases[0] self.biases_b = self.biases[1] self.a = self.model[A] self.b = self.model[B] self.prior_a = self.model[PRIOR][0] self.prior_b = self.model[PRIOR][1] #self.expectation = (self.a + self.prior_a -1.0)/(self.b + self.prior_b + self.a + self.prior_a - 2.0) self.expectation = (self.a + self.prior_a)/(self.b + self.prior_b + self.a + self.prior_a) self.variance = (self.a + self.prior_a)*(self.b + self.prior_b)/( tf.square(self.b + self.prior_b + self.a + self.prior_a)*(self.b + self.prior_b + self.a + self.prior_a+1.0)) self.std_dev = tf.sqrt( self.variance) self.name = name self.tensor = [self.a, self.b] #pdb.set_trace() def EvalWeights(self): wa = [w.eval() for w in self.weights_a] wb = [w.eval() for w in self.weights_b] wa.extend(wb) #[ return wa #return wa.extend(wb) #[w[0].eval() for w in self.weights] def EvalBiases(self): if self.biases is None: return [] if self.biases.__class__ == list: b = [] for w in self.biases: if w is not None: b.append( w.eval()) return b #return [w.eval() for w in self.biases] else: return self.biases.eval() def SetWeights( self, sess, weights ): assert weights.__class__ == list, "should assign same weights" assert len(weights) == len(self.weights), "should assign same weights" for tf_w, np_w in zip( self.weights, weights ): sess.run(tf_w[0].assign(np_w)) def SetBiases( self, sess, biases ): assert biases.__class__ == list, "should assign same biases" assert len(biases) == len(self.biases), "should assign same biases" for tf_w, np_w in zip( self.biases, biases ): sess.run(tf_w.assign(np_w)) def LogLikelihood( self, X, as_matrix = False, boolean_mask = None ): self.loglik_matrix = -tf_log_beta(self.a+self.prior_a, self.b+self.prior_b) \ + (self.a + self.prior_a -1.0 )* tf.log( X.tensor + 1e-12 ) \ + (self.b + self.prior_b -1.0 )* tf.log( 1.0 - X.tensor + 1e-12 ) if boolean_mask is not None: self.loglik_matrix = tf.boolean_mask( self.loglik_matrix, boolean_mask ) self.loglik = tf.reduce_sum(self.loglik_matrix ,name = self.name+"_loglik") if as_matrix is True: return self.loglik_matrix else: return self.loglik def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # generate z using deterministic transform assert False, "No generative model for Beta, use expectation" #z = self.z_mu + self.z_std*u_z.tensor # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) class BetaGivenModelLayer(BetaModelLayer): def __init__( self, shape, model, name = ""): self.model = model self.a = self.model[A] self.b = self.model[B] self.prior_a = self.model[PRIOR][0] self.prior_b = self.model[PRIOR][1] self.shape = shape self.batch_shape = MakeBatchShape(shape) #self.expectation = (self.a + self.prior_a -1.0)/(self.b + self.prior_b + self.a + self.prior_a - 2.0) self.expectation = (self.a + self.prior_a)/(self.b + self.prior_b + self.a + self.prior_a) self.name = name self.tensor = [self.a, self.b] #pdb.set_trace() def EvalWeights(self): return [] def EvalBiases(self): return [] def SetWeights( self, sess, weights ): pass def SetBiases( self, sess, biases ): pass # class KumaModelLayer(HiddenLayer): # def __init__( self, shape, model, name = ""): # self.shape = shape # self.batch_shape = MakeBatchShape(shape) # self.model = model # self.penalties = model["penalties"] # # self.log_a = tf.clip_by_value( self.model["log_a"], np.log(0.0001), np.log(100) ) # self.log_b = tf.clip_by_value( self.model["log_b"], np.log(0.0001), np.log(100) ) # self.a = tf.exp(self.log_a) # self.b = tf.exp(self.log_b) # # self.log_expectation = self.log_b + tf.lgamma(1.0+1.0/self.a) + tf.lgamma(self.b) - tf.lgamma(1.0+1.0/self.a+self.b) # self.expectation = tf.exp( self.log_expectation ) # # # self.name = name # self.tensor = [self.a, self.b] # self.output_dims = [self.a.get_shape().dims[1].value, self.a.get_shape().dims[1].value] # # def LogLikelihood( self, X, missing_model = None ): # #shape = layer.get_shape() # if missing_model is None: # self.loglik = tf.reduce_sum( tf.log(self.a) + tf.log(self.b) \ # + (self.a -1.0 )* tf.log( X.tensor + 1e-12 ) \ # + (self.b -1.0 )* tf.log( 1.0 - tf.pow(X.tensor,self.a)+1e-12), name = self.name+"_loglik" ) # # else: # assert False, "not implemented" # if missing_model.type == "full": # binary_observed_vector = missing_model.observed # self.loglik_by_case = tf.reduce_sum( -tf_log_beta(self.a+self.prior_a, self.b+self.prior_b) \ # + (self.a + self.prior_a -1.0 )* tf.log( X.tensor + 1e-12 ) \ # + (self.b + self.prior_b -1.0 )* tf.log( 1.0 - X.tensor + 1e-12 ), -1, name = self.name+"_loglik_by_case" ) # while self.loglik_by_case.get_shape().ndims > 1: # self.loglik_by_case = tf.reduce_sum( self.loglik_by_case, -1, name = self.name+"_loglik_by_case" ) # self.loglik = tf.reduce_sum( tf.mul( binary_observed_vector, self.loglik_by_case ), name = self.name+"_loglik" ) # else: # raise NotImplemented, "no implementation for " + missing_model.type # # return self.loglik # # def LogLikelihoodAsSigmoid( self, X ): # return tf.reduce_sum( X.tensor * tf.log(self.expectation+1e-6) + ( 1.0 - X.tensor ) * tf.log(1.0-self.expectation+1e-6) ) # # # def Generate( self, u_z, shape, name = "", use_expectation = False ): # # if use_expectation: # #assert False # z = self.expectation # # else: # #z= tf.pow( 1.0-tf.pow(1.0-u_z.tensor, 1.0/self.b), 1.0/self.a) # #z= tf.pow( 1.0-tf.pow(1.0-u_z.tensor, 1.0/self.b), 1.0/self.a) # z = tf.exp( (1.0/self.b)*tf.log( 1.0- tf.exp( tf.log(1.0-u_z.tensor)/self.b)) ) # #exp( ( 1.0/b )*log(1.0-exp( log(u)/b))) # # generate z using deterministic transform # #assert False, "No generative model for Beta, use expectation" #z = self.z_mu + self.z_std*u_z.tensor # # # return generic data layer # return GeneratedDataLayer( shape, tensor=z, name=name ) class SigmoidModelLayer(HiddenLayer): def __init__( self, shape, model, name = ""): self.shape = shape self.batch_shape = MakeBatchShape(shape) #self.inputs = input_layers self.model = model #self.penalties = model["penalties"] self.weights = self.model[WEIGHTS] self.biases = self.model[BIASES] if self.model.has_key(EPSILON): self.gen_epsilon = self.model[EPSILON] else: self.gen_epsilon = 0.01 # the output is prob(c=1|x) self.p_of_c = self.model["prob"] self.p_of_c_not = 1.0 - self.p_of_c #self.n_units = n_units #self.shape = model["shape"] #self.dims = [model["shape"][1:]] self.name = name self.tensor = self.p_of_c self.expectation = self.p_of_c self.log_p_of_c = tf.log( self.p_of_c + 1e-12 ) self.log_p_of_c_not = tf.log( self.p_of_c_not + 1e-12 ) def GetExpectation(self): return self.expectation def LogLikelihood( self, X, as_matrix = False ): self.loglik_matrix = X.tensor * self.log_p_of_c + ( 1.0 - X.tensor ) * self.log_p_of_c_not self.loglik = tf.reduce_sum( self.loglik_matrix, name = self.name+"_loglik" ) if as_matrix is True: return self.loglik_matrix else: return self.loglik def LogLikelihoodAsSigmoid(self, X ): return self.LogLikelihood(X) def Generate( self, u_z, shape, name = "", use_expectation = False ): if use_expectation: z = self.expectation else: # e.g. p = 0.2, u = 0.9 -> 0, ceil( 0.2-0.9 ) => ceil( -0.7 ) => 0 #z = tf.maximum( 0, tf.minimum( 1.0, self.tensor - u_z.tensor ) ) z = tf.sigmoid( (self.tensor - u_z.tensor)/self.gen_epsilon ) # return generic data layer return GeneratedDataLayer( shape, tensor=z, name=name ) def KL( self ): #self.latent_kl_by_case = tf.reduce_sum( tf.square( self.z_mu) + tf.square(1.0-self.z_var), -1) #self.latent_kl_by_case = -0.5 * tf.reduce_sum(1 + self.z_logvar - tf.square(self.z_mu) - self.z_var, -1) self.prior = 0.5 #self.log_p_of_c self.latent_kl = tf.reduce_sum( self.p_of_c * self.log_p_of_c + self.p_of_c_not * self.log_p_of_c_not + np.log(2.0) ) return self.latent_kl class SoftmaxModelLayer(HiddenLayer): def __init__( self, shape, model, name = ""): self.shape = shape self.batch_shape = MakeBatchShape(shape) self.model = model self.weights = self.model[WEIGHTS] self.biases = self.model[BIASES] if self.model.has_key(EPSILON): self.gen_epsilon = self.model[EPSILON] else: self.gen_epsilon = 0.01 # the output is prob(c=1|x) self.p_of_c_no_bias = self.model["prob_no_bias"] self.p_of_c = self.model["prob"] self.p_of_c_not = 1.0 - self.p_of_c self.name = name self.tensor = self.p_of_c self.expectation = self.p_of_c self.expectation_no_bias = self.p_of_c_no_bias self.log_p_of_c_no_bias = tf.log( self.p_of_c_no_bias + 1e-12 ) self.log_p_of_c = tf.log( self.p_of_c + 1e-12 ) self.log_p_of_c_not = tf.log( self.p_of_c_not + 1e-12 ) # def LogLikelihood( self, X ): # self.loglik = tf.reduce_sum( X.tensor * self.log_p_of_c, name = self.name+"_loglik" ) # return self.loglik # def LogLikelihood( self, X, as_matrix = False, boolean_mask = None ): if boolean_mask is None: self.loglik_matrix = X.tensor * self.log_p_of_c else: self.loglik_matrix = tf.boolean_mask( X.tensor, boolean_mask ) * tf.boolean_mask( self.log_p_of_c, boolean_mask ) self.loglik = tf.reduce_sum( self.loglik_matrix, name = self.name+"_loglik" ) if as_matrix is True: return self.loglik_matrix else: return self.loglik class EntropySoftmaxModelLayer(SoftmaxModelLayer): def LogLikelihood( self, X, as_matrix = False, boolean_mask = None ): if boolean_mask is None: self.loglik_matrix = self.p_of_c_no_bias * self.log_p_of_c_no_bias #self.loglik_matrix = self.p_of_c * self.log_p_of_c else: self.loglik_matrix = self.p_of_c_no_bias * self.log_p_of_c_no_bias #self.loglik_matrix = self.p_of_c * self.log_p_of_c self.loglik = tf.reduce_sum( self.loglik_matrix, name = self.name+"_loglik" ) if as_matrix is True: return self.loglik_matrix else: return self.loglik class EntropySoftmaxModelLayer2(SoftmaxModelLayer): def LogLikelihood( self, X, as_matrix = False, boolean_mask = None ): if boolean_mask is None: self.loglik_matrix = tf.square( self.p_of_c_no_bias - 1.0/31 ) #self.loglik_matrix = self.p_of_c * self.log_p_of_c else: self.loglik_matrix = tf.square( self.p_of_c_no_bias - 1.0/31 ) #self.loglik_matrix = self.p_of_c * self.log_p_of_c self.loglik = tf.reduce_sum( self.loglik_matrix, name = self.name+"_loglik" ) if as_matrix is True: return self.loglik_matrix else: return self.loglik
36.863996
179
0.612872
11,086
79,147
4.147574
0.034277
0.029252
0.010352
0.013158
0.808025
0.770987
0.737777
0.705198
0.687081
0.667747
0
0.019229
0.267376
79,147
2,147
180
36.863996
0.773735
0.180361
0
0.660889
0
0
0.025651
0.000325
0
0
0
0
0.027129
0
null
null
0.006782
0.006782
null
null
0.011304
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
1
0
0
0
0
0
0
0
0
6
b669bef9916cc3489c4b4c88371b14f8555edcb6
2,254
py
Python
DFS_generator/Controls.py
AGH-Narzedzia-Informatyczne/Project_Labyrinth
317f744500fb73f9b8961ec725904cae00aadb92
[ "MIT" ]
1
2020-12-16T14:32:23.000Z
2020-12-16T14:32:23.000Z
DFS_generator/Controls.py
Pandoors/Project_Labyrinth
317f744500fb73f9b8961ec725904cae00aadb92
[ "MIT" ]
5
2020-11-22T19:34:42.000Z
2020-12-10T23:57:38.000Z
DFS_generator/Controls.py
Pandoors/Project_Labyrinth
317f744500fb73f9b8961ec725904cae00aadb92
[ "MIT" ]
5
2020-12-16T14:31:48.000Z
2020-12-16T14:32:17.000Z
import pygame import DFS_generator.mazeGenerator as mazeGenerator def changePos(k1, k2, maze): if (k1 == pygame.K_UP and k2 == pygame.K_RIGHT) or (k2 == pygame.K_UP and k1 == pygame.K_RIGHT): print("NE") if mazeGenerator.NE not in maze.player_cell.walls: for c in maze.neighbours(maze.player_cell): if maze.player_cell.wall_to(c) == mazeGenerator.NE: maze.player_cell = c break elif k1 == pygame.K_RIGHT and k2 == pygame.K_RIGHT: print("E") if mazeGenerator.E not in maze.player_cell.walls: for c in maze.neighbours(maze.player_cell): if maze.player_cell.wall_to(c) == mazeGenerator.E: maze.player_cell = c break elif (k1 == pygame.K_DOWN and k2 == pygame.K_RIGHT) or (k2 == pygame.K_DOWN and k1 == pygame.K_RIGHT): print("SE") if mazeGenerator.SE not in maze.player_cell.walls: for c in maze.neighbours(maze.player_cell): if maze.player_cell.wall_to(c) == mazeGenerator.SE: maze.player_cell = c break elif (k1 == pygame.K_DOWN and k2 == pygame.K_LEFT) or (k2 == pygame.K_DOWN and k1 == pygame.K_LEFT): print("SW") if mazeGenerator.SW not in maze.player_cell.walls: for c in maze.neighbours(maze.player_cell): if maze.player_cell.wall_to(c) == mazeGenerator.SW: maze.player_cell = c break elif k1 == pygame.K_LEFT and k2 == pygame.K_LEFT: print("W") if mazeGenerator.W not in maze.player_cell.walls: for c in maze.neighbours(maze.player_cell): if maze.player_cell.wall_to(c) == mazeGenerator.W: maze.player_cell = c break elif (k1 == pygame.K_UP and k2 == pygame.K_LEFT) or (k2 == pygame.K_UP and k1 == pygame.K_LEFT): print("NW") if mazeGenerator.NW not in maze.player_cell.walls: for c in maze.neighbours(maze.player_cell): if maze.player_cell.wall_to(c) == mazeGenerator.NW: maze.player_cell = c break
33.641791
106
0.568323
311
2,254
3.954984
0.122187
0.195122
0.273171
0.058537
0.821951
0.778862
0.747967
0.747967
0.737398
0.538211
0
0.014599
0.331411
2,254
66
107
34.151515
0.801593
0
0
0.4
0
0
0.004439
0
0
0
0
0
0
1
0.022222
false
0
0.044444
0
0.066667
0.133333
0
0
0
null
0
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b66c421f942cee25d63e89240ef292e8ae582d0c
116
py
Python
djangae/test_runner.py
benvand/djangae
7b186fbe6952c5ae0afe5eb8258516c35760f96d
[ "BSD-3-Clause" ]
null
null
null
djangae/test_runner.py
benvand/djangae
7b186fbe6952c5ae0afe5eb8258516c35760f96d
[ "BSD-3-Clause" ]
null
null
null
djangae/test_runner.py
benvand/djangae
7b186fbe6952c5ae0afe5eb8258516c35760f96d
[ "BSD-3-Clause" ]
null
null
null
from django.test.simple import DjangoTestSuiteRunner class DjangaeTestSuiteRunner(DjangoTestSuiteRunner): pass
23.2
52
0.853448
10
116
9.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.103448
116
5
53
23.2
0.951923
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
b6a123615ec1f56e343c4784fac6733ad1ae088c
160
py
Python
Problems/Minimum and maximum/task.py
gabrielizalo/jetbrains-academy-python-coffee-machine
e22cb502f7998855ef4afbc4ef7ecb8226418225
[ "MIT" ]
null
null
null
Problems/Minimum and maximum/task.py
gabrielizalo/jetbrains-academy-python-coffee-machine
e22cb502f7998855ef4afbc4ef7ecb8226418225
[ "MIT" ]
null
null
null
Problems/Minimum and maximum/task.py
gabrielizalo/jetbrains-academy-python-coffee-machine
e22cb502f7998855ef4afbc4ef7ecb8226418225
[ "MIT" ]
null
null
null
number_1 = int(input()) number_2 = int(input()) if number_1 >= number_2: print(number_1) print(number_2) else: print(number_2) print(number_1)
16
24
0.6625
26
160
3.769231
0.307692
0.285714
0.244898
0.367347
0.387755
0
0
0
0
0
0
0.0625
0.2
160
9
25
17.777778
0.703125
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
6
fcdfa782e7c758bf0c346c1a8ea1a4823578f103
3,441
py
Python
PyAlgo4/src/UnionFind.py
QuDong/Algorithm4
c15c27653d860a1cd90a42cf97f7586ced12b48f
[ "MIT" ]
6
2017-07-07T08:10:42.000Z
2019-12-25T21:42:40.000Z
PyAlgo4/src/UnionFind.py
QuDong/Algorithm4
c15c27653d860a1cd90a42cf97f7586ced12b48f
[ "MIT" ]
null
null
null
PyAlgo4/src/UnionFind.py
QuDong/Algorithm4
c15c27653d860a1cd90a42cf97f7586ced12b48f
[ "MIT" ]
1
2021-08-22T06:43:47.000Z
2021-08-22T06:43:47.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on 22/4/2016 10:57 AM Author: Qu Dong """ class QuikFindUF(): def __init__(self, N): self.count = N self.parent = list(range(N)) def count(self): return self.count def find(self, p): self._validate(p) return self.parent[p] def _validate(self, p): N = len(self.parent) if p < 0 or p >= N: raise IndexError('Index {} is not between 0 and {}'.format(p, N - 1)) def connected(self, p, q): return self.find(p) == self.find(q) def union(self, p, q): p_par = self.parent[p] q_par = self.parent[q] if p_par == q_par: return for i, par in enumerate(self.parent): if par == p_par: # 如果这个数的爸爸和P的爸爸相等,那么Q的爸爸就变成了这个数的爸爸 self.parent[i] = q_par self.count -= 1 class QuickUnionUF(): def __init__(self, N): self.count = N self.parent = list(range(N)) def count(self): return self.count def find(self, p): # return the root of p self._validate(p) while p != self.parent[p]: p = self.parent[p] return p def _validate(self, p): N = len(self.parent) if p < 0 or p >= N: raise IndexError('Index {} is not between 0 and {}'.format(p, N - 1)) def connected(self, p, q): return self.find(p) == self.find(q) def union(self, p, q): p_root = self.find(p) q_root = self.find(q) if p_root == q_root: return self.parent[p_root] = q_root self.count -= 1 class WeightedQuickUnionUF(): def __init__(self, N): self.count = N self.parent = list(range(N)) self.size = [1] * N def count(self): return self.count def find(self, p): self._validate(p) while p != self.parent[p]: p = self.parent[p] return p def _validate(self, p): N = len(self.parent) if p < 0 or p >= N: raise IndexError('Index {} is not between 0 and {}'.format(p, N - 1)) def connected(self, p, q): return self.find(p) == self.find(q) def union(self, p, q): p_root = self.find(p) q_root = self.find(q) if p_root == q_root: return if self.size[p_root] < self.size[q_root]: self.parent[p_root] = q_root self.size[q_root] += self.size[p_root] else: self.parent[q_root] = p_root self.size[p_root] += self.size[q_root] self.count -= 1 if __name__ == "__main__": # uf = WeightedQuickUnionUF(10) # uf = QuickUnionUF(10) uf = QuikFindUF(10) uf.union(6, 9) print(' '.join([str(i) for i in uf.parent])) uf.union(8, 2) print(' '.join([str(i) for i in uf.parent])) uf.union(5, 9) print(' '.join([str(i) for i in uf.parent])) uf.union(0, 6) print(' '.join([str(i) for i in uf.parent])) uf.union(9, 1) print(' '.join([str(i) for i in uf.parent])) uf.union(5, 4) print(' '.join([str(i) for i in uf.parent])) uf.union(3, 7) print(' '.join([str(i) for i in uf.parent])) uf.union(8, 7) print(' '.join([str(i) for i in uf.parent])) uf.union(4, 3) print(' '.join([str(i) for i in uf.parent])) print(uf.count, "Components") print(' '.join([str(i) for i in uf.parent]))
25.87218
81
0.527172
524
3,441
3.362595
0.145038
0.102157
0.068104
0.07378
0.762202
0.748014
0.740636
0.715664
0.715664
0.650965
0
0.020896
0.318512
3,441
132
82
26.068182
0.73049
0.05667
0
0.72
0
0
0.038354
0
0
0
0
0
0
1
0.18
false
0
0
0.06
0.33
0.11
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
1e636172e223fdc1a10ed1f86beeb2c089a9b7dd
104
py
Python
yolox_backbone/utils/utils.py
developer0hye/YOLOX-Backbone
83c4c2d7eff2dafb6aaffcc59bdce10b8e209fb4
[ "Apache-2.0" ]
20
2021-08-13T05:02:00.000Z
2022-03-11T07:53:18.000Z
yolox_backbone/utils/utils.py
developer0hye/YOLOX-Backbone
83c4c2d7eff2dafb6aaffcc59bdce10b8e209fb4
[ "Apache-2.0" ]
1
2021-09-15T12:00:32.000Z
2021-09-16T22:21:23.000Z
yolox_backbone/utils/utils.py
developer0hye/YOLOX-Backbone
83c4c2d7eff2dafb6aaffcc59bdce10b8e209fb4
[ "Apache-2.0" ]
4
2021-08-21T03:51:28.000Z
2021-11-01T07:46:00.000Z
from urllib import request def download_from_url(url, filename): request.urlretrieve(url, filename)
26
38
0.798077
14
104
5.785714
0.642857
0.271605
0
0
0
0
0
0
0
0
0
0
0.125
104
4
38
26
0.89011
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
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
6
94b05390d8c76ae881ff071f86a7ac7a273329b7
198
py
Python
ViNLP/datasets/base_dataset.py
hieunguyen1053/ViNLP
bce9a1d146be720f1cc41849ca38fefea1d65254
[ "Apache-2.0" ]
2
2021-07-15T12:54:07.000Z
2021-07-23T06:18:38.000Z
ViNLP/datasets/base_dataset.py
hieunguyen1053/ViNLP
bce9a1d146be720f1cc41849ca38fefea1d65254
[ "Apache-2.0" ]
5
2021-07-23T11:09:28.000Z
2021-08-02T02:13:17.000Z
ViNLP/datasets/base_dataset.py
hieunguyen1053/ViNLP
bce9a1d146be720f1cc41849ca38fefea1d65254
[ "Apache-2.0" ]
null
null
null
class BaseDataset: def __init__(self, data=list()): self.data = data def __getitem__(self, idx): return self.data[idx] def __len__(self): return len(self.data)
19.8
36
0.606061
25
198
4.32
0.44
0.296296
0
0
0
0
0
0
0
0
0
0
0.277778
198
9
37
22
0.755245
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0.285714
0.857143
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
94c18faf59f372b02b2051395080e1cd4a900bc9
135
py
Python
ivy_tests/test_ivy/test_functional/test_core/test_creation.py
SayanJerr/ivy
7b6ca2b45bae38d260accb6f82c69179519d65eb
[ "Apache-2.0" ]
null
null
null
ivy_tests/test_ivy/test_functional/test_core/test_creation.py
SayanJerr/ivy
7b6ca2b45bae38d260accb6f82c69179519d65eb
[ "Apache-2.0" ]
null
null
null
ivy_tests/test_ivy/test_functional/test_core/test_creation.py
SayanJerr/ivy
7b6ca2b45bae38d260accb6f82c69179519d65eb
[ "Apache-2.0" ]
null
null
null
from ... import helpers import ivy def test_eye(): # docstring test assert helpers.docstring_examples_run(ivy.eye) == True
13.5
58
0.703704
18
135
5.111111
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.2
135
9
59
15
0.851852
0.103704
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
94d1a07b0bc6557f1d370c1e33f2b03ffdf82612
28
py
Python
combo/blm/basis/__init__.py
zhangkunliang/BayesOptimization
6d78c9e9f96239b0dbb85650a0d878e9410158ec
[ "MIT" ]
139
2016-02-18T02:31:04.000Z
2022-02-18T10:38:06.000Z
combo/blm/basis/__init__.py
zhangkunliang/BayesOptimization
6d78c9e9f96239b0dbb85650a0d878e9410158ec
[ "MIT" ]
8
2016-04-18T08:10:44.000Z
2020-12-30T08:49:33.000Z
combo/blm/basis/__init__.py
zhangkunliang/BayesOptimization
6d78c9e9f96239b0dbb85650a0d878e9410158ec
[ "MIT" ]
50
2016-05-21T01:17:23.000Z
2022-02-18T01:27:41.000Z
from fourier import fourier
14
27
0.857143
4
28
6
0.75
0
0
0
0
0
0
0
0
0
0
0
0.142857
28
1
28
28
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
a2286fc0850b349d58a0c4ff43aac7de7b7fddb6
24
py
Python
pywick/models/segmentation/testnets/drnet/__init__.py
achaiah/pywick
9d663faf0c1660a9b8359a6472c164f658dfc8cb
[ "MIT" ]
408
2019-05-16T16:12:41.000Z
2022-03-26T17:27:12.000Z
pywick/models/segmentation/testnets/drnet/__init__.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
13
2019-05-17T05:47:06.000Z
2021-06-21T19:02:30.000Z
pywick/models/segmentation/testnets/drnet/__init__.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
42
2019-05-16T19:57:12.000Z
2022-03-06T15:23:18.000Z
from .drnet import DRNet
24
24
0.833333
4
24
5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.125
24
1
24
24
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
44a2765850dbf029f091c5c72a6f72e449ab3866
258
py
Python
application/core/factory/account_factory.py
yntonfon/dashboard-plus
1a4f2cf0c4d640f91d5c0aa974d0266552fb4e3d
[ "MIT" ]
null
null
null
application/core/factory/account_factory.py
yntonfon/dashboard-plus
1a4f2cf0c4d640f91d5c0aa974d0266552fb4e3d
[ "MIT" ]
4
2018-04-10T18:13:13.000Z
2018-05-15T15:53:13.000Z
application/core/factory/account_factory.py
yntonfon/dashboard-plus
1a4f2cf0c4d640f91d5c0aa974d0266552fb4e3d
[ "MIT" ]
null
null
null
from application.core.entity.account import Account from application.core.port.create_account_port import CreateAccountPort class AccountFactory(CreateAccountPort): def create_account(self, payload: dict) -> Account: return Account(**payload)
28.666667
71
0.794574
29
258
6.965517
0.551724
0.148515
0.188119
0
0
0
0
0
0
0
0
0
0.127907
258
8
72
32.25
0.897778
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
6
44fdad929b2fa7eaaff7f8b5b89aff78cd989c49
33
py
Python
odoo-13.0/venv/lib/python3.8/site-packages/PngImagePlugin.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
3
2015-11-20T08:44:42.000Z
2016-12-14T01:40:03.000Z
odoo-13.0/venv/lib/python3.8/site-packages/PngImagePlugin.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
1
2017-09-04T14:04:32.000Z
2020-05-26T19:04:00.000Z
odoo-13.0/venv/lib/python3.8/site-packages/PngImagePlugin.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
from PIL.PngImagePlugin import *
16.5
32
0.818182
4
33
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.931034
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
15256b7ebf72b5792943f519047995e3d2a0c22c
2,251
py
Python
tests/responses/test_streaming.py
alex-oleshkevich/kupala
2cbf566fb601631afc4fc1ec90384502ef546ce8
[ "MIT" ]
8
2021-05-26T00:17:21.000Z
2022-03-28T13:15:22.000Z
tests/responses/test_streaming.py
alex-oleshkevich/kupala
2cbf566fb601631afc4fc1ec90384502ef546ce8
[ "MIT" ]
10
2021-11-06T16:56:43.000Z
2022-03-28T13:15:02.000Z
tests/responses/test_streaming.py
alex-oleshkevich/kupala
2cbf566fb601631afc4fc1ec90384502ef546ce8
[ "MIT" ]
null
null
null
import asyncio import typing as t from kupala.application import Kupala from kupala.requests import Request from kupala.responses import StreamingResponse from kupala.testclient import TestClient def test_streaming_response_with_async_generator() -> None: async def numbers() -> t.AsyncGenerator[str, None]: for x in range(1, 5): yield str(x) await asyncio.sleep(0) def view(request: Request) -> StreamingResponse: return StreamingResponse(numbers()) app = Kupala() app.routes.add('/', view) client = TestClient(app) response = client.get('/') assert response.text == '1234' def test_streaming_response_with_sync_generator() -> None: def numbers() -> t.Generator[str, None, None]: for x in range(1, 5): yield str(x) def view(request: Request) -> StreamingResponse: return StreamingResponse(numbers()) app = Kupala() app.routes.add('/', view) client = TestClient(app) response = client.get('/') assert response.text == '1234' def test_streaming_response_with_filename() -> None: async def numbers() -> t.AsyncGenerator[str, None]: for x in range(1, 5): yield str(x) await asyncio.sleep(0) def view(request: Request) -> StreamingResponse: return StreamingResponse(numbers(), media_type='text/plain', file_name='numbers.txt') app = Kupala() app.routes.add('/', view) client = TestClient(app) response = client.get('/') assert response.text == '1234' assert response.headers['content-disposition'] == 'attachment; filename="numbers.txt"' def test_streaming_response_with_inline_disposition() -> None: async def numbers() -> t.AsyncGenerator[str, None]: for x in range(1, 5): yield str(x) await asyncio.sleep(0) def view(request: Request) -> StreamingResponse: return StreamingResponse(numbers(), media_type='text/plain', file_name='numbers.txt', inline=True) app = Kupala() app.routes.add('/', view) client = TestClient(app) response = client.get('/') assert response.text == '1234' assert response.headers['content-disposition'] == 'inline; filename="numbers.txt"'
29.233766
106
0.654376
265
2,251
5.471698
0.218868
0.057931
0.044138
0.066207
0.782759
0.744138
0.744138
0.744138
0.744138
0.744138
0
0.015315
0.216793
2,251
76
107
29.618421
0.807147
0
0
0.727273
0
0
0.074634
0.019547
0
0
0
0
0.109091
1
0.163636
false
0
0.109091
0.072727
0.345455
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
15490b60277a7c730f8645e422f923f1829b2b19
10,150
py
Python
tests/nea/test_nea.py
jonheng/sgnlp
aeee85b78de2e449ca1dc6b18686a060cb938d07
[ "MIT" ]
null
null
null
tests/nea/test_nea.py
jonheng/sgnlp
aeee85b78de2e449ca1dc6b18686a060cb938d07
[ "MIT" ]
null
null
null
tests/nea/test_nea.py
jonheng/sgnlp
aeee85b78de2e449ca1dc6b18686a060cb938d07
[ "MIT" ]
null
null
null
import unittest import pathlib import shutil import pytest import torch from transformers import PretrainedConfig from sgnlp.models.nea import ( NEAConfig, NEARegPoolingModel, NEARegModel, NEABiRegModel, NEABiRegPoolingModel, NEATokenizer, ) PARENT_DIR = pathlib.Path(__file__).parent class NEATest(unittest.TestCase): def setUp(self): self.config = NEAConfig self.reg_model = NEARegModel self.reg_pooling_model = NEARegPoolingModel self.bi_reg_model = NEABiRegModel self.bi_reg_pooling_model = NEABiRegPoolingModel self.model_input = torch.ones((2, 20)).int() self.model_input_with_label = { "input_ids": self.model_input, "labels": torch.tensor([1, 1]), } def test_config_can_be_init(self): config = self.config() self.assertIsNotNone(config) self.assertIsInstance(config, PretrainedConfig) self.assertEqual(config.vocab_size, 4000) self.assertEqual(config.embedding_dim, 50) self.assertEqual(config.dropout, 0.5) self.assertEqual(config.cnn_input_dim, 0) self.assertEqual(config.cnn_output_dim, 0) self.assertEqual(config.cnn_kernel_size, 0) self.assertEqual(config.cnn_padding, 0) self.assertEqual(config.rec_layer_type, "lstm") self.assertEqual(config.rec_input_dim, 50) self.assertEqual(config.rec_output_dim, 300) self.assertEqual(config.aggregation, "mot") self.assertEqual(config.linear_input_dim, 300) self.assertEqual(config.linear_output_dim, 1) self.assertEqual(config.skip_init_bias, False) self.assertEqual(config.loss_function, "mse") def test_reg_model_can_be_init(self): config = self.config() model = self.reg_model(config=config) self.assertIsNotNone(model) def test_reg_pooling_model_can_be_init(self): config = self.config() model = self.reg_pooling_model(config=config) self.assertIsNotNone(model) def test_bi_reg_model_can_be_init(self): config = self.config(linear_input_dim=600) model = self.bi_reg_model(config=config) self.assertIsNotNone(model) def test_bi_reg_pooling_model_can_be_init(self): config = self.config(linear_input_dim=600) model = self.bi_reg_pooling_model(config=config) self.assertIsNotNone(model) def test_reg_model_forward_pass(self): config = self.config() model = self.reg_model(config=config) output = model(self.model_input) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([2, 1])) output_with_label = model(**self.model_input_with_label) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([2, 1])) self.assertIsNotNone(output_with_label["loss"]) def test_reg_pooling_model_forward_pass(self): config = self.config() model = self.reg_pooling_model(config=config) output = model(self.model_input) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([2, 1])) output_with_label = model(**self.model_input_with_label) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([2, 1])) self.assertIsNotNone(output_with_label["loss"]) def test_bi_reg_model_forward_pass(self): config = self.config(linear_input_dim=600) model = self.bi_reg_model(config=config) output = model(self.model_input) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([2, 1])) output_with_label = model(**self.model_input_with_label) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([2, 1])) self.assertIsNotNone(output_with_label["loss"]) def test_bi_reg_pooling_model_forward_pass(self): config = self.config(linear_input_dim=600) model = self.bi_reg_pooling_model(config=config) output = model(self.model_input) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([2, 1])) output_with_label = model(**self.model_input_with_label) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([2, 1])) self.assertIsNotNone(output_with_label["loss"]) @pytest.mark.slow def test_from_pretrained(self): config = self.config.from_pretrained( "https://sgnlp.blob.core.windows.net/models/nea/config.json" ) model = self.reg_pooling_model.from_pretrained( "https://sgnlp.blob.core.windows.net/models/nea/pytorch_model.bin", config=config, ) output = model(self.model_input) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([2, 1])) output_with_label = model(**self.model_input_with_label) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([2, 1])) self.assertIsNotNone(output_with_label["loss"]) class NEAIntegrationTest(unittest.TestCase): def setUp(self): self.config = NEAConfig self.tokenizer = NEATokenizer self.vocab_path = PARENT_DIR / "test_data/vocab" self.reg_model = NEARegModel self.reg_pooling_model = NEARegPoolingModel self.bi_reg_model = NEABiRegModel self.bi_reg_pooling_model = NEABiRegPoolingModel # for initialising linear bias self.y_train = torch.Tensor([0.1, 0.2, 0.3, 0.4, 0.5]) # for loading embedding self.emb_matrix = torch.ones((4000, 50)) # train tokenizer to get the vocab artifacts train_path = str(PARENT_DIR / "test_data/train.tsv") vocab_dir = str(self.vocab_path) nea_tokenizer = NEATokenizer(train_file=train_path, train_vocab=True) nea_tokenizer.save_pretrained(vocab_dir) def test_reg_model_integration(self): config = self.config() model = self.reg_model(config=config) model.initialise_linear_bias(self.y_train) model.load_pretrained_embedding(self.emb_matrix) tokenizer = self.tokenizer.from_pretrained(self.vocab_path) inputs = tokenizer("this is a test", return_tensors="pt")["input_ids"] output = model(inputs) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([1, 1])) inputs_with_labels = {"input_ids": inputs, "labels": torch.Tensor([0.9])} output_with_label = model(**inputs_with_labels) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([1, 1])) self.assertIsNotNone(output_with_label["loss"]) def test_reg_pooling_model_integration(self): config = self.config() model = self.reg_pooling_model(config=config) model.initialise_linear_bias(self.y_train) model.load_pretrained_embedding(self.emb_matrix) tokenizer = self.tokenizer.from_pretrained(self.vocab_path) inputs = tokenizer("this is a test", return_tensors="pt")["input_ids"] output = model(inputs) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([1, 1])) inputs_with_labels = {"input_ids": inputs, "labels": torch.Tensor([0.9])} output_with_label = model(**inputs_with_labels) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([1, 1])) self.assertIsNotNone(output_with_label["loss"]) def test_bi_reg_model_integration(self): config = self.config(linear_input_dim=600) model = self.bi_reg_model(config=config) model.initialise_linear_bias(self.y_train) model.load_pretrained_embedding(self.emb_matrix) tokenizer = self.tokenizer.from_pretrained(self.vocab_path) inputs = tokenizer("this is a test", return_tensors="pt")["input_ids"] output = model(inputs) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([1, 1])) inputs_with_labels = {"input_ids": inputs, "labels": torch.Tensor([0.9])} output_with_label = model(**inputs_with_labels) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([1, 1])) self.assertIsNotNone(output_with_label["loss"]) def test_bi_reg_pooling_model_integration(self): config = self.config(linear_input_dim=600) model = self.bi_reg_pooling_model(config=config) model.initialise_linear_bias(self.y_train) model.load_pretrained_embedding(self.emb_matrix) tokenizer = self.tokenizer.from_pretrained(self.vocab_path) inputs = tokenizer("this is a test", return_tensors="pt")["input_ids"] output = model(inputs) self.assertIsInstance(output["logits"], torch.Tensor) self.assertEqual(output["logits"].shape, torch.Size([1, 1])) inputs_with_labels = {"input_ids": inputs, "labels": torch.Tensor([0.9])} output_with_label = model(**inputs_with_labels) self.assertIsInstance(output_with_label["logits"], torch.Tensor) self.assertEqual(output_with_label["logits"].shape, torch.Size([1, 1])) self.assertIsNotNone(output_with_label["loss"]) def tearDown(self) -> None: shutil.rmtree(self.vocab_path)
41.769547
81
0.687685
1,257
10,150
5.293556
0.10183
0.056808
0.081154
0.056808
0.816652
0.786895
0.778479
0.77367
0.77367
0.749324
0
0.01272
0.194483
10,150
242
82
41.942149
0.801125
0.009163
0
0.635897
0
0
0.058987
0
0
0
0
0
0.338462
1
0.087179
false
0.020513
0.035897
0
0.133333
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6