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
af3094c39337cc94b6cb5685b562a5ae963b20d3
80
py
Python
learnpythonthehardway/projects/ex48/tests/ex48_tests.py
resonanttoe/educationalstuff
e20f229cbf8f4dacef3f1f51127af251d9219a89
[ "Unlicense" ]
null
null
null
learnpythonthehardway/projects/ex48/tests/ex48_tests.py
resonanttoe/educationalstuff
e20f229cbf8f4dacef3f1f51127af251d9219a89
[ "Unlicense" ]
null
null
null
learnpythonthehardway/projects/ex48/tests/ex48_tests.py
resonanttoe/educationalstuff
e20f229cbf8f4dacef3f1f51127af251d9219a89
[ "Unlicense" ]
null
null
null
from nose.tools import * from ex48 import lexicon def test_directions(): pass
13.333333
24
0.775
12
80
5.083333
0.833333
0
0
0
0
0
0
0
0
0
0
0.029851
0.1625
80
5
25
16
0.880597
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
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
1
1
1
1
0
1
0
0
7
afb05b0d4b8ec4395e589dfb143e90ee26385bd4
1,147
py
Python
day06/Day6.py
EtherealFog/aoc2017
896b875780895b5014bd1cc6b3b65bf3e00fa07e
[ "MIT" ]
null
null
null
day06/Day6.py
EtherealFog/aoc2017
896b875780895b5014bd1cc6b3b65bf3e00fa07e
[ "MIT" ]
null
null
null
day06/Day6.py
EtherealFog/aoc2017
896b875780895b5014bd1cc6b3b65bf3e00fa07e
[ "MIT" ]
null
null
null
def a(mem): seen = set() tup = tuple(mem) count = 0 while tup not in seen: seen.add(tup) index = 0 max = 0 for i in range(len(mem)): n = mem[i] if(n > max): max = n index = i mem[index] = 0 index += 1 while(max > 0): mem[index%len(mem)] += 1 max -= 1 index += 1 count += 1 tup = tuple(mem) return count def b(mem): seen = [] tup = tuple(mem) count = 0 while tup not in seen: seen.append(tup) index = 0 max = 0 for i in range(len(mem)): n = mem[i] if(n > max): max = n index = i mem[index] = 0 index += 1 while(max > 0): mem[index%len(mem)] += 1 max -= 1 index += 1 count += 1 tup = tuple(mem) return count - seen.index(tup) with open("input.txt") as f: nums = [int(x.strip()) for x in f.read().split("\t")] print("Part A:", a(nums)) with open("input.txt") as f: nums = [int(x.strip()) for x in f.read().split("\t")] print("Part B:", b(nums))
20.482143
56
0.441151
170
1,147
2.976471
0.235294
0.063241
0.086957
0.063241
0.885375
0.885375
0.885375
0.885375
0.885375
0.885375
0
0.029326
0.405405
1,147
56
57
20.482143
0.71261
0
0
0.8
0
0
0.031386
0
0
0
0
0
0
1
0.04
false
0
0
0
0.08
0.04
0
0
0
null
0
0
0
1
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
7
afb2b52153a70ba458501fa384b4195a7d439e4b
100
py
Python
swinginghead/compiler/__init__.py
isidentical-archive/swinginghead
cabce05378ee8eea71afc98ff931e227cc55f7e8
[ "MIT" ]
8
2019-04-17T17:18:16.000Z
2019-04-21T20:37:47.000Z
swinginghead/compiler/__init__.py
isidentical/swinginghead
cabce05378ee8eea71afc98ff931e227cc55f7e8
[ "MIT" ]
null
null
null
swinginghead/compiler/__init__.py
isidentical/swinginghead
cabce05378ee8eea71afc98ff931e227cc55f7e8
[ "MIT" ]
null
null
null
from swinginghead.compiler.binder import Binder from swinginghead.compiler.compiler import Compiler
33.333333
51
0.88
12
100
7.333333
0.416667
0.363636
0.545455
0
0
0
0
0
0
0
0
0
0.08
100
2
52
50
0.956522
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
1
0
0
7
afb5a15640458fe892e1c29778ecb2af60ea6293
687
py
Python
imagepy/core/myvi/__init__.py
BioinfoTongLI/imagepy
b86f33f20e872ee8b86471a9ddfbd5ad064fd64d
[ "BSD-4-Clause" ]
23
2020-03-21T14:42:35.000Z
2022-03-20T11:09:37.000Z
imagepy/core/myvi/__init__.py
BioinfoTongLI/imagepy
b86f33f20e872ee8b86471a9ddfbd5ad064fd64d
[ "BSD-4-Clause" ]
2
2021-04-24T02:39:54.000Z
2021-09-12T11:39:08.000Z
imagepy/core/myvi/__init__.py
BioinfoTongLI/imagepy
b86f33f20e872ee8b86471a9ddfbd5ad064fd64d
[ "BSD-4-Clause" ]
4
2020-03-20T05:35:33.000Z
2021-08-22T06:21:42.000Z
''' As Mayavi is a little outdated, and not support wxphoenix So I wrote a simple one, and remove two a, M(a)y(a)vi.self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0)self.color = cs if isinstance(cs, tuple) else (0,0,0) ''' from .canvas3d import * from .frame3d import * from .manager import * from .util import *
85.875
531
0.703057
136
687
3.551471
0.25
0.074534
0.204969
0.242236
0.689441
0.689441
0.689441
0.689441
0.689441
0.689441
0
0.049488
0.147016
687
8
532
85.875
0.774744
0.857351
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
bb6235547777db3c7be0736cce10382aba1d030a
76
py
Python
Script/__init__.py
JamaSoftware/embedded-item-link-relationship-manager
b08964017f5413e57ba5382bde9f37134e8ccbbb
[ "MIT" ]
null
null
null
Script/__init__.py
JamaSoftware/embedded-item-link-relationship-manager
b08964017f5413e57ba5382bde9f37134e8ccbbb
[ "MIT" ]
null
null
null
Script/__init__.py
JamaSoftware/embedded-item-link-relationship-manager
b08964017f5413e57ba5382bde9f37134e8ccbbb
[ "MIT" ]
null
null
null
from Core import Config from Core import JamaClient from Core import Process
25.333333
27
0.855263
12
76
5.416667
0.5
0.369231
0.646154
0
0
0
0
0
0
0
0
0
0.144737
76
3
28
25.333333
1
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
1
0
0
7
bbc3e2756b809061f26354aacaa2a5b8cff7e706
174
py
Python
test/test_dancing_sentence.py
erichaase/topcoder-python
de285d8092a94f2ec1b5c0c33eba55b5c27a5390
[ "MIT" ]
1
2017-03-25T17:40:57.000Z
2017-03-25T17:40:57.000Z
test/test_dancing_sentence.py
erichaase/topcoder-python
de285d8092a94f2ec1b5c0c33eba55b5c27a5390
[ "MIT" ]
null
null
null
test/test_dancing_sentence.py
erichaase/topcoder-python
de285d8092a94f2ec1b5c0c33eba55b5c27a5390
[ "MIT" ]
null
null
null
from test.assert_json import assert_json from topcoder.dancing_sentence import solution def test_dancing_sentence (): assert_json('dancing_sentence', solution)
29
49
0.787356
22
174
5.909091
0.454545
0.230769
0
0
0
0
0
0
0
0
0
0
0.155172
174
5
50
34.8
0.884354
0
0
0
0
0
0.091954
0
0
0
0
0
0.5
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
1
0
1
0
0
8
a55506c4e8a9a454b334fcf74d5098e70df37320
2,154
py
Python
uniswap_digital_twin/suf_aux.py
BlockScience/uniswap_digital_twin
99ca1a96c4428e2b34b839eddc935603ce636849
[ "MIT" ]
1
2021-07-30T15:56:21.000Z
2021-07-30T15:56:21.000Z
uniswap_digital_twin/suf_aux.py
BlockScience/uniswap_digital_twin
99ca1a96c4428e2b34b839eddc935603ce636849
[ "MIT" ]
null
null
null
uniswap_digital_twin/suf_aux.py
BlockScience/uniswap_digital_twin
99ca1a96c4428e2b34b839eddc935603ce636849
[ "MIT" ]
null
null
null
from policy_aux import get_output_amount # RAI functions def mint_RAI(_params, substep, sH, s, _input): token_reserve = s['RAI_balance'] return ('RAI_balance', token_reserve + _input['token_deposit']) def removeLiquidity_RAI(_params, substep, sH, s, _input): token_reserve = s['RAI_balance'] return ('RAI_balance', token_reserve + _input['token_burn']) def ethToToken_RAI(_params, substep, sH, s, _input): delta_I = int(_input['eth_sold']) #amount of ETH being sold by the user I_t = s['ETH_balance'] O_t = s['RAI_balance'] if delta_I == 0: return ('RAI_balance', O_t) else: delta_O = get_output_amount(delta_I, I_t, O_t, _params) return ('RAI_balance', O_t - delta_O) def tokenToEth_RAI(_params, substep, sH, s, _input): delta_I = _input['tokens_sold'] #amount of tokens being sold by the user I_t = s['RAI_balance'] return ('RAI_balance', I_t + delta_I) # ETH functions def mint_ETH(_params, substep, sH, s, _input): eth_reserve = s['ETH_balance'] return ('ETH_balance', eth_reserve + _input['eth_deposit']) def removeLiquidity_ETH(_params, substep, sH, s, _input): eth_reserve = s['ETH_balance'] return ('ETH_balance', eth_reserve + _input['eth_burn']) def ethToToken_ETH(_params, substep, history, s, _input): delta_I = _input['eth_sold'] #amount of ETH being sold by the user I_t = s['ETH_balance'] return ('ETH_balance', I_t + delta_I) def tokenToEth_ETH(_params, substep, sH, s, _input): delta_I = _input['tokens_sold'] #amount of tokens being sold by the user O_t = s['ETH_balance'] I_t = s['RAI_balance'] if delta_I == 0: return ('ETH_balance', O_t) else: delta_O = get_output_amount(delta_I, I_t, O_t, _params) return ('ETH_balance', O_t - delta_O) # UNI functions def mint_UNI(_params, substep, sH, s, _input): total_liquidity = s['UNI_supply'] return ('UNI_supply', total_liquidity + _input['UNI_mint']) def removeLiquidity_UNI(_params, substep, sH, s, _input): total_liquidity = s['UNI_supply'] return ('UNI_supply', total_liquidity + _input['UNI_burn'])
30.338028
76
0.679666
326
2,154
4.107362
0.141104
0.097087
0.100822
0.107543
0.800597
0.747573
0.713966
0.713966
0.68708
0.646751
0
0.001151
0.193593
2,154
71
77
30.338028
0.769718
0.088672
0
0.4
0
0
0.182004
0
0
0
0
0
0
1
0.222222
false
0
0.022222
0
0.511111
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
a599b5912c975b490b9700e28fcd179d52392350
1,212
py
Python
taskit/application/reporters/state_reporter.py
MarlonIC/demo-clean-architecture-projects-tasks
86f5add11145ec31404b4d41cad0467e6e436f77
[ "MIT" ]
11
2018-06-06T03:07:35.000Z
2020-04-16T21:35:16.000Z
taskit/application/reporters/state_reporter.py
MarlonIC/demo-clean-architecture-projects-tasks
86f5add11145ec31404b4d41cad0467e6e436f77
[ "MIT" ]
2
2021-03-25T23:00:06.000Z
2021-06-02T00:28:30.000Z
taskit/application/reporters/state_reporter.py
MarlonIC/demo-clean-architecture-projects-tasks
86f5add11145ec31404b4d41cad0467e6e436f77
[ "MIT" ]
5
2020-06-24T02:22:08.000Z
2021-11-11T07:33:23.000Z
from abc import ABC, abstractmethod from typing import List, Dict class StateReporter(ABC): @abstractmethod def list_tasks(self, offset=0, limit=10) -> List[Dict[str, str]]: """List all the persisted tasks""" @abstractmethod def list_tasks_in_project(self, project_id: str) -> List[Dict[str, str]]: """List the tasks belonging the same project.""" @abstractmethod def list_tasks_in_stage(self, stage: str) -> List[Dict[str, str]]: """List the tasks belonging the same stage.""" @abstractmethod def list_projects(self, offset=0, limit=10) -> List[Dict[str, str]]: """List all the persisted projects""" class MemoryStateReporter(StateReporter): def list_tasks(self, offset=0, limit=10) -> List[Dict[str, str]]: """List all the persisted tasks""" def list_tasks_in_project(self, project_id: str) -> List[Dict[str, str]]: """List the tasks belonging the same project.""" def list_tasks_in_stage(self, stage: str) -> List[Dict[str, str]]: """List the tasks belonging the same stage.""" def list_projects(self, offset=0, limit=10) -> List[Dict[str, str]]: """List all the persisted projects"""
32.756757
77
0.658416
166
1,212
4.698795
0.168675
0.107692
0.112821
0.14359
0.820513
0.784615
0.784615
0.784615
0.784615
0.784615
0
0.012422
0.20297
1,212
36
78
33.666667
0.795031
0.238449
0
0.75
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0.125
0
0.75
0
0
0
0
null
0
0
0
1
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
1
0
0
0
0
1
0
0
9
a59e875f5c04de41b9e55db4e0be536aff70ca2a
672
py
Python
zzgui/qt5/widgets/__init__.py
AndreiPuchko/zzgui
294cb9ed14a52dc5a30e098613ad7aa72ce88d02
[ "Apache-2.0" ]
1
2021-11-25T09:52:28.000Z
2021-11-25T09:52:28.000Z
zzgui/qt5/widgets/__init__.py
AndreiPuchko/zzgui
294cb9ed14a52dc5a30e098613ad7aa72ce88d02
[ "Apache-2.0" ]
null
null
null
zzgui/qt5/widgets/__init__.py
AndreiPuchko/zzgui
294cb9ed14a52dc5a30e098613ad7aa72ce88d02
[ "Apache-2.0" ]
null
null
null
from zzgui.qt5.widgets import ( zzlabel, zzline, zzframe, zzcheck, zztoolbar, zztab, zztext, zzcode, zzbutton, zzrelation, zzradio, zzlookup, zzcombo, zztoolbutton, zzprogressbar, zzgrid, zzsheet, zzscroller, zzdate, zzspace, zzlist, zzspin, zzdoublespin, ) ( zzlabel, zzline, zzframe, zzcheck, zztoolbar, zztab, zztext, zzcode, zzbutton, zzrelation, zzradio, zzlookup, zzcombo, zztoolbutton, zzprogressbar, zzgrid, zzsheet, zzscroller, zzdate, zzspace, zzlist, zzspin, zzdoublespin, )
12.679245
31
0.566964
51
672
7.470588
0.54902
0.068241
0.104987
0.141732
0.934383
0.934383
0.934383
0.934383
0.934383
0.934383
0
0.002309
0.355655
672
52
32
12.923077
0.877598
0
0
0.92
0
0
0
0
0
0
0
0
0
1
0
true
0
0.02
0
0.02
0
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
0
8
3c6903ceccf4ffbb1a988e78bd26b31de5a1044c
7,679
py
Python
klejbenchmark_baselines/task.py
allegro/klejbenchmark-baselines
0d4358866ee65feaa72978c9eab519762bbfa833
[ "Apache-2.0" ]
14
2020-07-08T10:09:49.000Z
2021-11-07T15:37:38.000Z
klejbenchmark_baselines/task.py
allegro/klejbenchmark-baselines
0d4358866ee65feaa72978c9eab519762bbfa833
[ "Apache-2.0" ]
null
null
null
klejbenchmark_baselines/task.py
allegro/klejbenchmark-baselines
0d4358866ee65feaa72978c9eab519762bbfa833
[ "Apache-2.0" ]
3
2020-11-28T16:38:40.000Z
2021-08-14T14:44:58.000Z
import typing as t import numpy as np import pandas as pd from scipy.stats import spearmanr from sklearn.metrics import accuracy_score, f1_score from klejbenchmark_baselines.config import Config from klejbenchmark_baselines.metrics import weighted_mean_absolute_error class BaseTask: output_type = None train_file = None valid_file = None test_file = None def __init__(self, config: Config): self.config = config def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: raise NotImplementedError def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: raise NotImplementedError def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: raise NotImplementedError def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: raise NotImplementedError def parse_data(self, raw_data: pd.DataFrame, extract_target: bool = True) -> t.Dict[str, np.ndarray]: output = dict() output['sentence1'] = self.extract_sentence1(raw_data).astype(dtype=np.unicode_) sent2 = self.extract_sentence2(raw_data) output['sentence2'] = sent2.astype(dtype=np.unicode_) if sent2 is not None else None if extract_target: output['target'] = self.extract_target(raw_data).astype(dtype=np.unicode_) return output class NKJPNERTask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'dev.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['sentence'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return None def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['target'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'accuracy': accuracy_score(true, pred), } class CDSCETask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'dev.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['sentence_A'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return raw_data['sentence_B'].values def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['entailment_judgment'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'accuracy': accuracy_score(true, pred), } class CDSCRTask(BaseTask): output_type = 'regression' train_file = 'train.tsv' valid_file = 'dev.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['sentence_A'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return raw_data['sentence_B'].values def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['relatedness_score'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'spearman': spearmanr(a=pred, b=true)[0], } class CBDTask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'train.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['sentence'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return None def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['target'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'f1_score': f1_score(true, pred), } class PolEmoInTask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'dev.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['sentence'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return None def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['target'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'accuracy': accuracy_score(true, pred), } class PolEmoOutTask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'dev.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['sentence'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return None def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['target'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'accuracy': accuracy_score(true, pred), } class DYKTask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'train.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['question'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return raw_data['answer'].values def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['target'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'f1_score': f1_score(true, pred), } class PSCTask(BaseTask): output_type = 'classification' train_file = 'train.tsv' valid_file = 'train.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['extract_text'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return raw_data['summary_text'].values def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['label'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'f1_score': f1_score(true, pred), } class ARTask(BaseTask): output_type = 'regression' train_file = 'train.tsv' valid_file = 'dev.tsv' test_file = 'test_features.tsv' def extract_sentence1(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['text'].values def extract_sentence2(self, raw_data: pd.DataFrame) -> t.Optional[np.ndarray]: return None def extract_target(self, raw_data: pd.DataFrame) -> np.ndarray: return raw_data['rating'].values def compute_metrics(self, true: np.ndarray, pred: np.ndarray) -> t.Dict[str, float]: return { 'wmae': 1 - weighted_mean_absolute_error(true, pred)/4.0, } TASKS = { 'nkjp-ner': NKJPNERTask, 'cdsc-e': CDSCETask, 'cdsc-r': CDSCRTask, 'cbd': CBDTask, 'polemo2.0-in': PolEmoInTask, 'polemo2.0-out': PolEmoOutTask, 'dyk': DYKTask, 'psc': PSCTask, 'ar': ARTask, }
29.879377
92
0.663237
985
7,679
4.981726
0.11066
0.079886
0.069493
0.082128
0.801712
0.797228
0.781333
0.781333
0.781333
0.781333
0
0.00697
0.215262
7,679
256
93
29.996094
0.807335
0
0
0.644068
0
0
0.098971
0
0
0
0
0
0
1
0.237288
false
0
0.039548
0.20339
0.768362
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
1
0
0
0
1
1
0
0
9
3c7899f9bacf793baf214d77311e8f036989f354
85,444
py
Python
manuscript_code/regression_JAMES/experiments.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
8
2021-04-23T03:06:03.000Z
2022-01-03T08:36:32.000Z
manuscript_code/regression_JAMES/experiments.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
null
null
null
manuscript_code/regression_JAMES/experiments.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
4
2021-06-23T17:48:33.000Z
2022-01-02T04:10:37.000Z
"""Classification with abstention network architecture.""" import numpy as np np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning) __author__ = "Elizabeth A. Barnes and Randal J. Barnes" __date__ = "March 17, 2021" #---------------------------------------------------------------- def define_experiments(exp_name): exps = {# olsr 'olsr0': {'exp_name': 'olsr0', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'n_samples': [4000,1000],#noisy data, not noisy 'noise': [.5,.05], 'slope': [1.,.7], 'yint': [-2.,.6], 'x_sigma': [.25,.5], 'undersample': False, 'spinup': 0, 'hiddens': [5,5], 'lr_init': .0001, 'batch_size': 32, 'np_seed': 99, 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 225, 'n_coarse_epochs': 0, 'n_epochs': 1000, 'patience': 200, 'boxcox': False, 'ridge_param': 0., }, 'olsr1': {'exp_name': 'olsr1', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': np.nan, 'numClasses': 2, 'n_samples': [4000,1000],#noisy data, not noisy 'noise': [.5,.05], 'slope': [1.,.7], 'yint': [-2.,.6], 'x_sigma': [.25,.5], 'undersample': False, 'spinup': 0, 'hiddens': [5,5], 'lr_init': .0001, 'batch_size': 32, 'np_seed': 99, 'act_fun': 'relu', 'coarse_setpoint': .1, 'fixed_alpha': .1, 'n_spinup_epochs': 225, 'n_coarse_epochs': 0, 'n_epochs': 1000, 'patience': 200, 'boxcox': False, 'ridge_param': 0., }, #tranquilFOOr 'tranquilFOOr0': {'exp_name': 'tranquilFOOr0', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr1': {'exp_name': 'tranquilFOOr1', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, }, 'tranquilFOOr2': {'exp_name': 'tranquilFOOr2', 'loss': 'StandardMAE', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, }, 'tranquilFOOr3': {'exp_name': 'tranquilFOOr3', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, }, 'tranquilFOOr4': {'exp_name': 'tranquilFOOr4', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': True, }, 'tranquilFOOr5': {'exp_name': 'tranquilFOOr5', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 25, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .5, }, 'tranquilFOOr6': {'exp_name': 'tranquilFOOr6', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 25, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .5, }, 'tranquilFOOr7': {'exp_name': 'tranquilFOOr7', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 25, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .5, }, 'tranquilFOOr8': {'exp_name': 'tranquilFOOr8', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .15, }, 'tranquilFOOr9': {'exp_name': 'tranquilFOOr9', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .15, }, 'tranquilFOOr10': {'exp_name': 'tranquilFOOr10', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr11': {'exp_name': 'tranquilFOOr11', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .01, }, 'tranquilFOOr12': {'exp_name': 'tranquilFOOr12', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .05, }, 'tranquilFOOr13': {'exp_name': 'tranquilFOOr13', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr14': {'exp_name': 'tranquilFOOr14', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr15': {'exp_name': 'tranquilFOOr15', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr16': {'exp_name': 'tranquilFOOr16', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr17': {'exp_name': 'tranquilFOOr17', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 5, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr18': {'exp_name': 'tranquilFOOr18', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr19': {'exp_name': 'tranquilFOOr19', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .15, }, 'tranquilFOOr20': {'exp_name': 'tranquilFOOr20', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr21': {'exp_name': 'tranquilFOOr21', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr22': {'exp_name': 'tranquilFOOr22', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr23': {'exp_name': 'tranquilFOOr23', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 50_000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr24': {'exp_name': 'tranquilFOOr24', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr25': {'exp_name': 'tranquilFOOr25', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .15, }, 'tranquilFOOr26': {'exp_name': 'tranquilFOOr26', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .05, }, 'tranquilFOOr27': {'exp_name': 'tranquilFOOr27', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.25, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr28': {'exp_name': 'tranquilFOOr28', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.25, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr29': {'exp_name': 'tranquilFOOr29', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr30': {'exp_name': 'tranquilFOOr30', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr31': {'exp_name': 'tranquilFOOr31', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr32': {'exp_name': 'tranquilFOOr32', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr33': {'exp_name': 'tranquilFOOr33', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 5, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr34': {'exp_name': 'tranquilFOOr34', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 15000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr35': {'exp_name': 'tranquilFOOr35', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 15000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .15, }, 'tranquilFOOr36': {'exp_name': 'tranquilFOOr36', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.0, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'tranquilFOOr37': {'exp_name': 'tranquilFOOr37', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.0, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'tranquilFOOr38': {'exp_name': 'tranquilFOOr38', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.0, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .15, }, 'tranquilFOOr39': {'exp_name': 'tranquilFOOr39', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.0, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .2, }, 'tranquilFOOr40': {'exp_name': 'tranquilFOOr40', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .1, }, 'tranquilFOOr41': {'exp_name': 'tranquilFOOr41', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .1, }, 'tranquilFOOr42': {'exp_name': 'tranquilFOOr42', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.0, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .15, 'fixed_alpha': .1, }, 'tranquilFOOr43': {'exp_name': 'tranquilFOOr43', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 0.5, 'cutoff': 0.0, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .1, }, 'tranquilFOOr44': {'exp_name': 'tranquilFOOr44', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .05, }, 'tranquilFOOr45': {'exp_name': 'tranquilFOOr45', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .1, }, 'tranquilFOOr46': {'exp_name': 'tranquilFOOr46', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .05, }, 'tranquilFOOr47': {'exp_name': 'tranquilFOOr47', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': 1.0, 'cutoff': 0.5, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .1, }, # corruptInputs 'corruptInputsr0': {'exp_name': 'corruptInputsr0', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .0, }, 'corruptInputsr1': {'exp_name': 'corruptInputsr1', 'loss': 'StandardMAE', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 20, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, }, 'corruptInputsr2': {'exp_name': 'corruptInputsr2', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 25, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .5, }, 'corruptInputsr3': {'exp_name': 'corruptInputsr3', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 25, 'n_coarse_epochs': 10, 'n_epochs': 300, 'patience': 60, 'boxcox': False, 'ridge_param': .5, }, 'corruptInputsr4': {'exp_name': 'corruptInputsr4', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .3, }, 'corruptInputsr5': {'exp_name': 'corruptInputsr5', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, }, 'corruptInputsr6': {'exp_name': 'corruptInputsr6', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'corruptInputsr7': {'exp_name': 'corruptInputsr7', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 50_000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'corruptInputsr8': {'exp_name': 'corruptInputsr8', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .1, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'corruptInputsr9': {'exp_name': 'corruptInputsr9', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .05, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'corruptInputsr10': {'exp_name': 'corruptInputsr10', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .05, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, }, 'corruptInputsr11': {'exp_name': 'corruptInputsr11', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 5, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .1, }, 'corruptInputsr12': {'exp_name': 'corruptInputsr12', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .1, }, 'corruptInputsr13': {'exp_name': 'corruptInputsr13', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .1, }, 'corruptInputsr14': {'exp_name': 'corruptInputsr14', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .5, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .1, }, 'corruptInputsr15': {'exp_name': 'corruptInputsr15', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .05, }, 'corruptInputsr16': {'exp_name': 'corruptInputsr16', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .01, }, 'corruptInputsr17': {'exp_name': 'corruptInputsr17', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .001, }, 'corruptInputsr18': {'exp_name': 'corruptInputsr18', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .05, }, 'corruptInputsr19': {'exp_name': 'corruptInputsr19', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 15, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .0, }, 'corruptInputsr20': {'exp_name': 'corruptInputsr20', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .0, }, 'corruptInputsr21': {'exp_name': 'corruptInputsr21', 'loss': 'AbstentionLogLoss', 'updater': 'Colorado', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 5, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .0, }, 'corruptInputsr22': {'exp_name': 'corruptInputsr22', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .05, }, 'corruptInputsr23': {'exp_name': 'corruptInputsr23', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .1, 'fixed_alpha': .05, }, 'corruptInputsr24': {'exp_name': 'corruptInputsr24', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .05, }, 'corruptInputsr25': {'exp_name': 'corruptInputsr25', 'loss': 'AbstentionLogLoss', 'updater': 'Constant', 'nupd': 6, 'numClasses': 2, 'prNoise': .3, 'cutoff': np.nan, 'nSamples': 18000, 'undersample': False, 'hiddens': [50,25], 'lr_init': 0.0005, 'batch_size': 32, 'np_seed': 99, 'simple_data': '15x60', 'foo_region': 'nhENSO', 'act_fun': 'relu', 'coarse_setpoint': .1, 'n_spinup_epochs': 10, 'n_coarse_epochs': 0, 'n_epochs': 100, 'patience': 10, 'boxcox': False, 'ridge_param': .0, 'fixed_alpha': .01, }, } return exps[exp_name]
45.691979
91
0.286667
5,031
85,444
4.650765
0.037567
0.023335
0.03573
0.042226
0.872254
0.870374
0.870374
0.870374
0.867211
0.863407
0
0.093363
0.605508
85,444
1,869
92
45.716426
0.600795
0.002739
0
0.908257
0
0
0.243797
0
0
0
0
0
0
1
0.00054
false
0
0.00054
0
0.001619
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
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
8
3c81d02103c2b92d7909aa0a7c8759eae8cf6547
127
py
Python
tests/parser/aggregates.ordering.3.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/aggregates.ordering.3.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/aggregates.ordering.3.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
input = """ ok:- #count{V:b(V)}=X, not p(X). b(1). p(2). """ output = """ ok:- #count{V:b(V)}=X, not p(X). b(1). p(2). """
9.769231
33
0.401575
28
127
1.821429
0.392857
0.27451
0.313725
0.352941
0.784314
0.784314
0.784314
0.784314
0.784314
0.784314
0
0.038835
0.188976
127
12
34
10.583333
0.456311
0
0
0.8
0
0
0.755906
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
13
b1d516dff6a2ffc8f0c0d68d9b7a2073d547fef0
16,049
py
Python
thornode_client/thornode_client/api/pools_api.py
hoodieonwho/thorchain-python-client
fccfd66552e16bdab1dbb90b68022475c7a9693d
[ "MIT" ]
null
null
null
thornode_client/thornode_client/api/pools_api.py
hoodieonwho/thorchain-python-client
fccfd66552e16bdab1dbb90b68022475c7a9693d
[ "MIT" ]
null
null
null
thornode_client/thornode_client/api/pools_api.py
hoodieonwho/thorchain-python-client
fccfd66552e16bdab1dbb90b68022475c7a9693d
[ "MIT" ]
null
null
null
# coding: utf-8 """ THORChain API This documentation outlines the API for THORChain. NOTE: This document is a **work in progress**. # noqa: E501 OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from thornode_client.api_client import ApiClient class PoolsApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_a_liquidity_provider_of_a_pool(self, asset, address, **kwargs): # noqa: E501 """Get a liquidity provider of a pool # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_a_liquidity_provider_of_a_pool(asset, address, async_req=True) >>> result = thread.get() :param async_req bool :param str asset: The asset of the pool (required) :param str address: The address of the liquidity provider (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_a_liquidity_provider_of_a_pool_with_http_info(asset, address, **kwargs) # noqa: E501 else: (data) = self.get_a_liquidity_provider_of_a_pool_with_http_info(asset, address, **kwargs) # noqa: E501 return data def get_a_liquidity_provider_of_a_pool_with_http_info(self, asset, address, **kwargs): # noqa: E501 """Get a liquidity provider of a pool # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_a_liquidity_provider_of_a_pool_with_http_info(asset, address, async_req=True) >>> result = thread.get() :param async_req bool :param str asset: The asset of the pool (required) :param str address: The address of the liquidity provider (required) :return: object If the method is called asynchronously, returns the request thread. """ all_params = ['asset', 'address'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_a_liquidity_provider_of_a_pool" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'asset' is set if self.api_client.client_side_validation and ('asset' not in params or params['asset'] is None): # noqa: E501 raise ValueError("Missing the required parameter `asset` when calling `get_a_liquidity_provider_of_a_pool`") # noqa: E501 # verify the required parameter 'address' is set if self.api_client.client_side_validation and ('address' not in params or params['address'] is None): # noqa: E501 raise ValueError("Missing the required parameter `address` when calling `get_a_liquidity_provider_of_a_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'asset' in params: path_params['asset'] = params['asset'] # noqa: E501 if 'address' in params: path_params['address'] = params['address'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/thorchain/pool/{asset}/liquidity_provider/{address}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_a_pool(self, asset, **kwargs): # noqa: E501 """Get a pool # noqa: E501 Retrieve a liquidity pool with the given asset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_a_pool(asset, async_req=True) >>> result = thread.get() :param async_req bool :param str asset: The asset of the pool (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_a_pool_with_http_info(asset, **kwargs) # noqa: E501 else: (data) = self.get_a_pool_with_http_info(asset, **kwargs) # noqa: E501 return data def get_a_pool_with_http_info(self, asset, **kwargs): # noqa: E501 """Get a pool # noqa: E501 Retrieve a liquidity pool with the given asset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_a_pool_with_http_info(asset, async_req=True) >>> result = thread.get() :param async_req bool :param str asset: The asset of the pool (required) :return: object If the method is called asynchronously, returns the request thread. """ all_params = ['asset'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_a_pool" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'asset' is set if self.api_client.client_side_validation and ('asset' not in params or params['asset'] is None): # noqa: E501 raise ValueError("Missing the required parameter `asset` when calling `get_a_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'asset' in params: path_params['asset'] = params['asset'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/thorchain/pool/{asset}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_all_liquidity_providers_of_a_pool(self, asset, **kwargs): # noqa: E501 """Get all liquidity providers of a pool # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_liquidity_providers_of_a_pool(asset, async_req=True) >>> result = thread.get() :param async_req bool :param str asset: The asset of the pool (required) :return: list[object] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_all_liquidity_providers_of_a_pool_with_http_info(asset, **kwargs) # noqa: E501 else: (data) = self.get_all_liquidity_providers_of_a_pool_with_http_info(asset, **kwargs) # noqa: E501 return data def get_all_liquidity_providers_of_a_pool_with_http_info(self, asset, **kwargs): # noqa: E501 """Get all liquidity providers of a pool # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_liquidity_providers_of_a_pool_with_http_info(asset, async_req=True) >>> result = thread.get() :param async_req bool :param str asset: The asset of the pool (required) :return: list[object] If the method is called asynchronously, returns the request thread. """ all_params = ['asset'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_all_liquidity_providers_of_a_pool" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'asset' is set if self.api_client.client_side_validation and ('asset' not in params or params['asset'] is None): # noqa: E501 raise ValueError("Missing the required parameter `asset` when calling `get_all_liquidity_providers_of_a_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'asset' in params: path_params['asset'] = params['asset'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/thorchain/pool/{asset}/liquidity_providers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[object]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_all_the_liquidity_pools(self, **kwargs): # noqa: E501 """Get all the liquidity pools # noqa: E501 Retrieve all the liquidity pools from THORChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_the_liquidity_pools(async_req=True) >>> result = thread.get() :param async_req bool :return: list[object] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_all_the_liquidity_pools_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_all_the_liquidity_pools_with_http_info(**kwargs) # noqa: E501 return data def get_all_the_liquidity_pools_with_http_info(self, **kwargs): # noqa: E501 """Get all the liquidity pools # noqa: E501 Retrieve all the liquidity pools from THORChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_the_liquidity_pools_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[object] If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_all_the_liquidity_pools" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/thorchain/pools', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[object]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
38.672289
137
0.606704
1,896
16,049
4.863397
0.082278
0.052923
0.015942
0.031233
0.933413
0.929509
0.926581
0.911289
0.895022
0.892745
0
0.016983
0.306561
16,049
414
138
38.7657
0.811573
0.323883
0
0.78341
0
0
0.171986
0.05913
0
0
0
0
0
1
0.041475
false
0
0.018433
0
0.119816
0
0
0
0
null
0
0
0
1
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
7
b1fbc1f1fee7b80fcc174cea5d70f5ca2204eccc
65,298
py
Python
tests/v3_validation/cattlevalidationtest/core/test_github_auth.py
bmdepesa/validation-tests
23e7ab95ce76744483a0657f790b42a88a93436d
[ "Apache-2.0" ]
7
2015-11-18T17:43:08.000Z
2021-07-14T09:48:18.000Z
tests/v3_validation/cattlevalidationtest/core/test_github_auth.py
bmdepesa/validation-tests
23e7ab95ce76744483a0657f790b42a88a93436d
[ "Apache-2.0" ]
175
2015-07-09T18:41:24.000Z
2021-06-10T21:23:27.000Z
tests/v3_validation/cattlevalidationtest/core/test_github_auth.py
bmdepesa/validation-tests
23e7ab95ce76744483a0657f790b42a88a93436d
[ "Apache-2.0" ]
25
2015-08-08T04:54:24.000Z
2021-05-25T21:10:37.000Z
from common_fixtures import * # NOQA from selenium import webdriver from requests.auth import AuthBase from github import GitHub import requests import json if_test_github = pytest.mark.skipif( not os.environ.get('GITHUB_MAIN_USER') or not os.environ.get('GITHUB_MAIN_PASS') or not os.environ.get('GITHUB_USER_1') or not os.environ.get('GITHUB_USER_2') or not os.environ.get('GITHUB_PASS_1') or not os.environ.get('GITHUB_PASS_2') or not os.environ.get('GITHUB_ORG'), reason="None") if_do_key = pytest.mark.skipif( not os.environ.get('DIGITALOCEAN_KEY'), reason="Digital Ocean key is not set") GITHUB_CLIENT = None GITHUB_ADMIN_TOKEN = None GITHUB_USER1_TOKEN = None GITHUB_USER2_TOKEN = None CLIENT_ID = None CLIENT_SECRET = None class GithubAuth(AuthBase): def __init__(self, jwt, prj_id=None): # setup any auth-related data here self.jwt = jwt self.prj_id = prj_id def __call__(self, r): # modify and return the request r.headers['Authorization'] = 'Bearer ' + self.jwt if self.prj_id is not None: r.headers['X-API-Project-Id'] = self.prj_id return r def github_client(admin_client): key = admin_client.create_apiKey() admin_client.wait_success(key) gh_client = from_env(url=cattle_url(), access_key=key.publicValue, secret_key=key.secretValue) global GITHUB_CLIENT GITHUB_CLIENT = gh_client def idToMember(identity, role): return { 'externalId': identity.externalId, 'externalIdType': identity.externalIdType, 'role': role } def get_users_tokens(): user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') user2 = os.getenv('GITHUB_USER_2') pass2 = os.getenv('GITHUB_PASS_2') admin_name = os.getenv('GITHUB_MAIN_USER', None) admin_pass = os.getenv('GITHUB_MAIN_PASS', None) client_id = CLIENT_ID client_secret = CLIENT_SECRET data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret ) auth_url = cattle_url()[:-7] + 'v1-auth/config' r = requests.post(auth_url, data=json.dumps(data)) assert r.ok # Get tokens user1_token = get_authed_token(username=user1, password=pass1) user2_token = get_authed_token(username=user2, password=pass2) admin_token = get_authed_token(username=admin_name, password=admin_pass) assert admin_token is not None assert user1_token is not None assert user2_token is not None global GITHUB_ADMIN_TOKEN GITHUB_ADMIN_TOKEN = admin_token global GITHUB_USER1_TOKEN GITHUB_USER1_TOKEN = user1_token global GITHUB_USER2_TOKEN GITHUB_USER2_TOKEN = user2_token def get_authed_token(username=None, password=None): port = int(os.getenv('PHANTOMJS_WEBDRIVER_PORT', 4444)) phantom_bin = os.getenv('PHANTOMJS_BIN', '/usr/local/bin/phantomjs') driver = webdriver.PhantomJS( phantom_bin, port=port, service_args=['--load-images=yes']) driver.delete_all_cookies() max_wait = 60 driver.set_page_load_timeout(max_wait) driver.set_script_timeout(max_wait) driver.implicitly_wait(10) driver.set_window_size(1120, 550) # driver.get('{}logout'.format(cattle_url()[:-7])) time.sleep(10) try: driver.get('https://github.com/logout') driver.find_element_by_class_name('btn').click() except: pass rancher_url = cattle_url()[:-7] driver.get('https://github.com/login') driver.find_element_by_id('login_field').send_keys(username) driver.find_element_by_id('password').send_keys(password) driver.find_element_by_name('commit').click() driver.get(rancher_url) time.sleep(10) try: driver.find_element_by_class_name('btn-primary').click() time.sleep(10) driver.find_element_by_class_name('btn-primary').click() time.sleep(10) except: pass driver.get(cattle_url()) time.sleep(10) all_cookies = driver.get_cookies() token = all_cookies[1]['value'] return token def create_github_client(username=None, password=None, project_id=None, token=None): client = from_env(url=cattle_url(project_id=project_id), access_key=GITHUB_CLIENT._access_key, secret_key=GITHUB_CLIENT._secret_key) client.delete_by_id = delete_by_id assert client.valid() jwt = token client._access_key = None client._secret_key = None client._auth = GithubAuth(jwt, prj_id=project_id) client.reload_schema() assert client.valid() return client def get_github_config_data(username=None, client_id=None, secret_key=None, allowed_identities=[], enabled=True, access_mode="unrestricted"): data = { "accessMode": access_mode, "allowedIdentities": allowed_identities, "enabled": enabled, "githubConfig": { "clientId": client_id, "clientSecret": secret_key, "hostname": None, "links": None, "scheme": "https://", "type": "githubconfig", "actionLinks": None}, "provider": "githubconfig", "shibbolethConfig": {}, "type": "config" } return data def get_github_identites(ids): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') identities = [] gh = GitHub(username=main_user, password=main_pass) for id in ids: id_info = gh.users(id['name']).get() identity = { "role": None, "projectId": None, "profileUrl": id_info["html_url"], "profilePicture": id_info["avatar_url"], "name": id_info["name"], "login": id_info["name"], "id": "github_user:" + str(id_info["id"]), "type": "identity", "links": None, "baseType": "identity", "actionLinks": {}, "all": None, "externalId": str(id_info["id"]), "externalIdType": "github_user" } if id['type'] == 'org': identity["id"] = "github_org:" + str(id_info["id"]) identity["externalIdType"] = "github_org" identities.append(identity) return identities def create_oauth_app(github_oauth): username = os.getenv('GITHUB_MAIN_USER', None) password = os.getenv('GITHUB_MAIN_PASS', None) port = int(os.getenv('PHANTOMJS_WEBDRIVER_PORT', 4445)) phantom_bin = os.getenv('PHANTOMJS_BIN', '/usr/local/bin/phantomjs') driver = webdriver.PhantomJS(phantom_bin, port=port) driver.delete_all_cookies() max_wait = 60 driver.set_page_load_timeout(max_wait) driver.set_script_timeout(max_wait) driver.implicitly_wait(10) driver.set_window_size(1120, 550) driver.get('https://github.com/logout') try: driver.find_element_by_class_name('btn').click() except: pass driver.get('https://github.com/login') try: driver.find_element_by_id('login_field').send_keys(username) driver.find_element_by_id('password').send_keys(password) driver.find_element_by_name('commit').click() except: pass driver.get('https://github.com/settings/applications/new') time.sleep(10) inputs = driver.find_elements_by_class_name('form-control') inputs[2].send_keys(github_oauth) inputs[3].send_keys(cattle_url()[:-7]) inputs[5].send_keys(cattle_url()[:-7]) driver.find_elements_by_class_name('btn-primary')[0].click() time.sleep(10) try: client_id = driver.find_elements_by_xpath("//dd")[0].text client_secret = driver.find_elements_by_xpath("//dd")[1].text global CLIENT_ID CLIENT_ID = client_id global CLIENT_SECRET CLIENT_SECRET = client_secret except: pass @pytest.fixture(scope='session', autouse=True) def turn_on_off_github(admin_client, request): admin_name = os.getenv('GITHUB_MAIN_USER', None) github_oauth = 'rancher-' + random_str() create_oauth_app(github_oauth) github_client(admin_client) get_users_tokens() main_account = GITHUB_CLIENT.list_account(name=admin_name)[0] account = GITHUB_CLIENT.by_id("account", main_account.id) GITHUB_CLIENT.wait_success(account) GITHUB_CLIENT.update_by_id_account(account.id, kind='admin') def fin2(): auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(enabled=False) access_key = GITHUB_CLIENT._access_key secret_key = GITHUB_CLIENT._secret_key r = requests.post(auth_url, data=json.dumps(data), auth=(access_key, secret_key)) assert r.ok request.addfinalizer(fin2) # 1 @if_test_github def test_allow_any_github_user(admin_client): # Set option to allow any valid user client_id = CLIENT_ID client_secret = CLIENT_SECRET token = GITHUB_ADMIN_TOKEN cookies = dict(token=token) data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret ) auth_url = cattle_url()[:-7] + 'v1-auth/config' r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # Authenticate with any user user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) schemas = requests.get(cattle_url() + "schemas", cookies=cookies) assert schemas.status_code == 200 # 2 @if_test_github def test_restricted_github_user(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') user1 = os.getenv('GITHUB_USER_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET token = GITHUB_ADMIN_TOKEN cookies = dict(token=token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # Test with valid user user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) schemas = requests.get(cattle_url() + "schemas", cookies=cookies) assert schemas.status_code == 200 # Test with invalid user user2_token = GITHUB_USER2_TOKEN cookies = dict(token=user2_token) bad_auth = requests.get(cattle_url() + "schemas", cookies=cookies) assert bad_auth.status_code == 401 # 3 @if_test_github def test_restricted_github_org(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') org = os.getenv('GITHUB_ORG') client_id = CLIENT_ID client_secret = CLIENT_SECRET token = GITHUB_ADMIN_TOKEN cookies = dict(token=token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': org, 'type': 'org' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # Test with valid user user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) schemas = requests.get(cattle_url() + "schemas", cookies=cookies) assert schemas.status_code == 200 # Test with invalid user user2_token = GITHUB_USER2_TOKEN cookies = dict(token=user2_token) bad_auth = requests.get(cattle_url() + "schemas", cookies=cookies) assert bad_auth.status_code == 401 # 4 @if_test_github def test_restricted_github_user_with_new_env(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') user1 = os.getenv('GITHUB_USER_2') pass1 = os.getenv('GITHUB_PASS_2') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # test creation of new env with new valid user user1_token = GITHUB_USER2_TOKEN cookies = dict(token=user1_token) schemas = requests.get(cattle_url() + "schemas", cookies=cookies) assert schemas.status_code == 200 time.sleep(5) gh_client = create_github_client(username=user1, password=pass1, token=user1_token) projects = gh_client.list_project() found = False for project in projects: if project['name'] == user1 + "-Default": found = True break assert found # 5,6 @if_test_github def test_github_create_new_env_with_member(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'member') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # 7 @if_test_github def test_github_create_new_env_with_owner(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') user2 = os.getenv('GITHUB_USER_2') pass2 = os.getenv('GITHUB_PASS_2') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' }, { 'name': user2, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break user2_token = GITHUB_USER2_TOKEN user2_client = create_github_client(username=user2, password=pass2, token=user2_token) user2_identity = None for obj in user2_client.list_identity(): if obj.externalIdType == 'github_user': user2_identity = obj break members = [ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner') ] # Test creation of new new env project = main_client.create_project(members=members) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # Test adding new member using the new owner new_members = [ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner'), idToMember(user2_identity, 'owner') ] same_project = user1_client.by_id('project', project.id) same_project.setmembers(members=new_members) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None assert user2_client.by_id('project', project.id) is not None # 8 @if_test_github def test_github_create_new_env_with_org_member(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') org = os.getenv('GITHUB_ORG') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': org, 'type': 'org' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break members = [ idToMember(main_identity, 'owner'), { 'externalId': identities[1]['externalId'], 'externalIdType': identities[1]['externalIdType'], 'role': 'member' } ] # Test creation of new new env project = main_client.create_project(members=members) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) auth = requests.get(cattle_url() + "schemas", cookies=cookies) assert auth.status_code == 200 # 9 @if_test_github def test_github_create_new_env_with_org_owner(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') user2 = os.getenv('GITHUB_USER_2') pass2 = os.getenv('GITHUB_PASS_2') org = os.getenv('GITHUB_ORG') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user2, 'type': 'user' }, { 'name': org, 'type': 'org' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user2_token = GITHUB_USER2_TOKEN user2_client = create_github_client(username=user2, password=pass2, token=user2_token) user2_identity = None for obj in user2_client.list_identity(): if obj.externalIdType == 'github_user': user2_identity = obj break members = [ idToMember(main_identity, 'owner'), { 'externalId': identities[2]['externalId'], 'externalIdType': identities[2]['externalIdType'], 'role': 'owner' } ] # Test creation of new new env project = main_client.create_project(members=members) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None cookies = dict(token=user2_token) auth = requests.get(cattle_url() + "schemas", cookies=cookies) assert auth.status_code == 200 # Test adding new member using the new owner # user1 now can add users members.append(idToMember(user2_identity, 'owner')) same_project = user1_client.by_id('project', project.id) same_project.setmembers(members=members) assert main_client.by_id('project', project.id) is not None assert user2_client.by_id('project', project.id) is not None # 10 @if_test_github def test_github_change_member_to_owner(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'member') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # change user2 from member to owner new_members = [ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner') ] same_project = main_client.by_id('project', project.id) same_project.setmembers(members=new_members) # user2 has ability to manipulate the env new_members = [ idToMember(main_identity, 'member'), idToMember(user1_identity, 'owner') ] owner_project = user1_client.by_id('project', project.id) owner_project.setmembers(members=new_members) # 11 @if_test_github def test_github_change_owner_to_member(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # Test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # Change user1 from member to owner new_members = [ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'member') ] same_project = main_client.by_id('project', project.id) same_project.setmembers(members=new_members) # user1 can not manipulate the env new_members = [ idToMember(main_identity, 'member'), idToMember(user1_identity, 'owner') ] member_project = user1_client.by_id('project', project.id) try: member_project.setmembers(members=new_members) assert False except: assert True # 12 @if_test_github def test_github_remove_owner_from_env(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # Test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # Remove user2 from env new_members = [ idToMember(main_identity, 'owner') ] same_project = main_client.by_id('project', project.id) same_project.setmembers(members=new_members) # user1 can not access the env new_members = [ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner') ] try: same_project = user1_client.by_id('project', project.id) same_project.setmembers(members=new_members) assert False except: assert True # 13 @if_test_github def test_github_remove_member_from_env(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'member') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # remove user1 from env new_members = [ idToMember(main_identity, 'owner') ] same_project = main_client.by_id('project', project.id) same_project.setmembers(members=new_members) # user1 can not access the env new_members = [ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'owner') ] try: same_project = user1_client.by_id('project', project.id) same_project.setmembers(members=new_members) assert False except: assert True # 14,15 @if_test_github def test_github_activate_deactivate_env(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [{'name': main_user, 'type': 'user'}] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break # Test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None # Deactivate environment dec_project = main_client.by_id('project', project.id) dec_project.deactivate() dec_project = main_client.by_id('project', project.id) assert dec_project['state'] == 'inactive' # Activate environment back dec_project.activate() act_project = main_client.by_id('project', project.id) assert act_project['state'] == 'active' # 16 @if_test_github def test_github_remove_deactivated_env(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [{'name': main_user, 'type': 'user'}] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break # Test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None # Deactivate environment dec_project = main_client.by_id('project', project.id) dec_project.deactivate() dec_project = main_client.by_id('project', project.id) assert dec_project['state'] == 'inactive' # Remove environment main_client.delete(dec_project) time.sleep(5) project = main_client.by_id('project', project.id) assert project.state == 'purged' or project.state == 'removed' # 17,18 @if_test_github def test_github_activate_deactivate_account(admin_client): # turn_on_github_auth() main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # Test with valid user user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) schemas = requests.get(cattle_url() + "schemas", cookies=cookies) assert schemas.status_code == 200 main_client = create_github_client(username=main_user, password=main_pass, token=main_token) # Deactivate the user1 account user1_account = main_client.list_account(name=user1)[0] account = main_client.by_id("account", user1_account.id) account.deactivate() main_client.wait_success(account) cookies = dict(token=user1_token) bad_auth = requests.get(cattle_url() + "schemas", cookies=cookies) assert bad_auth.status_code == 401 # Active the user1 account account = main_client.by_id("account", user1_account.id) account.activate() main_client.wait_success(account) cookies = dict(token=user1_token) good_auth = requests.get(cattle_url() + "schemas", cookies=cookies) assert good_auth.status_code == 200 # 19 @if_test_github def test_github_purge_account(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user2 = os.getenv('GITHUB_USER_2') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user2, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) # Purge user2 account user2_account = main_client.list_account(name=user2)[0] account = main_client.by_id("account", user2_account.id) account.deactivate() main_client.wait_success(account) main_client.delete(account) account = main_client.wait_success(account) account.purge() main_client.wait_success(account) assert account.removed is not None # 23,24,25,26,27 @if_test_github def test_github_member_permissions(admin_client): # turn_on_github_auth() main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'member') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None # user1 can not change, remove, or add users new_members = [ idToMember(main_identity, 'member'), idToMember(user1_identity, 'owner') ] member_project = user1_client.by_id('project', project.id) try: member_project.setmembers(members=new_members) assert False except: assert True # user1 can't deactivate or remove environment try: dec_project = user1_client.by_id('project', project.id) dec_project.deactivate() dec_project = user1_client.by_id('project', project.id) assert dec_project['state'] == 'inactive' user1_client.delete(dec_project) time.sleep(5) project = user1_client.by_id('project', project.id) assert project.state == 'purged' or project.state == 'removed' assert False except: assert True # 28 @if_test_github def test_github_change_user_to_admin(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # Test with valid user user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) no_admin = requests.get(cattle_url()[:-7] + '/admin/processes', cookies=cookies) assert no_admin.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) # change account from user to admin user1_account = main_client.list_account(name=user1)[0] account = main_client.by_id("account", user1_account.id) main_client.wait_success(account) main_client.update_by_id_account(account.id, kind='admin') cookies = dict(token=user1_token) admin = requests.get(cattle_url()[:-7] + '/admin/processes', cookies=cookies) assert admin.ok # 29 @if_test_github def test_github_admin_list_all_env(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok # Test with valid user user1_token = GITHUB_USER1_TOKEN cookies = dict(token=user1_token) no_admin = requests.get(cattle_url()[:-7] + '/admin/processes', cookies=cookies) assert no_admin.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) # List all projects projects = main_client.list_project() # Create new project project = main_client.create_project() # change account from user to admin user1_account = main_client.list_account(name=user1)[0] account = main_client.by_id("account", user1_account.id) main_client.wait_success(account) main_client.update_by_id_account(account.id, kind='admin') cookies = dict(token=user1_token) admin = requests.get(cattle_url()[:-7] + '/admin/processes', cookies=cookies) assert admin.ok for project in projects: project_url = cattle_url() \ + "/projects/" + project.id + "/projectmembers" cookies = dict(token=user1_token) access = requests.get(project_url, cookies=cookies) assert access.ok # change account from admin to user user1_account = main_client.list_account(name=user1)[0] account = main_client.by_id("account", user1_account.id) main_client.wait_success(account) main_client.update_by_id_account(account.id, kind='user') # 30 @if_test_github @if_do_key def test_github_member_add_host(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env project = main_client.create_project(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'member') ]) GITHUB_CLIENT.wait_success(project) assert main_client.by_id('project', project.id) is not None assert user1_client.by_id('project', project.id) is not None user1_client = create_github_client(username=user1, password=pass1, token=user1_token, project_id=project.id) # Add new host host_list = \ add_digital_ocean_hosts( user1_client, 1) assert len(host_list) == 1 # Remove host host = host_list[0] deactivated_host = host.deactivate() user1_client.wait_success(deactivated_host) deactivated_host.remove() all_hosts = user1_client.list_host() for h in all_hosts: if h.hostname == host.hostname: assert False # 31 @if_test_github def test_github_create_new_env_with_restricted_member(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env default_prj_id = main_client.list_project(name=main_user+'-Default')[0].id default_project = main_client.by_id('project', default_prj_id) default_project.setmembers(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'restricted') ]) user1_client = create_github_client(username=user1, password=pass1, token=user1_token, project_id=default_prj_id) # Add new host with pytest.raises(AttributeError) as excinfo: host_list = \ add_digital_ocean_hosts( user1_client, 1) assert len(host_list) == 1 assert "object has no attribute" in str(excinfo.value) # 32 @if_test_github def test_github_create_service_with_restricted_member(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env default_prj_id = main_client.list_project(name=main_user+'-Default')[0].id default_project = main_client.by_id('project', default_prj_id) default_project.setmembers(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'restricted') ]) main_client = create_github_client(username=main_user, password=main_pass, token=main_token, project_id=default_prj_id) user1_client = create_github_client(username=user1, password=pass1, token=user1_token, project_id=default_prj_id) # Add new host hosts = user1_client.list_host( kind='docker', removed_null=True, state="active") if len(hosts) == 0: host_list = \ add_digital_ocean_hosts( main_client, 1) assert len(host_list) == 1 launch_config = {"image": TEST_IMAGE_UUID} scale = 1 create_env_and_svc(user1_client, launch_config, scale) # 33,34 @if_test_github def test_github_create_new_env_with_readonly_member(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' }, { 'name': user1, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="required") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break user1_token = GITHUB_USER1_TOKEN user1_client = create_github_client(username=user1, password=pass1, token=user1_token) user1_identity = None for obj in user1_client.list_identity(): if obj.externalIdType == 'github_user': user1_identity = obj break # test creation of new env default_prj_id = main_client.list_project(name=main_user+'-Default')[0].id default_project = main_client.by_id('project', default_prj_id) default_project.setmembers(members=[ idToMember(main_identity, 'owner'), idToMember(user1_identity, 'readonly') ]) user1_client = create_github_client(username=user1, password=pass1, token=user1_token, project_id=default_prj_id) main_client = create_github_client(username=main_user, password=main_pass, token=main_token, project_id=default_prj_id) # Add new host with pytest.raises(AttributeError) as excinfo: host_list = \ add_digital_ocean_hosts( user1_client, 1) assert len(host_list) == 1 assert "object has no attribute" in str(excinfo.value) with pytest.raises(AttributeError) as excinfo: launch_config = {"image": TEST_IMAGE_UUID} scale = 1 create_env_and_svc(user1_client, launch_config, scale) assert "object has no attribute" in str(excinfo.value) # Create service using main client launch_config = {"image": TEST_IMAGE_UUID} scale = 1 service, env = create_env_and_svc(main_client, launch_config, scale) # List service using user1 client service = user1_client.list_service(name=service.name, stackId=env.id, removed_null=True) assert len(service) == 1 # 35 @if_test_github def test_github_add_user_to_env_with_restricted_access(admin_client): main_user = os.getenv('GITHUB_MAIN_USER') main_pass = os.getenv('GITHUB_MAIN_PASS') user1 = os.getenv('GITHUB_USER_1') pass1 = os.getenv('GITHUB_PASS_1') client_id = CLIENT_ID client_secret = CLIENT_SECRET main_token = GITHUB_ADMIN_TOKEN cookies = dict(token=main_token) ids = [ { 'name': main_user, 'type': 'user' } ] identities = get_github_identites(ids) auth_url = cattle_url()[:-7] + 'v1-auth/config' data = get_github_config_data(username=None, client_id=client_id, secret_key=client_secret, allowed_identities=identities, enabled=True, access_mode="restricted") r = requests.post(auth_url, data=json.dumps(data), cookies=cookies) assert r.ok main_client = create_github_client(username=main_user, password=main_pass, token=main_token) main_identity = None for obj in main_client.list_identity(): if obj.externalIdType == 'github_user': main_identity = obj break # Remove user from all other environments for project in main_client.list_project(all=True): project = main_client.by_id('project', project.id) project.setmembers(members=[ idToMember(main_identity, 'owner') ]) user1_token = GITHUB_USER1_TOKEN ids = [ { 'name': user1, 'type': 'user' } ] user1_identity = get_github_identites(ids)[0] members = [ idToMember(main_identity, 'owner'), { 'externalId': user1_identity["externalId"], 'externalIdType': user1_identity["externalIdType"], 'role': "member" } ] project = main_client.create_project(members=members) GITHUB_CLIENT.wait_success(project) user1_client = create_github_client(username=user1, password=pass1, token=user1_token) assert user1_client.by_id('project', project.id) is not None for p in main_client.list_project(all=True): project_url = cattle_url(project_id=p.id) cookies = dict(token=user1_token) access = requests.get(project_url, cookies=cookies) if p.id != project.id: assert not access.ok else: assert access.ok
33.129376
78
0.586128
7,320
65,298
4.92377
0.043852
0.031352
0.036513
0.023084
0.872565
0.854947
0.834998
0.818906
0.797708
0.786832
0
0.014158
0.321802
65,298
1,970
79
33.146193
0.799706
0.027826
0
0.752322
0
0
0.079254
0.001514
0
0
0
0
0.063158
1
0.022291
false
0.0613
0.003715
0.000619
0.030341
0
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
8
5933a820d4ad274236f7ee8827fb25d3501fd85d
28,071
py
Python
UnityEngine/Material/__init__.py
Grim-es/udon-pie-auto-completion
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
[ "MIT" ]
null
null
null
UnityEngine/Material/__init__.py
Grim-es/udon-pie-auto-completion
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
[ "MIT" ]
null
null
null
UnityEngine/Material/__init__.py
Grim-es/udon-pie-auto-completion
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
[ "MIT" ]
null
null
null
from typing import overload from UdonPie import System from UdonPie import UnityEngine from UdonPie.Undefined import * class Material: def __new__(cls, arg1=None): ''' :returns: Material :rtype: UnityEngine.Material ''' pass @staticmethod def op_Implicit(arg1): ''' :param arg1: Object :type arg1: UnityEngine.Object :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def op_Equality(arg1, arg2): ''' :param arg1: Object :type arg1: UnityEngine.Object :param arg2: Object :type arg2: UnityEngine.Object :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def op_Inequality(arg1, arg2): ''' :param arg1: Object :type arg1: UnityEngine.Object :param arg2: Object :type arg2: UnityEngine.Object :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod @overload def SetTextureOffset(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Vector2 :type arg2: UnityEngine.Vector2 ''' pass @staticmethod @overload def SetTextureOffset(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Vector2 :type arg2: UnityEngine.Vector2 ''' pass @staticmethod def SetTextureOffset(arg1=None, arg2=None): pass @staticmethod @overload def SetTextureScale(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Vector2 :type arg2: UnityEngine.Vector2 ''' pass @staticmethod @overload def SetTextureScale(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Vector2 :type arg2: UnityEngine.Vector2 ''' pass @staticmethod def SetTextureScale(arg1=None, arg2=None): pass @staticmethod @overload def GetTextureOffset(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Vector2 :rtype: UnityEngine.Vector2 ''' pass @staticmethod @overload def GetTextureOffset(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Vector2 :rtype: UnityEngine.Vector2 ''' pass @staticmethod def GetTextureOffset(arg1=None): pass @staticmethod @overload def GetTextureScale(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Vector2 :rtype: UnityEngine.Vector2 ''' pass @staticmethod @overload def GetTextureScale(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Vector2 :rtype: UnityEngine.Vector2 ''' pass @staticmethod def GetTextureScale(arg1=None): pass @staticmethod @overload def SetFloat(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Single :type arg2: System.Single or float ''' pass @staticmethod @overload def SetFloat(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Single :type arg2: System.Single or float ''' pass @staticmethod def SetFloat(arg1=None, arg2=None): pass @staticmethod @overload def SetInt(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Int32 :type arg2: System.Int32 or int ''' pass @staticmethod @overload def SetInt(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Int32 :type arg2: System.Int32 or int ''' pass @staticmethod def SetInt(arg1=None, arg2=None): pass @staticmethod @overload def SetColor(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Color :type arg2: UnityEngine.Color ''' pass @staticmethod @overload def SetColor(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Color :type arg2: UnityEngine.Color ''' pass @staticmethod def SetColor(arg1=None, arg2=None): pass @staticmethod @overload def SetVector(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Vector4 :type arg2: UnityEngine.Vector4 ''' pass @staticmethod @overload def SetVector(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Vector4 :type arg2: UnityEngine.Vector4 ''' pass @staticmethod def SetVector(arg1=None, arg2=None): pass @staticmethod @overload def SetMatrix(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Matrix4x4 :type arg2: UnityEngine.Matrix4x4 ''' pass @staticmethod @overload def SetMatrix(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Matrix4x4 :type arg2: UnityEngine.Matrix4x4 ''' pass @staticmethod def SetMatrix(arg1=None, arg2=None): pass @staticmethod @overload def SetTexture(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Texture :type arg2: UnityEngine.Texture ''' pass @staticmethod @overload def SetTexture(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Texture :type arg2: UnityEngine.Texture ''' pass @staticmethod def SetTexture(arg1=None, arg2=None): pass @staticmethod @overload def SetBuffer(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: ComputeBuffer :type arg2: UnityEngine.ComputeBuffer ''' pass @staticmethod @overload def SetBuffer(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: ComputeBuffer :type arg2: UnityEngine.ComputeBuffer ''' pass @staticmethod def SetBuffer(arg1=None, arg2=None): pass @staticmethod @overload def SetFloatArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetFloatArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetFloatArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: SingleArray :type arg2: System.SingleArray ''' pass @staticmethod @overload def SetFloatArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: SingleArray :type arg2: System.SingleArray ''' pass @staticmethod def SetFloatArray(arg1=None, arg2=None): pass @staticmethod @overload def SetColorArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetColorArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetColorArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: ColorArray :type arg2: UnityEngine.ColorArray ''' pass @staticmethod @overload def SetColorArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: ColorArray :type arg2: UnityEngine.ColorArray ''' pass @staticmethod def SetColorArray(arg1=None, arg2=None): pass @staticmethod @overload def SetVectorArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetVectorArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetVectorArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Vector4Array :type arg2: UnityEngine.Vector4Array ''' pass @staticmethod @overload def SetVectorArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Vector4Array :type arg2: UnityEngine.Vector4Array ''' pass @staticmethod def SetVectorArray(arg1=None, arg2=None): pass @staticmethod @overload def SetMatrixArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetMatrixArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def SetMatrixArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Matrix4x4Array :type arg2: UnityEngine.Matrix4x4Array ''' pass @staticmethod @overload def SetMatrixArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Matrix4x4Array :type arg2: UnityEngine.Matrix4x4Array ''' pass @staticmethod def SetMatrixArray(arg1=None, arg2=None): pass @staticmethod @overload def GetFloat(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Single :rtype: System.Single ''' pass @staticmethod @overload def GetFloat(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Single :rtype: System.Single ''' pass @staticmethod def GetFloat(arg1=None): pass @staticmethod @overload def GetInt(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod @overload def GetInt(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod def GetInt(arg1=None): pass @staticmethod @overload def GetColor(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Color :rtype: UnityEngine.Color ''' pass @staticmethod @overload def GetColor(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Color :rtype: UnityEngine.Color ''' pass @staticmethod def GetColor(arg1=None): pass @staticmethod @overload def GetVector(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Vector4 :rtype: UnityEngine.Vector4 ''' pass @staticmethod @overload def GetVector(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Vector4 :rtype: UnityEngine.Vector4 ''' pass @staticmethod def GetVector(arg1=None): pass @staticmethod @overload def GetMatrix(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Matrix4x4 :rtype: UnityEngine.Matrix4x4 ''' pass @staticmethod @overload def GetMatrix(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Matrix4x4 :rtype: UnityEngine.Matrix4x4 ''' pass @staticmethod def GetMatrix(arg1=None): pass @staticmethod @overload def GetTexture(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Texture :rtype: UnityEngine.Texture ''' pass @staticmethod @overload def GetTexture(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Texture :rtype: UnityEngine.Texture ''' pass @staticmethod def GetTexture(arg1=None): pass @staticmethod @overload def GetFloatArray(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: SingleArray :rtype: System.SingleArray ''' pass @staticmethod @overload def GetFloatArray(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: SingleArray :rtype: System.SingleArray ''' pass @staticmethod @overload def GetFloatArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def GetFloatArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod def GetFloatArray(arg1=None, arg2=None): pass @staticmethod @overload def GetColorArray(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: ColorArray :rtype: UnityEngine.ColorArray ''' pass @staticmethod @overload def GetColorArray(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: ColorArray :rtype: UnityEngine.ColorArray ''' pass @staticmethod @overload def GetColorArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def GetColorArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod def GetColorArray(arg1=None, arg2=None): pass @staticmethod @overload def GetVectorArray(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Vector4Array :rtype: UnityEngine.Vector4Array ''' pass @staticmethod @overload def GetVectorArray(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Vector4Array :rtype: UnityEngine.Vector4Array ''' pass @staticmethod @overload def GetVectorArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def GetVectorArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod def GetVectorArray(arg1=None, arg2=None): pass @staticmethod @overload def GetMatrixArray(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Matrix4x4Array :rtype: UnityEngine.Matrix4x4Array ''' pass @staticmethod @overload def GetMatrixArray(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Matrix4x4Array :rtype: UnityEngine.Matrix4x4Array ''' pass @staticmethod @overload def GetMatrixArray(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod @overload def GetMatrixArray(arg1, arg2): ''' :param arg1: Int32 :type arg1: System.Int32 or int :param arg2: Undefined variable :type arg2: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod def GetMatrixArray(arg1=None, arg2=None): pass @staticmethod def get_shader(): ''' :returns: Shader :rtype: UnityEngine.Shader ''' pass @staticmethod def set_shader(arg1): ''' :param arg1: Shader :type arg1: UnityEngine.Shader ''' pass @staticmethod def get_color(): ''' :returns: Color :rtype: UnityEngine.Color ''' pass @staticmethod def set_color(arg1): ''' :param arg1: Color :type arg1: UnityEngine.Color ''' pass @staticmethod def get_mainTexture(): ''' :returns: Texture :rtype: UnityEngine.Texture ''' pass @staticmethod def set_mainTexture(arg1): ''' :param arg1: Texture :type arg1: UnityEngine.Texture ''' pass @staticmethod def get_mainTextureOffset(): ''' :returns: Vector2 :rtype: UnityEngine.Vector2 ''' pass @staticmethod def set_mainTextureOffset(arg1): ''' :param arg1: Vector2 :type arg1: UnityEngine.Vector2 ''' pass @staticmethod def get_mainTextureScale(): ''' :returns: Vector2 :rtype: UnityEngine.Vector2 ''' pass @staticmethod def set_mainTextureScale(arg1): ''' :param arg1: Vector2 :type arg1: UnityEngine.Vector2 ''' pass @staticmethod @overload def HasProperty(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod @overload def HasProperty(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def HasProperty(arg1=None): pass @staticmethod def get_renderQueue(): ''' :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod def set_renderQueue(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int ''' pass @staticmethod def EnableKeyword(arg1): ''' :param arg1: String :type arg1: System.String or str ''' pass @staticmethod def DisableKeyword(arg1): ''' :param arg1: String :type arg1: System.String or str ''' pass @staticmethod def IsKeywordEnabled(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def get_globalIlluminationFlags(): ''' :returns: MaterialGlobalIlluminationFlags :rtype: UnityEngine.MaterialGlobalIlluminationFlags ''' pass @staticmethod def set_globalIlluminationFlags(arg1): ''' :param arg1: MaterialGlobalIlluminationFlags :type arg1: UnityEngine.MaterialGlobalIlluminationFlags ''' pass @staticmethod def get_doubleSidedGI(): ''' :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def set_doubleSidedGI(arg1): ''' :param arg1: Boolean :type arg1: System.Boolean or bool ''' pass @staticmethod def get_enableInstancing(): ''' :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def set_enableInstancing(arg1): ''' :param arg1: Boolean :type arg1: System.Boolean or bool ''' pass @staticmethod def get_passCount(): ''' :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod def SetShaderPassEnabled(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Boolean :type arg2: System.Boolean or bool ''' pass @staticmethod def GetShaderPassEnabled(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def GetPassName(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: String :rtype: System.String ''' pass @staticmethod def FindPass(arg1): ''' :param arg1: String :type arg1: System.String or str :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod def SetOverrideTag(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: String :type arg2: System.String or str ''' pass @staticmethod @overload def GetTag(arg1, arg2, arg3): ''' :param arg1: String :type arg1: System.String or str :param arg2: Boolean :type arg2: System.Boolean or bool :param arg3: String :type arg3: System.String or str :returns: String :rtype: System.String ''' pass @staticmethod @overload def GetTag(arg1, arg2): ''' :param arg1: String :type arg1: System.String or str :param arg2: Boolean :type arg2: System.Boolean or bool :returns: String :rtype: System.String ''' pass @staticmethod def GetTag(arg1=None, arg2=None, arg3=None): pass @staticmethod def Lerp(arg1, arg2, arg3): ''' :param arg1: Material :type arg1: UnityEngine.Material :param arg2: Material :type arg2: UnityEngine.Material :param arg3: Single :type arg3: System.Single or float ''' pass @staticmethod def SetPass(arg1): ''' :param arg1: Int32 :type arg1: System.Int32 or int :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def CopyPropertiesFromMaterial(arg1): ''' :param arg1: Material :type arg1: UnityEngine.Material ''' pass @staticmethod def get_shaderKeywords(): ''' :returns: StringArray :rtype: System.StringArray ''' pass @staticmethod def set_shaderKeywords(arg1): ''' :param arg1: StringArray :type arg1: System.StringArray ''' pass @staticmethod @overload def GetTexturePropertyNames(): ''' :returns: StringArray :rtype: System.StringArray ''' pass @staticmethod @overload def GetTexturePropertyNames(arg1): ''' :param arg1: Undefined variable :type arg1: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod def GetTexturePropertyNames(arg1=None): pass @staticmethod @overload def GetTexturePropertyNameIDs(): ''' :returns: Int32Array :rtype: System.Int32Array ''' pass @staticmethod @overload def GetTexturePropertyNameIDs(arg1): ''' :param arg1: Undefined variable :type arg1: SystemCollectionsGenericList.SystemCollectionsGenericList ''' pass @staticmethod def GetTexturePropertyNameIDs(arg1=None): pass @staticmethod def GetInstanceID(): ''' :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod def GetHashCode(): ''' :returns: Int32 :rtype: System.Int32 ''' pass @staticmethod def Equals(arg1): ''' :param arg1: Object :type arg1: System.Object :returns: Boolean :rtype: System.Boolean ''' pass @staticmethod def get_name(): ''' :returns: String :rtype: System.String ''' pass @staticmethod def set_name(arg1): ''' :param arg1: String :type arg1: System.String or str ''' pass @staticmethod def ToString(): ''' :returns: String :rtype: System.String ''' pass @staticmethod def GetType(): ''' :returns: Type :rtype: System.Type ''' pass
21.444614
77
0.546258
2,476
28,071
6.180937
0.044426
0.151594
0.077757
0.130554
0.901137
0.867355
0.855659
0.804169
0.699621
0.585533
0
0.042374
0.364433
28,071
1,308
78
21.461009
0.815425
0.404688
0
0.839147
0
0
0
0
0
0
0
0
0
1
0.282946
false
0.294574
0.007752
0
0.292636
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
7
59436e193927616822088b57c9249e95a1de5479
9,908
py
Python
openfermioncirq/variational/ansatzes/low_rank_test.py
jarrodmcc/OpenFermion-Cirq
d0755e92e68c6de1b52f5004dc5a75b445f01349
[ "Apache-2.0" ]
null
null
null
openfermioncirq/variational/ansatzes/low_rank_test.py
jarrodmcc/OpenFermion-Cirq
d0755e92e68c6de1b52f5004dc5a75b445f01349
[ "Apache-2.0" ]
null
null
null
openfermioncirq/variational/ansatzes/low_rank_test.py
jarrodmcc/OpenFermion-Cirq
d0755e92e68c6de1b52f5004dc5a75b445f01349
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import cirq import openfermion from openfermioncirq.variational.ansatzes import LowRankTrotterAnsatz # 4-qubit LiH 2-2 with bond length 1.45 bond_length = 1.45 geometry = [('Li', (0., 0., 0.)), ('H', (0., 0., bond_length))] lih_hamiltonian = openfermion.load_molecular_hamiltonian( geometry, 'sto-3g', 1, format(bond_length), 2, 2) def test_low_rank_trotter_ansatz_params(): n = openfermion.count_qubits(lih_hamiltonian) final_rank = 2 ansatz = LowRankTrotterAnsatz( lih_hamiltonian, final_rank=final_rank, include_all_cz=True, include_all_z=True) assert len(list(ansatz.params())) == n + final_rank*(n + n*(n-1)//2) ansatz = LowRankTrotterAnsatz(lih_hamiltonian, final_rank=2) assert set(ansatz.params()) == { cirq.Symbol(name) for name in { 'U_0_0', 'U_0_0_0', 'U_0_1_0', 'U_1_0', 'U_1_0_0', 'U_1_1_0', 'U_2_0', 'U_2_0_0', 'U_2_1_0', 'U_3_0', 'U_3_0_0', 'U_3_1_0', 'V_0_1_0_0', 'V_0_1_1_0', 'V_0_2_0_0', 'V_0_2_1_0', 'V_0_3_0_0', 'V_0_3_1_0', 'V_1_2_0_0', 'V_1_2_1_0', 'V_1_3_0_0', 'V_1_3_1_0', 'V_2_3_0_0', 'V_2_3_1_0' } } def test_low_rank_trotter_ansatz_param_bounds(): ansatz = LowRankTrotterAnsatz(lih_hamiltonian, final_rank=2) assert ansatz.param_bounds() == [(-1.0, 1.0)] * len(list(ansatz.params())) def test_low_rank_trotter_ansatz_circuit(): ansatz = LowRankTrotterAnsatz(lih_hamiltonian, final_rank=2) circuit = ansatz.circuit cirq.DropNegligible().optimize_circuit(circuit) assert circuit.to_text_diagram(transpose=True).strip() == """ 0 1 2 3 │ │ │ │ Z Z Z Z │ │ │ │ │ YXXY────────#2^-1 │ │ │ │ │ YXXY──────#2^0.0813 │ │ │ │ │ │ Z^U_0_0 │ YXXY────────#2^-0.0813 │ │ │ │ │ YXXY────────#2^-1 │ │ │ │ │ │ Z^U_1_0 │ Z^U_3_0 │ │ │ │ │ │ Z^U_2_0 │ │ │ │ │ │ YXXY────────#2^-1 │ │ │ │ │ YXXY──────#2^-0.051 │ │ │ │ │ │ │ │ YXXY────────#2^0.051 │ │ │ │ │ YXXY────────#2^-1 │ │ │ │ │ @─────────@^V_0_1_0_0 │ │ │ │ │ │ ×─────────× @───────────@^V_2_3_0_0 │ │ │ │ │ │ ×───────────× │ │ │ │ │ @───────────@^V_0_3_0_0 │ │ │ │ │ │ ×───────────× │ │ │ │ │ @─────────@^V_1_3_0_0 @───────────@^V_0_2_0_0 │ │ │ │ ×─────────× ×───────────× │ │ │ │ Z^U_3_0_0 @───────────@^V_1_2_0_0 Z^U_0_0_0 │ │ │ │ │ ×───────────× │ │ │ │ │ │ Z^U_2_0_0 Z^U_1_0_0 │ │ │ │ │ │ Z Z │ │ │ │ │ │ #2──────────YXXY^-1 │ │ │ │ │ │ │ #2──────────YXXY^-0.95 │ │ │ │ #2────────YXXY^0.95 │ │ │ │ │ │ │ #2──────────YXXY^-1 │ │ │ │ │ │ │ @───────────@^V_0_1_1_0 │ │ │ │ @─────────@^V_2_3_1_0 ×───────────× │ │ │ │ ×─────────× │ │ │ │ │ │ │ @───────────@^V_0_3_1_0 │ │ │ │ │ │ ×───────────× │ │ │ │ │ @─────────@^V_0_2_1_0 @───────────@^V_1_3_1_0 │ │ │ │ ×─────────× ×───────────× │ │ │ │ Z^U_0_1_0 @───────────@^V_1_2_1_0 Z^U_3_1_0 │ │ │ │ │ ×───────────× │ │ │ │ │ │ Z^U_1_1_0 Z^U_2_1_0 │ │ │ │ │ │ Z Z │ │ │ │ │ │ YXXY────────#2^-1 │ │ │ │ │ YXXY──────#2^-0.918 │ │ │ │ │ │ │ │ YXXY────────#2^0.918 │ │ │ │ │ YXXY────────#2^-1 │ │ │ │ │ """.strip() ansatz = LowRankTrotterAnsatz( lih_hamiltonian, final_rank=1, include_all_cz=True, include_all_z=True, iterations=2) circuit = ansatz.circuit cirq.DropNegligible().optimize_circuit(circuit) assert circuit.to_text_diagram(transpose=True).strip() == """ 0 1 2 3 │ │ │ │ Z Z Z Z │ │ │ │ │ YXXY─────────#2^-1 │ │ │ │ │ YXXY──────#2^0.0813 │ │ │ │ │ │ Z^U_0_0 │ YXXY────────#2^-0.0813 │ │ │ │ │ YXXY─────────#2^-1 │ │ │ │ │ │ Z^U_1_0 │ Z^U_3_0 │ │ │ │ │ │ Z^U_2_0 │ │ │ │ │ │ YXXY─────────#2^-1 │ │ │ │ │ YXXY──────#2^-0.051 │ │ │ │ │ │ │ │ YXXY────────#2^0.051 │ │ │ │ │ YXXY─────────#2^-1 │ │ │ │ │ @─────────@^V_0_1_0_0 │ │ │ │ │ │ ×─────────× @───────────@^V_2_3_0_0 │ │ │ │ │ │ ×───────────× │ │ │ │ │ @────────────@^V_0_3_0_0 │ │ │ │ │ │ ×────────────× │ │ │ │ │ @─────────@^V_1_3_0_0 @───────────@^V_0_2_0_0 │ │ │ │ ×─────────× ×───────────× │ │ │ │ Z^U_3_0_0 @────────────@^V_1_2_0_0 Z^U_0_0_0 │ │ │ │ Z ×────────────× Z │ │ │ │ │ Z^U_2_0_0 Z^U_1_0_0 │ │ │ │ │ │ #2───────────YXXY^-1 │ │ │ │ │ │ │ #2──────────YXXY^0.132 │ │ │ │ #2────────YXXY^-0.132 │ Z │ │ │ │ │ #2───────────YXXY^-1 │ │ │ │ │ Z │ Z │ │ │ │ │ │ Z │ │ │ │ │ │ │ #2───────────YXXY^-1 │ │ │ │ │ │ │ #2──────────YXXY^0.0813 │ │ │ │ #2────────YXXY^-0.0813 │ Z^U_0_1 │ │ │ │ │ #2───────────YXXY^-1 │ │ │ │ │ Z^U_3_1 │ Z^U_1_1 │ │ │ │ │ │ Z^U_2_1 │ │ │ │ │ │ │ #2───────────YXXY^-1 │ │ │ │ │ │ │ #2──────────YXXY^-0.051 │ │ │ │ #2────────YXXY^0.051 │ │ │ │ │ │ │ #2───────────YXXY^-1 │ │ │ │ │ │ │ @───────────@^V_0_1_0_1 │ │ │ │ @─────────@^V_2_3_0_1 ×───────────× │ │ │ │ ×─────────× │ │ │ │ │ │ │ @────────────@^V_0_3_0_1 │ │ │ │ │ │ ×────────────× │ │ │ │ │ @─────────@^V_0_2_0_1 @───────────@^V_1_3_0_1 │ │ │ │ ×─────────× ×───────────× │ │ │ │ Z^U_0_0_1 @────────────@^V_1_2_0_1 Z^U_3_0_1 │ │ │ │ Z ×────────────× Z │ │ │ │ │ Z^U_1_0_1 Z^U_2_0_1 │ │ │ │ │ │ YXXY─────────#2^-1 │ │ │ │ │ YXXY──────#2^0.132 │ │ │ │ │ │ │ │ YXXY────────#2^-0.132 │ │ │ │ │ YXXY─────────#2^-1 │ │ │ │ │ """.strip() def test_swap_network_trotter_ansatz_default_initial_params_length(): ansatz = LowRankTrotterAnsatz(lih_hamiltonian) assert len(ansatz.default_initial_params()) == len(list(ansatz.params()))
37.108614
78
0.265644
1,441
9,908
2.593338
0.095767
0.223709
0.260102
0.246187
0.715012
0.668718
0.630987
0.598609
0.514049
0.504951
0
0.094164
0.53482
9,908
266
79
37.24812
0.409416
0.058034
0
0.729958
0
0
0.781498
0.079202
0
0
0
0
0.025316
1
0.016878
false
0
0.012658
0
0.029536
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
594f27f8236362ef83e3a3786c91cb306cbe6f07
30,437
py
Python
polynomials_on_simplices/polynomial/test/polynomials_unit_simplex_lagrange_basis_test.py
FAndersson/polynomials_on_simplices
f015a4772c817bfa99b0d6b726667a38a174b064
[ "MIT" ]
1
2021-03-17T11:41:21.000Z
2021-03-17T11:41:21.000Z
polynomials_on_simplices/polynomial/test/polynomials_unit_simplex_lagrange_basis_test.py
FAndersson/polynomials_on_simplices
f015a4772c817bfa99b0d6b726667a38a174b064
[ "MIT" ]
null
null
null
polynomials_on_simplices/polynomial/test/polynomials_unit_simplex_lagrange_basis_test.py
FAndersson/polynomials_on_simplices
f015a4772c817bfa99b0d6b726667a38a174b064
[ "MIT" ]
null
null
null
import sys import numpy as np import pytest import polynomials_on_simplices.algebra.multiindex as multiindex from polynomials_on_simplices.calculus.finite_difference import central_difference, central_difference_jacobian from polynomials_on_simplices.geometry.mesh.simplicial_complex import ( simplex_dimension, simplex_sub_simplices_fixed_dimension, simplex_vertices) from polynomials_on_simplices.geometry.primitives.simplex import cartesian_to_barycentric_unit, dimension, unit from polynomials_on_simplices.polynomial.polynomials_base import polynomials_equal from polynomials_on_simplices.polynomial.polynomials_monomial_basis import unique_identifier_monomial_basis from polynomials_on_simplices.polynomial.polynomials_unit_simplex_bernstein_basis import bernstein_basis_fn from polynomials_on_simplices.polynomial.polynomials_unit_simplex_lagrange_basis import ( PolynomialLagrange, dual_lagrange_basis_fn, dual_vector_valued_lagrange_basis, generate_lagrange_basis_fn_coefficients, generate_lagrange_point, generate_lagrange_points, get_associated_sub_simplex, get_dimension, lagrange_basis_fn, unique_identifier_lagrange_basis, unit_polynomial, vector_valued_lagrange_basis, zero_polynomial) from polynomials_on_simplices.probability_theory.uniform_sampling import nsimplex_sampling def test_lagrange_point_r0(): r = 0 expected_x = [ [0.0], [0.0, 0.0], [0.0, 0.0, 0.0], ] for n in [1, 2, 3]: nu = multiindex.generate(n, r, 0) x = generate_lagrange_point(n, r, nu) assert (x == expected_x[n - 1]).all() def test_lagrange_points_r0(): r = 0 expected_x = [ [0.0], [0.0, 0.0], [0.0, 0.0, 0.0], ] for n in [1, 2, 3]: x = generate_lagrange_points(n, r)[0] assert (x == expected_x[n - 1]).all() def test_generate_lagrange_basis_fn_coefficients(): coeffs = generate_lagrange_basis_fn_coefficients(1, 1) expected_coeffs = np.array([0.0, 1.0]) assert np.array_equal(expected_coeffs, coeffs) def test_call(): # Test calling a scalar valued univariate polynomial p = PolynomialLagrange([1, 1, 1], 2, 1) value = p(0.5) expected_value = 1 assert value == expected_value # Test calling a vector valued univariate polynomial p = PolynomialLagrange([[1, 1], [1, 1], [1, 1]], 2, 1) value = p(0.5) expected_value = np.array([1, 1]) assert np.linalg.norm(value - expected_value) < 1e-10 # Test calling a scalar valued bivariate polynomial p = PolynomialLagrange([1, 1, 1, 1, 1, 1], 2, 2) value = p([1 / 3, 1 / 3]) expected_value = 1 assert abs(value - expected_value) < 1e-12 # Test calling a vector valued bivariate polynomial p = PolynomialLagrange([[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]], 2, 2) value = p([1 / 3, 1 / 3]) expected_value = np.array([1, 1]) assert np.linalg.norm(value - expected_value) < 1e-10 def test_getitem(): # Test getting the components of a polynomial in P(R^m, R^n) for m in [1, 2, 3]: for n in [1, 2, 3]: r = 3 dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) p = PolynomialLagrange(a, r, m) for i in range(n): if n == 1: def pi_expected(x): return p(x) else: def pi_expected(x): return p(x)[i] assert polynomials_equal(p[i], pi_expected, r, m) def test_add(): # Test adding two polynomials in P(R^m, R^n) for m in [1, 2, 3]: for n in [1, 2, 3]: r = 3 dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) b = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) b = np.random.random_sample((dim, n)) p1 = PolynomialLagrange(a, r, m) p2 = PolynomialLagrange(b, r, m) def p_expected(x): return p1(x) + p2(x) assert polynomials_equal(p1 + p2, p_expected, r, m) # Test adding two polynomials in P(R^m, R^n) of different degree for m in [1, 2, 3]: for n in [1, 2, 3]: r1 = 2 r2 = 3 dim1 = get_dimension(r1, m) dim2 = get_dimension(r2, m) if n == 1: a = np.random.random_sample(dim1) b = np.random.random_sample(dim2) else: a = np.random.random_sample((dim1, n)) b = np.random.random_sample((dim2, n)) p1 = PolynomialLagrange(a, r1, m) p2 = PolynomialLagrange(b, r2, m) def p_expected(x): return p1(x) + p2(x) assert polynomials_equal(p1 + p2, p_expected, r, m) def test_sub(): # Test subtracting two polynomials in P(R^m, R^n) for m in [1, 2, 3]: for n in [1, 2, 3]: r = 3 dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) b = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) b = np.random.random_sample((dim, n)) p1 = PolynomialLagrange(a, r, m) p2 = PolynomialLagrange(b, r, m) def p_expected(x): return p1(x) - p2(x) assert polynomials_equal(p1 - p2, p_expected, r, m) # Test subtracting two polynomials in P(R^m, R^n) of different degree for m in [1, 2, 3]: for n in [1, 2, 3]: r1 = 2 r2 = 3 dim1 = get_dimension(r1, m) dim2 = get_dimension(r2, m) if n == 1: a = np.random.random_sample(dim1) b = np.random.random_sample(dim2) else: a = np.random.random_sample((dim1, n)) b = np.random.random_sample((dim2, n)) p1 = PolynomialLagrange(a, r1, m) p2 = PolynomialLagrange(b, r2, m) def p_expected(x): return p1(x) - p2(x) assert polynomials_equal(p1 - p2, p_expected, r, m) @pytest.mark.slow def test_mul(): # Test multiplying a polynomial in P(R^m, R^n) with a scalar for m in [1, 2, 3]: for n in [1, 2, 3]: r = 3 dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) s = np.random.rand() p = PolynomialLagrange(a, r, m) def p_expected(x): return s * p(x) assert polynomials_equal(s * p, p_expected, r, m) assert polynomials_equal(p * s, p_expected, r, m) # Test multiplying a polynomial in P(R^m) = P(R^m, R^1) with a vector for m in [1, 2, 3]: r = 3 dim = get_dimension(r, m) a = np.random.random_sample(dim) v = np.random.rand(2) p = PolynomialLagrange(a, r, m) def p_expected(x): return v * p(x) # Can't do this, because this will be handled by the Numpy ndarray __mul__ method and result in Numpy array # of polynomials # assert polynomials_equal(v * p, p_expected, r, m) assert polynomials_equal(p * v, p_expected, r, m) # Test multiplying two polynomials in P(R^m) = P(R^m, R^1) for m in [1, 2, 3]: r1 = 3 r2 = 2 dim1 = get_dimension(r1, m) a = np.random.random_sample(dim1) dim2 = get_dimension(r2, m) b = np.random.random_sample(dim2) p1 = PolynomialLagrange(a, r1, m) p2 = PolynomialLagrange(b, r2, m) def p_expected(x): return p1(x) * p2(x) assert polynomials_equal(p1 * p2, p_expected, r1 + r2, m) def test_div(): # Test dividing a polynomial in P(R^m, R^n) with a scalar for m in [1, 2, 3]: for n in [1, 2, 3]: r = 3 dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) s = np.random.rand() p = PolynomialLagrange(a, r, m) def p_expected(x): return p(x) / s assert polynomials_equal(p / s, p_expected, r, m) def test_pow(): # Test taking the power of a polynomial in P(R^m, R^n) r = 3 for m in [1, 2, 3]: for n in [1, 2, 3]: if n == 1: exponents = range(r + 1) else: exponents = multiindex.generate_all(n, r) for exponent in exponents: r_base = 1 dim = get_dimension(r_base, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) p = PolynomialLagrange(a, r_base, m) if n == 1: def p_expected(x): return p(x)**exponent else: def p_expected(x): return multiindex.power(p(x), exponent) assert polynomials_equal(p**exponent, p_expected, r, m) @pytest.mark.slow def test_partial_derivative(): for m in [1, 2, 3]: for n in [1, 2, 3]: for r in [0, 1, 2, 3]: dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) p = PolynomialLagrange(a, r, m) for i in range(m): if n == 1: if m == 1: def dp_dxi_fd(x): return central_difference(p, x) else: def dp_dxi_fd(x): return central_difference(p, x)[i] else: def dp_dxi_fd(x): return central_difference_jacobian(p, n, x)[:, i] assert polynomials_equal(p.partial_derivative(i), dp_dxi_fd, r, m, rel_tol=1e-4) @pytest.mark.slow def test_degree_elevate(): for m in [1, 2, 3]: for n in [1, 2, 3]: for r in [0, 1, 2, 3]: dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) p = PolynomialLagrange(a, r, m) for s in range(r, r + 3): q = p.degree_elevate(s) assert polynomials_equal(p, q, s, m) @pytest.mark.slow def test_to_monomial_basis(): for m in [1, 2, 3]: for n in [1, 2, 3]: for r in [0, 1, 2, 3]: dim = get_dimension(r, m) if n == 1: a = np.random.random_sample(dim) else: a = np.random.random_sample((dim, n)) p = PolynomialLagrange(a, r, m) q = p.to_monomial_basis() assert q.basis() == unique_identifier_monomial_basis() assert polynomials_equal(p, q, r, m) def test_latex_str(): # Test univariate polynomial p = PolynomialLagrange([1, -2, 3], 2, 1) assert p.latex_str() == "l_{0, 2}(x) - 2 l_{1, 2}(x) + 3 l_{2, 2}(x)" # Test bivariate polynomial p = PolynomialLagrange([1, -2, 3], 1, 2) assert p.latex_str() == "l_{(0, 0), 1}(x) - 2 l_{(1, 0), 1}(x) + 3 l_{(0, 1), 1}(x)" p = PolynomialLagrange([0, 1, 0], 1, 2) assert p.latex_str() == "l_{(1, 0), 1}(x)" p = PolynomialLagrange([0, 0, -1], 1, 2) assert p.latex_str() == "-l_{(0, 1), 1}(x)" p = PolynomialLagrange([1, -2, 3, 0.5, 1, 2], 2, 2) assert p.latex_str() == r"l_{(0, 0), 2}(x) - 2 l_{(1, 0), 2}(x) + 3 l_{(2, 0), 2}(x) + " \ r"\frac{1}{2} l_{(0, 1), 2}(x) + l_{(1, 1), 2}(x) + 2 l_{(0, 2), 2}(x)" # Test vector valued polynomial p = PolynomialLagrange([[1, 1], [-2, -3], [3, 2]], 2, 1) assert p.latex_str() == r"\begin{pmatrix}1 \\ 1\end{pmatrix} l_{0, 2}(x)" \ r" + \begin{pmatrix}-2 \\ -3\end{pmatrix} l_{1, 2}(x)" \ r" + \begin{pmatrix}3 \\ 2\end{pmatrix} l_{2, 2}(x)" # Test bivariate vector valued polynomial p = PolynomialLagrange([[1, 1], [-2, -3], [3, 2]], 1, 2) assert p.latex_str() == r"\begin{pmatrix}1 \\ 1\end{pmatrix} l_{(0, 0), 1}(x)" \ r" + \begin{pmatrix}-2 \\ -3\end{pmatrix} l_{(1, 0), 1}(x)" \ r" + \begin{pmatrix}3 \\ 2\end{pmatrix} l_{(0, 1), 1}(x)" def test_latex_str_expanded(): # Test univariate polynomial p = PolynomialLagrange([1, -2, 3], 2, 1) assert p.latex_str_expanded() == r"(1 - 3 x + 2 x^2) - 2 (4 x - 4 x^2) + 3 (-x + 2 x^2)" # Test bivariate polynomial p = PolynomialLagrange([1, -2, 3], 1, 2) assert p.latex_str_expanded() == "(1 - x_1 - x_2) - 2 x_1 + 3 x_2" p = PolynomialLagrange([0, 1, 0], 1, 2) assert p.latex_str_expanded() == "x_1" p = PolynomialLagrange([0, 0, -1], 1, 2) assert p.latex_str_expanded() == "-x_2" p = PolynomialLagrange([1, -2, 3, 0.5, 1, 2], 2, 2) assert p.latex_str_expanded() == r"(1 - 3 x_1 + 2 x_1^2 - 3 x_2 + 4 x_1 x_2 + 2 x_2^2)" \ r" - 2 (4 x_1 - 4 x_1^2 - 4 x_1 x_2)" \ r" + 3 (-x_1 + 2 x_1^2) + " \ r"\frac{1}{2} (4 x_2 - 4 x_1 x_2 - 4 x_2^2)" \ r" + (4 x_1 x_2)" \ r" + 2 (-x_2 + 2 x_2^2)" # Test vector valued polynomial p = PolynomialLagrange([[1, 1], [-2, -3], [3, 2]], 2, 1) assert p.latex_str_expanded() == r"\begin{pmatrix}1 \\ 1\end{pmatrix} (1 - 3 x + 2 x^2)" \ r" + \begin{pmatrix}-2 \\ -3\end{pmatrix} (4 x - 4 x^2)" \ r" + \begin{pmatrix}3 \\ 2\end{pmatrix} (-x + 2 x^2)" # Test bivariate vector valued polynomial p = PolynomialLagrange([[1, 1], [-2, -3], [3, 2]], 1, 2) assert p.latex_str_expanded() == r"\begin{pmatrix}1 \\ 1\end{pmatrix} (1 - x_1 - x_2)" \ r" + \begin{pmatrix}-2 \\ -3\end{pmatrix} x_1" \ r" + \begin{pmatrix}3 \\ 2\end{pmatrix} x_2" def test_code_str(): # Test univariate polynomial p = PolynomialLagrange([1, -2, 3], 2, 1) fn_name = "test_code_str" code = p.code_str(fn_name) compiled_code = compile(code, fn_name, 'exec') exec(compiled_code, globals(), locals()) test_fn = locals()[fn_name] x = np.random.rand() assert p(x) == test_fn(x) class TestUnivariateLagrangeBasis: @staticmethod def test_basis_fn(): m = 1 for r in range(4): x = generate_lagrange_points(m, r) for nu in multiindex.generate_all(m, r): l = lagrange_basis_fn(nu, r) for i in range(len(x)): if i == multiindex.get_index(nu, r): assert abs(l(x[i]) - 1.0) < 1e-10 else: assert abs(l(x[i])) < 1e-10 @staticmethod def test_vector_valued_basis_fn(): m = 1 n = 2 r = 2 basis = vector_valued_lagrange_basis(r, m, n, ordering="sequential") basis_expected = [ PolynomialLagrange([[1, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [1, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [1, 0]], r, m), PolynomialLagrange([[0, 1], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 1], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 1]], r, m) ] for i in range(len(basis)): assert polynomials_equal(basis[i][0], basis_expected[i][0], r, m) assert polynomials_equal(basis[i][1], basis_expected[i][1], r, m) basis = vector_valued_lagrange_basis(r, m, n, ordering="interleaved") basis_expected = [ PolynomialLagrange([[1, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 1], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [1, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 1], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [1, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 1]], r, m) ] for i in range(len(basis)): assert polynomials_equal(basis[i][0], basis_expected[i][0], r, m) assert polynomials_equal(basis[i][1], basis_expected[i][1], r, m) @staticmethod def test_dual_basis_fn(): for r in range(4): for mu in multiindex.generate_all(1, r): q = dual_lagrange_basis_fn(mu, r) for nu in multiindex.generate_all(1, r): p = lagrange_basis_fn(nu, r) if mu == nu: assert abs(q(p) - 1.0) < 1e-10 else: assert abs(q(p)) < 1e-10 @staticmethod def test_dual_vector_valued_basis_fn(): m = 1 n = 2 for r in range(4): basis = vector_valued_lagrange_basis(r, m, n, ordering="sequential") dual_basis = dual_vector_valued_lagrange_basis(r, m, n, ordering="sequential") for i in range(len(basis)): p = basis[i] for j in range(len(basis)): q = dual_basis[j] if i == j: assert abs(q(p) - 1.0) < 1e-10 else: assert abs(q(p)) < 1e-10 for r in range(4): basis = vector_valued_lagrange_basis(r, m, n, ordering="interleaved") dual_basis = dual_vector_valued_lagrange_basis(r, m, n, ordering="interleaved") for i in range(len(basis)): p = basis[i] for j in range(len(basis)): q = dual_basis[j] if i == j: assert abs(q(p) - 1.0) < 1e-10 else: assert abs(q(p)) < 1e-10 class TestBivariateLagrangeBasis: @staticmethod def test_basis_fn(): m = 2 for r in range(4): x = generate_lagrange_points(m, r) for nu in multiindex.generate_all(m, r): l = lagrange_basis_fn(nu, r) for i in range(len(x)): if i == multiindex.get_index(nu, r): assert abs(l(x[i]) - 1.0) < 1e-10 else: assert abs(l(x[i])) < 1e-10 @staticmethod def test_basis_fn_vector_valued(): m = 2 n = 2 r = 2 basis = vector_valued_lagrange_basis(r, m, n, ordering="sequential") basis_expected = [ PolynomialLagrange([[1, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [1, 0], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [1, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [1, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [1, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1, 0]], r, m), PolynomialLagrange([[0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1]], r, m) ] for i in range(len(basis)): assert polynomials_equal(basis[i][0], basis_expected[i][0], r, m) assert polynomials_equal(basis[i][1], basis_expected[i][1], r, m) basis = vector_valued_lagrange_basis(r, m, n, ordering="interleaved") basis_expected = [ PolynomialLagrange([[1, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [1, 0], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [1, 0], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [1, 0], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [1, 0], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1, 0]], r, m), PolynomialLagrange([[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1]], r, m) ] for i in range(len(basis)): assert polynomials_equal(basis[i][0], basis_expected[i][0], r, m) assert polynomials_equal(basis[i][1], basis_expected[i][1], r, m) @staticmethod def test_dual_basis_fn(): m = 2 r = 3 for mu in multiindex.generate_all(m, r): q = dual_lagrange_basis_fn(mu, r) for nu in multiindex.generate_all(m, r): p = lagrange_basis_fn(nu, r) if mu == nu: assert abs(q(p) - 1.0) < 1e-10 else: assert abs(q(p)) < 1e-10 @staticmethod @pytest.mark.slow def test_dual_vector_valued_basis_fn(): m = 2 n = 2 for r in range(4): basis = vector_valued_lagrange_basis(r, m, n) dual_basis = dual_vector_valued_lagrange_basis(r, m, n) for i in range(len(basis)): p = basis[i] for j in range(len(basis)): q = dual_basis[j] if i == j: assert abs(q(p) - 1.0) < 1e-10 else: assert abs(q(p)) < 1e-10 def test_zero_polynomial(): for m in [1, 2, 3]: x = nsimplex_sampling(m, 1)[0] p = zero_polynomial(0, m) assert p.basis() == unique_identifier_lagrange_basis() assert abs(p(x)) < 1e-12 for n in [2, 3]: p = zero_polynomial(0, m, n) assert p.basis() == unique_identifier_lagrange_basis() assert np.linalg.norm(p(x) - np.zeros(n)) < 1e-12 # Test zero polynomial expressed in the degree 2 polynomial basis r = 2 for m in [1, 2, 3]: x = nsimplex_sampling(m, 1)[0] p = zero_polynomial(r, m, 1) assert p.basis() == unique_identifier_lagrange_basis() assert p.degree() == r assert abs(p(x)) < 1e-12 for n in [2, 3]: p = zero_polynomial(r, m, n) assert p.basis() == unique_identifier_lagrange_basis() assert p.degree() == r assert np.linalg.norm(p(x) - np.zeros(n)) < 1e-12 def test_unit_polynomial(): for m in [1, 2, 3]: x = nsimplex_sampling(m, 1)[0] p = unit_polynomial(0, m) assert p.basis() == unique_identifier_lagrange_basis() assert abs(p(x) - 1) < 1e-12 for n in [2, 3]: p = unit_polynomial(0, m, n) assert p.basis() == unique_identifier_lagrange_basis() assert np.linalg.norm(p(x) - np.ones(n)) < 1e-12 # Test unit polynomial expressed in the degree 2 polynomial basis r = 2 for m in [1, 2, 3]: x = nsimplex_sampling(m, 1)[0] p = unit_polynomial(r, m, 1) assert p.basis() == unique_identifier_lagrange_basis() assert p.degree() == r assert abs(p(x) - 1) < 1e-12 for n in [2, 3]: p = unit_polynomial(r, m, n) assert p.basis() == unique_identifier_lagrange_basis() assert p.degree() == r assert np.linalg.norm(p(x) - np.ones(n)) < 1e-12 def _polynomial_vanish_on_simplex(p, vertices): n = dimension(vertices) if n == 0: x = vertices[0] if len(x) == 1: x = x[0] return abs(p(x)) < 1e-14 r = p.degree() dim = get_dimension(r, n) points = nsimplex_sampling(n, dim) for point in points: b = cartesian_to_barycentric_unit(point) x = sum(b[i] * vertices[i] for i in range(len(b))) if abs(p(x)) > 1e-14: return False return True def test_geometric_decomposition_lagrange_1d(): n = 1 simplex = unit(n) indexed_simplex = [0, 1] r = 0 f, mu = get_associated_sub_simplex((0,), r) assert f == indexed_simplex for r in [1, 2, 3]: for nu in multiindex.generate_all(n, r): f, mu = get_associated_sub_simplex(nu, r) p = lagrange_basis_fn(nu, r) # Validate that the nu-basis polynomial vanishes on all k-dimensional # sub simplices g, g != f, where k = dim(f) for g in simplex_sub_simplices_fixed_dimension(indexed_simplex, simplex_dimension(f)): if tuple(sorted(f)) == g: continue vertices = simplex_vertices(g, simplex) assert _polynomial_vanish_on_simplex(p, vertices) def test_geometric_decomposition_lagrange_2d(): n = 2 simplex = unit(n) indexed_simplex = [0, 1, 2] r = 0 f, mu = get_associated_sub_simplex((0, 0), r) assert f == indexed_simplex for r in [1, 2, 3]: for nu in multiindex.generate_all(n, r): f, mu = get_associated_sub_simplex(nu, r) p = lagrange_basis_fn(nu, r) # Validate that the nu-basis polynomial vanishes on all k-dimensional # sub simplices g, g != f, where k = dim(f) for g in simplex_sub_simplices_fixed_dimension(indexed_simplex, simplex_dimension(f)): if tuple(sorted(f)) == g: continue vertices = simplex_vertices(g, simplex) assert _polynomial_vanish_on_simplex(p, vertices) def test_geometric_decomposition_lagrange_3d(): n = 3 simplex = unit(n) indexed_simplex = [0, 1, 2, 3] r = 0 f, mu = get_associated_sub_simplex((0, 0, 0), r) assert f == indexed_simplex for r in [1, 2, 3]: for nu in multiindex.generate_all(n, r): f, mu = get_associated_sub_simplex(nu, r) p = lagrange_basis_fn(nu, r) # Validate that the nu-basis polynomial vanishes on all k-dimensional # sub simplices g, g != f, where k = dim(f) for g in simplex_sub_simplices_fixed_dimension(indexed_simplex, simplex_dimension(f)): if tuple(sorted(f)) == g: continue vertices = simplex_vertices(g, simplex) assert _polynomial_vanish_on_simplex(p, vertices) # The geometric decomposition of Lagrange polynomials also holds for Bernstein polynomials def test_geometric_decomposition_bernstein_1d(): n = 1 simplex = unit(n) indexed_simplex = [0, 1] r = 0 f, mu = get_associated_sub_simplex((0,), r) assert f == indexed_simplex for r in [1, 2, 3]: for nu in multiindex.generate_all(n, r): f, mu = get_associated_sub_simplex(nu, r) p = bernstein_basis_fn(nu, r) # Validate that the nu-basis polynomial vanishes on all k-dimensional # sub simplices g, g != f, where k = dim(f) for g in simplex_sub_simplices_fixed_dimension(indexed_simplex, simplex_dimension(f)): if tuple(sorted(f)) == g: continue vertices = simplex_vertices(g, simplex) assert _polynomial_vanish_on_simplex(p, vertices) def test_geometric_decomposition_bernstein_2d(): n = 2 simplex = unit(n) indexed_simplex = [0, 1, 2] r = 0 f, mu = get_associated_sub_simplex((0, 0), r) assert f == indexed_simplex for r in [1, 2, 3]: for nu in multiindex.generate_all(n, r): f, mu = get_associated_sub_simplex(nu, r) p = bernstein_basis_fn(nu, r) # Validate that the nu-basis polynomial vanishes on all k-dimensional # sub simplices g, g != f, where k = dim(f) for g in simplex_sub_simplices_fixed_dimension(indexed_simplex, simplex_dimension(f)): if tuple(sorted(f)) == g: continue vertices = simplex_vertices(g, simplex) assert _polynomial_vanish_on_simplex(p, vertices) def test_geometric_decomposition_bernstein_3d(): n = 3 simplex = unit(n) indexed_simplex = [0, 1, 2, 3] r = 0 f, mu = get_associated_sub_simplex((0, 0, 0), r) assert f == indexed_simplex for r in [1, 2, 3]: for nu in multiindex.generate_all(n, r): f, mu = get_associated_sub_simplex(nu, r) p = bernstein_basis_fn(nu, r) # Validate that the nu-basis polynomial vanishes on all k-dimensional # sub simplices g, g != f, where k = dim(f) for g in simplex_sub_simplices_fixed_dimension(indexed_simplex, simplex_dimension(f)): if tuple(sorted(f)) == g: continue vertices = simplex_vertices(g, simplex) assert _polynomial_vanish_on_simplex(p, vertices) if __name__ == '__main__': pytest.main(sys.argv)
38.527848
116
0.514374
4,344
30,437
3.452118
0.048573
0.03921
0.045212
0.046412
0.849226
0.805281
0.769605
0.76227
0.740664
0.705388
0
0.057753
0.346355
30,437
789
117
38.576679
0.696004
0.068864
0
0.7375
0
0.023438
0.043924
0
0
0
0
0
0.142188
1
0.075
false
0
0.01875
0.023438
0.125
0
0
0
0
null
0
0
0
1
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
7
3ca57caeffb96a1c8a1c4a2cfb6ec8adff64471d
6,038
py
Python
tests/test_cohort_query.py
ImagingDataCommons/ISB-CGC-API
d3207a6ada958ad5ac3cb8834b216ec1108dcf1c
[ "Apache-2.0" ]
null
null
null
tests/test_cohort_query.py
ImagingDataCommons/ISB-CGC-API
d3207a6ada958ad5ac3cb8834b216ec1108dcf1c
[ "Apache-2.0" ]
5
2020-07-07T23:45:21.000Z
2021-06-11T17:52:29.000Z
tests/test_cohort_query.py
ImagingDataCommons/ISB-CGC-API
d3207a6ada958ad5ac3cb8834b216ec1108dcf1c
[ "Apache-2.0" ]
2
2019-10-15T01:17:35.000Z
2021-04-05T19:54:12.000Z
# # Copyright 2020, Institute for Systems Biology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import logging import json from tests.cohort_utils import merge, pretty_print_cohortObjects, create_cohort_for_test_get_cohort_xxx, delete_cohort def test_basic(client, app): (id, filterSet) = create_cohort_for_test_get_cohort_xxx(client) queryPreviewBody = {"fields": ['StudyInstanceUID', 'Modality']} mimetype = ' application/json' headers = { 'Content-Type': mimetype, 'Accept': mimetype } query_string = { 'sql': False, 'page_size': 2000, } response = client.get(f'v1/cohorts/query/{id}', query_string = query_string, data = json.dumps(queryPreviewBody), headers=headers) assert response.content_type == 'application/json' assert response.status_code == 200 info = response.json assert response.json['query_results']['rowsReturned'] == 3 assert response.json['query_results']['totalFound'] == 3 assert response.json['next_page'] == "" query_results = info['query_results']['json'] assert len(query_results) == response.json['query_results']['rowsReturned'] assert {'Modality': 'CT', 'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.768291480177931556369061239508'} \ in query_results def test_basic2(client, app): (id, filterSet) = create_cohort_for_test_get_cohort_xxx(client) queryPreviewBody = {"fields": ['StudyInstanceUID', 'SeriesInstanceUID', 'SOPInstanceUID', 'Modality', "BodyPartExamined", "Percent_Within_First_Quarter_of_Intensity_Range"]} mimetype = ' application/json' headers = { 'Content-Type': mimetype, 'Accept': mimetype } query_string = { 'sql': True, 'page_size': 2000, } response = client.get(f'v1/cohorts/query/{id}', query_string = query_string, data = json.dumps(queryPreviewBody), headers=headers) assert response.content_type == 'application/json' assert response.status_code == 200 info = response.json assert response.json['query_results']['rowsReturned'] == 1638 assert response.json['query_results']['totalFound'] == 1638 assert response.json['next_page'] == "" query_results = info['query_results']['json'] assert len(query_results) == response.json['query_results']['rowsReturned'] assert {'Percent_Within_First_Quarter_of_Intensity_Range': None, 'BodyPartExamined':'RECTUM', 'Modality': 'CT', 'SOPInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.101814896314793708382026281597', \ 'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.183714953600569164837490663631', \ 'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.768291480177931556369061239508'} \ in query_results def test_paged(client, app): (id, filterSet) = create_cohort_for_test_get_cohort_xxx(client) queryPreviewBody = {"fields": ['StudyInstanceUID', 'SeriesInstanceUID', 'SOPInstanceUID', 'Modality']} mimetype = ' application/json' headers = { 'Content-Type': mimetype, 'Accept': mimetype } query_string = { 'sql': False, 'page_size': 500, } response = client.get(f'v1/cohorts/query/{id}', query_string = query_string, data = json.dumps(queryPreviewBody), headers=headers) assert response.content_type == 'application/json' assert response.status_code == 200 info = response.json totalRowsReturned = response.json['query_results']['rowsReturned'] assert response.json['query_results']['totalFound'] == 1638 assert response.json['next_page'] query_results = info['query_results']['json'] assert len(query_results) == response.json['query_results']['rowsReturned'] assert {'Modality': 'CT', 'SOPInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.101814896314793708382026281597', \ 'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.183714953600569164837490663631', \ 'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.768291480177931556369061239508'} \ in query_results while response.json['next_page']: query_string = { # 'sql': False, 'page_size': 500, 'next_page': response.json['next_page'] } response = client.get(f'v1/cohorts/query/nextPage', query_string=query_string, data=json.dumps(queryPreviewBody), headers=headers) assert response.content_type == 'application/json' assert response.status_code == 200 info = response.json totalRowsReturned += response.json['query_results']['rowsReturned'] query_results.extend(info['query_results']['json']) assert totalRowsReturned == response.json['query_results']['totalFound'] assert len(query_results) == response.json['query_results']['totalFound'] assert {'Modality': 'CT', 'SOPInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.101814896314793708382026281597', \ 'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.183714953600569164837490663631', \ 'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3671.4018.768291480177931556369061239508'} \ in query_results
38.21519
203
0.649553
681
6,038
5.610866
0.221733
0.087935
0.053389
0.075373
0.822298
0.80581
0.783826
0.737242
0.725465
0.725465
0
0.121734
0.220437
6,038
158
204
38.21519
0.690036
0.096058
0
0.704762
0
0.095238
0.337192
0.151047
0
0
0
0
0.238095
1
0.028571
false
0
0.028571
0
0.057143
0.009524
0
0
0
null
0
0
0
1
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
7
3cce4baf035b68f8de841cba998cb8012dd60072
2,598
py
Python
src/harrastuspassi/harrastuspassi/tests/test_lipas_importer.py
savilmik/harrastuspassi-backend
885c6903a753c7eea29d23f98275747edcdab892
[ "MIT" ]
2
2019-07-29T09:34:47.000Z
2020-08-24T18:15:06.000Z
src/harrastuspassi/harrastuspassi/tests/test_lipas_importer.py
savilmik/harrastuspassi-backend
885c6903a753c7eea29d23f98275747edcdab892
[ "MIT" ]
72
2019-08-08T10:36:21.000Z
2022-03-11T23:55:56.000Z
src/harrastuspassi/harrastuspassi/tests/test_lipas_importer.py
savilmik/harrastuspassi-backend
885c6903a753c7eea29d23f98275747edcdab892
[ "MIT" ]
6
2019-08-08T13:26:07.000Z
2021-05-03T06:09:10.000Z
import datetime import pytest from freezegun import freeze_time from django.core.files.base import ContentFile from harrastuspassi.management.commands.import_lipas import Command as LipasImportCommand from harrastuspassi.models import Hobby, HobbyEvent pytest_plugins = ['harrastuspassi.tests.fixtures_lipas'] @pytest.mark.django_db def test_deletions_none_deleted(imported_hobby, imported_hobby2): command = LipasImportCommand() hobby_qs = Hobby.objects.filter(data_source='lipas') event_qs = HobbyEvent.objects.filter(data_source='lipas') assert hobby_qs.count() == 2 assert event_qs.count() == 4 found_hobby_origin_ids = ['foo:1', 'foo:2'] found_hobbyevent_origin_ids = ['foo:1', 'foo:2', 'foo:3', 'foo:4'] command.handle_deletions(found_hobby_origin_ids, found_hobbyevent_origin_ids) assert hobby_qs.count() == 2 assert event_qs.count() == 4 @pytest.mark.django_db def test_deletions_hobby_deleted(imported_hobby, imported_hobby2): command = LipasImportCommand() hobby_qs = Hobby.objects.filter(data_source='lipas') event_qs = HobbyEvent.objects.filter(data_source='lipas') assert hobby_qs.count() == 2 assert event_qs.count() == 4 found_hobby_origin_ids = ['foo:1'] found_hobbyevent_origin_ids = ['foo:1', 'foo:2', 'foo:3', 'foo:4'] command.handle_deletions(found_hobby_origin_ids, found_hobbyevent_origin_ids) assert hobby_qs.count() == 1 assert event_qs.count() == 2 @pytest.mark.django_db def test_deletions_hobbyevent_deleted(imported_hobby, imported_hobby2): command = LipasImportCommand() hobby_qs = Hobby.objects.filter(data_source='lipas') event_qs = HobbyEvent.objects.filter(data_source='lipas') assert hobby_qs.count() == 2 assert event_qs.count() == 4 found_hobby_origin_ids = ['foo:1', 'foo:2'] found_hobbyevent_origin_ids = ['foo:1', 'foo:2', 'foo:3'] command.handle_deletions(found_hobby_origin_ids, found_hobbyevent_origin_ids) assert hobby_qs.count() == 2 assert event_qs.count() == 3 @pytest.mark.django_db def test_deletions_hobby_and_events_deleted(imported_hobby, imported_hobby2): command = LipasImportCommand() hobby_qs = Hobby.objects.filter(data_source='lipas') event_qs = HobbyEvent.objects.filter(data_source='lipas') assert hobby_qs.count() == 2 assert event_qs.count() == 4 found_hobby_origin_ids = ['foo:1'] found_hobbyevent_origin_ids = ['foo:1', 'foo:2'] command.handle_deletions(found_hobby_origin_ids, found_hobbyevent_origin_ids) assert hobby_qs.count() == 1 assert event_qs.count() == 2
39.363636
89
0.745189
358
2,598
5.089385
0.148045
0.061471
0.074643
0.100988
0.841383
0.841383
0.841383
0.804061
0.761251
0.761251
0
0.017387
0.136644
2,598
65
90
39.969231
0.794918
0
0
0.745455
0
0
0.06546
0.013477
0
0
0
0
0.290909
1
0.072727
false
0.054545
0.254545
0
0.327273
0
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
8
59c40f1e84e1d6143487ad7bde7df8350eee1a7e
147,998
py
Python
icon.py
ssiiaagg/polaris
f777a39750484455bdd20709a4a6db34eda5d6d9
[ "Apache-2.0" ]
1
2020-01-12T17:16:21.000Z
2020-01-12T17:16:21.000Z
icon.py
ssiiaagg/polaris
f777a39750484455bdd20709a4a6db34eda5d6d9
[ "Apache-2.0" ]
null
null
null
icon.py
ssiiaagg/polaris
f777a39750484455bdd20709a4a6db34eda5d6d9
[ "Apache-2.0" ]
null
null
null
class Icon(object): def __init__(self): self.img='AAABAAYAAAAAAAEAIAD+KwAAZgAAAICAAAABACAAKAgBAGQsAABAQAAAAQAgAChCAACMNAEAMDAAAAEAIACoJQAAtHYBACAgAAABACAAqBAAAFycAQAQEAAAAQAgAGgEAAAErQEAiVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAQAAAD2e2DtAAArxUlEQVR42u2dZ2AUZRrHf7OphACh9w5SBEQF1ENFLIgNVMSCXRGxoOgpqCeInF1PbKhgAxQsWEBsYMcCKipNeu89BEJI3b0PSWafmdkyu9Oi2f982WRn316e/kACCSRQeZHkdQM87n0a4Pe6GV5C8boBrsNHczpyJJ2pT1VSKCaHDSxlEcvZ63XjEnAW9bmV2WynmIDhyWM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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////+B///////////////////8AH//////////////////8AAf/////////////////+AAD//////////////////AOAP/////////////////gP8B/////////////////wP/gf////////////////4H/8D////////////////8D//gf///////////////+B//8D////////////////g///g////////////////wP//8H///////////////8H///B///////////////+D///4P///////////////g////B///////////////wf///wf//////////////8H///+D//////////////+D////g///////////////g////8P//////////////4f////B//////////////8H////wf//////////////D////+H//////////////g/////g//////////////4P////8P/////////8AAD+H/////B/AAB/////4AAABh/////wYAAAD////8AAAAAf////+AAAAAP///8AAAAAH/////AAAAAB///+AP/4AAH///+AAD/+AP///Af//+AAf//8AA///8B///gf///4AA//8AA////wP//4P///+EAB/4AAP///+B//+H////h4AH4APB////wf//B////wfwAYAfwf///+H//w////8H/AAAf+H////h//8P////D/+AA//h////4f//D////w//4Af/4f////H//w////8P/wAB/+D////w//8P////D/4AAP/w////8f//D////w/4A4A/8P///+H//w////4P4A/gD/D////h//8P///+H4A/+APw////4f//B////h8Af/4B8P///+H//4f///4cAf//AHD////B//+H///+GAf//8Aw////w///g////gAf///wAH///4P//8P///4AP///+AB///+D///B///8AP////4Af///B///4P///AH/////gH///wf//+D///wH/////8A///4P///wf//wD//////wH//+D///8H//4D//////+A///B////g//8A///////gH//gf///4H/+AP//////4Af/wP////B/+AD//////+AD/8H////4P/AQ///gf//hAf+B////+B/gMP//AB//8ID/A/////wPwHD//gAP//Dgfgf////+B4Dw//wAB//w8BwP/////wMD8P/8DgP/8PgID/////+AB/D//D+D//D8AB//////wA/w//g/w//w/gA//////+Af8f/4f8P/8P8Af//////gP/H/+H/D//D/gP//////4D/x//h/w//w/4B//////8AP8f/4P8P/8P4Af/////+AB/D/+D+D//D8AD//////AgPw//wfA//w+Agf/////gcB8P/8AAf/8PAcD/////4PwPD//gAP//DgPgf////8H+Bw//8AH//wwH8D////+B/wEP//gD//4QH/g/////A/+AD//////+AD/8H////wf/wA///////gB//A////4P/+AP//////4A//4P///8D//4D//////+A///B////B///Af//////Af//wP///g///4B//////gP//+D///4P///AP/////gH///wf//8H///wA/////wB///8H///B///8AH////wAf///h///g////gAf///wAH///4P//4f///4QB///4BB////D//+H///+HAP//4Bw////wf//B////h4A//4A8P///+H//wf///4fgD/8A/D////h//8P///+H+AP8A/w////4f//D////g/wA8Af8P///+H//w////8P/AEAf/D////h//8P////D/8AAf/g////8P//D////w//wAf/4f////D//w////8P/4AD/+H////h//8P////D/4AAP/h////4f//B////wfwAAAfwf///+H//wf///+HwAfAA8H////B//+D////hgAf8ADD////gf//gf///4AAf/4AA////wP//8D///8AA///gAH///4H///gH//wAB////AAH//4B///8AAAAAB////+AAAAAA////gAAAAB/////4AAAAA////+AAAAYf////8EAAAA/////4AAB+H/////B8AAA//////8A//g/////w//gH//////////4P////4P//////////////D////+D//////////////wf////B//////////////8H////wf//////////////g////8P//////////////4P///+D///////////////D////g///////////////wf///wf//////////////8D///8H///////////////g///+D///////////////8H///g////////////////A///wf///////////////4P//4H///////////////+B//8D////////////////wP/+B////////////////+B//g/////////////////wP/wP////////////////+B/wH/////////////////gHwD/////////////////+AAB//////////////////wAA///////////////////AA///////////////////8A///////////////////////////////ygAAABAAAAAgAAAAAEAIAAAAAAAAEAAAMMOAADDDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAPwAAAFgAAABXAAAAWQAAAJkAAAAuAAAAAAAAAAAAAAA2AAAAmQAAAFkAAABXAAAAWQAAADYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABHAAAAGAAAAAAAAAAAAAAAKQAAADYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAGYAAAAAAAAAAQAAAGcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdAAAAXgAAAGAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/D8AAPkfAAD5nwAAgAEAALgdAACwDQAAgkEAAIBDAACAQwAAg8kAALANAAC4HQAAgAEAAPmfAAD4HwAA/D8AAA=='
49,332.666667
147,957
0.97427
2,088
147,998
69.054598
0.617816
0.006991
0.006991
0.00602
0.004661
0.003731
0.002857
0.002538
0.002538
0.001706
0
0.024866
0.000047
147,998
3
147,957
49,332.666667
0.949423
0
0
0
0
0.333333
0.999628
0.999628
0
1
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
null
1
0
0
0
0
1
0
0
0
0
1
0
0
10
abd56e4a60ccbca1bd98d78a5178b01d9582ae8a
26,375
py
Python
OCR_test.py
JuanLeee/Kbot
1013f086bec682c93b9104b31748d7c4bcd5a957
[ "MIT" ]
null
null
null
OCR_test.py
JuanLeee/Kbot
1013f086bec682c93b9104b31748d7c4bcd5a957
[ "MIT" ]
null
null
null
OCR_test.py
JuanLeee/Kbot
1013f086bec682c93b9104b31748d7c4bcd5a957
[ "MIT" ]
null
null
null
import cv2 import pytesseract import os import numpy as np import re from pytessy.pytessy import PyTessy import logging import string, re import sys import unittest from tesseract_ocr import * class TestOCRCheck(unittest.TestCase): def setUp(self): self.ocr = OCR_PyTes() def tearDown(self) -> None: self.ocr.depose() del self.ocr def test_card1(self): absolute_path = os.path.join(os.getcwd(), 'card (1).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card2(self): absolute_path = os.path.join(os.getcwd(), 'card (2).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card3(self): absolute_path = os.path.join(os.getcwd(), 'card (3).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card4(self): absolute_path = os.path.join(os.getcwd(), 'card (4).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card5(self): absolute_path = os.path.join(os.getcwd(), 'card (5).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card6(self): absolute_path = os.path.join(os.getcwd(), 'card (6).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertEqual(self.ocr.get_print_num(images,1),10) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card7(self): absolute_path = os.path.join(os.getcwd(), 'card (7).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertEqual(self.ocr.get_print_num(images,2),10) def test_card8(self): absolute_path = os.path.join(os.getcwd(), 'card (8).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card9(self): absolute_path = os.path.join(os.getcwd(), 'card (9).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)==1000) self.assertTrue(self.ocr.get_print_num(images,3)>=10000) def test_card10(self): absolute_path = os.path.join(os.getcwd(), 'card (10).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card11(self): absolute_path = os.path.join(os.getcwd(), 'card (11).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card12(self): absolute_path = os.path.join(os.getcwd(), 'card (12).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card13(self): absolute_path = os.path.join(os.getcwd(), 'card (13).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=1000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card14(self): absolute_path = os.path.join(os.getcwd(), 'card (14).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card15(self): absolute_path = os.path.join(os.getcwd(), 'card (15).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card16(self): absolute_path = os.path.join(os.getcwd(), 'card (16).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card17(self): absolute_path = os.path.join(os.getcwd(), 'card (17).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=1000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card18(self): absolute_path = os.path.join(os.getcwd(), 'card (18).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card19(self): absolute_path = os.path.join(os.getcwd(), 'card (19).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card20(self): absolute_path = os.path.join(os.getcwd(), 'card (20).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=1000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card21(self): absolute_path = os.path.join(os.getcwd(), 'card (21).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card22(self): absolute_path = os.path.join(os.getcwd(), 'card (22).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card23(self): absolute_path = os.path.join(os.getcwd(), 'card (23).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=10000) def test_card24(self): absolute_path = os.path.join(os.getcwd(), 'card (24).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card25(self): absolute_path = os.path.join(os.getcwd(), 'card (25).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card26(self): absolute_path = os.path.join(os.getcwd(), 'card (26).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)==100) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card27(self): absolute_path = os.path.join(os.getcwd(), 'card (27).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card28(self): absolute_path = os.path.join(os.getcwd(), 'card (28).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card29(self): absolute_path = os.path.join(os.getcwd(), 'card (29).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card30(self): absolute_path = os.path.join(os.getcwd(), 'card (30).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=1000) def test_card31(self): absolute_path = os.path.join(os.getcwd(), 'card (31).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=1000) def test_card32(self): absolute_path = os.path.join(os.getcwd(), 'card (32).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card33(self): absolute_path = os.path.join(os.getcwd(), 'card (33).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card34(self): absolute_path = os.path.join(os.getcwd(), 'card (34).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card35(self): absolute_path = os.path.join(os.getcwd(), 'card (35).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card36(self): absolute_path = os.path.join(os.getcwd(), 'card (36).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card37(self): absolute_path = os.path.join(os.getcwd(), 'card (37).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card38(self): absolute_path = os.path.join(os.getcwd(), 'card (38).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=1000) def test_card39(self): absolute_path = os.path.join(os.getcwd(), 'card (39).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card40(self): absolute_path = os.path.join(os.getcwd(), 'card (40).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)==10) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card41(self): absolute_path = os.path.join(os.getcwd(), 'card (41).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card42(self): absolute_path = os.path.join(os.getcwd(), 'card (42).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card43(self): absolute_path = os.path.join(os.getcwd(), 'card (43).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card44(self): absolute_path = os.path.join(os.getcwd(), 'card (44).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card45(self): absolute_path = os.path.join(os.getcwd(), 'card (45).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card46(self): absolute_path = os.path.join(os.getcwd(), 'card (46).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card47(self): absolute_path = os.path.join(os.getcwd(), 'card (47).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card48(self): absolute_path = os.path.join(os.getcwd(), 'card (48).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)==100) def test_card49(self): absolute_path = os.path.join(os.getcwd(), 'card (49).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=1000) def test_card50(self): absolute_path = os.path.join(os.getcwd(), 'card (50).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=10000) def test_card51(self): absolute_path = os.path.join(os.getcwd(), 'card (51).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card52(self): absolute_path = os.path.join(os.getcwd(), 'card (52).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)==100) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card53(self): absolute_path = os.path.join(os.getcwd(), 'card (53).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)==100) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card54(self): absolute_path = os.path.join(os.getcwd(), 'card (54).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)==100) def test_card55(self): absolute_path = os.path.join(os.getcwd(), 'card (55).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=10000) def test_card56(self): absolute_path = os.path.join(os.getcwd(), 'card (56).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card57(self): absolute_path = os.path.join(os.getcwd(), 'card (57).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)==10) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card58(self): absolute_path = os.path.join(os.getcwd(), 'card (58).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card59(self): absolute_path = os.path.join(os.getcwd(), 'card (59).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)==100) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card60(self): absolute_path = os.path.join(os.getcwd(), 'card (60).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card61(self): absolute_path = os.path.join(os.getcwd(), 'card (61).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)==10) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card62(self): absolute_path = os.path.join(os.getcwd(), 'card (62).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card63(self): absolute_path = os.path.join(os.getcwd(), 'card (63).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card64(self): absolute_path = os.path.join(os.getcwd(), 'card (64).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) def test_card66(self): absolute_path = os.path.join(os.getcwd(), 'card (66).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card67(self): absolute_path = os.path.join(os.getcwd(), 'card (67).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card68(self): absolute_path = os.path.join(os.getcwd(), 'card (68).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=1000) self.assertTrue(self.ocr.get_print_num(images,1)>=10000) self.assertTrue(self.ocr.get_print_num(images,2)>=10000) self.assertTrue(self.ocr.get_print_num(images,3)>=100000) def test_card69(self): absolute_path = os.path.join(os.getcwd(), 'card (69).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) self.assertTrue(self.ocr.get_print_num(images,3)>=1000) def test_card82(self): absolute_path = os.path.join(os.getcwd(), 'card (82).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=100000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) def test_card83(self): absolute_path = os.path.join(os.getcwd(), 'card (83).png') images = cv2.imread(absolute_path) self.assertTrue(self.ocr.get_print_num(images,0)>=10000) self.assertTrue(self.ocr.get_print_num(images,1)>=100000) self.assertTrue(self.ocr.get_print_num(images,2)>=100000) if __name__ == '__main__': unittest.main()
48.394495
72
0.665403
3,806
26,375
4.426169
0.049658
0.101805
0.143654
0.215481
0.948474
0.948474
0.948474
0.948415
0.948237
0.785943
0
0.088728
0.185972
26,375
545
73
48.394495
0.695901
0
0
0.645435
0
0
0.034463
0
0
0
0
0
0.5138
1
0.152866
false
0
0.023355
0
0.178344
0.5138
0
0
0
null
0
0
1
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
1
0
0
0
0
0
0
0
1
0
9
e607a42923a29f1a18b96dd04e079f04f20e32ed
11,364
py
Python
attack_utils.py
KieranXWang/HRS
3999cd036ee9da59f4d82619bd540e93d5258f7c
[ "MIT" ]
5
2019-09-05T15:18:52.000Z
2022-03-28T08:15:47.000Z
attack_utils.py
VictoriaWSY/HRS
eb7061e225b3e647dc266a91fc473e0d98f3ea4e
[ "MIT" ]
1
2021-07-26T13:05:49.000Z
2021-07-26T13:05:49.000Z
attack_utils.py
VictoriaWSY/HRS
eb7061e225b3e647dc266a91fc473e0d98f3ea4e
[ "MIT" ]
6
2019-09-18T02:11:12.000Z
2022-03-11T08:45:03.000Z
import tensorflow as tf import numpy as np # FGSM class FGSM(object): def __init__(self, model, epsilon, dataset='CIFAR'): self.model = model self.epsilon = epsilon if dataset == 'CIFAR': self.height = 32 self.width = 32 self.channel = 3 elif dataset == 'MNIST': self.height = 28 self.width = 28 self.channel = 1 self.xs = tf.Variable(np.zeros((1, self.height, self.width, self.channel), dtype=np.float32), name='modifier') self.xs_place = tf.placeholder(tf.float32, [None, self.height, self.width, self.channel]) self.xs_orig = tf.Variable(np.zeros((1, self.height, self.width, self.channel), dtype=np.float32), name='original') self.ys = tf.placeholder(tf.int32, [None]) self.y_variable = tf.Variable(np.zeros((1,), dtype=np.int32), name='target') # assign operations self.assign_x = tf.assign(self.xs, self.xs_place) self.assign_x_orig = tf.assign(self.xs_orig, self.xs_place) self.assign_y = tf.assign(self.y_variable, self.ys) # clip operation self.do_clip_xs = tf.clip_by_value(self.xs, 0, 1) # logits self.logits = model(self.xs) # loss y_one_hot = tf.one_hot(self.y_variable, 10) loss = tf.nn.softmax_cross_entropy_with_logits(logits=self.logits , labels=y_one_hot) loss = tf.reduce_mean(loss) # Define gradient of loss wrt input self.grad = tf.gradients(loss, self.xs)[0] self.grad_sign = tf.sign(self.grad) def perturb(self, x, y, sess): # initialize sess.run(self.xs.initializer) sess.run(self.y_variable.initializer) sess.run(self.xs_orig.initializer) # assign sess.run(self.assign_x, feed_dict={self.xs_place: x}) # sess.run(self.assign_x_orig, feed_dict={self.xs_orig: x}) sess.run(self.assign_y, feed_dict={self.ys: y}) # generate adv example #grad = sess.run(self.grad) grad_sign = sess.run(self.grad_sign) adv_x = x - self.epsilon * grad_sign return adv_x def sample_gradient(self, x, y, sess, gradient_samples): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) grad_list = np.zeros((gradient_samples, 1, self.height, self.width, self.channel)) for grad_idx in range(gradient_samples): grad = sess.run(self.grad, feed_dict={self.ys: y}) grad_list[grad_idx, :, :, :, :] = grad return grad_list def perturb_gm(self, x, y, sess, gradient_samples): # initialize sess.run(self.xs.initializer) sess.run(self.y_variable.initializer) sess.run(self.xs_orig.initializer) # assign sess.run(self.assign_x, feed_dict={self.xs_place: x}) # sess.run(self.assign_x_orig, feed_dict={self.xs_place: x}) sess.run(self.assign_y, feed_dict={self.ys: y}) grad_list = np.zeros((gradient_samples, 1, self.height, self.width, self.channel)) for i in range(gradient_samples): grad = sess.run(self.grad) grad_list[i, :, :, :, :] = grad grad_mean = np.mean(grad_list, axis=0, keepdims=False) grad_mean_sign = np.sign(grad_mean) adv_x = x - self.epsilon * grad_mean_sign return adv_x # PGD class PGD(object): def __init__(self, model, num_steps, step_size, epsilon, dataset='CIFAR'): if dataset == 'CIFAR': self.height = 32 self.width = 32 self.channel = 3 elif dataset == 'MNIST': self.height = 28 self.width = 28 self.channel = 1 elif dataset == 'Fashion_MNIST': self.height = 28 self.width = 28 self.channel = 1 self.model = model self.num_steps = num_steps self.step_size = step_size self.xs = tf.Variable(np.zeros((1, self.height, self.width, self.channel), dtype=np.float32), name='modifier') self.orig_xs = tf.placeholder(tf.float32, [None, self.height, self.width, self.channel]) self.ys = tf.placeholder(tf.int32, [None]) y_one_hot = tf.one_hot(self.ys, 10) self.epsilon = epsilon delta = tf.clip_by_value(self.xs, 0, 1) - self.orig_xs delta = tf.clip_by_value(delta, -self.epsilon, self.epsilon) self.do_clip_xs = tf.assign(self.xs, self.orig_xs+delta) self.logits = logits = model(self.xs) loss = tf.nn.softmax_cross_entropy_with_logits(logits=self.logits, labels=y_one_hot) self.loss = tf.reduce_mean(loss) start_vars = set(x.name for x in tf.global_variables()) self.optimizer = tf.train.AdamOptimizer(step_size*1) grad, var = self.optimizer.compute_gradients(self.loss, [self.xs])[0] # self.train = self.optimizer.apply_gradients([(tf.sign(grad),var)]) self.train = self.optimizer.apply_gradients([(tf.sign(grad), var)]) self.grad = tf.gradients(self.loss, self.xs)[0] # gradient palceholder self.current_gradient = tf.placeholder(tf.float32, [None, self.height, self.width, self.channel]) # update using gradient placeholder self.update = self.optimizer.apply_gradients([(tf.sign(self.current_gradient), var)]) end_vars = tf.global_variables() self.new_vars = [x for x in end_vars if x.name not in start_vars] def perturb(self, x, y, sess): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) for i in range(self.num_steps): sess.run(self.train, feed_dict={self.ys: y}) sess.run(self.do_clip_xs, {self.orig_xs: x}) return sess.run(self.xs) def sample_gradient(self, x, y, sess, gradient_samples): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) grad_list = np.zeros((gradient_samples, 1, self.height, self.width, self.channel)) for grad_idx in range(gradient_samples): grad = sess.run(self.grad, feed_dict={self.ys: y}) grad_list[grad_idx, :, :, :, :] = grad return grad_list def perturb_gm(self, x, y, sess, gradient_samples): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) for i in range(self.num_steps): grad_list = np.zeros((gradient_samples, 1, self.height, self.width, self.channel)) for grad_idx in range(gradient_samples): grad = sess.run(self.grad, feed_dict={self.ys: y}) grad_list[grad_idx, :, :, :, :] = grad grad_mean = np.mean(grad_list, axis=0, keepdims=False) sess.run(self.update, feed_dict={self.current_gradient: grad_mean}) sess.run(self.do_clip_xs, {self.orig_xs: x}) return sess.run(self.xs) # CW-PGD class CW_PGD(object): def __init__(self, model, num_steps, step_size, epsilon, dataset='CIFAR'): if dataset == 'CIFAR': self.height = 32 self.width = 32 self.channel = 3 elif dataset == 'MNIST': self.height = 28 self.width = 28 self.channel = 1 self.model = model self.num_steps = num_steps self.step_size = step_size self.xs = tf.Variable(np.zeros((1, self.height, self.width, self.channel), dtype=np.float32), name='modifier') self.orig_xs = tf.placeholder(tf.float32, [None, self.height, self.width, self.channel]) self.ys = tf.placeholder(tf.int32, [None]) y_one_hot = tf.one_hot(self.ys, 10) self.epsilon = epsilon delta = tf.clip_by_value(self.xs, 0, 1) - self.orig_xs delta = tf.clip_by_value(delta, -self.epsilon, self.epsilon) self.do_clip_xs = tf.assign(self.xs, self.orig_xs+delta) self.logits = logits = model(self.xs) label_mask = tf.one_hot(self.ys, 10) # code changes here target_logit = tf.reduce_sum(label_mask * logits, axis=1) other_logit = tf.reduce_max((1-label_mask) * logits - 1e4*label_mask, axis=1) self.loss = (other_logit - target_logit) # loss = tf.nn.softmax_cross_entropy_with_logits(logits=self.logits, labels=y_one_hot) # self.loss = tf.reduce_mean(loss) start_vars = set(x.name for x in tf.global_variables()) self.optimizer = tf.train.AdamOptimizer(step_size*1) self.grad, var = self.optimizer.compute_gradients(self.loss, [self.xs])[0] # self.train = self.optimizer.apply_gradients([(tf.sign(grad),var)]) self.train = self.optimizer.apply_gradients([(self.grad, var)]) # self.grad = tf.gradients(self.loss, self.xs)[0] # gradient palceholder self.current_gradient = tf.placeholder(tf.float32, [None, self.height, self.width, self.channel]) # update using gradient placeholder self.update = self.optimizer.apply_gradients([(self.current_gradient, var)]) end_vars = tf.global_variables() self.new_vars = [x for x in end_vars if x.name not in start_vars] def perturb(self, x, y, sess): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) for i in range(self.num_steps): sess.run(self.train, feed_dict={self.ys: y}) sess.run(self.do_clip_xs, {self.orig_xs: x}) return sess.run(self.xs) def sample_gradient(self, x, y, sess, gradient_samples): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) grad_list = np.zeros((gradient_samples, 1, self.height, self.width, self.channel)) for grad_idx in range(gradient_samples): grad = sess.run(self.grad, feed_dict={self.ys: y}) grad_list[grad_idx, :, :, :, :] = grad return grad_list def perturb_gm(self, x, y, sess, gradient_samples): sess.run(tf.variables_initializer(self.new_vars)) sess.run(self.xs.initializer) sess.run(self.do_clip_xs, {self.orig_xs: x}) for i in range(self.num_steps): grad_list = np.zeros((gradient_samples, 1, self.height, self.width, self.channel)) for grad_idx in range(gradient_samples): grad = sess.run(self.grad, feed_dict={self.ys: y}) grad_list[grad_idx, :, :, :, :] = grad grad_mean = np.mean(grad_list, axis=0, keepdims=False) sess.run(self.update, feed_dict={self.current_gradient: grad_mean}) sess.run(self.do_clip_xs, {self.orig_xs: x}) return sess.run(self.xs)
33.922388
123
0.603749
1,582
11,364
4.158028
0.082807
0.0564
0.076923
0.043326
0.903314
0.877774
0.861204
0.853755
0.850562
0.84433
0
0.012182
0.270415
11,364
334
124
34.023952
0.781209
0.063534
0
0.809756
0
0
0.009069
0
0
0
0
0
0
1
0.058537
false
0
0.009756
0
0.126829
0
0
0
0
null
0
0
0
1
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
7
e626a1b222e99a76759f107754bda93431ec27f2
355
py
Python
tests/internal/instance_type/test_instance_type_g5g_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
tests/internal/instance_type/test_instance_type_g5g_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
tests/internal/instance_type/test_instance_type_g5g_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
# Testing module instance_type.g5g import pytest import ec2_compare.internal.instance_type.g5g def test_get_internal_data_instance_type_g5g_get_instances_list(): assert len(ec2_compare.internal.instance_type.g5g.get_instances_list()) > 0 def test_get_internal_data_instance_type_g5g_get(): assert len(ec2_compare.internal.instance_type.g5g.get) > 0
35.5
77
0.850704
56
355
4.946429
0.339286
0.259928
0.32491
0.259928
0.826715
0.826715
0.613718
0.613718
0.613718
0
0
0.033435
0.073239
355
9
78
39.444444
0.808511
0.090141
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
0
0
0
null
1
1
1
1
1
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
10
55a7b9ccbf4c2191146ace60244cf7d7d15f523a
679
py
Python
study/hex2.py
chaeplin/btchip-python
a938ee4522228209c219e784edff15c193bfa7f6
[ "Apache-2.0" ]
null
null
null
study/hex2.py
chaeplin/btchip-python
a938ee4522228209c219e784edff15c193bfa7f6
[ "Apache-2.0" ]
null
null
null
study/hex2.py
chaeplin/btchip-python
a938ee4522228209c219e784edff15c193bfa7f6
[ "Apache-2.0" ]
1
2019-07-07T03:26:03.000Z
2019-07-07T03:26:03.000Z
import binascii QWERTY_KEYMAP = bytearray("000000000000000000000000760f00d4ffffffc7000000782c1e3420212224342627252e362d3738271e1f202122232425263333362e37381f0405060708090a0b0c0d0e0f101112131415161718191a1b1c1d2f3130232d350405060708090a0b0c0d0e0f101112131415161718191a1b1c1d2f313035".decode('hex')) print(QWERTY_KEYMAP) print(type(QWERTY_KEYMAP)) str = '000000000000000000000000760f00d4ffffffc7000000782c1e3420212224342627252e362d3738271e1f202122232425263333362e37381f0405060708090a0b0c0d0e0f101112131415161718191a1b1c1d2f3130232d350405060708090a0b0c0d0e0f101112131415161718191a1b1c1d2f313035' b = bytearray(binascii.unhexlify(str)) if b == QWERTY_KEYMAP: print('1')
39.941176
281
0.907216
28
679
21.857143
0.535714
0.078431
0.055556
0
0
0
0
0
0
0
0
0.612654
0.045655
679
16
282
42.4375
0.33179
0
0
0
0
0
0.706922
0.701031
0
1
0
0
0
1
0
false
0
0.125
0
0.125
0.375
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
e9b40b4c44739a23b44a134773f80e78c9a77453
6,131
py
Python
loldib/getratings/models/NA/na_lux/na_lux_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_lux/na_lux_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_lux/na_lux_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Lux_Mid_Aatrox(Ratings): pass class NA_Lux_Mid_Ahri(Ratings): pass class NA_Lux_Mid_Akali(Ratings): pass class NA_Lux_Mid_Alistar(Ratings): pass class NA_Lux_Mid_Amumu(Ratings): pass class NA_Lux_Mid_Anivia(Ratings): pass class NA_Lux_Mid_Annie(Ratings): pass class NA_Lux_Mid_Ashe(Ratings): pass class NA_Lux_Mid_AurelionSol(Ratings): pass class NA_Lux_Mid_Azir(Ratings): pass class NA_Lux_Mid_Bard(Ratings): pass class NA_Lux_Mid_Blitzcrank(Ratings): pass class NA_Lux_Mid_Brand(Ratings): pass class NA_Lux_Mid_Braum(Ratings): pass class NA_Lux_Mid_Caitlyn(Ratings): pass class NA_Lux_Mid_Camille(Ratings): pass class NA_Lux_Mid_Cassiopeia(Ratings): pass class NA_Lux_Mid_Chogath(Ratings): pass class NA_Lux_Mid_Corki(Ratings): pass class NA_Lux_Mid_Darius(Ratings): pass class NA_Lux_Mid_Diana(Ratings): pass class NA_Lux_Mid_Draven(Ratings): pass class NA_Lux_Mid_DrMundo(Ratings): pass class NA_Lux_Mid_Ekko(Ratings): pass class NA_Lux_Mid_Elise(Ratings): pass class NA_Lux_Mid_Evelynn(Ratings): pass class NA_Lux_Mid_Ezreal(Ratings): pass class NA_Lux_Mid_Fiddlesticks(Ratings): pass class NA_Lux_Mid_Fiora(Ratings): pass class NA_Lux_Mid_Fizz(Ratings): pass class NA_Lux_Mid_Galio(Ratings): pass class NA_Lux_Mid_Gangplank(Ratings): pass class NA_Lux_Mid_Garen(Ratings): pass class NA_Lux_Mid_Gnar(Ratings): pass class NA_Lux_Mid_Gragas(Ratings): pass class NA_Lux_Mid_Graves(Ratings): pass class NA_Lux_Mid_Hecarim(Ratings): pass class NA_Lux_Mid_Heimerdinger(Ratings): pass class NA_Lux_Mid_Illaoi(Ratings): pass class NA_Lux_Mid_Irelia(Ratings): pass class NA_Lux_Mid_Ivern(Ratings): pass class NA_Lux_Mid_Janna(Ratings): pass class NA_Lux_Mid_JarvanIV(Ratings): pass class NA_Lux_Mid_Jax(Ratings): pass class NA_Lux_Mid_Jayce(Ratings): pass class NA_Lux_Mid_Jhin(Ratings): pass class NA_Lux_Mid_Jinx(Ratings): pass class NA_Lux_Mid_Kalista(Ratings): pass class NA_Lux_Mid_Karma(Ratings): pass class NA_Lux_Mid_Karthus(Ratings): pass class NA_Lux_Mid_Kassadin(Ratings): pass class NA_Lux_Mid_Katarina(Ratings): pass class NA_Lux_Mid_Kayle(Ratings): pass class NA_Lux_Mid_Kayn(Ratings): pass class NA_Lux_Mid_Kennen(Ratings): pass class NA_Lux_Mid_Khazix(Ratings): pass class NA_Lux_Mid_Kindred(Ratings): pass class NA_Lux_Mid_Kled(Ratings): pass class NA_Lux_Mid_KogMaw(Ratings): pass class NA_Lux_Mid_Leblanc(Ratings): pass class NA_Lux_Mid_LeeSin(Ratings): pass class NA_Lux_Mid_Leona(Ratings): pass class NA_Lux_Mid_Lissandra(Ratings): pass class NA_Lux_Mid_Lucian(Ratings): pass class NA_Lux_Mid_Lulu(Ratings): pass class NA_Lux_Mid_Lux(Ratings): pass class NA_Lux_Mid_Malphite(Ratings): pass class NA_Lux_Mid_Malzahar(Ratings): pass class NA_Lux_Mid_Maokai(Ratings): pass class NA_Lux_Mid_MasterYi(Ratings): pass class NA_Lux_Mid_MissFortune(Ratings): pass class NA_Lux_Mid_MonkeyKing(Ratings): pass class NA_Lux_Mid_Mordekaiser(Ratings): pass class NA_Lux_Mid_Morgana(Ratings): pass class NA_Lux_Mid_Nami(Ratings): pass class NA_Lux_Mid_Nasus(Ratings): pass class NA_Lux_Mid_Nautilus(Ratings): pass class NA_Lux_Mid_Nidalee(Ratings): pass class NA_Lux_Mid_Nocturne(Ratings): pass class NA_Lux_Mid_Nunu(Ratings): pass class NA_Lux_Mid_Olaf(Ratings): pass class NA_Lux_Mid_Orianna(Ratings): pass class NA_Lux_Mid_Ornn(Ratings): pass class NA_Lux_Mid_Pantheon(Ratings): pass class NA_Lux_Mid_Poppy(Ratings): pass class NA_Lux_Mid_Quinn(Ratings): pass class NA_Lux_Mid_Rakan(Ratings): pass class NA_Lux_Mid_Rammus(Ratings): pass class NA_Lux_Mid_RekSai(Ratings): pass class NA_Lux_Mid_Renekton(Ratings): pass class NA_Lux_Mid_Rengar(Ratings): pass class NA_Lux_Mid_Riven(Ratings): pass class NA_Lux_Mid_Rumble(Ratings): pass class NA_Lux_Mid_Ryze(Ratings): pass class NA_Lux_Mid_Sejuani(Ratings): pass class NA_Lux_Mid_Shaco(Ratings): pass class NA_Lux_Mid_Shen(Ratings): pass class NA_Lux_Mid_Shyvana(Ratings): pass class NA_Lux_Mid_Singed(Ratings): pass class NA_Lux_Mid_Sion(Ratings): pass class NA_Lux_Mid_Sivir(Ratings): pass class NA_Lux_Mid_Skarner(Ratings): pass class NA_Lux_Mid_Sona(Ratings): pass class NA_Lux_Mid_Soraka(Ratings): pass class NA_Lux_Mid_Swain(Ratings): pass class NA_Lux_Mid_Syndra(Ratings): pass class NA_Lux_Mid_TahmKench(Ratings): pass class NA_Lux_Mid_Taliyah(Ratings): pass class NA_Lux_Mid_Talon(Ratings): pass class NA_Lux_Mid_Taric(Ratings): pass class NA_Lux_Mid_Teemo(Ratings): pass class NA_Lux_Mid_Thresh(Ratings): pass class NA_Lux_Mid_Tristana(Ratings): pass class NA_Lux_Mid_Trundle(Ratings): pass class NA_Lux_Mid_Tryndamere(Ratings): pass class NA_Lux_Mid_TwistedFate(Ratings): pass class NA_Lux_Mid_Twitch(Ratings): pass class NA_Lux_Mid_Udyr(Ratings): pass class NA_Lux_Mid_Urgot(Ratings): pass class NA_Lux_Mid_Varus(Ratings): pass class NA_Lux_Mid_Vayne(Ratings): pass class NA_Lux_Mid_Veigar(Ratings): pass class NA_Lux_Mid_Velkoz(Ratings): pass class NA_Lux_Mid_Vi(Ratings): pass class NA_Lux_Mid_Viktor(Ratings): pass class NA_Lux_Mid_Vladimir(Ratings): pass class NA_Lux_Mid_Volibear(Ratings): pass class NA_Lux_Mid_Warwick(Ratings): pass class NA_Lux_Mid_Xayah(Ratings): pass class NA_Lux_Mid_Xerath(Ratings): pass class NA_Lux_Mid_XinZhao(Ratings): pass class NA_Lux_Mid_Yasuo(Ratings): pass class NA_Lux_Mid_Yorick(Ratings): pass class NA_Lux_Mid_Zac(Ratings): pass class NA_Lux_Mid_Zed(Ratings): pass class NA_Lux_Mid_Ziggs(Ratings): pass class NA_Lux_Mid_Zilean(Ratings): pass class NA_Lux_Mid_Zyra(Ratings): pass
14.702638
46
0.750938
972
6,131
4.3107
0.151235
0.230549
0.329356
0.428162
0.784726
0.784726
0
0
0
0
0
0
0.18121
6,131
416
47
14.737981
0.834661
0
0
0.498195
0
0
0
0
0
0
0
0
0
1
0
true
0.498195
0.00361
0
0.501805
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
7
75d75c2a11d247df5a759de927e4cb63caa308e2
15,818
py
Python
tests/test_blockio_larger_transactions.py
olamigokayphils/block_io-python
75a3bc9f56054a4a57c1d98642c5cba01f2fb33e
[ "MIT" ]
27
2015-01-08T18:47:37.000Z
2021-12-26T23:14:50.000Z
tests/test_blockio_larger_transactions.py
olamigokayphils/block_io-python
75a3bc9f56054a4a57c1d98642c5cba01f2fb33e
[ "MIT" ]
12
2015-01-12T13:40:06.000Z
2021-06-06T10:48:16.000Z
tests/test_blockio_larger_transactions.py
olamigokayphils/block_io-python
75a3bc9f56054a4a57c1d98642c5cba01f2fb33e
[ "MIT" ]
71
2015-01-28T08:40:25.000Z
2022-02-28T17:39:02.000Z
from block_io import BlockIo import os import unittest import time import json class TestBlockIoLargerTransactions(unittest.TestCase): def setUp(self): self.blockio = BlockIo("", "d1650160bd8d2bb32bebd139d0063eb6063ffa2f9e4501ad", 2) self.dtrust_keys = [ "b515fd806a662e061b488e78e5d0c2ff46df80083a79818e166300666385c0a2", "1584b821c62ecdc554e185222591720d6fe651ed1b820d83f92cdc45c5e21f", "2f9090b8aa4ddb32c3b0b8371db1b50e19084c720c30db1d6bb9fcd3a0f78e61", "6c1cefdfd9187b36b36c3698c1362642083dcc1941dc76d751481d3aa29ca65" ] self.sweep_key = BlockIo.Key.from_wif("cTj8Ydq9LhZgttMpxb7YjYSqsZ2ZfmyzVprQgjEzAzQ28frQi4ML").privkey_hex().decode("utf-8"); self.maxDiff = None def load_json_file(self, path): json_file = open(os.path.join(os.path.dirname(__file__), path)) data = json.load(json_file) json_file.close() return data def test_prepare_dtrust_transaction_p2sh_3of5_195_inputs(self): # dTrust P2WSH-over-P2SH with 195 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2SH_3of5_195inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2SH_3of5_195inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2sh_4of5_195_inputs(self): # dTrust P2WSH-over-P2SH with 195 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2SH_4of5_195inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2SH_4of5_195inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:4]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2wsh_over_p2sh_3of5_251_inputs(self): # dTrust P2WSH-over-P2SH with 251 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2WSH-over-P2SH_3of5_251inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2WSH-over-P2SH_3of5_251inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2wsh_over_p2sh_3of5_252_inputs(self): # dTrust P2WSH-over-P2SH with 252 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2WSH-over-P2SH_3of5_252inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2WSH-over-P2SH_3of5_252inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2wsh_over_p2sh_3of5_253_inputs(self): # dTrust P2WSH-over-P2SH with 253 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2WSH-over-P2SH_3of5_253inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2WSH-over-P2SH_3of5_253inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2wsh_over_p2sh_4of5_251_inputs(self): # dTrust P2WSH-over-P2SH with 251 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2WSH-over-P2SH_4of5_251inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2WSH-over-P2SH_4of5_251inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:4]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2wsh_over_p2sh_4of5_252_inputs(self): # dTrust P2WSH-over-P2SH with 252 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2WSH-over-P2SH_4of5_252inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2WSH-over-P2SH_4of5_252inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:4]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_p2wsh_over_p2sh_4of5_253_inputs(self): # dTrust P2WSH-over-P2SH with 253 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_P2WSH-over-P2SH_4of5_253inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_P2WSH-over-P2SH_4of5_253inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:4]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_3of5_251_inputs(self): # dTrust WITNESS_V0 with 251 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_WITNESS_V0_3of5_251inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_WITNESS_V0_3of5_251inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_3of5_252_inputs(self): # dTrust WITNESS_V0 with 252 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_WITNESS_V0_3of5_252inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_WITNESS_V0_3of5_252inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_3of5_253_inputs(self): # dTrust WITNESS_V0 with 253 inputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_WITNESS_V0_3of5_253inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_WITNESS_V0_3of5_253inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_3of5_251_outputs(self): # dTrust WITNESS_V0 with 251 outputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_witness_v0_3of5_251outputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_witness_v0_3of5_251outputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_3of5_252_outputs(self): # dTrust WITNESS_V0 with 252 outputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_witness_v0_3of5_252outputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_witness_v0_3of5_252outputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_3of5_253_outputs(self): # dTrust WITNESS_V0 with 253 outputs partial prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_witness_v0_3of5_253outputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_witness_v0_3of5_253outputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys[0:3]) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_4of5_251_inputs(self): # dTrust WITNESS_V0 with 251 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_WITNESS_V0_4of5_251inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_WITNESS_V0_4of5_251inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_4of5_252_inputs(self): # dTrust WITNESS_V0 with 252 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_WITNESS_V0_4of5_252inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_WITNESS_V0_4of5_252inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_4of5_253_inputs(self): # dTrust WITNESS_V0 with 253 inputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_WITNESS_V0_4of5_253inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_WITNESS_V0_4of5_253inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_4of5_251_outputs(self): # dTrust WITNESS_V0 with 251 outputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_witness_v0_4of5_251outputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_witness_v0_4of5_251outputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_4of5_252_outputs(self): # dTrust WITNESS_V0 with 252 outputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_witness_v0_4of5_252outputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_witness_v0_4of5_252outputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_dtrust_transaction_witness_v0_4of5_253_outputs(self): # dTrust WITNESS_V0 with 253 outputs full prepare_transaction_response = self.load_json_file("data/json/prepare_dtrust_transaction_response_witness_v0_4of5_253outputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_dtrust_witness_v0_4of5_253outputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response, keys=self.dtrust_keys) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_transaction_p2sh_1of2_251_inputs(self): # P2SH transaction with 251 inputs prepare_transaction_response = self.load_json_file("data/json/prepare_transaction_response_P2WSH-over-P2SH_1of2_251inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_P2WSH-over-P2SH_1of2_251inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_transaction_p2sh_1of2_252_inputs(self): # P2SH transaction with 252 inputs prepare_transaction_response = self.load_json_file("data/json/prepare_transaction_response_P2WSH-over-P2SH_1of2_252inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_P2WSH-over-P2SH_1of2_252inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_transaction_p2sh_1of2_253_inputs(self): # P2SH transaction with 253 inputs prepare_transaction_response = self.load_json_file("data/json/prepare_transaction_response_P2WSH-over-P2SH_1of2_253inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_P2WSH-over-P2SH_1of2_253inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response) self.assertDictEqual(create_and_sign_transaction_response, response) def test_prepare_transaction_p2sh_1of2_762_inputs(self): # P2SH transaction with 762 inputs prepare_transaction_response = self.load_json_file("data/json/prepare_transaction_response_P2WSH-over-P2SH_1of2_762inputs.json") create_and_sign_transaction_response = self.load_json_file("data/json/create_and_sign_transaction_response_P2WSH-over-P2SH_1of2_762inputs.json") response = self.blockio.create_and_sign_transaction(prepare_transaction_response) self.assertDictEqual(create_and_sign_transaction_response, response)
58.585185
159
0.812302
2,011
15,818
5.871208
0.039781
0.231727
0.1057
0.195138
0.937749
0.927924
0.924621
0.924621
0.923096
0.893622
0
0.057283
0.125932
15,818
269
160
58.802974
0.796687
0.062397
0
0.340426
0
0
0.285695
0.285357
0
0
0
0
0.170213
1
0.184397
false
0
0.035461
0
0.234043
0
0
0
0
null
1
0
1
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
8
75f07230ebfb4e5a9315ef3cff89ae7a0c988c76
135
py
Python
historia/country/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
6
2016-04-26T18:39:36.000Z
2021-09-01T09:13:38.000Z
historia/country/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
null
null
null
historia/country/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
4
2016-04-10T23:47:23.000Z
2021-08-15T11:40:28.000Z
from historia.country.enums import * from historia.country.models import * from historia.country.country_service import create_country
33.75
59
0.851852
18
135
6.277778
0.444444
0.318584
0.504425
0.442478
0
0
0
0
0
0
0
0
0.088889
135
3
60
45
0.918699
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
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
8
f94f20dbab90edd776910995ed8e6d805c85a61a
10,827
py
Python
test/test_low_level.py
NKI-CCB/funcsfa
336655531f08aeec0077a443eeb76b92d6677b3a
[ "Apache-2.0" ]
1
2019-01-28T11:47:21.000Z
2019-01-28T11:47:21.000Z
test/test_low_level.py
NKI-CCB/funcsfa
336655531f08aeec0077a443eeb76b92d6677b3a
[ "Apache-2.0" ]
1
2018-11-21T09:37:45.000Z
2018-11-21T15:39:27.000Z
test/test_low_level.py
NKI-CCB/funcsfa
336655531f08aeec0077a443eeb76b92d6677b3a
[ "Apache-2.0" ]
null
null
null
import unittest import numpy as np from funcsfa._lib import Factorization, np_size_t class TestTwoDataTypes(unittest.TestCase): def setUp(self): self.n_features_split = [1000, 1243] self.n_features_split = np.asarray(self.n_features_split, np_size_t) self.n_features = np.sum(self.n_features_split) self.n_samples = 121 self.n_factors = 10 data_shape = (self.n_samples, self.n_features) self.data = dict() self.data['zeros'] = np.zeros(data_shape) self.data['random'] = np.random.normal(0, 1, data_shape) self.Z = np.random.normal(0, 1, (self.n_factors, self.n_samples)) self.B = np.random.normal(0, .5, (self.n_features, self.n_factors)) X = np.dot(self.B, self.Z).T X = X - np.mean(X, 0, keepdims=True) self.data['factorized'] = X self.data = {n: np.require(d, np.dtype('float64'), 'FA') for n, d in self.data.items()} def check_factorization_type_and_shape(self, f): self.assertEqual(f.n_datatypes, len(self.n_features_split)) coefficients = np.asarray(f.coefficients) self.assertEqual(coefficients.shape, (self.n_features, self.n_factors)) self.assertEqual(coefficients.dtype, np.dtype('float64')) factors = np.asarray(f.factors) self.assertEqual(factors.dtype, np.dtype('float64')) self.assertEqual(factors.shape, (self.n_factors, self.n_samples)) factors_cov = np.asarray(f.factors_cov) self.assertEqual(factors_cov.dtype, np.dtype('float64')) self.assertEqual(factors_cov.shape, (self.n_factors, self.n_factors)) residual_var = np.asarray(f.residual_var) self.assertEqual(residual_var.dtype, np.dtype('float64')) self.assertEqual(residual_var.shape, (self.n_features,)) def test_init(self): for d_name, d in self.data.items(): with(self.subTest(data_name=d_name)): f = Factorization(d, self.n_features_split, self.n_factors) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) def test_factorize(self): l = np.array([0.01, 1, 0.01, 1], np.dtype('float64')) max_iter = 10 max_diff = 1e-6 for d_name, d in self.data.items(): with(self.subTest(data_name=d_name)): f = Factorization(d, self.n_features_split, self.n_factors) monitor = f.sfa(max_diff, max_iter, l, True) assert(monitor.n_iter < max_iter+1) assert(all([d >= 0.0 for d in monitor.max_diff_factors[1:]])) assert(all([d >= 0.0 for d in monitor.max_diff_coefficients[1:]])) diff = max([monitor.max_diff_factors[-1], monitor.max_diff_coefficients[-1]]) if (diff > max_diff): self.assertEqual(monitor.n_iter, max_iter) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) def test_factorize_max_iter(self): l = np.array([0.01, 1, 0.01, 1], np.dtype('float64')) max_iter = 10 max_diff = 0.0 for d_name, d in self.data.items(): with(self.subTest(data_name=d_name)): f = Factorization(d, self.n_features_split, self.n_factors) monitor = f.sfa(max_diff, max_iter, l, True) assert(monitor.n_iter < max_iter+1) diff = max([monitor.max_diff_factors[-1], monitor.max_diff_coefficients[-1]]) assert(diff >= 0.0) if diff == 0.0: assert d_name == 'zeros' if (diff > max_diff): self.assertEqual(monitor.n_iter, max_iter) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) def test_factorize_gets_close(self): l2 = 0.1 l = np.array([0.01, l2, 0.02, l2], np.dtype('float64')) max_iter = 1000 max_diff = 1e-6 d_name = 'factorized' d = self.data[d_name] f = Factorization(d, self.n_features_split, self.n_factors) f.sfa(max_diff, max_iter, l) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) coef = f.coefficients * (1+l2) data_rec = np.dot(coef, f.factors).T np.testing.assert_allclose(d, data_rec, atol=1) def test_factorize_converges(self): l = np.array([1e-12, 1e-3, 1e-12, 1e-3], np.dtype('float64')) max_iter = 1000 max_diff = 0.1 d_name = 'factorized' d = self.data[d_name] f = Factorization(d, self.n_features_split, self.n_factors) monitor = f.sfa(max_diff, max_iter, l, True) assert(monitor.n_iter < max_iter) assert(monitor.max_diff_factors[-1] < max_diff) assert(monitor.max_diff_coefficients[-1] < max_diff) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) class TestThreeDataTypes(unittest.TestCase): def setUp(self): self.n_features_split = [1000, 800, 243] self.n_features_split = np.asarray(self.n_features_split, np_size_t) self.n_features = np.sum(self.n_features_split) self.n_samples = 121 self.n_factors = 10 data_shape = (self.n_samples, self.n_features) self.data = dict() self.data['zeros'] = np.zeros(data_shape) self.data['random'] = np.random.normal(0, 1, data_shape) self.Z = np.random.normal(0, 1, (self.n_factors, self.n_samples)) self.B = np.zeros((self.n_features, self.n_factors)) self.B[0:1000, :] = np.random.normal(0, 0.5, (1000, self.n_factors)) self.B[1000:1800, :] = np.random.normal(0, 2, (800, self.n_factors)) self.B[1800:, :] = np.random.normal(0, 0.01, (243, self.n_factors)) X = np.dot(self.B, self.Z).T X = X - np.mean(X, 0, keepdims=True) self.data['factorized'] = X self.data = {n: np.require(d, np.dtype('float64'), 'FA') for n, d in self.data.items()} def check_factorization_type_and_shape(self, f): self.assertEqual(f.n_datatypes, len(self.n_features_split)) coefficients = np.asarray(f.coefficients) self.assertEqual(coefficients.shape, (self.n_features, self.n_factors)) self.assertEqual(coefficients.dtype, np.dtype('float64')) factors = np.asarray(f.factors) self.assertEqual(factors.dtype, np.dtype('float64')) self.assertEqual(factors.shape, (self.n_factors, self.n_samples)) factors_cov = np.asarray(f.factors_cov) self.assertEqual(factors_cov.dtype, np.dtype('float64')) self.assertEqual(factors_cov.shape, (self.n_factors, self.n_factors)) residual_var = np.asarray(f.residual_var) self.assertEqual(residual_var.dtype, np.dtype('float64')) self.assertEqual(residual_var.shape, (self.n_features,)) def test_init(self): for d_name, d in self.data.items(): with(self.subTest(data_name=d_name)): f = Factorization(d, self.n_features_split, self.n_factors) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) def test_factorize(self): l = np.array([0.01, 1] * len(self.n_features_split), np.dtype('float64')) max_iter = 10 max_diff = 1e-6 for d_name, d in self.data.items(): with(self.subTest(data_name=d_name)): f = Factorization(d, self.n_features_split, self.n_factors) monitor = f.sfa(max_diff, max_iter, l, True) diff = max([monitor.max_diff_factors[-1], monitor.max_diff_coefficients[-1]]) assert(monitor.n_iter < max_iter+1) assert(diff >= 0.0) if (diff > max_diff): self.assertEqual(monitor.n_iter, max_iter) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) def test_factorize_max_iter(self): l = np.array([0.01, 1] * len(self.n_features_split), np.dtype('float64')) max_iter = 10 max_diff = 0.0 for d_name, d in self.data.items(): with(self.subTest(data_name=d_name)): f = Factorization(d, self.n_features_split, self.n_factors) monitor = f.sfa(max_diff, max_iter, l, True) diff = max([monitor.max_diff_factors[-1], monitor.max_diff_coefficients[-1]]) assert(monitor.n_iter < max_iter+1) assert(diff >= 0.0) if diff == 0.0: assert d_name == 'zeros' if (diff > max_diff): self.assertEqual(monitor.n_iter, max_iter) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) def test_factorize_gets_close(self): l2 = 0.1 l = np.array([0.01, l2, 0.02, l2, 1e-6], np.dtype('float64')) max_iter = 1000 max_diff = 1e-6 d_name = 'factorized' d = self.data[d_name] f = Factorization(d, self.n_features_split, self.n_factors) f.sfa(max_diff, max_iter, l) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f) coef = f.coefficients * (1+l2) data_rec = np.dot(coef, f.factors).T np.testing.assert_allclose(d, data_rec, atol=1) def test_factorize_converges(self): l = np.array([1e-12, 1e-3] * len(self.n_features_split), np.dtype('float64')) max_iter = 1000 max_diff = 0.1 d_name = 'factorized' d = self.data[d_name] f = Factorization(d, self.n_features_split, self.n_factors) monitor = f.sfa(max_diff, max_iter, l, True) assert(monitor.n_iter < max_iter) assert(monitor.max_diff_factors[-1] < max_diff) assert(monitor.max_diff_coefficients[-1] < max_diff) self.assertEqual(np.byte_bounds(d), np.byte_bounds(f.data)) self.check_factorization_type_and_shape(f)
45.301255
76
0.588621
1,493
10,827
4.046216
0.068319
0.056282
0.071015
0.068532
0.971031
0.952988
0.950836
0.946035
0.946035
0.946035
0
0.032755
0.286598
10,827
238
77
45.491597
0.749353
0
0
0.917431
0
0
0.020504
0
0
0
0
0
0.233945
1
0.06422
false
0
0.013761
0
0.087156
0
0
0
0
null
0
0
0
1
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
7
f9531aed5941f82aa309e898eb7bd5a8d8590f3c
4,916
py
Python
hotstepper/mixins/MathFunctionsMixin.py
TangleSpace/hotstepper
4d8a278d94f19fee2bc4d3ba25628fa69ed3653d
[ "MIT" ]
12
2021-03-06T23:32:12.000Z
2021-11-06T20:58:43.000Z
hotstepper/mixins/MathFunctionsMixin.py
TangleSpace/hotstepper
4d8a278d94f19fee2bc4d3ba25628fa69ed3653d
[ "MIT" ]
5
2021-03-06T01:55:12.000Z
2021-03-13T23:01:32.000Z
hotstepper/mixins/MathFunctionsMixin.py
TangleSpace/hotstepper
4d8a278d94f19fee2bc4d3ba25628fa69ed3653d
[ "MIT" ]
1
2021-03-13T14:34:43.000Z
2021-03-13T14:34:43.000Z
from abc import ABC import numpy as np from hotstepper.mixins.operations import apply_math_function class MathFunctionsMixin(ABC): def __rfloordiv__(self,other): return apply_math_function(self,other,np.floor_divide) def __rtruediv__(self,other): return (self**-1)*other def __mod__(self,other): """ The **%** operation to take modulo int, float, step and steps objects like they are numbers. .. note:: right and in-place subtraction is also available. - 3 - steps - steps -= 3 - steps - 3 Parameters ============== other : int, float, Step, Steps. The thing to modulo against these steps, a single step or series of steps can be combined with the steps. Returns ============ Steps A new steps object consisting of this object with additional step objects representing the other operand. """ return apply_math_function(self,other,np.fmod) def __floordiv__(self,other): return apply_math_function(self,other,np.floor_divide) def __truediv__(self,other): """ The \/ operation to divide int, float, step and steps objects like they are numbers. .. note:: right and in-place division is also available. - 3/steps - steps /=3 - steps/3 Parameters ============== other : int, float, Step, Steps. The thing to divide these steps, a single step or series of steps can be combined with the steps. Returns ============ Steps A new steps object consisting of this object with additional step objects representing the other operand. """ return apply_math_function(self,other,np.true_divide) def __mul__(self,other): """ The \* operation to multiply int, float, step and steps objects like they are numbers. .. note:: right and in-place multiplication is also available. - 3\*steps - steps \*=3 - steps\*3 Parameters ============== other : int, float, Step, Steps. The thing to multiply these steps, a single step or series of steps can be combined with the steps. Returns ============ Steps A new steps object consisting of this object with additional step objects representing the other operand. """ return apply_math_function(self,other,np.multiply) def __pow__(self,power_val): """ The **^** operation to raise the steps to the power of. Parameters ============== other : int, float, Step, Steps. The thing to raise to the power of these steps, a single step or series of steps can be combined with the steps. Returns ============ Steps A new steps object consisting of this object with additional step objects representing the other operand. """ return apply_math_function(self,power_val,np.power) def __radd__(self,other): return apply_math_function(self,other,np.add) def __add__(self,other): """ The **+** operation to add int, float, step and steps objects like they are numbers. .. note:: right and in-place addition is also available. - 3 + steps - steps += 3 - steps + 3 Parameters ============== other : int, float, Step, Steps The thing to add to these steps, a single step or series of steps can be combined with the steps. Returns ============ Steps A new steps object consisting of this object with additional step objects representing the other operand. """ return apply_math_function(self,other,np.add) def __rsub__(self,other): return -1*self + other def __rmul__(self,other): return apply_math_function(self,other,np.multiply) def __sub__(self,other): """ The **-** operation to subtract int, float, step and steps objects like they are numbers. .. note:: right and in-place subtraction is also available. - 3 - steps - steps -= 3 - steps - 3 Parameters ============== other : int, float, Step, Steps. The thing to subtract from these steps, a single step or series of steps can be combined with the steps. Returns ============ Steps A new steps object consisting of this object with additional step objects representing the other operand. """ return apply_math_function(self,other,np.subtract)
29.793939
124
0.570179
581
4,916
4.695353
0.151463
0.069282
0.068548
0.084311
0.834677
0.792522
0.792522
0.792522
0.792522
0.733138
0
0.005212
0.336452
4,916
164
125
29.97561
0.831085
0.591131
0
0.214286
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0.107143
0.214286
1
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
1
0
0
0
1
1
0
0
9
f9627acf46f3f3e0602ca24154e2da3d6413c68e
461
py
Python
compoundinterest/__init__.py
zaafirrahman/compoundinterest
4b2244139b771acafa4a09c0bbf20ca5342e186b
[ "MIT" ]
1
2022-02-25T04:08:47.000Z
2022-02-25T04:08:47.000Z
compoundinterest/__init__.py
zaafirrahman/compoundinterest
4b2244139b771acafa4a09c0bbf20ca5342e186b
[ "MIT" ]
null
null
null
compoundinterest/__init__.py
zaafirrahman/compoundinterest
4b2244139b771acafa4a09c0bbf20ca5342e186b
[ "MIT" ]
null
null
null
def fp(i,n) : i /= 100 return (1+i)**n def pf(i,n) : i /= 100 return 1/((1+i)**n) def fa(i,n) : i /= 100 return (((1+i)**n)-1)/i def af(i,n) : i /= 100 return i/(((1+i)**n)-1) def pa(i,n) : i /= 100 return (((1+i)**n)-1)/(i*((1+i)**n)) def ap(i,n) : i /= 100 return (i*((1+i)**n))/(((1+i)**n)-1) def pg(i,n) : i /= 100 return (((1+i)**n)-(1+n*i))/((i**2)*((1+i)**n)) def ag(i,n) : i /= 100 return (1/i)-(n/(((1+i)**n)-1))
14.40625
49
0.40564
107
461
1.747664
0.140187
0.213904
0.192513
0.256684
0.748663
0.716578
0.647059
0.620321
0.540107
0.454545
0
0.122905
0.223427
461
31
50
14.870968
0.399441
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
1
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
8
f99bd323f95204885e77c8cdc271aff5017c558a
165
py
Python
contrib/kmb_search/nn_cluster/io.py
gauenk/faiss_fork
f51ffb536f829358bd1907acda89dfc8c1bc4146
[ "MIT" ]
null
null
null
contrib/kmb_search/nn_cluster/io.py
gauenk/faiss_fork
f51ffb536f829358bd1907acda89dfc8c1bc4146
[ "MIT" ]
null
null
null
contrib/kmb_search/nn_cluster/io.py
gauenk/faiss_fork
f51ffb536f829358bd1907acda89dfc8c1bc4146
[ "MIT" ]
null
null
null
import torch import numpy as np from einops import rearrange,repeat def load_nn_model(model_info): return None def save_nn_model(model_info): return None
15
35
0.781818
27
165
4.555556
0.62963
0.113821
0.195122
0.260163
0.422764
0.422764
0
0
0
0
0
0
0.175758
165
10
36
16.5
0.904412
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.428571
0.285714
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
1
1
1
0
0
7
f9ae09bf029f5c6ece3704cab88075f30655aaef
5,321
py
Python
rtl/tests/system-wb/tests.py
andars/4ft4
9417585b62b77f0bda72091bcc064eb2b8b623a8
[ "MIT" ]
null
null
null
rtl/tests/system-wb/tests.py
andars/4ft4
9417585b62b77f0bda72091bcc064eb2b8b623a8
[ "MIT" ]
null
null
null
rtl/tests/system-wb/tests.py
andars/4ft4
9417585b62b77f0bda72091bcc064eb2b8b623a8
[ "MIT" ]
null
null
null
import cocotb from cocotb.clock import Clock from cocotb.triggers import ClockCycles from cocotbext.wishbone.driver import WBOp, WishboneMaster @cocotb.test() async def test_system_wb_interface(dut): # start a 100 MHz clock clock = Clock(dut.clock, round(1e3/100), units="ns") cocotb.start_soon(clock.start()) wb = WishboneMaster(dut, None, dut.clock, width=32, signals_dict={"cyc": "wb_cyc_i", "stb": "wb_strobe_i", "we": "wb_we_i", "adr": "wb_addr_i", "datwr":"wb_data_i", "datrd":"wb_data_o", "ack": "wb_ack_o" }) dut.halt.value = 0 # reset dut.reset.value = 1 await ClockCycles(dut.clock, 32) dut.reset.value = 0 dut._log.info("begin test of wb-controlled system") # write pattern to start of ram ram_base = 0x10000 cmds = [WBOp(ram_base + 4*i, 0xa) for i in range(16)] await wb.send_cycle(cmds) # give the cpu some time to run await ClockCycles(dut.clock, 8 * 16) # read back ram and check that it has not changed cmds = [WBOp(ram_base + 4*i) for i in range(16)] responses = await wb.send_cycle(cmds) values = [transaction.datrd for transaction in responses] dut._log.info("read {}".format([hex(v) for v in values])) assert values == [0xa for i in range(16)] # LDM 5 # FIM 0P 0 # SRC 0P # WRM program = [0xd5, 0x20, 0x00, 0x21, 0xe0] # write the program at an offset because the wb writes # currently will race with the cpu (which will start at 0). offset = 0x40 cmds = [WBOp(4 * (i + offset), program[i]) for i in range(len(program))] await wb.send_cycle(cmds) # give the cpu some more time to run await ClockCycles(dut.clock, 16 * 16) # read back ram[0] to verify the program executed responses = await wb.send_cycle([WBOp(ram_base)]) values = [transaction.datrd for transaction in responses] dut._log.info("read {}".format([hex(v) for v in values])) assert values == [0x5] # write values to ram ram_base = 0x10000 for r in range(2): cmds = [WBOp(ram_base + 0x200 * r + 4*i, i) for i in range(16)] await wb.send_cycle(cmds) # then read them back and verify cmds = [WBOp(ram_base + 4*i) for i in range(16)] responses = await wb.send_cycle(cmds) values = [transaction.datrd for transaction in responses] dut._log.info("read {}".format([hex(v) for v in values])) assert values == [i for i in range(16)] @cocotb.test() async def test_system_wb_interface_halted(dut): # start a 100 MHz clock clock = Clock(dut.clock, round(1e3/100), units="ns") cocotb.start_soon(clock.start()) wb = WishboneMaster(dut, None, dut.clock, width=32, signals_dict={"cyc": "wb_cyc_i", "stb": "wb_strobe_i", "we": "wb_we_i", "adr": "wb_addr_i", "datwr":"wb_data_i", "datrd":"wb_data_o", "ack": "wb_ack_o" }) dut.halt.value = 1 # reset dut.reset.value = 1 await ClockCycles(dut.clock, 32) dut.reset.value = 0 dut._log.info("begin test of wb-controlled system") # write pattern to start of ram ram_base = 0x10000 cmds = [WBOp(ram_base + 4*i, 0xa) for i in range(16)] await wb.send_cycle(cmds) # give the cpu some time to run await ClockCycles(dut.clock, 8 * 16) # read back ram and check that it has not changed cmds = [WBOp(ram_base + 4*i) for i in range(16)] responses = await wb.send_cycle(cmds) values = [transaction.datrd for transaction in responses] dut._log.info("read {}".format([hex(v) for v in values])) assert values == [0xa for i in range(16)] # LDM 5 # FIM 0P 0 # SRC 0P # WRM program = [0xd5, 0x20, 0x00, 0x21, 0xe0] offset = 0x40 cmds = [WBOp(4 * (i + offset), program[i]) for i in range(len(program))] await wb.send_cycle(cmds) # give the cpu some more time to run await ClockCycles(dut.clock, 16 * 16) # read back ram[0] to verify the program did not execute while halt was asserted responses = await wb.send_cycle([WBOp(ram_base)]) values = [transaction.datrd for transaction in responses] dut._log.info("read {}".format([hex(v) for v in values])) assert values == [0xa] # write values to ram ram_base = 0x10000 for r in range(2): cmds = [WBOp(ram_base + 0x200 * r + 4*i, i) for i in range(16)] await wb.send_cycle(cmds) # then read them back and verify cmds = [WBOp(ram_base + 4*i) for i in range(16)] responses = await wb.send_cycle(cmds) values = [transaction.datrd for transaction in responses] dut._log.info("read {}".format([hex(v) for v in values])) assert values == [i for i in range(16)]
33.465409
84
0.562488
749
5,321
3.898531
0.176235
0.038356
0.028767
0.05274
0.909932
0.909932
0.909932
0.909932
0.883219
0.883219
0
0.045214
0.32663
5,321
158
85
33.677215
0.769746
0.137756
0
0.895833
0
0
0.062294
0
0
0
0.022812
0
0.0625
1
0
false
0
0.041667
0
0.041667
0
0
0
0
null
0
0
0
1
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
7
f9d47a00b205ccadc8ee42eb1403f11026826a0f
736
py
Python
python/testData/highlighting/fStringLiterals.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/highlighting/fStringLiterals.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/highlighting/fStringLiterals.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
a = <error descr="Python version 2.7 does not support a 'F' prefix">f</error>"" a = <error descr="Python version 2.7 does not support a 'F' prefix">F</error>"" a = <error descr="Python version 2.7 does not support a 'RF' prefix">rf</error>"" a = <error descr="Python version 2.7 does not support a 'FR' prefix">fr</error>"" a = <error descr="Python version 2.7 does not support a 'FU' prefix">fu</error>"" a = <error descr="Python version 2.7 does not support a 'UF' prefix">uf</error>"" a = <error descr="Python version 2.7 does not support a 'BF' prefix">bf</error>"" a = <error descr="Python version 2.7 does not support a 'FB' prefix">fb</error>"" a = <error descr="Python version 2.7 does not support a 'UFR' prefix">ufr</error>""
73.6
83
0.682065
135
736
3.718519
0.140741
0.10757
0.197211
0.304781
0.846614
0.846614
0.846614
0.846614
0.846614
0.846614
0
0.028662
0.146739
736
9
84
81.777778
0.770701
0
0
0
0
0
0.597826
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
10
ddfc1290f0735d16298001f8e834dfbf42fec68a
199
py
Python
tests/test_data_metric_connector/test_utils/test_file_size.py
Data-Metric/data-metric-connectors
774eadba58ad32ceace7b25f5bc8aa7448b1c67e
[ "MIT" ]
null
null
null
tests/test_data_metric_connector/test_utils/test_file_size.py
Data-Metric/data-metric-connectors
774eadba58ad32ceace7b25f5bc8aa7448b1c67e
[ "MIT" ]
null
null
null
tests/test_data_metric_connector/test_utils/test_file_size.py
Data-Metric/data-metric-connectors
774eadba58ad32ceace7b25f5bc8aa7448b1c67e
[ "MIT" ]
null
null
null
from data_metric_connector.utils.file_size import convert_size def test_convert_size(): assert convert_size(1024) == "1.0 KB" def test_convert_size_zero(): assert convert_size(0) == "0B"
19.9
62
0.748744
31
199
4.451613
0.580645
0.398551
0.202899
0.26087
0
0
0
0
0
0
0
0.047059
0.145729
199
9
63
22.111111
0.764706
0
0
0
0
0
0.040201
0
0
0
0
0
0.4
1
0.4
true
0
0.2
0
0.6
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
7
34f30c74ec4e68b37b9592ea158b1e212d70cbcf
1,330
py
Python
WebApp/maps/models.py
limeonion/Globetrotter
06bc7e06f4584593e170393a451401bac96511d9
[ "MIT" ]
null
null
null
WebApp/maps/models.py
limeonion/Globetrotter
06bc7e06f4584593e170393a451401bac96511d9
[ "MIT" ]
null
null
null
WebApp/maps/models.py
limeonion/Globetrotter
06bc7e06f4584593e170393a451401bac96511d9
[ "MIT" ]
null
null
null
from django.db import models from django_mysql.models import JSONField # Create your models here. #Model to store the search history class Data(models.Model): start_point = models.CharField(max_length=200) destination = models.CharField(max_length=200) search_date = models.DateField(auto_now=True) google_response = models.TextField(max_length=1000) weather_response = models.TextField(max_length=1000) class DataTable(models.Model): Start = models.CharField(max_length=200) End = models.CharField(max_length=200) Mode = models.CharField(max_length=50) date = models.DateField(auto_now=True) google_response = models.TextField(max_length=1000) weather_response = models.TextField(max_length=1000) class ModelDataTable(models.Model): Start = models.CharField(max_length=200) End = models.CharField(max_length=200) Mode = models.CharField(max_length=50) date = models.DateField(auto_now=True) google_response = JSONField() weather_response = models.TextField(max_length=1000) class Model_DataTable(models.Model): Start = models.CharField(max_length=200) End = models.CharField(max_length=200) Mode = models.CharField(max_length=50) date = models.DateField(auto_now=True) google_response = JSONField() weather_response = JSONField()
34.102564
56
0.755639
174
1,330
5.591954
0.229885
0.147996
0.203494
0.271326
0.811922
0.756423
0.756423
0.756423
0.722508
0.722508
0
0.044053
0.146617
1,330
39
57
34.102564
0.813216
0.042857
0
0.655172
0
0
0
0
0
0
0
0
0
1
0
false
0
0.068966
0
1
0
0
0
0
null
0
1
1
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
8
5500d067241a03ca8c0b1cf0195b9d1d97a692a5
49
py
Python
picomc/java/__init__.py
Zajozor/picomc
3df03c1191544053ea1e237b9860ed9f4782b029
[ "MIT" ]
46
2020-07-09T22:11:22.000Z
2022-03-29T05:44:23.000Z
picomc/java/__init__.py
Zajozor/picomc
3df03c1191544053ea1e237b9860ed9f4782b029
[ "MIT" ]
20
2020-07-13T19:59:48.000Z
2022-03-15T22:53:37.000Z
picomc/java/__init__.py
Zajozor/picomc
3df03c1191544053ea1e237b9860ed9f4782b029
[ "MIT" ]
6
2021-04-27T19:55:10.000Z
2022-01-11T10:07:21.000Z
from .javainfo import assert_java, get_java_info
24.5
48
0.857143
8
49
4.875
0.875
0
0
0
0
0
0
0
0
0
0
0
0.102041
49
1
49
49
0.886364
0
0
0
0
0
0
0
0
0
0
0
1
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
1
0
0
1
0
1
0
1
0
0
7
551acd85812ac4f266726d4b991f530e33d02846
257
py
Python
data/__init__.py
lucasvenez/mult
d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1
[ "Apache-2.0" ]
12
2020-10-13T01:27:35.000Z
2021-11-22T13:42:26.000Z
data/__init__.py
lucasvenez/mult
d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1
[ "Apache-2.0" ]
null
null
null
data/__init__.py
lucasvenez/mult
d5977f628f89a7f8f3ff31ba5c0b0be908d5e5c1
[ "Apache-2.0" ]
2
2020-10-12T13:40:41.000Z
2022-03-29T05:28:59.000Z
from data.load_util import * from data.load_data_mmrf import * from data.load_data_gse68465 import * from data.load_data_gse96058 import * from data.load_data_gse94873 import * from data.load_data_gse135820 import * from data.load_data_gse136400 import *
25.7
38
0.828794
41
257
4.878049
0.268293
0.28
0.42
0.54
0.66
0
0
0
0
0
0
0.118943
0.116732
257
9
39
28.555556
0.762115
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
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
7
551e15836b35310d74ed1e5d7a3b8d575def3da3
6,400
py
Python
environments/MiniGridCustom.py
vanstrn/RL_public
0e971e40e063b17918460e19728f95d7924af8db
[ "MIT" ]
1
2021-03-19T17:57:51.000Z
2021-03-19T17:57:51.000Z
environments/MiniGridCustom.py
vanstrn/RL_public
0e971e40e063b17918460e19728f95d7924af8db
[ "MIT" ]
null
null
null
environments/MiniGridCustom.py
vanstrn/RL_public
0e971e40e063b17918460e19728f95d7924af8db
[ "MIT" ]
null
null
null
import gym import numpy as np from gym_minigrid.minigrid import * from gym_minigrid.register import register class Static4Rooms(MiniGridEnv): def __init__(self, agent_pos=None, goal_pos=None): self._agent_default_pos = agent_pos self._goal_default_pos = goal_pos super().__init__(grid_size=19, max_steps=100) def _gen_grid(self,width,height): # Create the grid self.grid = Grid(width, height) # Generate the surrounding walls self.grid.horz_wall(0, 0) self.grid.horz_wall(0, height - 1) self.grid.vert_wall(0, 0) self.grid.vert_wall(width - 1, 0) room_w = width // 2 room_h = height // 2 # For each row of rooms for j in range(0, 2): # For each column for i in range(0, 2): xL = i * room_w yT = j * room_h xR = xL + room_w yB = yT + room_h # Bottom wall and door if i + 1 < 2: self.grid.vert_wall(xR, yT, room_h) pos = (xR, yT + 4) self.grid.set(*pos, None) # Bottom wall and door if j + 1 < 2: self.grid.horz_wall(xL, yB, room_w) pos = (xL+4, yB) self.grid.set(*pos, None) # Randomize the player start position and orientation if self._agent_default_pos is not None: self.agent_pos = self._agent_default_pos self.grid.set(*self._agent_default_pos, None) self.agent_dir = self._rand_int(0, 4) # assuming random start direction else: self.place_agent() if self._goal_default_pos is not None: goal = Goal() self.put_obj(goal, *self._goal_default_pos) goal.init_pos, goal.cur_pos = self._goal_default_pos else: self.place_obj(Goal()) self.mission = 'Reach the goal' def step(self, action): obs, reward, done, info = MiniGridEnv.step(self, action) return obs, reward, done, info class Static4Rooms_30(MiniGridEnv): def __init__(self, agent_pos=None, goal_pos=None): self._agent_default_pos = agent_pos self._goal_default_pos = goal_pos super().__init__(grid_size=30, max_steps=150) def _gen_grid(self,width,height): # Create the grid self.grid = Grid(width, height) # Generate the surrounding walls self.grid.horz_wall(0, 0) self.grid.horz_wall(0, height - 1) self.grid.vert_wall(0, 0) self.grid.vert_wall(width - 1, 0) room_w = width // 2 room_h = height // 2 # For each row of rooms for j in range(0, 2): # For each column for i in range(0, 2): xL = i * room_w yT = j * room_h xR = xL + room_w yB = yT + room_h # Bottom wall and door if i + 1 < 2: self.grid.vert_wall(xR, yT, room_h) pos = (xR, yT + 5) self.grid.set(*pos, None) pos = (xR, yT + 6) self.grid.set(*pos, None) # Bottom wall and door if j + 1 < 2: self.grid.horz_wall(xL, yB, room_w) pos = (xL+6, yB) self.grid.set(*pos, None) pos = (xL+7, yB) self.grid.set(*pos, None) # Randomize the player start position and orientation if self._agent_default_pos is not None: self.agent_pos = self._agent_default_pos self.grid.set(*self._agent_default_pos, None) self.agent_dir = self._rand_int(0, 4) # assuming random start direction else: self.place_agent() if self._goal_default_pos is not None: goal = Goal() self.put_obj(goal, *self._goal_default_pos) goal.init_pos, goal.cur_pos = self._goal_default_pos else: self.place_obj(Goal()) self.mission = 'Reach the goal' def step(self, action): obs, reward, done, info = MiniGridEnv.step(self, action) return obs, reward, done, info class Clasic4Rooms(MiniGridEnv): def __init__(self, agent_pos=None, goal_pos=None): self._agent_default_pos = agent_pos self._goal_default_pos = goal_pos super().__init__(grid_size=13, max_steps=100) def _gen_grid(self,width,height): # Create the grid self.grid = Grid(width, height) # Generate the surrounding walls self.grid.horz_wall(0, 0) self.grid.horz_wall(0, height - 1) self.grid.vert_wall(0, 0) self.grid.vert_wall(width - 1, 0) room_w = width // 2 room_h = height // 2 # Creating Walls self.grid.vert_wall(6, 0, height) self.grid.horz_wall(6, 7, width//2) self.grid.horz_wall(0, 6, width//2) self.grid.set(6,3, None) self.grid.set(2,6, None) self.grid.set(6,10, None) self.grid.set(9,7, None) # Randomize the player start position and orientation if self._agent_default_pos is not None: self.agent_pos = self._agent_default_pos self.grid.set(*self._agent_default_pos, None) self.agent_dir = self._rand_int(0, 4) # assuming random start direction else: self.place_agent() if self._goal_default_pos is not None: goal = Goal() self.put_obj(goal, *self._goal_default_pos) goal.init_pos, goal.cur_pos = self._goal_default_pos else: self.place_obj(Goal()) self.mission = 'Reach the goal' def step(self, action): obs, reward, done, info = MiniGridEnv.step(self, action) return obs, reward, done, info register( id='MiniGrid-FourRooms-v1', entry_point='environments.MiniGridCustom:Static4Rooms' ) register( id='MiniGrid-FourRooms-v2', entry_point='environments.MiniGridCustom:Clasic4Rooms' ) register( id='MiniGrid-FourRooms-30-v1', entry_point='environments.MiniGridCustom:Static4Rooms_30' ) if __name__ == "__main__": env = gym.make("MiniGrid-FourRooms-v2") env.render()
32.323232
84
0.562188
855
6,400
3.975439
0.133333
0.082377
0.042071
0.067079
0.859665
0.854369
0.812004
0.812004
0.812004
0.812004
0
0.025077
0.339531
6,400
197
85
32.48731
0.77904
0.088594
0
0.758621
0
0
0.044743
0.036138
0
0
0
0
0
1
0.062069
false
0
0.027586
0
0.131034
0
0
0
0
null
0
0
0
1
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
7
9b8bc3ffcb854034ad745cc04662a33cc6c7ab57
169
py
Python
app/models/__init__.py
luovkle/FastAPI-Movie-Manager
716eeb66a63a47488c4f3fa390321361fd94dbc6
[ "MIT" ]
null
null
null
app/models/__init__.py
luovkle/FastAPI-Movie-Manager
716eeb66a63a47488c4f3fa390321361fd94dbc6
[ "MIT" ]
null
null
null
app/models/__init__.py
luovkle/FastAPI-Movie-Manager
716eeb66a63a47488c4f3fa390321361fd94dbc6
[ "MIT" ]
null
null
null
from .director import Director # noqa: F401 from .actor import Actor # noqa: F401 from .film_actor import FilmActor # noqa: F401 from .film import Film # noqa: F401
33.8
47
0.739645
25
169
4.96
0.32
0.258065
0.290323
0.258065
0
0
0
0
0
0
0
0.087591
0.189349
169
4
48
42.25
0.817518
0.254438
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
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
8
32d6d02f8a2f33ddefa133dab888ceab366c1428
56,409
py
Python
tests/test_resources/concept_ids/taxonomy_replace/test_data_for_occupation.py
JobtechSwe/sokannonser-api
84214c51429fcedffa9a5d7d93afd9fdc080dcbb
[ "Apache-2.0" ]
14
2018-09-12T14:08:54.000Z
2021-09-20T11:54:20.000Z
tests/test_resources/concept_ids/taxonomy_replace/test_data_for_occupation.py
JobtechSwe/sokannonser-api
84214c51429fcedffa9a5d7d93afd9fdc080dcbb
[ "Apache-2.0" ]
43
2018-09-25T14:39:02.000Z
2021-10-01T08:40:23.000Z
tests/test_resources/concept_ids/taxonomy_replace/test_data_for_occupation.py
JobtechSwe/sokannonser-api
84214c51429fcedffa9a5d7d93afd9fdc080dcbb
[ "Apache-2.0" ]
8
2018-11-21T23:51:47.000Z
2021-06-04T10:34:16.000Z
occupation_names_test_data = [ {'old': 'Jx4V_6tm_fUH', 'replaced_by': 'YcvM_Gqk_6U7', 'label': 'Utvecklingsingenjör, elkraft', 'hits_old': ['24647561', '24645432', '24615762', '24504276'], 'replacing_old_concept_ids': ['Jx4V_6tm_fUH', 'YcvM_Gqk_6U7', 'Jx4V_6tm_fUH', 'Jx4V_6tm_fUH'], 'hits_replaced_by': ['24647561', '24645432', '24615762', '24504276']}, {'old': 'P2bU_f8o_Lkw', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft', 'hits_old': ['24632281', '24573532'], 'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'], 'hits_replaced_by': ['24632281', '24622759', '24573532']}, {'old': 'v5nC_xX1_Y7U', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft', 'hits_old': ['24632281', '24573532'], 'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'], 'hits_replaced_by': ['24632281', '24622759', '24573532']}, {'old': 'VCsj_Uve_6EJ', 'replaced_by': 'ATAp_LN5_BPU', 'label': 'Ekonomiföreståndare/Kursgårdsföreståndare/Storhushållsföreståndare', 'hits_old': ['24647491'], 'replacing_old_concept_ids': ['VCsj_Uve_6EJ'], 'hits_replaced_by': ['24647491']}, {'old': 'sqJi_voF_eaR', 'replaced_by': 'ATAp_LN5_BPU', 'label': 'Ekonomiföreståndare/Kursgårdsföreståndare/Storhushållsföreståndare', 'hits_old': [], 'replacing_old_concept_ids': ['VCsj_Uve_6EJ'], 'hits_replaced_by': ['24647491']}, {'old': 'aCbh_uAN_6th', 'replaced_by': 'ATAp_LN5_BPU', 'label': 'Ekonomiföreståndare/Kursgårdsföreståndare/Storhushållsföreståndare', 'hits_old': [], 'replacing_old_concept_ids': ['VCsj_Uve_6EJ'], 'hits_replaced_by': ['24647491']}, {'old': 'Yx7u_AbE_Jqk', 'replaced_by': 'cYP6_Tur_q6m', 'label': 'Arbetsledare, städ/Husfru/Städledare', 'hits_old': ['24648781', '24638880', '24633176'], 'replacing_old_concept_ids': ['Yx7u_AbE_Jqk', 'cYP6_Tur_q6m', 'Yx7u_AbE_Jqk'], 'hits_replaced_by': ['24648781', '24638880', '24633176']}, {'old': 'JKDm_nyA_8bK', 'replaced_by': 'efyx_6es_7jQ', 'label': 'Montör, gummi- och plastprodukter', 'hits_old': ['24648645', '24641319', '24638460', '24635077'], 'replacing_old_concept_ids': ['efyx_6es_7jQ', 'efyx_6es_7jQ', 'efyx_6es_7jQ', 'efyx_6es_7jQ'], 'hits_replaced_by': ['24648645', '24641319', '24638460', '24635077']}, {'old': 'D3M6_p8P_jdD', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft', 'hits_old': ['24632281', '24573532'], 'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'], 'hits_replaced_by': ['24632281', '24622759', '24573532']}, {'old': 'gE2Y_BMR_Dpq', 'replaced_by': 'q6mQ_fnc_A9Y', 'label': 'Badföreståndare/Simhallsföreståndare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'RhoN_Vdo_F5H', 'replaced_by': 'Bfn9_6FK_iaY', 'label': 'F&B Manager/Food and beverage manager', 'hits_old': ['24649158'], 'replacing_old_concept_ids': ['RhoN_Vdo_F5H'], 'hits_replaced_by': ['24649158']}, {'old': 'FoCc_qZ4_Yi8', 'replaced_by': '2AGe_heZ_E94', 'label': 'Försäkringshandläggare, försäkringskassa', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'fo9m_5cC_y8G', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor', 'hits_old': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121'], 'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9'], 'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']}, {'old': 'D7tB_NxQ_ZWN', 'replaced_by': 'GX5o_8RD_rxJ', 'label': 'Demograf', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'KgMS_ENm_V7z', 'replaced_by': 'dBVw_5Cw_upG', 'label': 'Familjerättssekreterare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'cUKA_xwQ_VWk', 'replaced_by': 's9UN_r5w_c5K', 'label': 'Aktuarie/Försäkringsaktuarie/Försäkringsmatematiker', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'AJSy_PSb_tLY', 'replaced_by': 's9UN_r5w_c5K', 'label': 'Aktuarie/Försäkringsaktuarie/Försäkringsmatematiker', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'e885_ehx_zxp', 'replaced_by': 'GgmE_SvH_mtm', 'label': 'Veterinär', 'hits_old': ['24622052', '24612672'], 'replacing_old_concept_ids': ['GgmE_SvH_mtm', 'GgmE_SvH_mtm'], 'hits_replaced_by': ['24622052', '24612672']}, {'old': 'Zkke_bJ1_Edq', 'replaced_by': 'C1FR_RzT_hzP', 'label': 'Dietist', 'hits_old': ['24641238', '24641268', '24626434', '24614914', '24581751'], 'replacing_old_concept_ids': ['C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP'], 'hits_replaced_by': ['24641238', '24641268', '24626434', '24614914', '24581751']}, {'old': 'MLPW_mLu_d7K', 'replaced_by': 'vUZt_BHY_mk2', 'label': 'Miljöingenjör/Miljövårdsingenjör', 'hits_old': ['24643524'], 'replacing_old_concept_ids': ['vUZt_BHY_mk2'], 'hits_replaced_by': ['24643524']}, {'old': 'pp29_K2N_aDY', 'replaced_by': 'C1FR_RzT_hzP', 'label': 'Dietist', 'hits_old': ['24641238', '24641268', '24626434', '24614914', '24581751'], 'replacing_old_concept_ids': ['C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP'], 'hits_replaced_by': ['24641238', '24641268', '24626434', '24614914', '24581751']}, {'old': 'Hv4J_UHc_s7M', 'replaced_by': 'sghA_68W_sYw', 'label': 'Laboratoriebiträde', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Ttbo_P3H_C4V', 'replaced_by': 'sghA_68W_sYw', 'label': 'Laboratoriebiträde', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'AWpr_8U2_32J', 'replaced_by': 'sghA_68W_sYw', 'label': 'Laboratoriebiträde', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'L8Hw_5mJ_zic', 'replaced_by': 'YpRs_ybt_47a', 'label': 'Kurator', 'hits_old': ['24640701', '24626839', '24543668', '24437169'], 'replacing_old_concept_ids': ['YpRs_ybt_47a', 'Y86G_M6o_9R8', 'YpRs_ybt_47a', 'YpRs_ybt_47a', 'YpRs_ybt_47a'], 'hits_replaced_by': ['24640701', '24633665', '24626839', '24543668', '24437169']}, {'old': 'Y86G_M6o_9R8', 'replaced_by': 'YpRs_ybt_47a', 'label': 'Kurator', 'hits_old': ['24640701', '24633665', '24626839', '24543668', '24437169'], 'replacing_old_concept_ids': ['YpRs_ybt_47a', 'Y86G_M6o_9R8', 'YpRs_ybt_47a', 'YpRs_ybt_47a', 'YpRs_ybt_47a'], 'hits_replaced_by': ['24640701', '24633665', '24626839', '24543668', '24437169']}, {'old': 'T9MX_dmQ_t5n', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent', 'hits_old': ['24650971', '24650060', '24647704', '24647256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24590208', '24574442', '24537933', '24508439', '24499204'], 'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n', 's5pR_WNm_R8W'], 'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439', '24499204']}, {'old': 'TChs_6ci_gJQ', 'replaced_by': 'Fr7W_Yjv_3ik', 'label': 'Familjebehandlare/Familjepedagog', 'hits_old': ['24573516'], 'replacing_old_concept_ids': ['Fr7W_Yjv_3ik'], 'hits_replaced_by': ['24573516']}, {'old': '1oCZ_J6h_rGV', 'replaced_by': 'JZgY_jHa_Uwa', 'label': 'Förhandlingschef', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '2DB2_o9K_sMy', 'replaced_by': 'V74g_m5Z_BtM', 'label': 'Kanslichef', 'hits_old': [], 'replacing_old_concept_ids': ['Uoeq_F5q_18w'], 'hits_replaced_by': ['24646965']}, {'old': 'X4vv_yJ8_Nx1', 'replaced_by': '7yB4_npo_55m', 'label': 'Invandrarkonsulent', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'memm_eLn_j1a', 'replaced_by': 'jQKk_Wzd_pvu', 'label': 'Komminister', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Dgx7_yw6_CaN', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent', 'hits_old': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24499204'], 'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n', 's5pR_WNm_R8W'], 'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439', '24499204']}, {'old': '1reZ_8Q1_nwY', 'replaced_by': 'ofiS_5F2_YmV', 'label': 'HR-assistent', 'hits_old': ['24646439', '24643526', '24617892'], 'replacing_old_concept_ids': ['ofiS_5F2_YmV', 'ofiS_5F2_YmV', 'ofiS_5F2_YmV'], 'hits_replaced_by': ['24646439', '24643526', '24617892']}, {'old': '1zns_dXR_NMQ', 'replaced_by': 'ofiS_5F2_YmV', 'label': 'HR-assistent', 'hits_old': ['24646439', '24643526', '24617892'], 'replacing_old_concept_ids': ['ofiS_5F2_YmV', 'ofiS_5F2_YmV', 'ofiS_5F2_YmV'], 'hits_replaced_by': ['24646439', '24643526', '24617892']}, {'old': 'geo3_qtw_3eP', 'replaced_by': 'MbHj_ZVr_WsC', 'label': 'Personaladministratör', 'hits_old': ['24649818', '24645687', '24629870', '24618830', '24574415', '24572733'], 'replacing_old_concept_ids': ['MbHj_ZVr_WsC', 'geo3_qtw_3eP', 'MbHj_ZVr_WsC', 'MbHj_ZVr_WsC', 'MbHj_ZVr_WsC', 'MbHj_ZVr_WsC'], 'hits_replaced_by': ['24649818', '24645687', '24629870', '24618830', '24574415', '24572733']}, {'old': 'tNy7_bJc_8FS', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent', 'hits_old': ['24650971', '24650060', '24647704', '24647256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24590208', '24574442', '24537933', '24499204'], 'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n', 's5pR_WNm_R8W'], 'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439', '24499204']}, {'old': 'GiV1_hMx_qUT', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent', 'hits_old': ['24650971', '24650060', '24647704', '24647256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24590208', '24574442', '24537933', '24499204'], 'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n', 's5pR_WNm_R8W'], 'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483', '24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439', '24499204']}, {'old': '4L63_HPx_7uh', 'replaced_by': 'y763_SQh_71J', 'label': 'Databasadministratör', 'hits_old': ['24635989', '24632433'], 'replacing_old_concept_ids': ['y763_SQh_71J', 'y763_SQh_71J'], 'hits_replaced_by': ['24635989', '24632433']}, {'old': '7oc6_8Rs_fAv', 'replaced_by': 'zthE_Zb1_tjb', 'label': 'Linjeagent/Rederiagent', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'sbKP_NHi_eiv', 'replaced_by': 'QUmN_cfC_zPn', 'label': 'Utbildningsadministratör/Utbildningssekreterare/Kursadministratör', 'hits_old': ['24649356', '24647010'], 'replacing_old_concept_ids': ['sbKP_NHi_eiv', 'QUmN_cfC_zPn'], 'hits_replaced_by': ['24649356', '24647010']}, {'old': 'JPtk_3q6_xBL', 'replaced_by': 'QUmN_cfC_zPn', 'label': 'Utbildningsadministratör/Utbildningssekreterare/Kursadministratör', 'hits_old': ['24647010'], 'replacing_old_concept_ids': ['sbKP_NHi_eiv', 'QUmN_cfC_zPn'], 'hits_replaced_by': ['24649356', '24647010']}, {'old': '1jLm_pkS_3BX', 'replaced_by': 'QUmN_cfC_zPn', 'label': 'Utbildningsadministratör/Utbildningssekreterare/Kursadministratör', 'hits_old': ['24647010'], 'replacing_old_concept_ids': ['sbKP_NHi_eiv', 'QUmN_cfC_zPn'], 'hits_replaced_by': ['24649356', '24647010']}, {'old': '7jaj_Pej_27m', 'replaced_by': 'XYoM_UCq_923', 'label': 'Reklamassistent/Reklamsekreterare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '7Zx9_BVE_Qna', 'replaced_by': 'p3m5_Ndd_6im', 'label': 'Annonsmottagare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'ayC6_Lks_sFQ', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult', 'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453'], 'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5'], 'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453']}, {'old': 'i5JT_We2_TpX', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult', 'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453'], 'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5'], 'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453']}, {'old': '7rct_y2Q_NSe', 'replaced_by': 'Bbpr_AMz_nzt', 'label': 'Revisorsassistent', 'hits_old': ['24612654', '24591386', '24549608'], 'replacing_old_concept_ids': ['Bbpr_AMz_nzt', '7rct_y2Q_NSe', 'Bbpr_AMz_nzt'], 'hits_replaced_by': ['24612654', '24591386', '24549608']}, {'old': 'mNBw_Znj_4eJ', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor', 'hits_old': ['24622718', '24607178', '24530121'], 'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9'], 'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']}, {'old': 'Ffsi_TDN_PDF', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult', 'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453'], 'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5'], 'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453']}, {'old': 'HeRm_ChB_HVB', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult', 'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453'], 'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5'], 'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035', '24553781', '24541494', '24373453']}, {'old': 'kf7K_UAZ_ed8', 'replaced_by': 'BbNn_Gtf_rKp', 'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': ['24572488'], 'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'], 'hits_replaced_by': ['24645272', '24572488', '24552904']}, {'old': 'YXm8_rp9_1Sv', 'replaced_by': 'BbNn_Gtf_rKp', 'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': [], 'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'], 'hits_replaced_by': ['24645272', '24572488', '24552904']}, {'old': 'wFPP_zmg_PK4', 'replaced_by': 'BbNn_Gtf_rKp', 'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': [], 'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'], 'hits_replaced_by': ['24645272', '24572488', '24552904']}, {'old': 'dunj_FU3_Fx5', 'replaced_by': '2LBV_CoV_iEf', 'label': 'Artistagent/Artistbokare/Artistförmedlare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'GGA1_QkE_XgN', 'replaced_by': 'nRLP_eqC_ow9', 'label': 'Löneadministratör/Lönekonsult', 'hits_old': ['24649915', '24624230', '24619974'], 'replacing_old_concept_ids': ['nRLP_eqC_ow9', 'nRLP_eqC_ow9', 'nRLP_eqC_ow9'], 'hits_replaced_by': ['24649915', '24624230', '24619974']}, {'old': 'R33K_7kd_PPT', 'replaced_by': 'nRLP_eqC_ow9', 'label': 'Löneadministratör/Lönekonsult', 'hits_old': ['24649915', '24624230', '24619974'], 'replacing_old_concept_ids': ['nRLP_eqC_ow9', 'nRLP_eqC_ow9', 'nRLP_eqC_ow9'], 'hits_replaced_by': ['24649915', '24624230', '24619974']}, {'old': 'DCMR_H5T_4Nk', 'replaced_by': 'WrM5_fTS_37j', 'label': 'Forskare, språk', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Cq7H_YYS_aQH', 'replaced_by': 'ef1m_sEu_ok6', 'label': 'Nationalekonom', 'hits_old': ['24606305'], 'replacing_old_concept_ids': ['ef1m_sEu_ok6'], 'hits_replaced_by': ['24606305']}, {'old': 'LCCW_oaP_6kn', 'replaced_by': 'GFu2_s4q_9sr', 'label': 'Redaktör', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'VtTs_Y26_KMJ', 'replaced_by': 'k3ZW_16R_riY', 'label': 'Sångare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'zHkF_Yg1_PTS', 'replaced_by': 'j6P1_gJq_a2Q', 'label': 'Skolchef/Skoldirektör/Skolledare', 'hits_old': ['24575721', '24569099'], 'replacing_old_concept_ids': ['j6P1_gJq_a2Q', 'j6P1_gJq_a2Q'], 'hits_replaced_by': ['24575721', '24569099']}, {'old': 'hJuL_n8p_UEM', 'replaced_by': 'M7TY_sct_XPk', 'label': 'Idrottskonsulent', 'hits_old': ['24641526'], 'replacing_old_concept_ids': ['hJuL_n8p_UEM'], 'hits_replaced_by': ['24641526']}, {'old': 'NNtF_PrM_erv', 'replaced_by': 'nGhq_Pjm_az5', 'label': 'Medicinteknisk ingenjör', 'hits_old': ['24615799', '24608421', '24591934', '24434389'], 'replacing_old_concept_ids': ['nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5'], 'hits_replaced_by': ['24615799', '24608421', '24591934', '24434389']}, {'old': 'UFCb_3sj_MET', 'replaced_by': 'nGhq_Pjm_az5', 'label': 'Medicinteknisk ingenjör', 'hits_old': ['24615799', '24608421', '24591934', '24434389'], 'replacing_old_concept_ids': ['nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5'], 'hits_replaced_by': ['24615799', '24608421', '24591934', '24434389']}, {'old': '4zNH_ukk_cEn', 'replaced_by': 'KQty_E1u_cia', 'label': 'Helpdesktekniker/Supporttekniker', 'hits_old': ['24647864', '24645367', '24642579', '24641101', '24639693', '24638483', '24636316', '24636297', '24634219', '24632405', '24629335', '24629041', '24627643', '24625275', '24620387', '24620198', '24618941', '24617235', '24616692', '24616638', '24614519', '24606872', '24606094', '24605242', '24604823', '24603947', '24603021', '24598564', '24593650', '24590806', '24585051', '24569128', '24538946', '24508353', '24499896'], 'replacing_old_concept_ids': ['KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia'], 'hits_replaced_by': ['24647864', '24645367', '24642579', '24641101', '24639693', '24638483', '24636316', '24636297', '24634219', '24632405', '24629335', '24629041', '24627643', '24625275', '24620387', '24620198', '24618941', '24617235', '24616692', '24616638', '24614519', '24606872', '24606094', '24605242', '24604823', '24603947', '24603021', '24598564', '24593650', '24590806', '24585051', '24569128', '24538946', '24508353', '24499896']}, {'old': '3vQv_E4Q_wjK', 'replaced_by': 'hERw_LKk_uJK', 'label': 'Trafiklärare', 'hits_old': ['24648390', '24604479', '24618870', '24603183', '24596067', '24585890', '24534821', '24478339'], 'replacing_old_concept_ids': ['hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK'], 'hits_replaced_by': ['24648390', '24604479', '24618870', '24603183', '24596067', '24585890', '24534821', '24478339']}, {'old': '46tq_qty_Lqm', 'replaced_by': 'RsYS_Mkj_kd1', 'label': 'Showartist', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'X4cv_VTi_Muz', 'replaced_by': 'UtA2_od9_3WT', 'label': 'Elektriker, film/Elektriker, TV', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'EEN6_NCm_XgJ', 'replaced_by': '9fEz_9ji_74Y', 'label': 'Tandtekniker', 'hits_old': ['24553091'], 'replacing_old_concept_ids': ['EEN6_NCm_XgJ'], 'hits_replaced_by': ['24553091']}, {'old': 'kZAz_CaQ_zhN', 'replaced_by': 'iRUx_bBB_Vmp', 'label': 'Stadsjurist/Kommunjurist/Stadsadvokat', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Cbq1_SZq_WQJ', 'replaced_by': 'iRUx_bBB_Vmp', 'label': 'Stadsjurist/Kommunjurist/Stadsadvokat', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'etPa_VHn_mrt', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': '1hZc_5BC_K7q', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': ['24602558'], 'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN', 'Kh3N_Kg8_KK5'], 'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']}, {'old': 'g7UK_FUb_nxf', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': [], 'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN', 'Kh3N_Kg8_KK5'], 'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']}, {'old': 'PMx8_n1G_fPx', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': [], 'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN', 'Kh3N_Kg8_KK5'], 'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']}, {'old': 'TppD_R5Y_kiG', 'replaced_by': 'iXyv_E2W_cqc', 'label': 'Kontrollanläggningstekniker', 'hits_old': ['24641497'], 'replacing_old_concept_ids': ['TppD_R5Y_kiG', 'cJ62_FKk_ua6', 'cJ62_FKk_ua6'], 'hits_replaced_by': ['24641497', '24623380', '24623314']}, {'old': 'XN3S_vj8_8Wz', 'replaced_by': 'KiD2_B8H_U7U', 'label': 'Vapentekniker', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'YHB5_wmX_UCt', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': ['24681267', '24681265', '24681247', '24676773', '24625395'], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': 'Sdc8_zgb_WFe', 'replaced_by': 'Zjz2_R2c_ySs', 'label': 'Inspicient', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'NBpU_vTR_B6S', 'replaced_by': 'Zjz2_R2c_ySs', 'label': 'Inspicient', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'cCYi_JUn_K8P', 'replaced_by': 'oRBx_v9Q_vH2', 'label': 'Forskare, jordbruk', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '5bp9_eBL_BPF', 'replaced_by': 'Co7T_yKa_Zb1', 'label': 'Forskare, trädgårdsvetenskap', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'CWK4_8NM_4YY', 'replaced_by': 'gUu8_FXb_qCv', 'label': 'Prepressoperatör', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'mL3G_SKE_mab', 'replaced_by': 'gUu8_FXb_qCv', 'label': 'Prepressoperatör', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'AfoB_XP5_5Ak', 'replaced_by': 'SxqC_BSK_D3u', 'label': 'Originalare/Final Art', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'd2gz_es2_pX5', 'replaced_by': 'hQtr_vwy_MGb', 'label': 'Kvalitetssamordnare/Kvalitetskoordinator', 'hits_old': ['24647020', '24646953', '24646081', '24643688', '24640405', '24634573', '24616132', '24610804', '24576129', '24514986'], 'replacing_old_concept_ids': ['d2gz_es2_pX5', 'd2gz_es2_pX5', 'hQtr_vwy_MGb', 'hQtr_vwy_MGb', 'hQtr_vwy_MGb', 'd2gz_es2_pX5', 'hQtr_vwy_MGb', 'hQtr_vwy_MGb', 'd2gz_es2_pX5', 'hQtr_vwy_MGb'], 'hits_replaced_by': ['24647020', '24646953', '24646081', '24643688', '24640405', '24634573', '24616132', '24610804', '24576129', '24514986']}, {'old': 'E9Fm_7C2_uYU', 'replaced_by': 'JfyC_gDr_U4e', 'label': 'TV-fotograf', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '7pvW_ATp_bnx', 'replaced_by': 'K1k3_ZHN_PTh', 'label': 'Redigerare, rörlig bild', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'N9fQ_uJ4_1vB', 'replaced_by': 'K1k3_ZHN_PTh', 'label': 'Redigerare, rörlig bild', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'SR8Z_ESt_FfC', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor', 'hits_old': ['24622718', '24607178', '24530121'], 'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9'], 'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']}, {'old': 'yjaM_pAe_u9m', 'replaced_by': 'WWVG_4sM_faC', 'label': 'Butikschef', 'hits_old': ['24644601', '24639242', '24636959', '24632618', '24627262', '24625609', '24611376', '24607526', '24605640', '24594836', '24578489', '24554245', '24536706', '24514623'], 'replacing_old_concept_ids': ['WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'yjaM_pAe_u9m', 'WWVG_4sM_faC'], 'hits_replaced_by': ['24644601', '24639242', '24636959', '24632618', '24627262', '24625609', '24611376', '24607526', '24605640', '24594836', '24578489', '24554245', '24536706', '24514623']}, {'old': 'ssNi_aPV_7o3', 'replaced_by': 'WL4K_4RF_NEJ', 'label': 'Bostadsförmedlare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '79uB_oJR_dSQ', 'replaced_by': 'y22E_Nz6_5VU', 'label': 'HR-chef', 'hits_old': ['24647998', '24623695', '24566659', '24442113'], 'replacing_old_concept_ids': ['y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU'], 'hits_replaced_by': ['24647998', '24623695', '24566659', '24442113']}, {'old': 'nSdx_qDe_vCh', 'replaced_by': 'y22E_Nz6_5VU', 'label': 'HR-chef', 'hits_old': ['24647998', '24623695', '24566659', '24442113'], 'replacing_old_concept_ids': ['y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU'], 'hits_replaced_by': ['24647998', '24623695', '24566659', '24442113']}, {'old': '4xEL_DVf_rNV', 'replaced_by': 'aoUt_f9s_rAk', 'label': 'Abonnemangsförsäljare', 'hits_old': ['24648147', '24648032', '24647914', '24647866', '24645321', '24645317', '24643210', '24643150', '24643147', '24639915', '24609749', '24623136', '24619244', '24615851', '24610069', '24571210'], 'replacing_old_concept_ids': ['aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk'], 'hits_replaced_by': ['24648147', '24648032', '24647914', '24647866', '24645321', '24645317', '24643210', '24643150', '24643147', '24639915', '24609749', '24623136', '24619244', '24615851', '24610069', '24571210']}, {'old': 'YrxV_b6A_Dav', 'replaced_by': 'MegR_77J_CGU', 'label': 'Annonsassistent/Annonssekreterare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 't4QA_LXF_Z3T', 'replaced_by': 'W8Kb_rxf_uRQ', 'label': 'Inköpsassistent/Inköpskontorist/Inköpssekreterare', 'hits_old': [], 'replacing_old_concept_ids': ['2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', 'ZyDH_2Xe_bfK'], 'hits_replaced_by': ['24647760', '24647703', '24635648', '24620172', '24619248']}, {'old': 'mXSF_yMY_ppH', 'replaced_by': 'HFuj_YCt_Ymn', 'label': 'Försäljningsassistent/Försäljningssekreterare', 'hits_old': ['24643212'], 'replacing_old_concept_ids': ['NikA_KEh_Ky4', 'NikA_KEh_Ky4', 'HFuj_YCt_Ymn', 'NikA_KEh_Ky4'], 'hits_replaced_by': ['24649654', '24647299', '24643212', '24603457']}, {'old': '2YDV_mGq_LpN', 'replaced_by': 'W8Kb_rxf_uRQ', 'label': 'Inköpsassistent/Inköpskontorist/Inköpssekreterare', 'hits_old': ['24647760', '24647703', '24635648', '24620172'], 'replacing_old_concept_ids': ['2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', 'ZyDH_2Xe_bfK'], 'hits_replaced_by': ['24647760', '24647703', '24635648', '24620172', '24619248']}, {'old': 'ZyDH_2Xe_bfK', 'replaced_by': 'W8Kb_rxf_uRQ', 'label': 'Inköpsassistent/Inköpskontorist/Inköpssekreterare', 'hits_old': ['24619248'], 'replacing_old_concept_ids': ['2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', 'ZyDH_2Xe_bfK'], 'hits_replaced_by': ['24647760', '24647703', '24635648', '24620172', '24619248']}, {'old': 'NikA_KEh_Ky4', 'replaced_by': 'HFuj_YCt_Ymn', 'label': 'Försäljningsassistent/Försäljningssekreterare', 'hits_old': ['24649654', '24647299', '24643212', '24603457'], 'replacing_old_concept_ids': ['NikA_KEh_Ky4', 'NikA_KEh_Ky4', 'HFuj_YCt_Ymn', 'NikA_KEh_Ky4'], 'hits_replaced_by': ['24649654', '24647299', '24643212', '24603457']}, {'old': 'AfxM_9dB_xbC', 'replaced_by': 'HFuj_YCt_Ymn', 'label': 'Försäljningsassistent/Försäljningssekreterare', 'hits_old': ['24643212'], 'replacing_old_concept_ids': ['NikA_KEh_Ky4', 'NikA_KEh_Ky4', 'HFuj_YCt_Ymn', 'NikA_KEh_Ky4'], 'hits_replaced_by': ['24649654', '24647299', '24643212', '24603457']}, {'old': '33CY_8xp_U24', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': '4pdy_hXe_krp', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': 'Qf5a_Awb_Xr1', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': '6qFX_Cmu_o5U', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': '7J2i_94b_ow4', 'replaced_by': 'wUKi_LRW_Wxk', 'label': 'Fastighetschef/Fastighetsdirektör', 'hits_old': ['24643005', '24632701', '24596320'], 'replacing_old_concept_ids': ['wUKi_LRW_Wxk', 'wUKi_LRW_Wxk', 'wUKi_LRW_Wxk'], 'hits_replaced_by': ['24643005', '24632701', '24596320']}, {'old': 'nHFx_RFe_giS', 'replaced_by': 'iCy6_G72_abh', 'label': 'Ekonomichef', 'hits_old': ['24650582', '24625929', '24624351', '24616138', '24615771', '24610880'], 'replacing_old_concept_ids': ['iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh'], 'hits_replaced_by': ['24650582', '24625929', '24624351', '24616138', '24615771', '24610880']}, {'old': 'qic5_pQo_xhT', 'replaced_by': 'U9AU_Rre_pbM', 'label': 'Assessor', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Qgmk_7Xb_z4q', 'replaced_by': 'jn3U_UTt_PUJ', 'label': 'Socialchef/Socialdirektör', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'noSX_WNd_Nxv', 'replaced_by': 'DWv2_Yu9_yo6', 'label': 'Stadsbyggnadschef/Stadsbyggnadsdirektör', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'SpMJ_sSm_Vjp', 'replaced_by': 'iJfW_Lt2_sQt', 'label': 'Teknisk chef, kommun', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'kNQH_LXD_eLe', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor', 'hits_old': ['24622718', '24607178', '24530121'], 'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9'], 'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']}, {'old': 'jNaB_ozm_pm7', 'replaced_by': 'VKcv_Mbu_KJE', 'label': 'Internatföreståndare/Skolmåltidsföreståndare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '44uM_XPP_VdK', 'replaced_by': 'rfpp_bnQ_RoQ', 'label': 'Parkeringsvakt/Trafikövervakare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'ybqj_FXq_K98', 'replaced_by': 'eXwZ_gVJ_39q', 'label': 'Fartygsagent/Fartygsklarerare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'nrya_iNN_6BR', 'replaced_by': 'jqVE_Ux3_VMN', 'label': 'Dataregistrerare/Registrerare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'zKqM_a5a_29j', 'replaced_by': 'p3m5_Ndd_6im', 'label': 'Annonsmottagare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'qtPc_BJB_SYL', 'replaced_by': 'BbNn_Gtf_rKp', 'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': ['24645272', '24552904'], 'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'], 'hits_replaced_by': ['24645272', '24572488', '24552904']}, {'old': 'GUHc_KyJ_Dst', 'replaced_by': '2LBV_CoV_iEf', 'label': 'Artistagent/Artistbokare/Artistförmedlare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'MopY_AvK_MmE', 'replaced_by': 'j6P1_gJq_a2Q', 'label': 'Skolchef/Skoldirektör/Skolledare', 'hits_old': ['24575721', '24569099'], 'replacing_old_concept_ids': ['j6P1_gJq_a2Q', 'j6P1_gJq_a2Q'], 'hits_replaced_by': ['24575721', '24569099']}, {'old': 'JGxJ_pEB_yre', 'replaced_by': 'GTFy_iPM_msj', 'label': 'Butikskommunikatör/Visual merchandiser', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'cJ62_FKk_ua6', 'replaced_by': 'iXyv_E2W_cqc', 'label': 'Kontrollanläggningstekniker', 'hits_old': ['24623380', '24623314'], 'replacing_old_concept_ids': ['TppD_R5Y_kiG', 'cJ62_FKk_ua6', 'cJ62_FKk_ua6'], 'hits_replaced_by': ['24641497', '24623380', '24623314']}, {'old': '4Ujg_KC9_cLT', 'replaced_by': 'KiD2_B8H_U7U', 'label': 'Vapentekniker', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 't2pX_4bB_xCG', 'replaced_by': 'm8ED_BbT_twk', 'label': 'Bildingenjör/BING, film/BING, TV', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'dh7h_HbH_Cus', 'replaced_by': 'nvUH_JLD_s4F', 'label': 'Verkställande direktör/VD', 'hits_old': ['24638242', '24516982'], 'replacing_old_concept_ids': ['nvUH_JLD_s4F', 'dh7h_HbH_Cus'], 'hits_replaced_by': ['24638242', '24516982']}, {'old': '5Nkq_7DE_hoo', 'replaced_by': 'NZcr_uB1_6rX', 'label': 'Platschef, bygg', 'hits_old': ['24638307', '24631557', '24608211', '24604812', '24471798'], 'replacing_old_concept_ids': ['NZcr_uB1_6rX', 'NZcr_uB1_6rX', '5Nkq_7DE_hoo', 'NZcr_uB1_6rX', 'NZcr_uB1_6rX'], 'hits_replaced_by': ['24638307', '24631557', '24608211', '24604812', '24471798']}, {'old': 'saUi_aP6_zhU', 'replaced_by': 'euJP_wxo_skF', 'label': 'Dansare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '4i7D_pQL_DNa', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft', 'hits_old': ['24632281', '24573532'], 'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'], 'hits_replaced_by': ['24632281', '24622759', '24573532']}, {'old': 'XZrs_VW9_31C', 'replaced_by': 'p4vQ_Dpo_d6a', 'label': 'Elkvalitetsanalytiker, elkraft', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Be1K_Dp4_DrD', 'replaced_by': 'fYBk_dfW_DJc', 'label': 'Kontrollanläggningsingenjör, elkraft', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'WhsT_BWb_dPy', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft', 'hits_old': ['24632281', '24622759', '24573532'], 'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'], 'hits_replaced_by': ['24632281', '24622759', '24573532']}, {'old': '4QjK_RpG_h4w', 'replaced_by': 'Yyn9_wQV_Wb8', 'label': 'Underhållsanalytiker, elkraft', 'hits_old': ['24637940', '24509354'], 'replacing_old_concept_ids': ['4QjK_RpG_h4w', '4QjK_RpG_h4w'], 'hits_replaced_by': ['24637940', '24509354']}, {'old': 'GtGP_PiD_yRc', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft', 'hits_old': ['24632281', '24573532'], 'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'], 'hits_replaced_by': ['24632281', '24622759', '24573532']}, {'old': 'nr69_xvF_c4f', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [], 'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'], 'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']}, {'old': 'MGBV_LVk_AtK', 'replaced_by': 'QQjZ_NAN_bDR', 'label': 'Interaktionsdesigner', 'hits_old': ['24647065', '24646521', '24646322', '24632584', '24520622'], 'replacing_old_concept_ids': ['MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'QQjZ_NAN_bDR', 'MGBV_LVk_AtK', 'HciA_Cu7_FXt', 'HciA_Cu7_FXt'], 'hits_replaced_by': ['24647065', '24646521', '24646322', '24632584', '24520622', '24527159', '24527152']}, {'old': 'HciA_Cu7_FXt', 'replaced_by': 'QQjZ_NAN_bDR', 'label': 'Interaktionsdesigner', 'hits_old': ['24632584', '24527159', '24527152'], 'replacing_old_concept_ids': ['MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'QQjZ_NAN_bDR', 'MGBV_LVk_AtK', 'HciA_Cu7_FXt', 'HciA_Cu7_FXt'], 'hits_replaced_by': ['24647065', '24646521', '24646322', '24632584', '24520622', '24527159', '24527152']}, {'old': 'fdZE_y62_wdE', 'replaced_by': 'dRXp_E2C_Lq9', 'label': 'Kommunchef/Kommundirektör/Stadsdirektör', 'hits_old': [], 'replacing_old_concept_ids': ['7yzW_dCg_7s7'], 'hits_replaced_by': ['24648307']}, {'old': 'Eo4y_EGW_KVM', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': [], 'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN', 'Kh3N_Kg8_KK5'], 'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']}, {'old': 'twUU_T1n_hW5', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor', 'hits_old': ['24622718', '24607178', '24530121'], 'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9'], 'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']}, {'old': 'aWNX_iEg_NhN', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': ['24512446', '24507851'], 'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN', 'Kh3N_Kg8_KK5'], 'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']}, {'old': '7ava_ohk_66H', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor', 'hits_old': ['24622718', '24607178', '24530121'], 'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9'], 'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']}, {'old': 'KhbC_P4c_R82', 'replaced_by': 'V74g_m5Z_BtM', 'label': 'Kanslichef', 'hits_old': [], 'replacing_old_concept_ids': ['Uoeq_F5q_18w'], 'hits_replaced_by': ['24646965']}, {'old': 'ohrC_dLP_3ad', 'replaced_by': 'cB4Q_Cx9_2Lw', 'label': 'Beredskapsdirektör', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'tnaT_rPT_RXj', 'replaced_by': 'KMRG_Bda_5CV', 'label': 'Tågvärd/Tågvärdinna', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '7yzW_dCg_7s7', 'replaced_by': 'dRXp_E2C_Lq9', 'label': 'Kommunchef/Kommundirektör/Stadsdirektör', 'hits_old': ['24648307'], 'replacing_old_concept_ids': ['7yzW_dCg_7s7'], 'hits_replaced_by': ['24648307']}, {'old': '9wyj_ibD_Yo1', 'replaced_by': 'ofiS_5F2_YmV', 'label': 'HR-assistent', 'hits_old': ['24646439', '24643526', '24617892'], 'replacing_old_concept_ids': ['ofiS_5F2_YmV', 'ofiS_5F2_YmV', 'ofiS_5F2_YmV'], 'hits_replaced_by': ['24646439', '24643526', '24617892']}, {'old': 'qV9q_oKv_QzL', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel', 'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'], 'hits_replaced_by': ['24625448', '24499240']}, {'old': 'WAH4_sSf_GyE', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel', 'hits_old': [], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'], 'hits_replaced_by': ['24674944', '24641084']}, {'old': 'Jsct_XQW_U8u', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel', 'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'], 'hits_replaced_by': ['24625448', '24499240']}, {'old': '5GaR_6HQ_8vY', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel', 'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'], 'hits_replaced_by': ['24625448', '24499240']}, {'old': 'RSra_C73_mJe', 'replaced_by': 'S2QW_12u_Pj1', 'label': 'Mediatextare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'HcpH_1h7_vkK', 'replaced_by': 'S2QW_12u_Pj1', 'label': 'Mediatextare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'PM4A_xoG_hQD', 'replaced_by': 'S2QW_12u_Pj1', 'label': 'Mediatextare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': '7fB3_Ckh_NuC', 'replaced_by': 'UCXb_LjK_pHv', 'label': 'Musiker', 'hits_old': [], 'replacing_old_concept_ids': ['aR3a_5Ly_TDw'], 'hits_replaced_by': ['24531845']}, {'old': 'XSoL_LLU_PYV', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel', 'hits_old': ['24625448', '24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'], 'hits_replaced_by': ['24625448', '24499240']}, {'old': 'wniw_g2F_JNQ', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel', 'hits_old': [], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'], 'hits_replaced_by': ['24674944', '24641084']}, {'old': 'wiGD_eu2_UJV', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel', 'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'], 'hits_replaced_by': ['24625448', '24499240']}, {'old': '7rkC_Rot_tat', 'replaced_by': 'k3ZW_16R_riY', 'label': 'Sångare', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'aR3a_5Ly_TDw', 'replaced_by': 'UCXb_LjK_pHv', 'label': 'Musiker', 'hits_old': ['24531845'], 'replacing_old_concept_ids': ['aR3a_5Ly_TDw'], 'hits_replaced_by': ['24531845']}, {'old': 'YmFo_cvw_1Kv', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel', 'hits_old': ['24674944', '24641084'], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'], 'hits_replaced_by': ['24674944', '24641084']}, {'old': 'dnxZ_Bvb_S9C', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel', 'hits_old': [], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'], 'hits_replaced_by': ['24674944', '24641084']}, {'old': 'Kh3N_Kg8_KK5', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': ['24645107', '24572890', '24445999'], 'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN', 'Kh3N_Kg8_KK5'], 'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']}, {'old': 'kHno_7rL_Lcm', 'replaced_by': 'uaJs_9YA_Cnp', 'label': 'Sjuksköterska, geriatrik/Sjuksköterska, äldreomsorg och äldrevård', 'hits_old': ['24646122', '24646015', '24643631', '24641581', '24637517', '24633039', '24619737', '24610664', '24607356', '24605037', '24602739', '24597392', '24584756', '24575788', '24573363', '24561183', '24550606', '24509435', '24509198', '24504899', '24453787', '24433907'], 'replacing_old_concept_ids': ['kHno_7rL_Lcm', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm', 'kHno_7rL_Lcm', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp'], 'hits_replaced_by': ['24646122', '24646015', '24643631', '24641581', '24637517', '24633039', '24619737', '24610664', '24607356', '24605037', '24602739', '24597392', '24584756', '24575788', '24573363', '24561183', '24550606', '24509435', '24509198', '24504899', '24453787', '24433907']}, {'old': 'UjqL_rhp_jC4', 'replaced_by': 'WUxP_1ih_6RG', 'label': 'Flight Data Operator/FDO/Flygledarassistent', 'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []}, {'old': 'Uoeq_F5q_18w', 'replaced_by': 'V74g_m5Z_BtM', 'label': 'Kanslichef', 'hits_old': ['24646965'], 'replacing_old_concept_ids': ['Uoeq_F5q_18w'], 'hits_replaced_by': ['24646965']}, ]
89.254747
120
0.628198
6,454
56,409
5.015184
0.192749
0.103188
0.098029
0.113507
0.793531
0.788093
0.77901
0.77901
0.775056
0.753924
0
0.216204
0.171356
56,409
631
121
89.396197
0.476264
0
0
0.542857
0
0
0.63208
0.114113
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
fd1f78feda9a5ad93a6afe0a60558158e971968a
14,809
py
Python
tests/test_testreporter.py
RichieBzzzt/ru-neatest
5a1422489b557b573432d8717eb1d4e633c85d0f
[ "MIT" ]
null
null
null
tests/test_testreporter.py
RichieBzzzt/ru-neatest
5a1422489b557b573432d8717eb1d4e633c85d0f
[ "MIT" ]
null
null
null
tests/test_testreporter.py
RichieBzzzt/ru-neatest
5a1422489b557b573432d8717eb1d4e633c85d0f
[ "MIT" ]
null
null
null
import pytest import json from runeatest import testreporter def test_add_all_passed_test_cases(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual = [] actual.append( testreporter.add_testcase( "test name", True, "this test will check that something will work" ) ) actual.append( testreporter.add_testcase( "test name 2", True, "this test also will check that something will work" ) ) expected = [ { "test": "test name", "issuccess": "True", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "success", "failurereason": "", }, { "test": "test name 2", "issuccess": "True", "description": "this test also will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "success", "failurereason": "", }, ] assert expected == actual def test_add_passed_test_case(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual = [] actual.append( testreporter.add_testcase( "test name", True, "this test will check that something will work" ) ) expected = [ { "test": "test name", "issuccess": "True", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "success", "failurereason": "", } ] assert expected == actual def test_add_failed_test_case(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual = [] actual.append( testreporter.add_testcase( "test name", False, "this test will check that something will work", "actual isn't expected", ) ) expected = [ { "test": "test name", "issuccess": "False", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "failure", "failurereason": "actual isn't expected", } ] assert expected == actual def test_add_all_failed_test_cases(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual_test_add_all_failed_test_cases = [] actual_test_add_all_failed_test_cases.append( testreporter.add_testcase( "test name", False, "this test will check that something will work", "this test failed", ) ) actual_test_add_all_failed_test_cases.append( testreporter.add_testcase( "test name 2", False, "this test will check that something will work", "that test failed", ) ) expected_test_add_all_failed_test_cases = [ { "test": "test name", "issuccess": "False", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "failure", "failurereason": "this test failed", }, { "test": "test name 2", "issuccess": "False", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "failure", "failurereason": "that test failed", }, ] assert ( expected_test_add_all_failed_test_cases == actual_test_add_all_failed_test_cases ) def test_add_one_passed_one_failed_test_cases(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual = [] actual.append( testreporter.add_testcase( "test name", True, "this test will check that something will work" ) ) actual.append( testreporter.add_testcase( "test name 2", False, "this test will check that something will work", "my test failed here", ) ) expected = [ { "test": "test name", "issuccess": "True", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "success", "failurereason": "", }, { "test": "test name 2", "issuccess": "False", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "failure", "failurereason": "my test failed here", }, ] actual_string = str(actual) assert expected == actual def test_add_one_passed_one_failed_test_cases_to_string(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual = [] actual.append( testreporter.add_testcase( "test name", True, "this test will check that something will work" ) ) actual.append( testreporter.add_testcase( "test name 2", False, "this test will check that something will work", "a failed test", ) ) expected = "[{'test': 'test name', 'issuccess': 'True', 'description': 'this test will check that something will work', 'classname': '/Users/lorem.ipsum@fake.io/runeatest', 'result': 'success', 'failurereason': ''}, {'test': 'test name 2', 'issuccess': 'False', 'description': 'this test will check that something will work', 'classname': '/Users/lorem.ipsum@fake.io/runeatest', 'result': 'failure', 'failurereason': 'a failed test'}]" actual_string = str(actual) assert expected == actual_string def test_add_all_failed_test_cases_to_string(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual_test_add_all_failed_test_cases = [] actual_test_add_all_failed_test_cases.append( testreporter.add_testcase( "test name", False, "this test will check that something will work", "test name 1 has failed", ) ) actual_test_add_all_failed_test_cases.append( testreporter.add_testcase( "test name 2", False, "this test will check that something will work", "test name 2 has failed", ) ) expected_test_add_all_failed_test_cases_string = "[{'test': 'test name', 'issuccess': 'False', 'description': 'this test will check that something will work', 'classname': '/Users/lorem.ipsum@fake.io/runeatest', 'result': 'failure', 'failurereason': 'test name 1 has failed'}, {'test': 'test name 2', 'issuccess': 'False', 'description': 'this test will check that something will work', 'classname': '/Users/lorem.ipsum@fake.io/runeatest', 'result': 'failure', 'failurereason': 'test name 2 has failed'}]" actual_test_add_all_failed_test_cases_string = str( actual_test_add_all_failed_test_cases ) assert ( expected_test_add_all_failed_test_cases_string == actual_test_add_all_failed_test_cases_string ) def test_add_all_passed_test_cases_failure_included(mocker): x = '{"tags": {"opId": "ServerBackend-f421e441fa310430","browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","orgId": "1009391617598028","userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","clusterId": "0216-124733-lone970","user": "eter.natus@galar.com","principalIdpObjectId": "71b45910-e7b4-44d8-82f7-bf6fac4630d0","browserHostName": "uksouth.azuredatabricks.net","parentOpId": "RPCClient-bb9b9591c29c01f7","jettyRpcType": "InternalDriverBackendMessages$DriverBackendRequest"},"extraContext":{"notebook_path":"/Users/lorem.ipsum@fake.io/runeatest"}}' context = json.loads(x) mocker.patch("runeatest.pysparkconnect.get_context", return_value=context) actual = [] actual.append( testreporter.add_testcase( "test name", True, "this test will check that something will work", "my test may have failed because of something", ) ) actual.append( testreporter.add_testcase( "test name 2", True, "this test will check that something will work", "my test may have failed because of something else", ) ) expected = [ { "test": "test name", "issuccess": "True", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "success", "failurereason": "my test may have failed because of something", }, { "test": "test name 2", "issuccess": "True", "description": "this test will check that something will work", "classname": "/Users/lorem.ipsum@fake.io/runeatest", "result": "success", "failurereason": "my test may have failed because of something else", }, ] assert expected == actual
53.462094
701
0.654467
1,666
14,809
5.701681
0.073229
0.016844
0.03832
0.064849
0.976945
0.974418
0.972313
0.952732
0.933151
0.917886
0
0.088248
0.2042
14,809
276
702
53.655797
0.717777
0
0
0.626984
0
0.039683
0.634682
0.312513
0
0
0
0
0.031746
1
0.031746
false
0.019841
0.011905
0
0.043651
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
fd310482a051e3932012bfc352659d5f41c74485
784
py
Python
tests/test_provider_hashicorp_helm.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
tests/test_provider_hashicorp_helm.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
tests/test_provider_hashicorp_helm.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# tests/test_provider_hashicorp_helm.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:18:27 UTC) def test_provider_import(): import terrascript.provider.hashicorp.helm def test_resource_import(): from terrascript.resource.hashicorp.helm import helm_release def test_datasource_import(): from terrascript.data.hashicorp.helm import helm_template # TODO: Shortcut imports without namespace for official and supported providers. # TODO: This has to be moved into a required_providers block. # def test_version_source(): # # import terrascript.provider.hashicorp.helm # # t = terrascript.provider.hashicorp.helm.helm() # s = str(t) # # assert 'https://github.com/hashicorp/terraform-provider-helm' in s # assert '2.3.0' in s
27.034483
80
0.75
107
784
5.364486
0.560748
0.135889
0.146341
0.167247
0.132404
0
0
0
0
0
0
0.022624
0.154337
784
28
81
28
0.843137
0.622449
0
0
1
0
0
0
0
0
0
0.035714
0
1
0.5
true
0
1
0
1.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
1
1
0
1
0
1
0
0
7
fd5b94dd38bb32d3f2230124713a642736f5dfc9
6,545
py
Python
loldib/getratings/models/NA/na_kogmaw/na_kogmaw_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_kogmaw/na_kogmaw_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_kogmaw/na_kogmaw_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_KogMaw_Jng_Aatrox(Ratings): pass class NA_KogMaw_Jng_Ahri(Ratings): pass class NA_KogMaw_Jng_Akali(Ratings): pass class NA_KogMaw_Jng_Alistar(Ratings): pass class NA_KogMaw_Jng_Amumu(Ratings): pass class NA_KogMaw_Jng_Anivia(Ratings): pass class NA_KogMaw_Jng_Annie(Ratings): pass class NA_KogMaw_Jng_Ashe(Ratings): pass class NA_KogMaw_Jng_AurelionSol(Ratings): pass class NA_KogMaw_Jng_Azir(Ratings): pass class NA_KogMaw_Jng_Bard(Ratings): pass class NA_KogMaw_Jng_Blitzcrank(Ratings): pass class NA_KogMaw_Jng_Brand(Ratings): pass class NA_KogMaw_Jng_Braum(Ratings): pass class NA_KogMaw_Jng_Caitlyn(Ratings): pass class NA_KogMaw_Jng_Camille(Ratings): pass class NA_KogMaw_Jng_Cassiopeia(Ratings): pass class NA_KogMaw_Jng_Chogath(Ratings): pass class NA_KogMaw_Jng_Corki(Ratings): pass class NA_KogMaw_Jng_Darius(Ratings): pass class NA_KogMaw_Jng_Diana(Ratings): pass class NA_KogMaw_Jng_Draven(Ratings): pass class NA_KogMaw_Jng_DrMundo(Ratings): pass class NA_KogMaw_Jng_Ekko(Ratings): pass class NA_KogMaw_Jng_Elise(Ratings): pass class NA_KogMaw_Jng_Evelynn(Ratings): pass class NA_KogMaw_Jng_Ezreal(Ratings): pass class NA_KogMaw_Jng_Fiddlesticks(Ratings): pass class NA_KogMaw_Jng_Fiora(Ratings): pass class NA_KogMaw_Jng_Fizz(Ratings): pass class NA_KogMaw_Jng_Galio(Ratings): pass class NA_KogMaw_Jng_Gangplank(Ratings): pass class NA_KogMaw_Jng_Garen(Ratings): pass class NA_KogMaw_Jng_Gnar(Ratings): pass class NA_KogMaw_Jng_Gragas(Ratings): pass class NA_KogMaw_Jng_Graves(Ratings): pass class NA_KogMaw_Jng_Hecarim(Ratings): pass class NA_KogMaw_Jng_Heimerdinger(Ratings): pass class NA_KogMaw_Jng_Illaoi(Ratings): pass class NA_KogMaw_Jng_Irelia(Ratings): pass class NA_KogMaw_Jng_Ivern(Ratings): pass class NA_KogMaw_Jng_Janna(Ratings): pass class NA_KogMaw_Jng_JarvanIV(Ratings): pass class NA_KogMaw_Jng_Jax(Ratings): pass class NA_KogMaw_Jng_Jayce(Ratings): pass class NA_KogMaw_Jng_Jhin(Ratings): pass class NA_KogMaw_Jng_Jinx(Ratings): pass class NA_KogMaw_Jng_Kalista(Ratings): pass class NA_KogMaw_Jng_Karma(Ratings): pass class NA_KogMaw_Jng_Karthus(Ratings): pass class NA_KogMaw_Jng_Kassadin(Ratings): pass class NA_KogMaw_Jng_Katarina(Ratings): pass class NA_KogMaw_Jng_Kayle(Ratings): pass class NA_KogMaw_Jng_Kayn(Ratings): pass class NA_KogMaw_Jng_Kennen(Ratings): pass class NA_KogMaw_Jng_Khazix(Ratings): pass class NA_KogMaw_Jng_Kindred(Ratings): pass class NA_KogMaw_Jng_Kled(Ratings): pass class NA_KogMaw_Jng_KogMaw(Ratings): pass class NA_KogMaw_Jng_Leblanc(Ratings): pass class NA_KogMaw_Jng_LeeSin(Ratings): pass class NA_KogMaw_Jng_Leona(Ratings): pass class NA_KogMaw_Jng_Lissandra(Ratings): pass class NA_KogMaw_Jng_Lucian(Ratings): pass class NA_KogMaw_Jng_Lulu(Ratings): pass class NA_KogMaw_Jng_Lux(Ratings): pass class NA_KogMaw_Jng_Malphite(Ratings): pass class NA_KogMaw_Jng_Malzahar(Ratings): pass class NA_KogMaw_Jng_Maokai(Ratings): pass class NA_KogMaw_Jng_MasterYi(Ratings): pass class NA_KogMaw_Jng_MissFortune(Ratings): pass class NA_KogMaw_Jng_MonkeyKing(Ratings): pass class NA_KogMaw_Jng_Mordekaiser(Ratings): pass class NA_KogMaw_Jng_Morgana(Ratings): pass class NA_KogMaw_Jng_Nami(Ratings): pass class NA_KogMaw_Jng_Nasus(Ratings): pass class NA_KogMaw_Jng_Nautilus(Ratings): pass class NA_KogMaw_Jng_Nidalee(Ratings): pass class NA_KogMaw_Jng_Nocturne(Ratings): pass class NA_KogMaw_Jng_Nunu(Ratings): pass class NA_KogMaw_Jng_Olaf(Ratings): pass class NA_KogMaw_Jng_Orianna(Ratings): pass class NA_KogMaw_Jng_Ornn(Ratings): pass class NA_KogMaw_Jng_Pantheon(Ratings): pass class NA_KogMaw_Jng_Poppy(Ratings): pass class NA_KogMaw_Jng_Quinn(Ratings): pass class NA_KogMaw_Jng_Rakan(Ratings): pass class NA_KogMaw_Jng_Rammus(Ratings): pass class NA_KogMaw_Jng_RekSai(Ratings): pass class NA_KogMaw_Jng_Renekton(Ratings): pass class NA_KogMaw_Jng_Rengar(Ratings): pass class NA_KogMaw_Jng_Riven(Ratings): pass class NA_KogMaw_Jng_Rumble(Ratings): pass class NA_KogMaw_Jng_Ryze(Ratings): pass class NA_KogMaw_Jng_Sejuani(Ratings): pass class NA_KogMaw_Jng_Shaco(Ratings): pass class NA_KogMaw_Jng_Shen(Ratings): pass class NA_KogMaw_Jng_Shyvana(Ratings): pass class NA_KogMaw_Jng_Singed(Ratings): pass class NA_KogMaw_Jng_Sion(Ratings): pass class NA_KogMaw_Jng_Sivir(Ratings): pass class NA_KogMaw_Jng_Skarner(Ratings): pass class NA_KogMaw_Jng_Sona(Ratings): pass class NA_KogMaw_Jng_Soraka(Ratings): pass class NA_KogMaw_Jng_Swain(Ratings): pass class NA_KogMaw_Jng_Syndra(Ratings): pass class NA_KogMaw_Jng_TahmKench(Ratings): pass class NA_KogMaw_Jng_Taliyah(Ratings): pass class NA_KogMaw_Jng_Talon(Ratings): pass class NA_KogMaw_Jng_Taric(Ratings): pass class NA_KogMaw_Jng_Teemo(Ratings): pass class NA_KogMaw_Jng_Thresh(Ratings): pass class NA_KogMaw_Jng_Tristana(Ratings): pass class NA_KogMaw_Jng_Trundle(Ratings): pass class NA_KogMaw_Jng_Tryndamere(Ratings): pass class NA_KogMaw_Jng_TwistedFate(Ratings): pass class NA_KogMaw_Jng_Twitch(Ratings): pass class NA_KogMaw_Jng_Udyr(Ratings): pass class NA_KogMaw_Jng_Urgot(Ratings): pass class NA_KogMaw_Jng_Varus(Ratings): pass class NA_KogMaw_Jng_Vayne(Ratings): pass class NA_KogMaw_Jng_Veigar(Ratings): pass class NA_KogMaw_Jng_Velkoz(Ratings): pass class NA_KogMaw_Jng_Vi(Ratings): pass class NA_KogMaw_Jng_Viktor(Ratings): pass class NA_KogMaw_Jng_Vladimir(Ratings): pass class NA_KogMaw_Jng_Volibear(Ratings): pass class NA_KogMaw_Jng_Warwick(Ratings): pass class NA_KogMaw_Jng_Xayah(Ratings): pass class NA_KogMaw_Jng_Xerath(Ratings): pass class NA_KogMaw_Jng_XinZhao(Ratings): pass class NA_KogMaw_Jng_Yasuo(Ratings): pass class NA_KogMaw_Jng_Yorick(Ratings): pass class NA_KogMaw_Jng_Zac(Ratings): pass class NA_KogMaw_Jng_Zed(Ratings): pass class NA_KogMaw_Jng_Ziggs(Ratings): pass class NA_KogMaw_Jng_Zilean(Ratings): pass class NA_KogMaw_Jng_Zyra(Ratings): pass
15.695444
46
0.766692
972
6,545
4.736626
0.151235
0.209818
0.389661
0.479583
0.803432
0.803432
0
0
0
0
0
0
0.169748
6,545
416
47
15.733173
0.847258
0
0
0.498195
0
0
0
0
0
0
0
0
0
1
0
true
0.498195
0.00361
0
0.501805
0
0
0
0
null
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
8
1f0cc27514308621ddb8f21110a8e3a0a7a672c2
95,413
py
Python
generated/resources/network_policy_heat.py
atsgen/tf-heat-plugin
5c0405eb93287368f60f7e227e5af5ada6bfeed2
[ "Apache-2.0" ]
1
2020-04-05T19:43:40.000Z
2020-04-05T19:43:40.000Z
generated/resources/network_policy_heat.py
atsgen/tf-heat-plugin
5c0405eb93287368f60f7e227e5af5ada6bfeed2
[ "Apache-2.0" ]
null
null
null
generated/resources/network_policy_heat.py
atsgen/tf-heat-plugin
5c0405eb93287368f60f7e227e5af5ada6bfeed2
[ "Apache-2.0" ]
1
2020-08-25T12:47:27.000Z
2020-08-25T12:47:27.000Z
# AUTO-GENERATED file from IFMapApiGenerator. Do Not Edit! from contrail_heat.resources import contrail try: from heat.common.i18n import _ except ImportError: pass from heat.engine import attributes from heat.engine import constraints from heat.engine import properties try: from heat.openstack.common import log as logging except ImportError: from oslo_log import log as logging import uuid from vnc_api import vnc_api LOG = logging.getLogger(__name__) class ContrailNetworkPolicy(contrail.ContrailResource): PROPERTIES = ( NAME, FQ_NAME, DISPLAY_NAME, NETWORK_POLICY_ENTRIES, NETWORK_POLICY_ENTRIES_POLICY_RULE, NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR, NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR, NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID, NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION, NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT, NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT, NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT, NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT, NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION, NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE, PROJECT ) = ( 'name', 'fq_name', 'display_name', 'network_policy_entries', 'network_policy_entries_policy_rule', 'network_policy_entries_policy_rule_rule_sequence', 'network_policy_entries_policy_rule_rule_sequence_major', 'network_policy_entries_policy_rule_rule_sequence_minor', 'network_policy_entries_policy_rule_rule_uuid', 'network_policy_entries_policy_rule_direction', 'network_policy_entries_policy_rule_protocol', 'network_policy_entries_policy_rule_src_addresses', 'network_policy_entries_policy_rule_src_addresses_subnet', 'network_policy_entries_policy_rule_src_addresses_subnet_ip_prefix', 'network_policy_entries_policy_rule_src_addresses_subnet_ip_prefix_len', 'network_policy_entries_policy_rule_src_addresses_virtual_network', 'network_policy_entries_policy_rule_src_addresses_security_group', 'network_policy_entries_policy_rule_src_addresses_network_policy', 'network_policy_entries_policy_rule_src_addresses_subnet_list', 'network_policy_entries_policy_rule_src_addresses_subnet_list_ip_prefix', 'network_policy_entries_policy_rule_src_addresses_subnet_list_ip_prefix_len', 'network_policy_entries_policy_rule_src_ports', 'network_policy_entries_policy_rule_src_ports_start_port', 'network_policy_entries_policy_rule_src_ports_end_port', 'network_policy_entries_policy_rule_application', 'network_policy_entries_policy_rule_dst_addresses', 'network_policy_entries_policy_rule_dst_addresses_subnet', 'network_policy_entries_policy_rule_dst_addresses_subnet_ip_prefix', 'network_policy_entries_policy_rule_dst_addresses_subnet_ip_prefix_len', 'network_policy_entries_policy_rule_dst_addresses_virtual_network', 'network_policy_entries_policy_rule_dst_addresses_security_group', 'network_policy_entries_policy_rule_dst_addresses_network_policy', 'network_policy_entries_policy_rule_dst_addresses_subnet_list', 'network_policy_entries_policy_rule_dst_addresses_subnet_list_ip_prefix', 'network_policy_entries_policy_rule_dst_addresses_subnet_list_ip_prefix_len', 'network_policy_entries_policy_rule_dst_ports', 'network_policy_entries_policy_rule_dst_ports_start_port', 'network_policy_entries_policy_rule_dst_ports_end_port', 'network_policy_entries_policy_rule_action_list', 'network_policy_entries_policy_rule_action_list_simple_action', 'network_policy_entries_policy_rule_action_list_gateway_name', 'network_policy_entries_policy_rule_action_list_apply_service', 'network_policy_entries_policy_rule_action_list_mirror_to', 'network_policy_entries_policy_rule_action_list_mirror_to_analyzer_name', 'network_policy_entries_policy_rule_action_list_mirror_to_encapsulation', 'network_policy_entries_policy_rule_action_list_mirror_to_analyzer_ip_address', 'network_policy_entries_policy_rule_action_list_mirror_to_routing_instance', 'network_policy_entries_policy_rule_action_list_mirror_to_udp_port', 'network_policy_entries_policy_rule_action_list_assign_routing_instance', 'network_policy_entries_policy_rule_action_list_log', 'network_policy_entries_policy_rule_action_list_alert', 'network_policy_entries_policy_rule_action_list_qos_action', 'network_policy_entries_policy_rule_ethertype', 'project' ) properties_schema = { NAME: properties.Schema( properties.Schema.STRING, _('NAME.'), update_allowed=True, required=False, ), FQ_NAME: properties.Schema( properties.Schema.STRING, _('FQ_NAME.'), update_allowed=True, required=False, ), DISPLAY_NAME: properties.Schema( properties.Schema.STRING, _('DISPLAY_NAME.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES: properties.Schema( properties.Schema.MAP, _('NETWORK_POLICY_ENTRIES.'), update_allowed=True, required=False, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE: properties.Schema( properties.Schema.MAP, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE.'), update_allowed=True, required=False, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR.'), update_allowed=True, required=False, ), } ), NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION.'), update_allowed=True, required=False, constraints=[ constraints.AllowedValues([u'>', u'<>']), ], ), NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET: properties.Schema( properties.Schema.MAP, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET.'), update_allowed=True, required=False, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN.'), update_allowed=True, required=False, ), } ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN.'), update_allowed=True, required=False, ), } ) ), } ) ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT.'), update_allowed=True, required=False, constraints=[ constraints.Range(-1, 65535), ], ), NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT.'), update_allowed=True, required=False, constraints=[ constraints.Range(-1, 65535), ], ), } ) ), NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET: properties.Schema( properties.Schema.MAP, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET.'), update_allowed=True, required=False, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN.'), update_allowed=True, required=False, ), } ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN.'), update_allowed=True, required=False, ), } ) ), } ) ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS.'), update_allowed=True, required=False, schema=properties.Schema( properties.Schema.MAP, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT.'), update_allowed=True, required=False, constraints=[ constraints.Range(-1, 65535), ], ), NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT.'), update_allowed=True, required=False, constraints=[ constraints.Range(-1, 65535), ], ), } ) ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST: properties.Schema( properties.Schema.MAP, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST.'), update_allowed=True, required=False, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION.'), update_allowed=True, required=False, constraints=[ constraints.AllowedValues([u'deny', u'pass']), ], ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE: properties.Schema( properties.Schema.LIST, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO: properties.Schema( properties.Schema.MAP, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO.'), update_allowed=True, required=False, schema={ NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT: properties.Schema( properties.Schema.INTEGER, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT.'), update_allowed=True, required=False, ), } ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG: properties.Schema( properties.Schema.BOOLEAN, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT: properties.Schema( properties.Schema.BOOLEAN, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT.'), update_allowed=True, required=False, ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION.'), update_allowed=True, required=False, ), } ), NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE: properties.Schema( properties.Schema.STRING, _('NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE.'), update_allowed=True, required=False, constraints=[ constraints.AllowedValues([u'IPv4', u'IPv6']), ], ), } ) ), } ), PROJECT: properties.Schema( properties.Schema.STRING, _('PROJECT.'), update_allowed=True, required=False, ), } attributes_schema = { NAME: attributes.Schema( _('NAME.'), ), FQ_NAME: attributes.Schema( _('FQ_NAME.'), ), DISPLAY_NAME: attributes.Schema( _('DISPLAY_NAME.'), ), NETWORK_POLICY_ENTRIES: attributes.Schema( _('NETWORK_POLICY_ENTRIES.'), ), PROJECT: attributes.Schema( _('PROJECT.'), ), } update_allowed_keys = ('Properties',) def handle_create(self): parent_obj = None if parent_obj is None and self.properties.get(self.PROJECT): try: parent_obj = self.vnc_lib().project_read(id=self.properties.get(self.PROJECT)) except vnc_api.NoIdError: parent_obj = self.vnc_lib().project_read(fq_name_str=self.properties.get(self.PROJECT)) except: parent_obj = None if parent_obj is None: tenant_id = self.stack.context.tenant_id parent_obj = self.vnc_lib().project_read(id=str(uuid.UUID(tenant_id))) if parent_obj is None: raise Exception('Error: parent is not specified in template!') obj_0 = vnc_api.NetworkPolicy(name=self.properties[self.NAME], parent_obj=parent_obj) if self.properties.get(self.DISPLAY_NAME) is not None: obj_0.set_display_name(self.properties.get(self.DISPLAY_NAME)) if self.properties.get(self.NETWORK_POLICY_ENTRIES) is not None: obj_1 = vnc_api.PolicyEntriesType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE) is not None: for index_1 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE))): obj_2 = vnc_api.PolicyRuleType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE) is not None: obj_3 = vnc_api.SequenceType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR) is not None: obj_3.set_major(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR) is not None: obj_3.set_minor(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR)) obj_2.set_rule_sequence(obj_3) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID) is not None: obj_2.set_rule_uuid(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION) is not None: obj_2.set_direction(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL) is not None: obj_2.set_protocol(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES) is not None: for index_2 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES))): obj_3 = vnc_api.AddressType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET) is not None: obj_4 = vnc_api.SubnetType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX) is not None: obj_4.set_ip_prefix(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN)) obj_3.set_subnet(obj_4) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK) is not None: obj_3.set_virtual_network(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP) is not None: obj_3.set_security_group(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY) is not None: obj_3.set_network_policy(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST) is not None: for index_3 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST))): obj_4 = vnc_api.SubnetType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX) is not None: obj_4.set_ip_prefix(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN)) obj_3.add_subnet_list(obj_4) obj_2.add_src_addresses(obj_3) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS) is not None: for index_2 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS))): obj_3 = vnc_api.PortType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT) is not None: obj_3.set_start_port(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT) is not None: obj_3.set_end_port(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT)) obj_2.add_src_ports(obj_3) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION) is not None: for index_2 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION))): obj_2.add_application(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION)[index_2]) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES) is not None: for index_2 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES))): obj_3 = vnc_api.AddressType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET) is not None: obj_4 = vnc_api.SubnetType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX) is not None: obj_4.set_ip_prefix(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN)) obj_3.set_subnet(obj_4) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK) is not None: obj_3.set_virtual_network(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP) is not None: obj_3.set_security_group(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY) is not None: obj_3.set_network_policy(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST) is not None: for index_3 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST))): obj_4 = vnc_api.SubnetType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX) is not None: obj_4.set_ip_prefix(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN)) obj_3.add_subnet_list(obj_4) obj_2.add_dst_addresses(obj_3) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS) is not None: for index_2 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS))): obj_3 = vnc_api.PortType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT) is not None: obj_3.set_start_port(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT) is not None: obj_3.set_end_port(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT)) obj_2.add_dst_ports(obj_3) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST) is not None: obj_3 = vnc_api.ActionListType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION) is not None: obj_3.set_simple_action(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME) is not None: obj_3.set_gateway_name(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE) is not None: for index_3 in range(len(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE))): obj_3.add_apply_service(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE)[index_3]) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO) is not None: obj_4 = vnc_api.MirrorActionType() if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME) is not None: obj_4.set_analyzer_name(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION) is not None: obj_4.set_encapsulation(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS) is not None: obj_4.set_analyzer_ip_address(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE) is not None: obj_4.set_routing_instance(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT) is not None: obj_4.set_udp_port(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT)) obj_3.set_mirror_to(obj_4) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE) is not None: obj_3.set_assign_routing_instance(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG) is not None: obj_3.set_log(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT) is not None: obj_3.set_alert(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT)) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION) is not None: obj_3.set_qos_action(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION)) obj_2.set_action_list(obj_3) if self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE) is not None: obj_2.set_ethertype(self.properties.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE)) obj_1.add_policy_rule(obj_2) obj_0.set_network_policy_entries(obj_1) try: obj_uuid = super(ContrailNetworkPolicy, self).resource_create(obj_0) except: raise Exception(_('network-policy %s could not be updated.') % self.name) self.resource_id_set(obj_uuid) def handle_update(self, json_snippet, tmpl_diff, prop_diff): try: obj_0 = self.vnc_lib().network_policy_read( id=self.resource_id ) except: raise Exception(_('network-policy %s not found.') % self.name) if prop_diff.get(self.DISPLAY_NAME) is not None: obj_0.set_display_name(prop_diff.get(self.DISPLAY_NAME)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES) is not None: obj_1 = vnc_api.PolicyEntriesType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE) is not None: for index_1 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE))): obj_2 = vnc_api.PolicyRuleType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE) is not None: obj_3 = vnc_api.SequenceType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR) is not None: obj_3.set_major(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MAJOR)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR) is not None: obj_3.set_minor(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_SEQUENCE_MINOR)) obj_2.set_rule_sequence(obj_3) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID) is not None: obj_2.set_rule_uuid(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_RULE_UUID)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION) is not None: obj_2.set_direction(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DIRECTION)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL) is not None: obj_2.set_protocol(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_PROTOCOL)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES) is not None: for index_2 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES))): obj_3 = vnc_api.AddressType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET) is not None: obj_4 = vnc_api.SubnetType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX) is not None: obj_4.set_ip_prefix(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_IP_PREFIX_LEN)) obj_3.set_subnet(obj_4) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK) is not None: obj_3.set_virtual_network(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_VIRTUAL_NETWORK)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP) is not None: obj_3.set_security_group(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SECURITY_GROUP)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY) is not None: obj_3.set_network_policy(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_NETWORK_POLICY)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST) is not None: for index_3 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST))): obj_4 = vnc_api.SubnetType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX) is not None: obj_4.set_ip_prefix(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN)) obj_3.add_subnet_list(obj_4) obj_2.add_src_addresses(obj_3) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS) is not None: for index_2 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS))): obj_3 = vnc_api.PortType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT) is not None: obj_3.set_start_port(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_START_PORT)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT) is not None: obj_3.set_end_port(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_SRC_PORTS_END_PORT)) obj_2.add_src_ports(obj_3) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION) is not None: for index_2 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION))): obj_2.add_application(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_APPLICATION)[index_2]) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES) is not None: for index_2 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES))): obj_3 = vnc_api.AddressType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET) is not None: obj_4 = vnc_api.SubnetType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX) is not None: obj_4.set_ip_prefix(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_IP_PREFIX_LEN)) obj_3.set_subnet(obj_4) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK) is not None: obj_3.set_virtual_network(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_VIRTUAL_NETWORK)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP) is not None: obj_3.set_security_group(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SECURITY_GROUP)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY) is not None: obj_3.set_network_policy(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_NETWORK_POLICY)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST) is not None: for index_3 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST))): obj_4 = vnc_api.SubnetType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX) is not None: obj_4.set_ip_prefix(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN) is not None: obj_4.set_ip_prefix_len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST, {})[index_3].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_ADDRESSES_SUBNET_LIST_IP_PREFIX_LEN)) obj_3.add_subnet_list(obj_4) obj_2.add_dst_addresses(obj_3) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS) is not None: for index_2 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS))): obj_3 = vnc_api.PortType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT) is not None: obj_3.set_start_port(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_START_PORT)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT) is not None: obj_3.set_end_port(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS, {})[index_2].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_DST_PORTS_END_PORT)) obj_2.add_dst_ports(obj_3) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST) is not None: obj_3 = vnc_api.ActionListType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION) is not None: obj_3.set_simple_action(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_SIMPLE_ACTION)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME) is not None: obj_3.set_gateway_name(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_GATEWAY_NAME)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE) is not None: for index_3 in range(len(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE))): obj_3.add_apply_service(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_APPLY_SERVICE)[index_3]) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO) is not None: obj_4 = vnc_api.MirrorActionType() if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME) is not None: obj_4.set_analyzer_name(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_NAME)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION) is not None: obj_4.set_encapsulation(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ENCAPSULATION)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS) is not None: obj_4.set_analyzer_ip_address(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ANALYZER_IP_ADDRESS)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE) is not None: obj_4.set_routing_instance(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_ROUTING_INSTANCE)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT) is not None: obj_4.set_udp_port(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_MIRROR_TO_UDP_PORT)) obj_3.set_mirror_to(obj_4) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE) is not None: obj_3.set_assign_routing_instance(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ASSIGN_ROUTING_INSTANCE)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG) is not None: obj_3.set_log(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_LOG)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT) is not None: obj_3.set_alert(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_ALERT)) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION) is not None: obj_3.set_qos_action(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ACTION_LIST_QOS_ACTION)) obj_2.set_action_list(obj_3) if prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE) is not None: obj_2.set_ethertype(prop_diff.get(self.NETWORK_POLICY_ENTRIES, {}).get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE, {})[index_1].get(self.NETWORK_POLICY_ENTRIES_POLICY_RULE_ETHERTYPE)) obj_1.add_policy_rule(obj_2) obj_0.set_network_policy_entries(obj_1) try: self.vnc_lib().network_policy_update(obj_0) except: raise Exception(_('network-policy %s could not be updated.') % self.name) def handle_delete(self): if self.resource_id is None: return try: self.vnc_lib().network_policy_delete(id=self.resource_id) except Exception as ex: self._ignore_not_found(ex) LOG.warn(_('network_policy %s already deleted.') % self.name) def _show_resource(self): obj = self.vnc_lib().network_policy_read(id=self.resource_id) obj_dict = obj.serialize_to_json() return obj_dict def resource_mapping(): return { 'OS::ContrailV2::NetworkPolicy': ContrailNetworkPolicy, }
126.374834
3,115
0.662677
11,131
95,413
5.103674
0.014913
0.227922
0.340791
0.351494
0.977011
0.974053
0.964777
0.96365
0.959197
0.951839
0
0.006976
0.256286
95,413
754
3,116
126.54244
0.793602
0.000587
0
0.475995
1
0
0.064371
0.06112
0
0
0
0
0
1
0.006859
false
0.002743
0.015089
0.001372
0.032922
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
12
1f6e5e8311f8e30898134902efe217b4d18232b2
636
py
Python
cyder/cydns/tests/test_models.py
ngokevin/chili
36c354ac567471d5e36dccf9eea5096c6b02d4b9
[ "BSD-3-Clause" ]
2
2019-03-16T00:47:09.000Z
2022-03-04T14:39:08.000Z
cyder/cydns/tests/test_models.py
ngokevin/chili
36c354ac567471d5e36dccf9eea5096c6b02d4b9
[ "BSD-3-Clause" ]
1
2020-04-24T08:24:55.000Z
2020-04-24T08:24:55.000Z
cyder/cydns/tests/test_models.py
ngokevin/chili
36c354ac567471d5e36dccf9eea5096c6b02d4b9
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from cyder.cydns.address_record.tests.test_models import * from cyder.cydns.cname.tests.test_models import * from cyder.cydns.cybind.tests.test_models import * from cyder.cydns.domain.tests.test_models import * from cyder.cydns.ip.tests.test_models import * from cyder.cydns.mx.tests.test_models import * from cyder.cydns.nameserver.tests.test_models import * from cyder.cydns.ptr.tests.test_models import * from cyder.cydns.soa.tests.test_models import * from cyder.cydns.srv.tests.test_models import * from cyder.cydns.sshfp.tests.test_models import * from cyder.cydns.txt.tests.test_models import *
42.4
58
0.820755
102
636
4.990196
0.215686
0.212181
0.330059
0.495088
0.756385
0.756385
0.756385
0
0
0
0
0
0.083333
636
14
59
45.428571
0.87307
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
2f0a40668144a3b99e87d6238a689a8cb8a3897f
41,804
py
Python
datasets/generate_vp_label_dist_culane.py
Jinming-Su/SGNet
fcf35edaf332c1a4e2713acad5a0fc0e21509c3e
[ "MIT" ]
13
2021-10-15T15:14:45.000Z
2022-03-09T00:22:55.000Z
datasets/generate_vp_label_dist_culane.py
Jinming-Su/SGNet
fcf35edaf332c1a4e2713acad5a0fc0e21509c3e
[ "MIT" ]
4
2021-10-17T09:04:20.000Z
2022-03-25T06:43:00.000Z
datasets/generate_vp_label_dist_culane.py
Jinming-Su/SGNet
fcf35edaf332c1a4e2713acad5a0fc0e21509c3e
[ "MIT" ]
2
2021-11-17T11:31:35.000Z
2021-11-29T06:50:35.000Z
import numpy as np import cv2 import matplotlib.pyplot as plt from glob import glob import os import random import traceback import tqdm import traceback import torch color_list = [(0, 0, 255), (0, 255, 0), (0, 255, 255), (255, 0, 255),] img_dir = 'datasets/culane/' seg_label_dir = 'datasets/culane/laneseg_label_w16_new/' #seg_line_label_dir ='dataset/seg_line_label' rpn_label_dir = 'datasets/culane/rpn_label_new' vp_label_dir = 'datasets/culane/vp_label_new_32' H = 590 W = 1640 def plt_show(img): plt.figure(figsize=(40, 40)) im2 = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.imshow(im2) def get_anno(frame_mp4_number, seg_width = 16, show = False, path2write = None, offset = 10): """ display : 0, nothin; 1, show; 2, write return : (y1, y2, x1, w1, \theta) """ #得到frame/mp4/number seg_img_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_img_file) seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) #图中没有车道线 if len(seg_labels) == 1: if(show): plt_show(seg_img) return (None, None, None) #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] #得到覆盖标注的最小矩形 w_annos = [] for seg_label in seg_labels[1:]: rect, box_points = get_min_rect(seg_img_gray, seg_label) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] ## ## ## w_annos.append(min(w, h)) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle_y) lines.append([A, B, C, angle_x]) #只有一条车道线的情况 if(len(lines) == 1): x_anno = x_center - max(w, h)/2 * np.cos(angle_x*np.pi/180) y_l = y_r = y_center - max(w, h)/2 * np.sin(angle_x*np.pi/180) if show: cv2.circle(seg_img, (int(x_anno), int(y_l)), 3, (0, 255, 0), thickness=3) plt_show(seg_img) return (y_l, y_r, [[x_anno, w_annos[0], angle_x]]) #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)-1): for j in range(i+1, len(lines)): #print(lines[i], lines[j]) x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) #一个点直接回归直线 if(len(x_inter_list) == 1): seg_img_modify_0 = seg_img.copy() y_l = y_inter_list[0] y_r = y_inter_list[0] # cv2.line(seg_img_modify_0, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (255, 0, 0), 3) y_l = y_inter_list[0] y_r = y_inter_list[0] if show: cv2.line(seg_img, (0, y_l), (seg_img.shape[1], y_r), (0, 0 , 255), 3 ) cv2.circle(seg_img, (x_inter_list[0], y_l), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img) return ( y_l, y_r, [[x_inter_list[0], w_annos[0], 0]] ) #得到 y=kx+b 的[k, b] #kx-y+b=0 else: line_anno_list = [] x_annos = [] seg_img_modify_10 = seg_img.copy() horizon_line ,y_l, y_r = modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify_10, offset=offset) for line, w_anno in zip(lines, w_annos): #print(line, horizon_line) x_anno, _ = get_inter_point(line[0], line[1], line[2], horizon_line[0], -1, horizon_line[1]) x_annos.append(x_anno) # x ,w ,theta line_anno_list.append([ x_anno , w_anno, line[3]]) if show: cv2.line(seg_img, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (0, 0 , 255), 3 ) for line, x_anno in zip(lines, x_annos): #矩形代表直线在水平分割线上交点 y_anno = (-line[2] + -line[0] * x_anno)/line[1] cv2.circle(seg_img, (int(x_anno), int(y_anno)), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img) return (y_l, y_r, line_anno_list) def plt_show(img): im2 = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.imshow(im2) def show_bounding_boxes(seg_anno_file): img = cv2.imread(seg_anno_file) img = img * 50 img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(img_gray)) #得到覆盖标注的最小矩形 for seg_label in seg_labels[1:]: x,y,w,h =get_boundingRect(img_gray, seg_label) cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 0), 5) _, box_points = get_min_rect(img_gray, seg_label) cv2.drawContours(img, [box_points], 0, (0, 0, 255), 2) plt_show(img) def get_boundingRect(img_gray, seg_label): #画最小标准形 cnt = (img_gray==seg_label).astype(np.uint8) #cnt 二维图像或点集 x, y, w, h = cv2.boundingRect(cnt) return x,y,w,h # cv2.minAreaRect返回的width,height,angle比较难理解 # https://stackoverflow.com/questions/24073127/opencvs-rotatedrect-angle-does-not-provide-enough-information # https://stackoverflow.com/questions/15956124/minarearect-angles-unsure-about-the-angle-returned/21427814#21427814 # 得到由y轴逆时针转到直线的角度 def angle_convert(width, height, angle): assert width!=height return 180+angle if width>height else angle + 90 return angle # 得到由x轴正方向夹角 def angle_convert_x(width, height, angle): assert width!=height return 90-angle if width>height else -angle return angle # 返回在cv2的坐标下与y轴的夹角, 由点斜式 # angle是由y轴转到x轴的方向转到直线的角度 def get_line_equation(y0, x0, angle): if angle == 90: return (0, 1, -y0); else: k=np.tan(angle*np.pi/180) #两点式 #x-x0=k(y-y0) #x-ky+ky0-x0=0 return (1, -k, k*y0-x0) def get_line_equation_x(x0, y0, angle): if angle == 90: return (0, 1, -y0); else: k=np.tan(angle*np.pi/180) #两点式 #x-x0=k(y-y0) #x-ky+ky0-x0=0 return (k, 1, -k*x0-y0) def draw_line_equation_ori(img, A, B, C, y_max, color=(0, 255, 0), x_max=None): #首先处理垂直y轴, A=0时需要x_max if A == 0: assert x_max for x in range(x_max): cv2.circle(img, (x, -int(C)), 5, color, 4) return for y in range(y_max): x = (-B*y - C)/A cv2.circle(img, (int(x), y), 1, color, 4) # TODO : 考虑直线与矩形的相交具体怎么样, cv2.line 能画两个点在图外吗 def draw_line_equation(img, A, B, C, y_max, color = (0, 255, 0), x_max = None): #def draw_line_equation(img, A, B, C, y_max = H, color = (0, 255, 0), x_max = None): assert (A!=0 or B!=0) if A==0: y_lr = -C/B cv2.line(img, (0, y_lr), (x_max, y_lr), color, 3) else: x1 = (-B*0 - C)/A x2 = (-B*y_max - C)/A cv2.line(img, (int(x1), 0), (int(x2), y_max), color, 3) def get_inter_point(A1, B1, C1, A2, B2, C2): #基于一般式,一般式 A,B不全为0 assert (A1!=0 or B1!=0) and (A2!=0 or B2!=0) m=A1*B2-A2*B1 if m==0: return (-1000, -1000) else: x=(C2*B1-C1*B2)/m y=(C1*A2-C2*A1)/m return x,y #在点集的两边增加点集最小x,最大x的两个在一条水平线上的点 def modify_points(x_inter_list, y_inter_list, seg_img, draw = False, offset=0): y_inter_center = np.mean(y_inter_list) x_inter_min = np.min(x_inter_list) - offset x_inter_max = np.max(x_inter_list) + offset horizon_line = np.polyfit(x_inter_list, y_inter_list, deg=1) x_inter_list.append(x_inter_min) y_inter_list.append(y_inter_center) x_inter_list.append(x_inter_max) y_inter_list.append(y_inter_center) horizon_line = np.polyfit(x_inter_list, y_inter_list, deg=1) y_l = horizon_line[1] y_r = horizon_line[0] * seg_img.shape[1] + horizon_line[1] if draw: cv2.circle(seg_img, (int(x_inter_min),int(y_inter_center)), 3, (0, 255, 255), thickness=3) cv2.circle(seg_img, (int(x_inter_max),int(y_inter_center)), 3, (0, 255, 255), thickness=3) cv2.line(seg_img, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (255, 0, 0), 3) return horizon_line , y_l, y_r #对比不同方法得到的horizon_line def contrast_horizon_line(frame_mp4_number, display, path2write = None): """ display : 0, nothin; 1, show; 2, write """ ori_img = cv2.imread(os.path.join(img_dir, frame_mp4_number+'.jpg')) seg_anno_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_anno_file) seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) if len(seg_labels) == 1: return -1,-1 #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] #得到覆盖标注的最小矩形 for seg_label in seg_labels[1:]: x,y,w,h =get_boundingRect(seg_img_gray, seg_label) # if display>0: # cv2.rectangle(img, (x, y), (x+w, y+h), (0, 0, 255), 2) rect, box_points = get_min_rect(seg_img_gray, seg_label) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] angle = rect[2] if display>0: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 1) #求这个矩形代表的直线 angle = angle_convert(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle) if display>0: draw_line_equation(seg_img, A, B ,C, seg_img.shape[0]) lines.append([A, B, C]) #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)): for j in range(i+1, len(lines)): x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) if display>0: cv2.circle(seg_img, (int(x_inter),int(y_inter)), 3, (0, 255, 0), thickness=3) #改进前 seg_img_copy = seg_img.copy() horizon_line = np.polyfit(x_inter_list, y_inter_list, deg=1) y_l = horizon_line[1] y_r = horizon_line[0] * seg_img.shape[1] + horizon_line[1] cv2.line(seg_img_copy, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (255, 0, 0), 3) #改进前 #一个点直接回归直线 if(len(x_inter_list) == 1): seg_img_modify_0 = seg_img.copy() y_l = y_inter_list[0] y_r = y_inter_list[0] cv2.line(seg_img_modify_0, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (255, 0, 0), 3) y_l = y_inter_list[0] y_r = y_inter_list[0] if display==1: plt_show(np.vstack(( np.hstack((seg_img_ori, seg_img_copy)), np.hstack((ori_img, seg_img_modify_0)) )) ) elif display == 2: if not os.path.exists(path2write): os.makedirs(path2write) cv2.imwrite(os.path.join(path2write, '_'.join(name_split_list[-3:])), \ np.vstack(( np.hstack((seg_img_ori, seg_img_copy)), np.hstack((ori_img, seg_img_modify_0)) )) ) #得到 y=kx+b 的[k, b] #kx-y+b=0 else: #添加点集左右两边的点 seg_img_modify_0 = seg_img.copy() modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify_0 ) #offset 5 seg_img_modify_5 = seg_img.copy() modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify_5, 5) #offset 10 seg_img_modify_10 = seg_img.copy() horizon_line ,y_l, y_r = modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify_10, 20) if display==1: plt_show(np.vstack((np.hstack((seg_img_ori, seg_img_copy, seg_img_modify_0)), \ np.hstack((ori_img, seg_img_modify_5, seg_img_modify_10))))) elif display == 2: if not os.path.exists(path2write): os.makedirs(path2write) cv2.imwrite(os.path.join(path2write, '_'.join(name_split_list[-3:])), \ np.vstack((np.hstack((seg_img_ori, seg_img_copy, seg_img_modify_0)), \ np.hstack((ori_img, seg_img_modify_5, seg_img_modify_10))))) return y_l, y_r # y1, y2 # x1, w1, \theta def get_anno(frame_mp4_number, seg_width = 16, show = False, path2write = None, offset = 10): """ display : 0, nothin; 1, show; 2, write return : (y1, y2, x1, w1, \theta) """ #得到frame/mp4/number seg_img_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_img_file) H, W = seg_img.shape[:2] seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) #图中没有车道线 if len(seg_labels) == 1: if(show): plt_show(seg_img) return (None, None, None) #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] #得到覆盖标注的最小矩形 w_annos = [] for seg_label in seg_labels[1:]: rect, box_points, (x3, x4) = get_min_rect(seg_img_gray, seg_label) cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] angle = rect[2] if display>0: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 1) #求这个矩形代表的直线 angle = angle_convert(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle) if display>0: draw_line_equation(seg_img, A, B ,C, seg_img.shape[0]) lines.append([A, B, C]) A, B, C = get_line_equation(y_center, x_center, angle_y) lines.append([A, B, C, angle_x]) plt_show(seg_img) #只有一条车道线的情况 if(len(lines) == 1): x_anno = x_center - max(w, h)/2 * np.cos(angle_x*np.pi/180) y_l = y_r = y_center - max(w, h)/2 * np.sin(angle_x*np.pi/180) if show: cv2.circle(seg_img, (int(x_anno), int(y_l)), 3, (0, 255, 0), thickness=3) plt_show(seg_img) return (y_l, y_r, [[x_anno, w_annos[0], angle_x]]) #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)-1): for j in range(i+1, len(lines)): #print(lines[i], lines[j]) x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) #一个点直接回归直线 if(len(x_inter_list) == 1): seg_img_modify_0 = seg_img.copy() y_l = y_inter_list[0] y_r = y_inter_list[0] # cv2.line(seg_img_modify_0, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (255, 0, 0), 3) y_l = y_inter_list[0] y_r = y_inter_list[0] if show: cv2.line(seg_img, (0, y_l), (seg_img.shape[1], y_r), (0, 0 , 255), 3 ) cv2.circle(seg_img, (x_inter_list[0], y_l), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img) return ( y_l, y_r, [[x_inter_list[0], w_annos[0], 0]] ) #得到 y=kx+b 的[k, b] #kx-y+b=0 else: line_anno_list = [] x_annos = [] seg_img_modify_10 = seg_img.copy() horizon_line ,y_l, y_r = modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify_10, offset=offset) for line, w_anno in zip(lines, w_annos): #print(line, horizon_line) x_anno, _ = get_inter_point(line[0], line[1], line[2], horizon_line[0], -1, horizon_line[1]) x_annos.append(x_anno) # x ,w ,theta line_anno_list.append([ x_anno , w_anno, line[3]]) if show: cv2.line(seg_img, (0, int(y_l)), (seg_img.shape[1], int(y_r)), (0, 0 , 255), 3 ) for line, x_anno in zip(lines, x_annos): #矩形代表直线在水平分割线上交点 y_anno = (-line[2] + -line[0] * x_anno)/line[1] cv2.circle(seg_img, (int(x_anno), int(y_anno)), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img) return (y_l, y_r, line_anno_list) def distance(p1, p2): return np.linalg.norm(np.array(p1)-np.array(p2)) def draw_rot_rect(rect, img): box_points = cv2.boxPoints(rect) box_points = np.int0(box_points) #draw contour里 x坐标在y前, 两列交换 box_points = box_points[:, ::-1] cv2.drawContours(img, [box_points], 0, color_list[0], 2) #求在图内的最小矩形 def get_min_rect(img_gray, seg_label, seg_img): points = np.where(img_gray==seg_label) points = np.stack(points, axis=1) #输入点集 rect = cv2.minAreaRect(points) box_points = cv2.boxPoints(rect) box_points = np.int0(box_points) #draw contour里 x坐标在y前, 两列交换 box_points = box_points[:, ::-1] y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] w_anno = min(w, h) h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) x_upper_center = x_center - h_anno/2 * np.cos(angle_x * np.pi / 180) y_upper_center = y_center - h_anno/2 * np.sin(angle_x * np.pi / 180) #短边与x轴的夹角 angle_v_x = angle_x + 90 if angle_x < 90 else angle_x - 90 x1 = x_upper_center + w_anno/2 * np.cos(angle_v_x * np.pi / 180) x2 = x_upper_center - w_anno/2 * np.cos(angle_v_x * np.pi / 180) y1 = y_upper_center + w_anno/2 * np.sin(angle_v_x * np.pi / 180) y2 = y_upper_center - w_anno/2 * np.sin(angle_v_x * np.pi / 180) #check短边两点是否正确 # cv2.circle(seg_img, (int(x_upper_center),int(y_upper_center)), 1, (0, 255, 0), thickness=2) # cv2.circle(seg_img, (int(x1),int(y1)), 1, (0, 255, 0), thickness=2) # cv2.circle(seg_img, (int(x2),int(y2)), 1, (0, 255, 0), thickness=2) line_1 = get_line_equation(y1, x1, angle_y) line_2 = get_line_equation(y2, x2, angle_y) #draw_line_equation(img, A, B, C, y_max = H, color = (0, 255, 0), x_max = None): #def get_inter_point(A1, B1, C1, A2, B2, C2): # draw_line_equation(seg_img, line_1[0], line_1[1], line_1[2], x_max = W) # draw_line_equation(seg_img, line_2[0], line_2[1], line_2[2], x_max = W) #与y=H-1交点 x_inter_1_h, y_inter_1_h = get_inter_point(line_1[0], line_1[1], line_1[2], 0, 1, -H+1) x_inter_2_h, y_inter_2_h = get_inter_point(line_2[0], line_2[1], line_2[2], 0, 1, -H+1) #与x=0或W-1交点 W_or_0 = 0 if w>h else W-1 x_inter_1_w, y_inter_1_w = get_inter_point(line_1[0], line_1[1], line_1[2], 1, 0, -W_or_0) x_inter_2_w, y_inter_2_w = get_inter_point(line_2[0], line_2[1], line_2[2], 1, 0, -W_or_0) # cv2.circle(seg_img, (int(x_inter_1),int(y_inter_1)), 1, (0, 255, 0), thickness=2) # cv2.circle(seg_img, (int(x_inter_2),int(y_inter_2)), 1, (0, 255, 0), thickness=2) if distance([x1,y1], [x_inter_1_h, y_inter_1_h]) < distance([x1,y1], [x_inter_1_w, y_inter_1_w]): x_inter_1, y_inter_1 = x_inter_1_h, y_inter_1_h distance_1 = distance([x1,y1], [x_inter_1_h, y_inter_1_h]) else: x_inter_1, y_inter_1 = x_inter_1_w, y_inter_1_w distance_1 = distance([x1,y1], [x_inter_1_w, y_inter_1_w]) if distance([x2,y2], [x_inter_2_h, y_inter_2_h]) < distance([x2,y2], [x_inter_2_w, y_inter_2_w]): x_inter_2, y_inter_2 = x_inter_2_h, y_inter_2_h distance_2 = distance([x2, y2], [x_inter_2_h, y_inter_2_h]) else: x_inter_2, y_inter_2 = x_inter_2_w, y_inter_2_w distance_2 = distance([x2,y2], [x_inter_2_w, y_inter_2_w]) if distance_1 < distance_2 : cut_h = h_anno - distance_1 x3, y3 = x_inter_1, y_inter_1 x4 = x3 - w_anno * np.cos(angle_v_x * np.pi / 180) y4 = y3 - w_anno * np.sin(angle_v_x * np.pi / 180) else: cut_h = h_anno - distance_2 x4, y4 = x_inter_2, y_inter_2 x3 = x4 + w_anno * np.cos(angle_v_x * np.pi / 180) y3 = y4 + w_anno * np.sin(angle_v_x * np.pi / 180) #cv2.circle(seg_img, (int(x3),int(y3)), 3, (0, 255, 0), thickness=2) #cv2.circle(seg_img, (int(x4),int(y4)), 3, (0, 0, 255), thickness=2) # print('x3, y3', x3, y3) # print('x4, y4', x4, y4) if min(distance_1, distance_2) <= h_anno: new_x_center = x_center - cut_h / 2 * np.cos(angle_x * np.pi / 180) new_y_center = y_center - cut_h / 2 * np.sin(angle_x * np.pi / 180) if w>h: new_rect = ((new_y_center, new_x_center), (w-cut_h, h), angle) else: new_rect = ((new_y_center, new_x_center), (w, h-cut_h), angle) new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] return new_rect, new_box_points else: return rect, box_points #求在图内的最小矩形, 求与矩形的交点连线 def get_min_rect_v2(img_gray, seg_label, seg_img): points = np.where(img_gray==seg_label) points = np.stack(points, axis=1) #输入点集 rect = cv2.minAreaRect(points) box_points = cv2.boxPoints(rect) box_points = np.int0(box_points) #draw contour里 x坐标在y前, 两列交换 box_points = box_points[:, ::-1] #cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 1) #plt_show(seg_img) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] w_anno = min(w, h) h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) x_upper_center = x_center - h_anno/2 * np.cos(angle_x * np.pi / 180) y_upper_center = y_center - h_anno/2 * np.sin(angle_x * np.pi / 180) #长边中心线 line = get_line_equation(y_center, x_center, angle_y) #draw_line_equation(seg_img, line[0], line[1], line[2], W) #与y=H-1交点 x_inter_h, y_inter_h = get_inter_point(line[0], line[1], line[2], 0, 1, -H+1) #与x=0或W-1交点 W_or_0 = 0 if w>h else W-1 x_inter_w, y_inter_w = get_inter_point(line[0], line[1], line[2], 1, 0, -W_or_0) if distance([x_center,y_center], [x_inter_h, y_inter_h]) < distance([x_center, y_center], [x_inter_w, y_inter_w]): x_inter, y_inter = x_inter_h, y_inter_h short_d = distance([x_center, y_center], [x_inter_h, y_inter_h]) else: x_inter, y_inter = x_inter_w, y_inter_w short_d = distance([x_center, y_center], [x_inter_w, y_inter_w]) new_x_center = (x_upper_center + x_inter) /2 new_y_center = (y_upper_center + y_inter) /2 if w>h: w = short_d + w/2 else: h = short_d + h/2 new_rect = ((new_y_center, new_x_center), (w, h), angle) new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] return new_rect, new_box_points #根据矩形的长边变化的宽度,变化旋转矩形 def modify_rect(rect, x_inter, y_inter): x_center = rect[0][1] y_center = rect[0][0] w=rect[1][0] h=rect[1][1] angle = rect[2] add_h = distance([x_center, y_center], [x_inter, y_inter]) - max(w, h)/2 angle_x = angle_convert_x(w, h, angle) new_x_center = x_center - add_h / 2 * np.cos(angle_x * np.pi / 180) new_y_center = y_center - add_h / 2 * np.sin(angle_x * np.pi / 180) if w>h: w=w+add_h else: h=h+add_h new_rect = ((new_y_center , new_x_center), (w, h), rect[2]) return new_rect def rect2anchor(rect): """ rect : opencv 形式 anchor : [x_u, y_u, w, h, angle_x] w指较短的一边 """ y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] w_anno = min(w, h) h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_x = angle_convert_x(w, h, angle) x_upper_center = x_center - h_anno/2 * np.cos(angle_x * np.pi / 180) y_upper_center = y_center - h_anno/2 * np.sin(angle_x * np.pi / 180) return [x_upper_center, y_upper_center, w_anno, h_anno, angle_x] def get_anno_rpn(frame_mp4_number, seg_width = 16, show = False, path2write = None, offset = 10): """ display : 0, nothin; 1, show; 2, write return : (y1, y2, x1, w1, \theta) """ #得到frame/mp4/number seg_img_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_img_file) H, W = seg_img.shape[:2] seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) print(seg_labels) #图中没有车道线 if len(seg_labels) == 1: if(show): plt_show(seg_img) return None #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] rects = [] #得到覆盖标注的最小矩形 for seg_label in seg_labels[1:]: print(seg_label) #rect, box_points = get_min_rect_ori(seg_img_gray, seg_label) #cv2.drawContours(seg_img, [box_points], 0, (0, 255, 0), 2) try: rect, box_points = get_min_rect_v2(seg_img_gray, seg_label, seg_img) except: continue if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) rects.append(rect) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] # w_anno = min(w, h) # h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle_y) lines.append([A, B, C, angle_x]) #plt_show(seg_img) #只有一条车道线的情况 if(len(lines) == 1): if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) plt_show(seg_img) return rects #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)-1): for j in range(i+1, len(lines)): #print(lines[i], lines[j]) x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) #一个点直接回归直线 if(len(x_inter_list) == 1): seg_img_modify = seg_img.copy() new_rects=[] for rect in rects: new_rect = modify_rect(rect, x_inter_list[0], y_inter_list[0]) new_rects.append(new_rect) if show: cv2.circle(seg_img_modify, (int(x_inter_list[0]),int(y_inter_list[0])), 3, (0, 255, 0), thickness=2) new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] cv2.drawContours(seg_img_modify, [new_box_points], 0, (0, 0, 255), 2) plt_show(seg_img_modify) return new_rects #得到 y=kx+b 的[k, b] #kx-y+b=0 else: new_rects = [] line_anno_list = [] x_annos = [] seg_img_modify = seg_img.copy() horizon_line ,y_l, y_r = modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify, offset=offset) for i, (line, rect) in enumerate(zip(lines, rects)): #print(line, horizon_line) x_anno, y_anno = get_inter_point(line[0], line[1], line[2], horizon_line[0], -1, horizon_line[1]) if show: cv2.circle(seg_img_modify, (int(x_anno),int(y_anno)), 3, (0, 255, 0), thickness=2) new_rect = modify_rect(rect, x_anno, y_anno) new_rects.append(new_rect) if show: new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] cv2.drawContours(seg_img_modify, [new_box_points], 0, color_list[i], 2) if show: for line, x_anno in zip(lines, x_annos): #矩形代表直线在水平分割线上交点 y_anno = (-line[2] + -line[0] * x_anno)/line[1] cv2.circle(seg_img_modify, (int(x_anno), int(y_anno)), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img_modify) return new_rects #得到上顶点,x,y,w,h,theta(与x轴) def get_anno_rpn_anchor(frame_mp4_number, seg_width = 16, show = False, path2write = None, offset = 10): """ display : 0, nothin; 1, show; 2, write return : (y1, y2, x1, w1, \theta) """ #得到frame/mp4/number seg_img_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_img_file) H, W = seg_img.shape[:2] seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) #图中没有车道线 if len(seg_labels) == 1: if(show): plt_show(seg_img) return None #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] rects = [] #得到覆盖标注的最小矩形 for seg_label in seg_labels[1:]: #rect, box_points = get_min_rect_ori(seg_img_gray, seg_label) #cv2.drawContours(seg_img, [box_points], 0, (0, 255, 0), 2) try: rect, box_points = get_min_rect_v2(seg_img_gray, seg_label, seg_img) except: print(frame_mp4_number) continue if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) rects.append(rect) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] # w_anno = min(w, h) # h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle_y) lines.append([A, B, C, angle_x]) #plt_show(seg_img) #只有一条车道线的情况 if(len(lines) == 1): if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) plt_show(seg_img) anchor = rect2anchor(rects[0]) return [anchor[1], anchor[1], [anchor]] #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)-1): for j in range(i+1, len(lines)): #print(lines[i], lines[j]) x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) #一个点直接回归直线 if(len(x_inter_list) == 1): seg_img_modify = seg_img.copy() new_rects=[] for rect in rects: new_rect = modify_rect(rect, x_inter_list[0], y_inter_list[0]) new_rects.append(new_rect) if show: cv2.circle(seg_img_modify, (int(x_inter_list[0]),int(y_inter_list[0])), 3, (0, 255, 0), thickness=2) new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] cv2.drawContours(seg_img_modify, [new_box_points], 0, (0, 0, 255), 2) plt_show(seg_img_modify) anchors = [rect2anchor(rect) for rect in new_rects] return [y_inter_list[0],y_inter_list[0], anchors] #得到 y=kx+b 的[k, b] #kx-y+b=0 else: new_rects = [] line_anno_list = [] x_annos = [] seg_img_modify = seg_img.copy() horizon_line ,y_l, y_r = modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify, offset=offset) for i, (line, rect) in enumerate(zip(lines, rects)): #print(line, horizon_line) x_anno, y_anno = get_inter_point(line[0], line[1], line[2], horizon_line[0], -1, horizon_line[1]) if show: cv2.circle(seg_img_modify, (int(x_anno),int(y_anno)), 3, (0, 255, 0), thickness=2) new_rect = modify_rect(rect, x_anno, y_anno) new_rects.append(new_rect) if show: new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] cv2.drawContours(seg_img_modify, [new_box_points], 0, color_list[i], 2) if show: for line, x_anno in zip(lines, x_annos): #矩形代表直线在水平分割线上交点 y_anno = (-line[2] + -line[0] * x_anno)/line[1] cv2.circle(seg_img_modify, (int(x_anno), int(y_anno)), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img_modify) anchors = [rect2anchor(rect) for rect in new_rects] return [y_l, y_r, anchors] #得到上顶点,x,y,w,h,theta(与x轴) def get_anno_rpn_anchor(frame_mp4_number, seg_width = 16, show = False, path2write = None, offset = 10): """ display : 0, nothin; 1, show; 2, write return : (y1, y2, x1, w1, \theta) """ #得到frame/mp4/number seg_img_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_img_file) H, W = seg_img.shape[:2] seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) #图中没有车道线 if len(seg_labels) == 1: if(show): plt_show(seg_img) return None #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] rects = [] #得到覆盖标注的最小矩形 for seg_label in seg_labels[1:]: #rect, box_points = get_min_rect_ori(seg_img_gray, seg_label) #cv2.drawContours(seg_img, [box_points], 0, (0, 255, 0), 2) rect, box_points = get_min_rect_v2(seg_img_gray, seg_label, seg_img) if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) rects.append(rect) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] # w_anno = min(w, h) # h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle_y) lines.append([A, B, C, angle_x]) #plt_show(seg_img) #只有一条车道线的情况 if(len(lines) == 1): if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) plt_show(seg_img) anchor = rect2anchor(rects[0]) return [anchor[1], anchor[1], [anchor]] #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)-1): for j in range(i+1, len(lines)): #print(lines[i], lines[j]) x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) #一个点直接回归直线 if(len(x_inter_list) == 1): seg_img_modify = seg_img.copy() new_rects=[] for rect in rects: new_rect = modify_rect(rect, x_inter_list[0], y_inter_list[0]) new_rects.append(new_rect) if show: cv2.circle(seg_img_modify, (int(x_inter_list[0]),int(y_inter_list[0])), 3, (0, 255, 0), thickness=2) new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] cv2.drawContours(seg_img_modify, [new_box_points], 0, (0, 0, 255), 2) plt_show(seg_img_modify) anchors = [rect2anchor(rect) for rect in new_rects] return [y_inter_list[0],y_inter_list[0], anchors] #得到 y=kx+b 的[k, b] #kx-y+b=0 else: new_rects = [] line_anno_list = [] x_annos = [] seg_img_modify = seg_img.copy() horizon_line ,y_l, y_r = modify_points(x_inter_list.copy(), y_inter_list.copy(), seg_img_modify, offset=offset) for i, (line, rect) in enumerate(zip(lines, rects)): #print(line, horizon_line) x_anno, y_anno = get_inter_point(line[0], line[1], line[2], horizon_line[0], -1, horizon_line[1]) if show: cv2.circle(seg_img_modify, (int(x_anno),int(y_anno)), 3, (0, 255, 0), thickness=2) new_rect = modify_rect(rect, x_anno, y_anno) new_rects.append(new_rect) if show: new_box_points = cv2.boxPoints(new_rect) new_box_points = np.int0(new_box_points) #draw contour里 x坐标在y前, 两列交换 new_box_points = new_box_points[:, ::-1] cv2.drawContours(seg_img_modify, [new_box_points], 0, color_list[i], 2) if show: for line, x_anno in zip(lines, x_annos): #矩形代表直线在水平分割线上交点 y_anno = (-line[2] + -line[0] * x_anno)/line[1] cv2.circle(seg_img_modify, (int(x_anno), int(y_anno)), 3, (0, 255, 0), thickness=3 ) plt_show(seg_img_modify) anchors = [rect2anchor(rect) for rect in new_rects] return [y_l, y_r, anchors] #得到上顶点,x,y,w,h,theta(与x轴) def get_anno_vp(frame_mp4_number, seg_width = 16, show = False, path2write = None, offset = 10): """ display : 0, nothin; 1, show; 2, write return : (y1, y2, x1, w1, \theta) """ #得到frame/mp4/number seg_img_file = os.path.join(seg_label_dir, frame_mp4_number+'.png') seg_img = cv2.imread(seg_img_file) H, W = seg_img.shape[:2] seg_img = seg_img * 50 seg_img_ori = seg_img.copy() seg_img_gray = cv2.cvtColor(seg_img, cv2.COLOR_BGR2GRAY) #得到标注中有几条线,及其label seg_labels = np.sort(np.unique(seg_img_gray)) #图中没有车道线 if len(seg_labels) == 1: if(show): plt_show(seg_img) return None #保存直线参数的list,一条直线用3个参数表示[A,B, C] lines = [] rects = [] #得到覆盖标注的最小矩形 for seg_label in seg_labels[1:]: #rect, box_points = get_min_rect_ori(seg_img_gray, seg_label) #cv2.drawContours(seg_img, [box_points], 0, (0, 255, 0), 2) try: rect, box_points = get_min_rect_v2(seg_img_gray, seg_label, seg_img) except: print(frame_mp4_number) REFINE_LIST.append(frame_mp4_number) continue if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) rects.append(rect) y_center = rect[0][0]; x_center = rect[0][1]; w=rect[1][0] h=rect[1][1] # w_anno = min(w, h) # h_anno = max(w, h) angle = rect[2] #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) A, B, C = get_line_equation(y_center, x_center, angle_y) lines.append([A, B, C, angle_x]) #plt_show(seg_img) #只有一条车道线的情况 if(len(lines) == 1): if show: cv2.drawContours(seg_img, [box_points], 0, (0, 0, 255), 2) plt_show(seg_img) rect = rects[0] y_center = rect[0][0] x_center = rect[0][1] w=rect[1][0] h=rect[1][1] w_anno = min(w, h) h_anno = max(w, h) angle = rect[2] #+ 0.001 #求这个矩形代表的直线 angle_y = angle_convert(w, h, angle) angle_x = angle_convert_x(w, h, angle) #print(angle_y, angle_x) x_upper_center = x_center - h_anno/2 * np.cos(angle_x * np.pi / 180) y_upper_center = y_center - h_anno/2 * np.sin(angle_x * np.pi / 180) #anchor = rect2anchor(rects[0]) return (int(round(x_upper_center)), int(round(y_upper_center))) #求交点 x_inter_list=[] y_inter_list=[] for i in range(len(lines)-1): for j in range(i+1, len(lines)): #print(lines[i], lines[j]) x_inter, y_inter = get_inter_point(lines[i][0], lines[i][1], lines[i][2], lines[j][0], lines[j][1], lines[j][2]) x_inter_list.append(x_inter) y_inter_list.append(y_inter) return (int(round(np.mean(x_inter_list))), int(round(np.mean(y_inter_list)))) path2write = vp_label_dir if not os.path.exists(path2write): os.makedirs(path2write) offset = 10 cnt = 0 def write_anno_vp(seg_img_file): global cnt with lock: cnt += 1 if cnt %10000 == 0: print(cnt) try: name_split_list = seg_img_file.split('/') frame_mp4_number = '/'.join(name_split_list[-3:])[:-4] vp_img_path = os.path.join(path2write, frame_mp4_number+ '.png') # if os.path.exists(txt_path): # continue dirname = os.path.dirname(vp_img_path ) if not os.path.exists(dirname): os.makedirs(dirname) annos = get_anno_vp(frame_mp4_number, seg_width=16, path2write = path2write, offset=10) vp_img = np.zeros((H, W), dtype=np.uint8) if annos is not None: cv2.circle(vp_img, annos, 16, 255, -1) vp_img[vp_img>0] = 1 assert (vp_img>1).sum() == 0 cv2.imwrite(vp_img_path, vp_img) except Exception as e: print(seg_img_file, "出现如下异常%s"%e, traceback.format_exc()) from multiprocessing.dummy import Pool, Lock pool = Pool() lock = Lock() seg_img_list = glob(seg_label_dir + '/*/*/*png') #write_anno_vp(seg_img_list) pool.map(write_anno_vp, seg_img_list) pool.close() pool.join()
36.799296
124
0.585973
6,823
41,804
3.301334
0.044555
0.067658
0.028768
0.01616
0.858424
0.839956
0.815893
0.800844
0.790144
0.772431
0
0.052675
0.272031
41,804
1,135
125
36.831718
0.6875
0.12695
0
0.748101
0
0
0.004731
0.002711
0
0
0
0.000881
0.007595
1
0.032911
false
0
0.013924
0.001266
0.102532
0.007595
0
0
0
null
0
0
0
1
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
7
2f13cbc9eef0e52a98ae1fd390f381aa04d7f927
1,303
py
Python
Utility/validation_set.py
DeviRule/Ecs171_group-project
45353e18023ec9ddf9bd672d986d468006cccb5b
[ "MIT" ]
1
2019-11-26T04:19:00.000Z
2019-11-26T04:19:00.000Z
Utility/validation_set.py
DeviRule/Ecs171_group-project
45353e18023ec9ddf9bd672d986d468006cccb5b
[ "MIT" ]
null
null
null
Utility/validation_set.py
DeviRule/Ecs171_group-project
45353e18023ec9ddf9bd672d986d468006cccb5b
[ "MIT" ]
1
2019-11-26T20:08:26.000Z
2019-11-26T20:08:26.000Z
import pandas as pd from imblearn.over_sampling import RandomOverSampler from imblearn.under_sampling import RandomUnderSampler val_set = pd.read_csv('../Data/validation.csv', header=0) X = val_set.iloc[:,0:-1].copy() Y = val_set.iloc[:, -1].copy() rus = RandomUnderSampler(sampling_strategy=1) X_res, Y_res = rus.fit_resample(X, Y) print(pd.DataFrame(X_res)) print(Y_res) val_under = pd.DataFrame(X_res).assign(Class = Y_res) val_under.columns = ['V1','V2','V3','V4','V5','V6','V7','V9','V10','V11','V12','V14','V16','V17','V18','V19','Amount','Class'] val_under = val_under.sample(frac=1).reset_index(drop=True) print(val_under) val_under.to_csv(r'../Data/validation_under.csv', index = None, header=True) val_set = pd.read_csv('../Data/validation_stand.csv', header=0) X = val_set.iloc[:,0:-1].copy() Y = val_set.iloc[:, -1].copy() rus = RandomUnderSampler(sampling_strategy=1) X_res, Y_res = rus.fit_resample(X, Y) print(pd.DataFrame(X_res)) print(Y_res) val_under = pd.DataFrame(X_res).assign(Class = Y_res) val_under.columns = ['V1','V2','V3','V4','V5','V6','V7','V9','V10','V11','V12','V14','V16','V17','V18','V19','Amount','Class'] val_under = val_under.sample(frac=1).reset_index(drop=True) print(val_under) val_under.to_csv(r'../Data/validation_stand_under.csv', index = None, header=True)
42.032258
126
0.712203
224
1,303
3.9375
0.272321
0.108844
0.045351
0.068027
0.861678
0.861678
0.800454
0.734694
0.734694
0.734694
0
0.049505
0.069839
1,303
31
127
42.032258
0.678218
0
0
0.740741
0
0
0.16411
0.08589
0
0
0
0
0
1
0
false
0
0.111111
0
0.111111
0.222222
0
0
0
null
0
0
0
1
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
7
2f28dc06fe4bbad87c289b4e32e727cb3a49cd2b
25,482
py
Python
MSC/manager.py
ACDC-paper-double-review/ACDC
bf44a691d3860eb35731c0ce41f606188f233b1a
[ "MIT" ]
null
null
null
MSC/manager.py
ACDC-paper-double-review/ACDC
bf44a691d3860eb35731c0ce41f606188f233b1a
[ "MIT" ]
null
null
null
MSC/manager.py
ACDC-paper-double-review/ACDC
bf44a691d3860eb35731c0ce41f606188f233b1a
[ "MIT" ]
null
null
null
from __future__ import print_function from properties import Properties from changedetection import ChangeDetection from ensemble import Ensemble from stream import Stream from model import Model import time, sys from py4j.java_gateway import JavaGateway, GatewayParameters, CallbackServerParameters import numpy as np class Manager(object): def __init__(self, sourceFile, targetFile): self.SWindow = [] self.TWindow = [] self.TPredictWindow = [] self.SDataBuffer = [] #Queue self.TDataBuffer = [] #Queue self.SInitialDataBuffer = [] self.TInitialDataBuffer = [] self.changeDetector = ChangeDetection(Properties.GAMMA, Properties.SENSITIVITY, Properties.MAX_WINDOW_SIZE) self.ensemble = Ensemble(Properties.ENSEMBLE_SIZE) classNameList = [] self.source = Stream(sourceFile, classNameList, Properties.INITIAL_DATA_SIZE) self.target = Stream(targetFile, classNameList, Properties.INITIAL_DATA_SIZE) Properties.MAXVAR = self.source.MAXVAR self.gateway = JavaGateway(start_callback_server=True, gateway_parameters=GatewayParameters(port=Properties.PY4JPORT), callback_server_parameters=CallbackServerParameters(port=Properties.PY4JPORT+1)) self.app = self.gateway.entry_point """ Detect drift on a given data stream. Returns the change point index on the stream array. """ def __detectDrift(self, slidingWindow, flagStream): changePoint = -1 if flagStream == 0: changePoint = self.changeDetector.detectSourceChange(slidingWindow) elif flagStream == 1: changePoint = self.changeDetector.detectTargetChange(slidingWindow) else: raise Exception('flagStream var has value ' + str(flagStream) + ' that is not supported.') return changePoint def __detectDriftJava(self, slidingWindow, flagStream): changePoint = -1 sw = self.gateway.jvm.java.util.ArrayList() for i in xrange(len(slidingWindow)): sw.append(float(slidingWindow[i])) if flagStream == 0: changePoint = self.app.detectSourceChange(sw) elif flagStream == 1: changePoint = self.app.detectTargetChange(sw) else: raise Exception('flagStream var has value ' + str(flagStream) + ' that is not supported.') # print('ChangePoint = ' + str(changePoint)) return changePoint """ Write value (accuracy or confidence) to a file with DatasetName as an identifier. """ def __saveResult(self, acc, datasetName): with open(datasetName + '_' + Properties.OUTFILENAME, 'a') as f: f.write(str(acc) + '\n') f.close() """ The main method handling MDC logic (using single ensemble). """ def start(self, datasetName): #Get initial data buffer self.SInitialDataBuffer= self.source.initialData self.TInitialDataBuffer= self.target.initialData Properties.logger.info('Initializing Ensemble ...') #source model self.ensemble.generateNewModel(self.SInitialDataBuffer, self.TInitialDataBuffer, True) #target model self.ensemble.generateNewModel(self.SInitialDataBuffer, self.TInitialDataBuffer, False) Properties.logger.info(self.ensemble.getEnsembleSummary()) sourceIndex = 0 targetIndex = 0 trueSourceNum = 0 trueTargetNum = 0 targetConfSum = 0 Properties.logger.info('Starting MDC ...') while len(self.source.data) + len(self.target.data) > sourceIndex + targetIndex: ratio = (len(self.source.data) - sourceIndex) / (len(self.source.data) + len(self.target.data) - sourceIndex + targetIndex + 0.0) if (np.random.rand() <= ratio and sourceIndex < len(self.source.data)) or (targetIndex >= len(self.target.data) and sourceIndex < len(self.source.data)): sdata = self.source.data[sourceIndex] self.SDataBuffer.append(sdata) resSource = self.ensemble.evaluateEnsemble(sdata, True) self.SWindow.append(resSource[0]) # prediction of 0 or 1 print('S', end="") # get Source Accuracy sourceIndex += 1 trueSourceNum += resSource[0] elif targetIndex < len(self.target.data): tdata = self.target.data[targetIndex] self.TDataBuffer.append(tdata) resTarget = self.ensemble.evaluateEnsemble(tdata, False) conf = resTarget[1] # confidence targetIndex += 1 print('T', end="") # If conf is very close to 0.0 or 1.0, beta probability might become zero, which can make problems in change detection. Handling this scenario. if conf < 0.1: self.TWindow.append(0.1) elif conf > 0.995: self.TWindow.append(0.995) else: self.TWindow.append(resTarget[1]) self.TPredictWindow.append(resTarget[0]) #get Target Accuracy if resTarget[0] == tdata[-1]: trueTargetNum += 1 acc = float(trueTargetNum)/(targetIndex) self.__saveResult(acc, datasetName) #save confidence targetConfSum += conf self.__saveResult(float(targetConfSum)/(targetIndex), datasetName+'_confidence') #Drift detection start = time.time() # srcCP = self.__detectDrift(self.SWindow, 0) # trgCP = self.__detectDrift(self.TWindow, 1) srcCP = self.__detectDriftJava(self.SWindow, 0) trgCP = self.__detectDriftJava(self.TWindow, 1) end = time.time() # print(int(end - start), end="") if srcCP != -1: self.__saveResult(5555555.0, datasetName+'_confidence') Properties.logger.info('-------------------------- S O U R C E D R I F T ------------------------------------') Properties.logger.info('\nDrift found on source stream.') Properties.logger.info('dataIndex=' + str((targetIndex+sourceIndex)) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till srcCP for i in xrange(srcCP): del self.SDataBuffer[0] del self.SWindow[0] #Exception with srcCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if srcCP == 0: while len(self.SDataBuffer) > Properties.CUSHION: del self.SDataBuffer[0] del self.SWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) Properties.logger.info('Updating ensemble weights') self.ensemble.updateWeight(self.SDataBuffer, True) Properties.logger.info('Training a model for source stream') self.ensemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, True) Properties.logger.info(self.ensemble.getEnsembleSummary()) if trgCP != -1: self.__saveResult(7777777.0, datasetName+'_confidence') Properties.logger.info('-------------------------- T A R G E T D R I F T ------------------------------------') Properties.logger.info('Drift found on target stream.') Properties.logger.info('dataIndex=' + str((targetIndex+sourceIndex)) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till trgCP for i in xrange(trgCP): del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] #Exception with trgCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if trgCP == 0: while len(self.TDataBuffer) > Properties.CUSHION: del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) Properties.logger.info('Updating ensemble weights') self.ensemble.updateWeight(self.TDataBuffer, False) if (len(self.SDataBuffer) > 0 and len(self.TDataBuffer)> 0): Properties.logger.info('Training a model for target stream') self.ensemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, False) Properties.logger.info(self.ensemble.getEnsembleSummary()) if (targetIndex+sourceIndex)%100 == 0: print('') Properties.logger.info('Done !!') return float(trueSourceNum)/(sourceIndex), float(trueTargetNum)/(targetIndex) """ Main module for MDC2 logic (using two separate ensembles) """ def start2(self, datasetName): #Get initial data buffer self.SInitialDataBuffer= self.source.initialData self.TInitialDataBuffer= self.target.initialData #Initialize Ensembles srcEnsemble = Ensemble(Properties.ENSEMBLE_SIZE) trgEnsemble = Ensemble(Properties.ENSEMBLE_SIZE) Properties.logger.info('Initializing Ensemble ...') #source model srcEnsemble.generateNewModel(self.SInitialDataBuffer, self.TInitialDataBuffer, True) Properties.logger.info('Source Ensemble') Properties.logger.info(srcEnsemble.getEnsembleSummary()) #target model trgEnsemble.generateNewModel(self.SInitialDataBuffer, self.TInitialDataBuffer, False) Properties.logger.info('Target Ensemble') Properties.logger.info(trgEnsemble.getEnsembleSummary()) dataIndex = 0 trueTargetNum = 0 targetConfSum = 0 Properties.logger.info('Starting MDC2 ...') while(len(self.source.data) > dataIndex): print('.', end="") #Source Stream sdata = self.source.data[dataIndex] self.SDataBuffer.append(sdata) resSource = srcEnsemble.evaluateEnsemble(sdata, True) self.SWindow.append(resSource[0]) #prediction of 0 or 1 #Target Stream tdata = self.target.data[dataIndex] self.TDataBuffer.append(tdata) resTarget = trgEnsemble.evaluateEnsemble(tdata, False) conf = resTarget[1] #confidence # If conf is very close to 0.0 or 1.0, beta probability might become zero, which can make problems in change detection. Handling this scenario. if conf < 0.1: self.TWindow.append(0.1) elif conf > 0.995: self.TWindow.append(0.995) else: self.TWindow.append(resTarget[1]) self.TPredictWindow.append(resTarget[0]) #get Target Accuracy if resTarget[0] == tdata[-1]: trueTargetNum += 1 acc = float(trueTargetNum)/(dataIndex + 1) self.__saveResult(acc, datasetName) #save confidence targetConfSum += conf self.__saveResult(float(targetConfSum)/(dataIndex+1), datasetName+'_confidence') #Drift detection start = time.time() # srcCP = self.__detectDrift(self.SWindow, 0) # trgCP = self.__detectDrift(self.TWindow, 1) srcCP = self.__detectDriftJava(self.SWindow, 0) trgCP = self.__detectDriftJava(self.TWindow, 1) end = time.time() # print(int(end - start), end="") if srcCP != -1: self.__saveResult(5555555.0, datasetName+'_confidence') Properties.logger.info('-------------------------- S O U R C E D R I F T ------------------------------------') Properties.logger.info('\nDrift found on source stream.') Properties.logger.info('dataIndex=' + str(dataIndex) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till srcCP for i in xrange(srcCP): del self.SDataBuffer[0] del self.SWindow[0] #Exception with srcCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if srcCP == 0: while len(self.SDataBuffer) > Properties.CUSHION: del self.SDataBuffer[0] del self.SWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) #Updating source Ensemble Properties.logger.info('Updating source ensemble weights') srcEnsemble.updateWeight(self.SDataBuffer, True) Properties.logger.info('Training a model for source stream') srcEnsemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, True) Properties.logger.info('Source Ensemble') Properties.logger.info(srcEnsemble.getEnsembleSummary()) if trgCP != -1: self.__saveResult(7777777.0, datasetName+'_confidence') Properties.logger.info('-------------------------- T A R G E T D R I F T ------------------------------------') Properties.logger.info('Drift found on target stream.') Properties.logger.info('dataIndex=' + str(dataIndex) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till trgCP for i in xrange(trgCP): del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] #Exception with trgCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if trgCP == 0: while len(self.TDataBuffer) > Properties.CUSHION: del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) Properties.logger.info('Updating target ensemble weights') trgEnsemble.updateWeight(self.TDataBuffer, False) Properties.logger.info('Training a model for target stream') trgEnsemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, False) Properties.logger.info('Target Ensemble') Properties.logger.info(trgEnsemble.getEnsembleSummary()) dataIndex += 1 if dataIndex%100 == 0: print('') Properties.logger.info('Done !!') """ Baseline skmm (single target model with initial train only) """ def start_skmm(self, datasetName): #Get initial data buffer self.SInitialDataBuffer= self.source.initialData self.TInitialDataBuffer= self.target.initialData #Initialize Model model = Model() model.train(self.SInitialDataBuffer, self.TInitialDataBuffer, Properties.MAXVAR) dataIndex = 0 trueTargetNum = 0 Properties.logger.info('Starting skmm baseline ...') while(len(self.source.data) > dataIndex): print('.', end="") #Source Stream sdata = self.source.data[dataIndex] self.SDataBuffer.append(sdata) #Target Stream tdata = self.target.data[dataIndex] self.TDataBuffer.append(tdata) #test data instance in each model resTarget = model.test([tdata], Properties.MAXVAR) #get Target Accuracy if resTarget[0][0] == tdata[-1]: trueTargetNum += 1 acc = float(trueTargetNum)/(dataIndex + 1) self.__saveResult(acc, datasetName) dataIndex += 1 if dataIndex%100 == 0: print('') Properties.logger.info('Done !!') """ Baseline mkmm (single target model trained periodically) """ def start_mkmm(self, datasetName): #Get initial data buffer self.SInitialDataBuffer= self.source.initialData self.TInitialDataBuffer= self.target.initialData #Initialize Model model = Model() model.train(self.SInitialDataBuffer, self.TInitialDataBuffer, Properties.MAXVAR) dataIndex = 0 trueTargetNum = 0 Properties.logger.info('Starting skmm baseline ...') while(len(self.source.data) > dataIndex): print('.', end="") #Source Stream sdata = self.source.data[dataIndex] self.SDataBuffer.append(sdata) #Target Stream tdata = self.target.data[dataIndex] self.TDataBuffer.append(tdata) #test data instance in each model resTarget = model.test([tdata], Properties.MAXVAR) #get Target Accuracy if resTarget[0][0] == tdata[-1]: trueTargetNum += 1 acc = float(trueTargetNum)/(dataIndex + 1) self.__saveResult(acc, datasetName) dataIndex += 1 if dataIndex%100 == 0: print('') if dataIndex%Properties.MAX_WINDOW_SIZE == 0: model = Model() model.train(self.SDataBuffer, self.TDataBuffer, Properties.MAXVAR) self.SDataBuffer = [] self.TDataBuffer = [] Properties.logger.info('Done !!') """ Baseline srconly using an ensemble of only source classifiers. Target labels predicted from this ensemble using its target weights. """ def start_srconly(self, datasetName): #Get initial data buffer self.SInitialDataBuffer= self.source.initialData self.TInitialDataBuffer= self.target.initialData #Initialize Ensembles srcEnsemble = Ensemble(Properties.ENSEMBLE_SIZE) Properties.logger.info('Initializing Ensemble ...') #source model srcEnsemble.generateNewModel(self.SInitialDataBuffer, self.TInitialDataBuffer, True) Properties.logger.info('Source Ensemble') Properties.logger.info(srcEnsemble.getEnsembleSummary()) dataIndex = 0 trueTargetNum = 0 targetConfSum = 0 Properties.logger.info('Starting srconly-MDC ...') while(len(self.source.data) > dataIndex): print('.', end="") #Source Stream sdata = self.source.data[dataIndex] self.SDataBuffer.append(sdata) resSource = srcEnsemble.evaluateEnsemble(sdata, True) self.SWindow.append(resSource[0]) #prediction of 0 or 1 #Target Stream tdata = self.target.data[dataIndex] self.TDataBuffer.append(tdata) resTarget = srcEnsemble.evaluateEnsemble(tdata, False) conf = resTarget[1] #confidence # If conf is very close to 0.0 or 1.0, beta probability might become zero, which can make problems in change detection. Handling this scenario. if conf < 0.1: self.TWindow.append(0.1) elif conf > 0.995: self.TWindow.append(0.995) else: self.TWindow.append(resTarget[1]) self.TPredictWindow.append(resTarget[0]) #get Target Accuracy if resTarget[0] == tdata[-1]: trueTargetNum += 1 acc = float(trueTargetNum)/(dataIndex + 1) self.__saveResult(acc, datasetName) #save confidence targetConfSum += conf self.__saveResult(float(targetConfSum)/(dataIndex+1), datasetName+'_confidence') #Drift detection start = time.time() # srcCP = self.__detectDrift(self.SWindow, 0) # trgCP = self.__detectDrift(self.TWindow, 1) srcCP = self.__detectDriftJava(self.SWindow, 0) trgCP = self.__detectDriftJava(self.TWindow, 1) end = time.time() # print(int(end - start), end="") if srcCP != -1: self.__saveResult(5555555.0, datasetName+'_confidence') Properties.logger.info('-------------------------- S O U R C E D R I F T ------------------------------------') Properties.logger.info('\nDrift found on source stream.') Properties.logger.info('dataIndex=' + str(dataIndex) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till srcCP for i in xrange(srcCP): del self.SDataBuffer[0] del self.SWindow[0] #Exception with srcCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if srcCP == 0: while len(self.SDataBuffer) > Properties.CUSHION: del self.SDataBuffer[0] del self.SWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) #Updating source Ensemble Properties.logger.info('Updating source ensemble weights') srcEnsemble.updateWeight(self.SDataBuffer, True) Properties.logger.info('Training a model for source stream') srcEnsemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, True) Properties.logger.info('Source Ensemble') Properties.logger.info(srcEnsemble.getEnsembleSummary()) if trgCP != -1: self.__saveResult(7777777.0, datasetName+'_confidence') Properties.logger.info('-------------------------- T A R G E T D R I F T ------------------------------------') Properties.logger.info('Drift found on target stream.') Properties.logger.info('dataIndex=' + str(dataIndex) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till trgCP for i in xrange(trgCP): del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] #Exception with trgCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if trgCP == 0: while len(self.TDataBuffer) > Properties.CUSHION: del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) Properties.logger.info('Updating target ensemble weights') srcEnsemble.updateWeight(self.TDataBuffer, False) Properties.logger.info('Training a model for target stream') srcEnsemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, True) Properties.logger.info('Target Ensemble') Properties.logger.info(srcEnsemble.getEnsembleSummary()) dataIndex += 1 if dataIndex%100 == 0: print('') Properties.logger.info('Done !!') """ Baseline trgonly using an ensemble of only target classifiers. Target labels predicted from this ensemble using its target weights. Source drift is computed using source-weighted ensemble prediction. """ def start_trgonly(self, datasetName): #Get initial data buffer self.SInitialDataBuffer= self.source.initialData self.TInitialDataBuffer= self.target.initialData #Initialize Ensembles trgEnsemble = Ensemble(Properties.ENSEMBLE_SIZE) Properties.logger.info('Initializing Ensemble ...') #target model trgEnsemble.generateNewModel(self.SInitialDataBuffer, self.TInitialDataBuffer, False) Properties.logger.info('Target Ensemble') Properties.logger.info(trgEnsemble.getEnsembleSummary()) dataIndex = 0 trueTargetNum = 0 targetConfSum = 0 Properties.logger.info('Starting trgonly-MDC ...') while(len(self.source.data) > dataIndex): print('.', end="") #Source Stream sdata = self.source.data[dataIndex] self.SDataBuffer.append(sdata) resSource = trgEnsemble.evaluateEnsemble(sdata, True) self.SWindow.append(resSource[0]) #prediction of 0 or 1 #Target Stream tdata = self.target.data[dataIndex] self.TDataBuffer.append(tdata) resTarget = trgEnsemble.evaluateEnsemble(tdata, False) conf = resTarget[1] #confidence # If conf is very close to 0.0 or 1.0, beta probability might become zero, which can make problems in change detection. Handling this scenario. if conf < 0.1: self.TWindow.append(0.1) elif conf > 0.995: self.TWindow.append(0.995) else: self.TWindow.append(resTarget[1]) self.TPredictWindow.append(resTarget[0]) #get Target Accuracy if resTarget[0] == tdata[-1]: trueTargetNum += 1 acc = float(trueTargetNum)/(dataIndex + 1) self.__saveResult(acc, datasetName) #save confidence targetConfSum += conf self.__saveResult(float(targetConfSum)/(dataIndex+1), datasetName+'_confidence') #Drift detection start = time.time() # srcCP = self.__detectDrift(self.SWindow, 0) # trgCP = self.__detectDrift(self.TWindow, 1) srcCP = self.__detectDriftJava(self.SWindow, 0) trgCP = self.__detectDriftJava(self.TWindow, 1) end = time.time() # print(int(end - start), end="") if srcCP != -1: self.__saveResult(5555555.0, datasetName+'_confidence') Properties.logger.info('-------------------------- S O U R C E D R I F T ------------------------------------') Properties.logger.info('\nDrift found on source stream.') Properties.logger.info('dataIndex=' + str(dataIndex) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till srcCP for i in xrange(srcCP): del self.SDataBuffer[0] del self.SWindow[0] #Exception with srcCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if srcCP == 0: while len(self.SDataBuffer) > Properties.CUSHION: del self.SDataBuffer[0] del self.SWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) #Updating source Ensemble Properties.logger.info('Updating source ensemble weights') trgEnsemble.updateWeight(self.SDataBuffer, True) Properties.logger.info('Training a model for source stream') trgEnsemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, False) Properties.logger.info('Source Ensemble') Properties.logger.info(trgEnsemble.getEnsembleSummary()) if trgCP != -1: self.__saveResult(7777777.0, datasetName+'_confidence') Properties.logger.info('-------------------------- T A R G E T D R I F T ------------------------------------') Properties.logger.info('Drift found on target stream.') Properties.logger.info('dataIndex=' + str(dataIndex) + '\tsrcCP=' + str(srcCP) + '\ttrgCP=' + str(trgCP)) #remove data from buffer till trgCP for i in xrange(trgCP): del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] #Exception with trgCP=0 (windowsize hit max or avg error is less than cutoff). #Keep atleast cushion number of instances if trgCP == 0: while len(self.TDataBuffer) > Properties.CUSHION: del self.TDataBuffer[0] del self.TWindow[0] del self.TPredictWindow[0] Properties.logger.info('Instances left in source sliding window : ' + str(len(self.SDataBuffer))) Properties.logger.info('Instances left in target sliding window : ' + str(len(self.TDataBuffer))) Properties.logger.info('Updating target ensemble weights') trgEnsemble.updateWeight(self.TDataBuffer, False) Properties.logger.info('Training a model for target stream') trgEnsemble.generateNewModel(self.SDataBuffer, self.TDataBuffer, False) Properties.logger.info('Target Ensemble') Properties.logger.info(trgEnsemble.getEnsembleSummary()) dataIndex += 1 if dataIndex%100 == 0: print('') Properties.logger.info('Done !!')
35.490251
201
0.701358
3,052
25,482
5.816514
0.078637
0.085624
0.10703
0.026138
0.872465
0.83906
0.834272
0.822217
0.81174
0.793037
0
0.015419
0.165215
25,482
717
202
35.539749
0.819105
0.127659
0
0.8234
0
0
0.140076
0.023268
0
0
0
0
0
1
0.022075
false
0
0.019868
0
0.050773
0.030905
0
0
0
null
0
0
0
1
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
7
2f809faa7215339ad18446b7fe34dc5987429f9a
624
py
Python
python/testData/refactoring/inlinelocal/operatorPrecedence/booleanAnd.after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/refactoring/inlinelocal/operatorPrecedence/booleanAnd.after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/refactoring/inlinelocal/operatorPrecedence/booleanAnd.after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
(10 and 2)[::-5] (10 and 2)[5] (10 and 2)(5) (10 and 2).foo -(10 and 2) +(10 and 2) ~(10 and 2) 5 ** (10 and 2) (10 and 2) ** 5 5 * (10 and 2) (10 and 2) * 5 5 / (10 and 2) (10 and 2) / 5 5 // (10 and 2) (10 and 2) // 5 5 + (10 and 2) (10 and 2) + 5 (10 and 2) - 5 5 - (10 and 2) 5 >> (10 and 2) (10 and 2) << 5 5 & (10 and 2) (10 and 2) & 5 5 ^ (10 and 2) (10 and 2) ^ 5 5 | (10 and 2) (10 and 2) | 5 () in (10 and 2) (10 and 2) in () 5 is (10 and 2) (10 and 2) is 5 5 < (10 and 2) (10 and 2) < 5 not (10 and 2) 5 and 10 and 2 10 and 2 and 5 5 or 10 and 2 10 and 2 or 5 10 and 2 if 10 and 2 else 10 and 2
10.758621
34
0.491987
166
624
1.849398
0.066265
0.667752
0.801303
0.387622
0.807818
0.807818
0.631922
0.631922
0.625407
0.576547
0
0.366667
0.326923
624
57
35
10.947368
0.364286
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
1
null
1
1
1
1
1
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
1
0
0
0
0
0
0
9
85d9918fc608d73d49e58ad406652b11f72468f8
1,138
py
Python
app/utils.py
Keytoyze/Mania-Lab
e29007a31828a0378a015d55a78b6c5f7ebf4a44
[ "Apache-2.0" ]
null
null
null
app/utils.py
Keytoyze/Mania-Lab
e29007a31828a0378a015d55a78b6c5f7ebf4a44
[ "Apache-2.0" ]
null
null
null
app/utils.py
Keytoyze/Mania-Lab
e29007a31828a0378a015d55a78b6c5f7ebf4a44
[ "Apache-2.0" ]
null
null
null
class Comparable: def __init__(self, value): self.value = value def __eq__(self, other): other_value = other.value if isinstance(other, Comparable) else other return self.value == other_value def __ne__(self, other): other_value = other.value if isinstance(other, Comparable) else other return self.value != other_value def __gt__(self, other): other_value = other.value if isinstance(other, Comparable) else other return self.value > other_value def __lt__(self, other): other_value = other.value if isinstance(other, Comparable) else other return self.value < other_value def __ge__(self, other): other_value = other.value if isinstance(other, Comparable) else other return self.value >= other_value def __le__(self, other): other_value = other.value if isinstance(other, Comparable) else other return self.value <= other_value def read_file(s): with open(s, "r") as f: content = f.read() return content def write_file(s, name): with open(name, "w") as f: f.write(s)
29.947368
77
0.656415
152
1,138
4.638158
0.190789
0.255319
0.255319
0.161702
0.791489
0.791489
0.791489
0.791489
0.791489
0.791489
0
0
0.253076
1,138
37
78
30.756757
0.829412
0
0
0.214286
0
0
0.001757
0
0
0
0
0
0
1
0.321429
false
0
0
0
0.607143
0
0
0
0
null
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
10
85f78cc46106d708bc67f58f1d484e784012b8d1
22,482
py
Python
Models.py
clinicalml/omop-variation
9549d1698bd32759e7f5e18b5431481b5a80bceb
[ "MIT" ]
1
2021-11-28T08:54:32.000Z
2021-11-28T08:54:32.000Z
Models.py
clinicalml/omop-variation
9549d1698bd32759e7f5e18b5431481b5a80bceb
[ "MIT" ]
null
null
null
Models.py
clinicalml/omop-variation
9549d1698bd32759e7f5e18b5431481b5a80bceb
[ "MIT" ]
null
null
null
import numpy as np from sklearn.base import BaseEstimator from sklearn.ensemble import RandomForestRegressor import gurobipy as grb class IterativeRegionEstimator(BaseEstimator): ''' Identifies a region of disagreement using the IterativeAlg method. Parameters ---------- region_modelclass : BaseEstimator, default=RandomForestRegressor() An unfitted model class that has a .fit(X, y) method and a .predict(X) method. beta : float, default=0.25 A real number between 0 and 1 representing the size of the desired region. n_iter : int, default=10 Maximum number of iterations of the algorithm. Attributes ---------- grouping_ : dictionary A dictionary mapping each agent to a binary grouping. region_model_ : BaseEstimator A fitted model of the same class as self.region_modelclass. threshold_ : float Defines the identified region of variation as the inputs x such that region_model.predict(X) >= threshold. ''' def __init__(self, region_modelclass=RandomForestRegressor(), beta=0.25, n_iter=10): self.region_modelclass = region_modelclass self.beta = beta self.n_iter = n_iter def _best_grouping(self, S, X, y, a, preds): ''' Identifies the best grouping given a region, based on positive / negative estimates of bias. Parameters ---------- S : array-like of shape (n_samples,) A list of booleans indicating membership in the current region. X, y, a : data inherited from .fit(). preds : array-like of shape (n_samples,) A list of floats representing predictions of the outcome_model passed into .fit(). Returns ------- G : dictionary A dictionary mapping each unique element of a to a binary grouping. q_score : float The value hat{Q}(S, G), a measure of the variation on S under grouping G. ''' # Put everyone in group 0 to start, but should be replaced by +1 / -1 G = {} for agent in np.unique(a): G[agent] = 0 # Put agents with positive total residual on S into group 1 q_score = 0.0 for agent in np.unique(a): ixs = (a[S] == agent) if np.sum(ixs) > 0: term = (1/np.sum(S)) * np.sum(y[S][ixs] - preds[S][ixs]) if term >= 0: G[agent] = 1 q_score += term else: G[agent] = -1 q_score += (term * -1) for agent in G.keys(): assert G[agent] in [-1, 1] return G, q_score def _best_region(self, G, X, y, a, preds): ''' Identifies the best region given a grouping. Parameters ---------- G : dictionary A dictionary mapping each unique element of a to a binary grouping. X, y, a : data inherited from .fit(). preds : array-like of shape (n_samples,) A list of floats representing predictions of the outcome_model passed into .fit(). Returns ------- region_model : BaseEstimator A fitted estimator of the same class as self.region_modelclass. ''' # Get the groupings for agents of each data point g = np.zeros(len(a)) for i in range(len(a)): g[i] = G[a[i]] # Train model to predict absolute value of residuals res = (y - preds) * g region_model = self.region_modelclass.fit(X, res) return region_model def fit(self, X, y, a, outcome_model): ''' Fits the estimator to data. Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. y : array-like of shape (n_samples,) Target vector relative to X. a : array-like of shape (n_samples,) Agent labels relative to X. outcome_model A fitted predictor with a .predict_proba(X) method such that .predict_proba(X)[:, 1] consists of real numbers between 0 and 1. Returns ------- self Fitted estimator. ''' # Get predictions from outcome_model preds = outcome_model.predict_proba(X)[:, 1] # Initialize S to the entire space S = np.array([True] * X.shape[0]) G = None G_prev = None region_model = None threshold = None for it in range(self.n_iter): # Find the best grouping for the current region G, q_score = self._best_grouping(S, X, y, a, preds) if G_prev is not None and G_prev == G: break G_prev = G # Find the best region for the current grouping region_model = self._best_region(G, X, y, a, preds) region_scores = region_model.predict(X) threshold = np.quantile(region_scores, 1-self.beta) S = region_scores >= threshold G, q_score = self._best_grouping(S, X, y, a, preds) # Store fitted model attributes self.grouping_ = G self.region_model_ = region_model self.threshold_ = threshold return self def predict(self, X): ''' Classifies data points inside/outside the region. Parameters ---------- X : array-like of shape (n_samples, n_features) Vector to be scored. Returns ------- y_pred : array-like of shape (n_samples,) A list of booleans indicating membership in the identified region. ''' region_scores = self.region_model_.predict(X) return region_scores >= self.threshold_ class HyperboxILPRegionEstimator(BaseEstimator): ''' Identifies a region of disagreement as a hyperbox, using the Hyperbox integer linear program. Parameters ---------- beta : float A real number between 0 and 1 representing the size of the desired region. Attributes ---------- lb_ : array-like of shape (n_features,) A list of lower bounds of the fitted hyperbox, one for each feature. ub_ : array-like of shape (n_features,) A list of upper bounds of the fitted hyperbox, one for each feature. ''' def __init__(self, beta=0.25): self.beta = beta def fit(self, X, y, a, outcome_model, grb_params={"MIPGap":.05, "Threads": 12, "TimeLimit": 600}): ''' Fits the estimator to data. Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. y : array-like of shape (n_samples,) Target vector relative to X. a : array-like of shape (n_samples,) Agent labels relative to X. outcome_model A fitted predictor with a .predict_proba(X) method such that .predict_proba(X)[:, 1] consists of real numbers between 0 and 1. grb_params : dictionary, default {"MIPGap": .05, "Threads": 12, "TimeLimit": 600} Parameters for grb.Model('model'). Returns ------- self Fitted estimator. ''' # Get predictions from outcome_model preds = outcome_model.predict_proba(X)[:, 1] # Compute ILP coefficients n_samples, n_features = X.shape n_agents = len(np.unique(a)) data_terms = np.zeros((n_samples, n_agents)) for i in range(n_samples): data_terms[i, a[i]] = y[i]-preds[i] # Optimizer settings model = grb.Model('model') for param in grb_params: model.setParam(param, grb_params[param]) # Region indicators svars = [] for i in range(n_samples): si = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) svars.append(si) # Absolute value terms tvars = [] bvars = [] for a in range(n_agents): ta = model.addVar(vtype=grb.GRB.CONTINUOUS) ba = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) model.addConstr(ta >= grb.quicksum(svars[i]*data_terms[i,a] for i in range(n_samples))) model.addConstr(ta >= -grb.quicksum(svars[i]*data_terms[i,a] for i in range(n_samples))) model.addGenConstrIndicator(ba, True, ta + grb.quicksum(svars[i]*data_terms[i,a] for i in range(n_samples)) <= 0.0) model.addGenConstrIndicator(ba, False, ta - grb.quicksum(svars[i]*data_terms[i,a] for i in range(n_samples)) <= 0.0) tvars.append(ta) bvars.append(ba) # Hyper box constraints lvars = [] uvars = [] for j in range(n_features): lj = model.addVar(lb=-50, ub=50, vtype=grb.GRB.CONTINUOUS) uj = model.addVar(lb=-50, ub=50, vtype=grb.GRB.CONTINUOUS) model.addConstr(lj <= uj) lvars.append(lj) uvars.append(uj) vvars = {} wvars = {} for i in range(n_samples): for j in range(n_features): vij = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) wij = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) eps = 1e-8 # Necessary for strict inequality. model.addGenConstrIndicator(vij, True, lvars[j] - X[i,j] <= 0.0) model.addGenConstrIndicator(vij, False, -lvars[j] + X[i,j] + eps <= 0.0) model.addGenConstrIndicator(wij, True, X[i,j] - uvars[j] <= 0.0) model.addGenConstrIndicator(wij, False, -X[i,j] + uvars[j] + eps <= 0.0) vvars[(i, j)] = vij wvars[(i, j)] = wij model.addGenConstrIndicator(svars[i], True, grb.quicksum(vvars[(i, j)]+wvars[(i, j)] for j in range(n_features)) == 2*n_features) model.addGenConstrIndicator(svars[i], False, grb.quicksum(vvars[(i, j)]+wvars[(i, j)] for j in range(n_features)) <= 2*n_features-1) # Region size constraint region_size = int(n_samples*self.beta) model.addConstr(grb.quicksum(svars[i] for i in range(n_samples)) <= region_size) # Objective and optimization objective = (1/n_samples) * grb.quicksum(ti for ti in tvars) model.ModelSense = grb.GRB.MAXIMIZE model.setObjective(objective) model.optimize() # Store solutions self.lb_ = np.empty(n_features) self.ub_ = np.empty(n_features) for i in range(n_features): self.lb_[i] = lvars[i].X self.ub_[i] = uvars[i].X return self def predict(self, X): ''' Classifies data points inside/outside the region. Parameters ---------- X : array-like of shape (n_samples, n_features) Vector to be scored. Returns ------- y_pred : array-like of shape (n_samples,) A list of booleans indicating membership in the identified region. ''' n_samples, n_features = X.shape y_pred = np.zeros(n_samples) for i in range(n_samples): in_box = True for j in range(n_features): if X[i, j] < self.lb_[j] or X[i, j] > self.ub_[j]: in_box = False y_pred[i] = in_box return y_pred class HyperboxILPComplementRegionEstimator(BaseEstimator): ''' Identifies a region of disagreement as a hyperbox, using the Hyperbox Comp integer linear program. Parameters ---------- beta : float A real number between 0 and 1 representing the size of the desired region. Attributes ---------- lb_ : array-like of shape (n_features,) A list of lower bounds of the fitted hyperbox, one for each feature. ub_ : array-like of shape (n_features,) A list of upper bounds of the fitted hyperbox, one for each feature. ''' def __init__(self, beta=0.25): self.beta = beta def fit(self, X, y, a, outcome_model, grb_params={"MIPGap":.05, "Threads": 12, "TimeLimit": 600}): ''' Fits the estimator to data. Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. y : array-like of shape (n_samples,) Target vector relative to X. a : array-like of shape (n_samples,) Agent labels relative to X. outcome_model A fitted predictor with a .predict_proba(X) method such that .predict_proba(X)[:, 1] consists of real numbers between 0 and 1. grb_params : dictionary, default {"MIPGap": .05, "Threads": 12, "TimeLimit": 600} Parameters for grb.Model('model'). Returns ------- self Fitted estimator. ''' # Get predictions from outcome_model preds = outcome_model.predict_proba(X)[:, 1] # Compute ILP coefficients n_samples, n_features = X.shape n_agents = len(np.unique(a)) data_terms = np.zeros((n_samples, n_agents)) for i in range(n_samples): data_terms[i, a[i]] = y[i]-preds[i] # Optimizer settings model = grb.Model('model') for param in grb_params: model.setParam(param, grb_params[param]) # Region indicators svars = [] for i in range(n_samples): si = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) svars.append(si) # Absolute value terms tvars = [] for a in range(n_agents): ta = model.addVar(vtype=grb.GRB.CONTINUOUS) model.addConstr(ta >= grb.quicksum((1-svars[i])*data_terms[i,a] for i in range(n_samples))) model.addConstr(ta >= -grb.quicksum((1-svars[i])*data_terms[i,a] for i in range(n_samples))) tvars.append(ta) # Hyper box constraints lvars = [] uvars = [] for j in range(n_features): lj = model.addVar(lb=-50, ub=50, vtype=grb.GRB.CONTINUOUS) uj = model.addVar(lb=-50, ub=50, vtype=grb.GRB.CONTINUOUS) model.addConstr(lj <= uj) lvars.append(lj) uvars.append(uj) vvars = {} wvars = {} for i in range(n_samples): for j in range(n_features): vij = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) wij = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) eps = 1e-8 # Necessary for strict inequality. model.addGenConstrIndicator(vij, True, lvars[j] - X[i,j] <= 0.0) model.addGenConstrIndicator(vij, False, -lvars[j] + X[i,j] + eps <= 0.0) model.addGenConstrIndicator(wij, True, X[i,j] - uvars[j] <= 0.0) model.addGenConstrIndicator(wij, False, -X[i,j] + uvars[j] + eps <= 0.0) vvars[(i, j)] = vij wvars[(i, j)] = wij model.addGenConstrIndicator(svars[i], True, grb.quicksum(vvars[(i, j)]+wvars[(i, j)] for j in range(n_features)) == 2*n_features) model.addGenConstrIndicator(svars[i], False, grb.quicksum(vvars[(i, j)]+wvars[(i, j)] for j in range(n_features)) <= 2*n_features-1) # Region size constraint region_size = int(n_samples*self.beta) model.addConstr(grb.quicksum(svars[i] for i in range(n_samples)) <= region_size) # Objective and optimization objective = (1/n_samples) * grb.quicksum(ti for ti in tvars) model.ModelSense = grb.GRB.MINIMIZE model.setObjective(objective) model.optimize() # Store solutions self.lb_ = np.empty(n_features) self.ub_ = np.empty(n_features) for i in range(n_features): self.lb_[i] = lvars[i].X self.ub_[i] = uvars[i].X return self def predict(self, X): ''' Classifies data points inside/outside the region. Parameters ---------- X : array-like of shape (n_samples, n_features) Vector to be scored. Returns ------- y_pred : array-like of shape (n_samples,) A list of booleans indicating membership in the identified region. ''' n_samples, n_features = X.shape y_pred = np.zeros(n_samples) for i in range(n_samples): in_box = True for j in range(n_features): if X[i, j] < self.lb_[j] or X[i, j] > self.ub_[j]: in_box = False y_pred[i] = in_box return y_pred class HyperboxILPGroupRegionEstimator(BaseEstimator): ''' Identifies a region of disagreement as a hyperbox, using the Hyperbox Group integer linear program. Parameters ---------- beta : float A real number between 0 and 1 representing the size of the desired region. Attributes ---------- lb_ : array-like of shape (n_features,) A list of lower bounds of the fitted hyperbox, one for each feature. ub_ : array-like of shape (n_features,) A list of upper bounds of the fitted hyperbox, one for each feature. ''' def __init__(self, beta=0.25): self.beta = beta def fit(self, X, y, a, outcome_model, grb_params={"MIPGap":.05, "Threads": 12, "TimeLimit": 600}): ''' Fits the estimator to data. Parameters ---------- X : array-like of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. y : array-like of shape (n_samples,) Target vector relative to X. a : array-like of shape (n_samples,) Agent labels relative to X. outcome_model A fitted predictor with a .predict_proba(X) method such that .predict_proba(X)[:, 1] consists of real numbers between 0 and 1. grb_params : dictionary, default {"MIPGap": .05, "Threads": 12, "TimeLimit": 600} Parameters for grb.Model('model'). Returns ------- self Fitted estimator. ''' # Get predictions from outcome_model preds = outcome_model.predict_proba(X)[:, 1] # Compute ILP coefficients n_samples, n_features = X.shape n_agents = len(np.unique(a)) data_terms = np.zeros((n_samples, n_agents)) for i in range(n_samples): data_terms[i, a[i]] = y[i]-preds[i] # Optimizer settings model = grb.Model('model') for param in grb_params: model.setParam(param, grb_params[param]) # Region indicators svars = [] for i in range(n_samples): si = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) svars.append(si) # Group variables gvars = [] for a in range(n_agents): ga = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) gvars.append(ga) # Group terms tvars = [] for a in range(n_agents): ta = model.addVar(vtype=grb.GRB.CONTINUOUS) model.addConstr(ta == grb.quicksum(gvars[a]*svars[i]*data_terms[i,a] for i in range(n_samples))) tvars.append(ta) # Hyper box constraints lvars = [] uvars = [] for j in range(n_features): lj = model.addVar(lb=-50, ub=50, vtype=grb.GRB.CONTINUOUS) uj = model.addVar(lb=-50, ub=50, vtype=grb.GRB.CONTINUOUS) model.addConstr(lj <= uj) lvars.append(lj) uvars.append(uj) vvars = {} wvars = {} for i in range(n_samples): for j in range(n_features): vij = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) wij = model.addVar(lb=0, ub=1, vtype=grb.GRB.BINARY) eps = 1e-8 # Necessary for strict inequality. model.addGenConstrIndicator(vij, True, lvars[j] - X[i,j] <= 0.0) model.addGenConstrIndicator(vij, False, -lvars[j] + X[i,j] + eps <= 0.0) model.addGenConstrIndicator(wij, True, X[i,j] - uvars[j] <= 0.0) model.addGenConstrIndicator(wij, False, -X[i,j] + uvars[j] + eps <= 0.0) vvars[(i, j)] = vij wvars[(i, j)] = wij model.addGenConstrIndicator(svars[i], True, grb.quicksum(vvars[(i, j)]+wvars[(i, j)] for j in range(n_features)) == 2*n_features) model.addGenConstrIndicator(svars[i], False, grb.quicksum(vvars[(i, j)]+wvars[(i, j)] for j in range(n_features)) <= 2*n_features-1) # Region size constraint region_size = int(n_samples*self.beta) model.addConstr(grb.quicksum(svars[i] for i in range(n_samples)) <= region_size) # Objective and optimization objective = (1/n_samples) * grb.quicksum(ti for ti in tvars) model.ModelSense = grb.GRB.MAXIMIZE model.setObjective(objective) model.optimize() # Store solutions self.lb_ = np.empty(n_features) self.ub_ = np.empty(n_features) for i in range(n_features): self.lb_[i] = lvars[i].X self.ub_[i] = uvars[i].X return self def predict(self, X): ''' Classifies data points inside/outside the region. Parameters ---------- X : array-like of shape (n_samples, n_features) Vector to be scored. Returns ------- y_pred : array-like of shape (n_samples,) A list of booleans indicating membership in the identified region. ''' n_samples, n_features = X.shape y_pred = np.zeros(n_samples) for i in range(n_samples): in_box = True for j in range(n_features): if X[i, j] < self.lb_[j] or X[i, j] > self.ub_[j]: in_box = False y_pred[i] = in_box return y_pred
34.115326
144
0.566987
2,956
22,482
4.207037
0.086604
0.043101
0.028305
0.037311
0.844645
0.830733
0.819958
0.815938
0.808138
0.808138
0
0.012888
0.323548
22,482
658
145
34.167173
0.80484
0.35375
0
0.751852
0
0
0.006237
0
0
0
0
0
0.003704
1
0.051852
false
0
0.014815
0
0.118519
0
0
0
0
null
0
0
0
1
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
7
c81faa439a9d37a38f1710ded9ca877a1b2aa991
403
py
Python
directions.py
StrawH/controlling-robotic-arm-with-openCV
7a2787642d58cb05ca9b34a857d562156d6bb3fc
[ "MIT" ]
1
2019-08-13T04:22:09.000Z
2019-08-13T04:22:09.000Z
directions.py
StrawH/controlling-robotic-arm-with-openCV
7a2787642d58cb05ca9b34a857d562156d6bb3fc
[ "MIT" ]
null
null
null
directions.py
StrawH/controlling-robotic-arm-with-openCV
7a2787642d58cb05ca9b34a857d562156d6bb3fc
[ "MIT" ]
null
null
null
# # moving right # cv2.arrowedLine(image, pt1=(50,70), pt2=(150,70), color=(0, 0, 255), thickness=6) # # moving left # cv2.arrowedLine(image, pt1=(150,70), pt2=(50,70), color=(0, 0, 255), thickness=6) # # moving up # cv2.arrowedLine(image, pt1=(100,100), pt2=(100,50), color=(0, 0, 255), thickness=6) # # moving down # cv2.arrowedLine(image, pt1=(100,50), pt2=(100,100), color=(0, 0, 255), thickness=6)
44.777778
85
0.64268
68
403
3.808824
0.279412
0.216216
0.293436
0.339768
0.586873
0.393822
0.316602
0.216216
0
0
0
0.214085
0.119107
403
8
86
50.375
0.515493
0.945409
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
c84b5d3f6cf6b459dd29dc38116560721d195f3a
8,790
py
Python
.old/shuffle.py
wzmao/mbio
af78cfdb47577199585179c3b04cc6cf3d6b401c
[ "MIT" ]
2
2015-05-28T12:23:02.000Z
2018-05-25T14:01:17.000Z
.old/shuffle.py
wzmao/mbio
af78cfdb47577199585179c3b04cc6cf3d6b401c
[ "MIT" ]
null
null
null
.old/shuffle.py
wzmao/mbio
af78cfdb47577199585179c3b04cc6cf3d6b401c
[ "MIT" ]
null
null
null
'''Shuffle could be a good method to eliminate some false positive signals. This module include the shuffle function for OMES, MI and MIp. ''' __author__ = 'Wenzhi Mao' __all__ = ['ShuffleOMES', 'ShuffleMI', 'ShuffleMIp'] def _Startup(): from mbio import _ABSpath global _path__ _path__ = _ABSpath() def ShuffleOMES(sequences, times=10000, cutoff=0.2, core=0, output=1, cluster=0, save=False): '''It is a function to calculate the p value for shuffled OMES. Given the sequences in a list with no format. times is the shuffle times. cutoff is the lower cutoff. (Haven't finished yet. Calc all now.) core is the process number to run. output is a mark for output.''' import os from os import path from mbio.Application import job_organization as jo scriptfile = path.join(_path__, '..', 'Scripts', 'omes_mpi.c') jobnumber = jo.AskJobNumber() f = open(path.join(_path__, '..', '.Cache', jobnumber + '.fasta'), 'w') f.write('\n'.join(sequences)) f.close() jo.MkdirResult() f = open(scriptfile, 'r') script = f.read() f.close() output = '1' if output else '0' jo.Writejob(jobnumber, script.replace ('#define seqnum', '#define seqnum ' + str(len(sequences))) .replace ('#define lennum', '#define lennum ' + str(len(sequences[0]) + 1)) .replace ('file.fasta', path.join( _path__, '..', '.Cache', jobnumber + '.fasta')) .replace ('#define OUTPUT', '#define OUTPUT ' + str(output)) .replace ('#define times', '#define times ' + str(times)) .replace ('#define cutoff', '#define cutoff ' + str(1 - cutoff)) .replace ("OMESsave.save", path.join( _path__, '..', '.Result', jobnumber + '-omes.save')) .replace ("Psave.save", path.join(_path__, '..', '.Result', jobnumber + '-p.save'))) jo.SubShufflejob(jobnumber, cluster, core) if path.exists(path.join(_path__, '..', '.Result', jobnumber + '-omes.save')): from mbio.IO import matrix m = matrix.ReadMatrix(path.join( _path__, '..', '.Result', jobnumber + '-omes.save'), 'd', len(sequences[0])) if save: import shutil shutil.copy(path.join( _path__, '..', '.Result', jobnumber + '-omes.save'), './') os.rename(path.join('.', jobnumber + '-omes.save'), './omes.save') else: return None if path.exists(path.join(_path__, '..', '.Result', jobnumber + '-p.save')): from mbio.IO import matrix p = matrix.ReadMatrix(path.join( _path__, '..', '.Result', jobnumber + '-p.save'), 'i', len(sequences[0])) if save: import shutil shutil.copy(path.join( _path__, '..', '.Result', jobnumber + '-p.save'), './') os.rename(path.join('.', jobnumber + '-p.save'), './p.save') else: return None jo.Clearjob(jobnumber) return p def ShuffleMI(sequences, times=10000, cutoff=0.2, core=1, output=1, cluster=False, save=False): '''It is a function to calculate the p value for shuffled MI. Given the sequences in a list with no format. times is the shuffle times. cutoff is the lower cutoff. (Haven't finished yet. Calc all now.) core is the process number to run. output is a mark for output.''' import os from os import path from mbio.Application import job_organization as jo scriptfile = path.join(_path__, '..', 'Scripts', 'mi_mpi.c') jobnumber = jo.AskJobNumber() f = open(path.join(_path__, '..', '.Cache', jobnumber + '.fasta'), 'w') f.write('\n'.join(sequences)) f.close() jo.MkdirResult() f = open(scriptfile, 'r') script = f.read() f.close() output = '1' if output else '0' jo.Writejob(jobnumber, script.replace ('#define seqnum', '#define seqnum ' + str(len(sequences))) .replace ('#define lennum', '#define lennum ' + str(len(sequences[0]) + 1)) .replace ('file.fasta', path.join( _path__, '..', '.Cache', jobnumber + '.fasta')) .replace ('#define OUTPUT', '#define OUTPUT ' + str(output)) .replace ('#define times', '#define times ' + str(times)) .replace ('#define cutoff', '#define cutoff ' + str(1 - cutoff)) .replace ("MIsave.save", path.join( _path__, '..', '.Result', jobnumber + '-mi.save')) .replace ("Psave.save", path.join(_path__, '..', '.Result', jobnumber + '-p.save'))) jo.SubShufflejob(jobnumber, cluster, core) if path.exists(path.join(_path__, '..', '.Result', jobnumber + '-mi.save')): from mbio.IO import matrix m = matrix.ReadMatrix(path.join( _path__, '..', '.Result', jobnumber + '-mi.save'), 'd', len(sequences[0])) if save: import shutil shutil.copy(path.join( _path__, '..', '.Result', jobnumber + '-mi.save'), './') os.rename(path.join('.', jobnumber + '-mi.save'), './mi.save') else: return None if path.exists(path.join(_path__, '..', '.Result', jobnumber + '-p.save')): from mbio.IO import matrix p = matrix.ReadMatrix(path.join( _path__, '..', '.Result', jobnumber + '-p.save'), 'i', len(sequences[0])) if save: import shutil shutil.copy(path.join( _path__, '..', '.Result', jobnumber + '-p.save'), './') os.rename(path.join('.', jobnumber + '-p.save'), './p.save') else: return None jo.Clearjob(jobnumber) return p def ShuffleMIp(sequences, times=10000, cutoff=0.2, core=1, output=1, cluster=False, save=False): '''It is a function to calculate the p value for shuffled MIp. Given the sequences in a list with no format. times is the shuffle times. cutoff is the lower cutoff. (Haven't finished yet. Calc all now.) core is the process number to run. output is a mark for output.''' import os from os import path from mbio.Application import job_organization as jo scriptfile = path.join(_path__, '..', 'Scripts', 'mip_mpi.c') jobnumber = jo.AskJobNumber() f = open(path.join(_path__, '..', '.Cache', jobnumber + '.fasta'), 'w') f.write('\n'.join(sequences)) f.close() jo.MkdirResult() f = open(scriptfile, 'r') script = f.read() f.close() output = '1' if output else '0' jo.Writejob(jobnumber, script.replace ('#define seqnum', '#define seqnum ' + str(len(sequences))) .replace ('#define lennum', '#define lennum ' + str(len(sequences[0]) + 1)) .replace ('file.fasta', path.join( _path__, '..', '.Cache', jobnumber + '.fasta')) .replace ('#define OUTPUT', '#define OUTPUT ' + str(output)) .replace ('#define times', '#define times ' + str(times)) .replace ('#define cutoff', '#define cutoff ' + str(1 - cutoff)) .replace ("MIpsave.save", path.join( _path__, '..', '.Result', jobnumber + '-mip.save')) .replace ("Psave.save", path.join(_path__, '..', '.Result', jobnumber + '-p.save'))) jo.SubShufflejob(jobnumber, cluster, core) if path.exists(path.join(_path__, '..', '.Result', jobnumber + '-mip.save')): from mbio.IO import matrix m = matrix.ReadMatrix(path.join( _path__, '..', '.Result', jobnumber + '-mip.save'), 'd', len(sequences[0])) if save: import shutil shutil.copy(path.join( _path__, '..', '.Result', jobnumber + '-mip.save'), './') os.rename(path.join('.', jobnumber + '-mip.save'), './mip.save') else: return None if path.exists(path.join(_path__, '..', '.Result', jobnumber + '-p.save')): from mbio.IO import matrix p = matrix.ReadMatrix(path.join( _path__, '..', '.Result', jobnumber + '-p.save'), 'i', len(sequences[0])) if save: import shutil shutil.copy(path.join( _path__, '..', '.Result', jobnumber + '-p.save'), './') os.rename(path.join('.', jobnumber + '-p.save'), './p.save') else: return None jo.Clearjob(jobnumber) return p _Startup()
41.074766
96
0.537543
989
8,790
4.653185
0.12639
0.067797
0.08605
0.093872
0.927206
0.927206
0.908301
0.873533
0.873533
0.873533
0
0.007935
0.297497
8,790
213
97
41.267606
0.737328
0.105461
0
0.828729
0
0
0.16129
0
0
0
0
0
0
1
0.022099
false
0
0.121547
0
0.19337
0
0
0
0
null
0
0
0
1
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
7
c095628d7f58a8f158a5f6ff98baac2319e6226b
97
py
Python
finrl_meta/env_execution_optimizing/order_execution_qlib/trade/action/__init__.py
eitin-infant/FinRL-Meta
4c94011e58425796e7e2e5c1bf848afd65c828d6
[ "MIT" ]
214
2021-11-08T17:06:11.000Z
2022-03-31T18:29:48.000Z
finrl_meta/env_execution_optimizing/order_execution_qlib/trade/action/__init__.py
eitin-infant/FinRL-Meta
4c94011e58425796e7e2e5c1bf848afd65c828d6
[ "MIT" ]
51
2021-11-14T19:11:02.000Z
2022-03-30T20:23:08.000Z
finrl_meta/env_execution_optimizing/order_execution_qlib/trade/action/__init__.py
eitin-infant/FinRL-Meta
4c94011e58425796e7e2e5c1bf848afd65c828d6
[ "MIT" ]
110
2021-11-03T07:41:40.000Z
2022-03-31T03:23:38.000Z
from .base import * from .action_rl import * from .action_rule import * from .action_rl import *
19.4
26
0.752577
15
97
4.666667
0.4
0.428571
0.685714
0.514286
0.685714
0
0
0
0
0
0
0
0.164948
97
4
27
24.25
0.864198
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
8
c0a34f2091289ffaa0b5f25483bd502147149f8c
1,725
py
Python
lola/tests/test_coin.py
Manuscrit/lola
181cb6dfa0ebf85807d42f1f770b0556a8f4f4d6
[ "MIT" ]
null
null
null
lola/tests/test_coin.py
Manuscrit/lola
181cb6dfa0ebf85807d42f1f770b0556a8f4f4d6
[ "MIT" ]
null
null
null
lola/tests/test_coin.py
Manuscrit/lola
181cb6dfa0ebf85807d42f1f770b0556a8f4f4d6
[ "MIT" ]
null
null
null
# import importlib # # # # max_steps = 1000 # terminate_prob = 0.998 # gameEnv = importlib.import_module('coin_game') # env = gameEnv.gameEnv(terminate_prob=terminate_prob, max_steps=max_steps) # # # print('state_space', env.state_space) # print('red_pos', env.red_pos) # print('blue_pos', env.blue_pos) # print('red_coin', env.red_coin) # print('coin_pos', env.coin_pos) # # # # test red agent picks up red coin # env.red_coin = 1 # env.red_pos = ( env.coin_pos - env.actions[1] ) % env.grid_size # state, reward, done = env.step(actions=[1, 1]) # print('red_pos', env.red_pos) # print('blue_pos', env.blue_pos) # print('red_coin', env.red_coin) # print('coin_pos', env.coin_pos) # print('reward', reward) # print('state', state) # # # # test red agent picks up blue coin # env.red_coin = 0 # env.red_pos = ( env.coin_pos - env.actions[1] ) % env.grid_size # _, reward, done = env.step(actions=[1, 1]) # print('red_pos', env.red_pos) # print('blue_pos', env.blue_pos) # print('red_coin', env.red_coin) # print('coin_pos', env.coin_pos) # print('reward', reward) # # # test blue agent picks up red coin # env.red_coin = 1 # env.blue_pos = ( env.coin_pos - env.actions[1] ) % env.grid_size # _, reward, done = env.step(actions=[1, 1]) # print('red_pos', env.red_pos) # print('blue_pos', env.blue_pos) # print('red_coin', env.red_coin) # print('coin_pos', env.coin_pos) # print('reward', reward) # # # test blue agent picks up blue coin # env.red_coin = 0 # env.blue_pos = ( env.coin_pos - env.actions[1] ) % env.grid_size # _, reward, done = env.step(actions=[1, 1]) # print('red_pos', env.red_pos) # print('blue_pos', env.blue_pos) # print('red_coin', env.red_coin) # print('coin_pos', env.coin_pos) # print('reward', reward)
29.741379
75
0.681739
288
1,725
3.84375
0.107639
0.124661
0.081301
0.113821
0.831075
0.818428
0.818428
0.818428
0.818428
0.818428
0
0.016032
0.132174
1,725
58
76
29.741379
0.723447
0.930435
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
8
c0c1bf73bfd9a0f36960d8daeeea863bdc608c7f
173
py
Python
__main__.py
marskar/main
b374fa739557b8b571050223b7784b621522cb38
[ "MIT" ]
1
2021-09-30T23:25:06.000Z
2021-09-30T23:25:06.000Z
__main__.py
marskar/main
b374fa739557b8b571050223b7784b621522cb38
[ "MIT" ]
null
null
null
__main__.py
marskar/main
b374fa739557b8b571050223b7784b621522cb38
[ "MIT" ]
null
null
null
# Relative import in top level __main__.py import sys from src.pkg.main import print_name_and_file if __name__ == "__main__": print_name_and_file() print(sys.argv)
21.625
44
0.757225
28
173
4.035714
0.607143
0.159292
0.212389
0.283186
0
0
0
0
0
0
0
0
0.16185
173
7
45
24.714286
0.77931
0.231214
0
0
0
0
0.061069
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0.6
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
7
2387e0fd08ba7cfecb8e8ea089305f5c01ccbd32
142
py
Python
loss/bce_loss_with_logits.py
cbim-medical-group/pytorch-template
7f76ee095420e23efe22df560d8e0a314fbc16dd
[ "MIT" ]
1
2020-10-30T10:55:01.000Z
2020-10-30T10:55:01.000Z
loss/bce_loss_with_logits.py
cbim-medical-group/pytorch-template
7f76ee095420e23efe22df560d8e0a314fbc16dd
[ "MIT" ]
null
null
null
loss/bce_loss_with_logits.py
cbim-medical-group/pytorch-template
7f76ee095420e23efe22df560d8e0a314fbc16dd
[ "MIT" ]
null
null
null
from torch.nn import functional as F def bce_loss_with_logits(output, target): return F.binary_cross_entropy_with_logits(output, target)
28.4
61
0.816901
23
142
4.73913
0.782609
0.183486
0.293578
0.40367
0
0
0
0
0
0
0
0
0.119718
142
5
61
28.4
0.872
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
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
1
1
1
0
0
8
23c403a3663d0700235b4d5c3c815eb37217ef07
183,659
py
Python
RestApi/Python/RestApi_v2/Modules/bpsRestPy.py
yongzhou71/BreakingPoint
455e93dfb57db4fbb022fc6df3132c3f6f457379
[ "MIT" ]
null
null
null
RestApi/Python/RestApi_v2/Modules/bpsRestPy.py
yongzhou71/BreakingPoint
455e93dfb57db4fbb022fc6df3132c3f6f457379
[ "MIT" ]
null
null
null
RestApi/Python/RestApi_v2/Modules/bpsRestPy.py
yongzhou71/BreakingPoint
455e93dfb57db4fbb022fc6df3132c3f6f457379
[ "MIT" ]
null
null
null
from __future__ import absolute_import, print_function, division from six import with_metaclass import requests import json import pprint from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager import ssl requests.packages.urllib3.disable_warnings() pp = pprint.PrettyPrinter(indent=1).pprint class TlsAdapter(HTTPAdapter): def init_poolmanager(self, connections, maxsize, block): self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize, block=block,ssl_version=ssl.PROTOCOL_TLSv1_1) ### this BPS REST API wrapper is generated for version: 9.00.101.13 class BPS(object): def __init__(self, host, user, password): self.host = host self.user = user self.password = password self.sessionId = None self.session = requests.Session() self.session.mount('https://', TlsAdapter()) self.network = DataModelProxy(wrapper=self, name='network') self.testmodel = DataModelProxy(wrapper=self, name='testmodel') self.appProfile = DataModelProxy(wrapper=self, name='appProfile') self.topology = DataModelProxy(wrapper=self, name='topology') self.loadProfile = DataModelProxy(wrapper=self, name='loadProfile') self.strikeList = DataModelProxy(wrapper=self, name='strikeList') self.superflow = DataModelProxy(wrapper=self, name='superflow') self.reports = DataModelProxy(wrapper=self, name='reports') self.capture = DataModelProxy(wrapper=self, name='capture') ### connect to the system def __connect(self): r = self.session.post(url='https://' + self.host + '/bps/api/v1/auth/session', data=json.dumps({'username': self.user, 'password': self.password}), headers={'content-type': 'application/json'}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): self.sessionId = r.json().get('sessionId') self.session.headers['sessionId'] = r.json().get('sessionId') self.session.headers['X-API-KEY'] = r.json().get('apiKey') print('Successfully connected to %s.' % self.host) else: print('Failed connecting to %s: (%s, %s)' % (self.host, r.status_code, r.content)) ### disconnect from the system def __disconnect(self): r = self.session.delete(url='https://' + self.host + '/api/v1/auth/session', verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 204): self.sessionId = None if 'sessionId' in self.session.headers: del self.session.headers['sessionId'] del self.session.headers['X-API-KEY'] print('Successfully disconnected from %s.' % self.host) else: print('Failed disconnecting from %s: (%s, %s)' % (self.host, r.status_code, r.content)) ### login into the bps system def login(self): self.__connect() r = self.session.post(url='https://' + self.host + '/bps/api/v2/core/auth/login', data=json.dumps({'username': self.user, 'password': self.password, 'sessionId': self.sessionId}), headers={'content-type': 'application/json'}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'') or r.content.startswith(b'[')) if(r.status_code == 200): print('Login successful.\nWelcome %s. \nYour session id is %s' % (self.user, self.sessionId)) else: print('Login failed.\ncode:%s, content:%s' % (r.status_code, r.content)) ### logout from the bps system def logout(self): r = self.session.post(url='https://' + self.host + '/bps/api/v2/core/auth/logout', data=json.dumps({'username': self.user, 'password': self.password, 'sessionId': self.sessionId}), headers={'content-type': 'application/json'}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): print('Logout successful. \nBye %s.' % self.user) self.__disconnect() else: print('Logout failed: (%s, %s)' % (r.status_code, r.content)) ### Get from data model def _get(self, path, responseDepth=None, **kwargs): requestUrl = 'https://%s/bps/api/v2/core%s%s' % (self.host, path, '?responseDepth=%s' % responseDepth if responseDepth else '') for key, value in list(kwargs.items()): requestUrl = requestUrl + "&%s=%s" % (key, value) headers = {'content-type': 'application/json'} r = self.session.get(url=requestUrl, headers=headers, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Get from data model def _patch(self, path, value): r = self.session.patch(url='https://' + self.host + '/bps/api/v2/core/' + path, headers={'content-type': 'application/json'}, data=json.dumps(value), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code != 204): return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Get from data model def _put(self, path, value): r = self.session.put(url='https://' + self.host + '/bps/api/v2/core/' + path, headers={'content-type': 'application/json'}, data=json.dumps(value), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code != 204): return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Get from data model def _delete(self, path): requestUrl = 'https://' + self.host + '/bps/api/v2/core/'+ path headers = {'content-type': 'application/json'} r = self.session.delete(url=requestUrl, headers=headers, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Load an existing test model template. @staticmethod def _testmodel_operations_load(self, template): """ Load an existing test model template. :param template (string): The name of the template testmodel """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/load', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Creates a new Test Model @staticmethod def _testmodel_operations_new(self, template=None): """ Creates a new Test Model :param template (string): The name of the template. In this case will be empty. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/new', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _network_operations_search(self, searchString, userid, clazz, sortorder, sort, limit, offset): """ :param searchString (java.lang.String): :param userid (java.lang.String): :param clazz (java.lang.String): :param sortorder (java.lang.String): :param sort (java.lang.String): :param limit (java.lang.Integer): :param offset (java.lang.Integer): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/search', headers={'content-type': 'application/json'}, data=json.dumps({'searchString': searchString, 'userid': userid, 'clazz': clazz, 'sortorder': sortorder, 'sort': sort, 'limit': limit, 'offset': offset}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _testmodel_operations_search(self, searchString, limit, sort, sortorder): """ :param searchString (java.lang.String): Search test name matching the string given. :param limit (java.lang.String): The limit of rows to return :param sort (java.lang.String): Parameter to sort by. :param sortorder (java.lang.String): The sort order (ascending/descending) """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/search', headers={'content-type': 'application/json'}, data=json.dumps({'searchString': searchString, 'limit': limit, 'sort': sort, 'sortorder': sortorder}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _topology_operations_reserve(self, reservation): """ :param reservation (list): list of object with fields user (java.lang.String): group (java.lang.Integer): slot (java.lang.Integer): port (java.lang.Integer): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/reserve', headers={'content-type': 'application/json'}, data=json.dumps({'reservation': reservation}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Deletes a given Network Neighborhood Config from the database. @staticmethod def _network_operations_delete(self, name): """ Deletes a given Network Neighborhood Config from the database. :param name (string): The name of the Network Neighborhood Config. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/delete', headers={'content-type': 'application/json'}, data=json.dumps({'name': name}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _strikeList_operations_exportStrikeList(self, name, filepath): """ :param name (java.lang.String): The name of the strike list to be exported. :param filepath (java.lang.String): The local path where to save the exported object. The file should have .bap extension """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/exportStrikeList', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'filepath': filepath}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): with open(filepath, 'wb') as fd: for chunk in r.iter_content(chunk_size=1024): fd.write(chunk) fd.close() r.close() return {'status_code': r.status_code, 'content': 'success'} else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Deletes a given Test Model from the database. @staticmethod def _testmodel_operations_delete(self, name): """ Deletes a given Test Model from the database. :param name (string): The name of the Test Model. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/delete', headers={'content-type': 'application/json'}, data=json.dumps({'name': name}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Deletes a given Strike List from the database. @staticmethod def _strikeList_operations_delete(self, name): """ Deletes a given Strike List from the database. :param name (string): The name of the Strike List to be deleted. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/delete', headers={'content-type': 'application/json'}, data=json.dumps({'name': name}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Load an existing Application Profile and sets it as the current one. @staticmethod def _appProfile_operations_load(self, template): """ Load an existing Application Profile and sets it as the current one. :param template (string): The name of the template application profile """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/load', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Creates a new Application Profile. @staticmethod def _appProfile_operations_new(self, template=None): """ Creates a new Application Profile. :param template (string): The name of the template. In this case will be empty. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/new', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the current working Application Profiles and gives it a new name. @staticmethod def _testmodel_operations_saveAs(self, name, force): """ Saves the current working Application Profiles and gives it a new name. :param name (string): The new name given for the current working Test Model :param force (boolean): Force to save the working Test Model using a new name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/saveAs', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the working Test Model using the current name @staticmethod def _testmodel_operations_save(self, name=None, force=True): """ Saves the working Test Model using the current name :param name (string): The name of the template that should be empty. :param force (boolean): Force to save the working Test Model with the same name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/save', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Load an existing Super Flow and sets it as the current one. @staticmethod def _superflow_operations_load(self, template): """ Load an existing Super Flow and sets it as the current one. :param template (string): The name of the existing Super Flow template """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/load', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Creates a new Super Flow. @staticmethod def _superflow_operations_new(self, template=None): """ Creates a new Super Flow. :param template (string): The name of the template. In this case will be empty. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/new', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _capture_operations_importCapture(self, name, filename, force): """ :param name (java.lang.String): The name of the capture being imported :param filename (java.lang.String): The file containing the capture object :param force (java.lang.Boolean): Force to import the file and the object having the same name will be replaced. """ appWrapper = self._wrapper files = {'file': (name, open(filename, 'rb'), 'application/xml')} r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/capture/operations/importCapture', files=files, data={'fileInfo':str({'name': name, 'filename': filename, 'force': force})}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _appProfile_operations_search(self, searchString, limit, sort, sortorder): """ :param searchString (java.lang.String): Search application profile name matching the string given. :param limit (java.lang.String): The limit of rows to return :param sort (java.lang.String): Parameter to sort by. :param sortorder (java.lang.String): The sort order (ascending/descending) """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/search', headers={'content-type': 'application/json'}, data=json.dumps({'searchString': searchString, 'limit': limit, 'sort': sort, 'sortorder': sortorder}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Removes a flow from the current working SuperFlow. @staticmethod def _superflow_operations_removeFlow(self, id): """ Removes a flow from the current working SuperFlow. :param id (int): The flow ID. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/removeFlow', headers={'content-type': 'application/json'}, data=json.dumps({'id': id}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _loadProfile_operations_save(self): appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/loadProfile/operations/save', headers={'content-type': 'application/json'}, data=None, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Save the active editing LoadProfile under specified name @staticmethod def _loadProfile_operations_saveAs(self, name): """ Save the active editing LoadProfile under specified name :param name (java.lang.String): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/loadProfile/operations/saveAs', headers={'content-type': 'application/json'}, data=json.dumps({'name': name}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Deletes a given Application Profile from the database. @staticmethod def _appProfile_operations_delete(self, name): """ Deletes a given Application Profile from the database. :param name (string): The name of the Application Profiles. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/delete', headers={'content-type': 'application/json'}, data=json.dumps({'name': name}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _reports_operations_search(self, searchString, limit, sort, sortorder): """ :param searchString (java.lang.String): Search test name matching the string given. :param limit (java.lang.String): The limit of rows to return :param sort (java.lang.String): Parameter to sort by. :param sortorder (java.lang.String): The sort order (ascending/descending) """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/reports/operations/search', headers={'content-type': 'application/json'}, data=json.dumps({'searchString': searchString, 'limit': limit, 'sort': sort, 'sortorder': sortorder}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the current working Strike List and gives it a new name. @staticmethod def _strikeList_operations_saveAs(self, name, force): """ Saves the current working Strike List and gives it a new name. :param name (string): The new name given for the current working Strike List :param force (boolean): Force to save the working Strike List using the given name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/saveAs', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the current working Strike List using the current name @staticmethod def _strikeList_operations_save(self, name=None, force=True): """ Saves the current working Strike List using the current name :param name (string): The name of the template. Default is empty. :param force (boolean): Force to save the working Strike List with the same name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/save', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _topology_operations_unreserve(self, unreservation): """ :param unreservation (list): list of object with fields slot (java.lang.Integer): port (java.lang.Integer): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/unreserve', headers={'content-type': 'application/json'}, data=json.dumps({'unreservation': unreservation}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Deletes a Test Report from the database. @staticmethod def _reports_operations_delete(self, runid): """ Deletes a Test Report from the database. :param runid (string): The run id of the test that generated the report you want to delete. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/reports/operations/delete', headers={'content-type': 'application/json'}, data=json.dumps({'runid': runid}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Adds a list of SuperFlow to the current working Application Profile. ([{'superflow':'adadad', 'weight':'20'},{..}]) @staticmethod def _appProfile_operations_add(self, add): """ Adds a list of SuperFlow to the current working Application Profile. ([{'superflow':'adadad', 'weight':'20'},{..}]) :param add (list): list of object with fields superflow (java.lang.String): The name of the super flow weight (java.lang.String): The weight of the super flow """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/add', headers={'content-type': 'application/json'}, data=json.dumps({'add': add}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Imports the a list of strikes residing in a file. @staticmethod def _strikeList_operations_importStrikeList(self, name, filename, force): """ Imports the a list of strikes residing in a file. :param name (java.lang.String): The name of the object being imported :param filename (java.lang.String): The file containing the object to be imported. :param force (java.lang.Boolean): Force to import the file and the object having the same name will be replaced. """ appWrapper = self._wrapper files = {'file': (name, open(filename, 'rb'), 'application/xml')} r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/importStrikeList', files=files, data={'fileInfo':str({'name': name, 'filename': filename, 'force': force})}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _testmodel_operations_stopRun(self, runid): """ :param runid (java.lang.Integer): Test RUN ID """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/stopRun', headers={'content-type': 'application/json'}, data=json.dumps({'runid': runid}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _topology_operations_stopRun(self, runid): """ :param runid (java.lang.Inetger): Test RUN ID """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/stopRun', headers={'content-type': 'application/json'}, data=json.dumps({'runid': runid}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Load an existing Strike List and sets it as the current one. @staticmethod def _strikeList_operations_load(self, template): """ Load an existing Strike List and sets it as the current one. :param template (string): The name of the Strike List template """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/load', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Creates a new Strike List. @staticmethod def _strikeList_operations_new(self, template=None): """ Creates a new Strike List. :param template (string): The name of the template. In this case will be empty. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/new', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _loadProfile_operations_load(self, template): """ :param template (java.lang.String): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/loadProfile/operations/load', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _superflow_operations_search(self, searchString, limit, sort, sortorder): """ :param searchString (java.lang.String): Search Super Flow name matching the string given. :param limit (java.lang.String): The limit of rows to return :param sort (java.lang.String): Parameter to sort by. :param sortorder (java.lang.String): The sort order (ascending/descending) """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/search', headers={'content-type': 'application/json'}, data=json.dumps({'searchString': searchString, 'limit': limit, 'sort': sort, 'sortorder': sortorder}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Deletes a given Super Flow from the database. @staticmethod def _superflow_operations_delete(self, name): """ Deletes a given Super Flow from the database. :param name (string): The name of the Super Flow. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/delete', headers={'content-type': 'application/json'}, data=json.dumps({'name': name}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _testmodel_operations_exportModel(self, name, attachments, filepath, runid=None): """ :param name (java.lang.String): The name of the test model to be exported. :param attachments (java.lang.Boolean): True if object attachments are needed. :param filepath (java.lang.String): The local path where to save the exported object. :param runid (int): Test RUN ID """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/exportModel', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'attachments': attachments, 'filepath': filepath, 'runid': runid}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): with open(filepath, 'wb') as fd: for chunk in r.iter_content(chunk_size=1024): fd.write(chunk) fd.close() r.close() return {'status_code': r.status_code, 'content': 'success'} else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the current working Application Profiles and gives it a new name. @staticmethod def _appProfile_operations_saveAs(self, name, force): """ Saves the current working Application Profiles and gives it a new name. :param name (string): The new name given for the current working Application Profile :param force (boolean): Force to save the working Application Profile using the given name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/saveAs', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the current working application profile using the current name @staticmethod def _appProfile_operations_save(self, name=None, force=True): """ Saves the current working application profile using the current name :param name (string): The name of the template. Default is empty. :param force (boolean): Force to save the working Application Profile with the same name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/save', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Removes an action from the current working SuperFlow. @staticmethod def _superflow_operations_removeAction(self, id): """ Removes an action from the current working SuperFlow. :param id (int): The action ID. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/removeAction', headers={'content-type': 'application/json'}, data=json.dumps({'id': id}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Reboots the card. Only available for PerfectStorm and CloudStorm cards. @staticmethod def _topology_operations_reboot(self, board): """ Reboots the card. Only available for PerfectStorm and CloudStorm cards. :param board (java.lang.Integer): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/reboot', headers={'content-type': 'application/json'}, data=json.dumps({'board': board}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Removes a strike from the current working Strike List.([{id: 'bb/c/d'}, {id: 'aa/f/g'}]) @staticmethod def _strikeList_operations_remove(self, strike): """ Removes a strike from the current working Strike List.([{id: 'bb/c/d'}, {id: 'aa/f/g'}]) :param strike (list): The list of strike ids to remove. The strike id is in fact the it's path. list of object with fields id (java.lang.String): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/remove', headers={'content-type': 'application/json'}, data=json.dumps({'strike': strike}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _strikeList_operations_search(self, searchString, limit, sort, sortorder): """ :param searchString (java.lang.String): Search strike list name matching the string given. :param limit (java.lang.String): The limit of rows to return :param sort (java.lang.String): Parameter to sort by. :param sortorder (java.lang.String): The sort order (ascending/descending) """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/search', headers={'content-type': 'application/json'}, data=json.dumps({'searchString': searchString, 'limit': limit, 'sort': sort, 'sortorder': sortorder}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _reports_operations_exportReport(self, filepath, runid, reportType, sectionIds=None): """ :param filepath (java.lang.String): The local path where to export the report, including the report name. :param runid (java.lang.Integer): Test RUN ID :param reportType (java.lang.String): Report file format to be exported in. :param sectionIds (java.lang.String): Chapter Ids. Can be extracted a chapter or many. (sectionIds=6 / sectionIds=5,6,7) """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/reports/operations/exportReport', headers={'content-type': 'application/json'}, data=json.dumps({'filepath': filepath, 'runid': runid, 'reportType': reportType, 'sectionIds': sectionIds}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): with open(filepath, 'wb') as fd: for chunk in r.iter_content(chunk_size=1024): fd.write(chunk) fd.close() r.close() return {'status_code': r.status_code, 'content': 'success'} else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the current working Application Profiles and gives it a new name. @staticmethod def _superflow_operations_saveAs(self, name, force): """ Saves the current working Application Profiles and gives it a new name. :param name (string): The new name given for the current working Super Flow :param force (boolean): Force to save the working Super Flow using the given name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/saveAs', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Saves the working Super Flow using the current name @staticmethod def _superflow_operations_save(self, name=None, force=True): """ Saves the working Super Flow using the current name :param name (string): The name of the template that should be empty. :param force (boolean): Force to save the working Super Flow with the same name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/save', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Clones a component in the current working Test Model @staticmethod def _testmodel_operations_clone(self, template, type, active): """ Clones a component in the current working Test Model :param template (java.lang.String): The ID of the test component to clone. :param type (java.lang.String): Component Type: appsim, sesionsender .. :param active (java.lang.Boolean): Set component enable (by default is active) or disable """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/clone', headers={'content-type': 'application/json'}, data=json.dumps({'template': template, 'type': type, 'active': active}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Adds a new test component to the current working test model @staticmethod def _testmodel_operations_add(self, name, component, type, active): """ Adds a new test component to the current working test model :param name (java.lang.String): Component Name :param component (java.lang.String): Component template, preset. :param type (java.lang.String): Component Type: appsim, sesionsender .. :param active (java.lang.Boolean): Set component enable (by default is active) or disable """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/add', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'component': component, 'type': type, 'active': active}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _testmodel_operations_realTimeStats(self, runid, rtsgroup, numSeconds, numDataPoints=1): """ :param runid (int): Test RUN ID :param rtsgroup (java.lang.String): Real Time Stats group name :param numSeconds (java.lang.Integer): The number of seconds. If negative, means from the end :param numDataPoints (java.lang.Integer): The number of data points :return result (com.breakingpointsys.jcontrol.model.RealTimeStatsList): com.breakingpointsys.jcontrol.model.RealTimeStatsList of object with fields testStuck (bool): time (double): progress (float): values (list): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/realTimeStats', headers={'content-type': 'application/json'}, data=json.dumps({'runid': runid, 'rtsgroup': rtsgroup, 'numSeconds': numSeconds, 'numDataPoints': numDataPoints}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Adds a flow to the current working SuperFlow @staticmethod def _superflow_operations_addFlow(self, flowParams): """ Adds a flow to the current working SuperFlow :param flowParams (com.breakingpointsys.jcontrol.commands.WorkingSuperFlowModifyFlow.FlowParams): The flow object to add. com.breakingpointsys.jcontrol.commands.WorkingSuperFlowModifyFlow.FlowParams of object with fields name (java.lang.String): The name of the flow from (java.lang.String): Traffic initiator. to (java.lang.String): Traffic responder. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/addFlow', headers={'content-type': 'application/json'}, data=json.dumps({'flowParams': flowParams}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _testmodel_operations_run(self, modelname, group): """ :param modelname (string): Test Name to run :param group (int): Group to run """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/run', headers={'content-type': 'application/json'}, data=json.dumps({'modelname': modelname, 'group': group}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _topology_operations_run(self, modelname, group): """ :param modelname (string): Test Name to run :param group (int): Group to run """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/run', headers={'content-type': 'application/json'}, data=json.dumps({'modelname': modelname, 'group': group}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _network_operations_load(self, template): """ :param template (string): The name of the network neighborhood template """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/load', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Creates a new Network Neighborhood configuration with no name. @staticmethod def _network_operations_new(self, template=None): """ Creates a new Network Neighborhood configuration with no name. :param template (string): The name of the template. In this case will be empty. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/new', headers={'content-type': 'application/json'}, data=json.dumps({'template': template}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Adds a list of strikes to the current working Strike List.([{id: 'b/b/v/f'}, {id: 'aa/f/h'}]) @staticmethod def _strikeList_operations_add(self, strike): """ Adds a list of strikes to the current working Strike List.([{id: 'b/b/v/f'}, {id: 'aa/f/h'}]) :param strike (list): The list of strikes to add. list of object with fields id (java.lang.String): Strike path. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/strikeList/operations/add', headers={'content-type': 'application/json'}, data=json.dumps({'strike': strike}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Adds a flow to the current working SuperFlow @staticmethod def _superflow_operations_addAction(self, flowid, name, actionid, source): """ Adds a flow to the current working SuperFlow :param flowid (java.lang.Integer): The flow id. :param name (java.lang.String): The name of the action definition. :param actionid (java.lang.Integer): The new action id. :param source (java.lang.String): The action source. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/superflow/operations/addAction', headers={'content-type': 'application/json'}, data=json.dumps({'flowid': flowid, 'name': name, 'actionid': actionid, 'source': source}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _network_operations_list(self, userid, clazz, sortorder, sort, limit, offset): """ :param userid (string): :param clazz (string): :param sortorder (string): :param sort (string): :param limit (integer): :param offset (integer): :return returnArg (list): list of object with fields name (string): type (string): author (string): createdOn (string): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/list', headers={'content-type': 'application/json'}, data=json.dumps({'userid': userid, 'clazz': clazz, 'sortorder': sortorder, 'sort': sort, 'limit': limit, 'offset': offset}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Removes a SuperFlow from the current working Application Profile. @staticmethod def _appProfile_operations_remove(self, superflow): """ Removes a SuperFlow from the current working Application Profile. :param superflow (string): The name of the super flow. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/remove', headers={'content-type': 'application/json'}, data=json.dumps({'superflow': superflow}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Sets the card mode of a board @staticmethod def _topology_operations_setCardMode(self, board, mode): """ Sets the card mode of a board :param board (java.lang.Integer): :param mode (java.lang.Integer): the new mode: 10 for BPS-L23, 7 for BPS-L47, 3 for Non-BPS """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/setCardMode', headers={'content-type': 'application/json'}, data=json.dumps({'board': board, 'mode': mode}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Sets the card speed of a board @staticmethod def _topology_operations_setCardSpeed(self, board, speed): """ Sets the card speed of a board :param board (java.lang.Integer): :param speed (java.lang.Integer): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/setCardSpeed', headers={'content-type': 'application/json'}, data=json.dumps({'board': board, 'speed': speed}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Sets the card fanout of a board @staticmethod def _topology_operations_setCardFanout(self, board, fanout): """ Sets the card fanout of a board :param board (java.lang.Integer): :param fanout (java.lang.Integer): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/setCardFanout', headers={'content-type': 'application/json'}, data=json.dumps({'board': board, 'fanout': fanout}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Sets the card fanout of a board @staticmethod def _topology_operations_setPerfAcc(self, board, perfacc): """ Sets the card fanout of a board :param board (java.lang.Integer): :param perfacc (java.lang.Boolean): """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/topology/operations/setPerfAcc', headers={'content-type': 'application/json'}, data=json.dumps({'board': board, 'perfacc': perfacc}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _network_operations_saveAs(self, name, regenerateOldStyle=True, force=False): """ :param name (string): The new name given for the current working network config :param regenerateOldStyle (boolean): Force to apply the changes made on the loaded network configuration. Force to generate a network from the old one. :param force (boolean): Force to save the network config. It replaces a pre-existing config having the same name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/saveAs', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'regenerateOldStyle': regenerateOldStyle, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _network_operations_save(self, name=None, regenerateOldStyle=True, force=True): """ :param name (string): The new name given for the current working network config :param regenerateOldStyle (boolean): Force to apply the changes made on the loaded network configuration. Force to generate a network from the old one. :param force (boolean): Force to save the network config. It replaces a pre-existing config having the same name. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/save', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'regenerateOldStyle': regenerateOldStyle, 'force': force}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### null @staticmethod def _appProfile_operations_exportAppProfile(self, name, attachments, filepath): """ :param name (java.lang.String): The name of the test model to be exported. :param attachments (java.lang.Boolean): True if object attachments are needed. :param filepath (java.lang.String): The local path where to save the exported object. """ appWrapper = self._wrapper r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/exportAppProfile', headers={'content-type': 'application/json'}, data=json.dumps({'name': name, 'attachments': attachments, 'filepath': filepath}), verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): with open(filepath, 'wb') as fd: for chunk in r.iter_content(chunk_size=1024): fd.write(chunk) fd.close() r.close() return {'status_code': r.status_code, 'content': 'success'} else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Imports a test model, given as a file. @staticmethod def _testmodel_operations_importModel(self, name, filename, force): """ Imports a test model, given as a file. :param name (java.lang.String): The name of the object being imported :param filename (java.lang.String): The file containing the object :param force (java.lang.Boolean): Force to import the file and the object having the same name will be replaced. """ appWrapper = self._wrapper files = {'file': (name, open(filename, 'rb'), 'application/xml')} r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/testmodel/operations/importModel', files=files, data={'fileInfo':str({'name': name, 'filename': filename, 'force': force})}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Imports an application profile, given as a file. @staticmethod def _appProfile_operations_importAppProfile(self, name, filename, force): """ Imports an application profile, given as a file. :param name (java.lang.String): The name of the object being imported :param filename (java.lang.String): The file containing the object :param force (java.lang.Boolean): Force to import the file and the object having the same name will be replaced. """ appWrapper = self._wrapper files = {'file': (name, open(filename, 'rb'), 'application/xml')} r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/appProfile/operations/importAppProfile', files=files, data={'fileInfo':str({'name': name, 'filename': filename, 'force': force})}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} ### Imports a network neighborhood model, given as a file. @staticmethod def _network_operations_importNetwork(self, name, filename, force): """ Imports a network neighborhood model, given as a file. :param name (java.lang.String): The name of the object being imported :param filename (java.lang.String): The file containing the object :param force (java.lang.Boolean): Force to import the file and replace the object having the same name. """ appWrapper = self._wrapper files = {'file': (name, open(filename, 'rb'), 'application/xml')} r = appWrapper.session.post(url='https://' + appWrapper.host + '/bps/api/v2/core/network/operations/importNetwork', files=files, data={'fileInfo':str({'name': name, 'filename': filename, 'force': force})}, verify=False) jsonContent = r.content is not None and (r.content.startswith(b'{') or r.content.startswith(b'[')) if(r.status_code == 200): return json.loads(r.content) if jsonContent else r.content else: return {'status_code': r.status_code, 'content': json.loads(r.content) if jsonContent else r.content} class DataModelMeta(type): _dataModel = { 'network': { 'haveImpairments': { }, 'schemaver': { }, 'author': { }, 'description': { }, 'label': { }, 'impairments': { }, 'params': { }, 'networkModel': { 'enodeb': [{ 'dns': { }, 'plmn': { }, 'psn': { }, 'psn_netmask': { }, 'sctp_over_udp': { }, 'enodebs': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { }, 'sctp_sport': { } }], 'ip_router': [{ 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { }, 'ip_address': { } }], 'ip6_router': [{ 'hosts_ip_alloc_container': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'ip_address': { }, 'prefix_length': { } }], 'ue_info': [{ 'imsi_base': { }, 'secret_key_step': { }, 'count': { }, 'operator_variant': { }, 'secret_key': { }, 'imei_base': { }, 'msisdn_base': { }, 'maxmbps_per_ue': { }, 'mobility_session_infos': { }, 'id': { } }], 'ip_ldap_server': [{ 'auth_timeout': { }, 'ldap_username_start_tag': { }, 'ldap_user_min': { }, 'ldap_user_count': { }, 'authentication_rate': { }, 'ldap_password_start_tag': { }, 'ldap_user_max': { }, 'id': { }, 'ldap_server_address': { }, 'dn_fixed_val': { } }], 'mme_sgw_pgw6': [{ 'ue_info': { }, 'max_sessions': { }, 'lease_address': { }, 'dns': { }, 'plmn': { }, 'ip_address': { }, 'sgw_advertised_sgw': { }, 'sgw_advertised_pgw': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'prefix_length': { } }], 'mobility_session_info': [{ 'password': { }, 'bearers': { }, 'id': { }, 'access_point_name': { }, 'username': { }, 'initiated_dedicated_bearers': { } }], 'ggsn6': [{ 'lease_address': { }, 'count': { }, 'dns': { }, 'ggsn_advertised_control_ip_address': { }, 'ip_address': { }, 'ggsn_advertised_data_ip_address': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'prefix_length': { } }], 'ip_external_hosts': [{ 'proxy': { }, 'count': { }, 'id': { }, 'ip_address': { }, 'behind_snapt': { }, 'tags': { } }], 'ip_static_hosts': [{ 'mpls_list': { }, 'ip_selection_type': { }, 'count': { }, 'dns': { }, 'psn': { }, 'psn_netmask': { }, 'ip_address': { }, 'tags': { }, 'proxy': { }, 'maxmbps_per_host': { }, 'gateway_ip_address': { }, 'netmask': { }, 'ldap': { }, 'default_container': { }, 'id': { }, 'dns_proxy': { }, 'behind_snapt': { }, 'enable_stats': { } }], 'ggsn': [{ 'lease_address': { }, 'count': { }, 'dns': { }, 'ggsn_advertised_control_ip_address': { }, 'ip_address': { }, 'ggsn_advertised_data_ip_address': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { } }], 'interface': [{ 'ignore_pause_frames': { }, 'duplicate_mac_address': { }, 'description': { }, 'packet_filter': { 'not_dest_port': { }, 'not_src_ip': { }, 'filter': { }, 'src_ip': { }, 'src_port': { }, 'vlan': { }, 'not_vlan': { }, 'dest_ip': { }, 'not_dest_ip': { }, 'dest_port': { }, 'not_src_port': { } }, 'impairments': { 'drop': { }, 'corrupt_lt64': { }, 'rate': { }, 'corrupt_lt256': { }, 'corrupt_rand': { }, 'corrupt_chksum': { }, 'corrupt_gt256': { }, 'frack': { } }, 'mtu': { }, 'vlan_key': { }, 'number': { }, 'use_vnic_mac_address': { }, 'mac_address': { }, 'id': { } }], 'ds_lite_b4': [{ 'aftr_addr': { }, 'count': { }, 'ip_address': { }, 'host_ip_base_addr': { }, 'ipv6_addr_alloc_mode': { }, 'gateway_ip_address': { }, 'default_container': { }, 'aftr_count': { }, 'hosts_ip_increment': { }, 'id': { }, 'prefix_length': { }, 'host_ip_addr_alloc_mode': { } }], 'ue': [{ 'allocation_rate': { }, 'mobility_interval_ms': { }, 'ue_info': { }, 'dns': { }, 'mobility_action': { }, 'tags': { }, 'proxy': { }, 'default_container': { }, 'mobility_with_traffic': { }, 'id': { }, 'behind_snapt': { }, 'request_ipv6': { }, 'enable_stats': { } }], 'ip_dns_proxy': [{ 'dns_proxy_ip_count': { }, 'dns_proxy_src_ip_base': { }, 'id': { }, 'dns_proxy_ip_base': { }, 'dns_proxy_src_ip_count': { } }], 'enodeb_mme_sgw6': [{ 'dns': { }, 'plmn': { }, 'ip_allocation_mode': { }, 'mme_ip_address': { }, 'pgw_ip_address': { }, 'ue_address': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'prefix_length': { } }], 'ip6_dns_proxy': [{ 'dns_proxy_ip_count': { }, 'dns_proxy_src_ip_base': { }, 'id': { }, 'dns_proxy_ip_base': { }, 'dns_proxy_src_ip_count': { } }], 'vlan': [{ 'tpid': { }, 'duplicate_mac_address': { }, 'description': { }, 'mtu': { }, 'outer_vlan': { }, 'inner_vlan': { }, 'mac_address': { }, 'default_container': { }, 'id': { } }], 'mme_sgw_pgw': [{ 'ue_info': { }, 'max_sessions': { }, 'lease_address': { }, 'dns': { }, 'plmn': { }, 'ip_address': { }, 'sgw_advertised_sgw': { }, 'sgw_advertised_pgw': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { } }], 'ds_lite_aftr': [{ 'count': { }, 'ip_address': { }, 'ipv6_addr_alloc_mode': { }, 'gateway_ip_address': { }, 'default_container': { }, 'b4_count': { }, 'b4_ip_address': { }, 'id': { }, 'prefix_length': { } }], 'ipsec_router': [{ 'gateway_ip_address': { }, 'netmask': { }, 'ipsec': { }, 'default_container': { }, 'id': { }, 'ip_address': { }, 'ike_peer_ip_address': { } }], 'dhcpv6c_req_opts_cfg': [{ 'dhcpv6v_req_preference': { }, 'dhcpv6v_req_dns_list': { }, 'dhcpv6v_req_dns_resolvers': { }, 'dhcpv6v_req_server_id': { }, 'id': { } }], 'sgsn': [{ 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'ggsn_ip_address': { }, 'id': { }, 'ip_address': { } }], 'path_advanced': [{ 'destination_port_count': { }, 'destination_port_base': { }, 'source_port_base': { }, 'tags': { }, 'enable_external_file': { }, 'source_container': { }, 'source_port_algorithm': { }, 'tuple_limit': { }, 'file': { }, 'destination_port_algorithm': { }, 'destination_container': { }, 'source_port_count': { }, 'xor_bits': { }, 'stream_group': { }, 'id': { } }], 'path_basic': [{ 'source_container': { }, 'destination_container': { }, 'id': { } }], 'enodeb_mme6': [{ 'dns': { }, 'plmn': { }, 'ip_allocation_mode': { }, 'enodebs': { }, 'mme_ip_address': { }, 'pgw_ip_address': { }, 'ue_address': { }, 'gateway_ip_address': { }, 'default_container': { }, 'sgw_ip_address': { }, 'id': { }, 'prefix_length': { } }], 'pgw': [{ 'max_sessions': { }, 'lease_address': { }, 'dns': { }, 'plmn': { }, 'ip_address': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { } }], 'pgw6': [{ 'max_sessions': { }, 'lease_address': { }, 'dns': { }, 'plmn': { }, 'ip_address': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'prefix_length': { } }], 'sgsn6': [{ 'gateway_ip_address': { }, 'default_container': { }, 'ggsn_ip_address': { }, 'id': { }, 'ip_address': { }, 'prefix_length': { } }], 'ip6_static_hosts': [{ 'mpls_list': { }, 'ip_alloc_container': { }, 'ip_selection_type': { }, 'count': { }, 'dns': { }, 'ip_address': { }, 'tags': { }, 'proxy': { }, 'maxmbps_per_host': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'host_ipv6_addr_alloc_mode': { }, 'prefix_length': { }, 'dns_proxy': { }, 'behind_snapt': { }, 'enable_stats': { } }], 'plmn': [{ 'mnc': { }, 'description': { }, 'id': { }, 'mcc': { } }], 'enodeb_mme_sgw': [{ 'dns': { }, 'plmn': { }, 'ip_allocation_mode': { }, 'mme_ip_address': { }, 'pgw_ip_address': { }, 'ue_address': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { } }], 'sgw_pgw': [{ 'max_sessions': { }, 'lease_address': { }, 'dns': { }, 'plmn': { }, 'ip_address': { }, 'sgw_advertised_sgw': { }, 'sgw_advertised_pgw': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'id': { } }], 'ip6_dhcp_server': [{ 'ia_type': { }, 'pool_size': { }, 'ip_address': { }, 'pool_prefix_length': { }, 'offer_lifetime': { }, 'max_lease_time': { }, 'gateway_ip_address': { }, 'default_container': { }, 'pool_base_address': { }, 'default_lease_time': { }, 'pool_dns_address1': { }, 'id': { }, 'prefix_length': { }, 'pool_dns_address2': { } }], 'enodeb6': [{ 'dns': { }, 'plmn': { }, 'sctp_over_udp': { }, 'enodebs': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'prefix_length': { }, 'sctp_sport': { } }], 'slaac_cfg': [{ 'use_rand_addr': { }, 'enable_dad': { }, 'id': { }, 'stateless_dhcpv6c_cfg': { }, 'fallback_ip_address': { } }], 'ip6_external_hosts': [{ 'proxy': { }, 'count': { }, 'id': { }, 'ip_address': { }, 'behind_snapt': { }, 'tags': { } }], 'ip_dns_config': [{ 'dns_domain': { }, 'id': { }, 'dns_server_address': { } }], 'dhcpv6c_tout_and_retr_cfg': [{ 'dhcp6c_inforeq_attempts': { }, 'dhcp6c_initial_rebind_tout': { }, 'dhcp6c_sol_attempts': { }, 'dhcp6c_max_rebind_tout': { }, 'dhcp6c_release_attempts': { }, 'dhcp6c_initial_release_tout': { }, 'dhcp6c_req_attempts': { }, 'dhcp6c_max_req_tout': { }, 'dhcp6c_max_renew_tout': { }, 'dhcp6c_max_sol_tout': { }, 'dhcp6c_initial_req_tout': { }, 'dhcp6c_max_inforeq_tout': { }, 'dhcp6c_initial_sol_tout': { }, 'dhcp6c_initial_renew_tout': { }, 'dhcp6c_initial_inforeq_tout': { }, 'id': { } }], 'ip_dhcp_server': [{ 'lease_address': { }, 'count': { }, 'dns': { }, 'ip_address': { }, 'gateway_ip_address': { }, 'netmask': { }, 'lease_time': { }, 'default_container': { }, 'id': { }, 'accept_local_requests_only': { } }], 'ip6_dns_config': [{ 'dns_domain': { }, 'id': { }, 'dns_server_address': { } }], 'sgw_pgw6': [{ 'max_sessions': { }, 'lease_address': { }, 'dns': { }, 'plmn': { }, 'ip_address': { }, 'sgw_advertised_sgw': { }, 'sgw_advertised_pgw': { }, 'lease_address_v6': { }, 'gateway_ip_address': { }, 'default_container': { }, 'id': { }, 'prefix_length': { } }], 'mpls_settings': [{ 'mpls_tags': { }, 'id': { } }], 'ipsec_config': [{ 'ike_dh': { }, 'ipsec_lifetime': { }, 'ike_pfs': { }, 'ike_mode': { }, 'ike_1to1': { }, 'nat_traversal': { }, 'xauth_username': { }, 'ike_encr_alg': { }, 'psk': { }, 'dpd_enabled': { }, 'dpd_timeout': { }, 'init_rate': { }, 'setup_timeout': { }, 'esp_encr_alg': { }, 'ike_lifetime': { }, 'ike_version': { }, 'id': { }, 'left_id': { }, 'ike_prf_alg': { }, 'esp_auth_alg': { }, 'dpd_delay': { }, 'xauth_password': { }, 'initial_contact': { }, 'debug_log': { }, 'wildcard_tsr': { }, 'rekey_margin': { }, 'ike_auth_alg': { }, 'right_id': { }, 'max_outstanding': { }, 'retrans_interval': { }, 'enable_xauth': { } }], 'dhcpv6c_cfg': [{ 'dhcp6c_max_outstanding': { }, 'dhcp6c_duid_type': { }, 'dhcp6c_ia_type': { }, 'dhcp6c_req_opts_config': { }, 'dhcp6c_tout_and_retr_config': { }, 'dhcp6c_renew_timer': { }, 'dhcp6c_ia_t2': { }, 'id': { }, 'dhcp6c_ia_t1': { }, 'dhcp6c_initial_srate': { } }], 'sixrd_ce': [{ 'sixrd_prefix': { }, 'count': { }, 'dns': { }, 'sixrd_prefix_length': { }, 'ip_address': { }, 'tags': { }, 'br_ip_address': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'hosts_per_ce': { }, 'ip4_mask_length': { }, 'id': { }, 'enable_stats': { } }], 'ip_dhcp_hosts': [{ 'allocation_rate': { }, 'count': { }, 'tags': { }, 'proxy': { }, 'ldap': { }, 'default_container': { }, 'accept_local_offers_only': { }, 'id': { }, 'behind_snapt': { }, 'dns_proxy': { }, 'enable_stats': { } }], 'enodeb_mme': [{ 'dns': { }, 'plmn': { }, 'ip_allocation_mode': { }, 'enodebs': { }, 'mme_ip_address': { }, 'pgw_ip_address': { }, 'ue_address': { }, 'gateway_ip_address': { }, 'netmask': { }, 'default_container': { }, 'sgw_ip_address': { }, 'id': { } }] }, 'createdOn': { }, 'revision': { }, 'lockedBy': { }, 'createdBy': { }, 'name': { }, 'interfaceCount': { }, 'clazz': { }, 'operations': { 'search': [{ }], 'delete': [{ }], 'load': [{ }], 'new': [{ }], 'list': [{ }], 'saveAs': [{ }], 'save': [{ }], 'importNetwork': [{ }] } }, 'testmodel': { 'lastrunby': { }, 'summaryInfo': { 'totalSubnets': { }, 'totalMacAddresses': { }, 'totalUniqueStrikes': { }, 'totalUniqueSuperflows': { }, 'requiredMTU': { } }, 'schemaver': { }, 'author': { }, 'lastrun': { }, 'description': { }, 'label': { }, 'sharedComponentSettings': { 'maximumConcurrentFlows': { }, 'totalAttacks': { }, 'totalBandwidth': { }, 'maxFlowCreationRate': { }, 'totalAddresses': { }, 'samplePeriod': { } }, 'createdOn': { }, 'network': { }, 'revision': { }, 'duration': { }, 'result': { }, 'component': [{ 'schemaver': { }, 'author': { }, 'originalPreset': { }, 'active': { }, 'originalPresetLabel': { }, 'description': { }, 'label': { }, 'type': { }, '@type:liveappsim': { 'app': { 'removeUnknownTcpUdp': { }, 'replace_streams': { }, 'removeUnknownSSL': { }, 'streamsPerSuperflow': { }, 'removedns': { }, 'fidelity': { } }, 'tcp': { 'disable_ack_piggyback': { }, 'delay_acks': { }, 'mss': { }, 'raw_flags': { }, 'psh_every_segment': { }, 'ecn': { }, 'tcp_window_scale': { }, 'initial_receive_window': { }, 'initial_congestion_window': { }, 'reset_at_end': { }, 'dynamic_receive_window_size': { }, 'tcp_connect_delay_ms': { }, 'aging_time_data_type': { }, 'tcp_4_way_close': { }, 'shutdown_data': { }, 'tcp_keepalive_timer': { }, 'aging_time': { }, 'add_timestamps': { }, 'retries': { }, 'handshake_data': { }, 'ack_every_n': { }, 'retry_quantum_ms': { }, 'delay_acks_ms': { } }, 'inflateDeflate': { }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'sessions': { 'openFast': { }, 'closeFast': { }, 'max': { }, 'allocationOverride': { }, 'targetPerSecond': { }, 'target': { }, 'targetMatches': { }, 'maxPerSecond': { }, 'engine': { }, 'statDetail': { }, 'emphasis': { }, 'maxActive': { } }, 'loadprofile': { 'name': { }, 'label': { } }, 'ip': { 'tos': { }, 'ttl': { } }, 'ip6': { 'flowlabel': { }, 'traffic_class': { }, 'hop_limit': { } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'tputscalefactor': { }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'concurrencyscalefactor': { }, 'delayStart': { }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetryMode': { }, 'steady': { } }, 'sfratescalefactor': { }, 'liveProfile': { } }, '@type:layer3advanced': { 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'rate': { }, 'increment': { }, 'type': { }, 'ramptype': { } }, 'bidirectional': { }, 'enableTCP': { }, 'slowStart': { }, 'Templates': { 'TemplateType': { } }, 'slowStartFps': { }, 'duration': { 'disable_nd_probes': { }, 'durationTime': { }, 'durationFrames': { } }, 'enablePerStreamStats': { }, 'tuple_gen_seed': { }, 'payload': { 'data': { }, 'type': { }, 'dataWidth': { } }, 'advancedUDP': { 'lengthVal': { }, 'lengthField': { }, 'checksumVal': { }, 'checksumField': { } }, 'delayStart': { }, 'payloadAdvanced': { 'udfMode': { }, 'udfLength': { }, 'udfDataWidth': { }, 'udfOffset': { } }, 'sizeDist': { 'increment': { }, 'type': { }, 'min': { }, 'rate': { }, 'mixlen2': { }, 'mixweight6': { }, 'mixlen1': { }, 'mixweight7': { }, 'mixlen4': { }, 'mixweight4': { }, 'mixlen3': { }, 'mixweight5': { }, 'mixlen6': { }, 'mixlen5': { }, 'mixlen8': { }, 'mixweight8': { }, 'mixlen7': { }, 'mixweight9': { }, 'mixlen9': { }, 'mixweight2': { }, 'max': { }, 'mixweight3': { }, 'mixweight1': { }, 'mixlen10': { }, 'mixweight10': { }, 'unit': { } }, 'advancedIPv4': { 'lengthVal': { }, 'optionHeaderField': { }, 'optionHeaderData': { }, 'lengthField': { }, 'checksumVal': { }, 'tos': { }, 'checksumField': { }, 'ttl': { } }, 'advancedIPv6': { 'flowLabel': { }, 'lengthVal': { }, 'extensionHeaderField': { }, 'lengthField': { }, 'nextHeader': { }, 'trafficClass': { }, 'extensionHeaderData': { }, 'hopLimit': { } } }, '@type:appsim': { 'app': { 'replace_streams': { }, 'streamsPerSuperflow': { }, 'removedns': { }, 'fidelity': { } }, 'tcp': { 'disable_ack_piggyback': { }, 'delay_acks': { }, 'mss': { }, 'raw_flags': { }, 'psh_every_segment': { }, 'ecn': { }, 'tcp_window_scale': { }, 'initial_receive_window': { }, 'initial_congestion_window': { }, 'reset_at_end': { }, 'dynamic_receive_window_size': { }, 'tcp_connect_delay_ms': { }, 'aging_time_data_type': { }, 'tcp_4_way_close': { }, 'shutdown_data': { }, 'tcp_keepalive_timer': { }, 'aging_time': { }, 'add_timestamps': { }, 'retries': { }, 'handshake_data': { }, 'ack_every_n': { }, 'retry_quantum_ms': { }, 'delay_acks_ms': { } }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'sessions': { 'openFast': { }, 'closeFast': { }, 'max': { }, 'allocationOverride': { }, 'targetPerSecond': { }, 'target': { }, 'targetMatches': { }, 'maxPerSecond': { }, 'engine': { }, 'statDetail': { }, 'emphasis': { }, 'maxActive': { } }, 'loadprofile': { 'name': { }, 'label': { } }, 'profile': { }, 'ip': { 'tos': { }, 'ttl': { } }, 'experimental': { 'tcpSegmentsBurst': { }, 'unify_l4_bufs': { } }, 'ssl': { 'sslReuseType': { }, 'server_record_len': { }, 'client_record_len': { } }, 'ip6': { 'flowlabel': { }, 'traffic_class': { }, 'hop_limit': { } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'delayStart': { }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetryMode': { }, 'steady': { } } }, '@type:security_all': { 'maxConcurrAttacks': { }, 'attackRetries': { }, 'maxPacketsPerSecond': { }, 'attackPlan': { }, 'randomSeed': { }, 'delayStart': { }, 'attackProfile': { }, 'attackPlanIterations': { }, 'attackPlanIterationDelay': { }, 'maxAttacksPerSecond': { } }, '@type:security_np': { 'attackRetries': { }, 'sessions': { 'max': { }, 'maxPerSecond': { } }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'attackPlan': { }, 'randomSeed': { }, 'delayStart': { }, 'attackProfile': { }, 'attackPlanIterations': { }, 'attackPlanIterationDelay': { } }, '@type:layer3': { 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'rate': { }, 'increment': { }, 'type': { }, 'ramptype': { } }, 'bidirectional': { }, 'randomizeIP': { }, 'enableTCP': { }, 'slowStart': { }, 'Templates': { 'TemplateType': { } }, 'srcPort': { }, 'slowStartFps': { }, 'duration': { 'disable_nd_probes': { }, 'durationTime': { }, 'durationFrames': { } }, 'udpSrcPortMode': { }, 'dstPort': { }, 'payload': { 'data': { }, 'type': { }, 'dataWidth': { } }, 'syncIP': { }, 'addrGenMode': { }, 'maxStreams': { }, 'dstPortMask': { }, 'udpDstPortMode': { }, 'advancedUDP': { 'lengthVal': { }, 'lengthField': { }, 'checksumVal': { }, 'checksumField': { } }, 'delayStart': { }, 'payloadAdvanced': { 'udfMode': { }, 'udfLength': { }, 'udfDataWidth': { }, 'udfOffset': { } }, 'sizeDist': { 'increment': { }, 'type': { }, 'min': { }, 'rate': { }, 'mixlen2': { }, 'mixweight6': { }, 'mixlen1': { }, 'mixweight7': { }, 'mixlen4': { }, 'mixweight4': { }, 'mixlen3': { }, 'mixweight5': { }, 'mixlen6': { }, 'mixlen5': { }, 'mixlen8': { }, 'mixweight8': { }, 'mixlen7': { }, 'mixweight9': { }, 'mixlen9': { }, 'mixweight2': { }, 'max': { }, 'mixweight3': { }, 'mixweight1': { }, 'mixlen10': { }, 'mixweight10': { }, 'unit': { } }, 'advancedIPv4': { 'lengthVal': { }, 'optionHeaderField': { }, 'optionHeaderData': { }, 'lengthField': { }, 'checksumVal': { }, 'tos': { }, 'checksumField': { }, 'ttl': { } }, 'srcPortMask': { }, 'advancedIPv6': { 'flowLabel': { }, 'lengthVal': { }, 'extensionHeaderField': { }, 'lengthField': { }, 'nextHeader': { }, 'trafficClass': { }, 'extensionHeaderData': { }, 'hopLimit': { } } }, '@type:layer4': { 'tcp': { 'disable_ack_piggyback': { }, 'delay_acks': { }, 'mss': { }, 'raw_flags': { }, 'psh_every_segment': { }, 'ecn': { }, 'tcp_window_scale': { }, 'initial_receive_window': { }, 'initial_congestion_window': { }, 'reset_at_end': { }, 'dynamic_receive_window_size': { }, 'tcp_connect_delay_ms': { }, 'aging_time_data_type': { }, 'tcp_4_way_close': { }, 'shutdown_data': { }, 'tcp_keepalive_timer': { }, 'aging_time': { }, 'add_timestamps': { }, 'retries': { }, 'handshake_data': { }, 'ack_every_n': { }, 'retry_quantum_ms': { }, 'delay_acks_ms': { } }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'sessions': { 'openFast': { }, 'closeFast': { }, 'max': { }, 'allocationOverride': { }, 'targetPerSecond': { }, 'target': { }, 'targetMatches': { }, 'maxPerSecond': { }, 'engine': { }, 'statDetail': { }, 'emphasis': { }, 'maxActive': { } }, 'loadprofile': { 'name': { }, 'label': { } }, 'ip': { 'tos': { }, 'ttl': { } }, 'ip6': { 'flowlabel': { }, 'traffic_class': { }, 'hop_limit': { } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'delayStart': { }, 'payload': { 'add_timestamp': { }, 'data': { }, 'http_type': { }, 'transport': { }, 'type': { } }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetryMode': { }, 'steady': { } }, 'packetsPerSession': { }, 'payloadSizeDist': { 'min': { }, 'max': { }, 'type': { } }, 'dstPortDist': { 'min': { }, 'max': { }, 'type': { } } }, '@type:playback': { 'tcp': { 'disable_ack_piggyback': { }, 'delay_acks': { }, 'mss': { }, 'raw_flags': { }, 'psh_every_segment': { }, 'ecn': { }, 'tcp_window_scale': { }, 'initial_receive_window': { }, 'initial_congestion_window': { }, 'reset_at_end': { }, 'dynamic_receive_window_size': { }, 'tcp_connect_delay_ms': { }, 'aging_time_data_type': { }, 'tcp_4_way_close': { }, 'shutdown_data': { }, 'tcp_keepalive_timer': { }, 'aging_time': { }, 'add_timestamps': { }, 'retries': { }, 'handshake_data': { }, 'ack_every_n': { }, 'retry_quantum_ms': { }, 'delay_acks_ms': { } }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'sessions': { 'openFast': { }, 'closeFast': { }, 'max': { }, 'allocationOverride': { }, 'targetPerSecond': { }, 'target': { }, 'targetMatches': { }, 'maxPerSecond': { }, 'engine': { }, 'statDetail': { }, 'emphasis': { }, 'maxActive': { } }, 'loadprofile': { 'name': { }, 'label': { } }, 'ip': { 'tos': { }, 'ttl': { } }, 'modification': { 'startpacket': { }, 'originalport': { }, 'newport': { }, 'replay': { }, 'bpfstring': { }, 'single': { }, 'loopcount': { }, 'endpacket': { }, 'independentflows': { }, 'serveripinjection': { } }, 'ip6': { 'flowlabel': { }, 'traffic_class': { }, 'hop_limit': { } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'delayStart': { }, 'file': { }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetryMode': { }, 'steady': { } }, 'behavior': { } }, '@type:layer2': { 'bidirectional': { }, 'maxStreams': { }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'rate': { }, 'increment': { }, 'type': { }, 'ramptype': { } }, 'advanced': { 'ethTypeField': { }, 'ethTypeVal': { } }, 'slowStart': { }, 'slowStartFps': { }, 'duration': { 'disable_nd_probes': { }, 'durationTime': { }, 'durationFrames': { } }, 'delayStart': { }, 'payloadAdvanced': { 'udfMode': { }, 'udfLength': { }, 'udfDataWidth': { }, 'udfOffset': { } }, 'sizeDist': { 'increment': { }, 'type': { }, 'min': { }, 'rate': { }, 'mixlen2': { }, 'mixweight6': { }, 'mixlen1': { }, 'mixweight7': { }, 'mixlen4': { }, 'mixweight4': { }, 'mixlen3': { }, 'mixweight5': { }, 'mixlen6': { }, 'mixlen5': { }, 'mixlen8': { }, 'mixweight8': { }, 'mixlen7': { }, 'mixweight9': { }, 'mixlen9': { }, 'mixweight2': { }, 'max': { }, 'mixweight3': { }, 'mixweight1': { }, 'mixlen10': { }, 'mixweight10': { }, 'unit': { } }, 'payload': { 'data': { }, 'type': { }, 'dataWidth': { } } }, '@type:stackscrambler': { 'tcp': { 'disable_ack_piggyback': { }, 'delay_acks': { }, 'mss': { }, 'raw_flags': { }, 'psh_every_segment': { }, 'ecn': { }, 'tcp_window_scale': { }, 'initial_receive_window': { }, 'initial_congestion_window': { }, 'reset_at_end': { }, 'dynamic_receive_window_size': { }, 'tcp_connect_delay_ms': { }, 'aging_time_data_type': { }, 'tcp_4_way_close': { }, 'shutdown_data': { }, 'tcp_keepalive_timer': { }, 'aging_time': { }, 'add_timestamps': { }, 'retries': { }, 'handshake_data': { }, 'ack_every_n': { }, 'retry_quantum_ms': { }, 'delay_acks_ms': { } }, 'scrambleOptions': { 'maxCorruptions': { }, 'badIPFlags': { }, 'badIPFragOffset': { }, 'badIPLength': { }, 'badUrgentPointer': { }, 'badIPFlowLabel': { }, 'badEthType': { }, 'badTCPOptions': { }, 'badGTPNext': { }, 'handshakeTCP': { }, 'badIPChecksum': { }, 'badSCTPLength': { }, 'badTCPFlags': { }, 'badICMPType': { }, 'badIPTTL': { }, 'badIPProtocol': { }, 'badSCTPFlags': { }, 'badGTPFlags': { }, 'badIPVersion': { }, 'badL4HeaderLength': { }, 'badL4Checksum': { }, 'badIPOptions': { }, 'badSCTPType': { }, 'badSCTPChecksum': { }, 'badGTPNpdu': { }, 'badICMPCode': { }, 'badSCTPVerificationTag': { }, 'badIPTOS': { }, 'badIPTotalLength': { }, 'badGTPLen': { }, 'badGTPType': { }, 'badGTPSeqno': { } }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'sessions': { 'openFast': { }, 'closeFast': { }, 'max': { }, 'allocationOverride': { }, 'targetPerSecond': { }, 'target': { }, 'targetMatches': { }, 'maxPerSecond': { }, 'engine': { }, 'statDetail': { }, 'emphasis': { }, 'maxActive': { } }, 'loadprofile': { 'name': { }, 'label': { } }, 'ip': { 'tos': { }, 'ttl': { } }, 'ip6': { 'flowlabel': { }, 'traffic_class': { }, 'hop_limit': { } }, 'prng': { 'seed': { }, 'offset': { } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'delayStart': { }, 'payload': { 'data': { }, 'transport': { }, 'type': { } }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetryMode': { }, 'steady': { } }, 'payloadSizeDist': { 'min': { }, 'max': { }, 'type': { } }, 'dstPortDist': { 'min': { }, 'max': { }, 'type': { } } }, '@type:clientsim': { 'app': { 'replace_streams': { }, 'streamsPerSuperflow': { }, 'removedns': { }, 'fidelity': { } }, 'tcp': { 'disable_ack_piggyback': { }, 'delay_acks': { }, 'mss': { }, 'raw_flags': { }, 'psh_every_segment': { }, 'ecn': { }, 'tcp_window_scale': { }, 'initial_receive_window': { }, 'initial_congestion_window': { }, 'reset_at_end': { }, 'dynamic_receive_window_size': { }, 'tcp_connect_delay_ms': { }, 'aging_time_data_type': { }, 'tcp_4_way_close': { }, 'shutdown_data': { }, 'tcp_keepalive_timer': { }, 'aging_time': { }, 'add_timestamps': { }, 'retries': { }, 'handshake_data': { }, 'ack_every_n': { }, 'retry_quantum_ms': { }, 'delay_acks_ms': { } }, 'rateDist': { 'unit': { }, 'min': { }, 'max': { }, 'unlimited': { }, 'scope': { }, 'type': { } }, 'sessions': { 'openFast': { }, 'closeFast': { }, 'max': { }, 'allocationOverride': { }, 'targetPerSecond': { }, 'target': { }, 'targetMatches': { }, 'maxPerSecond': { }, 'engine': { }, 'statDetail': { }, 'emphasis': { }, 'maxActive': { } }, 'loadprofile': { 'name': { }, 'label': { } }, 'ip': { 'tos': { }, 'ttl': { } }, 'ssl': { 'sslReuseType': { }, 'server_record_len': { }, 'client_record_len': { } }, 'ip6': { 'flowlabel': { }, 'traffic_class': { }, 'hop_limit': { } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'delayStart': { }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetryMode': { }, 'steady': { } }, 'superflow': { } }, 'createdOn': { }, 'tags': { 'tag': [{ 'id': { }, 'type': { }, 'domainId': { 'name': { }, 'iface': { }, 'external': { } } }] }, 'revision': { }, 'lockedBy': { }, 'createdBy': { }, 'reportResults': { }, 'timeline': { 'timesegment': [{ 'label': { }, 'size': { }, 'type': { } }] }, 'id': { }, 'clazz': { } }], 'lockedBy': { }, 'createdBy': { }, 'name': { }, 'clazz': { }, 'operations': { 'load': [{ }], 'new': [{ }], 'search': [{ }], 'delete': [{ }], 'saveAs': [{ }], 'save': [{ }], 'stopRun': [{ }], 'exportModel': [{ }], 'clone': [{ }], 'add': [{ }], 'realTimeStats': [{ }], 'run': [{ }], 'importModel': [{ }] } }, 'appProfile': { 'schemaver': { }, 'lockedBy': { }, 'createdBy': { }, 'author': { }, 'name': { }, 'superflow': [{ 'percentFlows': { }, 'schemaver': { }, 'seed': { }, 'hosts': [{ 'params': { 'iface': { }, 'hostname': { }, 'ip': { 'type': { } } }, 'id': { } }], 'author': { }, 'estimate_bytes': { }, 'estimate_flows': { }, 'weight': { }, 'description': { }, 'label': { }, 'createdOn': { }, 'revision': { }, 'lockedBy': { }, 'flows': [{ 'singleNP': { }, 'name': { }, 'from': { }, 'label': { }, 'id': { }, 'to': { }, 'params': { }, 'flowcount': { } }], 'generated': { }, 'createdBy': { }, 'percentBandwidth': { }, 'name': { }, 'actions': [{ 'flowlabel': { }, 'gotoBlock': { }, 'exflows': { }, 'matchBlock': { }, 'id': { }, 'source': { }, 'label': { }, 'type': { }, 'params': { }, 'flowid': { } }], 'clazz': { } }], 'description': { }, 'label': { }, 'createdOn': { }, 'clazz': { }, 'revision': { }, 'operations': { 'load': [{ }], 'new': [{ }], 'search': [{ }], 'delete': [{ }], 'add': [{ }], 'saveAs': [{ }], 'save': [{ }], 'remove': [{ }], 'exportAppProfile': [{ }], 'importAppProfile': [{ }] } }, 'topology': { 'ixoslicensed': { }, 'ixos': { }, 'runningTest': [{ 'phase': { }, 'timeRemaining': { }, 'runtime': { }, 'label': { }, 'completed': { }, 'initProgress': { }, 'result': { }, 'port': [{ }], 'capturing': { }, 'progress': { }, 'testid': { }, 'state': { }, 'user': { }, 'currentTest': { } }], 'model': { }, 'slot': [{ 'port': [{ 'owner': { }, 'number': { }, 'note': { }, 'exportProgress': { }, 'reservedBy': { }, 'capturing': { }, 'model': { }, 'id': { }, 'group': { }, 'link': { }, 'state': { }, 'speed': { } }], 'model': { }, 'mode': { }, 'state': { }, 'id': { } }], 'serialNumber': { }, 'operations': { 'reserve': [{ }], 'unreserve': [{ }], 'stopRun': [{ }], 'reboot': [{ }], 'run': [{ }], 'setCardMode': [{ }], 'setCardSpeed': [{ }], 'setCardFanout': [{ }], 'setPerfAcc': [{ }] } }, 'loadProfile': { 'phase': [{ 'duration': { }, 'phaseId': { }, 'type': { }, 'phaseParameters': { 'sessions.max': { }, 'sessions.maxPerSecond': { }, 'rateDist.unit': { }, 'rateDist.min': { }, 'rampDist.steadyBehavior': { }, 'rateDist.type': { }, 'rateDist.scope': { } } }], 'schemaver': { }, 'author': { }, 'regen': { }, 'description': { }, 'label': { }, 'createdOn': { }, 'summaryData': { 'deviceType': { }, 'unknownUdpAppNames': { }, 'unknownSslSuperflowName': { }, 'magicNumber': { }, 'downloadBytesSum': { }, 'version': { }, 'phaseDuration': { }, 'unknownTcpAppNames': { }, 'uploadBytesSum': { }, 'summaryName': { }, 'basisOfRegeneration': { }, 'activeFlowsSum': { }, 'miniSlotDuration': { }, 'unknownSslAppNames': { }, 'dynamicSuperflowName': { }, 'appStat': [{ }], 'startTime': { }, 'endTime': { }, 'dynamicAppNames': { } }, 'revision': { }, 'lockedBy': { }, 'createdBy': { }, 'name': { }, 'clazz': { }, 'presets': [{ 'phase': [{ 'duration': { }, 'phaseId': { }, 'type': { }, 'phaseParameters': { 'sessions.max': { }, 'sessions.maxPerSecond': { }, 'rateDist.unit': { }, 'rateDist.min': { }, 'rampDist.steadyBehavior': { }, 'rateDist.type': { }, 'rateDist.scope': { } } }], 'schemaver': { }, 'author': { }, 'regen': { }, 'description': { }, 'label': { }, 'createdOn': { }, 'summaryData': { 'deviceType': { }, 'unknownUdpAppNames': { }, 'unknownSslSuperflowName': { }, 'magicNumber': { }, 'downloadBytesSum': { }, 'version': { }, 'phaseDuration': { }, 'unknownTcpAppNames': { }, 'uploadBytesSum': { }, 'summaryName': { }, 'basisOfRegeneration': { }, 'activeFlowsSum': { }, 'miniSlotDuration': { }, 'unknownSslAppNames': { }, 'dynamicSuperflowName': { }, 'appStat': [{ }], 'startTime': { }, 'endTime': { }, 'dynamicAppNames': { } }, 'revision': { }, 'lockedBy': { }, 'createdBy': { }, 'name': { }, 'clazz': { } }], 'operations': { 'save': [{ }], 'saveAs': [{ }], 'load': [{ }] } }, 'strikeList': { 'schemaver': { }, 'author': { }, 'description': { }, 'label': { }, 'queryString': { }, 'params': { }, 'createdOn': { }, 'smart': { }, 'revision': { }, 'lockedBy': { }, 'createdBy': { }, 'name': { }, 'clazz': { }, 'numStrikes': { }, 'operations': { 'exportStrikeList': [{ }], 'delete': [{ }], 'saveAs': [{ }], 'save': [{ }], 'importStrikeList': [{ }], 'load': [{ }], 'new': [{ }], 'remove': [{ }], 'search': [{ }], 'add': [{ }] } }, 'superflow': { 'percentFlows': { }, 'schemaver': { }, 'seed': { }, 'hosts': [{ 'params': { 'iface': { }, 'hostname': { }, 'ip': { 'type': { } } }, 'id': { } }], 'author': { }, 'estimate_bytes': { }, 'estimate_flows': { }, 'weight': { }, 'description': { }, 'label': { }, 'createdOn': { }, 'revision': { }, 'lockedBy': { }, 'flows': [{ 'singleNP': { }, 'name': { }, 'from': { }, 'label': { }, 'id': { }, 'to': { }, 'params': { }, 'flowcount': { } }], 'generated': { }, 'createdBy': { }, 'percentBandwidth': { }, 'name': { }, 'actions': [{ 'flowlabel': { }, 'gotoBlock': { }, 'exflows': { }, 'matchBlock': { }, 'id': { }, 'source': { }, 'label': { }, 'type': { }, 'params': { }, 'flowid': { } }], 'clazz': { }, 'operations': { 'load': [{ }], 'new': [{ }], 'removeFlow': [{ }], 'search': [{ }], 'delete': [{ }], 'removeAction': [{ }], 'saveAs': [{ }], 'save': [{ }], 'addFlow': [{ }], 'addAction': [{ }] } }, 'reports': { 'endtime': { }, 'starttime': { }, 'label': { }, 'testname': { }, 'network': { }, 'duration': { }, 'result': { }, 'size': { }, 'isPartOfResiliency': { }, 'name': { }, 'iteration': { }, 'testid': { }, 'user': { }, 'operations': { 'search': [{ }], 'delete': [{ }], 'exportReport': [{ }] } }, 'capture': { 'operations': { 'importCapture': [{ }] } } } @staticmethod def _get_from_model(path): model_data = DataModelMeta._dataModel model_path = "" for path_part in path.split('/'): if len(path_part) == 0: continue if isinstance(model_data, list): model_data = model_data[0] continue if path_part not in model_data: return (None, None) model_data = model_data[path_part] model_path = model_path + "/" + path_part return (model_path, model_data) @staticmethod def _decorate_model_object(obj): (data_model_path, data_model) = DataModelMeta._get_from_model(obj.__data_model_path__()) if data_model is None: return obj if isinstance(data_model, list): setattr(obj, '_getitem_', lambda x: DataModelProxy(wrapper=obj._wrapper, name=str(x), path=obj.__full_path__(), model_path=obj.__data_model_path__())) return obj for key in data_model: if key.startswith("@"): continue if key == 'operations': for operation in data_model[key]: if obj.__full_path__().replace("/", "") == '': continue method_name = data_model_path.replace("/", "_") + '_operations_' + operation setattr(obj, operation, obj._wrapper.__getattribute__(method_name).__get__(obj)) setattr(getattr(obj, operation).__func__, '__name__', operation) setattr(obj, key, DataModelProxy(wrapper=obj._wrapper, name=key, path=obj.__full_path__(), model_path=obj.__data_model_path__())) for key in data_model: if not key.startswith("@") or ":" not in key: continue [fieldName, fieldValue] = key.split(":") fieldName = fieldName.replace("@", "") if obj._wrapper._get(obj.__full_path__()+"/"+fieldName) != fieldValue: continue for extField in data_model[key]: ext_path = obj.__full_path__() ext_dm_path = obj.__data_model_path__() + "/" + key setattr(obj, extField, DataModelProxy(wrapper=obj._wrapper, name=extField, path=ext_path, model_path=ext_dm_path)) print(key) return obj def __call__(cls, *args, **kwds): return DataModelMeta._decorate_model_object(type.__call__(cls, *args, **kwds)) class DataModelProxy(with_metaclass(DataModelMeta, object)): def __init__(self, wrapper, name, path='', model_path=None): self._wrapper = wrapper self._name = name self._path = path if model_path is None: self._model_path = self._path else: self._model_path = model_path def __full_path__(self): return '%s/%s' % (self._path, self._name) def __data_model_path__(self): return '%s/%s' % (self._model_path, self._name) def __url__(self): return 'https://%s/bps/api/v2/core%s' % (self._wrapper.host, self.__full_path__()) def __repr__(self): return 'proxy object for \'%s\' ' % (self.__url__()) def __getitem__(self, item): return self._getitem_(item) def get(self, responseDepth=None, **kwargs): return self._wrapper._get(self._path+'/'+self._name, responseDepth, **kwargs) def patch(self, value): return self._wrapper._patch(self._path+'/'+self._name, value) def set(self, value): return self.patch(value) def put(self, value): return self._wrapper._put(self._path+'/'+self._name, value) def delete(self): return self._wrapper._delete(self._path+'/'+self._name) ''' class DataModelProxy_backup(object, metaclass=DataModelMeta): def __init__(self, wrapper, name, path='', model_path=None): self._wrapper = wrapper self._name = name self._path = path if model_path is None: self._model_path = self._path else: self._model_path = model_path def __full_path__(self): return '%s/%s' % (self._path, self._name) def __data_model_path__(self): return '%s/%s' % (self._model_path, self._name) def __url__(self): return 'https://%s/bps/api/v2/core%s' % (self._wrapper.host, self.__full_path__()) def __repr__(self): return 'proxy object for \'%s\' ' % (self.__url__()) def __getitem__(self, item): return self._getitem_(item) def get(self, responseDepth=None, **kwargs): return self._wrapper._get(self._path+'/'+self._name, responseDepth, **kwargs) def patch(self, value): return self._wrapper._patch(self._path+'/'+self._name, value) def set(self, value): return self.patch(value) def put(self, value): return self._wrapper._put(self._path+'/'+self._name, value) def delete(self): return self._wrapper._delete(self._path+'/'+self._name) '''
37.681371
331
0.372756
12,627
183,659
5.287004
0.072781
0.060037
0.025375
0.042691
0.813568
0.796267
0.776285
0.760287
0.735496
0.711095
0
0.005746
0.511949
183,659
4,873
332
37.689103
0.739042
0.085664
0
0.474258
0
0
0.161823
0.030789
0
0
0
0
0
1
0.021104
false
0.001855
0.005334
0.002551
0.063544
0.002783
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
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
7
9b0a97d8cf24abc9f920f6102e331b133d763d89
170
py
Python
core/schema/__init__.py
Wr490046178/fast-api-frame
1f44bc0a18b819be6d02c3635dc844e7e6383ba0
[ "Apache-2.0" ]
null
null
null
core/schema/__init__.py
Wr490046178/fast-api-frame
1f44bc0a18b819be6d02c3635dc844e7e6383ba0
[ "Apache-2.0" ]
null
null
null
core/schema/__init__.py
Wr490046178/fast-api-frame
1f44bc0a18b819be6d02c3635dc844e7e6383ba0
[ "Apache-2.0" ]
null
null
null
from core.schema.base import DataSchema from core.schema.base import PageSchema from core.schema.base import BaseSchema from core.schema.paginate import paginate_handler
34
49
0.858824
25
170
5.8
0.4
0.22069
0.386207
0.372414
0.496552
0
0
0
0
0
0
0
0.094118
170
4
50
42.5
0.941558
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
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
8
9b0aa0d7c396df4bfbdac9e878c8ae57213df3f0
9,380
py
Python
qa327_test/test_R1.py
HenryTsui1/CISC327
7e9ebeb494568045d6f7b6281d9b78025593ace9
[ "MIT" ]
1
2021-01-09T22:34:02.000Z
2021-01-09T22:34:02.000Z
qa327_test/test_R1.py
HenryTsui1/CISC327
7e9ebeb494568045d6f7b6281d9b78025593ace9
[ "MIT" ]
null
null
null
qa327_test/test_R1.py
HenryTsui1/CISC327
7e9ebeb494568045d6f7b6281d9b78025593ace9
[ "MIT" ]
1
2021-01-09T22:34:13.000Z
2021-01-09T22:34:13.000Z
import pytest from seleniumbase import BaseCase from qa327_test.conftest import base_url from unittest.mock import patch from qa327.models import db, User from werkzeug.security import generate_password_hash, check_password_hash """ Test case for R1 requirements. """ # Moch a sample user test_user = User( email='test@test.com', name='test_user', password=generate_password_hash('Test!!') ) class R1Test(BaseCase): # Test Case R1.1 If the user hasn't logged in, show the login page. def test_R1_1(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.assert_element("#login-header") self.assert_text("Log In", "#login-header") # Test Case R1.2 The login page has a message that by default says 'please login'. def test_R1_2(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.assert_element("#message") self.assert_text("Please Login", "#message") # Test case R1.3 - If the user has logged in, redirect to the user profile page. @patch('qa327.backend.get_user', return_value=test_user) def test_R1_3(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#welcome-header") self.assert_text("Hi" , "#welcome-header") # Test case R1.4 - The login page provides a login form which requests two fields: email and password. @patch('qa327.backend.get_user', return_value=test_user) def test_R1_4(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.assert_element("#email") self.assert_element("#password") # Test case R1.5 - The login form can be submitted as a POST request to the current URL (/login). @patch('qa327.backend.get_user', return_value=test_user) def test_R1_5(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#welcome-header") self.assert_text("Hi" , "#welcome-header") # Test case R1.6.1 - Email and password both cannot be empty. - Positive @patch('qa327.backend.get_user', return_value=test_user) def test_R1_6_1(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#welcome-header") self.assert_text("Hi" , "#welcome-header") # Test case R1.6.2 - Email and password both cannot be empty. - Negative (password is empty) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_6_2(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.click('input[type="submit"]') self.assert_element("#login-header") self.assert_text("Log In", "#login-header") # Test case R1.6.3 - Email and password both cannot be empty. - Negative (username is empty) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_6_3(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#login-header") self.assert_text("Log In", "#login-header") # Test case R1.7.1 - Email has to follow addr-spec defined in RFC 5322. -Postive @patch('qa327.backend.get_user', return_value=test_user) def test_R1_7_1(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#welcome-header") self.assert_text("Hi" , "#welcome-header") # Test case R1.7.2 - Email has to follow addr-spec defined in RFC 5322. -Negative (doesn't follow addr-spec defined) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_7_2(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "asjdh") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password format is incorrect." , "#message") # Test case R1.8.1 - Password has to meet the required complexity: minimum length 6, at least one upper case, at least one lower case, and at least one special character. - Postive @patch('qa327.backend.get_user', return_value=test_user) def test_R1_8_1(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#welcome-header") self.assert_text("Hi" , "#welcome-header") # Test case R1.8.2 - Password has to meet the required complexity: minimum length 6, at least one upper case, at least one lower case, and at least one special character. - Negative (less than 6 characters) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_8_2(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password format is incorrect." , "#message") # Test case R1.8.3 - Password has to meet the required complexity: minimum length 6, at least one upper case, at least one lower case, and at least one special character. - Negative (no upper case letter) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_8_3(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "test!!") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password format is incorrect." , "#message") # Test case R1.8.4 - Password has to meet the required complexity: minimum length 6, at least one upper case, at least one lower case, and at least one special character. - Negative (no lower case letter) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_8_4(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "TEST!!") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password format is incorrect." , "#message") # Test case R1.8.5 - Password has to meet the required complexity: minimum length 6, at least one upper case, at least one lower case, and at least one special character. - Negative (no special character) @patch('qa327.backend.get_user', return_value=test_user) def test_R1_8_5(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Testtt") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password format is incorrect." , "#message") # Test case R1.9 - For any formatting errors, render the login page and show the message 'email/password format is incorrect.'. @patch('qa327.backend.get_user', return_value=test_user) def test_R1_9(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "haskjfh") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password format is incorrect." , "#message") # Test case R1.10 - If email/password are correct, redirect to /. @patch('qa327.backend.get_user', return_value=test_user) def test_R1_10(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!") self.click('input[type="submit"]') self.assert_element("#welcome-header") self.assert_text("Hi" , "#welcome-header") # Test case R1.11 - Otherwise, redict to /login and show message 'email/password combination incorrect'. @patch('qa327.backend.get_user', return_value=test_user) def test_R1_11(self, *_): self.open(base_url + '/logout') self.open(base_url + '/login') self.type("#email", "test@test.com") self.type("#password", "Test!!!!") self.click('input[type="submit"]') self.assert_element("#message") self.assert_text("Email/password combination incorrect." , "#message")
45.31401
210
0.63838
1,297
9,380
4.467232
0.110254
0.044701
0.07456
0.0932
0.825337
0.821194
0.821194
0.811874
0.797722
0.797722
0
0.022393
0.209701
9,380
206
211
45.533981
0.759207
0.23177
0
0.745342
1
0
0.290151
0.049245
0
0
0
0
0.223602
1
0.111801
false
0.149068
0.037267
0
0.15528
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
9
f1b58997b8c16231977949860e94f4fdce68792a
115
py
Python
Python/python_programming_stu/chapter08_function/8-2.default_argument2.py
min9288/Multicampus
2aaac730b35e530f8f91cb1ba41c08ee18d59142
[ "MIT" ]
2
2022-01-18T09:27:42.000Z
2022-03-29T14:59:00.000Z
Python/python_programming_stu/chapter08_function/8-2.default_argument2.py
min9288/Multicampus
2aaac730b35e530f8f91cb1ba41c08ee18d59142
[ "MIT" ]
null
null
null
Python/python_programming_stu/chapter08_function/8-2.default_argument2.py
min9288/Multicampus
2aaac730b35e530f8f91cb1ba41c08ee18d59142
[ "MIT" ]
null
null
null
def daily_sleeping_hours(hours=7): return hours print(daily_sleeping_hours(10)) print(daily_sleeping_hours())
19.166667
34
0.8
17
115
5.058824
0.470588
0.453488
0.627907
0.534884
0
0
0
0
0
0
0
0.028846
0.095652
115
6
35
19.166667
0.798077
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
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
1
0
0
0
1
0
1
0
8
9e2858eec59686bb39266ae089c556f3fd892700
9,249
py
Python
Pycounter converter.py
ChrisHergert/PyCounter-Conversion
de4828209666a920455088f9e9130bc230b7c016
[ "BSD-3-Clause" ]
null
null
null
Pycounter converter.py
ChrisHergert/PyCounter-Conversion
de4828209666a920455088f9e9130bc230b7c016
[ "BSD-3-Clause" ]
null
null
null
Pycounter converter.py
ChrisHergert/PyCounter-Conversion
de4828209666a920455088f9e9130bc230b7c016
[ "BSD-3-Clause" ]
null
null
null
import pycounter.sushi import csv import pandas as pd import datetime import calendar as cal import os def tsv_name_temp(rep, num): return rep+str(num)+'.tsv' ############################################################################################################################################################ def tsv_name_final(rep, num): return rep+str(num)+'.tsv' ############################################################################################################################################################ def print_bar(): '''for formatting test output, print a spacing bar to the console.''' for i in range(200): print('=', end = '') print('=') ############################################################################################################################################################ def emaps_report(year,month,logins, platform_name): '''return a dataframe for the COUNTER-4 'JR1' report, for the given month and year. ---------------------------------------------------------------------------------------- logins --- the 'requests' information (in string form) for the user's account and platform's SUSHI server URL. example: logins = ('https://pubs.acs.org/api/soap/analytics/SushiServices','SUSHI_requestor_ID','SUSHI_customer_ID') platform_name = the string-formatted name of the plaform you want to pull down from. 'Alexander Street Press' ''' #initialize date range, temporary report name(tsv_name_temp) date_range = (datetime.date(year,month,1), datetime.date(year,month,cal.monthrange(year,month)[1])) #use cal.monthrange to get numerical final day of month. temp_tsv = platform_name + '_counter_report_temp' + str(397) + '.tsv' final_tsv = platform_name + '_counter_report_final' + str(937) + '.tsv' #Use pycounter/SUSHI to pull report in XML form, and convert to unicode data. report = pycounter.sushi.get_report(wsdl_url = logins[0],start_date = date_range[0], end_date = date_range[1],requestor_id = logins[1], customer_reference = logins[2],release = 4) # report.write_tsv(temp_tsv) #write TSV to tsv_rep_name #open the written tsv in read-mode, open the new tsv to be written to(tsv_name_final) with open(temp_tsv,'r', encoding = 'utf-8') as f, open(final_tsv,'w', encoding = 'utf-8') as f1: for i in range(7): #skip the first 7 lines and then write the rest out to the final file next(f) for line in f: #write the remaining lines out to f1, the ofstream f1.write(line) os.remove(temp_tsv) #Delete the temp tsv. ret = pd.read_csv(final_tsv, sep = '\t') #now read the new tsv into a dataframe return ret ############################################################################################################################################################ def emaps_DB1_report(year,month,logins, platform_name): ''' return a dataframe for the COUNTER-4 'DB1' report, for the given month and year. ---------------------------------------------------------------------------------------- logins --- the 'requests' information (in string form) for the user's account and platform's SUSHI server URL. example: logins = ('https://pubs.acs.org/api/soap/analytics/SushiServices','SUSHI_requestor_ID','SUSHI_customer_ID') platform_name = the string-formatted name of the plaform you want to pull down from. example: "American Chemical Society" would be 'ACS', but long-form names also work. ''' #initialize date range, temporary report name(tsv_name_temp) date_range = (datetime.date(year,month,1), datetime.date(year,month,cal.monthrange(year,month)[1])) #use cal.monthrange to get numerical final day of month. temp_tsv = platform_name + '_counter_report_temp' + str(397) + '.tsv' final_tsv = platform_name + '_counter_report_final' + str(937) + '.tsv' #Use pycounter/SUSHI to pull report report = pycounter.sushi.get_report(wsdl_url = logins[0],start_date = date_range[0], end_date = date_range[1],requestor_id = logins[1], customer_reference = logins[2],report = "DB1", release = 4) # report.write_tsv(temp_tsv) #write TSV to tsv_rep_name #open the written tsv in read-mode, open the new tsv to be written to(tsv_name_final) with open(temp_tsv,'r', encoding = 'utf-8') as f, open(final_tsv,'w', encoding = 'utf-8') as f1: for i in range(7): #skip the first 7 lines and then write the rest out to the final file next(f) for line in f: #write the remaining lines out to f1, the ofstream f1.write(line) os.remove(temp_tsv) #Delete the temp tsv. ret = pd.read_csv(final_tsv, sep = '\t') #now read the new tsv into a dataframe return ret ############################################################################################################################################################ def over_time_report(year1,month1,year2,month2,logins, platform_name): ''' return a dataframe for the COUNTER-4 'JR1' report, from year1,month1 to year2,month2. ---------------------------------------------------------------------------------------- logins --- the 'requests' information (in string form) for the user's account and platform's SUSHI server URL. example: logins = ('https://pubs.acs.org/api/soap/analytics/SushiServices','SUSHI_requestor_ID','SUSHI_customer_ID') platform_name = the string-formatted name of the plaform you want to pull down from. example: "American Chemical Society" would be 'ACS', but long-form names also work. year1 - the start year for the report, e.g. 2016 year2 - the end year of the report, e.g. 2019 month1 - the numerical first month to include in the report, e.g. March = 3, November = 11 month1 - the numerical last month to include in the report, e.g. April = 4 = 3, October = 10 ''' #initialize date range, temporary report name(tsv_name_temp) date_range = ( datetime.date(year1, month1, 1 ), datetime.date(year2, month2, cal.monthrange(year2,month2)[1] ) ) temp_tsv = platform_name + 'COUNTERrep_temp' + 'mppltr76706' + '.tsv' final_tsv = platform_name + '_OverTime_final' + str(937) + '.tsv' #Use pycounter/SUSHI to pull report in XML form report = pycounter.sushi.get_report(wsdl_url = logins[0],start_date = date_range[0], end_date = date_range[1],requestor_id = logins[1], customer_reference = logins[2],release = 4) # report.write_tsv(temp_tsv) #write TSV to tsv_rep_name #open the written tsv in read-mode, open the new tsv to be written to(tsv_name_final) with open(temp_tsv,'r', encoding = 'utf-8') as f, open(final_tsv,'w', encoding = 'utf-8') as f1: for i in range(7): #skip the first 7 lines and then write the rest out to the final file next(f) for line in f: #write the remaining lines out to f1, the ofstream f1.write(line) os.remove(temp_tsv) #Delete the temp tsv. ret = pd.read_csv(final_tsv, sep = '\t') #now read the new tsv into a dataframe return ret ############################################################################################################################################################ def over_time_DB1_report(year1,month1,year2,month2,logins, platform_name): ''' Return a dataframe for the COUNTER-4 'DB1' report, from year1,month1 to year2,month2. ---------------------------------------------------------------------------------------- logins --- the 'requests' information (in string form) for the user's account and platform's SUSHI server URL. example: logins = ('https://pubs.acs.org/api/soap/analytics/SushiServices','SUSHI_requestor_ID','SUSHI_customer_ID') platform_name = the string-formatted name of the plaform you want to pull down from. example: "American Chemical Society" would be 'ACS', but long-form names also work. year1 - the start year for the report, e.g. 2016 year2 - the end year of the report, e.g. 2019 month1 - the numerical first month to include in the report, e.g. March = 3, November = 11 month1 - the numerical last month to include in the report, e.g. April = 4 = 3, October = 10 ''' #initialize date range, temporary report name(tsv_name_temp) date_range = ( datetime.date(year1, month1, 1 ), datetime.date(year2, month2, cal.monthrange(year2,month2)[1] ) ) temp_tsv = platform_name + 'COUNTERrep_temp' + 'mppltr76706' + '.tsv' final_tsv = platform_name + '_OverTime_final' + str(937) + '.tsv' #Use pycounter/SUSHI to pull report report = pycounter.sushi.get_report(wsdl_url = logins[0],start_date = date_range[0], end_date = date_range[1],requestor_id = logins[1], customer_reference = logins[2],report = "DB1", release = 4) # report.write_tsv(temp_tsv) #write TSV to tsv_rep_name #open the written tsv in read-mode, open the new tsv to be written to(tsv_name_final) with open(temp_tsv,'r', encoding = 'utf-8') as f, open(final_tsv,'w', encoding = 'utf-8') as f1: for i in range(7): #skip the first 7 lines and then write the rest out to the final file next(f) for line in f: #write the remaining lines out to f1, the ofstream f1.write(line) os.remove(temp_tsv) #Delete the temp tsv. ret = pd.read_csv(final_tsv, sep = '\t') #now read the new tsv into a dataframe return ret
61.251656
158
0.611309
1,302
9,249
4.22043
0.128264
0.025478
0.021838
0.020382
0.952684
0.952684
0.952684
0.952684
0.942857
0.942857
0
0.021597
0.153963
9,249
150
159
61.66
0.680639
0.180776
0
0.794872
0
0
0.075685
0.011861
0
0
0
0
0
0
null
null
0
0.076923
null
null
0.038462
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
0
0
0
8
9e82a60fce1ee23ae4a633b04becacc36af4be18
375
py
Python
tests/exceptions/test_unexpected_input_exception.py
AustinScola/illud
a6aca1de38bbe9d5a795aaa084bcbd6731767d18
[ "MIT" ]
1
2020-12-05T00:59:15.000Z
2020-12-05T00:59:15.000Z
tests/exceptions/test_unexpected_input_exception.py
AustinScola/illud
a6aca1de38bbe9d5a795aaa084bcbd6731767d18
[ "MIT" ]
112
2021-01-15T21:42:27.000Z
2021-04-17T19:11:21.000Z
tests/exceptions/test_unexpected_input_exception.py
AustinScola/illud
a6aca1de38bbe9d5a795aaa084bcbd6731767d18
[ "MIT" ]
null
null
null
"""Test illud.exceptions.unexpected_input_exception.""" from illud.exception import IlludException from illud.exceptions.unexpected_input_exception import UnexpectedInputException def test_inheritance() -> None: """Test illud.exceptions.unexpected_input_exception.UnexpectedInputException inheritance.""" assert issubclass(UnexpectedInputException, IlludException)
41.666667
96
0.84
35
375
8.8
0.428571
0.146104
0.243506
0.292208
0.405844
0.279221
0
0
0
0
0
0
0.08
375
8
97
46.875
0.892754
0.362667
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
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
1
0
1
0
1
0
0
7
9e861a9c216e4538894474e086d12ad53d9c6fbc
10,972
py
Python
tests/test_plantequipmentoperationoutdoordewpoint.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
19
2015-12-08T23:33:51.000Z
2022-01-31T04:41:10.000Z
tests/test_plantequipmentoperationoutdoordewpoint.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
2
2019-10-04T10:57:00.000Z
2021-10-01T06:46:17.000Z
tests/test_plantequipmentoperationoutdoordewpoint.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
7
2015-11-04T02:25:01.000Z
2021-12-08T03:14:28.000Z
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.plant import PlantEquipmentOperationOutdoorDewpoint log = logging.getLogger(__name__) class TestPlantEquipmentOperationOutdoorDewpoint(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.mkstemp() def tearDown(self): os.remove(self.path) def test_create_plantequipmentoperationoutdoordewpoint(self): pyidf.validation_level = ValidationLevel.error obj = PlantEquipmentOperationOutdoorDewpoint() # alpha var_name = "Name" obj.name = var_name # real var_dewpoint_temperature_range_1_lower_limit = 0.0 obj.dewpoint_temperature_range_1_lower_limit = var_dewpoint_temperature_range_1_lower_limit # real var_dewpoint_temperature_range_1_upper_limit = 0.0 obj.dewpoint_temperature_range_1_upper_limit = var_dewpoint_temperature_range_1_upper_limit # object-list var_range_1_equipment_list_name = "object-list|Range 1 Equipment List Name" obj.range_1_equipment_list_name = var_range_1_equipment_list_name # real var_dewpoint_temperature_range_2_lower_limit = 0.0 obj.dewpoint_temperature_range_2_lower_limit = var_dewpoint_temperature_range_2_lower_limit # real var_dewpoint_temperature_range_2_upper_limit = 0.0 obj.dewpoint_temperature_range_2_upper_limit = var_dewpoint_temperature_range_2_upper_limit # object-list var_range_2_equipment_list_name = "object-list|Range 2 Equipment List Name" obj.range_2_equipment_list_name = var_range_2_equipment_list_name # real var_dewpoint_temperature_range_3_lower_limit = 0.0 obj.dewpoint_temperature_range_3_lower_limit = var_dewpoint_temperature_range_3_lower_limit # real var_dewpoint_temperature_range_3_upper_limit = 0.0 obj.dewpoint_temperature_range_3_upper_limit = var_dewpoint_temperature_range_3_upper_limit # object-list var_range_3_equipment_list_name = "object-list|Range 3 Equipment List Name" obj.range_3_equipment_list_name = var_range_3_equipment_list_name # real var_dewpoint_temperature_range_4_lower_limit = 0.0 obj.dewpoint_temperature_range_4_lower_limit = var_dewpoint_temperature_range_4_lower_limit # real var_dewpoint_temperature_range_4_upper_limit = 0.0 obj.dewpoint_temperature_range_4_upper_limit = var_dewpoint_temperature_range_4_upper_limit # object-list var_range_4_equipment_list_name = "object-list|Range 4 Equipment List Name" obj.range_4_equipment_list_name = var_range_4_equipment_list_name # real var_dewpoint_temperature_range_5_lower_limit = 0.0 obj.dewpoint_temperature_range_5_lower_limit = var_dewpoint_temperature_range_5_lower_limit # real var_dewpoint_temperature_range_5_upper_limit = 0.0 obj.dewpoint_temperature_range_5_upper_limit = var_dewpoint_temperature_range_5_upper_limit # object-list var_range_5_equipment_list_name = "object-list|Range 5 Equipment List Name" obj.range_5_equipment_list_name = var_range_5_equipment_list_name # real var_dewpoint_temperature_range_6_lower_limit = 0.0 obj.dewpoint_temperature_range_6_lower_limit = var_dewpoint_temperature_range_6_lower_limit # real var_dewpoint_temperature_range_6_upper_limit = 0.0 obj.dewpoint_temperature_range_6_upper_limit = var_dewpoint_temperature_range_6_upper_limit # object-list var_range_6_equipment_list_name = "object-list|Range 6 Equipment List Name" obj.range_6_equipment_list_name = var_range_6_equipment_list_name # real var_dewpoint_temperature_range_7_lower_limit = 0.0 obj.dewpoint_temperature_range_7_lower_limit = var_dewpoint_temperature_range_7_lower_limit # real var_dewpoint_temperature_range_7_upper_limit = 0.0 obj.dewpoint_temperature_range_7_upper_limit = var_dewpoint_temperature_range_7_upper_limit # object-list var_range_7_equipment_list_name = "object-list|Range 7 Equipment List Name" obj.range_7_equipment_list_name = var_range_7_equipment_list_name # real var_dewpoint_temperature_range_8_lower_limit = 0.0 obj.dewpoint_temperature_range_8_lower_limit = var_dewpoint_temperature_range_8_lower_limit # real var_dewpoint_temperature_range_8_upper_limit = 0.0 obj.dewpoint_temperature_range_8_upper_limit = var_dewpoint_temperature_range_8_upper_limit # object-list var_range_8_equipment_list_name = "object-list|Range 8 Equipment List Name" obj.range_8_equipment_list_name = var_range_8_equipment_list_name # real var_dewpoint_temperature_range_9_lower_limit = 0.0 obj.dewpoint_temperature_range_9_lower_limit = var_dewpoint_temperature_range_9_lower_limit # real var_dewpoint_temperature_range_9_upper_limit = 0.0 obj.dewpoint_temperature_range_9_upper_limit = var_dewpoint_temperature_range_9_upper_limit # object-list var_range_9_equipment_list_name = "object-list|Range 9 Equipment List Name" obj.range_9_equipment_list_name = var_range_9_equipment_list_name # real var_dewpoint_temperature_range_10_lower_limit = 0.0 obj.dewpoint_temperature_range_10_lower_limit = var_dewpoint_temperature_range_10_lower_limit # real var_dewpoint_temperature_range_10_upper_limit = 0.0 obj.dewpoint_temperature_range_10_upper_limit = var_dewpoint_temperature_range_10_upper_limit # object-list var_range_10_equipment_list_name = "object-list|Range 10 Equipment List Name" obj.range_10_equipment_list_name = var_range_10_equipment_list_name idf = IDF() idf.add(obj) idf.save(self.path, check=False) with open(self.path, mode='r') as f: for line in f: log.debug(line.strip()) idf2 = IDF(self.path) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].name, var_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_1_lower_limit, var_dewpoint_temperature_range_1_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_1_upper_limit, var_dewpoint_temperature_range_1_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_1_equipment_list_name, var_range_1_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_2_lower_limit, var_dewpoint_temperature_range_2_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_2_upper_limit, var_dewpoint_temperature_range_2_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_2_equipment_list_name, var_range_2_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_3_lower_limit, var_dewpoint_temperature_range_3_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_3_upper_limit, var_dewpoint_temperature_range_3_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_3_equipment_list_name, var_range_3_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_4_lower_limit, var_dewpoint_temperature_range_4_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_4_upper_limit, var_dewpoint_temperature_range_4_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_4_equipment_list_name, var_range_4_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_5_lower_limit, var_dewpoint_temperature_range_5_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_5_upper_limit, var_dewpoint_temperature_range_5_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_5_equipment_list_name, var_range_5_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_6_lower_limit, var_dewpoint_temperature_range_6_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_6_upper_limit, var_dewpoint_temperature_range_6_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_6_equipment_list_name, var_range_6_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_7_lower_limit, var_dewpoint_temperature_range_7_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_7_upper_limit, var_dewpoint_temperature_range_7_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_7_equipment_list_name, var_range_7_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_8_lower_limit, var_dewpoint_temperature_range_8_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_8_upper_limit, var_dewpoint_temperature_range_8_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_8_equipment_list_name, var_range_8_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_9_lower_limit, var_dewpoint_temperature_range_9_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_9_upper_limit, var_dewpoint_temperature_range_9_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_9_equipment_list_name, var_range_9_equipment_list_name) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_10_lower_limit, var_dewpoint_temperature_range_10_lower_limit) self.assertAlmostEqual(idf2.plantequipmentoperationoutdoordewpoints[0].dewpoint_temperature_range_10_upper_limit, var_dewpoint_temperature_range_10_upper_limit) self.assertEqual(idf2.plantequipmentoperationoutdoordewpoints[0].range_10_equipment_list_name, var_range_10_equipment_list_name)
69.443038
168
0.814346
1,377
10,972
5.907771
0.053014
0.233559
0.295022
0.19914
0.925999
0.892809
0.82901
0.78488
0.64118
0.632698
0
0.029536
0.139081
10,972
158
169
69.443038
0.831675
0.020507
0
0
0
0
0.036954
0
0
0
0
0
0.264957
1
0.025641
false
0
0.068376
0
0.102564
0
0
0
0
null
1
1
1
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
7b5629e5c725713f6b93647d919651644e7f9927
126
py
Python
test/integration_test/utils.py
benny568/cloudca
6d3e3ec0cf71defac07cf1b0f957885f2e83599c
[ "MIT" ]
null
null
null
test/integration_test/utils.py
benny568/cloudca
6d3e3ec0cf71defac07cf1b0f957885f2e83599c
[ "MIT" ]
10
2022-02-11T15:28:20.000Z
2022-03-30T15:44:32.000Z
test/integration_test/utils.py
benny568/cloudca
6d3e3ec0cf71defac07cf1b0f957885f2e83599c
[ "MIT" ]
null
null
null
def get_api_url(resource, route): return f"https://afgh9u0ae9.execute-api.us-east-1.amazonaws.com/dev/{resource}/{route}"
42
91
0.746032
20
126
4.6
0.85
0.282609
0
0
0
0
0
0
0
0
0
0.034188
0.071429
126
2
92
63
0.752137
0
0
0
0
0.5
0.611111
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
8
7bafc0b0a23c29e6bd492a0366ff182ed2874e53
185
py
Python
scripts/simplejob.py
adeoke/kubebernetes_cron_job
3e56686d275cd77f48b5af5850f373951e4e84c9
[ "MIT" ]
null
null
null
scripts/simplejob.py
adeoke/kubebernetes_cron_job
3e56686d275cd77f48b5af5850f373951e4e84c9
[ "MIT" ]
null
null
null
scripts/simplejob.py
adeoke/kubebernetes_cron_job
3e56686d275cd77f48b5af5850f373951e4e84c9
[ "MIT" ]
null
null
null
from datetime import datetime import time print("starting job: {}".format(datetime.now())) print("Doing stuff......") time.sleep(30) print("stopping job: {}".format(datetime.now()))
18.5
48
0.691892
24
185
5.333333
0.583333
0.21875
0.265625
0.3125
0
0
0
0
0
0
0
0.011976
0.097297
185
9
49
20.555556
0.754491
0
0
0
0
0
0.266304
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
1
0
1
0
0
1
0
8
c88fabe8b07ea99440addee2da3c7f93933c6f15
7,454
py
Python
savu/plugins/unregistered/ptychography/ptypy_compact_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
39
2015-03-30T14:03:42.000Z
2022-03-16T16:50:33.000Z
savu/plugins/unregistered/ptychography/ptypy_compact_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
670
2015-02-11T11:08:09.000Z
2022-03-21T09:27:57.000Z
savu/plugins/unregistered/ptychography/ptypy_compact_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
54
2015-02-13T14:09:52.000Z
2022-01-24T13:57:09.000Z
from savu.plugins.plugin_tools import PluginTools class PtypyCompactTools(PluginTools): """This plugin performs ptychography using the ptypy package. """ def define_parameters(self): """ data_center: visibility: intermediate dtype: [list[float], str, None] description: 'Center (pixel) of the optical axes in raw data' default: None data_orientation: visibility: intermediate dtype: [list,None] description: See online documentation default: None data_auto_center: visibility: intermediate dtype: bool description: See online documentation default: True geometry_shape: visibility: intermediate dtype: int description: See online documentation default: 128 illumination_photons: visibility: intermediate dtype: [None,list] description: See online documentation default: None illumination_diversity_noise: visibility: intermediate dtype: [None,float] description: See online documentation default: None illumination_diversity_power: visibility: intermediate dtype: int description: See online documentation default: 0.1 illumination_diversity_shift: visibility: intermediate dtype: [None,float] description: See online documentation default: None sample_model: visibility: intermediate dtype: [None,str] description: See online documentation default: None sample_fill: visibility: intermediate dtype: int description: See online documentation default: 1 sample_diversity_noise: visibility: intermediate dtype: [None,float] description: See online documentation default: None sample_diversity_power: visibility: intermediate dtype: float description: See online documentation default: 0.1 sample_diversity_shift: visibility: intermediate dtype: [None,float] description: See online documentation default: None coherence_num_probe_modes: visibility: intermediate dtype: int description: See online documentation default: 1 coherence_num_object_modes: visibility: intermediate dtype: int description: See online documentation default: 1 coherence_spectrum: visibility: intermediate dtype: [None,list] description: See online documentation default: None coherence_object_dispersion: visibility: intermediate dtype: [None,float] description: See online documentation default: None coherence_probe_dispersion: visibility: intermediate dtype: [None,float] description: See online documentation default: None common_numiter_contiguous: visibility: intermediate dtype: int description: See online documentation default: 1 common_probe_support: visibility: intermediate dtype: float description: See online documentation default: 0.7 common_clip_object: visibility: intermediate dtype: [None,list] description: See online documentation default: None DM_num_iter: visibility: intermediate dtype: int description: See online documentation default: 30 DM_alpha: visibility: intermediate dtype: int description: See online documentation default: 1 DM_probe_update_start: visibility: intermediate dtype: int description: See online documentation default: 2 DM_update_object_first: visibility: intermediate dtype: bool description: See online documentation default: True DM_overlap_converge_factor: visibility: intermediate dtype: float description: See online documentation default: 0.05 DM_overlap_max_iterations: visibility: intermediate dtype: int description: See online documentation default: 10 DM_probe_inertia: visibility: intermediate dtype: float description: See online documentation default: 0.001 DM_object_inertia: visibility: intermediate dtype: float description: See online documentation default: 0.1 DM_fourier_relax_factor: visibility: intermediate dtype: float description: See online documentation default: 0.01 DM_obj_smooth_std: visibility: intermediate dtype: int description: See online documentation default: 20 ML_num_iter: visibility: intermediate dtype: int description: See online documentation default: 5 ML_type: visibility: intermediate dtype: str description: See online documentation default: 'gaussian' ML_floating_intensities: visibility: intermediate dtype: bool description: See online documentation default: False ML_intensity_renormalization: visibility: intermediate dtype: int description: See online documentation default: 1 ML_reg_del2: visibility: intermediate dtype: bool description: See online documentation default: True ML_reg_del2_amplitude: visibility: intermediate dtype: float description: See online documentation default: 0.01 ML_smooth_gradient: visibility: intermediate dtype: int description: See online documentation default: 0 ML_scale_precond: visibility: intermediate dtype: bool description: See online documentation default: False ML_scale_probe_object: visibility: intermediate dtype: int description: See online documentation default: 1 ML_probe_update_start: visibility: intermediate dtype: int description: See online documentation default: 0 """
34.831776
75
0.542528
585
7,454
6.765812
0.189744
0.227893
0.279687
0.333502
0.797625
0.792825
0.770086
0.754927
0.746589
0.693532
0
0.009947
0.420043
7,454
214
76
34.831776
0.905621
0.758921
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
11
c8cce4fb7abccc2418492889a554f229dec1790b
15,252
py
Python
tests/tasks/kubernetes/test_job.py
nathaniel-md/prefect
467bc5b1dcd83716bd896eff549f6bceb59da8cf
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/tasks/kubernetes/test_job.py
nathaniel-md/prefect
467bc5b1dcd83716bd896eff549f6bceb59da8cf
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/tasks/kubernetes/test_job.py
nathaniel-md/prefect
467bc5b1dcd83716bd896eff549f6bceb59da8cf
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from unittest.mock import MagicMock import pytest import prefect from prefect.tasks.kubernetes import ( CreateNamespacedJob, DeleteNamespacedJob, ListNamespacedJob, PatchNamespacedJob, ReadNamespacedJob, ReplaceNamespacedJob, ) from prefect.utilities.configuration import set_temporary_config @pytest.fixture def kube_secret(): with set_temporary_config({"cloud.use_local_secrets": True}): with prefect.context(secrets=dict(KUBERNETES_API_KEY="test_key")): yield @pytest.fixture def api_client(monkeypatch): client = MagicMock() monkeypatch.setattr( "prefect.tasks.kubernetes.job.get_kubernetes_client", MagicMock(return_value=client), ) return client class TestCreateNamespacedJobTask: def test_empty_initialization(self, kube_secret): task = CreateNamespacedJob() assert task.body == {} assert task.namespace == "default" assert task.kube_kwargs == {} assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY" def test_filled_initialization(self, kube_secret): task = CreateNamespacedJob( body={"test": "test"}, namespace="test", kube_kwargs={"test": "test"}, kubernetes_api_key_secret="test", ) assert task.body == {"test": "test"} assert task.namespace == "test" assert task.kube_kwargs == {"test": "test"} assert task.kubernetes_api_key_secret == "test" def test_empty_body_raises_error(self, kube_secret): task = CreateNamespacedJob() with pytest.raises(ValueError): task.run() def test_invalid_body_raises_error(self, kube_secret): task = CreateNamespacedJob() with pytest.raises(ValueError): task.run(body=None) def test_body_value_is_replaced(self, kube_secret, api_client): task = CreateNamespacedJob(body={"test": "a"}) task.run(body={"test": "b"}) assert api_client.create_namespaced_job.call_args[1]["body"] == {"test": "b"} def test_body_value_is_appended(self, kube_secret, api_client): task = CreateNamespacedJob(body={"test": "a"}) task.run(body={"a": "test"}) assert api_client.create_namespaced_job.call_args[1]["body"] == { "a": "test", "test": "a", } def test_empty_body_value_is_updated(self, kube_secret, api_client): task = CreateNamespacedJob() task.run(body={"test": "a"}) assert api_client.create_namespaced_job.call_args[1]["body"] == {"test": "a"} def test_kube_kwargs_value_is_replaced(self, kube_secret, api_client): task = CreateNamespacedJob(body={"test": "a"}, kube_kwargs={"test": "a"}) task.run(kube_kwargs={"test": "b"}) assert api_client.create_namespaced_job.call_args[1]["test"] == "b" def test_kube_kwargs_value_is_appended(self, kube_secret, api_client): task = CreateNamespacedJob(body={"test": "a"}, kube_kwargs={"test": "a"}) task.run(kube_kwargs={"a": "test"}) assert api_client.create_namespaced_job.call_args[1]["a"] == "test" assert api_client.create_namespaced_job.call_args[1]["test"] == "a" def test_empty_kube_kwargs_value_is_updated(self, kube_secret, api_client): task = CreateNamespacedJob(body={"test": "a"}) task.run(kube_kwargs={"test": "a"}) assert api_client.create_namespaced_job.call_args[1]["test"] == "a" class TestDeleteNamespacedJobTask: def test_empty_initialization(self, kube_secret): task = DeleteNamespacedJob() assert not task.job_name assert task.namespace == "default" assert task.kube_kwargs == {} assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY" def test_filled_initialization(self, kube_secret): task = DeleteNamespacedJob( job_name="test", namespace="test", kube_kwargs={"test": "test"}, kubernetes_api_key_secret="test", ) assert task.job_name == "test" assert task.namespace == "test" assert task.kube_kwargs == {"test": "test"} assert task.kubernetes_api_key_secret == "test" def test_empty_name_raises_error(self, kube_secret): task = DeleteNamespacedJob() with pytest.raises(ValueError): task.run() def test_invalid_body_raises_error(self, kube_secret): task = DeleteNamespacedJob() with pytest.raises(ValueError): task.run(job_name=None) def test_kube_kwargs_value_is_replaced(self, kube_secret, api_client): task = DeleteNamespacedJob(job_name="test", kube_kwargs={"test": "a"}) task.run(kube_kwargs={"test": "b"}) assert api_client.delete_namespaced_job.call_args[1]["test"] == "b" def test_kube_kwargs_value_is_appended(self, kube_secret, api_client): task = DeleteNamespacedJob(job_name="test", kube_kwargs={"test": "a"}) task.run(kube_kwargs={"a": "test"}) assert api_client.delete_namespaced_job.call_args[1]["a"] == "test" assert api_client.delete_namespaced_job.call_args[1]["test"] == "a" def test_empty_kube_kwargs_value_is_updated(self, kube_secret, api_client): task = DeleteNamespacedJob(job_name="test") task.run(kube_kwargs={"test": "a"}) assert api_client.delete_namespaced_job.call_args[1]["test"] == "a" class TestListNamespacedJobTask: def test_empty_initialization(self, kube_secret): task = ListNamespacedJob() assert task.namespace == "default" assert task.kube_kwargs == {} assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY" def test_filled_initialization(self, kube_secret): task = ListNamespacedJob( namespace="test", kube_kwargs={"test": "test"}, kubernetes_api_key_secret="test", ) assert task.namespace == "test" assert task.kube_kwargs == {"test": "test"} assert task.kubernetes_api_key_secret == "test" def test_kube_kwargs_value_is_replaced(self, kube_secret, api_client): task = ListNamespacedJob(kube_kwargs={"test": "a"}) task.run(kube_kwargs={"test": "b"}) assert api_client.list_namespaced_job.call_args[1]["test"] == "b" def test_kube_kwargs_value_is_appended(self, kube_secret, api_client): task = ListNamespacedJob(kube_kwargs={"test": "a"}) task.run(kube_kwargs={"a": "test"}) assert api_client.list_namespaced_job.call_args[1]["a"] == "test" assert api_client.list_namespaced_job.call_args[1]["test"] == "a" def test_empty_kube_kwargs_value_is_updated(self, kube_secret, api_client): task = ListNamespacedJob() task.run(kube_kwargs={"test": "a"}) assert api_client.list_namespaced_job.call_args[1]["test"] == "a" class TestPatchNamespacedJobTask: def test_empty_initialization(self, kube_secret): task = PatchNamespacedJob() assert not task.job_name assert task.body == {} assert task.namespace == "default" assert task.kube_kwargs == {} assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY" def test_filled_initialization(self, kube_secret): task = PatchNamespacedJob( job_name="test", body={"test": "test"}, namespace="test", kube_kwargs={"test": "test"}, kubernetes_api_key_secret="test", ) assert task.job_name == "test" assert task.body == {"test": "test"} assert task.namespace == "test" assert task.kube_kwargs == {"test": "test"} assert task.kubernetes_api_key_secret == "test" def test_empty_body_raises_error(self, kube_secret): task = PatchNamespacedJob() with pytest.raises(ValueError): task.run() def test_invalid_body_raises_error(self, kube_secret): task = PatchNamespacedJob() with pytest.raises(ValueError): task.run(body=None) def test_invalid_job_name_raises_error(self, kube_secret): task = PatchNamespacedJob() with pytest.raises(ValueError): task.run(body={"test": "test"}, job_name=None) def test_body_value_is_replaced(self, kube_secret, api_client): task = PatchNamespacedJob(body={"test": "a"}, job_name="test") task.run(body={"test": "b"}) assert api_client.patch_namespaced_job.call_args[1]["body"] == {"test": "b"} def test_body_value_is_appended(self, kube_secret, api_client): task = PatchNamespacedJob(body={"test": "a"}, job_name="test") task.run(body={"a": "test"}) assert api_client.patch_namespaced_job.call_args[1]["body"] == { "a": "test", "test": "a", } def test_empty_body_value_is_updated(self, kube_secret, api_client): task = PatchNamespacedJob(job_name="test") task.run(body={"test": "a"}) assert api_client.patch_namespaced_job.call_args[1]["body"] == {"test": "a"} def test_kube_kwargs_value_is_replaced(self, kube_secret, api_client): task = PatchNamespacedJob( body={"test": "a"}, kube_kwargs={"test": "a"}, job_name="test" ) task.run(kube_kwargs={"test": "b"}) assert api_client.patch_namespaced_job.call_args[1]["test"] == "b" def test_kube_kwargs_value_is_appended(self, kube_secret, api_client): task = PatchNamespacedJob( body={"test": "a"}, kube_kwargs={"test": "a"}, job_name="test" ) task.run(kube_kwargs={"a": "test"}) assert api_client.patch_namespaced_job.call_args[1]["a"] == "test" assert api_client.patch_namespaced_job.call_args[1]["test"] == "a" def test_empty_kube_kwargs_value_is_updated(self, kube_secret, api_client): task = PatchNamespacedJob(body={"test": "a"}, job_name="test") task.run(kube_kwargs={"test": "a"}) assert api_client.patch_namespaced_job.call_args[1]["test"] == "a" class TestReadNamespacedJobTask: def test_empty_initialization(self, kube_secret): task = ReadNamespacedJob() assert not task.job_name assert task.namespace == "default" assert task.kube_kwargs == {} assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY" def test_filled_initialization(self, kube_secret): task = ReadNamespacedJob( job_name="test", namespace="test", kube_kwargs={"test": "test"}, kubernetes_api_key_secret="test", ) assert task.job_name == "test" assert task.namespace == "test" assert task.kube_kwargs == {"test": "test"} assert task.kubernetes_api_key_secret == "test" def test_empty_name_raises_error(self, kube_secret): task = ReadNamespacedJob() with pytest.raises(ValueError): task.run() def test_invalid_body_raises_error(self, kube_secret): task = ReadNamespacedJob() with pytest.raises(ValueError): task.run(job_name=None) def test_kube_kwargs_value_is_replaced(self, kube_secret, api_client): task = ReadNamespacedJob(job_name="test", kube_kwargs={"test": "a"}) task.run(kube_kwargs={"test": "b"}) assert api_client.read_namespaced_job.call_args[1]["test"] == "b" def test_kube_kwargs_value_is_appended(self, kube_secret, api_client): task = ReadNamespacedJob(job_name="test", kube_kwargs={"test": "a"}) task.run(kube_kwargs={"a": "test"}) assert api_client.read_namespaced_job.call_args[1]["a"] == "test" assert api_client.read_namespaced_job.call_args[1]["test"] == "a" def test_empty_kube_kwargs_value_is_updated(self, kube_secret, api_client): task = ReadNamespacedJob(job_name="test") task.run(kube_kwargs={"test": "a"}) assert api_client.read_namespaced_job.call_args[1]["test"] == "a" class TestReplaceNamespacedJobTask: def test_empty_initialization(self, kube_secret): task = ReplaceNamespacedJob() assert not task.job_name assert task.body == {} assert task.namespace == "default" assert task.kube_kwargs == {} assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY" def test_filled_initialization(self, kube_secret): task = ReplaceNamespacedJob( job_name="test", body={"test": "test"}, namespace="test", kube_kwargs={"test": "test"}, kubernetes_api_key_secret="test", ) assert task.job_name == "test" assert task.body == {"test": "test"} assert task.namespace == "test" assert task.kube_kwargs == {"test": "test"} assert task.kubernetes_api_key_secret == "test" def test_empty_body_raises_error(self, kube_secret): task = ReplaceNamespacedJob() with pytest.raises(ValueError): task.run() def test_invalid_body_raises_error(self, kube_secret): task = ReplaceNamespacedJob() with pytest.raises(ValueError): task.run(body=None) def test_invalid_job_name_raises_error(self, kube_secret): task = ReplaceNamespacedJob() with pytest.raises(ValueError): task.run(body={"test": "test"}, job_name=None) def test_body_value_is_replaced(self, kube_secret, api_client): task = ReplaceNamespacedJob(body={"test": "a"}, job_name="test") task.run(body={"test": "b"}) assert api_client.replace_namespaced_job.call_args[1]["body"] == {"test": "b"} def test_body_value_is_appended(self, kube_secret, api_client): task = ReplaceNamespacedJob(body={"test": "a"}, job_name="test") task.run(body={"a": "test"}) assert api_client.replace_namespaced_job.call_args[1]["body"] == { "a": "test", "test": "a", } def test_empty_body_value_is_updated(self, kube_secret, api_client): task = ReplaceNamespacedJob(job_name="test") task.run(body={"test": "a"}) assert api_client.replace_namespaced_job.call_args[1]["body"] == {"test": "a"} def test_kube_kwargs_value_is_replaced(self, kube_secret, api_client): task = ReplaceNamespacedJob( body={"test": "a"}, kube_kwargs={"test": "a"}, job_name="test" ) task.run(kube_kwargs={"test": "b"}) assert api_client.replace_namespaced_job.call_args[1]["test"] == "b" def test_kube_kwargs_value_is_appended(self, kube_secret, api_client): task = ReplaceNamespacedJob( body={"test": "a"}, kube_kwargs={"test": "a"}, job_name="test" ) task.run(kube_kwargs={"a": "test"}) assert api_client.replace_namespaced_job.call_args[1]["a"] == "test" assert api_client.replace_namespaced_job.call_args[1]["test"] == "a" def test_empty_kube_kwargs_value_is_updated(self, kube_secret, api_client): task = ReplaceNamespacedJob(body={"test": "a"}, job_name="test") task.run(kube_kwargs={"test": "a"}) assert api_client.replace_namespaced_job.call_args[1]["test"] == "a"
37.474201
86
0.646341
1,837
15,252
5.050082
0.045727
0.071144
0.076965
0.074701
0.92476
0.92476
0.901046
0.899213
0.866875
0.863426
0
0.002776
0.220496
15,252
406
87
37.566502
0.777525
0
0
0.774603
0
0
0.070614
0.004786
0
0
0
0
0.263492
1
0.168254
false
0
0.015873
0
0.206349
0
0
0
0
null
0
0
0
1
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
7
cdf0040db9d3f2919666f489b462bee6945ea893
18,540
py
Python
tests/config/providers/secretsmanager/test_provider.py
lucasvieirasilva/aws-ssm-secrets-cli
861779099dd5a77c7166d69cad90bba5a1145001
[ "MIT" ]
4
2021-05-18T16:11:26.000Z
2022-01-10T14:23:11.000Z
tests/config/providers/secretsmanager/test_provider.py
lucasvieirasilva/aws-ssm-secrets-cli
861779099dd5a77c7166d69cad90bba5a1145001
[ "MIT" ]
45
2020-09-14T08:57:53.000Z
2021-09-16T16:13:58.000Z
tests/config/providers/secretsmanager/test_provider.py
lucasvieirasilva/aws-ssm-secrets-cli
861779099dd5a77c7166d69cad90bba5a1145001
[ "MIT" ]
null
null
null
from unittest.mock import patch import boto3 from aws_secrets.config.config_reader import ConfigReader from aws_secrets.config.providers.secretsmanager.entry import SecretManagerEntry from aws_secrets.config.providers.secretsmanager.provider import SecretsManagerProvider from aws_secrets.miscellaneous import session from aws_secrets.representers.literal import Literal from botocore.stub import Stubber KEY_ARN = 'arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab' SECRET_ARN = 'arn:aws:secretsmanager:us-west-2:111122223333:secret:aes256-7g8H9i' def test_secretsmanager_provider_instance(boto_fs): """ Should create the SecretsManager Provider object """ config_file = 'config.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) assert len(provider.entries) == 0 @patch('aws_secrets.miscellaneous.kms.decrypt') def test_secretsmanager_provider_decrypt( mock_decrypt, boto_fs ): """ Should decrypt all the entries in the provider """ mock_decrypt.return_value = b'PlainTextData' config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.decrypt() assert provider._get_data_entries() == [{ 'name': 'secret1', 'value': 'PlainTextData' }] @patch('aws_secrets.miscellaneous.kms.decrypt') def test_secretsmanager_provider_decrypt_multiline( mock_decrypt, boto_fs ): """ Should decrypt all the entries in the provider Scenario: - multiline value """ mock_decrypt.return_value = b'PlainTextData\nLine1\nLine2' config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.decrypt() assert provider._get_data_entries() == [{ 'name': 'secret1', 'value': Literal('PlainTextData\nLine1\nLine2') }] def test_secretsmanager_provider_find_parameter(boto_fs): """ Should find the specific entry in the provider """ config_file = 'config.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' value: 'ABC' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) assert isinstance(provider.find('secret1'), SecretManagerEntry) def test_secretsmanager_provider_not_find_parameter(boto_fs): """ Should not find the specific entry in the provider """ config_file = 'config.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' value: 'ABC' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) assert provider.find('secret2') is None def test_secretsmanager_provider_get_sensible_entries(boto_fs): """ Should not find the specific entry in the provider """ config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) assert provider.get_sensible_entries() == [{ 'name': 'secret1' }] @patch('aws_secrets.miscellaneous.kms.encrypt') def test_secretsmanager_provider_encrypt( mock_encrypt, boto_fs ): """ Should encrypt all the entries in the provider """ mock_encrypt.return_value = b'SecretData' config_file = 'config.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' value: 'PlainTextData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) assert provider.encrypt() == [{ 'name': 'secret1', 'value': 'SecretData' }] def test_secretsmanager_provider_add( boto_fs ): """ Should add a new entry to the provider """ config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) assert isinstance(provider.add({ 'name': 'secret2', 'value': 'PlainTextData2' }), SecretManagerEntry) assert provider._get_data_entries() == [{ 'name': 'secret1' }, { 'name': 'secret2', 'value': 'PlainTextData2' }] def test_secretsmanager_provider_update( boto_fs ): """ Should update an existing entry """ config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' - name: 'secret2' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' - name: 'secret2' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.update({ 'name': 'secret1', 'value': 'PlainTextData', 'description': 'Desc' }) assert provider._get_data_entries() == [{ 'name': 'secret1', 'value': 'PlainTextData', 'description': 'Desc' }, { 'name': 'secret2' }] @patch('aws_secrets.miscellaneous.kms.decrypt') def test_secretsmanager_provider_deploy_dry_run( mock_decrypt, boto_fs, capsys ): """ Should deploy the AWS Secrets Manager changes """ mock_decrypt.return_value = b'PlainTextData' client = boto3.client('secretsmanager') with patch.object(boto3.Session, 'client') as mock_client: with Stubber(client) as stubber: mock_client.return_value = client stubber.add_response('list_secrets', { 'SecretList': [] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret1'] } ] }) stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret2', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret2'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData' }, { 'SecretId': 'secret2' }) stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret3', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret3'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData2' }, { 'SecretId': 'secret3' }) config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' - name: 'secret2' - name: 'secret3' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' - name: 'secret2' value: 'SecretData' - name: 'secret3' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.deploy(None, True, False) captured = capsys.readouterr() assert "Secret: [secret1]\n--> New Secret\n" in captured.out assert "Secret: [secret3]\n--> Changes:\n -->" + \ " Value:\n Old Value: PlainTextData2\n New Value: PlainTextData\n" in captured.out @patch('aws_secrets.miscellaneous.kms.decrypt') @patch('click.confirm') def test_secretsmanager_provider_deploy_confirm_no( mock_confirm, mock_decrypt, boto_fs, capsys ): """ Should deploy the AWS Secrets Manager changes """ mock_decrypt.return_value = b'PlainTextData' mock_confirm.return_value = False client = boto3.client('secretsmanager') with patch.object(boto3.Session, 'client') as mock_client: with Stubber(client) as stubber: mock_client.return_value = client stubber.add_response('list_secrets', { 'SecretList': [] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret1'] } ] }) stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret2', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret2'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData' }, { 'SecretId': 'secret2' }) stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret3', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret3'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData2' }, { 'SecretId': 'secret3' }) config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' - name: 'secret2' - name: 'secret3' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' - name: 'secret2' value: 'SecretData' - name: 'secret3' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.deploy(None, False, True) captured = capsys.readouterr() assert "Secret: [secret1]\n--> New Secret\n" in captured.out assert "Secret: [secret3]\n--> Changes:\n -->" + \ " Value:\n Old Value: PlainTextData2\n New Value: PlainTextData\n" in captured.out @patch('aws_secrets.miscellaneous.kms.decrypt') def test_secretsmanager_provider_deploy( mock_decrypt, boto_fs, capsys ): """ Should deploy the AWS Secrets Manager changes """ mock_decrypt.return_value = b'PlainTextData' client = boto3.client('secretsmanager') with patch.object(boto3.Session, 'client') as mock_client: with Stubber(client) as stubber: mock_client.return_value = client stubber.add_response('list_secrets', { 'SecretList': [] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret1'] } ] }) stubber.add_response('create_secret', {}, { 'Name': 'secret1', 'Description': '', 'SecretString': 'PlainTextData', 'Tags': [] }) stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret2', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret2'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData' }, { 'SecretId': 'secret2' }) stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret3', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret3'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData2' }, { 'SecretId': 'secret3' }) stubber.add_response('update_secret', {}, { 'SecretId': 'secret3', 'Description': '', 'SecretString': 'PlainTextData' }) stubber.add_response('untag_resource', {}, { 'SecretId': 'secret3', 'TagKeys': [] }) config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret1' - name: 'secret2' - name: 'secret3' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret1' value: 'SecretData' - name: 'secret2' value: 'SecretData' - name: 'secret3' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.deploy(None, False, False) captured = capsys.readouterr() assert "Secret: [secret1]\n--> New Secret\n" in captured.out assert "Secret: [secret3]\n--> Changes:\n -->" + \ " Value:\n Old Value: PlainTextData2\n New Value: PlainTextData\n" in captured.out @patch('aws_secrets.miscellaneous.kms.decrypt') @patch('click.confirm') def test_secretsmanager_provider_deploy_no_changes( mock_confirm, mock_decrypt, boto_fs, capsys ): """ Should deploy the AWS Secrets Manager changes """ mock_decrypt.return_value = b'PlainTextData' mock_confirm.return_value = False client = boto3.client('secretsmanager') with patch.object(boto3.Session, 'client') as mock_client: with Stubber(client) as stubber: mock_client.return_value = client stubber.add_response('list_secrets', { 'SecretList': [{ 'ARN': SECRET_ARN, 'Name': 'secret2', 'Description': '', 'Tags': [] }] }, { 'Filters': [ { 'Key': 'name', 'Values': ['secret2'] } ] }) stubber.add_response('get_secret_value', { 'SecretString': 'PlainTextData' }, { 'SecretId': 'secret2' }) config_file = 'config.yaml' secrets_file = 'config.secrets.yaml' session.aws_profile = None session.aws_region = 'us-east-1' boto_fs.create_file(config_file, contents=f""" kms: arn: {KEY_ARN} secrets: - name: 'secret2' """) boto_fs.create_file(secrets_file, contents=""" secrets: - name: 'secret2' value: 'SecretData' """) config = ConfigReader(config_file) provider = SecretsManagerProvider(config) provider.deploy(None, False, True) captured = capsys.readouterr() assert "no changes required" in captured.out
26.223479
116
0.527184
1,644
18,540
5.746959
0.078467
0.041279
0.027942
0.037257
0.852561
0.845258
0.822714
0.814987
0.807578
0.79022
0
0.013892
0.351618
18,540
706
117
26.260623
0.772066
0.033765
0
0.856884
0
0.001812
0.278244
0.025722
0
0
0
0
0.030797
1
0.023551
false
0
0.014493
0
0.038043
0
0
0
0
null
0
0
0
1
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
7
b52f02cb9ee72e65024e840842128a38f17b8268
145
py
Python
model/metric.py
fish258/MonoRec
c0612d2710802004cdd83205e63d0582de543c41
[ "MIT" ]
388
2021-05-13T08:31:36.000Z
2022-03-31T15:50:33.000Z
model/metric.py
fish258/MonoRec
c0612d2710802004cdd83205e63d0582de543c41
[ "MIT" ]
28
2021-06-15T13:22:09.000Z
2022-03-26T03:36:20.000Z
model/metric.py
fish258/MonoRec
c0612d2710802004cdd83205e63d0582de543c41
[ "MIT" ]
59
2021-06-16T13:47:39.000Z
2022-03-28T01:11:21.000Z
from .metric_functions.sparse_metrics import * from .metric_functions.dense_metrics import * from .metric_functions.completeness_metrics import *
48.333333
52
0.862069
18
145
6.611111
0.444444
0.252101
0.478992
0.386555
0.537815
0
0
0
0
0
0
0
0.075862
145
3
52
48.333333
0.88806
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
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
8
8d556eeba2cdf351145dfa75225a7e1f9cc9f7a7
31,312
py
Python
pyscript/synerex_pb2_grpc.py
nkawa/provider_map_pick
a576ed71cdf4c6af4ddbae43df1d1561d34acd13
[ "Apache-2.0" ]
null
null
null
pyscript/synerex_pb2_grpc.py
nkawa/provider_map_pick
a576ed71cdf4c6af4ddbae43df1d1561d34acd13
[ "Apache-2.0" ]
null
null
null
pyscript/synerex_pb2_grpc.py
nkawa/provider_map_pick
a576ed71cdf4c6af4ddbae43df1d1561d34acd13
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import synerex_pb2 as api_dot_synerex__pb2 class SynerexStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.NotifyDemand = channel.unary_unary( '/api.Synerex/NotifyDemand', request_serializer=api_dot_synerex__pb2.Demand.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.NotifySupply = channel.unary_unary( '/api.Synerex/NotifySupply', request_serializer=api_dot_synerex__pb2.Supply.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.ProposeDemand = channel.unary_unary( '/api.Synerex/ProposeDemand', request_serializer=api_dot_synerex__pb2.Demand.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.ProposeSupply = channel.unary_unary( '/api.Synerex/ProposeSupply', request_serializer=api_dot_synerex__pb2.Supply.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.SelectSupply = channel.unary_unary( '/api.Synerex/SelectSupply', request_serializer=api_dot_synerex__pb2.Target.SerializeToString, response_deserializer=api_dot_synerex__pb2.ConfirmResponse.FromString, ) self.SelectModifiedSupply = channel.unary_unary( '/api.Synerex/SelectModifiedSupply', request_serializer=api_dot_synerex__pb2.Supply.SerializeToString, response_deserializer=api_dot_synerex__pb2.ConfirmResponse.FromString, ) self.SelectDemand = channel.unary_unary( '/api.Synerex/SelectDemand', request_serializer=api_dot_synerex__pb2.Target.SerializeToString, response_deserializer=api_dot_synerex__pb2.ConfirmResponse.FromString, ) self.Confirm = channel.unary_unary( '/api.Synerex/Confirm', request_serializer=api_dot_synerex__pb2.Target.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.SubscribeDemand = channel.unary_stream( '/api.Synerex/SubscribeDemand', request_serializer=api_dot_synerex__pb2.Channel.SerializeToString, response_deserializer=api_dot_synerex__pb2.Demand.FromString, ) self.SubscribeSupply = channel.unary_stream( '/api.Synerex/SubscribeSupply', request_serializer=api_dot_synerex__pb2.Channel.SerializeToString, response_deserializer=api_dot_synerex__pb2.Supply.FromString, ) self.CreateMbus = channel.unary_unary( '/api.Synerex/CreateMbus', request_serializer=api_dot_synerex__pb2.MbusOpt.SerializeToString, response_deserializer=api_dot_synerex__pb2.Mbus.FromString, ) self.CloseMbus = channel.unary_unary( '/api.Synerex/CloseMbus', request_serializer=api_dot_synerex__pb2.Mbus.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.SubscribeMbus = channel.unary_stream( '/api.Synerex/SubscribeMbus', request_serializer=api_dot_synerex__pb2.Mbus.SerializeToString, response_deserializer=api_dot_synerex__pb2.MbusMsg.FromString, ) self.SendMbusMsg = channel.unary_unary( '/api.Synerex/SendMbusMsg', request_serializer=api_dot_synerex__pb2.MbusMsg.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.GetMbusState = channel.unary_unary( '/api.Synerex/GetMbusState', request_serializer=api_dot_synerex__pb2.Mbus.SerializeToString, response_deserializer=api_dot_synerex__pb2.MbusState.FromString, ) self.SubscribeGateway = channel.unary_stream( '/api.Synerex/SubscribeGateway', request_serializer=api_dot_synerex__pb2.GatewayInfo.SerializeToString, response_deserializer=api_dot_synerex__pb2.GatewayMsg.FromString, ) self.ForwardToGateway = channel.unary_unary( '/api.Synerex/ForwardToGateway', request_serializer=api_dot_synerex__pb2.GatewayMsg.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.CloseDemandChannel = channel.unary_unary( '/api.Synerex/CloseDemandChannel', request_serializer=api_dot_synerex__pb2.Channel.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.CloseSupplyChannel = channel.unary_unary( '/api.Synerex/CloseSupplyChannel', request_serializer=api_dot_synerex__pb2.Channel.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) self.CloseAllChannels = channel.unary_unary( '/api.Synerex/CloseAllChannels', request_serializer=api_dot_synerex__pb2.ProviderID.SerializeToString, response_deserializer=api_dot_synerex__pb2.Response.FromString, ) class SynerexServicer(object): """Missing associated documentation comment in .proto file.""" def NotifyDemand(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def NotifySupply(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ProposeDemand(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ProposeSupply(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SelectSupply(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SelectModifiedSupply(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SelectDemand(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Confirm(self, request, context): """rpc SelectModifiedDemand(Demand) returns (ConfirmResponse) {} // select with modification(since 0.5.1) """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SubscribeDemand(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SubscribeSupply(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CreateMbus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CloseMbus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SubscribeMbus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SendMbusMsg(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetMbusState(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SubscribeGateway(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ForwardToGateway(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CloseDemandChannel(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CloseSupplyChannel(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CloseAllChannels(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_SynerexServicer_to_server(servicer, server): rpc_method_handlers = { 'NotifyDemand': grpc.unary_unary_rpc_method_handler( servicer.NotifyDemand, request_deserializer=api_dot_synerex__pb2.Demand.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'NotifySupply': grpc.unary_unary_rpc_method_handler( servicer.NotifySupply, request_deserializer=api_dot_synerex__pb2.Supply.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'ProposeDemand': grpc.unary_unary_rpc_method_handler( servicer.ProposeDemand, request_deserializer=api_dot_synerex__pb2.Demand.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'ProposeSupply': grpc.unary_unary_rpc_method_handler( servicer.ProposeSupply, request_deserializer=api_dot_synerex__pb2.Supply.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'SelectSupply': grpc.unary_unary_rpc_method_handler( servicer.SelectSupply, request_deserializer=api_dot_synerex__pb2.Target.FromString, response_serializer=api_dot_synerex__pb2.ConfirmResponse.SerializeToString, ), 'SelectModifiedSupply': grpc.unary_unary_rpc_method_handler( servicer.SelectModifiedSupply, request_deserializer=api_dot_synerex__pb2.Supply.FromString, response_serializer=api_dot_synerex__pb2.ConfirmResponse.SerializeToString, ), 'SelectDemand': grpc.unary_unary_rpc_method_handler( servicer.SelectDemand, request_deserializer=api_dot_synerex__pb2.Target.FromString, response_serializer=api_dot_synerex__pb2.ConfirmResponse.SerializeToString, ), 'Confirm': grpc.unary_unary_rpc_method_handler( servicer.Confirm, request_deserializer=api_dot_synerex__pb2.Target.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'SubscribeDemand': grpc.unary_stream_rpc_method_handler( servicer.SubscribeDemand, request_deserializer=api_dot_synerex__pb2.Channel.FromString, response_serializer=api_dot_synerex__pb2.Demand.SerializeToString, ), 'SubscribeSupply': grpc.unary_stream_rpc_method_handler( servicer.SubscribeSupply, request_deserializer=api_dot_synerex__pb2.Channel.FromString, response_serializer=api_dot_synerex__pb2.Supply.SerializeToString, ), 'CreateMbus': grpc.unary_unary_rpc_method_handler( servicer.CreateMbus, request_deserializer=api_dot_synerex__pb2.MbusOpt.FromString, response_serializer=api_dot_synerex__pb2.Mbus.SerializeToString, ), 'CloseMbus': grpc.unary_unary_rpc_method_handler( servicer.CloseMbus, request_deserializer=api_dot_synerex__pb2.Mbus.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'SubscribeMbus': grpc.unary_stream_rpc_method_handler( servicer.SubscribeMbus, request_deserializer=api_dot_synerex__pb2.Mbus.FromString, response_serializer=api_dot_synerex__pb2.MbusMsg.SerializeToString, ), 'SendMbusMsg': grpc.unary_unary_rpc_method_handler( servicer.SendMbusMsg, request_deserializer=api_dot_synerex__pb2.MbusMsg.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'GetMbusState': grpc.unary_unary_rpc_method_handler( servicer.GetMbusState, request_deserializer=api_dot_synerex__pb2.Mbus.FromString, response_serializer=api_dot_synerex__pb2.MbusState.SerializeToString, ), 'SubscribeGateway': grpc.unary_stream_rpc_method_handler( servicer.SubscribeGateway, request_deserializer=api_dot_synerex__pb2.GatewayInfo.FromString, response_serializer=api_dot_synerex__pb2.GatewayMsg.SerializeToString, ), 'ForwardToGateway': grpc.unary_unary_rpc_method_handler( servicer.ForwardToGateway, request_deserializer=api_dot_synerex__pb2.GatewayMsg.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'CloseDemandChannel': grpc.unary_unary_rpc_method_handler( servicer.CloseDemandChannel, request_deserializer=api_dot_synerex__pb2.Channel.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'CloseSupplyChannel': grpc.unary_unary_rpc_method_handler( servicer.CloseSupplyChannel, request_deserializer=api_dot_synerex__pb2.Channel.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), 'CloseAllChannels': grpc.unary_unary_rpc_method_handler( servicer.CloseAllChannels, request_deserializer=api_dot_synerex__pb2.ProviderID.FromString, response_serializer=api_dot_synerex__pb2.Response.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'api.Synerex', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class Synerex(object): """Missing associated documentation comment in .proto file.""" @staticmethod def NotifyDemand(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/NotifyDemand', api_dot_synerex__pb2.Demand.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def NotifySupply(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/NotifySupply', api_dot_synerex__pb2.Supply.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def ProposeDemand(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/ProposeDemand', api_dot_synerex__pb2.Demand.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def ProposeSupply(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/ProposeSupply', api_dot_synerex__pb2.Supply.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SelectSupply(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/SelectSupply', api_dot_synerex__pb2.Target.SerializeToString, api_dot_synerex__pb2.ConfirmResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SelectModifiedSupply(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/SelectModifiedSupply', api_dot_synerex__pb2.Supply.SerializeToString, api_dot_synerex__pb2.ConfirmResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SelectDemand(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/SelectDemand', api_dot_synerex__pb2.Target.SerializeToString, api_dot_synerex__pb2.ConfirmResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Confirm(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/Confirm', api_dot_synerex__pb2.Target.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SubscribeDemand(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/api.Synerex/SubscribeDemand', api_dot_synerex__pb2.Channel.SerializeToString, api_dot_synerex__pb2.Demand.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SubscribeSupply(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/api.Synerex/SubscribeSupply', api_dot_synerex__pb2.Channel.SerializeToString, api_dot_synerex__pb2.Supply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CreateMbus(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/CreateMbus', api_dot_synerex__pb2.MbusOpt.SerializeToString, api_dot_synerex__pb2.Mbus.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CloseMbus(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/CloseMbus', api_dot_synerex__pb2.Mbus.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SubscribeMbus(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/api.Synerex/SubscribeMbus', api_dot_synerex__pb2.Mbus.SerializeToString, api_dot_synerex__pb2.MbusMsg.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SendMbusMsg(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/SendMbusMsg', api_dot_synerex__pb2.MbusMsg.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def GetMbusState(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/GetMbusState', api_dot_synerex__pb2.Mbus.SerializeToString, api_dot_synerex__pb2.MbusState.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SubscribeGateway(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/api.Synerex/SubscribeGateway', api_dot_synerex__pb2.GatewayInfo.SerializeToString, api_dot_synerex__pb2.GatewayMsg.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def ForwardToGateway(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/ForwardToGateway', api_dot_synerex__pb2.GatewayMsg.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CloseDemandChannel(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/CloseDemandChannel', api_dot_synerex__pb2.Channel.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CloseSupplyChannel(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/CloseSupplyChannel', api_dot_synerex__pb2.Channel.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CloseAllChannels(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/api.Synerex/CloseAllChannels', api_dot_synerex__pb2.ProviderID.SerializeToString, api_dot_synerex__pb2.Response.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
45.053237
113
0.648058
2,832
31,312
6.846045
0.045198
0.062926
0.081133
0.099856
0.870538
0.840571
0.814163
0.74706
0.744275
0.719827
0
0.00552
0.276827
31,312
694
114
45.118156
0.850689
0.050971
0
0.665033
1
0
0.076478
0.034501
0
0
0
0
0
1
0.068627
false
0
0.003268
0.03268
0.109477
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
57063ca3d25aa86307fdd233d6c349f5d12ec5ef
13,292
py
Python
alembic/versions/37af9542fb7e_initial_revision.py
noirscape/providence
8e48dc3247753cc5a76178ee4af12a349d7e1e47
[ "MIT" ]
8
2019-06-10T17:38:13.000Z
2020-08-01T12:56:08.000Z
alembic/versions/37af9542fb7e_initial_revision.py
noirscape/providence
8e48dc3247753cc5a76178ee4af12a349d7e1e47
[ "MIT" ]
null
null
null
alembic/versions/37af9542fb7e_initial_revision.py
noirscape/providence
8e48dc3247753cc5a76178ee4af12a349d7e1e47
[ "MIT" ]
null
null
null
"""Initial revision Revision ID: 37af9542fb7e Revises: Create Date: 2019-05-15 01:00:47.269109 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '37af9542fb7e' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('users', sa.Column('id', sa.BigInteger(), autoincrement=False, nullable=False), sa.Column('name', sa.String(length=32), nullable=False), sa.Column('discriminator', sa.BigInteger(), nullable=False), sa.Column('is_bot', sa.Boolean(), nullable=False), sa.Column('avatar', sa.String(length=2000), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('last_updated', sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('dm_channels', sa.Column('id', sa.BigInteger(), nullable=False), sa.Column('remote_user_id', sa.BigInteger(), nullable=False), sa.ForeignKeyConstraint(['remote_user_id'], ['users.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_table('guilds', sa.Column('id', sa.BigInteger(), autoincrement=False, nullable=False), sa.Column('name', sa.String(length=100), nullable=False), sa.Column('icon_url', sa.String(length=2000), nullable=True), sa.Column('owner_id', sa.BigInteger(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('last_updated', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['owner_id'], ['users.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_table('user_edits', sa.Column('user_id', sa.BigInteger(), nullable=False), sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('name', sa.String(length=100), nullable=False), sa.Column('discriminator', sa.BigInteger(), nullable=False), sa.Column('avatar', sa.String(length=2000), nullable=False), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ), sa.PrimaryKeyConstraint('edit_id') ) op.create_table('dm_messages', sa.Column('id', sa.BigInteger(), autoincrement=False, nullable=False), sa.Column('channel_id', sa.BigInteger(), nullable=False), sa.Column('author_id', sa.BigInteger(), nullable=False), sa.Column('content', sa.String(length=2000), nullable=True), sa.Column('embed', sa.JSON(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['author_id'], ['users.id'], ), sa.ForeignKeyConstraint(['channel_id'], ['dm_channels.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_table('guild_channels', sa.Column('id', sa.BigInteger(), autoincrement=False, nullable=False), sa.Column('guild_id', sa.BigInteger(), nullable=False), sa.Column('name', sa.String(length=100), nullable=False), sa.Column('topic', sa.String(length=1024), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.Column('last_updated', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['guild_id'], ['guilds.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_table('guild_edits', sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('guild_id', sa.BigInteger(), nullable=False), sa.Column('name', sa.String(length=100), nullable=True), sa.Column('owner_id', sa.BigInteger(), nullable=False), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['guild_id'], ['guilds.id'], ), sa.ForeignKeyConstraint(['owner_id'], ['users.id'], ), sa.PrimaryKeyConstraint('edit_id') ) op.create_table('guild_members', sa.Column('user_id', sa.BigInteger(), nullable=False), sa.Column('guild_id', sa.BigInteger(), nullable=False), sa.Column('id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('nickname', sa.String(length=32), nullable=True), sa.Column('last_updated', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['guild_id'], ['guilds.id'], ), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id'), sa.UniqueConstraint('user_id', 'guild_id', name='unique_guild_and_id') ) op.create_table('roles', sa.Column('id', sa.BigInteger(), autoincrement=False, nullable=False), sa.Column('guild_id', sa.BigInteger(), nullable=True), sa.Column('name', sa.String(length=100), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['guild_id'], ['guilds.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_table('ban_audit', sa.Column('audit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('member_id', sa.BigInteger(), nullable=False), sa.Column('member_was_banned', sa.Boolean(), nullable=False), sa.Column('event_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['member_id'], ['guild_members.id'], ), sa.PrimaryKeyConstraint('audit_id') ) op.create_table('dm_channel_pins', sa.Column('pin_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('dm_channel_id', sa.BigInteger(), nullable=False), sa.Column('message_id', sa.BigInteger(), nullable=False), sa.Column('is_pinned', sa.Boolean(), nullable=False), sa.Column('pinned_at', sa.DateTime(), nullable=False), sa.Column('unpinned_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['dm_channel_id'], ['dm_channels.id'], ), sa.ForeignKeyConstraint(['message_id'], ['dm_messages.id'], ), sa.PrimaryKeyConstraint('pin_id') ) op.create_table('dm_message_attachments', sa.Column('attachment_id', sa.BigInteger(), nullable=False), sa.Column('message_id', sa.BigInteger(), nullable=True), sa.Column('filename', sa.String(length=300), nullable=False), sa.Column('url', sa.String(length=2000), nullable=True), sa.Column('filesize', sa.BigInteger(), nullable=True), sa.ForeignKeyConstraint(['message_id'], ['dm_messages.id'], ), sa.PrimaryKeyConstraint('attachment_id') ) op.create_table('dm_message_deletions', sa.Column('message_id', sa.BigInteger(), nullable=False), sa.Column('deletion_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['message_id'], ['dm_messages.id'], ), sa.PrimaryKeyConstraint('message_id') ) op.create_table('dm_message_edits', sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('message_id', sa.BigInteger(), nullable=False), sa.Column('content', sa.String(length=2000), nullable=True), sa.Column('embed', sa.JSON(), nullable=True), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['message_id'], ['dm_messages.id'], ), sa.PrimaryKeyConstraint('edit_id') ) op.create_table('guild_channel_edits', sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('guild_channel_id', sa.BigInteger(), nullable=False), sa.Column('name', sa.String(length=100), nullable=True), sa.Column('topic', sa.String(length=1024), nullable=True), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['guild_channel_id'], ['guild_channels.id'], ), sa.PrimaryKeyConstraint('edit_id') ) op.create_table('guild_join_guild_leave_audit', sa.Column('audit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('guild_id', sa.BigInteger(), nullable=False), sa.Column('member_id', sa.BigInteger(), nullable=False), sa.Column('member_joined', sa.Boolean(), nullable=False), sa.Column('event_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['guild_id'], ['guilds.id'], ), sa.ForeignKeyConstraint(['member_id'], ['guild_members.id'], ), sa.PrimaryKeyConstraint('audit_id') ) op.create_table('guild_member_edit', sa.Column('member_id', sa.BigInteger(), nullable=True), sa.Column('nickname', sa.String(length=32), nullable=True), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.ForeignKeyConstraint(['member_id'], ['guild_members.id'], ), sa.PrimaryKeyConstraint('edit_id') ) op.create_table('guild_member_roles', sa.Column('member_id', sa.BigInteger(), nullable=False), sa.Column('role_id', sa.BigInteger(), nullable=False), sa.ForeignKeyConstraint(['member_id'], ['guild_members.id'], ), sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ), sa.PrimaryKeyConstraint('member_id', 'role_id') ) op.create_table('guild_messages', sa.Column('id', sa.BigInteger(), autoincrement=False, nullable=False), sa.Column('channel_id', sa.BigInteger(), nullable=False), sa.Column('author_id', sa.BigInteger(), nullable=False), sa.Column('content', sa.String(length=2000), nullable=True), sa.Column('embed', sa.JSON(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['author_id'], ['users.id'], ), sa.ForeignKeyConstraint(['channel_id'], ['guild_channels.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_table('role_audit', sa.Column('audit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('role_id', sa.BigInteger(), nullable=False), sa.Column('member_id', sa.BigInteger(), nullable=False), sa.Column('role_was_added', sa.Boolean(), nullable=False), sa.Column('event_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['member_id'], ['guild_members.id'], ), sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ), sa.PrimaryKeyConstraint('audit_id') ) op.create_table('role_edits', sa.Column('role_id', sa.BigInteger(), autoincrement=False, nullable=True), sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('name', sa.String(length=100), nullable=False), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ), sa.PrimaryKeyConstraint('edit_id') ) op.create_table('guild_channel_pins', sa.Column('pin_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('guild_channel_id', sa.BigInteger(), nullable=False), sa.Column('message_id', sa.BigInteger(), nullable=False), sa.Column('is_pinned', sa.Boolean(), nullable=False), sa.Column('pinned_at', sa.DateTime(), nullable=False), sa.Column('unpinned_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['guild_channel_id'], ['guild_channels.id'], ), sa.ForeignKeyConstraint(['message_id'], ['guild_messages.id'], ), sa.PrimaryKeyConstraint('pin_id') ) op.create_table('guild_message_attachments', sa.Column('attachment_id', sa.BigInteger(), nullable=False), sa.Column('message_id', sa.BigInteger(), nullable=True), sa.Column('filename', sa.String(length=300), nullable=False), sa.Column('url', sa.String(length=2000), nullable=True), sa.Column('filesize', sa.BigInteger(), nullable=True), sa.ForeignKeyConstraint(['message_id'], ['guild_messages.id'], ), sa.PrimaryKeyConstraint('attachment_id') ) op.create_table('guild_message_deletions', sa.Column('message_id', sa.BigInteger(), nullable=False), sa.Column('deletion_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['message_id'], ['guild_messages.id'], ), sa.PrimaryKeyConstraint('message_id') ) op.create_table('guild_message_edits', sa.Column('edit_id', sa.BigInteger(), autoincrement=True, nullable=False), sa.Column('message_id', sa.BigInteger(), nullable=False), sa.Column('content', sa.String(length=2000), nullable=True), sa.Column('embed', sa.JSON(), nullable=True), sa.Column('edit_time', sa.DateTime(), nullable=False), sa.ForeignKeyConstraint(['message_id'], ['guild_messages.id'], ), sa.PrimaryKeyConstraint('edit_id') ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_table('guild_message_edits') op.drop_table('guild_message_deletions') op.drop_table('guild_message_attachments') op.drop_table('guild_channel_pins') op.drop_table('role_edits') op.drop_table('role_audit') op.drop_table('guild_messages') op.drop_table('guild_member_roles') op.drop_table('guild_member_edit') op.drop_table('guild_join_guild_leave_audit') op.drop_table('guild_channel_edits') op.drop_table('dm_message_edits') op.drop_table('dm_message_deletions') op.drop_table('dm_message_attachments') op.drop_table('dm_channel_pins') op.drop_table('ban_audit') op.drop_table('roles') op.drop_table('guild_members') op.drop_table('guild_edits') op.drop_table('guild_channels') op.drop_table('dm_messages') op.drop_table('user_edits') op.drop_table('guilds') op.drop_table('dm_channels') op.drop_table('users') # ### end Alembic commands ###
47.471429
79
0.688008
1,661
13,292
5.331728
0.069235
0.106594
0.149051
0.165989
0.925587
0.882904
0.851287
0.834914
0.802507
0.730352
0
0.009567
0.127144
13,292
279
80
47.641577
0.753749
0.021517
0
0.59387
0
0
0.202714
0.015113
0
0
0
0
0
1
0.007663
false
0
0.007663
0
0.015326
0
0
0
0
null
0
0
1
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
7
5708163067fc0bc3c741443c2ae762b0f7f9e8bb
10,459
py
Python
oled_img_001.py
luisC62/RPi_Pico_Examples
d2fb34e6ec0835d9265b3bd750add9e2da3eabf7
[ "MIT" ]
null
null
null
oled_img_001.py
luisC62/RPi_Pico_Examples
d2fb34e6ec0835d9265b3bd750add9e2da3eabf7
[ "MIT" ]
null
null
null
oled_img_001.py
luisC62/RPi_Pico_Examples
d2fb34e6ec0835d9265b3bd750add9e2da3eabf7
[ "MIT" ]
null
null
null
from machine import Pin, I2C from ssd1306 import SSD1306_I2C import framebuf i2c=I2C(0,sda=Pin(0), scl=Pin(1), freq=400000) oled = SSD1306_I2C(128, 64, i2c) face1 = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\xc0\x00\x00\x00\x1f\x80\x00\x01\xf0\x00\x00\x00?\xc0\x00\x03\xf8\x00\x00\x00?\xc0\x00\x07\xf8\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00?\xc0\x00\x07\xf8\x00\x00\x00?\x80\x00\x03\xf8\x00\x00\x00\x1f\x80\x00\x01\xf0\x00\x00\x00\x06\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x03\x00\x00\x01\x80\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00@\x00\x06\x00\x00\x00\x00\x00 \x00\x08\x00\x00\x00\x00\x00\x10\x000\x00\x00\x00\x00\x00\x08\x00@\x00\x00\x00\x00\x00\x06\x00\x80\x00\x00\x00\x00\x00\x01\x83\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') face2 = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\xc0\x00\x00\x00\x1f\x80\x00\x01\xf0\x00\x00\x00?\xc0\x00\x03\xf8\x00\x00\x00?\xc0\x00\x07\xf8\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00?\xc0\x00\x07\xf8\x00\x00\x00?\x80\x00\x03\xf8\x00\x00\x00\x1f\x80\x00\x01\xf0\x00\x00\x00\x06\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') face3 = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x06\x00\x00\x00@\x00\x00\x00\x08\x00\x00\x000\x00\x00\x00\x10\x00\x00\x00\x0c\x00\x00\x00`\x00\x00\x00\x03\x00\x00\x01\x80\x00\x00\x00\x00\xc0\x00\x02\x00\x00\x00\x00\x0e0\x00\x0c\xc0\x00\x00\x00\x1f\x88\x001\xf0\x00\x00\x00?\xc6\x00C\xf8\x00\x00\x00?\xc0\x00\x87\xf8\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00?\xc0\x00\x07\xf8\x00\x00\x00?\x80\x00\x03\xf8\x00\x00\x00\x1f\x80\x00\x01\xf0\x00\x00\x00\x06\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>\x00\x00\x00\x00\x00\x00\x01\xc1\xc0\x00\x00\x00\x00\x00\x02\x00 \x00\x00\x00\x00\x00\x0c\x00\x18\x00\x00\x00\x00\x00\x10\x00\x06\x00\x00\x00\x00\x00`\x00\x01\x00\x00\x00\x00\x00\x80\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') face4 = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x06\x00\x00\x00@\x00\x00\x00\x08\x00\x00\x000\x00\x00\x00\x10\x00\x00\x00\x0c\x00\x00\x00`\x00\x00\x00\x03\x00\x00\x01\x80\x00\x00\x00\x00\xc0\x00\x02\x00\x00\x00\x00\x0e0\x00\x0c\xc0\x00\x00\x00\x1f\x88\x001\xf0\x00\x00\x00?\xc6\x00C\xf8\x00\x00\x00?\xc0\x00\x87\xf8\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00\x7f\xe0\x00\x0f\xfc\x00\x00\x00?\xc0\x00\x07\xf8\x00\x00\x00?\x80\x00\x03\xf8\x00\x00\x00\x1f\x80\x00\x01\xf0\x00\x00\x00\x06\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') face5 = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x06\x00\x00\x00@\x00\x00\x00\x08\x00\x00\x000\x00\x00\x00\x10\x00\x00\x00\x0c\x00\x00\x00`\x00\x00\x00\x03\x00\x00\x01\x80\x00\x00\x00\x00\xc0\x00\x02\x00\x00\x00\x00\x000\x00\x0c\x00\x00\x00\x00\x00\x08\x000\x00\x00\x00\x00\x00\x06\x00@\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xf0\x00\x0f\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') fb = framebuf.FrameBuffer(face1, 64, 64, framebuf.MONO_HLSB) oled.fill(0) oled.blit(fb,32,0) oled.show()
550.473684
2,058
0.745865
2,569
10,459
3.035422
0.024134
1.604258
2.272506
2.863811
0.967299
0.966915
0.958964
0.9505
0.944345
0.944345
0
0.469549
0.004685
10,459
18
2,059
581.055556
0.279539
0
0
0
0
0.357143
0.963756
0.963565
0
1
0
0
0
1
0
false
0
0.214286
0
0.214286
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
0
0
1
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
17
57230e12d572b03fab3edfd8ef5efcd53c31b9aa
161
py
Python
app/books/admin.py
ToJestKrzysio/BookManager
e12412f73b5799b8312e981a6baa8e618604a2fa
[ "MIT" ]
null
null
null
app/books/admin.py
ToJestKrzysio/BookManager
e12412f73b5799b8312e981a6baa8e618604a2fa
[ "MIT" ]
null
null
null
app/books/admin.py
ToJestKrzysio/BookManager
e12412f73b5799b8312e981a6baa8e618604a2fa
[ "MIT" ]
null
null
null
from django.contrib import admin from . import models admin.site.register(models.Author) admin.site.register(models.Language) admin.site.register(models.Book)
20.125
36
0.813665
23
161
5.695652
0.478261
0.206107
0.389313
0.526718
0
0
0
0
0
0
0
0
0.080745
161
7
37
23
0.885135
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
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
0
0
0
7
938d86bc236f334511c11b601c13e0062826be06
51,012
py
Python
etl_e2e/mdf/mdf_classes.py
thinkmoore/das
d9faabf3de987b890a5079b914f5aba597215b14
[ "CC0-1.0" ]
35
2019-04-16T19:37:01.000Z
2022-02-14T20:33:41.000Z
etl_e2e/mdf/mdf_classes.py
thinkmoore/das
d9faabf3de987b890a5079b914f5aba597215b14
[ "CC0-1.0" ]
6
2019-06-05T19:41:15.000Z
2020-08-19T19:04:59.000Z
etl_e2e/mdf/mdf_classes.py
thinkmoore/das
d9faabf3de987b890a5079b914f5aba597215b14
[ "CC0-1.0" ]
12
2019-05-02T19:38:06.000Z
2021-09-11T22:02:03.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file was automatically generated by ../census_etl/census_spec_scanner.py on Wed Jan 30 11:00:49 2019 # Command line: ../census_etl/census_spec_scanner.py 2018_mdf.docx --output_parser mdf_validator_classes.py --ignore QREL,QSEX,QSPANX,QRACE1,QRACE2,QRACE3,QRACE4,QRACE5,QRACE6,QRACE7,QRACE8,CIT,HHT,HHT2,NPF,CPLT,UPART,MULTG,HHLDRAGE,HHSPAN,HHRACE,PAOC,P18,P60,P65,P75 def leftpad(x,width): return ' '*(width-len(str(x)))+str(x) def between(a,b,c,width): return leftpad(a,width) <= leftpad(b,width) <= leftpad(c,width) def safe_int(i): try: return int(i) except (TypeError, ValueError) as e: return None def safe_float(i): try: return float(i) except (TypeError, ValueError) as e: return None def safe_str(i): try: return str(i) except (TypeError, ValueError) as e: return None class MDF_Person_validator: @classmethod def is_valid_SCHEMA_TYPE_CODE(self,x): """Schema Type Code""" return (leftpad(x,5)==leftpad('MPD',5)) @classmethod def is_valid_SCHEMA_BUILD_ID(self,x): """Schema Build ID""" return (leftpad(x,5)==leftpad('3.1.4',5)) @classmethod def is_valid_TABBLKST(self,x): """2018 Tabulation State (FIPS)""" return (between('04',x,'06',2)) or (between('53',x,'56',2)) or (between('01',x,'02',2)) or (between('08',x,'13',2)) or (leftpad(x,2)==leftpad('72',2)) or (between('44',x,'51',2)) or (between('15',x,'42',2)) @classmethod def is_valid_TABBLKCOU(self,x): """2018 Tabulation County (FIPS)""" return (between('001',x,'840',3)) @classmethod def is_valid_TABTRACTCE(self,x): """2018 Tabulation Census Tract""" return (between('000100',x,'998999',6)) @classmethod def is_valid_TABBLKGRPCE(self,x): """2018 Census Block Group""" return (between('0',x,'9',1)) @classmethod def is_valid_TABBLK(self,x): """2018 Block Number""" return (between('0001',x,'9999',4)) @classmethod def is_valid_EUID(self,x): """Privacy Edited Unit ID""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 999999999) @classmethod def is_valid_EPNUM(self,x): """Privacy Edited Person Number Note: For households, EPNUM = 1assigned to the householder(QREL = 01)""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 99999) @classmethod def is_valid_RTYPE(self,x): """Record Type""" return (leftpad(x,1)==leftpad('5',1)) or (leftpad(x,1)==leftpad('3',1)) @classmethod def is_valid_QREL(self,x): """Edited Relationship""" return (leftpad(x,2)==leftpad('12',2)) or (leftpad(x,2)==leftpad('15',2)) or (leftpad(x,2)==leftpad('02',2)) or (leftpad(x,2)==leftpad('04',2)) or (leftpad(x,2)==leftpad('10',2)) or (leftpad(x,2)==leftpad('11',2)) or (leftpad(x,2)==leftpad('09',2)) or (leftpad(x,2)==leftpad('13',2)) or (leftpad(x,2)==leftpad('03',2)) or (leftpad(x,2)==leftpad('14',2)) or (leftpad(x,2)==leftpad('01',2)) or (leftpad(x,2)==leftpad('06',2)) or (leftpad(x,2)==leftpad('07',2)) or (leftpad(x,2)==leftpad('08',2)) or (leftpad(x,2)==leftpad('19',2)) or (leftpad(x,2)==leftpad('16',2)) or (leftpad(x,2)==leftpad('17',2)) or (leftpad(x,2)==leftpad('05',2)) or (leftpad(x,2)==leftpad('18',2)) or (leftpad(x,2)==leftpad('99',2)) @classmethod def is_valid_QSEX(self,x): """Edited Sex""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('2',1)) @classmethod def is_valid_QAGE(self,x): """Edited Age Note: For 2018 End-to-End QAGE = 17 assigned to minors, and QAGE = 18 assigned to voting age persons""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 115) @classmethod def is_valid_CENHISP(self,x): """Hispanic Origin""" return (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('2',1)) @classmethod def is_valid_CENRACE(self,x): """Census Race""" return (leftpad(x,2)==leftpad('43',2)) or (leftpad(x,2)==leftpad('40',2)) or (leftpad(x,2)==leftpad('50',2)) or (leftpad(x,2)==leftpad('04',2)) or (leftpad(x,2)==leftpad('10',2)) or (leftpad(x,2)==leftpad('11',2)) or (leftpad(x,2)==leftpad('13',2)) or (leftpad(x,2)==leftpad('20',2)) or (leftpad(x,2)==leftpad('28',2)) or (leftpad(x,2)==leftpad('25',2)) or (leftpad(x,2)==leftpad('31',2)) or (leftpad(x,2)==leftpad('01',2)) or (leftpad(x,2)==leftpad('37',2)) or (leftpad(x,2)==leftpad('39',2)) or (leftpad(x,2)==leftpad('41',2)) or (leftpad(x,2)==leftpad('42',2)) or (leftpad(x,2)==leftpad('46',2)) or (leftpad(x,2)==leftpad('23',2)) or (leftpad(x,2)==leftpad('53',2)) or (leftpad(x,2)==leftpad('44',2)) or (leftpad(x,2)==leftpad('49',2)) or (leftpad(x,2)==leftpad('62',2)) or (leftpad(x,2)==leftpad('09',2)) or (leftpad(x,2)==leftpad('17',2)) or (leftpad(x,2)==leftpad('47',2)) or (leftpad(x,2)==leftpad('48',2)) or (leftpad(x,2)==leftpad('51',2)) or (leftpad(x,2)==leftpad('30',2)) or (leftpad(x,2)==leftpad('12',2)) or (leftpad(x,2)==leftpad('15',2)) or (leftpad(x,2)==leftpad('35',2)) or (leftpad(x,2)==leftpad('59',2)) or (leftpad(x,2)==leftpad('63',2)) or (leftpad(x,2)==leftpad('07',2)) or (leftpad(x,2)==leftpad('21',2)) or (leftpad(x,2)==leftpad('22',2)) or (leftpad(x,2)==leftpad('57',2)) or (leftpad(x,2)==leftpad('56',2)) or (leftpad(x,2)==leftpad('61',2)) or (leftpad(x,2)==leftpad('52',2)) or (leftpad(x,2)==leftpad('24',2)) or (leftpad(x,2)==leftpad('58',2)) or (leftpad(x,2)==leftpad('02',2)) or (leftpad(x,2)==leftpad('14',2)) or (leftpad(x,2)==leftpad('19',2)) or (leftpad(x,2)==leftpad('26',2)) or (leftpad(x,2)==leftpad('29',2)) or (leftpad(x,2)==leftpad('38',2)) or (leftpad(x,2)==leftpad('03',2)) or (leftpad(x,2)==leftpad('27',2)) or (leftpad(x,2)==leftpad('06',2)) or (leftpad(x,2)==leftpad('08',2)) or (leftpad(x,2)==leftpad('33',2)) or (leftpad(x,2)==leftpad('34',2)) or (leftpad(x,2)==leftpad('36',2)) or (leftpad(x,2)==leftpad('45',2)) or (leftpad(x,2)==leftpad('16',2)) or (leftpad(x,2)==leftpad('32',2)) or (leftpad(x,2)==leftpad('54',2)) or (leftpad(x,2)==leftpad('55',2)) or (leftpad(x,2)==leftpad('05',2)) or (leftpad(x,2)==leftpad('60',2)) or (leftpad(x,2)==leftpad('18',2)) @classmethod def is_valid_QSPANX(self,x): """Edited Hispanic Origin Group""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE1(self,x): """Edited Detailed Race 1""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE2(self,x): """Edited Detailed Race 2""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE3(self,x): """Edited Detailed Race 3""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE4(self,x): """Edited Detailed Race 4""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE5(self,x): """Edited Detailed Race 5""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE6(self,x): """Edited Detailed Race 6""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE7(self,x): """Edited Detailed Race 7""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_QRACE8(self,x): """Edited Detailed Race 8""" return (leftpad(x,4)==leftpad('9999',4)) @classmethod def is_valid_CIT(self,x): """Citizenship""" return (leftpad(x,1)==leftpad('9',1)) @classmethod def validate_pipe_delimited(self,x): fields = x.split('|') if len(fields)!=25: return False if is_valid_SCHEMA_TYPE_CODE(fields[1]) == False: return False if is_valid_SCHEMA_BUILD_ID(fields[2]) == False: return False if is_valid_TABBLKST(fields[3]) == False: return False if is_valid_TABBLKCOU(fields[4]) == False: return False if is_valid_TABTRACTCE(fields[5]) == False: return False if is_valid_TABBLKGRPCE(fields[6]) == False: return False if is_valid_TABBLK(fields[7]) == False: return False if is_valid_EUID(fields[8]) == False: return False if is_valid_EPNUM(fields[9]) == False: return False if is_valid_RTYPE(fields[10]) == False: return False if is_valid_QAGE(fields[13]) == False: return False if is_valid_CENHISP(fields[14]) == False: return False if is_valid_CENRACE(fields[15]) == False: return False return True class MDF_Person: __slots__ = ['SCHEMA_TYPE_CODE', 'SCHEMA_BUILD_ID', 'TABBLKST', 'TABBLKCOU', 'TABTRACTCE', 'TABBLKGRPCE', 'TABBLK', 'EUID', 'EPNUM', 'RTYPE', 'QREL', 'QSEX', 'QAGE', 'CENHISP', 'CENRACE', 'QSPANX', 'QRACE1', 'QRACE2', 'QRACE3', 'QRACE4', 'QRACE5', 'QRACE6', 'QRACE7', 'QRACE8', 'CIT'] def __repr__(self): return 'MDF_Person<SCHEMA_TYPE_CODE:{},SCHEMA_BUILD_ID:{},TABBLKST:{},TABBLKCOU:{},TABTRACTCE:{},TABBLKGRPCE:{},TABBLK:{},EUID:{},EPNUM:{},RTYPE:{},QREL:{},QSEX:{},QAGE:{},CENHISP:{},CENRACE:{},QSPANX:{},QRACE1:{},QRACE2:{},QRACE3:{},QRACE4:{},QRACE5:{},QRACE6:{},QRACE7:{},QRACE8:{},CIT:{}>'.format(self.SCHEMA_TYPE_CODE,self.SCHEMA_BUILD_ID,self.TABBLKST,self.TABBLKCOU,self.TABTRACTCE,self.TABBLKGRPCE,self.TABBLK,self.EUID,self.EPNUM,self.RTYPE,self.QREL,self.QSEX,self.QAGE,self.CENHISP,self.CENRACE,self.QSPANX,self.QRACE1,self.QRACE2,self.QRACE3,self.QRACE4,self.QRACE5,self.QRACE6,self.QRACE7,self.QRACE8,self.CIT) def __init__(self,line=None): if line: if '|' in line: self.parse_pipe_delimited(line) else: self.parse_position_specified(line) @classmethod def name(self): return 'MDF_Person' def parse_pipe_delimited(self,line): fields = line.split('|') if len(fields)!=25: raise ValueError(f'expected 25 fields, found {len(fields)}') self.SCHEMA_TYPE_CODE = fields[0] self.SCHEMA_BUILD_ID = fields[1] self.TABBLKST = fields[2] self.TABBLKCOU = fields[3] self.TABTRACTCE = fields[4] self.TABBLKGRPCE = fields[5] self.TABBLK = fields[6] self.EUID = fields[7] self.EPNUM = fields[8] self.RTYPE = fields[9] self.QAGE = fields[12] self.CENHISP = fields[13] self.CENRACE = fields[14] def parse_position_specified(self,line): self.SCHEMA_TYPE_CODE = None # no column information for SCHEMA_TYPE_CODE self.SCHEMA_BUILD_ID = None # no column information for SCHEMA_BUILD_ID self.TABBLKST = None # no column information for TABBLKST self.TABBLKCOU = None # no column information for TABBLKCOU self.TABTRACTCE = None # no column information for TABTRACTCE self.TABBLKGRPCE = None # no column information for TABBLKGRPCE self.TABBLK = None # no column information for TABBLK self.EUID = None # no column information for EUID self.EPNUM = None # no column information for EPNUM self.RTYPE = None # no column information for RTYPE self.QREL = None # no column information for QREL self.QSEX = None # no column information for QSEX self.QAGE = None # no column information for QAGE self.CENHISP = None # no column information for CENHISP self.CENRACE = None # no column information for CENRACE self.QSPANX = None # no column information for QSPANX self.QRACE1 = None # no column information for QRACE1 self.QRACE2 = None # no column information for QRACE2 self.QRACE3 = None # no column information for QRACE3 self.QRACE4 = None # no column information for QRACE4 self.QRACE5 = None # no column information for QRACE5 self.QRACE6 = None # no column information for QRACE6 self.QRACE7 = None # no column information for QRACE7 self.QRACE8 = None # no column information for QRACE8 self.CIT = None # no column information for CIT def validate(self): """Return True if the object data validates""" if not MDF_Person_validator.is_valid_SCHEMA_TYPE_CODE(self.SCHEMA_TYPE_CODE): return False if not MDF_Person_validator.is_valid_SCHEMA_BUILD_ID(self.SCHEMA_BUILD_ID): return False if not MDF_Person_validator.is_valid_TABBLKST(self.TABBLKST): return False if not MDF_Person_validator.is_valid_TABBLKCOU(self.TABBLKCOU): return False if not MDF_Person_validator.is_valid_TABTRACTCE(self.TABTRACTCE): return False if not MDF_Person_validator.is_valid_TABBLKGRPCE(self.TABBLKGRPCE): return False if not MDF_Person_validator.is_valid_TABBLK(self.TABBLK): return False if not MDF_Person_validator.is_valid_EUID(self.EUID): return False if not MDF_Person_validator.is_valid_EPNUM(self.EPNUM): return False if not MDF_Person_validator.is_valid_RTYPE(self.RTYPE): return False if not MDF_Person_validator.is_valid_QAGE(self.QAGE): return False if not MDF_Person_validator.is_valid_CENHISP(self.CENHISP): return False if not MDF_Person_validator.is_valid_CENRACE(self.CENRACE): return False return True def validate_reason(self): reason=[] if not MDF_Person_validator.is_valid_SCHEMA_TYPE_CODE(self.SCHEMA_TYPE_CODE): reason.append('SCHEMA_TYPE_CODE ('+str(self.SCHEMA_TYPE_CODE)+') out of range (MPD-MPD)') if not MDF_Person_validator.is_valid_SCHEMA_BUILD_ID(self.SCHEMA_BUILD_ID): reason.append('SCHEMA_BUILD_ID ('+str(self.SCHEMA_BUILD_ID)+') out of range (3.1.4-3.1.4)') if not MDF_Person_validator.is_valid_TABBLKST(self.TABBLKST): reason.append('TABBLKST ('+str(self.TABBLKST)+') out of range (04-06, 53-56, 01-02, 08-13, 72-72, 44-51, 15-42)') if not MDF_Person_validator.is_valid_TABBLKCOU(self.TABBLKCOU): reason.append('TABBLKCOU ('+str(self.TABBLKCOU)+') out of range (001-840)') if not MDF_Person_validator.is_valid_TABTRACTCE(self.TABTRACTCE): reason.append('TABTRACTCE ('+str(self.TABTRACTCE)+') out of range (000100-998999)') if not MDF_Person_validator.is_valid_TABBLKGRPCE(self.TABBLKGRPCE): reason.append('TABBLKGRPCE ('+str(self.TABBLKGRPCE)+') out of range (0-9)') if not MDF_Person_validator.is_valid_TABBLK(self.TABBLK): reason.append('TABBLK ('+str(self.TABBLK)+') out of range (0001-9999)') if not MDF_Person_validator.is_valid_EUID(self.EUID): reason.append('EUID ('+str(self.EUID)+') out of range (0-999999999)') if not MDF_Person_validator.is_valid_EPNUM(self.EPNUM): reason.append('EPNUM ('+str(self.EPNUM)+') out of range (0-99999)') if not MDF_Person_validator.is_valid_RTYPE(self.RTYPE): reason.append('RTYPE ('+str(self.RTYPE)+') out of range (5-5, 3-3)') if not MDF_Person_validator.is_valid_QAGE(self.QAGE): reason.append('QAGE ('+str(self.QAGE)+') out of range (0-115)') if not MDF_Person_validator.is_valid_CENHISP(self.CENHISP): reason.append('CENHISP ('+str(self.CENHISP)+') out of range (1-1, 2-2)') if not MDF_Person_validator.is_valid_CENRACE(self.CENRACE): reason.append('CENRACE ('+str(self.CENRACE)+') out of range (43-43, 40-40, 50-50, 04-04, 10-10, 11-11, 13-13, 20-20, 28-28, 25-25, 31-31, 01-01, 37-37, 39-39, 41-41, 42-42, 46-46, 23-23, 53-53, 44-44, 49-49, 62-62, 09-09, 17-17, 47-47, 48-48, 51-51, 30-30, 12-12, 15-15, 35-35, 59-59, 63-63, 07-07, 21-21, 22-22, 57-57, 56-56, 61-61, 52-52, 24-24, 58-58, 02-02, 14-14, 19-19, 26-26, 29-29, 38-38, 03-03, 27-27, 06-06, 08-08, 33-33, 34-34, 36-36, 45-45, 16-16, 32-32, 54-54, 55-55, 05-05, 60-60, 18-18)') return ', '.join(reason) def SparkSQLRow(self): """Return a SparkSQL Row object for this object.""" from pyspark.sql import Row return Row( schema_type_code=safe_str(self.SCHEMA_TYPE_CODE), schema_build_id=safe_str(self.SCHEMA_BUILD_ID), tabblkst=safe_str(self.TABBLKST), tabblkcou=safe_str(self.TABBLKCOU), tabtractce=safe_str(self.TABTRACTCE), tabblkgrpce=safe_str(self.TABBLKGRPCE), tabblk=safe_str(self.TABBLK), euid=safe_int(self.EUID), epnum=safe_int(self.EPNUM), rtype=safe_str(self.RTYPE), qage=safe_int(self.QAGE), cenhisp=safe_str(self.CENHISP), cenrace=safe_str(self.CENRACE), ) def leftpad(x,width): return ' '*(width-len(str(x)))+str(x) def between(a,b,c,width): return leftpad(a,width) <= leftpad(b,width) <= leftpad(c,width) def safe_int(i): try: return int(i) except (TypeError, ValueError) as e: return None def safe_float(i): try: return float(i) except (TypeError, ValueError) as e: return None def safe_str(i): try: return str(i) except (TypeError, ValueError) as e: return None class MDF_Unit_validator: @classmethod def is_valid_SCHEMA_TYPE_CODE(self,x): """Schema Type Code""" return (leftpad(x,5)==leftpad('MUD',5)) @classmethod def is_valid_SCHEMA_BUILD_ID(self,x): """Schema Build ID""" return (leftpad(x,5)==leftpad('3.1.4',5)) @classmethod def is_valid_TABBLKST(self,x): """2018 Tabulation State (FIPS)""" return (between('04',x,'06',2)) or (between('53',x,'56',2)) or (between('01',x,'02',2)) or (between('08',x,'13',2)) or (leftpad(x,2)==leftpad('72',2)) or (between('44',x,'51',2)) or (between('15',x,'42',2)) @classmethod def is_valid_TABBLKCOU(self,x): """2018 Tabulation County (FIPS)""" return (between('001',x,'840',3)) @classmethod def is_valid_TABTRACTCE(self,x): """2018 Tabulation Census Tract""" return (between('000100',x,'998999',6)) @classmethod def is_valid_TABBLKGRPCE(self,x): """2018 Census Block Group""" return (between('0',x,'9',1)) @classmethod def is_valid_TABBLK(self,x): """2018 Block Number""" return (between('0001',x,'9999',4)) @classmethod def is_valid_EUID(self,x): """Privacy Edited Unit ID""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 999999999) @classmethod def is_valid_RTYPE(self,x): """Record Type""" return (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_GQTYPE(self,x): """Group Quarters Type Note: For 2018 End-to-End, values will be assigned as follows: 000 = NIU 101 = 101..106 201 = 201..203 301 = 301 401 = 401..405 501 = 501..502 601 = 601..602 701 = 701..706, 801..802, 900..904""" return (leftpad(x,3)==leftpad('405',3)) or (leftpad(x,3)==leftpad('702',3)) or (leftpad(x,3)==leftpad('401',3)) or (leftpad(x,3)==leftpad('802',3)) or (leftpad(x,3)==leftpad('900',3)) or (leftpad(x,3)==leftpad('104',3)) or (leftpad(x,3)==leftpad('101',3)) or (leftpad(x,3)==leftpad('201',3)) or (leftpad(x,3)==leftpad('402',3)) or (leftpad(x,3)==leftpad('602',3)) or (leftpad(x,3)==leftpad('701',3)) or (leftpad(x,3)==leftpad('903',3)) or (leftpad(x,3)==leftpad('103',3)) or (leftpad(x,3)==leftpad('404',3)) or (leftpad(x,3)==leftpad('501',3)) or (leftpad(x,3)==leftpad('403',3)) or (leftpad(x,3)==leftpad('102',3)) or (leftpad(x,3)==leftpad('601',3)) or (leftpad(x,3)==leftpad('901',3)) or (leftpad(x,3)==leftpad('203',3)) or (leftpad(x,3)==leftpad('801',3)) or (leftpad(x,3)==leftpad('904',3)) or (leftpad(x,3)==leftpad('106',3)) or (leftpad(x,3)==leftpad('202',3)) or (leftpad(x,3)==leftpad('301',3)) or (leftpad(x,3)==leftpad('000',3)) or (leftpad(x,3)==leftpad('704',3)) or (leftpad(x,3)==leftpad('706',3)) or (leftpad(x,3)==leftpad('105',3)) or (leftpad(x,3)==leftpad('502',3)) @classmethod def is_valid_TEN(self,x): """Tenure""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('3',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_VACS(self,x): """Vacancy Status""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('6',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('7',1)) or (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('3',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('5',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_FINAL_POP(self,x): """Population Count""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 99999) @classmethod def is_valid_HHT(self,x): """Household/Family Type""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('6',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('7',1)) or (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('3',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('5',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_HHT2(self,x): """Household/Family Type (NEW)""" return (leftpad(x,2)==leftpad('12',2)) or (leftpad(x,2)==leftpad('04',2)) or (leftpad(x,2)==leftpad('02',2)) or (leftpad(x,2)==leftpad('00',2)) or (leftpad(x,2)==leftpad('10',2)) or (leftpad(x,2)==leftpad('09',2)) or (leftpad(x,2)==leftpad('11',2)) or (leftpad(x,2)==leftpad('03',2)) or (leftpad(x,2)==leftpad('99',2)) or (leftpad(x,2)==leftpad('01',2)) or (leftpad(x,2)==leftpad('06',2)) or (leftpad(x,2)==leftpad('07',2)) or (leftpad(x,2)==leftpad('08',2)) or (leftpad(x,2)==leftpad('05',2)) @classmethod def is_valid_NPF(self,x): """Number of People in Family""" x = str(x).strip() try: x = int(x) except ValueError: return False return (x==0) or (2 <= x <= 97) or (x==99) @classmethod def is_valid_CPLT(self,x): """Couple Type""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('3',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_UPART(self,x): """Presence and Type of Unmarried Partner Household""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('3',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('5',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_MULTG(self,x): """Multigenerational Household""" return (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('2',1)) @classmethod def is_valid_HHLDRAGE(self,x): """Age of Householder""" x = str(x).strip() try: x = int(x) except ValueError: return False return (x==0) or (15 <= x <= 115) or (x==999) @classmethod def is_valid_HHSPAN(self,x): """Hispanic Householder""" return (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('2',1)) @classmethod def is_valid_HHRACE(self,x): """Race of Householder""" return (leftpad(x,2)==leftpad('43',2)) or (leftpad(x,2)==leftpad('40',2)) or (leftpad(x,2)==leftpad('50',2)) or (leftpad(x,2)==leftpad('04',2)) or (leftpad(x,2)==leftpad('00',2)) or (leftpad(x,2)==leftpad('10',2)) or (leftpad(x,2)==leftpad('11',2)) or (leftpad(x,2)==leftpad('13',2)) or (leftpad(x,2)==leftpad('20',2)) or (leftpad(x,2)==leftpad('25',2)) or (leftpad(x,2)==leftpad('28',2)) or (leftpad(x,2)==leftpad('01',2)) or (leftpad(x,2)==leftpad('31',2)) or (leftpad(x,2)==leftpad('39',2)) or (leftpad(x,2)==leftpad('41',2)) or (leftpad(x,2)==leftpad('42',2)) or (leftpad(x,2)==leftpad('46',2)) or (leftpad(x,2)==leftpad('23',2)) or (leftpad(x,2)==leftpad('53',2)) or (leftpad(x,2)==leftpad('44',2)) or (leftpad(x,2)==leftpad('49',2)) or (leftpad(x,2)==leftpad('62',2)) or (leftpad(x,2)==leftpad('09',2)) or (leftpad(x,2)==leftpad('17',2)) or (leftpad(x,2)==leftpad('47',2)) or (leftpad(x,2)==leftpad('48',2)) or (leftpad(x,2)==leftpad('51',2)) or (leftpad(x,2)==leftpad('30',2)) or (leftpad(x,2)==leftpad('99',2)) or (leftpad(x,2)==leftpad('12',2)) or (leftpad(x,2)==leftpad('15',2)) or (leftpad(x,2)==leftpad('35',2)) or (leftpad(x,2)==leftpad('59',2)) or (leftpad(x,2)==leftpad('63',2)) or (leftpad(x,2)==leftpad('07',2)) or (leftpad(x,2)==leftpad('21',2)) or (leftpad(x,2)==leftpad('22',2)) or (leftpad(x,2)==leftpad('57',2)) or (leftpad(x,2)==leftpad('56',2)) or (leftpad(x,2)==leftpad('61',2)) or (leftpad(x,2)==leftpad('52',2)) or (leftpad(x,2)==leftpad('24',2)) or (leftpad(x,2)==leftpad('37',2)) or (leftpad(x,2)==leftpad('58',2)) or (leftpad(x,2)==leftpad('02',2)) or (leftpad(x,2)==leftpad('19',2)) or (leftpad(x,2)==leftpad('14',2)) or (leftpad(x,2)==leftpad('26',2)) or (leftpad(x,2)==leftpad('29',2)) or (leftpad(x,2)==leftpad('38',2)) or (leftpad(x,2)==leftpad('03',2)) or (leftpad(x,2)==leftpad('27',2)) or (leftpad(x,2)==leftpad('06',2)) or (leftpad(x,2)==leftpad('08',2)) or (leftpad(x,2)==leftpad('33',2)) or (leftpad(x,2)==leftpad('34',2)) or (leftpad(x,2)==leftpad('36',2)) or (leftpad(x,2)==leftpad('45',2)) or (leftpad(x,2)==leftpad('16',2)) or (leftpad(x,2)==leftpad('32',2)) or (leftpad(x,2)==leftpad('54',2)) or (leftpad(x,2)==leftpad('55',2)) or (leftpad(x,2)==leftpad('05',2)) or (leftpad(x,2)==leftpad('60',2)) or (leftpad(x,2)==leftpad('18',2)) @classmethod def is_valid_PAOC(self,x): """Presence and Age of Own Children Under 18""" return (leftpad(x,1)==leftpad('9',1)) or (leftpad(x,1)==leftpad('1',1)) or (leftpad(x,1)==leftpad('2',1)) or (leftpad(x,1)==leftpad('3',1)) or (leftpad(x,1)==leftpad('0',1)) or (leftpad(x,1)==leftpad('4',1)) @classmethod def is_valid_P18(self,x): """Number of People Under 18 Years in Household""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 97) or (x==99) @classmethod def is_valid_P60(self,x): """Number of People 60 Years and Over in Household""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 97) or (x==99) @classmethod def is_valid_P65(self,x): """Number of People 65 Years and Over in Household""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 97) or (x==99) @classmethod def is_valid_P75(self,x): """Number of People 75 Years and Over in Household""" x = str(x).strip() try: x = int(x) except ValueError: return False return (0 <= x <= 97) or (x==99) @classmethod def validate_pipe_delimited(self,x): fields = x.split('|') if len(fields)!=27: return False if is_valid_SCHEMA_TYPE_CODE(fields[1]) == False: return False if is_valid_SCHEMA_BUILD_ID(fields[2]) == False: return False if is_valid_TABBLKST(fields[3]) == False: return False if is_valid_TABBLKCOU(fields[4]) == False: return False if is_valid_TABTRACTCE(fields[5]) == False: return False if is_valid_TABBLKGRPCE(fields[6]) == False: return False if is_valid_TABBLK(fields[7]) == False: return False if is_valid_EUID(fields[8]) == False: return False if is_valid_RTYPE(fields[9]) == False: return False if is_valid_GQTYPE(fields[10]) == False: return False if is_valid_TEN(fields[11]) == False: return False if is_valid_VACS(fields[12]) == False: return False if is_valid_FINAL_POP(fields[13]) == False: return False return True class MDF_Unit: __slots__ = ['SCHEMA_TYPE_CODE', 'SCHEMA_BUILD_ID', 'TABBLKST', 'TABBLKCOU', 'TABTRACTCE', 'TABBLKGRPCE', 'TABBLK', 'EUID', 'RTYPE', 'GQTYPE', 'TEN', 'VACS', 'FINAL_POP', 'HHT', 'HHT2', 'NPF', 'CPLT', 'UPART', 'MULTG', 'HHLDRAGE', 'HHSPAN', 'HHRACE', 'PAOC', 'P18', 'P60', 'P65', 'P75'] def __repr__(self): return 'MDF_Unit<SCHEMA_TYPE_CODE:{},SCHEMA_BUILD_ID:{},TABBLKST:{},TABBLKCOU:{},TABTRACTCE:{},TABBLKGRPCE:{},TABBLK:{},EUID:{},RTYPE:{},GQTYPE:{},TEN:{},VACS:{},FINAL_POP:{},HHT:{},HHT2:{},NPF:{},CPLT:{},UPART:{},MULTG:{},HHLDRAGE:{},HHSPAN:{},HHRACE:{},PAOC:{},P18:{},P60:{},P65:{},P75:{}>'.format(self.SCHEMA_TYPE_CODE,self.SCHEMA_BUILD_ID,self.TABBLKST,self.TABBLKCOU,self.TABTRACTCE,self.TABBLKGRPCE,self.TABBLK,self.EUID,self.RTYPE,self.GQTYPE,self.TEN,self.VACS,self.FINAL_POP,self.HHT,self.HHT2,self.NPF,self.CPLT,self.UPART,self.MULTG,self.HHLDRAGE,self.HHSPAN,self.HHRACE,self.PAOC,self.P18,self.P60,self.P65,self.P75) def __init__(self,line=None): if line: if '|' in line: self.parse_pipe_delimited(line) else: self.parse_position_specified(line) @classmethod def name(self): return 'MDF_Unit' def parse_pipe_delimited(self,line): fields = line.split('|') if len(fields)!=27: raise ValueError(f'expected 27 fields, found {len(fields)}') self.SCHEMA_TYPE_CODE = fields[0] self.SCHEMA_BUILD_ID = fields[1] self.TABBLKST = fields[2] self.TABBLKCOU = fields[3] self.TABTRACTCE = fields[4] self.TABBLKGRPCE = fields[5] self.TABBLK = fields[6] self.EUID = fields[7] self.RTYPE = fields[8] self.GQTYPE = fields[9] self.TEN = fields[10] self.VACS = fields[11] self.FINAL_POP = fields[12] def parse_position_specified(self,line): self.SCHEMA_TYPE_CODE = None # no column information for SCHEMA_TYPE_CODE self.SCHEMA_BUILD_ID = None # no column information for SCHEMA_BUILD_ID self.TABBLKST = None # no column information for TABBLKST self.TABBLKCOU = None # no column information for TABBLKCOU self.TABTRACTCE = None # no column information for TABTRACTCE self.TABBLKGRPCE = None # no column information for TABBLKGRPCE self.TABBLK = None # no column information for TABBLK self.EUID = None # no column information for EUID self.RTYPE = None # no column information for RTYPE self.GQTYPE = None # no column information for GQTYPE self.TEN = None # no column information for TEN self.VACS = None # no column information for VACS self.FINAL_POP = None # no column information for FINAL_POP self.HHT = None # no column information for HHT self.HHT2 = None # no column information for HHT2 self.NPF = None # no column information for NPF self.CPLT = None # no column information for CPLT self.UPART = None # no column information for UPART self.MULTG = None # no column information for MULTG self.HHLDRAGE = None # no column information for HHLDRAGE self.HHSPAN = None # no column information for HHSPAN self.HHRACE = None # no column information for HHRACE self.PAOC = None # no column information for PAOC self.P18 = None # no column information for P18 self.P60 = None # no column information for P60 self.P65 = None # no column information for P65 self.P75 = None # no column information for P75 def validate(self): """Return True if the object data validates""" if not MDF_Unit_validator.is_valid_SCHEMA_TYPE_CODE(self.SCHEMA_TYPE_CODE): return False if not MDF_Unit_validator.is_valid_SCHEMA_BUILD_ID(self.SCHEMA_BUILD_ID): return False if not MDF_Unit_validator.is_valid_TABBLKST(self.TABBLKST): return False if not MDF_Unit_validator.is_valid_TABBLKCOU(self.TABBLKCOU): return False if not MDF_Unit_validator.is_valid_TABTRACTCE(self.TABTRACTCE): return False if not MDF_Unit_validator.is_valid_TABBLKGRPCE(self.TABBLKGRPCE): return False if not MDF_Unit_validator.is_valid_TABBLK(self.TABBLK): return False if not MDF_Unit_validator.is_valid_EUID(self.EUID): return False if not MDF_Unit_validator.is_valid_RTYPE(self.RTYPE): return False if not MDF_Unit_validator.is_valid_GQTYPE(self.GQTYPE): return False if not MDF_Unit_validator.is_valid_TEN(self.TEN): return False if not MDF_Unit_validator.is_valid_VACS(self.VACS): return False if not MDF_Unit_validator.is_valid_FINAL_POP(self.FINAL_POP): return False return True def validate_reason(self): reason=[] if not MDF_Unit_validator.is_valid_SCHEMA_TYPE_CODE(self.SCHEMA_TYPE_CODE): reason.append('SCHEMA_TYPE_CODE ('+str(self.SCHEMA_TYPE_CODE)+') out of range (MUD-MUD)') if not MDF_Unit_validator.is_valid_SCHEMA_BUILD_ID(self.SCHEMA_BUILD_ID): reason.append('SCHEMA_BUILD_ID ('+str(self.SCHEMA_BUILD_ID)+') out of range (3.1.4-3.1.4)') if not MDF_Unit_validator.is_valid_TABBLKST(self.TABBLKST): reason.append('TABBLKST ('+str(self.TABBLKST)+') out of range (04-06, 53-56, 01-02, 08-13, 72-72, 44-51, 15-42)') if not MDF_Unit_validator.is_valid_TABBLKCOU(self.TABBLKCOU): reason.append('TABBLKCOU ('+str(self.TABBLKCOU)+') out of range (001-840)') if not MDF_Unit_validator.is_valid_TABTRACTCE(self.TABTRACTCE): reason.append('TABTRACTCE ('+str(self.TABTRACTCE)+') out of range (000100-998999)') if not MDF_Unit_validator.is_valid_TABBLKGRPCE(self.TABBLKGRPCE): reason.append('TABBLKGRPCE ('+str(self.TABBLKGRPCE)+') out of range (0-9)') if not MDF_Unit_validator.is_valid_TABBLK(self.TABBLK): reason.append('TABBLK ('+str(self.TABBLK)+') out of range (0001-9999)') if not MDF_Unit_validator.is_valid_EUID(self.EUID): reason.append('EUID ('+str(self.EUID)+') out of range (0-999999999)') if not MDF_Unit_validator.is_valid_RTYPE(self.RTYPE): reason.append('RTYPE ('+str(self.RTYPE)+') out of range (2-2, 4-4)') if not MDF_Unit_validator.is_valid_GQTYPE(self.GQTYPE): reason.append('GQTYPE ('+str(self.GQTYPE)+') out of range (405-405, 702-702, 401-401, 802-802, 900-900, 104-104, 101-101, 201-201, 402-402, 602-602, 701-701, 903-903, 103-103, 404-404, 501-501, 403-403, 102-102, 601-601, 901-901, 203-203, 801-801, 904-904, 106-106, 202-202, 301-301, 000-000, 704-704, 706-706, 105-105, 502-502)') if not MDF_Unit_validator.is_valid_TEN(self.TEN): reason.append('TEN ('+str(self.TEN)+') out of range (9-9, 1-1, 2-2, 3-3, 0-0, 4-4)') if not MDF_Unit_validator.is_valid_VACS(self.VACS): reason.append('VACS ('+str(self.VACS)+') out of range (9-9, 6-6, 1-1, 7-7, 2-2, 3-3, 0-0, 5-5, 4-4)') if not MDF_Unit_validator.is_valid_FINAL_POP(self.FINAL_POP): reason.append('FINAL_POP ('+str(self.FINAL_POP)+') out of range (0-99999)') return ', '.join(reason) def SparkSQLRow(self): """Return a SparkSQL Row object for this object.""" from pyspark.sql import Row return Row( schema_type_code=safe_str(self.SCHEMA_TYPE_CODE), schema_build_id=safe_str(self.SCHEMA_BUILD_ID), tabblkst=safe_str(self.TABBLKST), tabblkcou=safe_str(self.TABBLKCOU), tabtractce=safe_str(self.TABTRACTCE), tabblkgrpce=safe_str(self.TABBLKGRPCE), tabblk=safe_str(self.TABBLK), euid=safe_int(self.EUID), rtype=safe_str(self.RTYPE), gqtype=safe_str(self.GQTYPE), ten=safe_str(self.TEN), vacs=safe_str(self.VACS), final_pop=safe_int(self.FINAL_POP), ) SPEC_CLASS_OBJECTS = [MDF_Person(),MDF_Unit()] null = None SPEC_DICT = {"tables": {"MDF_Person": {"name": "MDF_Person", "variables": [{"name": "SCHEMA_TYPE_CODE", "vtype": "CHAR", "position": "1", "desc": "Schema Type Code", "column": null, "width": 5, "ranges": [{"a": "MPD", "b": "MPD"}]}, {"name": "SCHEMA_BUILD_ID", "vtype": "CHAR", "position": "2", "desc": "Schema Build ID", "column": null, "width": 5, "ranges": [{"a": "3.1.4", "b": "3.1.4"}]}, {"name": "TABBLKST", "vtype": "CHAR", "position": "3", "desc": "2018 Tabulation State (FIPS)", "column": null, "width": 2, "ranges": [{"a": "04", "b": "06"}, {"a": "53", "b": "56"}, {"a": "01", "b": "02"}, {"a": "08", "b": "13"}, {"a": "72", "b": "72"}, {"a": "44", "b": "51"}, {"a": "15", "b": "42"}]}, {"name": "TABBLKCOU", "vtype": "CHAR", "position": "4", "desc": "2018 Tabulation County (FIPS)", "column": null, "width": 3, "ranges": [{"a": "001", "b": "840"}]}, {"name": "TABTRACTCE", "vtype": "CHAR", "position": "5", "desc": "2018 Tabulation Census Tract", "column": null, "width": 6, "ranges": [{"a": "000100", "b": "998999"}]}, {"name": "TABBLKGRPCE", "vtype": "CHAR", "position": "6", "desc": "2018 Census Block Group", "column": null, "width": 1, "ranges": [{"a": "0", "b": "9"}]}, {"name": "TABBLK", "vtype": "CHAR", "position": "7", "desc": "2018 Block Number", "column": null, "width": 4, "ranges": [{"a": "0001", "b": "9999"}]}, {"name": "EUID", "vtype": "INT", "position": "8", "desc": "Privacy Edited Unit ID", "column": null, "width": 9, "ranges": [{"a": 0, "b": 999999999}]}, {"name": "EPNUM", "vtype": "INT", "position": "9", "desc": "Privacy Edited Person Number Note: For households, EPNUM = 1assigned to the householder(QREL = 01)", "column": null, "width": 5, "ranges": [{"a": 0, "b": 99999}]}, {"name": "RTYPE", "vtype": "CHAR", "position": "10", "desc": "Record Type", "column": null, "width": 1, "ranges": [{"a": "5", "b": "5"}, {"a": "3", "b": "3"}]}, {"name": "QREL", "vtype": "CHAR", "position": "11", "desc": "Edited Relationship", "column": null, "width": 2, "ranges": [{"a": "12", "b": "12"}, {"a": "15", "b": "15"}, {"a": "02", "b": "02"}, {"a": "04", "b": "04"}, {"a": "10", "b": "10"}, {"a": "11", "b": "11"}, {"a": "09", "b": "09"}, {"a": "13", "b": "13"}, {"a": "03", "b": "03"}, {"a": "14", "b": "14"}, {"a": "01", "b": "01"}, {"a": "06", "b": "06"}, {"a": "07", "b": "07"}, {"a": "08", "b": "08"}, {"a": "19", "b": "19"}, {"a": "16", "b": "16"}, {"a": "17", "b": "17"}, {"a": "05", "b": "05"}, {"a": "18", "b": "18"}, {"a": "99", "b": "99"}]}, {"name": "QSEX", "vtype": "CHAR", "position": "12", "desc": "Edited Sex", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "1", "b": "1"}, {"a": "2", "b": "2"}]}, {"name": "QAGE", "vtype": "INT", "position": "13", "desc": "Edited Age Note: For 2018 End-to-End QAGE = 17 assigned to minors, and QAGE = 18 assigned to voting age persons", "column": null, "width": 3, "ranges": [{"a": 0, "b": 115}]}, {"name": "CENHISP", "vtype": "CHAR", "position": "14", "desc": "Hispanic Origin", "column": null, "width": 1, "ranges": [{"a": "1", "b": "1"}, {"a": "2", "b": "2"}]}, {"name": "CENRACE", "vtype": "CHAR", "position": "15", "desc": "Census Race", "column": null, "width": 2, "ranges": [{"a": "43", "b": "43"}, {"a": "40", "b": "40"}, {"a": "50", "b": "50"}, {"a": "04", "b": "04"}, {"a": "10", "b": "10"}, {"a": "11", "b": "11"}, {"a": "13", "b": "13"}, {"a": "20", "b": "20"}, {"a": "28", "b": "28"}, {"a": "25", "b": "25"}, {"a": "31", "b": "31"}, {"a": "01", "b": "01"}, {"a": "37", "b": "37"}, {"a": "39", "b": "39"}, {"a": "41", "b": "41"}, {"a": "42", "b": "42"}, {"a": "46", "b": "46"}, {"a": "23", "b": "23"}, {"a": "53", "b": "53"}, {"a": "44", "b": "44"}, {"a": "49", "b": "49"}, {"a": "62", "b": "62"}, {"a": "09", "b": "09"}, {"a": "17", "b": "17"}, {"a": "47", "b": "47"}, {"a": "48", "b": "48"}, {"a": "51", "b": "51"}, {"a": "30", "b": "30"}, {"a": "12", "b": "12"}, {"a": "15", "b": "15"}, {"a": "35", "b": "35"}, {"a": "59", "b": "59"}, {"a": "63", "b": "63"}, {"a": "07", "b": "07"}, {"a": "21", "b": "21"}, {"a": "22", "b": "22"}, {"a": "57", "b": "57"}, {"a": "56", "b": "56"}, {"a": "61", "b": "61"}, {"a": "52", "b": "52"}, {"a": "24", "b": "24"}, {"a": "58", "b": "58"}, {"a": "02", "b": "02"}, {"a": "14", "b": "14"}, {"a": "19", "b": "19"}, {"a": "26", "b": "26"}, {"a": "29", "b": "29"}, {"a": "38", "b": "38"}, {"a": "03", "b": "03"}, {"a": "27", "b": "27"}, {"a": "06", "b": "06"}, {"a": "08", "b": "08"}, {"a": "33", "b": "33"}, {"a": "34", "b": "34"}, {"a": "36", "b": "36"}, {"a": "45", "b": "45"}, {"a": "16", "b": "16"}, {"a": "32", "b": "32"}, {"a": "54", "b": "54"}, {"a": "55", "b": "55"}, {"a": "05", "b": "05"}, {"a": "60", "b": "60"}, {"a": "18", "b": "18"}]}, {"name": "QSPANX", "vtype": "CHAR", "position": "16", "desc": "Edited Hispanic Origin Group", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE1", "vtype": "CHAR", "position": "17", "desc": "Edited Detailed Race 1", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE2", "vtype": "CHAR", "position": "18", "desc": "Edited Detailed Race 2", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE3", "vtype": "CHAR", "position": "19", "desc": "Edited Detailed Race 3", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE4", "vtype": "CHAR", "position": "20", "desc": "Edited Detailed Race 4", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE5", "vtype": "CHAR", "position": "21", "desc": "Edited Detailed Race 5", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE6", "vtype": "CHAR", "position": "22", "desc": "Edited Detailed Race 6", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE7", "vtype": "CHAR", "position": "23", "desc": "Edited Detailed Race 7", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "QRACE8", "vtype": "CHAR", "position": "24", "desc": "Edited Detailed Race 8", "column": null, "width": 4, "ranges": [{"a": "9999", "b": "9999"}]}, {"name": "CIT", "vtype": "CHAR", "position": "25", "desc": "Citizenship", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}]}]}, "MDF_Unit": {"name": "MDF_Unit", "variables": [{"name": "SCHEMA_TYPE_CODE", "vtype": "CHAR", "position": "1", "desc": "Schema Type Code", "column": null, "width": 5, "ranges": [{"a": "MUD", "b": "MUD"}]}, {"name": "SCHEMA_BUILD_ID", "vtype": "CHAR", "position": "2", "desc": "Schema Build ID", "column": null, "width": 5, "ranges": [{"a": "3.1.4", "b": "3.1.4"}]}, {"name": "TABBLKST", "vtype": "CHAR", "position": "3", "desc": "2018 Tabulation State (FIPS)", "column": null, "width": 2, "ranges": [{"a": "04", "b": "06"}, {"a": "53", "b": "56"}, {"a": "01", "b": "02"}, {"a": "08", "b": "13"}, {"a": "72", "b": "72"}, {"a": "44", "b": "51"}, {"a": "15", "b": "42"}]}, {"name": "TABBLKCOU", "vtype": "CHAR", "position": "4", "desc": "2018 Tabulation County (FIPS)", "column": null, "width": 3, "ranges": [{"a": "001", "b": "840"}]}, {"name": "TABTRACTCE", "vtype": "CHAR", "position": "5", "desc": "2018 Tabulation Census Tract", "column": null, "width": 6, "ranges": [{"a": "000100", "b": "998999"}]}, {"name": "TABBLKGRPCE", "vtype": "CHAR", "position": "6", "desc": "2018 Census Block Group", "column": null, "width": 1, "ranges": [{"a": "0", "b": "9"}]}, {"name": "TABBLK", "vtype": "CHAR", "position": "7", "desc": "2018 Block Number", "column": null, "width": 4, "ranges": [{"a": "0001", "b": "9999"}]}, {"name": "EUID", "vtype": "INT", "position": "8", "desc": "Privacy Edited Unit ID", "column": null, "width": 9, "ranges": [{"a": 0, "b": 999999999}]}, {"name": "RTYPE", "vtype": "CHAR", "position": "9", "desc": "Record Type", "column": null, "width": 1, "ranges": [{"a": "2", "b": "2"}, {"a": "4", "b": "4"}]}, {"name": "GQTYPE", "vtype": "CHAR", "position": "10", "desc": "Group Quarters Type Note: For 2018 End-to-End, values will be assigned as follows: 000 = NIU 101 = 101..106 201 = 201..203 301 = 301 401 = 401..405 501 = 501..502 601 = 601..602 701 = 701..706, 801..802, 900..904", "column": null, "width": 3, "ranges": [{"a": "405", "b": "405"}, {"a": "702", "b": "702"}, {"a": "401", "b": "401"}, {"a": "802", "b": "802"}, {"a": "900", "b": "900"}, {"a": "104", "b": "104"}, {"a": "101", "b": "101"}, {"a": "201", "b": "201"}, {"a": "402", "b": "402"}, {"a": "602", "b": "602"}, {"a": "701", "b": "701"}, {"a": "903", "b": "903"}, {"a": "103", "b": "103"}, {"a": "404", "b": "404"}, {"a": "501", "b": "501"}, {"a": "403", "b": "403"}, {"a": "102", "b": "102"}, {"a": "601", "b": "601"}, {"a": "901", "b": "901"}, {"a": "203", "b": "203"}, {"a": "801", "b": "801"}, {"a": "904", "b": "904"}, {"a": "106", "b": "106"}, {"a": "202", "b": "202"}, {"a": "301", "b": "301"}, {"a": "000", "b": "000"}, {"a": "704", "b": "704"}, {"a": "706", "b": "706"}, {"a": "105", "b": "105"}, {"a": "502", "b": "502"}]}, {"name": "TEN", "vtype": "CHAR", "position": "11", "desc": "Tenure", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "1", "b": "1"}, {"a": "2", "b": "2"}, {"a": "3", "b": "3"}, {"a": "0", "b": "0"}, {"a": "4", "b": "4"}]}, {"name": "VACS", "vtype": "CHAR", "position": "12", "desc": "Vacancy Status", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "6", "b": "6"}, {"a": "1", "b": "1"}, {"a": "7", "b": "7"}, {"a": "2", "b": "2"}, {"a": "3", "b": "3"}, {"a": "0", "b": "0"}, {"a": "5", "b": "5"}, {"a": "4", "b": "4"}]}, {"name": "FINAL_POP", "vtype": "INT", "position": "13", "desc": "Population Count", "column": null, "width": 5, "ranges": [{"a": 0, "b": 99999}]}, {"name": "HHT", "vtype": "CHAR", "position": "14", "desc": "Household/Family Type", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "6", "b": "6"}, {"a": "1", "b": "1"}, {"a": "7", "b": "7"}, {"a": "2", "b": "2"}, {"a": "3", "b": "3"}, {"a": "0", "b": "0"}, {"a": "5", "b": "5"}, {"a": "4", "b": "4"}]}, {"name": "HHT2", "vtype": "CHAR", "position": "15", "desc": "Household/Family Type (NEW)", "column": null, "width": 2, "ranges": [{"a": "12", "b": "12"}, {"a": "04", "b": "04"}, {"a": "02", "b": "02"}, {"a": "00", "b": "00"}, {"a": "10", "b": "10"}, {"a": "09", "b": "09"}, {"a": "11", "b": "11"}, {"a": "03", "b": "03"}, {"a": "99", "b": "99"}, {"a": "01", "b": "01"}, {"a": "06", "b": "06"}, {"a": "07", "b": "07"}, {"a": "08", "b": "08"}, {"a": "05", "b": "05"}]}, {"name": "NPF", "vtype": "INT", "position": "16", "desc": "Number of People in Family", "column": null, "width": 2, "ranges": [{"a": 0, "b": 0}, {"a": 99, "b": 99}, {"a": 2, "b": 97}]}, {"name": "CPLT", "vtype": "CHAR", "position": "17", "desc": "Couple Type", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "1", "b": "1"}, {"a": "2", "b": "2"}, {"a": "3", "b": "3"}, {"a": "0", "b": "0"}, {"a": "4", "b": "4"}]}, {"name": "UPART", "vtype": "CHAR", "position": "18", "desc": "Presence and Type of Unmarried Partner Household", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "1", "b": "1"}, {"a": "2", "b": "2"}, {"a": "3", "b": "3"}, {"a": "0", "b": "0"}, {"a": "5", "b": "5"}, {"a": "4", "b": "4"}]}, {"name": "MULTG", "vtype": "CHAR", "position": "19", "desc": "Multigenerational Household", "column": null, "width": 1, "ranges": [{"a": "1", "b": "1"}, {"a": "9", "b": "9"}, {"a": "0", "b": "0"}, {"a": "2", "b": "2"}]}, {"name": "HHLDRAGE", "vtype": "INT", "position": "20", "desc": "Age of Householder", "column": null, "width": 3, "ranges": [{"a": 15, "b": 115}, {"a": 0, "b": 0}, {"a": 999, "b": 999}]}, {"name": "HHSPAN", "vtype": "CHAR", "position": "21", "desc": "Hispanic Householder", "column": null, "width": 1, "ranges": [{"a": "1", "b": "1"}, {"a": "9", "b": "9"}, {"a": "0", "b": "0"}, {"a": "2", "b": "2"}]}, {"name": "HHRACE", "vtype": "CHAR", "position": "22", "desc": "Race of Householder", "column": null, "width": 2, "ranges": [{"a": "43", "b": "43"}, {"a": "40", "b": "40"}, {"a": "50", "b": "50"}, {"a": "04", "b": "04"}, {"a": "00", "b": "00"}, {"a": "10", "b": "10"}, {"a": "11", "b": "11"}, {"a": "13", "b": "13"}, {"a": "20", "b": "20"}, {"a": "25", "b": "25"}, {"a": "28", "b": "28"}, {"a": "01", "b": "01"}, {"a": "31", "b": "31"}, {"a": "39", "b": "39"}, {"a": "41", "b": "41"}, {"a": "42", "b": "42"}, {"a": "46", "b": "46"}, {"a": "23", "b": "23"}, {"a": "53", "b": "53"}, {"a": "44", "b": "44"}, {"a": "49", "b": "49"}, {"a": "62", "b": "62"}, {"a": "09", "b": "09"}, {"a": "17", "b": "17"}, {"a": "47", "b": "47"}, {"a": "48", "b": "48"}, {"a": "51", "b": "51"}, {"a": "30", "b": "30"}, {"a": "99", "b": "99"}, {"a": "12", "b": "12"}, {"a": "15", "b": "15"}, {"a": "35", "b": "35"}, {"a": "59", "b": "59"}, {"a": "63", "b": "63"}, {"a": "07", "b": "07"}, {"a": "21", "b": "21"}, {"a": "22", "b": "22"}, {"a": "57", "b": "57"}, {"a": "56", "b": "56"}, {"a": "61", "b": "61"}, {"a": "52", "b": "52"}, {"a": "24", "b": "24"}, {"a": "37", "b": "37"}, {"a": "58", "b": "58"}, {"a": "02", "b": "02"}, {"a": "19", "b": "19"}, {"a": "14", "b": "14"}, {"a": "26", "b": "26"}, {"a": "29", "b": "29"}, {"a": "38", "b": "38"}, {"a": "03", "b": "03"}, {"a": "27", "b": "27"}, {"a": "06", "b": "06"}, {"a": "08", "b": "08"}, {"a": "33", "b": "33"}, {"a": "34", "b": "34"}, {"a": "36", "b": "36"}, {"a": "45", "b": "45"}, {"a": "16", "b": "16"}, {"a": "32", "b": "32"}, {"a": "54", "b": "54"}, {"a": "55", "b": "55"}, {"a": "05", "b": "05"}, {"a": "60", "b": "60"}, {"a": "18", "b": "18"}]}, {"name": "PAOC", "vtype": "CHAR", "position": "23", "desc": "Presence and Age of Own Children Under 18", "column": null, "width": 1, "ranges": [{"a": "9", "b": "9"}, {"a": "1", "b": "1"}, {"a": "2", "b": "2"}, {"a": "3", "b": "3"}, {"a": "0", "b": "0"}, {"a": "4", "b": "4"}]}, {"name": "P18", "vtype": "INT", "position": "24", "desc": "Number of People Under 18 Years in Household", "column": null, "width": 2, "ranges": [{"a": 99, "b": 99}, {"a": 0, "b": 0}, {"a": 1, "b": 97}]}, {"name": "P60", "vtype": "INT", "position": "25", "desc": "Number of People 60 Years and Over in Household", "column": null, "width": 2, "ranges": [{"a": 99, "b": 99}, {"a": 0, "b": 0}, {"a": 1, "b": 97}]}, {"name": "P65", "vtype": "INT", "position": "26", "desc": "Number of People 65 Years and Over in Household", "column": null, "width": 2, "ranges": [{"a": 99, "b": 99}, {"a": 0, "b": 0}, {"a": 1, "b": 97}]}, {"name": "P75", "vtype": "INT", "position": "27", "desc": "Number of People 75 Years and Over in Household", "column": null, "width": 2, "ranges": [{"a": 99, "b": 99}, {"a": 0, "b": 0}, {"a": 1, "b": 97}]}]}}}
85.590604
14,623
0.566239
7,806
51,012
3.62042
0.0433
0.07643
0.083861
0.092849
0.85825
0.77913
0.750115
0.743569
0.733343
0.717738
0
0.090324
0.177017
51,012
595
14,624
85.734454
0.582845
0.07706
0
0.63
1
0.02
0.20092
0.012108
0
0
0
0
0
1
0.16
false
0
0.004
0.016
0.358
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
93af092c7b746fedcfd2434ff463be3d5fd5a46a
1,099
py
Python
tests/image_gen/color_eq_es.py
cmu-cs-academy/cpython-cmu-graphics
04622a80642156ad646a00203899a8f3726f5b73
[ "BSD-3-Clause" ]
3
2020-02-01T22:24:24.000Z
2020-04-20T16:59:08.000Z
tests/image_gen/color_eq_es.py
cmu-cs-academy/desktop-cmu-graphics
141941029e733bf64a974fc339ede0555505fc20
[ "BSD-3-Clause" ]
7
2021-06-18T00:10:09.000Z
2022-03-28T21:10:20.000Z
tests/image_gen/color_eq_es.py
cmu-cs-academy/desktop-cmu-graphics
141941029e733bf64a974fc339ede0555505fc20
[ "BSD-3-Clause" ]
1
2022-03-16T21:52:58.000Z
2022-03-16T21:52:58.000Z
assert gradiente('rojo', 'azul') == gradiente('rojo', 'azul') assert gradiente('rojo', 'azul', inicio='centro') == gradiente('rojo', 'azul') assert gradiente('rojo', 'azul', inicio='izquierda') == gradiente('rojo', 'azul', inicio='izquierda') assert gradiente('rojo', 'azul') != gradiente('rojo', 'azul', inicio='izquierda') assert gradiente('rojo', 'azul', inicio='izquierda') != gradiente('rojo', 'azul') assert gradiente('rojo', 'verde') != gradiente('rojo', 'azul') assert gradiente('rojo', 'azul', 'naranja') != gradiente('rojo', 'azul') assert rgb(0, 0, 0) == rgb(0, 0, 0) assert rgb(1, 0, 0) != rgb(0, 0, 0) assert rgb(0, 1, 0) != rgb(0, 0, 0) assert rgb(0, 0, 1) != rgb(0, 0, 0) assert gradiente('rojo', rgb(0, 0, 5)) == gradiente('rojo', rgb(0, 0, 5)) assert gradiente('rojo', rgb(0, 0, 5)) != gradiente('rojo', rgb(0, 5, 0)) assert gradiente('rojo', rgb(0, 0, 5)) != gradiente('rojo', 'verde') assert gradiente('rojo', 'verde') != gradiente('rojo', rgb(0, 0, 5)) rect = Rect(50, 50, 150, 150, relleno=gradiente('naranja', 'rojo')) assert rect.relleno == gradiente('naranja', 'rojo')
45.791667
101
0.626024
158
1,099
4.35443
0.107595
0.415698
0.321221
0.200581
0.80814
0.800872
0.700581
0.609012
0.44186
0.180233
0
0.053942
0.122839
1,099
23
102
47.782609
0.659751
0
0
0
0
0
0.205641
0
0
0
0
0
0.941176
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
7
9e01daddbdde0c329b40fbf5ac4f6e0ee7f15c5e
189
py
Python
thirdparty/YLBaseServer.py
ihuanglei/yeelight
6a31beb9a790b4ce85c77db0abe13e25e93a3811
[ "MIT" ]
null
null
null
thirdparty/YLBaseServer.py
ihuanglei/yeelight
6a31beb9a790b4ce85c77db0abe13e25e93a3811
[ "MIT" ]
null
null
null
thirdparty/YLBaseServer.py
ihuanglei/yeelight
6a31beb9a790b4ce85c77db0abe13e25e93a3811
[ "MIT" ]
null
null
null
class YLBaseServer(object): def name(self): pass def handle(self, args): pass def startup(self, *args): pass def stop(self, *args): pass
13.5
29
0.529101
22
189
4.545455
0.5
0.21
0.36
0.3
0
0
0
0
0
0
0
0
0.365079
189
13
30
14.538462
0.833333
0
0
0.444444
0
0
0
0
0
0
0
0
0
1
0.444444
false
0.444444
0
0
0.555556
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
7
f51d151d539da7708abd9be505824d9768d0e12a
14,569
py
Python
tests/output/snapshots/snap_test_text_output.py
agateau-gg/ggshield
c335006433a6d34c2ca3e408415091fb254ee853
[ "MIT" ]
null
null
null
tests/output/snapshots/snap_test_text_output.py
agateau-gg/ggshield
c335006433a6d34c2ca3e408415091fb254ee853
[ "MIT" ]
null
null
null
tests/output/snapshots/snap_test_text_output.py
agateau-gg/ggshield
c335006433a6d34c2ca3e408415091fb254ee853
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_OVERLAY_SCAN_RESULT-clip_long_lines-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_OVERLAY_SCAN_RESULT-clip_long_lines-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_OVERLAY_SCAN_RESULT-verbose-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_OVERLAY_SCAN_RESULT-verbose-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_SCAN_RESULT-clip_long_lines-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_SCAN_RESULT-clip_long_lines-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_SCAN_RESULT-verbose-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_ONE_LINE_PATCH_SCAN_RESULT-verbose-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_TWO_LINES_PATCH_SCAN_RESULT-clip_long_lines-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_TWO_LINES_PATCH_SCAN_RESULT-clip_long_lines-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_TWO_LINES_PATCH_SCAN_RESULT-verbose-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_MULTI_SECRET_TWO_LINES_PATCH_SCAN_RESULT-verbose-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 38d9d3464520ed68f18d16e640a4a8b37ef5b17608b455267d100aa487ead314) (1 occurrence) ''' snapshots['test_leak_message[_ONE_LINE_AND_MULTILINE_PATCH_CONTENT-clip_long_lines-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 3 incidents have been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 1945f4a0c42abb19c1a420ddd09b4b4681249a3057c427b95f794b18595e7ffa) (1 occurrence) >>> Incident 2(Secrets detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) | @@ -0,0 +1,29 @ 1 | …**5733 /ce3f9f********************5e43711 -----BEGIN RSA PRIVATE KEY----- 2 | +MIIBOgIBAAJBAIIRkYjxjE3KIZi******************************+****** 3 | +**************************************************************** 4 | +**************************************************************** 5 | +***********+**************************************************** 6 | +****************+*********************************************** 7 | +**********************+***************************************** 8 | +****+******Xme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | -----END RSA PRIVATE KEY----- token: SG._Yytrtvlj************************… |_________________________________apikey_________________________________| >>> Incident 3(Secrets detection): SendGrid Key (Ignore with SHA: 530e5a4a7ea00814db8845dd0cae5efaa4b974a3ce1c76d0384ba715248a5dc1) (1 occurrence) 7 | **********************+***************************************** 8 | ****+******Xme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | …-- token: SG._Yytrtvlj******************************************-**rRJLGFLBLf0M |_______________________________apikey______________________________| ''' snapshots['test_leak_message[_ONE_LINE_AND_MULTILINE_PATCH_CONTENT-clip_long_lines-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 3 incidents have been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 1945f4a0c42abb19c1a420ddd09b4b4681249a3057c427b95f794b18595e7ffa) (1 occurrence) >>> Incident 2(Secrets detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) | @@ -0,0 +1,29 @ 1 | …041573 / ce3f9f0362bbe5ab01dfc8ee565e4371 -----BEGIN RSA PRIVATE KEY----- 2 | +MIIBOgIBAAJBAIIRkYjxjE3KIZiEc8k4sWWGNsPYRNE0u0bl5oFVApPLm+uXQ/4l 3 | +bKO9LFtMiVPy700oMWLScwAN5OAiqVLMvHUCAwEAAQJANLr8nmEWuV6t2hAwhK5I 4 | +NNmBkEo4M/xFxEtl9J7LKbE2gtNrlCQiJlPP1EMhwAjDOzQcJ3lgFB28dkqH5rMW 5 | +TQIhANrCE7O+wlCKe0WJqQ3lYlHG91XWyGVgfExJwBDsAD9LAiEAmDY5OSsH0n2A 6 | +22tthkAvcN1s66lG+0DztOVJ4QLI2z8CIBPeDGwGpx8pdIicN/5LFuLWbyAcoZaT 7 | +bLaA/DCNPniBAiA0l//bzg+M3srIhm04xzLdR9Vb9IjPRlkvN074zdKDVwIhAKJb 8 | +RF3C+CMFb0wXme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | -----END RSA PRIVATE KEY----- token: SG._YytrtvljkWqCrkMa3r5hw.yijiPf2qxr… |_________________________________apikey_________________________________| >>> Incident 3(Secrets detection): SendGrid Key (Ignore with SHA: 530e5a4a7ea00814db8845dd0cae5efaa4b974a3ce1c76d0384ba715248a5dc1) (1 occurrence) 7 | bLaA/DCNPniBAiA0l//bzg+M3srIhm04xzLdR9Vb9IjPRlkvN074zdKDVwIhAKJb 8 | RF3C+CMFb0wXme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | …-- token: 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 |_______________________________apikey______________________________| ''' snapshots['test_leak_message[_ONE_LINE_AND_MULTILINE_PATCH_CONTENT-verbose-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 3 incidents have been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 1945f4a0c42abb19c1a420ddd09b4b4681249a3057c427b95f794b18595e7ffa) (1 occurrence) >>> Incident 2(Secrets detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) | @@ -0,0 +1,29 @ 1 | FacebookAppKeys:294*********5733 /ce3f9f********************5e43711 -----BEGIN RSA PRIVATE KEY----- 2 | +MIIBOgIBAAJBAIIRkYjxjE3KIZi******************************+****** 3 | +**************************************************************** 4 | +**************************************************************** 5 | +***********+**************************************************** 6 | +****************+*********************************************** 7 | +**********************+***************************************** 8 | +****+******Xme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | -----END RSA PRIVATE KEY----- token: SG._Yytrtvlj******************************************-**rRJLGFLBLf0M >>> Incident 3(Secrets detection): SendGrid Key (Ignore with SHA: 530e5a4a7ea00814db8845dd0cae5efaa4b974a3ce1c76d0384ba715248a5dc1) (1 occurrence) 7 | **********************+***************************************** 8 | ****+******Xme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | -----END RSA PRIVATE KEY----- token: SG._Yytrtvlj******************************************-**rRJLGFLBLf0M |_______________________________apikey______________________________| ''' snapshots['test_leak_message[_ONE_LINE_AND_MULTILINE_PATCH_CONTENT-verbose-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 3 incidents have been found in file leak.txt >>> Incident 1(Secrets Detection): Facebook Access Tokens (Ignore with SHA: 1945f4a0c42abb19c1a420ddd09b4b4681249a3057c427b95f794b18595e7ffa) (1 occurrence) >>> Incident 2(Secrets detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) | @@ -0,0 +1,29 @ 1 | FacebookAppKeys: 294790898041573 / ce3f9f0362bbe5ab01dfc8ee565e4371 -----BEGIN RSA PRIVATE KEY----- 2 | +MIIBOgIBAAJBAIIRkYjxjE3KIZiEc8k4sWWGNsPYRNE0u0bl5oFVApPLm+uXQ/4l 3 | +bKO9LFtMiVPy700oMWLScwAN5OAiqVLMvHUCAwEAAQJANLr8nmEWuV6t2hAwhK5I 4 | +NNmBkEo4M/xFxEtl9J7LKbE2gtNrlCQiJlPP1EMhwAjDOzQcJ3lgFB28dkqH5rMW 5 | +TQIhANrCE7O+wlCKe0WJqQ3lYlHG91XWyGVgfExJwBDsAD9LAiEAmDY5OSsH0n2A 6 | +22tthkAvcN1s66lG+0DztOVJ4QLI2z8CIBPeDGwGpx8pdIicN/5LFuLWbyAcoZaT 7 | +bLaA/DCNPniBAiA0l//bzg+M3srIhm04xzLdR9Vb9IjPRlkvN074zdKDVwIhAKJb 8 | +RF3C+CMFb0wXme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | -----END RSA PRIVATE KEY----- token: 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 >>> Incident 3(Secrets detection): SendGrid Key (Ignore with SHA: 530e5a4a7ea00814db8845dd0cae5efaa4b974a3ce1c76d0384ba715248a5dc1) (1 occurrence) 7 | bLaA/DCNPniBAiA0l//bzg+M3srIhm04xzLdR9Vb9IjPRlkvN074zdKDVwIhAKJb 8 | RF3C+CMFb0wXme/ovcDeM1+3W/UmSHYUW4b3WYq4 9 | -----END RSA PRIVATE KEY----- token: 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 |_______________________________apikey______________________________| ''' snapshots['test_leak_message[_SIMPLE_SECRET_MULTILINE_PATCH_SCAN_RESULT-clip_long_lines-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_MULTILINE_PATCH_SCAN_RESULT-clip_long_lines-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_MULTILINE_PATCH_SCAN_RESULT-verbose-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_MULTILINE_PATCH_SCAN_RESULT-verbose-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): RSA Private Key (Ignore with SHA: 060bf63de122848f5efa122fe6cea504aae3b24cea393d887fdefa1529c6a02e) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_PATCH_SCAN_RESULT-clip_long_lines-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): GitHub Token (Ignore with SHA: 2b5840babacb6f089ddcce1fe5a56b803f8b1f636c6f44cdbf14b0c77a194c93) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_PATCH_SCAN_RESULT-clip_long_lines-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): GitHub Token (Ignore with SHA: 2b5840babacb6f089ddcce1fe5a56b803f8b1f636c6f44cdbf14b0c77a194c93) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_PATCH_SCAN_RESULT-verbose-hide_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): GitHub Token (Ignore with SHA: 2b5840babacb6f089ddcce1fe5a56b803f8b1f636c6f44cdbf14b0c77a194c93) (1 occurrence) ''' snapshots['test_leak_message[_SIMPLE_SECRET_PATCH_SCAN_RESULT-verbose-show_secrets] 1'] = '''> This is an example header secrets-engine-version: 3.14.159 >>> 1 incident has been found in file leak.txt >>> Incident 1(Secrets Detection): GitHub Token (Ignore with SHA: 2b5840babacb6f089ddcce1fe5a56b803f8b1f636c6f44cdbf14b0c77a194c93) (1 occurrence) '''
52.595668
156
0.733407
1,519
14,569
6.624095
0.083608
0.050885
0.041344
0.057245
0.984894
0.984894
0.984894
0.984297
0.984297
0.984297
0
0.14348
0.103027
14,569
276
157
52.786232
0.625115
0.004256
0
0.814815
0
0.126984
0.953254
0.542195
0
0
0
0
0
1
0
false
0
0.010582
0
0.010582
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
199315d3a8ad8d75100ddd46432c4b1824119213
1,485
py
Python
venv/lib/python2.7/site-packages/pychart/afm/Bookman_Demi.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
venv/lib/python2.7/site-packages/pychart/afm/Bookman_Demi.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
venv/lib/python2.7/site-packages/pychart/afm/Bookman_Demi.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
# AFM font Bookman-Demi (path: /usr/share/fonts/afms/adobe/pbkd8a.afm). # Derived from Ghostscript distribution. # Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code. import dir dir.afm["Bookman-Demi"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 340, 360, 420, 660, 660, 940, 800, 320, 320, 320, 460, 600, 340, 360, 340, 600, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 340, 340, 600, 600, 600, 660, 820, 720, 720, 740, 780, 720, 680, 780, 820, 400, 640, 800, 640, 940, 740, 800, 660, 800, 780, 660, 700, 740, 720, 940, 780, 700, 640, 300, 600, 300, 600, 500, 320, 580, 600, 580, 640, 580, 380, 580, 680, 360, 340, 660, 340, 1000, 680, 620, 640, 620, 460, 520, 460, 660, 600, 800, 600, 620, 560, 320, 600, 320, 600, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 360, 660, 660, 120, 660, 660, 600, 660, 240, 540, 400, 220, 220, 740, 740, 500, 500, 440, 380, 340, 500, 800, 460, 320, 540, 540, 400, 1000, 1360, 500, 660, 500, 400, 400, 500, 480, 460, 500, 320, 500, 500, 340, 360, 500, 440, 320, 500, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 1140, 500, 400, 500, 500, 500, 500, 640, 800, 1220, 400, 500, 500, 500, 500, 500, 880, 500, 500, 500, 360, 500, 500, 340, 620, 940, 660, )
247.5
1,294
0.622222
287
1,485
3.219512
0.222997
0.590909
0.798701
0.987013
0.334416
0.298701
0.298701
0.298701
0.298701
0.266234
0
0.632146
0.187205
1,485
5
1,295
297
0.133389
0.115825
0
0
0
0
0.009167
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
10
19a1a91df246aefa88b730cab5ba643bd4817f9f
25,794
py
Python
tetris_objects.py
yuvrajwaraich/Tetris
59a918edad6aefbe23749234ed62edebb42b56c7
[ "MIT" ]
2
2020-09-29T01:42:13.000Z
2020-09-29T01:42:39.000Z
tetris_objects.py
yuvrajwaraich/Tetris
59a918edad6aefbe23749234ed62edebb42b56c7
[ "MIT" ]
null
null
null
tetris_objects.py
yuvrajwaraich/Tetris
59a918edad6aefbe23749234ed62edebb42b56c7
[ "MIT" ]
null
null
null
class OrangeRicky(): def __init__(self, rotation): self.colour = "O" self.rotation = rotation if rotation == 0: self.coords = [[8, 0], [8, 1], [7, 1], [6, 1]] elif rotation == 1: self.coords = [[8, 2], [7, 2], [7, 1], [7, 0]] elif rotation == 2: self.coords = [[6, 2], [6, 1], [7, 1], [8, 1]] elif rotation == 3: self.coords = [[6, 0], [7, 0], [7, 1], [7, 2]] def rotate(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) if self.rotation == 0: if board[self.coords[0][0]][self.coords[0][1] + 2].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][1] += 2 self.coords[1][1] += 1 self.coords[1][0] -= 1 self.coords[3][1] -= 1 self.coords[3][0] += 1 self.rotation = 1 elif self.rotation == 1: if board[self.coords[0][0] - 2][self.coords[0][1]].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][0] -= 2 self.coords[1][1] -= 1 self.coords[1][0] -= 1 self.coords[3][1] += 1 self.coords[3][0] += 1 self.rotation = 2 elif self.rotation == 2: if board[self.coords[0][0]][self.coords[0][1] - 2].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][1] -= 2 self.coords[1][1] -= 1 self.coords[1][0] += 1 self.coords[3][1] += 1 self.coords[3][0] -= 1 self.rotation = 3 elif self.rotation == 3: if board[self.coords[0][0] + 2][self.coords[0][1]].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][0] += 2 self.coords[1][1] += 1 self.coords[1][0] += 1 self.coords[3][1] -= 1 self.coords[3][0] -= 1 self.rotation = 0 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour class BlueRicky(): def __init__(self, rotation): self.colour = "DB" self.rotation = rotation if rotation == 0: self.coords = [[6, 0], [6, 1], [7, 1], [8, 1]] elif rotation == 1: self.coords = [[8, 0], [7, 0], [7, 1], [7, 2]] elif rotation == 2: self.coords = [[8, 2], [8, 1], [7, 1], [6, 1]] elif rotation == 3: self.coords = [[6, 2], [7, 2], [7, 1], [7, 0]] def rotate(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) if self.rotation == 0: if board[self.coords[0][0] + 2][self.coords[0][1]].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][0] += 2 self.coords[1][1] -= 1 self.coords[1][0] += 1 self.coords[3][1] += 1 self.coords[3][0] -= 1 self.rotation = 1 elif self.rotation == 1: if board[self.coords[0][0]][self.coords[0][1] + 2].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][1] += 2 self.coords[1][1] += 1 self.coords[1][0] += 1 self.coords[3][1] -= 1 self.coords[3][0] -= 1 self.rotation = 2 elif self.rotation == 2: if board[self.coords[0][0] - 2][self.coords[0][1]].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][0] -= 2 self.coords[1][1] += 1 self.coords[1][0] -= 1 self.coords[3][1] -= 1 self.coords[3][0] += 1 self.rotation = 3 elif self.rotation == 3: if board[self.coords[0][0]][self.coords[0][1] - 2].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][1] -= 2 self.coords[1][1] -= 1 self.coords[1][0] -= 1 self.coords[3][1] += 1 self.coords[3][0] += 1 self.rotation = 0 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour class CleveZ(): def __init__(self, rotation): self.colour = "R" self.rotation = rotation if rotation == 0: self.coords = [[6, 0], [7, 0], [7, 1], [8, 1]] elif rotation == 1: self.coords = [[8, 0], [8, 1], [7, 1], [7, 2]] def rotate(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) if self.rotation == 0: if board[self.coords[0][0] + 2][self.coords[0][1]].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][0] += 2 self.coords[1][1] += 1 self.coords[1][0] += 1 self.coords[3][1] += 1 self.coords[3][0] -= 1 self.rotation = 1 elif self.rotation == 1: if board[self.coords[0][0] - 2][self.coords[0][1]].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][0] -= 2 self.coords[1][1] -= 1 self.coords[1][0] -= 1 self.coords[3][1] -= 1 self.coords[3][0] += 1 self.rotation = 0 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour class RhodeZ(): def __init__(self, rotation): self.colour = "G" self.rotation = rotation if rotation == 0: self.coords = [[8, 0], [7, 0], [7, 1], [6, 1]] elif rotation == 1: self.coords = [[8, 2], [8, 1], [7, 1], [7, 0]] def rotate(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) if self.rotation == 0: if board[self.coords[0][0]][self.coords[0][1] + 2].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][1] += 2 self.coords[1][1] += 1 self.coords[1][0] += 1 self.coords[3][1] -= 1 self.coords[3][0] += 1 self.rotation = 1 elif self.rotation == 1: if board[self.coords[0][0]][self.coords[0][1] - 2].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][1] -= 2 self.coords[1][1] -= 1 self.coords[1][0] -= 1 self.coords[3][1] += 1 self.coords[3][0] -= 1 self.rotation = 0 def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour class Hero(): def __init__(self, rotation): self.colour = "LB" self.rotation = rotation if rotation == 0: self.coords = [[7, 0], [7, 1], [7, 2], [7, 3]] elif rotation == 1: self.coords = [[6, 1], [7, 1], [8, 1], [9, 1]] def rotate(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) if self.rotation == 0: if board[self.coords[0][0] - 1][self.coords[0][1] + 1].getObject() == None and\ board[self.coords[2][0] + 1][self.coords[2][1] - 1].getObject() == None and\ board[self.coords[3][0] + 2][self.coords[3][1] - 2].getObject() == None: self.coords[0][1] += 1 self.coords[0][0] -= 1 self.coords[2][1] -= 1 self.coords[2][0] += 1 self.coords[3][1] -= 2 self.coords[3][0] += 2 self.rotation = 1 elif self.rotation == 1: if board[self.coords[0][0] + 1][self.coords[0][1] - 1].getObject() == None and\ board[self.coords[2][0] - 1][self.coords[2][1] + 1].getObject() == None and\ board[self.coords[3][0] - 2][self.coords[3][1] + 2].getObject() == None: self.coords[0][1] -= 1 self.coords[0][0] += 1 self.coords[2][1] += 1 self.coords[2][0] -= 1 self.coords[3][1] += 2 self.coords[3][0] -= 2 self.rotation = 0 def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour class Teewee(): def __init__(self, rotation): self.colour = "P" self.rotation = rotation if rotation == 0: self.coords = [[8, 1], [7, 0], [7, 1], [7, 2]] elif rotation == 1: self.coords = [[7, 2], [8, 1], [7, 1], [6, 1]] elif rotation == 2: self.coords = [[6, 1], [7, 2], [7, 1], [7, 0]] elif rotation == 3: self.coords = [[7, 0], [6, 1], [7, 1], [8, 1]] def rotate(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) if self.rotation == 0: if board[self.coords[0][0] - 1][self.coords[0][1] + 1].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][1] += 1 self.coords[0][0] -= 1 self.coords[1][1] += 1 self.coords[1][0] += 1 self.coords[3][1] -= 1 self.coords[3][0] -= 1 self.rotation = 1 elif self.rotation == 1: if board[self.coords[0][0] - 1][self.coords[0][1] - 1].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] + 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] - 1].getObject() == None: self.coords[0][1] -= 1 self.coords[0][0] -= 1 self.coords[1][1] += 1 self.coords[1][0] -= 1 self.coords[3][1] -= 1 self.coords[3][0] += 1 self.rotation = 2 elif self.rotation == 2: if board[self.coords[0][0] + 1][self.coords[0][1] - 1].getObject() == None and\ board[self.coords[1][0] - 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] + 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][1] -= 1 self.coords[0][0] += 1 self.coords[1][1] -= 1 self.coords[1][0] -= 1 self.coords[3][1] += 1 self.coords[3][0] += 1 self.rotation = 3 elif self.rotation == 3: if board[self.coords[0][0] + 1][self.coords[0][1] + 1].getObject() == None and\ board[self.coords[1][0] + 1][self.coords[1][1] - 1].getObject() == None and\ board[self.coords[3][0] - 1][self.coords[3][1] + 1].getObject() == None: self.coords[0][1] += 1 self.coords[0][0] += 1 self.coords[1][1] -= 1 self.coords[1][0] += 1 self.coords[3][1] += 1 self.coords[3][0] -= 1 self.rotation = 0 def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour class Smashboy(): def __init__(self): self.colour = "Y" self.coords = [[6, 0], [7, 0], [6, 1], [7, 1]] def rotate(self, board): return def moveDown(self, board): for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][1] += 1 self.coords[1][1] += 1 self.coords[2][1] += 1 self.coords[3][1] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveRight(self, board): move = True for coord in self.coords: if coord[0] + 1 == 15: return if board[coord[0] + 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] += 1 self.coords[1][0] += 1 self.coords[2][0] += 1 self.coords[3][0] += 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def moveLeft(self, board): move = True for coord in self.coords: if coord[0] - 1 == -1: return if coord[0] - 1 > -1 and board[coord[0] - 1][coord[1]].getObject() not in [None, self]: move = False if move: for coord in self.coords: board[coord[0]][coord[1]].setObject(None) self.coords[0][0] -= 1 self.coords[1][0] -= 1 self.coords[2][0] -= 1 self.coords[3][0] -= 1 for coord in self.coords: board[coord[0]][coord[1]].setObject(self) def getCoords(self): return self.coords def getColour(self): return self.colour
34.856757
100
0.443204
3,344
25,794
3.410287
0.015251
0.33234
0.166871
0.11154
0.991494
0.985794
0.965714
0.963785
0.949053
0.942038
0
0.080865
0.390168
25,794
739
101
34.903924
0.64412
0
0
0.923858
0
0
0.000359
0
0
0
0
0
0
1
0.08291
false
0
0
0.025381
0.143824
0
0
0
0
null
1
0
0
1
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
8
5ff834733b88ec2a68b52773cf6ebb4acb4b65bf
45,014
py
Python
lib/core/train.py
simonwey/DecoupleNet
3e9e09d512230cb0d95e9db98c5838ca9ff799da
[ "Apache-2.0" ]
null
null
null
lib/core/train.py
simonwey/DecoupleNet
3e9e09d512230cb0d95e9db98c5838ca9ff799da
[ "Apache-2.0" ]
null
null
null
lib/core/train.py
simonwey/DecoupleNet
3e9e09d512230cb0d95e9db98c5838ca9ff799da
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # ------------------------------------------------------------------------------ from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import logging import os import numpy as np import torch from tqdm import tqdm from lib.core.evaluate import accuracy from lib.core.inference import get_final_preds from lib.core.inference import get_max_preds from lib.utils.transforms import flip_back from lib.utils.vis import save_debug_images from lib.utils.utils import get_network_grad_flow # from utils.vis import save_pretty_debug_images as save_debug_images logger = logging.getLogger(__name__) # -------------------------------------------------------------------------------- def synthetic_train(config, synthetic_train_loader, real_train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() acc = AverageMeter() # switch to train mode model.train() real_loader_iter = iter(real_train_loader) end = time.time() for i, (input, target, target_weight, meta) in enumerate(synthetic_train_loader): batch_size, _, _, _ = input.shape # measure data loading time data_time.update(time.time() - end) # ----------------------------------------------- # compute output outputs = model(input) target = target.cuda(non_blocking=True) target_weight = target_weight.cuda(non_blocking=True) if isinstance(outputs, list): loss = criterion(outputs[0], target, target_weight) for output in outputs[1:]: loss += criterion(output, target, target_weight) else: output = outputs loss = criterion(output, target, target_weight) # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss losses.update(loss.item(), input.size(0)) _, avg_acc, cnt, pred = accuracy(output.detach().cpu().numpy(), target.detach().cpu().numpy()) acc.update(avg_acc, cnt) # measure elapsed time batch_time.update(time.time() - end) end = time.time() if i % config.PRINT_FREQ == 0: msg = 'Syn Epoch: [{0}][{1}/{2}]\t' \ 'Time {batch_time.val:.3f}s ({batch_time.avg:.3f}s)\t' \ 'Speed {speed:.1f} samples/s\t' \ 'Data {data_time.val:.3f}s ({data_time.avg:.3f}s)\t' \ 'Loss {loss.val:.5f} ({loss.avg:.5f})\t' \ 'Accuracy {acc.val:.3f} ({acc.avg:.3f})'.format( epoch, i, len(synthetic_train_loader), batch_time=batch_time, speed=input.size(0) / batch_time.val, data_time=data_time, loss=losses, acc=acc) logger.info(msg) writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('syn_train_loss', losses.val, global_steps) writer.add_scalar('syn_train_acc', acc.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 prefix = '{}_epoch_{}_iter_{}_syn'.format(os.path.join(output_dir, 'train'), epoch, i) save_debug_images(config, input[:16, [2, 1, 0], :, :], meta, target[:16], (pred * 4)[:16], output[:16], prefix) # -------------------------------------------------------------------------------- def train(config, train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix=''): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() acc = AverageMeter() # switch to train mode model.train() end = time.time() for i, (input, target, target_weight, meta) in enumerate(train_loader): # measure data loading time data_time.update(time.time() - end) # compute output outputs = model(input) target = target.cuda(non_blocking=True) target_weight = target_weight.cuda(non_blocking=True) if isinstance(outputs, list): loss = criterion(outputs[0], target, target_weight) for output in outputs[1:]: loss += criterion(output, target, target_weight) else: output = outputs loss = criterion(output, target, target_weight) # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss losses.update(loss.item(), input.size(0)) _, avg_acc, cnt, pred = accuracy(output.detach().cpu().numpy(), target.detach().cpu().numpy()) acc.update(avg_acc, cnt) # measure elapsed time batch_time.update(time.time() - end) end = time.time() if i % config.PRINT_FREQ == 0: msg = 'Epoch: [{0}][{1}/{2}]\t' \ 'Time {batch_time.val:.3f}s ({batch_time.avg:.3f}s)\t' \ 'Speed {speed:.1f} samples/s\t' \ 'Data {data_time.val:.3f}s ({data_time.avg:.3f}s)\t' \ 'Loss {loss.val:.5f} ({loss.avg:.5f})\t' \ 'Accuracy {acc.val:.3f} ({acc.avg:.3f})'.format( epoch, i, len(train_loader), batch_time=batch_time, speed=input.size(0) / batch_time.val, data_time=data_time, loss=losses, acc=acc) logger.info(msg) writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', losses.val, global_steps) writer.add_scalar('train_acc', acc.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 prefix = '{}_epoch_{}_iter_{}_{}'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) save_debug_images(config, input[:16, [2, 1, 0], :, :], meta, target[:16], (pred * 4)[:16], output[:16], prefix) return # -------------------------------------------------------------------------------- def train_cutmix(config, train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix=''): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() acc = AverageMeter() # switch to train mode model.train() end = time.time() for i, (input, target_f, target_weight_f, meta_f, target_b, target_weight_b, meta_b) in enumerate(train_loader): # measure data loading time data_time.update(time.time() - end) # compute output outputs = model(input) target_f = target_f.cuda(non_blocking=True) target_weight_f = target_weight_f.cuda(non_blocking=True) target_b = target_b.cuda(non_blocking=True) target_weight_b = target_weight_b.cuda(non_blocking=True) output = outputs ## weight target_weights by lambda lambda_f = meta_f['lambda'].cuda().view(-1, 1, 1).repeat(1, 17, 1) ## shape: B x 17 x 1 lambda_b = meta_b['lambda'].cuda().view(-1, 1, 1).repeat(1, 17, 1) ## shape: B x 17 x 1 weighted_target_weight_f = target_weight_f * lambda_f weighted_target_weight_b = target_weight_b * lambda_b loss_f = criterion(output, target_f, weighted_target_weight_f) loss_b = criterion(output, target_b, weighted_target_weight_b) loss = loss_f + loss_b # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss losses.update(loss.item(), input.size(0)) _, avg_acc, cnt, pred_f = accuracy(output.detach().cpu().numpy(), target_f.detach().cpu().numpy()) _, avg_acc, cnt, pred_b = accuracy(output.detach().cpu().numpy(), target_b.detach().cpu().numpy()) acc.update(avg_acc, cnt) # measure elapsed time batch_time.update(time.time() - end) end = time.time() if i % config.PRINT_FREQ == 0: msg = 'Epoch: [{0}][{1}/{2}]\t' \ 'Time {batch_time.val:.3f}s ({batch_time.avg:.3f}s)\t' \ 'Speed {speed:.1f} samples/s\t' \ 'Data {data_time.val:.3f}s ({data_time.avg:.3f}s)\t' \ 'Loss {loss.val:.5f} ({loss.avg:.5f})\t' \ 'Accuracy {acc.val:.3f} ({acc.avg:.3f})'.format( epoch, i, len(train_loader), batch_time=batch_time, speed=input.size(0) / batch_time.val, data_time=data_time, loss=losses, acc=acc) logger.info(msg) writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', losses.val, global_steps) writer.add_scalar('train_acc', acc.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 prefix = '{}_epoch_{}_iter_{}_{}_foreground'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) save_debug_images(config, input[:16, [2, 1, 0], :, :], meta_f, target_f[:16], (pred_f * 4)[:16], output[:16], prefix) prefix = '{}_epoch_{}_iter_{}_{}_background'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) save_debug_images(config, input[:16, [2, 1, 0], :, :], meta_b, target_b[:16], (pred_b * 4)[:16], output[:16], prefix) return ## -------------------------------------------------------------------------------- def train_mixup(config, train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix=''): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() acc = AverageMeter() # switch to train mode model.train() end = time.time() for i, (input, target_f, target_weight_f, meta_f, target_b, target_weight_b, meta_b) in enumerate(train_loader): # measure data loading time data_time.update(time.time() - end) # compute output outputs = model(input) target_f = target_f.cuda(non_blocking=True) target_weight_f = target_weight_f.cuda(non_blocking=True) target_b = target_b.cuda(non_blocking=True) target_weight_b = target_weight_b.cuda(non_blocking=True) output = outputs ## weight target_weights by lambda lambda_f = meta_f['lambda'].cuda().view(-1, 1, 1).repeat(1, 17, 1) ## shape: B x 17 x 1 lambda_b = meta_b['lambda'].cuda().view(-1, 1, 1).repeat(1, 17, 1) ## shape: B x 17 x 1 weighted_target_weight_f = target_weight_f * lambda_f weighted_target_weight_b = target_weight_b * lambda_b loss_f = criterion(output, target_f, weighted_target_weight_f) loss_b = criterion(output, target_b, weighted_target_weight_b) loss = loss_f + loss_b # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss losses.update(loss.item(), input.size(0)) _, avg_acc, cnt, pred_f = accuracy(output.detach().cpu().numpy(), target_f.detach().cpu().numpy()) _, avg_acc, cnt, pred_b = accuracy(output.detach().cpu().numpy(), target_b.detach().cpu().numpy()) acc.update(avg_acc, cnt) # measure elapsed time batch_time.update(time.time() - end) end = time.time() if i % config.PRINT_FREQ == 0: msg = 'Epoch: [{0}][{1}/{2}]\t' \ 'Time {batch_time.val:.3f}s ({batch_time.avg:.3f}s)\t' \ 'Speed {speed:.1f} samples/s\t' \ 'Data {data_time.val:.3f}s ({data_time.avg:.3f}s)\t' \ 'Loss {loss.val:.5f} ({loss.avg:.5f})\t' \ 'Accuracy {acc.val:.3f} ({acc.avg:.3f})'.format( epoch, i, len(train_loader), batch_time=batch_time, speed=input.size(0) / batch_time.val, data_time=data_time, loss=losses, acc=acc) logger.info(msg) writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', losses.val, global_steps) writer.add_scalar('train_acc', acc.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 prefix = '{}_epoch_{}_iter_{}_{}_foreground'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) save_debug_images(config, input[:16, [2, 1, 0], :, :], meta_f, target_f[:16], (pred_f * 4)[:16], output[:16], prefix) prefix = '{}_epoch_{}_iter_{}_{}_background'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) save_debug_images(config, input[:16, [2, 1, 0], :, :], meta_b, target_b[:16], (pred_b * 4)[:16], output[:16], prefix) return # -------------------------------------------------------------------------------- def train_lambda(config, train_loader, model, criterion_lambda, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix=''): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() acc = AverageMeter() model_grads = AverageMeter() diversity_losses = AverageMeter() pose_losses = AverageMeter() # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_a, target_weight_a, meta_a, target_b, target_weight_b, meta_b) in enumerate(train_loader): # measure data loading time # data_time.update(time.time() - end) B, C, H, W = input.shape ##--- uniformly random-------- # lambda_a = torch.rand(B, 1).cuda() ##--- 0s and 1s-------- lambda_a = torch.rand(B, 1).cuda() lambda_a = (lambda_a > 0.5).float()*1.0 complement_lambda_a = (lambda_a == 0).float()*1.0 # --------------duplicate----------------------------- lambda_a = torch.cat([lambda_a, complement_lambda_a], dim=0) input = torch.cat([input, input], dim=0) target_a = torch.cat([target_a, target_a], dim=0) target_weight_a = torch.cat([target_weight_a, target_weight_a], dim=0) target_b = torch.cat([target_b, target_b], dim=0) target_weight_b = torch.cat([target_weight_b, target_weight_b], dim=0) meta_a['joints'] = torch.cat([meta_a['joints'], meta_a['joints']], dim=0) meta_a['joints_vis'] = torch.cat([meta_a['joints_vis'], meta_a['joints_vis']], dim=0) meta_b['joints'] = torch.cat([meta_b['joints'], meta_b['joints']], dim=0) meta_b['joints_vis'] = torch.cat([meta_b['joints_vis'], meta_b['joints_vis']], dim=0) # -------------------------------- lambda_b = 1 - lambda_a lambda_vec = torch.cat([lambda_a, lambda_b], dim=1) ### B x 2 # compute output input = input.cuda() lambda_vec = lambda_vec.cuda() outputs = model(input, lambda_vec) target_a = target_a.cuda(non_blocking=True) target_weight_a = target_weight_a.cuda(non_blocking=True) target_b = target_b.cuda(non_blocking=True) target_weight_b = target_weight_b.cuda(non_blocking=True) output = outputs loss_a_lambda = criterion_lambda(output, target_a, target_weight_a) loss_b_lambda = criterion_lambda(output, target_b, target_weight_b) ## as input[:B] == input[B:]; lambda_a[:B] == lambda_b[B:] diversity_loss = -1*criterion(output[:B], output[B:], target_weight_a[:B]*target_weight_b[:B]) ## try to push apart the common joints # [1, 0] => 预测主体目标关键点 | [0, 1] => 预测干扰目标关键点 pose_loss = (loss_a_lambda * lambda_a.view(-1)).mean() + (loss_b_lambda * lambda_b.view(-1)).mean() # loss = pose_loss + 0.1*diversity_loss loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # model_grad = get_network_grad_flow(model) # model_grads.update(model_grad) # measure accuracy and record loss losses.update(loss.item(), input.size(0)) diversity_losses.update(diversity_loss.item(), input.size(0)) pose_losses.update(pose_loss.item(), input.size(0)) _, avg_acc, cnt, pred_a = accuracy(output.detach().cpu().numpy(), target_a.detach().cpu().numpy()) _, avg_acc, cnt, pred_b = accuracy(output.detach().cpu().numpy(), target_b.detach().cpu().numpy()) acc.update(avg_acc, cnt) # measure elapsed time # batch_time.update(time.time() - end) # end = time.time() # 'model_grad {model_grad.val:.6f} ({model_grad.avg:.6f})\t' \ # 'DivLoss {diversity_loss.val:.5f}({diversity_loss.avg:.5f})\t' \ # '[{0}/{1}] ' \ # ({loss.avg:.5f}) # ({acc.avg:.3f}) # ({pose_loss.avg:.5f}) if config.LOG: msg = 'Loss {loss.val:.5f} ' \ 'Acc {acc.val:.3f} ' \ 'PoseLs {pose_loss.val:.5f}'.format( i, len(train_loader), loss=losses, acc=acc, # model_grad=model_grads, # diversity_loss=diversity_losses, pose_loss=pose_losses) train_loader.set_description(msg) # logger.info(msg) if i % config.PRINT_FREQ == 0 and config.LOG: save_size = 2 writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', losses.val, global_steps) writer.add_scalar('train_acc', acc.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 # prefix = '{}_epoch_{:09d}_iter_{}_{}'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) # suffix = 'a' # for count in range(min(save_size, len(lambda_a))): # suffix += '_[{}:{}]'.format(count, round(lambda_a[count].item(), 2)) # # meta_a['pred_joints_vis'] = torch.ones_like(meta_a['joints_vis']) # save_debug_images(config, input[:save_size, [2,1,0], :, :], meta_a, target_a[:save_size], (pred_a*4)[:save_size], output[:save_size], prefix, suffix) # # prefix = '{}_epoch_{:09d}_iter_{}_{}'.format(os.path.join(output_dir, 'train'), epoch, i, print_prefix) # suffix = 'b' # for count in range(min(save_size, len(lambda_a))): # suffix += '_[{}:{}]'.format(count, round(lambda_a[count + B].item(), 2)) # # meta_b['pred_joints_vis'] = torch.ones_like(meta_b['joints_vis']) # save_debug_images(config, input[B:B+save_size, [2,1,0], :, :], meta_b, target_b[B:B+save_size], (pred_b*4)[B:B+save_size], output[B:B+save_size], prefix, suffix) train_loader.close() return # dcp-cnn------- def train_dcp(config, train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix=''): accAMer = AverageMeter() pose_lossAMer = AverageMeter() OCC_WEIGHT: 1 OCCEE_WEIGHT: 1 occ_weight = config['MODEL']['HEAD']['OCC_WEIGHT'] occee_weight = config['MODEL']['HEAD']['OCCEE_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_a, target_weight_a, meta_a, target_b, target_weight_b, meta_b) in enumerate(train_loader): # measure data loading time # data_time.update(time.time() - end) input = input.cuda() outputs = model(input) occ_pose, occee_pose = outputs target_a = target_a.cuda(non_blocking=True) target_weight_a = target_weight_a.cuda(non_blocking=True) target_b = target_b.cuda(non_blocking=True) target_weight_b = target_weight_b.cuda(non_blocking=True) loss_occ = criterion(occ_pose, target_a, target_weight_a) loss_occee = criterion(occee_pose, target_b, target_weight_b) pose_loss = occ_weight * loss_occ + occee_weight * loss_occee # loss = pose_loss + 0.1*diversity_loss loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # model_grad = get_network_grad_flow(model) # model_grads.update(model_grad) # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, avg_acc, cnt, pred_a = accuracy(occ_pose.detach().cpu().numpy(), target_a.detach().cpu().numpy()) _, avg_acc, cnt, pred_b = accuracy(occee_pose.detach().cpu().numpy(), target_b.detach().cpu().numpy()) accAMer.update(avg_acc, cnt) # measure elapsed time # batch_time.update(time.time() - end) # end = time.time() if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp------- # dcp-cnn------------ def train_dcp_cnn(config, train_loader, model, criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() cu_weight, cd_weight, ru_weight, rd_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) cu = pose_dict['cu'] cd = pose_dict['cd'] ru = pose_dict['ru'] rd = pose_dict['rd'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) loss_cu = criterion(cu, target_oc, target_weight_oc) loss_ru = criterion(ru, target_oc, target_weight_oc) loss_cd = criterion(cd, target_oced, target_weight_oced) loss_rd = criterion(rd, target_oced, target_weight_oced) pose_loss = loss_cu*cu_weight + loss_ru*ru_weight + loss_cd*cd_weight + loss_rd*rd_weight # loss = pose_loss + 0.1*diversity_loss loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_cu, cnt_cu, pred_a = accuracy(cu.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_ru, cnt_ru, pred_a = accuracy(ru.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_cd, cnt_cd, pred_b = accuracy(cd.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) _, acc_rd, cnt_rd, pred_b = accuracy(rd.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_cu, cnt_cu) accAMer.update(acc_ru, cnt_ru) accAMer.update(acc_cd, cnt_cd) accAMer.update(acc_rd, cnt_rd) # measure elapsed time # batch_time.update(time.time() - end) # end = time.time() if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp-cnn------------ # dcp-cnn------------ def train_dcp_cr_ocks(config, train_loader, model, criterion, ref_criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() cu_weight, cd_weight, ru_weight, rd_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) cu = pose_dict['cu'] cd = pose_dict['cd'] ru = pose_dict['ru'] rd = pose_dict['rd'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) loss_cu = criterion(cu, target_oc, target_weight_oc) loss_ru = ref_criterion(ru, target_oc, target_weight_oc) loss_cd = criterion(cd, target_oced, target_weight_oced) loss_rd = ref_criterion(rd, target_oced, target_weight_oced) pose_loss = loss_cu*cu_weight + loss_ru*ru_weight + loss_cd*cd_weight + loss_rd*rd_weight # loss = pose_loss + 0.1*diversity_loss loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_cu, cnt_cu, pred_a = accuracy(cu.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_ru, cnt_ru, pred_a = accuracy(ru.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_cd, cnt_cd, pred_b = accuracy(cd.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) _, acc_rd, cnt_rd, pred_b = accuracy(rd.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_cu, cnt_cu) accAMer.update(acc_ru, cnt_ru) accAMer.update(acc_cd, cnt_cd) accAMer.update(acc_rd, cnt_rd) # measure elapsed time # batch_time.update(time.time() - end) # end = time.time() if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp-cnn------------ # dcp-skt------------ def train_dcp_skt(config, train_loader, model, criterion, skt_criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() upPose_weight, downPose_weight, upSkt_weight, downSkt_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) upPose = pose_dict['up'] downPose = pose_dict['down'] upSkt = pose_dict['up_skt'] # downSkt = pose_dict['down_skt'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) upSktGt = meta_oc['skt_gt'] upSktGt = upSktGt.cuda(non_blocking=True) downSktGT = meta_oced['skt_gt'] # downSktGT = downSktGT.cuda(non_blocking=True) loss_upPose = criterion(upPose, target_oc, target_weight_oc) loss_downPose = criterion(downPose, target_oced, target_weight_oced) loss_upSkt = 0.1 * skt_criterion.apply(upSkt, upSktGt) # loss_downSkt = 0.1 * skt_criterion.apply(downSkt, downSktGT) pose_loss = loss_upPose*upPose_weight + loss_upSkt*upSkt_weight + loss_downPose*downPose_weight #+ loss_downSkt*downSkt_weight # loss = pose_loss + 0.1*diversity_loss loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_cu, cnt_cu, pred_a = accuracy(upPose.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_cd, cnt_cd, pred_b = accuracy(downPose.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_cu, cnt_cu) accAMer.update(acc_cd, cnt_cd) # measure elapsed time # batch_time.update(time.time() - end) # end = time.time() if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp-skt------------ # dcp-naive------------ def train_dcp_naive(config, train_loader, model, criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() _, _, ru_weight, rd_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) up_pose = pose_dict['up'] down_pose = pose_dict['down'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) loss_up_pose = criterion(up_pose, target_oc, target_weight_oc) loss_down_pose = criterion(down_pose, target_oced, target_weight_oced) pose_loss = loss_up_pose*ru_weight + loss_down_pose*rd_weight loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_up, cnt_up, pred_a = accuracy(up_pose.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_down, cnt_down, pred_b = accuracy(down_pose.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_up, cnt_up) accAMer.update(acc_down, cnt_down) # measure elapsed time if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp-naive------------ # one------------ def train_one(config, train_loader, model, criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose = model(input) # up_pose = pose_dict['up'] # down_pose = pose_dict['down'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) # loss_up_pose = criterion(up_pose, target_oc, target_weight_oc) # loss_down_pose = criterion(down_pose, target_oced, target_weight_oced) pose_loss = criterion(pose, target_oc, target_weight_oc) # pose_loss = loss_up_pose*ru_weight + loss_down_pose*rd_weight loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_up, cnt_up, pred_a = accuracy(pose.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) accAMer.update(acc_up, cnt_up) # measure elapsed time if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # one------------ # dcp-naive------------ def train_dcp_up_down_loss(config, train_loader, model, triplet_criterion, mse_criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() _, _, ru_weight, rd_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) up_pose = pose_dict['up'] down_pose = pose_dict['down'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) loss_up_pose = triplet_criterion(up_pose, target_oc, target_weight_oc, target_oced) loss_down_pose = mse_criterion(down_pose, target_oced, target_weight_oced) pose_loss = loss_up_pose*ru_weight + loss_down_pose*rd_weight loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_up, cnt_up, pred_a = accuracy(up_pose.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_down, cnt_down, pred_b = accuracy(down_pose.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_up, cnt_up) accAMer.update(acc_down, cnt_down) # measure elapsed time if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp-naive------------ # dcp-naive------------ def train_dcp_naive_ocks(config, train_loader, model, criterion, optimizer, writer_dict): print("=====> ShortCut(confused) Count: {}".format(criterion.ipc)) accAMer = AverageMeter() pose_lossAMer = AverageMeter() _, _, ru_weight, rd_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) up_pose = pose_dict['up'] down_pose = pose_dict['down'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) # output, target, another_target, target_weight, meta loss_up_pose = criterion(up_pose, target_oc, target_oced, target_weight_oc, meta_oc) loss_down_pose = criterion(down_pose, target_oced, target_oc, target_weight_oced, meta_oced) pose_loss = loss_up_pose*ru_weight + loss_down_pose*rd_weight loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_up, cnt_up, pred_a = accuracy(up_pose.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_down, cnt_down, pred_b = accuracy(down_pose.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_up, cnt_up) accAMer.update(acc_down, cnt_down) # measure elapsed time if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() print("=====> ShortCut(confused) Count: {}".format(criterion.ipc)) criterion.ipc = 0 return # dcp-naive------------ # dcp-naive------------ def train_two_tripletLoss(config, train_loader, model, criterion, optimizer, writer_dict): accAMer = AverageMeter() pose_lossAMer = AverageMeter() _, _, ru_weight, rd_weight = config['MODEL']['HEAD']['OUT_WEIGHT'] # switch to train mode model.train() train_loader = tqdm(train_loader) # end = time.time() for i, (input, target_oc, target_weight_oc, meta_oc, target_oced, target_weight_oced, meta_oced) in enumerate(train_loader): # data_time.update(time.time() - end) input = input.cuda() pose_dict = model(input) up_pose = pose_dict['up'] down_pose = pose_dict['down'] target_oc = target_oc.cuda(non_blocking=True) target_weight_oc = target_weight_oc.cuda(non_blocking=True) target_oced = target_oced.cuda(non_blocking=True) target_weight_oced = target_weight_oced.cuda(non_blocking=True) # output, target, another_target, target_weight, meta loss_up_pose = criterion(up_pose, target_oc, target_weight_oc, target_oced) loss_down_pose = criterion(down_pose, target_oced, target_weight_oced, target_oc) pose_loss = loss_up_pose*ru_weight + loss_down_pose*rd_weight loss = pose_loss # compute gradient and do update step optimizer.zero_grad() loss.backward() optimizer.step() # measure accuracy and record loss pose_lossAMer.update(pose_loss.item(), input.size(0)) _, acc_up, cnt_up, pred_a = accuracy(up_pose.detach().cpu().numpy(), target_oc.detach().cpu().numpy()) _, acc_down, cnt_down, pred_b = accuracy(down_pose.detach().cpu().numpy(), target_oced.detach().cpu().numpy()) accAMer.update(acc_up, cnt_up) accAMer.update(acc_down, cnt_down) # measure elapsed time if config.LOG: msg = 'Loss:{loss:.5f} Acc:{acc:.5f}'.format(loss=pose_lossAMer.val, acc=accAMer.val) train_loader.set_description(msg) if i % config.PRINT_FREQ == 0 and config.LOG: writer = writer_dict['writer'] global_steps = writer_dict['train_global_steps'] writer.add_scalar('train_loss', pose_lossAMer.val, global_steps) writer.add_scalar('train_acc', accAMer.val, global_steps) writer_dict['train_global_steps'] = global_steps + 1 train_loader.close() return # dcp-naive------------ # -------------------------------------------------------------------------------- def train_cutout(config, train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix=''): return train(config, train_loader, model, criterion, optimizer, epoch, output_dir, tb_log_dir, writer_dict, print_prefix) # -------------------------------------------------------------------------------- # markdown format output def _print_name_value(name_value, full_arch_name): names = name_value.keys() values = name_value.values() num_values = len(name_value) logger.info( '| Arch ' + ' '.join(['| {}'.format(name) for name in names]) + ' |' ) logger.info('|---' * (num_values + 1) + '|') if len(full_arch_name) > 15: full_arch_name = full_arch_name[:8] + '...' logger.info( '| ' + full_arch_name + ' ' + ' '.join(['| {:.3f}'.format(value) for value in values]) + ' |' ) class AverageMeter(object): """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 def update(self, val, n=1): self.val = val self.sum += val * n self.count += n self.avg = self.sum / self.count if self.count != 0 else 0
40.226988
175
0.603035
5,740
45,014
4.439024
0.044599
0.060283
0.031868
0.038776
0.878336
0.854788
0.839286
0.826374
0.822488
0.813108
0
0.009396
0.250478
45,014
1,118
176
40.26297
0.745813
0.143844
0
0.79113
0
0
0.07255
0.011922
0
0
0
0
0
1
0.027182
false
0
0.021459
0.001431
0.0701
0.02289
0
0
0
null
0
0
0
1
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
7
273573fc65a8785fdcbc95c5fe6c74e9861035d0
8,581
py
Python
efuntool/eobjtool.py
ihgazni2/efuntool
a5d65ed57d53c5c45d189d0028db574006d8d190
[ "MIT" ]
null
null
null
efuntool/eobjtool.py
ihgazni2/efuntool
a5d65ed57d53c5c45d189d0028db574006d8d190
[ "MIT" ]
null
null
null
efuntool/eobjtool.py
ihgazni2/efuntool
a5d65ed57d53c5c45d189d0028db574006d8d190
[ "MIT" ]
null
null
null
import elist.elist as elel def get_mros(obj): ''' >>> a= 5 >>> get_mros(a) [5,<class 'int'>, <class 'object'>] >>> ''' if(hasattr(obj,'mro')): return(obj.mro()) else: return([obj]+type(obj).mro()) def get_attrs_chain(obj): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> parr(get_attrs_chain(t)) ['_u', 'u'] ['__dict__', '__module__', '__weakref__'] ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__'] >>> ''' mros = get_mros(obj) chain = elel.mapv(mros,get_all_attrs) st_chain = elel.mapv(chain,set) lngth = len(chain) owns = [] for i in range(0,lngth-1): ownattrs = st_chain[i].difference(st_chain[i+1]) owns.append(ownattrs) owns.append(st_chain[-1]) owns = elel.mapv(owns,lambda st:elel.sort(list(st))) return(owns) def get_own_attrs(obj): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_own_attrs(t) ['_u', 'u'] >>> ''' ownattrs_arr = get_attrs_chain(obj) return(ownattrs_arr[0]) def get_inherited_attrs(obj,*whiches): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_inherited_attrs(t,0) ['_u', 'u'] >>> >>> get_inherited_attrs(t,1) ['__dict__', '__module__', '__weakref__'] >>> >>> get_inherited_attrs(t,2) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__'] >>> >>> get_inherited_attrs(t,0,1) ['_u', 'u', '__dict__', '__module__', '__weakref__'] >>> ''' ownattrs_arr = get_attrs_chain(obj) rslt = elel.select_seqs(ownattrs_arr,whiches) rslt = elel.reduce_left(rslt,lambda acc,ele:acc+ele,[]) if(len(rslt)==1): return(rslt[0]) else: return(rslt) def get_own_visible_attrs(obj): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_own_visible_attrs(t) ['u'] >>> ''' attrs = get_own_attrs(obj) attrs = elel.cond_select_values_all(attrs,cond_func=lambda ele:not(ele.startswith("_"))) return(attrs) def get_own_priv_attrs(obj): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_own_priv_attrs(t) ['_u'] >>> ''' attrs = get_own_attrs(obj) attrs = elel.cond_select_values_all(attrs,cond_func=lambda ele:(ele[0:2]!="__") and (ele.startswith("_"))) return(attrs) def get_own_builtin_attrs(obj): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_own_buildin_attrs(t) [] >>> ''' attrs = get_own_attrs(obj) attrs = elel.cond_select_values_all(attrs,cond_func=lambda ele:ele.startswith("__")) return(attrs) def get_inherited_visible_attrs(obj,*whiches): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_inherited_visible_attrs(t,1) [] >>> ''' attrs = get_inherited_attrs(obj,*whiches) attrs = elel.cond_select_values_all(attrs,cond_func=lambda ele:not(ele.startswith("_"))) return(attrs) def get_inherited_priv_attrs(obj,*whiches): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_inherited_priv_attrs(t,1) [] >>> ''' attrs = get_inherited_attrs(obj,*whiches) attrs = elel.cond_select_values_all(attrs,cond_func=lambda ele:(ele[0:2]!="__") and (ele.startswith("_"))) return(attrs) def get_inherited_builtin_attrs(obj,*whiches): ''' >>> class tst(): ... def __init__(self): ... self._u = "_u" ... self.u = "u" ... >>> t = tst() >>> >>> get_inherited_buildin_attrs(t,1) ['__dict__', '__module__', '__weakref__'] >>> >>> get_inherited_builtin_attrs(t,2) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__'] >>> ''' attrs = get_inherited_attrs(obj,*whiches) attrs = elel.cond_select_values_all(attrs,cond_func=lambda ele:ele.startswith("__")) return(attrs) def get_all_attrs(obj): ''' >>> a= 5 >>> get_all_attrs(a) ['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes'] ''' return(dir(obj)) def get_all_visible_attrs(obj): ''' >>> a = 5 >>> get_all_visible_attrs(a) ['bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes'] >>> ''' attrs = dir(obj) return(elel.cond_select_values_all(attrs,cond_func=lambda ele:not(ele.startswith("_")))) def get_all_builtin_attrs(obj): ''' >>> a = 5 >>> get_all_builtin_attrs(a) ['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__'] ''' attrs = dir(obj) return(elel.cond_select_values_all(attrs,cond_func=lambda ele:ele.startswith("__"))) def get_all_priv_attrs(obj): ''' class tst(): def __init__(self): self._u = "_u" self.u = "u" t = tst() >>> get_all_priv_attrs(t) ['_u'] >>> ''' attrs = dir(obj) return(elel.cond_select_values_all(attrs,cond_func=lambda ele:(ele[0:2]!="__") and (ele.startswith("_"))))
35.903766
906
0.538748
871
8,581
4.083812
0.158439
0.013495
0.033736
0.04217
0.809109
0.778465
0.749789
0.740512
0.72027
0.72027
0
0.004265
0.262324
8,581
238
907
36.054622
0.557662
0.556229
0
0.390625
0
0
0.007967
0
0
0
0
0
0
1
0.21875
false
0
0.015625
0
0.234375
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
1
0
0
0
0
0
0
0
7
276b514df0689a1a310164129f601a7e69b7a740
176
py
Python
web/controllers/h5learning/picslider.py
ZZh2333/myBlog
88b7c903fbaa98b5e02ce25ebaeb70268dc6f825
[ "MIT" ]
null
null
null
web/controllers/h5learning/picslider.py
ZZh2333/myBlog
88b7c903fbaa98b5e02ce25ebaeb70268dc6f825
[ "MIT" ]
null
null
null
web/controllers/h5learning/picslider.py
ZZh2333/myBlog
88b7c903fbaa98b5e02ce25ebaeb70268dc6f825
[ "MIT" ]
null
null
null
from . import route_h5learning from flask import render_template @route_h5learning.route('/picslider') def picslider(): return render_template('h5learning/picslider.html')
29.333333
55
0.806818
21
176
6.571429
0.52381
0.217391
0
0
0
0
0
0
0
0
0
0.018868
0.096591
176
6
55
29.333333
0.849057
0
0
0
0
0
0.19774
0.141243
0
0
0
0
0
1
0.2
true
0
0.4
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
0
1
0
1
1
1
0
0
7
279d0e2bd8dc7ef8d17b25651b2c42761135029b
18,321
py
Python
swagger_client/api/dogma_api.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
swagger_client/api/dogma_api.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
swagger_client/api/dogma_api.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online # noqa: E501 OpenAPI spec version: 0.8.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from swagger_client.api_client import ApiClient class DogmaApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_dogma_attributes(self, **kwargs): # noqa: E501 """Get attributes # noqa: E501 Get a list of dogma attribute ids --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_attributes(async=True) >>> result = thread.get() :param async bool :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: list[int] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.get_dogma_attributes_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_dogma_attributes_with_http_info(**kwargs) # noqa: E501 return data def get_dogma_attributes_with_http_info(self, **kwargs): # noqa: E501 """Get attributes # noqa: E501 Get a list of dogma attribute ids --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_attributes_with_http_info(async=True) >>> result = thread.get() :param async bool :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: list[int] If the method is called asynchronously, returns the request thread. """ all_params = ['datasource', 'user_agent', 'x_user_agent'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_dogma_attributes" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'datasource' in params: query_params.append(('datasource', params['datasource'])) # noqa: E501 if 'user_agent' in params: query_params.append(('user_agent', params['user_agent'])) # noqa: E501 header_params = {} if 'x_user_agent' in params: header_params['X-User-Agent'] = params['x_user_agent'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/v1/dogma/attributes/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[int]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_dogma_attributes_attribute_id(self, attribute_id, **kwargs): # noqa: E501 """Get attribute information # noqa: E501 Get information on a dogma attribute --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_attributes_attribute_id(attribute_id, async=True) >>> result = thread.get() :param async bool :param int attribute_id: A dogma attribute ID (required) :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: GetDogmaAttributesAttributeIdOk If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.get_dogma_attributes_attribute_id_with_http_info(attribute_id, **kwargs) # noqa: E501 else: (data) = self.get_dogma_attributes_attribute_id_with_http_info(attribute_id, **kwargs) # noqa: E501 return data def get_dogma_attributes_attribute_id_with_http_info(self, attribute_id, **kwargs): # noqa: E501 """Get attribute information # noqa: E501 Get information on a dogma attribute --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_attributes_attribute_id_with_http_info(attribute_id, async=True) >>> result = thread.get() :param async bool :param int attribute_id: A dogma attribute ID (required) :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: GetDogmaAttributesAttributeIdOk If the method is called asynchronously, returns the request thread. """ all_params = ['attribute_id', 'datasource', 'user_agent', 'x_user_agent'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_dogma_attributes_attribute_id" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'attribute_id' is set if ('attribute_id' not in params or params['attribute_id'] is None): raise ValueError("Missing the required parameter `attribute_id` when calling `get_dogma_attributes_attribute_id`") # noqa: E501 collection_formats = {} path_params = {} if 'attribute_id' in params: path_params['attribute_id'] = params['attribute_id'] # noqa: E501 query_params = [] if 'datasource' in params: query_params.append(('datasource', params['datasource'])) # noqa: E501 if 'user_agent' in params: query_params.append(('user_agent', params['user_agent'])) # noqa: E501 header_params = {} if 'x_user_agent' in params: header_params['X-User-Agent'] = params['x_user_agent'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/v1/dogma/attributes/{attribute_id}/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetDogmaAttributesAttributeIdOk', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_dogma_effects(self, **kwargs): # noqa: E501 """Get effects # noqa: E501 Get a list of dogma effect ids --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_effects(async=True) >>> result = thread.get() :param async bool :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: list[int] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.get_dogma_effects_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_dogma_effects_with_http_info(**kwargs) # noqa: E501 return data def get_dogma_effects_with_http_info(self, **kwargs): # noqa: E501 """Get effects # noqa: E501 Get a list of dogma effect ids --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_effects_with_http_info(async=True) >>> result = thread.get() :param async bool :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: list[int] If the method is called asynchronously, returns the request thread. """ all_params = ['datasource', 'user_agent', 'x_user_agent'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_dogma_effects" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'datasource' in params: query_params.append(('datasource', params['datasource'])) # noqa: E501 if 'user_agent' in params: query_params.append(('user_agent', params['user_agent'])) # noqa: E501 header_params = {} if 'x_user_agent' in params: header_params['X-User-Agent'] = params['x_user_agent'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/v1/dogma/effects/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[int]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_dogma_effects_effect_id(self, effect_id, **kwargs): # noqa: E501 """Get effect information # noqa: E501 Get information on a dogma effect --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_effects_effect_id(effect_id, async=True) >>> result = thread.get() :param async bool :param int effect_id: A dogma effect ID (required) :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: GetDogmaEffectsEffectIdOk If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): return self.get_dogma_effects_effect_id_with_http_info(effect_id, **kwargs) # noqa: E501 else: (data) = self.get_dogma_effects_effect_id_with_http_info(effect_id, **kwargs) # noqa: E501 return data def get_dogma_effects_effect_id_with_http_info(self, effect_id, **kwargs): # noqa: E501 """Get effect information # noqa: E501 Get information on a dogma effect --- This route expires daily at 11:05 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_dogma_effects_effect_id_with_http_info(effect_id, async=True) >>> result = thread.get() :param async bool :param int effect_id: A dogma effect ID (required) :param str datasource: The server name you would like data from :param str user_agent: Client identifier, takes precedence over headers :param str x_user_agent: Client identifier, takes precedence over User-Agent :return: GetDogmaEffectsEffectIdOk If the method is called asynchronously, returns the request thread. """ all_params = ['effect_id', 'datasource', 'user_agent', 'x_user_agent'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_dogma_effects_effect_id" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'effect_id' is set if ('effect_id' not in params or params['effect_id'] is None): raise ValueError("Missing the required parameter `effect_id` when calling `get_dogma_effects_effect_id`") # noqa: E501 collection_formats = {} path_params = {} if 'effect_id' in params: path_params['effect_id'] = params['effect_id'] # noqa: E501 query_params = [] if 'datasource' in params: query_params.append(('datasource', params['datasource'])) # noqa: E501 if 'user_agent' in params: query_params.append(('user_agent', params['user_agent'])) # noqa: E501 header_params = {} if 'x_user_agent' in params: header_params['X-User-Agent'] = params['x_user_agent'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/v2/dogma/effects/{effect_id}/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetDogmaEffectsEffectIdOk', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
40.986577
140
0.623328
2,174
18,321
5.015639
0.080497
0.047689
0.02201
0.036684
0.940664
0.925715
0.919204
0.912234
0.898936
0.881328
0
0.018428
0.289122
18,321
446
141
41.078475
0.818796
0.04765
0
0.779221
1
0
0.19336
0.050804
0
0
0
0
0
0
null
null
0
0.017316
null
null
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
9
e336113ca2989f56124962490b063394fe57f76e
163
py
Python
luthiertext/word_vectors/__init__.py
LautaroEst/LuthierText
f1395fbfda1039bd19fd829cbe853e39ae91805d
[ "MIT" ]
null
null
null
luthiertext/word_vectors/__init__.py
LautaroEst/LuthierText
f1395fbfda1039bd19fd829cbe853e39ae91805d
[ "MIT" ]
null
null
null
luthiertext/word_vectors/__init__.py
LautaroEst/LuthierText
f1395fbfda1039bd19fd829cbe853e39ae91805d
[ "MIT" ]
null
null
null
from .cooccurrence import word_by_word_cooccurrence from .cooccurrence import word_by_document_cooccurrence from .cooccurrence import word_by_category_cooccurrence
54.333333
55
0.91411
21
163
6.666667
0.333333
0.342857
0.471429
0.557143
0.771429
0.571429
0
0
0
0
0
0
0.067485
163
3
56
54.333333
0.921053
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
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
8
8b907ba1b6bb4c7b10dfe2a5d1a6e88cd385e181
22,197
py
Python
gen/niels.py
bh107/niels
591ea1fc7d43315221295762086430652cfc2084
[ "Apache-2.0" ]
2
2015-11-30T21:50:49.000Z
2018-09-29T00:39:43.000Z
gen/niels.py
bh107/niels
591ea1fc7d43315221295762086430652cfc2084
[ "Apache-2.0" ]
null
null
null
gen/niels.py
bh107/niels
591ea1fc7d43315221295762086430652cfc2084
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import itertools import pprint import json as json def nls2json(obj, level=0): """A formatter easing the human readability of niels.json.""" INDENT = 3 SPACE = " " NEWLINE = "\n" def pod_iter(subject): """Assumes subject is an iter of tuples or list.""" count = 0 for e in subject: if (isinstance(e, list) or isinstance(e, tuple)) and len(e)>1: count += 1 return count == 0 ret = "" if isinstance(obj, dict): ret += "{" + NEWLINE comma = "" for k, v in sorted(obj.items()): ret += comma comma = ",\n" ret += SPACE * INDENT * (level+1) ret += '"' + str(k) + '":' + SPACE ret += nls2json(v, level + 1) ret += NEWLINE + SPACE * INDENT * level + "}" elif isinstance(obj, basestring): ret += '"' + obj + '"' elif isinstance(obj, list) and pod_iter(obj): ret += "[" + ", ".join([nls2json(e, level+1) for e in obj]) + "]" elif isinstance(obj, list): ret += "[" + ", ".join([ NEWLINE + SPACE * INDENT * level + nls2json(e, level+1) for e in obj ]) + "]" elif isinstance(obj, tuple) and pod_iter(obj): ret += "[" + ", ".join([nls2json(e, level+1) for e in obj]) + "]" elif isinstance(obj, tuple): ret += "[" + ", ".join([ NEWLINE + SPACE * INDENT * level + nls2json(e, level+1) for e in obj ]) + "]" elif isinstance(obj, bool): ret += "true" if obj else "false" elif isinstance(obj, int): ret += str(obj) elif isinstance(obj, float): ret += '%.7g' % obj else: raise TypeError("Unknown type '%s' for json serialization" % str(type(obj))) return ret def unary_sigs(vtypes): sigs = set() for c, res_vtype in enumerate(vtypes): for in_vtype in vtypes[0:c+1]: sigs.add((res_vtype, in_vtype)) return sorted(list(sigs)) def binary_sigs(vtypes): sigs = set() for c, res_vtype in enumerate(vtypes): for in_vtype in vtypes[0:c+1]: sigs.add((res_vtype, res_vtype, in_vtype)) sigs.add((res_vtype, in_vtype, res_vtype)) return sorted(list(sigs)) def unary_repeat_sigs(vtypes): sigs = set() for vtype in vtypes: sigs.add(tuple([vtype]*2)) return sorted(list(sigs)) def binary_repeat_sigs(vtypes, layout="aaa"): sigs = set() if layout == "aaa" or layout == "kkk": for vtype in vtypes: sigs.add((vtype, vtype, vtype)) elif layout == "aak": for vtype in vtypes: sigs.add((vtype, vtype, vtype.replace("_a",""))) elif layout == "aka": for vtype in vtypes: sigs.add((vtype, vtype.replace("_a",""), vtype)) return sorted(list(sigs)) def unary_logic_sigs(vtypes): return [("bul", in1) for in1, in itertools.product(vtypes, repeat=1)] def binary_logic_sigs(vtypes): return [("bul", in1, in2) for in1, in2 in itertools.product(vtypes, repeat=2)] def camelize(text): """Returns Node names such as i64 -> R64 and less_than -> LessThan.""" return "".join([w.lower().capitalize() for w in text.split("_")]) def enumize(text): """Returns ENUM names from vtype. E.g. i64 -> NLS_I64.""" return "NLS_%s" % text.upper() vtypes_grouped = { "scalar": ["bul", "i32", "i64", "r32", "r64"], "array": ["bul_a", "i32_a", "i64_a", "r32_a", "r64_a"] } vtypes = [vtype for k in vtypes_grouped for vtype in vtypes_grouped[k]] vtype2ctype = { "bul": "bool", "i32": "int32_t", "i64": "int64_t", "r32": "float", "r64": "double", "bul_a": "bxx::multi_array<bool>*", "i32_a": "bxx::multi_array<int32_t>*", "i64_a": "bxx::multi_array<int64_t>*", "r32_a": "bxx::multi_array<float>*", "r64_a": "bxx::multi_array<double>*", } nls = { "vtypes": vtypes, "vtypes_grouped": vtypes_grouped, "vtype2enum": {vtype: enumize(vtype) for vtype in vtypes}, "vtype2ctype": vtype2ctype, "vtype2ast": {vtype: camelize(vtype) for vtype in vtypes}, "operators": [ ("arithmetic", "add", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} + in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bh_add(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aak") ), "aka": ( "*res.value.{res_t} = bh_add(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aka") ), "aaa": ( "*res.value.{res_t} = bh_add(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aaa") ) }), ("arithmetic", "sub", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} - in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bh_subtract(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aak") ), "aka": ( "*res.value.{res_t} = bh_subtract(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aka") ), "aaa": ( "*res.value.{res_t} = bh_subtract(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aaa") ) }), ("arithmetic", "mul", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} * in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bh_multiply(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aak") ), "aka": ( "*res.value.{res_t} = bh_multiply(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aka") ), "aaa": ( "*res.value.{res_t} = bh_multiply(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"], "aaa") ) }), ("arithmetic", "mod", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} % in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"][0:3]) ), "aak": ( "*res.value.{res_t} = bh_mod(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bh_mod(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bh_mod(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ) }), ("arithmetic", "div", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} / in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bh_divide(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bh_divide(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bh_divide(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ) }), ("arithmetic", "pow", 2, { "kkk": ("res.value.{res_t} = pow(in1->value.{in1_t}, in2->value.{in2_t})", binary_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bh_power(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:], "aak") ), "aka": ( "*res.value.{res_t} = bh_power(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:], "aka") ), "aaa": ( "*res.value.{res_t} = bh_power(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:], "aaa") ) }), ("comparison", "lthan", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} < in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_less(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak")] ), "aka": ( "*res.value.{res_t} = bxx::bh_less(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_less(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa")] ) }), ("comparison", "gthan", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} > in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_greater(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak")] ), "aka": ( "*res.value.{res_t} = bxx::bh_greater(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_greater(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa")] ) }), ("comparison", "equal", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} == in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_equal(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak")] ), "aka": ( "*res.value.{res_t} = bxx::bh_equal(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_equal(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa")] ) }), ("comparison", "not_equal", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} != in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_not_equal(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak")] ), "aka": ( "*res.value.{res_t} = bxx::bh_not_equal(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_not_equal(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa")] ) }), ("comparison", "lthan_equal", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} <= in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_less_equal(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak")] ), "aka": ( "*res.value.{res_t} = bxx::bh_less_equal(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_less_equal(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa")] ) }), ("comparison", "gthan_equal", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} >= in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_greater_equal(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak")] ), "aka": ( "*res.value.{res_t} = bxx::bh_greater_equal(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_greater_equal(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", in1, in2) for out, in1, in2 in binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa")] ) }), ("logical", "and", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} && in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_logical_and(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", "bul_a", "bul")] ), "aka": ( "*res.value.{res_t} = bxx::bh_logical_and(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", "bul", "bul_a")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_logical_and(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", "bul_a", "bul_a")] ) }), ("logical", "or", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} || in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_logical_or(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", "bul_a", "bul")] ), "aka": ( "*res.value.{res_t} = bxx::bh_logical_or(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", "bul", "bul_a")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_logical_or(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", "bul_a", "bul_a")] ) }), ("logical", "xor", 2, { "kkk": ("res.value.{res_t} = in1->value.{in1_t} || in2->value.{in2_t}", binary_logic_sigs(vtypes_grouped["scalar"]) ), "aak": ( "*res.value.{res_t} = bxx::bh_logical_xor(*in1->value.{in1_t}, in2->value.{in2_t})", [("bul_a", "bul_a", "bul")] ), "aka": ( "*res.value.{res_t} = bxx::bh_logical_xor(in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", "bul", "bul_a")] ), "aaa": ( "*res.value.{res_t} = bxx::bh_logical_xor(*in1->value.{in1_t}, *in2->value.{in2_t})", [("bul_a", "bul_a", "bul_a")] ) }), ("logical", "not", 1, { "kk": ( "res.value.{res_t} = !in1->value.{in1_t}", unary_logic_sigs(vtypes_grouped["scalar"]) ), "aa": ( "*res.value.{res_t} = bxx::bh_logical_not(*in1->value.{in1_t})", [("bul_a", "bul_a")] ) }), ("bitwise", "bw_lshift", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} << in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"][1:3]) ), "aak": ( "*res.value.{res_t} = bxx::left_shift(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bxx::left_shift(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bxx::left_shift(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ), }), ("bitwise", "bw_rshift", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} >> in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"][1:3]) ), "aak": ( "*res.value.{res_t} = bxx::bh_right_shift(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bxx::bh_right_shift(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bxx::bh_right_shift(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ), }), ("bitwise", "bw_and", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} & in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"][1:3]) ), "aak": ( "*res.value.{res_t} = bxx::bh_bitwise_and(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bxx::bh_bitwise_and(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bxx::bh_bitwise_and(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ), }), ("bitwise", "bw_or", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} | in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"][1:3]) ), "aak": ( "*res.value.{res_t} = bxx::bh_bitwise_or(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bxx::bh_bitwise_or(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bxx::bh_bitwise_or(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ), }), ("bitwise", "bw_xor", 2, { "kkk": ( "res.value.{res_t} = in1->value.{in1_t} ^ in2->value.{in2_t}", binary_sigs(vtypes_grouped["scalar"][1:3]) ), "aak": ( "*res.value.{res_t} = bxx::bh_bitwise_xor(*in1->value.{in1_t}, in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aak") ), "aka": ( "*res.value.{res_t} = bxx::bh_bitwise_xor(in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aka") ), "aaa": ( "*res.value.{res_t} = bxx::bh_bitwise_xor(*in1->value.{in1_t}, *in2->value.{in2_t})", binary_repeat_sigs(vtypes_grouped["array"][1:3], "aaa") ), }), ("bitwise", "bw_not", 1, { "kk": ( "res.value.{res_t} = ~ in1->value.{in1_t}", unary_sigs(vtypes_grouped["scalar"][1:3]) ), "aa": ( "*res.value.{res_t} = bxx::bh_invert(*in1->value.{in1_t})", unary_repeat_sigs(vtypes_grouped["array"][1:3]) ), }) ] } op2node = {} for k, name, ninput, exprs in nls["operators"]: op2node[name] = camelize(name) nls["op2node"] = op2node if __name__ == "__main__": print nls2json(nls)
41.48972
114
0.47565
2,715
22,197
3.644199
0.06151
0.06792
0.09339
0.10188
0.842935
0.82262
0.801496
0.786032
0.782697
0.775015
0
0.040535
0.323152
22,197
534
115
41.567416
0.618011
0.000901
0
0.54321
0
0.125514
0.354242
0.106715
0.00823
0
0
0
0
0
null
null
0
0.006173
null
null
0.004115
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
1
0
0
0
0
0
0
0
0
7
8baab66382989be96670d6b7afb92ee6d5173093
97
py
Python
app/game/behaviour/actions/__init__.py
SMEFIKES/server
1cd6d315dd35c7d6af7f5b5635e755174195a959
[ "MIT" ]
1
2020-03-12T11:12:03.000Z
2020-03-12T11:12:03.000Z
app/game/behaviour/actions/__init__.py
SMEFIKES/server
1cd6d315dd35c7d6af7f5b5635e755174195a959
[ "MIT" ]
null
null
null
app/game/behaviour/actions/__init__.py
SMEFIKES/server
1cd6d315dd35c7d6af7f5b5635e755174195a959
[ "MIT" ]
null
null
null
from .select_actors import * from .actors import * from .squads import * from .movement import *
19.4
28
0.752577
13
97
5.538462
0.461538
0.416667
0.444444
0
0
0
0
0
0
0
0
0
0.164948
97
4
29
24.25
0.888889
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
1
0
0
7
4771b0072dc466429d77f9cb8f74cb56633dac9c
48,455
py
Python
news/tests/test_views.py
kraupn3r/intranet
4cabf6f365ef0ea0f352f67f9322318e161ed265
[ "MIT" ]
null
null
null
news/tests/test_views.py
kraupn3r/intranet
4cabf6f365ef0ea0f352f67f9322318e161ed265
[ "MIT" ]
null
null
null
news/tests/test_views.py
kraupn3r/intranet
4cabf6f365ef0ea0f352f67f9322318e161ed265
[ "MIT" ]
null
null
null
from django.test import TestCase, Client, override_settings from django.urls import reverse from django.http import HttpResponseForbidden from django.contrib.auth.models import Permission, Group, User from django.core.files.uploadedfile import SimpleUploadedFile from django.utils import timezone from accounts.models import UserProfile from news.models import KnowledgeCategory, DocumentF, DocQuestion, DocFile, \ NewsFile, DocumentF, News, NotificationReadFlag, Notification from datetime import date, timedelta import json import tempfile import shutil MEDIA_ROOT = tempfile.mkdtemp() @override_settings(MEDIA_ROOT=MEDIA_ROOT) class TestKnowledgeCategoryListView(TestCase): @classmethod def tearDownClass(cls): shutil.rmtree(MEDIA_ROOT, ignore_errors=True) super().tearDownClass() @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() cls.test_category = KnowledgeCategory.objects.create(title='Test Category') cls.test_category_2 = KnowledgeCategory.objects.create(title='Test Category 2') i = 0 file_test_category = cls.test_category while i < 11: if i%2 == 0: test_location = 'WAW' elif i%3 == 0: test_location = 'non' else: test_location = 'PZN' if i%4 == 0: test_departament = 'HR' elif i%3 == 0: test_departament = 'non' else: test_departament = 'sal' instance = DocFile.objects.create( file = SimpleUploadedFile( 'best_dasdasasdds.txt', b'these are the file contents!' ), title = 'test title', date_created = timezone.now(), target_departament = test_departament, target_location = test_location, category = file_test_category, author = test_user1) instance.save() instance = DocumentF.objects.create( title = 'test title', body = 'test body', author = test_user1, date_created = timezone.now(), target_departament = test_departament, target_location = test_location, category = file_test_category) instance.save() i +=1 def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:knowledge')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/knowledge/') def test_view_if_logged_in(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:knowledge')) self.assertEqual(str(response.context['user']), 'testuser1') self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'news/knowledgecategory_list.html') def test_view_if_files_filtered(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:knowledge')) self.assertEquals(response.context['files'].count(),8) def test_view_if_files_filtered_2(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:knowledge')) self.assertEquals(response.context['files'].count(),6) def test_view_if_documents_filtered(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:knowledge')) self.assertEquals(response.context['docs'].count(),8) def test_view_if_documents_filtered_2(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:knowledge')) self.assertEquals(response.context['docs'].count(),6) @override_settings(MEDIA_ROOT=MEDIA_ROOT) class TestKnowledgeCategoryDetailView(TestCase): @classmethod def tearDownClass(cls): shutil.rmtree(MEDIA_ROOT, ignore_errors=True) super().tearDownClass() @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() cls.test_category = KnowledgeCategory.objects.create(title='Test Category') cls.test_category_2 = KnowledgeCategory.objects.create(title='Test Category 2') cls.test_category.save() cls.test_category_2.save() i = 0 file_test_category = cls.test_category while i < 11: if i%2 == 0: test_location = 'WAW' file_test_category = cls.test_category_2 elif i%3 == 0: test_location = 'non' file_test_category = cls.test_category_2 else: test_location = 'PZN' if i%4 == 0: test_departament = 'HR' elif i%3 == 0: test_departament = 'non' else: test_departament = 'sal' instance = DocFile.objects.create( file = SimpleUploadedFile( 'best_file_eva.txt', b'these are the file contents!' ), title = 'test title', date_created = timezone.now(), target_departament = test_departament, target_location = test_location, category = file_test_category, author = test_user1) instance.save() instance = DocumentF.objects.create( title = 'test title', body = 'test body', author = test_user1, date_created = timezone.now(), target_departament = test_departament, target_location = test_location, category = file_test_category) instance.save() file_test_category = cls.test_category i +=1 def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category.pk})) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/knowledge/1') def test_view_if_logged_in(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category.pk})) self.assertEqual(str(response.context['user']), 'testuser1') self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'news/knowledgecategory_detail.html') def test_view_if_files_filtered_by_category(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category_2.pk})) self.assertEquals(response.context['files'].count(),8) def test_view_if_files_filtered_by_category_2(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category_2.pk})) self.assertEquals(response.context['files'].count(),3) def test_view_if_documents_filtered_by_category(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category_2.pk})) self.assertEquals(response.context['docs'].count(),8) def test_view_if_documents_filtered_by_category_2(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category_2.pk})) self.assertEquals(response.context['docs'].count(),3) def test_view_if_categories_queryset(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:knowledgedetail',kwargs={'pk':self.test_category_2.pk})) self.assertEquals(response.context['categories'].count(),2) class TestQuestionsListView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() cls.test_category = KnowledgeCategory.objects.create(title='Test Category') cls.test_category_2 = KnowledgeCategory.objects.create(title='Test Category 2') cls.test_category.save() cls.test_category_2.save() i = 0 file_test_category = cls.test_category while i < 11: if i%2 == 0: test_location = 'WAW' file_test_category = cls.test_category_2 elif i%3 == 0: test_location = 'non' file_test_category = cls.test_category_2 else: test_location = 'PZN' if i%4 == 0: test_departament = 'HR' elif i%3 == 0: test_departament = 'non' else: test_departament = 'sal' # print('%s %s %s' %(test_location,test_departament,file_test_category)) instance = DocQuestion.objects.create( title = 'test title', body = 'test body', answer = 'test answer', date_created = timezone.now(), target_departament = test_departament, target_location = test_location, category = file_test_category) instance.save() file_test_category = cls.test_category i +=1 def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:faq')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/faq/') def test_view_if_logged_in(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:faq')) self.assertEqual(str(response.context['user']), 'testuser1') self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'news/docquestion_list.html') # def test_view_queryset_length(self): # login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') # response = self.client.get(reverse('news:faq')) # self.assertEquals(response.context['object_list'].count(),6) def test_view_if_files_filtered_by_category_2(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get('%s?category=%s' % (reverse('news:faq'),2)) self.assertEquals(response.context['object_list'].count(),3) def test_view_if_files_filtered_by_category_1(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get('%s?category=%s' % (reverse('news:faq'),1)) self.assertEquals(response.context['object_list'].count(),3) def test_view_if_filtered_by_location_depratament_1(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:faq')) self.assertEquals(response.context['object_list'].count(),8) def test_view_if_filtered_bylocation_depratament_2(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:faq')) self.assertEquals(response.context['object_list'].count(),6) def test_view_categories_queryset(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:faq')) self.assertEquals(response.context['categories'].count(),2) # # # class TestUnansweredQuestionsListView(TestCase): # # # @classmethod # def setUpTestData(cls): # test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') # test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') # test_user2.save() # test_user1.save() # # test_user1_userprofile = UserProfile.objects.create( # user=test_user1, # name='Test User1', # telephone='11', # email='testuser1@email.com', # employee_id='2', # departament='HR', # location='WAW' # ) # # test_user2_userprofile = UserProfile.objects.create( # user=test_user2, # name='Test User2', # telephone='222222222', # email='testuser2@email.com', # employee_id='3', # departament='sal', # location='PZN' # ) # # test_user1_userprofile.save() # test_user2_userprofile.save() # UserQuestion.objects.create( # title='test title', # body='test body', # author= test_user1 # ) # permission = Permission.objects.get(name='Can view user question') # test_user2.user_permissions.add(permission) # test_user2.save() # # def test_view_redirect_if_not_logged_in(self): # response = self.client.get(reverse('news:pending_faq')) # self.assertEquals(response.status_code, 302) # self.assertRedirects(response, '/accounts/login/?next=/faq/pending/') # # def test_view_if_logged_in_no_permission(self): # login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') # response = self.client.get(reverse('news:pending_faq')) # self.assertEquals(response.status_code, 403) # # def test_view_if_logged_in_with_permission(self): # login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') # response = self.client.get(reverse('news:pending_faq')) # self.assertEquals(response.status_code, 200) # self.assertEqual(str(response.context['user']), 'testuser2') # self.assertTemplateUsed(response, 'news/pending_questions.html') # # def test_view_queryset_length(self): # login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') # response = self.client.get(reverse('news:pending_faq')) # self.assertEqual(response.context['object_list'].count(), 1) # class TestUnpublishedNewsListView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() i = 0 while i < 4: instance = News.objects.create( title='test title', body='test body', author= test_user1 ) instance.save() i +=1 instance.publish() permission = Permission.objects.get(name='Can add news') test_user2.user_permissions.add(permission) test_user2.save() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:unpublished')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/news/unpublished/') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:unpublished')) self.assertEquals(response.status_code, 403) def test_view_if_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:unpublished')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/news_list.html') def test_view_queryset_length(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:unpublished')) self.assertEqual(str(response.context['object_list'].count()), '3') class TestNewsDetailView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user3 = User.objects.create_user(username='testuser3', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user3.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='sal', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user3_userprofile = UserProfile.objects.create( user=test_user3, name='Test User3', telephone='333333333', email='testuser3@email.com', employee_id='4', departament='mar', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() test_user3_userprofile.save() cls.test_news = News.objects.create( title='test title', body='test body', author= test_user1, target_location = 'PZN', target_departament = 'sal' ) cls.test_news.publish() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:newsdetail',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/news/1/') def test_view_if_logged_in(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:newsdetail',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/news_detail.html') def test_view_wrong_departament(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:newsdetail',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 403) def test_view_wrong_location(self): login = self.client.login(username='testuser3', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:newsdetail',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 403) class TestDocDetailView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user3 = User.objects.create_user(username='testuser3', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user3.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='sal', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user3_userprofile = UserProfile.objects.create( user=test_user3, name='Test User3', telephone='333333333', email='testuser3@email.com', employee_id='4', departament='mar', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() test_user3_userprofile.save() cls.test_category = KnowledgeCategory.objects.create(title='Test Category') cls.test_category_2 = KnowledgeCategory.objects.create(title='Test Category 2') cls.test_category.save() cls.test_category_2.save() cls.test_document = DocumentF.objects.create( title='test title', body='test body', author= test_user1, target_location = 'PZN', target_departament = 'sal' ) def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:docdetail',kwargs={'pk':self.test_document.pk})) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/docs/1/') def test_view_if_logged_in(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:docdetail',kwargs={'pk':self.test_document.pk})) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/documentf_detail.html') def test_view_wrong_departament(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:docdetail',kwargs={'pk':self.test_document.pk})) self.assertEquals(response.status_code, 403) def test_view_wrong_location(self): login = self.client.login(username='testuser3', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:docdetail',kwargs={'pk':self.test_document.pk})) self.assertEquals(response.status_code, 403) class TestNewsListView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_user1_userprofile.save() test_user2_userprofile.save() i = 0 while i < 4: instance = News.objects.create( title='test title', body='test body', author= test_user1 ) instance.save() i +=1 instance.publish() instance.published_date = None instance.save() i = 0 while i < 11: if i%2 == 0: test_location = 'WAW' elif i%3 == 0: test_location = 'non' else: test_location = 'PZN' if i%5 == 0: test_departament = 'HR' else: test_departament = 'mar' instance = News.objects.create( title='test title', body='test body', author= test_user1, target_location=test_location, target_departament=test_departament, ) i +=1 # print('%s, %s' %(instance.target_location,instance.target_departament)) instance.publish() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:news_list')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/') def test_view_if_logged_in(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:news_list')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/news_list.html') def test_view_queryset_filtering(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:news_list')) self.assertEqual(str(response.context['object_list'].count()), '7') def test_view_queryset_filtering(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:news_list')) self.assertEqual(str(response.context['object_list'].count()), '9') class TestPostNewsView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() permission = Permission.objects.get(name='Can add news') test_user2.user_permissions.add(permission) test_user2.save() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:post_news')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/upload/news') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:post_news')) self.assertEquals(response.status_code, 403) def test_view_if_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:post_news')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/upload.html') class TestPublishNewsView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) permission = Permission.objects.get(name='Can add news') test_user2.user_permissions.add(permission) test_user2.save() cls.test_news = News.objects.create( title='test title', body='test body', author= test_user1, ) def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:publish_news',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/news/1/publish/') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:publish_news',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 403) def test_view_if_redirect_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:publish_news',kwargs={'pk':self.test_news.pk})) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/') def test_view_if_publish(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:publish_news',kwargs={'pk':self.test_news.pk})) self.test_news.refresh_from_db() self.assertIsNotNone(self.test_news.published_date) class TestAnswerFaqView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) test_user2_userprofile = UserProfile.objects.create( user=test_user2, name='Test User2', telephone='222222222', email='testuser2@email.com', employee_id='3', departament='sal', location='PZN' ) test_category = KnowledgeCategory.objects.create(title='Test Category') newgroup = Group.objects.create(name='testgroup') for each in Permission.objects.all(): newgroup.permissions.add(each) test_user2.groups.add(newgroup) cls.test_userquestion = DocQuestion.objects.create( title='test title', body='test body', author= test_user1, ) def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:answerfaq',kwargs={'pk':self.test_userquestion.pk})) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/upload/1/updatequestion') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:answerfaq',kwargs={'pk':self.test_userquestion.pk})) self.assertEquals(response.status_code, 403) def test_view_if_redirect_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:answerfaq',kwargs={'pk':self.test_userquestion.pk})) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/upload.html') class TestFlagToggleView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) cls.test_news = News.objects.create( title='test title', body='test body', author= test_user1, ) cls.test_news.publish() cls.test_notification = Notification.objects.get(news=cls.test_news) cls.test_notificationreadflag = NotificationReadFlag.objects.get( user=test_user1, notification=cls.test_notification) # cls.test_newsreadflag = NewsReadFlag.objects.get(user=test_user1, news=cls.test_news) cls.json_data = json.dumps({'pk': cls.test_news.pk}) def test_view_redirect_if_not_logged_in(self): response = self.client.post(reverse('news:flagtoggle'), self.json_data, content_type='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest') self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/flagtoggle/') def test_view_if_logged_in(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.post(reverse('news:flagtoggle'), self.json_data, content_type='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest') self.assertEquals(response.status_code, 200) def test_view_if_notificationreadflag_true(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.post(reverse('news:flagtoggle'), self.json_data, content_type='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest') self.test_notificationreadflag.refresh_from_db() self.assertTrue(self.test_notificationreadflag.read) # def test_view_if_newsreadflag_true(self): # login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') # response = self.client.post(reverse('news:flagtoggle'), self.json_data, # content_type='application/json', # HTTP_X_REQUESTED_WITH='XMLHttpRequest') # # self.test_newsreadflag.refresh_from_db() # self.assertTrue(self.test_newsreadflag.read) # # class TestNewsReadFlagToggleView(TestCase): # # @classmethod # def setUpTestData(cls): # test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') # test_user1.save() # # test_user1_userprofile = UserProfile.objects.create( # user=test_user1, # name='Test User1', # telephone='11', # email='testuser1@email.com', # employee_id='2', # departament='HR', # location='WAW' # ) # # # cls.test_news = News.objects.create( # title='test title', # body='test body', # author= test_user1, # ) # cls.test_news.publish() # cls.test_newsreadflag = NewsReadFlag.objects.get(user=test_user1, news=cls.test_news) # cls.json_data = json.dumps({'pk': cls.test_news.pk}) # # def test_view_redirect_if_not_logged_in(self): # # # response = self.client.post(reverse('news:newsreadflag'), self.json_data, # content_type='application/json', # HTTP_X_REQUESTED_WITH='XMLHttpRequest') # self.assertEquals(response.status_code, 302) # self.assertRedirects(response, '/accounts/login/?next=/newstoggle/') # # def test_view_if_logged_in(self): # login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') # response = self.client.post(reverse('news:newsreadflag'), self.json_data, # content_type='application/json', # HTTP_X_REQUESTED_WITH='XMLHttpRequest') # self.assertEquals(response.status_code, 200) # # def test_view_if_newsreadflag_true(self): # login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') # response = self.client.post(reverse('news:newsreadflag'), self.json_data, # content_type='application/json', # HTTP_X_REQUESTED_WITH='XMLHttpRequest') # # self.test_newsreadflag.refresh_from_db() # self.assertTrue(self.test_newsreadflag.read) # # class TestMarkallView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user1.save() test_user1_userprofile = UserProfile.objects.create( user=test_user1, name='Test User1', telephone='11', email='testuser1@email.com', employee_id='2', departament='HR', location='WAW' ) cls.test_news = News.objects.create( title='test title', body='test body', author= test_user1, ) cls.test_news_2 = News.objects.create( title='test title 2', body='test body', author= test_user1, ) cls.test_news.publish() cls.test_notification = Notification.objects.get(news=cls.test_news) cls.test_notificationreadflag = NotificationReadFlag.objects.get( user=test_user1, notification=cls.test_notification) # cls.test_newsreadflag = NewsReadFlag.objects.get(user=test_user1, news=cls.test_news) cls.test_news_2.publish() cls.test_notification_2 = Notification.objects.get(news=cls.test_news_2) cls.test_notificationreadflag_2 = NotificationReadFlag.objects.get( user=test_user1, notification=cls.test_notification_2) # cls.test_newsreadflag_2 = NewsReadFlag.objects.get(user=test_user1, news=cls.test_news_2) cls.json_data = json.dumps({}) def test_view_redirect_if_not_logged_in(self): response = self.client.post(reverse('news:markall'), self.json_data, content_type='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest') self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/markall/') def test_view_if_logged_in(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.post(reverse('news:markall'), self.json_data, content_type='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest') self.assertEquals(response.status_code, 200) def test_view_if_notificationreadflag_true(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.post(reverse('news:markall'), self.json_data, content_type='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest') self.test_notificationreadflag.refresh_from_db() self.assertTrue(self.test_notificationreadflag.read) self.test_notificationreadflag_2.refresh_from_db() self.assertTrue(self.test_notificationreadflag_2.read) # def test_view_if_newsreadflag_true(self): # login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') # response = self.client.post(reverse('news:markall'), self.json_data, # content_type='application/json', # HTTP_X_REQUESTED_WITH='XMLHttpRequest') # self.test_newsreadflag.refresh_from_db() # self.assertTrue(self.test_newsreadflag.read) # self.test_newsreadflag_2.refresh_from_db() # self.assertTrue(self.test_newsreadflag_2.read) class TestPostDocumentView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() permission = Permission.objects.get(name='Can add document f') test_user2.user_permissions.add(permission) test_user2.save() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:createdoc')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/upload/doc') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:createdoc')) self.assertEquals(response.status_code, 403) def test_view_if_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:createdoc')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/upload.html') class TestPostDocFileView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() permission = Permission.objects.get(name='Can add doc file') test_user2.user_permissions.add(permission) test_user2.save() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:createfile')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/upload/file') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:createfile')) self.assertEquals(response.status_code, 403) def test_view_if_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:createfile')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/upload.html') class TestPostQuestionView(TestCase): @classmethod def setUpTestData(cls): test_user1 = User.objects.create_user(username='testuser1', password='1X<ISRUkw+tuK') test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() test_user1.save() permission = Permission.objects.get(name='Can add doc question') test_user2.user_permissions.add(permission) test_user2.save() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:createquestion')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/upload/question') def test_view_if_logged_in_no_permission(self): login = self.client.login(username='testuser1', password='1X<ISRUkw+tuK') response = self.client.get(reverse('news:createquestion')) self.assertEquals(response.status_code, 403) def test_view_if_logged_in_with_permission(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:createquestion')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/upload.html') class TestPostUserQuestionView(TestCase): @classmethod def setUpTestData(cls): test_user2 = User.objects.create_user(username='testuser2', password='1ddsSRUkw+tuK') test_user2.save() def test_view_redirect_if_not_logged_in(self): response = self.client.get(reverse('news:createuserquestion')) self.assertEquals(response.status_code, 302) self.assertRedirects(response, '/accounts/login/?next=/upload/userquestion') def test_view_if_logged_in(self): login = self.client.login(username='testuser2', password='1ddsSRUkw+tuK') response = self.client.get(reverse('news:createuserquestion')) self.assertEquals(response.status_code, 200) self.assertEqual(str(response.context['user']), 'testuser2') self.assertTemplateUsed(response, 'news/upload.html')
38.365004
105
0.634135
5,281
48,455
5.620905
0.043742
0.043121
0.027052
0.043862
0.939698
0.936868
0.931108
0.92629
0.915577
0.913522
0
0.022917
0.245362
48,455
1,262
106
38.395404
0.788875
0.121928
0
0.843715
0
0
0.132379
0.017264
0
0
0
0
0.121178
1
0.091733
false
0.088335
0.01359
0
0.123443
0
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
8
4783879f6ea7c3b62b521ebc0af8e324015d6d3f
252
py
Python
parser/fase2/team27/G-27/Optimizacion/Instrucciones/ins_return.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
null
null
null
parser/fase2/team27/G-27/Optimizacion/Instrucciones/ins_return.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
null
null
null
parser/fase2/team27/G-27/Optimizacion/Instrucciones/ins_return.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
null
null
null
from Optimizacion.Instrucciones.instruccion import * class Ins_return(Instruccion): def __init__(self, ins, params): Instruccion.__init__(self, ins, params) def execute(self): return {'ins': self.ins, 'params': self.params}
36
55
0.690476
29
252
5.689655
0.448276
0.127273
0.236364
0.206061
0
0
0
0
0
0
0
0
0.190476
252
7
55
36
0.808824
0
0
0
0
0
0.035573
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.166667
0.833333
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
47eccc2b518effac6c9ba70e18f94b289376f578
3,041
py
Python
data/cnndm/_create_bpe_model.py
ErikHumphrey/sustain-seq2seq
c4787f0ca1047d01385e4fa4ffde59c6a8ab4cc4
[ "Apache-2.0" ]
4
2019-05-09T19:47:48.000Z
2020-04-11T13:58:31.000Z
data/cnndm/_create_bpe_model.py
ErikHumphrey/sustain-seq2seq
c4787f0ca1047d01385e4fa4ffde59c6a8ab4cc4
[ "Apache-2.0" ]
null
null
null
data/cnndm/_create_bpe_model.py
ErikHumphrey/sustain-seq2seq
c4787f0ca1047d01385e4fa4ffde59c6a8ab4cc4
[ "Apache-2.0" ]
4
2018-12-05T01:52:22.000Z
2019-11-01T01:01:52.000Z
import sentencepiece as spm if not os.path.exists("bpe/bpe_models"): os.makedirs("bpe/bpe_models") #spm.SentencePieceTrainer.Train('--input=text_only/corpus.1M.txt --model_prefix=m --vocab_size=1000 --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true') #spm.SentencePieceTrainer.Train('--input=text_only/Z_news.2015.en.shuffled --model_prefix=news.1K.ws.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --input_sentence_size=1000000 --shuffle_input_sentence=true --vocab_size=1024') # CNNDM # 1K spm.SentencePieceTrainer.Train('--input=text_only/cnndm.txt --model_prefix=cnndm.1K.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --vocab_size=1024') # 8K spm.SentencePieceTrainer.Train('--input=text_only/cnndm.txt --model_prefix=cnndm.8K.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --vocab_size=8096') #32K spm.SentencePieceTrainer.Train('--input=text_only/cnndm.txt --model_prefix=cnndm.32K.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --vocab_size=32768') # NEWS SHUFFLED # 1K spm.SentencePieceTrainer.Train('--input=text_only/Z_news.2015.en.shuffled --model_prefix=news.1K.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --vocab_size=1024') # 8K spm.SentencePieceTrainer.Train('--input=text_only/Z_news.2015.en.shuffled --model_prefix=news.4K.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --vocab_size=8096') #32K spm.SentencePieceTrainer.Train('--input=text_only/Z_news.2015.en.shuffled --model_prefix=news.32K.bpe --unk_surface=<UNK> --character_coverage=1.0 --pad_id=0 --pad_piece=<PAD> --unk_id=1 --unk_piece=<UNK> --bos_id=2 --bos_piece=<BOS> --eos_id=3 --eos_piece=<EOS> --model_type=bpe --num_threads=8 --split_by_whitespace=true --shuffle_input_sentence=true --vocab_size=32768') #--user_defined_symbols=!,\",&,@,#,_,-
95.03125
436
0.748109
506
3,041
4.189723
0.132411
0.026415
0.084906
0.101887
0.916981
0.916981
0.897642
0.878302
0.878302
0.878302
0
0.04363
0.057876
3,041
32
437
95.03125
0.696335
0.231174
0
0
0
0.666667
0.865922
0.36055
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
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
1
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
9
47f1aa9f4f90955f464ba95f8af755a7e28e0fa7
128
py
Python
sumgraph/cli.py
DbCrWk/sumgraph
100bc4a9ddcbb7c29b7b581d42e7c3697cde46ce
[ "MIT" ]
null
null
null
sumgraph/cli.py
DbCrWk/sumgraph
100bc4a9ddcbb7c29b7b581d42e7c3697cde46ce
[ "MIT" ]
null
null
null
sumgraph/cli.py
DbCrWk/sumgraph
100bc4a9ddcbb7c29b7b581d42e7c3697cde46ce
[ "MIT" ]
null
null
null
""" The main entrypoint to our CLI """ def main(): """ The main entrypoint to our CLI """ print("sumgraph!")
10.666667
34
0.546875
16
128
4.375
0.5625
0.2
0.485714
0.542857
0.714286
0.714286
0
0
0
0
0
0
0.296875
128
11
35
11.636364
0.777778
0.476563
0
0
0
0
0.204545
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
1
0
0
null
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
7
9a65d53ec170e0f99d497c7551708eaa10bf331f
122
py
Python
core/utils.py
mpyrev/lunchegram
14a29da74e14a959be607e4fc76bbc2f181c5278
[ "MIT" ]
1
2019-11-26T13:49:02.000Z
2019-11-26T13:49:02.000Z
core/utils.py
mpyrev/lunchegram
14a29da74e14a959be607e4fc76bbc2f181c5278
[ "MIT" ]
7
2019-12-24T13:17:23.000Z
2022-02-10T12:35:14.000Z
core/utils.py
mpyrev/lunchegram
14a29da74e14a959be607e4fc76bbc2f181c5278
[ "MIT" ]
null
null
null
from django.conf import settings from redis import Redis def get_redis(): return Redis.from_url(settings.REDIS_URL)
17.428571
45
0.786885
19
122
4.894737
0.526316
0
0
0
0
0
0
0
0
0
0
0
0.147541
122
6
46
20.333333
0.894231
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.5
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
d09da2f2748dc0e42c6c130b471527f7577336df
1,293
py
Python
tests/test_group.py
h5preserve/h5preserve
c3840b26868d15dd8d14f99d1d188aa066c2bb84
[ "BSD-3-Clause" ]
2
2020-03-03T20:34:13.000Z
2020-10-02T05:51:01.000Z
tests/test_group.py
h5preserve/h5preserve
c3840b26868d15dd8d14f99d1d188aa066c2bb84
[ "BSD-3-Clause" ]
178
2017-07-14T01:33:50.000Z
2022-03-31T10:14:25.000Z
tests/test_group.py
h5preserve/h5preserve
c3840b26868d15dd8d14f99d1d188aa066c2bb84
[ "BSD-3-Clause" ]
2
2017-07-14T01:29:25.000Z
2018-02-28T12:10:26.000Z
import pytest from h5preserve import H5PreserveGroup, new_registry_list class TestGroup(object): def test_create_group(self, h5py_file_with_group): group = h5py_file_with_group["example"] h5preserve_group = H5PreserveGroup(group, new_registry_list()) h5preserve_subgroup = h5preserve_group.create_group("subexample") assert h5preserve_subgroup.h5py_group == group["subexample"] def test_require_group_no_exist(self, h5py_file_with_group): group = h5py_file_with_group["example"] h5preserve_group = H5PreserveGroup(group, new_registry_list()) h5preserve_subgroup = h5preserve_group.require_group("subexample") assert h5preserve_subgroup.h5py_group == group["subexample"] def test_require_group_exist(self, h5py_file_with_group): group = h5py_file_with_group["example"] h5preserve_group = H5PreserveGroup( h5py_file_with_group, new_registry_list() ) h5preserve_subgroup = h5preserve_group.require_group("example") assert h5preserve_subgroup.h5py_group == group def test_roundtrip(self, h5py_file_with_group): group = h5py_file_with_group["example"] assert group == H5PreserveGroup( group, new_registry_list() ).h5py_group
41.709677
74
0.730085
148
1,293
5.932432
0.182432
0.082005
0.123007
0.17426
0.820046
0.820046
0.731207
0.731207
0.731207
0.731207
0
0.029665
0.191802
1,293
30
75
43.1
0.810526
0
0
0.32
0
0
0.058005
0
0
0
0
0
0.16
1
0.16
false
0
0.08
0
0.28
0
0
0
0
null
0
0
1
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
7
d0a55b4f81c0214b5337baf3ae0918d20ebc1e2c
125
py
Python
pysim/utils.py
cmaruan/pysim
a670895f04d0f8e2e1248b852f6ac6b504e6f38a
[ "MIT" ]
null
null
null
pysim/utils.py
cmaruan/pysim
a670895f04d0f8e2e1248b852f6ac6b504e6f38a
[ "MIT" ]
null
null
null
pysim/utils.py
cmaruan/pysim
a670895f04d0f8e2e1248b852f6ac6b504e6f38a
[ "MIT" ]
null
null
null
import os HIDDEN_CONFIG_FOLDER = '~/.py-sim' def get_config_folder(): return os.path.expanduser(HIDDEN_CONFIG_FOLDER)
15.625
51
0.76
18
125
4.944444
0.666667
0.404494
0.404494
0
0
0
0
0
0
0
0
0
0.128
125
7
52
17.857143
0.816514
0
0
0
0
0
0.072581
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
d0d7c627c238357e517e2f9aa1cb722dcad9c03d
2,604
py
Python
build/lib/Musical_era.py
Leila571/I_A_8
87326d741e3f9127ea3e5b4e4a18201addb823f9
[ "MIT" ]
null
null
null
build/lib/Musical_era.py
Leila571/I_A_8
87326d741e3f9127ea3e5b4e4a18201addb823f9
[ "MIT" ]
null
null
null
build/lib/Musical_era.py
Leila571/I_A_8
87326d741e3f9127ea3e5b4e4a18201addb823f9
[ "MIT" ]
null
null
null
def Musical_era_question_1(): score_number = 0 what_key_str = "minor" #print ("Can you identify this key?") a=input("Can you identify this key? \n Question 1: What is the key of this song?") #import audio file of We're Going Wrong here if "minor" in a: score_number = 1 return score_number , what_key_str, "Correct!" else: score_number = 0 return score_number, what_key_str,"Wrong! It's minor! \n You have finished and scored "+ str(score_number)+ " out of 5" def Musical_era_question_2(): score_number = 0 what_key_str = "minor" #print ("Can you identify this key?") a=input("Can you identify this key? \n Question 1: What is the key of this song?") #import audio file of We're Going Wrong here if "minor" in a: score_number = 1 return score_number , what_key_str, "Correct!" else: score_number = 0 return score_number, what_key_str,"Wrong! It's minor! \n You have finished and scored "+ str(score_number)+ " out of 5" def Musical_era_question_3(): score_number = 0 what_key_str = "minor" #print ("Can you identify this key?") a=input("Can you identify this key? \n Question 1: What is the key of this song?") #import audio file of We're Going Wrong here if "minor" in a: score_number = 1 return score_number , what_key_str, "Correct!" else: score_number = 0 return score_number, what_key_str,"Wrong! It's minor! \n You have finished and scored "+ str(score_number)+ " out of 5" def Musical_era_question_4(): score_number = 0 what_key_str = "minor" #print ("Can you identify this key?") a=input("Can you identify this key? \n Question 1: What is the key of this song?") #import audio file of We're Going Wrong here if "minor" in a: score_number = 1 return score_number , what_key_str, "Correct!" else: score_number = 0 return score_number, what_key_str,"Wrong! It's minor! \n You have finished and scored "+ str(score_number)+ " out of 5" def Musical_era_question_5(): score_number = 0 what_key_str = "minor" #print ("Can you identify this key?") a=input("Can you identify this key? \n Question 1: What is the key of this song?") #import audio file of We're Going Wrong here if "minor" in a: score_number = 1 return score_number , what_key_str, "Correct!" else: score_number = 0 return score_number, what_key_str,"Wrong! It's minor! \n You have finished and scored "+ str(score_number)+ " out of 5"
40.061538
127
0.654762
420
2,604
3.880952
0.114286
0.202454
0.092025
0.110429
0.984049
0.984049
0.984049
0.984049
0.984049
0.984049
0
0.015385
0.251152
2,604
64
128
40.6875
0.820513
0.15169
0
0.9
0
0
0.33879
0
0
0
0
0
0
1
0.1
false
0
0
0
0.3
0
0
0
0
null
1
0
0
1
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
8
d0dda698c4436f24dd106ac2bd659facf95a3af6
19,739
py
Python
cellpack/mgl_tools/DejaVu/Tests/Data/rgb10_transparent_map.py
mesoscope/cellpack
ec6b736fc706c1fae16392befa814b5337a3a692
[ "MIT" ]
null
null
null
cellpack/mgl_tools/DejaVu/Tests/Data/rgb10_transparent_map.py
mesoscope/cellpack
ec6b736fc706c1fae16392befa814b5337a3a692
[ "MIT" ]
21
2021-10-02T00:07:05.000Z
2022-03-30T00:02:10.000Z
cellpack/mgl_tools/DejaVu/Tests/Data/rgb10_transparent_map.py
mesoscope/cellpack
ec6b736fc706c1fae16392befa814b5337a3a692
[ "MIT" ]
null
null
null
## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by from DejaVu.colorMap import ColorMap from numpy.oldnumeric import array cm = ColorMap("cmap") cfg = { "mini": 0.0, "maxi": 10.0, "ramp": array( [ [4.58000024e-04, 0.00000000e00, 2.29000002e-01, 1.00000000e00], [4.68000013e-04, 0.00000000e00, 2.33999997e-01, 1.00000000e00], [4.80000017e-04, 0.00000000e00, 2.39999995e-01, 1.00000000e00], [4.80000017e-04, 0.00000000e00, 2.39999995e-01, 1.00000000e00], [4.92000021e-04, 0.00000000e00, 2.46000007e-01, 1.00000000e00], [5.02000039e-04, 0.00000000e00, 2.50999987e-01, 1.00000000e00], [5.14000014e-04, 0.00000000e00, 2.56999999e-01, 1.00000000e00], [5.14000014e-04, 0.00000000e00, 2.56999999e-01, 1.00000000e00], [5.26000047e-04, 0.00000000e00, 2.63000011e-01, 1.00000000e00], [5.38000022e-04, 0.00000000e00, 2.68999994e-01, 1.00000000e00], [5.38000022e-04, 0.00000000e00, 2.68999994e-01, 1.00000000e00], [5.48000040e-04, 0.00000000e00, 2.73999989e-01, 1.00000000e00], [5.60000015e-04, 0.00000000e00, 2.80000001e-01, 1.00000000e00], [5.60000015e-04, 0.00000000e00, 2.80000001e-01, 1.00000000e00], [5.72000048e-04, 0.00000000e00, 2.86000013e-01, 1.00000000e00], [5.72000048e-04, 0.00000000e00, 2.86000013e-01, 1.00000000e00], [5.82000008e-04, 0.00000000e00, 2.91000009e-01, 1.00000000e00], [5.82000008e-04, 0.00000000e00, 2.91000009e-01, 1.00000000e00], [5.94000041e-04, 0.00000000e00, 2.96999991e-01, 1.00000000e00], [5.94000041e-04, 0.00000000e00, 2.96999991e-01, 1.00000000e00], [6.06000016e-04, 0.00000000e00, 3.03000003e-01, 1.00000000e00], [6.06000016e-04, 0.00000000e00, 3.03000003e-01, 1.00000000e00], [6.18000049e-04, 0.00000000e00, 3.08999985e-01, 1.00000000e00], [6.28000009e-04, 0.00000000e00, 3.14000010e-01, 1.00000000e00], [6.40000042e-04, 0.00000000e00, 3.19999993e-01, 1.00000000e00], [0.00000000e00, 1.44091994e-01, 3.26000005e-01, 1.00000000e00], [0.00000000e00, 1.46302000e-01, 3.31000000e-01, 1.00000000e00], [0.00000000e00, 1.46302000e-01, 3.31000000e-01, 1.00000000e00], [0.00000000e00, 1.46302000e-01, 3.31000000e-01, 1.00000000e00], [0.00000000e00, 1.48954004e-01, 3.37000012e-01, 1.00000000e00], [0.00000000e00, 1.48954004e-01, 3.37000012e-01, 1.00000000e00], [0.00000000e00, 1.48954004e-01, 3.37000012e-01, 1.00000000e00], [0.00000000e00, 1.51605994e-01, 3.42999995e-01, 1.00000000e00], [0.00000000e00, 1.51605994e-01, 3.42999995e-01, 1.00000000e00], [0.00000000e00, 1.54257998e-01, 3.49000007e-01, 1.00000000e00], [0.00000000e00, 1.54257998e-01, 3.49000007e-01, 1.00000000e00], [0.00000000e00, 1.56468004e-01, 3.54000002e-01, 1.00000000e00], [0.00000000e00, 1.56468004e-01, 3.54000002e-01, 1.00000000e00], [0.00000000e00, 1.59119993e-01, 3.60000014e-01, 1.00000000e00], [0.00000000e00, 1.59119993e-01, 3.60000014e-01, 1.00000000e00], [0.00000000e00, 1.61771998e-01, 3.65999997e-01, 1.00000000e00], [0.00000000e00, 1.61771998e-01, 3.65999997e-01, 1.00000000e00], [0.00000000e00, 1.63982004e-01, 3.70999992e-01, 1.00000000e00], [0.00000000e00, 1.63982004e-01, 3.70999992e-01, 1.00000000e00], [0.00000000e00, 1.66633993e-01, 3.77000004e-01, 1.00000000e00], [0.00000000e00, 1.66633993e-01, 3.77000004e-01, 1.00000000e00], [0.00000000e00, 1.69285998e-01, 3.82999986e-01, 1.00000000e00], [0.00000000e00, 1.69285998e-01, 3.82999986e-01, 1.00000000e00], [0.00000000e00, 1.71938002e-01, 3.88999999e-01, 1.00000000e00], [0.00000000e00, 1.71938002e-01, 3.88999999e-01, 1.00000000e00], [0.00000000e00, 1.74147993e-01, 3.93999994e-01, 1.00000000e00], [0.00000000e00, 3.51999998e-01, 4.00000006e-01, 1.00000000e00], [0.00000000e00, 3.51999998e-01, 4.00000006e-01, 1.00000000e00], [0.00000000e00, 3.57279986e-01, 4.05999988e-01, 1.00000000e00], [0.00000000e00, 3.61680001e-01, 4.11000013e-01, 1.00000000e00], [0.00000000e00, 3.61680001e-01, 4.11000013e-01, 1.00000000e00], [0.00000000e00, 3.61680001e-01, 4.11000013e-01, 1.00000000e00], [0.00000000e00, 3.66959989e-01, 4.16999996e-01, 1.00000000e00], [0.00000000e00, 3.66959989e-01, 4.16999996e-01, 1.00000000e00], [0.00000000e00, 3.66959989e-01, 4.16999996e-01, 1.00000000e00], [0.00000000e00, 3.72240007e-01, 4.23000008e-01, 1.00000000e00], [0.00000000e00, 3.72240007e-01, 4.23000008e-01, 1.00000000e00], [0.00000000e00, 3.77519995e-01, 4.28999990e-01, 1.00000000e00], [0.00000000e00, 3.77519995e-01, 4.28999990e-01, 1.00000000e00], [0.00000000e00, 3.77519995e-01, 4.28999990e-01, 1.00000000e00], [0.00000000e00, 3.81920010e-01, 4.33999985e-01, 1.00000000e00], [0.00000000e00, 3.81920010e-01, 4.33999985e-01, 1.00000000e00], [0.00000000e00, 3.81920010e-01, 4.33999985e-01, 1.00000000e00], [0.00000000e00, 3.87199998e-01, 4.39999998e-01, 1.00000000e00], [0.00000000e00, 3.87199998e-01, 4.39999998e-01, 1.00000000e00], [0.00000000e00, 3.92479986e-01, 4.46000010e-01, 1.00000000e00], [0.00000000e00, 3.92479986e-01, 4.46000010e-01, 1.00000000e00], [0.00000000e00, 3.96880001e-01, 4.51000005e-01, 1.00000000e00], [0.00000000e00, 3.96880001e-01, 4.51000005e-01, 1.00000000e00], [0.00000000e00, 4.02159989e-01, 4.56999987e-01, 1.00000000e00], [0.00000000e00, 4.07440007e-01, 4.63000000e-01, 1.00000000e00], [0.00000000e00, 4.63000000e-01, 3.15765977e-01, 1.00000000e00], [0.00000000e00, 4.69000012e-01, 3.19857985e-01, 1.00000000e00], [0.00000000e00, 4.74000007e-01, 3.23267996e-01, 1.00000000e00], [0.00000000e00, 4.74000007e-01, 3.23267996e-01, 1.00000000e00], [0.00000000e00, 4.74000007e-01, 3.23267996e-01, 1.00000000e00], [0.00000000e00, 4.79999989e-01, 3.27360004e-01, 1.00000000e00], [0.00000000e00, 4.79999989e-01, 3.27360004e-01, 1.00000000e00], [0.00000000e00, 4.79999989e-01, 3.27360004e-01, 1.00000000e00], [0.00000000e00, 4.86000001e-01, 3.31451982e-01, 1.00000000e00], [0.00000000e00, 4.90999997e-01, 3.34861994e-01, 1.00000000e00], [0.00000000e00, 4.97000009e-01, 3.38954002e-01, 1.00000000e00], [0.00000000e00, 5.03000021e-01, 3.43045980e-01, 1.00000000e00], [0.00000000e00, 5.09000003e-01, 3.47137988e-01, 1.00000000e00], [0.00000000e00, 5.09000003e-01, 3.47137988e-01, 1.00000000e00], [0.00000000e00, 5.13999999e-01, 3.50547999e-01, 1.00000000e00], [0.00000000e00, 5.13999999e-01, 3.50547999e-01, 1.00000000e00], [0.00000000e00, 5.19999981e-01, 3.54639977e-01, 1.00000000e00], [0.00000000e00, 5.19999981e-01, 3.54639977e-01, 1.00000000e00], [0.00000000e00, 5.26000023e-01, 3.58731985e-01, 1.00000000e00], [0.00000000e00, 5.31000018e-01, 3.62141997e-01, 1.00000000e00], [0.00000000e00, 5.31000018e-01, 3.62141997e-01, 1.00000000e00], [0.00000000e00, 5.37000000e-01, 3.66234004e-01, 1.00000000e00], [0.00000000e00, 5.37000000e-01, 3.66234004e-01, 1.00000000e00], [0.00000000e00, 5.42999983e-01, 3.70325983e-01, 1.00000000e00], [0.00000000e00, 5.49000025e-01, 3.74417961e-01, 1.00000000e00], [0.00000000e00, 5.54000020e-01, 3.77828002e-01, 1.00000000e00], [0.00000000e00, 5.60000002e-01, 1.33280009e-01, 1.00000000e00], [0.00000000e00, 5.65999985e-01, 1.34708002e-01, 1.00000000e00], [0.00000000e00, 5.70999980e-01, 1.35898009e-01, 1.00000000e00], [0.00000000e00, 5.70999980e-01, 1.35898009e-01, 1.00000000e00], [0.00000000e00, 5.77000022e-01, 1.37326002e-01, 1.00000000e00], [0.00000000e00, 5.83000004e-01, 1.38754010e-01, 1.00000000e00], [0.00000000e00, 5.83000004e-01, 1.38754010e-01, 1.00000000e00], [0.00000000e00, 5.88999987e-01, 1.40182003e-01, 1.00000000e00], [0.00000000e00, 5.93999982e-01, 1.41372010e-01, 1.00000000e00], [0.00000000e00, 5.93999982e-01, 1.41372010e-01, 1.00000000e00], [0.00000000e00, 5.93999982e-01, 1.41372010e-01, 1.00000000e00], [0.00000000e00, 6.00000024e-01, 1.42800003e-01, 1.00000000e00], [0.00000000e00, 6.00000024e-01, 1.42800003e-01, 1.00000000e00], [0.00000000e00, 6.00000024e-01, 1.42800003e-01, 1.00000000e00], [0.00000000e00, 6.06000006e-01, 1.44227996e-01, 1.00000000e00], [0.00000000e00, 6.11000001e-01, 1.45418003e-01, 1.00000000e00], [0.00000000e00, 6.16999984e-01, 1.46845996e-01, 1.00000000e00], [0.00000000e00, 6.23000026e-01, 1.48274004e-01, 1.00000000e00], [0.00000000e00, 6.29000008e-01, 1.49701998e-01, 1.00000000e00], [0.00000000e00, 6.29000008e-01, 1.49701998e-01, 1.00000000e00], [0.00000000e00, 6.34000003e-01, 1.50892004e-01, 1.00000000e00], [0.00000000e00, 6.39999986e-01, 1.52319998e-01, 1.00000000e00], [0.00000000e00, 6.39999986e-01, 1.52319998e-01, 1.00000000e00], [0.00000000e00, 6.46000028e-01, 1.53748006e-01, 1.00000000e00], [0.00000000e00, 6.51000023e-01, 1.54937997e-01, 1.00000000e00], [0.00000000e00, 6.51000023e-01, 1.54937997e-01, 1.00000000e00], [1.31400004e-01, 6.57000005e-01, 0.00000000e00, 1.00000000e00], [1.32599995e-01, 6.62999988e-01, 0.00000000e00, 1.00000000e00], [1.32599995e-01, 6.62999988e-01, 0.00000000e00, 1.00000000e00], [1.33800000e-01, 6.69000030e-01, 0.00000000e00, 1.00000000e00], [1.34800002e-01, 6.74000025e-01, 0.00000000e00, 1.00000000e00], [1.34800002e-01, 6.74000025e-01, 0.00000000e00, 1.00000000e00], [1.36000007e-01, 6.80000007e-01, 0.00000000e00, 1.00000000e00], [1.36000007e-01, 6.80000007e-01, 0.00000000e00, 1.00000000e00], [1.37199998e-01, 6.85999990e-01, 0.00000000e00, 1.00000000e00], [1.38200000e-01, 6.90999985e-01, 0.00000000e00, 1.00000000e00], [1.38200000e-01, 6.90999985e-01, 0.00000000e00, 1.00000000e00], [1.39400005e-01, 6.97000027e-01, 0.00000000e00, 1.00000000e00], [1.40599996e-01, 7.03000009e-01, 0.00000000e00, 1.00000000e00], [1.41800001e-01, 7.08999991e-01, 0.00000000e00, 1.00000000e00], [1.42800003e-01, 7.13999987e-01, 0.00000000e00, 1.00000000e00], [1.44000009e-01, 7.20000029e-01, 0.00000000e00, 1.00000000e00], [1.45199999e-01, 7.26000011e-01, 0.00000000e00, 1.00000000e00], [1.45199999e-01, 7.26000011e-01, 0.00000000e00, 1.00000000e00], [1.45199999e-01, 7.26000011e-01, 0.00000000e00, 1.00000000e00], [1.46200001e-01, 7.31000006e-01, 0.00000000e00, 1.00000000e00], [1.46200001e-01, 7.31000006e-01, 0.00000000e00, 1.00000000e00], [1.46200001e-01, 7.31000006e-01, 0.00000000e00, 1.00000000e00], [1.47400007e-01, 7.36999989e-01, 0.00000000e00, 1.00000000e00], [1.48599997e-01, 7.42999971e-01, 0.00000000e00, 1.00000000e00], [1.49800003e-01, 7.49000013e-01, 0.00000000e00, 1.00000000e00], [4.81052011e-01, 7.54000008e-01, 0.00000000e00, 1.00000000e00], [4.84880000e-01, 7.59999990e-01, 0.00000000e00, 1.00000000e00], [4.84880000e-01, 7.59999990e-01, 0.00000000e00, 1.00000000e00], [4.88708049e-01, 7.65999973e-01, 0.00000000e00, 1.00000000e00], [4.88708019e-01, 7.65999973e-01, 0.00000000e00, 1.00000000e00], [4.91898000e-01, 7.71000028e-01, 0.00000000e00, 1.00000000e00], [4.95726019e-01, 7.77000010e-01, 0.00000000e00, 1.00000000e00], [4.95726019e-01, 7.77000010e-01, 0.00000000e00, 1.00000000e00], [4.99554008e-01, 7.82999992e-01, 0.00000000e00, 1.00000000e00], [5.03382027e-01, 7.88999975e-01, 0.00000000e00, 1.00000000e00], [5.03382027e-01, 7.88999975e-01, 0.00000000e00, 1.00000000e00], [5.06572008e-01, 7.94000030e-01, 0.00000000e00, 1.00000000e00], [5.06572008e-01, 7.94000030e-01, 0.00000000e00, 1.00000000e00], [5.10399997e-01, 8.00000012e-01, 0.00000000e00, 1.00000000e00], [5.14227986e-01, 8.05999994e-01, 0.00000000e00, 1.00000000e00], [5.14227986e-01, 8.05999994e-01, 0.00000000e00, 1.00000000e00], [5.17418027e-01, 8.10999990e-01, 0.00000000e00, 1.00000000e00], [5.21246016e-01, 8.16999972e-01, 0.00000000e00, 1.00000000e00], [5.21246016e-01, 8.16999972e-01, 0.00000000e00, 1.00000000e00], [5.25074005e-01, 8.23000014e-01, 0.00000000e00, 1.00000000e00], [5.28901994e-01, 8.28999996e-01, 0.00000000e00, 1.00000000e00], [5.32092035e-01, 8.33999991e-01, 0.00000000e00, 1.00000000e00], [5.35920024e-01, 8.39999974e-01, 0.00000000e00, 1.00000000e00], [5.39748013e-01, 8.46000016e-01, 0.00000000e00, 1.00000000e00], [5.39748013e-01, 8.46000016e-01, 0.00000000e00, 1.00000000e00], [5.42937994e-01, 8.51000011e-01, 0.00000000e00, 1.00000000e00], [8.51000011e-01, 7.81217992e-01, 0.00000000e00, 1.00000000e00], [8.56999993e-01, 7.86725998e-01, 0.00000000e00, 1.00000000e00], [8.56999993e-01, 7.86725998e-01, 0.00000000e00, 1.00000000e00], [8.62999976e-01, 7.92234004e-01, 0.00000000e00, 1.00000000e00], [8.62999976e-01, 7.92234004e-01, 0.00000000e00, 1.00000000e00], [8.69000018e-01, 7.97742009e-01, 0.00000000e00, 1.00000000e00], [8.69000018e-01, 7.97742009e-01, 0.00000000e00, 1.00000000e00], [8.74000013e-01, 8.02331984e-01, 0.00000000e00, 1.00000000e00], [8.79999995e-01, 8.07839990e-01, 0.00000000e00, 1.00000000e00], [8.85999978e-01, 8.13347995e-01, 0.00000000e00, 1.00000000e00], [8.90999973e-01, 8.17937970e-01, 0.00000000e00, 1.00000000e00], [8.97000015e-01, 8.23445976e-01, 0.00000000e00, 1.00000000e00], [8.97000015e-01, 8.23445976e-01, 0.00000000e00, 1.00000000e00], [9.02999997e-01, 8.28953981e-01, 0.00000000e00, 1.00000000e00], [9.02999997e-01, 8.28953981e-01, 0.00000000e00, 1.00000000e00], [9.02999997e-01, 8.28953981e-01, 0.00000000e00, 1.00000000e00], [9.02999997e-01, 8.28953981e-01, 0.00000000e00, 1.00000000e00], [9.08999979e-01, 8.34461987e-01, 0.00000000e00, 1.00000000e00], [9.08999979e-01, 8.34461987e-01, 0.00000000e00, 1.00000000e00], [9.13999975e-01, 8.39051962e-01, 0.00000000e00, 1.00000000e00], [9.13999975e-01, 8.39051962e-01, 0.00000000e00, 1.00000000e00], [9.20000017e-01, 8.44559968e-01, 0.00000000e00, 1.00000000e00], [9.25999999e-01, 8.50067973e-01, 0.00000000e00, 1.00000000e00], [9.25999999e-01, 8.50067973e-01, 0.00000000e00, 1.00000000e00], [9.30999994e-01, 8.54658008e-01, 0.00000000e00, 1.00000000e00], [9.30999994e-01, 4.46879983e-01, 0.00000000e00, 1.00000000e00], [9.30999994e-01, 4.46879983e-01, 0.00000000e00, 1.00000000e00], [9.36999977e-01, 4.49759990e-01, 0.00000000e00, 1.00000000e00], [9.43000019e-01, 4.52639997e-01, 0.00000000e00, 1.00000000e00], [9.43000019e-01, 4.52639997e-01, 0.00000000e00, 1.00000000e00], [9.43000019e-01, 4.52639997e-01, 0.00000000e00, 1.00000000e00], [9.49000001e-01, 4.55520004e-01, 0.00000000e00, 1.00000000e00], [9.49000001e-01, 4.55520004e-01, 0.00000000e00, 1.00000000e00], [9.53999996e-01, 4.57919985e-01, 0.00000000e00, 1.00000000e00], [9.53999996e-01, 4.57919985e-01, 0.00000000e00, 1.00000000e00], [9.59999979e-01, 4.60799992e-01, 0.00000000e00, 1.00000000e00], [9.59999979e-01, 4.60799992e-01, 0.00000000e00, 1.00000000e00], [9.59999979e-01, 4.60799992e-01, 0.00000000e00, 1.00000000e00], [9.66000021e-01, 4.63679999e-01, 0.00000000e00, 1.00000000e00], [9.71000016e-01, 4.66079980e-01, 0.00000000e00, 1.00000000e00], [9.71000016e-01, 4.66079980e-01, 0.00000000e00, 1.00000000e00], [9.76999998e-01, 4.68959987e-01, 0.00000000e00, 1.00000000e00], [9.82999980e-01, 4.71839994e-01, 0.00000000e00, 1.00000000e00], [9.82999980e-01, 4.71839994e-01, 0.00000000e00, 1.00000000e00], [9.89000022e-01, 4.74720001e-01, 0.00000000e00, 1.00000000e00], [9.94000018e-01, 4.77119982e-01, 0.00000000e00, 1.00000000e00], [9.94000018e-01, 4.77119982e-01, 0.00000000e00, 1.00000000e00], [9.94000018e-01, 4.77119982e-01, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.79999989e-01, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.79999989e-01, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.79999989e-01, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], [1.00000000e00, 4.19999994e-02, 0.00000000e00, 1.00000000e00], ], "f", ), "name": "cmap", } apply(cm.configure, (), cfg)
72.040146
75
0.631542
2,569
19,739
4.852472
0.121837
0.274346
0.289668
0.24643
0.86034
0.86034
0.799615
0.799615
0.798733
0.792476
0
0.724708
0.211814
19,739
273
76
72.304029
0.076552
0.002938
0
0.696296
0
0
0.00127
0
0
0
0
0
0
1
0
false
0
0.007407
0
0.007407
0
0
0
0
null
1
1
1
1
1
1
1
1
1
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
11
ef4a5eaac4f84383e7147d08b1c3bdfda34a4b1f
738
py
Python
experience/models.py
koatse/ilikethem
962374ff8179a533dba3b00422d11bb819d8acde
[ "MIT" ]
null
null
null
experience/models.py
koatse/ilikethem
962374ff8179a533dba3b00422d11bb819d8acde
[ "MIT" ]
null
null
null
experience/models.py
koatse/ilikethem
962374ff8179a533dba3b00422d11bb819d8acde
[ "MIT" ]
null
null
null
from django.db import models class RenovationExperience(models.Model): name = models.CharField(max_length=50) class Meta: ordering = ["name"] def __str__(self): return self.name class TenantExperience(models.Model): name = models.CharField(max_length=50) class Meta: ordering = ["name"] def __str__(self): return self.name class FinancingExperience(models.Model): name = models.CharField(max_length=50) class Meta: ordering = ["name"] def __str__(self): return self.name class TaxExperience(models.Model): name = models.CharField(max_length=50) class Meta: ordering = ["name"] def __str__(self): return self.name
18.923077
42
0.644986
85
738
5.364706
0.258824
0.096491
0.131579
0.184211
0.787281
0.787281
0.787281
0.787281
0.787281
0.787281
0
0.014467
0.250678
738
38
43
19.421053
0.810127
0
0
0.8
0
0
0.02171
0
0
0
0
0
0
1
0.16
false
0
0.04
0.16
0.84
0
0
0
0
null
0
0
1
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
1
1
0
0
9
3254718a6a60093996c5acc2dc20dc7a7da5b14d
9,390
py
Python
fhirclient/models/auditevent_tests.py
JamesSkane/smart_resources
85c362542b85ebc43ec00cd04915b114ee95f9c0
[ "Apache-2.0" ]
null
null
null
fhirclient/models/auditevent_tests.py
JamesSkane/smart_resources
85c362542b85ebc43ec00cd04915b114ee95f9c0
[ "Apache-2.0" ]
null
null
null
fhirclient/models/auditevent_tests.py
JamesSkane/smart_resources
85c362542b85ebc43ec00cd04915b114ee95f9c0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 0.5.0.5149 on 2015-07-06. # 2015, SMART Health IT. import os import io import unittest import json from . import auditevent from .fhirdate import FHIRDate class AuditEventTests(unittest.TestCase): def instantiate_from(self, filename): datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or '' with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle: js = json.load(handle) self.assertEqual("AuditEvent", js["resourceType"]) return auditevent.AuditEvent(js) def testAuditEvent1(self): inst = self.instantiate_from("audit-event-example-login.json") self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance") self.implAuditEvent1(inst) js = inst.as_json() self.assertEqual("AuditEvent", js["resourceType"]) inst2 = auditevent.AuditEvent(js) self.implAuditEvent1(inst2) def implAuditEvent1(self, inst): self.assertEqual(inst.event.action, "E") self.assertEqual(inst.event.dateTime.date, FHIRDate("2013-06-20T23:41:23Z").date) self.assertEqual(inst.event.dateTime.as_json(), "2013-06-20T23:41:23Z") self.assertEqual(inst.event.outcome, "0") self.assertEqual(inst.event.subtype[0].coding[0].code, "110122") self.assertEqual(inst.event.subtype[0].coding[0].display, "Login") self.assertEqual(inst.event.subtype[0].coding[0].system, "http://nema.org/dicom/dicm") self.assertEqual(inst.event.type.coding[0].code, "110114") self.assertEqual(inst.event.type.coding[0].display, "User Authentication") self.assertEqual(inst.event.type.coding[0].system, "http://nema.org/dicom/dicm") self.assertEqual(inst.id, "example-login") self.assertEqual(inst.participant[0].altId, "601847123") self.assertEqual(inst.participant[0].name, "Grahame Grieve") self.assertEqual(inst.participant[0].network.identifier, "127.0.0.1") self.assertEqual(inst.participant[0].network.type, "2") self.assertTrue(inst.participant[0].requestor) self.assertEqual(inst.participant[0].userId, "95") self.assertEqual(inst.source.identifier, "hl7connect.healthintersections.com.au") self.assertEqual(inst.source.site, "Cloud") self.assertEqual(inst.source.type[0].code, "3") self.assertEqual(inst.source.type[0].display, "Web Server") self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type") self.assertEqual(inst.text.status, "generated") def testAuditEvent2(self): inst = self.instantiate_from("audit-event-example-logout.json") self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance") self.implAuditEvent2(inst) js = inst.as_json() self.assertEqual("AuditEvent", js["resourceType"]) inst2 = auditevent.AuditEvent(js) self.implAuditEvent2(inst2) def implAuditEvent2(self, inst): self.assertEqual(inst.event.action, "E") self.assertEqual(inst.event.dateTime.date, FHIRDate("2013-06-20T23:46:41Z").date) self.assertEqual(inst.event.dateTime.as_json(), "2013-06-20T23:46:41Z") self.assertEqual(inst.event.outcome, "0") self.assertEqual(inst.event.subtype[0].coding[0].code, "110123") self.assertEqual(inst.event.subtype[0].coding[0].display, "Logout") self.assertEqual(inst.event.subtype[0].coding[0].system, "http://nema.org/dicom/dicm") self.assertEqual(inst.event.type.coding[0].code, "110114") self.assertEqual(inst.event.type.coding[0].display, "User Authentication") self.assertEqual(inst.event.type.coding[0].system, "http://nema.org/dicom/dicm") self.assertEqual(inst.id, "example-logout") self.assertEqual(inst.participant[0].altId, "601847123") self.assertEqual(inst.participant[0].name, "Grahame Grieve") self.assertEqual(inst.participant[0].network.identifier, "127.0.0.1") self.assertEqual(inst.participant[0].network.type, "2") self.assertTrue(inst.participant[0].requestor) self.assertEqual(inst.participant[0].userId, "95") self.assertEqual(inst.source.identifier, "hl7connect.healthintersections.com.au") self.assertEqual(inst.source.site, "Cloud") self.assertEqual(inst.source.type[0].code, "3") self.assertEqual(inst.source.type[0].display, "Web Server") self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type") self.assertEqual(inst.text.status, "generated") def testAuditEvent3(self): inst = self.instantiate_from("audit-event-example-vread.json") self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance") self.implAuditEvent3(inst) js = inst.as_json() self.assertEqual("AuditEvent", js["resourceType"]) inst2 = auditevent.AuditEvent(js) self.implAuditEvent3(inst2) def implAuditEvent3(self, inst): self.assertEqual(inst.event.action, "R") self.assertEqual(inst.event.dateTime.date, FHIRDate("2013-06-20T23:42:24Z").date) self.assertEqual(inst.event.dateTime.as_json(), "2013-06-20T23:42:24Z") self.assertEqual(inst.event.outcome, "0") self.assertEqual(inst.event.subtype[0].coding[0].code, "vread") self.assertEqual(inst.event.subtype[0].coding[0].display, "vread") self.assertEqual(inst.event.subtype[0].coding[0].system, "http://hl7.org/fhir/restful-interaction") self.assertEqual(inst.event.type.coding[0].code, "rest") self.assertEqual(inst.event.type.coding[0].display, "Restful Operation") self.assertEqual(inst.event.type.coding[0].system, "http://hl7.org/fhir/audit-event-type") self.assertEqual(inst.id, "example-rest") self.assertEqual(inst.object[0].lifecycle, "6") self.assertEqual(inst.object[0].type, "2") self.assertEqual(inst.participant[0].altId, "601847123") self.assertEqual(inst.participant[0].name, "Grahame Grieve") self.assertTrue(inst.participant[0].requestor) self.assertEqual(inst.participant[0].userId, "95") self.assertEqual(inst.source.identifier, "hl7connect.healthintersections.com.au") self.assertEqual(inst.source.site, "Cloud") self.assertEqual(inst.source.type[0].code, "3") self.assertEqual(inst.source.type[0].display, "Web Server") self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type") self.assertEqual(inst.text.status, "generated") def testAuditEvent4(self): inst = self.instantiate_from("auditevent-example.json") self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance") self.implAuditEvent4(inst) js = inst.as_json() self.assertEqual("AuditEvent", js["resourceType"]) inst2 = auditevent.AuditEvent(js) self.implAuditEvent4(inst2) def implAuditEvent4(self, inst): self.assertEqual(inst.event.action, "E") self.assertEqual(inst.event.dateTime.date, FHIRDate("2012-10-25T22:04:27+11:00").date) self.assertEqual(inst.event.dateTime.as_json(), "2012-10-25T22:04:27+11:00") self.assertEqual(inst.event.outcome, "0") self.assertEqual(inst.event.subtype[0].coding[0].code, "110120") self.assertEqual(inst.event.subtype[0].coding[0].display, "Application Start") self.assertEqual(inst.event.subtype[0].coding[0].system, "http://nema.org/dicom/dicm") self.assertEqual(inst.event.type.coding[0].code, "110100") self.assertEqual(inst.event.type.coding[0].display, "Application Activity") self.assertEqual(inst.event.type.coding[0].system, "http://nema.org/dicom/dicm") self.assertEqual(inst.id, "example") self.assertEqual(inst.object[0].identifier.type.coding[0].code, "SNO") self.assertEqual(inst.object[0].identifier.type.coding[0].system, "http://hl7.org/fhir/v2/0203") self.assertEqual(inst.object[0].identifier.type.text, "Dell Serial Number") self.assertEqual(inst.object[0].identifier.value, "ABCDEF") self.assertEqual(inst.object[0].lifecycle, "6") self.assertEqual(inst.object[0].name, "Grahame's Laptop") self.assertEqual(inst.object[0].role, "4") self.assertEqual(inst.object[0].type, "4") self.assertEqual(inst.participant[0].network.identifier, "127.0.0.1") self.assertEqual(inst.participant[0].network.type, "2") self.assertFalse(inst.participant[0].requestor) self.assertEqual(inst.participant[0].role[0].text, "Service User (Logon)") self.assertEqual(inst.participant[0].userId, "Grahame") self.assertEqual(inst.source.identifier, "Grahame's Laptop") self.assertEqual(inst.source.site, "Development") self.assertEqual(inst.source.type[0].code, "1") self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/audit-event-sub-type") self.assertEqual(inst.text.div, "<div>Application Start for under service login &quot;Grahame&quot; (id: Grahame's Test HL7Connect)</div>") self.assertEqual(inst.text.status, "generated")
54.912281
147
0.67689
1,173
9,390
5.405797
0.146633
0.236556
0.284655
0.151396
0.842138
0.810125
0.776849
0.751616
0.696893
0.635546
0
0.046639
0.16656
9,390
170
148
55.235294
0.763608
0.012034
0
0.493243
1
0.006757
0.186496
0.031928
0
0
0
0
0.72973
1
0.060811
false
0
0.040541
0
0.114865
0
0
0
0
null
1
1
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
9
328cd89fea12ca625a0f412bad442818bd2d6863
2,882
py
Python
tests/constants.py
UBC-MDS/AirPyllution
faf43b567f1dfec20f4ef61fb6e15731ad1352d7
[ "MIT" ]
1
2022-02-01T04:38:45.000Z
2022-02-01T04:38:45.000Z
tests/constants.py
UBC-MDS/airpyllution
faf43b567f1dfec20f4ef61fb6e15731ad1352d7
[ "MIT" ]
41
2022-01-13T23:20:38.000Z
2022-02-05T17:40:53.000Z
tests/constants.py
UBC-MDS/AirPyllution
faf43b567f1dfec20f4ef61fb6e15731ad1352d7
[ "MIT" ]
null
null
null
mock_history_data = { "coord": [50.0, 50.0], "list": [ { "main": {"aqi": 2}, "components": { "co": 270.367, "no": 5.867, "no2": 43.184, "o3": 4.783, "so2": 14.544, "pm2_5": 13.448, "pm10": 15.524, "nh3": 0.289, }, "dt": 1606482000, }, { "main": {"aqi": 2}, "components": { "co": 280.38, "no": 8.605, "no2": 42.155, "o3": 2.459, "so2": 14.901, "pm2_5": 15.103, "pm10": 17.249, "nh3": 0.162, }, "dt": 1606478400, }, ], } mock_pollution_data = { "coord": {"lon": 123.12, "lat": 49.28}, "list": [ { "main": {"aqi": 1}, "components": { "co": 310.42, "no": 0, "no2": 11.14, "o3": 35.76, "so2": 0.58, "pm2_5": 3.33, "pm10": 4.76, "nh3": 0.1, }, "dt": 1642748400, } ], } mock_forecast_data = { "coord": [50.0, 50.0], "list": [ { "main": {"aqi": 2}, "components": { "co": 270.367, "no": 5.867, "no2": 43.184, "o3": 4.783, "so2": 14.544, "pm2_5": 13.448, "pm10": 15.524, "nh3": 0.289, }, "dt": 1606482000, }, { "main": {"aqi": 2}, "components": { "co": 280.38, "no": 8.605, "no2": 42.155, "o3": 2.459, "so2": 14.901, "pm2_5": 15.103, "pm10": 17.249, "nh3": 0.162, }, "dt": 1606478400, }, ], } mock_api_invalid_key_error = { "cod": 401, "message": "Invalid API key. Please see \ http://openweathermap.org/faq#error401 for more info.", } mock_params = { "lat": 49.28, "lon": 123.12, "start": 1606488670, "end": 1606747870, "appid": "mock_api_key", } mock_incorrect_params = { "lat": "latitude_val", "lon": "longitude_val", "lat_oor": -100.0, "lon_oor": 181.0, "start": 1234.567, "end": 3.14159, "appid": "invalid_api_key", } mock_error_params = { "lat": "latitude_val", "lon": "longitude_val", "lat_oor": -100.0, "lon_oor": 181.0, "start": 1234.567, "end": 3.14159, "appid": "api_error", } mock_invalid_message = "Invalid API key. Please see \ http://openweathermap.org/faq#error401 for more info."
23.056
59
0.358432
289
2,882
3.453287
0.342561
0.03507
0.032064
0.072144
0.715431
0.715431
0.715431
0.715431
0.715431
0.715431
0
0.239974
0.463567
2,882
124
60
23.241935
0.405563
0
0
0.555556
0
0
0.148855
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
1
1
1
1
1
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
7
328e995b6e71bda0ba3d25df249a775741f082cc
8,826
py
Python
tests/smoke/organizations/locations/roles/users/timeclocks/test_timeclocks.py
Joey-Wondersign/Staffjoy-suite-Joey
b6d0d87b8e60e6b866810ebeed631fb02fadad48
[ "MIT" ]
890
2017-02-25T07:11:09.000Z
2022-03-08T05:49:20.000Z
tests/smoke/organizations/locations/roles/users/timeclocks/test_timeclocks.py
Joey-Wondersign/Staffjoy-suite-Joey
b6d0d87b8e60e6b866810ebeed631fb02fadad48
[ "MIT" ]
11
2017-02-25T18:07:11.000Z
2020-10-19T13:09:41.000Z
tests/smoke/organizations/locations/roles/users/timeclocks/test_timeclocks.py
nfriedly/suite
c58c772d98d1476cad0531b8a296f27ad2ab945c
[ "MIT" ]
276
2017-02-25T09:01:23.000Z
2022-03-19T02:24:02.000Z
from datetime import datetime, timedelta import pytest from tests.smoke.organizations.locations.roles.users.timeclocks.base_timeclock import BaseTimeclock class TestTimeclocks(BaseTimeclock): def setUp(self): # (if you are copying and pasting, update class title below) super(TestTimeclocks, self).setUp() def tearDown(self): # (if you are copying and pasting, update class title below) super(TestTimeclocks, self).tearDown() def test_timeclock_crud_sudo(self): self.update_permission_sudo() # posts # clock the worker in timeclock = self.worker.create_timeclock() assert timeclock.data.get("start") is not None assert timeclock.data.get("stop") is None # cannot clock in twice with pytest.raises(Exception): self.worker.create_timeclock() # manager cannot clock in workers at other locations other_timeclock = self.other_worker.create_timeclock() assert other_timeclock.data.get("start") is not None assert other_timeclock.data.get("stop") is None # manager can create a complete timeclock start_dt = (datetime.utcnow() - timedelta(days=1)).replace( microsecond=0) start = start_dt.isoformat() stop = (start_dt + timedelta(hours=6, minutes=15)).isoformat() timeclock2 = self.worker.create_timeclock(start=start, stop=stop) assert timeclock2.data.get("start") == start assert timeclock2.data.get("stop") == stop # cannot create a timeclock in the future utcnow = datetime.utcnow() start_future = (utcnow + timedelta(hours=1)).isoformat() stop_future = (utcnow + timedelta(hours=9)).isoformat() with pytest.raises(Exception): self.worker.create_timeclock(start=start_future, stop=stop_future) # get active_timeclocks = self.worker.get_timeclocks(active=True) assert len(active_timeclocks) == 1 # patch timeclock.patch(close=True) assert timeclock.data.get("stop") is not None new_start = ( datetime.utcnow() - timedelta(hours=4, minutes=8)).replace( microsecond=0).isoformat() timeclock.patch(start=new_start) assert timeclock.data.get("start") == new_start # mixed parameters needs to fail with pytest.raises(Exception): timeclock.patch(start=new_start, close=True) # cannot modify timeclock to be in the future with pytest.raises(Exception): timeclock.patch(start=start_future, stop=stop_future) # delete timeclock.delete() with pytest.raises(Exception): self.worker.get_timeclock(timeclock.get_id()) def test_timeclock_crud_admin(self): self.update_permission_admin() # posts # clock the worker in timeclock = self.worker.create_timeclock() assert timeclock.data.get("start") is not None assert timeclock.data.get("stop") is None # cannot clock in twice with pytest.raises(Exception): self.worker.create_timeclock() # admin can clock in workers at other locations other_timeclock = self.other_worker.create_timeclock() assert other_timeclock.data.get("start") is not None assert other_timeclock.data.get("stop") is None # admin can create a complete timeclock start_dt = (datetime.utcnow() - timedelta(days=1)).replace( microsecond=0) start = start_dt.isoformat() stop = (start_dt + timedelta(hours=6, minutes=15)).isoformat() timeclock2 = self.worker.create_timeclock(start=start, stop=stop) assert timeclock2.data.get("start") == start assert timeclock2.data.get("stop") == stop # cannot create a timeclock in the future utcnow = datetime.utcnow() start_future = (utcnow + timedelta(hours=1)).isoformat() stop_future = (utcnow + timedelta(hours=9)).isoformat() with pytest.raises(Exception): self.worker.create_timeclock(start=start_future, stop=stop_future) # get active_timeclocks = self.worker.get_timeclocks(active=True) assert len(active_timeclocks) == 1 # patch timeclock.patch(close=True) assert timeclock.data.get("stop") is not None new_start = ( datetime.utcnow() - timedelta(hours=4, minutes=8)).replace( microsecond=0).isoformat() timeclock.patch(start=new_start) assert timeclock.data.get("start") == new_start # mixed parameters needs to fail with pytest.raises(Exception): timeclock.patch(start=new_start, close=True) # cannot modify timeclock to be in the future with pytest.raises(Exception): timeclock.patch(start=start_future, stop=stop_future) # delete timeclock.delete() with pytest.raises(Exception): self.worker.get_timeclock(timeclock.get_id()) def test_timeclock_crud_manager(self): self.update_permission_manager() # posts # clock the worker in timeclock = self.worker.create_timeclock() assert timeclock.data.get("start") is not None assert timeclock.data.get("stop") is None # cannot clock in twice with pytest.raises(Exception): self.worker.create_timeclock() # manager cannot clock in workers at other locations with pytest.raises(Exception): self.other_worker.create_timeclock() # manager can create a complete timeclock start_dt = (datetime.utcnow() - timedelta(days=1)).replace( microsecond=0) start = start_dt.isoformat() stop = (start_dt + timedelta(hours=6, minutes=15)).isoformat() timeclock2 = self.worker.create_timeclock(start=start, stop=stop) assert timeclock2.data.get("start") == start assert timeclock2.data.get("stop") == stop # cannot create a timeclock in the future utcnow = datetime.utcnow() start_future = (utcnow + timedelta(hours=1)).isoformat() stop_future = (utcnow + timedelta(hours=9)).isoformat() with pytest.raises(Exception): self.worker.create_timeclock(start=start_future, stop=stop_future) # get active_timeclocks = self.worker.get_timeclocks(active=True) assert len(active_timeclocks) == 1 # patch timeclock.patch(close=True) assert timeclock.data.get("stop") is not None new_start = ( datetime.utcnow() - timedelta(hours=4, minutes=8)).replace( microsecond=0).isoformat() timeclock.patch(start=new_start) assert timeclock.data.get("start") == new_start # mixed parameters needs to fail with pytest.raises(Exception): timeclock.patch(start=new_start, close=True) # cannot modify timeclock to be in the future with pytest.raises(Exception): timeclock.patch(start=start_future, stop=stop_future) # delete timeclock.delete() with pytest.raises(Exception): self.worker.get_timeclock(timeclock.get_id()) def test_timeclock_crud_worker(self): self.update_permission_worker() # posts # worker clocks in timeclock = self.worker.create_timeclock() assert timeclock.data.get("start") is not None assert timeclock.data.get("stop") is None # cannot clock in twice with pytest.raises(Exception): self.worker.create_timeclock() # worker cannot clock in a buddy with pytest.raises(Exception): self.other_worker.create_timeclock() # worker cannot make a complete timeclock start_dt = (datetime.utcnow() - timedelta(days=1)).replace( microsecond=0) start = start_dt.isoformat() stop = (start_dt + timedelta(hours=6, minutes=15)).isoformat() with pytest.raises(Exception): self.worker.create_timeclock(start=start, stop=stop) # get active_timeclocks = self.worker.get_timeclocks(active=True) assert len(active_timeclocks) == 1 # patch # can only pass close=true param timeclock.patch(close=True) assert timeclock.data.get("stop") is not None # cannot adjust start or stop with pytest.raises(Exception): timeclock.patch(start=start, stop=stop) # mixed parameters needs to fail with pytest.raises(Exception): timeclock.patch(start=start, close=True) # delete with pytest.raises(Exception): timeclock.delete()
36.471074
99
0.638681
1,020
8,826
5.418627
0.1
0.031663
0.063687
0.099511
0.913696
0.902117
0.902117
0.902117
0.890899
0.870997
0
0.007381
0.2632
8,826
241
100
36.622407
0.842534
0.129844
0
0.869863
0
0
0.014673
0
0
0
0
0
0.19863
1
0.041096
false
0
0.020548
0
0.068493
0
0
0
0
null
0
0
0
1
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
7