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
9b3226916884f28e09336d7f7735ea5b37551b88
471
py
Python
Desafios/Mundo 3 - Modulos/ex108/teste.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 3 - Modulos/ex108/teste.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 3 - Modulos/ex108/teste.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
import moeda # from ex107 import moeda p = float(input('Digite o preço: R$ ')) t = float(input('Digite a taxa(%): ')) print(f'A metade de {moeda.moedaFormat(p)} é {moeda.moedaFormat(moeda.metade(p))}.') print(f'O dobro de {moeda.moedaFormat(p)} é {moeda.moedaFormat(moeda.dobro(p))}.') print(f'Aumentando {moeda.taxaFormat(t)} temos {moeda.moedaFormat(moeda.aumentar(p, t))}.') print(f'Diminuindo {moeda.taxaFormat(t)} temos {moeda.moedaFormat(moeda.diminuir(p, t))}.')
52.333333
91
0.707006
73
471
4.561644
0.369863
0.288288
0.252252
0.114114
0.498499
0.498499
0.498499
0.246246
0
0
0
0.007009
0.091295
471
9
92
52.333333
0.771028
0.048832
0
0
0
0.571429
0.774049
0.516779
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.571429
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
7
9b4c3e5427097f0bde354b6822de131c49250dbc
9,902
py
Python
Controls/env/Lib/site-packages/PySide/examples/graphicsview/collidingmice/mice_rc.py
LoicBoileau/Projet-S4---Robot-Delta
0de0768e2609c18fbf060eb6726150a99080db1c
[ "MIT" ]
32
2015-11-06T02:59:41.000Z
2021-02-12T02:44:42.000Z
Controls/env/Lib/site-packages/PySide/examples/graphicsview/collidingmice/mice_rc.py
LoicBoileau/Projet-S4---Robot-Delta
0de0768e2609c18fbf060eb6726150a99080db1c
[ "MIT" ]
56
2020-01-15T15:44:40.000Z
2021-11-15T17:50:24.000Z
python/Lib/site-packages/PySide/examples/graphicsview/collidingmice/mice_rc.py
jfveronelli/sqink
5e9e6bc6c5c6c00abbc07099bc1fa1ab6cf79577
[ "Unlicense" ]
4
2016-02-01T09:15:05.000Z
2020-04-30T03:41:04.000Z
# -*- coding: utf-8 -*- # Resource object code # # Created: st 14. 10 21:40:03 2015 # by: The Resource Compiler for PySide (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PySide import QtCore qt_resource_data = b"\x00\x00\x0b\xd5\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x02\x01\x00H\x00H\x00\x00\xff\xee\x00\x0eAdobe\x00d@\x00\x00\x00\x01\xff\xdb\x00\x84\x00\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x02\x02\x03\x04\x03\x02\x02\x03\x04\x05\x04\x04\x04\x04\x04\x05\x06\x05\x05\x05\x05\x05\x05\x06\x06\x07\x07\x08\x07\x07\x06\x09\x09\x0a\x0a\x09\x09\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x01\x03\x03\x03\x05\x04\x05\x09\x06\x06\x09\x0d\x0a\x09\x0a\x0d\x0f\x0e\x0e\x0e\x0e\x0f\x0f\x0c\x0c\x0c\x0c\x0c\x0f\x0f\x0c\x0c\x0c\x0c\x0c\x0c\x0f\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\xff\xc0\x00\x11\x08\x00^\x00^\x03\x01\x11\x00\x02\x11\x01\x03\x11\x01\xff\xdd\x00\x04\x00\x0c\xff\xc4\x01\xa2\x00\x00\x00\x07\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x04\x05\x03\x02\x06\x01\x00\x07\x08\x09\x0a\x0b\x01\x00\x02\x02\x03\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x10\x00\x02\x01\x03\x03\x02\x04\x02\x06\x07\x03\x04\x02\x06\x02s\x01\x02\x03\x11\x04\x00\x05!\x121AQ\x06\x13a\x22q\x81\x142\x91\xa1\x07\x15\xb1B#\xc1R\xd1\xe13\x16b\xf0$r\x82\xf1%C4S\x92\xa2\xb2cs\xc25D'\x93\xa3\xb36\x17Tdt\xc3\xd2\xe2\x08&\x83\x09\x0a\x18\x19\x84\x94EF\xa4\xb4V\xd3U(\x1a\xf2\xe3\xf3\xc4\xd4\xe4\xf4eu\x85\x95\xa5\xb5\xc5\xd5\xe5\xf5fv\x86\x96\xa6\xb6\xc6\xd6\xe6\xf67GWgw\x87\x97\xa7\xb7\xc7\xd7\xe7\xf78HXhx\x88\x98\xa8\xb8\xc8\xd8\xe8\xf8)9IYiy\x89\x99\xa9\xb9\xc9\xd9\xe9\xf9*:JZjz\x8a\x9a\xaa\xba\xca\xda\xea\xfa\x11\x00\x02\x02\x01\x02\x03\x05\x05\x04\x05\x06\x04\x08\x03\x03m\x01\x00\x02\x11\x03\x04!\x121A\x05Q\x13a\x22\x06q\x81\x912\xa1\xb1\xf0\x14\xc1\xd1\xe1#B\x15Rbr\xf13$4C\x82\x16\x92S%\xa2c\xb2\xc2\x07s\xd25\xe2D\x83\x17T\x93\x08\x09\x0a\x18\x19&6E\x1a'dtU7\xf2\xa3\xb3\xc3()\xd3\xe3\xf3\x84\x94\xa4\xb4\xc4\xd4\xe4\xf4eu\x85\x95\xa5\xb5\xc5\xd5\xe5\xf5FVfv\x86\x96\xa6\xb6\xc6\xd6\xe6\xf6GWgw\x87\x97\xa7\xb7\xc7\xd7\xe7\xf78HXhx\x88\x98\xa8\xb8\xc8\xd8\xe8\xf89IYiy\x89\x99\xa9\xb9\xc9\xd9\xe9\xf9*:JZjz\x8a\x9a\xaa\xba\xca\xda\xea\xfa\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00?\x00\xfbA\xd3o\xa2\x87\xc7<7\x89\xe9\xd4\xe9\xe2k\x90)n\xa3rM\x0d\x0f\x8f\xf0\xc8\x82\xa5\xb2AZ\x86\xfaF\xf9\x227P\xa6c\xe5\xe2v\xf9`\xe4\x95\xc1H\xd8t=F\x0bV\xa4\x9a\x18\x141`\xa4\xeck\xe3\x92\x1b\xa0\xacI\x92Q\x1b\x02\xad\xc8\x91\xb7\xea\xc2\x844\xaf\xc5\x8e\xfbw\xc9\x81lIb:\xaf\x9e<\xbf\xa3\xccm\xee\xef+84ha\x1e\xa3\x03\xfeU6\x1f~<Q\x09\x11\x94\x91\xfaG\x9a\xb4\x9dn\xa9au\xceP*`pQ\xe9\xec\x0f_\xa3\x118\xc8\xd2\x0ce\x16H%<[\x7f\x0cL7^-\x9f\xff\xd0\xfb:\xfb\x0a\xeeMkL\xf0\xb0\x1e\xa1o-\xfanq!4\xb8\x11^\x9b\xe4P\xd3S\xa7\x8e\xe7%j\xda\xd0\xeeH\x03\xc7\x04\x95NY\x12\x15.\xce\x02\x81R~Y\x00-/\x9c\xbf6\xbc\xc7\xa8\x98\xa5]\x1f\xce\x9a~\x8fg\x14l\xb76\xf1\xd5\xef]\xc8 \x08\xe8\x0f\x1a\xd7\xae\xc4e\xb8\xf2\x00j\x89\xfb\x99\xc6\x167g\x9f\x93\xcf\xa8\xdc\xf9*\xda\xe2\xfeI\xa6\x9d\xeeeX\xee.\x09wh\xd4-\x0dN\xf5\xa9=rs\x02\xb8\xbb\xda\xe5\xb4\xa9\x96\xf9\xa2k\x8b-\x12\xfa\xea\xdc\x11=8DGP[j\xfd\x19\x5c\xe5Q\xd9a\x1e)Q|\xdf\x17\x97\xda\xf2C5\xc2\x16f5$\xd4\xd0\x93\x95D\x97\x22B\x99^\x9b\xa3\x5c\xe9wV\xd7V\xfc\x97\x83\x06SN\x84es\xca\x8e\x0b{\xbf\xacF\x9e/==\xcc>\xa7\xa7\xefN\x9f~e\xf8\x9e\x9e/'\x13\x87z\x7f\xff\xd1\xfb?J\xed\xd4\xf6\xcf\x0b\xa7\xa8Qy\x15?\xd6=\xb0\x88q-\xd2\x81\x9a\x84\x16j{d\xbc&\x06a\xc6pJ\x91Jt\x22\x98\xf8t\x8e0U\xd4\x87\x07n\xdb\x8c\x8f\x0b;@\xde\xda\x0b\x88\x9a\x16b\x12J\x83\xc4\xd1\xa8|\x0e\xf9 \x05\xee\xac\x15\xbf+|\xb5=\xe0\xbb\x9eY\x1b\xe2\xe4\xc8bB\xff\x00!%O\xdf\xc7,\x88\xc5\xd6\xfd\xcc\xbcI\x8eT\xf4k+[-:\xd6\x1b+\x0be\xb6\xb4\x80\x11\x1c)\xfeQ\xab\x13\xeeN\xe7!\x96|g\x95\x00\xc0\x0e\xa7\x9a\xddN\xca=N\xc2\xe6\xcd\xb6\x12\x80P\x9e\xcc7\x15\xca\xc4D\xbd'\xab!#\x13a\x85i\xbe\x5c\x92\xdd\xbd;\x8bvJ\x1d\xd5\xc6\xff\x00\xdb\x98\xd9#,G\x84\xb9<B{\xb2\xdf\xd0)8X\x91\x15UWv?eGrO\xb6G\x06\x9aY2\xd0;u=\xc1\xaey\xc4Ba\xe9\xdb\x95\x16\xf4\xff\x00GT\xf4\xf9S\xf6i\xc7\x95?\x1c\xd8\xdc8\xab\xf8\x7fC\x8bR\xab\xea\xff\x00\xff\xd2\xfb>\x0f-\x80\xa9\xcf\x0a\xb7\xa8J/\xe7\x8e\xda9\xeefq\x1cP!y\x1c\xf4\x01EI9|H\x02\xcbY\xb2h>R\xf3'\xe6\x7f\x9a\xf5K\xe9b\xd0I\xd3lQ\x88\x8d\xd2\x9e\xab\x81\xdd\x9c\x83\xd7\xc0e>)\x9fZr#\x861\xe7\xbaq\xe5_>y\xa2\xd6\xee\x08\xf5\x8b\x87\xbe\xb5\x94\x81\x22L\x01`\x0fR\xac\x05v\xf7\xc8\x1c\x86\x06\xed\x12\xc4%\xc8S\xe9\x9bI\x96E\x8ah\xdb\x9cR\x85da\xd0\xa9\x1bfA \x8b\x0e<l\x1aLM\x08;t9Sj\xd0\xb4\xad\x0d=\xb0Z\xb7\xb8 V\x83\x1bU\xe2N=Ej0\x91j\xa1\x15\xed\xd4D\x8a,\xb1\x8f\xb0\x8e\xa1\xa9\xf2\xae\xf91\x9acm\x8f\xbc\x02\xd6`=\xcb\xa4\xbc\xbc\xb9\xf8]\xb8E\xfc\x8a\x02\x83\xf3\x00c<\xb2\x90\xa3\xb0\xee\x00\x01\xf6,q\x81\xc9\xc66\xe2\x14\x1d\x89\xf8\xbe\xef\xeb\x95Xl\xa7\xff\xd3\xfb<\xa4\x0e\x9b0\xf0\xcf\x07\xb7\xa9H\xfc\xc9f\xf7\xbe_\xd6\xe0\x88\x16\x96X\x1b\x8a\x8e\xa4\x0a\x13\xf8d\xc83\x89\x01a\xb4\xc1/\x9e4o)+\x86\x01\x0a\x90v\x04oS\x98\xd0\x90\xe4y\xb9\x99<\x99\xef\xf8 \x08\x22g\x00H\xa7\x96\xc31g\x9a\xe7\xc3\xd1c\x10\x05\xbd?F\xb2{M&\xc6\x19>\xd8Z\xa8=\x815\x19\xb5\x84\x0c1\x80{\x9d|\x8834\x9b\x00jz\xefNM\xef\xed\x90<\x99\x86\xb85\x09\x00\x91ZW\xb7\xcb\x10\x0f5\xb5\x8c\xac\x0dk\x81-\xa9\xad\x01\xf09$.\xe3N\x84\x0f\x0e\xf8\x15}H\x1e\x07%A]\xc8\xd4\xf8\xf8\xd7#J\xff\x00\xff\xd4\xfbC\xc9)\xd8\x1c\xf0zz\x85\x1e\x7f\x1fzt \xf4\xc9\xc4\xf0\x9b\x1c\xd4\x8bK\xad\xb4}\x14N\xed\x0c\xbfU\x94\xb1f\x8eZ\x94\xff\x00`\xc0~\x07'\x9b\x06<\xfb\xc6\x5c'\xb8\xdd|\x08\xfd+\x1c\xd2\x86\xc4Z\x7f'\xe8\xab`\xbe\xa4\xabx\xca(!\x8c\x1a\x13\xdb\x9356\xc4i\xf1BbR\x90\xc9]\x22\x0e\xfe\xf2@j\xf1rO\x90\xaf4*\xb3\xdc\xb9\x9d\xf8\xaa\xb1<@\xd8|\x80\xf0\x18r\xe4\x96Be.e\x94\x00\x88\xa0\xaa@?>\x94\xca:3s1 \x06\xdc.\xca\xb5\xfdXl\xf5E!\xdco\xb0&\xa7\x14\xac\x0az\xd7\xe5\x8aU\x14\x13\xd0\xf6\xeb\x8d\xa1}\x094\x1d\xf0\xda\xb8\xc4y\xaarRO]\xf6\x1fOL<;\xd5\xa3\x89\xff\xd5\xfb8\xc0\xd6\xa3\xaex]\xbdB\x93G^\x84\xd7\xb9\xc4*\x80\xb7]\xd9\xb65\xdb\xc4\xe2\x00(VH\xa0_\x89\xba\xf8\x9d\xf2D\x1e\x8cx\x826\xaac\xa2\x80\x056##\xcd\x92\x9f\xa8T|@\x9d\xfa\xe2`\x96\xea\x5c\xf1\x14\x1f=\xceB\x92\xba\xaa*\xa4\xd7\xdf\x0f\x0a\x16T\x03JT{cJ\xbb\x9dwQ\xb7l\x95*\xe0k\xfeKxd$\x15\xdb\xd4o\xf4`W\xff\xd6\xfb=Q\xd7\x7f\x96xS\xd4/$q$li\xd3\x01\xd9R\x8dnK\x8b}\x1bQ\xbb\xb3\xa1\xba\x86\x12m\xc1\x1b\x06b\x004\xf6\xadr2\x91\x11$&1\x12\x90\x05\xe2\xbaf\x87\xe6h\xee\x06\xaa5;\xc9\xae9\x09$2H\xc5\x18\x1e\xa2\x84\xd2\x9e\xd8\x80@\x07\xabt\xa29=\xe2\xd4\xb9\x86'\x91x4\x88\xae\xc9\xe0XT\x8c\xc8\xc9\xb5\x17\x16*\xc6\x87\xae\xf44\xca\xec\xb3Rc\xc7zn{\xe2\x16\xd4L\xbd\x87\x5c\xb0\x06\x04\xb4&\x00\xd0\xb6\xfe\x03\x1e\x04q\xaf\xf5\x96\x94\xaf\xd1\x80\xc1\x22j\xab)$P\x8e\xbb\xe4\x08\xa6V\xa6%#\x9a\x92y\x12)\x91\xa5\x7f\xff\xd7\xfb;\xd0P\x1a\x0f\xc7<*\xde\xa1PP\xfb\xf5\xc4\xab\xa4U(A^J\xc0\x86S\xd0\x82(A\xc6\x04\x83a\x05\x0fn\xf6\xd1G\xe9\xc3aF\xaf\xd9g\xe4\x83\xe8\xa5O\xdf\x99~.!\xbf\x0e\xfe\xfd\xbf\x1f\x16$L\xf5TS#3\x99\x00$\xb6\xd4\x1e\xd9\x8b\x93'\x19\xbe\xac\x80\xa6\x85jF\xd54`\xbd\xc7\xcf\x01\xe4\x945\xc1\x22\x83\xb9\xe9\x92\xc7\xbb\x190/8\xf9\xc2\xc7\xcavB{\xa0\xd3\x5cKQmj\x86\x8d!\x1dj\x7feEz\xe5\xb2\x98\x80\xf3c\x08\x19\x97\xcf\xf2\xfes\xf9\xa6\xe6\xea\x96\x91Ckk_\x861\x0f0\x07\xbb1\xa9\xca\x8c\xe6z\xb7\x8c1\x0fR\xf2o\xe6<\xfa\xc4\xf1X\xea\xf0\xa4r\xccB\xc5s\x10*9\x1e\x81\x94\x93J\xf8\x8c\x11\xccA\xa95\xcf\x10\xab\x0fd\x8d\x8a\xb0'\xa5w\x19t\xe3\xb3Td\x8d\xf4\x96\xb5\xedN\x99\x8e\xdc\xff\x00\xff\xd0\xfb4\xca\xdb\x1e\xfd\xc6xC\xd4\xb6\x8cAZ\x91\xd6\xa7$\x82\xa8O&\x00\x12@\xaf\xb0\xdb\x02\xaf\xf8To@r*\xb4\x02\xcdU\x0dA\xd4\xf8{\xe2\x02W\x15\xa7A\xd7\xae\x1e\x88C\xbcm+-\x0dF\xe3l\xb3\x19c7\xcb\xbf\x99\xb67:\x8f\x9ae\x88\x82\xd6\xd6\xa1bD\xeb@\x00?\x899\x8b\x92w77\x0c\x00\xc6\x12K\x1f,\x8aF\x1a\x1d\x9bu\xf0\xcb,\xc40 [!\x87\xcb2Y\xdcE<Q\xb2\x0d\x89\xa7jf,\xf3q6\x08>\x85\xd2}[\x8d.\xd2i\x7f\xbd1\x81!\xf1#\xbelqJ\xf1\x82]|\xc5J\x93~'\xd3\xfa2\xbe\xad\x8f\xff\xd1\xfb9-\x06\xfcNxC\xd40/2k^e\xb0\xd4\xf4\xfb-\x0bF\x8bQ\x8ax\xda{\xb9\xa6vP\x15[\x8f\x08\xf8\xfe\xd6\xd5\xa9\xf6\xc6y\x04\x06\xec\xa3\x8c\xcb\xab?\xb5vx\x91\x9d\x0a=\x01t=A\x22\xb4>\xe3$F\xec\x02\xb9A\xb9\x1dp\x14\xb6\xa0pU\x0cv\xdf\x7f\xd7\x86\x90\xef\x87\xa7\x8fQ\x80\xec\x97r\xe2\x004\xc3\x19 \x87\x99y\xc3\xcbku\xa8&\xab\x14l\xde\xb5\x04\xe5w*\xe0\x01S\xecrY\xf4\xfcQ\xe3\x8f\xc7\xcb\xf6\x16\xec\x19\xab\xd2QZF\x86\x84\xa7\xab\x0e\xe2\x82\x94\xa8\xda\x9e\x1f,\xc0\xe32<7\xbbq\xa1\xbb'm\x01\xae\x5cE\x14|\x98\xec\x06\xd4\x1fO\x86CI\xa3\x9eL\xfc\x11\xde\xcf\xf6\xb0\xc9\xa9\x88\x8d\x94\xcf\xd2\x8a\x08\xe2\xb4\x82\x8f\x1d\xba\x88\xc3\xff\x007\x11\xc4\x9f\xa6\x99\xb8\xcd\xc1\x13\xc3\x0eCo\x96\xdfo7\x06\x16w=U9\x1a\xd3\x8fM\xa9\x98\xf6\xddO\xff\xd2\xfb<i\xc8\xf5#\xbexN\xcfP\xd0\xe4\x5cz^\xa2\xb5\x0e\xc9\xe1\xf4T\xe4\xa3}\x11*\xea\xbd\x00\xe3PA\xf6\xc8\xa5x\xe7\xe1Q\xf4bP\xb8\xd6\x83\xae\x05Q%\xb9\x8a\x83\xf3\xed\x85+\x8f*\x0c!\x0eSt\x18\x9bU\xe4\xc3\xed\x03N\x05{\xf2\xe5\xb5>y\x93\xa79/\xd1\xf1\xee\xf8\xf4a>\x1a\xdd^\xda\xea\xdc\x90e\xd3\x14L+\xc8$\xd4B|w\xe4G\xdf\x95\x9c\xda~+\x9e;;\xddH\x81\xfa~\xc2\x89G-}[{\x95'\x9fP\x96)\xbe\xa9d\x96\xd6\xe1\x7f}\xe9\xba\xbb\xf1\xefS\xca\xb4\xf1\xa0\xc9\xe3\x99\x9c%\xe1DF5\xbdo*\xebw\xbf\xbe\x80\x0db \x11\xc4I>id\x03\xe2\x1c\x8f\xc5\xe1\x94\x1a\xa7!\x19\xf0\xd4ei\x7f\xff\xd9" qt_resource_name = b"\x00\x06\x07\x03}\xc3\x00i\x00m\x00a\x00g\x00e\x00s\x00\x0a\x0c\x9dl\x07\x00c\x00h\x00e\x00e\x00s\x00e\x00.\x00j\x00p\x00g" qt_resource_struct = b"\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00" def qInitResources(): QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) def qCleanupResources(): QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) qInitResources()
450.090909
9,079
0.743284
2,234
9,902
3.284244
0.295882
0.040889
0.056426
0.068693
0.122802
0.112171
0.112171
0.096225
0.092545
0.088456
0
0.265036
0.009291
9,902
21
9,080
471.52381
0.482875
0.01838
0
0
0
0.333333
0.962418
0.961388
0
0
0.000824
0
0
1
0.222222
false
0
0.111111
0
0.333333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
1
1
1
null
0
0
0
0
0
1
0
0
0
0
0
0
0
8
9bb6c95d5f4a3e80a7b2ef2a57120dbc60cb1fca
192
py
Python
jsonpkt/commands/__init__.py
0K4T3/jsonpkt
445c987ad52e23d0d90a1ca3cdd3b12c36a8da5d
[ "MIT" ]
null
null
null
jsonpkt/commands/__init__.py
0K4T3/jsonpkt
445c987ad52e23d0d90a1ca3cdd3b12c36a8da5d
[ "MIT" ]
null
null
null
jsonpkt/commands/__init__.py
0K4T3/jsonpkt
445c987ad52e23d0d90a1ca3cdd3b12c36a8da5d
[ "MIT" ]
null
null
null
from jsonpkt.commands.base import BaseCommand from jsonpkt.commands.send import SendCommand from jsonpkt.commands.sendrecv import SendRecvCommand from jsonpkt.commands.view import ViewCommand
38.4
53
0.875
24
192
7
0.5
0.261905
0.452381
0
0
0
0
0
0
0
0
0
0.083333
192
4
54
48
0.954545
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
32d6ce86b5a98d918b03356309275818978c0e17
48,723
py
Python
test-common/integrationtest/testcase/test_ns_client_multi_cluster.py
lotabout/OpenMLDB
432da3afbed240eb0b8d0571c05f233b1a5a1cd4
[ "Apache-2.0" ]
2,659
2021-06-07T12:59:15.000Z
2022-03-30T15:29:37.000Z
test-common/integrationtest/testcase/test_ns_client_multi_cluster.py
wei20024/OpenMLDB
16b426bcba18f70e083179f82db51e71e65d1bf6
[ "Apache-2.0" ]
1,396
2021-05-28T09:50:13.000Z
2022-03-31T16:37:49.000Z
test-common/integrationtest/testcase/test_ns_client_multi_cluster.py
wei20024/OpenMLDB
16b426bcba18f70e083179f82db51e71e65d1bf6
[ "Apache-2.0" ]
499
2021-05-31T07:36:48.000Z
2022-03-31T15:10:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021 4Paradigm # # 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. # -*- coding: utf-8 -*- from testcasebase import TestCaseBase from libs.test_loader import load from libs.logger import infoLogger import time import libs.ddt as ddt import libs.conf as conf from libs.deco import multi_dimension import libs.utils as utils import collections @ddt.ddt class TestMultiCluster(TestCaseBase): @ddt.unpack def test_create_after_add_rep_cluster(self): """ 指定时间列的schema表建表删表与数据同步测试 """ zk_root_path = '/remote' msg = self.ns_switch_mode(self.ns_leader, 'leader') self.assertIn('switchmode ok', msg) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(3) name = 'tname{}'.format(time.time()) metadata_path = '{}/metadata.txt'.format(self.testpath) table_meta = { "name": name, "ttl": 0, "partition_num": 4, "replica_num": 3, "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta, metadata_path) rs = self.ns_create(self.ns_leader, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) time.sleep(30) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc0', '1', '15', '18']) self.assertIn('Put ok', rs1) rs2 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card0', 'mcc1', '2', '16', '19']) self.assertIn('Put ok', rs2) rs3 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card1', 'mcc2', '3', '20', '20']) self.assertIn('Put ok', rs3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) time.sleep(3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_drop(self.ns_leader, name) self.assertIn('drop ok', msg) time.sleep(3) rs = self.showtable(self.ns_leader_r, name) self.assertEqual(0, len(rs)) self.remove_replica_cluster(self.ns_leader, self.alias) time.sleep(3) @ddt.unpack def test_create_before_add_rep_cluster(self): """ 指定时间列的schema表建表删表与数据同步测试 """ name = 'tname{}'.format(time.time()) metadata_path = '{}/metadata.txt'.format(self.testpath) table_meta = { "name": name, "ttl": 0, "partition_num": 4, "replica_num": 3, "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta, metadata_path) rs = self.ns_create(self.ns_leader, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc0', '1', '15', '18']) self.assertIn('Put ok', rs1) rs2 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card0', 'mcc1', '2', '16', '19']) self.assertIn('Put ok', rs2) rs3 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card1', 'mcc2', '3', '20', '20']) self.assertIn('Put ok', rs3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) zk_root_path = '/remote' msg = self.ns_switch_mode(self.ns_leader, 'leader') self.assertIn('switchmode ok', msg) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(30) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_drop(self.ns_leader, name) self.assertIn('drop ok', msg) time.sleep(3) rs = self.showtable(self.ns_leader_r, name) self.assertEqual(0, len(rs)) self.remove_replica_cluster(self.ns_leader, self.alias) time.sleep(3) @ddt.unpack def test_synctable_without_table(self): """ 从集群没有与主集群有相同表名的表 """ name = 'tname{}'.format(time.time()) metadata_path = '{}/metadata.txt'.format(self.testpath) table_meta = { "name": name, "ttl": 0, "table_partition": [ {"endpoint": self.leader,"pid_group": "0-2","is_leader": "true"}, ], "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta, metadata_path) # leader cluster rs = self.ns_create(self.ns_leader, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc0', '1', '15', '18']) self.assertIn('Put ok', rs1) rs2 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card0', 'mcc1', '2', '16', '19']) self.assertIn('Put ok', rs2) rs3 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card1', 'mcc2', '3', '20', '20']) self.assertIn('Put ok', rs3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) rs_up = self.ns_update_table_alive_cmd(self.ns_leader, 'updatetablealive', name, '*', self.leader, 'no') self.assertIn('update ok', rs_up) zk_root_path = '/remote' msg = self.ns_switch_mode(self.ns_leader, 'leader') self.assertIn('switchmode ok', msg) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(10) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 0) msg = self.ns_synctable(self.ns_leader, name, self.alias, '1'); self.assertIn('not need pid', msg) msg = self.ns_synctable(self.ns_leader, name, "ss"); self.assertIn('replica name not found', msg) msg = self.ns_synctable(self.ns_leader, "ss", self.alias); self.assertIn('table is not exist', msg) msg = self.ns_synctable(self.ns_leader, name, self.alias); self.assertIn('local table has a no alive leader partition', msg) msg = self.ns_update_table_alive_cmd(self.ns_leader, 'updatetablealive', name, '*', self.leader, 'yes') self.assertIn('update ok', msg) msg = self.ns_synctable(self.ns_leader, name, self.alias); self.assertIn('synctable ok', msg) time.sleep(20) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_drop(self.ns_leader, name) self.assertIn('drop ok', msg) time.sleep(3) rs = self.showtable(self.ns_leader_r, name) self.assertEqual(0, len(rs)) self.remove_replica_cluster(self.ns_leader, self.alias) time.sleep(3) @ddt.unpack def test_synctable_with_table(self): """ 从集群有与主集群有可以match的表 """ name = 'tname{}'.format(time.time()) metadata_path = '{}/metadata.txt'.format(self.testpath) table_meta = { "name": name, "ttl": 0, "table_partition": [ {"endpoint": self.leader,"pid_group": "0-2","is_leader": "true"}, ], "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta, metadata_path) # leader cluster rs = self.ns_create(self.ns_leader, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) # follower cluster metadata_path_r = '{}/metadata.txt'.format(self.testpath) table_meta_r = { "name": name, "ttl": 0, "table_partition": [ {"endpoint": self.leader_r,"pid_group": "0-2","is_leader": "true"}, ], "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta_r, metadata_path_r) rs = self.ns_create(self.ns_leader_r, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc0', '1', '15', '18']) self.assertIn('Put ok', rs1) rs2 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card0', 'mcc1', '2', '16', '19']) self.assertIn('Put ok', rs2) rs3 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card1', 'mcc2', '3', '20', '20']) self.assertIn('Put ok', rs3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_update_table_alive_cmd(self.ns_leader_r, 'updatetablealive', name, '*', self.leader_r, 'no') self.assertIn('update ok', msg) zk_root_path = '/remote' msg = self.ns_switch_mode(self.ns_leader, 'leader') self.assertIn('switchmode ok', msg) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(10) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4), 0) rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 0) msg = self.ns_synctable(self.ns_leader, name, self.alias); self.assertIn('remote table has a no alive leader partition', msg) msg = self.ns_update_table_alive_cmd(self.ns_leader_r, 'updatetablealive', name, '*', self.leader_r, 'yes') self.assertIn('update ok', msg) msg = self.ns_synctable(self.ns_leader, name, self.alias); self.assertIn('synctable ok', msg) time.sleep(10) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_drop(self.ns_leader, name) self.assertIn('drop ok', msg) time.sleep(3) rs = self.showtable(self.ns_leader_r, name) self.assertEqual(0, len(rs)) self.remove_replica_cluster(self.ns_leader, self.alias) time.sleep(3) @ddt.unpack def test_synctable_with_table_has_pid(self): """ 从集群有与主集群有可以match的表(同步某个分片) """ name = 'tname{}'.format(time.time()) metadata_path = '{}/metadata.txt'.format(self.testpath) table_meta = { "name": name, "ttl": 0, "table_partition": [ {"endpoint": self.leader,"pid_group": "0","is_leader": "true"}, ], "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta, metadata_path) # leader cluster rs = self.ns_create(self.ns_leader, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) # follower cluster metadata_path_r = '{}/metadata.txt'.format(self.testpath) table_meta_r = { "name": name, "ttl": 0, "table_partition": [ {"endpoint": self.leader_r,"pid_group": "0","is_leader": "true"}, ], "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta_r, metadata_path_r) rs = self.ns_create(self.ns_leader_r, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc0', '1', '15', '18']) self.assertIn('Put ok', rs1) rs2 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card0', 'mcc1', '2', '16', '19']) self.assertIn('Put ok', rs2) rs3 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card1', 'mcc2', '3', '20', '20']) self.assertIn('Put ok', rs3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_update_table_alive_cmd(self.ns_leader_r, 'updatetablealive', name, '*', self.leader_r, 'no') self.assertIn('update ok', msg) zk_root_path = '/remote' msg = self.ns_switch_mode(self.ns_leader, 'leader') self.assertIn('switchmode ok', msg) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(10) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4), 0) rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 0) msg = self.ns_synctable(self.ns_leader, name, self.alias, '1'); self.assertIn('table has no current pid', msg) msg = self.ns_synctable(self.ns_leader, name, self.alias, '0'); self.assertIn('remote table has a no alive leader partition', msg) msg = self.ns_update_table_alive_cmd(self.ns_leader_r, 'updatetablealive', name, '*', self.leader_r, 'yes') self.assertIn('update ok', msg) msg = self.ns_synctable(self.ns_leader, name, self.alias, '0'); self.assertIn('synctable ok', msg) time.sleep(10) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.ns_drop(self.ns_leader, name) self.assertIn('drop ok', msg) time.sleep(3) rs = self.showtable(self.ns_leader_r, name) self.assertEqual(0, len(rs)) self.remove_replica_cluster(self.ns_leader, self.alias) time.sleep(3) @ddt.unpack def test_second_add_rep_cluster(self): """ 主从集群建连、同步、断连、建连,依然能够同步数据 """ zk_root_path = '/remote' msg = self.ns_switch_mode(self.ns_leader, 'leader') self.assertIn('switchmode ok', msg) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(3) name = 'tname{}'.format(time.time()) metadata_path = '{}/metadata.txt'.format(self.testpath) table_meta = { "name": name, "ttl": 0, "partition_num": 3, "replica_num": 1, "column_desc":[ {"name": "card", "type": "string", "add_ts_idx": "true"}, {"name": "mcc", "type": "string", "add_ts_idx": "true"}, {"name": "amt", "type": "double", "add_ts_idx": "false"}, {"name": "ts1", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, {"name": "ts2", "type": "int64", "add_ts_idx": "false", "is_ts_col": "true"}, ], "column_key":[ {"index_name":"card", "ts_name":["ts1", "ts2"]}, {"index_name":"mcc", "ts_name":["ts2"]}, ] } utils.gen_table_meta_file(table_meta, metadata_path) rs = self.ns_create(self.ns_leader, metadata_path) self.assertIn('Create table ok', rs) (schema, column_key) = self.ns_showschema(self.ns_leader, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) time.sleep(20) (schema, column_key) = self.ns_showschema(self.ns_leader_r, name) self.assertEqual(len(schema), 5) self.assertEqual(schema[0], ['0', 'card', 'string']) self.assertEqual(schema[1], ['1', 'mcc', 'string']) self.assertEqual(schema[2], ['2', 'amt', 'double']) self.assertEqual(schema[3], ['3', 'ts1', 'int64']) self.assertEqual(schema[4], ['4', 'ts2', 'int64']) self.assertEqual(len(column_key), 3) self.assertEqual(column_key[0], ["0", "card", "card", "ts1", "0min"]) self.assertEqual(column_key[1], ["1", "card", "card", "ts2", "0min"]) self.assertEqual(column_key[2], ["2", "mcc", "mcc", "ts2", "0min"]) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc0', '1', '15', '18']) self.assertIn('Put ok', rs1) rs2 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card0', 'mcc1', '2', '16', '19']) self.assertIn('Put ok', rs2) rs3 = self.ns_put_multi_with_pair(self.ns_leader, name, ['card1', 'mcc2', '3', '20', '20']) self.assertIn('Put ok', rs3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) time.sleep(3) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2', '1') self.assertEqual(len(rs7), 1) msg = self.remove_replica_cluster(self.ns_leader, self.alias) self.assertIn('remove replica cluster ok', msg) time.sleep(5) rs1 = self.ns_put_multi_with_pair(self.ns_leader,name, ['card0', 'mcc1', '2', '17', '21']) self.assertIn('Put ok', rs1) rs4 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),3) self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc1') self.assertEqual(rs4[1]['amt'], '2') self.assertEqual(rs4[1]['ts1'], '16') self.assertEqual(rs4[1]['ts2'], '19') self.assertEqual(rs4[2]['card'], 'card0') self.assertEqual(rs4[2]['mcc'], 'mcc0') self.assertEqual(rs4[2]['amt'], '1') self.assertEqual(rs4[2]['ts1'], '15') self.assertEqual(rs4[2]['ts2'], '18') self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '17') self.assertEqual(rs4[0]['ts2'], '21') rs5 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '17') self.assertEqual(rs5[0]['ts2'], '21') rs6 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader, name, 'mcc1', 'mcc', '25', '0', 'ts2') self.assertEqual(len(rs7), 2) time.sleep(3); rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),2) self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '16') self.assertEqual(rs4[0]['ts2'], '19') self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc0') self.assertEqual(rs4[1]['amt'], '1') self.assertEqual(rs4[1]['ts1'], '15') self.assertEqual(rs4[1]['ts2'], '18') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '16') self.assertEqual(rs5[0]['ts2'], '19') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2') self.assertEqual(len(rs7), 1) msg = self.add_replica_cluster(self.ns_leader, conf.zk_endpoint, zk_root_path, self.alias) self.assertIn('adrepcluster ok', msg) time.sleep(10) rs4 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1') self.assertEqual(len(rs4),3) self.assertEqual(rs4[1]['card'], 'card0') self.assertEqual(rs4[1]['mcc'], 'mcc1') self.assertEqual(rs4[1]['amt'], '2') self.assertEqual(rs4[1]['ts1'], '16') self.assertEqual(rs4[1]['ts2'], '19') self.assertEqual(rs4[2]['card'], 'card0') self.assertEqual(rs4[2]['mcc'], 'mcc0') self.assertEqual(rs4[2]['amt'], '1') self.assertEqual(rs4[2]['ts1'], '15') self.assertEqual(rs4[2]['ts2'], '18') self.assertEqual(rs4[0]['card'], 'card0') self.assertEqual(rs4[0]['mcc'], 'mcc1') self.assertEqual(rs4[0]['amt'], '2') self.assertEqual(rs4[0]['ts1'], '17') self.assertEqual(rs4[0]['ts2'], '21') rs5 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'card0', 'card', '25', '0', 'ts1', '1') self.assertEqual(len(rs5),1) self.assertEqual(rs5[0]['card'], 'card0') self.assertEqual(rs5[0]['mcc'], 'mcc1') self.assertEqual(rs5[0]['amt'], '2') self.assertEqual(rs5[0]['ts1'], '17') self.assertEqual(rs5[0]['ts2'], '21') rs6 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts1', '1') self.assertEqual(len(rs6), 0) rs7 = self.ns_scan_multi_with_pair(self.ns_leader_r, name, 'mcc1', 'mcc', '25', '0', 'ts2') self.assertEqual(len(rs7), 2) msg = self.ns_drop(self.ns_leader, name) self.assertIn('drop ok', msg) time.sleep(3) rs = self.showtable(self.ns_leader_r, name) self.assertEqual(0, len(rs)) self.remove_replica_cluster(self.ns_leader, self.alias) time.sleep(3) if __name__ == "__main__": load(TestMultiCluster)
49.515244
115
0.552573
6,367
48,723
4.064866
0.033454
0.248058
0.111279
0.055832
0.958773
0.9529
0.9529
0.952861
0.951586
0.950002
0
0.058219
0.240995
48,723
983
116
49.565615
0.641627
0.016994
0
0.934256
0
0
0.15372
0
0
0
0
0
0.566321
1
0.00692
false
0
0.010381
0
0.018454
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
1
0
0
0
0
0
0
0
0
0
9
fd04de0574cf0a20b1521b554857ed453e8991ef
138,591
py
Python
Georeferencing_functions.py
jida-wang/georeferencing-ICOLD-dams-and-reservoirs
8a59d4712241e5f53d52d8f0e1b92d5829ba3f22
[ "MIT" ]
3
2021-03-04T06:46:56.000Z
2021-05-21T19:59:57.000Z
Georeferencing_functions.py
surf-hydro/georeferencing-ICOLD-dams-and-reservoirs
0c95286618ede725c19498e4eaf3b6e36cc5f304
[ "MIT" ]
null
null
null
Georeferencing_functions.py
surf-hydro/georeferencing-ICOLD-dams-and-reservoirs
0c95286618ede725c19498e4eaf3b6e36cc5f304
[ "MIT" ]
1
2021-12-16T02:33:32.000Z
2021-12-16T02:33:32.000Z
# [Description] ------------------------------ # Script name "Georeferencing_functions.py" # This script contains a list of customized functions used for georeferencing ICOLD World Register of # Dams (WRD). See their names, purposes, inputs and outputs below. #--------------------------------------------- # Function name: # remove_accents(input_str) # Purpose: # This function removes characters with umlauts and accents(such as in French, German, and Greek) and # then replace them by non-accentuated counterparts. # Input: # -> input_str: a string with possible accents # Output: # -> a string where accentuated characters have been replaced by their non-accentuated counterparts. #--------------------------------------------- #--------------------------------------------- # Function name: # year_similar(ICOLD_year, registry_year) # Purpose: # This function determines whether two "year" strings are considered to be equivalent. Here a one-year # tolerance is employed as different inventories may show minor discrepancy in the completion/commission # year of the same dam/reservoir. # Inputs: # -> ICOLD_year: one of the two years (string type) # -> registry_year: the other year (string type) # Outputs: # -> 1: indicating the two years are considered equivalent # -> 0: indicating different years #--------------------------------------------- #--------------------------------------------- # Function name: # similar(a, b) # Purpose: # This function compares the similarity score of two strings with consideration of the character sequence. # It was mainly used to compare the similarity of administrative names in between ICOLD WRD and the # georeferenced inventory or register. # Inputs: # -> a and b: the two sequences (both in string type) to be compared # Output: # -> A float number in [0,1.0], with 1.0 indicating the two sequences being identical and 0 indicating no # similarity between the two sequences. #--------------------------------------------- #--------------------------------------------- # Function name: # damname_similar(similarity_t, dam_name_input, other_dam_name_input, reservoir_name_input, # geocoded_name_input, this_country_ISO_input) # Purpose: # This function determines whether the names of two dam/reservoir records (e.g., Record A and Record B) # are considered to be equivalent. If Record A has multiple names (such as different dam name and reservoir # name), all names of Record A will be compared with the name of Record B. The names of the two records # are considered equivalent as long as the score of similarity (calculated using the "similar" function) # between the name of Record B and any of the names of Recorc A exceeds a customized similarity threshold # (another input variable). This function was mainly used to compare dam/reservoir names in between ICOLD # WRD and the georeferenced inventory/register. # Inputs: # -> similarity_t: a minimum similarity threshold in [0, 1.0]. # -> dam_name_input: dam name of Record A (string) # -> other_dam_name_input: other dam name of Record A (string). Enter '' if this is not available. # -> reservoir_name_input: reservoir name of Record A (string). Enter '' if this is not available. # -> geocoded_name_input: dam/reservoir name of Record B (string). # -> this_country_ISO_input: country ISO 3166-2 codes . # Outputs: # -> 1: indicating a high confidence that the two records share the same dam or reservoir name. # -> 0.5: indicating a medium confidence that the two records share the same dam or reservoir name # -> 0: indicating otherwise #--------------------------------------------- #--------------------------------------------- # Function name: # river_similar(similarity_t, ICOLD_river, registry_river) # Purpose: # This function determines whether the names of two rivers are considered to be equivalent given a minimum # similarity threshold. # Inputs: # -> similarity_t: a minimum similarity threshold in [0, 1.0]. # -> ICOLD_river: name of the first river # -> registry_river: name of the other river # Outputs: # -> 1: indicating a high confidence that the two records share the same river name # -> 0.5: indicating a medium confidence that the two records share the same river name # -> 0: indicating otherwise #--------------------------------------------- #--------------------------------------------- # Function name: # similar_v2(a, b) # Purpose: # The same as function <similar>, except that this function was mainly used to compare the similarity of # administrative names in between ICOLD WRD and the Google geocoding result. In comparison with <similar>, # criteria in this function (v2) were overall more lenient considering that the outputs from the Google Maps # geocoding API have already gone through a similarity measure. # Inputs: # -> a and b: the two sequences (both in string type) to be compared # Output: # -> A float number in [0,1.0], with 1.0 indicating the two sequences being identical and 0 indicating no # similarity between the two sequences. #--------------------------------------------- #--------------------------------------------- # Function name: # damname_similar_v2(similarity_t, dam_name_input, other_dam_name_input, reservoir_name_input, # geocoded_name_input, this_country_ISO_input) # Purpose: # The same as function <damname_similar>, except that this function was used to compare dam/reservoir names # in between ICOLD WRD and the geocoding output. In comparison with <damname_similar>, criteria in this # function (v2) were overall more lenient considering that the outputs from the Google Maps geocoding API # have already gone through a similarity measure. # Inputs: # -> similarity_t: a minimum similarity threshold in [0, 1.0]. # -> dam_name_input: dam name of Record A (string) # -> other_dam_name_input: other dam name of Record A (string). Enter '' if this is not available. # -> reservoir_name_input: reservoir name of Record A (string). Enter '' if this is not available. # -> geocoded_name_input: dam/reservoir name of Record B (string). # -> this_country_ISO_input: country ISO 3166-2 codes . # Outputs: # -> 1: indicating the two records share the same dam or reservoir name # -> 0: indicating otherwise #--------------------------------------------- #--------------------------------------------- # See detailed functions in [Scripts] below. # Reference: Wang, J., Walter, B.A., Yao, F., Song, C., Ding, M., Maroof, M.A.S., Zhu, J., Fan, C., Xin, A., # McAlister, J.M., Sikder, M.S., Sheng, Y., Allen, G.H., Crétaux, J.-F., and Wada, Y., 2021. GeoDAR: # Georeferenced global dam and reservoir database for bridging attributes and geolocations. Earth System # Science Data, in review. # Script written by: Jida Wang # Last update: March 4, 2021 # Contact: jidawang@ksu.edu; gdbruins@ucla.edu #--------------------------------------------- # [Script] ----------------------------------- # Import built-in functions and tools import unicodedata, re from difflib import SequenceMatcher def remove_accents(input_str): nfkd_form = unicodedata.normalize('NFKD', input_str) return u"".join([c for c in nfkd_form if not unicodedata.combining(c)]) def year_similar(ICOLD_year, registry_year): year_similarity_pass = 0 if str.isdigit(ICOLD_year) == False or str.isdigit(registry_year) == False: year_similarity_pass = 0 else: if abs(int(ICOLD_year) - int(registry_year))<= 1: year_similarity_pass = 1 return year_similarity_pass def similar(a, b): a = a.lower().strip() b = b.lower().strip() if a == '-999' or b == '-999' or a == '' or b == '' or a == None or b == None or a == '/' or b == '/' \ or a == '-' or b == '-' or a == '..' or b == '..' or a == '_' or b == '_': return_sim = 0 elif (len(a)>=7 and (a[0:7]=='unknown' or a[0:7]=='unnamed' or a[0:7]=='un-name')) or (len(b)>=7 and (b[0:7]=='unknown' or b[0:7]=='unnamed' or b[0:7]=='un-name')): return_sim = 0 else: if ('\\' in a) or ('\\' in b) or ('/' in a) or ('/' in b): # In case of two different names shared by the same object AA_good = [] for this_AA_slash1 in a.split('/'): for this_AA_slash2 in this_AA_slash1.split('\\'): if this_AA_slash2 != '': AA_good.append(this_AA_slash2.strip()) BB_good = [] for this_BB_slash1 in b.split('/'): for this_BB_slash2 in this_BB_slash1.split('\\'): if this_BB_slash2 != '': BB_good.append(this_BB_slash2.strip()) similar_value_array = [] for this_AA_good in AA_good: for this_BB_good in BB_good: similar_value_array.append(SequenceMatcher(None, this_AA_good, this_BB_good).ratio()) return_sim = max(similar_value_array) else: return_sim = SequenceMatcher(None, a, b).ratio() return return_sim def damname_similar(similarity_t, dam_name_input, other_dam_name_input, reservoir_name_input, geocoded_name_input, this_country_ISO_input): # Discard some of the ancillary titles in a dam or reservoir name. These titles are not considered as an essential part of the dam/reservoir names. to_be_removed = [' lake ', ' dam ', ' reservoir ', ' barrage ', ' lago ', ' shuiku ', ' lac ', ' presa ', ' embalse ', ' barragem ', \ ' agua ', ' stuwal ', ' weir ', ' dike ', ' dyke ', ' levee ', ' structure ', ' canal ', ' tank ', \ ' lake ', ' dam ', ' reservoir ', ' barrage ', ' lago ', ' shuiku ', ' lac ', ' presa ', ' embalse ', ' barragem ', \ ' agua ', ' stuwal ', ' weir ', ' dike ', ' dyke ', ' levee ', ' structure ', ' canal ', ' tank ', \ ' lake ', ' dam ', ' reservoir ', ' barrage ', ' lago ', ' shuiku ', ' lac ', ' presa ', ' embalse ', ' barragem ', \ ' agua ', ' stuwal ', ' weir ', ' dike ', ' dyke ', ' levee ', ' structure ', ' canal ', ' tank '] # Repeat them for a thorough removal. damname_similarity_final_pass = 0 damname_similarity_pass = 0 damname_similarity_pass_alt = 0 if dam_name_input == '-999' or geocoded_name_input == '-999' or dam_name_input == '' or geocoded_name_input == '' or \ dam_name_input == None or geocoded_name_input == None or dam_name_input == '/' or geocoded_name_input == '/' or \ dam_name_input == '-' or geocoded_name_input == '-' or dam_name_input == '..' or geocoded_name_input == '..' or \ dam_name_input == '_' or geocoded_name_input == '_': damname_similarity_pass = 0 elif (len(dam_name_input)>=7 and (dam_name_input[0:7]=='unknown' or dam_name_input[0:7]=='unnamed' or dam_name_input[0:7]=='un-name')) or \ (len(geocoded_name_input)>=7 and (geocoded_name_input[0:7]=='unknown' or geocoded_name_input[0:7]=='unnamed' or geocoded_name_input[0:7]=='un-name')): damname_similarity_pass = 0 elif geocoded_name_input == 'not found': damname_similarity_pass = -1 else: dam_name_input_simple = remove_accents(dam_name_input) geocoded_name_input_simple = remove_accents(geocoded_name_input) # Remove ancillary titles. dam_name_input_simple = ' ' + dam_name_input_simple + ' ' geocoded_name_input_simple = ' ' + geocoded_name_input_simple + ' ' for this_to_be_removed in to_be_removed: if this_to_be_removed in dam_name_input_simple: dam_name_input_simple = dam_name_input_simple.replace(this_to_be_removed, ' ') if this_to_be_removed in geocoded_name_input_simple: geocoded_name_input_simple = geocoded_name_input_simple.replace(this_to_be_removed, ' ') dam_name_input_simple = dam_name_input_simple.strip() geocoded_name_input_simple = geocoded_name_input_simple.strip() if this_country_ISO_input == 'cn': if len(dam_name_input_simple) > 8 and dam_name_input_simple[-6:] == 'shuiku': dam_name_input_simple = (dam_name_input_simple[0:(len(dam_name_input_simple)-6)]).lower().strip() if len(geocoded_name_input_simple) > 8 and geocoded_name_input_simple[-6:] == 'shuiku': geocoded_name_input_simple = (geocoded_name_input_simple[0:(len(geocoded_name_input_simple)-6)]).lower().strip() # Extract Arabic numbers from both names. continue_or_not = 1 numbers_left = re.findall(r'\d+', dam_name_input_simple) numbers_right = re.findall(r'\d+', geocoded_name_input_simple) # Split the name by delimiters. icold_spelling_splits = [] for this_split_space in dam_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': icold_spelling_splits.append(this_split_paren2) google_spelling_splits = [] for this_split_space in geocoded_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': google_spelling_splits.append(this_split_paren2) # To reduce ambiguity, check if each of the Arabic numbers in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different numbers. # For example, "Tuttle Creek #1" is not the same dam as "Tuttle Creek #2". if len(numbers_left)>0 and len(numbers_right)>0: for this_number_left in numbers_left: if this_number_left not in numbers_right: continue_or_not = 0 break for this_numbers_right in numbers_right: if this_numbers_right not in numbers_left: continue_or_not = 0 break elif len(numbers_left)==0 and len(numbers_right)==0: # Also check other number formats. if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and (('i' not in google_spelling_splits) and ('one' not in google_spelling_splits))) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and (('ii' not in google_spelling_splits) and ('two' not in google_spelling_splits))) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and (('iii' not in google_spelling_splits) and ('three' not in google_spelling_splits))) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and (('iv' not in google_spelling_splits) and ('four' not in google_spelling_splits))) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and (('v' not in google_spelling_splits) and ('five' not in google_spelling_splits))) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and (('vi' not in google_spelling_splits) and ('six' not in google_spelling_splits))) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and (('vii' not in google_spelling_splits) and ('seven' not in google_spelling_splits))) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and (('viii' not in google_spelling_splits) and ('eight' not in google_spelling_splits))) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and (('ix' not in google_spelling_splits) and ('nine' not in google_spelling_splits))) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and (('x' not in google_spelling_splits) and ('ten' not in google_spelling_splits))) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and (('xi' not in google_spelling_splits) and ('eleven' not in google_spelling_splits))) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and (('xii' not in google_spelling_splits) and ('twelve' not in google_spelling_splits))) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and (('xiii' not in google_spelling_splits) and ('thirteen' not in google_spelling_splits))) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and (('xiv' not in google_spelling_splits) and ('fourteen' not in google_spelling_splits))) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and (('xv' not in google_spelling_splits) and ('fifteen' not in google_spelling_splits))) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and (('xvi' not in google_spelling_splits) and ('sixteen' not in google_spelling_splits))) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and (('xvii' not in google_spelling_splits) and ('seventeen' not in google_spelling_splits))) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and (('xviii' not in google_spelling_splits) and ('eighteen' not in google_spelling_splits))) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and (('xix' not in google_spelling_splits) and ('nineteen' not in google_spelling_splits))) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and (('xx' not in google_spelling_splits) and ('twenty' not in google_spelling_splits))) or \ ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and (('i' not in icold_spelling_splits) and ('one' not in icold_spelling_splits))) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and (('ii' not in icold_spelling_splits) and ('two' not in icold_spelling_splits))) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and (('iii' not in icold_spelling_splits) and ('three' not in icold_spelling_splits))) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and (('iv' not in icold_spelling_splits) and ('four' not in icold_spelling_splits))) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and (('v' not in icold_spelling_splits) and ('five' not in icold_spelling_splits))) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and (('vi' not in icold_spelling_splits) and ('six' not in icold_spelling_splits))) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and (('vii' not in icold_spelling_splits) and ('seven' not in icold_spelling_splits))) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and (('viii' not in icold_spelling_splits) and ('eight' not in icold_spelling_splits))) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and (('ix' not in icold_spelling_splits) and ('nine' not in icold_spelling_splits))) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and (('x' not in icold_spelling_splits) and ('ten' not in icold_spelling_splits))) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and (('xi' not in icold_spelling_splits) and ('eleven' not in icold_spelling_splits))) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and (('xii' not in icold_spelling_splits) and ('twelve' not in icold_spelling_splits))) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and (('xiii' not in icold_spelling_splits) and ('thirteen' not in icold_spelling_splits))) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and (('xiv' not in icold_spelling_splits) and ('fourteen' not in icold_spelling_splits))) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and (('xv' not in icold_spelling_splits) and ('fifteen' not in icold_spelling_splits))) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and (('xvi' not in icold_spelling_splits) and ('sixteen' not in icold_spelling_splits))) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and (('xvii' not in icold_spelling_splits) and ('seventeen' not in icold_spelling_splits))) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and (('xviii' not in icold_spelling_splits) and ('eighteen' not in icold_spelling_splits))) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and (('xix' not in icold_spelling_splits) and ('nineteen' not in icold_spelling_splits))) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and (('xx' not in icold_spelling_splits) and ('twenty' not in icold_spelling_splits))): continue_or_not = 0 elif len(numbers_left)==0 and len(numbers_right)==1: if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and ('1' in google_spelling_splits)) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and ('2' in google_spelling_splits)) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and ('3' in google_spelling_splits)) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and ('4' in google_spelling_splits)) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and ('5' in google_spelling_splits)) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and ('6' in google_spelling_splits)) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and ('7' in google_spelling_splits)) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and ('8' in google_spelling_splits)) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and ('9' in google_spelling_splits)) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and ('10' in google_spelling_splits)) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and ('11' in google_spelling_splits)) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and ('12' in google_spelling_splits)) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and ('13' in google_spelling_splits)) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and ('14' in google_spelling_splits)) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and ('15' in google_spelling_splits)) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and ('16' in google_spelling_splits)) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and ('17' in google_spelling_splits)) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and ('18' in google_spelling_splits)) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and ('19' in google_spelling_splits)) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and ('20' in google_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 elif len(numbers_left)==1 and len(numbers_right)==0: if ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and ('1' in icold_spelling_splits)) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and ('2' in icold_spelling_splits)) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and ('3' in icold_spelling_splits)) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and ('4' in icold_spelling_splits)) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and ('5' in icold_spelling_splits)) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and ('6' in icold_spelling_splits)) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and ('7' in icold_spelling_splits)) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and ('8' in icold_spelling_splits)) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and ('9' in icold_spelling_splits)) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and ('10' in icold_spelling_splits)) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and ('11' in icold_spelling_splits)) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and ('12' in icold_spelling_splits)) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and ('13' in icold_spelling_splits)) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and ('14' in icold_spelling_splits)) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and ('15' in icold_spelling_splits)) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and ('16' in icold_spelling_splits)) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and ('17' in icold_spelling_splits)) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and ('18' in icold_spelling_splits)) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and ('19' in icold_spelling_splits)) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and ('20' in icold_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 else: continue_or_not = 0 # To further reduce ambiguity, check if any of the following elements in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different direction adjectives or letters. # For example, "Tuttle Creek East" is not the same dam as "Tuttle Creek West". if (('east' in icold_spelling_splits) and ('east' not in google_spelling_splits)) or (('east' in google_spelling_splits) and ('east' not in icold_spelling_splits)) or \ (('west' in icold_spelling_splits) and ('west' not in google_spelling_splits)) or (('west' in google_spelling_splits) and ('west' not in icold_spelling_splits)) or \ (('north' in icold_spelling_splits) and ('north' not in google_spelling_splits)) or (('north' in google_spelling_splits) and ('north' not in icold_spelling_splits)) or \ (('south' in icold_spelling_splits) and ('south' not in google_spelling_splits)) or (('south' in google_spelling_splits) and ('south' not in icold_spelling_splits)) or \ (('upper' in icold_spelling_splits) and ('upper' not in google_spelling_splits)) or (('upper' in google_spelling_splits) and ('upper' not in icold_spelling_splits)) or \ (('lower' in icold_spelling_splits) and ('lower' not in google_spelling_splits)) or (('lower' in google_spelling_splits) and ('lower' not in icold_spelling_splits)) or \ (('a' in icold_spelling_splits) and ('a' not in google_spelling_splits)) or (('a' in google_spelling_splits) and ('a' not in icold_spelling_splits)) or \ (('b' in icold_spelling_splits) and ('b' not in google_spelling_splits)) or (('b' in google_spelling_splits) and ('b' not in icold_spelling_splits)) or \ (('c' in icold_spelling_splits) and ('c' not in google_spelling_splits)) or (('c' in google_spelling_splits) and ('c' not in icold_spelling_splits)) or \ (('d' in icold_spelling_splits) and ('d' not in google_spelling_splits)) or (('d' in google_spelling_splits) and ('d' not in icold_spelling_splits)) or \ (('auxiliar' in icold_spelling_splits) and ('auxiliar' not in google_spelling_splits)) or (('auxiliar' in google_spelling_splits) and ('auxiliar' not in icold_spelling_splits)) or \ (('auxiliary' in icold_spelling_splits) and ('auxiliary' not in google_spelling_splits)) or (('auxiliary' in google_spelling_splits) and ('auxiliary' not in icold_spelling_splits)): continue_or_not = 0 # Continue the comparison if none of the situations above happens. if continue_or_not == 0: damname_similarity_pass = 0 elif (dam_name_input_simple != '' and geocoded_name_input_simple != ''): similarity_value = similar(dam_name_input_simple, geocoded_name_input_simple) if similarity_value >= similarity_t: damname_similarity_pass = 1 if damname_similarity_pass != 1: # Check containment relations if (dam_name_input_simple in geocoded_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD contained by Google if geocoded_name_input_simple.find(dam_name_input_simple) == 0: #'manhattan city': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)) == len(geocoded_name_input_simple): #'city of manhattan': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple in dam_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD containing Google if dam_name_input_simple.find(geocoded_name_input_simple) == 0: #'manhattan city': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == '-': damname_similarity_pass = 1 elif (dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)) == len(dam_name_input_simple): #'city of manhattan': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == '-': damname_similarity_pass = 1 if damname_similarity_pass != 1: for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: # Further eliminate possibly ancillary information from the name. if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'main' and icold_split != 'main' and \ google_split != 'tank' and icold_split != 'tank' and \ google_split != 'dyke' and icold_split != 'dyke' and google_split != 'canal' and icold_split != 'canal' and \ google_split != 'canyon' and icold_split != 'canyon' and google_split != 'diversion' and icold_split != 'diversion' and \ google_split != 'city' and icold_split != 'city' and google_split != 'town' and icold_split != 'town' and \ google_split != 'fall' and icold_split != 'fall' and google_split != 'falls' and icold_split != 'falls' and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'storage' and icold_split != 'storage' and google_split != 'river' and icold_split != 'river' and \ google_split != 'saint' and icold_split != 'saint' and google_split != 'kloof' and icold_split != 'kloof' and \ google_split != 'berg' and icold_split != 'berg' and google_split != 'santa' and icold_split != 'santa' and \ google_split != 'valley' and icold_split != 'valley' and google_split != 'upper' and icold_split != 'upper' and \ google_split != 'lower' and icold_split != 'lower' and google_split != 'creek' and icold_split != 'creek' and \ google_split != 'lake' and icold_split != 'lake' and google_split != 'reservoir' and icold_split != 'reservoir' and \ google_split != 'lock' and icold_split != 'lock' and google_split != 'barrage' and icold_split != 'barrage' and \ google_split != 'lago' and icold_split != 'lago' and google_split != 'shuiku' and icold_split != 'shuiku' and \ google_split != 'presa' and icold_split != 'presa' and google_split != 'embalse' and icold_split != 'embalse' and \ google_split != 'barragem' and icold_split != 'barragem' and google_split != 'agua' and icold_split != 'agua' and \ google_split != 'stuwal' and icold_split != 'stuwal' and google_split != 'weir' and icold_split != 'weir' and \ google_split != 'dike' and icold_split != 'dike' and google_split != 'levee' and icold_split != 'levee' and \ google_split != 'mountain' and icold_split != 'mountain' and google_split != 'hill' and icold_split != 'hill' and \ google_split != 'auxiliar' and icold_split != 'auxiliar' and google_split != 'auxiliary' and icold_split != 'auxiliary' and \ google_split != 'riacho' and icold_split != 'riacho' and google_split != 'ribeirao' and icold_split != 'ribeirao' and \ google_split != 'ribeiro' and icold_split != 'ribeiro' and google_split != 'ribeira' and icold_split != 'ribeira' and \ google_split != 'riviere' and icold_split != 'riviere': if similar(icold_split, google_split) >= similarity_t: damname_similarity_pass_alt = 1 break if damname_similarity_pass_alt ==1: break # If the similary test has not been passed, continue to check the other dam if any. if damname_similarity_pass != 1: if other_dam_name_input == '-999' or geocoded_name_input == '-999' or other_dam_name_input == '' or geocoded_name_input == '' or \ other_dam_name_input == None or geocoded_name_input == None or other_dam_name_input == '/' or geocoded_name_input == '/' or \ other_dam_name_input == '-' or geocoded_name_input == '-' or other_dam_name_input == '..' or geocoded_name_input == '..' or \ other_dam_name_input == '_' or geocoded_name_input == '_': damname_similarity_pass = 0 elif (len(other_dam_name_input)>=7 and (other_dam_name_input[0:7]=='unknown' or other_dam_name_input[0:7]=='unnamed' or other_dam_name_input[0:7]=='un-name')) or \ (len(geocoded_name_input)>=7 and (geocoded_name_input[0:7]=='unknown' or geocoded_name_input[0:7]=='unnamed' or geocoded_name_input[0:7]=='un-name')): damname_similarity_pass = 0 elif geocoded_name_input == 'not found': damname_similarity_pass = -1 else: dam_name_input_simple = remove_accents(other_dam_name_input) dam_name_input_simple = ' ' + dam_name_input_simple + ' ' # Remove ancillary titles. for this_to_be_removed in to_be_removed: if this_to_be_removed in dam_name_input_simple: dam_name_input_simple = dam_name_input_simple.replace(this_to_be_removed, ' ') dam_name_input_simple = dam_name_input_simple.strip() if this_country_ISO_input == 'cn': if len(dam_name_input_simple) > 8 and dam_name_input_simple[-6:] == 'shuiku': dam_name_input_simple = (dam_name_input_simple[0:(len(dam_name_input_simple)-6)]).lower().strip() # Extract Arabic numbers from both names. continue_or_not = 1 numbers_left = re.findall(r'\d+', dam_name_input_simple) numbers_right = re.findall(r'\d+', geocoded_name_input_simple) # Split the name by delimiters. icold_spelling_splits = [] for this_split_space in dam_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': icold_spelling_splits.append(this_split_paren2) google_spelling_splits = [] for this_split_space in geocoded_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': google_spelling_splits.append(this_split_paren2) # To reduce ambiguity, check if each of the Arabic numbers in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different numbers. # For example, "Tuttle Creek #1" is not the same dam as "Tuttle Creek #2". if len(numbers_left)>0 and len(numbers_right)>0: for this_number_left in numbers_left: if this_number_left not in numbers_right: continue_or_not = 0 break for this_numbers_right in numbers_right: if this_numbers_right not in numbers_left: continue_or_not = 0 break elif len(numbers_left)==0 and len(numbers_right)==0: # Also check other number formats. if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and (('i' not in google_spelling_splits) and ('one' not in google_spelling_splits))) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and (('ii' not in google_spelling_splits) and ('two' not in google_spelling_splits))) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and (('iii' not in google_spelling_splits) and ('three' not in google_spelling_splits))) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and (('iv' not in google_spelling_splits) and ('four' not in google_spelling_splits))) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and (('v' not in google_spelling_splits) and ('five' not in google_spelling_splits))) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and (('vi' not in google_spelling_splits) and ('six' not in google_spelling_splits))) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and (('vii' not in google_spelling_splits) and ('seven' not in google_spelling_splits))) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and (('viii' not in google_spelling_splits) and ('eight' not in google_spelling_splits))) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and (('ix' not in google_spelling_splits) and ('nine' not in google_spelling_splits))) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and (('x' not in google_spelling_splits) and ('ten' not in google_spelling_splits))) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and (('xi' not in google_spelling_splits) and ('eleven' not in google_spelling_splits))) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and (('xii' not in google_spelling_splits) and ('twelve' not in google_spelling_splits))) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and (('xiii' not in google_spelling_splits) and ('thirteen' not in google_spelling_splits))) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and (('xiv' not in google_spelling_splits) and ('fourteen' not in google_spelling_splits))) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and (('xv' not in google_spelling_splits) and ('fifteen' not in google_spelling_splits))) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and (('xvi' not in google_spelling_splits) and ('sixteen' not in google_spelling_splits))) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and (('xvii' not in google_spelling_splits) and ('seventeen' not in google_spelling_splits))) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and (('xviii' not in google_spelling_splits) and ('eighteen' not in google_spelling_splits))) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and (('xix' not in google_spelling_splits) and ('nineteen' not in google_spelling_splits))) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and (('xx' not in google_spelling_splits) and ('twenty' not in google_spelling_splits))) or \ ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and (('i' not in icold_spelling_splits) and ('one' not in icold_spelling_splits))) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and (('ii' not in icold_spelling_splits) and ('two' not in icold_spelling_splits))) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and (('iii' not in icold_spelling_splits) and ('three' not in icold_spelling_splits))) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and (('iv' not in icold_spelling_splits) and ('four' not in icold_spelling_splits))) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and (('v' not in icold_spelling_splits) and ('five' not in icold_spelling_splits))) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and (('vi' not in icold_spelling_splits) and ('six' not in icold_spelling_splits))) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and (('vii' not in icold_spelling_splits) and ('seven' not in icold_spelling_splits))) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and (('viii' not in icold_spelling_splits) and ('eight' not in icold_spelling_splits))) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and (('ix' not in icold_spelling_splits) and ('nine' not in icold_spelling_splits))) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and (('x' not in icold_spelling_splits) and ('ten' not in icold_spelling_splits))) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and (('xi' not in icold_spelling_splits) and ('eleven' not in icold_spelling_splits))) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and (('xii' not in icold_spelling_splits) and ('twelve' not in icold_spelling_splits))) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and (('xiii' not in icold_spelling_splits) and ('thirteen' not in icold_spelling_splits))) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and (('xiv' not in icold_spelling_splits) and ('fourteen' not in icold_spelling_splits))) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and (('xv' not in icold_spelling_splits) and ('fifteen' not in icold_spelling_splits))) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and (('xvi' not in icold_spelling_splits) and ('sixteen' not in icold_spelling_splits))) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and (('xvii' not in icold_spelling_splits) and ('seventeen' not in icold_spelling_splits))) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and (('xviii' not in icold_spelling_splits) and ('eighteen' not in icold_spelling_splits))) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and (('xix' not in icold_spelling_splits) and ('nineteen' not in icold_spelling_splits))) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and (('xx' not in icold_spelling_splits) and ('twenty' not in icold_spelling_splits))): continue_or_not = 0 elif len(numbers_left)==0 and len(numbers_right)==1: if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and ('1' in google_spelling_splits)) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and ('2' in google_spelling_splits)) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and ('3' in google_spelling_splits)) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and ('4' in google_spelling_splits)) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and ('5' in google_spelling_splits)) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and ('6' in google_spelling_splits)) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and ('7' in google_spelling_splits)) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and ('8' in google_spelling_splits)) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and ('9' in google_spelling_splits)) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and ('10' in google_spelling_splits)) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and ('11' in google_spelling_splits)) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and ('12' in google_spelling_splits)) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and ('13' in google_spelling_splits)) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and ('14' in google_spelling_splits)) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and ('15' in google_spelling_splits)) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and ('16' in google_spelling_splits)) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and ('17' in google_spelling_splits)) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and ('18' in google_spelling_splits)) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and ('19' in google_spelling_splits)) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and ('20' in google_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 elif len(numbers_left)==1 and len(numbers_right)==0: if ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and ('1' in icold_spelling_splits)) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and ('2' in icold_spelling_splits)) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and ('3' in icold_spelling_splits)) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and ('4' in icold_spelling_splits)) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and ('5' in icold_spelling_splits)) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and ('6' in icold_spelling_splits)) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and ('7' in icold_spelling_splits)) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and ('8' in icold_spelling_splits)) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and ('9' in icold_spelling_splits)) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and ('10' in icold_spelling_splits)) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and ('11' in icold_spelling_splits)) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and ('12' in icold_spelling_splits)) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and ('13' in icold_spelling_splits)) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and ('14' in icold_spelling_splits)) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and ('15' in icold_spelling_splits)) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and ('16' in icold_spelling_splits)) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and ('17' in icold_spelling_splits)) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and ('18' in icold_spelling_splits)) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and ('19' in icold_spelling_splits)) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and ('20' in icold_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 else: continue_or_not = 0 # To further reduce ambiguity, check if any of the following elements in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different direction adjectives or letters. # For example, "Tuttle Creek East" is not the same dam as "Tuttle Creek West". if (('east' in icold_spelling_splits) and ('east' not in google_spelling_splits)) or (('east' in google_spelling_splits) and ('east' not in icold_spelling_splits)) or \ (('west' in icold_spelling_splits) and ('west' not in google_spelling_splits)) or (('west' in google_spelling_splits) and ('west' not in icold_spelling_splits)) or \ (('north' in icold_spelling_splits) and ('north' not in google_spelling_splits)) or (('north' in google_spelling_splits) and ('north' not in icold_spelling_splits)) or \ (('south' in icold_spelling_splits) and ('south' not in google_spelling_splits)) or (('south' in google_spelling_splits) and ('south' not in icold_spelling_splits)) or \ (('upper' in icold_spelling_splits) and ('upper' not in google_spelling_splits)) or (('upper' in google_spelling_splits) and ('upper' not in icold_spelling_splits)) or \ (('lower' in icold_spelling_splits) and ('lower' not in google_spelling_splits)) or (('lower' in google_spelling_splits) and ('lower' not in icold_spelling_splits)) or \ (('a' in icold_spelling_splits) and ('a' not in google_spelling_splits)) or (('a' in google_spelling_splits) and ('a' not in icold_spelling_splits)) or \ (('b' in icold_spelling_splits) and ('b' not in google_spelling_splits)) or (('b' in google_spelling_splits) and ('b' not in icold_spelling_splits)) or \ (('c' in icold_spelling_splits) and ('c' not in google_spelling_splits)) or (('c' in google_spelling_splits) and ('c' not in icold_spelling_splits)) or \ (('d' in icold_spelling_splits) and ('d' not in google_spelling_splits)) or (('d' in google_spelling_splits) and ('d' not in icold_spelling_splits)) or \ (('auxiliar' in icold_spelling_splits) and ('auxiliar' not in google_spelling_splits)) or (('auxiliar' in google_spelling_splits) and ('auxiliar' not in icold_spelling_splits)) or \ (('auxiliary' in icold_spelling_splits) and ('auxiliary' not in google_spelling_splits)) or (('auxiliary' in google_spelling_splits) and ('auxiliary' not in icold_spelling_splits)): continue_or_not = 0 # Continue the comparison if none of the situations above happens. if continue_or_not == 0: damname_similarity_pass = 0 elif (dam_name_input_simple != '' and geocoded_name_input_simple != ''): similarity_value = similar(dam_name_input_simple, geocoded_name_input_simple) if similarity_value >= similarity_t: damname_similarity_pass = 1 if damname_similarity_pass != 1: #not passed # Check containment relations if (dam_name_input_simple in geocoded_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD contained by Google if geocoded_name_input_simple.find(dam_name_input_simple) == 0: #'manhattan city': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)) == len(geocoded_name_input_simple): #'city of manhattan': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple in dam_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD containing Google if dam_name_input_simple.find(geocoded_name_input_simple) == 0: #'manhattan city': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == '-': damname_similarity_pass = 1 elif (dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)) == len(dam_name_input_simple): #'city of manhattan': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == '-': damname_similarity_pass = 1 if damname_similarity_pass != 1: for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: # Further eliminate possibly ancillary information from the name. if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'main' and icold_split != 'main' and \ google_split != 'tank' and icold_split != 'tank' and \ google_split != 'dyke' and icold_split != 'dyke' and google_split != 'canal' and icold_split != 'canal' and \ google_split != 'canyon' and icold_split != 'canyon' and google_split != 'diversion' and icold_split != 'diversion' and \ google_split != 'city' and icold_split != 'city' and google_split != 'town' and icold_split != 'town' and \ google_split != 'fall' and icold_split != 'fall' and google_split != 'falls' and icold_split != 'falls' and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'storage' and icold_split != 'storage' and google_split != 'river' and icold_split != 'river' and \ google_split != 'saint' and icold_split != 'saint' and google_split != 'kloof' and icold_split != 'kloof' and \ google_split != 'berg' and icold_split != 'berg' and google_split != 'santa' and icold_split != 'santa' and \ google_split != 'valley' and icold_split != 'valley' and google_split != 'upper' and icold_split != 'upper' and \ google_split != 'lower' and icold_split != 'lower' and google_split != 'creek' and icold_split != 'creek' and \ google_split != 'lake' and icold_split != 'lake' and google_split != 'reservoir' and icold_split != 'reservoir' and \ google_split != 'lock' and icold_split != 'lock' and google_split != 'barrage' and icold_split != 'barrage' and \ google_split != 'lago' and icold_split != 'lago' and google_split != 'shuiku' and icold_split != 'shuiku' and \ google_split != 'presa' and icold_split != 'presa' and google_split != 'embalse' and icold_split != 'embalse' and \ google_split != 'barragem' and icold_split != 'barragem' and google_split != 'agua' and icold_split != 'agua' and \ google_split != 'stuwal' and icold_split != 'stuwal' and google_split != 'weir' and icold_split != 'weir' and \ google_split != 'dike' and icold_split != 'dike' and google_split != 'levee' and icold_split != 'levee' and \ google_split != 'mountain' and icold_split != 'mountain' and google_split != 'hill' and icold_split != 'hill' and \ google_split != 'auxiliar' and icold_split != 'auxiliar' and google_split != 'auxiliary' and icold_split != 'auxiliary' and \ google_split != 'riacho' and icold_split != 'riacho' and google_split != 'ribeirao' and icold_split != 'ribeirao' and \ google_split != 'ribeiro' and icold_split != 'ribeiro' and google_split != 'ribeira' and icold_split != 'ribeira' and \ google_split != 'riviere' and icold_split != 'riviere': if similar(icold_split, google_split) >= similarity_t: damname_similarity_pass_alt = 1 break if damname_similarity_pass_alt==1: break # If the similary test has not been passed, continue to check the reservoir dam if any. if damname_similarity_pass != 1: if reservoir_name_input == '-999' or geocoded_name_input == '-999' or reservoir_name_input == '' or geocoded_name_input == '' or \ reservoir_name_input == None or geocoded_name_input == None or reservoir_name_input == '/' or geocoded_name_input == '/' or \ reservoir_name_input == '-' or geocoded_name_input == '-' or reservoir_name_input == '..' or geocoded_name_input == '..' or \ reservoir_name_input == '_' or geocoded_name_input == '_': damname_similarity_pass = 0 elif (len(reservoir_name_input)>=7 and (reservoir_name_input[0:7]=='unknown' or reservoir_name_input[0:7]=='unnamed' or reservoir_name_input[0:7]=='un-name')) or \ (len(geocoded_name_input)>=7 and (geocoded_name_input[0:7]=='unknown' or geocoded_name_input[0:7]=='unnamed' or geocoded_name_input[0:7]=='un-name')): damname_similarity_pass = 0 elif geocoded_name_input == 'not found': damname_similarity_pass = -1 else: dam_name_input_simple = remove_accents(reservoir_name_input) dam_name_input_simple = ' ' + dam_name_input_simple + ' ' # Remove ancillary titles. for this_to_be_removed in to_be_removed: if this_to_be_removed in dam_name_input_simple: dam_name_input_simple = dam_name_input_simple.replace(this_to_be_removed, ' ') dam_name_input_simple = dam_name_input_simple.strip() if this_country_ISO_input == 'cn': if len(dam_name_input_simple) > 8 and dam_name_input_simple[-6:] == 'shuiku': dam_name_input_simple = (dam_name_input_simple[0:(len(dam_name_input_simple)-6)]).lower().strip() # Extract Arabic numbers from both names. continue_or_not = 1 numbers_left = re.findall(r'\d+', dam_name_input_simple) numbers_right = re.findall(r'\d+', geocoded_name_input_simple) # Split the name by delimiters. icold_spelling_splits = [] for this_split_space in dam_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): ### for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': icold_spelling_splits.append(this_split_paren2) google_spelling_splits = [] for this_split_space in geocoded_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': google_spelling_splits.append(this_split_paren2) # To reduce ambiguity, check if each of the Arabic numbers in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different numbers. # For example, "Tuttle Creek #1" is not the same dam as "Tuttle Creek #2". if len(numbers_left)>0 and len(numbers_right)>0: for this_number_left in numbers_left: if this_number_left not in numbers_right: continue_or_not = 0 break for this_numbers_right in numbers_right: if this_numbers_right not in numbers_left: continue_or_not = 0 break elif len(numbers_left)==0 and len(numbers_right)==0: # Also check other number formats. if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and (('i' not in google_spelling_splits) and ('one' not in google_spelling_splits))) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and (('ii' not in google_spelling_splits) and ('two' not in google_spelling_splits))) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and (('iii' not in google_spelling_splits) and ('three' not in google_spelling_splits))) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and (('iv' not in google_spelling_splits) and ('four' not in google_spelling_splits))) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and (('v' not in google_spelling_splits) and ('five' not in google_spelling_splits))) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and (('vi' not in google_spelling_splits) and ('six' not in google_spelling_splits))) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and (('vii' not in google_spelling_splits) and ('seven' not in google_spelling_splits))) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and (('viii' not in google_spelling_splits) and ('eight' not in google_spelling_splits))) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and (('ix' not in google_spelling_splits) and ('nine' not in google_spelling_splits))) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and (('x' not in google_spelling_splits) and ('ten' not in google_spelling_splits))) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and (('xi' not in google_spelling_splits) and ('eleven' not in google_spelling_splits))) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and (('xii' not in google_spelling_splits) and ('twelve' not in google_spelling_splits))) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and (('xiii' not in google_spelling_splits) and ('thirteen' not in google_spelling_splits))) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and (('xiv' not in google_spelling_splits) and ('fourteen' not in google_spelling_splits))) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and (('xv' not in google_spelling_splits) and ('fifteen' not in google_spelling_splits))) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and (('xvi' not in google_spelling_splits) and ('sixteen' not in google_spelling_splits))) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and (('xvii' not in google_spelling_splits) and ('seventeen' not in google_spelling_splits))) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and (('xviii' not in google_spelling_splits) and ('eighteen' not in google_spelling_splits))) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and (('xix' not in google_spelling_splits) and ('nineteen' not in google_spelling_splits))) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and (('xx' not in google_spelling_splits) and ('twenty' not in google_spelling_splits))) or \ ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and (('i' not in icold_spelling_splits) and ('one' not in icold_spelling_splits))) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and (('ii' not in icold_spelling_splits) and ('two' not in icold_spelling_splits))) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and (('iii' not in icold_spelling_splits) and ('three' not in icold_spelling_splits))) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and (('iv' not in icold_spelling_splits) and ('four' not in icold_spelling_splits))) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and (('v' not in icold_spelling_splits) and ('five' not in icold_spelling_splits))) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and (('vi' not in icold_spelling_splits) and ('six' not in icold_spelling_splits))) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and (('vii' not in icold_spelling_splits) and ('seven' not in icold_spelling_splits))) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and (('viii' not in icold_spelling_splits) and ('eight' not in icold_spelling_splits))) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and (('ix' not in icold_spelling_splits) and ('nine' not in icold_spelling_splits))) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and (('x' not in icold_spelling_splits) and ('ten' not in icold_spelling_splits))) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and (('xi' not in icold_spelling_splits) and ('eleven' not in icold_spelling_splits))) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and (('xii' not in icold_spelling_splits) and ('twelve' not in icold_spelling_splits))) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and (('xiii' not in icold_spelling_splits) and ('thirteen' not in icold_spelling_splits))) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and (('xiv' not in icold_spelling_splits) and ('fourteen' not in icold_spelling_splits))) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and (('xv' not in icold_spelling_splits) and ('fifteen' not in icold_spelling_splits))) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and (('xvi' not in icold_spelling_splits) and ('sixteen' not in icold_spelling_splits))) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and (('xvii' not in icold_spelling_splits) and ('seventeen' not in icold_spelling_splits))) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and (('xviii' not in icold_spelling_splits) and ('eighteen' not in icold_spelling_splits))) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and (('xix' not in icold_spelling_splits) and ('nineteen' not in icold_spelling_splits))) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and (('xx' not in icold_spelling_splits) and ('twenty' not in icold_spelling_splits))): continue_or_not = 0 elif len(numbers_left)==0 and len(numbers_right)==1: if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and ('1' in google_spelling_splits)) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and ('2' in google_spelling_splits)) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and ('3' in google_spelling_splits)) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and ('4' in google_spelling_splits)) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and ('5' in google_spelling_splits)) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and ('6' in google_spelling_splits)) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and ('7' in google_spelling_splits)) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and ('8' in google_spelling_splits)) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and ('9' in google_spelling_splits)) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and ('10' in google_spelling_splits)) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and ('11' in google_spelling_splits)) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and ('12' in google_spelling_splits)) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and ('13' in google_spelling_splits)) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and ('14' in google_spelling_splits)) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and ('15' in google_spelling_splits)) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and ('16' in google_spelling_splits)) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and ('17' in google_spelling_splits)) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and ('18' in google_spelling_splits)) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and ('19' in google_spelling_splits)) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and ('20' in google_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 elif len(numbers_left)==1 and len(numbers_right)==0: if ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and ('1' in icold_spelling_splits)) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and ('2' in icold_spelling_splits)) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and ('3' in icold_spelling_splits)) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and ('4' in icold_spelling_splits)) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and ('5' in icold_spelling_splits)) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and ('6' in icold_spelling_splits)) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and ('7' in icold_spelling_splits)) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and ('8' in icold_spelling_splits)) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and ('9' in icold_spelling_splits)) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and ('10' in icold_spelling_splits)) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and ('11' in icold_spelling_splits)) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and ('12' in icold_spelling_splits)) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and ('13' in icold_spelling_splits)) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and ('14' in icold_spelling_splits)) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and ('15' in icold_spelling_splits)) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and ('16' in icold_spelling_splits)) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and ('17' in icold_spelling_splits)) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and ('18' in icold_spelling_splits)) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and ('19' in icold_spelling_splits)) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and ('20' in icold_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 else: continue_or_not = 0 # To further reduce ambiguity, check if any of the following elements in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different direction adjectives or letters. # For example, "Tuttle Creek East" is not the same dam as "Tuttle Creek West". if (('east' in icold_spelling_splits) and ('east' not in google_spelling_splits)) or (('east' in google_spelling_splits) and ('east' not in icold_spelling_splits)) or \ (('west' in icold_spelling_splits) and ('west' not in google_spelling_splits)) or (('west' in google_spelling_splits) and ('west' not in icold_spelling_splits)) or \ (('north' in icold_spelling_splits) and ('north' not in google_spelling_splits)) or (('north' in google_spelling_splits) and ('north' not in icold_spelling_splits)) or \ (('south' in icold_spelling_splits) and ('south' not in google_spelling_splits)) or (('south' in google_spelling_splits) and ('south' not in icold_spelling_splits)) or \ (('upper' in icold_spelling_splits) and ('upper' not in google_spelling_splits)) or (('upper' in google_spelling_splits) and ('upper' not in icold_spelling_splits)) or \ (('lower' in icold_spelling_splits) and ('lower' not in google_spelling_splits)) or (('lower' in google_spelling_splits) and ('lower' not in icold_spelling_splits)) or \ (('a' in icold_spelling_splits) and ('a' not in google_spelling_splits)) or (('a' in google_spelling_splits) and ('a' not in icold_spelling_splits)) or \ (('b' in icold_spelling_splits) and ('b' not in google_spelling_splits)) or (('b' in google_spelling_splits) and ('b' not in icold_spelling_splits)) or \ (('c' in icold_spelling_splits) and ('c' not in google_spelling_splits)) or (('c' in google_spelling_splits) and ('c' not in icold_spelling_splits)) or \ (('d' in icold_spelling_splits) and ('d' not in google_spelling_splits)) or (('d' in google_spelling_splits) and ('d' not in icold_spelling_splits)) or \ (('auxiliar' in icold_spelling_splits) and ('auxiliar' not in google_spelling_splits)) or (('auxiliar' in google_spelling_splits) and ('auxiliar' not in icold_spelling_splits)) or \ (('auxiliary' in icold_spelling_splits) and ('auxiliary' not in google_spelling_splits)) or (('auxiliary' in google_spelling_splits) and ('auxiliary' not in icold_spelling_splits)): continue_or_not = 0 # Continue the comparison if none of the situations above happens. if continue_or_not == 0: damname_similarity_pass = 0 elif (dam_name_input_simple != '' and geocoded_name_input_simple != ''): similarity_value = similar(dam_name_input_simple, geocoded_name_input_simple) if similarity_value >= similarity_t: damname_similarity_pass = 1 if damname_similarity_pass != 1: # Check containment relations if (dam_name_input_simple in geocoded_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD contained by Google if geocoded_name_input_simple.find(dam_name_input_simple) == 0: #'manhattan city': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)) == len(geocoded_name_input_simple): #'city of manhattan': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple in dam_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD containing Google if dam_name_input_simple.find(geocoded_name_input_simple) == 0: #'manhattan city': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == '-': damname_similarity_pass = 1 elif (dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)) == len(dam_name_input_simple): #'city of manhattan': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == '-': damname_similarity_pass = 1 if damname_similarity_pass != 1: for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: # Further eliminate possibly ancillary information from the name. if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'main' and icold_split != 'main' and \ google_split != 'tank' and icold_split != 'tank' and \ google_split != 'dyke' and icold_split != 'dyke' and google_split != 'canal' and icold_split != 'canal' and \ google_split != 'canyon' and icold_split != 'canyon' and google_split != 'diversion' and icold_split != 'diversion' and \ google_split != 'city' and icold_split != 'city' and google_split != 'town' and icold_split != 'town' and \ google_split != 'fall' and icold_split != 'fall' and google_split != 'falls' and icold_split != 'falls' and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'storage' and icold_split != 'storage' and google_split != 'river' and icold_split != 'river' and \ google_split != 'saint' and icold_split != 'saint' and google_split != 'kloof' and icold_split != 'kloof' and \ google_split != 'berg' and icold_split != 'berg' and google_split != 'santa' and icold_split != 'santa' and \ google_split != 'valley' and icold_split != 'valley' and google_split != 'upper' and icold_split != 'upper' and \ google_split != 'lower' and icold_split != 'lower' and google_split != 'creek' and icold_split != 'creek' and \ google_split != 'lake' and icold_split != 'lake' and google_split != 'reservoir' and icold_split != 'reservoir' and \ google_split != 'lock' and icold_split != 'lock' and google_split != 'barrage' and icold_split != 'barrage' and \ google_split != 'lago' and icold_split != 'lago' and google_split != 'shuiku' and icold_split != 'shuiku' and \ google_split != 'presa' and icold_split != 'presa' and google_split != 'embalse' and icold_split != 'embalse' and \ google_split != 'barragem' and icold_split != 'barragem' and google_split != 'agua' and icold_split != 'agua' and \ google_split != 'stuwal' and icold_split != 'stuwal' and google_split != 'weir' and icold_split != 'weir' and \ google_split != 'dike' and icold_split != 'dike' and google_split != 'levee' and icold_split != 'levee' and \ google_split != 'mountain' and icold_split != 'mountain' and google_split != 'hill' and icold_split != 'hill' and \ google_split != 'auxiliar' and icold_split != 'auxiliar' and google_split != 'auxiliary' and icold_split != 'auxiliary' and \ google_split != 'riacho' and icold_split != 'riacho' and google_split != 'ribeirao' and icold_split != 'ribeirao' and \ google_split != 'ribeiro' and icold_split != 'ribeiro' and google_split != 'ribeira' and icold_split != 'ribeira' and \ google_split != 'riviere' and icold_split != 'riviere': if similar(icold_split, google_split) >= similarity_t: damname_similarity_pass_alt = 1 break if damname_similarity_pass_alt ==1: break if damname_similarity_pass == 1: damname_similarity_final_pass = 1 elif damname_similarity_pass_alt == 1: damname_similarity_final_pass = 0.5 return damname_similarity_final_pass def river_similar(similarity_t, ICOLD_river, registry_river): # Discard some of the ancillary titles in a river name. These titles are not considered as an essential part of the river names. to_be_removed = [' river ', ' creek ', ' stream ', ' rio ', ' brook ', ' run ', ' bay ', ' branch ', ' slough ', ' lake ', ' pond ', ' canyon ', ' canal ', ' dike ', ' dyke ', \ ' gulch ', ' tributary ', ' drain ', ' draw ', ' channel ', ' arroyo ', ' ditch ', ' offstream ', ' riv. ', ' bayou ', ' coulee ', ' fork ', \ ' riacho ', ' ribeirao ', ' ribeiro ', ' ribeira ', ' riviere ', \ ' river ', ' creek ', ' stream ', ' rio ', ' brook ', ' run ', ' bay ', ' branch ', ' slough ', ' lake ', ' pond ', ' canyon ', ' canal ', ' dike ', ' dyke ', \ ' gulch ', ' tributary ', ' drain ', ' draw ', ' channel ', ' arroyo ', ' ditch ', ' offstream ', ' riv. ', ' bayou ', ' coulee ', ' fork ', \ ' riacho ', ' ribeirao ', ' ribeiro ', ' ribeira ', ' riviere ', \ ' river ', ' creek ', ' stream ', ' rio ', ' brook ', ' run ', ' bay ', ' branch ', ' slough ', ' lake ', ' pond ', ' canyon ', ' canal ', ' dike ', ' dyke ', \ ' gulch ', ' tributary ', ' drain ', ' draw ', ' channel ', ' arroyo ', ' ditch ', ' offstream ', ' riv. ', ' bayou ', ' coulee ', ' fork ', \ ' riacho ', ' ribeirao ', ' ribeiro ', ' ribeira ', ' riviere '] # Repeat them for a thorough removal. river_similarity_final_pass = 0 river_similarity_pass = 0 river_similarity_pass_alt = 0 if ICOLD_river == '-999' or registry_river == '-999' or ICOLD_river == '' or registry_river == '' or \ ICOLD_river == None or registry_river == None or ICOLD_river == '/' or registry_river == '/' or \ ICOLD_river == '-' or registry_river == '-' or ICOLD_river == '..' or registry_river == '..' or \ ICOLD_river == '_' or registry_river == '_' or registry_river == 'sem denominação': river_similarity_pass = 0 elif (len(ICOLD_river)>=7 and (ICOLD_river[0:7]=='unknown' or ICOLD_river[0:7]=='unnamed' or ICOLD_river[0:7]=='un-name')) or \ (len(registry_river)>=7 and (registry_river[0:7]=='unknown' or registry_river[0:7]=='unnamed' or registry_river[0:7]=='un-name')): river_similarity_pass = 0 else: ICOLD_river_simple = remove_accents(ICOLD_river) registry_river_simple = remove_accents(registry_river) # Remove ancillary titles. ICOLD_river_simple = ' ' + ICOLD_river_simple + ' ' registry_river_simple = ' ' + registry_river_simple + ' ' for this_to_be_removed in to_be_removed: if this_to_be_removed in ICOLD_river_simple: ICOLD_river_simple = ICOLD_river_simple.replace(this_to_be_removed, ' ') if this_to_be_removed in registry_river_simple: registry_river_simple = registry_river_simple.replace(this_to_be_removed, ' ') ICOLD_river_simple = ICOLD_river_simple.strip() registry_river_simple = registry_river_simple.strip() # Extract Arabic numbers from both names. continue_or_not = 1 numbers_left = re.findall(r'\d+', ICOLD_river_simple) numbers_right = re.findall(r'\d+', registry_river_simple) # Split the name by delimiters. icold_spelling_splits = [] for this_split_space in ICOLD_river_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': icold_spelling_splits.append(this_split_paren2) google_spelling_splits = [] for this_split_space in registry_river_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): for this_split_paren1 in this_split_slash.split('('): for this_split_paren2 in this_split_paren1.split(')'): if this_split_paren2 != '': google_spelling_splits.append(this_split_paren2) # To reduce ambiguity, check if each of the Arabic numbers in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different numbers. # For example, "Tuttle Creek #1" is not the same dam as "Tuttle Creek #2". if len(numbers_left)>0 and len(numbers_right)>0: for this_number_left in numbers_left: if this_number_left not in numbers_right: continue_or_not = 0 break for this_numbers_right in numbers_right: if this_numbers_right not in numbers_left: continue_or_not = 0 break elif len(numbers_left)==0 and len(numbers_right)==0: # Also check other number formats. if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and (('i' not in google_spelling_splits) and ('one' not in google_spelling_splits))) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and (('ii' not in google_spelling_splits) and ('two' not in google_spelling_splits))) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and (('iii' not in google_spelling_splits) and ('three' not in google_spelling_splits))) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and (('iv' not in google_spelling_splits) and ('four' not in google_spelling_splits))) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and (('v' not in google_spelling_splits) and ('five' not in google_spelling_splits))) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and (('vi' not in google_spelling_splits) and ('six' not in google_spelling_splits))) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and (('vii' not in google_spelling_splits) and ('seven' not in google_spelling_splits))) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and (('viii' not in google_spelling_splits) and ('eight' not in google_spelling_splits))) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and (('ix' not in google_spelling_splits) and ('nine' not in google_spelling_splits))) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and (('x' not in google_spelling_splits) and ('ten' not in google_spelling_splits))) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and (('xi' not in google_spelling_splits) and ('eleven' not in google_spelling_splits))) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and (('xii' not in google_spelling_splits) and ('twelve' not in google_spelling_splits))) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and (('xiii' not in google_spelling_splits) and ('thirteen' not in google_spelling_splits))) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and (('xiv' not in google_spelling_splits) and ('fourteen' not in google_spelling_splits))) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and (('xv' not in google_spelling_splits) and ('fifteen' not in google_spelling_splits))) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and (('xvi' not in google_spelling_splits) and ('sixteen' not in google_spelling_splits))) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and (('xvii' not in google_spelling_splits) and ('seventeen' not in google_spelling_splits))) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and (('xviii' not in google_spelling_splits) and ('eighteen' not in google_spelling_splits))) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and (('xix' not in google_spelling_splits) and ('nineteen' not in google_spelling_splits))) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and (('xx' not in google_spelling_splits) and ('twenty' not in google_spelling_splits))) or \ ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and (('i' not in icold_spelling_splits) and ('one' not in icold_spelling_splits))) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and (('ii' not in icold_spelling_splits) and ('two' not in icold_spelling_splits))) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and (('iii' not in icold_spelling_splits) and ('three' not in icold_spelling_splits))) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and (('iv' not in icold_spelling_splits) and ('four' not in icold_spelling_splits))) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and (('v' not in icold_spelling_splits) and ('five' not in icold_spelling_splits))) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and (('vi' not in icold_spelling_splits) and ('six' not in icold_spelling_splits))) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and (('vii' not in icold_spelling_splits) and ('seven' not in icold_spelling_splits))) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and (('viii' not in icold_spelling_splits) and ('eight' not in icold_spelling_splits))) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and (('ix' not in icold_spelling_splits) and ('nine' not in icold_spelling_splits))) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and (('x' not in icold_spelling_splits) and ('ten' not in icold_spelling_splits))) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and (('xi' not in icold_spelling_splits) and ('eleven' not in icold_spelling_splits))) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and (('xii' not in icold_spelling_splits) and ('twelve' not in icold_spelling_splits))) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and (('xiii' not in icold_spelling_splits) and ('thirteen' not in icold_spelling_splits))) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and (('xiv' not in icold_spelling_splits) and ('fourteen' not in icold_spelling_splits))) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and (('xv' not in icold_spelling_splits) and ('fifteen' not in icold_spelling_splits))) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and (('xvi' not in icold_spelling_splits) and ('sixteen' not in icold_spelling_splits))) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and (('xvii' not in icold_spelling_splits) and ('seventeen' not in icold_spelling_splits))) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and (('xviii' not in icold_spelling_splits) and ('eighteen' not in icold_spelling_splits))) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and (('xix' not in icold_spelling_splits) and ('nineteen' not in icold_spelling_splits))) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and (('xx' not in icold_spelling_splits) and ('twenty' not in icold_spelling_splits))): continue_or_not = 0 elif len(numbers_left)==0 and len(numbers_right)==1: if ((('i' in icold_spelling_splits) or ('one' in icold_spelling_splits)) and ('1' in google_spelling_splits)) or \ ((('ii' in icold_spelling_splits) or ('two' in icold_spelling_splits)) and ('2' in google_spelling_splits)) or \ ((('iii' in icold_spelling_splits) or ('three' in icold_spelling_splits)) and ('3' in google_spelling_splits)) or \ ((('iv' in icold_spelling_splits) or ('four' in icold_spelling_splits)) and ('4' in google_spelling_splits)) or \ ((('v' in icold_spelling_splits) or ('five' in icold_spelling_splits)) and ('5' in google_spelling_splits)) or \ ((('vi' in icold_spelling_splits) or ('six' in icold_spelling_splits)) and ('6' in google_spelling_splits)) or \ ((('vii' in icold_spelling_splits) or ('seven' in icold_spelling_splits)) and ('7' in google_spelling_splits)) or \ ((('viii' in icold_spelling_splits) or ('eight' in icold_spelling_splits)) and ('8' in google_spelling_splits)) or \ ((('ix' in icold_spelling_splits) or ('nine' in icold_spelling_splits)) and ('9' in google_spelling_splits)) or \ ((('x' in icold_spelling_splits) or ('ten' in icold_spelling_splits)) and ('10' in google_spelling_splits)) or \ ((('xi' in icold_spelling_splits) or ('eleven' in icold_spelling_splits)) and ('11' in google_spelling_splits)) or \ ((('xii' in icold_spelling_splits) or ('twelve' in icold_spelling_splits)) and ('12' in google_spelling_splits)) or \ ((('xiii' in icold_spelling_splits) or ('thirteen' in icold_spelling_splits)) and ('13' in google_spelling_splits)) or \ ((('xiv' in icold_spelling_splits) or ('fourteen' in icold_spelling_splits)) and ('14' in google_spelling_splits)) or \ ((('xv' in icold_spelling_splits) or ('fifteen' in icold_spelling_splits)) and ('15' in google_spelling_splits)) or \ ((('xvi' in icold_spelling_splits) or ('sixteen' in icold_spelling_splits)) and ('16' in google_spelling_splits)) or \ ((('xvii' in icold_spelling_splits) or ('seventeen' in icold_spelling_splits)) and ('17' in google_spelling_splits)) or \ ((('xviii' in icold_spelling_splits) or ('eighteen' in icold_spelling_splits)) and ('18' in google_spelling_splits)) or \ ((('xix' in icold_spelling_splits) or ('nineteen' in icold_spelling_splits)) and ('19' in google_spelling_splits)) or \ ((('xx' in icold_spelling_splits) or ('twenty' in icold_spelling_splits)) and ('20' in google_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 elif len(numbers_left)==1 and len(numbers_right)==0: if ((('i' in google_spelling_splits) or ('one' in google_spelling_splits)) and ('1' in icold_spelling_splits)) or \ ((('ii' in google_spelling_splits) or ('two' in google_spelling_splits)) and ('2' in icold_spelling_splits)) or \ ((('iii' in google_spelling_splits) or ('three' in google_spelling_splits)) and ('3' in icold_spelling_splits)) or \ ((('iv' in google_spelling_splits) or ('four' in google_spelling_splits)) and ('4' in icold_spelling_splits)) or \ ((('v' in google_spelling_splits) or ('five' in google_spelling_splits)) and ('5' in icold_spelling_splits)) or \ ((('vi' in google_spelling_splits) or ('six' in google_spelling_splits)) and ('6' in icold_spelling_splits)) or \ ((('vii' in google_spelling_splits) or ('seven' in google_spelling_splits)) and ('7' in icold_spelling_splits)) or \ ((('viii' in google_spelling_splits) or ('eight' in google_spelling_splits)) and ('8' in icold_spelling_splits)) or \ ((('ix' in google_spelling_splits) or ('nine' in google_spelling_splits)) and ('9' in icold_spelling_splits)) or \ ((('x' in google_spelling_splits) or ('ten' in google_spelling_splits)) and ('10' in icold_spelling_splits)) or \ ((('xi' in google_spelling_splits) or ('eleven' in google_spelling_splits)) and ('11' in icold_spelling_splits)) or \ ((('xii' in google_spelling_splits) or ('twelve' in google_spelling_splits)) and ('12' in icold_spelling_splits)) or \ ((('xiii' in google_spelling_splits) or ('thirteen' in google_spelling_splits)) and ('13' in icold_spelling_splits)) or \ ((('xiv' in google_spelling_splits) or ('fourteen' in google_spelling_splits)) and ('14' in icold_spelling_splits)) or \ ((('xv' in google_spelling_splits) or ('fifteen' in google_spelling_splits)) and ('15' in icold_spelling_splits)) or \ ((('xvi' in google_spelling_splits) or ('sixteen' in google_spelling_splits)) and ('16' in icold_spelling_splits)) or \ ((('xvii' in google_spelling_splits) or ('seventeen' in google_spelling_splits)) and ('17' in icold_spelling_splits)) or \ ((('xviii' in google_spelling_splits) or ('eighteen' in google_spelling_splits)) and ('18' in icold_spelling_splits)) or \ ((('xix' in google_spelling_splits) or ('nineteen' in google_spelling_splits)) and ('19' in icold_spelling_splits)) or \ ((('xx' in google_spelling_splits) or ('twenty' in google_spelling_splits)) and ('20' in icold_spelling_splits)): continue_or_not = 1 else: continue_or_not = 0 else: continue_or_not = 0 # To further reduce ambiguity, check if any of the following elements in the first name is also included in the other name. # The assumption is that two equivalent names cannot contain different direction adjectives or letters. # For example, "Tuttle Creek East" is not the same dam as "Tuttle Creek West". if (('east' in icold_spelling_splits) and ('east' not in google_spelling_splits)) or (('east' in google_spelling_splits) and ('east' not in icold_spelling_splits)) or \ (('west' in icold_spelling_splits) and ('west' not in google_spelling_splits)) or (('west' in google_spelling_splits) and ('west' not in icold_spelling_splits)) or \ (('north' in icold_spelling_splits) and ('north' not in google_spelling_splits)) or (('north' in google_spelling_splits) and ('north' not in icold_spelling_splits)) or \ (('south' in icold_spelling_splits) and ('south' not in google_spelling_splits)) or (('south' in google_spelling_splits) and ('south' not in icold_spelling_splits)) or \ (('upper' in icold_spelling_splits) and ('upper' not in google_spelling_splits)) or (('upper' in google_spelling_splits) and ('upper' not in icold_spelling_splits)) or \ (('lower' in icold_spelling_splits) and ('lower' not in google_spelling_splits)) or (('lower' in google_spelling_splits) and ('lower' not in icold_spelling_splits)) or \ (('a' in icold_spelling_splits) and ('a' not in google_spelling_splits)) or (('a' in google_spelling_splits) and ('a' not in icold_spelling_splits)) or \ (('b' in icold_spelling_splits) and ('b' not in google_spelling_splits)) or (('b' in google_spelling_splits) and ('b' not in icold_spelling_splits)) or \ (('c' in icold_spelling_splits) and ('c' not in google_spelling_splits)) or (('c' in google_spelling_splits) and ('c' not in icold_spelling_splits)) or \ (('d' in icold_spelling_splits) and ('d' not in google_spelling_splits)) or (('d' in google_spelling_splits) and ('d' not in icold_spelling_splits)) or \ (('auxiliar' in icold_spelling_splits) and ('auxiliar' not in google_spelling_splits)) or (('auxiliar' in google_spelling_splits) and ('auxiliar' not in icold_spelling_splits)) or \ (('auxiliary' in icold_spelling_splits) and ('auxiliary' not in google_spelling_splits)) or (('auxiliary' in google_spelling_splits) and ('auxiliary' not in icold_spelling_splits)): continue_or_not = 0 # Continue the comparison if none of the situations above happens. similarity_value = similar(ICOLD_river_simple, registry_river_simple) if similarity_value >= similarity_t and continue_or_not==1: river_similarity_pass = 1 if river_similarity_pass != 1 and (ICOLD_river_simple != '' and registry_river_simple != '') and continue_or_not==1: # Check containment relations if (ICOLD_river_simple in registry_river_simple) == True and (ICOLD_river_simple != registry_river_simple) == True: #ICOLD contained by Google if registry_river_simple.find(ICOLD_river_simple) == 0: #'manhattan city': 'manhattan' if registry_river_simple[registry_river_simple.find(ICOLD_river_simple)+len(ICOLD_river_simple)] == ' ' or \ registry_river_simple[registry_river_simple.find(ICOLD_river_simple)+len(ICOLD_river_simple)] == '-': river_similarity_pass = 1 elif (registry_river_simple.find(ICOLD_river_simple)+len(ICOLD_river_simple)) == len(registry_river_simple): #'city of manhattan': 'manhattan' if registry_river_simple[registry_river_simple.find(ICOLD_river_simple)-1] == ' ' or \ registry_river_simple[registry_river_simple.find(ICOLD_river_simple)-1] == '-': river_similarity_pass = 1 elif (registry_river_simple in ICOLD_river_simple) == True and (ICOLD_river_simple != registry_river_simple) == True: #ICOLD containing Google if ICOLD_river_simple.find(registry_river_simple) == 0: #'manhattan city': 'manhattan' if ICOLD_river_simple[ICOLD_river_simple.find(registry_river_simple)+len(registry_river_simple)] == ' ' or \ ICOLD_river_simple[ICOLD_river_simple.find(registry_river_simple)+len(registry_river_simple)] == '-': river_similarity_pass = 1 elif (ICOLD_river_simple.find(registry_river_simple)+len(registry_river_simple)) == len(ICOLD_river_simple): #'city of manhattan': 'manhattan' if ICOLD_river_simple[ICOLD_river_simple.find(registry_river_simple)-1] == ' ' or \ ICOLD_river_simple[ICOLD_river_simple.find(registry_river_simple)-1] == '-': river_similarity_pass = 1 if river_similarity_pass != 1 and (ICOLD_river_simple != '' and registry_river_simple != '') and continue_or_not==1: for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: # Further eliminate possibly ancillary information from the name. if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'main' and icold_split != 'main' and \ google_split != 'tank' and icold_split != 'tank' and \ google_split != 'diversion' and icold_split != 'diversion' and \ google_split != 'dike' and icold_split != 'dike' and \ google_split != 'dyke' and icold_split != 'dyke' and google_split != 'canal' and icold_split != 'canal' and \ google_split != 'city' and icold_split != 'city' and google_split != 'town' and icold_split != 'town' and \ google_split != 'fall' and icold_split != 'fall' and google_split != 'falls' and icold_split != 'falls' and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'saint' and icold_split != 'saint' and google_split != 'kloof' and icold_split != 'kloof' and \ google_split != 'berg' and icold_split != 'berg' and google_split != 'santa' and icold_split != 'santa' and \ google_split != 'valley' and icold_split != 'valley' and google_split != 'upper' and icold_split != 'upper' and \ google_split != 'lower' and icold_split != 'lower' and google_split != 'river' and icold_split != 'river' and \ google_split != 'creek' and icold_split != 'creek' and google_split != 'stream' and icold_split != 'stream' and \ google_split != 'brook' and icold_split != 'brook' and google_split != 'branch' and icold_split != 'branch' and \ google_split != 'slough' and icold_split != 'slough' and google_split != 'lake' and icold_split != 'lake' and \ google_split != 'pond' and icold_split != 'pond' and google_split != 'canyon' and icold_split != 'canyon' and \ google_split != 'gulch' and icold_split != 'gulch' and google_split != 'tributary' and icold_split != 'tributary' and \ google_split != 'drain' and icold_split != 'drain' and google_split != 'draw' and icold_split != 'draw' and \ google_split != 'channel' and icold_split != 'channel' and google_split != 'arroyo' and icold_split != 'arroyo' and \ google_split != 'ditch' and icold_split != 'ditch' and google_split != 'offstream' and icold_split != 'offstream' and \ google_split != 'bayou' and icold_split != 'bayou' and google_split != 'coulee' and icold_split != 'coulee' and \ google_split != 'fork' and icold_split != 'fork' and google_split != 'mountain' and icold_split != 'mountain' and \ google_split != 'hill' and icold_split != 'hill' and google_split != 'auxiliar' and icold_split != 'auxiliar' and \ google_split != 'auxiliary' and icold_split != 'auxiliary' and \ google_split != 'riacho' and icold_split != 'riacho' and google_split != 'ribeirao' and icold_split != 'ribeirao' and \ google_split != 'ribeiro' and icold_split != 'ribeiro' and google_split != 'ribeira' and icold_split != 'ribeira' and \ google_split != 'riviere' and icold_split != 'riviere': if similar(icold_split, google_split) >= similarity_t: river_similarity_pass_alt = 1 break if river_similarity_pass_alt==1: break if river_similarity_pass == 1: river_similarity_final_pass = 1 elif river_similarity_pass_alt == 1: river_similarity_final_pass = 0.5 return river_similarity_final_pass def similar_v2(a, b): return SequenceMatcher(None, a, b).ratio() # See comments in <damname_similar> def damname_similar_v2(similarity_t, dam_name_input, other_dam_name_input, reservoir_name_input, geocoded_name_input, this_country_ISO_input): to_be_removed = [' lake ', ' dam ', ' reservoir ', ' barrage ', ' lago ', ' shuiku ', ' lac ', ' presa ', ' embalse ', \ ' lake ', ' dam ', ' reservoir ', ' barrage ', ' lago ', ' shuiku ', ' lac ', ' presa ', ' embalse ', \ ' lake ', ' dam ', ' reservoir ', ' barrage ', ' lago ', ' shuiku ', ' lac ', ' presa ', ' embalse '] damname_similarity_pass = 0 if dam_name_input == '' or geocoded_name_input == '': damname_similarity_pass = 0 elif geocoded_name_input == 'not found': damname_similarity_pass = -1 else: dam_name_input_simple = remove_accents(dam_name_input) geocoded_name_input_simple = remove_accents(geocoded_name_input) dam_name_input_simple = ' ' + dam_name_input_simple + ' ' geocoded_name_input_simple = ' ' + geocoded_name_input_simple + ' ' for this_to_be_removed in to_be_removed: if this_to_be_removed in dam_name_input_simple: dam_name_input_simple = dam_name_input_simple.replace(this_to_be_removed, ' ') if this_to_be_removed in geocoded_name_input_simple: geocoded_name_input_simple = geocoded_name_input_simple.replace(this_to_be_removed, ' ') dam_name_input_simple = dam_name_input_simple.strip() geocoded_name_input_simple = geocoded_name_input_simple.strip() if this_country_ISO_input == 'cn': if len(dam_name_input_simple) > 8 and dam_name_input_simple[-6:] == 'shuiku': dam_name_input_simple = (dam_name_input_simple[0:(len(dam_name_input_simple)-6)]).lower().strip() if len(geocoded_name_input_simple) > 8 and geocoded_name_input_simple[-6:] == 'shuiku': geocoded_name_input_simple = (geocoded_name_input_simple[0:(len(geocoded_name_input_simple)-6)]).lower().strip() similarity_value = similar_v2(dam_name_input_simple, geocoded_name_input_simple) if similarity_value >= similarity_t: damname_similarity_pass = 1 if damname_similarity_pass != 1: if (dam_name_input_simple in geocoded_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD contained by Google if geocoded_name_input_simple.find(dam_name_input_simple) == 0: #'manhattan city': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)) == len(geocoded_name_input_simple): #'city of manhattan': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple in dam_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD containing Google if dam_name_input_simple.find(geocoded_name_input_simple) == 0: #'manhattan city': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == '-': damname_similarity_pass = 1 elif (dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)) == len(dam_name_input_simple): #'city of manhattan': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == '-': damname_similarity_pass = 1 if damname_similarity_pass != 1: icold_spelling_splits = [] for this_split_space in dam_name_input_simple.split(): # Ignore multiple space automatically for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): if this_split_slash != '': icold_spelling_splits.append(this_split_slash) google_spelling_splits = [] for this_split_space in geocoded_name_input_simple.split(): # Ignore multiple space automatically for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): if this_split_slash != '': google_spelling_splits.append(this_split_slash) for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'storage' and icold_split != 'storage': if similar_v2(icold_split, google_split) >= similarity_t: damname_similarity_pass = 1 break if damname_similarity_pass == 1: break if damname_similarity_pass != 1: if other_dam_name_input == '' or geocoded_name_input == '': damname_similarity_pass = 0 elif geocoded_name_input == 'not found': damname_similarity_pass = -1 else: dam_name_input_simple = remove_accents(other_dam_name_input) dam_name_input_simple = ' ' + dam_name_input_simple + ' ' for this_to_be_removed in to_be_removed: if this_to_be_removed in dam_name_input_simple: dam_name_input_simple = dam_name_input_simple.replace(this_to_be_removed, ' ') dam_name_input_simple = dam_name_input_simple.strip() if this_country_ISO_input == 'cn': if len(dam_name_input_simple) > 8 and dam_name_input_simple[-6:] == 'shuiku': dam_name_input_simple = (dam_name_input_simple[0:(len(dam_name_input_simple)-6)]).lower().strip() similarity_value = similar_v2(dam_name_input_simple, geocoded_name_input_simple) if similarity_value >= similarity_t: damname_similarity_pass = 1 if damname_similarity_pass != 1: if (dam_name_input_simple in geocoded_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD contained by Google if geocoded_name_input_simple.find(dam_name_input_simple) == 0: #'manhattan city': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)) == len(geocoded_name_input_simple): #'city of manhattan': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple in dam_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD containing Google if dam_name_input_simple.find(geocoded_name_input_simple) == 0: #'manhattan city': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == '-': damname_similarity_pass = 1 elif (dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)) == len(dam_name_input_simple): #'city of manhattan': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == '-': damname_similarity_pass = 1 if damname_similarity_pass != 1: icold_spelling_splits = [] for this_split_space in dam_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): if this_split_slash != '': icold_spelling_splits.append(this_split_slash) google_spelling_splits = [] for this_split_space in geocoded_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): if this_split_slash != '': google_spelling_splits.append(this_split_slash) for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'storage' and icold_split != 'storage': if similar_v2(icold_split, google_split) >= similarity_t: damname_similarity_pass = 1 break if damname_similarity_pass == 1: break if damname_similarity_pass != 1: if reservoir_name_input == '' or geocoded_name_input == '': damname_similarity_pass = 0 elif geocoded_name_input == 'not found': damname_similarity_pass = -1 else: dam_name_input_simple = remove_accents(reservoir_name_input) dam_name_input_simple = ' ' + dam_name_input_simple + ' ' for this_to_be_removed in to_be_removed: if this_to_be_removed in dam_name_input_simple: dam_name_input_simple = dam_name_input_simple.replace(this_to_be_removed, ' ') dam_name_input_simple = dam_name_input_simple.strip() if this_country_ISO_input == 'cn': if len(dam_name_input_simple) > 8 and dam_name_input_simple[-6:] == 'shuiku': dam_name_input_simple = (dam_name_input_simple[0:(len(dam_name_input_simple)-6)]).lower().strip() similarity_value = similar_v2(dam_name_input_simple, geocoded_name_input_simple) if similarity_value >= similarity_t: damname_similarity_pass = 1 if damname_similarity_pass != 1: # Check containment relations if (dam_name_input_simple in geocoded_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD contained by Google if geocoded_name_input_simple.find(dam_name_input_simple) == 0: #'manhattan city': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple.find(dam_name_input_simple)+len(dam_name_input_simple)) == len(geocoded_name_input_simple): #'city of manhattan': 'manhattan' if geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == ' ' or \ geocoded_name_input_simple[geocoded_name_input_simple.find(dam_name_input_simple)-1] == '-': damname_similarity_pass = 1 elif (geocoded_name_input_simple in dam_name_input_simple) == True and (dam_name_input_simple != geocoded_name_input_simple) == True: #ICOLD containing Google if dam_name_input_simple.find(geocoded_name_input_simple) == 0: #'manhattan city': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)] == '-': damname_similarity_pass = 1 elif (dam_name_input_simple.find(geocoded_name_input_simple)+len(geocoded_name_input_simple)) == len(dam_name_input_simple): #'city of manhattan': 'manhattan' if dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == ' ' or \ dam_name_input_simple[dam_name_input_simple.find(geocoded_name_input_simple)-1] == '-': damname_similarity_pass = 1 if damname_similarity_pass != 1: icold_spelling_splits = [] for this_split_space in dam_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): if this_split_slash != '': icold_spelling_splits.append(this_split_slash) google_spelling_splits = [] for this_split_space in geocoded_name_input_simple.split(): for this_split_comma in this_split_space.split(','): for this_split_period in this_split_comma.split('.'): for this_split_hypen in this_split_period.split('-'): for this_split_slash in this_split_hypen.split('/'): if this_split_slash != '': google_spelling_splits.append(this_split_slash) for icold_split in icold_spelling_splits: for google_split in google_spelling_splits: if len(google_split)>3 and len(icold_split)>3 and \ google_split != 'west' and icold_split != 'west' and google_split != 'east' and icold_split != 'east' and \ google_split != 'south' and icold_split != 'south' and google_split != 'norht' and icold_split != 'north' and \ google_split != 'storage' and icold_split != 'storage': if similar_v2(icold_split, google_split) >= similarity_t: damname_similarity_pass = 1 break if damname_similarity_pass == 1: break return damname_similarity_pass
99.491027
197
0.628439
17,624
138,591
4.605254
0.026555
0.233555
0.141937
0.171544
0.951419
0.941981
0.934564
0.929722
0.925791
0.922268
0
0.007286
0.261207
138,591
1,392
198
99.5625
0.785389
0.086362
0
0.886678
0
0
0.073473
0
0
0
0
0
0
0
null
null
0.094291
0.00173
null
null
0
0
0
0
null
1
0
1
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
1
0
0
0
0
0
11
fd053d04b6a463adf50b17919d88b22548295114
20,811
py
Python
src/MainAPP/test_RuleItems.py
mizamae/HomeAutomation
8c462ee4c31c1fea6792cb19af66a4d2cf7bb2ca
[ "MIT" ]
null
null
null
src/MainAPP/test_RuleItems.py
mizamae/HomeAutomation
8c462ee4c31c1fea6792cb19af66a4d2cf7bb2ca
[ "MIT" ]
9
2017-11-21T15:45:18.000Z
2022-02-11T03:37:54.000Z
src/MainAPP/test_RuleItems.py
mizamae/HomeAutomation
8c462ee4c31c1fea6792cb19af66a4d2cf7bb2ca
[ "MIT" ]
1
2020-07-22T02:24:17.000Z
2020-07-22T02:24:17.000Z
from .test_utils import * print('########################################') print('# TESTING OF RuleItems MODEL FUNCTIONS #') print('########################################') @tag('ruleitems') class RuleItemsTest(TestCase): def setUp(self): from utils.BBDD import getRegistersDBInstance self.DB=getRegistersDBInstance() self.DB.dropTable(table='MainVariables') self.signal_was_called = False self.signaltimestamp=None self.signalTag=None self.signalValue=None self.AVAR1=AutomationVariables(**AutomationVariablesDict) self.AVAR1.store2DB() newDict=editDict(keys=['Label','Tag'], \ newValues=['Test Automation Var2','3_1_1'], Dictionary=AutomationVariablesDict) self.AVAR2=AutomationVariables(**newDict) self.AVAR2.store2DB() newDict=editDict(keys=['Label','Tag','BitPos'], \ newValues=['Test Automation Var0 bit 0','1_1_1',0], Dictionary=AutomationVariablesDict) self.AVAR0_0=AutomationVariables(**newDict) self.AVAR0_0.store2DB() newDict=editDict(keys=['Label','Tag','BitPos'], \ newValues=['Test Automation Var0 bit 1','1_1_1',1], Dictionary=AutomationVariablesDict) self.AVAR0_1=AutomationVariables(**newDict) self.AVAR0_1.store2DB() MasterGPIOs(Pin=18,Label='Output IO',Direction=GPIO_OUTPUT).save() self.outIO=MasterGPIOs.objects.get(Pin=18) def handler(sender, **kwargs): self.signal_was_called = True self.signaltimestamp=kwargs['timestamp'] self.signalTag=kwargs['Tags'][0] self.signalValue=kwargs['Values'][0] self.handler=handler def __init__(self,*args,**kwargs): super().__init__(*args,**kwargs) # INDIVIDUAL FUNCTIONS TESTING def test_store2DB(self): ''' storeDB: method provided to perform the following steps: - Validate the input data - Saves the instance into the DB ''' print('## TESTING THE OPERATION OF THE store2DB METHOD ##') Rule=AutomationRules(**AutomationRulesDict) Rule.store2DB() newDict=editDict(keys=['Rule','Order','Var1','Operator12','Var2','IsConstant'], \ newValues=[Rule,1,self.AVAR1,'>',self.AVAR2,False], Dictionary=RuleItemsDict) instance=RuleItems(**newDict) instance.store2DB() # checks that store2DB creates the corresponding table in the registers DB self.assertEqual(instance.pk,1) def test_evaluate_analog(self): ''' evaluate: method provided to evaluate the mathematical expression: ''' print('## TESTING THE OPERATION OF THE evaluate METHOD WITH ANALOG VARIABLES ##') Rule=AutomationRules(**AutomationRulesDict) Rule.store2DB() print('--> Evaluation of analog operators') operators=RuleItems.OPERATOR_CHOICES for i,operator in enumerate(operators): operator=operator[0] print(' --> Evaluation operator ' + operator) newDict=editDict(keys=['Rule','Order','Var1','Operator12','Var2','IsConstant'], \ newValues=[Rule,i+1,self.AVAR1,operator,self.AVAR2,False], Dictionary=RuleItemsDict) instance=RuleItems(**newDict) instance.store2DB() now=timezone.now() print(' --> Evaluation with too old data on VAR1. Defaults to the Rule OnError field') result=instance.evaluate() self.assertTrue('Too old data' in result['ERROR']) self.assertEqual(int(result['TRUE']),int(Rule.OnError)) self.assertEqual(int(result['FALSE']),int(not Rule.OnError)) print(' --> Evaluation with too old data on VAR2. Defaults to the Rule OnError field') newValue1=25 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR1.Tag,],\ values=[now,newValue1,]) result=instance.evaluate() self.assertTrue('Too old data' in result['ERROR']) self.assertEqual(int(result['TRUE']),int(Rule.OnError)) self.assertEqual(int(result['FALSE']),int(not Rule.OnError)) print(' --> Evaluation TRUE with good data and two vars.') if '>' in operator or '!=' in operator: newValue1=25 newValue2=20 elif '<' in operator: newValue1=20 newValue2=25 elif '==' in operator: newValue1=25 newValue2=25 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR1.Tag,self.AVAR2.Tag],\ values=[now,newValue1,newValue2]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and two vars.') if '>' in operator or '==' in operator: newValue1=20 newValue2=25 elif '<' in operator: newValue1=25 newValue2=20 elif '!=' in operator: newValue1=25 newValue2=25 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR1.Tag,self.AVAR2.Tag],\ values=[now,newValue1,newValue2]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) if '>' in operator or '<' in operator: print(' --> Evaluation UNDEFINED with good data and two vars.') newValue1=25 newValue2=25 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR1.Tag,self.AVAR2.Tag],\ values=[now,newValue1,newValue2]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],False) print(' --> Evaluation TRUE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '>' in operator or '!=' in operator: instance.Constant=0 elif '<' in operator: instance.Constant=100 elif '==' in operator: instance.Constant=newValue1 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '>' in operator or '==' in operator: instance.Constant=100 elif '<' in operator: instance.Constant=0 elif '!=' in operator: instance.Constant=newValue1 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) if '>' in operator or '<' in operator: print(' --> Evaluation UNDEFINED with good data and isConstant.') instance.IsConstant=True instance.Var2=None instance.Constant=newValue1 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],False) print(' --> Evaluation UNDEFINED at max hysteresis limit.') instance.IsConstant=True instance.Var2=None instance.Constant=newValue1+0.999*instance.Var2Hyst instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],False) print(' --> Evaluation UNDEFINED at min hysteresis limit.') instance.IsConstant=True instance.Var2=None instance.Constant=newValue1-0.999*instance.Var2Hyst instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE surpassed max hysteresis limit.') instance.IsConstant=True instance.Var2=None if '>' in operator: instance.Constant=newValue1+1.0001*instance.Var2Hyst elif '<' in operator: instance.Constant=newValue1-1.0001*instance.Var2Hyst instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) print(' --> Evaluation TRUE surpassed min hysteresis limit.') instance.IsConstant=True instance.Var2=None if '>' in operator: instance.Constant=newValue1-1.0001*instance.Var2Hyst elif '<' in operator: instance.Constant=newValue1+1.0001*instance.Var2Hyst instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) for i in range(0,5): DeleteLastRegisterFromDB(DB=self.DB,table=self.AVAR1.Table) def test_evaluate_boolean(self): ''' evaluate: method provided to evaluate the mathematical expression: ''' print('## TESTING THE OPERATION OF THE evaluate METHOD WITH ANALOG VARIABLES ##') Rule=AutomationRules(**AutomationRulesDict) Rule.store2DB() print('--> Evaluation of boolean operators') operators=RuleItems.BOOL_OPERATOR_CHOICES for i,operator in enumerate(operators): operator=operator[0] print(' --> Evaluation operator ' + operator) newDict=editDict(keys=['Rule','Order','Var1','Operator12','Var2','IsConstant'], \ newValues=[Rule,i+1,self.AVAR1,operator,self.AVAR2,False], Dictionary=RuleItemsDict) instance=RuleItems(**newDict) instance.store2DB() now=timezone.now() print(' --> Evaluation TRUE with good data and two vars.') if '&' in operator: newValue1=1 newValue2=1 elif '|' in operator: newValue1=0 newValue2=1 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR1.Tag,self.AVAR2.Tag],\ values=[now,newValue1,newValue2]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and two vars.') if '&' in operator: newValue1=1 newValue2=0 elif '|' in operator: newValue1=0 newValue2=0 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR1.Tag,self.AVAR2.Tag],\ values=[now,newValue1,newValue2]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) print(' --> Evaluation TRUE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '&' in operator: instance.Constant=1 elif '|' in operator: instance.Constant=1 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '&' in operator: instance.Constant=0 elif '|' in operator: instance.Constant=0 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) for i in range(0,5): DeleteLastRegisterFromDB(DB=self.DB,table=self.AVAR1.Table) def test_evaluate_analog_with_digital(self): ''' evaluate: method provided to evaluate the mathematical expression: ''' print('## TESTING THE OPERATION OF THE evaluate METHOD WITH DIGITAL VARIABLES ##') Rule=AutomationRules(**AutomationRulesDict) Rule.store2DB() print('--> Evaluation of analog operators') operators=RuleItems.OPERATOR_CHOICES for i,operator in enumerate(operators): operator=operator[0] print(' --> Evaluation operator ' + operator) newDict=editDict(keys=['Rule','Order','Var1','Operator12','Var2','IsConstant'], \ newValues=[Rule,i+1,self.AVAR0_0,operator,self.AVAR0_1,False], Dictionary=RuleItemsDict) instance=RuleItems(**newDict) instance.store2DB() now=timezone.now() print(' --> Evaluation TRUE with good data and two vars.') if '>' in operator or '!=' in operator: newValue1=1 elif '<' in operator: newValue1=2 elif '==' in operator: newValue1=3 InsertRegister2DB(DB=self.DB,table=self.AVAR0_0.Table,tags=['timestamp',self.AVAR0_0.Tag,],\ values=[now,newValue1,]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and two vars.') if '>' in operator or '==' in operator: newValue1=2 elif '<' in operator: newValue1=1 elif '!=' in operator: newValue1=3 InsertRegister2DB(DB=self.DB,table=self.AVAR0_0.Table,tags=['timestamp',self.AVAR0_0.Tag],\ values=[now,newValue1]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) print(' --> Evaluation TRUE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '>' in operator or '!=' in operator: instance.Constant=-1 elif '<' in operator: instance.Constant=100 elif '==' in operator: instance.Constant=newValue1 & (1<<self.AVAR0_0.BitPos) instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '>' in operator or '==' in operator: instance.Constant=100 elif '<' in operator: instance.Constant=-1 elif '!=' in operator: instance.Constant=newValue1 & (1<<self.AVAR0_0.BitPos) instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) for i in range(0,5): DeleteLastRegisterFromDB(DB=self.DB,table=self.AVAR1.Table) def test_evaluate_boolean_with_digital(self): ''' evaluate: method provided to evaluate the mathematical expression: ''' print('## TESTING THE OPERATION OF THE evaluate METHOD WITH DIGITAL VARIABLES ##') Rule=AutomationRules(**AutomationRulesDict) Rule.store2DB() print('--> Evaluation of boolean operators') operators=RuleItems.BOOL_OPERATOR_CHOICES for i,operator in enumerate(operators): operator=operator[0] print(' --> Evaluation operator ' + operator) newDict=editDict(keys=['Rule','Order','Var1','Operator12','Var2','IsConstant'], \ newValues=[Rule,i+1,self.AVAR0_0,operator,self.AVAR0_1,False], Dictionary=RuleItemsDict) instance=RuleItems(**newDict) instance.store2DB() now=timezone.now() print(' --> Evaluation TRUE with good data and two vars.') if '&' in operator: newValue1=3 elif '|' in operator: newValue1=1 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR0_0.Tag,],\ values=[now,newValue1,]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and two vars.') if '&' in operator: newValue1=1 elif '|' in operator: newValue1=0 InsertRegister2DB(DB=self.DB,table=self.AVAR1.Table,tags=['timestamp',self.AVAR0_0.Tag],\ values=[now,newValue1]) result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) print(' --> Evaluation TRUE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '&' in operator: instance.Constant=1 elif '|' in operator: instance.Constant=1 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],True) self.assertEqual(result['FALSE'],False) print(' --> Evaluation FALSE with good data and isConstant.') instance.IsConstant=True instance.Var2=None if '&' in operator: instance.Constant=0 elif '|' in operator: instance.Constant=0 instance.save() result=instance.evaluate() self.assertEqual(result['ERROR'],'') self.assertEqual(result['TRUE'],False) self.assertEqual(result['FALSE'],True) for i in range(0,5): DeleteLastRegisterFromDB(DB=self.DB,table=self.AVAR0_0.Table)
44.278723
118
0.536976
1,924
20,811
5.779106
0.08368
0.095782
0.124652
0.05612
0.896124
0.882543
0.864916
0.862038
0.852415
0.851336
0
0.02453
0.343761
20,811
470
119
44.278723
0.789632
0.023737
0
0.853535
0
0
0.145256
0.003963
0
0
0
0
0.184343
1
0.020202
false
0.005051
0.005051
0
0.027778
0.10101
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
fd5424be902109274c5efc0e1d5baf9d81d72b7e
1,047
py
Python
pyaz/sql/elastic_pool/op/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/sql/elastic_pool/op/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/sql/elastic_pool/op/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
from .... pyaz_utils import _call_az def list(elastic_pool, resource_group, server): ''' Required Parameters: - elastic_pool -- Name of the Azure SQL Elastic Pool. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` - server -- Name of the Azure SQL server. You can configure the default using `az configure --defaults sql-server=<name>` ''' return _call_az("az sql elastic-pool op list", locals()) def cancel(elastic_pool, name, resource_group, server): ''' Required Parameters: - elastic_pool -- Name of the Azure SQL Elastic Pool. - name -- The unique name of the operation to cancel. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` - server -- Name of the Azure SQL server. You can configure the default using `az configure --defaults sql-server=<name>` ''' return _call_az("az sql elastic-pool op cancel", locals())
38.777778
128
0.694365
146
1,047
4.876712
0.226027
0.123596
0.063202
0.078652
0.820225
0.820225
0.820225
0.820225
0.820225
0.820225
0
0
0.207259
1,047
26
129
40.269231
0.857831
0.665712
0
0
0
0
0.201439
0
0
0
0
0
0
1
0.4
false
0
0.2
0
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
0
1
0
0
8
b5c465409c1ba34a305905222428b394886b1dcb
24,348
py
Python
tests/app_test.py
PeterTheEngineerTW/MyFirstPythonProject
735f45a7056bdb7d7f7fef8a2090b412db037282
[ "MIT" ]
null
null
null
tests/app_test.py
PeterTheEngineerTW/MyFirstPythonProject
735f45a7056bdb7d7f7fef8a2090b412db037282
[ "MIT" ]
null
null
null
tests/app_test.py
PeterTheEngineerTW/MyFirstPythonProject
735f45a7056bdb7d7f7fef8a2090b412db037282
[ "MIT" ]
null
null
null
import json import unittest from app import app from sqlalchemy import create_engine, MetaData, Table, Column, Integer, Boolean, Unicode, String class AppTest(unittest.TestCase): db_path = 'sqlite:////tmp/test.db' def create_table(self): self.engine = create_engine(self.db_path, echo=True) self.meta = MetaData() self.task = Table( 'task', self.meta, Column('id', Integer, primary_key=True, autoincrement=True), Column('name', String, nullable=False), Column('status', Boolean, nullable=False), ) self.meta.create_all(self.engine) def setUp(self): app.config['SQLALCHEMY_DATABASE_URI'] = self.db_path app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False self.create_table() self.client = app.test_client() def tearDown(self): pass self.meta.drop_all(self.engine) def test_get_no_tasks(self): # Given # no task in db # When response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) # Then # return no task response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) def test_get_one_tasks(self): # Given # one task in db payload = json.dumps({ 'name': '買早餐' }) self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) # When response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) # Then # return one task response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) self.assertEqual(1, response_json['result'][0]['id']) self.assertEqual('買早餐', response_json['result'][0]['name']) self.assertEqual(0, response_json['result'][0]['status']) def test_get_two_tasks(self): # Given # two task in db payload1 = json.dumps({ 'name': '買早餐' }) payload2 = json.dumps({ 'name': '買中餐' }) self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload1) self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload2) # When response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) # Then # return two tasks response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(2, len(response_json['result'])) self.assertEqual(1, response_json['result'][0]['id']) self.assertEqual('買早餐', response_json['result'][0]['name']) self.assertEqual(0, response_json['result'][0]['status']) self.assertEqual(2, response_json['result'][1]['id']) self.assertEqual('買中餐', response_json['result'][1]['name']) self.assertEqual(0, response_json['result'][1]['status']) def test_post_one_tasks(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When payload = json.dumps({ 'name': '買晚餐' }) self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) # Then # return one task from get endpoint response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) self.assertEqual(1, response_json['result'][0]['id']) self.assertEqual('買晚餐', response_json['result'][0]['name']) self.assertEqual(0, response_json['result'][0]['status']) def test_post_one_tasks_empty_name(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When payload = json.dumps({ 'name': '' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Task name cannot be empty', response_json['message']) def test_post_one_tasks_missing_name(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When payload = json.dumps({ }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('field missing in payload', response_json['message']) def test_post_one_tasks_not_json_payload(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When payload = 'name=睡覺' response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Bad Request', response_json['name']) def test_post_one_tasks_not_json_payload(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When payload = json.dumps({ 'name': 123 }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('a field is of incorrect type', response_json['message']) def test_post_two_tasks_consecutively(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When # post two tasks consecutively payload1 = json.dumps({ 'name': '上班' }) payload2 = json.dumps({ 'name': '下班' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload1) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('上班', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload2) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(2, response_json['result']['id']) self.assertEqual('下班', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) # Then # return two task from get endpoint with auto incremented id response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(2, len(response_json['result'])) self.assertEqual(1, response_json['result'][0]['id']) self.assertEqual('上班', response_json['result'][0]['name']) self.assertEqual(0, response_json['result'][0]['status']) self.assertEqual(2, response_json['result'][1]['id']) self.assertEqual('下班', response_json['result'][1]['name']) self.assertEqual(0, response_json['result'][1]['status']) def test_put_one_tasks(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 1, 'name': '買買買', 'status': 1 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, response_json['id']) self.assertEqual('買買買', response_json['name']) self.assertEqual(1, response_json['status']) def test_put_one_nonexist_task(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When payload = json.dumps({ 'id': 1, 'name': '沒得買', 'status': 1 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Task not found for id 1', response_json['message']) def test_put_one_tasks_unmatch_id_in_payload(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 2, 'name': '買買買', 'status': 1 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Id has to be the same in payload', response_json['message']) def test_put_one_tasks_invalid_status(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 1, 'name': '買買買', 'status': 2 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Status has to be either 1 or 0', response_json['message']) def test_put_one_tasks_empty_task_name(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 1, 'name': '', 'status': 1 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Task name cannot be empty', response_json['message']) def test_put_one_tasks_wrong_id_type(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 'id', 'name': '打東東', 'status': 0 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('a field is of incorrect type', response_json['message']) def test_put_one_tasks_same_status(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 1, 'name': '買買買', 'status': 0 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, response_json['id']) self.assertEqual('買買買', response_json['name']) self.assertEqual(0, response_json['status']) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, response_json['id']) self.assertEqual('買買買', response_json['name']) self.assertEqual(0, response_json['status']) def test_delete_one_nonexist_task(self): # Given # no task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) # When response = self.client.delete('/task/1', headers={"Content-Type": "application/json"}) # Then # return task not found msg response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(400, response.status_code) self.assertEqual('Task not found for id 1', response_json['message']) def test_put_one_tasks_boolean_status(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When payload = json.dumps({ 'id': 1, 'name': '買買買', 'status': 0 }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, response_json['id']) self.assertEqual('買買買', response_json['name']) self.assertEqual(0, response_json['status']) payload = json.dumps({ 'id': 1, 'name': 'ABC', 'status': False }) response = self.client.put('/task/1', headers={"Content-Type": "application/json"}, data=payload) # Then response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, response_json['id']) self.assertEqual('ABC', response_json['name']) self.assertEqual(0, response_json['status']) def test_delete_one_tasks(self): # Given # one task in db response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result'])) payload = json.dumps({ 'name': '沒得買' }) response = self.client.post('/task', headers={"Content-Type": "application/json"}, data=payload) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(201, response.status_code) self.assertEqual(1, response_json['result']['id']) self.assertEqual('沒得買', response_json['result']['name']) self.assertEqual(0, response_json['result']['status']) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(1, len(response_json['result'])) # When response = self.client.delete('/task/1', headers={"Content-Type": "application/json"}) self.assertEqual(200, response.status_code) # Then # return no task from get endpoint self.assertEqual(200, response.status_code) response = self.client.get('/tasks', headers={"Content-Type": "application/json"}) response_json = json.loads(str(response.data, 'utf-8')) self.assertEqual(200, response.status_code) self.assertEqual(0, len(response_json['result']))
41.907057
105
0.611672
2,853
24,348
5.109359
0.044515
0.164643
0.096316
0.119366
0.922481
0.920285
0.910887
0.905262
0.894629
0.894629
0
0.01913
0.229259
24,348
581
106
41.907057
0.757647
0.033185
0
0.823672
0
0
0.159447
0.003197
0
0
0
0
0.386473
1
0.05314
false
0.002415
0.009662
0
0.067633
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
bd1c84f7d30621765f0f97b639c909004375bc68
766
py
Python
nodebox/tests/graphics/002-text.py
nodebox/nodebox-pyobjc
31c7a95ca24fffdc8f4523278d4b68c330adea8e
[ "MIT" ]
47
2015-03-14T01:44:09.000Z
2021-11-10T10:28:14.000Z
nodebox/tests/graphics/002-text.py
nodebox/nodebox-pyobjc
31c7a95ca24fffdc8f4523278d4b68c330adea8e
[ "MIT" ]
4
2015-08-20T20:02:32.000Z
2021-02-10T18:39:11.000Z
nodebox/tests/graphics/002-text.py
nodebox/nodebox-pyobjc
31c7a95ca24fffdc8f4523278d4b68c330adea8e
[ "MIT" ]
15
2015-03-14T01:44:00.000Z
2020-12-17T16:44:31.000Z
size(300, 300) x, y = 10, 30 fontsize(12) text("Hello", x, y) drawpath(textpath("Hello", x + 100, y)) rect(x, y-12,50,20, fill=None, stroke=0) rect(x + 100, y-12,50,20, fill=None, stroke=0) y += 30 align(LEFT) text("Hello", x, y, width=50) drawpath(textpath("Hello", x + 100, y, width=50)) rect(x, y-12,50,20, fill=None, stroke=0) rect(x + 100, y-12,50,20, fill=None, stroke=0) y += 30 align(CENTER) text("Hello", x, y, width=50) drawpath(textpath("Hello", x + 100, y, width=50)) rect(x, y-12,50,20, fill=None, stroke=0) rect(x + 100, y-12,50,20, fill=None, stroke=0) y += 30 align(RIGHT) text("Hello", x, y, width=50) drawpath(textpath("Hello", x + 100, y, width=50)) rect(x, y-12,50,20, fill=None, stroke=0) rect(x + 100, y-12,50,20, fill=None, stroke=0)
24.709677
49
0.630548
157
766
3.076433
0.159236
0.037267
0.082816
0.115942
0.89234
0.89234
0.838509
0.838509
0.838509
0.838509
0
0.16692
0.139687
766
30
50
25.533333
0.566009
0
0
0.68
0
0
0.052288
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
1fcace8d39e11074020b552ef7f09655a2698527
209
py
Python
sql_injection/models.py
tweksteen/django_vuln
a18f5e86a441e6d0b7ea82f9dde7fb4bd94732e7
[ "BSD-3-Clause" ]
2
2018-08-03T05:07:17.000Z
2021-10-19T20:52:06.000Z
sql_injection/models.py
tweksteen/django_vuln
a18f5e86a441e6d0b7ea82f9dde7fb4bd94732e7
[ "BSD-3-Clause" ]
null
null
null
sql_injection/models.py
tweksteen/django_vuln
a18f5e86a441e6d0b7ea82f9dde7fb4bd94732e7
[ "BSD-3-Clause" ]
null
null
null
from django.db import models class Contact(models.Model): name = models.CharField(max_length=30) phone_number = models.CharField(max_length=10) def __unicode__(self): return self.name
26.125
50
0.712919
28
209
5.071429
0.714286
0.211268
0.253521
0.338028
0
0
0
0
0
0
0
0.02381
0.196172
209
8
51
26.125
0.821429
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0.166667
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
0
0
0
1
1
0
0
7
9527f439f36cea824d4c27d9484618836508df6e
30
py
Python
bevutils/models/losses/__init__.py
huangyuyao/bevutils
24e5c4954b17ed58e27697447ab667c65f59b7e0
[ "MIT" ]
2
2019-08-04T15:25:28.000Z
2020-11-07T11:48:41.000Z
bevutils/models/losses/__init__.py
huangyuyao/bevutils
24e5c4954b17ed58e27697447ab667c65f59b7e0
[ "MIT" ]
null
null
null
bevutils/models/losses/__init__.py
huangyuyao/bevutils
24e5c4954b17ed58e27697447ab667c65f59b7e0
[ "MIT" ]
null
null
null
from .nll_loss import nll_loss
30
30
0.866667
6
30
4
0.666667
0.583333
0
0
0
0
0
0
0
0
0
0
0.1
30
1
30
30
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
1f728e5f306d9511775d5248545a7b1354dbf8fa
3,941
py
Python
Tests/PythonTests/test_game.py
siva-msft/baba-is-auto
3237b5b70167130558827979bde7dcee14ef39f3
[ "MIT" ]
108
2019-09-11T06:31:35.000Z
2022-03-28T13:02:56.000Z
Tests/PythonTests/test_game.py
siva-msft/baba-is-auto
3237b5b70167130558827979bde7dcee14ef39f3
[ "MIT" ]
29
2019-09-12T00:28:04.000Z
2022-02-20T14:56:27.000Z
Tests/PythonTests/test_game.py
utilForever/BabaIsAuto
fb444668914eb70c0a35197399d650d293b4b95f
[ "MIT" ]
14
2020-02-24T05:41:43.000Z
2022-03-28T12:43:34.000Z
""" Copyright (c) 2020 Chris Ohk I am making my contributions/submissions to this project solely in our personal capacity and am not conveying any rights to any intellectual property of any third parties. """ import pyBaba def test_game_basic(): game = pyBaba.Game("Resources/Maps/baba_is_you.txt") assert game.GetMap().At(1, 4).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(9, 4).HasType(pyBaba.ObjectType.ICON_FLAG) assert game.GetRuleManager().GetNumRules() == 4 assert game.GetPlayerIcon() == pyBaba.ObjectType.ICON_BABA pos = game.GetMap().GetPositions(game.GetPlayerIcon()) assert len(pos) == 1 assert pos[0][0] == 1 assert pos[0][1] == 4 game.MovePlayer(pyBaba.Direction.UP) assert game.GetMap().At(1, 3).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(1, 4).HasType(pyBaba.ObjectType.ICON_EMPTY) game.MovePlayer(pyBaba.Direction.UP) assert game.GetMap().At(1, 3).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(1, 2).HasType(pyBaba.ObjectType.ICON_WALL) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) assert game.GetMap().At(4, 3).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(3, 3).HasType(pyBaba.ObjectType.ICON_TILE) game.MovePlayer(pyBaba.Direction.RIGHT) assert game.GetMap().At(5, 3).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(6, 3).HasType(pyBaba.ObjectType.ICON_ROCK) assert game.GetMap().At(4, 3).HasType(pyBaba.ObjectType.ICON_TILE) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.DOWN) assert game.GetPlayState() == pyBaba.PlayState.PLAYING game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) assert game.GetPlayState() == pyBaba.PlayState.WON game.Reset() assert game.GetMap().At(1, 4).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(9, 4).HasType(pyBaba.ObjectType.ICON_FLAG) assert game.GetRuleManager().GetNumRules() == 4 assert game.GetPlayerIcon() == pyBaba.ObjectType.ICON_BABA assert game.GetPlayState() == pyBaba.PlayState.PLAYING def test_game_lost(): game = pyBaba.Game("Resources/Maps/simple_map.txt") assert game.GetMap().At(0, 2).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetRuleManager().GetNumRules() == 1 assert game.GetPlayState() == pyBaba.PlayState.PLAYING game.MovePlayer(pyBaba.Direction.UP) assert game.GetRuleManager().GetNumRules() == 0 assert game.GetPlayState() == pyBaba.PlayState.LOST def test_game_sink(): game = pyBaba.Game("Resources/Maps/out_of_reach.txt") assert game.GetMap().At(9, 3).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetRuleManager().GetNumRules() == 5 assert game.GetPlayerIcon() == pyBaba.ObjectType.ICON_BABA game.MovePlayer(pyBaba.Direction.UP) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.RIGHT) game.MovePlayer(pyBaba.Direction.DOWN) game.MovePlayer(pyBaba.Direction.LEFT) game.MovePlayer(pyBaba.Direction.LEFT) game.MovePlayer(pyBaba.Direction.UP) game.MovePlayer(pyBaba.Direction.LEFT) game.MovePlayer(pyBaba.Direction.DOWN) game.MovePlayer(pyBaba.Direction.DOWN) game.MovePlayer(pyBaba.Direction.DOWN) assert game.GetMap().At(10, 5).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(10, 6).HasType(pyBaba.ObjectType.ICON_ROCK) game.MovePlayer(pyBaba.Direction.DOWN) assert game.GetMap().At(10, 6).HasType(pyBaba.ObjectType.ICON_BABA) assert game.GetMap().At(10, 7).HasType(pyBaba.ObjectType.ICON_ROCK) is False game.MovePlayer(pyBaba.Direction.DOWN) assert game.GetPlayState() == pyBaba.PlayState.LOST
45.298851
80
0.738645
523
3,941
5.502868
0.164436
0.114663
0.18763
0.272064
0.863794
0.776928
0.746004
0.725504
0.725156
0.617095
0
0.016802
0.12408
3,941
86
81
45.825581
0.816918
0.051002
0
0.597222
0
0
0.024116
0.024116
0
0
0
0
0.5
1
0.041667
false
0
0.013889
0
0.055556
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
1
0
0
0
0
0
0
0
0
0
9
2f3650e9c1f79a99ec8f13f247f1274afbe3fd65
167
py
Python
src/OpenDrive/client_side/gui/__init__.py
JulianSobott/OpenDrive
0593c994c3bccccc4351557c42d13f3535b6b6c1
[ "Apache-2.0" ]
1
2021-03-18T16:20:46.000Z
2021-03-18T16:20:46.000Z
src/OpenDrive/client_side/gui/__init__.py
JulianSobott/OpenDrive
0593c994c3bccccc4351557c42d13f3535b6b6c1
[ "Apache-2.0" ]
2
2019-06-04T21:50:23.000Z
2019-06-14T13:20:50.000Z
src/OpenDrive/client_side/gui/__init__.py
JulianSobott/OpenDrive
0593c994c3bccccc4351557c42d13f3535b6b6c1
[ "Apache-2.0" ]
null
null
null
from OpenDrive.client_side.gui.controller import close_gui, open_gui, start_gui_thread, stop from OpenDrive.client_side.gui.interface import set_sync_status_of_folder
55.666667
92
0.88024
27
167
5.074074
0.666667
0.189781
0.277372
0.335766
0.379562
0
0
0
0
0
0
0
0.065868
167
2
93
83.5
0.878205
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
2f9c02741ade0dacca0048cdd4c12d31991d239f
40
py
Python
integrations/openneuro_.py
tsalo/nerdmetric
9125ff26ddda656ea7f7a1392686871624af27a9
[ "MIT" ]
1
2018-08-25T15:29:35.000Z
2018-08-25T15:29:35.000Z
integrations/openneuro_.py
nerdmetric/nerdmetric
9125ff26ddda656ea7f7a1392686871624af27a9
[ "MIT" ]
5
2018-08-19T23:39:16.000Z
2018-08-25T15:12:20.000Z
integrations/openneuro_.py
tsalo/nerdmetric
9125ff26ddda656ea7f7a1392686871624af27a9
[ "MIT" ]
null
null
null
import os def hello_world(): pass
6.666667
18
0.65
6
40
4.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.275
40
5
19
8
0.862069
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0.333333
0
0.666667
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
1
0
1
0
0
8
23f0eff529e43ddbe2709b0d5538aa100e49c109
116
py
Python
tianyancha/__init__.py
Myanyan/mycode
d6af62afb114b54712709b9d363cce25ecb842e3
[ "MIT" ]
null
null
null
tianyancha/__init__.py
Myanyan/mycode
d6af62afb114b54712709b9d363cce25ecb842e3
[ "MIT" ]
null
null
null
tianyancha/__init__.py
Myanyan/mycode
d6af62afb114b54712709b9d363cce25ecb842e3
[ "MIT" ]
1
2020-05-06T11:43:37.000Z
2020-05-06T11:43:37.000Z
__author__ = 'Qiao Zhang' from tianyancha.tianyancha import Tianyancha from tianyancha.tianyancha import WriterJson
29
44
0.853448
13
116
7.307692
0.538462
0.294737
0.505263
0.631579
0
0
0
0
0
0
0
0
0.103448
116
4
45
29
0.913462
0
0
0
0
0
0.08547
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
7
9b21af73cfc5c709f134e496bac95711b70fe157
4,920
py
Python
CuConnect/pims/application.py
Shreyans13/Xenial-Xerus
6a42886eb6f882f9772689ea40c8e7dab75e678a
[ "MIT" ]
null
null
null
CuConnect/pims/application.py
Shreyans13/Xenial-Xerus
6a42886eb6f882f9772689ea40c8e7dab75e678a
[ "MIT" ]
null
null
null
CuConnect/pims/application.py
Shreyans13/Xenial-Xerus
6a42886eb6f882f9772689ea40c8e7dab75e678a
[ "MIT" ]
null
null
null
from flask import Flask, request, jsonify from flask_cors import CORS from uims_api import SessionUIMS from uims_api.exceptions import IncorrectCredentialsError, UIMSInternalError app = Flask(__name__) CORS(app) @app.route('/') def home(): return 'OK!' @app.route('/api/signin', methods=['POST']) def signin(): if not request.form.get('uid'): return jsonify({'error': 'UID not provided'}) if not request.form.get('password'): return jsonify({'error': 'Password not provided'}) try: SessionUIMS(request.form.get('uid'), request.form.get('password')) except Exception as e: if e.__class__ == IncorrectCredentialsError: return jsonify({'error': 'Invalid credentials'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) else: return jsonify({'success': True}) @app.route('/api/attendance', methods=['POST']) def get_minimal_attendance(): if not request.form.get('uid'): return jsonify({'error': 'UID not provided'}) if not request.form.get('password'): return jsonify({'error': 'Password not provided'}) try: my_acc = SessionUIMS(request.form.get( 'uid'), request.form.get('password')) except Exception as e: if e.__class__ == IncorrectCredentialsError: return jsonify({'error': 'Invalid credentials'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) try: subjects = my_acc.attendance except Exception as e: if e.__class__ == UIMSInternalError: return jsonify({'error': 'UIMS Internal Failure'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) else: return jsonify(subjects) @app.route('/api/fullattendance', methods=['POST']) def get_full_attendance(): if not request.form.get('uid'): return jsonify({'error': 'UID not provided'}) if not request.form.get('password'): return jsonify({'error': 'Password not provided'}) try: my_acc = SessionUIMS(request.form.get( 'uid'), request.form.get('password')) except Exception as e: if e.__class__ == IncorrectCredentialsError: return jsonify({'error': 'Invalid credentials'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) try: subjects = my_acc.full_attendance except Exception as e: if e.__class__ == UIMSInternalError: return jsonify({'error': 'UIMS Internal Failure'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) else: return jsonify(subjects) @app.route('/api/timetable', methods=['POST']) def get_timetable(): if not request.form.get('uid'): return jsonify({'error': 'UID not provided'}) if not request.form.get('password'): return jsonify({'error': 'Password not provided'}) try: my_acc = SessionUIMS(request.form.get( 'uid'), request.form.get('password')) except Exception as e: if e.__class__ == IncorrectCredentialsError: return jsonify({'error': 'Invalid credentials'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) try: timetable = my_acc.timetable except Exception as e: if e.__class__ == UIMSInternalError: return jsonify({'error': 'UIMS Internal Failure'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) else: return jsonify(timetable) @app.route('/api/announcements/<int:page>', methods=['POST']) def get_announcement_page(page=1): if not request.form.get('uid'): return jsonify({'error': 'UID not provided'}) if not request.form.get('password'): return jsonify({'error': 'Password not provided'}) try: my_acc = SessionUIMS(request.form.get( 'uid'), request.form.get('password')) except Exception as e: if e.__class__ == IncorrectCredentialsError: return jsonify({'error': 'Invalid credentials'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) try: ann_page = my_acc.annoucements(page) except Exception as e: if e.__class__ == UIMSInternalError: return jsonify({'error': 'UIMS Internal Failure'}) else: return jsonify({'error': 'Looks like this Module is inactive on UIMS'}) else: return jsonify(ann_page) if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=5000, debug=True) # [END gae_flex_python_static_files]
35.142857
83
0.627236
579
4,920
5.2038
0.160622
0.142383
0.167275
0.053103
0.777962
0.777962
0.777962
0.777962
0.777962
0.777962
0
0.002958
0.244106
4,920
139
84
35.395683
0.807206
0.032317
0
0.754237
0
0
0.237124
0.006096
0
0
0
0
0
1
0.050847
false
0.127119
0.033898
0.008475
0.372881
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
f1f02825b0b760d47298d2a811344a56e9a5f807
15,946
py
Python
vnmrjpy/aloha/pyramidal.py
hlatkydavid/vnmrjpy
48707a1000dc87e646e37c8bd686e695bd31a61e
[ "MIT" ]
null
null
null
vnmrjpy/aloha/pyramidal.py
hlatkydavid/vnmrjpy
48707a1000dc87e646e37c8bd686e695bd31a61e
[ "MIT" ]
null
null
null
vnmrjpy/aloha/pyramidal.py
hlatkydavid/vnmrjpy
48707a1000dc87e646e37c8bd686e695bd31a61e
[ "MIT" ]
null
null
null
import numpy as np import vnmrjpy as vj import sys import copy import matplotlib.pyplot as plt import time def pyramidal_k(kspace_fiber,weights,rp,\ realtimeplot=False): """ Pyramidal decomposition composit function for single k sparsity case. Main Aloha unit. One pyramidal decomposition and matrix completion is used at each readout point. Thus, the different calls for this function are independent and could be passed to the grid or GPU or whatever Args: kspace_fiber weights rp Return: kspace_fiber_complete """ kspace_fiber_complete = copy.deepcopy(kspace_fiber) if rp['stages'] == 3: lmafit_tolerance = vj.config['lmafit_tol'] else: raise(Exception('no lmafit tolerance at different number of stages\ than 3. please specify in config or pyramidal')) for s in range(rp['stages']): weight = weights[s] # init known data for the solvers fiber_known = vj.aloha.init_kspace_stage(kspace_fiber,s,rp) # saving known center fiber_known = vj.aloha.apply_kspace_weights(fiber_known,weight) hankel_known = vj.aloha.construct_lvl1_hankel(fiber_known,rp['filter_size']) # init data to be completed kspace_stage = vj.aloha.init_kspace_stage(kspace_fiber_complete,s,rp) kspace_stage = vj.aloha.apply_kspace_weights(kspace_stage,weight) hankel = vj.aloha.construct_lvl1_hankel(kspace_stage,rp['filter_size']) if rp['solver'] == 'svt': raise(Exception('not implemented')) elif rp['solver'] == 'lmafit': lmafit = vj.aloha.Lmafit(hankel,\ known_data=hankel_known,\ verbose=False,\ realtimeplot=realtimeplot,\ tol=lmafit_tolerance[s]) X,Y,obj = lmafit.solve(max_iter=200) hankel = vj.aloha.lowranksolvers.admm(X,\ Y.conj().T,\ fiber_known,\ s,\ rp,\ realtimeplot=realtimeplot,\ max_iter=40) fiber = vj.aloha.deconstruct_hankel(hankel,s,rp) fiber = vj.aloha.remove_kspace_weights(fiber,weight) # replacing center kspace_fiber_complete = vj.aloha.finish_kspace_stage(\ fiber,kspace_fiber_complete,0,rp) return kspace_fiber_complete def pyramidal_kxky(kspace_fiber,weights,rp,\ realtimeplot=False): """ Pyramidal decomposition composit function for kx-ky sparsity case. Main Aloha unit. One pyramidal decomposition and matrix completion is used at each readout point. Thus, the different calls for this function are independent and could be passed to the grid or GPU or whatever Args: kspace_fiber weights rp Return: kspace_fiber_complete """ kspace_fiber_complete = copy.deepcopy(kspace_fiber) if rp['stages'] == 3: lmafit_tolerance = vj.config['lmafit_tol'] #TODO ugly hack correct this.... elif rp['stages'] == 1: lmafit_tolerance = [vj.config['lmafit_tol'][2]] else: raise(Exception('no lmafit tolerance at different number of stages\ than 3. please specify in config or pyramidal')) for s in range(rp['stages']): for i in range(2): weight = weights[2*s+i] # init known data for the solvers fiber_known = vj.aloha.init_kspace_stage(kspace_fiber,s,rp) # saving known center fiber_known = vj.aloha.apply_kspace_weights(fiber_known,weight) hankel_known = vj.aloha.construct_hankel(fiber_known,rp) # init data to be completed kspace_stage = vj.aloha.init_kspace_stage(kspace_fiber_complete,s,rp) kspace_stage = vj.aloha.apply_kspace_weights(kspace_stage,weight) hankel = vj.aloha.construct_hankel(kspace_stage,rp) if rp['solver'] == 'svt': raise(Exception('not implemented')) elif rp['solver'] == 'lmafit': lmafit = vj.aloha.Lmafit(hankel,\ known_data=hankel_known,\ verbose=False,\ realtimeplot=realtimeplot,\ tol=lmafit_tolerance[s]) X,Y,obj = lmafit.solve(max_iter=500) print('lmafit ready') hankel = vj.aloha.lowranksolvers.admm(X,\ Y.conj().T,\ fiber_known,\ s,\ rp,\ realtimeplot=realtimeplot) fiber = vj.aloha.deconstruct_hankel(hankel,s,rp) fiber = vj.aloha.remove_kspace_weights(fiber,weight) # this is for replacing zerofreq lines if i == 0: weight_x = copy.copy(weight) fiber_wx = copy.copy(fiber) if i == 1: weight_y = weight fiber_wy = fiber # averaging kx and ky completed fibers fiber = vj.aloha.avg_xy_fibers(fiber_wx,fiber_wy,weight_x,weight_y) # replacing center kspace_fiber_complete = vj.aloha.finish_kspace_stage(\ fiber,kspace_fiber_complete,i,rp) return kspace_fiber_complete def pyramidal_kt(kspace_fiber,weights,rp,\ realtimeplot=False): """ Pyramidal decomposition composit function for k-t sparsity. Main Aloha unit. One pyramidal decomposition and matrix completion is used at each readout point. Thus, the different calls for this function are independent and could be passed to the grid or GPU or whatever Args: kspace_fiber weights rp Return: kspace_fiber_complete """ kspace_fiber_complete = copy.deepcopy(kspace_fiber) if rp['stages'] == 3: lmafit_tolerance = vj.config['lmafit_tol'] else: raise(Exception('no lmafit tolerance at different number of stages\ than 3. please specify in config or pyramidal')) for s in range(rp['stages']): weight = weights[s] # init known data for the solvers fiber_known = vj.aloha.init_kspace_stage(kspace_fiber,s,rp) fiber_known = vj.aloha.apply_kspace_weights(fiber_known,weight) hankel_known = vj.aloha.construct_hankel(fiber_known,rp) # init data to be completed kspace_stage = vj.aloha.init_kspace_stage(kspace_fiber_complete,s,rp) kspace_stage = vj.aloha.apply_kspace_weights(kspace_stage,weight) hankel = vj.aloha.construct_hankel(kspace_stage,rp) if rp['solver'] == 'svt': raise(Exception('not implemented')) elif rp['solver'] == 'lmafit': lmafit = vj.aloha.Lmafit(hankel,\ known_data=hankel_known,\ verbose=False,\ realtimeplot=realtimeplot,\ tol=lmafit_tolerance[s]) X,Y,obj = lmafit.solve(max_iter=500) """ old admm = vj.aloha.Admm(X,Y.conj().T,fiber_known, s,rp,\ realtimeplot=False) hankel = admm.solve() """ hankel = vj.aloha.lowranksolvers.admm(X,\ Y.conj().T,\ fiber_known,\ s,\ rp,\ realtimeplot=realtimeplot) fiber = vj.aloha.deconstruct_hankel(hankel,s,rp) fiber = vj.aloha.remove_kspace_weights(fiber,weight) kspace_fiber_complete = vj.aloha.finish_kspace_stage(\ fiber,kspace_fiber_complete,0,rp) return kspace_fiber_complete # deprecated------------------------------------------------------------------- def pyramidal_solve_kt(slice3d,\ slice3d_orig,\ slice3d_shape,\ weights_list,\ factors,\ rp): """Solves a k-t slice: dim0=receivers,dim1=kx,dim2=t """ #init lmafit_tol_list = vj.config['lmafit_tol'] solver = rp['solver'] slice3d_cs = copy.deepcopy(slice3d) kspace_complete = copy.deepcopy(slice3d) kspace_complete_stage = copy.deepcopy(slice3d) for s in range(rp['stages']): # init from previous stage kspace_init, center = vj.aloha.kspace_pyramidal_init(\ slice3d,s) kspace_init_zerofilled, center2 = vj.aloha.kspace_pyramidal_init(\ slice3d_cs,s) #kspace_weighing kspace_weighted = vj.aloha.apply_pyramidal_weights_kxt(\ kspace_init,\ weights_list[s],\ rp) kspace_zerofilled_weighted = vj.aloha.apply_pyramidal_weights_kxt(\ kspace_init,\ weights_list[s],\ rp) #hankel formation hankel = vj.aloha.compose_hankel_2d(kspace_weighted,rp) hankel_zerofilled = vj.aloha.compose_hankel_2d(\ kspace_zerofilled_weighted,rp) #low rank matrix completion if solver == 'svt': svtsolver = SVTSolver(hankel,\ tau=None,\ delta=None,\ epsilon=1e-4,\ max_iter=500) hankel = vj.aloha.svtsolver.solve() elif solver == 'lmafit': # initialize with LMaFit lmafit = vj.aloha.Lmafit(hankel,\ known_data=hankel_zerofilled,\ verbose=False,\ realtimeplot=False,\ tol=lmafit_tol_list[s]) X,Y,obj = lmafit.solve(max_iter=500) admm = vj.aloha.Admm(X,Y.H,\ kspace_zerofilled_weighted,\ slice3d_shape,\ s,\ rp,\ realtimeplot=False) hankel = admm.solve() #hankel = U.dot(V.H) else: raise(Exception('wrong solver')) # rearrange original from completed hankel kspace_weighted = vj.aloha.decompose_hankel_2d(hankel,\ slice3d_shape,s,factors,rp) kspace_complete_stage = \ vj.aloha.remove_pyramidal_weights_kxt(\ kspace_weighted,\ center,\ weights_list[s]) kspace_complete = vj.aloha.finalize_pyramidal_stage_kt(\ kspace_complete_stage,\ kspace_complete,\ slice3d, s, rp) kspace_complete = vj.aloha.restore_center(kspace_complete, slice3d) return kspace_complete def pyramidal_solve_kxky(slice3d,\ slice3d_orig,\ slice3d_shape,\ weights_list,\ factors,\ rp): """Solves a k-t slice: dim0=receivers,dim1=kx,dim2=t """ #init lmafit_tol_list = vj.config['lmafit_tol'] solver = rp['solver'] slice3d_cs = copy.deepcopy(slice3d) kspace_complete = copy.deepcopy(slice3d) kspace_complete_stage = copy.deepcopy(slice3d) for s in range(rp['stages']): weights_ind = 0 # go through each stage twice # weighting is done in one direction at a time for _ in range(2): # init from previous stage kspace_init, center = vj.aloha.kspace_pyramidal_init(\ slice3d,s) kspace_init_zerofilled, center2 = vj.aloha.kspace_pyramidal_init(\ slice3d_cs,s) #kspace_weighing kspace_weighted = vj.aloha.apply_pyramidal_weights_kxky(\ kspace_init,\ weights_list[s],\ weights_ind,\ rp) kspace_zerofilled_weighted = vj.aloha.apply_pyramidal_weights_kxky(\ kspace_init,\ weights_list[s],\ weights_ind,\ rp) #hankel formation hankel = vj.aloha.compose_hankel_2d(kspace_weighted,rp) hankel_zerofilled = vj.aloha.compose_hankel_2d(\ kspace_zerofilled_weighted,rp) #low rank matrix completion if solver == 'svt': svtsolver = SVTSolver(hankel,\ tau=None,\ delta=None,\ epsilon=1e-4,\ max_iter=500) hankel = vj.aloha.svtsolver.solve() elif solver == 'lmafit': # initialize with LMaFit lmafit = vj.aloha.Lmafit(hankel,\ known_data=hankel_zerofilled,\ verbose=False,\ realtimeplot=False,\ tol=lmafit_tol_list[s]) X,Y,obj = lmafit.solve(max_iter=500) admm = vj.aloha.Admm(X,Y.H,\ kspace_zerofilled_weighted,\ slice3d_shape,\ s,\ rp,\ realtimeplot=False) hankel = admm.solve() #hankel = U.dot(V.H) else: raise(Exception('wrong solver')) # rearrange original from completed hankel kspace_weighted = vj.aloha.decompose_hankel_2d(hankel,\ slice3d_shape,s,factors,rp) kspace_complete_stage = \ vj.aloha.remove_pyramidal_weights_kxky(\ kspace_weighted,\ center,\ weights_list[s],\ weights_ind) kspace_complete = vj.aloha.finalize_pyramidal_stage(\ kspace_complete_stage,\ kspace_complete,\ slice3d, s, rp) weights_ind = 1 kspace_complete = vj.aloha.restore_center(kspace_complete, slice3d) return kspace_complete
43.097297
84
0.491471
1,517
15,946
4.959789
0.126566
0.056752
0.045455
0.015949
0.919192
0.915205
0.900984
0.882775
0.868687
0.864434
0
0.009465
0.430202
15,946
369
85
43.214092
0.818622
0.126678
0
0.841085
0
0
0.022875
0
0
0
0
0.00271
0
1
0.01938
false
0
0.023256
0
0.062016
0.003876
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
7b3237e34ae35e808c293723399810fe3516b0d6
9,636
py
Python
test/t_utils/test_convert.py
RootForum/magrathea
85bf611c749969225b079d2177834a86a9905ef0
[ "MIT" ]
1
2017-07-22T13:07:05.000Z
2017-07-22T13:07:05.000Z
test/t_utils/test_convert.py
RootForum/magrathea
85bf611c749969225b079d2177834a86a9905ef0
[ "MIT" ]
null
null
null
test/t_utils/test_convert.py
RootForum/magrathea
85bf611c749969225b079d2177834a86a9905ef0
[ "MIT" ]
null
null
null
## -*- coding: utf-8 -*- """ test.t_utils.test_convert ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2014 by the RootForum.org team, see AUTHORS. :license: MIT License, see LICENSE for details. """ from unittest import TestCase, skipIf import sys from magrathea.utils.convert import to_bytes, to_str class TestMagratheaUtilsConvert(TestCase): """ Unit tests for :py:mod:`magrathea.utils.convert` """ def test_01(self): """ Test Case 01: Convert a non-empty string to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = "test" test_bytes = b"test" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) def test_02(self): """ Test Case 02: Convert an empty string to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = "" test_bytes = b"" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) def test_03(self): """ Test Case 03: Convert a byte sequence to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = bytes(b"test") test_bytes = b"test" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) def test_04(self): """ Test Case 04: Convert a byte array to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = bytearray(b"test") test_bytes = b"test" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) def test_05(self): """ Test Case 05: Convert None to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = None test_bytes = b"" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) def test_06(self): """ Test Case 06: Convert False to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = False test_bytes = b"False" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) def test_07(self): """ Test Case 07: Convert a non-string object to bytes. Test is passed if the returned result is a byte sequence and equals the expected result. """ test_string = [1, 2, 3] test_bytes = b"[1, 2, 3]" self.assertIsInstance(to_bytes(test_string), bytes) self.assertSequenceEqual(to_bytes(test_string), test_bytes) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_08(self): """ Test Case 08: Convert a non-empty byte sequence into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = "test" test_bytes = b"test" self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_09(self): """ Test Case 09: Convert an empty byte sequence into a string. Test is passed if the returned result is a sting and equals the expected result. """ test_string = "" test_bytes = b"" self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_10(self): """ Test Case 10: Convert a byte sequence into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = "test" test_bytes = bytes(b"test") self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_11(self): """ Test Case 11: Convert a byte array into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = "test" test_bytes = bytearray(b"test") self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_12(self): """ Test Case 12: Convert None into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = "" test_bytes = None self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_13(self): """ Test Case 13: Convert False into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = "False" test_bytes = False self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info < (3, 0, 0), 'Test only for Python 3') def test_14(self): """ Test Case 14: Convert a non-bytes object into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = "[1, 2, 3]" test_bytes = [1, 2, 3] self.assertIsInstance(to_str(test_bytes), str) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_15(self): """ Test Case 15: Convert a non-empty byte sequence into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = u"test" test_bytes = b"test" self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_16(self): """ Test Case 16: Convert an empty byte sequence into a string. Test is passed if the returned result is a sting and equals the expected result. """ test_string = u"" test_bytes = b"" self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_17(self): """ Test Case 17: Convert a byte sequence into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = u"test" test_bytes = bytes(b"test") self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_18(self): """ Test Case 18: Convert a byte array into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = u"test" test_bytes = bytearray(b"test") self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_19(self): """ Test Case 19: Convert None into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = u"" test_bytes = None self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_20(self): """ Test Case 20: Convert False into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = u"False" test_bytes = False self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string) @skipIf(sys.version_info >= (3, 0, 0), 'Test only for Python 2.7') def test_21(self): """ Test Case 21: Convert a non-bytes object into a string. Test is passed if the returned result is a string and equals the expected result. """ test_string = u"[1, 2, 3]" test_bytes = [1, 2, 3] self.assertIsInstance(to_str(test_bytes), unicode) self.assertSequenceEqual(to_str(test_bytes), test_string)
33.929577
96
0.622146
1,308
9,636
4.441132
0.073395
0.086762
0.072302
0.067481
0.870546
0.870546
0.870029
0.870029
0.870029
0.867619
0
0.024627
0.283624
9,636
283
97
34.04947
0.816891
0.319842
0
0.707317
0
0
0.076558
0
0
0
0
0
0.341463
1
0.170732
false
0
0.02439
0
0.203252
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
9e29d8be3beb59af32bf418247437613fec66d03
85
py
Python
nnet/__init__.py
zhaoyan1117/NeuralNet
a0343dd469e981bf9b4f18db0209ca9bfaf58c4f
[ "BSD-2-Clause" ]
null
null
null
nnet/__init__.py
zhaoyan1117/NeuralNet
a0343dd469e981bf9b4f18db0209ca9bfaf58c4f
[ "BSD-2-Clause" ]
null
null
null
nnet/__init__.py
zhaoyan1117/NeuralNet
a0343dd469e981bf9b4f18db0209ca9bfaf58c4f
[ "BSD-2-Clause" ]
null
null
null
from ._neural_net_builder import NeuralNetBuilder from ._neural_net import NeuralNet
28.333333
49
0.882353
11
85
6.363636
0.636364
0.285714
0.371429
0
0
0
0
0
0
0
0
0
0.094118
85
2
50
42.5
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
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
9e8a1900a444aaddeb7114485731ecd7012d079f
11,885
py
Python
library/fairIsleStiffFxn.py
kausalyamahadevan/knitout-frontend-py
1a0414a88db698383dda7e9b45ec1293948b369b
[ "MIT" ]
null
null
null
library/fairIsleStiffFxn.py
kausalyamahadevan/knitout-frontend-py
1a0414a88db698383dda7e9b45ec1293948b369b
[ "MIT" ]
null
null
null
library/fairIsleStiffFxn.py
kausalyamahadevan/knitout-frontend-py
1a0414a88db698383dda7e9b45ec1293948b369b
[ "MIT" ]
null
null
null
#makes a two color fair isle to change knit stiffness import math import numpy as np #has an edge protect built into the function def stiffFairIsle(k,stitcharray,width,length,c1,c2,side,offset=1,edgeProtect=4): """A function to make a two color fair isle as a manner to change widthwise stiffness k: Writer stitcharray: array of ones and zeros that decides which carriers are knit width: the width of the knitting length: amount of rows (2 passes per row because two colors) c1: first carrier (knits when array is 1) c2: second carrier (knits when array is not 1) side: side where both carriers are starting on offset: how much the array changes each passes edge protect: areas on the edges that 1x1 fairisle and not longer floats""" repeatSize = len(stitcharray) totalRepeatsHoriz=int(math.ceil(float(width)/repeatSize)) ref = np.tile(stitcharray,totalRepeatsHoriz+1) #account for starting position and add first row of knitting if side == 'l': start=1 else: start=2 length=length+1 #set counter to make offset counter=0 for b in range(start, length+1): if b%2==1: #first handle first carrier for w in range(0,edgeProtect): if w%2==1: k.knit('+',('f',w),c1) else: k.miss('+',('f',w),c1) for w in range(edgeProtect,width-edgeProtect): if ref[w+counter]==1: k.knit('+',('f',w),c1) else: k.miss('+',('f',w),c1) for w in range(width-edgeProtect,width): if w%2==1: k.knit('+',('f',w),c1) else: k.miss('+',('f',w),c1) #next handle second carrier for w in range(0,edgeProtect): if w%2==1: k.miss('+',('f',w),c2) else: k.knit('+',('f',w),c2) for w in range(edgeProtect,width-edgeProtect): if ref[w+counter]==1: k.miss('+',('f',w),c2) else: k.knit('+',('f',w),c2) for w in range(width-edgeProtect,width): if w%2==1: k.miss('+',('f',w),c2) else: k.knit('+',('f',w),c2) else: #first handle first carrier for w in range(width-1,width-edgeProtect-1,-1): if w%2==1: k.miss('-',('f',w),c1) else: k.knit('-',('f',w),c1) for w in range(width-edgeProtect-1,edgeProtect-1,-1): if ref[w+counter]==1: k.knit('-',('f',w),c1) else: k.miss('-',('f',w),c1) for w in range(edgeProtect-1,-1,-1): if w%2==1: k.miss('-',('f',w),c1) else: k.knit('-',('f',w),c1) #next handle second carrier for w in range(width-1,width-edgeProtect-1,-1): if w%2==1: k.knit('-',('f',w),c2) else: k.miss('-',('f',w),c2) for w in range(width-edgeProtect-1,edgeProtect-1,-1): if ref[w+counter]==1: k.miss('-',('f',w),c2) else: k.knit('-',('f',w),c2) for w in range(edgeProtect-1,-1,-1): if w%2==1: k.knit('-',('f',w),c2) else: k.miss('-',('f',w),c2) counter=counter+offset if counter>=repeatSize: counter=0 def stiffFairIsleArray(k,stitcharray,start,finish,length,c1,c2,side='l',bed='f',offset=1,current=0): """A function to make a two color fair isle as a manner to change widthwise stiffness within a set stitch range k: Writer stitcharray: array of ones and zeros that decides which carriers are knit start: the first needle to be knit finish: the needle after the last needle to be knit length: amount of rows (2 passes per row because two colors) c1: first carrier (knits when array is 1) c2: second carrier (knits when array is not 1) side: side where both carriers are starting on ('l' is default) bed: what bed the knitting will be on ('f' is default) offset: how much the array changes each passes (1 is default) current: current offset when beginning using the function (used when called multiple times) (0 is default)""" #tells how much the checkerboard fair isle #to protect edge should be repeatSize = len(stitcharray) totalRepeatsHoriz=int(math.ceil(float(finish-start)/repeatSize)) ref = np.tile(stitcharray,totalRepeatsHoriz+2) #account for starting position and add first row of knitting if side == 'l': beg=1 else: beg=2 length=length+1 #set counter to make offset current=current%repeatSize counter=offset+current-1 for b in range(beg, length+1): if counter>=repeatSize: counter=0 if b%2==1: for w in range(start,finish): if ref[w+counter]==1: k.knit('+',(bed,w),c1) else: k.miss('+',(bed,w),c1) #next handle second carrier for w in range(start,finish): if ref[w+counter]==1: k.miss('+',(bed,w),c2) else: k.knit('+',(bed,w),c2) else: #first handle first carrier for w in range(finish-1,start-1,-1): if ref[w+counter]==1: k.knit('-',(bed,w),c1) else: k.miss('-',(bed,w),c1) #handle second carrier for w in range(finish-1,start-1,-1): if ref[w+counter]==1: k.miss('-',(bed,w),c2) else: k.knit('-',(bed,w),c2) counter=counter+offset def stiffFairIsleArraySided(k,stitcharray,start,finish,length,c1,c2,c1side='l',c2side='l',bed='f',offset=1): """A function to make a two color fair isle as a manner to change widthwise stiffness in a set range. Allows carrier to start on different sides k: Writer stitcharray: array of ones and zeros that decides which carriers are knit start: the first needle to be knit finish: the needle after the last needle to be knit length: amount of rows (2 passes per row because two colors) c1: first carrier (knits when array is 1) c2: second carrier (knits when array is not 1) c1side: side where carrier 1 starts on ('l' is default) c2side: side where carrier 2 starts on ('l' is default) bed: what bed the knitting will be on ('f' is default) offset: how much the array changes each passes (1 is default) """ #tells how much the checkerboard fair isle #allows the fair isle to be sided #tells how much the checkerboard fair isle #to protect edge should be repeatSize = len(stitcharray) totalRepeatsHoriz=int(math.ceil(float(finish-start)/repeatSize)) ref = np.tile(stitcharray,totalRepeatsHoriz+2) #account for starting position and add first row of knitting if c1side == 'l': beg=1 else: beg=2 length=length+1 #set counter to make offset counter=0 for b in range(beg, length+1): if b%2==1: for w in range(start,finish): if ref[w+counter]==1: k.knit('+',(bed,w),c1) else: k.miss('+',(bed,w),c1) #next handle second carrier if c1side==c2side: for w in range(start,finish): if ref[w+counter]==1: k.miss('+',(bed,w),c2) else: k.knit('+',(bed,w),c2) else: for w in range(finish-1,start-1,-1): if ref[w+counter]==1: k.miss('-',(bed,w),c2) else: k.knit('-',(bed,w),c2) else: #first handle first carrier for w in range(finish-1,start-1,-1): if ref[w+counter]==1: k.knit('-',(bed,w),c1) else: k.miss('-',(bed,w),c1) #handle second carrier if c1side==c2side: for w in range(finish-1,start-1,-1): if ref[w+counter]==1: k.miss('-',(bed,w),c2) else: k.knit('-',(bed,w),c2) else: for w in range(start,finish): if ref[w+counter]==1: k.miss('+',(bed,w),c2) else: k.knit('+',(bed,w),c2) counter=counter+offset if counter>=repeatSize: counter=0 def missArray(k,misses,stitches,start,finish,length,c1,side='l',bed='f',offset=1,current=0): #make stitch array based on number of stitches and misses stitcharray=np.concatenate([np.ones(stitches,int),np.zeros(misses,int)]) repeatSize = len(stitcharray) totalRepeatsHoriz=int(math.ceil(float(finish-start)/repeatSize)) ref = np.tile(stitcharray,totalRepeatsHoriz+2) #account for starting position and add first row of knitting if side == 'l': beg=1 else: beg=2 length=length+1 #set counter to make offset current=current%repeatSize counter=offset+current-1 for b in range(beg, length+1): if counter>=repeatSize: counter=0 if b%2==1: for w in range(start,finish): if w==start or w==finish-1: k.knit('+',(bed,w),c1) elif ref[w+counter]==1: k.knit('+',(bed,w),c1) else: k.miss('+',(bed,w),c1) else: #first handle first carrier for w in range(finish-1,start-1,-1): if w==start or w==finish-1: k.knit('-',(bed,w),c1) elif ref[w+counter]==1: k.knit('-',(bed,w),c1) else: k.miss('-',(bed,w),c1) counter=counter+offset def ribKnitRange(k,ribarray,beg,fin,length,c,side='l',bed1='f',n0=0): if bed1=='f': bed0='b' else: bed0='f' repeatSize = len(ribarray) totalRepeatsHoriz=int(math.ceil(float(fin-beg)/repeatSize)) ref = np.tile(ribarray,totalRepeatsHoriz+2) #account for starting position and add first row of knitting if side == 'r': start = 1 length = length+1 else: start = 0 for h in range(start,length): if h%2 ==0: for s in range(beg,fin): if ref[s] == 1: k.knit('+',(bed1,s+n0),c) else: k.knit('+',(bed0,s+n0),c) else: for s in range(fin-1,beg-1,-1): if ref[s] == 1: k.knit('-',(bed1,s+n0),c) else: k.knit('-',(bed0,s+n0),c) def rib2ribXferRange(k,ribarray1,ribarray2,start,finish,repeats=1): ribsize = len(ribarray1) w = ribsize*repeats ref1 = np.tile(ribarray1,repeats) ref2 = np.tile(ribarray2,repeats) xferref = ref1-ref2 # 0: do not transfer. 1: back to front -1: front to back for s in range(start,finish): if xferref[s] == 1: k.xfer(('b',s),('f',s)) elif xferref[s] == -1: k.xfer(('f',s),('b',s))
30.790155
115
0.504081
1,588
11,885
3.77267
0.106423
0.037389
0.024036
0.044066
0.808713
0.786346
0.776498
0.765482
0.737273
0.729928
0
0.032374
0.365839
11,885
385
116
30.87013
0.762505
0.253597
0
0.82906
0
0
0.011388
0
0
0
0
0
0
1
0.025641
false
0
0.008547
0
0.034188
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
9eaca60769087b558eca1c8a9b04a0a2faa8cd80
144
py
Python
template/LowerCase.py
cobranail/dencodefun
1451441ad8b5340dbad1410bc94b25cb6f80a208
[ "MIT" ]
null
null
null
template/LowerCase.py
cobranail/dencodefun
1451441ad8b5340dbad1410bc94b25cb6f80a208
[ "MIT" ]
null
null
null
template/LowerCase.py
cobranail/dencodefun
1451441ad8b5340dbad1410bc94b25cb6f80a208
[ "MIT" ]
null
null
null
setting={ } def encode(content='', setting={}): return content.lower() def decode(content='', setting={}): return content.upper()
11.076923
35
0.618056
15
144
5.933333
0.533333
0.314607
0.449438
0.606742
0
0
0
0
0
0
0
0
0.180556
144
12
36
12
0.754237
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
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
0
0
1
1
0
0
7
7b8a89c8ace148329c2d14134b4f85c5aa086e21
24,062
py
Python
tests/unit_tests/helper_functions/test_data_preparation_helper_functions.py
ejgenc/Data-Analysis_Istanbul-Health-Tourism
34b9838690ca640c6a7a60f63eb2f51983ec46ef
[ "MIT" ]
1
2020-11-18T15:27:53.000Z
2020-11-18T15:27:53.000Z
tests/unit_tests/helper_functions/test_data_preparation_helper_functions.py
ejgenc/Data-Analysis_Istanbul-Health-Tourism
34b9838690ca640c6a7a60f63eb2f51983ec46ef
[ "MIT" ]
null
null
null
tests/unit_tests/helper_functions/test_data_preparation_helper_functions.py
ejgenc/Data-Analysis_Istanbul-Health-Tourism
34b9838690ca640c6a7a60f63eb2f51983ec46ef
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ------ What is this file? ------ This test module contains some tests for the data_preparation_helper_functions.py script. The script can be found at: src/helper_functions/data_preparation_helper_functions.py """ #%% --- Import Required Packages --- import os from pathlib import Path # To wrap around filepaths import pytest import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from src.helper_functions import data_preparation_helper_functions as functions from numpy import arange #%% --- Set proper directory to assure integration with doit --- abspath = os.path.abspath(__file__) dname = os.path.dirname(abspath) os.chdir(dname) #%% --- Create mock test objects --- #%% --- Normal dataframe --- #Create a random seed np.random.seed([3,1415]) #Create a dataframe from random np numbers test_df = pd.DataFrame(np.random.randint(10, size=(100, 5)), columns=list('ABCDE')) #Select ten percent of each column and turn it into np.nan for col in test_df.columns: test_df.loc[test_df.sample(frac=0.1).index, col] = np.nan #%% --- null_values dataframe --- #Create 5 indexes index_names = ["column " + str(i) for i in arange(1,6) ] column_names = ["null_count"] test_null_values_df = pd.DataFrame(np.random.randint(10, size = (5,1)), columns = column_names, index = index_names) #Create 2 columns for extended column_names_extended = ["null_count","null_percentage"] #Create a 5 x 2 dataframe from random np numbers for extended null values df test_null_values_df_extended = pd.DataFrame(np.random.randint(10, size = (5,2)), columns = column_names_extended, index = index_names) #%% --- other --- test_str = "Test" test_int = 10 test_float = 10.5 test_bool = False test_sample_size_int_correct = 5 test_sample_size_int_wrong = 105 #%% --- Testing --- #%% --- Test: sample_and_read_from_df class TestSampleAndReadFromDf(object): def test_valerror_on_nondf_dataframe_str(self): test_dataframe = test_str test_sample_size = test_sample_size_int_correct expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.sample_and_read_from_df(test_dataframe, test_sample_size) error_message = "Expected following message: {}. Got the following {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_float(self): test_dataframe = test_float test_sample_size = test_sample_size_int_correct expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.sample_and_read_from_df(test_dataframe, test_sample_size) error_message = "Expected following message: {}. Got the following {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nonint_sample_size_str(self): test_dataframe = test_df test_sample_size = test_str expected_message = "sample_size must be type int, got {}".format(type(test_sample_size)) with pytest.raises(ValueError) as exception_info: functions.sample_and_read_from_df(test_dataframe, test_sample_size) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nonint_sample_size_float(self): test_dataframe = test_df test_sample_size = test_float expected_message = "sample_size must be type int, got {}".format(type(test_sample_size)) with pytest.raises(ValueError) as exception_info: functions.sample_and_read_from_df(test_dataframe, test_sample_size) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_indexerror_on_wrong_sample_size(self): test_dataframe = test_df test_sample_size = test_sample_size_int_wrong expected_message = ("dataframe length must be larger than or equal to sample_size. " "dataframe length is {}, sample_size is {}").format(len(test_dataframe), test_sample_size) with pytest.raises(IndexError) as exception_info: functions.sample_and_read_from_df(test_dataframe, test_sample_size) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message #%% --- Test: report_null_values --- #%% --- Test helper function: is_null_values_dataframe --- class TestIsNullValuesDataframe(object): def test_valerror_on_nondf_dataframe_str(self): test_dataframe = test_str expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.is_null_values_dataframe(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_bool(self): test_dataframe = test_bool expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.is_null_values_dataframe(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_on_non_null_values_dataframe(self): test_dataframe = test_df expected = False actual = functions.is_null_values_dataframe(test_dataframe) error_message = "Expected {} as output, got {}".format(expected,actual) assert expected is actual, error_message def test_on_null_values_dataframe(self): test_dataframe = test_null_values_df expected = True actual = functions.is_null_values_dataframe(test_dataframe) error_message = "Expected {} as output, got {}".format(expected,actual) assert expected is actual, error_message #%% --- Test helper function: is_extended_null_values_dataframe --- class TestIsExtendedNullValuesDataframe(object): def test_valerror_on_nondf_dataframe_str(self): test_dataframe = test_str expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.is_extended_null_values_dataframe(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_float(self): test_dataframe = test_float expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.is_extended_null_values_dataframe(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_non_null_values_dataframe(self): test_dataframe = test_df expected_message = "dataframe does not contain null_count information." with pytest.raises(ValueError) as exception_info: functions.is_extended_null_values_dataframe(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_on_null_values_dataframe(self): test_dataframe = test_null_values_df expected = False actual = functions.is_extended_null_values_dataframe(test_dataframe) error_message = "Expected {} as output, got {}".format(expected,actual) assert expected is actual, error_message def test_on_extended_null_values_dataframe(self): test_dataframe = test_null_values_df_extended expected = True actual = functions.is_extended_null_values_dataframe(test_dataframe) error_message = "Expected {} as output, got {}".format(expected,actual) assert expected is actual, error_message #%% --- Test helper function: plot_null_values_bar_chart--- class TestPlotNullValuesBarChart(object): def test_valerror_on_nondf_dataframe_str(self): test_dataframe = test_str expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.plot_null_values_bar_chart(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_bool(self): test_dataframe = test_bool expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.plot_null_values_bar_chart(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_non_null_values_dataframe(self): test_dataframe = test_df expected_message = "dataframe does not contain null_count information." with pytest.raises(ValueError) as exception_info: functions.plot_null_values_bar_chart(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_axisnumber_on_null_values_dataframe(self): test_dataframe = test_null_values_df expected = 1 actual = len(functions.plot_null_values_bar_chart(test_dataframe).axes) error_message = "Expected {} as total axis number, got {}".format(expected,actual) assert expected is actual, error_message def test_axisnumber_on_extended_null_values_dataframe(self): test_dataframe = test_null_values_df_extended expected = 2 actual = len(functions.plot_null_values_bar_chart(test_dataframe).axes) error_message = "Expected {} as total axis number, got {}".format(expected,actual) assert expected is actual, error_message def test_xticklabel_number_on_null_values_dataframe(self): test_dataframe = test_null_values_df expected = 5 actual = len(functions.plot_null_values_bar_chart(test_dataframe).axes[0].get_xticklabels()) error_message = "Expected {} total x-axis ticklabels, got {}".format(expected,actual) assert expected is actual, error_message #%% --- Test helper function: plot_null_values_matrix --- class TestPlotNullValuesMatrix(object): def test_valerror_on_nondf_dataframe_float(self): test_dataframe = test_float expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.plot_null_values_matrix(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_int(self): test_dataframe = test_int expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.plot_null_values_matrix(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message #%% --- Test subfunction: calculate_null_values --- class TestCalculateNullValues(object): def test_valerror_on_nondf_dataframe_str(self): test_dataframe = test_str expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.calculate_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_int(self): test_dataframe = test_int expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.calculate_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}" assert exception_info.match(expected_message), error_message def test_valerror_on_nonbool_calculate_percentages(self): test_dataframe = test_df test_calculate_percentages = test_str expected_message = "calculate_percentages must be type boolean True or False, got {}".format(type(test_calculate_percentages)) with pytest.raises(ValueError) as exception_info: functions.calculate_null_values(test_dataframe, test_calculate_percentages) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_column_names_for_calculate_percentages_true(self): test_dataframe = test_df expected = ["null_count", "null_percentage"] actual = list(functions.calculate_null_values(test_dataframe).columns) error_message = ("Columns are not correctly named. Expected names {}, got {}".format(expected, actual)) assert sorted(expected) == sorted(actual), error_message def test_column_names_for_calculate_percentages_false(self): test_dataframe = test_df expected = ["null_count"] actual = list(functions.calculate_null_values(test_dataframe, calculate_percentages = False).columns) error_message = ("Columns are not correctly named. Expected names {}, got {}".format(expected, actual)) assert sorted(expected) == sorted(actual), error_message def test_null_count_sum_for_calculate_percentages_true(self): test_dataframe = test_df expected = 50 actual = int(functions.calculate_null_values(test_dataframe).loc[:,"null_count"].sum()) error_message = "Sum of null_count column is not correct. Expected {}, got {}".format(expected, actual) assert expected == actual, error_message def test_null_count_sum_for_calculate_percentages_false(self): test_dataframe = test_df expected = 50 actual = int(functions.calculate_null_values(test_dataframe, calculate_percentages = False).loc[:,"null_count"].sum()) error_message = "Sum of null_count column is not correct. Expected {}, got {}".format(expected, actual) assert expected == actual, error_message def test_null_percentage_sum_for_calculate_percentages_true(self): test_dataframe = test_df expected = float(50) actual = float(functions.calculate_null_values(test_dataframe).loc[:,"null_percentage"].sum()) error_message = "Sum of null_count column is not correct. Expected {}, got {}".format(expected, actual) assert expected == actual, error_message def test_returned_is_dataframe(self): test_dataframe = test_df expected = pd.DataFrame actual = type(functions.calculate_null_values(test_dataframe)) error_message = "Return object is not correct. Expected {}, got {}".format(expected,actual) assert not isinstance(actual, expected), error_message def test_returned_dataframe_shape(self): test_dataframe = test_df expected = (5,2) actual = functions.calculate_null_values(test_dataframe).shape error_message = "Dataframe shape is wrong. Expected {}, got {}".format(expected, actual) assert expected == actual, error_message #%% --- Test subfunction: print_null_values --- class TestPrintNullValues(object): def test_valerror_on_nondf_dataframe_int(self): test_dataframe = test_int expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.print_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_float(self): test_dataframe = test_float expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.print_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_non_null_values_dataframe(self): test_dataframe = test_df expected_message = "dataframe does not contain null_count information." with pytest.raises(ValueError) as exception_info: functions.print_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message #%% --- Test subfunction: visualize_null_values --- class TestVisualizeNullValues(object): def test_valerror_on_nondf_dataframe_bool(self): test_dataframe = test_bool expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.visualize_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_int(self): test_dataframe = test_int expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.visualize_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_non_null_values_dataframe(self): test_dataframe = test_df expected_message = "dataframe does not contain null_count information." with pytest.raises(ValueError) as exception_info: functions.visualize_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_invalid_kind_str(self): test_dataframe = test_null_values_df test_kind = "invalid_kind" expected_message = "Parameter kind must be a string and one of bar_chart, matrix or heatmap. Got \"{}\" as type {}.".format(str(test_kind), type(test_kind)) with pytest.raises(ValueError) as exception_info: functions.visualize_null_values(test_dataframe, kind = test_kind) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message #%% --- Test main function: report_null_values --- class TestReportNullValues(object): def test_valerror_on_nondf_dataframe_bool(self): test_dataframe = test_bool expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.report_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_nondf_dataframe_int(self): test_dataframe = test_int expected_message = "dataframe must be type pd.DataFrame, got {}".format(type(test_dataframe)) with pytest.raises(ValueError) as exception_info: functions.report_null_values(test_dataframe) error_message = "Expected the following message: {}. Got the following: {}".format(expected_message, exception_info) assert exception_info.match(expected_message), error_message def test_valerror_on_two_parameters_true(self): test_dataframe = test_df test_parameter_visualize_results = True test_parameter_print_results = True expected_message = "Parameters visualize_results and print_results cannot be both boolean True." with pytest.raises(ValueError) as exception_info: functions.report_null_values(test_dataframe, visualize_results = test_parameter_visualize_results, print_results = test_parameter_print_results) assert exception_info.match(expected_message), error_message def test_returned_is_dataframe_on_calculate_percentages_true(self): test_dataframe = test_df expected = pd.DataFrame actual = type(functions.report_null_values(test_dataframe, calculate_percentages = True)) error_message = "Return object is not correct. Expected {}, got {}".format(expected,actual) assert not isinstance(actual, expected), error_message def test_returned_is_dataframe_on_calculate_percentages_false(self): test_dataframe = test_df expected = pd.DataFrame actual = type(functions.report_null_values(test_dataframe, calculate_percentages = False)) error_message = "Return object is not correct. Expected {}, got {}".format(expected,actual) assert not isinstance(actual, expected), error_message
52.767544
164
0.711828
2,875
24,062
5.627478
0.073043
0.085976
0.053588
0.057111
0.855986
0.838494
0.826751
0.821682
0.80555
0.790407
0
0.002567
0.206674
24,062
455
165
52.883516
0.844989
0.05357
0
0.718023
0
0
0.165655
0.000923
0
0
0
0
0.127907
1
0.127907
false
0
0.026163
0
0.180233
0.017442
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
7bcaf2b44be9b4afbd6bd72dba04292e87531422
24,705
py
Python
v0/aia_eis_v0/goa/swarm_based/ant_colony/aco_continuous_domain/aco_cd.py
DreamBoatOve/aia_eis
458b4d29846669b10db4da1b3e86c0b394614ceb
[ "MIT" ]
1
2022-03-02T12:57:19.000Z
2022-03-02T12:57:19.000Z
v0/aia_eis_v0/goa/swarm_based/ant_colony/aco_continuous_domain/aco_cd.py
DreamBoatOve/aia_eis
458b4d29846669b10db4da1b3e86c0b394614ceb
[ "MIT" ]
null
null
null
v0/aia_eis_v0/goa/swarm_based/ant_colony/aco_continuous_domain/aco_cd.py
DreamBoatOve/aia_eis
458b4d29846669b10db4da1b3e86c0b394614ceb
[ "MIT" ]
null
null
null
import copy import random import math from time import perf_counter import os import sys sys.path.append('../../../../') from utils.file_utils.filename_utils import get_ecm_num_str, get_Num_len from data_processor.GOA_simulation.GOA_ECMs_simulation import load_sim_ecm_para_config_dict from goa.GOA_criterions import goa_criterion_pack from GA_pack.fittness_functions.eis_fitness import cal_EIS_WSE_fitness_1 class aco_co_do: """ Refer paper0: Ant colony optimization in continuous domain """ class Ant: def __init__(self, limits_list): self.limits_list = limits_list self.s_list = self.initialize() def initialize(self): s_list = [] for limit in self.limits_list: minimum = limit[0] maximum = limit[1] s_list.append(random.uniform(minimum, maximum)) return s_list def __init__(self, limits_list, m, iter_time, q=0.0001, epsilon=0.85): """ :param limits_list: record the minimum and maximum of each variable m: the number of ants created in each iteration k: the number of ants stored in the archive q: q*k = stdandard deviation σ, 0.0001 is taken as default value from paper 'Ant colony optimization for continuous domains' iter_time: epsilon: 0.85 is taken as default value from paper 'Ant colony optimization for continuous domains' """ self.limits_list = limits_list self.m = m self.k = len(limits_list) self.iter_time = iter_time self.q = q self.epsilon = epsilon # Initialize the ant colony (number K in the Archive) and calculate their fitness according to the given 'FITNESS FUNCTION' self.t_ants_list = [self.Ant(self.limits_list) for i in range(self.k)] self.t_fitness_list = self.cal_fitness(ants_list=self.t_ants_list, fitness_type='rosenbrock') self.t_rank_list, self.t_weight_list = self.cal_weight(self.t_fitness_list) def cal_fitness(self, ants_list, fitness_type='rosenbrock'): fitness_list = [] if fitness_type == 'rosenbrock': from GA_pack.fittness_functions.rosenbrock_fitness import rosenbrock for ant in ants_list: x1, x2 = ant.s_list fitness_list.append(rosenbrock(x1, x2).get_rosenbrock_fitness()) return fitness_list def cal_weight(self, fitness_list): # index might be 0, so add 1 # Note: sorted in ascending order (reverse=False, default) [1,2,3,...], should be modified to descending order (reverse=True) [... , 3,2,1] rank_list = [index + 1 for index, value in sorted(list(enumerate(fitness_list)), key=lambda x : x[1], reverse=True)] weight_list = [] for rank in rank_list: w = (1 / (self.q * self.k * math.sqrt(2 * math.pi))) * (math.e ** (-(pow(rank - 1, 2)) / (2 * pow(self.q*self.k, 2)))) weight_list.append(w) return rank_list, weight_list def pdf_generator(self, s_index): # Use roulette wheel to select an ant in the archive wheel = sum(self.t_weight_list) wheel_pointer = random.uniform(0, wheel) current_wheel_pointer = 0.0 selected_index = None for index, weight in enumerate(self.t_weight_list): current_wheel_pointer += weight if current_wheel_pointer > wheel_pointer: selected_index = index # Build the Gaussian function mu = self.t_ants_list[selected_index].s_list[s_index] sigma = self.epsilon * (sum([ant.s_list[s_index] for ant in self.t_ants_list]) - mu) / (self.k - 1) s_value = float('inf') while (s_value <= self.limits_list[s_index][0]) | (s_value >= self.limits_list[s_index][1]): s_value = random.gauss(mu, sigma) return s_value def update_archive(self, ants_list, fitness_list): ants_fitness_list = [(ant, fitness) for ant, fitness in sorted(zip(ants_list, fitness_list), key=lambda x: x[1], reverse=True)] self.t_ants_list = [ant_fitness[0] for ant_fitness in ants_fitness_list] self.t_fitness_list = [ant_fitness[1] for ant_fitness in ants_fitness_list] self.t_rank_list, self.t_weight_list = self.cal_weight(self.t_fitness_list) def iteration(self): for iter in range(self.iter_time): tmp_ants_list = [] for a in range(self.m): ant = self.Ant(self.limits_list) s_list = [] for s_index in range(len(self.limits_list)): s_value = self.pdf_generator(s_index) s_list.append(s_value) ant.s_list = s_list tmp_ants_list.append(ant) tmp_fitness_list = self.cal_fitness(tmp_ants_list) # Update the ants in the archive according to their rank self.update_archive(ants_list=self.t_ants_list + tmp_ants_list, fitness_list=self.t_fitness_list + tmp_fitness_list) # After the iteration, select the ant with the highest fitness from the archive best_ant, highest_fitness = sorted(zip(self.t_ants_list, self.t_fitness_list), key=lambda x : x[1], reverse=True)[0] return best_ant, highest_fitness # if __name__ == '__main__': # Test with the 'ROSENBROCK FUNCTION' # rosenbrock_limits_list = [[-2.048, 2.048],[-2.048, 2.048]] # acs_cd = aco_co_do(limits_list=rosenbrock_limits_list, m=200, iter_time=50) # best_ant, highest_fitness = acs_cd.iteration() # print('Best ant:', best_ant.s_list) # print('Highest fitness:', highest_fitness) """ R(RC)_IS_lin-kk_res.txt m = 50; iter_time = 50 Best ant: [2.0072932014469274, -2.0397597012679958] Highest fitness: 3684.2733796560315 m = 50; iter_time = 100 Best ant: [2.0342360590903366, -2.0005746428561917] Highest fitness: 3769.422347563795 m = 50; iter_time = 500 Best ant: [2.0402568215296424, -2.0371961701065997] Highest fitness: 3844.8887808882205 m = 100; iter_time = 50 Best ant: [-2.0247131223978547, -2.023590690219659] Highest fitness: 3758.32781802765 m = 200; iter_time = 50 Best ant: [2.0355266672204557, -2.013497491655291] Highest fitness: 3791.7725847761553 """ def ACO_CD_EIS_fitness_function(exp_data_dict, ECM_paras_list): """ Function: The original ACO finds the MAXIMUM in search space. Now I use ACO to search MINIMUM fitness. So I have to modify my EIS_fitness_function (cal_EIS_WSE_fitness_1, the smaller, the better) as its inversely proportional version: = 1 / cal_EIS_WSE_fitness_1 Be attention to the situation when cal_EIS_WSE_fitness_1 returns 0.0 """ eis_fitness = cal_EIS_WSE_fitness_1(exp_data_dict, ECM_paras_list) if eis_fitness < 1e-25: eis_fitness = 1e-25 ant_fitness = 1.0 / eis_fitness return ant_fitness class ACO_CD_EIS: """ Ant colony optimization in continuous domain Fitting EIS """ class Ant: def __init__(self, limits_list): self.limits_list = limits_list # s_list is the same as position_list in other GOAs self.s_list = self.initialize() def initialize(self): s_list = [] for limit in self.limits_list: minimum = limit[0] maximum = limit[1] s_list.append(random.uniform(minimum, maximum)) return s_list def __init__(self, exp_data_dict, m, iter_time, q=0.0001, epsilon=0.85, fitness_function=ACO_CD_EIS_fitness_function): """ :param exp_data_dict: 包含EIS参数拟合的标准信息 ECM型号 'ecm_num', ecm_num 各元件的参数取值范围 'limit', limits_list 测试/模拟频率 'f', fre_list 测试/模拟所得复数阻抗 'z_sim' or 'z_raw', z_simulated/raw_complex_list iter_time: 人为设定的算法最大迭代次数 m: the number of ants created in each iteration k: the number of ants stored in the archive q: q * k = standard deviation σ, 0.0001 is taken as default value from paper 'Ant colony optimization for continuous domains' epsilon: 0.85 is taken as default value from paper 'Ant colony optimization for continuous domains' """ self.exp_data_dict = exp_data_dict self.limits_list = exp_data_dict['limit'] self.fitness_function = fitness_function self.m = m self.k = len(self.limits_list) self.iter_time = iter_time self.q = q self.epsilon = epsilon # Initialize the ant colony (number K in the Archive) and calculate their fitness according to the given 'FITNESS FUNCTION' self.t_ants_list = [self.Ant(self.limits_list) for i in range(self.k)] self.t_fitness_list = [self.fitness_function(self.exp_data_dict, ant.s_list) for ant in self.t_ants_list] self.t_rank_list, self.t_weight_list = self.cal_weight(self.t_fitness_list) def cal_weight(self, fitness_list): # Note: sorted in ascending order (reverse=False, default) [1, 2, 3,...], # should be modified to descending order (reverse=True) [... , 3, 2, 1] """ "index + 1" means what? In the below calculation of weight of each Ant, it involves a step "power(rank(index) - 1, 2)". To make the step mathematically meaningful, rank(or index) is at least as 1 """ rank_list = [index + 1 for index, value in sorted(list(enumerate(fitness_list)), key=lambda x : x[1], reverse=True)] weight_list = [] for rank in rank_list: w = (1 / (self.q * self.k * math.sqrt(2 * math.pi))) * (math.e ** (-(pow(rank - 1, 2)) / (2 * pow(self.q * self.k, 2)))) weight_list.append(w) return rank_list, weight_list def pdf_generator(self, s_index): # Use roulette wheel to select an ant in the archive wheel = sum(self.t_weight_list) wheel_pointer = random.uniform(0, wheel) current_wheel_pointer = 0.0 selected_index = None for index, weight in enumerate(self.t_weight_list): current_wheel_pointer += weight if current_wheel_pointer > wheel_pointer: selected_index = index # Build the Gaussian function mu = self.t_ants_list[selected_index].s_list[s_index] sigma = self.epsilon * (sum([ant.s_list[s_index] for ant in self.t_ants_list]) - mu) / (self.k - 1) # s_value, like a x in position_list=[x0, x1, x2, ...] s_value = float('inf') # Constrain the range of s_value(or x) while (s_value <= self.limits_list[s_index][0]) | (s_value >= self.limits_list[s_index][1]): s_value = random.gauss(mu, sigma) return s_value def update_archive(self, ants_list, fitness_list): ants_fitness_list = [(ant, fitness) for ant, fitness in sorted(zip(ants_list, fitness_list), key=lambda x: x[1], reverse=True)] self.t_ants_list = [ant_fitness[0] for ant_fitness in ants_fitness_list] self.t_fitness_list = [ant_fitness[1] for ant_fitness in ants_fitness_list] self.t_rank_list, self.t_weight_list = self.cal_weight(self.t_fitness_list) # def iteration(self): def search(self): global_best_ant_list = [] continue_criterion = True iter = 0 while continue_criterion: tmp_ants_list = [] for a in range(self.m): ant = self.Ant(self.limits_list) s_list = [] for s_index in range(len(self.limits_list)): s_value = self.pdf_generator(s_index) s_list.append(s_value) ant.s_list = s_list tmp_ants_list.append(ant) tmp_fitness_list = [self.fitness_function(self.exp_data_dict, ant.s_list) for ant in tmp_ants_list] # Update the ants in the archive according to their rank self.update_archive(ants_list=self.t_ants_list + tmp_ants_list, fitness_list=self.t_fitness_list + tmp_fitness_list) # After one iteration, select the ant with the highest fitness from the archive tmp_best_ant, tmp_highest_fitness = sorted(zip(self.t_ants_list, self.t_fitness_list), key=lambda x: x[1], reverse=True)[0] global_best_ant_list.append(copy.deepcopy(tmp_best_ant)) # There are two entities only after at least two iteration # If there is global_best_entity_list, use it, # If not, use current_best_entity_list to replace if iter >= 1: x_lists_list = [copy.deepcopy(global_best_ant_list[-2].s_list), copy.deepcopy(global_best_ant_list[-1].s_list)] goa_criterion, chi_squared = goa_criterion_pack(x_lists_list=x_lists_list, iter=iter, max_iter_time=self.iter_time, data_dict=self.exp_data_dict) if goa_criterion: continue_criterion = False iter += 1 # After the iteration, select the ant with the highest fitness from the archive # best_ant, highest_fitness = sorted(zip(self.t_ants_list, self.t_fitness_list), key=lambda x : x[1], reverse=True)[0] return global_best_ant_list, iter, chi_squared class ACO_CD_EIS_access: """ Ant colony optimization in continuous domain Fitting EIS """ class Ant: def __init__(self, limits_list): self.limits_list = limits_list # s_list is the same as position_list in other GOAs self.s_list = self.initialize() def initialize(self): s_list = [] for limit in self.limits_list: minimum = limit[0] maximum = limit[1] s_list.append(random.uniform(minimum, maximum)) return s_list def __init__(self, exp_data_dict, m, iter_time, q=0.0001, epsilon=0.85, fitness_function=ACO_CD_EIS_fitness_function): """ :param exp_data_dict: 包含EIS参数拟合的标准信息 ECM型号 'ecm_num', ecm_num 各元件的参数取值范围 'limit', limits_list 测试/模拟频率 'f', fre_list 测试/模拟所得复数阻抗 'z_sim' or 'z_raw', z_simulated/raw_complex_list iter_time: 人为设定的算法最大迭代次数 m: the number of ants created in each iteration k: the number of ants stored in the archive q: q * k = standard deviation σ, 0.0001 is taken as default value from paper 'Ant colony optimization for continuous domains' epsilon: 0.85 is taken as default value from paper 'Ant colony optimization for continuous domains' """ self.exp_data_dict = exp_data_dict self.limits_list = exp_data_dict['limit'] self.fitness_function = fitness_function self.m = m self.k = len(self.limits_list) self.iter_time = iter_time self.q = q self.epsilon = epsilon # Initialize the ant colony (number K in the Archive) and calculate their fitness according to the given 'FITNESS FUNCTION' self.t_ants_list = [self.Ant(self.limits_list) for i in range(self.k)] self.t_fitness_list = [self.fitness_function(self.exp_data_dict, ant.s_list) for ant in self.t_ants_list] self.t_rank_list, self.t_weight_list = self.cal_weight(self.t_fitness_list) def cal_weight(self, fitness_list): # Note: sorted in ascending order (reverse=False, default) [1, 2, 3,...], # should be modified to descending order (reverse=True) [... , 3, 2, 1] """ "index + 1" means what? In the below calculation of weight of each Ant, it involves a step "power(rank(index) - 1, 2)". To make the step mathematically meaningful, rank(or index) is at least as 1 """ rank_list = [index + 1 for index, value in sorted(list(enumerate(fitness_list)), key=lambda x : x[1], reverse=True)] weight_list = [] for rank in rank_list: w = (1 / (self.q * self.k * math.sqrt(2 * math.pi))) * (math.e ** (-(pow(rank - 1, 2)) / (2 * pow(self.q * self.k, 2)))) weight_list.append(w) return rank_list, weight_list def pdf_generator(self, s_index): # Use roulette wheel to select an ant in the archive wheel = sum(self.t_weight_list) wheel_pointer = random.uniform(0, wheel) current_wheel_pointer = 0.0 selected_index = None for index, weight in enumerate(self.t_weight_list): current_wheel_pointer += weight if current_wheel_pointer > wheel_pointer: selected_index = index # Build the Gaussian function mu = self.t_ants_list[selected_index].s_list[s_index] sigma = self.epsilon * (sum([ant.s_list[s_index] for ant in self.t_ants_list]) - mu) / (self.k - 1) # s_value, like a x in position_list=[x0, x1, x2, ...] s_value = float('inf') # Constrain the range of s_value(or x) while (s_value <= self.limits_list[s_index][0]) | (s_value >= self.limits_list[s_index][1]): s_value = random.gauss(mu, sigma) return s_value def update_archive(self, ants_list, fitness_list): ants_fitness_list = [(ant, fitness) for ant, fitness in sorted(zip(ants_list, fitness_list), key=lambda x: x[1], reverse=True)] self.t_ants_list = [ant_fitness[0] for ant_fitness in ants_fitness_list] self.t_fitness_list = [ant_fitness[1] for ant_fitness in ants_fitness_list] self.t_rank_list, self.t_weight_list = self.cal_weight(self.t_fitness_list) def search(self, res_fn, start_time): global_best_ant_list = [] continue_criterion = True iter = 0 while continue_criterion: tmp_ants_list = [] for a in range(self.m): ant = self.Ant(self.limits_list) s_list = [] for s_index in range(len(self.limits_list)): s_value = self.pdf_generator(s_index) s_list.append(s_value) ant.s_list = s_list tmp_ants_list.append(ant) tmp_fitness_list = [self.fitness_function(self.exp_data_dict, ant.s_list) for ant in tmp_ants_list] # Update the ants in the archive according to their rank self.update_archive(ants_list=self.t_ants_list + tmp_ants_list, fitness_list=self.t_fitness_list + tmp_fitness_list) # After one iteration, select the ant with the highest fitness from the archive tmp_best_ant, tmp_highest_fitness = sorted(zip(self.t_ants_list, self.t_fitness_list), key=lambda x: x[1], reverse=True)[0] global_best_ant_list.append(copy.deepcopy(tmp_best_ant)) # There are two entities only after at least two iteration # If there is global_best_entity_list, use it, # If not, use current_best_entity_list to replace if iter >= 1: x_lists_list = [copy.deepcopy(global_best_ant_list[-2].s_list), copy.deepcopy(global_best_ant_list[-1].s_list)] goa_criterion, chi_squared = goa_criterion_pack(x_lists_list=x_lists_list,\ iter=iter, \ max_iter_time=self.iter_time, \ data_dict=self.exp_data_dict, \ CS_limit=1e-70) # Write R(RC)_IS_lin-kk_res.txt into a txt file # R(RC)_IS_lin-kk_res.txt = iter_time + fitted_para_list + Chi-Squared + Code running time with open(res_fn, 'a+') as file: line = str(iter) + ',['\ + ','.join([str(para) for para in global_best_ant_list[-1].s_list]) \ + '],' + str(chi_squared) + ',' + str(perf_counter() - start_time) + '\n' file.write(line) if goa_criterion: continue_criterion = False iter += 1 def access_ACO_CD_EIS(ecm_num, range_pair): # counter = 0 # # Iterate on 9 ECMs # for i in range(1, 10): # ecm_sim_folder = '../../../../datasets/goa_datasets/simulated' # ecm_num = i # ecm_num_str = get_ecm_num_str(ecm_num) # file_path = os.path.join(ecm_sim_folder, 'ecm_' + ecm_num_str) # sim_ecm = load_sim_ecm_para_config_dict(ecm_num, file_path) # para_num = len(sim_ecm['para']) # # # Iterate for 100 times # for j in range(100): # t_start = perf_counter() # # ------------------------------ Change GOA name ------------------------------ # goa = ACO_CD_EIS_access(exp_data_dict=sim_ecm, m=10*para_num, iter_time=10000) # res_fn = 'aco_ecm{0}_'.format(i) + get_Num_len(num=j, length=2) + '.txt' # # ------------------------------ Change GOA name ------------------------------ # goa.search(res_fn, start_time=t_start) # # counter += 1 # print('ACO left: {0}'.format(900 - counter)) print('ACO starts to fit ECM{0}'.format(ecm_num)) counter = 0 ecm_sim_folder = '../../../../datasets/goa_datasets/simulated' ecm_num_str = get_ecm_num_str(ecm_num) file_path = os.path.join(ecm_sim_folder, 'ecm_' + ecm_num_str) sim_ecm = load_sim_ecm_para_config_dict(ecm_num, file_path) para_num = len(sim_ecm['para']) # Iterate for 100 times # for j in range(100): for j in range(range_pair[0], range_pair[1]): t_start = perf_counter() # ------------------------------ Change GOA name ------------------------------ goa = ACO_CD_EIS_access(exp_data_dict=sim_ecm, m=10*para_num, iter_time=2000) res_fn = 'aco_ecm{0}_'.format(ecm_num) + get_Num_len(num=j, length=2) + '.txt' # ------------------------------ Change GOA name ------------------------------ goa.search(res_fn, start_time=t_start) counter += 1 print('ACO on ECM{0}-{1}~{2} left: {3}'.format(ecm_num, range_pair[0], range_pair[1], len(range(range_pair[0], range_pair[1])) - counter)) # ECM-4 # access_ACO_CD_EIS(ecm_num=4, range_pair=[0, 20]) # access_ACO_CD_EIS(ecm_num=4, range_pair=[20, 40]) # access_ACO_CD_EIS(ecm_num=4, range_pair=[40, 60]) # access_ACO_CD_EIS(ecm_num=4, range_pair=[60, 80]) # access_ACO_CD_EIS(ecm_num=4, range_pair=[80, 100]) # ECM-5 # access_ACO_CD_EIS(ecm_num=5, range_pair=[0, 20]) # access_ACO_CD_EIS(ecm_num=5, range_pair=[20, 40]) # access_ACO_CD_EIS(ecm_num=5, range_pair=[40, 60]) # access_ACO_CD_EIS(ecm_num=5, range_pair=[60, 80]) # access_ACO_CD_EIS(ecm_num=5, range_pair=[80, 100]) # ECM-6 # access_ACO_CD_EIS(ecm_num=6, range_pair=[0, 20]) # access_ACO_CD_EIS(ecm_num=6, range_pair=[20, 40]) # access_ACO_CD_EIS(ecm_num=6, range_pair=[40, 60]) # access_ACO_CD_EIS(ecm_num=6, range_pair=[60, 80]) # access_ACO_CD_EIS(ecm_num=6, range_pair=[80, 100]) # ECM-7 # access_ACO_CD_EIS(ecm_num=7, range_pair=[0, 20]) # access_ACO_CD_EIS(ecm_num=7, range_pair=[20, 40]) # access_ACO_CD_EIS(ecm_num=7, range_pair=[40, 60]) # access_ACO_CD_EIS(ecm_num=7, range_pair=[60, 80]) # access_ACO_CD_EIS(ecm_num=7, range_pair=[80, 100]) # ECM-8 # access_ACO_CD_EIS(ecm_num=8, range_pair=[0, 20]) # access_ACO_CD_EIS(ecm_num=8, range_pair=[20, 40]) # access_ACO_CD_EIS(ecm_num=8, range_pair=[40, 60]) # access_ACO_CD_EIS(ecm_num=8, range_pair=[60, 80]) # access_ACO_CD_EIS(ecm_num=8, range_pair=[80, 100]) # ECM-9 # access_ACO_CD_EIS(ecm_num=9, range_pair=[0, 20]) # access_ACO_CD_EIS(ecm_num=9, range_pair=[20, 40]) # access_ACO_CD_EIS(ecm_num=9, range_pair=[40, 60]) # access_ACO_CD_EIS(ecm_num=9, range_pair=[60, 80]) # access_ACO_CD_EIS(ecm_num=9, range_pair=[80, 100]) # python aco_cd.py
46.525424
147
0.609269
3,515
24,705
3.998862
0.091323
0.020987
0.021628
0.030876
0.866249
0.844622
0.823776
0.81218
0.803643
0.781232
0
0.03874
0.284274
24,705
531
148
46.525424
0.756193
0.32884
0
0.75
0
0
0.012683
0.002841
0
0
0
0
0
1
0.089552
false
0
0.041045
0
0.201493
0.007463
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
c8d405e12168f1c5bf3570ee20ab3bc167ed7303
203
py
Python
ois_api_client/v3_0/dto/MaterialNumbers.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
7
2020-10-22T08:15:29.000Z
2022-01-27T07:59:39.000Z
ois_api_client/v3_0/dto/MaterialNumbers.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
null
null
null
ois_api_client/v3_0/dto/MaterialNumbers.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
null
null
null
from typing import List from dataclasses import dataclass @dataclass class MaterialNumbers: """Material numbers :param material_number: Material number """ material_number: List[str]
15.615385
43
0.738916
22
203
6.727273
0.590909
0.283784
0.297297
0.378378
0
0
0
0
0
0
0
0
0.197044
203
12
44
16.916667
0.907975
0.280788
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.8
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
0
1
0
1
0
1
0
0
7
b576b2f3eda1c5113d1d43a24e54b658b0194faf
297
py
Python
html_similarity/similarity.py
catarinaacsilva/html-similarity
bf0461883ee920f840fd15035ae11d9bcd547b4b
[ "BSD-3-Clause" ]
181
2017-10-26T16:42:23.000Z
2022-03-03T05:30:21.000Z
html_similarity/similarity.py
catarinaacsilva/html-similarity
bf0461883ee920f840fd15035ae11d9bcd547b4b
[ "BSD-3-Clause" ]
70
2017-11-07T02:25:31.000Z
2021-08-09T04:54:51.000Z
html_similarity/similarity.py
catarinaacsilva/html-similarity
bf0461883ee920f840fd15035ae11d9bcd547b4b
[ "BSD-3-Clause" ]
22
2017-11-12T13:56:39.000Z
2022-03-16T21:51:39.000Z
from html_similarity.style_similarity import style_similarity from html_similarity.structural_similarity import structural_similarity def similarity(document_1, document_2, k=0.5): return k * structural_similarity(document_1, document_2) + (1 - k) * style_similarity(document_1, document_2)
42.428571
113
0.828283
41
297
5.658537
0.341463
0.193966
0.24569
0.349138
0.362069
0
0
0
0
0
0
0.033708
0.10101
297
6
114
49.5
0.835206
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0.25
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
7
a9281af822996aacd187895962f1ca9c2845fa13
2,360
py
Python
shiftRows.py
valentin8709/AES_El-Gamal
b9c68f02e6d3479240e563979352044957b92ce9
[ "Unlicense" ]
null
null
null
shiftRows.py
valentin8709/AES_El-Gamal
b9c68f02e6d3479240e563979352044957b92ce9
[ "Unlicense" ]
null
null
null
shiftRows.py
valentin8709/AES_El-Gamal
b9c68f02e6d3479240e563979352044957b92ce9
[ "Unlicense" ]
1
2020-10-12T16:36:08.000Z
2020-10-12T16:36:08.000Z
#takes a 4*4 array and a key size (128, 192 or 256) and shift the row according to AES standard def shiftRows(message, keySize): #tests if the message is valid (i.e. a 4*4 array) if len(message) == 4: for i in range(4): if len(message[i]) != 4: raise ValueError('Bad message size in shiftRows(message, keysize)') else: raise ValueError('Bad message size in shiftRows(message, keysize)') #test if the keysize is valid and initializes the corresponding permutations if int(keySize) == 128: permut = [0, 1, 2, 3] elif keySize == 192: permut = [0, 1, 2, 3] elif keySize == 256: permut = [0, 1, 3, 4] else: raise ValueError('Bad key Size in shiftRows(message, keysize)') for i in range(4): message[i] = decalage(message[i], permut[i]) return message #shift n rows (where n=permut)to the left in message (a 1*4 array) def decalage(message, permut): tmp = [x for x in message] tmp2 = [0, 0, 0, 0] for i in range(permut): for j in range(4): tmp2[(3+j)%4] = tmp[j] tmp = [x for x in tmp2] return tmp #Takes a message (a 4*4 array) and a key size (128, 192 or 256) and shift the rows back into place def invShiftRows(message, keySize): #tests if the message is valid (i.e. a 4*4 array) if len(message) == 4: for i in range(4): if len(message[i]) != 4: raise ValueError('Bad message size in shiftRows(message, keysize)') else: raise ValueError('Bad message size in shiftRows(message, keysize)') #test if the keysize is valid and initializes the corresponding permutations if int(keySize) == 128: permut = [0, 1, 2, 3] elif keySize == 192: permut = [0, 1, 2, 3] elif keySize == 256: permut = [0, 1, 3, 4] else: raise ValueError('Bad key Size in shiftRows(message, keysize)') for i in range(4): message[i] = decalageInv(message[i], permut[i]) return message #shift n rows (where n=permut) to the right in message (a 1*4 array) def decalageInv(message, permut): tmp = [x for x in message] tmp2 = [0, 0, 0, 0] for i in range(permut): for j in range(4): tmp2[j] = tmp[(3+j)%4] tmp = [x for x in tmp2] return tmp
30.649351
98
0.588983
369
2,360
3.766938
0.170732
0.080576
0.115827
0.047482
0.893525
0.893525
0.893525
0.864748
0.831655
0.831655
0
0.060241
0.29661
2,360
76
99
31.052632
0.777108
0.241102
0
0.846154
0
0
0.153933
0
0
0
0
0
0
1
0.076923
false
0
0
0
0.153846
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
a93d0a4e29b1c510f3d7aabcb2e50fb82f737561
5,270
py
Python
src/k2hash/tests/test_queue.py
hiwakaba/k2hash_python-1
dba41978c047297bd64d2eff2bf402bd42704318
[ "MIT" ]
2
2022-03-02T11:09:50.000Z
2022-03-04T23:28:17.000Z
src/k2hash/tests/test_queue.py
hiwakaba/k2hash_python-1
dba41978c047297bd64d2eff2bf402bd42704318
[ "MIT" ]
null
null
null
src/k2hash/tests/test_queue.py
hiwakaba/k2hash_python-1
dba41978c047297bd64d2eff2bf402bd42704318
[ "MIT" ]
2
2022-03-02T07:16:44.000Z
2022-03-02T10:27:31.000Z
# -*- coding: utf-8 -*- # # K2hash Python Driver under MIT License # # Copyright (c) 2022 Yahoo Japan Corporation # # For the full copyright and license information, please view # the license file that was distributed with this source code. # # AUTHOR: Hirotaka Wakabayashi # CREATE: Tue Feb 08 2022 # REVISION: # import unittest import k2hash import logging import time class TestQueue(unittest.TestCase): def test_Queue_construct(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertTrue(q.close(), True) db.close() def test_Queue_put(self): db = k2hash.K2hash() db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertRaises(TypeError, q.put) self.assertTrue(q.close(), True) db.close() def test_Queue_put_with_obj(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.get(), obj) self.assertTrue(q.close(), True) db.close() def test_Queue_put_with_obj_attrs(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" attrs={"attrname1": "attrval1"} self.assertTrue(q.put(obj, attrs), True) self.assertTrue(q.get(), obj) self.assertTrue(q.close(), True) db.close() def test_Queue_clear(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.qsize() == 1) self.assertTrue(q.clear(), True) self.assertTrue(q.qsize() == 0) self.assertTrue(q.close(), True) db.close() def test_Queue_close(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertTrue(q.close(), True) db.close() def test_Queue_qsize(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.qsize() == 1) self.assertTrue(q.close(), True) db.close() def test_Queue_element(self): db = k2hash.K2hash() q = k2hash.Queue(db) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.element(), obj) self.assertTrue(q.close(), True) db.close() def test_Queue_element_with_position(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.element(1) == "") self.assertTrue(q.close(), True) db.close() def test_Queue_handle(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertFalse(q.handle == k2hash.K2hash.K2H_INVALID_HANDLE) self.assertTrue(q.close(), True) db.close() def test_Queue_empty(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertTrue(q.empty(), True) self.assertTrue(q.close(), True) db.close() def test_Queue_get(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.get(), obj) self.assertTrue(q.close(), True) db.close() def test_Queue_print(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertTrue(q.print(), True) self.assertTrue(q.close(), True) db.close() def test_Queue_remove(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.qsize() == 1) self.assertTrue(q.remove(), True) self.assertTrue(q.qsize() == 0) self.assertTrue(q.close(), True) db.close() def test_Queue_remove_with_count(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) obj="v1" self.assertTrue(q.put(obj), True) self.assertTrue(q.qsize() == 1) self.assertTrue(q.remove(1), True) self.assertTrue(q.qsize() == 0) self.assertTrue(q.close(), True) db.close() def test_Queue_repr(self): db = k2hash.K2hash() q = k2hash.Queue(db) self.assertTrue(isinstance(q, k2hash.Queue)) self.assertTrue(q.close(), True) db.close() if __name__ == '__main__': unittest.main() # # Local variables: # tab-width: 4 # c-basic-offset: 4 # End: # vim600: expandtab sw=4 ts=4 fdm=marker # vim<600: expandtab sw=4 ts=4 #
28.956044
70
0.588994
667
5,270
4.577211
0.148426
0.261382
0.206354
0.094333
0.801179
0.784474
0.784474
0.784474
0.773993
0.773993
0
0.029328
0.26888
5,270
181
71
29.116022
0.763042
0.078178
0
0.758865
0
0
0.008892
0
0
0
0
0
0.41844
1
0.113475
false
0
0.028369
0
0.148936
0.014184
0
0
0
null
1
1
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
1
0
0
0
0
0
0
0
0
0
10
8d54454bfe84b21d1992d706db9bb26434ddb405
4,361
py
Python
app/movie_api/migrations/0008_auto_20200518_2111.py
KamilJakubczak/movies-app-api
a305722fce40acf0197c513f4e268049bb32da4b
[ "MIT" ]
null
null
null
app/movie_api/migrations/0008_auto_20200518_2111.py
KamilJakubczak/movies-app-api
a305722fce40acf0197c513f4e268049bb32da4b
[ "MIT" ]
null
null
null
app/movie_api/migrations/0008_auto_20200518_2111.py
KamilJakubczak/movies-app-api
a305722fce40acf0197c513f4e268049bb32da4b
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-18 21:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('movie_api', '0007_auto_20200518_1836'), ] operations = [ migrations.AlterField( model_name='movie', name='Actors', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Awards', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='BoxOffice', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Country', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='DVD', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Director', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Genre', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Language', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Metascore', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Plot', field=models.TextField(blank=True), ), migrations.AlterField( model_name='movie', name='Poster', field=models.CharField(blank=True, max_length=500), ), migrations.AlterField( model_name='movie', name='Production', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Rated', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Ratings', field=models.CharField(blank=True, max_length=500), ), migrations.AlterField( model_name='movie', name='Released', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Response', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Runtime', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Title', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Type', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Website', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Writer', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='Year', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='imdbID', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='imdbRating', field=models.CharField(blank=True, max_length=255), ), migrations.AlterField( model_name='movie', name='imdbVotes', field=models.CharField(blank=True, max_length=255), ), ]
31.374101
63
0.535198
402
4,361
5.674129
0.159204
0.219202
0.274003
0.317843
0.847874
0.847874
0.814555
0.814555
0.79658
0.79658
0
0.036039
0.344646
4,361
138
64
31.601449
0.762071
0.010319
0
0.75
1
0
0.075104
0.005331
0
0
0
0
0
1
0
false
0
0.007576
0
0.030303
0
0
0
0
null
1
1
1
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
0
0
0
0
0
0
11
8d7f82351f399d70477b36e12a7709df62a645eb
4,105
py
Python
src/tests/test_finder.py
cld-santos/fifi
5576543afc7a9c1a8f919e7019bb5eab8cba073e
[ "Apache-2.0" ]
null
null
null
src/tests/test_finder.py
cld-santos/fifi
5576543afc7a9c1a8f919e7019bb5eab8cba073e
[ "Apache-2.0" ]
null
null
null
src/tests/test_finder.py
cld-santos/fifi
5576543afc7a9c1a8f919e7019bb5eab8cba073e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from unittest import TestCase from ..parser import FifiParser from ..finder import HtmlFinder class TestFinder(TestCase): def test_must_found_a_subject_mentioned(self): fifi_parser = FifiParser() fifi_parser.feed('<html> <body> <div class="item">meu item 1 <div> <a href="link-1">teste</a> </div> </div> <div class="item">meu item 2 <div> <a href="link-2">teste</a> </div> </div> <div class="item">meu item 3 <div> <a href="link-3">alvo</a> </div> alvo</div> </body></html>') finder = HtmlFinder(fifi_parser.document) result = finder.find_subject('alvo') self.assertEqual(1, len(result)) def test_must_found_a_uppercase_subject(self): fifi_parser = FifiParser() fifi_parser.feed('<html> <body> <div class="item"> <div> <a href="link-1">teste</a> </div> </div> <div class="item">meu item 2 <div> <a href="link-2">teste</a> </div> </div> <div class="item">meu item 3 <div> <a href="link-3">alvo</a> </div> alvo </div> meu item 1</body></html>') finder = HtmlFinder(fifi_parser.document) result = finder.find_subject('ALVO') self.assertEqual(1, len(result)) def test_must_not_found_a_subject(self): fifi_parser = FifiParser() fifi_parser.feed('<html> <body> <div class="item">meu item 1 <div> <a href="link-1">teste</a> </div> </div> <div class="item">meu item 2 <div> <a href="link-2">teste</a> </div> </div> <div class="item">meu item 3 <div> <a href="link-3">alvo</a> </div> </div> </body></html>') finder = HtmlFinder(fifi_parser.document) result = finder.find_subject('termo inexistente') self.assertEqual(0, len(result)) def test_must_found_a_complex_subject(self): fifi_parser = FifiParser() fifi_parser.feed('<html> <body> <div class="item">meu item 1 <div> <a href="link-1">teste</a> </div> </div> <div class="item">meu item 2 <div> <a href="link-2">teste</a> </div> </div> <div class="item">meu item 3 <div> <a href="link-3">Alvo Existente</a> </div>Alvo Existente </div> </body></html>') finder = HtmlFinder(fifi_parser.document) result = finder.find_subject('Alvo Existente') self.assertEqual(1, len(result)) def test_must_found_more_than_one_subject(self): fifi_parser = FifiParser() fifi_parser.feed('<html> <body> <div class="item">meu item 1 <div> <a href="link-1">teste</a> </div> </div> <div class="item">meu item 2 <div> <a href="link-2">LInk</a> </div>Alvo Existente </div> <div class="item">meu item 3 <div> <a href="link-3">Link</a> </div>Alvo Existente </div> </body></html>') finder = HtmlFinder(fifi_parser.document) result = finder.find_subject('Alvo Existente') self.assertEqual(2, len(result)) def test_must_found_references_to_subject(self): fifi_parser = FifiParser() fifi_parser.feed('<html> <body> <div class="item">meu item 1 <div> <a href="link-1">teste</a> </div> </div> <div class="item">meu item 2 <div> <a href="link-2">LInk</a> </div>Alvo Existente </div> <div class="item">meu item 3 <div> <a href="link-3">Link</a> </div>Alvo Existente </div> </body></html>') finder = HtmlFinder(fifi_parser.document) result = finder.find_references('link') self.assertEqual(2, len(result))
82.1
443
0.516931
504
4,105
4.10119
0.105159
0.066763
0.104499
0.104499
0.881955
0.861151
0.849057
0.835994
0.835994
0.820997
0
0.015625
0.329598
4,105
49
444
83.77551
0.735465
0.005116
0
0.525
0
0.15
0.605192
0.094048
0
0
0
0
0.15
1
0.15
false
0
0.075
0
0.25
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
8d859bbebd086d696620bd958602d9caba6a7fc5
140
py
Python
loldib/getratings/models/NA/na_sion/__init__.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_sion/__init__.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_sion/__init__.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from .na_sion_top import * from .na_sion_jng import * from .na_sion_mid import * from .na_sion_bot import * from .na_sion_sup import *
23.333333
27
0.75
25
140
3.8
0.36
0.315789
0.526316
0.673684
0
0
0
0
0
0
0
0
0.178571
140
5
28
28
0.826087
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
a5eeb23055ac5b85a8d20d9d3749f1002427f925
3,561
py
Python
core_dev/email__.py
alexzanderr/_core-dev
831f69dad524e450c4243b1dd88f26de80e1d444
[ "MIT" ]
null
null
null
core_dev/email__.py
alexzanderr/_core-dev
831f69dad524e450c4243b1dd88f26de80e1d444
[ "MIT" ]
null
null
null
core_dev/email__.py
alexzanderr/_core-dev
831f69dad524e450c4243b1dd88f26de80e1d444
[ "MIT" ]
null
null
null
import smtplib from email import encoders from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from core._json import * automation_account_path = r"emails\AutomationAccount.json" def SendEmail(sender_address, sender_password, reciever_address, subject, content, files_paths=[]): # __path MIME short for multipurpose internet mail extensions message = MIMEMultipart() message['From'] = sender_address message['To'] = reciever_address message['Subject'] = subject message.attach(MIMEText(content, 'plain')) # setup the attachment if files_paths != []: for file_path in files_paths: file_read = open(file_path, 'rb') pay_load = MIMEBase('application', 'octet-stream') pay_load.set_payload(file_read.read()) encoders.encode_base64(pay_load) items = file_path.split("\\") filename = items[len(items) - 1] pay_load.add_header('Content-Disposition', 'attachment', filename=filename) message.attach(pay_load) # connecting to server using 3rd party app (this); # to do this you need to have less secure apps # connections enabled in google account try: server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login(sender_address, sender_password) content = message.as_string() server.sendmail(sender_address, reciever_address, content) server.quit() print(f"Email sent to '{reciever_address}' successfully.") except Exception as error: print(type(error)) print(error) print("Email failed to send.") print("Activate less secure app in google account settings.") def SendEmailTo(reciever_address, subject, content, files_paths=[]): automation_account = load_json_from_file(automation_account_path) sender_address = automation_account["email"] sender_password = automation_account["password"] if reciever_address == "me": reciever_address = sender_address # setup MIME short for multipurpose internet mail extensions message = MIMEMultipart() message['From'] = sender_address message['To'] = reciever_address message['Subject'] = subject message.attach(MIMEText(content, 'plain')) # setup the attachment if files_paths != []: for file_path in files_paths: file_read = open(file_path, 'rb') pay_load = MIMEBase('application', 'octet-stream') pay_load.set_payload(file_read.read()) encoders.encode_base64(pay_load) items = file_path.split("\\") filename = items[len(items) - 1] pay_load.add_header('Content-Disposition', 'attachment', filename=filename) message.attach(pay_load) try: server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login(sender_address, sender_password) content = message.as_string() server.sendmail(sender_address, reciever_address, content) server.quit() print(f"Email sent to '{reciever_address}' successfully.") except Exception as error: print(type(error)) print(error) print("Mail failed to send.") print("Activate less secure app in google account settings.") # testing if __name__ == '__main__': # SendEmailTo() pass
35.257426
100
0.647571
399
3,561
5.58396
0.280702
0.067325
0.030521
0.036355
0.735189
0.735189
0.70018
0.70018
0.70018
0.70018
0
0.004896
0.254423
3,561
100
101
35.61
0.834275
0.088458
0
0.75
0
0
0.149601
0.00925
0
0
0
0
0
1
0.027778
false
0.069444
0.083333
0
0.111111
0.138889
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
5741023fe9ca5258cd377172a3010ab1e7cba50a
10,369
py
Python
onnx_chainer/functions/math.py
hyabe/onnx-chainer
339ff390957d9dd29843add015533290fdd051c0
[ "MIT" ]
null
null
null
onnx_chainer/functions/math.py
hyabe/onnx-chainer
339ff390957d9dd29843add015533290fdd051c0
[ "MIT" ]
null
null
null
onnx_chainer/functions/math.py
hyabe/onnx-chainer
339ff390957d9dd29843add015533290fdd051c0
[ "MIT" ]
null
null
null
import chainer import numpy as np from onnx_chainer.functions.opset_version import support from onnx_chainer import onnx_helper @support((1, 6, 7)) def convert_Add(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Add', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node('Add', input_names, num_outputs), @support((1, 6, 7)) def convert_AddConstant(func, opset_version, input_names, num_outputs, context, parameters): value = np.array(func.value, dtype=func.inputs[0].dtype) value_param = chainer.Parameter(value) parameters.append(value_param) input_names.append(context.get_name(value_param)) if opset_version == 1: return onnx_helper.make_node( 'Add', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node('Add', input_names, num_outputs), @support((1, 6, 7)) def convert_Sub(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Sub', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node('Sub', input_names, num_outputs), @support((1, 6, 7)) def convert_Mul(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Mul', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node('Mul', input_names, num_outputs), @support((1, 6, 7)) def convert_MulConstant(func, opset_version, input_names, num_outputs, context, parameters): value = np.array(func.value, dtype=func.inputs[0].dtype) value_param = chainer.Parameter(value) parameters.append(value_param) input_names.append(context.get_name(value_param)) if opset_version == 1: return onnx_helper.make_node( 'Mul', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node('Mul', input_names, num_outputs), @support((1, 6)) def convert_Neg(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Neg', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6: return onnx_helper.make_node('Neg', input_names, num_outputs), @support((1, 6, 7)) def convert_Div(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Div', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node('Div', input_names, num_outputs), @support((1, 6)) def convert_Absolute(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Abs', input_names, num_outputs, consumed_inputs=[1]), elif opset_version == 6: return onnx_helper.make_node('Abs', input_names, num_outputs), @support((1, 7)) def convert_PowVarConst(func, opset_version, input_names, num_outputs, context, parameters): value = np.array(func.value, dtype=func.inputs[0].dtype) value_param = chainer.Parameter(value) parameters.append(value_param) input_names.append(context.get_name(value_param)) if opset_version == 1 or opset_version == 7: return onnx_helper.make_node('Pow', input_names, num_outputs), @support((1, 6)) def convert_Clip(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Clip', input_names, num_outputs, max=func.x_max, min=func.x_min, consumed_inputs=[1] ), elif opset_version == 6: return onnx_helper.make_node( 'Clip', input_names, num_outputs, max=func.x_max, min=func.x_min, ), @support((1, 6)) def convert_Exp(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Exp', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6: return onnx_helper.make_node('Exp', input_names, num_outputs), def convert_Identity(func, opset_version, input_names, num_outputs, context, parameters): return onnx_helper.make_node('Identity', input_names, num_outputs), @support((1, 6, 7)) def convert_MatMul(func, opset_version, input_names, num_outputs, context, parameters): bias_shape = ( func.inputs[0].shape[-1] if func.transa else func.inputs[0].shape[-2], func.inputs[1].shape[-2] if func.transb else func.inputs[1].shape[-1] ) bias_tensor = np.zeros(bias_shape, dtype=func.inputs[0].dtype) bias_param = chainer.Parameter(bias_tensor) parameters.append(bias_param) input_names.append(context.get_name(bias_param)) return onnx_helper.make_node( 'Gemm', input_names, num_outputs, transA=func.transa, transB=func.transb ), @support((1, 6, 8)) def convert_Maximum(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Max', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 8: return onnx_helper.make_node('Max', input_names, num_outputs), @support((1, 6, 8)) def convert_Minimum(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Min', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 8: return onnx_helper.make_node('Min', input_names, num_outputs), @support((1, 6)) def convert_Sqrt(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Sqrt', input_names, num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6: return onnx_helper.make_node('Sqrt', input_names, num_outputs), def convert_LogSumExp(func, opset_version, input_names, num_outputs, context, parameters): # Use keepdims=False by default # since the chainer does not support keepdims option kwargs = {'keepdims': False} if hasattr(func, 'keepdims'): kwargs['keepdims'] = func.keepdims if func.axis is not None: kwargs['axes'] = func.axis return onnx_helper.make_node( 'ReduceLogSumExp', input_names, num_outputs, **kwargs), def convert_Max(func, opset_version, input_names, num_outputs, context, parameters): kwargs = {'keepdims': func.keepdims} if func.axis is not None: kwargs['axes'] = func.axis return onnx_helper.make_node( 'ReduceMax', input_names, num_outputs, **kwargs), def convert_Mean(func, opset_version, input_names, num_outputs, context, parameters): kwargs = {'keepdims': func.keepdims} if func.axis is not None: kwargs['axes'] = func.axis return onnx_helper.make_node( 'ReduceMean', input_names, num_outputs, **kwargs), def convert_Min(func, opset_version, input_names, num_outputs, context, parameters): kwargs = {'keepdims': func.keepdims} if func.axis is not None: kwargs['axes'] = func.axis return onnx_helper.make_node( 'ReduceMin', input_names, num_outputs, **kwargs), def convert_Prod(func, opset_version, input_names, num_outputs, context, parameters): kwargs = {'keepdims': func.keepdims} if func.axis is not None: kwargs['axes'] = func.axis return onnx_helper.make_node( 'ReduceProd', input_names, num_outputs, **kwargs), def convert_Sum(func, opset_version, input_names, num_outputs, context, parameters): kwargs = {'keepdims': func.keepdims} if func.axis is not None: kwargs['axes'] = func.axis return onnx_helper.make_node( 'ReduceSum', input_names, num_outputs, **kwargs), @support((1, 6, 7)) def convert_LinearInterpolate(func, opset_version, input_names, num_outputs, context, parameters): typ = func.inputs[0].dtype if isinstance( func.inputs[0].dtype, np.dtype) else np.dtype(func.inputs[0].dtype) one = chainer.Parameter(np.array(1, dtype=typ)) parameters.append(one) kwargs = {'consumed_inputs': [1, 1]} if opset_version == 1 else {} kwargs2 = {} if opset_version >= 7 else {'broadcast': 1} gb = onnx_helper.GraphBuilder() p, x, y = input_names n1 = gb.op('Sub', [context.get_name(one), p], **kwargs, **kwargs2) n2 = gb.op('Mul', [p, x], **kwargs) n3 = gb.op('Mul', [n1, y], **kwargs) gb.op('Add', [n2, n3], num_outputs, **kwargs) return gb.nodes() @support((1, 6, 7)) def convert_Square(func, opset_version, input_names, num_outputs, context, parameters): if opset_version == 1: return onnx_helper.make_node( 'Mul', [input_names[0], input_names[0]], num_outputs, consumed_inputs=[1, 1]), elif opset_version == 6 or opset_version == 7: return onnx_helper.make_node( 'Mul', [input_names[0], input_names[0]], num_outputs), @support((8,)) def convert_BroadcastTo(func, opset_version, input_names, num_outputs, context, parameters): shape = np.array(func._shape) parameters.append(shape) input_names.append(context.get_name(shape)) return onnx_helper.make_node('Expand', input_names, num_outputs),
35.632302
78
0.653101
1,363
10,369
4.712399
0.085106
0.11054
0.123463
0.189942
0.82189
0.797135
0.773937
0.739063
0.739063
0.678188
0
0.018016
0.229145
10,369
290
79
35.755172
0.785562
0.007715
0
0.60262
0
0
0.02868
0
0
0
0
0
0
1
0.10917
false
0
0.017467
0.004367
0.296943
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
93f48f0c24dd33e3208089b72c674a618ec04512
3,996
py
Python
customers/migrations/0002_initial.py
Melpomene927/jp-trade
cbfa33a090c5d3b01d37ccb1b835963bb0e180aa
[ "Apache-2.0" ]
null
null
null
customers/migrations/0002_initial.py
Melpomene927/jp-trade
cbfa33a090c5d3b01d37ccb1b835963bb0e180aa
[ "Apache-2.0" ]
null
null
null
customers/migrations/0002_initial.py
Melpomene927/jp-trade
cbfa33a090c5d3b01d37ccb1b835963bb0e180aa
[ "Apache-2.0" ]
null
null
null
# Generated by Django 4.0.3 on 2022-04-04 21:14 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('inventory', '0001_initial'), ('customers', '0001_initial'), ] operations = [ migrations.AddField( model_name='order', name='createdby', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='建檔人員'), ), migrations.AddField( model_name='order', name='customer_id', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Order_customer_id', to='customers.customer', verbose_name='客戶'), ), migrations.AddField( model_name='order', name='customer_name', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Order_customer_name', to='customers.customer', to_field='name', verbose_name='客戶姓名'), ), migrations.AddField( model_name='order', name='delivery', field=models.ManyToManyField(to='customers.delivery', verbose_name='運送資訊'), ), migrations.AddField( model_name='delivery', name='courier', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='customers.express', verbose_name='貨運公司'), ), migrations.AddField( model_name='delivery', name='package_id', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='inventory.package', verbose_name='包裹'), ), migrations.AddField( model_name='customerlist', name='customer_id', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='CustomerList_customer_id', to='customers.customer', verbose_name='客戶代號'), ), migrations.AddField( model_name='customerlist', name='customer_name', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='CustomerList_customer_name', to='customers.customer', to_field='name', verbose_name='客戶姓名'), ), migrations.AddField( model_name='customerlist', name='department', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='inventory.department', verbose_name='部門'), ), migrations.AddField( model_name='contact', name='person', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='customers.customer', verbose_name='客戶'), ), migrations.AddField( model_name='callreport', name='createdby', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='建檔人員'), ), migrations.AddField( model_name='callreport', name='customer_id', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='CallReport_customer_id', to='customers.customer', verbose_name='客戶代號'), ), migrations.AddField( model_name='callreport', name='customer_name', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='CallReport_customer_name', to='customers.customer', to_field='name', verbose_name='客戶姓名'), ), migrations.AddField( model_name='callreport', name='department', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='inventory.department', verbose_name='部門'), ), ]
44.4
187
0.64039
426
3,996
5.814554
0.157277
0.048446
0.079128
0.124344
0.811062
0.811062
0.750101
0.716593
0.716593
0.716593
0
0.007489
0.231481
3,996
89
188
44.898876
0.799088
0.011261
0
0.670732
1
0
0.179792
0.02431
0
0
0
0
0
1
0
false
0
0.036585
0
0.085366
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
9e01bc090e3c497bae7e870a5231b244105abbc8
42,287
py
Python
model/ctr_model.py
Daniel1586/Initiative_recommender_system
28d3be65266cba808fea2df5ed4405fae09cb549
[ "MIT" ]
1
2019-08-12T14:28:22.000Z
2019-08-12T14:28:22.000Z
model/ctr_model.py
Daniel1586/Initiative_RecSys
28d3be65266cba808fea2df5ed4405fae09cb549
[ "MIT" ]
null
null
null
model/ctr_model.py
Daniel1586/Initiative_RecSys
28d3be65266cba808fea2df5ed4405fae09cb549
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import tensorflow as tf from tensorflow_estimator import estimator # LR: Predicting Clicks - Estimating the Click-Through Rate for New Ads. def lr(features, labels, mode, params): # --------------- hyper-parameters --------------- # feature_size = params["feature_size"] field_size = params["field_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] # --------------- initial weights ---------------- # # [numeric_feature, one-hot categorical_feature] coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_w = tf.get_variable(name="coe_w", shape=[feature_size], initializer=tf.glorot_normal_initializer()) # --------------- reshape feature ---------------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------------ define f(x) ----------------- # # LR: y = b + sum<wi,xi> with tf.variable_scope("First-Order"): feat_wgt = tf.nn.embedding_lookup(coe_w, feat_idx) # [Batch, Field] y_w = tf.reduce_sum(tf.multiply(feat_wgt, feat_val), 1) # [Batch] with tf.variable_scope("LR-Out"): y_b = coe_b * tf.ones_like(y_w, dtype=tf.float32) # [Batch] y_hat = y_b + y_w # [Batch] y_pred = tf.nn.sigmoid(y_hat) # [Batch] # ---------- mode: predict/evaluate/train ---------- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_w) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # FM: Factorization Machines./Factorization Machines with libFM. # Fast Context-aware Recommendations with Factorization Machines. def fm(features, labels, mode, params): # ---------- hyper-parameters ---------- # feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_w = tf.get_variable(name="coe_w", shape=[feature_size], initializer=tf.glorot_normal_initializer()) coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # # FM: y = b + sum<wi,xi> + sum(<vi,vj>xi*xj) with tf.variable_scope("First-Order"): feat_wgt = tf.nn.embedding_lookup(coe_w, feat_idx) # [Batch, Field] y_w = tf.reduce_sum(tf.multiply(feat_wgt, feat_val), 1) # [Batch] with tf.variable_scope("Second-Order"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] sum_square = tf.square(tf.reduce_sum(embeddings, 1)) # [Batch, K] square_sum = tf.reduce_sum(tf.square(embeddings), 1) # [Batch, K] y_v = 0.5*tf.reduce_sum(tf.subtract(sum_square, square_sum), 1) # [Batch] with tf.variable_scope("FM-Out"): y_b = coe_b * tf.ones_like(y_w, dtype=tf.float32) # [Batch] y_hat = y_b + y_w + y_v # [Batch] y_pred = tf.nn.sigmoid(y_hat) # [Batch] # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_w) + l2_reg_lambda * tf.nn.l2_loss(coe_v) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # Deep Crossing - Web-Scale Modeling without Manually Crafted Combinatorial Features. def deepcrossing(features, labels, mode, params): # ---------- hyper-parameters ---------- # feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] layers = list(map(int, params["deep_layers"].split(','))) # l1神经元数量等于D1长度 dropout = list(map(float, params["dropout"].split(','))) # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # with tf.variable_scope("Embed-Layer"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] with tf.variable_scope("Stack-Layer"): deep_inputs = tf.reshape(embeddings, shape=[-1, field_size*embed_size]) # [Batch, Field*K] with tf.variable_scope("Deep-Layer"): # 论文采用ResNet,代码采用fully connected for i in range(len(layers)): deep_inputs = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=layers[i], scope="mlp_%d" % i, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda)) if mode == estimator.ModeKeys.TRAIN: deep_inputs = tf.nn.dropout(deep_inputs, keep_prob=dropout[i]) # output layer y_d = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=1, activation_fn=tf.identity, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda), scope='deep_out') with tf.variable_scope("DC-Out"): y_hat = tf.reshape(y_d, shape=[-1]) y_pred = tf.nn.sigmoid(y_hat) # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_v) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # FNN: Deep Learning over Multi-Field Categorical Data: A Case Study on User Response Prediction. # PNN: Product-based Neural Networks for User Response Prediction. def fpnn(features, labels, mode, params): # ---------- hyper-parameters ---------- # algorithm = params["algorithm"] feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] layers = list(map(int, params["deep_layers"].split(','))) # l1神经元数量等于D1长度 dropout = list(map(float, params["dropout"].split(','))) # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_w = tf.get_variable(name="coe_w", shape=[feature_size], initializer=tf.glorot_normal_initializer()) coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) coe_line = tf.get_variable(name="coe_line", shape=[layers[0], field_size, embed_size], initializer=tf.glorot_normal_initializer()) coe_ipnn = tf.get_variable(name="coe_ipnn", shape=[layers[0], field_size], initializer=tf.glorot_normal_initializer()) coe_opnn = tf.get_variable(name="coe_opnn", shape=[layers[0], embed_size, embed_size], initializer=tf.glorot_normal_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # with tf.variable_scope("Linear-Part"): feat_wgt = tf.nn.embedding_lookup(coe_w, feat_idx) # [Batch, Field] y_linear = tf.reduce_sum(tf.multiply(feat_wgt, feat_val), 1) # [Batch] with tf.variable_scope("Embed-Layer"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] with tf.variable_scope("Product-Layer"): if algorithm == "FNN": feat_vec = tf.reshape(embeddings, shape=[-1, field_size*embed_size]) feat_bias = coe_b * tf.reshape(tf.ones_like(y_linear, dtype=tf.float32), shape=[-1, 1]) deep_inputs = tf.concat([feat_wgt, feat_vec, feat_bias], 1) # [Batch, (Field+1)*K+1] elif algorithm == "IPNN": # linear signal z = tf.reshape(embeddings, shape=[-1, field_size*embed_size]) # [Batch, Field*K] wz = tf.reshape(coe_line, shape=[-1, field_size*embed_size]) # [D1, Field*K] lz = tf.matmul(z, tf.transpose(wz)) # [Batch, D1] # quadratic signal row_i = [] col_j = [] for i in range(field_size - 1): for j in range(i + 1, field_size): row_i.append(i) col_j.append(j) fi = tf.gather(embeddings, row_i, axis=1) # 根据索引从参数轴上收集切片[Batch, num_pairs, K] fj = tf.gather(embeddings, col_j, axis=1) # 根据索引从参数轴上收集切片[Batch, num_pairs, K] # p_ij = g(fi,fj)=<fi,fj> 特征i和特征j的隐向量的内积 p = tf.reduce_sum(tf.multiply(fi, fj), 2) # p矩阵展成向量[Batch, num_pairs] wpi = tf.gather(coe_ipnn, row_i, axis=1) # 根据索引从参数轴上收集切片[D1, num_pairs] wpj = tf.gather(coe_ipnn, col_j, axis=1) # 根据索引从参数轴上收集切片[D1, num_pairs] wp = tf.multiply(wpi, wpj) # D1个W矩阵组成的矩阵(每行代表一个W)[D1, num_pairs] lp = tf.matmul(p, tf.transpose(wp)) # [Batch, D1] lb = coe_b * tf.reshape(tf.ones_like(y_linear, dtype=tf.float32), shape=[-1, 1]) deep_inputs = lz + lp + lb # [Batch, D1] elif algorithm == "OPNN": # linear signal z = tf.reshape(embeddings, shape=[-1, field_size*embed_size]) # [Batch, Field*K] wz = tf.reshape(coe_line, shape=[-1, field_size*embed_size]) # [D1, Field*K] lz = tf.matmul(z, tf.transpose(wz)) # [Batch, D1] # quadratic signal f_sigma = tf.reduce_sum(embeddings, axis=1) # [Batch, K] p = tf.matmul(tf.reshape(f_sigma, shape=[-1, embed_size, 1]), tf.reshape(f_sigma, shape=[-1, 1, embed_size])) # [Batch, K, K] p = tf.reshape(p, shape=[-1, embed_size*embed_size]) # [Batch, K*K] wp = tf.reshape(coe_opnn, shape=[-1, embed_size*embed_size]) # [D1, K*K] lp = tf.matmul(p, tf.transpose(wp)) # [Batch, D1] lb = coe_b * tf.reshape(tf.ones_like(y_linear, dtype=tf.float32), shape=[-1, 1]) deep_inputs = lz + lp + lb # [Batch, D1] with tf.variable_scope("Deep-Layer"): # hidden layer for i in range(len(layers)): deep_inputs = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=layers[i], scope="mlp_%d" % i, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda)) if mode == estimator.ModeKeys.TRAIN: deep_inputs = tf.nn.dropout(deep_inputs, keep_prob=dropout[i]) # output layer y_d = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=1, activation_fn=tf.identity, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda), scope='deep_out') with tf.variable_scope("FPNN-Out"): y_hat = tf.reshape(y_d, shape=[-1]) y_pred = tf.nn.sigmoid(y_hat) # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_w) + l2_reg_lambda * tf.nn.l2_loss(coe_v) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # Wide&Deep: Wide & Deep Learning for Recommender Systems. def wd(features, labels, mode, params): # ---------- hyper-parameters ---------- # feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] layers = list(map(int, params["deep_layers"].split(','))) dropout = list(map(float, params["dropout"].split(','))) # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_w = tf.get_variable(name="coe_w", shape=[feature_size], initializer=tf.glorot_normal_initializer()) coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # with tf.variable_scope("Wide-Layer"): # 论文里面包含人工组合的特征 feat_wgt = tf.nn.embedding_lookup(coe_w, feat_idx) # [Batch, Field] y_wide = tf.reduce_sum(tf.multiply(feat_wgt, feat_val), 1) # [Batch] with tf.variable_scope("Embed-Layer"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] with tf.variable_scope("Deep-Layer"): deep_inputs = tf.reshape(embeddings, shape=[-1, field_size * embed_size]) # hidden layer for i in range(len(layers)): deep_inputs = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=layers[i], scope="mlp_%d" % i, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda)) if mode == estimator.ModeKeys.TRAIN: deep_inputs = tf.nn.dropout(deep_inputs, keep_prob=dropout[i]) # output layer y_d = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=1, activation_fn=tf.identity, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda), scope='deep_out') with tf.variable_scope("W_D-Out"): y_deep = tf.reshape(y_d, shape=[-1]) y_bias = coe_b * tf.ones_like(y_wide, dtype=tf.float32) y_hat = y_wide + y_deep + y_bias y_pred = tf.nn.sigmoid(y_hat) # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_w) + l2_reg_lambda * tf.nn.l2_loss(coe_v) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # DeepFM: A Factorization-Machine based Neural Network for CTR Prediction. def deepfm(features, labels, mode, params): # ---------- hyper-parameters ---------- # feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] layers = list(map(int, params["deep_layers"].split(','))) dropout = list(map(float, params["dropout"].split(','))) # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_w = tf.get_variable(name="coe_w", shape=[feature_size], initializer=tf.glorot_normal_initializer()) coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # with tf.variable_scope("First-Order"): feat_wgt = tf.nn.embedding_lookup(coe_w, feat_idx) # [Batch, Field] y_w = tf.reduce_sum(tf.multiply(feat_wgt, feat_val), 1) # [Batch] with tf.variable_scope("Second-Order"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] sum_square = tf.square(tf.reduce_sum(embeddings, 1)) # [Batch, K] square_sum = tf.reduce_sum(tf.square(embeddings), 1) # [Batch, K] y_v = 0.5*tf.reduce_sum(tf.subtract(sum_square, square_sum), 1) # [Batch] with tf.variable_scope("Deep-Layer"): deep_inputs = tf.reshape(embeddings, shape=[-1, field_size * embed_size]) # hidden layer for i in range(len(layers)): deep_inputs = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=layers[i], scope="mlp_%d" % i, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda)) if mode == estimator.ModeKeys.TRAIN: deep_inputs = tf.nn.dropout(deep_inputs, keep_prob=dropout[i]) # output layer y_d = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=1, activation_fn=tf.identity, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda), scope='deep_out') with tf.variable_scope("DeepFM-Out"): y_deep = tf.reshape(y_d, shape=[-1]) y_bias = coe_b * tf.ones_like(y_w, dtype=tf.float32) # [Batch] y_hat = y_bias + y_w + y_v + y_deep # [Batch] y_pred = tf.nn.sigmoid(y_hat) # [Batch] # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_w) + l2_reg_lambda * tf.nn.l2_loss(coe_v) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # DCN: Deep & Cross Network for Ad Click Predictions. def dcn(features, labels, mode, params): # ---------- hyper-parameters ---------- # feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] layers = list(map(int, params["deep_layers"].split(','))) cross_layers = params["cross_layers"] dropout = list(map(float, params["dropout"].split(','))) # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) cross_b = tf.get_variable(name="cross_b", shape=[cross_layers, field_size*embed_size], initializer=tf.glorot_uniform_initializer()) cross_w = tf.get_variable(name="cross_w", shape=[cross_layers, field_size*embed_size], initializer=tf.glorot_uniform_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # with tf.variable_scope("Embed-Layer"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] x0 = tf.reshape(embeddings, shape=[-1, field_size*embed_size]) # [Batch, Field*K] with tf.variable_scope("Cross-Layer"): xl = x0 for l in range(cross_layers): wl = tf.reshape(cross_w[l], shape=[-1, 1]) # [Field*K,1] xlw = tf.matmul(xl, wl) # [Batch, 1] xl = x0 * xlw + cross_b[l] # [Batch, Field*K] with tf.variable_scope("Deep-Layer"): deep_inputs = x0 # [Batch, Field*K] # hidden layer for i in range(len(layers)): deep_inputs = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=layers[i], scope="mlp_%d" % i, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda)) if mode == estimator.ModeKeys.TRAIN: deep_inputs = tf.nn.dropout(deep_inputs, keep_prob=dropout[i]) with tf.variable_scope("DCN-Out"): x_stack = tf.concat([xl, deep_inputs], 1) y_comb = tf.contrib.layers.fully_connected( inputs=x_stack, num_outputs=1, activation_fn=tf.identity, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda), scope="comb_layer") y_d = tf.reshape(y_comb, shape=[-1]) # [Batch] y_bias = coe_b * tf.ones_like(y_d, dtype=tf.float32) y_hat = y_d + y_bias # [Batch] y_pred = tf.nn.sigmoid(y_hat) # [Batch] # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) \ + l2_reg_lambda * tf.nn.l2_loss(coe_v) + l2_reg_lambda * tf.nn.l2_loss(cross_b) \ + l2_reg_lambda * tf.nn.l2_loss(cross_w) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) + l2_reg_lambda * tf.nn.l2_loss(coe_v) \ + l2_reg_lambda * tf.nn.l2_loss(cross_b) + l2_reg_lambda * tf.nn.l2_loss(cross_w) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op) # NFM: Neural Factorization Machines for Sparse Predictive Analytics. def nfm(features, labels, mode, params): # ---------- hyper-parameters ---------- # feature_size = params["feature_size"] field_size = params["field_size"] embed_size = params["embed_size"] loss_mode = params["loss_mode"] optimizer = params["optimizer"] learning_rate = params["learning_rate"] l2_reg_lambda = params["l2_reg_lambda"] layers = list(map(int, params["deep_layers"].split(','))) dropout = list(map(float, params["dropout"].split(','))) # ---------- initial weights ----------- # # [numeric_feature, one-hot categorical_feature]统一做embedding coe_b = tf.get_variable(name="coe_b", shape=[1], initializer=tf.constant_initializer(0.0)) coe_w = tf.get_variable(name="coe_w", shape=[feature_size], initializer=tf.glorot_normal_initializer()) coe_v = tf.get_variable(name="coe_v", shape=[feature_size, embed_size], initializer=tf.glorot_normal_initializer()) # ---------- reshape feature ----------- # feat_idx = features["feat_idx"] # 非零特征位置[batch_size, field_size, 1] feat_idx = tf.reshape(feat_idx, shape=[-1, field_size]) # [Batch, Field] feat_val = features["feat_val"] # 非零特征的值[batch_size, field_size, 1] feat_val = tf.reshape(feat_val, shape=[-1, field_size]) # [Batch, Field] # ------------- define f(x) ------------ # with tf.variable_scope("First-Order"): feat_wgt = tf.nn.embedding_lookup(coe_w, feat_idx) # [Batch, Field] y_w = tf.reduce_sum(tf.multiply(feat_wgt, feat_val), 1) # [Batch] with tf.variable_scope("Bi-Interaction-Layer"): embeddings = tf.nn.embedding_lookup(coe_v, feat_idx) # [Batch, Field, K] feat_vals = tf.reshape(feat_val, shape=[-1, field_size, 1]) # [Batch, Field, 1] embeddings = tf.multiply(embeddings, feat_vals) # [Batch, Field, K] sum_square = tf.square(tf.reduce_sum(embeddings, 1)) # [Batch, K] square_sum = tf.reduce_sum(tf.square(embeddings), 1) # [Batch, K] bi_out = 0.5*(tf.subtract(sum_square, square_sum)) # [Batch, K] with tf.variable_scope("Deep-Layer"): deep_inputs = bi_out # hidden layer for i in range(len(layers)): deep_inputs = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=layers[i], scope="mlp_%d" % i, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda)) if mode == estimator.ModeKeys.TRAIN: deep_inputs = tf.nn.dropout(deep_inputs, keep_prob=dropout[i]) # output layer y_d = tf.contrib.layers.fully_connected( inputs=deep_inputs, num_outputs=1, activation_fn=tf.identity, weights_regularizer=tf.contrib.layers.l2_regularizer(l2_reg_lambda), scope='deep_out') with tf.variable_scope("NFM-Out"): y_deep = tf.reshape(y_d, shape=[-1]) y_bias = coe_b * tf.ones_like(y_w, dtype=tf.float32) # [Batch] y_hat = y_bias + y_w + y_deep # [Batch] y_pred = tf.nn.sigmoid(y_hat) # [Batch] # ----- mode: predict/evaluate/train ----- # # predict: 不计算loss/metric; evaluate: 不进行梯度下降和参数更新 # Provide an estimator spec for 'ModeKeys.PREDICT' predictions = {"prob": y_pred} export_outputs = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: estimator.export.PredictOutput(predictions)} if mode == estimator.ModeKeys.PREDICT: return estimator.EstimatorSpec(mode=mode, predictions=predictions, export_outputs=export_outputs) # Provide an estimator spec for 'ModeKeys.EVAL' if loss_mode == "log_loss": loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=y_hat)) +\ l2_reg_lambda * tf.nn.l2_loss(coe_w) + l2_reg_lambda * tf.nn.l2_loss(coe_v) else: loss = tf.reduce_mean(tf.square(labels-y_pred)) eval_metric_ops = {"auc": tf.metrics.auc(labels, y_pred)} if mode == estimator.ModeKeys.EVAL: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, eval_metric_ops=eval_metric_ops) # Provide an estimator spec for 'ModeKeys.TRAIN' if optimizer == "Adam": opt_mode = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-8) elif optimizer == "Adagrad": opt_mode = tf.train.AdagradOptimizer(learning_rate=learning_rate, initial_accumulator_value=1e-8) elif optimizer == "Momentum": opt_mode = tf.train.MomentumOptimizer(learning_rate=learning_rate, momentum=0.95) elif optimizer == "Ftrl": opt_mode = tf.train.FtrlOptimizer(learning_rate) else: opt_mode = tf.train.GradientDescentOptimizer(learning_rate=learning_rate) train_op = opt_mode.minimize(loss, global_step=tf.train.get_global_step()) if mode == estimator.ModeKeys.TRAIN: return estimator.EstimatorSpec(mode=mode, predictions=predictions, loss=loss, train_op=train_op)
52.465261
108
0.635183
5,382
42,287
4.748235
0.054441
0.041323
0.0198
0.021914
0.93512
0.926785
0.914498
0.910115
0.909333
0.90362
0
0.011672
0.226074
42,287
805
109
52.530435
0.769181
0.159529
0
0.851658
0
0
0.048509
0
0
0
0
0
0
1
0.013962
false
0
0.00349
0
0.059337
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
9e17f4255d50a97deafca94666a07e9f5caddb33
11,469
py
Python
tests/dhcpv6/kea_only/host_reservation/test_host_reservation.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
22
2015-02-27T11:51:05.000Z
2022-02-28T12:39:29.000Z
tests/dhcpv6/kea_only/host_reservation/test_host_reservation.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
16
2018-10-30T15:00:12.000Z
2019-01-11T17:55:13.000Z
tests/dhcpv6/kea_only/host_reservation/test_host_reservation.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
11
2015-02-27T11:51:36.000Z
2021-03-30T08:33:54.000Z
"""Host Reservation DHCPv6""" # pylint: disable=invalid-name,line-too-long import pytest import srv_control import srv_msg import misc @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only def test_v6_host_reservation_all_values_mac(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.host_reservation_in_subnet('hostname', 'reserved-hostname', 0, 'hw-address', 'f6:f5:f4:f3:f2:01') srv_control.host_reservation_in_subnet_add_value(0, 0, 'ip-address', '3000::100') srv_control.host_reservation_in_subnet_add_value(0, 0, 'prefixes', '3001::/40') srv_control.add_ddns_server('127.0.0.1', '53001') srv_control.add_ddns_server_options('enable-updates', True) srv_control.add_ddns_server_options('qualifying-suffix', 'my.domain.com') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('IA_PD') srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_sets_value('Client', 'FQDN_domain_name', 'some-different-name') srv_msg.client_sets_value('Client', 'FQDN_flags', 'S') srv_msg.client_does_include('Client', 'fqdn') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_suboption_content(26, 25, 'prefix', '3001::') srv_msg.response_check_include_option(39) srv_msg.response_check_option_content(39, 'fqdn', 'reserved-hostname.my.domain.com.') @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only def test_v6_host_reservation_all_values_duid(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.host_reservation_in_subnet('hostname', 'reserved-hostname', 0, 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.host_reservation_in_subnet_add_value(0, 0, 'ip-address', '3000::100') srv_control.host_reservation_in_subnet_add_value(0, 0, 'prefixes', '3001::/40') srv_control.add_ddns_server('127.0.0.1', '53001') srv_control.add_ddns_server_options('enable-updates', True) srv_control.add_ddns_server_options('qualifying-suffix', 'my.domain.com') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('IA_PD') srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_sets_value('Client', 'FQDN_domain_name', 'some-different-name') srv_msg.client_sets_value('Client', 'FQDN_flags', 'S') srv_msg.client_does_include('Client', 'fqdn') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_suboption_content(26, 25, 'prefix', '3001::') srv_msg.response_check_include_option(39) srv_msg.response_check_option_content(39, 'fqdn', 'reserved-hostname.my.domain.com.') @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only def test_v6_host_reservation_all_values_duid_2(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.config_srv_prefix('2001:db8:1::', 0, 32, 33) srv_control.host_reservation_in_subnet('hostname', 'reserved-hostname', 0, 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.host_reservation_in_subnet_add_value(0, 0, 'ip-address', '3000::100') srv_control.host_reservation_in_subnet_add_value(0, 0, 'prefixes', '2001:db8:1::/40') srv_control.add_ddns_server('127.0.0.1', '53001') srv_control.add_ddns_server_options('enable-updates', True) srv_control.add_ddns_server_options('qualifying-suffix', 'my.domain.com') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('IA_PD') srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01') srv_msg.client_sets_value('Client', 'FQDN_domain_name', 'some-different-name') srv_msg.client_sets_value('Client', 'FQDN_flags', 'S') srv_msg.client_does_include('Client', 'fqdn') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100', expect_include=False) srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_suboption_content(26, 25, 'prefix', '2001:db8:1::', expect_include=False) srv_msg.response_check_include_option(39) srv_msg.response_check_option_content(39, 'fqdn', 'reserved-hostname.my.domain.com.', expect_include=False) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only def test_v6_host_reservation_classes_1(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.add_line_to_subnet(0, {"reservations": [{"duid": "00:03:00:01:f6:f5:f4:f3:f2:22", "client-classes": ["reserved-class1"]}]}) srv_control.create_new_class('reserved-class1') srv_control.add_option_to_defined_class(1, 'sip-server-addr', '2001:db8::1,2001:db8::2') srv_control.add_option_to_defined_class(1, 'preference', '123') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_requests_option(7) srv_msg.client_requests_option(22) srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(22, expect_include=False) srv_msg.response_check_include_option(7, expect_include=False) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:22') srv_msg.client_requests_option(7) srv_msg.client_requests_option(22) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(22) srv_msg.response_check_option_content(22, 'addresses', '2001:db8::1,2001:db8::2') srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'prefval', 123) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only def test_v6_host_reservation_classes_2(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.add_line_to_subnet(0, {"reservations": [{"duid": "00:03:00:01:f6:f5:f4:f3:f2:22", "client-classes": ["reserved-class1", "reserved-class2"]}]}) srv_control.create_new_class('reserved-class1') srv_control.add_option_to_defined_class(1, 'sip-server-addr', '2001:db8::1,2001:db8::2') srv_control.create_new_class('reserved-class2') srv_control.add_option_to_defined_class(2, 'preference', '123') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_requests_option(7) srv_msg.client_requests_option(22) srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(22, expect_include=False) srv_msg.response_check_include_option(7, expect_include=False) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:22') srv_msg.client_requests_option(7) srv_msg.client_requests_option(22) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(22) srv_msg.response_check_option_content(22, 'addresses', '2001:db8::1,2001:db8::2') srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'prefval', 123)
43.774809
117
0.699887
1,699
11,469
4.347263
0.082401
0.091795
0.10723
0.092608
0.972651
0.972651
0.969672
0.965204
0.961955
0.957081
0
0.063275
0.156683
11,469
261
118
43.942529
0.700372
0.005842
0
0.90367
0
0.009174
0.211127
0.05423
0
0
0
0
0
1
0.022936
true
0.045872
0.018349
0
0.041284
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
f519ec820838e5b305be37129a71676698db98e1
4,639
py
Python
test/platforms/jvm/test_jvm_package_name.py
toptal/license-cop
84f3dbf7b3632d761e423b182ce0d9927b885f41
[ "MIT" ]
24
2017-11-21T18:30:19.000Z
2021-11-08T10:52:48.000Z
test/platforms/jvm/test_jvm_package_name.py
toptal/license-cop
84f3dbf7b3632d761e423b182ce0d9927b885f41
[ "MIT" ]
27
2017-11-22T15:50:56.000Z
2021-09-30T09:03:21.000Z
test/platforms/jvm/test_jvm_package_name.py
toptal/license-cop
84f3dbf7b3632d761e423b182ce0d9927b885f41
[ "MIT" ]
5
2017-11-21T14:08:21.000Z
2021-04-07T19:30:09.000Z
import pytest from app.platforms.jvm.package_name import JvmPackageName def test_get_group_id(): name = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert name.group_id == 'org.spire-math' def test_get_group_path(): name = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert name.group_path == 'org/spire-math' def test_get_artifact_id_when_it_was_given_without_scala_version(): name = JvmPackageName('org.spire-math', 'kind-projector') assert name.artifact_id == 'kind-projector' def test_get_artifact_id_when_it_was_given_with_scala_version(): name = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert name.artifact_id == 'kind-projector' def test_get_scala_version_when_it_was_given_explicitly(): name = JvmPackageName('org.spire-math', 'kind-projector', '2.10.6') assert name.scala_version == '2.10.6' def test_get_scala_version_when_it_was_given_implicitly_in_the_artifact_id(): name = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert name.scala_version == '2.10.6' def test_get_scala_version_when_it_was_not_given(): name = JvmPackageName('org.spire-math', 'kind-projector') assert name.scala_version is None def test_get_scala_version_without_patch_given_only_major_and_minor_parts(): name = JvmPackageName('org.spire-math', 'kind-projector', '2.10') assert name.scala_version_without_patch == '2.10' def test_get_scala_version_without_patch_given_major_minor_and_patch_parts(): name = JvmPackageName('org.spire-math', 'kind-projector', '2.10.5') assert name.scala_version_without_patch == '2.10' def test_get_scala_version_without_patch_given_major_minor_patch_and_pre_release_parts(): name = JvmPackageName('org.spire-math', 'kind-projector', '2.10.5-RC2') assert name.scala_version_without_patch == '2.10' def test_get_artifact_id_variations_when_there_is_no_scala_version(): name = JvmPackageName('org.spire-math', 'kind-projector') assert name.artifact_id_variations == ('kind-projector',) def test_get_artifact_id_variations_when_there_is_scala_version(): name = JvmPackageName('org.spire-math', 'kind-projector', '2.10.5-RC2') assert name.artifact_id_variations == ( 'kind-projector_2.10.5-RC2', 'kind-projector_2.10', 'kind-projector' ) def test_equality_when_both_instances_have_scala_versions_implicit_in_artifact_id(): a = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') b = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert a == b assert not a != b def test_equality_when_both_instances_have_explicit_scala_versions(): a = JvmPackageName('org.spire-math', 'kind-projector', '2.10.6') b = JvmPackageName('org.spire-math', 'kind-projector', '2.10.6') assert a == b assert not a != b def test_equality_between_instances_with_implicit_and_explicit_scala_versions(): a = JvmPackageName('org.spire-math', 'kind-projector', '2.10.6') b = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert a == b assert b == a assert not a != b assert not b != a def test_unequality_between_instances_with_different_group_ids(): a = JvmPackageName('foo', 'kind-projector', '2.10.6') b = JvmPackageName('bar', 'kind-projector', '2.10.6') assert a != b assert not a == b def test_unequality_between_instances_with_different_artifact_ids(): a = JvmPackageName('org.spire-math', 'foo', '2.10.6') b = JvmPackageName('org.spire-math', 'bar', '2.10.6') assert a != b assert not a == b def test_unequality_between_instances_with_different_scala_versions(): a = JvmPackageName('org.spire-math', 'kind-projector', '2.10.6') b = JvmPackageName('org.spire-math', 'kind-projector', '2.11') assert a != b assert not a == b def test_string_representation_given_explicit_scala_version(): name = JvmPackageName('org.spire-math', 'kind-projector', '2.10.6') assert str(name) == 'org.spire-math:kind-projector_2.10.6' assert repr(name) == 'org.spire-math:kind-projector_2.10.6' def test_string_representation_given_scala_version_implicit_in_artifact_id(): name = JvmPackageName('org.spire-math', 'kind-projector_2.10.6') assert str(name) == 'org.spire-math:kind-projector_2.10.6' assert repr(name) == 'org.spire-math:kind-projector_2.10.6' def test_string_representation_given_no_scala_version(): name = JvmPackageName('org.spire-math', 'kind-projector') assert str(name) == 'org.spire-math:kind-projector' assert repr(name) == 'org.spire-math:kind-projector'
35.684615
89
0.730761
685
4,639
4.637956
0.106569
0.151401
0.124646
0.14605
0.876613
0.860246
0.84734
0.787221
0.742839
0.64967
0
0.033068
0.133003
4,639
129
90
35.96124
0.756837
0
0
0.476744
0
0
0.262125
0.085148
0
0
0
0
0.372093
1
0.244186
false
0
0.023256
0
0.267442
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
f52e4129bae73bdbbe06a71bf0ef27aea8816cdb
32,112
py
Python
code/algorithms/Linespacer.py
AllTheLonelyPeople/Chips-Circuits
55e97579f97e63f6219c14fe5c59ae761729248c
[ "MIT" ]
null
null
null
code/algorithms/Linespacer.py
AllTheLonelyPeople/Chips-Circuits
55e97579f97e63f6219c14fe5c59ae761729248c
[ "MIT" ]
null
null
null
code/algorithms/Linespacer.py
AllTheLonelyPeople/Chips-Circuits
55e97579f97e63f6219c14fe5c59ae761729248c
[ "MIT" ]
null
null
null
""" Linespacer.py Python file with the functions for the first algorithm Tom Kamstra, Julia Linde, Izhar Hamer """ def Make_Wire(input_direction, coordinate_start, coordinate_end, step_x, step_y, gate_connections, gate_coordinates, wires, allwires): if input_direction == 'X': direction_coordinate_start = coordinate_start[0] direction_coordinate_end = coordinate_end[0] otherdirection_coordinate_start = coordinate_start[1] otherdirection_coordinate_end = coordinate_end[1] elif input_direction = 'Y': direction_coordinate_start = coordinate_start[1] direction_coordinate_end = coordinate_end[1] otherdirection_coordinate_start = coordinate_start[0] otherdirection_coordinate_end = coordinate_end[0] # Loop until x-coordinate from start gate equals x-coordinate from end gate while direction_coordinate_start != direction_coordinate_end: direction_coordinate_start = direction_coordinate_start + step_x coordinate = coordinate_start # Check for other gates or other wires if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] # print("SELECTED WIRESSSSSS") # print(selected_wires) if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: direction_coordinate_start = direction_coordinate_start - step_x # z kan nu niet meerdere stappen omhoog/omlaag z_coordinate_start = z_coordinate_start + 1 #checken of na deze stap geen gate zit break coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: z_coordinate_start = z_coordinate_start - 1 # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start + step_y #checken of na deze stap geen gate zit break coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y - step_y # z kan nu niet meerdere stappen omhoog/omlaag break coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit break elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y - step_y # z kan nu niet meerdere stappen omhoog/omlaag coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit break elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: z_coordinate_start = z_coordinate_start - 1 # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start + step_y #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit break elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x # z kan nu niet meerdere stappen omhoog/omlaag z_coordinate_start = z_coordinate_start + 1 #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: z_coordinate_start = z_coordinate_start - 1 # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start + step_y #checken of na deze stap geen gate zit break coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y - step_y # z kan nu niet meerdere stappen omhoog/omlaag break coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit break elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y - step_y # z kan nu niet meerdere stappen omhoog/omlaag coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit break elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: z_coordinate_start = z_coordinate_start - 1 # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start + step_y #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit break elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start + step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start - step_x #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] wires.append(coordinate) print(coordinate) wire = classs.Wire(coordinate, connected_gate) allwires.append(wire) if y_coordinate_start < y_coordinate_end: step_y = 1 elif y_coordinate_start > y_coordinate_end: step_y = -1 if x_coordinate_start == x_coordinate_end and y_coordinate_start == y_coordinate_end: while z_coordinate_start != z_coordinate_end: z_coordinate_start = z_coordinate_start - 1 coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: z_coordinate_start = z_coordinate_start + 1 # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start + step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start + step_x #checken of na deze stap geen gate zit break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start + step_x #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: z_coordinate_start = z_coordinate_start + 1 # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start + step_y #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start + step_x #checken of na deze stap geen gate zit break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: y_coordinate_start = y_coordinate_start - step_y # z kan nu niet meerdere stappen omhoog/omlaag x_coordinate_start = x_coordinate_start + step_x #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag break # moet ook uit while loop breken! coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start - step_x - step_x # z kan nu niet meerdere stappen omhoog/omlaag coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] if gate_connections: for key in gate_connections: selected_wires = gate_connections[key] if coordinate in selected_wires or coordinate in gate_coordinates: if coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit break # moet ook uit while loop breken! elif coordinate in gate_coordinates and coordinate != coordinate_end: x_coordinate_start = x_coordinate_start + step_x # z kan nu niet meerdere stappen omhoog/omlaag y_coordinate_start = y_coordinate_start - step_y #checken of na deze stap geen gate zit coordinate = [x_coordinate_start, y_coordinate_start, z_coordinate_start] wires.append(coordinate) print(coordinate) wire = classs.Wire(coordinate, connected_gate) allwires.append(wire) if y_coordinate_start < y_coordinate_end: step_y = 1 elif y_coordinate_start > y_coordinate_end: step_y = -1
69.356371
135
0.507785
3,042
32,112
5.050296
0.024655
0.280219
0.12081
0.125236
0.973638
0.947536
0.945584
0.945584
0.945584
0.942589
0
0.001218
0.463004
32,112
463
136
69.356371
0.889701
0.13892
0
0.949102
0
0
0.000073
0
0
0
0
0
0
0
null
null
0
0
null
null
0.005988
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
1
0
0
0
0
0
0
0
0
9
f5a9867acc73bab8dfd168f77f7e800898289928
104
py
Python
app/group/views/__init__.py
TIHLDE/Lepton
60ec0793381f1c1b222f305586e8c2d4345fb566
[ "MIT" ]
7
2021-03-04T18:49:12.000Z
2021-03-08T18:25:51.000Z
app/group/views/__init__.py
TIHLDE/Lepton
60ec0793381f1c1b222f305586e8c2d4345fb566
[ "MIT" ]
251
2021-03-04T19:19:14.000Z
2022-03-31T14:47:53.000Z
app/group/views/__init__.py
tihlde/Lepton
5cab3522c421b76373a5c25f49267cfaef7b826a
[ "MIT" ]
3
2021-10-05T19:03:04.000Z
2022-02-25T13:32:09.000Z
from app.group.views.group import GroupViewSet from app.group.views.membership import MembershipViewSet
34.666667
56
0.865385
14
104
6.428571
0.571429
0.155556
0.266667
0.377778
0
0
0
0
0
0
0
0
0.076923
104
2
57
52
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
19114d25225c02a454633d5ff97ed1a3f53d9491
23,709
py
Python
tests/cloudsdk_tests/test_profile.py
brennerm/wlan-testing
ea99d5ab74177198324f4d7eddcdcff2844bbbf3
[ "BSD-3-Clause" ]
null
null
null
tests/cloudsdk_tests/test_profile.py
brennerm/wlan-testing
ea99d5ab74177198324f4d7eddcdcff2844bbbf3
[ "BSD-3-Clause" ]
null
null
null
tests/cloudsdk_tests/test_profile.py
brennerm/wlan-testing
ea99d5ab74177198324f4d7eddcdcff2844bbbf3
[ "BSD-3-Clause" ]
null
null
null
import pytest import sys import os sys.path.append( os.path.dirname( os.path.realpath(__file__) ) ) if 'cloudsdk' not in sys.path: sys.path.append(f'../libs/cloudsdk') if 'apnos' not in sys.path: sys.path.append(f'../libs/apnos') if 'testrails' not in sys.path: sys.path.append(f'../libs/testrails') from cloudsdk import ProfileUtility from configuration_data import TEST_CASES class TestProfileCleanup(object): @pytest.mark.hard_cleanup def test_profile_hard_cleanup(self, cleanup_cloud_profiles): # (cleanup_cloud_profiles) assert True @pytest.mark.sanity_cleanup @pytest.mark.run(order=5) @pytest.mark.bridge @pytest.mark.nat @pytest.mark.vlan @pytest.mark.fiveg @pytest.mark.wpa @pytest.mark.twog @pytest.mark.wpa2_personal @pytest.mark.wpa2_enterprise def test_profile_cleanup(self, setup_profile_data, instantiate_profile, testrun_session): print("6") try: instantiate_profile.delete_profile_by_name(profile_name="Sanity-ecw5410-BRIDGE") instantiate_profile.delete_profile_by_name(profile_name="Sanity-" + testrun_session + "-NAT") instantiate_profile.delete_profile_by_name(profile_name="Sanity-" + testrun_session + "-VLAN") for i in setup_profile_data: for j in setup_profile_data[i]: for k in setup_profile_data[i][j]: instantiate_profile.delete_profile_by_name( profile_name=setup_profile_data[i][j][k]['profile_name']) instantiate_profile.delete_profile_by_name(profile_name=testrun_session + "-RADIUS-Sanity") status = True except Exception as e: print(e) status = False assert status @pytest.mark.run(order=6) @pytest.mark.bridge @pytest.mark.nat @pytest.mark.vlan @pytest.mark.fiveg @pytest.mark.wpa @pytest.mark.twog @pytest.mark.wpa2_personal @pytest.mark.wpa2_enterprise class TestRfProfile(object): @pytest.mark.rf def test_radius_profile_creation(self, set_rf_profile): print("7") profile_data = set_rf_profile if profile_data: PASS = True else: PASS = False assert PASS @pytest.mark.run(order=7) @pytest.mark.bridge @pytest.mark.nat @pytest.mark.vlan @pytest.mark.wpa2_enterprise @pytest.mark.twog @pytest.mark.fiveg class TestRadiusProfile(object): @pytest.mark.radius def test_radius_profile_creation(self, instantiate_profile, create_radius_profile, testrun_session, instantiate_testrail, instantiate_project): print("8") profile_data = create_radius_profile if profile_data._name == testrun_session + "-RADIUS-Sanity": instantiate_testrail.update_testrail(case_id=TEST_CASES["radius_profile"], run_id=instantiate_project, status_id=1, msg='RADIUS profile created successfully') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["radius_profile"], run_id=instantiate_project, status_id=5, msg='Failed to create RADIUS profile') PASS = False assert PASS @pytest.mark.run(order=8) @pytest.mark.ssid @pytest.mark.bridge class TestProfilesBridge(object): def test_reset_profile(self, reset_profile): assert reset_profile @pytest.mark.fiveg @pytest.mark.wpa def test_ssid_wpa_5g(self, instantiate_profile, create_wpa_ssid_5g_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_wpa_ssid_5g_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa_bridge"], run_id=instantiate_project, status_id=1, msg='5G WPA SSID created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa_bridge"], run_id=instantiate_project, status_id=5, msg='5G WPA SSID create failed - bridge mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa def test_ssid_wpa_2g(self, instantiate_profile, create_wpa_ssid_2g_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_wpa_ssid_2g_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa_bridge"], run_id=instantiate_project, status_id=1, msg='2G WPA SSID created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa_bridge"], run_id=instantiate_project, status_id=5, msg='2G WPA SSID create failed - bridge mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa2_personal def test_ssid_wpa2_personal_2g(self, instantiate_profile, create_wpa2_p_ssid_2g_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_wpa2_p_ssid_2g_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa2_bridge"], run_id=instantiate_project, status_id=1, msg='2G WPA2 PERSONAL SSID created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa2_bridge"], run_id=instantiate_project, status_id=5, msg='2G WPA2 PERSONAL SSID create failed - bridge mode') PASS = False assert PASS @pytest.mark.fiveg @pytest.mark.wpa2_personal def test_ssid_wpa2_personal_5g(self, instantiate_profile, create_wpa2_p_ssid_5g_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_wpa2_p_ssid_5g_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa2_bridge"], run_id=instantiate_project, status_id=1, msg='5G WPA2 PERSONAL SSID created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa2_bridge"], run_id=instantiate_project, status_id=5, msg='5G WPA2 PERSONAL SSID create failed - bridge mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa2_enterprise def test_ssid_wpa2_enterprise_2g(self, instantiate_profile, create_wpa2_e_ssid_2g_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_wpa2_e_ssid_2g_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_eap_bridge"], run_id=instantiate_project, status_id=1, msg='2G WPA2 Enterprise SSID created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_eap_bridge"], run_id=instantiate_project, status_id=5, msg='2G WPA2 Enterprise SSID create failed - bridge mode') PASS = False assert PASS @pytest.mark.fiveg @pytest.mark.wpa2_enterprise def test_ssid_wpa2_enterprise_5g(self, instantiate_profile, create_wpa2_e_ssid_5g_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_wpa2_e_ssid_5g_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_eap_bridge"], run_id=instantiate_project, status_id=1, msg='5G WPA2 Enterprise SSID created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_eap_bridge"], run_id=instantiate_project, status_id=5, msg='5G WPA2 Enterprise SSID create failed - bridge mode') PASS = False assert PASS @pytest.mark.equipment_ap class TestEquipmentAPProfile(object): @pytest.mark.run(order=9) @pytest.mark.bridge @pytest.mark.fiveg @pytest.mark.wpa @pytest.mark.twog @pytest.mark.wpa2_personal @pytest.mark.wpa2_enterprise def test_equipment_ap_profile_bridge_mode(self, instantiate_profile, create_ap_profile_bridge, instantiate_testrail, instantiate_project): profile_data = create_ap_profile_bridge if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ap_bridge"], run_id=instantiate_project, status_id=1, msg='EQUIPMENT AP PROFILE created successfully - bridge mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ap_bridge"], run_id=instantiate_project, status_id=5, msg='EQUIPMENT AP PROFILE CREATION Failed - bridge mode') PASS = False assert PASS @pytest.mark.run(order=15) @pytest.mark.nat @pytest.mark.fiveg @pytest.mark.wpa @pytest.mark.twog @pytest.mark.wpa2_personal @pytest.mark.wpa2_enterprise def test_equipment_ap_profile_nat_mode(self, create_ap_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_ap_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ap_nat"], run_id=instantiate_project, status_id=1, msg='EQUIPMENT AP PROFILE CREATION successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ap_nat"], run_id=instantiate_project, status_id=5, msg='EQUIPMENT AP PROFILE CREATION Failed - nat mode') PASS = False assert PASS @pytest.mark.run(order=21) @pytest.mark.vlan @pytest.mark.fiveg @pytest.mark.wpa @pytest.mark.twog @pytest.mark.wpa2_personal @pytest.mark.wpa2_enterprise def test_equipment_ap_profile_vlan_mode(self, create_ap_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_ap_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ap_vlan"], run_id=instantiate_project, status_id=1, msg='EQUIPMENT AP PROFILE CREATION successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ap_vlan"], run_id=instantiate_project, status_id=5, msg='EQUIPMENT AP PROFILE CREATION failed - vlan mode') PASS = False assert PASS @pytest.mark.run(order=14) @pytest.mark.ssid @pytest.mark.nat class TestProfilesNAT(object): def test_reset_profile(self, reset_profile): assert reset_profile @pytest.mark.fiveg @pytest.mark.wpa def test_ssid_wpa_5g(self, instantiate_profile, create_wpa_ssid_5g_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_wpa_ssid_5g_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa_nat"], run_id=instantiate_project, status_id=1, msg='5G WPA SSID created successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa_nat"], run_id=instantiate_project, status_id=5, msg='5G WPA SSID create failed - nat mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa def test_ssid_wpa_2g(self, instantiate_profile, create_wpa_ssid_2g_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_wpa_ssid_2g_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa_nat"], run_id=instantiate_project, status_id=1, msg='2G WPA SSID created successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa_nat"], run_id=instantiate_project, status_id=5, msg='2G WPA SSID create failed - nat mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa2_personal def test_ssid_wpa2_personal_2g(self, instantiate_profile, create_wpa2_p_ssid_2g_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_wpa2_p_ssid_2g_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa2_nat"], run_id=instantiate_project, status_id=1, msg='2G WPA2 PERSONAL SSID created successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa2_nat"], run_id=instantiate_project, status_id=5, msg='2G WPA2 PERSONAL SSID create failed - nat mode') PASS = False assert PASS @pytest.mark.fiveg @pytest.mark.wpa2_personal def test_ssid_wpa2_personal_5g(self, instantiate_profile, create_wpa2_p_ssid_5g_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_wpa2_p_ssid_5g_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa2_nat"], run_id=instantiate_project, status_id=1, msg='5G WPA2 PERSONAL SSID created successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa2_nat"], run_id=instantiate_project, status_id=5, msg='5G WPA2 PERSONAL SSID create failed - nat mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa2_enterprise def test_ssid_wpa2_enterprise_2g(self, instantiate_profile, create_wpa2_e_ssid_2g_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_wpa2_e_ssid_2g_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_eap_nat"], run_id=instantiate_project, status_id=1, msg='2G WPA2 Enterprise SSID created successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_eap_nat"], run_id=instantiate_project, status_id=5, msg='2G WPA2 Enterprise SSID create failed - nat mode') PASS = False assert PASS @pytest.mark.fiveg @pytest.mark.wpa2_enterprise def test_ssid_wpa2_enterprise_5g(self, instantiate_profile, create_wpa2_e_ssid_5g_profile_nat, instantiate_testrail, instantiate_project): profile_data = create_wpa2_e_ssid_5g_profile_nat if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_eap_nat"], run_id=instantiate_project, status_id=1, msg='5G WPA2 Enterprise SSID created successfully - nat mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_eap_nat"], run_id=instantiate_project, status_id=5, msg='5G WPA2 Enterprise SSID create failed - nat mode') PASS = False assert PASS @pytest.mark.run(order=20) @pytest.mark.ssid @pytest.mark.vlan class TestProfilesVLAN(object): def test_reset_profile(self, reset_profile): assert reset_profile @pytest.mark.fiveg @pytest.mark.wpa def test_ssid_wpa_5g(self, instantiate_profile, create_wpa_ssid_5g_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_wpa_ssid_5g_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa_vlan"], run_id=instantiate_project, status_id=1, msg='5G WPA SSID created successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa_vlan"], run_id=instantiate_project, status_id=5, msg='5G WPA SSID create failed - vlan mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa def test_ssid_wpa_2g(self, instantiate_profile, create_wpa_ssid_2g_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_wpa_ssid_2g_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa_vlan"], run_id=instantiate_project, status_id=1, msg='2G WPA SSID created successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa_vlan"], run_id=instantiate_project, status_id=5, msg='2G WPA SSID create failed - vlan mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa2_personal def test_ssid_wpa2_personal_2g(self, instantiate_profile, create_wpa2_p_ssid_2g_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_wpa2_p_ssid_2g_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa2_vlan"], run_id=instantiate_project, status_id=1, msg='2G WPA2 PERSONAL SSID created successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_wpa2_vlan"], run_id=instantiate_project, status_id=5, msg='2G WPA2 PERSONAL SSID create failed - vlan mode') PASS = False assert PASS @pytest.mark.fiveg @pytest.mark.wpa2_personal def test_ssid_wpa2_personal_5g(self, instantiate_profile, create_wpa2_p_ssid_5g_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_wpa2_p_ssid_5g_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa2_vlan"], run_id=instantiate_project, status_id=1, msg='5G WPA2 PERSONAL SSID created successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_wpa2_vlan"], run_id=instantiate_project, status_id=5, msg='5G WPA2 PERSONAL SSID create failed - vlan mode') PASS = False assert PASS @pytest.mark.twog @pytest.mark.wpa2_enterprise def test_ssid_wpa2_enterprise_2g(self, instantiate_profile, create_wpa2_e_ssid_2g_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_wpa2_e_ssid_2g_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_eap_vlan"], run_id=instantiate_project, status_id=1, msg='2G WPA2 Enterprise SSID created successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_2g_eap_vlan"], run_id=instantiate_project, status_id=5, msg='2G WPA2 Enterprise SSID create failed - vlan mode') PASS = False assert PASS @pytest.mark.fiveg @pytest.mark.wpa2_enterprise def test_ssid_wpa2_enterprise_5g(self, instantiate_profile, create_wpa2_e_ssid_5g_profile_vlan, instantiate_testrail, instantiate_project): profile_data = create_wpa2_e_ssid_5g_profile_vlan if profile_data: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_eap_vlan"], run_id=instantiate_project, status_id=1, msg='5G WPA2 Enterprise SSID created successfully - vlan mode') PASS = True else: instantiate_testrail.update_testrail(case_id=TEST_CASES["ssid_5g_eap_vlan"], run_id=instantiate_project, status_id=5, msg='5G WPA2 Enterprise SSID create failed - vlan mode') PASS = False assert PASS
48.584016
147
0.596356
2,608
23,709
5.057899
0.042178
0.072777
0.08339
0.110075
0.914108
0.89364
0.888788
0.888788
0.875294
0.842089
0
0.018197
0.339407
23,709
487
148
48.683778
0.824033
0.001012
0
0.660592
0
0
0.123892
0.000887
0
0
0
0
0.063781
1
0.063781
false
0.157175
0.01139
0
0.091116
0.009112
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
19ab4b56caa025c7d43265ba54c8a8ac4cbc7b53
91
py
Python
advent_of_code_2021/template_test.py
acviana/Advent-of-Code-2021
98a87afd14f430868bd71d0714dd396208505a5d
[ "MIT" ]
null
null
null
advent_of_code_2021/template_test.py
acviana/Advent-of-Code-2021
98a87afd14f430868bd71d0714dd396208505a5d
[ "MIT" ]
null
null
null
advent_of_code_2021/template_test.py
acviana/Advent-of-Code-2021
98a87afd14f430868bd71d0714dd396208505a5d
[ "MIT" ]
null
null
null
from advent_of_code_2021.day_X import parse_data def test_parse_data(): parse_data()
15.166667
48
0.791209
16
91
4
0.75
0.421875
0
0
0
0
0
0
0
0
0
0.051282
0.142857
91
5
49
18.2
0.769231
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
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
2727e7e187e558e248889aad7c23e73d79e69649
6,561
py
Python
src/timeseriesinsights/azext_timeseriesinsights/action.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/timeseriesinsights/azext_timeseriesinsights/action.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/timeseriesinsights/azext_timeseriesinsights/action.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: disable=protected-access import argparse from collections import defaultdict from knack.util import CLIError class AddTags(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.tags = action def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: v = properties[k] d[k] = v[0] return d class AddSku(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.sku = action def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] if kl == 'name': d['name'] = v[0] elif kl == 'capacity': try: d['capacity'] = int(v[0]) except ValueError: raise CLIError('capacity={} is not int'.format(v[0])) return d class AddPartitionKeyProperties(argparse._AppendAction): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) super(AddPartitionKeyProperties, self).__call__(parser, namespace, action, option_string) def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] if kl == 'name': d['name'] = v[0] elif kl == 'type': d['type'] = v[0] return d class AddTimeSeriesIdProperties(argparse._AppendAction): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) super(AddTimeSeriesIdProperties, self).__call__(parser, namespace, action, option_string) def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] if kl == 'name': d['name'] = v[0] elif kl == 'type': d['type'] = v[0] return d class AddStorageConfiguration(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.storage_configuration = action def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] if kl == 'account-name': d['account_name'] = v[0] elif kl == 'management-key': d['management_key'] = v[0] return d class AddWarmStoreConfiguration(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) namespace.warm_store_configuration = action def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] if kl == 'data-retention': d['data_retention'] = v[0] return d class AddKeyProperties(argparse._AppendAction): def __call__(self, parser, namespace, values, option_string=None): action = self.get_action(values, option_string) super(AddKeyProperties, self).__call__(parser, namespace, action, option_string) def get_action(self, values, option_string): # pylint: disable=no-self-use try: properties = defaultdict(list) for (k, v) in (x.split('=', 1) for x in values): properties[k].append(v) properties = dict(properties) except ValueError: raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) d = {} for k in properties: kl = k.lower() v = properties[k] if kl == 'name': d['name'] = v[0] elif kl == 'type': d['type'] = v[0] return d
37.278409
97
0.551593
722
6,561
4.882271
0.131579
0.105532
0.107234
0.065816
0.827518
0.808227
0.808227
0.808227
0.808227
0.808227
0
0.004414
0.309404
6,561
175
98
37.491429
0.77356
0.080628
0
0.816327
0
0
0.066135
0
0
0
0
0
0
1
0.095238
false
0
0.020408
0
0.210884
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
27442df2e59bb4bcd9ffb5b0d19bdc97186e6db8
2,770
py
Python
examples/Talk/compartmental_models.py
uibcdf/Modelo_infeccion
f6ce28d199fe0713b9b175ab0174db5c0d894a89
[ "MIT" ]
null
null
null
examples/Talk/compartmental_models.py
uibcdf/Modelo_infeccion
f6ce28d199fe0713b9b175ab0174db5c0d894a89
[ "MIT" ]
null
null
null
examples/Talk/compartmental_models.py
uibcdf/Modelo_infeccion
f6ce28d199fe0713b9b175ab0174db5c0d894a89
[ "MIT" ]
null
null
null
import networkx as nx import pandas as pd import numpy as np import scipy.integrate class SI_Model(): def __init__(self, poblacion, infectados, beta=None): self.transitions = nx.MultiDiGraph() self.transitions.add_edge('S', 'I', agent='I', rate=beta) self.S0 = poblacion-infectados self.I0 = infectados self.poblacion = poblacion self.dataframe = None def _new_cases(self, population, time, pos): diff = np.zeros(len(pos)) N = np.sum(population) for edge in self.transitions.edges(data=True): source = edge[0] target = edge[1] trans = edge[2] rate = trans['rate']*population[pos[source]] if 'agent' in trans: agent = trans['agent'] rate *= population[pos[agent]]/N diff[pos[source]] -= rate diff[pos[target]] += rate return diff def integrate(self, timesteps): pos = {'S':0, 'I':1} population=np.zeros(2) population[0] = self.S0 population[1] = self.I0 time = np.arange(1, timesteps, 1) self.dataframe = pd.DataFrame(scipy.integrate.odeint(self._new_cases, population, time, args=(pos,)), columns=pos.keys(), index=time) self.dataframe['tiempo']=time class SIR_Model(): def __init__(self, poblacion, infectados, recuperados=0, beta=None, mu=None): self.transitions = nx.MultiDiGraph() self.transitions.add_edge('S', 'I', agent='I', rate=beta) self.transitions.add_edge('I', 'R', rate=mu) self.S0 = poblacion-infectados self.I0 = infectados self.R0 = recuperados self.poblacion = poblacion self.dataframe = None def _new_cases(self, population, time, pos): diff = np.zeros(len(pos)) N = np.sum(population) for edge in self.transitions.edges(data=True): source = edge[0] target = edge[1] trans = edge[2] rate = trans['rate']*population[pos[source]] if 'agent' in trans: agent = trans['agent'] rate *= population[pos[agent]]/N diff[pos[source]] -= rate diff[pos[target]] += rate return diff def integrate(self, timesteps): pos = {'S':0, 'I':1, 'R':2} population=np.zeros(3) population[0] = self.S0 population[1] = self.I0 population[2] = self.R0 time = np.arange(1, timesteps, 1) self.dataframe = pd.DataFrame(scipy.integrate.odeint(self._new_cases, population, time, args=(pos,)), columns=pos.keys(), index=time) self.dataframe['tiempo']=time
26.893204
141
0.56065
332
2,770
4.614458
0.204819
0.068538
0.044386
0.043081
0.866841
0.866841
0.821149
0.821149
0.723238
0.723238
0
0.017214
0.307942
2,770
102
142
27.156863
0.781951
0
0
0.771429
0
0
0.019161
0
0
0
0
0
0
1
0.085714
false
0
0.057143
0
0.2
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
274a4d87364f225a3b75e9158affc090c494da77
45,261
py
Python
contrib/python/examples/test_resolver.py
elindsey/ldns
778797953f6e1287507b687e71f188e6ae589d02
[ "BSD-3-Clause" ]
178
2016-11-03T18:25:30.000Z
2022-03-29T20:44:47.000Z
contrib/python/examples/test_resolver.py
elamaran619/ldns
85732f000f73ba71f7b62e374891acd2fc70c334
[ "BSD-3-Clause" ]
119
2019-03-16T08:46:31.000Z
2022-03-16T15:56:00.000Z
contrib/python/examples/test_resolver.py
elamaran619/ldns
85732f000f73ba71f7b62e374891acd2fc70c334
[ "BSD-3-Clause" ]
76
2016-11-20T16:50:03.000Z
2022-03-29T01:22:19.000Z
#!/usr/bin/env python # # ldns_resolver testing script. # # Do not use constructs that differ between Python 2 and 3. # Use write on stdout or stderr. # import ldns import sys import os import inspect class_name = "ldns_resolver" method_name = None error_detected = False temp_fname = "tmp_resolver.txt" def set_error(): """ Writes an error message and sets error flag. """ global class_name global method_name global error_detected error_detected = True sys.stderr.write("(line %d): malfunctioning method %s.\n" % \ (inspect.currentframe().f_back.f_lineno, method_name)) #if not error_detected: if True: method_name = class_name + ".axfr_complete()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".axfr_last_pkt()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".axfr_next()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".axfr_start()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".debug()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_debug(False) try: ret = resolver.debug() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_debug(True) try: ret = resolver.debug() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".dec_nameserver_count()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") cnt = resolver.nameserver_count() try: resolver.dec_nameserver_count() except: set_error() if cnt != (resolver.nameserver_count() + 1): set_error() #if not error_detected: if True: method_name = class_name + ".defnames()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_defnames(False) try: ret = resolver.defnames() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_defnames(True) try: ret = resolver.defnames() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".dnsrch()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_dnsrch(False) try: ret = resolver.dnsrch() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_dnsrch(True) try: ret = resolver.dnsrch() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".dnssec()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_dnssec(False) try: ret = resolver.dnssec() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_dnssec(True) try: ret = resolver.dnssec() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".dnssec_anchors()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") rrl = ldns.ldns_rr_list.new() try: ret = resolver.dnssec_anchors() if ret != None: set_error() except: set_error() resolver.set_dnssec_anchors(rrl) try: ret = resolver.dnssec_anchors() if not isinstance(ret, ldns.ldns_rr_list): set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".dnssec_cd()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_dnssec_cd(False) try: ret = resolver.dnssec_cd() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_dnssec_cd(True) try: ret = resolver.dnssec_cd() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".domain()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_domain(None) try: ret = resolver.domain() if ret != None: set_error() except: set_error() dname = ldns.ldns_dname("example.com.") resolver.set_domain(dname) try: ret = resolver.domain() if not isinstance(ret, ldns.ldns_dname): set_error() if ret != dname: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".edns_udp_size()" try: resolver = ldns.ldns_resolver.new() if not isinstance(resolver, ldns.ldns_resolver): set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".edns_udp_size()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_edns_udp_size(4096) try: ret = resolver.edns_udp_size() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 4096: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".fail()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_fail(False) try: ret = resolver.fail() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_fail(True) try: ret = resolver.fail() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".fallback()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_fallback(False) try: ret = resolver.fallback() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_fallback(True) try: ret = resolver.fallback() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".get_addr_by_name()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.get_addr_by_name("www.google.com", ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) if not isinstance(ret, ldns.ldns_rr_list): set_error() except: set_error() try: ret = resolver.get_addr_by_name(1, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.get_addr_by_name("www.google.com", "bad argument", ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.get_addr_by_name("www.google.com", ldns.LDNS_RR_CLASS_IN, "bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".get_name_by_addr()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: addr = resolver.get_name_by_addr("8.8.8.8", ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) if not isinstance(addr, ldns.ldns_rr_list): set_error() except: set_error() try: addr = resolver.get_name_by_addr(1, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: addr = resolver.get_name_by_addr("8.8.8.8", "bad argument", ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: addr = resolver.get_name_by_addr("8.8.8.8", ldns.LDNS_RR_CLASS_IN, "bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".igntc()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_igntc(False) try: ret = resolver.igntc() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_igntc(True) try: ret = resolver.igntc() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".incr_nameserver_count()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") cnt = resolver.nameserver_count() try: resolver.incr_nameserver_count() except: set_error() if (cnt + 1) != resolver.nameserver_count(): set_error() #if not error_detected: if True: method_name = class_name + ".ip6()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_ip6(0) try: ret = resolver.ip6() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 0: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".nameserver_count()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_nameserver_count(1) try: ret = resolver.nameserver_count() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 1: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".nameserver_rtt()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") num = resolver.nameserver_count() for i in range(0, num): resolver.set_nameserver_rtt(i, i + 1) try: for i in range(0, num): ret = resolver.nameserver_rtt(i) if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if (i + 1) != ret: set_error() except: set_error() try: ret = resolver.nameserver_rtt("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".nameservers()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".nameservers_randomize()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.nameservers_randomize() except: set_error() #if not error_detected: if True: method_name = class_name + ".new_frm_file()" try: ret = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf", raiseException=True) if not isinstance(ret, ldns.ldns_resolver): set_error() except: set_error() try: ret = ldns.ldns_resolver.new_frm_file(1, raiseException=True) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".new_frm_fp()" fi = open("/etc/resolv.conf") try: ret = ldns.ldns_resolver.new_frm_fp(fi, raiseException=True) if not isinstance(ret, ldns.ldns_resolver): set_error() except: set_error() fi.close() try: ret = ldns.ldns_resolver.new_frm_fp(1, raiseException=True) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".new_frm_fp_l()" fi = open("/etc/resolv.conf") try: ret, line = ldns.ldns_resolver.new_frm_fp_l(fi, raiseException=True) if not isinstance(ret, ldns.ldns_resolver): set_error() if (not isinstance(line, int)) and (not isinstance(line, long)): set_error() except: set_error() fi.close() try: ret, line = ldns.ldns_resolver.new_frm_fp_l(1, raiseException=True) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".pop_nameserver()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") cnt = resolver.nameserver_count() try: for i in range(0, cnt): ret = resolver.pop_nameserver() if not isinstance(ret, ldns.ldns_rdf): set_error() except: set_error() try: ret = resolver.pop_nameserver() if ret != None: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".port()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_port(12345) try: ret = resolver.port() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 12345: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".prepare_query_pkt()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.prepare_query_pkt("example.com.", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD, raiseException=True) if not isinstance(ret, ldns.ldns_pkt): set_error() except: set_error() try: ret = resolver.prepare_query_pkt(1, ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD, raiseException=True) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.prepare_query_pkt("example.com.", "bad argument", ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD, raiseException=True) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.prepare_query_pkt("example.com.", ldns.LDNS_RR_TYPE_A, "bad argument", ldns.LDNS_RD, raiseException=True) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.prepare_query_pkt("example.com.", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, "bad argument", raiseException=True) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".push_dnssec_anchor()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") key = ldns.ldns_key.new_frm_algorithm(ldns.LDNS_SIGN_DSA, 512) domain = ldns.ldns_dname("example.") key.set_pubkey_owner(domain) pubkey = key.key_to_rr() ds = ldns.ldns_key_rr2ds(pubkey, ldns.LDNS_SHA1) try: ret = resolver.push_dnssec_anchor(ds) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rr = ldns.ldns_rr.new_frm_str("test1 600 IN A 0.0.0.0") try: ret = resolver.push_dnssec_anchor(rr) if ret == ldns.LDNS_STATUS_OK: set_error() except: set_error() try: ret = resolver.push_dnssec_anchor("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".push_nameserver()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") rdf = ldns.ldns_rdf.new_frm_str("127.0.0.1", ldns.LDNS_RDF_TYPE_A) try: ret = resolver.push_nameserver(rdf) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rdf = ldns.ldns_rdf.new_frm_str("::1", ldns.LDNS_RDF_TYPE_AAAA) try: ret = resolver.push_nameserver(rdf) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rdf = ldns.ldns_rdf.new_frm_str("example.com.", ldns.LDNS_RDF_TYPE_DNAME) try: ret = resolver.push_nameserver(rdf) if ret == ldns.LDNS_STATUS_OK: set_error() except: set_error() try: ret = resolver.push_nameserver("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".push_nameserver_rr()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") rr = ldns.ldns_rr.new_frm_str("test 600 IN A 127.0.0.1") try: ret = resolver.push_nameserver_rr(rr) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rr = ldns.ldns_rr.new_frm_str("test 600 IN AAAA ::1") try: ret = resolver.push_nameserver_rr(rr) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rr = ldns.ldns_rr.new_frm_str("test 600 IN NS 8.8.8.8") try: ret = resolver.push_nameserver_rr(rr) if ret == ldns.LDNS_STATUS_OK: set_error() except: set_error() try: ret = resolver.push_nameserver_rr("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".push_nameserver_rr_list()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") rrl = ldns.ldns_rr_list.new() rr = ldns.ldns_rr.new_frm_str("test 600 IN A 127.0.0.1") rrl.push_rr(rr) try: ret = resolver.push_nameserver_rr_list(rrl) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rrl = ldns.ldns_rr_list.new() rr = ldns.ldns_rr.new_frm_str("test 600 IN AAAA ::1") rrl.push_rr(rr) try: ret = resolver.push_nameserver_rr_list(rrl) if ret != ldns.LDNS_STATUS_OK: set_error() except: set_error() rrl = ldns.ldns_rr_list.new() rr = ldns.ldns_rr.new_frm_str("test 600 IN NS 8.8.8.8") rrl.push_rr(rr) try: ret = resolver.push_nameserver_rr_list(rrl) if ret == ldns.LDNS_STATUS_OK: set_error() except: set_error() try: ret = resolver.push_nameserver_rr_list("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".push_searchlist()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.push_searchlist("example.com.") try: resolver.push_searchlist("example.com.") except: set_error() try: resolver.push_searchlist(1) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".query()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.query("www.nic.cz", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) if not isinstance(ret, ldns.ldns_pkt): set_error() except: set_error() try: ret = resolver.query(1, ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.query("www.nic.cz", "bad argument", ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.query("www.nic.cz", ldns.LDNS_RR_TYPE_A, "bad argument", ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.query("www.nic.cz", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, "bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".random()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_random(False) try: ret = resolver.random() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_random(True) try: ret = resolver.random() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".recursive()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_recursive(False) try: ret = resolver.recursive() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_recursive(True) try: ret = resolver.recursive() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".retrans()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_retrans(127) try: ret = resolver.retrans() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 127: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".retry()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_retry(4) try: ret = resolver.retry() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 4: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".rtt()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".search()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.search("www.nic.cz", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) if not isinstance(ret, ldns.ldns_pkt): set_error() except: set_error() try: ret = resolver.search(1, ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.search("www.nic.cz", "bad argument", ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.search("www.nic.cz", ldns.LDNS_RR_TYPE_A, "bad argument", ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.search("www.nic.cz", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, "bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".searchlist()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".searchlist_count()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.searchlist_count() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 0: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".send()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.send("www.nic.cz", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) if not isinstance(ret, ldns.ldns_pkt): set_error() except: set_error() try: ret = resolver.send(1, ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.send("www.nic.cz", "bad argument", ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.send("www.nic.cz", ldns.LDNS_RR_TYPE_A, "bad argument", ldns.LDNS_RD) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.send("www.nic.cz", ldns.LDNS_RR_TYPE_A, ldns.LDNS_RR_CLASS_IN, "bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".send_pkt()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") pkt = ldns.ldns_pkt.new_query_frm_str("test.nic.cz",ldns.LDNS_RR_TYPE_ANY, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_RD | ldns.LDNS_AD) try: status, ret = resolver.send_pkt(pkt) if status != ldns.LDNS_STATUS_OK: ste_error() if not isinstance(ret, ldns.ldns_pkt): set_error() except: set_error() try: status, ret = resolver.send_pkt("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_debug()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_debug(False) ret = resolver.debug() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_debug(True) ret = resolver.debug() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_defnames()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_defnames(False) ret = resolver.defnames() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_defnames(True) ret = resolver.defnames() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_dnsrch()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_dnsrch(False) ret = resolver.dnsrch() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_dnsrch(True) ret = resolver.dnsrch() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_dnssec()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_dnssec(False) ret = resolver.dnssec() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_dnssec(True) ret = resolver.dnssec() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_dnssec_anchors()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") rrl = ldns.ldns_rr_list.new() try: resolver.set_dnssec_anchors(rrl) ret = resolver.dnssec_anchors() if not isinstance(ret, ldns.ldns_rr_list): set_error() except: set_error() try: resolver.set_dnssec_anchors("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_dnssec_cd()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_dnssec_cd(False) ret = resolver.dnssec_cd() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_dnssec_cd(True) ret = resolver.dnssec_cd() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_domain()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_domain(None) ret = resolver.domain() if ret != None: set_error() except: set_error() dname = ldns.ldns_dname("example.com.") try: resolver.set_domain(dname) ret = resolver.domain() if not isinstance(ret, ldns.ldns_dname): set_error() if ret != dname: set_error() except: set_error() rdf = ldns.ldns_rdf.new_frm_str("example.com.", ldns.LDNS_RDF_TYPE_DNAME) try: resolver.set_domain(rdf) ret = resolver.domain() if not isinstance(ret, ldns.ldns_rdf): set_error() if ret != dname: set_error() except: set_error() resolver.set_domain("example.com.") try: resolver.set_domain("example.com.") ret = resolver.domain() if not isinstance(ret, ldns.ldns_dname): set_error() if ret != dname: set_error() except: set_error() rdf = ldns.ldns_rdf.new_frm_str("127.0.0.1", ldns.LDNS_RDF_TYPE_A) try: resolver.set_domain(rdf) set_error() except Exception as e: pass except: set_error() try: resolver.set_domain(1) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_edns_udp_size()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_edns_udp_size(4096) ret = resolver.edns_udp_size() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 4096: set_error() except: set_error() try: resolver.set_edns_udp_size("bad argument") set_error() except TypeError as e: pass except: ste_error() #if not error_detected: if True: method_name = class_name + ".set_fail()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_fail(False) ret = resolver.fail() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_fail(True) ret = resolver.fail() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_fallback()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_fallback(False) ret = resolver.fallback() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_fallback(True) ret = resolver.fallback() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_igntc()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_igntc(False) ret = resolver.igntc() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_igntc(True) ret = resolver.igntc() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_ip6()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_ip6(1) ret = resolver.ip6() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 1: set_error() except: set_error() try: resolver.set_ip6("bad argument") set_error() except TypeError as e: pass except: ste_error() #if not error_detected: if True: method_name = class_name + ".set_nameserver_count()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_nameserver_count(2) ret = resolver.nameserver_count() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 2: set_error() except: set_error() try: resolver.set_nameserver_count("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_nameserver_rtt()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") num = resolver.nameserver_count() try: for i in range(0, num): resolver.set_nameserver_rtt(i, i + 1) ret = resolver.nameserver_rtt(i) if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if (i + 1) != ret: set_error() except: set_error() try: ret = resolver.set_nameserver_rtt("bad argument", 0) set_error() except TypeError as e: pass except: set_error() try: ret = resolver.set_nameserver_rtt(0, "bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_nameservers()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".set_port()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_port(12345) ret = resolver.port() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 12345: set_error() except: set_error() try: resolver.set_port("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_random()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_random(False) ret = resolver.random() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_random(True) ret = resolver.random() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_recursive()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_recursive(False) ret = resolver.recursive() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_recursive(True) ret = resolver.recursive() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".set_retrans()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_retrans(127) ret = resolver.retrans() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 127: set_error() except: set_error() try: resolver.set_retrans("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_retry()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_retry(4) ret = resolver.retry() if (not isinstance(ret, int)) and (not isinstance(ret, long)): set_error() if ret != 4: set_error() except: set_error() try: resolver.set_retry("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_rtt()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".set_timeout()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".set_tsig_algorithm()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") tsigstr = "hmac-md5.sig-alg.reg.int." try: resolver.set_tsig_algorithm(tsigstr) ret = resolver.tsig_algorithm() if not isinstance(ret, str): set_error() if ret != tsigstr: set_error() except: set_error() try: resolver.set_tsig_algorithm(1) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_tsig_keydata()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") tkdstr = "Humpty Dumpty sat on a wall, Humpty Dumpty had a great fall, All the King's horses and all the King's men, Couldn't put Humpty together again." try: resolver.set_tsig_keydata(tkdstr) ret = resolver.tsig_keydata() if not isinstance(ret, str): set_error() if ret != tkdstr: set_error() except: set_error() try: resolver.set_tsig_keydata(1) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_tsig_keyname()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") tknstr = "key 1" try: resolver.set_tsig_keyname(tknstr) ret = resolver.tsig_keyname() if not isinstance(ret, str): set_error() if ret != tknstr: set_error() except: set_error() try: resolver.set_tsig_keyname(1) set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".set_usevc()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: resolver.set_usevc(False) ret = resolver.usevc() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() try: resolver.set_usevc(True) ret = resolver.usevc() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".timeout()" sys.stderr.write("%s not tested.\n" % (method_name)) #if not error_detected: if True: method_name = class_name + ".trusted_key()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") key = ldns.ldns_key.new_frm_algorithm(ldns.LDNS_SIGN_DSA, 512) domain = ldns.ldns_dname("example.") key.set_pubkey_owner(domain) pubkey = key.key_to_rr() ds = ldns.ldns_key_rr2ds(pubkey, ldns.LDNS_SHA1) resolver.push_dnssec_anchor(ds) rrl = ldns.ldns_rr_list.new() try: ret = resolver.trusted_key(rrl) if ret != None: set_error() except: set_error() rrl.push_rr(ds) ret = resolver.trusted_key(rrl) try: ret = resolver.trusted_key(rrl) if not isinstance(ret, ldns.ldns_rr_list): set_error() if ret.rr_count() != 1: set_error() except: set_error() try: ret = resolver.trusted_key("bad argument") set_error() except TypeError as e: pass except: set_error() #if not error_detected: if True: method_name = class_name + ".tsig_algorithm()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.tsig_algorithm() if ret != None: set_error() except: set_error() tsigstr = "hmac-md5.sig-alg.reg.int." resolver.set_tsig_algorithm(tsigstr) try: ret = resolver.tsig_algorithm() if not isinstance(ret, str): set_error() if ret != tsigstr: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".tsig_keydata()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.tsig_keydata() if ret != None: set_error() except: set_error() tkdstr = "Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe." resolver.set_tsig_keydata(tkdstr) try: ret = resolver.tsig_keydata() if not isinstance(ret, str): set_error() if ret != tkdstr: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".tsig_keyname()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") try: ret = resolver.tsig_keyname() if ret != None: set_error() except: set_error() tknstr = "key 2" resolver.set_tsig_keyname(tknstr) try: ret = resolver.tsig_keyname() if not isinstance(ret, str): set_error() if ret != tknstr: set_error() except: set_error() #if not error_detected: if True: method_name = class_name + ".usevc()" resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf") resolver.set_usevc(False) try: ret = resolver.usevc() if not isinstance(ret, bool): set_error() if ret != False: set_error() except: set_error() resolver.set_usevc(True) try: ret = resolver.usevc() if not isinstance(ret, bool): set_error() if ret != True: set_error() except: set_error() if not error_detected: sys.stdout.write("%s: passed.\n" % (os.path.basename(__file__))) else: sys.stdout.write("%s: errors detected.\n" % (os.path.basename(__file__))) sys.exit(1)
25.833904
157
0.590575
5,829
45,261
4.333505
0.038943
0.119082
0.084244
0.069319
0.930641
0.905344
0.893666
0.882937
0.863698
0.850158
0
0.005816
0.297165
45,261
1,751
158
25.848658
0.788249
0.042465
0
0.87751
0
0.001339
0.086043
0.006361
0
0
0
0
0
1
0.000669
false
0.032129
0.002677
0
0.003347
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
2763bc1faa9b5ec7d1d6d2a3946586252191d3f5
145
py
Python
assessment/models.py
kenware/Assessment
69f5e3fbf18dfa2c59eaf3b083ebdba7ca66c9b7
[ "MIT" ]
null
null
null
assessment/models.py
kenware/Assessment
69f5e3fbf18dfa2c59eaf3b083ebdba7ca66c9b7
[ "MIT" ]
3
2020-02-11T23:31:01.000Z
2021-06-10T21:04:34.000Z
assessment/models.py
kenware/Assessment
69f5e3fbf18dfa2c59eaf3b083ebdba7ca66c9b7
[ "MIT" ]
null
null
null
from .sub_models.score import * from .sub_models.assessment_type import * from .sub_models.questions import * from .sub_models.answers import *
24.166667
41
0.8
21
145
5.285714
0.428571
0.252252
0.468468
0.513514
0
0
0
0
0
0
0
0
0.117241
145
5
42
29
0.867188
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
27722e1a3d9f4f1f9ae5a222ab097ed22c8505a7
145
py
Python
src/ehrpreper/core/__init__.py
ClaudioBorges/ehrpreper
294d2659ad6a49fb2d203bd99bc000e920fc6e98
[ "Apache-2.0" ]
null
null
null
src/ehrpreper/core/__init__.py
ClaudioBorges/ehrpreper
294d2659ad6a49fb2d203bd99bc000e920fc6e98
[ "Apache-2.0" ]
null
null
null
src/ehrpreper/core/__init__.py
ClaudioBorges/ehrpreper
294d2659ad6a49fb2d203bd99bc000e920fc6e98
[ "Apache-2.0" ]
null
null
null
"""init py for core.""" # Expose the public API. from ehrpreper.core.entity import ModelEntity from ehrpreper.core.entity import DocumentEntity
24.166667
48
0.786207
20
145
5.7
0.7
0.22807
0.298246
0.403509
0.508772
0
0
0
0
0
0
0
0.124138
145
5
49
29
0.897638
0.282759
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
278ae0fb8d8b89523ee6ec59bbc9c86ee7053b64
316
py
Python
tests/conftest.py
ApeWorX/ape-fantom
694a3b8dde48dd0432a58768879f528dca4edbed
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
ApeWorX/ape-fantom
694a3b8dde48dd0432a58768879f528dca4edbed
[ "Apache-2.0" ]
4
2022-03-11T21:38:56.000Z
2022-03-20T15:39:16.000Z
tests/conftest.py
ApeWorX/ape-fantom
694a3b8dde48dd0432a58768879f528dca4edbed
[ "Apache-2.0" ]
null
null
null
import ape import pytest from ape._cli import cli as ape_cli from click.testing import CliRunner @pytest.fixture def networks(): return ape.networks @pytest.fixture def accounts(): return ape.accounts @pytest.fixture def runner(): return CliRunner() @pytest.fixture def cli(): return ape_cli
12.64
35
0.734177
44
316
5.204545
0.340909
0.227074
0.279476
0.218341
0
0
0
0
0
0
0
0
0.183544
316
24
36
13.166667
0.887597
0
0
0.25
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.25
0.25
0.75
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
7
27cc0fba65cadf85bf95f6d9e03cfca21768229f
2,590
py
Python
tests/test_monitor.py
insidus341/DeskLEDs
e0bb3f0258dc47198b88373ada83f545aa5ebf14
[ "MIT" ]
null
null
null
tests/test_monitor.py
insidus341/DeskLEDs
e0bb3f0258dc47198b88373ada83f545aa5ebf14
[ "MIT" ]
3
2021-06-08T22:01:10.000Z
2022-03-12T00:40:10.000Z
tests/test_monitor.py
insidus341/DeskLEDs
e0bb3f0258dc47198b88373ada83f545aa5ebf14
[ "MIT" ]
1
2020-07-19T13:33:14.000Z
2020-07-19T13:33:14.000Z
from run.monitor import Monitor MONITOR_ID = 1 def test_monitor_get_monitor_id(): monitor = Monitor(MONITOR_ID) assert monitor.get_monitor_id() == MONITOR_ID def test_monitor_get_monitor_middle(): monitor = Monitor(MONITOR_ID) assert isinstance(monitor.get_monitor_bounding_box(), tuple) def test_monitor_get_monitor_bounding_box_top_left_tuple(): monitor = Monitor(MONITOR_ID) assert isinstance(monitor.get_monitor_bounding_box_top_left(), tuple) def test_monitor_get_monitor_bounding_box_top_left_len(): monitor = Monitor(MONITOR_ID) assert len(monitor.get_monitor_bounding_box_top_left()) == 2 def test_monitor_get_monitor_bounding_box_bottom_right_tuple(): monitor = Monitor(MONITOR_ID) assert isinstance(monitor.get_monitor_bounding_box_bottom_right(), tuple) def test_monitor_get_monitor_bounding_box_bottom_right_len(): monitor = Monitor(MONITOR_ID) assert len(monitor.get_monitor_bounding_box_bottom_right()) == 2 def test_monitor_get_pixel_list_list(): monitor = Monitor(MONITOR_ID) assert isinstance(monitor.get_pixel_list(), list) def test_monitor_get_pixel_list_len(): monitor = Monitor(MONITOR_ID) assert len(monitor.get_pixel_list()) > 0 def test_monitor_get_monitor_average_color_tuple(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert isinstance(monitor_rgb, tuple) def test_monitor_get_monitor_average_color_red_greater_than_or_equal_zero(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert monitor_rgb[0] >= 0 def test_monitor_get_monitor_average_color_red_less_than_or_equal_255(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert monitor_rgb[0] <= 255 def test_monitor_get_monitor_average_color_green_greater_than_or_equal_zero(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert monitor_rgb[1] >= 0 def test_monitor_get_monitor_average_color_green_less_than_or_equal_255(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert monitor_rgb[1] <= 255 def test_monitor_get_monitor_average_color_blue_greater_than_or_equal_zero(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert monitor_rgb[2] >= 0 def test_monitor_get_monitor_average_color_blue_less_than_or_equal_255(): monitor = Monitor(MONITOR_ID) monitor_rgb = monitor.get_monitor_average_color() assert monitor_rgb[2] <= 255
36.478873
78
0.8
373
2,590
5.010724
0.099196
0.23221
0.23649
0.136437
0.958802
0.889781
0.859283
0.849652
0.658106
0.584805
0
0.013668
0.124324
2,590
70
79
37
0.810406
0
0
0.407407
0
0
0
0
0
0
0
0
0.277778
1
0.277778
false
0
0.018519
0
0.296296
0
0
0
0
null
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
27ce2dea8bf4958771d5f4f28bc6366b53921c40
16,092
py
Python
sdk/python/pulumi_hcloud/network_subnet.py
pulumi/pulumi-hcloud
332962b39a3a9f23e466eb3b7abc1347af1a118f
[ "ECL-2.0", "Apache-2.0" ]
13
2020-08-06T18:30:45.000Z
2022-02-21T09:49:51.000Z
sdk/python/pulumi_hcloud/network_subnet.py
pulumi/pulumi-hcloud
332962b39a3a9f23e466eb3b7abc1347af1a118f
[ "ECL-2.0", "Apache-2.0" ]
71
2020-07-02T11:19:44.000Z
2022-03-25T19:34:21.000Z
sdk/python/pulumi_hcloud/network_subnet.py
pulumi/pulumi-hcloud
332962b39a3a9f23e466eb3b7abc1347af1a118f
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-21T19:46:49.000Z
2020-07-21T19:46:49.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['NetworkSubnetArgs', 'NetworkSubnet'] @pulumi.input_type class NetworkSubnetArgs: def __init__(__self__, *, ip_range: pulumi.Input[str], network_id: pulumi.Input[int], network_zone: pulumi.Input[str], type: pulumi.Input[str], vswitch_id: Optional[pulumi.Input[int]] = None): """ The set of arguments for constructing a NetworkSubnet resource. :param pulumi.Input[str] ip_range: Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. :param pulumi.Input[int] network_id: ID of the Network the subnet should be added to. :param pulumi.Input[str] network_zone: Name of network zone. :param pulumi.Input[str] type: Type of subnet. `server`, `cloud` or `vswitch` :param pulumi.Input[int] vswitch_id: ID of the vswitch, Required if type is `vswitch` """ pulumi.set(__self__, "ip_range", ip_range) pulumi.set(__self__, "network_id", network_id) pulumi.set(__self__, "network_zone", network_zone) pulumi.set(__self__, "type", type) if vswitch_id is not None: pulumi.set(__self__, "vswitch_id", vswitch_id) @property @pulumi.getter(name="ipRange") def ip_range(self) -> pulumi.Input[str]: """ Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. """ return pulumi.get(self, "ip_range") @ip_range.setter def ip_range(self, value: pulumi.Input[str]): pulumi.set(self, "ip_range", value) @property @pulumi.getter(name="networkId") def network_id(self) -> pulumi.Input[int]: """ ID of the Network the subnet should be added to. """ return pulumi.get(self, "network_id") @network_id.setter def network_id(self, value: pulumi.Input[int]): pulumi.set(self, "network_id", value) @property @pulumi.getter(name="networkZone") def network_zone(self) -> pulumi.Input[str]: """ Name of network zone. """ return pulumi.get(self, "network_zone") @network_zone.setter def network_zone(self, value: pulumi.Input[str]): pulumi.set(self, "network_zone", value) @property @pulumi.getter def type(self) -> pulumi.Input[str]: """ Type of subnet. `server`, `cloud` or `vswitch` """ return pulumi.get(self, "type") @type.setter def type(self, value: pulumi.Input[str]): pulumi.set(self, "type", value) @property @pulumi.getter(name="vswitchId") def vswitch_id(self) -> Optional[pulumi.Input[int]]: """ ID of the vswitch, Required if type is `vswitch` """ return pulumi.get(self, "vswitch_id") @vswitch_id.setter def vswitch_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "vswitch_id", value) @pulumi.input_type class _NetworkSubnetState: def __init__(__self__, *, gateway: Optional[pulumi.Input[str]] = None, ip_range: Optional[pulumi.Input[str]] = None, network_id: Optional[pulumi.Input[int]] = None, network_zone: Optional[pulumi.Input[str]] = None, type: Optional[pulumi.Input[str]] = None, vswitch_id: Optional[pulumi.Input[int]] = None): """ Input properties used for looking up and filtering NetworkSubnet resources. :param pulumi.Input[str] ip_range: Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. :param pulumi.Input[int] network_id: ID of the Network the subnet should be added to. :param pulumi.Input[str] network_zone: Name of network zone. :param pulumi.Input[str] type: Type of subnet. `server`, `cloud` or `vswitch` :param pulumi.Input[int] vswitch_id: ID of the vswitch, Required if type is `vswitch` """ if gateway is not None: pulumi.set(__self__, "gateway", gateway) if ip_range is not None: pulumi.set(__self__, "ip_range", ip_range) if network_id is not None: pulumi.set(__self__, "network_id", network_id) if network_zone is not None: pulumi.set(__self__, "network_zone", network_zone) if type is not None: pulumi.set(__self__, "type", type) if vswitch_id is not None: pulumi.set(__self__, "vswitch_id", vswitch_id) @property @pulumi.getter def gateway(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "gateway") @gateway.setter def gateway(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "gateway", value) @property @pulumi.getter(name="ipRange") def ip_range(self) -> Optional[pulumi.Input[str]]: """ Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. """ return pulumi.get(self, "ip_range") @ip_range.setter def ip_range(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ip_range", value) @property @pulumi.getter(name="networkId") def network_id(self) -> Optional[pulumi.Input[int]]: """ ID of the Network the subnet should be added to. """ return pulumi.get(self, "network_id") @network_id.setter def network_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "network_id", value) @property @pulumi.getter(name="networkZone") def network_zone(self) -> Optional[pulumi.Input[str]]: """ Name of network zone. """ return pulumi.get(self, "network_zone") @network_zone.setter def network_zone(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "network_zone", value) @property @pulumi.getter def type(self) -> Optional[pulumi.Input[str]]: """ Type of subnet. `server`, `cloud` or `vswitch` """ return pulumi.get(self, "type") @type.setter def type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "type", value) @property @pulumi.getter(name="vswitchId") def vswitch_id(self) -> Optional[pulumi.Input[int]]: """ ID of the vswitch, Required if type is `vswitch` """ return pulumi.get(self, "vswitch_id") @vswitch_id.setter def vswitch_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "vswitch_id", value) class NetworkSubnet(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, ip_range: Optional[pulumi.Input[str]] = None, network_id: Optional[pulumi.Input[int]] = None, network_zone: Optional[pulumi.Input[str]] = None, type: Optional[pulumi.Input[str]] = None, vswitch_id: Optional[pulumi.Input[int]] = None, __props__=None): """ Provides a Hetzner Cloud Network Subnet to represent a Subnet in the Hetzner Cloud. ## Example Usage ```python import pulumi import pulumi_hcloud as hcloud mynet = hcloud.Network("mynet", ip_range="10.0.0.0/8") foonet = hcloud.NetworkSubnet("foonet", network_id=mynet.id, type="cloud", network_zone="eu-central", ip_range="10.0.1.0/24") ``` ## Import Network Subnet entries can be imported using a compound ID with the following format`<network-id>-<ip_range>` ```sh $ pulumi import hcloud:index/networkSubnet:NetworkSubnet mysubnet 123-10.0.0.0/24 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] ip_range: Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. :param pulumi.Input[int] network_id: ID of the Network the subnet should be added to. :param pulumi.Input[str] network_zone: Name of network zone. :param pulumi.Input[str] type: Type of subnet. `server`, `cloud` or `vswitch` :param pulumi.Input[int] vswitch_id: ID of the vswitch, Required if type is `vswitch` """ ... @overload def __init__(__self__, resource_name: str, args: NetworkSubnetArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Provides a Hetzner Cloud Network Subnet to represent a Subnet in the Hetzner Cloud. ## Example Usage ```python import pulumi import pulumi_hcloud as hcloud mynet = hcloud.Network("mynet", ip_range="10.0.0.0/8") foonet = hcloud.NetworkSubnet("foonet", network_id=mynet.id, type="cloud", network_zone="eu-central", ip_range="10.0.1.0/24") ``` ## Import Network Subnet entries can be imported using a compound ID with the following format`<network-id>-<ip_range>` ```sh $ pulumi import hcloud:index/networkSubnet:NetworkSubnet mysubnet 123-10.0.0.0/24 ``` :param str resource_name: The name of the resource. :param NetworkSubnetArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(NetworkSubnetArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, ip_range: Optional[pulumi.Input[str]] = None, network_id: Optional[pulumi.Input[int]] = None, network_zone: Optional[pulumi.Input[str]] = None, type: Optional[pulumi.Input[str]] = None, vswitch_id: Optional[pulumi.Input[int]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = NetworkSubnetArgs.__new__(NetworkSubnetArgs) if ip_range is None and not opts.urn: raise TypeError("Missing required property 'ip_range'") __props__.__dict__["ip_range"] = ip_range if network_id is None and not opts.urn: raise TypeError("Missing required property 'network_id'") __props__.__dict__["network_id"] = network_id if network_zone is None and not opts.urn: raise TypeError("Missing required property 'network_zone'") __props__.__dict__["network_zone"] = network_zone if type is None and not opts.urn: raise TypeError("Missing required property 'type'") __props__.__dict__["type"] = type __props__.__dict__["vswitch_id"] = vswitch_id __props__.__dict__["gateway"] = None super(NetworkSubnet, __self__).__init__( 'hcloud:index/networkSubnet:NetworkSubnet', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, gateway: Optional[pulumi.Input[str]] = None, ip_range: Optional[pulumi.Input[str]] = None, network_id: Optional[pulumi.Input[int]] = None, network_zone: Optional[pulumi.Input[str]] = None, type: Optional[pulumi.Input[str]] = None, vswitch_id: Optional[pulumi.Input[int]] = None) -> 'NetworkSubnet': """ Get an existing NetworkSubnet resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] ip_range: Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. :param pulumi.Input[int] network_id: ID of the Network the subnet should be added to. :param pulumi.Input[str] network_zone: Name of network zone. :param pulumi.Input[str] type: Type of subnet. `server`, `cloud` or `vswitch` :param pulumi.Input[int] vswitch_id: ID of the vswitch, Required if type is `vswitch` """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _NetworkSubnetState.__new__(_NetworkSubnetState) __props__.__dict__["gateway"] = gateway __props__.__dict__["ip_range"] = ip_range __props__.__dict__["network_id"] = network_id __props__.__dict__["network_zone"] = network_zone __props__.__dict__["type"] = type __props__.__dict__["vswitch_id"] = vswitch_id return NetworkSubnet(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def gateway(self) -> pulumi.Output[str]: return pulumi.get(self, "gateway") @property @pulumi.getter(name="ipRange") def ip_range(self) -> pulumi.Output[str]: """ Range to allocate IPs from. Must be a subnet of the ip_range of the Network and must not overlap with any other subnets or with any destinations in routes. """ return pulumi.get(self, "ip_range") @property @pulumi.getter(name="networkId") def network_id(self) -> pulumi.Output[int]: """ ID of the Network the subnet should be added to. """ return pulumi.get(self, "network_id") @property @pulumi.getter(name="networkZone") def network_zone(self) -> pulumi.Output[str]: """ Name of network zone. """ return pulumi.get(self, "network_zone") @property @pulumi.getter def type(self) -> pulumi.Output[str]: """ Type of subnet. `server`, `cloud` or `vswitch` """ return pulumi.get(self, "type") @property @pulumi.getter(name="vswitchId") def vswitch_id(self) -> pulumi.Output[Optional[int]]: """ ID of the vswitch, Required if type is `vswitch` """ return pulumi.get(self, "vswitch_id")
39.831683
198
0.625528
1,998
16,092
4.822322
0.087087
0.083342
0.065387
0.050234
0.805605
0.785989
0.755682
0.718838
0.701505
0.683861
0
0.003995
0.268829
16,092
403
199
39.930521
0.81489
0.317549
0
0.61435
1
0
0.092921
0.003988
0
0
0
0
0
1
0.156951
false
0.004484
0.022422
0.008969
0.273543
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
fd6fcf655f2f56ab2ad0d8a82f9fdf739c27b11e
122
py
Python
picbackend/views/v2/patient_story_concerns_views/__init__.py
bbcawodu/careadvisors-backend
5ebd3c0fc189b2486cea92b2a13c0bd8a0ee3838
[ "MIT" ]
null
null
null
picbackend/views/v2/patient_story_concerns_views/__init__.py
bbcawodu/careadvisors-backend
5ebd3c0fc189b2486cea92b2a13c0bd8a0ee3838
[ "MIT" ]
null
null
null
picbackend/views/v2/patient_story_concerns_views/__init__.py
bbcawodu/careadvisors-backend
5ebd3c0fc189b2486cea92b2a13c0bd8a0ee3838
[ "MIT" ]
null
null
null
from .general_concerns_views import * from .specific_concerns_views import * from .ranked_specific_concerns_view import *
30.5
44
0.852459
16
122
6.0625
0.5
0.268041
0.391753
0.474227
0
0
0
0
0
0
0
0
0.098361
122
3
45
40.666667
0.881818
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
fd7bf949ba64c647be11f2f5d672eccff71420c0
179
py
Python
pfim/__init__.py
apetcho/pfim
b3b06ba0f0ff53ea27cb453cdd7a5a95112071c1
[ "BSD-2-Clause" ]
null
null
null
pfim/__init__.py
apetcho/pfim
b3b06ba0f0ff53ea27cb453cdd7a5a95112071c1
[ "BSD-2-Clause" ]
null
null
null
pfim/__init__.py
apetcho/pfim
b3b06ba0f0ff53ea27cb453cdd7a5a95112071c1
[ "BSD-2-Clause" ]
null
null
null
#from .pfim import * #import pfim.pfim as pfim # import pfim #from .pfim import PfimCore #from .pfim import InteractivePfim # import _version from ._version import PFIM_VERSION
17.9
34
0.776536
25
179
5.44
0.28
0.294118
0.308824
0
0
0
0
0
0
0
0
0
0.156425
179
9
35
19.888889
0.900662
0.726257
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
fd9315592aeba91f11ee02e69edd5aa32986c9cf
3,099
py
Python
tests/test_pipeline.py
timuram/aio-request
7b43ba04362501cc7e3e82c1349998dbee3b7acc
[ "MIT" ]
7
2021-04-09T14:02:32.000Z
2021-09-02T17:51:17.000Z
tests/test_pipeline.py
timuram/aio-request
7b43ba04362501cc7e3e82c1349998dbee3b7acc
[ "MIT" ]
8
2021-12-20T01:16:53.000Z
2022-03-18T00:29:32.000Z
tests/test_pipeline.py
timuram/aio-request
7b43ba04362501cc7e3e82c1349998dbee3b7acc
[ "MIT" ]
2
2021-09-01T17:12:03.000Z
2021-09-27T10:52:45.000Z
import pytest import yarl import aio_request class NextPassingModule(aio_request.RequestModule): __slots__ = () async def execute( self, next: aio_request.NextModuleFunc, *, endpoint: yarl.URL, request: aio_request.Request, deadline: aio_request.Deadline, priority: aio_request.Priority ) -> aio_request.ClosableResponse: return await next(endpoint, request, deadline, priority) class RejectingModule(aio_request.RequestModule): __slots__ = () async def execute( self, next: aio_request.NextModuleFunc, *, endpoint: yarl.URL, request: aio_request.Request, deadline: aio_request.Deadline, priority: aio_request.Priority ) -> aio_request.ClosableResponse: return aio_request.EmptyResponse(status=500) class ResponseModule(aio_request.RequestModule): __slots__ = () async def execute( self, next: aio_request.NextModuleFunc, *, endpoint: yarl.URL, request: aio_request.Request, deadline: aio_request.Deadline, priority: aio_request.Priority ) -> aio_request.ClosableResponse: return aio_request.EmptyResponse(status=200) async def test_build_pipeline_exception(): pipeline = aio_request.build_pipeline([]) with pytest.raises(NotImplementedError): await pipeline( yarl.URL("http://www.google.ru"), aio_request.get("search"), aio_request.Deadline.from_timeout(5), aio_request.Priority.HIGH, ) async def test_build_pipeline_last_module_should_not_use_next(): pipeline = aio_request.build_pipeline([NextPassingModule()]) with pytest.raises(NotImplementedError): await pipeline( yarl.URL("http://www.google.ru"), aio_request.get("search"), aio_request.Deadline.from_timeout(5), aio_request.Priority.HIGH, ) async def test_build_pipeline_last_module_should_return_response(): pipeline = aio_request.build_pipeline([ResponseModule()]) response = await pipeline( yarl.URL("http://www.google.ru"), aio_request.get("search"), aio_request.Deadline.from_timeout(5), aio_request.Priority.HIGH, ) assert response.status == 200 async def test_build_pipeline_earliest_module_should_reject(): pipeline = aio_request.build_pipeline([RejectingModule(), ResponseModule()]) response = await pipeline( yarl.URL("http://www.google.ru"), aio_request.get("search"), aio_request.Deadline.from_timeout(5), aio_request.Priority.HIGH, ) assert response.status == 500 async def test_build_pipeline_earliest_module_should_pass(): pipeline = aio_request.build_pipeline([NextPassingModule(), ResponseModule()]) response = await pipeline( yarl.URL("http://www.google.ru"), aio_request.get("search"), aio_request.Deadline.from_timeout(5), aio_request.Priority.HIGH, ) assert response.status == 200
28.694444
82
0.667635
331
3,099
5.969789
0.166163
0.20749
0.072874
0.043016
0.897267
0.850202
0.801619
0.787449
0.741903
0.741903
0
0.008382
0.230074
3,099
107
83
28.962617
0.819782
0
0
0.702381
0
0
0.041949
0
0
0
0
0
0.035714
1
0
false
0.047619
0.035714
0
0.142857
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
e387d379653b67cc7812cf667443116c92802d78
121
py
Python
webshop/myapp/bp_general/__init__.py
grishian/groepswerk2
eff0305a99066466f6cafcf5572a0ea1f41f44ed
[ "MIT" ]
null
null
null
webshop/myapp/bp_general/__init__.py
grishian/groepswerk2
eff0305a99066466f6cafcf5572a0ea1f41f44ed
[ "MIT" ]
null
null
null
webshop/myapp/bp_general/__init__.py
grishian/groepswerk2
eff0305a99066466f6cafcf5572a0ea1f41f44ed
[ "MIT" ]
null
null
null
from flask import Blueprint bp_general = Blueprint('bp_general', __name__, cli_group="db") from . import views_general
20.166667
62
0.785124
17
121
5.117647
0.647059
0.252874
0.413793
0
0
0
0
0
0
0
0
0
0.123967
121
5
63
24.2
0.820755
0
0
0
0
0
0.099174
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
7
8bcafbcd29354fbcad93872f46627ca8eb34a451
5,348
py
Python
F3DASM-2/src/doe.py
gawelk/F3DAS
4a4e7233add608820de9ee0fd1c369c2fa1d24c1
[ "BSD-3-Clause" ]
45
2019-10-15T06:08:23.000Z
2020-08-01T03:15:11.000Z
F3DASM-2/src/doe.py
gawelk/F3DAS
4a4e7233add608820de9ee0fd1c369c2fa1d24c1
[ "BSD-3-Clause" ]
19
2021-02-28T16:06:30.000Z
2022-03-12T01:02:29.000Z
F3DASM-2/src/doe.py
gawelk/F3DAS
4a4e7233add608820de9ee0fd1c369c2fa1d24c1
[ "BSD-3-Clause" ]
10
2020-01-10T09:42:58.000Z
2020-07-20T19:57:15.000Z
import numpy as np import pandas as pd import matplotlib.pyplot as plt from .data import * class DOE(): """ Set of rules to be followed for the DOE module of your choice * Inherit from this class to your module in order to use its functionalities. """ def __init__(self,num,variable): """ Initialize """ self.variable = variable # Variable definitions as python dictionary self.num = num # Total desired number of dictionaries self.dim = len(self.variable) # Dimension of the feature space self.keys = list(self.variable.keys()) # Names of the feature self.values = np.zeros((num,self.dim)) # Initialize the data-frame with numpy to put your doe self.DATA = DATA(self.values,self.keys) def __str__(self): """ Overwrite print function """ print('-----------------------------------------------------') print(' DOE INFO ') print('-----------------------------------------------------') print('\n') print('Module Name :',self.__name__) print('Method :',self.method) print('Feature dimension :',self.dim) print('Feature object count :',self.num) return '\n' def plot(self,feature=(1,2), bins=(100,500,1000)): """ Method: Plot doe points for the selected feature dimensions """ fig = plt.figure() # Create figure object ax = fig.add_subplot(1, 1, 1) # Create axis for the figure colors = ("r", "b", "g") # Define colors for bins assert(len(bins) == len(colors)) # Keep the bin dimension and color dimension same count = 0 for i,n in enumerate(bins): # Loop for plotting with desired colors ax.scatter(self.data[count:n,feature[0]-1],self.data[count:n,feature[1]-1],color=colors[i]) count =n ################################ # Label your Axes ################################ plt.ylabel(self.names[feature[0]-1]) plt.xlabel(self.names[feature[1]-1]) def save(self,filename): """ Method: Pickle the doe points """ self.DATA.to_pickle(filename) ################################################################################################## # PURGATORY ################################################################################################## class DOE_past(): """ Set of rules to be followed for the DOE module of your choice * Inherit from this class to your module in order to use its functionalities. """ def __init__(self,num,variable): """ Initialize """ self.variable = variable # Variable definitions as python dictionary self.num = num # Total desired number of dictionaries self.dim = len(self.variable) # Dimension of the feature space self.names = list(self.variable.keys()) # Names of the feature self.data = np.zeros((num,self.dim)) # Initialize the data-frame with numpy to put your doe self.dataFrame() # Call for the internal method to convert numpy array to pandas DataFrame def __str__(self): """ Overwrite print function """ print('-----------------------------------------------------') print(' DOE INFO ') print('-----------------------------------------------------') print('\n') print('Module Name :',self.__name__) print('Method :',self.method) print('Feature dimension :',self.dim) print('Feature object count :',self.num) return '\n' def dataFrame(self): """ Method: Convert numpy doe to pandas doe """ self.pandas_data = pd.DataFrame(self.data,columns=self.names) def plot(self,feature=(1,2), bins=(100,500,1000)): """ Method: Plot doe points for the selected feature dimensions """ fig = plt.figure() # Create figure object ax = fig.add_subplot(1, 1, 1) # Create axis for the figure colors = ("r", "b", "g") # Define colors for bins assert(len(bins) == len(colors)) # Keep the bin dimension and color dimension same count = 0 for i,n in enumerate(bins): # Loop for plotting with desired colors ax.scatter(self.data[count:n,feature[0]-1],self.data[count:n,feature[1]-1],color=colors[i]) count =n ################################ # Label your Axes ################################ plt.ylabel(self.names[feature[0]-1]) plt.xlabel(self.names[feature[1]-1]) def save(self,name): """ Method: Pickle the doe points """ self.pandas_data.to_pickle(name)
39.323529
129
0.46653
552
5,348
4.463768
0.211957
0.025974
0.019481
0.022727
0.852679
0.852679
0.829951
0.829951
0.829951
0.796672
0
0.013617
0.340875
5,348
135
130
39.614815
0.68539
0.260845
0
0.735294
0
0
0.146019
0.060937
0
0
0
0
0.029412
1
0.132353
false
0
0.058824
0
0.25
0.235294
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
8bdafaaa583a3a5503d5d8fd14fe71e402e2014c
2,471
py
Python
core/src/Test/TestEvent.py
mkg20001/Fuzium
d424cd42a92272563fcba2290028c036cb7ce4a1
[ "MIT" ]
null
null
null
core/src/Test/TestEvent.py
mkg20001/Fuzium
d424cd42a92272563fcba2290028c036cb7ce4a1
[ "MIT" ]
null
null
null
core/src/Test/TestEvent.py
mkg20001/Fuzium
d424cd42a92272563fcba2290028c036cb7ce4a1
[ "MIT" ]
null
null
null
import util class ExampleClass(object): def __init__(self): self.called = [] self.onChanged = util.Event() def increment(self, title): self.called.append(title) class TestEvent: def testEvent(self): test_obj = ExampleClass() test_obj.onChanged.append(lambda: test_obj.increment("Called #1")) test_obj.onChanged.append(lambda: test_obj.increment("Called #2")) test_obj.onChanged.once(lambda: test_obj.increment("Once")) assert test_obj.called == [] test_obj.onChanged() assert test_obj.called == ["Called #1", "Called #2", "Once"] test_obj.onChanged() test_obj.onChanged() assert test_obj.called == ["Called #1", "Called #2", "Once", "Called #1", "Called #2", "Called #1", "Called #2"] def testOnce(self): test_obj = ExampleClass() test_obj.onChanged.once(lambda: test_obj.increment("Once test #1")) # It should be called only once assert test_obj.called == [] test_obj.onChanged() assert test_obj.called == ["Once test #1"] test_obj.onChanged() test_obj.onChanged() assert test_obj.called == ["Once test #1"] def testOnceMultiple(self): test_obj = ExampleClass() # Allow queue more than once test_obj.onChanged.once(lambda: test_obj.increment("Once test #1")) test_obj.onChanged.once(lambda: test_obj.increment("Once test #2")) test_obj.onChanged.once(lambda: test_obj.increment("Once test #3")) assert test_obj.called == [] test_obj.onChanged() assert test_obj.called == ["Once test #1", "Once test #2", "Once test #3"] test_obj.onChanged() test_obj.onChanged() assert test_obj.called == ["Once test #1", "Once test #2", "Once test #3"] def testOnceNamed(self): test_obj = ExampleClass() # Dont store more that one from same type test_obj.onChanged.once(lambda: test_obj.increment("Once test #1/1"), "type 1") test_obj.onChanged.once(lambda: test_obj.increment("Once test #1/2"), "type 1") test_obj.onChanged.once(lambda: test_obj.increment("Once test #2"), "type 2") assert test_obj.called == [] test_obj.onChanged() assert test_obj.called == ["Once test #1/1", "Once test #2"] test_obj.onChanged() test_obj.onChanged() assert test_obj.called == ["Once test #1/1", "Once test #2"]
37.439394
120
0.618373
321
2,471
4.598131
0.127726
0.227642
0.238482
0.154472
0.764905
0.764905
0.764905
0.73374
0.73374
0.665989
0
0.0192
0.241198
2,471
65
121
38.015385
0.768
0.038851
0
0.56
0
0
0.150148
0
0
0
0
0
0.24
1
0.12
false
0
0.02
0
0.18
0
0
0
0
null
1
1
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
8bdb2f6edab245059930be1fcd137d5c6f03eebc
8,595
py
Python
Nanodegree - Full Stack Web Developer/Item Catalog/lotsofitems.py
Lockon2000/Udacity
1ab66be4ed7e93a66c1c8a080be4b7c80b838900
[ "MIT" ]
null
null
null
Nanodegree - Full Stack Web Developer/Item Catalog/lotsofitems.py
Lockon2000/Udacity
1ab66be4ed7e93a66c1c8a080be4b7c80b838900
[ "MIT" ]
1
2022-02-27T14:49:07.000Z
2022-02-27T14:49:07.000Z
Nanodegree - Full Stack Web Developer/Item Catalog/lotsofitems.py
Lockon2000/Udacity
1ab66be4ed7e93a66c1c8a080be4b7c80b838900
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine, asc from sqlalchemy.orm import sessionmaker from database_setup import Base, Item import datetime engine = create_engine('sqlite:///catalogwithusers.db') Base.metadata.bind = engine DBSession = sessionmaker(bind=engine) session = DBSession() item = Item(name="Ball", description="Round Ball.", category="Sports", date=datetime.datetime.now()-datetime.timedelta(days=1), user_id=1) session.add(item) session.commit() item = Item(name="Glass", description="Glass to drink.", category="Kitchen Utensils", date=datetime.datetime.now()-datetime.timedelta(hours=1), user_id=1) session.add(item) session.commit() item = Item(name="Pen", description="Pen to play.", category="Stationery Items", date=datetime.datetime.now()-datetime.timedelta(days=2), user_id=1) session.add(item) session.commit() item = Item(name="USB Cable", description="Normal USB2.0 cable.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(seconds=40), user_id=1) session.add(item) session.commit() item = Item(name="External Hard drive", description="200GiB External Hard drive.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(days=24), user_id=1) session.add(item) session.commit() item = Item(name="Table", description="Normal Round Table.", category="Furnitrue", date=datetime.datetime.now()-datetime.timedelta(weeks=3), user_id=1) session.add(item) session.commit() item = Item(name="Ball2", description="Round Ball.", category="Sports2", date=datetime.datetime.now()-datetime.timedelta(days=1), user_id=1) session.add(item) session.commit() item = Item(name="Glass2", description="Glass to drink.", category="Kitchen Utensils", date=datetime.datetime.now()-datetime.timedelta(hours=1), user_id=1) session.add(item) session.commit() item = Item(name="Pen2", description="Pen to play.", category="Stationery Items", date=datetime.datetime.now()-datetime.timedelta(days=2), user_id=1) session.add(item) session.commit() item = Item(name="USB Cable2", description="Normal USB2.0 cable.", category="Electronics2", date=datetime.datetime.now()-datetime.timedelta(seconds=40), user_id=1) session.add(item) session.commit() item = Item(name="External Hard drive2", description="200GiB External Hard drive.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(days=24), user_id=1) session.add(item) session.commit() item = Item(name="Table2", description="Normal Round Table.", category="Furnitrue", date=datetime.datetime.now()-datetime.timedelta(weeks=3), user_id=1) session.add(item) session.commit() item = Item(name="Ball3", description="Round Ball.", category="Sports", date=datetime.datetime.now()-datetime.timedelta(days=1), user_id=1) session.add(item) session.commit() item = Item(name="Glass3", description="Glass to drink.", category="Kitchen Utensils2", date=datetime.datetime.now()-datetime.timedelta(hours=1), user_id=1) session.add(item) session.commit() item = Item(name="Pen3", description="Pen to play.", category="Stationery Items2", date=datetime.datetime.now()-datetime.timedelta(days=2), user_id=1) session.add(item) session.commit() item = Item(name="USB Cable3", description="Normal USB2.0 cable.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(seconds=40), user_id=1) session.add(item) session.commit() item = Item(name="External Hard drive3", description="200GiB External Hard drive.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(days=24), user_id=1) session.add(item) session.commit() item = Item(name="Table3", description="Normal Round Table.", category="Furnitrue2", date=datetime.datetime.now()-datetime.timedelta(weeks=3), user_id=1) session.add(item) session.commit() item = Item(name="Ball4", description="Round Ball.", category="Sports", date=datetime.datetime.now()-datetime.timedelta(days=1), user_id=1) session.add(item) session.commit() item = Item(name="Glass4", description="Glass to drink.", category="Kitchen Utensils", date=datetime.datetime.now()-datetime.timedelta(hours=1), user_id=1) session.add(item) session.commit() item = Item(name="Pen4", description="Pen to play.", category="Stationery Items", date=datetime.datetime.now()-datetime.timedelta(days=2), user_id=1) session.add(item) session.commit() item = Item(name="USB Cable4", description="Normal USB2.0 cable.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(seconds=40), user_id=1) session.add(item) session.commit() item = Item(name="External Hard drive4", description="200GiB External Hard drive.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(days=24), user_id=1) session.add(item) session.commit() item = Item(name="Table4", description="Normal Round Table.", category="Furnitrue", date=datetime.datetime.now()-datetime.timedelta(weeks=3), user_id=1) session.add(item) session.commit() item = Item(name="Ball24", description="Round Ball.", category="Sports2", date=datetime.datetime.now()-datetime.timedelta(days=1), user_id=1) session.add(item) session.commit() item = Item(name="Glass24", description="Glass to drink.", category="Kitchen Utensils", date=datetime.datetime.now()-datetime.timedelta(hours=1), user_id=1) session.add(item) session.commit() item = Item(name="Pen24", description="Pen to play.", category="Stationery Items", date=datetime.datetime.now()-datetime.timedelta(days=2), user_id=1) session.add(item) session.commit() item = Item(name="USB Cable24", description="Normal USB2.0 cable.", category="Electronics2", date=datetime.datetime.now()-datetime.timedelta(seconds=40), user_id=1) session.add(item) session.commit() item = Item(name="External Hard drive24", description="200GiB External Hard drive.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(days=24), user_id=1) session.add(item) session.commit() item = Item(name="Table24", description="Normal Round Table.", category="Furnitrue", date=datetime.datetime.now()-datetime.timedelta(weeks=3), user_id=1) session.add(item) session.commit() item = Item(name="Ball34", description="Round Ball.", category="Sports", date=datetime.datetime.now()-datetime.timedelta(days=1), user_id=1) session.add(item) session.commit() item = Item(name="Glass34", description="Glass to drink.", category="Kitchen Utensils2", date=datetime.datetime.now()-datetime.timedelta(hours=1), user_id=1) session.add(item) session.commit() item = Item(name="Pen34", description="Pen to play.", category="Stationery Items2", date=datetime.datetime.now()-datetime.timedelta(days=2), user_id=1) session.add(item) session.commit() item = Item(name="USB Cable34", description="Normal USB2.0 cable.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(seconds=40), user_id=1) session.add(item) session.commit() item = Item(name="External Hard drive34", description="200GiB External Hard drive.", category="Electronics", date=datetime.datetime.now()-datetime.timedelta(days=24), user_id=1) session.add(item) session.commit() item = Item(name="Table34", description="Normal Round Table.", category="Furnitrue2", date=datetime.datetime.now()-datetime.timedelta(weeks=3), user_id=1) session.add(item) session.commit()
32.070896
72
0.637929
1,007
8,595
5.406157
0.097319
0.052902
0.079353
0.152094
0.91881
0.91881
0.91881
0.91881
0.91881
0.91881
0
0.024644
0.216289
8,595
267
73
32.191011
0.783551
0
0
0.808696
0
0
0.161606
0.003374
0
0
0
0
0
1
0
false
0
0.017391
0
0.017391
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
47f7658a47552dd66073583a8017cf1c7e9a0214
3,028
py
Python
test/test_parking.py
dhood/uqcsbot
d36fb77a848d17d91ac8bd4c1b85000bac06f7c0
[ "MIT" ]
38
2017-04-13T01:15:05.000Z
2021-07-25T08:22:20.000Z
test/test_parking.py
dhood/uqcsbot
d36fb77a848d17d91ac8bd4c1b85000bac06f7c0
[ "MIT" ]
302
2017-04-13T01:20:26.000Z
2021-04-06T07:08:29.000Z
test/test_parking.py
dhood/uqcsbot
d36fb77a848d17d91ac8bd4c1b85000bac06f7c0
[ "MIT" ]
54
2017-05-04T23:18:29.000Z
2021-04-07T17:57:16.000Z
from test.conftest import MockUQCSBot, TEST_CHANNEL_ID from unittest.mock import patch def mocked_get_pf_parking_data(): """ Returns a local parking HTML document archived from the from UQ P&F website """ try: data = open("test/parking.html").read() except Exception as e: raise e return (0, "") return (200, data) @patch("uqcsbot.scripts.parking.get_pf_parking_data", new=mocked_get_pf_parking_data) def test_parking(uqcsbot: MockUQCSBot): """ Tests !parking """ uqcsbot.post_message(TEST_CHANNEL_ID, '!parking') messages = uqcsbot.test_messages.get(TEST_CHANNEL_ID, []) assert len(messages) == 2 assert (messages[-1]['text'] == "*Available Parks at UQ St. Lucia*\n" "32 Carparks Available in P1 - Warehouse (14P Daily)\n" "Few Carparks Available in P2 - Space Bank (14P Daily)\n" "6 Carparks Available in P6 - Hartley Teakle (14P Hourly)\n" "No Carparks Available in P7 - DustBowl (14P Daily)\n" "39 Carparks Available in P7 - Keith Street (14P Daily Capped)\n" "58 Carparks Available in P8 - Athletics Basement (14P Daily)\n" "29 Carparks Available in P8 - Athletics Roof (14P Daily)\n" "21 Carparks Available in P9 - Boatshed (14P Daily)\n" "167 Carparks Available in P10 - UQ Centre" + " & Playing Fields (14P Daily/14P Daily Capped)\n" "Few Carparks Available in P11 - Conifer Knoll Roof (14P Daily Restricted)") @patch("uqcsbot.scripts.parking.get_pf_parking_data", new=mocked_get_pf_parking_data) def test_parking_all(uqcsbot: MockUQCSBot): """ Tests !parking all """ uqcsbot.post_message(TEST_CHANNEL_ID, '!parking all') messages = uqcsbot.test_messages.get(TEST_CHANNEL_ID, []) assert len(messages) == 2 assert (messages[-1]['text'] == "*Available Parks at UQ St. Lucia*\n" "32 Carparks Available in P1 - Warehouse (14P Daily)\n" "Few Carparks Available in P2 - Space Bank (14P Daily)\n" "193 Carparks Available in P3 - Multi-Level West (Staff)\n" "Few Carparks Available in P4 - Multi-Level East (Staff)\n" "6 Carparks Available in P6 - Hartley Teakle (14P Hourly)\n" "No Carparks Available in P7 - DustBowl (14P Daily)\n" "39 Carparks Available in P7 - Keith Street (14P Daily Capped)\n" "58 Carparks Available in P8 - Athletics Basement (14P Daily)\n" "29 Carparks Available in P8 - Athletics Roof (14P Daily)\n" "21 Carparks Available in P9 - Boatshed (14P Daily)\n" "167 Carparks Available in P10 - UQ Centre" + " & Playing Fields (14P Daily/14P Daily Capped)\n" "23 Carparks Available in P11 - Conifer Knoll Lower (Staff)\n" "Few Carparks Available in P11 - Conifer Knoll Upper (Staff)\n" "Few Carparks Available in P11 - Conifer Knoll Roof (14P Daily Restricted)")
46.584615
88
0.637054
404
3,028
4.688119
0.269802
0.215417
0.24076
0.066526
0.81415
0.802534
0.769799
0.729673
0.729673
0.704329
0
0.05157
0.26354
3,028
64
89
47.3125
0.797758
0.035997
0
0.653061
0
0
0.579882
0.029934
0
0
0
0
0.081633
1
0.061224
false
0
0.040816
0
0.142857
0
0
0
0
null
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
9a0b5ea7cfd10b93ec9ebafcb426936c4ec0c550
7,474
py
Python
Python Programming Advanced/Exception handling-110.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
Python Programming Advanced/Exception handling-110.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
Python Programming Advanced/Exception handling-110.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
## 2. Organizing our code ## # Define the Trial class here class Trial(object): def __init__(self, datarow): self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) first_trial = Trial(chopsticks[0]) ## 3. The Chopstick class ## class Trial(object): def __init__(self, datarow): self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) first_trial = Trial(chopsticks[0]) # Define the Chopstick class here class Chopstick(object): def __init__(self,length): self.length = length mini_chopstick = Chopstick(100) ## 4. Storing the trials ## class Trial(object): def __init__(self, datarow): self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) class Chopstick(object): def __init__(self, length): self.length = length # Start our trial list empty self.trials = [] # Now, fill our list with relevant trials for item in chopsticks: if int(item[2]) == self.length: self.trials.append(Trial(item)) medium_chopstick = Chopstick(240) ## 5. Average Efficiency ## import math class Trial(object): def __init__(self, datarow): self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) class Chopstick(object): def __init__(self, length): self.length = length self.trials = [] for row in chopsticks: if int(row[2]) == self.length: self.trials.append(Trial(row)) def num_trials(self): return len(self.trials) def avg_efficiency(self): return math.fsum([row.efficiency for row in self.trials]) / self.num_trials() avg_eff_210 = Chopstick(210).avg_efficiency() ## 8. Bad Data ## class Trial(object): def __init__(self, datarow): try: self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) except ValueError: self.efficiency = -1.0 self.individual = -1 self.chopstick_length = -1 bad_trial = Trial(chopsticks[-1]) ## 9. Bad Data - Part 2 ## class Trial(object): def __init__(self, datarow): try: self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) except: self.efficiency = -1 self.individual = -1 self.chopstick_length = -1 class Chopstick(object): def __init__(self, length): self.length = length self.trials = [] for row in chopsticks: if int(row[2]) == self.length: trial = Trial(row) # Verify that the data is good if trial.efficiency != -1 and trial.individual != -1 and trial.chopstick_length != -1: # Add the trial to trials if it is good self.trials.append(trial) def num_trials(self): return len(self.trials) def avg_efficiency(self): efficiency_sum = 0 for trial in self.trials: efficiency_sum += trial.efficiency return efficiency_sum / self.num_trials() bad_chopstick = Chopstick(400) ## 10. Division By Zero ## class Trial(object): def __init__(self, datarow): try: self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) except: self.efficiency = -1 self.individual = -1 self.chopstick_length = -1 class Chopstick(object): def __init__(self, length): self.length = length self.trials = [] for row in chopsticks: if int(row[2]) == self.length: trial = Trial(row) if trial.individual >= 0: self.trials.append(trial) def num_trials(self): return len(self.trials) def avg_efficiency(self): efficiency_sum = 0 for trial in self.trials: efficiency_sum += trial.efficiency try: return efficiency_sum / self.num_trials() except ZeroDivisionError: return -1.0 bad_average = Chopstick(100).avg_efficiency() ## 11. Most Efficient Chopsticks ## class Trial(object): def __init__(self, datarow): try: self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) except: self.efficiency = -1 self.individual = -1 self.chopstick_length = -1 class Chopstick(object): def __init__(self, length): self.length = length self.trials = [] for row in chopsticks: if int(row[2]) == self.length: trial = Trial(row) if trial.individual >= 0: self.trials.append(trial) def num_trials(self): return len(self.trials) def avg_efficiency(self): efficiency_sum = 0 for trial in self.trials: efficiency_sum += trial.efficiency try: return efficiency_sum / self.num_trials() except ZeroDivisionError: return -1.0 chopstick_lengths = [180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330] chopstick_list = [Chopstick(length) for length in chopstick_lengths] ## 12. Most Efficient Chopsticks - Part 2 ## class Trial(object): def __init__(self, datarow): try: self.efficiency = float(datarow[0]) self.individual = int(datarow[1]) self.chopstick_length = int(datarow[2]) except: self.efficiency = -1 self.individual = -1 self.chopstick_length = -1 class Chopstick(object): def __init__(self, length): self.length = length self.trials = [] for row in chopsticks: if int(row[2]) == self.length: trial = Trial(row) if trial.individual >= 0: self.trials.append(trial) def num_trials(self): return len(self.trials) def avg_efficiency(self): efficiency_sum = 0 for trial in self.trials: efficiency_sum += trial.efficiency try: return efficiency_sum / self.num_trials() except ZeroDivisionError: return -1.0 def __lt__(self, other): return self.avg_efficiency() < other.avg_efficiency() def __gt__(self, other): return self.avg_efficiency() > other.avg_efficiency() def __le__(self, other): return self.avg_efficiency() <= other.avg_efficiency() def __ge__(self, other): return self.avg_efficiency() >= other.avg_efficiency() def __eq__(self, other): return self.avg_efficiency() == other.avg_efficiency() def __ne__(self, other): return self.avg_efficiency() != other.avg_efficiency() chopstick_lengths = [180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330] chopstick_list = [Chopstick(length) for length in chopstick_lengths] most_efficient = max(chopstick_list)
31.012448
102
0.587905
868
7,474
4.876728
0.116359
0.051973
0.049138
0.064257
0.829435
0.829435
0.821876
0.801087
0.801087
0.789275
0
0.031991
0.305727
7,474
241
103
31.012448
0.783773
0.055392
0
0.852632
0
0
0
0
0
0
0
0
0
1
0.168421
false
0
0.005263
0.063158
0.357895
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
7bd2e763baa415a9b5363ecfcdfde7b9666e55af
977
py
Python
segmenters/audio/SlidingWindowAudioSlicer/tests/test_slidingwindowaudioslicer.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
1
2021-04-06T19:27:47.000Z
2021-04-06T19:27:47.000Z
segmenters/audio/SlidingWindowAudioSlicer/tests/test_slidingwindowaudioslicer.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
5,414
2021-04-06T09:04:26.000Z
2022-03-30T13:12:40.000Z
segmenters/audio/SlidingWindowAudioSlicer/tests/test_slidingwindowaudioslicer.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
null
null
null
import numpy as np from .. import SlidingWindowAudioSlicer def test_sliding_window_mono(): n_frames = 100 frame_length = 2048 signal_orig = np.random.randn(frame_length * n_frames) segmenter = SlidingWindowAudioSlicer(frame_length, frame_length // 2) segmented_chunks_per_doc = segmenter.segment(np.stack([signal_orig, signal_orig])) assert len(segmented_chunks_per_doc) == 2 for segmented_chunk in segmented_chunks_per_doc: assert len(segmented_chunk) == n_frames * 2 - 1 def test_sliding_window_stereo(): n_frames = 100 frame_length = 2048 signal_orig = np.random.randn(2, frame_length * n_frames) segmenter = SlidingWindowAudioSlicer(frame_length, frame_length // 2) segmented_chunks_per_doc = segmenter.segment(np.stack([signal_orig, signal_orig])) assert len(segmented_chunks_per_doc) == 2 for segmented_chunk in segmented_chunks_per_doc: assert len(segmented_chunk) == (n_frames * 2 - 1) * 2
34.892857
86
0.744115
133
977
5.105263
0.270677
0.129602
0.159057
0.185567
0.851252
0.851252
0.851252
0.851252
0.851252
0.851252
0
0.029666
0.171955
977
27
87
36.185185
0.809642
0
0
0.6
0
0
0
0
0
0
0
0
0.2
1
0.1
false
0
0.1
0
0.2
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
7bdd9dfb3259d89a7d25a41874fcd990686c566e
41,597
py
Python
config.py
EinariTuukkanen/line-search-comparison
7daa38779017f26828caa31a53675c8223e6ab8e
[ "MIT" ]
null
null
null
config.py
EinariTuukkanen/line-search-comparison
7daa38779017f26828caa31a53675c8223e6ab8e
[ "MIT" ]
null
null
null
config.py
EinariTuukkanen/line-search-comparison
7daa38779017f26828caa31a53675c8223e6ab8e
[ "MIT" ]
null
null
null
defaults = { 'gamma': 0.99, # Multiplier to reduce step size if domain is invalid 'd': 5, # Diagonal offset for generating PD matrix 'p': 0, # Multiplier for offsetting negative entropy from zero 'max_domain_iterations': 300000, # Per calculation, max amount of laps } simple_test_params = { 'MatrixSquareSum': { 'params': { 'NewtonsMethod': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'GradientDescentMethod': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'ConjugateGradientMethod': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'HeavyBallMethod': {'tolerance': [1e-4], 'beta': [0.1, 0.5, 1.0, 5.0, 10.0], 'max_iterations': [10000]}, # noqa }, 'ls_params': { # 'ConstantSearch': {'delta': [0.0001, 0.1, 0.25, 0.5, 0.9]}, # noqa # 'GoldenSectionSearch': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa # 'BisectionSearch': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa # 'BisectionSearch': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1, 1e-4], 'max_iterations': [10000]}, # noqa # 'DichotomousSearch': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-7, 1e-8], 'tolerance': [1e-4, 1e-5], 'max_iterations': [10000]}, # noqa # 'DichotomousSearch': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-7, 1e-10], 'tolerance': [1e-5, 1e-9], 'max_iterations': [10000]}, # noqa # 'FibonacciSearch': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-8, 1e-10, 1e-12], 'tolerance': [1e-6, 1e-10], 'max_iterations': [10000]}, # noqa # 'UniformSearch': {'a': [-10, -5], 'b': [10, 5], 'interval_count': [5, 10, 100], 'interval_multiplier': [1, 1.5, 2], 'tolerance': [1e-6, 1e-8], 'max_iterations': [10000]}, # noqa # 'NewtonsSearch': {'delta': [0.5, 1, 5, 10], 'tolerance': [1e-7, 1e-8], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [0.9, 1, 1.1], 'alpha': [0.1, 0.25, 0.5], 'beta': [0.5, 0.75, 0.9], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [1], 'alpha': [0.5], 'beta': [0.75], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [1], 'alpha': [0.25], 'beta': [0.5], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [1], 'alpha': [0.45, 0.5, 0.55], 'beta': [0.65, 0.7, 0.75], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [0.9, 1, 1.1], 'alpha': [0.1, 0.25, 0.5], 'beta': [0.5, 0.75, 0.9], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [1], 'alpha': [0.1], 'beta': [0.5], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa } }, # 'NegativeEntropy': { # 'params': { # 'NewtonsMethod': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa # 'GradientDescentMethod': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa # 'ConjugateGradientMethod': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa # 'HeavyBallMethod': {'tolerance': [1e-4], 'beta': [0.1, 0.5, 1.0], 'max_iterations': [10000]}, # noqa # }, # 'ls_params': { # 'ConstantSearch': {'delta': [0.1, 0.25, 0.5]}, # noqa # 'GoldenSectionSearch': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa # 'BisectionSearch': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa # 'DichotomousSearch': {'a': [-10, -5], 'b': [5, 10], 'epsilon': [1e-6, 1e-7], 'tolerance': [1e-4, 1e-5], 'max_iterations': [10000]}, # noqa # 'FibonacciSearch': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-8, 1e-10, 1e-12], 'tolerance': [1e-6, 1e-12], 'max_iterations': [10000]}, # noqa # 'UniformSearch': {'a': [0, -5], 'b': [5, 10], 'interval_count': [5, 10, 20], 'interval_multiplier': [1, 1.5, 2], 'tolerance': [1e-5, 1e-6], 'max_iterations': [10000]}, # noqa # 'UniformSearch': {'a': [-5], 'b': [5], 'interval_count': [2], 'interval_multiplier': [1], 'tolerance': [1e-8], 'max_iterations': [10000]}, # noqa # 'NewtonsSearch': {'delta': [0.1, 0.5, 1, 5], 'tolerance': [1e-7, 1e-8], 'max_iterations': [100, 1000]}, # noqa # 'ArmijoSearch': {'delta': [0.9, 1, 1.1], 'alpha': [0.1, 0.25, 0.5], 'beta': [0.5, 0.75, 0.9], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # 'ArmijoSearch': {'delta': [1], 'alpha': [0.2, 0.25, 0.5], 'beta': [0.5, 0.75, 0.8], 'tolerance': [1e-7], 'max_iterations': [10000]}, # noqa # } # } } test_params = {} for f in simple_test_params: test_params[f] = {} for m, p in simple_test_params[f]['params'].items(): test_params[f][m] = {} for l, q in simple_test_params[f]['ls_params'].items(): test_params[f][m][l] = {'params': p, 'ls_params': q} overrides = { 'MatrixSquareSum': { 'NewtonsMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.5, 0.9, 1.0, 1.1, 1.5]}, # noqa }, 'DichotomousSearch': { 'params': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-7, 1e-10], 'tolerance': [1e-5, 1e-9], 'max_iterations': [10000]}, # noqa }, } }, 'NegativeEntropy': { 'NewtonsMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9]}, # noqa }, 'DichotomousSearch': { 'params': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10], 'b': [5, 10], 'epsilon': [1e-6, 1e-7], 'tolerance': [1e-4, 1e-5], 'max_iterations': [10000]}, # noqa } }, 'ConjugateGradientMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.0001, 0.1, 0.15, 0.2]}, # noqa } } } } for i in overrides: for j in overrides[i]: for k, p in overrides[i][j].items(): if (i in test_params and j in test_params[i] and k in test_params[i][j]): test_params[i][j][k]['params'] = p['params'] test_params[i][j][k]['ls_params'] = p['ls_params'] def calculate_permutation_count(test_params, point_count): c = 0 for f in test_params: for m in test_params[f]: for l, p in test_params[f][m].items(): _c = 1 for v in p['params'].values(): _c *= len(v) for v in p['ls_params'].values(): _c *= len(v) c += _c return c * point_count best_params = { 'MatrixSquareSum': { 'NewtonsMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'tolerance': 1e-7, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'tolerance': 1e-7, 'max_iterations': 10000}, # noqa # }, 'DichotomousSearch': { 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa 'ls_params': {'a': -5, 'b': 10, 'epsilon': 1e-10, 'tolerance': 1e-09, 'max_iterations': 10000}, # noqa }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-10, 'tolerance': 1e-10, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'interval_count': 5, 'interval_multiplier': 1.5, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1, 'tolerance': 1e-7, 'max_iterations': 10000}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1, 'alpha': 0.1, 'beta': 0.5, 'max_iterations': 10000}, # noqa # }, }, # 'GradientDescentMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.0001}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'epsilon': 1e-7, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 10, 'epsilon': 1e-12, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'interval_count': 5, 'interval_multiplier': 1, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1, 'tolerance': 1e-8, 'max_iterations': 10000}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 1000}, # noqa # 'ls_params': {'delta': 1.1, 'alpha': 0.25, 'beta': 0.5, 'max_iterations': 10000}, # noqa # }, # }, # 'ConjugateGradientMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.0001}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 10, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 10, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 10, 'epsilon': 1e-7, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 10, 'epsilon': 1e-10, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 10, 'interval_count': 5, 'interval_multiplier': 1, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1, 'tolerance': 1e-7, 'max_iterations': 10000}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.9, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1.1, 'alpha': 0.25, 'beta': 0.5, 'max_iterations': 10000}, # noqa # }, # }, # 'HeavyBallMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.0001}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'beta': 10, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 10, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'beta': 10, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 10, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'beta': 10, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-7, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.5, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 5, 'epsilon': 1e-12, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'beta': 10, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 10, 'interval_count': 5, 'interval_multiplier': 1, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'beta': 10, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 10, 'tolerance': 1e-7, 'max_iterations': 10000}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1.1, 'alpha': 0.25, 'beta': 0.5, 'max_iterations': 10000}, # noqa # }, # }, # }, # 'NegativeEntropy': { # 'NewtonsMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.9}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'tolerance': 1e-7, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 10, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 10, 'epsilon': 1e-7, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-12, 'tolerance': 1e-12, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': 0, 'b': 5, 'interval_count': 5, 'interval_multiplier': 1, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.5, 'tolerance': 1e-8, 'max_iterations': 100}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1.1, 'alpha': 0.5, 'beta': 0.9, 'max_iterations': 10000}, # noqa # }, # }, # 'GradientDescentMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.5}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-7, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-12, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': 0, 'b': 5, 'interval_count': 10, 'interval_multiplier': 1, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.5, 'tolerance': 1e-7, 'max_iterations': 100}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1.1, 'alpha': 0.5, 'beta': 0.75, 'max_iterations': 10000}, # noqa # }, # }, # 'ConjugateGradientMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.1}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-6, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-8, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': 0, 'b': 5, 'interval_count': 10, 'interval_multiplier': 1, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.1, 'tolerance': 1e-8, 'max_iterations': 100}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.9, 'alpha': 0.5, 'beta': 0.5, 'max_iterations': 10000}, # noqa # }, # }, # 'HeavyBallMethod': { # 'ConstantSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 0.5}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.5, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -10, 'b': 10, 'tolerance': 1e-4, 'max_iterations': 10000}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-6, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': -5, 'b': 5, 'epsilon': 1e-12, 'tolerance': 1e-6, 'max_iterations': 10000}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'a': 0, 'b': 5, 'interval_count': 10, 'interval_multiplier': 1, 'tolerance': 1e-5, 'max_iterations': 10000}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1, 'tolerance': 1e-7, 'max_iterations': 100}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': 1e-4, 'beta': 0.1, 'max_iterations': 10000}, # noqa # 'ls_params': {'delta': 1, 'alpha': 0.5, 'beta': 0.5, 'max_iterations': 10000}, # noqa # }, # }, }, } # visualization_params = { # **best_params['MatrixSquareSum'], # } test_params2 = { 'MatrixSquareSum': { 'NewtonsMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.0001, 0.1, 0.25, 0.5, 0.9]}, # noqa }, 'GoldenSectionSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa }, 'BisectionSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10, -5], 'b': [10, 5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa }, 'DichotomousSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-2, 1e-5, 1e-8], 'tolerance': [1e-4], 'max_iterations': [10000]}, # noqa }, 'FibonacciSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10, -5], 'b': [10, 5], 'epsilon': [1e-2, 1e-5, 1e-8], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa }, 'UniformSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'a': [-10, -5], 'b': [10, 5], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa }, 'NewtonsSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.0001, 0.1, 0.25, 0.5, 0.9, 1, 1.5], 'tolerance': [1e-4, 1e-7], 'max_iterations': [10000]}, # noqa }, 'ArmijoSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.75, 0.9], 'beta': [0.1, 0.25, 0.5, 0.75, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa }, }, 'GradientDescentMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.25, 0.5, 0.75, 0.9, 1, 1.1]}, # noqa }, 'GoldenSectionSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'BisectionSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'DichotomousSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [100]}, # noqa }, 'FibonacciSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'UniformSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [100]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa }, 'NewtonsSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'delta': [0, 0.5, 1, 5, 8, 10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'ArmijoSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.75, 0.9], 'beta': [0.1, 0.25, 0.5, 0.75, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa }, }, 'ConjugateGradientMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.25, 0.5, 0.75, 0.9, 1, 1.1]}, # noqa }, 'GoldenSectionSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'BisectionSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'DichotomousSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [100]}, # noqa }, 'FibonacciSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'UniformSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [100]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa }, 'NewtonsSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa 'ls_params': {'delta': [0, 0.5, 1, 5, 8, 10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'ArmijoSearch': { 'params': {'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.75, 0.9], 'beta': [0.1, 0.25, 0.5, 0.75, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa }, }, 'HeavyBallMethod': { 'ConstantSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.25, 0.5, 0.75, 0.9, 1, 1.1, ]}, # noqa }, 'GoldenSectionSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'BisectionSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'DichotomousSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [100]}, # noqa }, 'FibonacciSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [1000]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'UniformSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [100]}, # noqa 'ls_params': {'a': [-10], 'b': [10], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa }, 'NewtonsSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.01, 0.1, 0.25, 0.5], 'max_iterations': [1000]}, # noqa 'ls_params': {'delta': [0, 0.5, 1, 5, 8, 10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa }, 'ArmijoSearch': { 'params': {'tolerance': [1e-6], 'beta': [0.1, 0.5, 0.9], 'max_iterations': [10000]}, # noqa 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.9], 'beta': [0.1, 0.25, 0.5, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa }, }, }, # 'NegativeEntropy': { # 'NewtonsMethod': { # 'ConstantSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.25, 0.5, 0.75, 0.9, 1, 1.1, 1.5]}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.1, 0.5], 'b': [10, 5], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.1, 0.5, 1, 2], 'b': [10, 5], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': [1e-4], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.1, 0.5], 'b': [10, 5], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [1000]}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.1, 0.5], 'b': [10, 5], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [0]}, # noqa # 'ls_params': {'a': [1], 'b': [10, 5], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [0]}, # noqa # 'ls_params': {'delta': [0, 0.5, 1, 5], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': [1e-5], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.75, 0.9], 'beta': [0.1, 0.25, 0.5, 0.75, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa # }, # }, # 'GradientDescentMethod': { # 'ConstantSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.25, 0.5, 0.75, 0.9, 1, 1.1,]}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': [1e-4], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [100]}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'delta': [0, 0.5, 1, 5, 8, 10], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': [1e-5], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.75, 0.9], 'beta': [0.1, 0.25, 0.5, 0.75, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa # }, # }, # 'ConjugateGradientMethod': { # 'ConstantSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'delta': [0, 0.1, 0.25, 1, 1.5, 3]}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [-1, 0, 0.1], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [-1, 0, 0.1], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': [1e-4], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [-1, 0, 0.1], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [100]}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [-1, 0, 0.1], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'interval_count': [10], 'interval_multiplier': [1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': [1e-8], 'max_iterations': [1000]}, # noqa # 'ls_params': {'delta': [0, 0.5, 1, 5, 8, 10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': [1e-5], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.75, 0.9], 'beta': [0.1, 0.25, 0.5, 0.75, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa # }, # }, # 'HeavyBallMethod': { # 'ConstantSearch': { # 'params': {'tolerance': [1e-8], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.25, 0.5, 0.75, 0.9, 1, 1.1,]}, # noqa # }, # 'GoldenSectionSearch': { # 'params': {'tolerance': [1e-8], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'BisectionSearch': { # 'params': {'tolerance': [1e-8], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'DichotomousSearch': { # 'params': {'tolerance': [1e-4], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-4], 'max_iterations': [100]}, # noqa # }, # 'FibonacciSearch': { # 'params': {'tolerance': [1e-8], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [1000]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'epsilon': [1e-3, 1e-6, 1e-9], 'tolerance': [1e-6], 'max_iterations': [1000]}, # noqa # }, # 'UniformSearch': { # 'params': {'tolerance': [1e-8], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [100]}, # noqa # 'ls_params': {'a': [0.5], 'b': [10], 'interval_count': [10, 100], 'interval_multiplier': [1, 1.5], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa # }, # 'NewtonsSearch': { # 'params': {'tolerance': [1e-8], 'beta': [0.1, 0.5, 0.75], 'max_iterations': [100]}, # noqa # 'ls_params': {'delta': [0, 0.5, 1, 5, 8, 10], 'tolerance': [1e-6], 'max_iterations': [100]}, # noqa # }, # 'ArmijoSearch': { # 'params': {'tolerance': [1e-5], 'beta': [0.1, 0.5, 0.9], 'max_iterations': [10000]}, # noqa # 'ls_params': {'delta': [0.1, 0.25, 0.5, 0.9], 'alpha': [0.1, 0.25, 0.5, 0.9], 'beta': [0.1, 0.25, 0.5, 0.9], 'tolerance': [1e-6], 'max_iterations': [10000]}, # noqa # }, # }, # }, }
60.992669
195
0.451811
4,478
41,597
4.087316
0.024565
0.197454
0.183904
0.224772
0.958914
0.950336
0.945856
0.933399
0.926187
0.917336
0
0.119507
0.317258
41,597
681
196
61.082232
0.524965
0.571435
0
0.480176
0
0
0.211663
0.007729
0
0
0
0
0
1
0.004405
false
0
0
0
0.008811
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
d00a5ed6cb0506ba1b412cb5fcd31bbacf3bde02
138
py
Python
tests/functional/modules/pyi_inspect_getmodule_from_stackframes/helper_package/__init__.py
hawkhai/pyinstaller
016a24479b34de161792c72dde455a81ad4c78ae
[ "Apache-2.0" ]
9,267
2015-01-01T04:08:45.000Z
2022-03-31T11:42:38.000Z
tests/functional/modules/pyi_inspect_getmodule_from_stackframes/helper_package/__init__.py
hawkhai/pyinstaller
016a24479b34de161792c72dde455a81ad4c78ae
[ "Apache-2.0" ]
5,150
2015-01-01T12:09:56.000Z
2022-03-31T18:06:12.000Z
tests/functional/modules/pyi_inspect_getmodule_from_stackframes/helper_package/__init__.py
hawkhai/pyinstaller
016a24479b34de161792c72dde455a81ad4c78ae
[ "Apache-2.0" ]
2,101
2015-01-03T10:25:27.000Z
2022-03-30T11:04:42.000Z
from . import helper_module def test_call_chain(): # Add another level of indirection... return helper_module.test_call_chain()
19.714286
42
0.746377
19
138
5.105263
0.736842
0.247423
0.268041
0
0
0
0
0
0
0
0
0
0.173913
138
6
43
23
0.850877
0.253623
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0.333333
1
0
1
0
0
null
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
1
0
1
1
1
0
0
9
d02117eac7fa60dae1b3041cb82f13713d5eed50
32,417
py
Python
tests/test_ground_truth_by_class.py
Developer-Jacob/Augmentor
e41755431e725dd88155de1fa7ee356ac0a9583c
[ "MIT" ]
1
2021-01-23T08:37:43.000Z
2021-01-23T08:37:43.000Z
tests/test_ground_truth_by_class.py
Developer-Jacob/Augmentor
e41755431e725dd88155de1fa7ee356ac0a9583c
[ "MIT" ]
null
null
null
tests/test_ground_truth_by_class.py
Developer-Jacob/Augmentor
e41755431e725dd88155de1fa7ee356ac0a9583c
[ "MIT" ]
1
2020-09-01T13:36:42.000Z
2020-09-01T13:36:42.000Z
# In this file we will test each class in the Operations module one by one # to ensure it works with the new ground truth functionality. import pytest # Context import os import sys sys.path.insert(0, os.path.abspath('.')) # Imports, some may not be needed. import Augmentor import tempfile import io import shutil import glob import random import numpy as np from PIL import Image # Used to test the temporary ZoomGroundTruth operation. from Augmentor.Operations import CropRandom, HSVShifting def create_temporary_data(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) return standard_image_directory, ground_truth_image_directory def destroy_temporary_data(*directories): for directory in directories: shutil.rmtree(directory) def test_histogram_equalisation_ground_truth(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) num_samples = 10 ############################### # SCENARIO 1 # Standard ############################### p = Augmentor.Pipeline(standard_image_directory) # Add the ground truth directory. p.ground_truth(ground_truth_image_directory) p.histogram_equalisation(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) ############################### # SCENARIO 2 # Test using two operations # (itself twice) ############################### p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.histogram_equalisation(probability=1) p.histogram_equalisation(probability=1) p.sample(num_samples) ############################### # SCENARIO 3 # Test without any ground # truth data ############################### new_image_directory = tempfile.mkdtemp() new_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(new_image_directory), image_name) im.save(im_path, 'PNG') new_images.append(im_path) p = Augmentor.Pipeline(new_image_directory) p.histogram_equalisation(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(new_image_directory, "output/*")) assert num_samples == len(generated_files) shutil.rmtree(standard_image_directory) shutil.rmtree(ground_truth_image_directory) shutil.rmtree(new_image_directory) def test_greyscale_operation_ground_truth(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) num_samples = 10 ############################### # SCENARIO 1 # Standard. ############################### p = Augmentor.Pipeline(standard_image_directory) # Add the ground truth directory. p.ground_truth(ground_truth_image_directory) p.greyscale(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) ############################### # SCENARIO 2 # Chain with another operation. ############################### p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.greyscale(probability=1) p.histogram_equalisation(probability=1) p.sample(num_samples) shutil.rmtree(standard_image_directory) shutil.rmtree(ground_truth_image_directory) def test_invert_operation_ground_truth(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) num_samples = 10 ############################### # SCENARIO 1 # Standard. ############################### p = Augmentor.Pipeline(standard_image_directory) # Add the ground truth directory. p.ground_truth(ground_truth_image_directory) p.invert(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) ############################### # SCENARIO 2 # Chain with another operation. ############################### p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.invert(probability=1) p.greyscale(probability=1) p.histogram_equalisation(probability=1) p.sample(num_samples) shutil.rmtree(standard_image_directory) shutil.rmtree(ground_truth_image_directory) def test_black_and_white_ground_truth(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) num_samples = 10 ############################### # SCENARIO 1 # Standard. ############################### p = Augmentor.Pipeline(standard_image_directory) # Add the ground truth directory. p.ground_truth(ground_truth_image_directory) p.black_and_white(probability=1, threshold=100) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) p.greyscale(probability=1) p.sample(10) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) * 2 == len(generated_files) shutil.rmtree(standard_image_directory) shutil.rmtree(ground_truth_image_directory) def test_skew_ground_truth(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) num_samples = 10 ############################### # SCENARIO 1 # Standard. ############################### p = Augmentor.Pipeline(standard_image_directory) # Add the ground truth directory. p.ground_truth(ground_truth_image_directory) p.skew(probability=1, magnitude=0.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) p.greyscale(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 4) == len(generated_files) shutil.rmtree(standard_image_directory) shutil.rmtree(ground_truth_image_directory) def test_rotate_standard_ground_truth(): standard_image_directory = tempfile.mkdtemp() ground_truth_image_directory = tempfile.mkdtemp(prefix="ground-truth_") # Create images in each directory, but with the same names. # First create a number of image names. image_names = [] num_of_images = random.randint(1, 10) for i in range(num_of_images): image_names.append("im%s.png" % i) # Create random images, one set of 'standard' images # and another set of ground truth images. standard_images = [] ground_truth_images = [] for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(standard_image_directory), image_name) im.save(im_path, 'PNG') standard_images.append(im_path) for image_name in image_names: im = Image.fromarray(np.uint8(np.random.rand(80, 80, 3) * 255)) # (80, 80) for Greyscale im_path = os.path.join(os.path.abspath(ground_truth_image_directory), image_name) im.save(im_path, 'PNG') ground_truth_images.append(im_path) num_samples = 10 ############################### # SCENARIO 1 # Standard. ############################### p = Augmentor.Pipeline(standard_image_directory) # Add the ground truth directory. p.ground_truth(ground_truth_image_directory) p.rotate_without_crop(probability=1, max_left_rotation=20, max_right_rotation=20) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) p.greyscale(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 4) == len(generated_files) shutil.rmtree(standard_image_directory) shutil.rmtree(ground_truth_image_directory) def test_rotate_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.rotate90(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Repeat for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.rotate90(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_rotate_ground_truth_multiple_passes(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.rotate90(probability=1) p.rotate180(probability=1) p.rotate270(probability=1) p.rotate_random_90(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Repeat for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.rotate90(probability=1) p.rotate180(probability=1) p.rotate270(probability=1) p.rotate_random_90(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_rotate_range_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.rotate(probability=1, max_left_rotation=20, max_right_rotation=20) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Repeat for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.rotate(probability=1, max_left_rotation=20, max_right_rotation=20) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_flip_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.flip_left_right(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Repeat for single images. standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.flip_left_right(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_flip_ground_truth_multiple_passes(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.flip_left_right(probability=1) p.flip_top_bottom(probability=1) p.flip_random(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Repeat for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.flip_left_right(probability=1) p.flip_top_bottom(probability=1) p.flip_random(probability=1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_crop_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.crop_by_size(probability=1, width=10, height=10) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Repeat for single images standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.crop_by_size(probability=1, width=10, height=10) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_crop_percentage_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.crop_centre(probability=1, percentage_area=0.5) p.crop_random(probability=1, percentage_area=0.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single images (no ground truth values at all) standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.crop_centre(probability=1, percentage_area=0.5) p.crop_random(probability=1, percentage_area=0.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_crop_random_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.add_operation(CropRandom(probability=1, percentage_area=0.5)) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single images standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.add_operation(CropRandom(probability=1, percentage_area=0.5)) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_shear_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.shear(probability=1, max_shear_left=10, max_shear_right=10) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.shear(probability=1, max_shear_left=10, max_shear_right=10) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_scale_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.scale(probability=1, scale_factor=1.4) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.scale(probability=1, scale_factor=1.4) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_distort_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=4) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=4) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_distort_gaussian_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.gaussian_distortion(probability=1, grid_width=4, grid_height=4, magnitude=5, corner="bell", method="in", mex=1.1, mey=1.1, sdx=1.1, sdy=1.1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.gaussian_distortion(probability=1, grid_width=4, grid_height=4, magnitude=5, corner="bell", method="in", mex=1.1, mey=1.1, sdx=1.1, sdy=1.1) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_zoom_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.zoom(probability=1, min_factor=1.1, max_factor=1.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.zoom(probability=1, min_factor=1.1, max_factor=1.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_zoom_random_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.zoom_random(probability=1, percentage_area=0.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.zoom_random(probability=1, percentage_area=0.5) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_hsv_shift_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.add_operation(HSVShifting(probability=1, hue_shift=1.1, saturation_scale=1.1, saturation_shift=1.2, value_scale=1.1, value_shift=1.1)) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.add_operation(HSVShifting(probability=1, hue_shift=1.1, saturation_scale=1.1, saturation_shift=1.2, value_scale=1.1, value_shift=1.1)) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) def test_random_erasing_ground_truth(): standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.ground_truth(ground_truth_image_directory) p.random_erasing(probability=1, rectangle_area=0.33) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert (num_samples * 2) == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory) # Do the same for single image lists standard_image_directory, ground_truth_image_directory = create_temporary_data() num_samples = 10 p = Augmentor.Pipeline(standard_image_directory) p.random_erasing(probability=1, rectangle_area=0.33) p.sample(num_samples) generated_files = glob.glob(os.path.join(standard_image_directory, "output/*")) assert num_samples == len(generated_files) destroy_temporary_data(standard_image_directory, ground_truth_image_directory)
33.248205
119
0.725052
4,309
32,417
5.128104
0.042469
0.178667
0.166267
0.124451
0.959316
0.958727
0.958727
0.958727
0.956465
0.953116
0
0.019597
0.164142
32,417
974
120
33.282341
0.795911
0.090107
0
0.905282
0
0
0.018796
0
0
0
0
0
0.076503
1
0.043716
false
0.003643
0.021858
0
0.067395
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
d048e788d6c2511e2b8342c0b7b7bba16133c4b3
5,593
py
Python
test/evaluation/test_ndcg.py
rjagerman/chainerltr
1fdb6a0a304a465d27149011951a01a5e3de4bbc
[ "MIT" ]
1
2019-04-10T03:18:23.000Z
2019-04-10T03:18:23.000Z
test/evaluation/test_ndcg.py
rjagerman/chainerltr
1fdb6a0a304a465d27149011951a01a5e3de4bbc
[ "MIT" ]
null
null
null
test/evaluation/test_ndcg.py
rjagerman/chainerltr
1fdb6a0a304a465d27149011951a01a5e3de4bbc
[ "MIT" ]
null
null
null
import numpy as np from chainer.testing import assert_allclose from chainer import Variable from chainerltr.evaluation import ndcg from nose.tools import raises def test_perfect_ndcg(): p = Variable(np.array([[0, 1, 2, 3, 4]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y).data, 1.0) def test_worst_ndcg(): p = Variable(np.array([[4, 3, 2, 0, 1]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y).data, 0.5475066710714894) def test_perfect_ndcg_no_exp(): p = Variable(np.array([[0, 1, 2, 3, 4]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, exp=False).data, 1.0) def test_worst_ndcg_no_exp(): p = Variable(np.array([[4, 3, 2, 0, 1]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, exp=False).data, 0.567554085037434) def test_perfect_ndcg_at_1(): p = Variable(np.array([[0, 1, 2, 3, 4]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, k=1).data, 1.0) def test_worst_ndcg_at_1(): p = Variable(np.array([[4, 3, 2, 0, 1]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, k=1).data, 0.0) def test_perfect_ndcg_at_3(): p = Variable(np.array([[0, 1, 2, 3, 4]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, k=3).data, 1.0) def test_worst_ndcg_at_3(): p = Variable(np.array([[4, 3, 2, 0, 1]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, k=3).data, 0.09271639884807328) def test_perfect_ndcg_at_5(): p = Variable(np.array([[0, 1, 2, 3, 4]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, k=5).data, 1.0) def test_worst_ndcg_at_5(): p = Variable(np.array([[4, 3, 2, 0, 1]])) y = Variable(np.array([[2, 2, 1, 0, 0]])) assert_allclose(ndcg(p, y, k=5).data, 0.5475066710714894) def test_zero_ndcg(): p = Variable(np.array([[4, 3, 2, 1, 0]])) y = Variable(np.array([[0, 0, 0, 0, 0]])) assert_allclose(ndcg(p, y).data, 0.0) def test_empty_ndcg(): p = Variable(np.array([[]])) y = Variable(np.array([[]])) assert_allclose(ndcg(p, y).data, 0.0) def test_zero_ndcg_at_all(): p = Variable(np.array([[4, 3, 2, 1, 0]])) y = Variable(np.array([[0, 0, 0, 0, 0]])) expected = np.array([[0., 0., 0., 0., 0.]]) assert_allclose(ndcg(p, y, k=-1).data, expected) def test_perfect_ndcg_at_all(): p = Variable(np.array([[0, 1, 2, 3, 4]])) y = Variable(np.array([[2, 2, 1, 1, 0]])) expected = np.array([[1., 1., 1., 1., 1.]]) assert_allclose(ndcg(p, y, k=-1).data, expected) def test_worst_ndcg_at_all(): p = Variable(np.array([[4, 3, 2, 1, 0]])) y = Variable(np.array([[2, 2, 1, 1, 0]])) expected = np.array([[0., 0.12895094, 0.20971147, 0.41606828, 0.61535827]]) assert_allclose(ndcg(p, y, k=-1).data, expected) @raises(ValueError) def test_wrongsize_ndcg(): p = Variable(np.array([[2, 1, 0]])) y = Variable(np.array([[]])) assert_allclose(ndcg(p, y).data, 0.0) @raises(ValueError) def test_wrongsize2_ndcg(): p = Variable(np.array([[]])) y = Variable(np.array([[1, 1, 0]])) assert_allclose(ndcg(p, y).data, 0.0) @raises(ValueError) def test_wrongsize3_ndcg(): p = Variable(np.array([[0, 1]])) y = Variable(np.array([[1, 1, 0]])) assert_allclose(ndcg(p, y).data, 0.0) def test_perfect_ndcg_2d(): p = Variable(np.array([[0, 1, 2, 3, 4], [0, 1, 2, 4, 3]])) y = Variable(np.array([[2, 2, 1, 0, 0], [2, 1, 0, 0, 0]])) nr_docs = Variable(np.array([5, 3])) expected = np.array([1.0, 1.0]) assert_allclose(ndcg(p, y, nr_docs=nr_docs).data, expected) def test_worst_ndcg_2d(): p = Variable(np.array([[4, 3, 2, 1, 0], [2, 1, 0, 4, 3]])) y = Variable(np.array([[2, 2, 1, 0, 0], [2, 1, 0, 0, 0]])) nr_docs = Variable(np.array([5, 3])) expected = np.array([0.54750667, 0.58688267]) assert_allclose(ndcg(p, y, nr_docs=nr_docs).data, expected) def test_random_ndcg_2d(): p = Variable(np.array([[4, 3, 2, 1, 0], [0, 1, 2, 4, 3]])) y = Variable(np.array([[0, 0, 1, 1, 0], [0, 1, 2, 0, 0]])) nr_docs = Variable(np.array([5, 3])) expected = np.array([0.6934264, 0.58688267]) assert_allclose(ndcg(p, y, nr_docs=nr_docs).data, expected) def test_random_ndcg_2d_no_nrdocs(): p = Variable(np.array([[4, 3, 2, 1, 0], [0, 3, 1, 2, 4]])) y = Variable(np.array([[0, 0, 1, 1, 0], [0, 1, 2, 0, 0]])) expected = np.array([0.6934264, 0.4935456744811716]) assert_allclose(ndcg(p, y).data, expected) @raises(ValueError) def test_ndcg_wrongdim(): p = Variable(np.array([[[4, 3, 2, 1, 0], [0, 1, 2, 4, 3]]])) y = Variable(np.array([[[0, 0, 1, 1, 0], [0, 1, 2, 0, 0]]])) nr_docs = Variable(np.array([5])) expected = np.array([1.13092975, 2.13092975]) assert_allclose(ndcg(p, y, nr_docs=nr_docs).data, expected) @raises(ValueError) def test_ndcg_wrongdim(): p = Variable(np.array([[[4, 3, 2, 1, 0], [0, 1, 2, 4, 3]]])) y = Variable(np.array([[[0, 0, 1, 1, 0], [0, 1, 2, 0, 0]]])) nr_docs = Variable(np.array([5])) expected = np.array([1.13092975, 2.13092975]) assert_allclose(ndcg(p, y, nr_docs=nr_docs).data, expected)
31.072222
79
0.549973
949
5,593
3.119073
0.064278
0.146622
0.268581
0.12973
0.893919
0.859122
0.826689
0.780405
0.757432
0.723986
0
0.125732
0.236367
5,593
179
80
31.24581
0.567314
0
0
0.621212
0
0
0
0
0
0
0
0
0.189394
1
0.181818
false
0
0.037879
0
0.219697
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
d06bbb193d4da4f8ef87a860cf5d8667aa7c0c57
690
py
Python
src/genie/libs/parser/iosxe/tests/ShowBootvar/cli/equal/golden_output5_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxe/tests/ShowBootvar/cli/equal/golden_output5_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxe/tests/ShowBootvar/cli/equal/golden_output5_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { "next_reload_boot_variable": "harddisk:/c1100-universalk9.BLD_POLARIS_DEV_LATEST_20200517_102119.SSA.bin,12;harddisk:/genie-iedge-asr-uut,12;", "active": { "boot_variable": "harddisk:/c1100-universalk9.BLD_POLARIS_DEV_LATEST_20200517_102119.SSA.bin,12;harddisk:/genie-iedge-asr-uut,12;", "configuration_register": "0x1", "next_reload_configuration_register": "0x2102", }, "standby": { "boot_variable": "harddisk:/c1100-universalk9.BLD_POLARIS_DEV_LATEST_20200517_102119.SSA.bin,12;harddisk:/genie-iedge-asr-uut,12", "configuration_register": "0x1", "next_reload_configuration_register": "0x2102", }, }
49.285714
147
0.72029
82
690
5.707317
0.341463
0.179487
0.128205
0.160256
0.92094
0.92094
0.92094
0.92094
0.92094
0.92094
0
0.138796
0.133333
690
13
148
53.076923
0.643813
0
0
0.307692
0
0.230769
0.762319
0.67971
0
0
0.026087
0
0
1
0
false
0
0
0
0
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
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
efff5bd89a1e580a59af446ce49c3a9f340a2df9
6,973
py
Python
forum/migrations/0002_initial_data.py
JHP4911/e-learning_app
d4888126cf0d6e0d1cfee39ac74e439acfecb402
[ "MIT" ]
5
2019-10-17T02:41:42.000Z
2021-09-18T08:45:35.000Z
forum/migrations/0002_initial_data.py
JHP4911/e-learning_app
d4888126cf0d6e0d1cfee39ac74e439acfecb402
[ "MIT" ]
null
null
null
forum/migrations/0002_initial_data.py
JHP4911/e-learning_app
d4888126cf0d6e0d1cfee39ac74e439acfecb402
[ "MIT" ]
2
2019-10-17T02:41:42.000Z
2020-12-12T12:15:58.000Z
from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def initial_topic(apps, schema_editor): topic = apps.get_model(app_label='forum', model_name='Topic') topic(author='John', subject='I like this forum!', slug=slugify('I like this forum!'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Adam', subject='Dude where is my course!', slug=slugify('Dude where is my course!'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Kate', subject='I have questions about my account', slug=slugify('I have questions about my account'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Pete', subject='What is going on with this course!?', slug=slugify('What is going on with this course!?'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Leon', subject='Email not working', slug=slugify('Email not working'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Hope', subject='Video is not responding in math course', slug=slugify('Video is not responding in math course'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Ana', subject='Where are my teaching blocks!??', slug=slugify('Where are my teaching blocks!??'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Layla', subject='Course start date', slug=slugify('Course start date'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Penny', subject='Profile settings issue', slug=slugify('Profile settings issue'), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() topic(author='Yolo', subject="Don't have access to profile page!!", slug=slugify("Don't have access to profile page!!"), topic_message='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id commodo turpis.' ' Phasellus at congue ipsum. Aliquam congue mi at faucibus porttitor. Sed lectus magna, luctus' ' ac felis a, ultricies tincidunt massa. Etiam sit amet convallis orci, eu pellentesque nisi.' ' Pellentesque eu egestas arcu. Curabitur venenatis pulvinar diam, at ullamcorper nisi pharetra' ' eleifend. ' ).save() class Migration(migrations.Migration): dependencies = [ ('forum', '0001_initial'), ] operations = [ migrations.RunPython(initial_topic) ]
59.09322
120
0.617095
765
6,973
5.596078
0.162092
0.032703
0.03971
0.05139
0.853305
0.834618
0.821537
0.784163
0.784163
0.784163
0
0.000835
0.312778
6,973
117
121
59.598291
0.892529
0
0
0.588235
0
0
0.623548
0
0
0
0
0
0
1
0.009804
false
0
0.029412
0
0.068627
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
ef2c97f3a9bdaad7199b3265231d719f7dd06364
3,536
py
Python
py/tests/problems/graph/build_order.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
1
2020-06-26T13:28:43.000Z
2020-06-26T13:28:43.000Z
py/tests/problems/graph/build_order.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
7
2021-11-18T19:46:08.000Z
2022-03-12T01:03:01.000Z
py/tests/problems/graph/build_order.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
null
null
null
import unittest from dcp.problems.graph.build_order import Builder1 class Test_Builder1(unittest.TestCase): def setUp(self): pass def test_case1(self): builder = Builder1(None, None) assert builder != None assert builder.build_all() == None def test_case2(self): projects = ['a', 'b', 'c', 'd', 'e', 'f'] dependencies = [('a', 'd'), ('f', 'b'), ('b', 'd'), ('f', 'a'), ('d', 'c')] builder = Builder1(projects, dependencies) success = None try: build_list = builder.build_all() # test build all projects for built in build_list: projects.remove(built) success = True except Builder1.CircularReferenceError: success = False assert success == True assert projects == [] def test_case3(self): # circular build defintion projects = ['a', 'b', 'c', 'd', 'e', 'f'] dependencies = [('a', 'd'), ('f', 'b'), ('b', 'd'), ('f', 'a'), ('d', 'c'), ('c', 'f')] builder = Builder1(projects, dependencies) success = None try: # test build all projects build_list = builder.build_all() for built in build_list: projects.remove(built) success = True except Builder1.CircularReferenceError: success = False assert success == False def test_case4(self): # circular build defintion projects = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] dependencies = [('a', 'd'), ('f', 'b'), ('b', 'd'), ('f', 'a'), ('d', 'c'), ('c', 'f'), ('b', 'g')] builder = Builder1(projects, dependencies) success = None try: build_list = builder.build_all() # test build all projects for built in build_list: projects.remove(built) success = True except Builder1.CircularReferenceError: success = False assert success == False def test_case5(self): # circular build defintion projects = ['a', 'b', 'c', 'd', 'e', 'f', 'h'] dependencies = [('a', 'e'), ('b', 'a'), ('c', 'a'), ('f', 'a'), ('f', 'c'), ('f', 'b'), ('b', 'e'), ('d', 'g'), ('b', 'h'), ['e', 'f']] builder = Builder1(projects, dependencies) success = False # test build all projects try: build_list = builder.build_all() for built in build_list: projects.remove(built) success = True except Builder1.CircularReferenceError: success = False assert success == False assert projects != [] def test_case5(self): # non-circular build defintion projects = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] dependencies = [('a', 'e'), ('b', 'a'), ('c', 'a'), ('f', 'a'), ('f', 'c'), ('f', 'b'), ('b', 'e'), ('d', 'g')] builder = Builder1(projects, dependencies) success = False # test build all projects try: build_list = builder.build_all() for built in build_list: projects.remove(built) success = True except Builder1.CircularReferenceError: success = False assert success == True assert projects == []
25.257143
143
0.472285
359
3,536
4.584958
0.13649
0.053463
0.054678
0.033414
0.827461
0.827461
0.826245
0.796476
0.796476
0.796476
0
0.00849
0.367081
3,536
140
144
25.257143
0.726988
0.063066
0
0.753247
0
0
0.03178
0
0
0
0
0
0.12987
1
0.090909
false
0.012987
0.025974
0
0.12987
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
ef43a32ffb5dcaeb2b77f33e5ede2b779dd28a52
29
py
Python
deephsb/utils/__init__.py
zudi-lin/human_behavior_prediction
557639fb30691e20959c277f82436a1a085eb0aa
[ "MIT" ]
1
2020-12-25T14:51:17.000Z
2020-12-25T14:51:17.000Z
deephsb/utils/__init__.py
zudi-lin/human_behavior_prediction
557639fb30691e20959c277f82436a1a085eb0aa
[ "MIT" ]
null
null
null
deephsb/utils/__init__.py
zudi-lin/human_behavior_prediction
557639fb30691e20959c277f82436a1a085eb0aa
[ "MIT" ]
null
null
null
from .colored_print import *
14.5
28
0.793103
4
29
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.137931
29
1
29
29
0.88
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
1
0
7
323bedda2a00c685e8cc88af3d6362bd55bdf250
4,397
py
Python
data_collector/scraper5.py
llucifer97/Pose-analysis-of-art
34546031041cc6d4a0a5ddd058cf7bd05e0508ae
[ "MIT" ]
5
2019-05-27T08:27:41.000Z
2020-12-31T14:52:58.000Z
data_collector/scraper5.py
llucifer97/Pose-analysis-of-art
34546031041cc6d4a0a5ddd058cf7bd05e0508ae
[ "MIT" ]
3
2021-08-23T20:53:42.000Z
2021-08-23T20:58:06.000Z
data_collector/scraper5.py
llucifer97/Pose-analysis-of-art
34546031041cc6d4a0a5ddd058cf7bd05e0508ae
[ "MIT" ]
4
2019-09-10T10:19:08.000Z
2020-05-13T19:22:04.000Z
#!/usr/bin/env python # coding: utf-8 # In[33]: #artstor import pandas as pd import numpy as np from bs4 import BeautifulSoup import requests # In[34]: #link = ['https://library.artstor.org/#/search/europe;size=24;page=1;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D','https://library.artstor.org/#/search/europe;size=24;page=2;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D','https://library.artstor.org/#/search/europe;size=24;page=3;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D','https://library.artstor.org/#/search/europe;size=24;page=4;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D','https://library.artstor.org/#/search/europe;size=24;page=5;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D','https://library.artstor.org/#/search/europe;size=24;page=6;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D','https://library.artstor.org/#/search/europe;size=24;page=7;startDate=500;endDate=1600;sort=0;geography=%5B%22eyJmaWVsZCI6ImhpZXJhcmNoaWVzIiwiZGVwdGgiOjEsImxhYmVscyI6WyJhcnRzdG9yLWdlb2dyYXBoeSIsIkV1cm9wZSJdfQ%3D%3D%22%5D;artclassification_str=%5B%22Paintings%22%5D'] # In[35]: URL = ['http://www.catalogo.beniculturali.it/sigecSSU_FE/mostraTutteLeSchede.action?numeroPagina=1&valoreRicerca=annunciazione&countSize=1428&numElement=1413&nomeBread=Beni%20culturali&statoCosa1=&statoCosa2=&statoDove1=&statoDove2=&statoQuando1=&statoChi1=&numeroComplessivoPagine=72&mostraSchede=true&contenitore=&flagFisicoGiuridico=0&stringBeneCategoria=','http://www.catalogo.beniculturali.it/sigecSSU_FE/mostraTutteLeSchede.action?numeroPagina=2&valoreRicerca=annunciazione&countSize=1428&numElement=1413&nomeBread=Beni+culturali&statoCosa1=&statoCosa2=&statoDove1=&statoDove2=&statoQuando1=&statoChi1=&numeroComplessivoPagine=72&mostraSchede=true&contenitore=&flagFisicoGiuridico=0&stringBeneCategoria=','http://www.catalogo.beniculturali.it/sigecSSU_FE/mostraTutteLeSchede.action?numeroPagina=3&valoreRicerca=annunciazione&countSize=1428&numElement=1413&nomeBread=Beni+culturali&statoCosa1=&statoCosa2=&statoDove1=&statoDove2=&statoQuando1=&statoChi1=&numeroComplessivoPagine=72&mostraSchede=true&contenitore=&flagFisicoGiuridico=0&stringBeneCategoria=','http://www.catalogo.beniculturali.it/sigecSSU_FE/mostraTutteLeSchede.action?numeroPagina=4&valoreRicerca=annunciazione&countSize=1428&numElement=1413&nomeBread=Beni+culturali&statoCosa1=&statoCosa2=&statoDove1=&statoDove2=&statoQuando1=&statoChi1=&numeroComplessivoPagine=72&mostraSchede=true&contenitore=&flagFisicoGiuridico=0&stringBeneCategoria=','http://www.catalogo.beniculturali.it/sigecSSU_FE/mostraTutteLeSchede.action?numeroPagina=5&valoreRicerca=annunciazione&countSize=1428&numElement=1413&nomeBread=Beni+culturali&statoCosa1=&statoCosa2=&statoDove1=&statoDove2=&statoQuando1=&statoChi1=&numeroComplessivoPagine=72&mostraSchede=true&contenitore=&flagFisicoGiuridico=0&stringBeneCategoria=','http://www.catalogo.beniculturali.it/sigecSSU_FE/mostraTutteLeSchede.action?numeroPagina=7&valoreRicerca=annunciazione&countSize=1428&numElement=1413&nomeBread=Beni+culturali&statoCosa1=&statoCosa2=&statoDove1=&statoDove2=&statoQuando1=&statoChi1=&numeroComplessivoPagine=72&mostraSchede=true&contenitore=&flagFisicoGiuridico=0&stringBeneCategoria=','','','',''] # In[36]: len(URL) # In[37]: URL[1] # In[39]: r = requests.get(URL[0]) r.content soup = BeautifulSoup(r.content, 'html5lib') print(soup.prettify()) # In[41]: all_images = soup.find_all('img') all_images
82.962264
2,127
0.84262
472
4,397
7.815678
0.21822
0.01518
0.036053
0.041746
0.924641
0.924641
0.924641
0.924641
0.90675
0.894822
0
0.080278
0.019786
4,397
52
2,128
84.557692
0.775638
0.445758
0
0
0
0.461538
0.8689
0
0
0
0
0
0
1
0
false
0
0.307692
0
0.307692
0.076923
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
10
326428493ce3ddd3d132ed4a0f2a4e8ae6e5fbf3
4,087
py
Python
experiments/atari_pacman/ppo_process_result.py
michalnand/reinforcement_learning_im
e29caa2a0b7bca3f9ff45ed949a3d3df3a40c4c1
[ "MIT" ]
null
null
null
experiments/atari_pacman/ppo_process_result.py
michalnand/reinforcement_learning_im
e29caa2a0b7bca3f9ff45ed949a3d3df3a40c4c1
[ "MIT" ]
null
null
null
experiments/atari_pacman/ppo_process_result.py
michalnand/reinforcement_learning_im
e29caa2a0b7bca3f9ff45ed949a3d3df3a40c4c1
[ "MIT" ]
null
null
null
import RLAgents import matplotlib.pyplot as plt result_path = "./results/" files = [] files.append("./models/ppo_baseline/result/result.log") rl_stats_compute_ppo = RLAgents.RLStatsCompute(files) files = [] files.append("./models/ppo_curiosity/result/result.log") rl_stats_compute_curiosity = RLAgents.RLStatsCompute(files) #files = [] #files.append("./models/ppo_curiosity_spatial/result/result.log") #rl_stats_compute_curiosity_spatial = RLAgents.RLStatsCompute(files) plt.cla() plt.ylabel("score") plt.xlabel("episode") plt.grid(color='black', linestyle='-', linewidth=0.1) plt.plot(rl_stats_compute_ppo.mean[1], rl_stats_compute_ppo.mean[8], label="ppo baseline", color='deepskyblue') plt.fill_between(rl_stats_compute_ppo.mean[1], rl_stats_compute_ppo.lower[8], rl_stats_compute_ppo.upper[8], color='deepskyblue', alpha=0.2) plt.plot(rl_stats_compute_curiosity.mean[1], rl_stats_compute_curiosity.mean[8], label="ppo curiosity RND", color='limegreen') plt.fill_between(rl_stats_compute_curiosity.mean[1], rl_stats_compute_curiosity.lower[8], rl_stats_compute_curiosity.upper[8], color='limegreen', alpha=0.2) #plt.plot(rl_stats_compute_curiosity_spatial.mean[1], rl_stats_compute_curiosity_spatial.mean[8], label="ppo curiosity RND+curiosity_spatial", color='red') #plt.fill_between(rl_stats_compute_curiosity_spatial.mean[1], rl_stats_compute_curiosity_spatial.lower[8], rl_stats_compute_curiosity_spatial.upper[8], color='red', alpha=0.2) plt.legend(loc='lower right', borderaxespad=0.) plt.savefig(result_path + "ppo_score_per_episode.png", dpi = 300) plt.cla() plt.ylabel("score") plt.xlabel("iteration") plt.grid(color='black', linestyle='-', linewidth=0.1) plt.plot(rl_stats_compute_ppo.mean[0], rl_stats_compute_ppo.mean[8], label="ppo baseline", color='deepskyblue') plt.fill_between(rl_stats_compute_ppo.mean[0], rl_stats_compute_ppo.lower[8], rl_stats_compute_ppo.upper[8], color='deepskyblue', alpha=0.2) plt.plot(rl_stats_compute_curiosity.mean[0], rl_stats_compute_curiosity.mean[8], label="ppo curiosity RND", color='limegreen') plt.fill_between(rl_stats_compute_curiosity.mean[0], rl_stats_compute_curiosity.lower[8], rl_stats_compute_curiosity.upper[8], color='limegreen', alpha=0.2) #plt.plot(rl_stats_compute_curiosity_spatial.mean[0], rl_stats_compute_curiosity_spatial.mean[8], label="ppo curiosity RND+curiosity_spatial", color='red') #plt.fill_between(rl_stats_compute_curiosity_spatial.mean[0], rl_stats_compute_curiosity_spatial.lower[8], rl_stats_compute_curiosity_spatial.upper[8], color='red', alpha=0.2) plt.legend(loc='lower right', borderaxespad=0.) plt.savefig(result_path + "ppo_score_per_iteration.png", dpi = 300) plt.cla() plt.ylabel("value") plt.xlabel("iteration") plt.grid(color='black', linestyle='-', linewidth=0.1) plt.plot(rl_stats_compute_curiosity.mean[0], rl_stats_compute_curiosity.mean[10], label="curiosity", color='deepskyblue') plt.fill_between(rl_stats_compute_curiosity.mean[0], rl_stats_compute_curiosity.lower[10], rl_stats_compute_curiosity.upper[10], color='deepskyblue', alpha=0.2) plt.legend(loc='upper right', borderaxespad=0.) plt.savefig(result_path + "ppo_curiosity_internal_motivation.png", dpi = 300) ''' plt.cla() plt.ylabel("value") plt.xlabel("iteration") plt.grid(color='black', linestyle='-', linewidth=0.1) plt.plot(rl_stats_compute_curiosity_spatial.mean[0], rl_stats_compute_curiosity_spatial.mean[10], label="curiosity", color='deepskyblue') plt.fill_between(rl_stats_compute_curiosity_spatial.mean[0], rl_stats_compute_curiosity_spatial.lower[10], rl_stats_compute_curiosity_spatial.upper[10], color='deepskyblue', alpha=0.2) plt.plot(rl_stats_compute_curiosity_spatial.mean[0], rl_stats_compute_curiosity_spatial.mean[12], label="curiosity_spatial", color='red') plt.fill_between(rl_stats_compute_curiosity_spatial.mean[0], rl_stats_compute_curiosity_spatial.lower[12], rl_stats_compute_curiosity_spatial.upper[12], color='red', alpha=0.2) plt.legend(loc='upper right', borderaxespad=0.) plt.savefig(result_path + "ppo_curiosity_spatial_internal_motivation.png", dpi = 300) '''
49.841463
184
0.799609
628
4,087
4.886943
0.098726
0.109482
0.218964
0.277289
0.953079
0.92799
0.888563
0.844901
0.832519
0.792766
0
0.024774
0.051872
4,087
82
185
49.841463
0.767226
0.195253
0
0.378378
0
0
0.183034
0.070205
0
0
0
0
0
1
0
false
0
0.054054
0
0.054054
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
32be7cc558056474a785bef748a2256cbb390af0
581
py
Python
Codewars/8kyu/101-dalmatians-squash-the-bugs-not-the-dogs/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
7
2017-09-20T16:40:39.000Z
2021-08-31T18:15:08.000Z
Codewars/8kyu/101-dalmatians-squash-the-bugs-not-the-dogs/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
Codewars/8kyu/101-dalmatians-squash-the-bugs-not-the-dogs/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
# Python - 2.7.6 Test.describe('Basic tests') Test.assert_equals(how_many_dalmatians(26), 'More than a handful!') Test.assert_equals(how_many_dalmatians(8), 'Hardly any') Test.assert_equals(how_many_dalmatians(14), 'More than a handful!') Test.assert_equals(how_many_dalmatians(80), "Woah that's a lot of dogs!") Test.assert_equals(how_many_dalmatians(100), "Woah that's a lot of dogs!") Test.assert_equals(how_many_dalmatians(50), 'More than a handful!') Test.assert_equals(how_many_dalmatians(10), 'Hardly any') Test.assert_equals(how_many_dalmatians(101), '101 DALMATIONS!!!')
48.416667
74
0.77969
96
581
4.46875
0.354167
0.18648
0.298368
0.354312
0.857809
0.857809
0.780886
0.780886
0.585082
0.585082
0
0.04291
0.077453
581
11
75
52.818182
0.757463
0.024096
0
0
0
0
0.283186
0
0
0
0
0
0.888889
1
0
true
0
0
0
0
0
0
0
0
null
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
8
08df0162abe817ee2eb5bfaaf8dd258e9de495de
15,878
py
Python
8/main.py
DVRodri8/advent-of-code-2019
8c1e1a0766b067fbe282dd482bc258275c5a3364
[ "MIT" ]
null
null
null
8/main.py
DVRodri8/advent-of-code-2019
8c1e1a0766b067fbe282dd482bc258275c5a3364
[ "MIT" ]
null
null
null
8/main.py
DVRodri8/advent-of-code-2019
8c1e1a0766b067fbe282dd482bc258275c5a3364
[ "MIT" ]
null
null
null
ROW_SIZE = 25 IMAGE_SIZE = 150 image = "220221222222102122222222220222222221222010222222222222221102222222222222222221022222222122202222212222222222202222222220222002202222202122222222222222221221222222112022222222222222222220222022222222222222220002222222222222222222022222222222202222202222222222222222222221222002222222222222222222222222220221222022002122222222222222222221202002222222222222220222222202222222222222022222222222202222202222222222222222222222222122222222212122222222222222220222222122012022222222220222222221222202222222222222220212222222222222222222022222222022202222222222222222212222222220222222212222222022222222222222221222212222112122222222220222222220222000222222222222221002222222222222222220122222222122202222202222222222222222222222222212212222202022222222222222222221212122212222222222220222222222212211222222222222220122222212222222222220122222222122222222212222222222222222222222222122202222202222222222222222222221202022102022222222222222222220222201222222222222220202222202222222222222022222222222212222212222222222222222222222222022222222222122222222222222221222222022112122222222220222222220212212222222222222220022222212222222222220222222222122212222202222222222222222222221222102222222212222222222222222221220202022212022222222222222222220212001222222222222222202222202222222222220022222222222202222222222222222202222222221222202212222222002222222222222222221212022012122222222220222222222222120222222222222222222222202222222222201122222222222202222222222222222222222222220222022202222222022222222222222220220222222222222222222221222222221202010222222222222221222222202222222222220222222222022212222202222222222212222222221222022212222222202222222222222221222212122012022222222221222222220202100222222222222222112222212222202222210222222222122202222222222222222222222222220222012212222212222222222222222220222212122222122222222221222222222212221222222222222222022222222222212222222022222222022212222222222222222222222222222222022202222212112222222222222221220222022002222222222222222222222212110222222222222222122222202222222222210122222222122222222202222222222202221222220222112212222202022222222222222220220202122102222222222221222222220222201222222222222022112222222222222222210222220222222202222212222222222202222222222222102202222212212222222222222222220222022212122222222221222222221212010222222222222021012222222222222222222222222222122202222212222222222222221222220222002222222212012222222222202222220222122022222222222221222222220202020222222222222022112222222222202222211222220222122202222202222222222222220222221222212212222212212222222222212222220212022122122222222220222222221212022222222222222022222222222222212222212122221222122202222212222222222212222222221222022222222222112222222222212220221212222122222222222220222222221221002222222222222222012222202222212222220122221222222202222222222222222222220222221222022222222222202221222222222222221202122222022222222221222222222202111222222222222121222222202222202222202222221222022202220202222222222212222222221222012202222222022222222222202220222202022022022222222220222222222211020222222222222022212222202222222222210122222222222212222202222202222212220222221222022222222212212221222222112220221222222122222222222220222202220211110222222222220120102222222222212222202222221222222212222212222202222202220222221222002212222202122220222222012220222222222022022222222222222212222201221222222222222020212222222222212222211222221222022222222222222222222202222222221222112202222202202221222222002222221202222202122222222221222202220211021222222222220022212222212222202222202022222222222202221222222212222202222222222222212222222222212221222222122221222212022112022222222222222202220212220222222222222221012222222222212212210022221222022202222222222222222202221222220222222202222212212220222222102202222222022102022222222222222222220200121222222222221121102222222222222222200022221222222212220202222202222202221222220222012202222222222222222222112210221202222002222222222221222222221200222222222222220020222222222222222212222122222222022212222212222222222212220222210222212212222202012220222222012220220222222022012222222221222212220211021222222222220220222222202222222222201122220222222212220222222212222202222222220222112202222222002221222222202222220202022012022222222222222102220200022222222222222222002222212222222222220022222222222222222222222212222212222222201222002222222212212220222222002211220212222202112222222221222002220202002222222222220022012222222222212202210222222222022202220202222202222202220222220222112212222222222220222222022221220202122122122222222221222102222211111222222222221020002222212222212212211022221222022222221202222222222222221222212222002202222212112221222222012222222212122202202222222211220112222220220222222222220220202222222222212222202222222222022212222212222212222212221222222222222222222202212221222222122220222212022212102222222202221102220221120222222222220021002222212222212212220022221222022222221212222202222202222222220222122212222212022222222222022211220212222002202222222202202012220220210222222222220221102222202222212212212022221222222202221212222202222222222222201222002222222212022220222202202220220222222202112222222222201112222200011222222222220220202222212222222212211022221221222202222212222222222202022222222222022212222212202222222222202222220222222122022222222220221222221200010222222222220022012222222222212202221022221220022222220222222222222202022222222222002222222222222222222202212200220222122102012202222220221202220212010222222222222121212222212222202222221022221220022112221212222202222202120222211222202222222222202222222202022120222212222222012222222222202212222221121222222222220121202222202222222222202022220222222002222202222212222222221222202222102212222202122222222222202010202222122122222022222212210102222202112222222222221020112222202222222202222022220220122002222222222212222212122222222222102212222202002221222222212211202221022222202012222222212212222221022222222222220120022222212222212222201122221221022012220212222222222202021222200222212202222202212221222202112212221200222002112222222210210112220212122222222222222021102222212222222202220222222220022022220202222202222202122222210222102202222202202200222202002102201210122122202002222220220022220211101222222222221221202222212222202202212022222221122102222202222212222202020222210222212212222202202220222202222100221202022102122212222200212222220220022222222222221021202222202222222222210022222221122002220222222222222202021222220222122222222222212210222212222020221222022012022112222110210002221211101222222222221222112222202222212212211122222220022012222222222222222222222212200222122202222202202212222222202221210210222012022002222210212212222221212222222221220121122222202222212202201222221220122012222212222202222212220222202222222212222212212202222212022120201202022012002112222101201012222220101222222221222022122222212222202212200022222221122102221202222202222212020202201222112222222222212222222202002210220220122202022002222000122022221201121222222220220220112222222222222202222122221220222202220202222202222222222202221222212202222202002211222212022001221212122112112202222020202102221200122222222220220220112222202222202212221122221222222022220222222212222222222212201222102202222212002200222202202221210221122202022102222220121202220210200222222220220222212222202222212212202022221222122022222212222112222222020202211222222202222222022210222202122020210201222012022002222202122202222200211222222220221020112222202222212222211122221222122202222202222002222202120222201222202222222212002212222202112120220211022012012202222102211002222220101222222221222222112222202222202212212022221220122012221202222012222222200212221222122211222212112202222202022202211202122012002212222000000212222210100222222221221221012222212222202222211022222221222212222212222002220212111212222222202202222222002211222212102122210210222222112122222100211122220220122222222220221120202222202222202212201221220222022122222212222102221212210202212222002201222202022201222220202111202221022022112202222121102112221210010222222222221021012222212222202202220120221220222212222222222222220202100202220222002220212202112222222210212002201201122122112222222002221222221202211222222221222221122222202222212212222221221220222222222202222102221202222212222222212220202222022202222212102222201212122222212012222202012222222210101222222222221222022222202222202222221121220221022102220202222202220202000202202222002201212202222221222202002212212210222112022112222011110102221220120222222220221122222220212222212222210020220220122222221202222012221212201222222222202210212212222222222211212202220202222112212202222101200112220211120222222220221121112220212222222202200221220220122122221212222022222002011220221222212202202202212202222200212000220202222212212002222211201112222202010222222221222220102221212222202222200120221222122012222222222102220002221221221222022220222202122202222202102111202202022102102002222121002012221222011222222221221212222221222222202222222222220221222102221222222002221002120220201222112200212212022222222222022210222222222212102102222002000112220220121222222222221210002220222222222202222221220220122222222212222222220002022202220222202210202212012200222221222022222201122210212202222111222122220201202222222220222012202220202222002212212222220221022122220202222012221122100221222222202211202202122201222222002202210201022001112222222000212102222202112222222222220201102222212222222212220122221211122002221222222012221112020212200222002221202222222210222212012101220201022102212012222012201212222222100222222221221211012220212222102202210120220200222202221202222102221102010221222222112202202222102202222222022112200222222220022112222202112212222221110222222221221010012221212222012212222022220200222122201212222012220012212211212222012221212202002221222222022101212221122100121202222011001202222211202222222222220002120221222222222212222220221211022222212212222002221102211220222222102221212202012221222200002201202211022202211122222222002112221221101222222222222120121221202222202212221121222202022112220222222112221112102211000222202212222222022202222201002122221221022020210222222121211102020210011222222221222201102222212222202212202121222211122012210212222112222202120221211222002202212222222202222201212120202222022221102112222210012222021222121222222020221211120222222222122202220221221220022022212202222212200012221021002222122220202222112212222202102000221220222212122222222022210012120210212222202021220010120222212222102222212021022200022212210212222012202212201120212222102211212222012222222212122221202221022201001122222110202002120220011222202220221120020222212222202202202021121202222012210222222022102212202122001222212201222222222222222220022122220202222102102222222002222102120200000222222221221121010220222222122222222021121220122102222212222202212022202220200222012220212222122221222210002221220220022211022202222122101112222212212222202222221020011221222222112222201121222200022112212202222112110122200122102222012220222202102220222222202102211222222121212201222000222202021212001222212021220020111222222222002202222020221200222212221222222022100122012201210222012021212212202200220210212120212200022111021000022021000122201220011222202222221222100220222222002202222220020220220222210202222212012212211020121222112102222212102221221221112221202200022111101011122201220102211220212222222122222210200220212222202222121002120222220022200212222012121022102111002222202210222222122200221222102010200210122021101111122210210202111201221222212221220101222222222222012212110100022221122102201212222122202222102110102222222001222212122200221210202022221201122001012100122211120122110210211220202220221012201222212222102212120000120202022112212202222022110002220010221222022020222212012200221201112012201211222012002102222200201222022200000220212020222102222220202222122212200011022220221012221222222202012022200121012222022100222222102220222221102010212212222212020121122121100112110201201220222021222000001220222222012202100101022202222022221002222212001112212020002222102222202222112212120201102002200220122101120102122120201212000202121221202121221220120222222222022202100220222202122202200202222122200202021001121222222211202212212222122221002001122210122012101022122011110102112200011220212221220222221221212222202202100012221212022022221102222202022212100000101222212200222212112101220221012012120200022210201201122011220102121201102220202020220200220222212222202222022201121220120212221102222022200122022021110222002222222022002212221210002222000201022100112222202021110002210202101221202121222202201222202222212202220122122220121212212012222222212202222010222222202020212222212122121211002111222202122202102221012112011012210200011220112020222011122221222222112212020110121201220012201022222012000222021021210222102001212122022100121220022002221211122100021111112202000202022200201221112120221201220221212222022212022210120222122202222112222202022222021020102222202110212202022002020202002110110220222222220021012110110012122210001221012121222220120222222212002212010111120200122102201120222012102012112220010222212002012202202112020210212020021202122221002211002002002122021200102221202020220122111222222212022202221102022212021222222111222222121102011020210222202112200012002010221221002121221201122122111110202012002022120212000222012220220202011222202212002222011112220211220202220111222102210202121210122222012010211122102110222201022002100221122002202001202121011022110201010221122020221201012220212212122222212111221212222102210222222102211112211201121022212021010202012202022220102111211202222121022121002102222002100212020220112021202201112221212222022202100110022211022212220002222212102002012120201202222020102212020021021222222222000222022020102111022101221112222201000221022120212112220220222222012222120120022211121102212211020102010112010211201022012222221122212022022220122222201221122220010221202210200012212222210220000022222122012222212212102202212020022211121022211012022002020202202100021202212111102202101110220220102111102222222121210101212222002012222210212222112021211200220222212122122222022100220210121202222200120222010222101001202022202101201012202010120220022002110211222211222112202202121022102201202222111022202010200222202022112222211112221202220022212212121012112002012211120012222200111012112002120210022222221222022000002002212220002112020212001222121221100012022221202202002222221002222222122112222012022222002222201201020212222021121002100102021220002012210210022020002110002221122022212211112222112020121102010221222102202202020212020221021012210001120222210222002122101002122111200102102102221212012002000221122212211121022221212022020202212221201220211220101222202110102212201022020221120022202111121022010112101111211012211020101222211112122221022102001212022022020222022000110202012211020220020121120211220120222221202222122001102210220212210222221102220222212110121212100001020222221211020201022110210100101012101100020122100110201011122012110012202212122001121011211000120220101002211020100220012020222221002111121001210002021200210011111022010" image = [int(i) for i in image] # cast stream to list of integers image = [image[i:i+IMAGE_SIZE] for i in range(0,len(image), IMAGE_SIZE)] # split layers # PART 1 zeros = [i.count(0) for i in image] # Count zeros in each layer work_layer = image[ zeros.index( min(zeros) ) ] # find layer with fewest zeros print( work_layer.count(1) * work_layer.count(2) ) # PART 2 render = [2 for i in range(IMAGE_SIZE)] # initially transparent layer # change pixel value only if rendered pixel is still transparent for layer in image: render = [layer[i] if render[i]==2 else render[i] for i in range(IMAGE_SIZE)] # split final image in rows render = [render[i:i+ROW_SIZE] for i in range(0, IMAGE_SIZE, ROW_SIZE)] # print in a confortable read mode for i in render: print("".join([str(k) for k in i]).replace("0"," "))
588.074074
15,010
0.982491
157
15,878
99.286624
0.363057
0.001796
0.002694
0.002823
0.004619
0.004619
0
0
0
0
0
0.956004
0.010833
15,878
26
15,011
610.692308
0.036483
0.016627
0
0
0
0
0.961543
0.961415
0
1
0
0
0
1
0
false
0
0
0
0
0.142857
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
8
08f6d41f5cbd0a5ce7c391aade0c5d229854405f
8,720
py
Python
test_ws/devel/lib/python2.7/dist-packages/test/srv/_skin_set_bone_orientation.py
ruslanjabari/factory_sim
f768bd170a9dea61a87d17ca9222ecf50b9369e7
[ "MIT" ]
null
null
null
test_ws/devel/lib/python2.7/dist-packages/test/srv/_skin_set_bone_orientation.py
ruslanjabari/factory_sim
f768bd170a9dea61a87d17ca9222ecf50b9369e7
[ "MIT" ]
null
null
null
test_ws/devel/lib/python2.7/dist-packages/test/srv/_skin_set_bone_orientation.py
ruslanjabari/factory_sim
f768bd170a9dea61a87d17ca9222ecf50b9369e7
[ "MIT" ]
1
2020-09-12T21:30:32.000Z
2020-09-12T21:30:32.000Z
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from test/skin_set_bone_orientationRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geometry_msgs.msg class skin_set_bone_orientationRequest(genpy.Message): _md5sum = "a6867b70ac9d0b31fe274f3b1674e6a4" _type = "test/skin_set_bone_orientationRequest" _has_header = False #flag to mark the presence of a Header object _full_text = """int32 index geometry_msgs/Quaternion orientation bool absolute ================================================================================ MSG: geometry_msgs/Quaternion # This represents an orientation in free space in quaternion form. float64 x float64 y float64 z float64 w """ __slots__ = ['index','orientation','absolute'] _slot_types = ['int32','geometry_msgs/Quaternion','bool'] def __init__(self, *args, **kwds): """ Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. The available fields are: index,orientation,absolute :param args: complete set of field values, in .msg order :param kwds: use keyword arguments corresponding to message field names to set specific fields. """ if args or kwds: super(skin_set_bone_orientationRequest, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.index is None: self.index = 0 if self.orientation is None: self.orientation = geometry_msgs.msg.Quaternion() if self.absolute is None: self.absolute = False else: self.index = 0 self.orientation = geometry_msgs.msg.Quaternion() self.absolute = False def _get_types(self): """ internal API method """ return self._slot_types def serialize(self, buff): """ serialize message into buffer :param buff: buffer, ``StringIO`` """ try: _x = self buff.write(_get_struct_i4dB().pack(_x.index, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w, _x.absolute)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize(self, str): """ unpack serialized message in str into this message instance :param str: byte array of serialized message, ``str`` """ try: if self.orientation is None: self.orientation = geometry_msgs.msg.Quaternion() end = 0 _x = self start = end end += 37 (_x.index, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w, _x.absolute,) = _get_struct_i4dB().unpack(str[start:end]) self.absolute = bool(self.absolute) return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill def serialize_numpy(self, buff, numpy): """ serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module """ try: _x = self buff.write(_get_struct_i4dB().pack(_x.index, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w, _x.absolute)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize_numpy(self, str, numpy): """ unpack serialized message in str into this message instance using numpy for array types :param str: byte array of serialized message, ``str`` :param numpy: numpy python module """ try: if self.orientation is None: self.orientation = geometry_msgs.msg.Quaternion() end = 0 _x = self start = end end += 37 (_x.index, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w, _x.absolute,) = _get_struct_i4dB().unpack(str[start:end]) self.absolute = bool(self.absolute) return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill _struct_I = genpy.struct_I def _get_struct_I(): global _struct_I return _struct_I _struct_i4dB = None def _get_struct_i4dB(): global _struct_i4dB if _struct_i4dB is None: _struct_i4dB = struct.Struct("<i4dB") return _struct_i4dB # This Python file uses the following encoding: utf-8 """autogenerated by genpy from test/skin_set_bone_orientationResponse.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class skin_set_bone_orientationResponse(genpy.Message): _md5sum = "3c2bcf2ff0894cb3058b1bf4c8c4175a" _type = "test/skin_set_bone_orientationResponse" _has_header = False #flag to mark the presence of a Header object _full_text = """int32 success """ __slots__ = ['success'] _slot_types = ['int32'] def __init__(self, *args, **kwds): """ Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. The available fields are: success :param args: complete set of field values, in .msg order :param kwds: use keyword arguments corresponding to message field names to set specific fields. """ if args or kwds: super(skin_set_bone_orientationResponse, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.success is None: self.success = 0 else: self.success = 0 def _get_types(self): """ internal API method """ return self._slot_types def serialize(self, buff): """ serialize message into buffer :param buff: buffer, ``StringIO`` """ try: buff.write(_get_struct_i().pack(self.success)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize(self, str): """ unpack serialized message in str into this message instance :param str: byte array of serialized message, ``str`` """ try: end = 0 start = end end += 4 (self.success,) = _get_struct_i().unpack(str[start:end]) return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill def serialize_numpy(self, buff, numpy): """ serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module """ try: buff.write(_get_struct_i().pack(self.success)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize_numpy(self, str, numpy): """ unpack serialized message in str into this message instance using numpy for array types :param str: byte array of serialized message, ``str`` :param numpy: numpy python module """ try: end = 0 start = end end += 4 (self.success,) = _get_struct_i().unpack(str[start:end]) return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill _struct_I = genpy.struct_I def _get_struct_I(): global _struct_I return _struct_I _struct_i = None def _get_struct_i(): global _struct_i if _struct_i is None: _struct_i = struct.Struct("<i") return _struct_i class skin_set_bone_orientation(object): _type = 'test/skin_set_bone_orientation' _md5sum = '3902caf1e5bc44580e05f53048f6318b' _request_class = skin_set_bone_orientationRequest _response_class = skin_set_bone_orientationResponse
35.303644
146
0.67844
1,178
8,720
4.831919
0.145161
0.025826
0.02319
0.026704
0.857344
0.806571
0.799543
0.794975
0.794975
0.794975
0
0.018132
0.203096
8,720
246
147
35.447154
0.800979
0.279243
0
0.704698
1
0
0.1357
0.059952
0
0
0.003397
0
0
1
0.107383
false
0
0.04698
0
0.348993
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
0
0
0
0
0
0
8
3ea70010c7d4fe436713b484ab7b325e09b8b181
75
py
Python
dcplib/media_types/__init__.py
HumanCellAtlas/dcplib
5d1bd939393640b9623b040f13db1c97d83bcabd
[ "MIT" ]
3
2019-02-28T06:03:05.000Z
2019-07-01T18:29:11.000Z
dcplib/media_types/__init__.py
HumanCellAtlas/dcplib
5d1bd939393640b9623b040f13db1c97d83bcabd
[ "MIT" ]
64
2018-07-27T05:43:46.000Z
2020-01-04T14:17:59.000Z
dcplib/media_types/__init__.py
HumanCellAtlas/dcplib
5d1bd939393640b9623b040f13db1c97d83bcabd
[ "MIT" ]
3
2019-11-01T14:24:25.000Z
2020-09-07T18:42:17.000Z
from .media_type import MediaType from .dcp_media_type import DcpMediaType
25
40
0.866667
11
75
5.636364
0.636364
0.290323
0.483871
0
0
0
0
0
0
0
0
0
0.106667
75
2
41
37.5
0.925373
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
3ee8f0835c24fecfddbb7dc4c5e23d1a5e1285c3
17,009
py
Python
ckanext/issues/tests/logic/action/test_report.py
rhabbachi/ckanext-issues
d8c3dde8372e88dd5dc173023df34c90034ca777
[ "MIT" ]
8
2016-06-16T20:45:54.000Z
2020-09-24T12:06:15.000Z
ckanext/issues/tests/logic/action/test_report.py
rhabbachi/ckanext-issues
d8c3dde8372e88dd5dc173023df34c90034ca777
[ "MIT" ]
50
2015-03-25T16:59:11.000Z
2016-01-10T21:35:26.000Z
ckanext/issues/tests/logic/action/test_report.py
rhabbachi/ckanext-issues
d8c3dde8372e88dd5dc173023df34c90034ca777
[ "MIT" ]
11
2016-09-14T13:34:53.000Z
2020-08-28T05:48:58.000Z
from ckan import model from ckan.lib import search try: from ckan.tests import factories, helpers except ImportError: from ckan.new_tests import factories, helpers from ckanext.issues.tests import factories as issue_factories from ckanext.issues.model import ( Issue, IssueComment, ) from ckanext.issues.exception import ReportAlreadyExists from ckanext.issues.tests.helpers import ( ClearOnTearDownMixin, ClearOnSetupClassMixin, ) from nose.tools import assert_equals, assert_raises import mock class TestReportAnIssue(ClearOnTearDownMixin): def test_report_an_issue(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id']) user = factories.User(name='unauthed') context = { 'user': user['name'], 'model': model, } helpers.call_action( 'issue_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'] ) issue_obj = Issue.get(issue['id']) assert_equals(len(issue_obj.abuse_reports), 1) assert_equals(issue_obj.visibility, 'visible') def test_publisher_reports_an_issue(self): '''this should immediately hide the issue''' owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user=owner, user_id=owner['id'], dataset_id=dataset['id']) context = { 'user': owner['name'], 'model': model, } helpers.call_action( 'issue_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'] ) result = helpers.call_action( 'issue_show', dataset_id=dataset['id'], issue_number=issue['number'], ) assert_equals('hidden', result['visibility']) @mock.patch.dict('ckanext.issues.logic.action.action.config', {'ckanext.issues.max_strikes': '0'}) def test_max_strikes_hides_issues(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id']) user_0 = factories.User() context = { 'user': user_0['name'], 'model': model, } helpers.call_action( 'issue_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'] ) user_1 = factories.User() context = { 'user': user_1['name'], 'model': model, } helpers.call_action( 'issue_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'] ) issue_obj = Issue.get(issue['id']) assert_equals(len(issue_obj.abuse_reports), 2) assert_equals('hidden', issue_obj.visibility) #class TestReportAnIssueTwice(object): # def setup(self): # model.Session.close_all() # # def teardown(self): # helpers.reset_db() # search.clear() # # def test_report_twice(self): # owner = factories.User() # org = factories.Organization(user=owner) # dataset = factories.Dataset(owner_org=org['name']) # issue = issue_factories.Issue(user_id=owner['id'], # dataset_id=dataset['id']) # # user = factories.User(name='unauthed') # context = { # 'user': user['name'], # 'model': model, # } # model.Session.begin_nested() # helpers.call_action( # 'issue_report', # context=context, # dataset_id=dataset['id'], # issue_number=issue['number'] # ) # assert_raises( # ReportAlreadyExists, # helpers.call_action, # 'issue_report', # context=context, # dataset_id=dataset['id'], # issue_number=issue['number'] # ) class TestIssueReportClear(ClearOnTearDownMixin): def test_clear_as_publisher(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id'], visibility='hidden') context = { 'user': owner['name'], 'model': model, } helpers.call_action( 'issue_report_clear', context=context, dataset_id=dataset['id'], issue_number=issue['number'] ) result = helpers.call_action( 'issue_show', dataset_id=dataset['id'], issue_number=issue['number'], ) assert_equals('visible', result['visibility']) issue_obj = Issue.get(issue['id']) assert_equals(len(issue_obj.abuse_reports), 0) def test_clear_as_user(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id'], visibility='hidden') user = factories.User() model.Session.add(Issue.Report(user['id'], issue['id'])) model.Session.commit() context = { 'user': user['name'], 'model': model, } helpers.call_action( 'issue_report_clear', context=context, dataset_id=dataset['id'], issue_number=issue['number'] ) result = helpers.call_action('issue_show', dataset_id=dataset['id'], issue_number=issue['number']) assert_equals('visible', result['visibility']) issue_obj = Issue.get(issue['id']) assert_equals(len(issue_obj.abuse_reports), 0) class TestIssueReportShow(ClearOnTearDownMixin, ClearOnSetupClassMixin): def setup(self): self.owner = factories.User() self.org = factories.Organization(user=self.owner) self.dataset = factories.Dataset(owner_org=self.org['name']) self.issue = issue_factories.Issue(user_id=self.owner['id'], dataset_id=self.dataset['id']) context = { 'user': self.owner['name'], 'model': model, } helpers.call_action('issue_report', context=context, dataset_id=self.dataset['id'], issue_number=self.issue['number']) self.user_0 = factories.User() context = { 'user': self.user_0['name'], 'model': model, } helpers.call_action('issue_report', context=context, dataset_id=self.dataset['id'], issue_number=self.issue['number']) def test_issue_report_show_for_publisher(self): context = { 'user': self.owner['name'], 'model': model, } result = helpers.call_action( 'issue_report_show', context=context, dataset_id=self.dataset['id'], issue_number=self.issue['number'], ) assert_equals(set([self.owner['id'], self.user_0['id']]), set(result)) def test_issue_report_show_for_user(self): context = { 'user': self.user_0['name'], 'model': model, } result = helpers.call_action( 'issue_report_show', context=context, dataset_id=self.dataset['id'], issue_number=self.issue['number'], ) assert_equals([self.user_0['id']], result) def test_issue_report_show_for_other(self): context = { 'user': factories.User()['name'], 'model': model, } result = helpers.call_action( 'issue_report_show', context=context, dataset_id=self.dataset['id'], issue_number=self.issue['number'], ) assert_equals([], result) class TestReportComment(ClearOnSetupClassMixin, ClearOnTearDownMixin): def test_report_comment(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id']) comment = issue_factories.IssueComment(user_id=owner['id'], dataset_id=dataset['id'], issue_number=issue['number']) user = factories.User(name='unauthed') context = { 'user': user['name'], 'model': model, } helpers.call_action('issue_comment_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'], comment_id=comment['id']) comment_obj = IssueComment.get(comment['id']) assert_equals(len(comment_obj.abuse_reports), 1) assert_equals(comment_obj.visibility, 'visible') def test_publisher_reports_a_comment(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user=owner, user_id=owner['id'], dataset_id=dataset['id']) comment = issue_factories.IssueComment(user_id=owner['id'], dataset_id=dataset['id'], issue_number=issue['number']) context = { 'user': owner['name'], 'model': model, } helpers.call_action('issue_comment_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'], comment_id=comment['id']) result = helpers.call_action('issue_show', issue_number=issue['number'], dataset_id=dataset['id']) assert_equals('hidden', result['comments'][0]['visibility']) @mock.patch.dict('ckanext.issues.logic.action.action.config', {'ckanext.issues.max_strikes': '0'}) def test_max_strikes_hides_comment(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id']) comment = issue_factories.IssueComment(user_id=owner['id'], dataset_id=dataset['id'], issue_number=issue['number']) user = factories.User(name='unauthed') context = { 'user': user['name'], 'model': model, } helpers.call_action('issue_comment_report', context=context, dataset_id=dataset['id'], issue_number=issue['number'], comment_id=comment['id']) result = helpers.call_action('issue_show', dataset_id=dataset['id'], issue_number=issue['number']) comment_obj = IssueComment.get(comment['id']) assert_equals(len(comment_obj.abuse_reports), 1) assert_equals('hidden', result['comments'][0]['visibility']) #class TestReportCommentTwice(object): # def setup(self): # helpers.reset_db() # # def teardown(self): # helpers.reset_db() # search.clear() # # def test_report_twice(self): # model.Session.begin_nested() # owner = factories.User() # org = factories.Organization(user=owner) # dataset = factories.Dataset(owner_org=org['name']) # issue = issue_factories.Issue(user_id=owner['id'], # dataset_id=dataset['id']) # # comment = issue_factories.IssueComment(user_id=owner['id'], # dataset_id=dataset['id'], # issue_number=issue['number']) # # user = factories.User(name='unauthed') # context = { # 'user': user['name'], # 'model': model, # } # helpers.call_action('issue_comment_report', # context=context, # dataset_id=dataset['id'], # issue_number=issue['number'], # comment_id=comment['id']) # # assert_raises( # ReportAlreadyExists, # helpers.call_action, # 'issue_comment_report', # context=context, # dataset_id=dataset['id'], # issue_number=issue['number'], # comment_id=comment['id'], # ) class TestCommentReportClearAsPublisher(ClearOnTearDownMixin, ClearOnSetupClassMixin): def test_clear_as_publisher(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id']) comment = issue_factories.IssueComment(user_id=owner['id'], dataset_id=dataset['id'], issue_number=issue['number'], visibility='hidden') context = { 'user': owner['name'], 'model': model, } model.Session.add(IssueComment.Report(owner['id'], parent_id=comment['id'])) model.Session.commit() helpers.call_action('issue_comment_report_clear', context=context, dataset_id=dataset['id'], issue_number=issue['number'], comment_id=comment['id']) result = helpers.call_action('issue_show', issue_number=issue['number'], dataset_id=dataset['id']) assert_equals('visible', result['comments'][0]['visibility']) comment_obj = IssueComment.get(comment['id']) model.Session.refresh(comment_obj) assert_equals(len(comment_obj.abuse_reports), 0) class TestCommentReportClearAsUser(ClearOnSetupClassMixin, ClearOnTearDownMixin): def test_clear_as_user(self): owner = factories.User() org = factories.Organization(user=owner) dataset = factories.Dataset(owner_org=org['name']) issue = issue_factories.Issue(user_id=owner['id'], dataset_id=dataset['id']) comment = issue_factories.IssueComment(user_id=owner['id'], dataset_id=dataset['id'], issue_number=issue['number']) user = factories.User() model.Session.add(IssueComment.Report(user['id'], parent_id=comment['id'])) model.Session.commit() context = { 'user': user['name'], 'model': model, } helpers.call_action('issue_comment_report_clear', context=context, dataset_id=dataset['id'], issue_number=issue['number'], comment_id=comment['id']) comment_obj = IssueComment.get(comment['id']) assert_equals(len(comment_obj.abuse_reports), 0) assert_equals('visible', comment_obj.visibility)
37.464758
78
0.523252
1,574
17,009
5.445997
0.064803
0.094494
0.074428
0.081895
0.839011
0.816379
0.79398
0.760033
0.739734
0.738567
0
0.002011
0.356811
17,009
453
79
37.547461
0.781536
0.14216
0
0.722054
0
0
0.084419
0.012818
0
0
0
0
0.066465
1
0.042296
false
0
0.033233
0
0.093656
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
f5c2bbbff08758a306fd664ffa9ab26e78a9493b
15,911
py
Python
sdk/python/pulumi_azure/automation/dsc_node_configuration.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
109
2018-06-18T00:19:44.000Z
2022-02-20T05:32:57.000Z
sdk/python/pulumi_azure/automation/dsc_node_configuration.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
663
2018-06-18T21:08:46.000Z
2022-03-31T20:10:11.000Z
sdk/python/pulumi_azure/automation/dsc_node_configuration.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
41
2018-07-19T22:37:38.000Z
2022-03-14T10:56:26.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DscNodeConfigurationArgs', 'DscNodeConfiguration'] @pulumi.input_type class DscNodeConfigurationArgs: def __init__(__self__, *, automation_account_name: pulumi.Input[str], content_embedded: pulumi.Input[str], resource_group_name: pulumi.Input[str], name: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a DscNodeConfiguration resource. :param pulumi.Input[str] automation_account_name: The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[str] content_embedded: The PowerShell DSC Node Configuration (mof content). :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. """ pulumi.set(__self__, "automation_account_name", automation_account_name) pulumi.set(__self__, "content_embedded", content_embedded) pulumi.set(__self__, "resource_group_name", resource_group_name) if name is not None: pulumi.set(__self__, "name", name) @property @pulumi.getter(name="automationAccountName") def automation_account_name(self) -> pulumi.Input[str]: """ The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ return pulumi.get(self, "automation_account_name") @automation_account_name.setter def automation_account_name(self, value: pulumi.Input[str]): pulumi.set(self, "automation_account_name", value) @property @pulumi.getter(name="contentEmbedded") def content_embedded(self) -> pulumi.Input[str]: """ The PowerShell DSC Node Configuration (mof content). """ return pulumi.get(self, "content_embedded") @content_embedded.setter def content_embedded(self, value: pulumi.Input[str]): pulumi.set(self, "content_embedded", value) @property @pulumi.getter(name="resourceGroupName") def resource_group_name(self) -> pulumi.Input[str]: """ The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ return pulumi.get(self, "resource_group_name") @resource_group_name.setter def resource_group_name(self, value: pulumi.Input[str]): pulumi.set(self, "resource_group_name", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @pulumi.input_type class _DscNodeConfigurationState: def __init__(__self__, *, automation_account_name: Optional[pulumi.Input[str]] = None, configuration_name: Optional[pulumi.Input[str]] = None, content_embedded: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, resource_group_name: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering DscNodeConfiguration resources. :param pulumi.Input[str] automation_account_name: The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[str] content_embedded: The PowerShell DSC Node Configuration (mof content). :param pulumi.Input[str] name: Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ if automation_account_name is not None: pulumi.set(__self__, "automation_account_name", automation_account_name) if configuration_name is not None: pulumi.set(__self__, "configuration_name", configuration_name) if content_embedded is not None: pulumi.set(__self__, "content_embedded", content_embedded) if name is not None: pulumi.set(__self__, "name", name) if resource_group_name is not None: pulumi.set(__self__, "resource_group_name", resource_group_name) @property @pulumi.getter(name="automationAccountName") def automation_account_name(self) -> Optional[pulumi.Input[str]]: """ The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ return pulumi.get(self, "automation_account_name") @automation_account_name.setter def automation_account_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "automation_account_name", value) @property @pulumi.getter(name="configurationName") def configuration_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "configuration_name") @configuration_name.setter def configuration_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "configuration_name", value) @property @pulumi.getter(name="contentEmbedded") def content_embedded(self) -> Optional[pulumi.Input[str]]: """ The PowerShell DSC Node Configuration (mof content). """ return pulumi.get(self, "content_embedded") @content_embedded.setter def content_embedded(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "content_embedded", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="resourceGroupName") def resource_group_name(self) -> Optional[pulumi.Input[str]]: """ The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ return pulumi.get(self, "resource_group_name") @resource_group_name.setter def resource_group_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "resource_group_name", value) class DscNodeConfiguration(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, automation_account_name: Optional[pulumi.Input[str]] = None, content_embedded: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, __props__=None): """ Manages a Automation DSC Node Configuration. ## Import Automation DSC Node Configuration's can be imported using the `resource id`, e.g. ```sh $ pulumi import azure:automation/dscNodeConfiguration:DscNodeConfiguration configuration1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/nodeConfigurations/configuration1 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] automation_account_name: The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[str] content_embedded: The PowerShell DSC Node Configuration (mof content). :param pulumi.Input[str] name: Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ ... @overload def __init__(__self__, resource_name: str, args: DscNodeConfigurationArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Manages a Automation DSC Node Configuration. ## Import Automation DSC Node Configuration's can be imported using the `resource id`, e.g. ```sh $ pulumi import azure:automation/dscNodeConfiguration:DscNodeConfiguration configuration1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/nodeConfigurations/configuration1 ``` :param str resource_name: The name of the resource. :param DscNodeConfigurationArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(DscNodeConfigurationArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, automation_account_name: Optional[pulumi.Input[str]] = None, content_embedded: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = DscNodeConfigurationArgs.__new__(DscNodeConfigurationArgs) if automation_account_name is None and not opts.urn: raise TypeError("Missing required property 'automation_account_name'") __props__.__dict__["automation_account_name"] = automation_account_name if content_embedded is None and not opts.urn: raise TypeError("Missing required property 'content_embedded'") __props__.__dict__["content_embedded"] = content_embedded __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["configuration_name"] = None super(DscNodeConfiguration, __self__).__init__( 'azure:automation/dscNodeConfiguration:DscNodeConfiguration', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, automation_account_name: Optional[pulumi.Input[str]] = None, configuration_name: Optional[pulumi.Input[str]] = None, content_embedded: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, resource_group_name: Optional[pulumi.Input[str]] = None) -> 'DscNodeConfiguration': """ Get an existing DscNodeConfiguration resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] automation_account_name: The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[str] content_embedded: The PowerShell DSC Node Configuration (mof content). :param pulumi.Input[str] name: Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _DscNodeConfigurationState.__new__(_DscNodeConfigurationState) __props__.__dict__["automation_account_name"] = automation_account_name __props__.__dict__["configuration_name"] = configuration_name __props__.__dict__["content_embedded"] = content_embedded __props__.__dict__["name"] = name __props__.__dict__["resource_group_name"] = resource_group_name return DscNodeConfiguration(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="automationAccountName") def automation_account_name(self) -> pulumi.Output[str]: """ The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ return pulumi.get(self, "automation_account_name") @property @pulumi.getter(name="configurationName") def configuration_name(self) -> pulumi.Output[str]: return pulumi.get(self, "configuration_name") @property @pulumi.getter(name="contentEmbedded") def content_embedded(self) -> pulumi.Output[str]: """ The PowerShell DSC Node Configuration (mof content). """ return pulumi.get(self, "content_embedded") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. """ return pulumi.get(self, "name") @property @pulumi.getter(name="resourceGroupName") def resource_group_name(self) -> pulumi.Output[str]: """ The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ return pulumi.get(self, "resource_group_name")
48.509146
265
0.683678
1,866
15,911
5.595927
0.086281
0.063206
0.077763
0.065313
0.826853
0.786822
0.770446
0.738939
0.724287
0.684447
0
0.005959
0.23003
15,911
327
266
48.657492
0.84638
0.341336
0
0.590674
1
0
0.130546
0.040592
0
0
0
0
0
1
0.15544
false
0.005181
0.025907
0.010363
0.274611
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
f5ee51461fb49a5ae20a8d9db6127d6db9428eba
1,231
py
Python
4-1/WIndow Programing/20180323/20180323.py
define16/Class
8b0771a348b2bcb19ba338ebff94326828a293ea
[ "Apache-2.0" ]
null
null
null
4-1/WIndow Programing/20180323/20180323.py
define16/Class
8b0771a348b2bcb19ba338ebff94326828a293ea
[ "Apache-2.0" ]
null
null
null
4-1/WIndow Programing/20180323/20180323.py
define16/Class
8b0771a348b2bcb19ba338ebff94326828a293ea
[ "Apache-2.0" ]
null
null
null
while True : print("1) 덧셈 2) 뺄셈 3) 곱셈 4) 나눗셈 5) 나머지 값 6) 프로그램 종료"); i = int(input("메뉴를 선택하세요 : ")); if i == 1 : a = int(input("두개의 숫자값을 입력하세요 : ")) b = int(input("두개의 숫자값을 입력하세요 : ")) sum= a + b; print("입력하신 데이터는 [%d], [%d]이고, [뎃셈]수식에 따라 결과값은 [%d]입니다." % (a, b ,sum)); elif i == 2 : a = int(input("두개의 숫자값을 입력하세요 : ")) b = int(input("두개의 숫자값을 입력하세요 : ")) sum= a - b; print("입력하신 데이터는 [%d], [%d]이고, [뺄셈]수식에 따라 결과값은 [%d]입니다." % (a, b ,sum)); elif i == 3 : a = int(input("두개의 숫자값을 입력하세요 : ")) b = int(input("두개의 숫자값을 입력하세요 : ")) sum= a * b; print("입력하신 데이터는 [%d], [%d]이고, [곱셈]수식에 따라 결과값은 [%d]입니다." % (a, b ,sum)); elif i == 4 : a = int(input("두개의 숫자값을 입력하세요 : ")) b = int(input("두개의 숫자값을 입력하세요 : ")) sum= a // b; print("입력하신 데이터는 [%d], [%d]이고, [나눗셈]수식에 따라 결과값은 [%d]입니다." % (a, b ,sum)); elif i == 5 : a = int(input("두개의 숫자값을 입력하세요 : ")) b = int(input("두개의 숫자값을 입력하세요 : ")) sum= a % b; print("입력하신 데이터는 [%d], [%d]이고, [나머지 값]수식에 따라 결과값은 [%d]입니다." % (a, b ,sum)); elif i == 6 : break;
24.62
83
0.420796
192
1,231
2.697917
0.208333
0.169884
0.212355
0.289575
0.839768
0.839768
0.839768
0.839768
0.839768
0.839768
0
0.015504
0.371243
1,231
49
84
25.122449
0.653747
0
0
0.333333
0
0.166667
0.381803
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
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
eb2263bd10ddf539ea4d7cf6d90e344c05035d82
1,346
py
Python
test/extension/sin_test.py
diatche/curvepy
1876ad922238a8794dfeb1b1773c179081eae0dd
[ "MIT" ]
null
null
null
test/extension/sin_test.py
diatche/curvepy
1876ad922238a8794dfeb1b1773c179081eae0dd
[ "MIT" ]
null
null
null
test/extension/sin_test.py
diatche/curvepy
1876ad922238a8794dfeb1b1773c179081eae0dd
[ "MIT" ]
null
null
null
import pytest from pytest import approx from curvepy.sin import Sin def test_with_sin(): sin_original = Sin(amplitude=1, period=4) sin_extended = sin_original.subset((0, 4)).extension( 'sin', period=4, start=True, end=True, min_step=1e-4 ) assert sin_original(-1) == approx(sin_extended(-1), rel=0.01) assert sin_original(-0.1) == approx(sin_extended(-0.1), rel=0.01) assert sin_original(0) == approx(sin_extended(0), rel=0.01) assert sin_original(4) == approx(sin_extended(4), rel=0.01) assert sin_original(4.1) == approx(sin_extended(4.1), rel=0.01) assert sin_original(5) == approx(sin_extended(5), rel=0.01) def test_regression(): sin_original = Sin(amplitude=1, period=4) sin_extended = sin_original.subset((0, 4)).extension( 'sin', period=4, regression_degree=10, start=True, end=True, min_step=1e-4 ) assert sin_original(-1) == approx(sin_extended(-1), rel=0.01) assert sin_original(-0.1) == approx(sin_extended(-0.1), rel=0.01) assert sin_original(0) == approx(sin_extended(0), rel=0.01) assert sin_original(4) == approx(sin_extended(4), rel=0.01) assert sin_original(4.1) == approx(sin_extended(4.1), rel=0.01) assert sin_original(5) == approx(sin_extended(5), rel=0.01)
32.829268
69
0.643388
213
1,346
3.896714
0.14554
0.212048
0.245783
0.144578
0.872289
0.872289
0.872289
0.872289
0.872289
0.872289
0
0.077994
0.199851
1,346
40
70
33.65
0.692665
0
0
0.764706
0
0
0.004458
0
0
0
0
0
0.352941
1
0.058824
false
0
0.088235
0
0.147059
0
0
0
0
null
1
1
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
9
de97efb369f47ae6ef183422d1e722040666b865
423,359
py
Python
commissioning/wfc3_uvis1_imaging_61_cases.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
24
2015-01-04T23:38:21.000Z
2022-02-01T00:11:07.000Z
commissioning/wfc3_uvis1_imaging_61_cases.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
126
2015-01-29T14:50:37.000Z
2022-02-15T01:58:13.000Z
commissioning/wfc3_uvis1_imaging_61_cases.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
25
2015-02-09T12:12:02.000Z
2021-09-09T13:06:54.000Z
from pytools import testutil import sys import basecase class calcspecCase1(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,9230,0.0,4.1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase1(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f200lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=True self.etcid="['uvim1006.tab:5000', 'uvim1006.tab:5001', 'uvim1006.tab:5002', 'uvim1006.tab:5003', 'uvim1006.tab:5004', 'uvim1006.tab:5310', 'uvim1006.tab:5372', 'uvim1006.tab:5434', 'uvim1006.tab:5496', 'uvim1006.tab:5558', 'uvim1006.tab:5620', 'uvim1006.tab:5682', 'uvim1006.tab:5744', 'uvim1006.tab:5806', 'uvim1006.tab:5868', 'uvim1006.tab:5930', 'uvim1006.tab:5992', 'uvim1006.tab:6054', 'uvim1006.tab:6116', 'uvim1006.tab:6178', 'uvim1006.tab:6240', 'uvim1006.tab:6302', 'uvim1006.tab:6364', 'uvim1006.tab:6426', 'uvim1006.tab:6488', 'uvim1006.tab:6550', 'uvim1006.tab:6612', 'uvim1006.tab:6674', 'uvim1006.tab:6736', 'uvim1006.tab:6798', 'uvim1006.tab:6860', 'uvim1006.tab:6922', 'uvim1006.tab:6984', 'uvim1006.tab:7046', 'uvim1006.tab:7108', 'uvim1006.tab:7170']" self.setglobal(__file__) self.runpy() class countrateCase1(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f200lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5000', 'uvim1006.tab:5001', 'uvim1006.tab:5002', 'uvim1006.tab:5003', 'uvim1006.tab:5004', 'uvim1006.tab:5310', 'uvim1006.tab:5372', 'uvim1006.tab:5434', 'uvim1006.tab:5496', 'uvim1006.tab:5558', 'uvim1006.tab:5620', 'uvim1006.tab:5682', 'uvim1006.tab:5744', 'uvim1006.tab:5806', 'uvim1006.tab:5868', 'uvim1006.tab:5930', 'uvim1006.tab:5992', 'uvim1006.tab:6054', 'uvim1006.tab:6116', 'uvim1006.tab:6178', 'uvim1006.tab:6240', 'uvim1006.tab:6302', 'uvim1006.tab:6364', 'uvim1006.tab:6426', 'uvim1006.tab:6488', 'uvim1006.tab:6550', 'uvim1006.tab:6612', 'uvim1006.tab:6674', 'uvim1006.tab:6736', 'uvim1006.tab:6798', 'uvim1006.tab:6860', 'uvim1006.tab:6922', 'uvim1006.tab:6984', 'uvim1006.tab:7046', 'uvim1006.tab:7108', 'uvim1006.tab:7170']" self.setglobal(__file__) self.runpy() class countrateCase2(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f200lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5000', 'uvim1006.tab:5002', 'uvim1006.tab:5003', 'uvim1006.tab:5004', 'uvim1006.tab:5310', 'uvim1006.tab:5372', 'uvim1006.tab:5434', 'uvim1006.tab:5496', 'uvim1006.tab:5558', 'uvim1006.tab:5620', 'uvim1006.tab:5682', 'uvim1006.tab:5744', 'uvim1006.tab:5806', 'uvim1006.tab:5868', 'uvim1006.tab:5930', 'uvim1006.tab:5992', 'uvim1006.tab:6054', 'uvim1006.tab:6116', 'uvim1006.tab:6178', 'uvim1006.tab:6240', 'uvim1006.tab:6302', 'uvim1006.tab:6364', 'uvim1006.tab:6426', 'uvim1006.tab:6488', 'uvim1006.tab:6550', 'uvim1006.tab:6612', 'uvim1006.tab:6674', 'uvim1006.tab:6736', 'uvim1006.tab:6798', 'uvim1006.tab:6860', 'uvim1006.tab:6922', 'uvim1006.tab:6984', 'uvim1006.tab:7046']" self.setglobal(__file__) self.runpy() class calcphotCase2(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f200lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5000', 'uvim1006.tab:5002', 'uvim1006.tab:5003', 'uvim1006.tab:5004', 'uvim1006.tab:5310', 'uvim1006.tab:5372', 'uvim1006.tab:5434', 'uvim1006.tab:5496', 'uvim1006.tab:5558', 'uvim1006.tab:5620', 'uvim1006.tab:5682', 'uvim1006.tab:5744', 'uvim1006.tab:5806', 'uvim1006.tab:5868', 'uvim1006.tab:5930', 'uvim1006.tab:5992', 'uvim1006.tab:6054', 'uvim1006.tab:6116', 'uvim1006.tab:6178', 'uvim1006.tab:6240', 'uvim1006.tab:6302', 'uvim1006.tab:6364', 'uvim1006.tab:6426', 'uvim1006.tab:6488', 'uvim1006.tab:6550', 'uvim1006.tab:6612', 'uvim1006.tab:6674', 'uvim1006.tab:6736', 'uvim1006.tab:6798', 'uvim1006.tab:6860', 'uvim1006.tab:6922', 'uvim1006.tab:6984', 'uvim1006.tab:7046']" self.setglobal(__file__) self.runpy() class countrateCase4(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f200lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=True self.etcid="['uvim1006.tab:5001', 'uvim1006.tab:7108', 'uvim1006.tab:7170']" self.setglobal(__file__) self.runpy() class calcphotCase4(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f200lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5001', 'uvim1006.tab:7108', 'uvim1006.tab:7170']" self.setglobal(__file__) self.runpy() class calcphotCase6(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f218w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5005', 'uvim1006.tab:5006', 'uvim1006.tab:5007', 'uvim1006.tab:5008', 'uvim1006.tab:5009', 'uvim1006.tab:5311', 'uvim1006.tab:5373', 'uvim1006.tab:5435', 'uvim1006.tab:5497', 'uvim1006.tab:5559', 'uvim1006.tab:5621', 'uvim1006.tab:5683', 'uvim1006.tab:5745', 'uvim1006.tab:5807', 'uvim1006.tab:5869', 'uvim1006.tab:5931', 'uvim1006.tab:5993', 'uvim1006.tab:6055', 'uvim1006.tab:6117', 'uvim1006.tab:6179', 'uvim1006.tab:6241', 'uvim1006.tab:6303', 'uvim1006.tab:6365', 'uvim1006.tab:6427', 'uvim1006.tab:6489', 'uvim1006.tab:6551', 'uvim1006.tab:6613', 'uvim1006.tab:6675', 'uvim1006.tab:6737', 'uvim1006.tab:6799', 'uvim1006.tab:6861', 'uvim1006.tab:6923', 'uvim1006.tab:6985', 'uvim1006.tab:7047', 'uvim1006.tab:7109', 'uvim1006.tab:7171']" self.setglobal(__file__) self.runpy() class countrateCase5(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f218w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5005', 'uvim1006.tab:5006', 'uvim1006.tab:5007', 'uvim1006.tab:5008', 'uvim1006.tab:5009', 'uvim1006.tab:5311', 'uvim1006.tab:5373', 'uvim1006.tab:5435', 'uvim1006.tab:5497', 'uvim1006.tab:5559', 'uvim1006.tab:5621', 'uvim1006.tab:5683', 'uvim1006.tab:5745', 'uvim1006.tab:5807', 'uvim1006.tab:5869', 'uvim1006.tab:5931', 'uvim1006.tab:5993', 'uvim1006.tab:6055', 'uvim1006.tab:6117', 'uvim1006.tab:6179', 'uvim1006.tab:6241', 'uvim1006.tab:6303', 'uvim1006.tab:6365', 'uvim1006.tab:6427', 'uvim1006.tab:6489', 'uvim1006.tab:6551', 'uvim1006.tab:6613', 'uvim1006.tab:6675', 'uvim1006.tab:6737', 'uvim1006.tab:6799', 'uvim1006.tab:6861', 'uvim1006.tab:6923', 'uvim1006.tab:6985', 'uvim1006.tab:7047', 'uvim1006.tab:7109', 'uvim1006.tab:7171']" self.setglobal(__file__) self.runpy() class countrateCase6(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f218w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5005', 'uvim1006.tab:5007', 'uvim1006.tab:5008', 'uvim1006.tab:5009', 'uvim1006.tab:5311', 'uvim1006.tab:5373', 'uvim1006.tab:5435', 'uvim1006.tab:5497', 'uvim1006.tab:5559', 'uvim1006.tab:5621', 'uvim1006.tab:5683', 'uvim1006.tab:5745', 'uvim1006.tab:5807', 'uvim1006.tab:5869', 'uvim1006.tab:5931', 'uvim1006.tab:5993', 'uvim1006.tab:6055', 'uvim1006.tab:6117', 'uvim1006.tab:6179', 'uvim1006.tab:6241', 'uvim1006.tab:6303', 'uvim1006.tab:6365', 'uvim1006.tab:6427', 'uvim1006.tab:6489', 'uvim1006.tab:6551', 'uvim1006.tab:6613', 'uvim1006.tab:6675', 'uvim1006.tab:6737', 'uvim1006.tab:6799', 'uvim1006.tab:6861', 'uvim1006.tab:6923', 'uvim1006.tab:6985', 'uvim1006.tab:7047']" self.setglobal(__file__) self.runpy() class calcphotCase7(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f218w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5005', 'uvim1006.tab:5007', 'uvim1006.tab:5008', 'uvim1006.tab:5009', 'uvim1006.tab:5311', 'uvim1006.tab:5373', 'uvim1006.tab:5435', 'uvim1006.tab:5497', 'uvim1006.tab:5559', 'uvim1006.tab:5621', 'uvim1006.tab:5683', 'uvim1006.tab:5745', 'uvim1006.tab:5807', 'uvim1006.tab:5869', 'uvim1006.tab:5931', 'uvim1006.tab:5993', 'uvim1006.tab:6055', 'uvim1006.tab:6117', 'uvim1006.tab:6179', 'uvim1006.tab:6241', 'uvim1006.tab:6303', 'uvim1006.tab:6365', 'uvim1006.tab:6427', 'uvim1006.tab:6489', 'uvim1006.tab:6551', 'uvim1006.tab:6613', 'uvim1006.tab:6675', 'uvim1006.tab:6737', 'uvim1006.tab:6799', 'uvim1006.tab:6861', 'uvim1006.tab:6923', 'uvim1006.tab:6985', 'uvim1006.tab:7047']" self.setglobal(__file__) self.runpy() class countrateCase7(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f218w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5006', 'uvim1006.tab:7109', 'uvim1006.tab:7171']" self.setglobal(__file__) self.runpy() class calcphotCase8(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f218w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5006', 'uvim1006.tab:7109', 'uvim1006.tab:7171']" self.setglobal(__file__) self.runpy() class calcphotCase9(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5010', 'uvim1006.tab:5011', 'uvim1006.tab:5012', 'uvim1006.tab:5013', 'uvim1006.tab:5014', 'uvim1006.tab:5312', 'uvim1006.tab:5374', 'uvim1006.tab:5436', 'uvim1006.tab:5498', 'uvim1006.tab:5560', 'uvim1006.tab:5622', 'uvim1006.tab:5684', 'uvim1006.tab:5746', 'uvim1006.tab:5808', 'uvim1006.tab:5870', 'uvim1006.tab:5932', 'uvim1006.tab:5994', 'uvim1006.tab:6056', 'uvim1006.tab:6118', 'uvim1006.tab:6180', 'uvim1006.tab:6242', 'uvim1006.tab:6304', 'uvim1006.tab:6366', 'uvim1006.tab:6428', 'uvim1006.tab:6490', 'uvim1006.tab:6552', 'uvim1006.tab:6614', 'uvim1006.tab:6676', 'uvim1006.tab:6738', 'uvim1006.tab:6800', 'uvim1006.tab:6862', 'uvim1006.tab:6924', 'uvim1006.tab:6986', 'uvim1006.tab:7048', 'uvim1006.tab:7110', 'uvim1006.tab:7172', 'uvim1006.tab:7369']" self.setglobal(__file__) self.runpy() class countrateCase8(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5010', 'uvim1006.tab:5011', 'uvim1006.tab:5012', 'uvim1006.tab:5013', 'uvim1006.tab:5014', 'uvim1006.tab:5312', 'uvim1006.tab:5374', 'uvim1006.tab:5436', 'uvim1006.tab:5498', 'uvim1006.tab:5560', 'uvim1006.tab:5622', 'uvim1006.tab:5684', 'uvim1006.tab:5746', 'uvim1006.tab:5808', 'uvim1006.tab:5870', 'uvim1006.tab:5932', 'uvim1006.tab:5994', 'uvim1006.tab:6056', 'uvim1006.tab:6118', 'uvim1006.tab:6180', 'uvim1006.tab:6242', 'uvim1006.tab:6304', 'uvim1006.tab:6366', 'uvim1006.tab:6428', 'uvim1006.tab:6490', 'uvim1006.tab:6552', 'uvim1006.tab:6614', 'uvim1006.tab:6676', 'uvim1006.tab:6738', 'uvim1006.tab:6800', 'uvim1006.tab:6862', 'uvim1006.tab:6924', 'uvim1006.tab:6986', 'uvim1006.tab:7048', 'uvim1006.tab:7110', 'uvim1006.tab:7172', 'uvim1006.tab:7369']" self.setglobal(__file__) self.runpy() class countrateCase9(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5010', 'uvim1006.tab:5012', 'uvim1006.tab:5013', 'uvim1006.tab:5014', 'uvim1006.tab:5312', 'uvim1006.tab:5374', 'uvim1006.tab:5436', 'uvim1006.tab:5498', 'uvim1006.tab:5560', 'uvim1006.tab:5622', 'uvim1006.tab:5684', 'uvim1006.tab:5746', 'uvim1006.tab:5808', 'uvim1006.tab:5870', 'uvim1006.tab:5932', 'uvim1006.tab:5994', 'uvim1006.tab:6056', 'uvim1006.tab:6118', 'uvim1006.tab:6180', 'uvim1006.tab:6242', 'uvim1006.tab:6304', 'uvim1006.tab:6366', 'uvim1006.tab:6428', 'uvim1006.tab:6490', 'uvim1006.tab:6552', 'uvim1006.tab:6614', 'uvim1006.tab:6676', 'uvim1006.tab:6738', 'uvim1006.tab:6800', 'uvim1006.tab:6862', 'uvim1006.tab:6924', 'uvim1006.tab:6986', 'uvim1006.tab:7048']" self.setglobal(__file__) self.runpy() class calcphotCase10(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5010', 'uvim1006.tab:5012', 'uvim1006.tab:5013', 'uvim1006.tab:5014', 'uvim1006.tab:5312', 'uvim1006.tab:5374', 'uvim1006.tab:5436', 'uvim1006.tab:5498', 'uvim1006.tab:5560', 'uvim1006.tab:5622', 'uvim1006.tab:5684', 'uvim1006.tab:5746', 'uvim1006.tab:5808', 'uvim1006.tab:5870', 'uvim1006.tab:5932', 'uvim1006.tab:5994', 'uvim1006.tab:6056', 'uvim1006.tab:6118', 'uvim1006.tab:6180', 'uvim1006.tab:6242', 'uvim1006.tab:6304', 'uvim1006.tab:6366', 'uvim1006.tab:6428', 'uvim1006.tab:6490', 'uvim1006.tab:6552', 'uvim1006.tab:6614', 'uvim1006.tab:6676', 'uvim1006.tab:6738', 'uvim1006.tab:6800', 'uvim1006.tab:6862', 'uvim1006.tab:6924', 'uvim1006.tab:6986', 'uvim1006.tab:7048']" self.setglobal(__file__) self.runpy() class countrateCase10(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5011', 'uvim1006.tab:7110', 'uvim1006.tab:7172']" self.setglobal(__file__) self.runpy() class calcphotCase11(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5011', 'uvim1006.tab:7110', 'uvim1006.tab:7172']" self.setglobal(__file__) self.runpy() class calcphotCase12(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq232n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5015', 'uvim1006.tab:5016', 'uvim1006.tab:5017', 'uvim1006.tab:5018', 'uvim1006.tab:5019', 'uvim1006.tab:5313', 'uvim1006.tab:5375', 'uvim1006.tab:5437', 'uvim1006.tab:5499', 'uvim1006.tab:5561', 'uvim1006.tab:5623', 'uvim1006.tab:5685', 'uvim1006.tab:5747', 'uvim1006.tab:5809', 'uvim1006.tab:5871', 'uvim1006.tab:5933', 'uvim1006.tab:5995', 'uvim1006.tab:6057', 'uvim1006.tab:6119', 'uvim1006.tab:6181', 'uvim1006.tab:6243', 'uvim1006.tab:6305', 'uvim1006.tab:6367', 'uvim1006.tab:6429', 'uvim1006.tab:6491', 'uvim1006.tab:6553', 'uvim1006.tab:6615', 'uvim1006.tab:6677', 'uvim1006.tab:6739', 'uvim1006.tab:6801', 'uvim1006.tab:6863', 'uvim1006.tab:6925', 'uvim1006.tab:6987', 'uvim1006.tab:7049', 'uvim1006.tab:7111', 'uvim1006.tab:7173']" self.setglobal(__file__) self.runpy() class countrateCase11(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq232n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5015', 'uvim1006.tab:5016', 'uvim1006.tab:5017', 'uvim1006.tab:5018', 'uvim1006.tab:5019', 'uvim1006.tab:5313', 'uvim1006.tab:5375', 'uvim1006.tab:5437', 'uvim1006.tab:5499', 'uvim1006.tab:5561', 'uvim1006.tab:5623', 'uvim1006.tab:5685', 'uvim1006.tab:5747', 'uvim1006.tab:5809', 'uvim1006.tab:5871', 'uvim1006.tab:5933', 'uvim1006.tab:5995', 'uvim1006.tab:6057', 'uvim1006.tab:6119', 'uvim1006.tab:6181', 'uvim1006.tab:6243', 'uvim1006.tab:6305', 'uvim1006.tab:6367', 'uvim1006.tab:6429', 'uvim1006.tab:6491', 'uvim1006.tab:6553', 'uvim1006.tab:6615', 'uvim1006.tab:6677', 'uvim1006.tab:6739', 'uvim1006.tab:6801', 'uvim1006.tab:6863', 'uvim1006.tab:6925', 'uvim1006.tab:6987', 'uvim1006.tab:7049', 'uvim1006.tab:7111', 'uvim1006.tab:7173']" self.setglobal(__file__) self.runpy() class countrateCase12(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq232n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5015', 'uvim1006.tab:5017', 'uvim1006.tab:5018', 'uvim1006.tab:5019', 'uvim1006.tab:5313', 'uvim1006.tab:5375', 'uvim1006.tab:5437', 'uvim1006.tab:5499', 'uvim1006.tab:5561', 'uvim1006.tab:5623', 'uvim1006.tab:5685', 'uvim1006.tab:5747', 'uvim1006.tab:5809', 'uvim1006.tab:5871', 'uvim1006.tab:5933', 'uvim1006.tab:5995', 'uvim1006.tab:6057', 'uvim1006.tab:6119', 'uvim1006.tab:6181', 'uvim1006.tab:6243', 'uvim1006.tab:6305', 'uvim1006.tab:6367', 'uvim1006.tab:6429', 'uvim1006.tab:6491', 'uvim1006.tab:6553', 'uvim1006.tab:6615', 'uvim1006.tab:6677', 'uvim1006.tab:6739', 'uvim1006.tab:6801', 'uvim1006.tab:6863', 'uvim1006.tab:6925', 'uvim1006.tab:6987', 'uvim1006.tab:7049']" self.setglobal(__file__) self.runpy() class calcphotCase13(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq232n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5015', 'uvim1006.tab:5017', 'uvim1006.tab:5018', 'uvim1006.tab:5019', 'uvim1006.tab:5313', 'uvim1006.tab:5375', 'uvim1006.tab:5437', 'uvim1006.tab:5499', 'uvim1006.tab:5561', 'uvim1006.tab:5623', 'uvim1006.tab:5685', 'uvim1006.tab:5747', 'uvim1006.tab:5809', 'uvim1006.tab:5871', 'uvim1006.tab:5933', 'uvim1006.tab:5995', 'uvim1006.tab:6057', 'uvim1006.tab:6119', 'uvim1006.tab:6181', 'uvim1006.tab:6243', 'uvim1006.tab:6305', 'uvim1006.tab:6367', 'uvim1006.tab:6429', 'uvim1006.tab:6491', 'uvim1006.tab:6553', 'uvim1006.tab:6615', 'uvim1006.tab:6677', 'uvim1006.tab:6739', 'uvim1006.tab:6801', 'uvim1006.tab:6863', 'uvim1006.tab:6925', 'uvim1006.tab:6987', 'uvim1006.tab:7049']" self.setglobal(__file__) self.runpy() class countrateCase13(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq232n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5016', 'uvim1006.tab:7111', 'uvim1006.tab:7173']" self.setglobal(__file__) self.runpy() class calcphotCase14(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq232n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5016', 'uvim1006.tab:7111', 'uvim1006.tab:7173']" self.setglobal(__file__) self.runpy() class calcphotCase15(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq243n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5020', 'uvim1006.tab:5021', 'uvim1006.tab:5022', 'uvim1006.tab:5023', 'uvim1006.tab:5024', 'uvim1006.tab:5314', 'uvim1006.tab:5376', 'uvim1006.tab:5438', 'uvim1006.tab:5500', 'uvim1006.tab:5562', 'uvim1006.tab:5624', 'uvim1006.tab:5686', 'uvim1006.tab:5748', 'uvim1006.tab:5810', 'uvim1006.tab:5872', 'uvim1006.tab:5934', 'uvim1006.tab:5996', 'uvim1006.tab:6058', 'uvim1006.tab:6120', 'uvim1006.tab:6182', 'uvim1006.tab:6244', 'uvim1006.tab:6306', 'uvim1006.tab:6368', 'uvim1006.tab:6430', 'uvim1006.tab:6492', 'uvim1006.tab:6554', 'uvim1006.tab:6616', 'uvim1006.tab:6678', 'uvim1006.tab:6740', 'uvim1006.tab:6802', 'uvim1006.tab:6864', 'uvim1006.tab:6926', 'uvim1006.tab:6988', 'uvim1006.tab:7050', 'uvim1006.tab:7112', 'uvim1006.tab:7174']" self.setglobal(__file__) self.runpy() class countrateCase14(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq243n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5020', 'uvim1006.tab:5021', 'uvim1006.tab:5022', 'uvim1006.tab:5023', 'uvim1006.tab:5024', 'uvim1006.tab:5314', 'uvim1006.tab:5376', 'uvim1006.tab:5438', 'uvim1006.tab:5500', 'uvim1006.tab:5562', 'uvim1006.tab:5624', 'uvim1006.tab:5686', 'uvim1006.tab:5748', 'uvim1006.tab:5810', 'uvim1006.tab:5872', 'uvim1006.tab:5934', 'uvim1006.tab:5996', 'uvim1006.tab:6058', 'uvim1006.tab:6120', 'uvim1006.tab:6182', 'uvim1006.tab:6244', 'uvim1006.tab:6306', 'uvim1006.tab:6368', 'uvim1006.tab:6430', 'uvim1006.tab:6492', 'uvim1006.tab:6554', 'uvim1006.tab:6616', 'uvim1006.tab:6678', 'uvim1006.tab:6740', 'uvim1006.tab:6802', 'uvim1006.tab:6864', 'uvim1006.tab:6926', 'uvim1006.tab:6988', 'uvim1006.tab:7050', 'uvim1006.tab:7112', 'uvim1006.tab:7174']" self.setglobal(__file__) self.runpy() class countrateCase15(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq243n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5020', 'uvim1006.tab:5022', 'uvim1006.tab:5023', 'uvim1006.tab:5024', 'uvim1006.tab:5314', 'uvim1006.tab:5376', 'uvim1006.tab:5438', 'uvim1006.tab:5500', 'uvim1006.tab:5562', 'uvim1006.tab:5624', 'uvim1006.tab:5686', 'uvim1006.tab:5748', 'uvim1006.tab:5810', 'uvim1006.tab:5872', 'uvim1006.tab:5934', 'uvim1006.tab:5996', 'uvim1006.tab:6058', 'uvim1006.tab:6120', 'uvim1006.tab:6182', 'uvim1006.tab:6244', 'uvim1006.tab:6306', 'uvim1006.tab:6368', 'uvim1006.tab:6430', 'uvim1006.tab:6492', 'uvim1006.tab:6554', 'uvim1006.tab:6616', 'uvim1006.tab:6678', 'uvim1006.tab:6740', 'uvim1006.tab:6802', 'uvim1006.tab:6864', 'uvim1006.tab:6926', 'uvim1006.tab:6988', 'uvim1006.tab:7050']" self.setglobal(__file__) self.runpy() class calcphotCase16(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq243n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5020', 'uvim1006.tab:5022', 'uvim1006.tab:5023', 'uvim1006.tab:5024', 'uvim1006.tab:5314', 'uvim1006.tab:5376', 'uvim1006.tab:5438', 'uvim1006.tab:5500', 'uvim1006.tab:5562', 'uvim1006.tab:5624', 'uvim1006.tab:5686', 'uvim1006.tab:5748', 'uvim1006.tab:5810', 'uvim1006.tab:5872', 'uvim1006.tab:5934', 'uvim1006.tab:5996', 'uvim1006.tab:6058', 'uvim1006.tab:6120', 'uvim1006.tab:6182', 'uvim1006.tab:6244', 'uvim1006.tab:6306', 'uvim1006.tab:6368', 'uvim1006.tab:6430', 'uvim1006.tab:6492', 'uvim1006.tab:6554', 'uvim1006.tab:6616', 'uvim1006.tab:6678', 'uvim1006.tab:6740', 'uvim1006.tab:6802', 'uvim1006.tab:6864', 'uvim1006.tab:6926', 'uvim1006.tab:6988', 'uvim1006.tab:7050']" self.setglobal(__file__) self.runpy() class countrateCase16(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq243n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5021', 'uvim1006.tab:7112', 'uvim1006.tab:7174']" self.setglobal(__file__) self.runpy() class calcphotCase17(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq243n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5021', 'uvim1006.tab:7112', 'uvim1006.tab:7174']" self.setglobal(__file__) self.runpy() class calcphotCase18(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f275w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5025', 'uvim1006.tab:5026', 'uvim1006.tab:5027', 'uvim1006.tab:5028', 'uvim1006.tab:5029', 'uvim1006.tab:5315', 'uvim1006.tab:5377', 'uvim1006.tab:5439', 'uvim1006.tab:5501', 'uvim1006.tab:5563', 'uvim1006.tab:5625', 'uvim1006.tab:5687', 'uvim1006.tab:5749', 'uvim1006.tab:5811', 'uvim1006.tab:5873', 'uvim1006.tab:5935', 'uvim1006.tab:5997', 'uvim1006.tab:6059', 'uvim1006.tab:6121', 'uvim1006.tab:6183', 'uvim1006.tab:6245', 'uvim1006.tab:6307', 'uvim1006.tab:6369', 'uvim1006.tab:6431', 'uvim1006.tab:6493', 'uvim1006.tab:6555', 'uvim1006.tab:6617', 'uvim1006.tab:6679', 'uvim1006.tab:6741', 'uvim1006.tab:6803', 'uvim1006.tab:6865', 'uvim1006.tab:6927', 'uvim1006.tab:6989', 'uvim1006.tab:7051', 'uvim1006.tab:7113', 'uvim1006.tab:7175']" self.setglobal(__file__) self.runpy() class countrateCase17(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f275w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5025', 'uvim1006.tab:5026', 'uvim1006.tab:5027', 'uvim1006.tab:5028', 'uvim1006.tab:5029', 'uvim1006.tab:5315', 'uvim1006.tab:5377', 'uvim1006.tab:5439', 'uvim1006.tab:5501', 'uvim1006.tab:5563', 'uvim1006.tab:5625', 'uvim1006.tab:5687', 'uvim1006.tab:5749', 'uvim1006.tab:5811', 'uvim1006.tab:5873', 'uvim1006.tab:5935', 'uvim1006.tab:5997', 'uvim1006.tab:6059', 'uvim1006.tab:6121', 'uvim1006.tab:6183', 'uvim1006.tab:6245', 'uvim1006.tab:6307', 'uvim1006.tab:6369', 'uvim1006.tab:6431', 'uvim1006.tab:6493', 'uvim1006.tab:6555', 'uvim1006.tab:6617', 'uvim1006.tab:6679', 'uvim1006.tab:6741', 'uvim1006.tab:6803', 'uvim1006.tab:6865', 'uvim1006.tab:6927', 'uvim1006.tab:6989', 'uvim1006.tab:7051', 'uvim1006.tab:7113', 'uvim1006.tab:7175']" self.setglobal(__file__) self.runpy() class countrateCase18(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f275w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5025', 'uvim1006.tab:5027', 'uvim1006.tab:5028', 'uvim1006.tab:5029', 'uvim1006.tab:5315', 'uvim1006.tab:5377', 'uvim1006.tab:5439', 'uvim1006.tab:5501', 'uvim1006.tab:5563', 'uvim1006.tab:5625', 'uvim1006.tab:5687', 'uvim1006.tab:5749', 'uvim1006.tab:5811', 'uvim1006.tab:5873', 'uvim1006.tab:5935', 'uvim1006.tab:5997', 'uvim1006.tab:6059', 'uvim1006.tab:6121', 'uvim1006.tab:6183', 'uvim1006.tab:6245', 'uvim1006.tab:6307', 'uvim1006.tab:6369', 'uvim1006.tab:6431', 'uvim1006.tab:6493', 'uvim1006.tab:6555', 'uvim1006.tab:6617', 'uvim1006.tab:6679', 'uvim1006.tab:6741', 'uvim1006.tab:6803', 'uvim1006.tab:6865', 'uvim1006.tab:6927', 'uvim1006.tab:6989', 'uvim1006.tab:7051']" self.setglobal(__file__) self.runpy() class calcphotCase19(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f275w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5025', 'uvim1006.tab:5027', 'uvim1006.tab:5028', 'uvim1006.tab:5029', 'uvim1006.tab:5315', 'uvim1006.tab:5377', 'uvim1006.tab:5439', 'uvim1006.tab:5501', 'uvim1006.tab:5563', 'uvim1006.tab:5625', 'uvim1006.tab:5687', 'uvim1006.tab:5749', 'uvim1006.tab:5811', 'uvim1006.tab:5873', 'uvim1006.tab:5935', 'uvim1006.tab:5997', 'uvim1006.tab:6059', 'uvim1006.tab:6121', 'uvim1006.tab:6183', 'uvim1006.tab:6245', 'uvim1006.tab:6307', 'uvim1006.tab:6369', 'uvim1006.tab:6431', 'uvim1006.tab:6493', 'uvim1006.tab:6555', 'uvim1006.tab:6617', 'uvim1006.tab:6679', 'uvim1006.tab:6741', 'uvim1006.tab:6803', 'uvim1006.tab:6865', 'uvim1006.tab:6927', 'uvim1006.tab:6989', 'uvim1006.tab:7051']" self.setglobal(__file__) self.runpy() class countrateCase19(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f275w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5026', 'uvim1006.tab:7113', 'uvim1006.tab:7175']" self.setglobal(__file__) self.runpy() class calcphotCase20(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f275w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5026', 'uvim1006.tab:7113', 'uvim1006.tab:7175']" self.setglobal(__file__) self.runpy() class calcphotCase21(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f280n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5030', 'uvim1006.tab:5031', 'uvim1006.tab:5032', 'uvim1006.tab:5033', 'uvim1006.tab:5034', 'uvim1006.tab:5316', 'uvim1006.tab:5378', 'uvim1006.tab:5440', 'uvim1006.tab:5502', 'uvim1006.tab:5564', 'uvim1006.tab:5626', 'uvim1006.tab:5688', 'uvim1006.tab:5750', 'uvim1006.tab:5812', 'uvim1006.tab:5874', 'uvim1006.tab:5936', 'uvim1006.tab:5998', 'uvim1006.tab:6060', 'uvim1006.tab:6122', 'uvim1006.tab:6184', 'uvim1006.tab:6246', 'uvim1006.tab:6308', 'uvim1006.tab:6370', 'uvim1006.tab:6432', 'uvim1006.tab:6494', 'uvim1006.tab:6556', 'uvim1006.tab:6618', 'uvim1006.tab:6680', 'uvim1006.tab:6742', 'uvim1006.tab:6804', 'uvim1006.tab:6866', 'uvim1006.tab:6928', 'uvim1006.tab:6990', 'uvim1006.tab:7052', 'uvim1006.tab:7114', 'uvim1006.tab:7176']" self.setglobal(__file__) self.runpy() class countrateCase20(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f280n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5030', 'uvim1006.tab:5031', 'uvim1006.tab:5032', 'uvim1006.tab:5033', 'uvim1006.tab:5034', 'uvim1006.tab:5316', 'uvim1006.tab:5378', 'uvim1006.tab:5440', 'uvim1006.tab:5502', 'uvim1006.tab:5564', 'uvim1006.tab:5626', 'uvim1006.tab:5688', 'uvim1006.tab:5750', 'uvim1006.tab:5812', 'uvim1006.tab:5874', 'uvim1006.tab:5936', 'uvim1006.tab:5998', 'uvim1006.tab:6060', 'uvim1006.tab:6122', 'uvim1006.tab:6184', 'uvim1006.tab:6246', 'uvim1006.tab:6308', 'uvim1006.tab:6370', 'uvim1006.tab:6432', 'uvim1006.tab:6494', 'uvim1006.tab:6556', 'uvim1006.tab:6618', 'uvim1006.tab:6680', 'uvim1006.tab:6742', 'uvim1006.tab:6804', 'uvim1006.tab:6866', 'uvim1006.tab:6928', 'uvim1006.tab:6990', 'uvim1006.tab:7052', 'uvim1006.tab:7114', 'uvim1006.tab:7176']" self.setglobal(__file__) self.runpy() class countrateCase21(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f280n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5030', 'uvim1006.tab:5032', 'uvim1006.tab:5033', 'uvim1006.tab:5034', 'uvim1006.tab:5316', 'uvim1006.tab:5378', 'uvim1006.tab:5440', 'uvim1006.tab:5502', 'uvim1006.tab:5564', 'uvim1006.tab:5626', 'uvim1006.tab:5688', 'uvim1006.tab:5750', 'uvim1006.tab:5812', 'uvim1006.tab:5874', 'uvim1006.tab:5936', 'uvim1006.tab:5998', 'uvim1006.tab:6060', 'uvim1006.tab:6122', 'uvim1006.tab:6184', 'uvim1006.tab:6246', 'uvim1006.tab:6308', 'uvim1006.tab:6370', 'uvim1006.tab:6432', 'uvim1006.tab:6494', 'uvim1006.tab:6556', 'uvim1006.tab:6618', 'uvim1006.tab:6680', 'uvim1006.tab:6742', 'uvim1006.tab:6804', 'uvim1006.tab:6866', 'uvim1006.tab:6928', 'uvim1006.tab:6990', 'uvim1006.tab:7052']" self.setglobal(__file__) self.runpy() class calcphotCase22(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f280n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5030', 'uvim1006.tab:5032', 'uvim1006.tab:5033', 'uvim1006.tab:5034', 'uvim1006.tab:5316', 'uvim1006.tab:5378', 'uvim1006.tab:5440', 'uvim1006.tab:5502', 'uvim1006.tab:5564', 'uvim1006.tab:5626', 'uvim1006.tab:5688', 'uvim1006.tab:5750', 'uvim1006.tab:5812', 'uvim1006.tab:5874', 'uvim1006.tab:5936', 'uvim1006.tab:5998', 'uvim1006.tab:6060', 'uvim1006.tab:6122', 'uvim1006.tab:6184', 'uvim1006.tab:6246', 'uvim1006.tab:6308', 'uvim1006.tab:6370', 'uvim1006.tab:6432', 'uvim1006.tab:6494', 'uvim1006.tab:6556', 'uvim1006.tab:6618', 'uvim1006.tab:6680', 'uvim1006.tab:6742', 'uvim1006.tab:6804', 'uvim1006.tab:6866', 'uvim1006.tab:6928', 'uvim1006.tab:6990', 'uvim1006.tab:7052']" self.setglobal(__file__) self.runpy() class countrateCase22(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f280n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5031', 'uvim1006.tab:7114', 'uvim1006.tab:7176']" self.setglobal(__file__) self.runpy() class calcphotCase23(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f280n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5031', 'uvim1006.tab:7114', 'uvim1006.tab:7176']" self.setglobal(__file__) self.runpy() class calcphotCase24(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5035', 'uvim1006.tab:5036', 'uvim1006.tab:5037', 'uvim1006.tab:5038', 'uvim1006.tab:5039', 'uvim1006.tab:5317', 'uvim1006.tab:5379', 'uvim1006.tab:5441', 'uvim1006.tab:5503', 'uvim1006.tab:5565', 'uvim1006.tab:5627', 'uvim1006.tab:5689', 'uvim1006.tab:5751', 'uvim1006.tab:5813', 'uvim1006.tab:5875', 'uvim1006.tab:5937', 'uvim1006.tab:5999', 'uvim1006.tab:6061', 'uvim1006.tab:6123', 'uvim1006.tab:6185', 'uvim1006.tab:6247', 'uvim1006.tab:6309', 'uvim1006.tab:6371', 'uvim1006.tab:6433', 'uvim1006.tab:6495', 'uvim1006.tab:6557', 'uvim1006.tab:6619', 'uvim1006.tab:6681', 'uvim1006.tab:6743', 'uvim1006.tab:6805', 'uvim1006.tab:6867', 'uvim1006.tab:6929', 'uvim1006.tab:6991', 'uvim1006.tab:7053', 'uvim1006.tab:7115', 'uvim1006.tab:7177', 'uvim1006.tab:7356']" self.setglobal(__file__) self.runpy() class countrateCase23(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5035', 'uvim1006.tab:5036', 'uvim1006.tab:5037', 'uvim1006.tab:5038', 'uvim1006.tab:5039', 'uvim1006.tab:5317', 'uvim1006.tab:5379', 'uvim1006.tab:5441', 'uvim1006.tab:5503', 'uvim1006.tab:5565', 'uvim1006.tab:5627', 'uvim1006.tab:5689', 'uvim1006.tab:5751', 'uvim1006.tab:5813', 'uvim1006.tab:5875', 'uvim1006.tab:5937', 'uvim1006.tab:5999', 'uvim1006.tab:6061', 'uvim1006.tab:6123', 'uvim1006.tab:6185', 'uvim1006.tab:6247', 'uvim1006.tab:6309', 'uvim1006.tab:6371', 'uvim1006.tab:6433', 'uvim1006.tab:6495', 'uvim1006.tab:6557', 'uvim1006.tab:6619', 'uvim1006.tab:6681', 'uvim1006.tab:6743', 'uvim1006.tab:6805', 'uvim1006.tab:6867', 'uvim1006.tab:6929', 'uvim1006.tab:6991', 'uvim1006.tab:7053', 'uvim1006.tab:7115', 'uvim1006.tab:7177', 'uvim1006.tab:7356']" self.setglobal(__file__) self.runpy() class countrateCase24(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5035', 'uvim1006.tab:5037', 'uvim1006.tab:5038', 'uvim1006.tab:5039', 'uvim1006.tab:5317', 'uvim1006.tab:5379', 'uvim1006.tab:5441', 'uvim1006.tab:5503', 'uvim1006.tab:5565', 'uvim1006.tab:5627', 'uvim1006.tab:5689', 'uvim1006.tab:5751', 'uvim1006.tab:5813', 'uvim1006.tab:5875', 'uvim1006.tab:5937', 'uvim1006.tab:5999', 'uvim1006.tab:6061', 'uvim1006.tab:6123', 'uvim1006.tab:6185', 'uvim1006.tab:6247', 'uvim1006.tab:6309', 'uvim1006.tab:6371', 'uvim1006.tab:6433', 'uvim1006.tab:6495', 'uvim1006.tab:6557', 'uvim1006.tab:6619', 'uvim1006.tab:6681', 'uvim1006.tab:6743', 'uvim1006.tab:6805', 'uvim1006.tab:6867', 'uvim1006.tab:6929', 'uvim1006.tab:6991', 'uvim1006.tab:7053']" self.setglobal(__file__) self.runpy() class calcphotCase25(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5035', 'uvim1006.tab:5037', 'uvim1006.tab:5038', 'uvim1006.tab:5039', 'uvim1006.tab:5317', 'uvim1006.tab:5379', 'uvim1006.tab:5441', 'uvim1006.tab:5503', 'uvim1006.tab:5565', 'uvim1006.tab:5627', 'uvim1006.tab:5689', 'uvim1006.tab:5751', 'uvim1006.tab:5813', 'uvim1006.tab:5875', 'uvim1006.tab:5937', 'uvim1006.tab:5999', 'uvim1006.tab:6061', 'uvim1006.tab:6123', 'uvim1006.tab:6185', 'uvim1006.tab:6247', 'uvim1006.tab:6309', 'uvim1006.tab:6371', 'uvim1006.tab:6433', 'uvim1006.tab:6495', 'uvim1006.tab:6557', 'uvim1006.tab:6619', 'uvim1006.tab:6681', 'uvim1006.tab:6743', 'uvim1006.tab:6805', 'uvim1006.tab:6867', 'uvim1006.tab:6929', 'uvim1006.tab:6991', 'uvim1006.tab:7053']" self.setglobal(__file__) self.runpy() class countrateCase25(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5036', 'uvim1006.tab:7115', 'uvim1006.tab:7177']" self.setglobal(__file__) self.runpy() class calcphotCase26(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5036', 'uvim1006.tab:7115', 'uvim1006.tab:7177']" self.setglobal(__file__) self.runpy() class calcphotCase27(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f336w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5040', 'uvim1006.tab:5041', 'uvim1006.tab:5042', 'uvim1006.tab:5043', 'uvim1006.tab:5044', 'uvim1006.tab:5318', 'uvim1006.tab:5380', 'uvim1006.tab:5442', 'uvim1006.tab:5504', 'uvim1006.tab:5566', 'uvim1006.tab:5628', 'uvim1006.tab:5690', 'uvim1006.tab:5752', 'uvim1006.tab:5814', 'uvim1006.tab:5876', 'uvim1006.tab:5938', 'uvim1006.tab:6000', 'uvim1006.tab:6062', 'uvim1006.tab:6124', 'uvim1006.tab:6186', 'uvim1006.tab:6248', 'uvim1006.tab:6310', 'uvim1006.tab:6372', 'uvim1006.tab:6434', 'uvim1006.tab:6496', 'uvim1006.tab:6558', 'uvim1006.tab:6620', 'uvim1006.tab:6682', 'uvim1006.tab:6744', 'uvim1006.tab:6806', 'uvim1006.tab:6868', 'uvim1006.tab:6930', 'uvim1006.tab:6992', 'uvim1006.tab:7054', 'uvim1006.tab:7116', 'uvim1006.tab:7178']" self.setglobal(__file__) self.runpy() class countrateCase26(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f336w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5040', 'uvim1006.tab:5041', 'uvim1006.tab:5042', 'uvim1006.tab:5043', 'uvim1006.tab:5044', 'uvim1006.tab:5318', 'uvim1006.tab:5380', 'uvim1006.tab:5442', 'uvim1006.tab:5504', 'uvim1006.tab:5566', 'uvim1006.tab:5628', 'uvim1006.tab:5690', 'uvim1006.tab:5752', 'uvim1006.tab:5814', 'uvim1006.tab:5876', 'uvim1006.tab:5938', 'uvim1006.tab:6000', 'uvim1006.tab:6062', 'uvim1006.tab:6124', 'uvim1006.tab:6186', 'uvim1006.tab:6248', 'uvim1006.tab:6310', 'uvim1006.tab:6372', 'uvim1006.tab:6434', 'uvim1006.tab:6496', 'uvim1006.tab:6558', 'uvim1006.tab:6620', 'uvim1006.tab:6682', 'uvim1006.tab:6744', 'uvim1006.tab:6806', 'uvim1006.tab:6868', 'uvim1006.tab:6930', 'uvim1006.tab:6992', 'uvim1006.tab:7054', 'uvim1006.tab:7116', 'uvim1006.tab:7178']" self.setglobal(__file__) self.runpy() class countrateCase27(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f336w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5040', 'uvim1006.tab:5042', 'uvim1006.tab:5043', 'uvim1006.tab:5044', 'uvim1006.tab:5318', 'uvim1006.tab:5380', 'uvim1006.tab:5442', 'uvim1006.tab:5504', 'uvim1006.tab:5566', 'uvim1006.tab:5628', 'uvim1006.tab:5690', 'uvim1006.tab:5752', 'uvim1006.tab:5814', 'uvim1006.tab:5876', 'uvim1006.tab:5938', 'uvim1006.tab:6000', 'uvim1006.tab:6062', 'uvim1006.tab:6124', 'uvim1006.tab:6186', 'uvim1006.tab:6248', 'uvim1006.tab:6310', 'uvim1006.tab:6372', 'uvim1006.tab:6434', 'uvim1006.tab:6496', 'uvim1006.tab:6558', 'uvim1006.tab:6620', 'uvim1006.tab:6682', 'uvim1006.tab:6744', 'uvim1006.tab:6806', 'uvim1006.tab:6868', 'uvim1006.tab:6930', 'uvim1006.tab:6992', 'uvim1006.tab:7054']" self.setglobal(__file__) self.runpy() class calcphotCase28(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f336w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5040', 'uvim1006.tab:5042', 'uvim1006.tab:5043', 'uvim1006.tab:5044', 'uvim1006.tab:5318', 'uvim1006.tab:5380', 'uvim1006.tab:5442', 'uvim1006.tab:5504', 'uvim1006.tab:5566', 'uvim1006.tab:5628', 'uvim1006.tab:5690', 'uvim1006.tab:5752', 'uvim1006.tab:5814', 'uvim1006.tab:5876', 'uvim1006.tab:5938', 'uvim1006.tab:6000', 'uvim1006.tab:6062', 'uvim1006.tab:6124', 'uvim1006.tab:6186', 'uvim1006.tab:6248', 'uvim1006.tab:6310', 'uvim1006.tab:6372', 'uvim1006.tab:6434', 'uvim1006.tab:6496', 'uvim1006.tab:6558', 'uvim1006.tab:6620', 'uvim1006.tab:6682', 'uvim1006.tab:6744', 'uvim1006.tab:6806', 'uvim1006.tab:6868', 'uvim1006.tab:6930', 'uvim1006.tab:6992', 'uvim1006.tab:7054']" self.setglobal(__file__) self.runpy() class countrateCase28(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f336w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5041', 'uvim1006.tab:7116', 'uvim1006.tab:7178']" self.setglobal(__file__) self.runpy() class calcphotCase29(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f336w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5041', 'uvim1006.tab:7116', 'uvim1006.tab:7178']" self.setglobal(__file__) self.runpy() class calcphotCase30(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f343n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5045', 'uvim1006.tab:5046', 'uvim1006.tab:5047', 'uvim1006.tab:5048', 'uvim1006.tab:5049', 'uvim1006.tab:5319', 'uvim1006.tab:5381', 'uvim1006.tab:5443', 'uvim1006.tab:5505', 'uvim1006.tab:5567', 'uvim1006.tab:5629', 'uvim1006.tab:5691', 'uvim1006.tab:5753', 'uvim1006.tab:5815', 'uvim1006.tab:5877', 'uvim1006.tab:5939', 'uvim1006.tab:6001', 'uvim1006.tab:6063', 'uvim1006.tab:6125', 'uvim1006.tab:6187', 'uvim1006.tab:6249', 'uvim1006.tab:6311', 'uvim1006.tab:6373', 'uvim1006.tab:6435', 'uvim1006.tab:6497', 'uvim1006.tab:6559', 'uvim1006.tab:6621', 'uvim1006.tab:6683', 'uvim1006.tab:6745', 'uvim1006.tab:6807', 'uvim1006.tab:6869', 'uvim1006.tab:6931', 'uvim1006.tab:6993', 'uvim1006.tab:7055', 'uvim1006.tab:7117', 'uvim1006.tab:7179']" self.setglobal(__file__) self.runpy() class countrateCase29(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f343n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5045', 'uvim1006.tab:5046', 'uvim1006.tab:5047', 'uvim1006.tab:5048', 'uvim1006.tab:5049', 'uvim1006.tab:5319', 'uvim1006.tab:5381', 'uvim1006.tab:5443', 'uvim1006.tab:5505', 'uvim1006.tab:5567', 'uvim1006.tab:5629', 'uvim1006.tab:5691', 'uvim1006.tab:5753', 'uvim1006.tab:5815', 'uvim1006.tab:5877', 'uvim1006.tab:5939', 'uvim1006.tab:6001', 'uvim1006.tab:6063', 'uvim1006.tab:6125', 'uvim1006.tab:6187', 'uvim1006.tab:6249', 'uvim1006.tab:6311', 'uvim1006.tab:6373', 'uvim1006.tab:6435', 'uvim1006.tab:6497', 'uvim1006.tab:6559', 'uvim1006.tab:6621', 'uvim1006.tab:6683', 'uvim1006.tab:6745', 'uvim1006.tab:6807', 'uvim1006.tab:6869', 'uvim1006.tab:6931', 'uvim1006.tab:6993', 'uvim1006.tab:7055', 'uvim1006.tab:7117', 'uvim1006.tab:7179']" self.setglobal(__file__) self.runpy() class countrateCase30(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f343n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5045', 'uvim1006.tab:5047', 'uvim1006.tab:5048', 'uvim1006.tab:5049', 'uvim1006.tab:5319', 'uvim1006.tab:5381', 'uvim1006.tab:5443', 'uvim1006.tab:5505', 'uvim1006.tab:5567', 'uvim1006.tab:5629', 'uvim1006.tab:5691', 'uvim1006.tab:5753', 'uvim1006.tab:5815', 'uvim1006.tab:5877', 'uvim1006.tab:5939', 'uvim1006.tab:6001', 'uvim1006.tab:6063', 'uvim1006.tab:6125', 'uvim1006.tab:6187', 'uvim1006.tab:6249', 'uvim1006.tab:6311', 'uvim1006.tab:6373', 'uvim1006.tab:6435', 'uvim1006.tab:6497', 'uvim1006.tab:6559', 'uvim1006.tab:6621', 'uvim1006.tab:6683', 'uvim1006.tab:6745', 'uvim1006.tab:6807', 'uvim1006.tab:6869', 'uvim1006.tab:6931', 'uvim1006.tab:6993', 'uvim1006.tab:7055']" self.setglobal(__file__) self.runpy() class calcphotCase31(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f343n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5045', 'uvim1006.tab:5047', 'uvim1006.tab:5048', 'uvim1006.tab:5049', 'uvim1006.tab:5319', 'uvim1006.tab:5381', 'uvim1006.tab:5443', 'uvim1006.tab:5505', 'uvim1006.tab:5567', 'uvim1006.tab:5629', 'uvim1006.tab:5691', 'uvim1006.tab:5753', 'uvim1006.tab:5815', 'uvim1006.tab:5877', 'uvim1006.tab:5939', 'uvim1006.tab:6001', 'uvim1006.tab:6063', 'uvim1006.tab:6125', 'uvim1006.tab:6187', 'uvim1006.tab:6249', 'uvim1006.tab:6311', 'uvim1006.tab:6373', 'uvim1006.tab:6435', 'uvim1006.tab:6497', 'uvim1006.tab:6559', 'uvim1006.tab:6621', 'uvim1006.tab:6683', 'uvim1006.tab:6745', 'uvim1006.tab:6807', 'uvim1006.tab:6869', 'uvim1006.tab:6931', 'uvim1006.tab:6993', 'uvim1006.tab:7055']" self.setglobal(__file__) self.runpy() class countrateCase31(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f343n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5046', 'uvim1006.tab:7117', 'uvim1006.tab:7179']" self.setglobal(__file__) self.runpy() class calcphotCase32(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f343n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5046', 'uvim1006.tab:7117', 'uvim1006.tab:7179']" self.setglobal(__file__) self.runpy() class calcphotCase33(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f350lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5050', 'uvim1006.tab:5051', 'uvim1006.tab:5052', 'uvim1006.tab:5053', 'uvim1006.tab:5054', 'uvim1006.tab:5320', 'uvim1006.tab:5382', 'uvim1006.tab:5444', 'uvim1006.tab:5506', 'uvim1006.tab:5568', 'uvim1006.tab:5630', 'uvim1006.tab:5692', 'uvim1006.tab:5754', 'uvim1006.tab:5816', 'uvim1006.tab:5878', 'uvim1006.tab:5940', 'uvim1006.tab:6002', 'uvim1006.tab:6064', 'uvim1006.tab:6126', 'uvim1006.tab:6188', 'uvim1006.tab:6250', 'uvim1006.tab:6312', 'uvim1006.tab:6374', 'uvim1006.tab:6436', 'uvim1006.tab:6498', 'uvim1006.tab:6560', 'uvim1006.tab:6622', 'uvim1006.tab:6684', 'uvim1006.tab:6746', 'uvim1006.tab:6808', 'uvim1006.tab:6870', 'uvim1006.tab:6932', 'uvim1006.tab:6994', 'uvim1006.tab:7056', 'uvim1006.tab:7118', 'uvim1006.tab:7180']" self.setglobal(__file__) self.runpy() class countrateCase32(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f350lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=True self.etcid="['uvim1006.tab:5050', 'uvim1006.tab:5051', 'uvim1006.tab:5052', 'uvim1006.tab:5053', 'uvim1006.tab:5054', 'uvim1006.tab:5320', 'uvim1006.tab:5382', 'uvim1006.tab:5444', 'uvim1006.tab:5506', 'uvim1006.tab:5568', 'uvim1006.tab:5630', 'uvim1006.tab:5692', 'uvim1006.tab:5754', 'uvim1006.tab:5816', 'uvim1006.tab:5878', 'uvim1006.tab:5940', 'uvim1006.tab:6002', 'uvim1006.tab:6064', 'uvim1006.tab:6126', 'uvim1006.tab:6188', 'uvim1006.tab:6250', 'uvim1006.tab:6312', 'uvim1006.tab:6374', 'uvim1006.tab:6436', 'uvim1006.tab:6498', 'uvim1006.tab:6560', 'uvim1006.tab:6622', 'uvim1006.tab:6684', 'uvim1006.tab:6746', 'uvim1006.tab:6808', 'uvim1006.tab:6870', 'uvim1006.tab:6932', 'uvim1006.tab:6994', 'uvim1006.tab:7056', 'uvim1006.tab:7118', 'uvim1006.tab:7180']" self.setglobal(__file__) self.runpy() class countrateCase33(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f350lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5050', 'uvim1006.tab:5052', 'uvim1006.tab:5053', 'uvim1006.tab:5054', 'uvim1006.tab:5320', 'uvim1006.tab:5382', 'uvim1006.tab:5444', 'uvim1006.tab:5506', 'uvim1006.tab:5568', 'uvim1006.tab:5630', 'uvim1006.tab:5692', 'uvim1006.tab:5754', 'uvim1006.tab:5816', 'uvim1006.tab:5878', 'uvim1006.tab:5940', 'uvim1006.tab:6002', 'uvim1006.tab:6064', 'uvim1006.tab:6126', 'uvim1006.tab:6188', 'uvim1006.tab:6250', 'uvim1006.tab:6312', 'uvim1006.tab:6374', 'uvim1006.tab:6436', 'uvim1006.tab:6498', 'uvim1006.tab:6560', 'uvim1006.tab:6622', 'uvim1006.tab:6684', 'uvim1006.tab:6746', 'uvim1006.tab:6808', 'uvim1006.tab:6870', 'uvim1006.tab:6932', 'uvim1006.tab:6994', 'uvim1006.tab:7056']" self.setglobal(__file__) self.runpy() class calcphotCase34(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f350lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5050', 'uvim1006.tab:5052', 'uvim1006.tab:5053', 'uvim1006.tab:5054', 'uvim1006.tab:5320', 'uvim1006.tab:5382', 'uvim1006.tab:5444', 'uvim1006.tab:5506', 'uvim1006.tab:5568', 'uvim1006.tab:5630', 'uvim1006.tab:5692', 'uvim1006.tab:5754', 'uvim1006.tab:5816', 'uvim1006.tab:5878', 'uvim1006.tab:5940', 'uvim1006.tab:6002', 'uvim1006.tab:6064', 'uvim1006.tab:6126', 'uvim1006.tab:6188', 'uvim1006.tab:6250', 'uvim1006.tab:6312', 'uvim1006.tab:6374', 'uvim1006.tab:6436', 'uvim1006.tab:6498', 'uvim1006.tab:6560', 'uvim1006.tab:6622', 'uvim1006.tab:6684', 'uvim1006.tab:6746', 'uvim1006.tab:6808', 'uvim1006.tab:6870', 'uvim1006.tab:6932', 'uvim1006.tab:6994', 'uvim1006.tab:7056']" self.setglobal(__file__) self.runpy() class countrateCase34(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f350lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5051', 'uvim1006.tab:7118', 'uvim1006.tab:7180']" self.setglobal(__file__) self.runpy() class calcphotCase35(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f350lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5051', 'uvim1006.tab:7118', 'uvim1006.tab:7180']" self.setglobal(__file__) self.runpy() class calcphotCase36(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f373n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5055', 'uvim1006.tab:5056', 'uvim1006.tab:5057', 'uvim1006.tab:5058', 'uvim1006.tab:5059', 'uvim1006.tab:5321', 'uvim1006.tab:5383', 'uvim1006.tab:5445', 'uvim1006.tab:5507', 'uvim1006.tab:5569', 'uvim1006.tab:5631', 'uvim1006.tab:5693', 'uvim1006.tab:5755', 'uvim1006.tab:5817', 'uvim1006.tab:5879', 'uvim1006.tab:5941', 'uvim1006.tab:6003', 'uvim1006.tab:6065', 'uvim1006.tab:6127', 'uvim1006.tab:6189', 'uvim1006.tab:6251', 'uvim1006.tab:6313', 'uvim1006.tab:6375', 'uvim1006.tab:6437', 'uvim1006.tab:6499', 'uvim1006.tab:6561', 'uvim1006.tab:6623', 'uvim1006.tab:6685', 'uvim1006.tab:6747', 'uvim1006.tab:6809', 'uvim1006.tab:6871', 'uvim1006.tab:6933', 'uvim1006.tab:6995', 'uvim1006.tab:7057', 'uvim1006.tab:7119', 'uvim1006.tab:7181']" self.setglobal(__file__) self.runpy() class countrateCase35(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f373n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5055', 'uvim1006.tab:5056', 'uvim1006.tab:5057', 'uvim1006.tab:5058', 'uvim1006.tab:5059', 'uvim1006.tab:5321', 'uvim1006.tab:5383', 'uvim1006.tab:5445', 'uvim1006.tab:5507', 'uvim1006.tab:5569', 'uvim1006.tab:5631', 'uvim1006.tab:5693', 'uvim1006.tab:5755', 'uvim1006.tab:5817', 'uvim1006.tab:5879', 'uvim1006.tab:5941', 'uvim1006.tab:6003', 'uvim1006.tab:6065', 'uvim1006.tab:6127', 'uvim1006.tab:6189', 'uvim1006.tab:6251', 'uvim1006.tab:6313', 'uvim1006.tab:6375', 'uvim1006.tab:6437', 'uvim1006.tab:6499', 'uvim1006.tab:6561', 'uvim1006.tab:6623', 'uvim1006.tab:6685', 'uvim1006.tab:6747', 'uvim1006.tab:6809', 'uvim1006.tab:6871', 'uvim1006.tab:6933', 'uvim1006.tab:6995', 'uvim1006.tab:7057', 'uvim1006.tab:7119', 'uvim1006.tab:7181']" self.setglobal(__file__) self.runpy() class countrateCase36(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f373n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5055', 'uvim1006.tab:5057', 'uvim1006.tab:5058', 'uvim1006.tab:5059', 'uvim1006.tab:5321', 'uvim1006.tab:5383', 'uvim1006.tab:5445', 'uvim1006.tab:5507', 'uvim1006.tab:5569', 'uvim1006.tab:5631', 'uvim1006.tab:5693', 'uvim1006.tab:5755', 'uvim1006.tab:5817', 'uvim1006.tab:5879', 'uvim1006.tab:5941', 'uvim1006.tab:6003', 'uvim1006.tab:6065', 'uvim1006.tab:6127', 'uvim1006.tab:6189', 'uvim1006.tab:6251', 'uvim1006.tab:6313', 'uvim1006.tab:6375', 'uvim1006.tab:6437', 'uvim1006.tab:6499', 'uvim1006.tab:6561', 'uvim1006.tab:6623', 'uvim1006.tab:6685', 'uvim1006.tab:6747', 'uvim1006.tab:6809', 'uvim1006.tab:6871', 'uvim1006.tab:6933', 'uvim1006.tab:6995', 'uvim1006.tab:7057']" self.setglobal(__file__) self.runpy() class calcphotCase37(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f373n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5055', 'uvim1006.tab:5057', 'uvim1006.tab:5058', 'uvim1006.tab:5059', 'uvim1006.tab:5321', 'uvim1006.tab:5383', 'uvim1006.tab:5445', 'uvim1006.tab:5507', 'uvim1006.tab:5569', 'uvim1006.tab:5631', 'uvim1006.tab:5693', 'uvim1006.tab:5755', 'uvim1006.tab:5817', 'uvim1006.tab:5879', 'uvim1006.tab:5941', 'uvim1006.tab:6003', 'uvim1006.tab:6065', 'uvim1006.tab:6127', 'uvim1006.tab:6189', 'uvim1006.tab:6251', 'uvim1006.tab:6313', 'uvim1006.tab:6375', 'uvim1006.tab:6437', 'uvim1006.tab:6499', 'uvim1006.tab:6561', 'uvim1006.tab:6623', 'uvim1006.tab:6685', 'uvim1006.tab:6747', 'uvim1006.tab:6809', 'uvim1006.tab:6871', 'uvim1006.tab:6933', 'uvim1006.tab:6995', 'uvim1006.tab:7057']" self.setglobal(__file__) self.runpy() class countrateCase37(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f373n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5056', 'uvim1006.tab:7119', 'uvim1006.tab:7181']" self.setglobal(__file__) self.runpy() class calcphotCase38(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f373n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5056', 'uvim1006.tab:7119', 'uvim1006.tab:7181']" self.setglobal(__file__) self.runpy() class calcphotCase39(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq378n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5060', 'uvim1006.tab:5061', 'uvim1006.tab:5062', 'uvim1006.tab:5063', 'uvim1006.tab:5064', 'uvim1006.tab:5322', 'uvim1006.tab:5384', 'uvim1006.tab:5446', 'uvim1006.tab:5508', 'uvim1006.tab:5570', 'uvim1006.tab:5632', 'uvim1006.tab:5694', 'uvim1006.tab:5756', 'uvim1006.tab:5818', 'uvim1006.tab:5880', 'uvim1006.tab:5942', 'uvim1006.tab:6004', 'uvim1006.tab:6066', 'uvim1006.tab:6128', 'uvim1006.tab:6190', 'uvim1006.tab:6252', 'uvim1006.tab:6314', 'uvim1006.tab:6376', 'uvim1006.tab:6438', 'uvim1006.tab:6500', 'uvim1006.tab:6562', 'uvim1006.tab:6624', 'uvim1006.tab:6686', 'uvim1006.tab:6748', 'uvim1006.tab:6810', 'uvim1006.tab:6872', 'uvim1006.tab:6934', 'uvim1006.tab:6996', 'uvim1006.tab:7058', 'uvim1006.tab:7120', 'uvim1006.tab:7182']" self.setglobal(__file__) self.runpy() class countrateCase38(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq378n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5060', 'uvim1006.tab:5061', 'uvim1006.tab:5062', 'uvim1006.tab:5063', 'uvim1006.tab:5064', 'uvim1006.tab:5322', 'uvim1006.tab:5384', 'uvim1006.tab:5446', 'uvim1006.tab:5508', 'uvim1006.tab:5570', 'uvim1006.tab:5632', 'uvim1006.tab:5694', 'uvim1006.tab:5756', 'uvim1006.tab:5818', 'uvim1006.tab:5880', 'uvim1006.tab:5942', 'uvim1006.tab:6004', 'uvim1006.tab:6066', 'uvim1006.tab:6128', 'uvim1006.tab:6190', 'uvim1006.tab:6252', 'uvim1006.tab:6314', 'uvim1006.tab:6376', 'uvim1006.tab:6438', 'uvim1006.tab:6500', 'uvim1006.tab:6562', 'uvim1006.tab:6624', 'uvim1006.tab:6686', 'uvim1006.tab:6748', 'uvim1006.tab:6810', 'uvim1006.tab:6872', 'uvim1006.tab:6934', 'uvim1006.tab:6996', 'uvim1006.tab:7058', 'uvim1006.tab:7120', 'uvim1006.tab:7182']" self.setglobal(__file__) self.runpy() class countrateCase39(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq378n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5060', 'uvim1006.tab:5062', 'uvim1006.tab:5063', 'uvim1006.tab:5064', 'uvim1006.tab:5322', 'uvim1006.tab:5384', 'uvim1006.tab:5446', 'uvim1006.tab:5508', 'uvim1006.tab:5570', 'uvim1006.tab:5632', 'uvim1006.tab:5694', 'uvim1006.tab:5756', 'uvim1006.tab:5818', 'uvim1006.tab:5880', 'uvim1006.tab:5942', 'uvim1006.tab:6004', 'uvim1006.tab:6066', 'uvim1006.tab:6128', 'uvim1006.tab:6190', 'uvim1006.tab:6252', 'uvim1006.tab:6314', 'uvim1006.tab:6376', 'uvim1006.tab:6438', 'uvim1006.tab:6500', 'uvim1006.tab:6562', 'uvim1006.tab:6624', 'uvim1006.tab:6686', 'uvim1006.tab:6748', 'uvim1006.tab:6810', 'uvim1006.tab:6872', 'uvim1006.tab:6934', 'uvim1006.tab:6996', 'uvim1006.tab:7058']" self.setglobal(__file__) self.runpy() class calcphotCase40(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq378n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5060', 'uvim1006.tab:5062', 'uvim1006.tab:5063', 'uvim1006.tab:5064', 'uvim1006.tab:5322', 'uvim1006.tab:5384', 'uvim1006.tab:5446', 'uvim1006.tab:5508', 'uvim1006.tab:5570', 'uvim1006.tab:5632', 'uvim1006.tab:5694', 'uvim1006.tab:5756', 'uvim1006.tab:5818', 'uvim1006.tab:5880', 'uvim1006.tab:5942', 'uvim1006.tab:6004', 'uvim1006.tab:6066', 'uvim1006.tab:6128', 'uvim1006.tab:6190', 'uvim1006.tab:6252', 'uvim1006.tab:6314', 'uvim1006.tab:6376', 'uvim1006.tab:6438', 'uvim1006.tab:6500', 'uvim1006.tab:6562', 'uvim1006.tab:6624', 'uvim1006.tab:6686', 'uvim1006.tab:6748', 'uvim1006.tab:6810', 'uvim1006.tab:6872', 'uvim1006.tab:6934', 'uvim1006.tab:6996', 'uvim1006.tab:7058']" self.setglobal(__file__) self.runpy() class countrateCase40(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq378n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5061', 'uvim1006.tab:7120', 'uvim1006.tab:7182']" self.setglobal(__file__) self.runpy() class calcphotCase41(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq378n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5061', 'uvim1006.tab:7120', 'uvim1006.tab:7182']" self.setglobal(__file__) self.runpy() class calcphotCase42(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq387n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5065', 'uvim1006.tab:5066', 'uvim1006.tab:5067', 'uvim1006.tab:5068', 'uvim1006.tab:5069', 'uvim1006.tab:5323', 'uvim1006.tab:5385', 'uvim1006.tab:5447', 'uvim1006.tab:5509', 'uvim1006.tab:5571', 'uvim1006.tab:5633', 'uvim1006.tab:5695', 'uvim1006.tab:5757', 'uvim1006.tab:5819', 'uvim1006.tab:5881', 'uvim1006.tab:5943', 'uvim1006.tab:6005', 'uvim1006.tab:6067', 'uvim1006.tab:6129', 'uvim1006.tab:6191', 'uvim1006.tab:6253', 'uvim1006.tab:6315', 'uvim1006.tab:6377', 'uvim1006.tab:6439', 'uvim1006.tab:6501', 'uvim1006.tab:6563', 'uvim1006.tab:6625', 'uvim1006.tab:6687', 'uvim1006.tab:6749', 'uvim1006.tab:6811', 'uvim1006.tab:6873', 'uvim1006.tab:6935', 'uvim1006.tab:6997', 'uvim1006.tab:7059', 'uvim1006.tab:7121', 'uvim1006.tab:7183']" self.setglobal(__file__) self.runpy() class countrateCase41(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq387n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5065', 'uvim1006.tab:5066', 'uvim1006.tab:5067', 'uvim1006.tab:5068', 'uvim1006.tab:5069', 'uvim1006.tab:5323', 'uvim1006.tab:5385', 'uvim1006.tab:5447', 'uvim1006.tab:5509', 'uvim1006.tab:5571', 'uvim1006.tab:5633', 'uvim1006.tab:5695', 'uvim1006.tab:5757', 'uvim1006.tab:5819', 'uvim1006.tab:5881', 'uvim1006.tab:5943', 'uvim1006.tab:6005', 'uvim1006.tab:6067', 'uvim1006.tab:6129', 'uvim1006.tab:6191', 'uvim1006.tab:6253', 'uvim1006.tab:6315', 'uvim1006.tab:6377', 'uvim1006.tab:6439', 'uvim1006.tab:6501', 'uvim1006.tab:6563', 'uvim1006.tab:6625', 'uvim1006.tab:6687', 'uvim1006.tab:6749', 'uvim1006.tab:6811', 'uvim1006.tab:6873', 'uvim1006.tab:6935', 'uvim1006.tab:6997', 'uvim1006.tab:7059', 'uvim1006.tab:7121', 'uvim1006.tab:7183']" self.setglobal(__file__) self.runpy() class countrateCase42(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq387n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5065', 'uvim1006.tab:5067', 'uvim1006.tab:5068', 'uvim1006.tab:5069', 'uvim1006.tab:5323', 'uvim1006.tab:5385', 'uvim1006.tab:5447', 'uvim1006.tab:5509', 'uvim1006.tab:5571', 'uvim1006.tab:5633', 'uvim1006.tab:5695', 'uvim1006.tab:5757', 'uvim1006.tab:5819', 'uvim1006.tab:5881', 'uvim1006.tab:5943', 'uvim1006.tab:6005', 'uvim1006.tab:6067', 'uvim1006.tab:6129', 'uvim1006.tab:6191', 'uvim1006.tab:6253', 'uvim1006.tab:6315', 'uvim1006.tab:6377', 'uvim1006.tab:6439', 'uvim1006.tab:6501', 'uvim1006.tab:6563', 'uvim1006.tab:6625', 'uvim1006.tab:6687', 'uvim1006.tab:6749', 'uvim1006.tab:6811', 'uvim1006.tab:6873', 'uvim1006.tab:6935', 'uvim1006.tab:6997', 'uvim1006.tab:7059']" self.setglobal(__file__) self.runpy() class calcphotCase43(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq387n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5065', 'uvim1006.tab:5067', 'uvim1006.tab:5068', 'uvim1006.tab:5069', 'uvim1006.tab:5323', 'uvim1006.tab:5385', 'uvim1006.tab:5447', 'uvim1006.tab:5509', 'uvim1006.tab:5571', 'uvim1006.tab:5633', 'uvim1006.tab:5695', 'uvim1006.tab:5757', 'uvim1006.tab:5819', 'uvim1006.tab:5881', 'uvim1006.tab:5943', 'uvim1006.tab:6005', 'uvim1006.tab:6067', 'uvim1006.tab:6129', 'uvim1006.tab:6191', 'uvim1006.tab:6253', 'uvim1006.tab:6315', 'uvim1006.tab:6377', 'uvim1006.tab:6439', 'uvim1006.tab:6501', 'uvim1006.tab:6563', 'uvim1006.tab:6625', 'uvim1006.tab:6687', 'uvim1006.tab:6749', 'uvim1006.tab:6811', 'uvim1006.tab:6873', 'uvim1006.tab:6935', 'uvim1006.tab:6997', 'uvim1006.tab:7059']" self.setglobal(__file__) self.runpy() class countrateCase43(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq387n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5066', 'uvim1006.tab:7121', 'uvim1006.tab:7183']" self.setglobal(__file__) self.runpy() class calcphotCase44(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq387n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5066', 'uvim1006.tab:7121', 'uvim1006.tab:7183']" self.setglobal(__file__) self.runpy() class calcphotCase45(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f390m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5070', 'uvim1006.tab:5071', 'uvim1006.tab:5072', 'uvim1006.tab:5073', 'uvim1006.tab:5074', 'uvim1006.tab:5324', 'uvim1006.tab:5386', 'uvim1006.tab:5448', 'uvim1006.tab:5510', 'uvim1006.tab:5572', 'uvim1006.tab:5634', 'uvim1006.tab:5696', 'uvim1006.tab:5758', 'uvim1006.tab:5820', 'uvim1006.tab:5882', 'uvim1006.tab:5944', 'uvim1006.tab:6006', 'uvim1006.tab:6068', 'uvim1006.tab:6130', 'uvim1006.tab:6192', 'uvim1006.tab:6254', 'uvim1006.tab:6316', 'uvim1006.tab:6378', 'uvim1006.tab:6440', 'uvim1006.tab:6502', 'uvim1006.tab:6564', 'uvim1006.tab:6626', 'uvim1006.tab:6688', 'uvim1006.tab:6750', 'uvim1006.tab:6812', 'uvim1006.tab:6874', 'uvim1006.tab:6936', 'uvim1006.tab:6998', 'uvim1006.tab:7060', 'uvim1006.tab:7122', 'uvim1006.tab:7184']" self.setglobal(__file__) self.runpy() class countrateCase44(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f390m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5070', 'uvim1006.tab:5071', 'uvim1006.tab:5072', 'uvim1006.tab:5073', 'uvim1006.tab:5074', 'uvim1006.tab:5324', 'uvim1006.tab:5386', 'uvim1006.tab:5448', 'uvim1006.tab:5510', 'uvim1006.tab:5572', 'uvim1006.tab:5634', 'uvim1006.tab:5696', 'uvim1006.tab:5758', 'uvim1006.tab:5820', 'uvim1006.tab:5882', 'uvim1006.tab:5944', 'uvim1006.tab:6006', 'uvim1006.tab:6068', 'uvim1006.tab:6130', 'uvim1006.tab:6192', 'uvim1006.tab:6254', 'uvim1006.tab:6316', 'uvim1006.tab:6378', 'uvim1006.tab:6440', 'uvim1006.tab:6502', 'uvim1006.tab:6564', 'uvim1006.tab:6626', 'uvim1006.tab:6688', 'uvim1006.tab:6750', 'uvim1006.tab:6812', 'uvim1006.tab:6874', 'uvim1006.tab:6936', 'uvim1006.tab:6998', 'uvim1006.tab:7060', 'uvim1006.tab:7122', 'uvim1006.tab:7184']" self.setglobal(__file__) self.runpy() class countrateCase45(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f390m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5070', 'uvim1006.tab:5072', 'uvim1006.tab:5073', 'uvim1006.tab:5074', 'uvim1006.tab:5324', 'uvim1006.tab:5386', 'uvim1006.tab:5448', 'uvim1006.tab:5510', 'uvim1006.tab:5572', 'uvim1006.tab:5634', 'uvim1006.tab:5696', 'uvim1006.tab:5758', 'uvim1006.tab:5820', 'uvim1006.tab:5882', 'uvim1006.tab:5944', 'uvim1006.tab:6006', 'uvim1006.tab:6068', 'uvim1006.tab:6130', 'uvim1006.tab:6192', 'uvim1006.tab:6254', 'uvim1006.tab:6316', 'uvim1006.tab:6378', 'uvim1006.tab:6440', 'uvim1006.tab:6502', 'uvim1006.tab:6564', 'uvim1006.tab:6626', 'uvim1006.tab:6688', 'uvim1006.tab:6750', 'uvim1006.tab:6812', 'uvim1006.tab:6874', 'uvim1006.tab:6936', 'uvim1006.tab:6998', 'uvim1006.tab:7060']" self.setglobal(__file__) self.runpy() class calcphotCase46(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f390m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5070', 'uvim1006.tab:5072', 'uvim1006.tab:5073', 'uvim1006.tab:5074', 'uvim1006.tab:5324', 'uvim1006.tab:5386', 'uvim1006.tab:5448', 'uvim1006.tab:5510', 'uvim1006.tab:5572', 'uvim1006.tab:5634', 'uvim1006.tab:5696', 'uvim1006.tab:5758', 'uvim1006.tab:5820', 'uvim1006.tab:5882', 'uvim1006.tab:5944', 'uvim1006.tab:6006', 'uvim1006.tab:6068', 'uvim1006.tab:6130', 'uvim1006.tab:6192', 'uvim1006.tab:6254', 'uvim1006.tab:6316', 'uvim1006.tab:6378', 'uvim1006.tab:6440', 'uvim1006.tab:6502', 'uvim1006.tab:6564', 'uvim1006.tab:6626', 'uvim1006.tab:6688', 'uvim1006.tab:6750', 'uvim1006.tab:6812', 'uvim1006.tab:6874', 'uvim1006.tab:6936', 'uvim1006.tab:6998', 'uvim1006.tab:7060']" self.setglobal(__file__) self.runpy() class countrateCase46(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f390m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5071', 'uvim1006.tab:7122', 'uvim1006.tab:7184']" self.setglobal(__file__) self.runpy() class calcphotCase47(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f390m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5071', 'uvim1006.tab:7122', 'uvim1006.tab:7184']" self.setglobal(__file__) self.runpy() class calcphotCase48(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f390w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5075', 'uvim1006.tab:5076', 'uvim1006.tab:5077', 'uvim1006.tab:5078', 'uvim1006.tab:5079', 'uvim1006.tab:5325', 'uvim1006.tab:5387', 'uvim1006.tab:5449', 'uvim1006.tab:5511', 'uvim1006.tab:5573', 'uvim1006.tab:5635', 'uvim1006.tab:5697', 'uvim1006.tab:5759', 'uvim1006.tab:5821', 'uvim1006.tab:5883', 'uvim1006.tab:5945', 'uvim1006.tab:6007', 'uvim1006.tab:6069', 'uvim1006.tab:6131', 'uvim1006.tab:6193', 'uvim1006.tab:6255', 'uvim1006.tab:6317', 'uvim1006.tab:6379', 'uvim1006.tab:6441', 'uvim1006.tab:6503', 'uvim1006.tab:6565', 'uvim1006.tab:6627', 'uvim1006.tab:6689', 'uvim1006.tab:6751', 'uvim1006.tab:6813', 'uvim1006.tab:6875', 'uvim1006.tab:6937', 'uvim1006.tab:6999', 'uvim1006.tab:7061', 'uvim1006.tab:7123', 'uvim1006.tab:7185']" self.setglobal(__file__) self.runpy() class countrateCase47(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f390w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5075', 'uvim1006.tab:5076', 'uvim1006.tab:5077', 'uvim1006.tab:5078', 'uvim1006.tab:5079', 'uvim1006.tab:5325', 'uvim1006.tab:5387', 'uvim1006.tab:5449', 'uvim1006.tab:5511', 'uvim1006.tab:5573', 'uvim1006.tab:5635', 'uvim1006.tab:5697', 'uvim1006.tab:5759', 'uvim1006.tab:5821', 'uvim1006.tab:5883', 'uvim1006.tab:5945', 'uvim1006.tab:6007', 'uvim1006.tab:6069', 'uvim1006.tab:6131', 'uvim1006.tab:6193', 'uvim1006.tab:6255', 'uvim1006.tab:6317', 'uvim1006.tab:6379', 'uvim1006.tab:6441', 'uvim1006.tab:6503', 'uvim1006.tab:6565', 'uvim1006.tab:6627', 'uvim1006.tab:6689', 'uvim1006.tab:6751', 'uvim1006.tab:6813', 'uvim1006.tab:6875', 'uvim1006.tab:6937', 'uvim1006.tab:6999', 'uvim1006.tab:7061', 'uvim1006.tab:7123', 'uvim1006.tab:7185']" self.setglobal(__file__) self.runpy() class countrateCase48(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f390w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5075', 'uvim1006.tab:5077', 'uvim1006.tab:5078', 'uvim1006.tab:5079', 'uvim1006.tab:5325', 'uvim1006.tab:5387', 'uvim1006.tab:5449', 'uvim1006.tab:5511', 'uvim1006.tab:5573', 'uvim1006.tab:5635', 'uvim1006.tab:5697', 'uvim1006.tab:5759', 'uvim1006.tab:5821', 'uvim1006.tab:5883', 'uvim1006.tab:5945', 'uvim1006.tab:6007', 'uvim1006.tab:6069', 'uvim1006.tab:6131', 'uvim1006.tab:6193', 'uvim1006.tab:6255', 'uvim1006.tab:6317', 'uvim1006.tab:6379', 'uvim1006.tab:6441', 'uvim1006.tab:6503', 'uvim1006.tab:6565', 'uvim1006.tab:6627', 'uvim1006.tab:6689', 'uvim1006.tab:6751', 'uvim1006.tab:6813', 'uvim1006.tab:6875', 'uvim1006.tab:6937', 'uvim1006.tab:6999', 'uvim1006.tab:7061']" self.setglobal(__file__) self.runpy() class calcphotCase49(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f390w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5075', 'uvim1006.tab:5077', 'uvim1006.tab:5078', 'uvim1006.tab:5079', 'uvim1006.tab:5325', 'uvim1006.tab:5387', 'uvim1006.tab:5449', 'uvim1006.tab:5511', 'uvim1006.tab:5573', 'uvim1006.tab:5635', 'uvim1006.tab:5697', 'uvim1006.tab:5759', 'uvim1006.tab:5821', 'uvim1006.tab:5883', 'uvim1006.tab:5945', 'uvim1006.tab:6007', 'uvim1006.tab:6069', 'uvim1006.tab:6131', 'uvim1006.tab:6193', 'uvim1006.tab:6255', 'uvim1006.tab:6317', 'uvim1006.tab:6379', 'uvim1006.tab:6441', 'uvim1006.tab:6503', 'uvim1006.tab:6565', 'uvim1006.tab:6627', 'uvim1006.tab:6689', 'uvim1006.tab:6751', 'uvim1006.tab:6813', 'uvim1006.tab:6875', 'uvim1006.tab:6937', 'uvim1006.tab:6999', 'uvim1006.tab:7061']" self.setglobal(__file__) self.runpy() class countrateCase49(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f390w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5076', 'uvim1006.tab:7123', 'uvim1006.tab:7185']" self.setglobal(__file__) self.runpy() class calcphotCase50(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f390w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5076', 'uvim1006.tab:7123', 'uvim1006.tab:7185']" self.setglobal(__file__) self.runpy() class calcphotCase51(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f395n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5080', 'uvim1006.tab:5081', 'uvim1006.tab:5082', 'uvim1006.tab:5083', 'uvim1006.tab:5084', 'uvim1006.tab:5326', 'uvim1006.tab:5388', 'uvim1006.tab:5450', 'uvim1006.tab:5512', 'uvim1006.tab:5574', 'uvim1006.tab:5636', 'uvim1006.tab:5698', 'uvim1006.tab:5760', 'uvim1006.tab:5822', 'uvim1006.tab:5884', 'uvim1006.tab:5946', 'uvim1006.tab:6008', 'uvim1006.tab:6070', 'uvim1006.tab:6132', 'uvim1006.tab:6194', 'uvim1006.tab:6256', 'uvim1006.tab:6318', 'uvim1006.tab:6380', 'uvim1006.tab:6442', 'uvim1006.tab:6504', 'uvim1006.tab:6566', 'uvim1006.tab:6628', 'uvim1006.tab:6690', 'uvim1006.tab:6752', 'uvim1006.tab:6814', 'uvim1006.tab:6876', 'uvim1006.tab:6938', 'uvim1006.tab:7000', 'uvim1006.tab:7062', 'uvim1006.tab:7124', 'uvim1006.tab:7186']" self.setglobal(__file__) self.runpy() class countrateCase50(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f395n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5080', 'uvim1006.tab:5081', 'uvim1006.tab:5082', 'uvim1006.tab:5083', 'uvim1006.tab:5084', 'uvim1006.tab:5326', 'uvim1006.tab:5388', 'uvim1006.tab:5450', 'uvim1006.tab:5512', 'uvim1006.tab:5574', 'uvim1006.tab:5636', 'uvim1006.tab:5698', 'uvim1006.tab:5760', 'uvim1006.tab:5822', 'uvim1006.tab:5884', 'uvim1006.tab:5946', 'uvim1006.tab:6008', 'uvim1006.tab:6070', 'uvim1006.tab:6132', 'uvim1006.tab:6194', 'uvim1006.tab:6256', 'uvim1006.tab:6318', 'uvim1006.tab:6380', 'uvim1006.tab:6442', 'uvim1006.tab:6504', 'uvim1006.tab:6566', 'uvim1006.tab:6628', 'uvim1006.tab:6690', 'uvim1006.tab:6752', 'uvim1006.tab:6814', 'uvim1006.tab:6876', 'uvim1006.tab:6938', 'uvim1006.tab:7000', 'uvim1006.tab:7062', 'uvim1006.tab:7124', 'uvim1006.tab:7186']" self.setglobal(__file__) self.runpy() class countrateCase51(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f395n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5080', 'uvim1006.tab:5082', 'uvim1006.tab:5083', 'uvim1006.tab:5084', 'uvim1006.tab:5326', 'uvim1006.tab:5388', 'uvim1006.tab:5450', 'uvim1006.tab:5512', 'uvim1006.tab:5574', 'uvim1006.tab:5636', 'uvim1006.tab:5698', 'uvim1006.tab:5760', 'uvim1006.tab:5822', 'uvim1006.tab:5884', 'uvim1006.tab:5946', 'uvim1006.tab:6008', 'uvim1006.tab:6070', 'uvim1006.tab:6132', 'uvim1006.tab:6194', 'uvim1006.tab:6256', 'uvim1006.tab:6318', 'uvim1006.tab:6380', 'uvim1006.tab:6442', 'uvim1006.tab:6504', 'uvim1006.tab:6566', 'uvim1006.tab:6628', 'uvim1006.tab:6690', 'uvim1006.tab:6752', 'uvim1006.tab:6814', 'uvim1006.tab:6876', 'uvim1006.tab:6938', 'uvim1006.tab:7000', 'uvim1006.tab:7062']" self.setglobal(__file__) self.runpy() class calcphotCase52(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f395n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5080', 'uvim1006.tab:5082', 'uvim1006.tab:5083', 'uvim1006.tab:5084', 'uvim1006.tab:5326', 'uvim1006.tab:5388', 'uvim1006.tab:5450', 'uvim1006.tab:5512', 'uvim1006.tab:5574', 'uvim1006.tab:5636', 'uvim1006.tab:5698', 'uvim1006.tab:5760', 'uvim1006.tab:5822', 'uvim1006.tab:5884', 'uvim1006.tab:5946', 'uvim1006.tab:6008', 'uvim1006.tab:6070', 'uvim1006.tab:6132', 'uvim1006.tab:6194', 'uvim1006.tab:6256', 'uvim1006.tab:6318', 'uvim1006.tab:6380', 'uvim1006.tab:6442', 'uvim1006.tab:6504', 'uvim1006.tab:6566', 'uvim1006.tab:6628', 'uvim1006.tab:6690', 'uvim1006.tab:6752', 'uvim1006.tab:6814', 'uvim1006.tab:6876', 'uvim1006.tab:6938', 'uvim1006.tab:7000', 'uvim1006.tab:7062']" self.setglobal(__file__) self.runpy() class countrateCase52(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f395n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5081', 'uvim1006.tab:7124', 'uvim1006.tab:7186']" self.setglobal(__file__) self.runpy() class calcphotCase53(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f395n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5081', 'uvim1006.tab:7124', 'uvim1006.tab:7186']" self.setglobal(__file__) self.runpy() class calcphotCase54(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f410m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5085', 'uvim1006.tab:5086', 'uvim1006.tab:5087', 'uvim1006.tab:5088', 'uvim1006.tab:5089', 'uvim1006.tab:5327', 'uvim1006.tab:5389', 'uvim1006.tab:5451', 'uvim1006.tab:5513', 'uvim1006.tab:5575', 'uvim1006.tab:5637', 'uvim1006.tab:5699', 'uvim1006.tab:5761', 'uvim1006.tab:5823', 'uvim1006.tab:5885', 'uvim1006.tab:5947', 'uvim1006.tab:6009', 'uvim1006.tab:6071', 'uvim1006.tab:6133', 'uvim1006.tab:6195', 'uvim1006.tab:6257', 'uvim1006.tab:6319', 'uvim1006.tab:6381', 'uvim1006.tab:6443', 'uvim1006.tab:6505', 'uvim1006.tab:6567', 'uvim1006.tab:6629', 'uvim1006.tab:6691', 'uvim1006.tab:6753', 'uvim1006.tab:6815', 'uvim1006.tab:6877', 'uvim1006.tab:6939', 'uvim1006.tab:7001', 'uvim1006.tab:7063', 'uvim1006.tab:7125', 'uvim1006.tab:7187']" self.setglobal(__file__) self.runpy() class countrateCase53(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f410m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5085', 'uvim1006.tab:5086', 'uvim1006.tab:5087', 'uvim1006.tab:5088', 'uvim1006.tab:5089', 'uvim1006.tab:5327', 'uvim1006.tab:5389', 'uvim1006.tab:5451', 'uvim1006.tab:5513', 'uvim1006.tab:5575', 'uvim1006.tab:5637', 'uvim1006.tab:5699', 'uvim1006.tab:5761', 'uvim1006.tab:5823', 'uvim1006.tab:5885', 'uvim1006.tab:5947', 'uvim1006.tab:6009', 'uvim1006.tab:6071', 'uvim1006.tab:6133', 'uvim1006.tab:6195', 'uvim1006.tab:6257', 'uvim1006.tab:6319', 'uvim1006.tab:6381', 'uvim1006.tab:6443', 'uvim1006.tab:6505', 'uvim1006.tab:6567', 'uvim1006.tab:6629', 'uvim1006.tab:6691', 'uvim1006.tab:6753', 'uvim1006.tab:6815', 'uvim1006.tab:6877', 'uvim1006.tab:6939', 'uvim1006.tab:7001', 'uvim1006.tab:7063', 'uvim1006.tab:7125', 'uvim1006.tab:7187']" self.setglobal(__file__) self.runpy() class countrateCase54(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f410m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5085', 'uvim1006.tab:5087', 'uvim1006.tab:5088', 'uvim1006.tab:5089', 'uvim1006.tab:5327', 'uvim1006.tab:5389', 'uvim1006.tab:5451', 'uvim1006.tab:5513', 'uvim1006.tab:5575', 'uvim1006.tab:5637', 'uvim1006.tab:5699', 'uvim1006.tab:5761', 'uvim1006.tab:5823', 'uvim1006.tab:5885', 'uvim1006.tab:5947', 'uvim1006.tab:6009', 'uvim1006.tab:6071', 'uvim1006.tab:6133', 'uvim1006.tab:6195', 'uvim1006.tab:6257', 'uvim1006.tab:6319', 'uvim1006.tab:6381', 'uvim1006.tab:6443', 'uvim1006.tab:6505', 'uvim1006.tab:6567', 'uvim1006.tab:6629', 'uvim1006.tab:6691', 'uvim1006.tab:6753', 'uvim1006.tab:6815', 'uvim1006.tab:6877', 'uvim1006.tab:6939', 'uvim1006.tab:7001', 'uvim1006.tab:7063']" self.setglobal(__file__) self.runpy() class calcphotCase55(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f410m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5085', 'uvim1006.tab:5087', 'uvim1006.tab:5088', 'uvim1006.tab:5089', 'uvim1006.tab:5327', 'uvim1006.tab:5389', 'uvim1006.tab:5451', 'uvim1006.tab:5513', 'uvim1006.tab:5575', 'uvim1006.tab:5637', 'uvim1006.tab:5699', 'uvim1006.tab:5761', 'uvim1006.tab:5823', 'uvim1006.tab:5885', 'uvim1006.tab:5947', 'uvim1006.tab:6009', 'uvim1006.tab:6071', 'uvim1006.tab:6133', 'uvim1006.tab:6195', 'uvim1006.tab:6257', 'uvim1006.tab:6319', 'uvim1006.tab:6381', 'uvim1006.tab:6443', 'uvim1006.tab:6505', 'uvim1006.tab:6567', 'uvim1006.tab:6629', 'uvim1006.tab:6691', 'uvim1006.tab:6753', 'uvim1006.tab:6815', 'uvim1006.tab:6877', 'uvim1006.tab:6939', 'uvim1006.tab:7001', 'uvim1006.tab:7063']" self.setglobal(__file__) self.runpy() class countrateCase55(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f410m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5086', 'uvim1006.tab:7125', 'uvim1006.tab:7187']" self.setglobal(__file__) self.runpy() class calcphotCase56(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f410m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5086', 'uvim1006.tab:7125', 'uvim1006.tab:7187']" self.setglobal(__file__) self.runpy() class calcphotCase57(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq422m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5090', 'uvim1006.tab:5091', 'uvim1006.tab:5092', 'uvim1006.tab:5093', 'uvim1006.tab:5094', 'uvim1006.tab:5328', 'uvim1006.tab:5390', 'uvim1006.tab:5452', 'uvim1006.tab:5514', 'uvim1006.tab:5576', 'uvim1006.tab:5638', 'uvim1006.tab:5700', 'uvim1006.tab:5762', 'uvim1006.tab:5824', 'uvim1006.tab:5886', 'uvim1006.tab:5948', 'uvim1006.tab:6010', 'uvim1006.tab:6072', 'uvim1006.tab:6134', 'uvim1006.tab:6196', 'uvim1006.tab:6258', 'uvim1006.tab:6320', 'uvim1006.tab:6382', 'uvim1006.tab:6444', 'uvim1006.tab:6506', 'uvim1006.tab:6568', 'uvim1006.tab:6630', 'uvim1006.tab:6692', 'uvim1006.tab:6754', 'uvim1006.tab:6816', 'uvim1006.tab:6878', 'uvim1006.tab:6940', 'uvim1006.tab:7002', 'uvim1006.tab:7064', 'uvim1006.tab:7126', 'uvim1006.tab:7188']" self.setglobal(__file__) self.runpy() class countrateCase56(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq422m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5090', 'uvim1006.tab:5091', 'uvim1006.tab:5092', 'uvim1006.tab:5093', 'uvim1006.tab:5094', 'uvim1006.tab:5328', 'uvim1006.tab:5390', 'uvim1006.tab:5452', 'uvim1006.tab:5514', 'uvim1006.tab:5576', 'uvim1006.tab:5638', 'uvim1006.tab:5700', 'uvim1006.tab:5762', 'uvim1006.tab:5824', 'uvim1006.tab:5886', 'uvim1006.tab:5948', 'uvim1006.tab:6010', 'uvim1006.tab:6072', 'uvim1006.tab:6134', 'uvim1006.tab:6196', 'uvim1006.tab:6258', 'uvim1006.tab:6320', 'uvim1006.tab:6382', 'uvim1006.tab:6444', 'uvim1006.tab:6506', 'uvim1006.tab:6568', 'uvim1006.tab:6630', 'uvim1006.tab:6692', 'uvim1006.tab:6754', 'uvim1006.tab:6816', 'uvim1006.tab:6878', 'uvim1006.tab:6940', 'uvim1006.tab:7002', 'uvim1006.tab:7064', 'uvim1006.tab:7126', 'uvim1006.tab:7188']" self.setglobal(__file__) self.runpy() class countrateCase57(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq422m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5090', 'uvim1006.tab:5092', 'uvim1006.tab:5093', 'uvim1006.tab:5094', 'uvim1006.tab:5328', 'uvim1006.tab:5390', 'uvim1006.tab:5452', 'uvim1006.tab:5514', 'uvim1006.tab:5576', 'uvim1006.tab:5638', 'uvim1006.tab:5700', 'uvim1006.tab:5762', 'uvim1006.tab:5824', 'uvim1006.tab:5886', 'uvim1006.tab:5948', 'uvim1006.tab:6010', 'uvim1006.tab:6072', 'uvim1006.tab:6134', 'uvim1006.tab:6196', 'uvim1006.tab:6258', 'uvim1006.tab:6320', 'uvim1006.tab:6382', 'uvim1006.tab:6444', 'uvim1006.tab:6506', 'uvim1006.tab:6568', 'uvim1006.tab:6630', 'uvim1006.tab:6692', 'uvim1006.tab:6754', 'uvim1006.tab:6816', 'uvim1006.tab:6878', 'uvim1006.tab:6940', 'uvim1006.tab:7002', 'uvim1006.tab:7064']" self.setglobal(__file__) self.runpy() class calcphotCase58(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq422m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5090', 'uvim1006.tab:5092', 'uvim1006.tab:5093', 'uvim1006.tab:5094', 'uvim1006.tab:5328', 'uvim1006.tab:5390', 'uvim1006.tab:5452', 'uvim1006.tab:5514', 'uvim1006.tab:5576', 'uvim1006.tab:5638', 'uvim1006.tab:5700', 'uvim1006.tab:5762', 'uvim1006.tab:5824', 'uvim1006.tab:5886', 'uvim1006.tab:5948', 'uvim1006.tab:6010', 'uvim1006.tab:6072', 'uvim1006.tab:6134', 'uvim1006.tab:6196', 'uvim1006.tab:6258', 'uvim1006.tab:6320', 'uvim1006.tab:6382', 'uvim1006.tab:6444', 'uvim1006.tab:6506', 'uvim1006.tab:6568', 'uvim1006.tab:6630', 'uvim1006.tab:6692', 'uvim1006.tab:6754', 'uvim1006.tab:6816', 'uvim1006.tab:6878', 'uvim1006.tab:6940', 'uvim1006.tab:7002', 'uvim1006.tab:7064']" self.setglobal(__file__) self.runpy() class countrateCase58(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq422m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5091', 'uvim1006.tab:7126', 'uvim1006.tab:7188']" self.setglobal(__file__) self.runpy() class calcphotCase59(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq422m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5091', 'uvim1006.tab:7126', 'uvim1006.tab:7188']" self.setglobal(__file__) self.runpy() class calcphotCase60(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq436n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5095', 'uvim1006.tab:5096', 'uvim1006.tab:5097', 'uvim1006.tab:5098', 'uvim1006.tab:5099', 'uvim1006.tab:5329', 'uvim1006.tab:5391', 'uvim1006.tab:5453', 'uvim1006.tab:5515', 'uvim1006.tab:5577', 'uvim1006.tab:5639', 'uvim1006.tab:5701', 'uvim1006.tab:5763', 'uvim1006.tab:5825', 'uvim1006.tab:5887', 'uvim1006.tab:5949', 'uvim1006.tab:6011', 'uvim1006.tab:6073', 'uvim1006.tab:6135', 'uvim1006.tab:6197', 'uvim1006.tab:6259', 'uvim1006.tab:6321', 'uvim1006.tab:6383', 'uvim1006.tab:6445', 'uvim1006.tab:6507', 'uvim1006.tab:6569', 'uvim1006.tab:6631', 'uvim1006.tab:6693', 'uvim1006.tab:6755', 'uvim1006.tab:6817', 'uvim1006.tab:6879', 'uvim1006.tab:6941', 'uvim1006.tab:7003', 'uvim1006.tab:7065', 'uvim1006.tab:7127', 'uvim1006.tab:7189']" self.setglobal(__file__) self.runpy() class countrateCase59(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq436n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5095', 'uvim1006.tab:5096', 'uvim1006.tab:5097', 'uvim1006.tab:5098', 'uvim1006.tab:5099', 'uvim1006.tab:5329', 'uvim1006.tab:5391', 'uvim1006.tab:5453', 'uvim1006.tab:5515', 'uvim1006.tab:5577', 'uvim1006.tab:5639', 'uvim1006.tab:5701', 'uvim1006.tab:5763', 'uvim1006.tab:5825', 'uvim1006.tab:5887', 'uvim1006.tab:5949', 'uvim1006.tab:6011', 'uvim1006.tab:6073', 'uvim1006.tab:6135', 'uvim1006.tab:6197', 'uvim1006.tab:6259', 'uvim1006.tab:6321', 'uvim1006.tab:6383', 'uvim1006.tab:6445', 'uvim1006.tab:6507', 'uvim1006.tab:6569', 'uvim1006.tab:6631', 'uvim1006.tab:6693', 'uvim1006.tab:6755', 'uvim1006.tab:6817', 'uvim1006.tab:6879', 'uvim1006.tab:6941', 'uvim1006.tab:7003', 'uvim1006.tab:7065', 'uvim1006.tab:7127', 'uvim1006.tab:7189']" self.setglobal(__file__) self.runpy() class countrateCase60(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq436n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5095', 'uvim1006.tab:5097', 'uvim1006.tab:5098', 'uvim1006.tab:5099', 'uvim1006.tab:5329', 'uvim1006.tab:5391', 'uvim1006.tab:5453', 'uvim1006.tab:5515', 'uvim1006.tab:5577', 'uvim1006.tab:5639', 'uvim1006.tab:5701', 'uvim1006.tab:5763', 'uvim1006.tab:5825', 'uvim1006.tab:5887', 'uvim1006.tab:5949', 'uvim1006.tab:6011', 'uvim1006.tab:6073', 'uvim1006.tab:6135', 'uvim1006.tab:6197', 'uvim1006.tab:6259', 'uvim1006.tab:6321', 'uvim1006.tab:6383', 'uvim1006.tab:6445', 'uvim1006.tab:6507', 'uvim1006.tab:6569', 'uvim1006.tab:6631', 'uvim1006.tab:6693', 'uvim1006.tab:6755', 'uvim1006.tab:6817', 'uvim1006.tab:6879', 'uvim1006.tab:6941', 'uvim1006.tab:7003', 'uvim1006.tab:7065']" self.setglobal(__file__) self.runpy() class calcphotCase61(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq436n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5095', 'uvim1006.tab:5097', 'uvim1006.tab:5098', 'uvim1006.tab:5099', 'uvim1006.tab:5329', 'uvim1006.tab:5391', 'uvim1006.tab:5453', 'uvim1006.tab:5515', 'uvim1006.tab:5577', 'uvim1006.tab:5639', 'uvim1006.tab:5701', 'uvim1006.tab:5763', 'uvim1006.tab:5825', 'uvim1006.tab:5887', 'uvim1006.tab:5949', 'uvim1006.tab:6011', 'uvim1006.tab:6073', 'uvim1006.tab:6135', 'uvim1006.tab:6197', 'uvim1006.tab:6259', 'uvim1006.tab:6321', 'uvim1006.tab:6383', 'uvim1006.tab:6445', 'uvim1006.tab:6507', 'uvim1006.tab:6569', 'uvim1006.tab:6631', 'uvim1006.tab:6693', 'uvim1006.tab:6755', 'uvim1006.tab:6817', 'uvim1006.tab:6879', 'uvim1006.tab:6941', 'uvim1006.tab:7003', 'uvim1006.tab:7065']" self.setglobal(__file__) self.runpy() class countrateCase61(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq436n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5096', 'uvim1006.tab:7127', 'uvim1006.tab:7189']" self.setglobal(__file__) self.runpy() class calcphotCase62(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq436n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5096', 'uvim1006.tab:7127', 'uvim1006.tab:7189']" self.setglobal(__file__) self.runpy() class calcphotCase63(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq437n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5100', 'uvim1006.tab:5101', 'uvim1006.tab:5102', 'uvim1006.tab:5103', 'uvim1006.tab:5104', 'uvim1006.tab:5330', 'uvim1006.tab:5392', 'uvim1006.tab:5454', 'uvim1006.tab:5516', 'uvim1006.tab:5578', 'uvim1006.tab:5640', 'uvim1006.tab:5702', 'uvim1006.tab:5764', 'uvim1006.tab:5826', 'uvim1006.tab:5888', 'uvim1006.tab:5950', 'uvim1006.tab:6012', 'uvim1006.tab:6074', 'uvim1006.tab:6136', 'uvim1006.tab:6198', 'uvim1006.tab:6260', 'uvim1006.tab:6322', 'uvim1006.tab:6384', 'uvim1006.tab:6446', 'uvim1006.tab:6508', 'uvim1006.tab:6570', 'uvim1006.tab:6632', 'uvim1006.tab:6694', 'uvim1006.tab:6756', 'uvim1006.tab:6818', 'uvim1006.tab:6880', 'uvim1006.tab:6942', 'uvim1006.tab:7004', 'uvim1006.tab:7066', 'uvim1006.tab:7128', 'uvim1006.tab:7190']" self.setglobal(__file__) self.runpy() class countrateCase62(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq437n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5100', 'uvim1006.tab:5101', 'uvim1006.tab:5102', 'uvim1006.tab:5103', 'uvim1006.tab:5104', 'uvim1006.tab:5330', 'uvim1006.tab:5392', 'uvim1006.tab:5454', 'uvim1006.tab:5516', 'uvim1006.tab:5578', 'uvim1006.tab:5640', 'uvim1006.tab:5702', 'uvim1006.tab:5764', 'uvim1006.tab:5826', 'uvim1006.tab:5888', 'uvim1006.tab:5950', 'uvim1006.tab:6012', 'uvim1006.tab:6074', 'uvim1006.tab:6136', 'uvim1006.tab:6198', 'uvim1006.tab:6260', 'uvim1006.tab:6322', 'uvim1006.tab:6384', 'uvim1006.tab:6446', 'uvim1006.tab:6508', 'uvim1006.tab:6570', 'uvim1006.tab:6632', 'uvim1006.tab:6694', 'uvim1006.tab:6756', 'uvim1006.tab:6818', 'uvim1006.tab:6880', 'uvim1006.tab:6942', 'uvim1006.tab:7004', 'uvim1006.tab:7066', 'uvim1006.tab:7128', 'uvim1006.tab:7190']" self.setglobal(__file__) self.runpy() class countrateCase63(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq437n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5100', 'uvim1006.tab:5102', 'uvim1006.tab:5103', 'uvim1006.tab:5104', 'uvim1006.tab:5330', 'uvim1006.tab:5392', 'uvim1006.tab:5454', 'uvim1006.tab:5516', 'uvim1006.tab:5578', 'uvim1006.tab:5640', 'uvim1006.tab:5702', 'uvim1006.tab:5764', 'uvim1006.tab:5826', 'uvim1006.tab:5888', 'uvim1006.tab:5950', 'uvim1006.tab:6012', 'uvim1006.tab:6074', 'uvim1006.tab:6136', 'uvim1006.tab:6198', 'uvim1006.tab:6260', 'uvim1006.tab:6322', 'uvim1006.tab:6384', 'uvim1006.tab:6446', 'uvim1006.tab:6508', 'uvim1006.tab:6570', 'uvim1006.tab:6632', 'uvim1006.tab:6694', 'uvim1006.tab:6756', 'uvim1006.tab:6818', 'uvim1006.tab:6880', 'uvim1006.tab:6942', 'uvim1006.tab:7004', 'uvim1006.tab:7066']" self.setglobal(__file__) self.runpy() class calcphotCase64(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq437n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5100', 'uvim1006.tab:5102', 'uvim1006.tab:5103', 'uvim1006.tab:5104', 'uvim1006.tab:5330', 'uvim1006.tab:5392', 'uvim1006.tab:5454', 'uvim1006.tab:5516', 'uvim1006.tab:5578', 'uvim1006.tab:5640', 'uvim1006.tab:5702', 'uvim1006.tab:5764', 'uvim1006.tab:5826', 'uvim1006.tab:5888', 'uvim1006.tab:5950', 'uvim1006.tab:6012', 'uvim1006.tab:6074', 'uvim1006.tab:6136', 'uvim1006.tab:6198', 'uvim1006.tab:6260', 'uvim1006.tab:6322', 'uvim1006.tab:6384', 'uvim1006.tab:6446', 'uvim1006.tab:6508', 'uvim1006.tab:6570', 'uvim1006.tab:6632', 'uvim1006.tab:6694', 'uvim1006.tab:6756', 'uvim1006.tab:6818', 'uvim1006.tab:6880', 'uvim1006.tab:6942', 'uvim1006.tab:7004', 'uvim1006.tab:7066']" self.setglobal(__file__) self.runpy() class countrateCase64(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq437n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5101', 'uvim1006.tab:7128', 'uvim1006.tab:7190']" self.setglobal(__file__) self.runpy() class calcphotCase65(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq437n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5101', 'uvim1006.tab:7128', 'uvim1006.tab:7190']" self.setglobal(__file__) self.runpy() class calcphotCase66(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f438w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5105', 'uvim1006.tab:5106', 'uvim1006.tab:5107', 'uvim1006.tab:5108', 'uvim1006.tab:5109', 'uvim1006.tab:5331', 'uvim1006.tab:5393', 'uvim1006.tab:5455', 'uvim1006.tab:5517', 'uvim1006.tab:5579', 'uvim1006.tab:5641', 'uvim1006.tab:5703', 'uvim1006.tab:5765', 'uvim1006.tab:5827', 'uvim1006.tab:5889', 'uvim1006.tab:5951', 'uvim1006.tab:6013', 'uvim1006.tab:6075', 'uvim1006.tab:6137', 'uvim1006.tab:6199', 'uvim1006.tab:6261', 'uvim1006.tab:6323', 'uvim1006.tab:6385', 'uvim1006.tab:6447', 'uvim1006.tab:6509', 'uvim1006.tab:6571', 'uvim1006.tab:6633', 'uvim1006.tab:6695', 'uvim1006.tab:6757', 'uvim1006.tab:6819', 'uvim1006.tab:6881', 'uvim1006.tab:6943', 'uvim1006.tab:7005', 'uvim1006.tab:7067', 'uvim1006.tab:7129', 'uvim1006.tab:7191']" self.setglobal(__file__) self.runpy() class countrateCase65(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f438w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5105', 'uvim1006.tab:5106', 'uvim1006.tab:5107', 'uvim1006.tab:5108', 'uvim1006.tab:5109', 'uvim1006.tab:5331', 'uvim1006.tab:5393', 'uvim1006.tab:5455', 'uvim1006.tab:5517', 'uvim1006.tab:5579', 'uvim1006.tab:5641', 'uvim1006.tab:5703', 'uvim1006.tab:5765', 'uvim1006.tab:5827', 'uvim1006.tab:5889', 'uvim1006.tab:5951', 'uvim1006.tab:6013', 'uvim1006.tab:6075', 'uvim1006.tab:6137', 'uvim1006.tab:6199', 'uvim1006.tab:6261', 'uvim1006.tab:6323', 'uvim1006.tab:6385', 'uvim1006.tab:6447', 'uvim1006.tab:6509', 'uvim1006.tab:6571', 'uvim1006.tab:6633', 'uvim1006.tab:6695', 'uvim1006.tab:6757', 'uvim1006.tab:6819', 'uvim1006.tab:6881', 'uvim1006.tab:6943', 'uvim1006.tab:7005', 'uvim1006.tab:7067', 'uvim1006.tab:7129', 'uvim1006.tab:7191']" self.setglobal(__file__) self.runpy() class countrateCase66(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f438w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5105', 'uvim1006.tab:5107', 'uvim1006.tab:5108', 'uvim1006.tab:5109', 'uvim1006.tab:5331', 'uvim1006.tab:5393', 'uvim1006.tab:5455', 'uvim1006.tab:5517', 'uvim1006.tab:5579', 'uvim1006.tab:5641', 'uvim1006.tab:5703', 'uvim1006.tab:5765', 'uvim1006.tab:5827', 'uvim1006.tab:5889', 'uvim1006.tab:5951', 'uvim1006.tab:6013', 'uvim1006.tab:6075', 'uvim1006.tab:6137', 'uvim1006.tab:6199', 'uvim1006.tab:6261', 'uvim1006.tab:6323', 'uvim1006.tab:6385', 'uvim1006.tab:6447', 'uvim1006.tab:6509', 'uvim1006.tab:6571', 'uvim1006.tab:6633', 'uvim1006.tab:6695', 'uvim1006.tab:6757', 'uvim1006.tab:6819', 'uvim1006.tab:6881', 'uvim1006.tab:6943', 'uvim1006.tab:7005', 'uvim1006.tab:7067']" self.setglobal(__file__) self.runpy() class calcphotCase67(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f438w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5105', 'uvim1006.tab:5107', 'uvim1006.tab:5108', 'uvim1006.tab:5109', 'uvim1006.tab:5331', 'uvim1006.tab:5393', 'uvim1006.tab:5455', 'uvim1006.tab:5517', 'uvim1006.tab:5579', 'uvim1006.tab:5641', 'uvim1006.tab:5703', 'uvim1006.tab:5765', 'uvim1006.tab:5827', 'uvim1006.tab:5889', 'uvim1006.tab:5951', 'uvim1006.tab:6013', 'uvim1006.tab:6075', 'uvim1006.tab:6137', 'uvim1006.tab:6199', 'uvim1006.tab:6261', 'uvim1006.tab:6323', 'uvim1006.tab:6385', 'uvim1006.tab:6447', 'uvim1006.tab:6509', 'uvim1006.tab:6571', 'uvim1006.tab:6633', 'uvim1006.tab:6695', 'uvim1006.tab:6757', 'uvim1006.tab:6819', 'uvim1006.tab:6881', 'uvim1006.tab:6943', 'uvim1006.tab:7005', 'uvim1006.tab:7067']" self.setglobal(__file__) self.runpy() class countrateCase67(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f438w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5106', 'uvim1006.tab:7129', 'uvim1006.tab:7191']" self.setglobal(__file__) self.runpy() class calcphotCase68(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f438w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5106', 'uvim1006.tab:7129', 'uvim1006.tab:7191']" self.setglobal(__file__) self.runpy() class calcphotCase69(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f467m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5110', 'uvim1006.tab:5111', 'uvim1006.tab:5112', 'uvim1006.tab:5113', 'uvim1006.tab:5114', 'uvim1006.tab:5332', 'uvim1006.tab:5394', 'uvim1006.tab:5456', 'uvim1006.tab:5518', 'uvim1006.tab:5580', 'uvim1006.tab:5642', 'uvim1006.tab:5704', 'uvim1006.tab:5766', 'uvim1006.tab:5828', 'uvim1006.tab:5890', 'uvim1006.tab:5952', 'uvim1006.tab:6014', 'uvim1006.tab:6076', 'uvim1006.tab:6138', 'uvim1006.tab:6200', 'uvim1006.tab:6262', 'uvim1006.tab:6324', 'uvim1006.tab:6386', 'uvim1006.tab:6448', 'uvim1006.tab:6510', 'uvim1006.tab:6572', 'uvim1006.tab:6634', 'uvim1006.tab:6696', 'uvim1006.tab:6758', 'uvim1006.tab:6820', 'uvim1006.tab:6882', 'uvim1006.tab:6944', 'uvim1006.tab:7006', 'uvim1006.tab:7068', 'uvim1006.tab:7130', 'uvim1006.tab:7192']" self.setglobal(__file__) self.runpy() class countrateCase68(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f467m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5110', 'uvim1006.tab:5111', 'uvim1006.tab:5112', 'uvim1006.tab:5113', 'uvim1006.tab:5114', 'uvim1006.tab:5332', 'uvim1006.tab:5394', 'uvim1006.tab:5456', 'uvim1006.tab:5518', 'uvim1006.tab:5580', 'uvim1006.tab:5642', 'uvim1006.tab:5704', 'uvim1006.tab:5766', 'uvim1006.tab:5828', 'uvim1006.tab:5890', 'uvim1006.tab:5952', 'uvim1006.tab:6014', 'uvim1006.tab:6076', 'uvim1006.tab:6138', 'uvim1006.tab:6200', 'uvim1006.tab:6262', 'uvim1006.tab:6324', 'uvim1006.tab:6386', 'uvim1006.tab:6448', 'uvim1006.tab:6510', 'uvim1006.tab:6572', 'uvim1006.tab:6634', 'uvim1006.tab:6696', 'uvim1006.tab:6758', 'uvim1006.tab:6820', 'uvim1006.tab:6882', 'uvim1006.tab:6944', 'uvim1006.tab:7006', 'uvim1006.tab:7068', 'uvim1006.tab:7130', 'uvim1006.tab:7192']" self.setglobal(__file__) self.runpy() class countrateCase69(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f467m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5110', 'uvim1006.tab:5112', 'uvim1006.tab:5113', 'uvim1006.tab:5114', 'uvim1006.tab:5332', 'uvim1006.tab:5394', 'uvim1006.tab:5456', 'uvim1006.tab:5518', 'uvim1006.tab:5580', 'uvim1006.tab:5642', 'uvim1006.tab:5704', 'uvim1006.tab:5766', 'uvim1006.tab:5828', 'uvim1006.tab:5890', 'uvim1006.tab:5952', 'uvim1006.tab:6014', 'uvim1006.tab:6076', 'uvim1006.tab:6138', 'uvim1006.tab:6200', 'uvim1006.tab:6262', 'uvim1006.tab:6324', 'uvim1006.tab:6386', 'uvim1006.tab:6448', 'uvim1006.tab:6510', 'uvim1006.tab:6572', 'uvim1006.tab:6634', 'uvim1006.tab:6696', 'uvim1006.tab:6758', 'uvim1006.tab:6820', 'uvim1006.tab:6882', 'uvim1006.tab:6944', 'uvim1006.tab:7006', 'uvim1006.tab:7068']" self.setglobal(__file__) self.runpy() class calcphotCase70(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f467m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5110', 'uvim1006.tab:5112', 'uvim1006.tab:5113', 'uvim1006.tab:5114', 'uvim1006.tab:5332', 'uvim1006.tab:5394', 'uvim1006.tab:5456', 'uvim1006.tab:5518', 'uvim1006.tab:5580', 'uvim1006.tab:5642', 'uvim1006.tab:5704', 'uvim1006.tab:5766', 'uvim1006.tab:5828', 'uvim1006.tab:5890', 'uvim1006.tab:5952', 'uvim1006.tab:6014', 'uvim1006.tab:6076', 'uvim1006.tab:6138', 'uvim1006.tab:6200', 'uvim1006.tab:6262', 'uvim1006.tab:6324', 'uvim1006.tab:6386', 'uvim1006.tab:6448', 'uvim1006.tab:6510', 'uvim1006.tab:6572', 'uvim1006.tab:6634', 'uvim1006.tab:6696', 'uvim1006.tab:6758', 'uvim1006.tab:6820', 'uvim1006.tab:6882', 'uvim1006.tab:6944', 'uvim1006.tab:7006', 'uvim1006.tab:7068']" self.setglobal(__file__) self.runpy() class countrateCase70(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f467m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5111', 'uvim1006.tab:7130', 'uvim1006.tab:7192']" self.setglobal(__file__) self.runpy() class calcphotCase71(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f467m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5111', 'uvim1006.tab:7130', 'uvim1006.tab:7192']" self.setglobal(__file__) self.runpy() class calcphotCase72(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f469n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5115', 'uvim1006.tab:5116', 'uvim1006.tab:5117', 'uvim1006.tab:5118', 'uvim1006.tab:5119', 'uvim1006.tab:5333', 'uvim1006.tab:5395', 'uvim1006.tab:5457', 'uvim1006.tab:5519', 'uvim1006.tab:5581', 'uvim1006.tab:5643', 'uvim1006.tab:5705', 'uvim1006.tab:5767', 'uvim1006.tab:5829', 'uvim1006.tab:5891', 'uvim1006.tab:5953', 'uvim1006.tab:6015', 'uvim1006.tab:6077', 'uvim1006.tab:6139', 'uvim1006.tab:6201', 'uvim1006.tab:6263', 'uvim1006.tab:6325', 'uvim1006.tab:6387', 'uvim1006.tab:6449', 'uvim1006.tab:6511', 'uvim1006.tab:6573', 'uvim1006.tab:6635', 'uvim1006.tab:6697', 'uvim1006.tab:6759', 'uvim1006.tab:6821', 'uvim1006.tab:6883', 'uvim1006.tab:6945', 'uvim1006.tab:7007', 'uvim1006.tab:7069', 'uvim1006.tab:7131', 'uvim1006.tab:7193']" self.setglobal(__file__) self.runpy() class countrateCase71(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f469n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5115', 'uvim1006.tab:5116', 'uvim1006.tab:5117', 'uvim1006.tab:5118', 'uvim1006.tab:5119', 'uvim1006.tab:5333', 'uvim1006.tab:5395', 'uvim1006.tab:5457', 'uvim1006.tab:5519', 'uvim1006.tab:5581', 'uvim1006.tab:5643', 'uvim1006.tab:5705', 'uvim1006.tab:5767', 'uvim1006.tab:5829', 'uvim1006.tab:5891', 'uvim1006.tab:5953', 'uvim1006.tab:6015', 'uvim1006.tab:6077', 'uvim1006.tab:6139', 'uvim1006.tab:6201', 'uvim1006.tab:6263', 'uvim1006.tab:6325', 'uvim1006.tab:6387', 'uvim1006.tab:6449', 'uvim1006.tab:6511', 'uvim1006.tab:6573', 'uvim1006.tab:6635', 'uvim1006.tab:6697', 'uvim1006.tab:6759', 'uvim1006.tab:6821', 'uvim1006.tab:6883', 'uvim1006.tab:6945', 'uvim1006.tab:7007', 'uvim1006.tab:7069', 'uvim1006.tab:7131', 'uvim1006.tab:7193']" self.setglobal(__file__) self.runpy() class countrateCase72(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f469n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5115', 'uvim1006.tab:5117', 'uvim1006.tab:5118', 'uvim1006.tab:5119', 'uvim1006.tab:5333', 'uvim1006.tab:5395', 'uvim1006.tab:5457', 'uvim1006.tab:5519', 'uvim1006.tab:5581', 'uvim1006.tab:5643', 'uvim1006.tab:5705', 'uvim1006.tab:5767', 'uvim1006.tab:5829', 'uvim1006.tab:5891', 'uvim1006.tab:5953', 'uvim1006.tab:6015', 'uvim1006.tab:6077', 'uvim1006.tab:6139', 'uvim1006.tab:6201', 'uvim1006.tab:6263', 'uvim1006.tab:6325', 'uvim1006.tab:6387', 'uvim1006.tab:6449', 'uvim1006.tab:6511', 'uvim1006.tab:6573', 'uvim1006.tab:6635', 'uvim1006.tab:6697', 'uvim1006.tab:6759', 'uvim1006.tab:6821', 'uvim1006.tab:6883', 'uvim1006.tab:6945', 'uvim1006.tab:7007', 'uvim1006.tab:7069']" self.setglobal(__file__) self.runpy() class calcphotCase73(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f469n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5115', 'uvim1006.tab:5117', 'uvim1006.tab:5118', 'uvim1006.tab:5119', 'uvim1006.tab:5333', 'uvim1006.tab:5395', 'uvim1006.tab:5457', 'uvim1006.tab:5519', 'uvim1006.tab:5581', 'uvim1006.tab:5643', 'uvim1006.tab:5705', 'uvim1006.tab:5767', 'uvim1006.tab:5829', 'uvim1006.tab:5891', 'uvim1006.tab:5953', 'uvim1006.tab:6015', 'uvim1006.tab:6077', 'uvim1006.tab:6139', 'uvim1006.tab:6201', 'uvim1006.tab:6263', 'uvim1006.tab:6325', 'uvim1006.tab:6387', 'uvim1006.tab:6449', 'uvim1006.tab:6511', 'uvim1006.tab:6573', 'uvim1006.tab:6635', 'uvim1006.tab:6697', 'uvim1006.tab:6759', 'uvim1006.tab:6821', 'uvim1006.tab:6883', 'uvim1006.tab:6945', 'uvim1006.tab:7007', 'uvim1006.tab:7069']" self.setglobal(__file__) self.runpy() class countrateCase73(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f469n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5116', 'uvim1006.tab:7131', 'uvim1006.tab:7193']" self.setglobal(__file__) self.runpy() class calcphotCase74(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f469n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5116', 'uvim1006.tab:7131', 'uvim1006.tab:7193']" self.setglobal(__file__) self.runpy() class calcphotCase75(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f475w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5120', 'uvim1006.tab:5121', 'uvim1006.tab:5122', 'uvim1006.tab:5123', 'uvim1006.tab:5124', 'uvim1006.tab:5334', 'uvim1006.tab:5396', 'uvim1006.tab:5458', 'uvim1006.tab:5520', 'uvim1006.tab:5582', 'uvim1006.tab:5644', 'uvim1006.tab:5706', 'uvim1006.tab:5768', 'uvim1006.tab:5830', 'uvim1006.tab:5892', 'uvim1006.tab:5954', 'uvim1006.tab:6016', 'uvim1006.tab:6078', 'uvim1006.tab:6140', 'uvim1006.tab:6202', 'uvim1006.tab:6264', 'uvim1006.tab:6326', 'uvim1006.tab:6388', 'uvim1006.tab:6450', 'uvim1006.tab:6512', 'uvim1006.tab:6574', 'uvim1006.tab:6636', 'uvim1006.tab:6698', 'uvim1006.tab:6760', 'uvim1006.tab:6822', 'uvim1006.tab:6884', 'uvim1006.tab:6946', 'uvim1006.tab:7008', 'uvim1006.tab:7070', 'uvim1006.tab:7132', 'uvim1006.tab:7194']" self.setglobal(__file__) self.runpy() class countrateCase74(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f475w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5120', 'uvim1006.tab:5121', 'uvim1006.tab:5122', 'uvim1006.tab:5123', 'uvim1006.tab:5124', 'uvim1006.tab:5334', 'uvim1006.tab:5396', 'uvim1006.tab:5458', 'uvim1006.tab:5520', 'uvim1006.tab:5582', 'uvim1006.tab:5644', 'uvim1006.tab:5706', 'uvim1006.tab:5768', 'uvim1006.tab:5830', 'uvim1006.tab:5892', 'uvim1006.tab:5954', 'uvim1006.tab:6016', 'uvim1006.tab:6078', 'uvim1006.tab:6140', 'uvim1006.tab:6202', 'uvim1006.tab:6264', 'uvim1006.tab:6326', 'uvim1006.tab:6388', 'uvim1006.tab:6450', 'uvim1006.tab:6512', 'uvim1006.tab:6574', 'uvim1006.tab:6636', 'uvim1006.tab:6698', 'uvim1006.tab:6760', 'uvim1006.tab:6822', 'uvim1006.tab:6884', 'uvim1006.tab:6946', 'uvim1006.tab:7008', 'uvim1006.tab:7070', 'uvim1006.tab:7132', 'uvim1006.tab:7194']" self.setglobal(__file__) self.runpy() class countrateCase75(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f475w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5120', 'uvim1006.tab:5122', 'uvim1006.tab:5123', 'uvim1006.tab:5124', 'uvim1006.tab:5334', 'uvim1006.tab:5396', 'uvim1006.tab:5458', 'uvim1006.tab:5520', 'uvim1006.tab:5582', 'uvim1006.tab:5644', 'uvim1006.tab:5706', 'uvim1006.tab:5768', 'uvim1006.tab:5830', 'uvim1006.tab:5892', 'uvim1006.tab:5954', 'uvim1006.tab:6016', 'uvim1006.tab:6078', 'uvim1006.tab:6140', 'uvim1006.tab:6202', 'uvim1006.tab:6264', 'uvim1006.tab:6326', 'uvim1006.tab:6388', 'uvim1006.tab:6450', 'uvim1006.tab:6512', 'uvim1006.tab:6574', 'uvim1006.tab:6636', 'uvim1006.tab:6698', 'uvim1006.tab:6760', 'uvim1006.tab:6822', 'uvim1006.tab:6884', 'uvim1006.tab:6946', 'uvim1006.tab:7008', 'uvim1006.tab:7070']" self.setglobal(__file__) self.runpy() class calcphotCase76(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f475w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5120', 'uvim1006.tab:5122', 'uvim1006.tab:5123', 'uvim1006.tab:5124', 'uvim1006.tab:5334', 'uvim1006.tab:5396', 'uvim1006.tab:5458', 'uvim1006.tab:5520', 'uvim1006.tab:5582', 'uvim1006.tab:5644', 'uvim1006.tab:5706', 'uvim1006.tab:5768', 'uvim1006.tab:5830', 'uvim1006.tab:5892', 'uvim1006.tab:5954', 'uvim1006.tab:6016', 'uvim1006.tab:6078', 'uvim1006.tab:6140', 'uvim1006.tab:6202', 'uvim1006.tab:6264', 'uvim1006.tab:6326', 'uvim1006.tab:6388', 'uvim1006.tab:6450', 'uvim1006.tab:6512', 'uvim1006.tab:6574', 'uvim1006.tab:6636', 'uvim1006.tab:6698', 'uvim1006.tab:6760', 'uvim1006.tab:6822', 'uvim1006.tab:6884', 'uvim1006.tab:6946', 'uvim1006.tab:7008', 'uvim1006.tab:7070']" self.setglobal(__file__) self.runpy() class countrateCase76(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f475w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5121', 'uvim1006.tab:7132', 'uvim1006.tab:7194']" self.setglobal(__file__) self.runpy() class calcphotCase77(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f475w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5121', 'uvim1006.tab:7132', 'uvim1006.tab:7194']" self.setglobal(__file__) self.runpy() class calcphotCase78(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f475x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5125', 'uvim1006.tab:5126', 'uvim1006.tab:5127', 'uvim1006.tab:5128', 'uvim1006.tab:5129', 'uvim1006.tab:5335', 'uvim1006.tab:5397', 'uvim1006.tab:5459', 'uvim1006.tab:5521', 'uvim1006.tab:5583', 'uvim1006.tab:5645', 'uvim1006.tab:5707', 'uvim1006.tab:5769', 'uvim1006.tab:5831', 'uvim1006.tab:5893', 'uvim1006.tab:5955', 'uvim1006.tab:6017', 'uvim1006.tab:6079', 'uvim1006.tab:6141', 'uvim1006.tab:6203', 'uvim1006.tab:6265', 'uvim1006.tab:6327', 'uvim1006.tab:6389', 'uvim1006.tab:6451', 'uvim1006.tab:6513', 'uvim1006.tab:6575', 'uvim1006.tab:6637', 'uvim1006.tab:6699', 'uvim1006.tab:6761', 'uvim1006.tab:6823', 'uvim1006.tab:6885', 'uvim1006.tab:6947', 'uvim1006.tab:7009', 'uvim1006.tab:7071', 'uvim1006.tab:7133', 'uvim1006.tab:7195']" self.setglobal(__file__) self.runpy() class countrateCase77(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f475x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5125', 'uvim1006.tab:5126', 'uvim1006.tab:5127', 'uvim1006.tab:5128', 'uvim1006.tab:5129', 'uvim1006.tab:5335', 'uvim1006.tab:5397', 'uvim1006.tab:5459', 'uvim1006.tab:5521', 'uvim1006.tab:5583', 'uvim1006.tab:5645', 'uvim1006.tab:5707', 'uvim1006.tab:5769', 'uvim1006.tab:5831', 'uvim1006.tab:5893', 'uvim1006.tab:5955', 'uvim1006.tab:6017', 'uvim1006.tab:6079', 'uvim1006.tab:6141', 'uvim1006.tab:6203', 'uvim1006.tab:6265', 'uvim1006.tab:6327', 'uvim1006.tab:6389', 'uvim1006.tab:6451', 'uvim1006.tab:6513', 'uvim1006.tab:6575', 'uvim1006.tab:6637', 'uvim1006.tab:6699', 'uvim1006.tab:6761', 'uvim1006.tab:6823', 'uvim1006.tab:6885', 'uvim1006.tab:6947', 'uvim1006.tab:7009', 'uvim1006.tab:7071', 'uvim1006.tab:7133', 'uvim1006.tab:7195']" self.setglobal(__file__) self.runpy() class countrateCase78(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f475x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5125', 'uvim1006.tab:5127', 'uvim1006.tab:5128', 'uvim1006.tab:5129', 'uvim1006.tab:5335', 'uvim1006.tab:5397', 'uvim1006.tab:5459', 'uvim1006.tab:5521', 'uvim1006.tab:5583', 'uvim1006.tab:5645', 'uvim1006.tab:5707', 'uvim1006.tab:5769', 'uvim1006.tab:5831', 'uvim1006.tab:5893', 'uvim1006.tab:5955', 'uvim1006.tab:6017', 'uvim1006.tab:6079', 'uvim1006.tab:6141', 'uvim1006.tab:6203', 'uvim1006.tab:6265', 'uvim1006.tab:6327', 'uvim1006.tab:6389', 'uvim1006.tab:6451', 'uvim1006.tab:6513', 'uvim1006.tab:6575', 'uvim1006.tab:6637', 'uvim1006.tab:6699', 'uvim1006.tab:6761', 'uvim1006.tab:6823', 'uvim1006.tab:6885', 'uvim1006.tab:6947', 'uvim1006.tab:7009', 'uvim1006.tab:7071']" self.setglobal(__file__) self.runpy() class calcphotCase79(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f475x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5125', 'uvim1006.tab:5127', 'uvim1006.tab:5128', 'uvim1006.tab:5129', 'uvim1006.tab:5335', 'uvim1006.tab:5397', 'uvim1006.tab:5459', 'uvim1006.tab:5521', 'uvim1006.tab:5583', 'uvim1006.tab:5645', 'uvim1006.tab:5707', 'uvim1006.tab:5769', 'uvim1006.tab:5831', 'uvim1006.tab:5893', 'uvim1006.tab:5955', 'uvim1006.tab:6017', 'uvim1006.tab:6079', 'uvim1006.tab:6141', 'uvim1006.tab:6203', 'uvim1006.tab:6265', 'uvim1006.tab:6327', 'uvim1006.tab:6389', 'uvim1006.tab:6451', 'uvim1006.tab:6513', 'uvim1006.tab:6575', 'uvim1006.tab:6637', 'uvim1006.tab:6699', 'uvim1006.tab:6761', 'uvim1006.tab:6823', 'uvim1006.tab:6885', 'uvim1006.tab:6947', 'uvim1006.tab:7009', 'uvim1006.tab:7071']" self.setglobal(__file__) self.runpy() class countrateCase79(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f475x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5126', 'uvim1006.tab:7133', 'uvim1006.tab:7195']" self.setglobal(__file__) self.runpy() class calcphotCase80(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f475x" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5126', 'uvim1006.tab:7133', 'uvim1006.tab:7195']" self.setglobal(__file__) self.runpy() class calcphotCase81(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f487n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5130', 'uvim1006.tab:5131', 'uvim1006.tab:5132', 'uvim1006.tab:5133', 'uvim1006.tab:5134', 'uvim1006.tab:5336', 'uvim1006.tab:5398', 'uvim1006.tab:5460', 'uvim1006.tab:5522', 'uvim1006.tab:5584', 'uvim1006.tab:5646', 'uvim1006.tab:5708', 'uvim1006.tab:5770', 'uvim1006.tab:5832', 'uvim1006.tab:5894', 'uvim1006.tab:5956', 'uvim1006.tab:6018', 'uvim1006.tab:6080', 'uvim1006.tab:6142', 'uvim1006.tab:6204', 'uvim1006.tab:6266', 'uvim1006.tab:6328', 'uvim1006.tab:6390', 'uvim1006.tab:6452', 'uvim1006.tab:6514', 'uvim1006.tab:6576', 'uvim1006.tab:6638', 'uvim1006.tab:6700', 'uvim1006.tab:6762', 'uvim1006.tab:6824', 'uvim1006.tab:6886', 'uvim1006.tab:6948', 'uvim1006.tab:7010', 'uvim1006.tab:7072', 'uvim1006.tab:7134', 'uvim1006.tab:7196']" self.setglobal(__file__) self.runpy() class countrateCase80(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f487n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5130', 'uvim1006.tab:5131', 'uvim1006.tab:5132', 'uvim1006.tab:5133', 'uvim1006.tab:5134', 'uvim1006.tab:5336', 'uvim1006.tab:5398', 'uvim1006.tab:5460', 'uvim1006.tab:5522', 'uvim1006.tab:5584', 'uvim1006.tab:5646', 'uvim1006.tab:5708', 'uvim1006.tab:5770', 'uvim1006.tab:5832', 'uvim1006.tab:5894', 'uvim1006.tab:5956', 'uvim1006.tab:6018', 'uvim1006.tab:6080', 'uvim1006.tab:6142', 'uvim1006.tab:6204', 'uvim1006.tab:6266', 'uvim1006.tab:6328', 'uvim1006.tab:6390', 'uvim1006.tab:6452', 'uvim1006.tab:6514', 'uvim1006.tab:6576', 'uvim1006.tab:6638', 'uvim1006.tab:6700', 'uvim1006.tab:6762', 'uvim1006.tab:6824', 'uvim1006.tab:6886', 'uvim1006.tab:6948', 'uvim1006.tab:7010', 'uvim1006.tab:7072', 'uvim1006.tab:7134', 'uvim1006.tab:7196']" self.setglobal(__file__) self.runpy() class countrateCase81(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f487n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5130', 'uvim1006.tab:5132', 'uvim1006.tab:5133', 'uvim1006.tab:5134', 'uvim1006.tab:5336', 'uvim1006.tab:5398', 'uvim1006.tab:5460', 'uvim1006.tab:5522', 'uvim1006.tab:5584', 'uvim1006.tab:5646', 'uvim1006.tab:5708', 'uvim1006.tab:5770', 'uvim1006.tab:5832', 'uvim1006.tab:5894', 'uvim1006.tab:5956', 'uvim1006.tab:6018', 'uvim1006.tab:6080', 'uvim1006.tab:6142', 'uvim1006.tab:6204', 'uvim1006.tab:6266', 'uvim1006.tab:6328', 'uvim1006.tab:6390', 'uvim1006.tab:6452', 'uvim1006.tab:6514', 'uvim1006.tab:6576', 'uvim1006.tab:6638', 'uvim1006.tab:6700', 'uvim1006.tab:6762', 'uvim1006.tab:6824', 'uvim1006.tab:6886', 'uvim1006.tab:6948', 'uvim1006.tab:7010', 'uvim1006.tab:7072']" self.setglobal(__file__) self.runpy() class calcphotCase82(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f487n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5130', 'uvim1006.tab:5132', 'uvim1006.tab:5133', 'uvim1006.tab:5134', 'uvim1006.tab:5336', 'uvim1006.tab:5398', 'uvim1006.tab:5460', 'uvim1006.tab:5522', 'uvim1006.tab:5584', 'uvim1006.tab:5646', 'uvim1006.tab:5708', 'uvim1006.tab:5770', 'uvim1006.tab:5832', 'uvim1006.tab:5894', 'uvim1006.tab:5956', 'uvim1006.tab:6018', 'uvim1006.tab:6080', 'uvim1006.tab:6142', 'uvim1006.tab:6204', 'uvim1006.tab:6266', 'uvim1006.tab:6328', 'uvim1006.tab:6390', 'uvim1006.tab:6452', 'uvim1006.tab:6514', 'uvim1006.tab:6576', 'uvim1006.tab:6638', 'uvim1006.tab:6700', 'uvim1006.tab:6762', 'uvim1006.tab:6824', 'uvim1006.tab:6886', 'uvim1006.tab:6948', 'uvim1006.tab:7010', 'uvim1006.tab:7072']" self.setglobal(__file__) self.runpy() class countrateCase82(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f487n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5131', 'uvim1006.tab:7134', 'uvim1006.tab:7196']" self.setglobal(__file__) self.runpy() class calcphotCase83(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f487n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5131', 'uvim1006.tab:7134', 'uvim1006.tab:7196']" self.setglobal(__file__) self.runpy() class calcphotCase84(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq492n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5135', 'uvim1006.tab:5136', 'uvim1006.tab:5137', 'uvim1006.tab:5138', 'uvim1006.tab:5139', 'uvim1006.tab:5337', 'uvim1006.tab:5399', 'uvim1006.tab:5461', 'uvim1006.tab:5523', 'uvim1006.tab:5585', 'uvim1006.tab:5647', 'uvim1006.tab:5709', 'uvim1006.tab:5771', 'uvim1006.tab:5833', 'uvim1006.tab:5895', 'uvim1006.tab:5957', 'uvim1006.tab:6019', 'uvim1006.tab:6081', 'uvim1006.tab:6143', 'uvim1006.tab:6205', 'uvim1006.tab:6267', 'uvim1006.tab:6329', 'uvim1006.tab:6391', 'uvim1006.tab:6453', 'uvim1006.tab:6515', 'uvim1006.tab:6577', 'uvim1006.tab:6639', 'uvim1006.tab:6701', 'uvim1006.tab:6763', 'uvim1006.tab:6825', 'uvim1006.tab:6887', 'uvim1006.tab:6949', 'uvim1006.tab:7011', 'uvim1006.tab:7073', 'uvim1006.tab:7135', 'uvim1006.tab:7197']" self.setglobal(__file__) self.runpy() class countrateCase83(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq492n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5135', 'uvim1006.tab:5136', 'uvim1006.tab:5137', 'uvim1006.tab:5138', 'uvim1006.tab:5139', 'uvim1006.tab:5337', 'uvim1006.tab:5399', 'uvim1006.tab:5461', 'uvim1006.tab:5523', 'uvim1006.tab:5585', 'uvim1006.tab:5647', 'uvim1006.tab:5709', 'uvim1006.tab:5771', 'uvim1006.tab:5833', 'uvim1006.tab:5895', 'uvim1006.tab:5957', 'uvim1006.tab:6019', 'uvim1006.tab:6081', 'uvim1006.tab:6143', 'uvim1006.tab:6205', 'uvim1006.tab:6267', 'uvim1006.tab:6329', 'uvim1006.tab:6391', 'uvim1006.tab:6453', 'uvim1006.tab:6515', 'uvim1006.tab:6577', 'uvim1006.tab:6639', 'uvim1006.tab:6701', 'uvim1006.tab:6763', 'uvim1006.tab:6825', 'uvim1006.tab:6887', 'uvim1006.tab:6949', 'uvim1006.tab:7011', 'uvim1006.tab:7073', 'uvim1006.tab:7135', 'uvim1006.tab:7197']" self.setglobal(__file__) self.runpy() class countrateCase84(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq492n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5135', 'uvim1006.tab:5137', 'uvim1006.tab:5138', 'uvim1006.tab:5139', 'uvim1006.tab:5337', 'uvim1006.tab:5399', 'uvim1006.tab:5461', 'uvim1006.tab:5523', 'uvim1006.tab:5585', 'uvim1006.tab:5647', 'uvim1006.tab:5709', 'uvim1006.tab:5771', 'uvim1006.tab:5833', 'uvim1006.tab:5895', 'uvim1006.tab:5957', 'uvim1006.tab:6019', 'uvim1006.tab:6081', 'uvim1006.tab:6143', 'uvim1006.tab:6205', 'uvim1006.tab:6267', 'uvim1006.tab:6329', 'uvim1006.tab:6391', 'uvim1006.tab:6453', 'uvim1006.tab:6515', 'uvim1006.tab:6577', 'uvim1006.tab:6639', 'uvim1006.tab:6701', 'uvim1006.tab:6763', 'uvim1006.tab:6825', 'uvim1006.tab:6887', 'uvim1006.tab:6949', 'uvim1006.tab:7011', 'uvim1006.tab:7073']" self.setglobal(__file__) self.runpy() class calcphotCase85(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq492n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5135', 'uvim1006.tab:5137', 'uvim1006.tab:5138', 'uvim1006.tab:5139', 'uvim1006.tab:5337', 'uvim1006.tab:5399', 'uvim1006.tab:5461', 'uvim1006.tab:5523', 'uvim1006.tab:5585', 'uvim1006.tab:5647', 'uvim1006.tab:5709', 'uvim1006.tab:5771', 'uvim1006.tab:5833', 'uvim1006.tab:5895', 'uvim1006.tab:5957', 'uvim1006.tab:6019', 'uvim1006.tab:6081', 'uvim1006.tab:6143', 'uvim1006.tab:6205', 'uvim1006.tab:6267', 'uvim1006.tab:6329', 'uvim1006.tab:6391', 'uvim1006.tab:6453', 'uvim1006.tab:6515', 'uvim1006.tab:6577', 'uvim1006.tab:6639', 'uvim1006.tab:6701', 'uvim1006.tab:6763', 'uvim1006.tab:6825', 'uvim1006.tab:6887', 'uvim1006.tab:6949', 'uvim1006.tab:7011', 'uvim1006.tab:7073']" self.setglobal(__file__) self.runpy() class countrateCase85(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq492n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5136', 'uvim1006.tab:7135', 'uvim1006.tab:7197']" self.setglobal(__file__) self.runpy() class calcphotCase86(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq492n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5136', 'uvim1006.tab:7135', 'uvim1006.tab:7197']" self.setglobal(__file__) self.runpy() class calcphotCase87(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5140', 'uvim1006.tab:5141', 'uvim1006.tab:5142', 'uvim1006.tab:5143', 'uvim1006.tab:5144', 'uvim1006.tab:5338', 'uvim1006.tab:5400', 'uvim1006.tab:5462', 'uvim1006.tab:5524', 'uvim1006.tab:5586', 'uvim1006.tab:5648', 'uvim1006.tab:5710', 'uvim1006.tab:5772', 'uvim1006.tab:5834', 'uvim1006.tab:5896', 'uvim1006.tab:5958', 'uvim1006.tab:6020', 'uvim1006.tab:6082', 'uvim1006.tab:6144', 'uvim1006.tab:6206', 'uvim1006.tab:6268', 'uvim1006.tab:6330', 'uvim1006.tab:6392', 'uvim1006.tab:6454', 'uvim1006.tab:6516', 'uvim1006.tab:6578', 'uvim1006.tab:6640', 'uvim1006.tab:6702', 'uvim1006.tab:6764', 'uvim1006.tab:6826', 'uvim1006.tab:6888', 'uvim1006.tab:6950', 'uvim1006.tab:7012', 'uvim1006.tab:7074', 'uvim1006.tab:7136', 'uvim1006.tab:7198', 'uvim1006.tab:7366']" self.setglobal(__file__) self.runpy() class countrateCase86(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5140', 'uvim1006.tab:5141', 'uvim1006.tab:5142', 'uvim1006.tab:5143', 'uvim1006.tab:5144', 'uvim1006.tab:5338', 'uvim1006.tab:5400', 'uvim1006.tab:5462', 'uvim1006.tab:5524', 'uvim1006.tab:5586', 'uvim1006.tab:5648', 'uvim1006.tab:5710', 'uvim1006.tab:5772', 'uvim1006.tab:5834', 'uvim1006.tab:5896', 'uvim1006.tab:5958', 'uvim1006.tab:6020', 'uvim1006.tab:6082', 'uvim1006.tab:6144', 'uvim1006.tab:6206', 'uvim1006.tab:6268', 'uvim1006.tab:6330', 'uvim1006.tab:6392', 'uvim1006.tab:6454', 'uvim1006.tab:6516', 'uvim1006.tab:6578', 'uvim1006.tab:6640', 'uvim1006.tab:6702', 'uvim1006.tab:6764', 'uvim1006.tab:6826', 'uvim1006.tab:6888', 'uvim1006.tab:6950', 'uvim1006.tab:7012', 'uvim1006.tab:7074', 'uvim1006.tab:7136', 'uvim1006.tab:7198', 'uvim1006.tab:7366']" self.setglobal(__file__) self.runpy() class countrateCase87(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5140', 'uvim1006.tab:5142', 'uvim1006.tab:5143', 'uvim1006.tab:5144', 'uvim1006.tab:5338', 'uvim1006.tab:5400', 'uvim1006.tab:5462', 'uvim1006.tab:5524', 'uvim1006.tab:5586', 'uvim1006.tab:5648', 'uvim1006.tab:5710', 'uvim1006.tab:5772', 'uvim1006.tab:5834', 'uvim1006.tab:5896', 'uvim1006.tab:5958', 'uvim1006.tab:6020', 'uvim1006.tab:6082', 'uvim1006.tab:6144', 'uvim1006.tab:6206', 'uvim1006.tab:6268', 'uvim1006.tab:6330', 'uvim1006.tab:6392', 'uvim1006.tab:6454', 'uvim1006.tab:6516', 'uvim1006.tab:6578', 'uvim1006.tab:6640', 'uvim1006.tab:6702', 'uvim1006.tab:6764', 'uvim1006.tab:6826', 'uvim1006.tab:6888', 'uvim1006.tab:6950', 'uvim1006.tab:7012', 'uvim1006.tab:7074']" self.setglobal(__file__) self.runpy() class calcphotCase88(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5140', 'uvim1006.tab:5142', 'uvim1006.tab:5143', 'uvim1006.tab:5144', 'uvim1006.tab:5338', 'uvim1006.tab:5400', 'uvim1006.tab:5462', 'uvim1006.tab:5524', 'uvim1006.tab:5586', 'uvim1006.tab:5648', 'uvim1006.tab:5710', 'uvim1006.tab:5772', 'uvim1006.tab:5834', 'uvim1006.tab:5896', 'uvim1006.tab:5958', 'uvim1006.tab:6020', 'uvim1006.tab:6082', 'uvim1006.tab:6144', 'uvim1006.tab:6206', 'uvim1006.tab:6268', 'uvim1006.tab:6330', 'uvim1006.tab:6392', 'uvim1006.tab:6454', 'uvim1006.tab:6516', 'uvim1006.tab:6578', 'uvim1006.tab:6640', 'uvim1006.tab:6702', 'uvim1006.tab:6764', 'uvim1006.tab:6826', 'uvim1006.tab:6888', 'uvim1006.tab:6950', 'uvim1006.tab:7012', 'uvim1006.tab:7074']" self.setglobal(__file__) self.runpy() class countrateCase88(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5141', 'uvim1006.tab:7136', 'uvim1006.tab:7198']" self.setglobal(__file__) self.runpy() class calcphotCase89(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5141', 'uvim1006.tab:7136', 'uvim1006.tab:7198']" self.setglobal(__file__) self.runpy() class calcphotCase90(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq508n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5145', 'uvim1006.tab:5146', 'uvim1006.tab:5147', 'uvim1006.tab:5148', 'uvim1006.tab:5149', 'uvim1006.tab:5339', 'uvim1006.tab:5401', 'uvim1006.tab:5463', 'uvim1006.tab:5525', 'uvim1006.tab:5587', 'uvim1006.tab:5649', 'uvim1006.tab:5711', 'uvim1006.tab:5773', 'uvim1006.tab:5835', 'uvim1006.tab:5897', 'uvim1006.tab:5959', 'uvim1006.tab:6021', 'uvim1006.tab:6083', 'uvim1006.tab:6145', 'uvim1006.tab:6207', 'uvim1006.tab:6269', 'uvim1006.tab:6331', 'uvim1006.tab:6393', 'uvim1006.tab:6455', 'uvim1006.tab:6517', 'uvim1006.tab:6579', 'uvim1006.tab:6641', 'uvim1006.tab:6703', 'uvim1006.tab:6765', 'uvim1006.tab:6827', 'uvim1006.tab:6889', 'uvim1006.tab:6951', 'uvim1006.tab:7013', 'uvim1006.tab:7075', 'uvim1006.tab:7137', 'uvim1006.tab:7199']" self.setglobal(__file__) self.runpy() class countrateCase89(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq508n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5145', 'uvim1006.tab:5146', 'uvim1006.tab:5147', 'uvim1006.tab:5148', 'uvim1006.tab:5149', 'uvim1006.tab:5339', 'uvim1006.tab:5401', 'uvim1006.tab:5463', 'uvim1006.tab:5525', 'uvim1006.tab:5587', 'uvim1006.tab:5649', 'uvim1006.tab:5711', 'uvim1006.tab:5773', 'uvim1006.tab:5835', 'uvim1006.tab:5897', 'uvim1006.tab:5959', 'uvim1006.tab:6021', 'uvim1006.tab:6083', 'uvim1006.tab:6145', 'uvim1006.tab:6207', 'uvim1006.tab:6269', 'uvim1006.tab:6331', 'uvim1006.tab:6393', 'uvim1006.tab:6455', 'uvim1006.tab:6517', 'uvim1006.tab:6579', 'uvim1006.tab:6641', 'uvim1006.tab:6703', 'uvim1006.tab:6765', 'uvim1006.tab:6827', 'uvim1006.tab:6889', 'uvim1006.tab:6951', 'uvim1006.tab:7013', 'uvim1006.tab:7075', 'uvim1006.tab:7137', 'uvim1006.tab:7199']" self.setglobal(__file__) self.runpy() class countrateCase90(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq508n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5145', 'uvim1006.tab:5147', 'uvim1006.tab:5148', 'uvim1006.tab:5149', 'uvim1006.tab:5339', 'uvim1006.tab:5401', 'uvim1006.tab:5463', 'uvim1006.tab:5525', 'uvim1006.tab:5587', 'uvim1006.tab:5649', 'uvim1006.tab:5711', 'uvim1006.tab:5773', 'uvim1006.tab:5835', 'uvim1006.tab:5897', 'uvim1006.tab:5959', 'uvim1006.tab:6021', 'uvim1006.tab:6083', 'uvim1006.tab:6145', 'uvim1006.tab:6207', 'uvim1006.tab:6269', 'uvim1006.tab:6331', 'uvim1006.tab:6393', 'uvim1006.tab:6455', 'uvim1006.tab:6517', 'uvim1006.tab:6579', 'uvim1006.tab:6641', 'uvim1006.tab:6703', 'uvim1006.tab:6765', 'uvim1006.tab:6827', 'uvim1006.tab:6889', 'uvim1006.tab:6951', 'uvim1006.tab:7013', 'uvim1006.tab:7075']" self.setglobal(__file__) self.runpy() class calcphotCase91(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq508n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5145', 'uvim1006.tab:5147', 'uvim1006.tab:5148', 'uvim1006.tab:5149', 'uvim1006.tab:5339', 'uvim1006.tab:5401', 'uvim1006.tab:5463', 'uvim1006.tab:5525', 'uvim1006.tab:5587', 'uvim1006.tab:5649', 'uvim1006.tab:5711', 'uvim1006.tab:5773', 'uvim1006.tab:5835', 'uvim1006.tab:5897', 'uvim1006.tab:5959', 'uvim1006.tab:6021', 'uvim1006.tab:6083', 'uvim1006.tab:6145', 'uvim1006.tab:6207', 'uvim1006.tab:6269', 'uvim1006.tab:6331', 'uvim1006.tab:6393', 'uvim1006.tab:6455', 'uvim1006.tab:6517', 'uvim1006.tab:6579', 'uvim1006.tab:6641', 'uvim1006.tab:6703', 'uvim1006.tab:6765', 'uvim1006.tab:6827', 'uvim1006.tab:6889', 'uvim1006.tab:6951', 'uvim1006.tab:7013', 'uvim1006.tab:7075']" self.setglobal(__file__) self.runpy() class countrateCase91(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq508n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5146', 'uvim1006.tab:7137', 'uvim1006.tab:7199']" self.setglobal(__file__) self.runpy() class calcphotCase92(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq508n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5146', 'uvim1006.tab:7137', 'uvim1006.tab:7199']" self.setglobal(__file__) self.runpy() class calcphotCase93(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f547m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5150', 'uvim1006.tab:5151', 'uvim1006.tab:5152', 'uvim1006.tab:5153', 'uvim1006.tab:5154', 'uvim1006.tab:5340', 'uvim1006.tab:5402', 'uvim1006.tab:5464', 'uvim1006.tab:5526', 'uvim1006.tab:5588', 'uvim1006.tab:5650', 'uvim1006.tab:5712', 'uvim1006.tab:5774', 'uvim1006.tab:5836', 'uvim1006.tab:5898', 'uvim1006.tab:5960', 'uvim1006.tab:6022', 'uvim1006.tab:6084', 'uvim1006.tab:6146', 'uvim1006.tab:6208', 'uvim1006.tab:6270', 'uvim1006.tab:6332', 'uvim1006.tab:6394', 'uvim1006.tab:6456', 'uvim1006.tab:6518', 'uvim1006.tab:6580', 'uvim1006.tab:6642', 'uvim1006.tab:6704', 'uvim1006.tab:6766', 'uvim1006.tab:6828', 'uvim1006.tab:6890', 'uvim1006.tab:6952', 'uvim1006.tab:7014', 'uvim1006.tab:7076', 'uvim1006.tab:7138', 'uvim1006.tab:7200']" self.setglobal(__file__) self.runpy() class countrateCase92(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f547m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5150', 'uvim1006.tab:5151', 'uvim1006.tab:5152', 'uvim1006.tab:5153', 'uvim1006.tab:5154', 'uvim1006.tab:5340', 'uvim1006.tab:5402', 'uvim1006.tab:5464', 'uvim1006.tab:5526', 'uvim1006.tab:5588', 'uvim1006.tab:5650', 'uvim1006.tab:5712', 'uvim1006.tab:5774', 'uvim1006.tab:5836', 'uvim1006.tab:5898', 'uvim1006.tab:5960', 'uvim1006.tab:6022', 'uvim1006.tab:6084', 'uvim1006.tab:6146', 'uvim1006.tab:6208', 'uvim1006.tab:6270', 'uvim1006.tab:6332', 'uvim1006.tab:6394', 'uvim1006.tab:6456', 'uvim1006.tab:6518', 'uvim1006.tab:6580', 'uvim1006.tab:6642', 'uvim1006.tab:6704', 'uvim1006.tab:6766', 'uvim1006.tab:6828', 'uvim1006.tab:6890', 'uvim1006.tab:6952', 'uvim1006.tab:7014', 'uvim1006.tab:7076', 'uvim1006.tab:7138', 'uvim1006.tab:7200']" self.setglobal(__file__) self.runpy() class countrateCase93(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f547m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5150', 'uvim1006.tab:5152', 'uvim1006.tab:5153', 'uvim1006.tab:5154', 'uvim1006.tab:5340', 'uvim1006.tab:5402', 'uvim1006.tab:5464', 'uvim1006.tab:5526', 'uvim1006.tab:5588', 'uvim1006.tab:5650', 'uvim1006.tab:5712', 'uvim1006.tab:5774', 'uvim1006.tab:5836', 'uvim1006.tab:5898', 'uvim1006.tab:5960', 'uvim1006.tab:6022', 'uvim1006.tab:6084', 'uvim1006.tab:6146', 'uvim1006.tab:6208', 'uvim1006.tab:6270', 'uvim1006.tab:6332', 'uvim1006.tab:6394', 'uvim1006.tab:6456', 'uvim1006.tab:6518', 'uvim1006.tab:6580', 'uvim1006.tab:6642', 'uvim1006.tab:6704', 'uvim1006.tab:6766', 'uvim1006.tab:6828', 'uvim1006.tab:6890', 'uvim1006.tab:6952', 'uvim1006.tab:7014', 'uvim1006.tab:7076']" self.setglobal(__file__) self.runpy() class calcphotCase94(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f547m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5150', 'uvim1006.tab:5152', 'uvim1006.tab:5153', 'uvim1006.tab:5154', 'uvim1006.tab:5340', 'uvim1006.tab:5402', 'uvim1006.tab:5464', 'uvim1006.tab:5526', 'uvim1006.tab:5588', 'uvim1006.tab:5650', 'uvim1006.tab:5712', 'uvim1006.tab:5774', 'uvim1006.tab:5836', 'uvim1006.tab:5898', 'uvim1006.tab:5960', 'uvim1006.tab:6022', 'uvim1006.tab:6084', 'uvim1006.tab:6146', 'uvim1006.tab:6208', 'uvim1006.tab:6270', 'uvim1006.tab:6332', 'uvim1006.tab:6394', 'uvim1006.tab:6456', 'uvim1006.tab:6518', 'uvim1006.tab:6580', 'uvim1006.tab:6642', 'uvim1006.tab:6704', 'uvim1006.tab:6766', 'uvim1006.tab:6828', 'uvim1006.tab:6890', 'uvim1006.tab:6952', 'uvim1006.tab:7014', 'uvim1006.tab:7076']" self.setglobal(__file__) self.runpy() class countrateCase94(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f547m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5151', 'uvim1006.tab:7138', 'uvim1006.tab:7200']" self.setglobal(__file__) self.runpy() class calcphotCase95(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f547m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5151', 'uvim1006.tab:7138', 'uvim1006.tab:7200']" self.setglobal(__file__) self.runpy() class calcphotCase96(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5155', 'uvim1006.tab:5156', 'uvim1006.tab:5157', 'uvim1006.tab:5158', 'uvim1006.tab:5159', 'uvim1006.tab:5341', 'uvim1006.tab:5403', 'uvim1006.tab:5465', 'uvim1006.tab:5527', 'uvim1006.tab:5589', 'uvim1006.tab:5651', 'uvim1006.tab:5713', 'uvim1006.tab:5775', 'uvim1006.tab:5837', 'uvim1006.tab:5899', 'uvim1006.tab:5961', 'uvim1006.tab:6023', 'uvim1006.tab:6085', 'uvim1006.tab:6147', 'uvim1006.tab:6209', 'uvim1006.tab:6271', 'uvim1006.tab:6333', 'uvim1006.tab:6395', 'uvim1006.tab:6457', 'uvim1006.tab:6519', 'uvim1006.tab:6581', 'uvim1006.tab:6643', 'uvim1006.tab:6705', 'uvim1006.tab:6767', 'uvim1006.tab:6829', 'uvim1006.tab:6891', 'uvim1006.tab:6953', 'uvim1006.tab:7015', 'uvim1006.tab:7077', 'uvim1006.tab:7139', 'uvim1006.tab:7201', 'uvim1006.tab:7328', 'uvim1006.tab:7329', 'uvim1006.tab:7330', 'uvim1006.tab:7331', 'uvim1006.tab:7332', 'uvim1006.tab:7333', 'uvim1006.tab:7334', 'uvim1006.tab:7335', 'uvim1006.tab:7336', 'uvim1006.tab:7337', 'uvim1006.tab:7338', 'uvim1006.tab:7339', 'uvim1006.tab:7340', 'uvim1006.tab:7341', 'uvim1006.tab:7342', 'uvim1006.tab:7343', 'uvim1006.tab:7344', 'uvim1006.tab:7345', 'uvim1006.tab:7346', 'uvim1006.tab:7347', 'uvim1006.tab:7348', 'uvim1006.tab:7349', 'uvim1006.tab:7350', 'uvim1006.tab:7351', 'uvim1006.tab:7352', 'uvim1006.tab:7353', 'uvim1006.tab:7354', 'uvim1006.tab:7355']" self.setglobal(__file__) self.runpy() class countrateCase95(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5155', 'uvim1006.tab:5156', 'uvim1006.tab:5157', 'uvim1006.tab:5158', 'uvim1006.tab:5159', 'uvim1006.tab:5341', 'uvim1006.tab:5403', 'uvim1006.tab:5465', 'uvim1006.tab:5527', 'uvim1006.tab:5589', 'uvim1006.tab:5651', 'uvim1006.tab:5713', 'uvim1006.tab:5775', 'uvim1006.tab:5837', 'uvim1006.tab:5899', 'uvim1006.tab:5961', 'uvim1006.tab:6023', 'uvim1006.tab:6085', 'uvim1006.tab:6147', 'uvim1006.tab:6209', 'uvim1006.tab:6271', 'uvim1006.tab:6333', 'uvim1006.tab:6395', 'uvim1006.tab:6457', 'uvim1006.tab:6519', 'uvim1006.tab:6581', 'uvim1006.tab:6643', 'uvim1006.tab:6705', 'uvim1006.tab:6767', 'uvim1006.tab:6829', 'uvim1006.tab:6891', 'uvim1006.tab:6953', 'uvim1006.tab:7015', 'uvim1006.tab:7077', 'uvim1006.tab:7139', 'uvim1006.tab:7201', 'uvim1006.tab:7328', 'uvim1006.tab:7329', 'uvim1006.tab:7330', 'uvim1006.tab:7331', 'uvim1006.tab:7332', 'uvim1006.tab:7333', 'uvim1006.tab:7334', 'uvim1006.tab:7335', 'uvim1006.tab:7336', 'uvim1006.tab:7337', 'uvim1006.tab:7338', 'uvim1006.tab:7339', 'uvim1006.tab:7340', 'uvim1006.tab:7341', 'uvim1006.tab:7342', 'uvim1006.tab:7343', 'uvim1006.tab:7344', 'uvim1006.tab:7345', 'uvim1006.tab:7346', 'uvim1006.tab:7347', 'uvim1006.tab:7348', 'uvim1006.tab:7349', 'uvim1006.tab:7350', 'uvim1006.tab:7351', 'uvim1006.tab:7352', 'uvim1006.tab:7353', 'uvim1006.tab:7354', 'uvim1006.tab:7355']" self.setglobal(__file__) self.runpy() class countrateCase96(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5155', 'uvim1006.tab:5157', 'uvim1006.tab:5158', 'uvim1006.tab:5159', 'uvim1006.tab:5341', 'uvim1006.tab:5403', 'uvim1006.tab:5465', 'uvim1006.tab:5527', 'uvim1006.tab:5589', 'uvim1006.tab:5651', 'uvim1006.tab:5713', 'uvim1006.tab:5775', 'uvim1006.tab:5837', 'uvim1006.tab:5899', 'uvim1006.tab:5961', 'uvim1006.tab:6023', 'uvim1006.tab:6085', 'uvim1006.tab:6147', 'uvim1006.tab:6209', 'uvim1006.tab:6271', 'uvim1006.tab:6333', 'uvim1006.tab:6395', 'uvim1006.tab:6457', 'uvim1006.tab:6519', 'uvim1006.tab:6581', 'uvim1006.tab:6643', 'uvim1006.tab:6705', 'uvim1006.tab:6767', 'uvim1006.tab:6829', 'uvim1006.tab:6891', 'uvim1006.tab:6953', 'uvim1006.tab:7015', 'uvim1006.tab:7077']" self.setglobal(__file__) self.runpy() class calcphotCase97(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5155', 'uvim1006.tab:5157', 'uvim1006.tab:5158', 'uvim1006.tab:5159', 'uvim1006.tab:5341', 'uvim1006.tab:5403', 'uvim1006.tab:5465', 'uvim1006.tab:5527', 'uvim1006.tab:5589', 'uvim1006.tab:5651', 'uvim1006.tab:5713', 'uvim1006.tab:5775', 'uvim1006.tab:5837', 'uvim1006.tab:5899', 'uvim1006.tab:5961', 'uvim1006.tab:6023', 'uvim1006.tab:6085', 'uvim1006.tab:6147', 'uvim1006.tab:6209', 'uvim1006.tab:6271', 'uvim1006.tab:6333', 'uvim1006.tab:6395', 'uvim1006.tab:6457', 'uvim1006.tab:6519', 'uvim1006.tab:6581', 'uvim1006.tab:6643', 'uvim1006.tab:6705', 'uvim1006.tab:6767', 'uvim1006.tab:6829', 'uvim1006.tab:6891', 'uvim1006.tab:6953', 'uvim1006.tab:7015', 'uvim1006.tab:7077']" self.setglobal(__file__) self.runpy() class countrateCase97(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5156', 'uvim1006.tab:7139', 'uvim1006.tab:7201']" self.setglobal(__file__) self.runpy() class calcphotCase98(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5156', 'uvim1006.tab:7139', 'uvim1006.tab:7201']" self.setglobal(__file__) self.runpy() class calcphotCase99(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq575n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5160', 'uvim1006.tab:5161', 'uvim1006.tab:5162', 'uvim1006.tab:5163', 'uvim1006.tab:5164', 'uvim1006.tab:5342', 'uvim1006.tab:5404', 'uvim1006.tab:5466', 'uvim1006.tab:5528', 'uvim1006.tab:5590', 'uvim1006.tab:5652', 'uvim1006.tab:5714', 'uvim1006.tab:5776', 'uvim1006.tab:5838', 'uvim1006.tab:5900', 'uvim1006.tab:5962', 'uvim1006.tab:6024', 'uvim1006.tab:6086', 'uvim1006.tab:6148', 'uvim1006.tab:6210', 'uvim1006.tab:6272', 'uvim1006.tab:6334', 'uvim1006.tab:6396', 'uvim1006.tab:6458', 'uvim1006.tab:6520', 'uvim1006.tab:6582', 'uvim1006.tab:6644', 'uvim1006.tab:6706', 'uvim1006.tab:6768', 'uvim1006.tab:6830', 'uvim1006.tab:6892', 'uvim1006.tab:6954', 'uvim1006.tab:7016', 'uvim1006.tab:7078', 'uvim1006.tab:7140', 'uvim1006.tab:7202']" self.setglobal(__file__) self.runpy() class countrateCase98(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq575n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5160', 'uvim1006.tab:5161', 'uvim1006.tab:5162', 'uvim1006.tab:5163', 'uvim1006.tab:5164', 'uvim1006.tab:5342', 'uvim1006.tab:5404', 'uvim1006.tab:5466', 'uvim1006.tab:5528', 'uvim1006.tab:5590', 'uvim1006.tab:5652', 'uvim1006.tab:5714', 'uvim1006.tab:5776', 'uvim1006.tab:5838', 'uvim1006.tab:5900', 'uvim1006.tab:5962', 'uvim1006.tab:6024', 'uvim1006.tab:6086', 'uvim1006.tab:6148', 'uvim1006.tab:6210', 'uvim1006.tab:6272', 'uvim1006.tab:6334', 'uvim1006.tab:6396', 'uvim1006.tab:6458', 'uvim1006.tab:6520', 'uvim1006.tab:6582', 'uvim1006.tab:6644', 'uvim1006.tab:6706', 'uvim1006.tab:6768', 'uvim1006.tab:6830', 'uvim1006.tab:6892', 'uvim1006.tab:6954', 'uvim1006.tab:7016', 'uvim1006.tab:7078', 'uvim1006.tab:7140', 'uvim1006.tab:7202']" self.setglobal(__file__) self.runpy() class countrateCase99(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq575n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5160', 'uvim1006.tab:5162', 'uvim1006.tab:5163', 'uvim1006.tab:5164', 'uvim1006.tab:5342', 'uvim1006.tab:5404', 'uvim1006.tab:5466', 'uvim1006.tab:5528', 'uvim1006.tab:5590', 'uvim1006.tab:5652', 'uvim1006.tab:5714', 'uvim1006.tab:5776', 'uvim1006.tab:5838', 'uvim1006.tab:5900', 'uvim1006.tab:5962', 'uvim1006.tab:6024', 'uvim1006.tab:6086', 'uvim1006.tab:6148', 'uvim1006.tab:6210', 'uvim1006.tab:6272', 'uvim1006.tab:6334', 'uvim1006.tab:6396', 'uvim1006.tab:6458', 'uvim1006.tab:6520', 'uvim1006.tab:6582', 'uvim1006.tab:6644', 'uvim1006.tab:6706', 'uvim1006.tab:6768', 'uvim1006.tab:6830', 'uvim1006.tab:6892', 'uvim1006.tab:6954', 'uvim1006.tab:7016', 'uvim1006.tab:7078']" self.setglobal(__file__) self.runpy() class calcphotCase100(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq575n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5160', 'uvim1006.tab:5162', 'uvim1006.tab:5163', 'uvim1006.tab:5164', 'uvim1006.tab:5342', 'uvim1006.tab:5404', 'uvim1006.tab:5466', 'uvim1006.tab:5528', 'uvim1006.tab:5590', 'uvim1006.tab:5652', 'uvim1006.tab:5714', 'uvim1006.tab:5776', 'uvim1006.tab:5838', 'uvim1006.tab:5900', 'uvim1006.tab:5962', 'uvim1006.tab:6024', 'uvim1006.tab:6086', 'uvim1006.tab:6148', 'uvim1006.tab:6210', 'uvim1006.tab:6272', 'uvim1006.tab:6334', 'uvim1006.tab:6396', 'uvim1006.tab:6458', 'uvim1006.tab:6520', 'uvim1006.tab:6582', 'uvim1006.tab:6644', 'uvim1006.tab:6706', 'uvim1006.tab:6768', 'uvim1006.tab:6830', 'uvim1006.tab:6892', 'uvim1006.tab:6954', 'uvim1006.tab:7016', 'uvim1006.tab:7078']" self.setglobal(__file__) self.runpy() class countrateCase100(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq575n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5161', 'uvim1006.tab:7140', 'uvim1006.tab:7202']" self.setglobal(__file__) self.runpy() class calcphotCase101(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq575n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5161', 'uvim1006.tab:7140', 'uvim1006.tab:7202']" self.setglobal(__file__) self.runpy() class calcphotCase102(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f600lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5165', 'uvim1006.tab:5166', 'uvim1006.tab:5167', 'uvim1006.tab:5168', 'uvim1006.tab:5169', 'uvim1006.tab:5343', 'uvim1006.tab:5405', 'uvim1006.tab:5467', 'uvim1006.tab:5529', 'uvim1006.tab:5591', 'uvim1006.tab:5653', 'uvim1006.tab:5715', 'uvim1006.tab:5777', 'uvim1006.tab:5839', 'uvim1006.tab:5901', 'uvim1006.tab:5963', 'uvim1006.tab:6025', 'uvim1006.tab:6087', 'uvim1006.tab:6149', 'uvim1006.tab:6211', 'uvim1006.tab:6273', 'uvim1006.tab:6335', 'uvim1006.tab:6397', 'uvim1006.tab:6459', 'uvim1006.tab:6521', 'uvim1006.tab:6583', 'uvim1006.tab:6645', 'uvim1006.tab:6707', 'uvim1006.tab:6769', 'uvim1006.tab:6831', 'uvim1006.tab:6893', 'uvim1006.tab:6955', 'uvim1006.tab:7017', 'uvim1006.tab:7079', 'uvim1006.tab:7141', 'uvim1006.tab:7203']" self.setglobal(__file__) self.runpy() class countrateCase101(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f600lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5165', 'uvim1006.tab:5166', 'uvim1006.tab:5167', 'uvim1006.tab:5168', 'uvim1006.tab:5169', 'uvim1006.tab:5343', 'uvim1006.tab:5405', 'uvim1006.tab:5467', 'uvim1006.tab:5529', 'uvim1006.tab:5591', 'uvim1006.tab:5653', 'uvim1006.tab:5715', 'uvim1006.tab:5777', 'uvim1006.tab:5839', 'uvim1006.tab:5901', 'uvim1006.tab:5963', 'uvim1006.tab:6025', 'uvim1006.tab:6087', 'uvim1006.tab:6149', 'uvim1006.tab:6211', 'uvim1006.tab:6273', 'uvim1006.tab:6335', 'uvim1006.tab:6397', 'uvim1006.tab:6459', 'uvim1006.tab:6521', 'uvim1006.tab:6583', 'uvim1006.tab:6645', 'uvim1006.tab:6707', 'uvim1006.tab:6769', 'uvim1006.tab:6831', 'uvim1006.tab:6893', 'uvim1006.tab:6955', 'uvim1006.tab:7017', 'uvim1006.tab:7079', 'uvim1006.tab:7141', 'uvim1006.tab:7203']" self.setglobal(__file__) self.runpy() class countrateCase102(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f600lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5165', 'uvim1006.tab:5167', 'uvim1006.tab:5168', 'uvim1006.tab:5169', 'uvim1006.tab:5343', 'uvim1006.tab:5405', 'uvim1006.tab:5467', 'uvim1006.tab:5529', 'uvim1006.tab:5591', 'uvim1006.tab:5653', 'uvim1006.tab:5715', 'uvim1006.tab:5777', 'uvim1006.tab:5839', 'uvim1006.tab:5901', 'uvim1006.tab:5963', 'uvim1006.tab:6025', 'uvim1006.tab:6087', 'uvim1006.tab:6149', 'uvim1006.tab:6211', 'uvim1006.tab:6273', 'uvim1006.tab:6335', 'uvim1006.tab:6397', 'uvim1006.tab:6459', 'uvim1006.tab:6521', 'uvim1006.tab:6583', 'uvim1006.tab:6645', 'uvim1006.tab:6707', 'uvim1006.tab:6769', 'uvim1006.tab:6831', 'uvim1006.tab:6893', 'uvim1006.tab:6955', 'uvim1006.tab:7017', 'uvim1006.tab:7079']" self.setglobal(__file__) self.runpy() class calcphotCase103(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f600lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5165', 'uvim1006.tab:5167', 'uvim1006.tab:5168', 'uvim1006.tab:5169', 'uvim1006.tab:5343', 'uvim1006.tab:5405', 'uvim1006.tab:5467', 'uvim1006.tab:5529', 'uvim1006.tab:5591', 'uvim1006.tab:5653', 'uvim1006.tab:5715', 'uvim1006.tab:5777', 'uvim1006.tab:5839', 'uvim1006.tab:5901', 'uvim1006.tab:5963', 'uvim1006.tab:6025', 'uvim1006.tab:6087', 'uvim1006.tab:6149', 'uvim1006.tab:6211', 'uvim1006.tab:6273', 'uvim1006.tab:6335', 'uvim1006.tab:6397', 'uvim1006.tab:6459', 'uvim1006.tab:6521', 'uvim1006.tab:6583', 'uvim1006.tab:6645', 'uvim1006.tab:6707', 'uvim1006.tab:6769', 'uvim1006.tab:6831', 'uvim1006.tab:6893', 'uvim1006.tab:6955', 'uvim1006.tab:7017', 'uvim1006.tab:7079']" self.setglobal(__file__) self.runpy() class countrateCase103(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f600lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5166', 'uvim1006.tab:7141', 'uvim1006.tab:7203']" self.setglobal(__file__) self.runpy() class calcphotCase104(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f600lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5166', 'uvim1006.tab:7141', 'uvim1006.tab:7203']" self.setglobal(__file__) self.runpy() class calcphotCase105(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5170', 'uvim1006.tab:5171', 'uvim1006.tab:5172', 'uvim1006.tab:5173', 'uvim1006.tab:5174', 'uvim1006.tab:5344', 'uvim1006.tab:5406', 'uvim1006.tab:5468', 'uvim1006.tab:5530', 'uvim1006.tab:5592', 'uvim1006.tab:5654', 'uvim1006.tab:5716', 'uvim1006.tab:5778', 'uvim1006.tab:5840', 'uvim1006.tab:5902', 'uvim1006.tab:5964', 'uvim1006.tab:6026', 'uvim1006.tab:6088', 'uvim1006.tab:6150', 'uvim1006.tab:6212', 'uvim1006.tab:6274', 'uvim1006.tab:6336', 'uvim1006.tab:6398', 'uvim1006.tab:6460', 'uvim1006.tab:6522', 'uvim1006.tab:6584', 'uvim1006.tab:6646', 'uvim1006.tab:6708', 'uvim1006.tab:6770', 'uvim1006.tab:6832', 'uvim1006.tab:6894', 'uvim1006.tab:6956', 'uvim1006.tab:7018', 'uvim1006.tab:7080', 'uvim1006.tab:7142', 'uvim1006.tab:7204', 'uvim1006.tab:7232', 'uvim1006.tab:7233', 'uvim1006.tab:7234', 'uvim1006.tab:7235', 'uvim1006.tab:7236', 'uvim1006.tab:7237', 'uvim1006.tab:7238', 'uvim1006.tab:7239', 'uvim1006.tab:7240', 'uvim1006.tab:7241', 'uvim1006.tab:7242', 'uvim1006.tab:7243', 'uvim1006.tab:7244', 'uvim1006.tab:7245', 'uvim1006.tab:7246', 'uvim1006.tab:7247', 'uvim1006.tab:7248', 'uvim1006.tab:7249', 'uvim1006.tab:7250', 'uvim1006.tab:7251', 'uvim1006.tab:7252', 'uvim1006.tab:7253', 'uvim1006.tab:7254', 'uvim1006.tab:7255']" self.setglobal(__file__) self.runpy() class countrateCase104(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5170', 'uvim1006.tab:5171', 'uvim1006.tab:5172', 'uvim1006.tab:5173', 'uvim1006.tab:5174', 'uvim1006.tab:5344', 'uvim1006.tab:5406', 'uvim1006.tab:5468', 'uvim1006.tab:5530', 'uvim1006.tab:5592', 'uvim1006.tab:5654', 'uvim1006.tab:5716', 'uvim1006.tab:5778', 'uvim1006.tab:5840', 'uvim1006.tab:5902', 'uvim1006.tab:5964', 'uvim1006.tab:6026', 'uvim1006.tab:6088', 'uvim1006.tab:6150', 'uvim1006.tab:6212', 'uvim1006.tab:6274', 'uvim1006.tab:6336', 'uvim1006.tab:6398', 'uvim1006.tab:6460', 'uvim1006.tab:6522', 'uvim1006.tab:6584', 'uvim1006.tab:6646', 'uvim1006.tab:6708', 'uvim1006.tab:6770', 'uvim1006.tab:6832', 'uvim1006.tab:6894', 'uvim1006.tab:6956', 'uvim1006.tab:7018', 'uvim1006.tab:7080', 'uvim1006.tab:7142', 'uvim1006.tab:7204', 'uvim1006.tab:7232', 'uvim1006.tab:7233', 'uvim1006.tab:7234', 'uvim1006.tab:7235', 'uvim1006.tab:7236', 'uvim1006.tab:7237', 'uvim1006.tab:7238', 'uvim1006.tab:7239', 'uvim1006.tab:7240', 'uvim1006.tab:7241', 'uvim1006.tab:7242', 'uvim1006.tab:7243', 'uvim1006.tab:7244', 'uvim1006.tab:7245', 'uvim1006.tab:7246', 'uvim1006.tab:7247', 'uvim1006.tab:7248', 'uvim1006.tab:7249', 'uvim1006.tab:7250', 'uvim1006.tab:7251', 'uvim1006.tab:7252', 'uvim1006.tab:7253', 'uvim1006.tab:7254', 'uvim1006.tab:7255']" self.setglobal(__file__) self.runpy() class countrateCase105(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5170', 'uvim1006.tab:5172', 'uvim1006.tab:5173', 'uvim1006.tab:5174', 'uvim1006.tab:5344', 'uvim1006.tab:5406', 'uvim1006.tab:5468', 'uvim1006.tab:5530', 'uvim1006.tab:5592', 'uvim1006.tab:5654', 'uvim1006.tab:5716', 'uvim1006.tab:5778', 'uvim1006.tab:5840', 'uvim1006.tab:5902', 'uvim1006.tab:5964', 'uvim1006.tab:6026', 'uvim1006.tab:6088', 'uvim1006.tab:6150', 'uvim1006.tab:6212', 'uvim1006.tab:6274', 'uvim1006.tab:6336', 'uvim1006.tab:6398', 'uvim1006.tab:6460', 'uvim1006.tab:6522', 'uvim1006.tab:6584', 'uvim1006.tab:6646', 'uvim1006.tab:6708', 'uvim1006.tab:6770', 'uvim1006.tab:6832', 'uvim1006.tab:6894', 'uvim1006.tab:6956', 'uvim1006.tab:7018', 'uvim1006.tab:7080']" self.setglobal(__file__) self.runpy() class calcphotCase106(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5170', 'uvim1006.tab:5172', 'uvim1006.tab:5173', 'uvim1006.tab:5174', 'uvim1006.tab:5344', 'uvim1006.tab:5406', 'uvim1006.tab:5468', 'uvim1006.tab:5530', 'uvim1006.tab:5592', 'uvim1006.tab:5654', 'uvim1006.tab:5716', 'uvim1006.tab:5778', 'uvim1006.tab:5840', 'uvim1006.tab:5902', 'uvim1006.tab:5964', 'uvim1006.tab:6026', 'uvim1006.tab:6088', 'uvim1006.tab:6150', 'uvim1006.tab:6212', 'uvim1006.tab:6274', 'uvim1006.tab:6336', 'uvim1006.tab:6398', 'uvim1006.tab:6460', 'uvim1006.tab:6522', 'uvim1006.tab:6584', 'uvim1006.tab:6646', 'uvim1006.tab:6708', 'uvim1006.tab:6770', 'uvim1006.tab:6832', 'uvim1006.tab:6894', 'uvim1006.tab:6956', 'uvim1006.tab:7018', 'uvim1006.tab:7080']" self.setglobal(__file__) self.runpy() class countrateCase106(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5171', 'uvim1006.tab:7142', 'uvim1006.tab:7204']" self.setglobal(__file__) self.runpy() class calcphotCase107(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5171', 'uvim1006.tab:7142', 'uvim1006.tab:7204']" self.setglobal(__file__) self.runpy() class calcphotCase108(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq619n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5175', 'uvim1006.tab:5176', 'uvim1006.tab:5177', 'uvim1006.tab:5178', 'uvim1006.tab:5179', 'uvim1006.tab:5345', 'uvim1006.tab:5407', 'uvim1006.tab:5469', 'uvim1006.tab:5531', 'uvim1006.tab:5593', 'uvim1006.tab:5655', 'uvim1006.tab:5717', 'uvim1006.tab:5779', 'uvim1006.tab:5841', 'uvim1006.tab:5903', 'uvim1006.tab:5965', 'uvim1006.tab:6027', 'uvim1006.tab:6089', 'uvim1006.tab:6151', 'uvim1006.tab:6213', 'uvim1006.tab:6275', 'uvim1006.tab:6337', 'uvim1006.tab:6399', 'uvim1006.tab:6461', 'uvim1006.tab:6523', 'uvim1006.tab:6585', 'uvim1006.tab:6647', 'uvim1006.tab:6709', 'uvim1006.tab:6771', 'uvim1006.tab:6833', 'uvim1006.tab:6895', 'uvim1006.tab:6957', 'uvim1006.tab:7019', 'uvim1006.tab:7081', 'uvim1006.tab:7143', 'uvim1006.tab:7205']" self.setglobal(__file__) self.runpy() class countrateCase107(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq619n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5175', 'uvim1006.tab:5176', 'uvim1006.tab:5177', 'uvim1006.tab:5178', 'uvim1006.tab:5179', 'uvim1006.tab:5345', 'uvim1006.tab:5407', 'uvim1006.tab:5469', 'uvim1006.tab:5531', 'uvim1006.tab:5593', 'uvim1006.tab:5655', 'uvim1006.tab:5717', 'uvim1006.tab:5779', 'uvim1006.tab:5841', 'uvim1006.tab:5903', 'uvim1006.tab:5965', 'uvim1006.tab:6027', 'uvim1006.tab:6089', 'uvim1006.tab:6151', 'uvim1006.tab:6213', 'uvim1006.tab:6275', 'uvim1006.tab:6337', 'uvim1006.tab:6399', 'uvim1006.tab:6461', 'uvim1006.tab:6523', 'uvim1006.tab:6585', 'uvim1006.tab:6647', 'uvim1006.tab:6709', 'uvim1006.tab:6771', 'uvim1006.tab:6833', 'uvim1006.tab:6895', 'uvim1006.tab:6957', 'uvim1006.tab:7019', 'uvim1006.tab:7081', 'uvim1006.tab:7143', 'uvim1006.tab:7205']" self.setglobal(__file__) self.runpy() class countrateCase108(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq619n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5175', 'uvim1006.tab:5177', 'uvim1006.tab:5178', 'uvim1006.tab:5179', 'uvim1006.tab:5345', 'uvim1006.tab:5407', 'uvim1006.tab:5469', 'uvim1006.tab:5531', 'uvim1006.tab:5593', 'uvim1006.tab:5655', 'uvim1006.tab:5717', 'uvim1006.tab:5779', 'uvim1006.tab:5841', 'uvim1006.tab:5903', 'uvim1006.tab:5965', 'uvim1006.tab:6027', 'uvim1006.tab:6089', 'uvim1006.tab:6151', 'uvim1006.tab:6213', 'uvim1006.tab:6275', 'uvim1006.tab:6337', 'uvim1006.tab:6399', 'uvim1006.tab:6461', 'uvim1006.tab:6523', 'uvim1006.tab:6585', 'uvim1006.tab:6647', 'uvim1006.tab:6709', 'uvim1006.tab:6771', 'uvim1006.tab:6833', 'uvim1006.tab:6895', 'uvim1006.tab:6957', 'uvim1006.tab:7019', 'uvim1006.tab:7081']" self.setglobal(__file__) self.runpy() class calcphotCase109(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq619n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5175', 'uvim1006.tab:5177', 'uvim1006.tab:5178', 'uvim1006.tab:5179', 'uvim1006.tab:5345', 'uvim1006.tab:5407', 'uvim1006.tab:5469', 'uvim1006.tab:5531', 'uvim1006.tab:5593', 'uvim1006.tab:5655', 'uvim1006.tab:5717', 'uvim1006.tab:5779', 'uvim1006.tab:5841', 'uvim1006.tab:5903', 'uvim1006.tab:5965', 'uvim1006.tab:6027', 'uvim1006.tab:6089', 'uvim1006.tab:6151', 'uvim1006.tab:6213', 'uvim1006.tab:6275', 'uvim1006.tab:6337', 'uvim1006.tab:6399', 'uvim1006.tab:6461', 'uvim1006.tab:6523', 'uvim1006.tab:6585', 'uvim1006.tab:6647', 'uvim1006.tab:6709', 'uvim1006.tab:6771', 'uvim1006.tab:6833', 'uvim1006.tab:6895', 'uvim1006.tab:6957', 'uvim1006.tab:7019', 'uvim1006.tab:7081']" self.setglobal(__file__) self.runpy() class countrateCase109(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq619n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5176', 'uvim1006.tab:7143', 'uvim1006.tab:7205']" self.setglobal(__file__) self.runpy() class calcphotCase110(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq619n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5176', 'uvim1006.tab:7143', 'uvim1006.tab:7205']" self.setglobal(__file__) self.runpy() class calcphotCase111(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f621m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5180', 'uvim1006.tab:5181', 'uvim1006.tab:5182', 'uvim1006.tab:5183', 'uvim1006.tab:5184', 'uvim1006.tab:5346', 'uvim1006.tab:5408', 'uvim1006.tab:5470', 'uvim1006.tab:5532', 'uvim1006.tab:5594', 'uvim1006.tab:5656', 'uvim1006.tab:5718', 'uvim1006.tab:5780', 'uvim1006.tab:5842', 'uvim1006.tab:5904', 'uvim1006.tab:5966', 'uvim1006.tab:6028', 'uvim1006.tab:6090', 'uvim1006.tab:6152', 'uvim1006.tab:6214', 'uvim1006.tab:6276', 'uvim1006.tab:6338', 'uvim1006.tab:6400', 'uvim1006.tab:6462', 'uvim1006.tab:6524', 'uvim1006.tab:6586', 'uvim1006.tab:6648', 'uvim1006.tab:6710', 'uvim1006.tab:6772', 'uvim1006.tab:6834', 'uvim1006.tab:6896', 'uvim1006.tab:6958', 'uvim1006.tab:7020', 'uvim1006.tab:7082', 'uvim1006.tab:7144', 'uvim1006.tab:7206']" self.setglobal(__file__) self.runpy() class countrateCase110(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f621m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5180', 'uvim1006.tab:5181', 'uvim1006.tab:5182', 'uvim1006.tab:5183', 'uvim1006.tab:5184', 'uvim1006.tab:5346', 'uvim1006.tab:5408', 'uvim1006.tab:5470', 'uvim1006.tab:5532', 'uvim1006.tab:5594', 'uvim1006.tab:5656', 'uvim1006.tab:5718', 'uvim1006.tab:5780', 'uvim1006.tab:5842', 'uvim1006.tab:5904', 'uvim1006.tab:5966', 'uvim1006.tab:6028', 'uvim1006.tab:6090', 'uvim1006.tab:6152', 'uvim1006.tab:6214', 'uvim1006.tab:6276', 'uvim1006.tab:6338', 'uvim1006.tab:6400', 'uvim1006.tab:6462', 'uvim1006.tab:6524', 'uvim1006.tab:6586', 'uvim1006.tab:6648', 'uvim1006.tab:6710', 'uvim1006.tab:6772', 'uvim1006.tab:6834', 'uvim1006.tab:6896', 'uvim1006.tab:6958', 'uvim1006.tab:7020', 'uvim1006.tab:7082', 'uvim1006.tab:7144', 'uvim1006.tab:7206']" self.setglobal(__file__) self.runpy() class countrateCase111(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f621m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5180', 'uvim1006.tab:5182', 'uvim1006.tab:5183', 'uvim1006.tab:5184', 'uvim1006.tab:5346', 'uvim1006.tab:5408', 'uvim1006.tab:5470', 'uvim1006.tab:5532', 'uvim1006.tab:5594', 'uvim1006.tab:5656', 'uvim1006.tab:5718', 'uvim1006.tab:5780', 'uvim1006.tab:5842', 'uvim1006.tab:5904', 'uvim1006.tab:5966', 'uvim1006.tab:6028', 'uvim1006.tab:6090', 'uvim1006.tab:6152', 'uvim1006.tab:6214', 'uvim1006.tab:6276', 'uvim1006.tab:6338', 'uvim1006.tab:6400', 'uvim1006.tab:6462', 'uvim1006.tab:6524', 'uvim1006.tab:6586', 'uvim1006.tab:6648', 'uvim1006.tab:6710', 'uvim1006.tab:6772', 'uvim1006.tab:6834', 'uvim1006.tab:6896', 'uvim1006.tab:6958', 'uvim1006.tab:7020', 'uvim1006.tab:7082']" self.setglobal(__file__) self.runpy() class calcphotCase112(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f621m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5180', 'uvim1006.tab:5182', 'uvim1006.tab:5183', 'uvim1006.tab:5184', 'uvim1006.tab:5346', 'uvim1006.tab:5408', 'uvim1006.tab:5470', 'uvim1006.tab:5532', 'uvim1006.tab:5594', 'uvim1006.tab:5656', 'uvim1006.tab:5718', 'uvim1006.tab:5780', 'uvim1006.tab:5842', 'uvim1006.tab:5904', 'uvim1006.tab:5966', 'uvim1006.tab:6028', 'uvim1006.tab:6090', 'uvim1006.tab:6152', 'uvim1006.tab:6214', 'uvim1006.tab:6276', 'uvim1006.tab:6338', 'uvim1006.tab:6400', 'uvim1006.tab:6462', 'uvim1006.tab:6524', 'uvim1006.tab:6586', 'uvim1006.tab:6648', 'uvim1006.tab:6710', 'uvim1006.tab:6772', 'uvim1006.tab:6834', 'uvim1006.tab:6896', 'uvim1006.tab:6958', 'uvim1006.tab:7020', 'uvim1006.tab:7082']" self.setglobal(__file__) self.runpy() class countrateCase112(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f621m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5181', 'uvim1006.tab:7144', 'uvim1006.tab:7206']" self.setglobal(__file__) self.runpy() class calcphotCase113(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f621m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5181', 'uvim1006.tab:7144', 'uvim1006.tab:7206']" self.setglobal(__file__) self.runpy() class calcphotCase114(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f625w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5185', 'uvim1006.tab:5186', 'uvim1006.tab:5187', 'uvim1006.tab:5188', 'uvim1006.tab:5189', 'uvim1006.tab:5347', 'uvim1006.tab:5409', 'uvim1006.tab:5471', 'uvim1006.tab:5533', 'uvim1006.tab:5595', 'uvim1006.tab:5657', 'uvim1006.tab:5719', 'uvim1006.tab:5781', 'uvim1006.tab:5843', 'uvim1006.tab:5905', 'uvim1006.tab:5967', 'uvim1006.tab:6029', 'uvim1006.tab:6091', 'uvim1006.tab:6153', 'uvim1006.tab:6215', 'uvim1006.tab:6277', 'uvim1006.tab:6339', 'uvim1006.tab:6401', 'uvim1006.tab:6463', 'uvim1006.tab:6525', 'uvim1006.tab:6587', 'uvim1006.tab:6649', 'uvim1006.tab:6711', 'uvim1006.tab:6773', 'uvim1006.tab:6835', 'uvim1006.tab:6897', 'uvim1006.tab:6959', 'uvim1006.tab:7021', 'uvim1006.tab:7083', 'uvim1006.tab:7145', 'uvim1006.tab:7207']" self.setglobal(__file__) self.runpy() class countrateCase113(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f625w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5185', 'uvim1006.tab:5186', 'uvim1006.tab:5187', 'uvim1006.tab:5188', 'uvim1006.tab:5189', 'uvim1006.tab:5347', 'uvim1006.tab:5409', 'uvim1006.tab:5471', 'uvim1006.tab:5533', 'uvim1006.tab:5595', 'uvim1006.tab:5657', 'uvim1006.tab:5719', 'uvim1006.tab:5781', 'uvim1006.tab:5843', 'uvim1006.tab:5905', 'uvim1006.tab:5967', 'uvim1006.tab:6029', 'uvim1006.tab:6091', 'uvim1006.tab:6153', 'uvim1006.tab:6215', 'uvim1006.tab:6277', 'uvim1006.tab:6339', 'uvim1006.tab:6401', 'uvim1006.tab:6463', 'uvim1006.tab:6525', 'uvim1006.tab:6587', 'uvim1006.tab:6649', 'uvim1006.tab:6711', 'uvim1006.tab:6773', 'uvim1006.tab:6835', 'uvim1006.tab:6897', 'uvim1006.tab:6959', 'uvim1006.tab:7021', 'uvim1006.tab:7083', 'uvim1006.tab:7145', 'uvim1006.tab:7207']" self.setglobal(__file__) self.runpy() class countrateCase114(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f625w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5185', 'uvim1006.tab:5187', 'uvim1006.tab:5188', 'uvim1006.tab:5189', 'uvim1006.tab:5347', 'uvim1006.tab:5409', 'uvim1006.tab:5471', 'uvim1006.tab:5533', 'uvim1006.tab:5595', 'uvim1006.tab:5657', 'uvim1006.tab:5719', 'uvim1006.tab:5781', 'uvim1006.tab:5843', 'uvim1006.tab:5905', 'uvim1006.tab:5967', 'uvim1006.tab:6029', 'uvim1006.tab:6091', 'uvim1006.tab:6153', 'uvim1006.tab:6215', 'uvim1006.tab:6277', 'uvim1006.tab:6339', 'uvim1006.tab:6401', 'uvim1006.tab:6463', 'uvim1006.tab:6525', 'uvim1006.tab:6587', 'uvim1006.tab:6649', 'uvim1006.tab:6711', 'uvim1006.tab:6773', 'uvim1006.tab:6835', 'uvim1006.tab:6897', 'uvim1006.tab:6959', 'uvim1006.tab:7021', 'uvim1006.tab:7083']" self.setglobal(__file__) self.runpy() class calcphotCase115(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f625w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5185', 'uvim1006.tab:5187', 'uvim1006.tab:5188', 'uvim1006.tab:5189', 'uvim1006.tab:5347', 'uvim1006.tab:5409', 'uvim1006.tab:5471', 'uvim1006.tab:5533', 'uvim1006.tab:5595', 'uvim1006.tab:5657', 'uvim1006.tab:5719', 'uvim1006.tab:5781', 'uvim1006.tab:5843', 'uvim1006.tab:5905', 'uvim1006.tab:5967', 'uvim1006.tab:6029', 'uvim1006.tab:6091', 'uvim1006.tab:6153', 'uvim1006.tab:6215', 'uvim1006.tab:6277', 'uvim1006.tab:6339', 'uvim1006.tab:6401', 'uvim1006.tab:6463', 'uvim1006.tab:6525', 'uvim1006.tab:6587', 'uvim1006.tab:6649', 'uvim1006.tab:6711', 'uvim1006.tab:6773', 'uvim1006.tab:6835', 'uvim1006.tab:6897', 'uvim1006.tab:6959', 'uvim1006.tab:7021', 'uvim1006.tab:7083']" self.setglobal(__file__) self.runpy() class countrateCase115(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f625w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5186', 'uvim1006.tab:7145', 'uvim1006.tab:7207']" self.setglobal(__file__) self.runpy() class calcphotCase116(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f625w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5186', 'uvim1006.tab:7145', 'uvim1006.tab:7207']" self.setglobal(__file__) self.runpy() class calcphotCase117(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f631n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5190', 'uvim1006.tab:5191', 'uvim1006.tab:5192', 'uvim1006.tab:5193', 'uvim1006.tab:5194', 'uvim1006.tab:5348', 'uvim1006.tab:5410', 'uvim1006.tab:5472', 'uvim1006.tab:5534', 'uvim1006.tab:5596', 'uvim1006.tab:5658', 'uvim1006.tab:5720', 'uvim1006.tab:5782', 'uvim1006.tab:5844', 'uvim1006.tab:5906', 'uvim1006.tab:5968', 'uvim1006.tab:6030', 'uvim1006.tab:6092', 'uvim1006.tab:6154', 'uvim1006.tab:6216', 'uvim1006.tab:6278', 'uvim1006.tab:6340', 'uvim1006.tab:6402', 'uvim1006.tab:6464', 'uvim1006.tab:6526', 'uvim1006.tab:6588', 'uvim1006.tab:6650', 'uvim1006.tab:6712', 'uvim1006.tab:6774', 'uvim1006.tab:6836', 'uvim1006.tab:6898', 'uvim1006.tab:6960', 'uvim1006.tab:7022', 'uvim1006.tab:7084', 'uvim1006.tab:7146', 'uvim1006.tab:7208']" self.setglobal(__file__) self.runpy() class countrateCase116(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f631n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5190', 'uvim1006.tab:5191', 'uvim1006.tab:5192', 'uvim1006.tab:5193', 'uvim1006.tab:5194', 'uvim1006.tab:5348', 'uvim1006.tab:5410', 'uvim1006.tab:5472', 'uvim1006.tab:5534', 'uvim1006.tab:5596', 'uvim1006.tab:5658', 'uvim1006.tab:5720', 'uvim1006.tab:5782', 'uvim1006.tab:5844', 'uvim1006.tab:5906', 'uvim1006.tab:5968', 'uvim1006.tab:6030', 'uvim1006.tab:6092', 'uvim1006.tab:6154', 'uvim1006.tab:6216', 'uvim1006.tab:6278', 'uvim1006.tab:6340', 'uvim1006.tab:6402', 'uvim1006.tab:6464', 'uvim1006.tab:6526', 'uvim1006.tab:6588', 'uvim1006.tab:6650', 'uvim1006.tab:6712', 'uvim1006.tab:6774', 'uvim1006.tab:6836', 'uvim1006.tab:6898', 'uvim1006.tab:6960', 'uvim1006.tab:7022', 'uvim1006.tab:7084', 'uvim1006.tab:7146', 'uvim1006.tab:7208']" self.setglobal(__file__) self.runpy() class countrateCase117(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f631n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5190', 'uvim1006.tab:5192', 'uvim1006.tab:5193', 'uvim1006.tab:5194', 'uvim1006.tab:5348', 'uvim1006.tab:5410', 'uvim1006.tab:5472', 'uvim1006.tab:5534', 'uvim1006.tab:5596', 'uvim1006.tab:5658', 'uvim1006.tab:5720', 'uvim1006.tab:5782', 'uvim1006.tab:5844', 'uvim1006.tab:5906', 'uvim1006.tab:5968', 'uvim1006.tab:6030', 'uvim1006.tab:6092', 'uvim1006.tab:6154', 'uvim1006.tab:6216', 'uvim1006.tab:6278', 'uvim1006.tab:6340', 'uvim1006.tab:6402', 'uvim1006.tab:6464', 'uvim1006.tab:6526', 'uvim1006.tab:6588', 'uvim1006.tab:6650', 'uvim1006.tab:6712', 'uvim1006.tab:6774', 'uvim1006.tab:6836', 'uvim1006.tab:6898', 'uvim1006.tab:6960', 'uvim1006.tab:7022', 'uvim1006.tab:7084']" self.setglobal(__file__) self.runpy() class calcphotCase118(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f631n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5190', 'uvim1006.tab:5192', 'uvim1006.tab:5193', 'uvim1006.tab:5194', 'uvim1006.tab:5348', 'uvim1006.tab:5410', 'uvim1006.tab:5472', 'uvim1006.tab:5534', 'uvim1006.tab:5596', 'uvim1006.tab:5658', 'uvim1006.tab:5720', 'uvim1006.tab:5782', 'uvim1006.tab:5844', 'uvim1006.tab:5906', 'uvim1006.tab:5968', 'uvim1006.tab:6030', 'uvim1006.tab:6092', 'uvim1006.tab:6154', 'uvim1006.tab:6216', 'uvim1006.tab:6278', 'uvim1006.tab:6340', 'uvim1006.tab:6402', 'uvim1006.tab:6464', 'uvim1006.tab:6526', 'uvim1006.tab:6588', 'uvim1006.tab:6650', 'uvim1006.tab:6712', 'uvim1006.tab:6774', 'uvim1006.tab:6836', 'uvim1006.tab:6898', 'uvim1006.tab:6960', 'uvim1006.tab:7022', 'uvim1006.tab:7084']" self.setglobal(__file__) self.runpy() class countrateCase118(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f631n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5191', 'uvim1006.tab:7146', 'uvim1006.tab:7208']" self.setglobal(__file__) self.runpy() class calcphotCase119(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f631n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5191', 'uvim1006.tab:7146', 'uvim1006.tab:7208']" self.setglobal(__file__) self.runpy() class calcphotCase120(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq634n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5195', 'uvim1006.tab:5196', 'uvim1006.tab:5197', 'uvim1006.tab:5198', 'uvim1006.tab:5199', 'uvim1006.tab:5349', 'uvim1006.tab:5411', 'uvim1006.tab:5473', 'uvim1006.tab:5535', 'uvim1006.tab:5597', 'uvim1006.tab:5659', 'uvim1006.tab:5721', 'uvim1006.tab:5783', 'uvim1006.tab:5845', 'uvim1006.tab:5907', 'uvim1006.tab:5969', 'uvim1006.tab:6031', 'uvim1006.tab:6093', 'uvim1006.tab:6155', 'uvim1006.tab:6217', 'uvim1006.tab:6279', 'uvim1006.tab:6341', 'uvim1006.tab:6403', 'uvim1006.tab:6465', 'uvim1006.tab:6527', 'uvim1006.tab:6589', 'uvim1006.tab:6651', 'uvim1006.tab:6713', 'uvim1006.tab:6775', 'uvim1006.tab:6837', 'uvim1006.tab:6899', 'uvim1006.tab:6961', 'uvim1006.tab:7023', 'uvim1006.tab:7085', 'uvim1006.tab:7147', 'uvim1006.tab:7209']" self.setglobal(__file__) self.runpy() class countrateCase119(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq634n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5195', 'uvim1006.tab:5196', 'uvim1006.tab:5197', 'uvim1006.tab:5198', 'uvim1006.tab:5199', 'uvim1006.tab:5349', 'uvim1006.tab:5411', 'uvim1006.tab:5473', 'uvim1006.tab:5535', 'uvim1006.tab:5597', 'uvim1006.tab:5659', 'uvim1006.tab:5721', 'uvim1006.tab:5783', 'uvim1006.tab:5845', 'uvim1006.tab:5907', 'uvim1006.tab:5969', 'uvim1006.tab:6031', 'uvim1006.tab:6093', 'uvim1006.tab:6155', 'uvim1006.tab:6217', 'uvim1006.tab:6279', 'uvim1006.tab:6341', 'uvim1006.tab:6403', 'uvim1006.tab:6465', 'uvim1006.tab:6527', 'uvim1006.tab:6589', 'uvim1006.tab:6651', 'uvim1006.tab:6713', 'uvim1006.tab:6775', 'uvim1006.tab:6837', 'uvim1006.tab:6899', 'uvim1006.tab:6961', 'uvim1006.tab:7023', 'uvim1006.tab:7085', 'uvim1006.tab:7147', 'uvim1006.tab:7209']" self.setglobal(__file__) self.runpy() class countrateCase120(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq634n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5195', 'uvim1006.tab:5197', 'uvim1006.tab:5198', 'uvim1006.tab:5199', 'uvim1006.tab:5349', 'uvim1006.tab:5411', 'uvim1006.tab:5473', 'uvim1006.tab:5535', 'uvim1006.tab:5597', 'uvim1006.tab:5659', 'uvim1006.tab:5721', 'uvim1006.tab:5783', 'uvim1006.tab:5845', 'uvim1006.tab:5907', 'uvim1006.tab:5969', 'uvim1006.tab:6031', 'uvim1006.tab:6093', 'uvim1006.tab:6155', 'uvim1006.tab:6217', 'uvim1006.tab:6279', 'uvim1006.tab:6341', 'uvim1006.tab:6403', 'uvim1006.tab:6465', 'uvim1006.tab:6527', 'uvim1006.tab:6589', 'uvim1006.tab:6651', 'uvim1006.tab:6713', 'uvim1006.tab:6775', 'uvim1006.tab:6837', 'uvim1006.tab:6899', 'uvim1006.tab:6961', 'uvim1006.tab:7023', 'uvim1006.tab:7085']" self.setglobal(__file__) self.runpy() class calcphotCase121(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq634n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5195', 'uvim1006.tab:5197', 'uvim1006.tab:5198', 'uvim1006.tab:5199', 'uvim1006.tab:5349', 'uvim1006.tab:5411', 'uvim1006.tab:5473', 'uvim1006.tab:5535', 'uvim1006.tab:5597', 'uvim1006.tab:5659', 'uvim1006.tab:5721', 'uvim1006.tab:5783', 'uvim1006.tab:5845', 'uvim1006.tab:5907', 'uvim1006.tab:5969', 'uvim1006.tab:6031', 'uvim1006.tab:6093', 'uvim1006.tab:6155', 'uvim1006.tab:6217', 'uvim1006.tab:6279', 'uvim1006.tab:6341', 'uvim1006.tab:6403', 'uvim1006.tab:6465', 'uvim1006.tab:6527', 'uvim1006.tab:6589', 'uvim1006.tab:6651', 'uvim1006.tab:6713', 'uvim1006.tab:6775', 'uvim1006.tab:6837', 'uvim1006.tab:6899', 'uvim1006.tab:6961', 'uvim1006.tab:7023', 'uvim1006.tab:7085']" self.setglobal(__file__) self.runpy() class countrateCase121(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq634n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5196', 'uvim1006.tab:7147', 'uvim1006.tab:7209']" self.setglobal(__file__) self.runpy() class calcphotCase122(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq634n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5196', 'uvim1006.tab:7147', 'uvim1006.tab:7209']" self.setglobal(__file__) self.runpy() class calcphotCase123(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f645n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5200', 'uvim1006.tab:5201', 'uvim1006.tab:5202', 'uvim1006.tab:5203', 'uvim1006.tab:5204', 'uvim1006.tab:5350', 'uvim1006.tab:5412', 'uvim1006.tab:5474', 'uvim1006.tab:5536', 'uvim1006.tab:5598', 'uvim1006.tab:5660', 'uvim1006.tab:5722', 'uvim1006.tab:5784', 'uvim1006.tab:5846', 'uvim1006.tab:5908', 'uvim1006.tab:5970', 'uvim1006.tab:6032', 'uvim1006.tab:6094', 'uvim1006.tab:6156', 'uvim1006.tab:6218', 'uvim1006.tab:6280', 'uvim1006.tab:6342', 'uvim1006.tab:6404', 'uvim1006.tab:6466', 'uvim1006.tab:6528', 'uvim1006.tab:6590', 'uvim1006.tab:6652', 'uvim1006.tab:6714', 'uvim1006.tab:6776', 'uvim1006.tab:6838', 'uvim1006.tab:6900', 'uvim1006.tab:6962', 'uvim1006.tab:7024', 'uvim1006.tab:7086', 'uvim1006.tab:7148', 'uvim1006.tab:7210']" self.setglobal(__file__) self.runpy() class countrateCase122(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f645n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5200', 'uvim1006.tab:5201', 'uvim1006.tab:5202', 'uvim1006.tab:5203', 'uvim1006.tab:5204', 'uvim1006.tab:5350', 'uvim1006.tab:5412', 'uvim1006.tab:5474', 'uvim1006.tab:5536', 'uvim1006.tab:5598', 'uvim1006.tab:5660', 'uvim1006.tab:5722', 'uvim1006.tab:5784', 'uvim1006.tab:5846', 'uvim1006.tab:5908', 'uvim1006.tab:5970', 'uvim1006.tab:6032', 'uvim1006.tab:6094', 'uvim1006.tab:6156', 'uvim1006.tab:6218', 'uvim1006.tab:6280', 'uvim1006.tab:6342', 'uvim1006.tab:6404', 'uvim1006.tab:6466', 'uvim1006.tab:6528', 'uvim1006.tab:6590', 'uvim1006.tab:6652', 'uvim1006.tab:6714', 'uvim1006.tab:6776', 'uvim1006.tab:6838', 'uvim1006.tab:6900', 'uvim1006.tab:6962', 'uvim1006.tab:7024', 'uvim1006.tab:7086', 'uvim1006.tab:7148', 'uvim1006.tab:7210']" self.setglobal(__file__) self.runpy() class countrateCase123(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f645n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5200', 'uvim1006.tab:5202', 'uvim1006.tab:5203', 'uvim1006.tab:5204', 'uvim1006.tab:5350', 'uvim1006.tab:5412', 'uvim1006.tab:5474', 'uvim1006.tab:5536', 'uvim1006.tab:5598', 'uvim1006.tab:5660', 'uvim1006.tab:5722', 'uvim1006.tab:5784', 'uvim1006.tab:5846', 'uvim1006.tab:5908', 'uvim1006.tab:5970', 'uvim1006.tab:6032', 'uvim1006.tab:6094', 'uvim1006.tab:6156', 'uvim1006.tab:6218', 'uvim1006.tab:6280', 'uvim1006.tab:6342', 'uvim1006.tab:6404', 'uvim1006.tab:6466', 'uvim1006.tab:6528', 'uvim1006.tab:6590', 'uvim1006.tab:6652', 'uvim1006.tab:6714', 'uvim1006.tab:6776', 'uvim1006.tab:6838', 'uvim1006.tab:6900', 'uvim1006.tab:6962', 'uvim1006.tab:7024', 'uvim1006.tab:7086']" self.setglobal(__file__) self.runpy() class calcphotCase124(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f645n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5200', 'uvim1006.tab:5202', 'uvim1006.tab:5203', 'uvim1006.tab:5204', 'uvim1006.tab:5350', 'uvim1006.tab:5412', 'uvim1006.tab:5474', 'uvim1006.tab:5536', 'uvim1006.tab:5598', 'uvim1006.tab:5660', 'uvim1006.tab:5722', 'uvim1006.tab:5784', 'uvim1006.tab:5846', 'uvim1006.tab:5908', 'uvim1006.tab:5970', 'uvim1006.tab:6032', 'uvim1006.tab:6094', 'uvim1006.tab:6156', 'uvim1006.tab:6218', 'uvim1006.tab:6280', 'uvim1006.tab:6342', 'uvim1006.tab:6404', 'uvim1006.tab:6466', 'uvim1006.tab:6528', 'uvim1006.tab:6590', 'uvim1006.tab:6652', 'uvim1006.tab:6714', 'uvim1006.tab:6776', 'uvim1006.tab:6838', 'uvim1006.tab:6900', 'uvim1006.tab:6962', 'uvim1006.tab:7024', 'uvim1006.tab:7086']" self.setglobal(__file__) self.runpy() class countrateCase124(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f645n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5201', 'uvim1006.tab:7148', 'uvim1006.tab:7210']" self.setglobal(__file__) self.runpy() class calcphotCase125(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f645n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5201', 'uvim1006.tab:7148', 'uvim1006.tab:7210']" self.setglobal(__file__) self.runpy() class calcphotCase126(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f656n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5205', 'uvim1006.tab:5206', 'uvim1006.tab:5207', 'uvim1006.tab:5208', 'uvim1006.tab:5209', 'uvim1006.tab:5351', 'uvim1006.tab:5413', 'uvim1006.tab:5475', 'uvim1006.tab:5537', 'uvim1006.tab:5599', 'uvim1006.tab:5661', 'uvim1006.tab:5723', 'uvim1006.tab:5785', 'uvim1006.tab:5847', 'uvim1006.tab:5909', 'uvim1006.tab:5971', 'uvim1006.tab:6033', 'uvim1006.tab:6095', 'uvim1006.tab:6157', 'uvim1006.tab:6219', 'uvim1006.tab:6281', 'uvim1006.tab:6343', 'uvim1006.tab:6405', 'uvim1006.tab:6467', 'uvim1006.tab:6529', 'uvim1006.tab:6591', 'uvim1006.tab:6653', 'uvim1006.tab:6715', 'uvim1006.tab:6777', 'uvim1006.tab:6839', 'uvim1006.tab:6901', 'uvim1006.tab:6963', 'uvim1006.tab:7025', 'uvim1006.tab:7087', 'uvim1006.tab:7149', 'uvim1006.tab:7211']" self.setglobal(__file__) self.runpy() class countrateCase125(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f656n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5205', 'uvim1006.tab:5206', 'uvim1006.tab:5207', 'uvim1006.tab:5208', 'uvim1006.tab:5209', 'uvim1006.tab:5351', 'uvim1006.tab:5413', 'uvim1006.tab:5475', 'uvim1006.tab:5537', 'uvim1006.tab:5599', 'uvim1006.tab:5661', 'uvim1006.tab:5723', 'uvim1006.tab:5785', 'uvim1006.tab:5847', 'uvim1006.tab:5909', 'uvim1006.tab:5971', 'uvim1006.tab:6033', 'uvim1006.tab:6095', 'uvim1006.tab:6157', 'uvim1006.tab:6219', 'uvim1006.tab:6281', 'uvim1006.tab:6343', 'uvim1006.tab:6405', 'uvim1006.tab:6467', 'uvim1006.tab:6529', 'uvim1006.tab:6591', 'uvim1006.tab:6653', 'uvim1006.tab:6715', 'uvim1006.tab:6777', 'uvim1006.tab:6839', 'uvim1006.tab:6901', 'uvim1006.tab:6963', 'uvim1006.tab:7025', 'uvim1006.tab:7087', 'uvim1006.tab:7149', 'uvim1006.tab:7211']" self.setglobal(__file__) self.runpy() class countrateCase126(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f656n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5205', 'uvim1006.tab:5207', 'uvim1006.tab:5208', 'uvim1006.tab:5209', 'uvim1006.tab:5351', 'uvim1006.tab:5413', 'uvim1006.tab:5475', 'uvim1006.tab:5537', 'uvim1006.tab:5599', 'uvim1006.tab:5661', 'uvim1006.tab:5723', 'uvim1006.tab:5785', 'uvim1006.tab:5847', 'uvim1006.tab:5909', 'uvim1006.tab:5971', 'uvim1006.tab:6033', 'uvim1006.tab:6095', 'uvim1006.tab:6157', 'uvim1006.tab:6219', 'uvim1006.tab:6281', 'uvim1006.tab:6343', 'uvim1006.tab:6405', 'uvim1006.tab:6467', 'uvim1006.tab:6529', 'uvim1006.tab:6591', 'uvim1006.tab:6653', 'uvim1006.tab:6715', 'uvim1006.tab:6777', 'uvim1006.tab:6839', 'uvim1006.tab:6901', 'uvim1006.tab:6963', 'uvim1006.tab:7025', 'uvim1006.tab:7087']" self.setglobal(__file__) self.runpy() class calcphotCase127(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f656n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5205', 'uvim1006.tab:5207', 'uvim1006.tab:5208', 'uvim1006.tab:5209', 'uvim1006.tab:5351', 'uvim1006.tab:5413', 'uvim1006.tab:5475', 'uvim1006.tab:5537', 'uvim1006.tab:5599', 'uvim1006.tab:5661', 'uvim1006.tab:5723', 'uvim1006.tab:5785', 'uvim1006.tab:5847', 'uvim1006.tab:5909', 'uvim1006.tab:5971', 'uvim1006.tab:6033', 'uvim1006.tab:6095', 'uvim1006.tab:6157', 'uvim1006.tab:6219', 'uvim1006.tab:6281', 'uvim1006.tab:6343', 'uvim1006.tab:6405', 'uvim1006.tab:6467', 'uvim1006.tab:6529', 'uvim1006.tab:6591', 'uvim1006.tab:6653', 'uvim1006.tab:6715', 'uvim1006.tab:6777', 'uvim1006.tab:6839', 'uvim1006.tab:6901', 'uvim1006.tab:6963', 'uvim1006.tab:7025', 'uvim1006.tab:7087']" self.setglobal(__file__) self.runpy() class countrateCase127(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f656n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5206', 'uvim1006.tab:7149', 'uvim1006.tab:7211']" self.setglobal(__file__) self.runpy() class calcphotCase128(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f656n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5206', 'uvim1006.tab:7149', 'uvim1006.tab:7211']" self.setglobal(__file__) self.runpy() class calcphotCase129(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f657n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5210', 'uvim1006.tab:5211', 'uvim1006.tab:5212', 'uvim1006.tab:5213', 'uvim1006.tab:5214', 'uvim1006.tab:5352', 'uvim1006.tab:5414', 'uvim1006.tab:5476', 'uvim1006.tab:5538', 'uvim1006.tab:5600', 'uvim1006.tab:5662', 'uvim1006.tab:5724', 'uvim1006.tab:5786', 'uvim1006.tab:5848', 'uvim1006.tab:5910', 'uvim1006.tab:5972', 'uvim1006.tab:6034', 'uvim1006.tab:6096', 'uvim1006.tab:6158', 'uvim1006.tab:6220', 'uvim1006.tab:6282', 'uvim1006.tab:6344', 'uvim1006.tab:6406', 'uvim1006.tab:6468', 'uvim1006.tab:6530', 'uvim1006.tab:6592', 'uvim1006.tab:6654', 'uvim1006.tab:6716', 'uvim1006.tab:6778', 'uvim1006.tab:6840', 'uvim1006.tab:6902', 'uvim1006.tab:6964', 'uvim1006.tab:7026', 'uvim1006.tab:7088', 'uvim1006.tab:7150', 'uvim1006.tab:7212']" self.setglobal(__file__) self.runpy() class countrateCase128(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f657n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5210', 'uvim1006.tab:5211', 'uvim1006.tab:5212', 'uvim1006.tab:5213', 'uvim1006.tab:5214', 'uvim1006.tab:5352', 'uvim1006.tab:5414', 'uvim1006.tab:5476', 'uvim1006.tab:5538', 'uvim1006.tab:5600', 'uvim1006.tab:5662', 'uvim1006.tab:5724', 'uvim1006.tab:5786', 'uvim1006.tab:5848', 'uvim1006.tab:5910', 'uvim1006.tab:5972', 'uvim1006.tab:6034', 'uvim1006.tab:6096', 'uvim1006.tab:6158', 'uvim1006.tab:6220', 'uvim1006.tab:6282', 'uvim1006.tab:6344', 'uvim1006.tab:6406', 'uvim1006.tab:6468', 'uvim1006.tab:6530', 'uvim1006.tab:6592', 'uvim1006.tab:6654', 'uvim1006.tab:6716', 'uvim1006.tab:6778', 'uvim1006.tab:6840', 'uvim1006.tab:6902', 'uvim1006.tab:6964', 'uvim1006.tab:7026', 'uvim1006.tab:7088', 'uvim1006.tab:7150', 'uvim1006.tab:7212']" self.setglobal(__file__) self.runpy() class countrateCase129(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f657n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5210', 'uvim1006.tab:5212', 'uvim1006.tab:5213', 'uvim1006.tab:5214', 'uvim1006.tab:5352', 'uvim1006.tab:5414', 'uvim1006.tab:5476', 'uvim1006.tab:5538', 'uvim1006.tab:5600', 'uvim1006.tab:5662', 'uvim1006.tab:5724', 'uvim1006.tab:5786', 'uvim1006.tab:5848', 'uvim1006.tab:5910', 'uvim1006.tab:5972', 'uvim1006.tab:6034', 'uvim1006.tab:6096', 'uvim1006.tab:6158', 'uvim1006.tab:6220', 'uvim1006.tab:6282', 'uvim1006.tab:6344', 'uvim1006.tab:6406', 'uvim1006.tab:6468', 'uvim1006.tab:6530', 'uvim1006.tab:6592', 'uvim1006.tab:6654', 'uvim1006.tab:6716', 'uvim1006.tab:6778', 'uvim1006.tab:6840', 'uvim1006.tab:6902', 'uvim1006.tab:6964', 'uvim1006.tab:7026', 'uvim1006.tab:7088']" self.setglobal(__file__) self.runpy() class calcphotCase130(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f657n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5210', 'uvim1006.tab:5212', 'uvim1006.tab:5213', 'uvim1006.tab:5214', 'uvim1006.tab:5352', 'uvim1006.tab:5414', 'uvim1006.tab:5476', 'uvim1006.tab:5538', 'uvim1006.tab:5600', 'uvim1006.tab:5662', 'uvim1006.tab:5724', 'uvim1006.tab:5786', 'uvim1006.tab:5848', 'uvim1006.tab:5910', 'uvim1006.tab:5972', 'uvim1006.tab:6034', 'uvim1006.tab:6096', 'uvim1006.tab:6158', 'uvim1006.tab:6220', 'uvim1006.tab:6282', 'uvim1006.tab:6344', 'uvim1006.tab:6406', 'uvim1006.tab:6468', 'uvim1006.tab:6530', 'uvim1006.tab:6592', 'uvim1006.tab:6654', 'uvim1006.tab:6716', 'uvim1006.tab:6778', 'uvim1006.tab:6840', 'uvim1006.tab:6902', 'uvim1006.tab:6964', 'uvim1006.tab:7026', 'uvim1006.tab:7088']" self.setglobal(__file__) self.runpy() class countrateCase130(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f657n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5211', 'uvim1006.tab:7150', 'uvim1006.tab:7212']" self.setglobal(__file__) self.runpy() class calcphotCase131(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f657n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5211', 'uvim1006.tab:7150', 'uvim1006.tab:7212']" self.setglobal(__file__) self.runpy() class calcphotCase132(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f658n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5215', 'uvim1006.tab:5216', 'uvim1006.tab:5217', 'uvim1006.tab:5218', 'uvim1006.tab:5219', 'uvim1006.tab:5353', 'uvim1006.tab:5415', 'uvim1006.tab:5477', 'uvim1006.tab:5539', 'uvim1006.tab:5601', 'uvim1006.tab:5663', 'uvim1006.tab:5725', 'uvim1006.tab:5787', 'uvim1006.tab:5849', 'uvim1006.tab:5911', 'uvim1006.tab:5973', 'uvim1006.tab:6035', 'uvim1006.tab:6097', 'uvim1006.tab:6159', 'uvim1006.tab:6221', 'uvim1006.tab:6283', 'uvim1006.tab:6345', 'uvim1006.tab:6407', 'uvim1006.tab:6469', 'uvim1006.tab:6531', 'uvim1006.tab:6593', 'uvim1006.tab:6655', 'uvim1006.tab:6717', 'uvim1006.tab:6779', 'uvim1006.tab:6841', 'uvim1006.tab:6903', 'uvim1006.tab:6965', 'uvim1006.tab:7027', 'uvim1006.tab:7089', 'uvim1006.tab:7151', 'uvim1006.tab:7213']" self.setglobal(__file__) self.runpy() class countrateCase131(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f658n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5215', 'uvim1006.tab:5216', 'uvim1006.tab:5217', 'uvim1006.tab:5218', 'uvim1006.tab:5219', 'uvim1006.tab:5353', 'uvim1006.tab:5415', 'uvim1006.tab:5477', 'uvim1006.tab:5539', 'uvim1006.tab:5601', 'uvim1006.tab:5663', 'uvim1006.tab:5725', 'uvim1006.tab:5787', 'uvim1006.tab:5849', 'uvim1006.tab:5911', 'uvim1006.tab:5973', 'uvim1006.tab:6035', 'uvim1006.tab:6097', 'uvim1006.tab:6159', 'uvim1006.tab:6221', 'uvim1006.tab:6283', 'uvim1006.tab:6345', 'uvim1006.tab:6407', 'uvim1006.tab:6469', 'uvim1006.tab:6531', 'uvim1006.tab:6593', 'uvim1006.tab:6655', 'uvim1006.tab:6717', 'uvim1006.tab:6779', 'uvim1006.tab:6841', 'uvim1006.tab:6903', 'uvim1006.tab:6965', 'uvim1006.tab:7027', 'uvim1006.tab:7089', 'uvim1006.tab:7151', 'uvim1006.tab:7213']" self.setglobal(__file__) self.runpy() class countrateCase132(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f658n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5215', 'uvim1006.tab:5217', 'uvim1006.tab:5218', 'uvim1006.tab:5219', 'uvim1006.tab:5353', 'uvim1006.tab:5415', 'uvim1006.tab:5477', 'uvim1006.tab:5539', 'uvim1006.tab:5601', 'uvim1006.tab:5663', 'uvim1006.tab:5725', 'uvim1006.tab:5787', 'uvim1006.tab:5849', 'uvim1006.tab:5911', 'uvim1006.tab:5973', 'uvim1006.tab:6035', 'uvim1006.tab:6097', 'uvim1006.tab:6159', 'uvim1006.tab:6221', 'uvim1006.tab:6283', 'uvim1006.tab:6345', 'uvim1006.tab:6407', 'uvim1006.tab:6469', 'uvim1006.tab:6531', 'uvim1006.tab:6593', 'uvim1006.tab:6655', 'uvim1006.tab:6717', 'uvim1006.tab:6779', 'uvim1006.tab:6841', 'uvim1006.tab:6903', 'uvim1006.tab:6965', 'uvim1006.tab:7027', 'uvim1006.tab:7089']" self.setglobal(__file__) self.runpy() class calcphotCase133(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f658n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5215', 'uvim1006.tab:5217', 'uvim1006.tab:5218', 'uvim1006.tab:5219', 'uvim1006.tab:5353', 'uvim1006.tab:5415', 'uvim1006.tab:5477', 'uvim1006.tab:5539', 'uvim1006.tab:5601', 'uvim1006.tab:5663', 'uvim1006.tab:5725', 'uvim1006.tab:5787', 'uvim1006.tab:5849', 'uvim1006.tab:5911', 'uvim1006.tab:5973', 'uvim1006.tab:6035', 'uvim1006.tab:6097', 'uvim1006.tab:6159', 'uvim1006.tab:6221', 'uvim1006.tab:6283', 'uvim1006.tab:6345', 'uvim1006.tab:6407', 'uvim1006.tab:6469', 'uvim1006.tab:6531', 'uvim1006.tab:6593', 'uvim1006.tab:6655', 'uvim1006.tab:6717', 'uvim1006.tab:6779', 'uvim1006.tab:6841', 'uvim1006.tab:6903', 'uvim1006.tab:6965', 'uvim1006.tab:7027', 'uvim1006.tab:7089']" self.setglobal(__file__) self.runpy() class countrateCase133(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f658n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5216', 'uvim1006.tab:7151', 'uvim1006.tab:7213']" self.setglobal(__file__) self.runpy() class calcphotCase134(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f658n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5216', 'uvim1006.tab:7151', 'uvim1006.tab:7213']" self.setglobal(__file__) self.runpy() class calcphotCase135(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f665n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5220', 'uvim1006.tab:5221', 'uvim1006.tab:5222', 'uvim1006.tab:5223', 'uvim1006.tab:5224', 'uvim1006.tab:5354', 'uvim1006.tab:5416', 'uvim1006.tab:5478', 'uvim1006.tab:5540', 'uvim1006.tab:5602', 'uvim1006.tab:5664', 'uvim1006.tab:5726', 'uvim1006.tab:5788', 'uvim1006.tab:5850', 'uvim1006.tab:5912', 'uvim1006.tab:5974', 'uvim1006.tab:6036', 'uvim1006.tab:6098', 'uvim1006.tab:6160', 'uvim1006.tab:6222', 'uvim1006.tab:6284', 'uvim1006.tab:6346', 'uvim1006.tab:6408', 'uvim1006.tab:6470', 'uvim1006.tab:6532', 'uvim1006.tab:6594', 'uvim1006.tab:6656', 'uvim1006.tab:6718', 'uvim1006.tab:6780', 'uvim1006.tab:6842', 'uvim1006.tab:6904', 'uvim1006.tab:6966', 'uvim1006.tab:7028', 'uvim1006.tab:7090', 'uvim1006.tab:7152', 'uvim1006.tab:7214']" self.setglobal(__file__) self.runpy() class countrateCase134(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f665n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5220', 'uvim1006.tab:5221', 'uvim1006.tab:5222', 'uvim1006.tab:5223', 'uvim1006.tab:5224', 'uvim1006.tab:5354', 'uvim1006.tab:5416', 'uvim1006.tab:5478', 'uvim1006.tab:5540', 'uvim1006.tab:5602', 'uvim1006.tab:5664', 'uvim1006.tab:5726', 'uvim1006.tab:5788', 'uvim1006.tab:5850', 'uvim1006.tab:5912', 'uvim1006.tab:5974', 'uvim1006.tab:6036', 'uvim1006.tab:6098', 'uvim1006.tab:6160', 'uvim1006.tab:6222', 'uvim1006.tab:6284', 'uvim1006.tab:6346', 'uvim1006.tab:6408', 'uvim1006.tab:6470', 'uvim1006.tab:6532', 'uvim1006.tab:6594', 'uvim1006.tab:6656', 'uvim1006.tab:6718', 'uvim1006.tab:6780', 'uvim1006.tab:6842', 'uvim1006.tab:6904', 'uvim1006.tab:6966', 'uvim1006.tab:7028', 'uvim1006.tab:7090', 'uvim1006.tab:7152', 'uvim1006.tab:7214']" self.setglobal(__file__) self.runpy() class countrateCase135(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f665n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5220', 'uvim1006.tab:5222', 'uvim1006.tab:5223', 'uvim1006.tab:5224', 'uvim1006.tab:5354', 'uvim1006.tab:5416', 'uvim1006.tab:5478', 'uvim1006.tab:5540', 'uvim1006.tab:5602', 'uvim1006.tab:5664', 'uvim1006.tab:5726', 'uvim1006.tab:5788', 'uvim1006.tab:5850', 'uvim1006.tab:5912', 'uvim1006.tab:5974', 'uvim1006.tab:6036', 'uvim1006.tab:6098', 'uvim1006.tab:6160', 'uvim1006.tab:6222', 'uvim1006.tab:6284', 'uvim1006.tab:6346', 'uvim1006.tab:6408', 'uvim1006.tab:6470', 'uvim1006.tab:6532', 'uvim1006.tab:6594', 'uvim1006.tab:6656', 'uvim1006.tab:6718', 'uvim1006.tab:6780', 'uvim1006.tab:6842', 'uvim1006.tab:6904', 'uvim1006.tab:6966', 'uvim1006.tab:7028', 'uvim1006.tab:7090']" self.setglobal(__file__) self.runpy() class calcphotCase136(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f665n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5220', 'uvim1006.tab:5222', 'uvim1006.tab:5223', 'uvim1006.tab:5224', 'uvim1006.tab:5354', 'uvim1006.tab:5416', 'uvim1006.tab:5478', 'uvim1006.tab:5540', 'uvim1006.tab:5602', 'uvim1006.tab:5664', 'uvim1006.tab:5726', 'uvim1006.tab:5788', 'uvim1006.tab:5850', 'uvim1006.tab:5912', 'uvim1006.tab:5974', 'uvim1006.tab:6036', 'uvim1006.tab:6098', 'uvim1006.tab:6160', 'uvim1006.tab:6222', 'uvim1006.tab:6284', 'uvim1006.tab:6346', 'uvim1006.tab:6408', 'uvim1006.tab:6470', 'uvim1006.tab:6532', 'uvim1006.tab:6594', 'uvim1006.tab:6656', 'uvim1006.tab:6718', 'uvim1006.tab:6780', 'uvim1006.tab:6842', 'uvim1006.tab:6904', 'uvim1006.tab:6966', 'uvim1006.tab:7028', 'uvim1006.tab:7090']" self.setglobal(__file__) self.runpy() class countrateCase136(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f665n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5221', 'uvim1006.tab:7152', 'uvim1006.tab:7214']" self.setglobal(__file__) self.runpy() class calcphotCase137(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f665n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5221', 'uvim1006.tab:7152', 'uvim1006.tab:7214']" self.setglobal(__file__) self.runpy() class calcphotCase138(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq672n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5225', 'uvim1006.tab:5226', 'uvim1006.tab:5227', 'uvim1006.tab:5228', 'uvim1006.tab:5229', 'uvim1006.tab:5355', 'uvim1006.tab:5417', 'uvim1006.tab:5479', 'uvim1006.tab:5541', 'uvim1006.tab:5603', 'uvim1006.tab:5665', 'uvim1006.tab:5727', 'uvim1006.tab:5789', 'uvim1006.tab:5851', 'uvim1006.tab:5913', 'uvim1006.tab:5975', 'uvim1006.tab:6037', 'uvim1006.tab:6099', 'uvim1006.tab:6161', 'uvim1006.tab:6223', 'uvim1006.tab:6285', 'uvim1006.tab:6347', 'uvim1006.tab:6409', 'uvim1006.tab:6471', 'uvim1006.tab:6533', 'uvim1006.tab:6595', 'uvim1006.tab:6657', 'uvim1006.tab:6719', 'uvim1006.tab:6781', 'uvim1006.tab:6843', 'uvim1006.tab:6905', 'uvim1006.tab:6967', 'uvim1006.tab:7029', 'uvim1006.tab:7091', 'uvim1006.tab:7153', 'uvim1006.tab:7215']" self.setglobal(__file__) self.runpy() class countrateCase137(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq672n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5225', 'uvim1006.tab:5226', 'uvim1006.tab:5227', 'uvim1006.tab:5228', 'uvim1006.tab:5229', 'uvim1006.tab:5355', 'uvim1006.tab:5417', 'uvim1006.tab:5479', 'uvim1006.tab:5541', 'uvim1006.tab:5603', 'uvim1006.tab:5665', 'uvim1006.tab:5727', 'uvim1006.tab:5789', 'uvim1006.tab:5851', 'uvim1006.tab:5913', 'uvim1006.tab:5975', 'uvim1006.tab:6037', 'uvim1006.tab:6099', 'uvim1006.tab:6161', 'uvim1006.tab:6223', 'uvim1006.tab:6285', 'uvim1006.tab:6347', 'uvim1006.tab:6409', 'uvim1006.tab:6471', 'uvim1006.tab:6533', 'uvim1006.tab:6595', 'uvim1006.tab:6657', 'uvim1006.tab:6719', 'uvim1006.tab:6781', 'uvim1006.tab:6843', 'uvim1006.tab:6905', 'uvim1006.tab:6967', 'uvim1006.tab:7029', 'uvim1006.tab:7091', 'uvim1006.tab:7153', 'uvim1006.tab:7215']" self.setglobal(__file__) self.runpy() class countrateCase138(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq672n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5225', 'uvim1006.tab:5227', 'uvim1006.tab:5228', 'uvim1006.tab:5229', 'uvim1006.tab:5355', 'uvim1006.tab:5417', 'uvim1006.tab:5479', 'uvim1006.tab:5541', 'uvim1006.tab:5603', 'uvim1006.tab:5665', 'uvim1006.tab:5727', 'uvim1006.tab:5789', 'uvim1006.tab:5851', 'uvim1006.tab:5913', 'uvim1006.tab:5975', 'uvim1006.tab:6037', 'uvim1006.tab:6099', 'uvim1006.tab:6161', 'uvim1006.tab:6223', 'uvim1006.tab:6285', 'uvim1006.tab:6347', 'uvim1006.tab:6409', 'uvim1006.tab:6471', 'uvim1006.tab:6533', 'uvim1006.tab:6595', 'uvim1006.tab:6657', 'uvim1006.tab:6719', 'uvim1006.tab:6781', 'uvim1006.tab:6843', 'uvim1006.tab:6905', 'uvim1006.tab:6967', 'uvim1006.tab:7029', 'uvim1006.tab:7091']" self.setglobal(__file__) self.runpy() class calcphotCase139(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq672n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5225', 'uvim1006.tab:5227', 'uvim1006.tab:5228', 'uvim1006.tab:5229', 'uvim1006.tab:5355', 'uvim1006.tab:5417', 'uvim1006.tab:5479', 'uvim1006.tab:5541', 'uvim1006.tab:5603', 'uvim1006.tab:5665', 'uvim1006.tab:5727', 'uvim1006.tab:5789', 'uvim1006.tab:5851', 'uvim1006.tab:5913', 'uvim1006.tab:5975', 'uvim1006.tab:6037', 'uvim1006.tab:6099', 'uvim1006.tab:6161', 'uvim1006.tab:6223', 'uvim1006.tab:6285', 'uvim1006.tab:6347', 'uvim1006.tab:6409', 'uvim1006.tab:6471', 'uvim1006.tab:6533', 'uvim1006.tab:6595', 'uvim1006.tab:6657', 'uvim1006.tab:6719', 'uvim1006.tab:6781', 'uvim1006.tab:6843', 'uvim1006.tab:6905', 'uvim1006.tab:6967', 'uvim1006.tab:7029', 'uvim1006.tab:7091']" self.setglobal(__file__) self.runpy() class countrateCase139(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq672n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5226', 'uvim1006.tab:7153', 'uvim1006.tab:7215']" self.setglobal(__file__) self.runpy() class calcphotCase140(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq672n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5226', 'uvim1006.tab:7153', 'uvim1006.tab:7215']" self.setglobal(__file__) self.runpy() class calcphotCase141(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f673n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5230', 'uvim1006.tab:5231', 'uvim1006.tab:5232', 'uvim1006.tab:5233', 'uvim1006.tab:5234', 'uvim1006.tab:5356', 'uvim1006.tab:5418', 'uvim1006.tab:5480', 'uvim1006.tab:5542', 'uvim1006.tab:5604', 'uvim1006.tab:5666', 'uvim1006.tab:5728', 'uvim1006.tab:5790', 'uvim1006.tab:5852', 'uvim1006.tab:5914', 'uvim1006.tab:5976', 'uvim1006.tab:6038', 'uvim1006.tab:6100', 'uvim1006.tab:6162', 'uvim1006.tab:6224', 'uvim1006.tab:6286', 'uvim1006.tab:6348', 'uvim1006.tab:6410', 'uvim1006.tab:6472', 'uvim1006.tab:6534', 'uvim1006.tab:6596', 'uvim1006.tab:6658', 'uvim1006.tab:6720', 'uvim1006.tab:6782', 'uvim1006.tab:6844', 'uvim1006.tab:6906', 'uvim1006.tab:6968', 'uvim1006.tab:7030', 'uvim1006.tab:7092', 'uvim1006.tab:7154', 'uvim1006.tab:7216']" self.setglobal(__file__) self.runpy() class countrateCase140(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f673n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5230', 'uvim1006.tab:5231', 'uvim1006.tab:5232', 'uvim1006.tab:5233', 'uvim1006.tab:5234', 'uvim1006.tab:5356', 'uvim1006.tab:5418', 'uvim1006.tab:5480', 'uvim1006.tab:5542', 'uvim1006.tab:5604', 'uvim1006.tab:5666', 'uvim1006.tab:5728', 'uvim1006.tab:5790', 'uvim1006.tab:5852', 'uvim1006.tab:5914', 'uvim1006.tab:5976', 'uvim1006.tab:6038', 'uvim1006.tab:6100', 'uvim1006.tab:6162', 'uvim1006.tab:6224', 'uvim1006.tab:6286', 'uvim1006.tab:6348', 'uvim1006.tab:6410', 'uvim1006.tab:6472', 'uvim1006.tab:6534', 'uvim1006.tab:6596', 'uvim1006.tab:6658', 'uvim1006.tab:6720', 'uvim1006.tab:6782', 'uvim1006.tab:6844', 'uvim1006.tab:6906', 'uvim1006.tab:6968', 'uvim1006.tab:7030', 'uvim1006.tab:7092', 'uvim1006.tab:7154', 'uvim1006.tab:7216']" self.setglobal(__file__) self.runpy() class countrateCase141(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f673n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5230', 'uvim1006.tab:5232', 'uvim1006.tab:5233', 'uvim1006.tab:5234', 'uvim1006.tab:5356', 'uvim1006.tab:5418', 'uvim1006.tab:5480', 'uvim1006.tab:5542', 'uvim1006.tab:5604', 'uvim1006.tab:5666', 'uvim1006.tab:5728', 'uvim1006.tab:5790', 'uvim1006.tab:5852', 'uvim1006.tab:5914', 'uvim1006.tab:5976', 'uvim1006.tab:6038', 'uvim1006.tab:6100', 'uvim1006.tab:6162', 'uvim1006.tab:6224', 'uvim1006.tab:6286', 'uvim1006.tab:6348', 'uvim1006.tab:6410', 'uvim1006.tab:6472', 'uvim1006.tab:6534', 'uvim1006.tab:6596', 'uvim1006.tab:6658', 'uvim1006.tab:6720', 'uvim1006.tab:6782', 'uvim1006.tab:6844', 'uvim1006.tab:6906', 'uvim1006.tab:6968', 'uvim1006.tab:7030', 'uvim1006.tab:7092']" self.setglobal(__file__) self.runpy() class calcphotCase142(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f673n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5230', 'uvim1006.tab:5232', 'uvim1006.tab:5233', 'uvim1006.tab:5234', 'uvim1006.tab:5356', 'uvim1006.tab:5418', 'uvim1006.tab:5480', 'uvim1006.tab:5542', 'uvim1006.tab:5604', 'uvim1006.tab:5666', 'uvim1006.tab:5728', 'uvim1006.tab:5790', 'uvim1006.tab:5852', 'uvim1006.tab:5914', 'uvim1006.tab:5976', 'uvim1006.tab:6038', 'uvim1006.tab:6100', 'uvim1006.tab:6162', 'uvim1006.tab:6224', 'uvim1006.tab:6286', 'uvim1006.tab:6348', 'uvim1006.tab:6410', 'uvim1006.tab:6472', 'uvim1006.tab:6534', 'uvim1006.tab:6596', 'uvim1006.tab:6658', 'uvim1006.tab:6720', 'uvim1006.tab:6782', 'uvim1006.tab:6844', 'uvim1006.tab:6906', 'uvim1006.tab:6968', 'uvim1006.tab:7030', 'uvim1006.tab:7092']" self.setglobal(__file__) self.runpy() class countrateCase142(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f673n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5231', 'uvim1006.tab:7154', 'uvim1006.tab:7216']" self.setglobal(__file__) self.runpy() class calcphotCase143(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f673n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5231', 'uvim1006.tab:7154', 'uvim1006.tab:7216']" self.setglobal(__file__) self.runpy() class calcphotCase144(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq674n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5235', 'uvim1006.tab:5236', 'uvim1006.tab:5237', 'uvim1006.tab:5238', 'uvim1006.tab:5239', 'uvim1006.tab:5357', 'uvim1006.tab:5419', 'uvim1006.tab:5481', 'uvim1006.tab:5543', 'uvim1006.tab:5605', 'uvim1006.tab:5667', 'uvim1006.tab:5729', 'uvim1006.tab:5791', 'uvim1006.tab:5853', 'uvim1006.tab:5915', 'uvim1006.tab:5977', 'uvim1006.tab:6039', 'uvim1006.tab:6101', 'uvim1006.tab:6163', 'uvim1006.tab:6225', 'uvim1006.tab:6287', 'uvim1006.tab:6349', 'uvim1006.tab:6411', 'uvim1006.tab:6473', 'uvim1006.tab:6535', 'uvim1006.tab:6597', 'uvim1006.tab:6659', 'uvim1006.tab:6721', 'uvim1006.tab:6783', 'uvim1006.tab:6845', 'uvim1006.tab:6907', 'uvim1006.tab:6969', 'uvim1006.tab:7031', 'uvim1006.tab:7093', 'uvim1006.tab:7155', 'uvim1006.tab:7217']" self.setglobal(__file__) self.runpy() class countrateCase143(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq674n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5235', 'uvim1006.tab:5236', 'uvim1006.tab:5237', 'uvim1006.tab:5238', 'uvim1006.tab:5239', 'uvim1006.tab:5357', 'uvim1006.tab:5419', 'uvim1006.tab:5481', 'uvim1006.tab:5543', 'uvim1006.tab:5605', 'uvim1006.tab:5667', 'uvim1006.tab:5729', 'uvim1006.tab:5791', 'uvim1006.tab:5853', 'uvim1006.tab:5915', 'uvim1006.tab:5977', 'uvim1006.tab:6039', 'uvim1006.tab:6101', 'uvim1006.tab:6163', 'uvim1006.tab:6225', 'uvim1006.tab:6287', 'uvim1006.tab:6349', 'uvim1006.tab:6411', 'uvim1006.tab:6473', 'uvim1006.tab:6535', 'uvim1006.tab:6597', 'uvim1006.tab:6659', 'uvim1006.tab:6721', 'uvim1006.tab:6783', 'uvim1006.tab:6845', 'uvim1006.tab:6907', 'uvim1006.tab:6969', 'uvim1006.tab:7031', 'uvim1006.tab:7093', 'uvim1006.tab:7155', 'uvim1006.tab:7217']" self.setglobal(__file__) self.runpy() class countrateCase144(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq674n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5235', 'uvim1006.tab:5237', 'uvim1006.tab:5238', 'uvim1006.tab:5239', 'uvim1006.tab:5357', 'uvim1006.tab:5419', 'uvim1006.tab:5481', 'uvim1006.tab:5543', 'uvim1006.tab:5605', 'uvim1006.tab:5667', 'uvim1006.tab:5729', 'uvim1006.tab:5791', 'uvim1006.tab:5853', 'uvim1006.tab:5915', 'uvim1006.tab:5977', 'uvim1006.tab:6039', 'uvim1006.tab:6101', 'uvim1006.tab:6163', 'uvim1006.tab:6225', 'uvim1006.tab:6287', 'uvim1006.tab:6349', 'uvim1006.tab:6411', 'uvim1006.tab:6473', 'uvim1006.tab:6535', 'uvim1006.tab:6597', 'uvim1006.tab:6659', 'uvim1006.tab:6721', 'uvim1006.tab:6783', 'uvim1006.tab:6845', 'uvim1006.tab:6907', 'uvim1006.tab:6969', 'uvim1006.tab:7031', 'uvim1006.tab:7093']" self.setglobal(__file__) self.runpy() class calcphotCase145(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq674n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5235', 'uvim1006.tab:5237', 'uvim1006.tab:5238', 'uvim1006.tab:5239', 'uvim1006.tab:5357', 'uvim1006.tab:5419', 'uvim1006.tab:5481', 'uvim1006.tab:5543', 'uvim1006.tab:5605', 'uvim1006.tab:5667', 'uvim1006.tab:5729', 'uvim1006.tab:5791', 'uvim1006.tab:5853', 'uvim1006.tab:5915', 'uvim1006.tab:5977', 'uvim1006.tab:6039', 'uvim1006.tab:6101', 'uvim1006.tab:6163', 'uvim1006.tab:6225', 'uvim1006.tab:6287', 'uvim1006.tab:6349', 'uvim1006.tab:6411', 'uvim1006.tab:6473', 'uvim1006.tab:6535', 'uvim1006.tab:6597', 'uvim1006.tab:6659', 'uvim1006.tab:6721', 'uvim1006.tab:6783', 'uvim1006.tab:6845', 'uvim1006.tab:6907', 'uvim1006.tab:6969', 'uvim1006.tab:7031', 'uvim1006.tab:7093']" self.setglobal(__file__) self.runpy() class countrateCase145(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq674n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5236', 'uvim1006.tab:7155', 'uvim1006.tab:7217']" self.setglobal(__file__) self.runpy() class calcphotCase146(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq674n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5236', 'uvim1006.tab:7155', 'uvim1006.tab:7217']" self.setglobal(__file__) self.runpy() class calcphotCase147(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f680n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5240', 'uvim1006.tab:5241', 'uvim1006.tab:5242', 'uvim1006.tab:5243', 'uvim1006.tab:5244', 'uvim1006.tab:5358', 'uvim1006.tab:5420', 'uvim1006.tab:5482', 'uvim1006.tab:5544', 'uvim1006.tab:5606', 'uvim1006.tab:5668', 'uvim1006.tab:5730', 'uvim1006.tab:5792', 'uvim1006.tab:5854', 'uvim1006.tab:5916', 'uvim1006.tab:5978', 'uvim1006.tab:6040', 'uvim1006.tab:6102', 'uvim1006.tab:6164', 'uvim1006.tab:6226', 'uvim1006.tab:6288', 'uvim1006.tab:6350', 'uvim1006.tab:6412', 'uvim1006.tab:6474', 'uvim1006.tab:6536', 'uvim1006.tab:6598', 'uvim1006.tab:6660', 'uvim1006.tab:6722', 'uvim1006.tab:6784', 'uvim1006.tab:6846', 'uvim1006.tab:6908', 'uvim1006.tab:6970', 'uvim1006.tab:7032', 'uvim1006.tab:7094', 'uvim1006.tab:7156', 'uvim1006.tab:7218']" self.setglobal(__file__) self.runpy() class countrateCase146(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f680n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5240', 'uvim1006.tab:5241', 'uvim1006.tab:5242', 'uvim1006.tab:5243', 'uvim1006.tab:5244', 'uvim1006.tab:5358', 'uvim1006.tab:5420', 'uvim1006.tab:5482', 'uvim1006.tab:5544', 'uvim1006.tab:5606', 'uvim1006.tab:5668', 'uvim1006.tab:5730', 'uvim1006.tab:5792', 'uvim1006.tab:5854', 'uvim1006.tab:5916', 'uvim1006.tab:5978', 'uvim1006.tab:6040', 'uvim1006.tab:6102', 'uvim1006.tab:6164', 'uvim1006.tab:6226', 'uvim1006.tab:6288', 'uvim1006.tab:6350', 'uvim1006.tab:6412', 'uvim1006.tab:6474', 'uvim1006.tab:6536', 'uvim1006.tab:6598', 'uvim1006.tab:6660', 'uvim1006.tab:6722', 'uvim1006.tab:6784', 'uvim1006.tab:6846', 'uvim1006.tab:6908', 'uvim1006.tab:6970', 'uvim1006.tab:7032', 'uvim1006.tab:7094', 'uvim1006.tab:7156', 'uvim1006.tab:7218']" self.setglobal(__file__) self.runpy() class countrateCase147(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f680n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5240', 'uvim1006.tab:5242', 'uvim1006.tab:5243', 'uvim1006.tab:5244', 'uvim1006.tab:5358', 'uvim1006.tab:5420', 'uvim1006.tab:5482', 'uvim1006.tab:5544', 'uvim1006.tab:5606', 'uvim1006.tab:5668', 'uvim1006.tab:5730', 'uvim1006.tab:5792', 'uvim1006.tab:5854', 'uvim1006.tab:5916', 'uvim1006.tab:5978', 'uvim1006.tab:6040', 'uvim1006.tab:6102', 'uvim1006.tab:6164', 'uvim1006.tab:6226', 'uvim1006.tab:6288', 'uvim1006.tab:6350', 'uvim1006.tab:6412', 'uvim1006.tab:6474', 'uvim1006.tab:6536', 'uvim1006.tab:6598', 'uvim1006.tab:6660', 'uvim1006.tab:6722', 'uvim1006.tab:6784', 'uvim1006.tab:6846', 'uvim1006.tab:6908', 'uvim1006.tab:6970', 'uvim1006.tab:7032', 'uvim1006.tab:7094']" self.setglobal(__file__) self.runpy() class calcphotCase148(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f680n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5240', 'uvim1006.tab:5242', 'uvim1006.tab:5243', 'uvim1006.tab:5244', 'uvim1006.tab:5358', 'uvim1006.tab:5420', 'uvim1006.tab:5482', 'uvim1006.tab:5544', 'uvim1006.tab:5606', 'uvim1006.tab:5668', 'uvim1006.tab:5730', 'uvim1006.tab:5792', 'uvim1006.tab:5854', 'uvim1006.tab:5916', 'uvim1006.tab:5978', 'uvim1006.tab:6040', 'uvim1006.tab:6102', 'uvim1006.tab:6164', 'uvim1006.tab:6226', 'uvim1006.tab:6288', 'uvim1006.tab:6350', 'uvim1006.tab:6412', 'uvim1006.tab:6474', 'uvim1006.tab:6536', 'uvim1006.tab:6598', 'uvim1006.tab:6660', 'uvim1006.tab:6722', 'uvim1006.tab:6784', 'uvim1006.tab:6846', 'uvim1006.tab:6908', 'uvim1006.tab:6970', 'uvim1006.tab:7032', 'uvim1006.tab:7094']" self.setglobal(__file__) self.runpy() class countrateCase148(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f680n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5241', 'uvim1006.tab:7156', 'uvim1006.tab:7218']" self.setglobal(__file__) self.runpy() class calcphotCase149(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f680n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5241', 'uvim1006.tab:7156', 'uvim1006.tab:7218']" self.setglobal(__file__) self.runpy() class calcphotCase150(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f689m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5245', 'uvim1006.tab:5246', 'uvim1006.tab:5247', 'uvim1006.tab:5248', 'uvim1006.tab:5249', 'uvim1006.tab:5359', 'uvim1006.tab:5421', 'uvim1006.tab:5483', 'uvim1006.tab:5545', 'uvim1006.tab:5607', 'uvim1006.tab:5669', 'uvim1006.tab:5731', 'uvim1006.tab:5793', 'uvim1006.tab:5855', 'uvim1006.tab:5917', 'uvim1006.tab:5979', 'uvim1006.tab:6041', 'uvim1006.tab:6103', 'uvim1006.tab:6165', 'uvim1006.tab:6227', 'uvim1006.tab:6289', 'uvim1006.tab:6351', 'uvim1006.tab:6413', 'uvim1006.tab:6475', 'uvim1006.tab:6537', 'uvim1006.tab:6599', 'uvim1006.tab:6661', 'uvim1006.tab:6723', 'uvim1006.tab:6785', 'uvim1006.tab:6847', 'uvim1006.tab:6909', 'uvim1006.tab:6971', 'uvim1006.tab:7033', 'uvim1006.tab:7095', 'uvim1006.tab:7157', 'uvim1006.tab:7219']" self.setglobal(__file__) self.runpy() class countrateCase149(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f689m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5245', 'uvim1006.tab:5246', 'uvim1006.tab:5247', 'uvim1006.tab:5248', 'uvim1006.tab:5249', 'uvim1006.tab:5359', 'uvim1006.tab:5421', 'uvim1006.tab:5483', 'uvim1006.tab:5545', 'uvim1006.tab:5607', 'uvim1006.tab:5669', 'uvim1006.tab:5731', 'uvim1006.tab:5793', 'uvim1006.tab:5855', 'uvim1006.tab:5917', 'uvim1006.tab:5979', 'uvim1006.tab:6041', 'uvim1006.tab:6103', 'uvim1006.tab:6165', 'uvim1006.tab:6227', 'uvim1006.tab:6289', 'uvim1006.tab:6351', 'uvim1006.tab:6413', 'uvim1006.tab:6475', 'uvim1006.tab:6537', 'uvim1006.tab:6599', 'uvim1006.tab:6661', 'uvim1006.tab:6723', 'uvim1006.tab:6785', 'uvim1006.tab:6847', 'uvim1006.tab:6909', 'uvim1006.tab:6971', 'uvim1006.tab:7033', 'uvim1006.tab:7095', 'uvim1006.tab:7157', 'uvim1006.tab:7219']" self.setglobal(__file__) self.runpy() class countrateCase150(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f689m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5245', 'uvim1006.tab:5247', 'uvim1006.tab:5248', 'uvim1006.tab:5249', 'uvim1006.tab:5359', 'uvim1006.tab:5421', 'uvim1006.tab:5483', 'uvim1006.tab:5545', 'uvim1006.tab:5607', 'uvim1006.tab:5669', 'uvim1006.tab:5731', 'uvim1006.tab:5793', 'uvim1006.tab:5855', 'uvim1006.tab:5917', 'uvim1006.tab:5979', 'uvim1006.tab:6041', 'uvim1006.tab:6103', 'uvim1006.tab:6165', 'uvim1006.tab:6227', 'uvim1006.tab:6289', 'uvim1006.tab:6351', 'uvim1006.tab:6413', 'uvim1006.tab:6475', 'uvim1006.tab:6537', 'uvim1006.tab:6599', 'uvim1006.tab:6661', 'uvim1006.tab:6723', 'uvim1006.tab:6785', 'uvim1006.tab:6847', 'uvim1006.tab:6909', 'uvim1006.tab:6971', 'uvim1006.tab:7033', 'uvim1006.tab:7095']" self.setglobal(__file__) self.runpy() class calcphotCase151(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f689m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5245', 'uvim1006.tab:5247', 'uvim1006.tab:5248', 'uvim1006.tab:5249', 'uvim1006.tab:5359', 'uvim1006.tab:5421', 'uvim1006.tab:5483', 'uvim1006.tab:5545', 'uvim1006.tab:5607', 'uvim1006.tab:5669', 'uvim1006.tab:5731', 'uvim1006.tab:5793', 'uvim1006.tab:5855', 'uvim1006.tab:5917', 'uvim1006.tab:5979', 'uvim1006.tab:6041', 'uvim1006.tab:6103', 'uvim1006.tab:6165', 'uvim1006.tab:6227', 'uvim1006.tab:6289', 'uvim1006.tab:6351', 'uvim1006.tab:6413', 'uvim1006.tab:6475', 'uvim1006.tab:6537', 'uvim1006.tab:6599', 'uvim1006.tab:6661', 'uvim1006.tab:6723', 'uvim1006.tab:6785', 'uvim1006.tab:6847', 'uvim1006.tab:6909', 'uvim1006.tab:6971', 'uvim1006.tab:7033', 'uvim1006.tab:7095']" self.setglobal(__file__) self.runpy() class countrateCase151(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f689m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5246', 'uvim1006.tab:7157', 'uvim1006.tab:7219']" self.setglobal(__file__) self.runpy() class calcphotCase152(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f689m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5246', 'uvim1006.tab:7157', 'uvim1006.tab:7219']" self.setglobal(__file__) self.runpy() class calcphotCase153(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq727n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5250', 'uvim1006.tab:5251', 'uvim1006.tab:5252', 'uvim1006.tab:5253', 'uvim1006.tab:5254', 'uvim1006.tab:5360', 'uvim1006.tab:5422', 'uvim1006.tab:5484', 'uvim1006.tab:5546', 'uvim1006.tab:5608', 'uvim1006.tab:5670', 'uvim1006.tab:5732', 'uvim1006.tab:5794', 'uvim1006.tab:5856', 'uvim1006.tab:5918', 'uvim1006.tab:5980', 'uvim1006.tab:6042', 'uvim1006.tab:6104', 'uvim1006.tab:6166', 'uvim1006.tab:6228', 'uvim1006.tab:6290', 'uvim1006.tab:6352', 'uvim1006.tab:6414', 'uvim1006.tab:6476', 'uvim1006.tab:6538', 'uvim1006.tab:6600', 'uvim1006.tab:6662', 'uvim1006.tab:6724', 'uvim1006.tab:6786', 'uvim1006.tab:6848', 'uvim1006.tab:6910', 'uvim1006.tab:6972', 'uvim1006.tab:7034', 'uvim1006.tab:7096', 'uvim1006.tab:7158', 'uvim1006.tab:7220']" self.setglobal(__file__) self.runpy() class countrateCase152(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq727n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5250', 'uvim1006.tab:5251', 'uvim1006.tab:5252', 'uvim1006.tab:5253', 'uvim1006.tab:5254', 'uvim1006.tab:5360', 'uvim1006.tab:5422', 'uvim1006.tab:5484', 'uvim1006.tab:5546', 'uvim1006.tab:5608', 'uvim1006.tab:5670', 'uvim1006.tab:5732', 'uvim1006.tab:5794', 'uvim1006.tab:5856', 'uvim1006.tab:5918', 'uvim1006.tab:5980', 'uvim1006.tab:6042', 'uvim1006.tab:6104', 'uvim1006.tab:6166', 'uvim1006.tab:6228', 'uvim1006.tab:6290', 'uvim1006.tab:6352', 'uvim1006.tab:6414', 'uvim1006.tab:6476', 'uvim1006.tab:6538', 'uvim1006.tab:6600', 'uvim1006.tab:6662', 'uvim1006.tab:6724', 'uvim1006.tab:6786', 'uvim1006.tab:6848', 'uvim1006.tab:6910', 'uvim1006.tab:6972', 'uvim1006.tab:7034', 'uvim1006.tab:7096', 'uvim1006.tab:7158', 'uvim1006.tab:7220']" self.setglobal(__file__) self.runpy() class countrateCase153(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq727n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5250', 'uvim1006.tab:5252', 'uvim1006.tab:5253', 'uvim1006.tab:5254', 'uvim1006.tab:5360', 'uvim1006.tab:5422', 'uvim1006.tab:5484', 'uvim1006.tab:5546', 'uvim1006.tab:5608', 'uvim1006.tab:5670', 'uvim1006.tab:5732', 'uvim1006.tab:5794', 'uvim1006.tab:5856', 'uvim1006.tab:5918', 'uvim1006.tab:5980', 'uvim1006.tab:6042', 'uvim1006.tab:6104', 'uvim1006.tab:6166', 'uvim1006.tab:6228', 'uvim1006.tab:6290', 'uvim1006.tab:6352', 'uvim1006.tab:6414', 'uvim1006.tab:6476', 'uvim1006.tab:6538', 'uvim1006.tab:6600', 'uvim1006.tab:6662', 'uvim1006.tab:6724', 'uvim1006.tab:6786', 'uvim1006.tab:6848', 'uvim1006.tab:6910', 'uvim1006.tab:6972', 'uvim1006.tab:7034', 'uvim1006.tab:7096']" self.setglobal(__file__) self.runpy() class calcphotCase154(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq727n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5250', 'uvim1006.tab:5252', 'uvim1006.tab:5253', 'uvim1006.tab:5254', 'uvim1006.tab:5360', 'uvim1006.tab:5422', 'uvim1006.tab:5484', 'uvim1006.tab:5546', 'uvim1006.tab:5608', 'uvim1006.tab:5670', 'uvim1006.tab:5732', 'uvim1006.tab:5794', 'uvim1006.tab:5856', 'uvim1006.tab:5918', 'uvim1006.tab:5980', 'uvim1006.tab:6042', 'uvim1006.tab:6104', 'uvim1006.tab:6166', 'uvim1006.tab:6228', 'uvim1006.tab:6290', 'uvim1006.tab:6352', 'uvim1006.tab:6414', 'uvim1006.tab:6476', 'uvim1006.tab:6538', 'uvim1006.tab:6600', 'uvim1006.tab:6662', 'uvim1006.tab:6724', 'uvim1006.tab:6786', 'uvim1006.tab:6848', 'uvim1006.tab:6910', 'uvim1006.tab:6972', 'uvim1006.tab:7034', 'uvim1006.tab:7096']" self.setglobal(__file__) self.runpy() class countrateCase154(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq727n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5251', 'uvim1006.tab:7158', 'uvim1006.tab:7220']" self.setglobal(__file__) self.runpy() class calcphotCase155(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq727n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5251', 'uvim1006.tab:7158', 'uvim1006.tab:7220']" self.setglobal(__file__) self.runpy() class calcphotCase156(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq750n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5255', 'uvim1006.tab:5256', 'uvim1006.tab:5257', 'uvim1006.tab:5258', 'uvim1006.tab:5259', 'uvim1006.tab:5361', 'uvim1006.tab:5423', 'uvim1006.tab:5485', 'uvim1006.tab:5547', 'uvim1006.tab:5609', 'uvim1006.tab:5671', 'uvim1006.tab:5733', 'uvim1006.tab:5795', 'uvim1006.tab:5857', 'uvim1006.tab:5919', 'uvim1006.tab:5981', 'uvim1006.tab:6043', 'uvim1006.tab:6105', 'uvim1006.tab:6167', 'uvim1006.tab:6229', 'uvim1006.tab:6291', 'uvim1006.tab:6353', 'uvim1006.tab:6415', 'uvim1006.tab:6477', 'uvim1006.tab:6539', 'uvim1006.tab:6601', 'uvim1006.tab:6663', 'uvim1006.tab:6725', 'uvim1006.tab:6787', 'uvim1006.tab:6849', 'uvim1006.tab:6911', 'uvim1006.tab:6973', 'uvim1006.tab:7035', 'uvim1006.tab:7097', 'uvim1006.tab:7159', 'uvim1006.tab:7221']" self.setglobal(__file__) self.runpy() class countrateCase155(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq750n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5255', 'uvim1006.tab:5256', 'uvim1006.tab:5257', 'uvim1006.tab:5258', 'uvim1006.tab:5259', 'uvim1006.tab:5361', 'uvim1006.tab:5423', 'uvim1006.tab:5485', 'uvim1006.tab:5547', 'uvim1006.tab:5609', 'uvim1006.tab:5671', 'uvim1006.tab:5733', 'uvim1006.tab:5795', 'uvim1006.tab:5857', 'uvim1006.tab:5919', 'uvim1006.tab:5981', 'uvim1006.tab:6043', 'uvim1006.tab:6105', 'uvim1006.tab:6167', 'uvim1006.tab:6229', 'uvim1006.tab:6291', 'uvim1006.tab:6353', 'uvim1006.tab:6415', 'uvim1006.tab:6477', 'uvim1006.tab:6539', 'uvim1006.tab:6601', 'uvim1006.tab:6663', 'uvim1006.tab:6725', 'uvim1006.tab:6787', 'uvim1006.tab:6849', 'uvim1006.tab:6911', 'uvim1006.tab:6973', 'uvim1006.tab:7035', 'uvim1006.tab:7097', 'uvim1006.tab:7159', 'uvim1006.tab:7221']" self.setglobal(__file__) self.runpy() class countrateCase156(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq750n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5255', 'uvim1006.tab:5257', 'uvim1006.tab:5258', 'uvim1006.tab:5259', 'uvim1006.tab:5361', 'uvim1006.tab:5423', 'uvim1006.tab:5485', 'uvim1006.tab:5547', 'uvim1006.tab:5609', 'uvim1006.tab:5671', 'uvim1006.tab:5733', 'uvim1006.tab:5795', 'uvim1006.tab:5857', 'uvim1006.tab:5919', 'uvim1006.tab:5981', 'uvim1006.tab:6043', 'uvim1006.tab:6105', 'uvim1006.tab:6167', 'uvim1006.tab:6229', 'uvim1006.tab:6291', 'uvim1006.tab:6353', 'uvim1006.tab:6415', 'uvim1006.tab:6477', 'uvim1006.tab:6539', 'uvim1006.tab:6601', 'uvim1006.tab:6663', 'uvim1006.tab:6725', 'uvim1006.tab:6787', 'uvim1006.tab:6849', 'uvim1006.tab:6911', 'uvim1006.tab:6973', 'uvim1006.tab:7035', 'uvim1006.tab:7097']" self.setglobal(__file__) self.runpy() class calcphotCase157(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq750n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5255', 'uvim1006.tab:5257', 'uvim1006.tab:5258', 'uvim1006.tab:5259', 'uvim1006.tab:5361', 'uvim1006.tab:5423', 'uvim1006.tab:5485', 'uvim1006.tab:5547', 'uvim1006.tab:5609', 'uvim1006.tab:5671', 'uvim1006.tab:5733', 'uvim1006.tab:5795', 'uvim1006.tab:5857', 'uvim1006.tab:5919', 'uvim1006.tab:5981', 'uvim1006.tab:6043', 'uvim1006.tab:6105', 'uvim1006.tab:6167', 'uvim1006.tab:6229', 'uvim1006.tab:6291', 'uvim1006.tab:6353', 'uvim1006.tab:6415', 'uvim1006.tab:6477', 'uvim1006.tab:6539', 'uvim1006.tab:6601', 'uvim1006.tab:6663', 'uvim1006.tab:6725', 'uvim1006.tab:6787', 'uvim1006.tab:6849', 'uvim1006.tab:6911', 'uvim1006.tab:6973', 'uvim1006.tab:7035', 'uvim1006.tab:7097']" self.setglobal(__file__) self.runpy() class countrateCase157(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq750n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5256', 'uvim1006.tab:7159', 'uvim1006.tab:7221']" self.setglobal(__file__) self.runpy() class calcphotCase158(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq750n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5256', 'uvim1006.tab:7159', 'uvim1006.tab:7221']" self.setglobal(__file__) self.runpy() class calcphotCase159(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f763m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5260', 'uvim1006.tab:5261', 'uvim1006.tab:5262', 'uvim1006.tab:5263', 'uvim1006.tab:5264', 'uvim1006.tab:5362', 'uvim1006.tab:5424', 'uvim1006.tab:5486', 'uvim1006.tab:5548', 'uvim1006.tab:5610', 'uvim1006.tab:5672', 'uvim1006.tab:5734', 'uvim1006.tab:5796', 'uvim1006.tab:5858', 'uvim1006.tab:5920', 'uvim1006.tab:5982', 'uvim1006.tab:6044', 'uvim1006.tab:6106', 'uvim1006.tab:6168', 'uvim1006.tab:6230', 'uvim1006.tab:6292', 'uvim1006.tab:6354', 'uvim1006.tab:6416', 'uvim1006.tab:6478', 'uvim1006.tab:6540', 'uvim1006.tab:6602', 'uvim1006.tab:6664', 'uvim1006.tab:6726', 'uvim1006.tab:6788', 'uvim1006.tab:6850', 'uvim1006.tab:6912', 'uvim1006.tab:6974', 'uvim1006.tab:7036', 'uvim1006.tab:7098', 'uvim1006.tab:7160', 'uvim1006.tab:7222']" self.setglobal(__file__) self.runpy() class countrateCase158(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f763m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5260', 'uvim1006.tab:5261', 'uvim1006.tab:5262', 'uvim1006.tab:5263', 'uvim1006.tab:5264', 'uvim1006.tab:5362', 'uvim1006.tab:5424', 'uvim1006.tab:5486', 'uvim1006.tab:5548', 'uvim1006.tab:5610', 'uvim1006.tab:5672', 'uvim1006.tab:5734', 'uvim1006.tab:5796', 'uvim1006.tab:5858', 'uvim1006.tab:5920', 'uvim1006.tab:5982', 'uvim1006.tab:6044', 'uvim1006.tab:6106', 'uvim1006.tab:6168', 'uvim1006.tab:6230', 'uvim1006.tab:6292', 'uvim1006.tab:6354', 'uvim1006.tab:6416', 'uvim1006.tab:6478', 'uvim1006.tab:6540', 'uvim1006.tab:6602', 'uvim1006.tab:6664', 'uvim1006.tab:6726', 'uvim1006.tab:6788', 'uvim1006.tab:6850', 'uvim1006.tab:6912', 'uvim1006.tab:6974', 'uvim1006.tab:7036', 'uvim1006.tab:7098', 'uvim1006.tab:7160', 'uvim1006.tab:7222']" self.setglobal(__file__) self.runpy() class countrateCase159(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f763m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5260', 'uvim1006.tab:5262', 'uvim1006.tab:5263', 'uvim1006.tab:5264', 'uvim1006.tab:5362', 'uvim1006.tab:5424', 'uvim1006.tab:5486', 'uvim1006.tab:5548', 'uvim1006.tab:5610', 'uvim1006.tab:5672', 'uvim1006.tab:5734', 'uvim1006.tab:5796', 'uvim1006.tab:5858', 'uvim1006.tab:5920', 'uvim1006.tab:5982', 'uvim1006.tab:6044', 'uvim1006.tab:6106', 'uvim1006.tab:6168', 'uvim1006.tab:6230', 'uvim1006.tab:6292', 'uvim1006.tab:6354', 'uvim1006.tab:6416', 'uvim1006.tab:6478', 'uvim1006.tab:6540', 'uvim1006.tab:6602', 'uvim1006.tab:6664', 'uvim1006.tab:6726', 'uvim1006.tab:6788', 'uvim1006.tab:6850', 'uvim1006.tab:6912', 'uvim1006.tab:6974', 'uvim1006.tab:7036', 'uvim1006.tab:7098']" self.setglobal(__file__) self.runpy() class calcphotCase160(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f763m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5260', 'uvim1006.tab:5262', 'uvim1006.tab:5263', 'uvim1006.tab:5264', 'uvim1006.tab:5362', 'uvim1006.tab:5424', 'uvim1006.tab:5486', 'uvim1006.tab:5548', 'uvim1006.tab:5610', 'uvim1006.tab:5672', 'uvim1006.tab:5734', 'uvim1006.tab:5796', 'uvim1006.tab:5858', 'uvim1006.tab:5920', 'uvim1006.tab:5982', 'uvim1006.tab:6044', 'uvim1006.tab:6106', 'uvim1006.tab:6168', 'uvim1006.tab:6230', 'uvim1006.tab:6292', 'uvim1006.tab:6354', 'uvim1006.tab:6416', 'uvim1006.tab:6478', 'uvim1006.tab:6540', 'uvim1006.tab:6602', 'uvim1006.tab:6664', 'uvim1006.tab:6726', 'uvim1006.tab:6788', 'uvim1006.tab:6850', 'uvim1006.tab:6912', 'uvim1006.tab:6974', 'uvim1006.tab:7036', 'uvim1006.tab:7098']" self.setglobal(__file__) self.runpy() class countrateCase160(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f763m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5261', 'uvim1006.tab:7160', 'uvim1006.tab:7222']" self.setglobal(__file__) self.runpy() class calcphotCase161(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f763m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5261', 'uvim1006.tab:7160', 'uvim1006.tab:7222']" self.setglobal(__file__) self.runpy() class calcphotCase162(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f775w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5265', 'uvim1006.tab:5266', 'uvim1006.tab:5267', 'uvim1006.tab:5268', 'uvim1006.tab:5269', 'uvim1006.tab:5363', 'uvim1006.tab:5425', 'uvim1006.tab:5487', 'uvim1006.tab:5549', 'uvim1006.tab:5611', 'uvim1006.tab:5673', 'uvim1006.tab:5735', 'uvim1006.tab:5797', 'uvim1006.tab:5859', 'uvim1006.tab:5921', 'uvim1006.tab:5983', 'uvim1006.tab:6045', 'uvim1006.tab:6107', 'uvim1006.tab:6169', 'uvim1006.tab:6231', 'uvim1006.tab:6293', 'uvim1006.tab:6355', 'uvim1006.tab:6417', 'uvim1006.tab:6479', 'uvim1006.tab:6541', 'uvim1006.tab:6603', 'uvim1006.tab:6665', 'uvim1006.tab:6727', 'uvim1006.tab:6789', 'uvim1006.tab:6851', 'uvim1006.tab:6913', 'uvim1006.tab:6975', 'uvim1006.tab:7037', 'uvim1006.tab:7099', 'uvim1006.tab:7161', 'uvim1006.tab:7223']" self.setglobal(__file__) self.runpy() class countrateCase161(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f775w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5265', 'uvim1006.tab:5266', 'uvim1006.tab:5267', 'uvim1006.tab:5268', 'uvim1006.tab:5269', 'uvim1006.tab:5363', 'uvim1006.tab:5425', 'uvim1006.tab:5487', 'uvim1006.tab:5549', 'uvim1006.tab:5611', 'uvim1006.tab:5673', 'uvim1006.tab:5735', 'uvim1006.tab:5797', 'uvim1006.tab:5859', 'uvim1006.tab:5921', 'uvim1006.tab:5983', 'uvim1006.tab:6045', 'uvim1006.tab:6107', 'uvim1006.tab:6169', 'uvim1006.tab:6231', 'uvim1006.tab:6293', 'uvim1006.tab:6355', 'uvim1006.tab:6417', 'uvim1006.tab:6479', 'uvim1006.tab:6541', 'uvim1006.tab:6603', 'uvim1006.tab:6665', 'uvim1006.tab:6727', 'uvim1006.tab:6789', 'uvim1006.tab:6851', 'uvim1006.tab:6913', 'uvim1006.tab:6975', 'uvim1006.tab:7037', 'uvim1006.tab:7099', 'uvim1006.tab:7161', 'uvim1006.tab:7223']" self.setglobal(__file__) self.runpy() class countrateCase162(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f775w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5265', 'uvim1006.tab:5267', 'uvim1006.tab:5268', 'uvim1006.tab:5269', 'uvim1006.tab:5363', 'uvim1006.tab:5425', 'uvim1006.tab:5487', 'uvim1006.tab:5549', 'uvim1006.tab:5611', 'uvim1006.tab:5673', 'uvim1006.tab:5735', 'uvim1006.tab:5797', 'uvim1006.tab:5859', 'uvim1006.tab:5921', 'uvim1006.tab:5983', 'uvim1006.tab:6045', 'uvim1006.tab:6107', 'uvim1006.tab:6169', 'uvim1006.tab:6231', 'uvim1006.tab:6293', 'uvim1006.tab:6355', 'uvim1006.tab:6417', 'uvim1006.tab:6479', 'uvim1006.tab:6541', 'uvim1006.tab:6603', 'uvim1006.tab:6665', 'uvim1006.tab:6727', 'uvim1006.tab:6789', 'uvim1006.tab:6851', 'uvim1006.tab:6913', 'uvim1006.tab:6975', 'uvim1006.tab:7037', 'uvim1006.tab:7099']" self.setglobal(__file__) self.runpy() class calcphotCase163(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f775w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5265', 'uvim1006.tab:5267', 'uvim1006.tab:5268', 'uvim1006.tab:5269', 'uvim1006.tab:5363', 'uvim1006.tab:5425', 'uvim1006.tab:5487', 'uvim1006.tab:5549', 'uvim1006.tab:5611', 'uvim1006.tab:5673', 'uvim1006.tab:5735', 'uvim1006.tab:5797', 'uvim1006.tab:5859', 'uvim1006.tab:5921', 'uvim1006.tab:5983', 'uvim1006.tab:6045', 'uvim1006.tab:6107', 'uvim1006.tab:6169', 'uvim1006.tab:6231', 'uvim1006.tab:6293', 'uvim1006.tab:6355', 'uvim1006.tab:6417', 'uvim1006.tab:6479', 'uvim1006.tab:6541', 'uvim1006.tab:6603', 'uvim1006.tab:6665', 'uvim1006.tab:6727', 'uvim1006.tab:6789', 'uvim1006.tab:6851', 'uvim1006.tab:6913', 'uvim1006.tab:6975', 'uvim1006.tab:7037', 'uvim1006.tab:7099']" self.setglobal(__file__) self.runpy() class countrateCase163(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f775w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5266', 'uvim1006.tab:7161', 'uvim1006.tab:7223']" self.setglobal(__file__) self.runpy() class calcphotCase164(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f775w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5266', 'uvim1006.tab:7161', 'uvim1006.tab:7223']" self.setglobal(__file__) self.runpy() class calcphotCase165(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5270', 'uvim1006.tab:5271', 'uvim1006.tab:5272', 'uvim1006.tab:5273', 'uvim1006.tab:5274', 'uvim1006.tab:5364', 'uvim1006.tab:5426', 'uvim1006.tab:5488', 'uvim1006.tab:5550', 'uvim1006.tab:5612', 'uvim1006.tab:5674', 'uvim1006.tab:5736', 'uvim1006.tab:5798', 'uvim1006.tab:5860', 'uvim1006.tab:5922', 'uvim1006.tab:5984', 'uvim1006.tab:6046', 'uvim1006.tab:6108', 'uvim1006.tab:6170', 'uvim1006.tab:6232', 'uvim1006.tab:6294', 'uvim1006.tab:6356', 'uvim1006.tab:6418', 'uvim1006.tab:6480', 'uvim1006.tab:6542', 'uvim1006.tab:6604', 'uvim1006.tab:6666', 'uvim1006.tab:6728', 'uvim1006.tab:6790', 'uvim1006.tab:6852', 'uvim1006.tab:6914', 'uvim1006.tab:6976', 'uvim1006.tab:7038', 'uvim1006.tab:7100', 'uvim1006.tab:7162', 'uvim1006.tab:7224', 'uvim1006.tab:7256', 'uvim1006.tab:7257', 'uvim1006.tab:7258', 'uvim1006.tab:7259', 'uvim1006.tab:7260', 'uvim1006.tab:7261', 'uvim1006.tab:7262', 'uvim1006.tab:7263', 'uvim1006.tab:7264', 'uvim1006.tab:7265', 'uvim1006.tab:7266', 'uvim1006.tab:7267', 'uvim1006.tab:7268', 'uvim1006.tab:7269', 'uvim1006.tab:7270', 'uvim1006.tab:7271', 'uvim1006.tab:7272', 'uvim1006.tab:7273', 'uvim1006.tab:7274', 'uvim1006.tab:7275', 'uvim1006.tab:7276', 'uvim1006.tab:7277', 'uvim1006.tab:7278', 'uvim1006.tab:7279', 'uvim1006.tab:7280', 'uvim1006.tab:7281', 'uvim1006.tab:7282', 'uvim1006.tab:7283', 'uvim1006.tab:7284', 'uvim1006.tab:7285', 'uvim1006.tab:7286', 'uvim1006.tab:7287', 'uvim1006.tab:7288', 'uvim1006.tab:7289', 'uvim1006.tab:7290', 'uvim1006.tab:7291', 'uvim1006.tab:7292', 'uvim1006.tab:7293', 'uvim1006.tab:7294', 'uvim1006.tab:7295', 'uvim1006.tab:7296', 'uvim1006.tab:7297', 'uvim1006.tab:7298', 'uvim1006.tab:7299', 'uvim1006.tab:7300', 'uvim1006.tab:7301', 'uvim1006.tab:7302', 'uvim1006.tab:7303', 'uvim1006.tab:7304', 'uvim1006.tab:7305', 'uvim1006.tab:7306', 'uvim1006.tab:7307', 'uvim1006.tab:7308', 'uvim1006.tab:7309', 'uvim1006.tab:7310', 'uvim1006.tab:7311', 'uvim1006.tab:7312', 'uvim1006.tab:7313', 'uvim1006.tab:7314', 'uvim1006.tab:7315', 'uvim1006.tab:7316', 'uvim1006.tab:7317', 'uvim1006.tab:7318', 'uvim1006.tab:7319', 'uvim1006.tab:7320', 'uvim1006.tab:7321', 'uvim1006.tab:7322', 'uvim1006.tab:7323', 'uvim1006.tab:7324', 'uvim1006.tab:7325', 'uvim1006.tab:7326', 'uvim1006.tab:7327']" self.setglobal(__file__) self.runpy() class countrateCase164(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5270', 'uvim1006.tab:5271', 'uvim1006.tab:5272', 'uvim1006.tab:5273', 'uvim1006.tab:5274', 'uvim1006.tab:5364', 'uvim1006.tab:5426', 'uvim1006.tab:5488', 'uvim1006.tab:5550', 'uvim1006.tab:5612', 'uvim1006.tab:5674', 'uvim1006.tab:5736', 'uvim1006.tab:5798', 'uvim1006.tab:5860', 'uvim1006.tab:5922', 'uvim1006.tab:5984', 'uvim1006.tab:6046', 'uvim1006.tab:6108', 'uvim1006.tab:6170', 'uvim1006.tab:6232', 'uvim1006.tab:6294', 'uvim1006.tab:6356', 'uvim1006.tab:6418', 'uvim1006.tab:6480', 'uvim1006.tab:6542', 'uvim1006.tab:6604', 'uvim1006.tab:6666', 'uvim1006.tab:6728', 'uvim1006.tab:6790', 'uvim1006.tab:6852', 'uvim1006.tab:6914', 'uvim1006.tab:6976', 'uvim1006.tab:7038', 'uvim1006.tab:7100', 'uvim1006.tab:7162', 'uvim1006.tab:7224', 'uvim1006.tab:7256', 'uvim1006.tab:7257', 'uvim1006.tab:7258', 'uvim1006.tab:7259', 'uvim1006.tab:7260', 'uvim1006.tab:7261', 'uvim1006.tab:7262', 'uvim1006.tab:7263', 'uvim1006.tab:7264', 'uvim1006.tab:7265', 'uvim1006.tab:7266', 'uvim1006.tab:7267', 'uvim1006.tab:7268', 'uvim1006.tab:7269', 'uvim1006.tab:7270', 'uvim1006.tab:7271', 'uvim1006.tab:7272', 'uvim1006.tab:7273', 'uvim1006.tab:7274', 'uvim1006.tab:7275', 'uvim1006.tab:7276', 'uvim1006.tab:7277', 'uvim1006.tab:7278', 'uvim1006.tab:7279', 'uvim1006.tab:7280', 'uvim1006.tab:7281', 'uvim1006.tab:7282', 'uvim1006.tab:7283', 'uvim1006.tab:7284', 'uvim1006.tab:7285', 'uvim1006.tab:7286', 'uvim1006.tab:7287', 'uvim1006.tab:7288', 'uvim1006.tab:7289', 'uvim1006.tab:7290', 'uvim1006.tab:7291', 'uvim1006.tab:7292', 'uvim1006.tab:7293', 'uvim1006.tab:7294', 'uvim1006.tab:7295', 'uvim1006.tab:7296', 'uvim1006.tab:7297', 'uvim1006.tab:7298', 'uvim1006.tab:7299', 'uvim1006.tab:7300', 'uvim1006.tab:7301', 'uvim1006.tab:7302', 'uvim1006.tab:7303', 'uvim1006.tab:7304', 'uvim1006.tab:7305', 'uvim1006.tab:7306', 'uvim1006.tab:7307', 'uvim1006.tab:7308', 'uvim1006.tab:7309', 'uvim1006.tab:7310', 'uvim1006.tab:7311', 'uvim1006.tab:7312', 'uvim1006.tab:7313', 'uvim1006.tab:7314', 'uvim1006.tab:7315', 'uvim1006.tab:7316', 'uvim1006.tab:7317', 'uvim1006.tab:7318', 'uvim1006.tab:7319', 'uvim1006.tab:7320', 'uvim1006.tab:7321', 'uvim1006.tab:7322', 'uvim1006.tab:7323', 'uvim1006.tab:7324', 'uvim1006.tab:7325', 'uvim1006.tab:7326', 'uvim1006.tab:7327']" self.setglobal(__file__) self.runpy() class countrateCase165(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5270', 'uvim1006.tab:5272', 'uvim1006.tab:5273', 'uvim1006.tab:5274', 'uvim1006.tab:5364', 'uvim1006.tab:5426', 'uvim1006.tab:5488', 'uvim1006.tab:5550', 'uvim1006.tab:5612', 'uvim1006.tab:5674', 'uvim1006.tab:5736', 'uvim1006.tab:5798', 'uvim1006.tab:5860', 'uvim1006.tab:5922', 'uvim1006.tab:5984', 'uvim1006.tab:6046', 'uvim1006.tab:6108', 'uvim1006.tab:6170', 'uvim1006.tab:6232', 'uvim1006.tab:6294', 'uvim1006.tab:6356', 'uvim1006.tab:6418', 'uvim1006.tab:6480', 'uvim1006.tab:6542', 'uvim1006.tab:6604', 'uvim1006.tab:6666', 'uvim1006.tab:6728', 'uvim1006.tab:6790', 'uvim1006.tab:6852', 'uvim1006.tab:6914', 'uvim1006.tab:6976', 'uvim1006.tab:7038', 'uvim1006.tab:7100']" self.setglobal(__file__) self.runpy() class calcphotCase166(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5270', 'uvim1006.tab:5272', 'uvim1006.tab:5273', 'uvim1006.tab:5274', 'uvim1006.tab:5364', 'uvim1006.tab:5426', 'uvim1006.tab:5488', 'uvim1006.tab:5550', 'uvim1006.tab:5612', 'uvim1006.tab:5674', 'uvim1006.tab:5736', 'uvim1006.tab:5798', 'uvim1006.tab:5860', 'uvim1006.tab:5922', 'uvim1006.tab:5984', 'uvim1006.tab:6046', 'uvim1006.tab:6108', 'uvim1006.tab:6170', 'uvim1006.tab:6232', 'uvim1006.tab:6294', 'uvim1006.tab:6356', 'uvim1006.tab:6418', 'uvim1006.tab:6480', 'uvim1006.tab:6542', 'uvim1006.tab:6604', 'uvim1006.tab:6666', 'uvim1006.tab:6728', 'uvim1006.tab:6790', 'uvim1006.tab:6852', 'uvim1006.tab:6914', 'uvim1006.tab:6976', 'uvim1006.tab:7038', 'uvim1006.tab:7100']" self.setglobal(__file__) self.runpy() class countrateCase166(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5271', 'uvim1006.tab:7162', 'uvim1006.tab:7224']" self.setglobal(__file__) self.runpy() class calcphotCase167(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5271', 'uvim1006.tab:7162', 'uvim1006.tab:7224']" self.setglobal(__file__) self.runpy() class calcphotCase168(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f845m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5275', 'uvim1006.tab:5276', 'uvim1006.tab:5277', 'uvim1006.tab:5278', 'uvim1006.tab:5279', 'uvim1006.tab:5365', 'uvim1006.tab:5427', 'uvim1006.tab:5489', 'uvim1006.tab:5551', 'uvim1006.tab:5613', 'uvim1006.tab:5675', 'uvim1006.tab:5737', 'uvim1006.tab:5799', 'uvim1006.tab:5861', 'uvim1006.tab:5923', 'uvim1006.tab:5985', 'uvim1006.tab:6047', 'uvim1006.tab:6109', 'uvim1006.tab:6171', 'uvim1006.tab:6233', 'uvim1006.tab:6295', 'uvim1006.tab:6357', 'uvim1006.tab:6419', 'uvim1006.tab:6481', 'uvim1006.tab:6543', 'uvim1006.tab:6605', 'uvim1006.tab:6667', 'uvim1006.tab:6729', 'uvim1006.tab:6791', 'uvim1006.tab:6853', 'uvim1006.tab:6915', 'uvim1006.tab:6977', 'uvim1006.tab:7039', 'uvim1006.tab:7101', 'uvim1006.tab:7163', 'uvim1006.tab:7225']" self.setglobal(__file__) self.runpy() class countrateCase167(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f845m" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5275', 'uvim1006.tab:5276', 'uvim1006.tab:5277', 'uvim1006.tab:5278', 'uvim1006.tab:5279', 'uvim1006.tab:5365', 'uvim1006.tab:5427', 'uvim1006.tab:5489', 'uvim1006.tab:5551', 'uvim1006.tab:5613', 'uvim1006.tab:5675', 'uvim1006.tab:5737', 'uvim1006.tab:5799', 'uvim1006.tab:5861', 'uvim1006.tab:5923', 'uvim1006.tab:5985', 'uvim1006.tab:6047', 'uvim1006.tab:6109', 'uvim1006.tab:6171', 'uvim1006.tab:6233', 'uvim1006.tab:6295', 'uvim1006.tab:6357', 'uvim1006.tab:6419', 'uvim1006.tab:6481', 'uvim1006.tab:6543', 'uvim1006.tab:6605', 'uvim1006.tab:6667', 'uvim1006.tab:6729', 'uvim1006.tab:6791', 'uvim1006.tab:6853', 'uvim1006.tab:6915', 'uvim1006.tab:6977', 'uvim1006.tab:7039', 'uvim1006.tab:7101', 'uvim1006.tab:7163', 'uvim1006.tab:7225']" self.setglobal(__file__) self.runpy() class countrateCase168(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f845m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5275', 'uvim1006.tab:5277', 'uvim1006.tab:5278', 'uvim1006.tab:5279', 'uvim1006.tab:5365', 'uvim1006.tab:5427', 'uvim1006.tab:5489', 'uvim1006.tab:5551', 'uvim1006.tab:5613', 'uvim1006.tab:5675', 'uvim1006.tab:5737', 'uvim1006.tab:5799', 'uvim1006.tab:5861', 'uvim1006.tab:5923', 'uvim1006.tab:5985', 'uvim1006.tab:6047', 'uvim1006.tab:6109', 'uvim1006.tab:6171', 'uvim1006.tab:6233', 'uvim1006.tab:6295', 'uvim1006.tab:6357', 'uvim1006.tab:6419', 'uvim1006.tab:6481', 'uvim1006.tab:6543', 'uvim1006.tab:6605', 'uvim1006.tab:6667', 'uvim1006.tab:6729', 'uvim1006.tab:6791', 'uvim1006.tab:6853', 'uvim1006.tab:6915', 'uvim1006.tab:6977', 'uvim1006.tab:7039', 'uvim1006.tab:7101']" self.setglobal(__file__) self.runpy() class calcphotCase169(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f845m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5275', 'uvim1006.tab:5277', 'uvim1006.tab:5278', 'uvim1006.tab:5279', 'uvim1006.tab:5365', 'uvim1006.tab:5427', 'uvim1006.tab:5489', 'uvim1006.tab:5551', 'uvim1006.tab:5613', 'uvim1006.tab:5675', 'uvim1006.tab:5737', 'uvim1006.tab:5799', 'uvim1006.tab:5861', 'uvim1006.tab:5923', 'uvim1006.tab:5985', 'uvim1006.tab:6047', 'uvim1006.tab:6109', 'uvim1006.tab:6171', 'uvim1006.tab:6233', 'uvim1006.tab:6295', 'uvim1006.tab:6357', 'uvim1006.tab:6419', 'uvim1006.tab:6481', 'uvim1006.tab:6543', 'uvim1006.tab:6605', 'uvim1006.tab:6667', 'uvim1006.tab:6729', 'uvim1006.tab:6791', 'uvim1006.tab:6853', 'uvim1006.tab:6915', 'uvim1006.tab:6977', 'uvim1006.tab:7039', 'uvim1006.tab:7101']" self.setglobal(__file__) self.runpy() class countrateCase169(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f845m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5276', 'uvim1006.tab:7163', 'uvim1006.tab:7225']" self.setglobal(__file__) self.runpy() class calcphotCase170(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f845m" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5276', 'uvim1006.tab:7163', 'uvim1006.tab:7225']" self.setglobal(__file__) self.runpy() class calcphotCase171(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5280', 'uvim1006.tab:5281', 'uvim1006.tab:5282', 'uvim1006.tab:5283', 'uvim1006.tab:5284', 'uvim1006.tab:5366', 'uvim1006.tab:5428', 'uvim1006.tab:5490', 'uvim1006.tab:5552', 'uvim1006.tab:5614', 'uvim1006.tab:5676', 'uvim1006.tab:5738', 'uvim1006.tab:5800', 'uvim1006.tab:5862', 'uvim1006.tab:5924', 'uvim1006.tab:5986', 'uvim1006.tab:6048', 'uvim1006.tab:6110', 'uvim1006.tab:6172', 'uvim1006.tab:6234', 'uvim1006.tab:6296', 'uvim1006.tab:6358', 'uvim1006.tab:6420', 'uvim1006.tab:6482', 'uvim1006.tab:6544', 'uvim1006.tab:6606', 'uvim1006.tab:6668', 'uvim1006.tab:6730', 'uvim1006.tab:6792', 'uvim1006.tab:6854', 'uvim1006.tab:6916', 'uvim1006.tab:6978', 'uvim1006.tab:7040', 'uvim1006.tab:7102', 'uvim1006.tab:7164', 'uvim1006.tab:7226']" self.setglobal(__file__) self.runpy() class countrateCase170(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5280', 'uvim1006.tab:5281', 'uvim1006.tab:5282', 'uvim1006.tab:5283', 'uvim1006.tab:5284', 'uvim1006.tab:5366', 'uvim1006.tab:5428', 'uvim1006.tab:5490', 'uvim1006.tab:5552', 'uvim1006.tab:5614', 'uvim1006.tab:5676', 'uvim1006.tab:5738', 'uvim1006.tab:5800', 'uvim1006.tab:5862', 'uvim1006.tab:5924', 'uvim1006.tab:5986', 'uvim1006.tab:6048', 'uvim1006.tab:6110', 'uvim1006.tab:6172', 'uvim1006.tab:6234', 'uvim1006.tab:6296', 'uvim1006.tab:6358', 'uvim1006.tab:6420', 'uvim1006.tab:6482', 'uvim1006.tab:6544', 'uvim1006.tab:6606', 'uvim1006.tab:6668', 'uvim1006.tab:6730', 'uvim1006.tab:6792', 'uvim1006.tab:6854', 'uvim1006.tab:6916', 'uvim1006.tab:6978', 'uvim1006.tab:7040', 'uvim1006.tab:7102', 'uvim1006.tab:7164', 'uvim1006.tab:7226']" self.setglobal(__file__) self.runpy() class countrateCase171(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5280', 'uvim1006.tab:5282', 'uvim1006.tab:5283', 'uvim1006.tab:5284', 'uvim1006.tab:5366', 'uvim1006.tab:5428', 'uvim1006.tab:5490', 'uvim1006.tab:5552', 'uvim1006.tab:5614', 'uvim1006.tab:5676', 'uvim1006.tab:5738', 'uvim1006.tab:5800', 'uvim1006.tab:5862', 'uvim1006.tab:5924', 'uvim1006.tab:5986', 'uvim1006.tab:6048', 'uvim1006.tab:6110', 'uvim1006.tab:6172', 'uvim1006.tab:6234', 'uvim1006.tab:6296', 'uvim1006.tab:6358', 'uvim1006.tab:6420', 'uvim1006.tab:6482', 'uvim1006.tab:6544', 'uvim1006.tab:6606', 'uvim1006.tab:6668', 'uvim1006.tab:6730', 'uvim1006.tab:6792', 'uvim1006.tab:6854', 'uvim1006.tab:6916', 'uvim1006.tab:6978', 'uvim1006.tab:7040', 'uvim1006.tab:7102']" self.setglobal(__file__) self.runpy() class calcphotCase172(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5280', 'uvim1006.tab:5282', 'uvim1006.tab:5283', 'uvim1006.tab:5284', 'uvim1006.tab:5366', 'uvim1006.tab:5428', 'uvim1006.tab:5490', 'uvim1006.tab:5552', 'uvim1006.tab:5614', 'uvim1006.tab:5676', 'uvim1006.tab:5738', 'uvim1006.tab:5800', 'uvim1006.tab:5862', 'uvim1006.tab:5924', 'uvim1006.tab:5986', 'uvim1006.tab:6048', 'uvim1006.tab:6110', 'uvim1006.tab:6172', 'uvim1006.tab:6234', 'uvim1006.tab:6296', 'uvim1006.tab:6358', 'uvim1006.tab:6420', 'uvim1006.tab:6482', 'uvim1006.tab:6544', 'uvim1006.tab:6606', 'uvim1006.tab:6668', 'uvim1006.tab:6730', 'uvim1006.tab:6792', 'uvim1006.tab:6854', 'uvim1006.tab:6916', 'uvim1006.tab:6978', 'uvim1006.tab:7040', 'uvim1006.tab:7102']" self.setglobal(__file__) self.runpy() class countrateCase172(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5281', 'uvim1006.tab:7164', 'uvim1006.tab:7226']" self.setglobal(__file__) self.runpy() class calcphotCase173(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5281', 'uvim1006.tab:7164', 'uvim1006.tab:7226']" self.setglobal(__file__) self.runpy() class calcphotCase174(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq889n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5285', 'uvim1006.tab:5286', 'uvim1006.tab:5287', 'uvim1006.tab:5288', 'uvim1006.tab:5289', 'uvim1006.tab:5367', 'uvim1006.tab:5429', 'uvim1006.tab:5491', 'uvim1006.tab:5553', 'uvim1006.tab:5615', 'uvim1006.tab:5677', 'uvim1006.tab:5739', 'uvim1006.tab:5801', 'uvim1006.tab:5863', 'uvim1006.tab:5925', 'uvim1006.tab:5987', 'uvim1006.tab:6049', 'uvim1006.tab:6111', 'uvim1006.tab:6173', 'uvim1006.tab:6235', 'uvim1006.tab:6297', 'uvim1006.tab:6359', 'uvim1006.tab:6421', 'uvim1006.tab:6483', 'uvim1006.tab:6545', 'uvim1006.tab:6607', 'uvim1006.tab:6669', 'uvim1006.tab:6731', 'uvim1006.tab:6793', 'uvim1006.tab:6855', 'uvim1006.tab:6917', 'uvim1006.tab:6979', 'uvim1006.tab:7041', 'uvim1006.tab:7103', 'uvim1006.tab:7165', 'uvim1006.tab:7227']" self.setglobal(__file__) self.runpy() class countrateCase173(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq889n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5285', 'uvim1006.tab:5286', 'uvim1006.tab:5287', 'uvim1006.tab:5288', 'uvim1006.tab:5289', 'uvim1006.tab:5367', 'uvim1006.tab:5429', 'uvim1006.tab:5491', 'uvim1006.tab:5553', 'uvim1006.tab:5615', 'uvim1006.tab:5677', 'uvim1006.tab:5739', 'uvim1006.tab:5801', 'uvim1006.tab:5863', 'uvim1006.tab:5925', 'uvim1006.tab:5987', 'uvim1006.tab:6049', 'uvim1006.tab:6111', 'uvim1006.tab:6173', 'uvim1006.tab:6235', 'uvim1006.tab:6297', 'uvim1006.tab:6359', 'uvim1006.tab:6421', 'uvim1006.tab:6483', 'uvim1006.tab:6545', 'uvim1006.tab:6607', 'uvim1006.tab:6669', 'uvim1006.tab:6731', 'uvim1006.tab:6793', 'uvim1006.tab:6855', 'uvim1006.tab:6917', 'uvim1006.tab:6979', 'uvim1006.tab:7041', 'uvim1006.tab:7103', 'uvim1006.tab:7165', 'uvim1006.tab:7227']" self.setglobal(__file__) self.runpy() class countrateCase174(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq889n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5285', 'uvim1006.tab:5287', 'uvim1006.tab:5288', 'uvim1006.tab:5289', 'uvim1006.tab:5367', 'uvim1006.tab:5429', 'uvim1006.tab:5491', 'uvim1006.tab:5553', 'uvim1006.tab:5615', 'uvim1006.tab:5677', 'uvim1006.tab:5739', 'uvim1006.tab:5801', 'uvim1006.tab:5863', 'uvim1006.tab:5925', 'uvim1006.tab:5987', 'uvim1006.tab:6049', 'uvim1006.tab:6111', 'uvim1006.tab:6173', 'uvim1006.tab:6235', 'uvim1006.tab:6297', 'uvim1006.tab:6359', 'uvim1006.tab:6421', 'uvim1006.tab:6483', 'uvim1006.tab:6545', 'uvim1006.tab:6607', 'uvim1006.tab:6669', 'uvim1006.tab:6731', 'uvim1006.tab:6793', 'uvim1006.tab:6855', 'uvim1006.tab:6917', 'uvim1006.tab:6979', 'uvim1006.tab:7041', 'uvim1006.tab:7103']" self.setglobal(__file__) self.runpy() class calcphotCase175(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq889n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5285', 'uvim1006.tab:5287', 'uvim1006.tab:5288', 'uvim1006.tab:5289', 'uvim1006.tab:5367', 'uvim1006.tab:5429', 'uvim1006.tab:5491', 'uvim1006.tab:5553', 'uvim1006.tab:5615', 'uvim1006.tab:5677', 'uvim1006.tab:5739', 'uvim1006.tab:5801', 'uvim1006.tab:5863', 'uvim1006.tab:5925', 'uvim1006.tab:5987', 'uvim1006.tab:6049', 'uvim1006.tab:6111', 'uvim1006.tab:6173', 'uvim1006.tab:6235', 'uvim1006.tab:6297', 'uvim1006.tab:6359', 'uvim1006.tab:6421', 'uvim1006.tab:6483', 'uvim1006.tab:6545', 'uvim1006.tab:6607', 'uvim1006.tab:6669', 'uvim1006.tab:6731', 'uvim1006.tab:6793', 'uvim1006.tab:6855', 'uvim1006.tab:6917', 'uvim1006.tab:6979', 'uvim1006.tab:7041', 'uvim1006.tab:7103']" self.setglobal(__file__) self.runpy() class countrateCase175(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq889n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5286', 'uvim1006.tab:7165', 'uvim1006.tab:7227']" self.setglobal(__file__) self.runpy() class calcphotCase176(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq889n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5286', 'uvim1006.tab:7165', 'uvim1006.tab:7227']" self.setglobal(__file__) self.runpy() class calcphotCase177(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq906n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5290', 'uvim1006.tab:5291', 'uvim1006.tab:5292', 'uvim1006.tab:5293', 'uvim1006.tab:5294', 'uvim1006.tab:5368', 'uvim1006.tab:5430', 'uvim1006.tab:5492', 'uvim1006.tab:5554', 'uvim1006.tab:5616', 'uvim1006.tab:5678', 'uvim1006.tab:5740', 'uvim1006.tab:5802', 'uvim1006.tab:5864', 'uvim1006.tab:5926', 'uvim1006.tab:5988', 'uvim1006.tab:6050', 'uvim1006.tab:6112', 'uvim1006.tab:6174', 'uvim1006.tab:6236', 'uvim1006.tab:6298', 'uvim1006.tab:6360', 'uvim1006.tab:6422', 'uvim1006.tab:6484', 'uvim1006.tab:6546', 'uvim1006.tab:6608', 'uvim1006.tab:6670', 'uvim1006.tab:6732', 'uvim1006.tab:6794', 'uvim1006.tab:6856', 'uvim1006.tab:6918', 'uvim1006.tab:6980', 'uvim1006.tab:7042', 'uvim1006.tab:7104', 'uvim1006.tab:7166', 'uvim1006.tab:7228']" self.setglobal(__file__) self.runpy() class countrateCase176(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq906n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5290', 'uvim1006.tab:5291', 'uvim1006.tab:5292', 'uvim1006.tab:5293', 'uvim1006.tab:5294', 'uvim1006.tab:5368', 'uvim1006.tab:5430', 'uvim1006.tab:5492', 'uvim1006.tab:5554', 'uvim1006.tab:5616', 'uvim1006.tab:5678', 'uvim1006.tab:5740', 'uvim1006.tab:5802', 'uvim1006.tab:5864', 'uvim1006.tab:5926', 'uvim1006.tab:5988', 'uvim1006.tab:6050', 'uvim1006.tab:6112', 'uvim1006.tab:6174', 'uvim1006.tab:6236', 'uvim1006.tab:6298', 'uvim1006.tab:6360', 'uvim1006.tab:6422', 'uvim1006.tab:6484', 'uvim1006.tab:6546', 'uvim1006.tab:6608', 'uvim1006.tab:6670', 'uvim1006.tab:6732', 'uvim1006.tab:6794', 'uvim1006.tab:6856', 'uvim1006.tab:6918', 'uvim1006.tab:6980', 'uvim1006.tab:7042', 'uvim1006.tab:7104', 'uvim1006.tab:7166', 'uvim1006.tab:7228']" self.setglobal(__file__) self.runpy() class countrateCase177(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq906n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5290', 'uvim1006.tab:5292', 'uvim1006.tab:5293', 'uvim1006.tab:5294', 'uvim1006.tab:5368', 'uvim1006.tab:5430', 'uvim1006.tab:5492', 'uvim1006.tab:5554', 'uvim1006.tab:5616', 'uvim1006.tab:5678', 'uvim1006.tab:5740', 'uvim1006.tab:5802', 'uvim1006.tab:5864', 'uvim1006.tab:5926', 'uvim1006.tab:5988', 'uvim1006.tab:6050', 'uvim1006.tab:6112', 'uvim1006.tab:6174', 'uvim1006.tab:6236', 'uvim1006.tab:6298', 'uvim1006.tab:6360', 'uvim1006.tab:6422', 'uvim1006.tab:6484', 'uvim1006.tab:6546', 'uvim1006.tab:6608', 'uvim1006.tab:6670', 'uvim1006.tab:6732', 'uvim1006.tab:6794', 'uvim1006.tab:6856', 'uvim1006.tab:6918', 'uvim1006.tab:6980', 'uvim1006.tab:7042', 'uvim1006.tab:7104']" self.setglobal(__file__) self.runpy() class calcphotCase178(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq906n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5290', 'uvim1006.tab:5292', 'uvim1006.tab:5293', 'uvim1006.tab:5294', 'uvim1006.tab:5368', 'uvim1006.tab:5430', 'uvim1006.tab:5492', 'uvim1006.tab:5554', 'uvim1006.tab:5616', 'uvim1006.tab:5678', 'uvim1006.tab:5740', 'uvim1006.tab:5802', 'uvim1006.tab:5864', 'uvim1006.tab:5926', 'uvim1006.tab:5988', 'uvim1006.tab:6050', 'uvim1006.tab:6112', 'uvim1006.tab:6174', 'uvim1006.tab:6236', 'uvim1006.tab:6298', 'uvim1006.tab:6360', 'uvim1006.tab:6422', 'uvim1006.tab:6484', 'uvim1006.tab:6546', 'uvim1006.tab:6608', 'uvim1006.tab:6670', 'uvim1006.tab:6732', 'uvim1006.tab:6794', 'uvim1006.tab:6856', 'uvim1006.tab:6918', 'uvim1006.tab:6980', 'uvim1006.tab:7042', 'uvim1006.tab:7104']" self.setglobal(__file__) self.runpy() class countrateCase178(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq906n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5291', 'uvim1006.tab:7166', 'uvim1006.tab:7228']" self.setglobal(__file__) self.runpy() class calcphotCase179(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq906n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5291', 'uvim1006.tab:7166', 'uvim1006.tab:7228']" self.setglobal(__file__) self.runpy() class calcphotCase180(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq924n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5295', 'uvim1006.tab:5296', 'uvim1006.tab:5297', 'uvim1006.tab:5298', 'uvim1006.tab:5299', 'uvim1006.tab:5369', 'uvim1006.tab:5431', 'uvim1006.tab:5493', 'uvim1006.tab:5555', 'uvim1006.tab:5617', 'uvim1006.tab:5679', 'uvim1006.tab:5741', 'uvim1006.tab:5803', 'uvim1006.tab:5865', 'uvim1006.tab:5927', 'uvim1006.tab:5989', 'uvim1006.tab:6051', 'uvim1006.tab:6113', 'uvim1006.tab:6175', 'uvim1006.tab:6237', 'uvim1006.tab:6299', 'uvim1006.tab:6361', 'uvim1006.tab:6423', 'uvim1006.tab:6485', 'uvim1006.tab:6547', 'uvim1006.tab:6609', 'uvim1006.tab:6671', 'uvim1006.tab:6733', 'uvim1006.tab:6795', 'uvim1006.tab:6857', 'uvim1006.tab:6919', 'uvim1006.tab:6981', 'uvim1006.tab:7043', 'uvim1006.tab:7105', 'uvim1006.tab:7167', 'uvim1006.tab:7229']" self.setglobal(__file__) self.runpy() class countrateCase179(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq924n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5295', 'uvim1006.tab:5296', 'uvim1006.tab:5297', 'uvim1006.tab:5298', 'uvim1006.tab:5299', 'uvim1006.tab:5369', 'uvim1006.tab:5431', 'uvim1006.tab:5493', 'uvim1006.tab:5555', 'uvim1006.tab:5617', 'uvim1006.tab:5679', 'uvim1006.tab:5741', 'uvim1006.tab:5803', 'uvim1006.tab:5865', 'uvim1006.tab:5927', 'uvim1006.tab:5989', 'uvim1006.tab:6051', 'uvim1006.tab:6113', 'uvim1006.tab:6175', 'uvim1006.tab:6237', 'uvim1006.tab:6299', 'uvim1006.tab:6361', 'uvim1006.tab:6423', 'uvim1006.tab:6485', 'uvim1006.tab:6547', 'uvim1006.tab:6609', 'uvim1006.tab:6671', 'uvim1006.tab:6733', 'uvim1006.tab:6795', 'uvim1006.tab:6857', 'uvim1006.tab:6919', 'uvim1006.tab:6981', 'uvim1006.tab:7043', 'uvim1006.tab:7105', 'uvim1006.tab:7167', 'uvim1006.tab:7229']" self.setglobal(__file__) self.runpy() class countrateCase180(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq924n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5295', 'uvim1006.tab:5297', 'uvim1006.tab:5298', 'uvim1006.tab:5299', 'uvim1006.tab:5369', 'uvim1006.tab:5431', 'uvim1006.tab:5493', 'uvim1006.tab:5555', 'uvim1006.tab:5617', 'uvim1006.tab:5679', 'uvim1006.tab:5741', 'uvim1006.tab:5803', 'uvim1006.tab:5865', 'uvim1006.tab:5927', 'uvim1006.tab:5989', 'uvim1006.tab:6051', 'uvim1006.tab:6113', 'uvim1006.tab:6175', 'uvim1006.tab:6237', 'uvim1006.tab:6299', 'uvim1006.tab:6361', 'uvim1006.tab:6423', 'uvim1006.tab:6485', 'uvim1006.tab:6547', 'uvim1006.tab:6609', 'uvim1006.tab:6671', 'uvim1006.tab:6733', 'uvim1006.tab:6795', 'uvim1006.tab:6857', 'uvim1006.tab:6919', 'uvim1006.tab:6981', 'uvim1006.tab:7043', 'uvim1006.tab:7105']" self.setglobal(__file__) self.runpy() class calcphotCase181(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq924n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5295', 'uvim1006.tab:5297', 'uvim1006.tab:5298', 'uvim1006.tab:5299', 'uvim1006.tab:5369', 'uvim1006.tab:5431', 'uvim1006.tab:5493', 'uvim1006.tab:5555', 'uvim1006.tab:5617', 'uvim1006.tab:5679', 'uvim1006.tab:5741', 'uvim1006.tab:5803', 'uvim1006.tab:5865', 'uvim1006.tab:5927', 'uvim1006.tab:5989', 'uvim1006.tab:6051', 'uvim1006.tab:6113', 'uvim1006.tab:6175', 'uvim1006.tab:6237', 'uvim1006.tab:6299', 'uvim1006.tab:6361', 'uvim1006.tab:6423', 'uvim1006.tab:6485', 'uvim1006.tab:6547', 'uvim1006.tab:6609', 'uvim1006.tab:6671', 'uvim1006.tab:6733', 'uvim1006.tab:6795', 'uvim1006.tab:6857', 'uvim1006.tab:6919', 'uvim1006.tab:6981', 'uvim1006.tab:7043', 'uvim1006.tab:7105']" self.setglobal(__file__) self.runpy() class countrateCase181(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq924n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5296', 'uvim1006.tab:7167', 'uvim1006.tab:7229']" self.setglobal(__file__) self.runpy() class calcphotCase182(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq924n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5296', 'uvim1006.tab:7167', 'uvim1006.tab:7229']" self.setglobal(__file__) self.runpy() class calcphotCase183(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq937n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5300', 'uvim1006.tab:5301', 'uvim1006.tab:5302', 'uvim1006.tab:5303', 'uvim1006.tab:5304', 'uvim1006.tab:5370', 'uvim1006.tab:5432', 'uvim1006.tab:5494', 'uvim1006.tab:5556', 'uvim1006.tab:5618', 'uvim1006.tab:5680', 'uvim1006.tab:5742', 'uvim1006.tab:5804', 'uvim1006.tab:5866', 'uvim1006.tab:5928', 'uvim1006.tab:5990', 'uvim1006.tab:6052', 'uvim1006.tab:6114', 'uvim1006.tab:6176', 'uvim1006.tab:6238', 'uvim1006.tab:6300', 'uvim1006.tab:6362', 'uvim1006.tab:6424', 'uvim1006.tab:6486', 'uvim1006.tab:6548', 'uvim1006.tab:6610', 'uvim1006.tab:6672', 'uvim1006.tab:6734', 'uvim1006.tab:6796', 'uvim1006.tab:6858', 'uvim1006.tab:6920', 'uvim1006.tab:6982', 'uvim1006.tab:7044', 'uvim1006.tab:7106', 'uvim1006.tab:7168', 'uvim1006.tab:7230']" self.setglobal(__file__) self.runpy() class countrateCase182(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq937n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5300', 'uvim1006.tab:5301', 'uvim1006.tab:5302', 'uvim1006.tab:5303', 'uvim1006.tab:5304', 'uvim1006.tab:5370', 'uvim1006.tab:5432', 'uvim1006.tab:5494', 'uvim1006.tab:5556', 'uvim1006.tab:5618', 'uvim1006.tab:5680', 'uvim1006.tab:5742', 'uvim1006.tab:5804', 'uvim1006.tab:5866', 'uvim1006.tab:5928', 'uvim1006.tab:5990', 'uvim1006.tab:6052', 'uvim1006.tab:6114', 'uvim1006.tab:6176', 'uvim1006.tab:6238', 'uvim1006.tab:6300', 'uvim1006.tab:6362', 'uvim1006.tab:6424', 'uvim1006.tab:6486', 'uvim1006.tab:6548', 'uvim1006.tab:6610', 'uvim1006.tab:6672', 'uvim1006.tab:6734', 'uvim1006.tab:6796', 'uvim1006.tab:6858', 'uvim1006.tab:6920', 'uvim1006.tab:6982', 'uvim1006.tab:7044', 'uvim1006.tab:7106', 'uvim1006.tab:7168', 'uvim1006.tab:7230']" self.setglobal(__file__) self.runpy() class countrateCase183(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq937n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5300', 'uvim1006.tab:5302', 'uvim1006.tab:5303', 'uvim1006.tab:5304', 'uvim1006.tab:5370', 'uvim1006.tab:5432', 'uvim1006.tab:5494', 'uvim1006.tab:5556', 'uvim1006.tab:5618', 'uvim1006.tab:5680', 'uvim1006.tab:5742', 'uvim1006.tab:5804', 'uvim1006.tab:5866', 'uvim1006.tab:5928', 'uvim1006.tab:5990', 'uvim1006.tab:6052', 'uvim1006.tab:6114', 'uvim1006.tab:6176', 'uvim1006.tab:6238', 'uvim1006.tab:6300', 'uvim1006.tab:6362', 'uvim1006.tab:6424', 'uvim1006.tab:6486', 'uvim1006.tab:6548', 'uvim1006.tab:6610', 'uvim1006.tab:6672', 'uvim1006.tab:6734', 'uvim1006.tab:6796', 'uvim1006.tab:6858', 'uvim1006.tab:6920', 'uvim1006.tab:6982', 'uvim1006.tab:7044', 'uvim1006.tab:7106']" self.setglobal(__file__) self.runpy() class calcphotCase184(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq937n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5300', 'uvim1006.tab:5302', 'uvim1006.tab:5303', 'uvim1006.tab:5304', 'uvim1006.tab:5370', 'uvim1006.tab:5432', 'uvim1006.tab:5494', 'uvim1006.tab:5556', 'uvim1006.tab:5618', 'uvim1006.tab:5680', 'uvim1006.tab:5742', 'uvim1006.tab:5804', 'uvim1006.tab:5866', 'uvim1006.tab:5928', 'uvim1006.tab:5990', 'uvim1006.tab:6052', 'uvim1006.tab:6114', 'uvim1006.tab:6176', 'uvim1006.tab:6238', 'uvim1006.tab:6300', 'uvim1006.tab:6362', 'uvim1006.tab:6424', 'uvim1006.tab:6486', 'uvim1006.tab:6548', 'uvim1006.tab:6610', 'uvim1006.tab:6672', 'uvim1006.tab:6734', 'uvim1006.tab:6796', 'uvim1006.tab:6858', 'uvim1006.tab:6920', 'uvim1006.tab:6982', 'uvim1006.tab:7044', 'uvim1006.tab:7106']" self.setglobal(__file__) self.runpy() class countrateCase184(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,fq937n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5301', 'uvim1006.tab:7168', 'uvim1006.tab:7230']" self.setglobal(__file__) self.runpy() class calcphotCase185(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,fq937n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5301', 'uvim1006.tab:7168', 'uvim1006.tab:7230']" self.setglobal(__file__) self.runpy() class calcphotCase186(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f953n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5305', 'uvim1006.tab:5306', 'uvim1006.tab:5307', 'uvim1006.tab:5308', 'uvim1006.tab:5309', 'uvim1006.tab:5371', 'uvim1006.tab:5433', 'uvim1006.tab:5495', 'uvim1006.tab:5557', 'uvim1006.tab:5619', 'uvim1006.tab:5681', 'uvim1006.tab:5743', 'uvim1006.tab:5805', 'uvim1006.tab:5867', 'uvim1006.tab:5929', 'uvim1006.tab:5991', 'uvim1006.tab:6053', 'uvim1006.tab:6115', 'uvim1006.tab:6177', 'uvim1006.tab:6239', 'uvim1006.tab:6301', 'uvim1006.tab:6363', 'uvim1006.tab:6425', 'uvim1006.tab:6487', 'uvim1006.tab:6549', 'uvim1006.tab:6611', 'uvim1006.tab:6673', 'uvim1006.tab:6735', 'uvim1006.tab:6797', 'uvim1006.tab:6859', 'uvim1006.tab:6921', 'uvim1006.tab:6983', 'uvim1006.tab:7045', 'uvim1006.tab:7107', 'uvim1006.tab:7169', 'uvim1006.tab:7231']" self.setglobal(__file__) self.runpy() class countrateCase185(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f953n" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="['uvim1006.tab:5305', 'uvim1006.tab:5306', 'uvim1006.tab:5307', 'uvim1006.tab:5308', 'uvim1006.tab:5309', 'uvim1006.tab:5371', 'uvim1006.tab:5433', 'uvim1006.tab:5495', 'uvim1006.tab:5557', 'uvim1006.tab:5619', 'uvim1006.tab:5681', 'uvim1006.tab:5743', 'uvim1006.tab:5805', 'uvim1006.tab:5867', 'uvim1006.tab:5929', 'uvim1006.tab:5991', 'uvim1006.tab:6053', 'uvim1006.tab:6115', 'uvim1006.tab:6177', 'uvim1006.tab:6239', 'uvim1006.tab:6301', 'uvim1006.tab:6363', 'uvim1006.tab:6425', 'uvim1006.tab:6487', 'uvim1006.tab:6549', 'uvim1006.tab:6611', 'uvim1006.tab:6673', 'uvim1006.tab:6735', 'uvim1006.tab:6797', 'uvim1006.tab:6859', 'uvim1006.tab:6921', 'uvim1006.tab:6983', 'uvim1006.tab:7045', 'uvim1006.tab:7107', 'uvim1006.tab:7169', 'uvim1006.tab:7231']" self.setglobal(__file__) self.runpy() class countrateCase186(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f953n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5305', 'uvim1006.tab:5307', 'uvim1006.tab:5308', 'uvim1006.tab:5309', 'uvim1006.tab:5371', 'uvim1006.tab:5433', 'uvim1006.tab:5495', 'uvim1006.tab:5557', 'uvim1006.tab:5619', 'uvim1006.tab:5681', 'uvim1006.tab:5743', 'uvim1006.tab:5805', 'uvim1006.tab:5867', 'uvim1006.tab:5929', 'uvim1006.tab:5991', 'uvim1006.tab:6053', 'uvim1006.tab:6115', 'uvim1006.tab:6177', 'uvim1006.tab:6239', 'uvim1006.tab:6301', 'uvim1006.tab:6363', 'uvim1006.tab:6425', 'uvim1006.tab:6487', 'uvim1006.tab:6549', 'uvim1006.tab:6611', 'uvim1006.tab:6673', 'uvim1006.tab:6735', 'uvim1006.tab:6797', 'uvim1006.tab:6859', 'uvim1006.tab:6921', 'uvim1006.tab:6983', 'uvim1006.tab:7045', 'uvim1006.tab:7107']" self.setglobal(__file__) self.runpy() class calcphotCase187(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f953n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),28.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5305', 'uvim1006.tab:5307', 'uvim1006.tab:5308', 'uvim1006.tab:5309', 'uvim1006.tab:5371', 'uvim1006.tab:5433', 'uvim1006.tab:5495', 'uvim1006.tab:5557', 'uvim1006.tab:5619', 'uvim1006.tab:5681', 'uvim1006.tab:5743', 'uvim1006.tab:5805', 'uvim1006.tab:5867', 'uvim1006.tab:5929', 'uvim1006.tab:5991', 'uvim1006.tab:6053', 'uvim1006.tab:6115', 'uvim1006.tab:6177', 'uvim1006.tab:6239', 'uvim1006.tab:6301', 'uvim1006.tab:6363', 'uvim1006.tab:6425', 'uvim1006.tab:6487', 'uvim1006.tab:6549', 'uvim1006.tab:6611', 'uvim1006.tab:6673', 'uvim1006.tab:6735', 'uvim1006.tab:6797', 'uvim1006.tab:6859', 'uvim1006.tab:6921', 'uvim1006.tab:6983', 'uvim1006.tab:7045', 'uvim1006.tab:7107']" self.setglobal(__file__) self.runpy() class countrateCase187(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f953n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5306', 'uvim1006.tab:7169', 'uvim1006.tab:7231']" self.setglobal(__file__) self.runpy() class calcphotCase188(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f953n" self.spectrum="rn(icat(k93models,9230,0.0,4.1),band(johnson,v),22.0,vegamag)" self.subset=False self.etcid="['uvim1006.tab:5306', 'uvim1006.tab:7169', 'uvim1006.tab:7231']" self.setglobal(__file__) self.runpy() class calcspecCase2233(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,30000,0.0,4.0)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase188(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,30000,0.0,4.0)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7232" self.setglobal(__file__) self.runpy() class calcphotCase189(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,30000,0.0,4.0)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7232" self.setglobal(__file__) self.runpy() class calcspecCase2234(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,25400,0.0,3.9)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase189(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,25400,0.0,3.9)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase190(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,25400,0.0,3.9)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcspecCase2235(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,18700,0.0,3.9)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase190(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,18700,0.0,3.9)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7234" self.setglobal(__file__) self.runpy() class calcphotCase191(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,18700,0.0,3.9)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7234" self.setglobal(__file__) self.runpy() class calcspecCase2236(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,15400,0.0,3.9)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase191(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,15400,0.0,3.9)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7235" self.setglobal(__file__) self.runpy() class calcphotCase192(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,15400,0.0,3.9)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7235" self.setglobal(__file__) self.runpy() class calcspecCase2237(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,11900,0.0,4.0)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase192(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,11900,0.0,4.0)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7236" self.setglobal(__file__) self.runpy() class calcphotCase193(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,11900,0.0,4.0)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7236" self.setglobal(__file__) self.runpy() class countrateCase193(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,9230,0.0,4.1)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7237" self.setglobal(__file__) self.runpy() class calcphotCase194(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,9230,0.0,4.1)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7237" self.setglobal(__file__) self.runpy() class calcspecCase2239(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,8720,0.0,4.2)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase194(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,8720,0.0,4.2)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7238" self.setglobal(__file__) self.runpy() class calcphotCase195(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,8720,0.0,4.2)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7238" self.setglobal(__file__) self.runpy() class calcspecCase2240(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,8200,0.0,4.3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase195(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,8200,0.0,4.3)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase196(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,8200,0.0,4.3)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcspecCase2241(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,7700,0.0,1.7)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase196(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,7700,0.0,1.7)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7240" self.setglobal(__file__) self.runpy() class calcphotCase197(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,7700,0.0,1.7)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7240" self.setglobal(__file__) self.runpy() class calcspecCase2242(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,7200,0.0,4.3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase197(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,7200,0.0,4.3)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7241" self.setglobal(__file__) self.runpy() class calcphotCase198(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,7200,0.0,4.3)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7241" self.setglobal(__file__) self.runpy() class calcspecCase2243(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,6890,0.0,4.3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase198(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,6890,0.0,4.3)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7242" self.setglobal(__file__) self.runpy() class calcphotCase199(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,6890,0.0,4.3)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7242" self.setglobal(__file__) self.runpy() class calcspecCase2244(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,6440,0.0,4.3)" self.subset=True self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase199(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,6440,0.0,4.3)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7243" self.setglobal(__file__) self.runpy() class calcphotCase200(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,6440,0.0,4.3)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7243" self.setglobal(__file__) self.runpy() class calcspecCase2245(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,6200,0.0,4.4)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase200(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,6200,0.0,4.4)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7244" self.setglobal(__file__) self.runpy() class calcphotCase201(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,6200,0.0,4.4)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7244" self.setglobal(__file__) self.runpy() class calcspecCase2246(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,5860,0.0,4.4)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase201(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5860,0.0,4.4)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase202(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5860,0.0,4.4)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcspecCase2247(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,4850,0.0,1.1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase202(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,4850,0.0,1.1)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7246" self.setglobal(__file__) self.runpy() class calcphotCase203(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,4850,0.0,1.1)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7246" self.setglobal(__file__) self.runpy() class calcspecCase2248(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,5770,0.0,4.5)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase203(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5770,0.0,4.5)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7247" self.setglobal(__file__) self.runpy() class calcphotCase204(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5770,0.0,4.5)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7247" self.setglobal(__file__) self.runpy() class calcspecCase2249(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,5570,0.0,4.5)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase204(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5570,0.0,4.5)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7248" self.setglobal(__file__) self.runpy() class calcphotCase205(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5570,0.0,4.5)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7248" self.setglobal(__file__) self.runpy() class calcspecCase2250(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,5250,0.0,4.5)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase205(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5250,0.0,4.5)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7249" self.setglobal(__file__) self.runpy() class calcphotCase206(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,5250,0.0,4.5)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7249" self.setglobal(__file__) self.runpy() class calcspecCase2251(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,4560,0.0,4.5)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase206(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,4560,0.0,4.5)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7250" self.setglobal(__file__) self.runpy() class calcphotCase207(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,4560,0.0,4.5)*ebmvx(0.04,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7250" self.setglobal(__file__) self.runpy() class calcspecCase2252(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,4060,0.0,4.5)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase207(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,4060,0.0,4.5)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase208(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,4060,0.0,4.5)*ebmvx(0.08,gal1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcspecCase2253(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,3500,0.0,4.6)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase208(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,3500,0.0,4.6)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7252" self.setglobal(__file__) self.runpy() class calcphotCase209(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,3500,0.0,4.6)*ebmvx(0.12,gal3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7252" self.setglobal(__file__) self.runpy() class calcspecCase2254(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,44500,0.0,5.0)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase209(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,44500,0.0,5.0)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7253" self.setglobal(__file__) self.runpy() class calcphotCase210(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,44500,0.0,5.0)*ebmvx(0.16,smc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7253" self.setglobal(__file__) self.runpy() class calcspecCase2255(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,38000.,0.0,4.5)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase210(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,38000.,0.0,4.5)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7254" self.setglobal(__file__) self.runpy() class calcphotCase211(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,38000.,0.0,4.5)*ebmvx(0.2,lmc),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7254" self.setglobal(__file__) self.runpy() class calcspecCase2256(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="icat(k93models,33000.,0.0,4.0)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase211(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,33000.,0.0,4.0)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7255" self.setglobal(__file__) self.runpy() class calcphotCase212(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f606w" self.spectrum="rn(icat(k93models,33000.,0.0,4.0)*ebmvx(0.24,xgal),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7255" self.setglobal(__file__) self.runpy() class countrateCase212(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_1.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7256" self.setglobal(__file__) self.runpy() class calcphotCase213(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_1.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=True self.etcid="uvim1006.tab:7256" self.setglobal(__file__) self.runpy() class countrateCase213(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_1.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase214(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_1.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase214(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_2.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7258" self.setglobal(__file__) self.runpy() class calcphotCase215(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_2.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7258" self.setglobal(__file__) self.runpy() class countrateCase215(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_2.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7259" self.setglobal(__file__) self.runpy() class calcphotCase216(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_2.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7259" self.setglobal(__file__) self.runpy() class countrateCase216(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_3.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7260" self.setglobal(__file__) self.runpy() class calcphotCase217(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_3.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7260" self.setglobal(__file__) self.runpy() class countrateCase217(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_4.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7261" self.setglobal(__file__) self.runpy() class calcphotCase218(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_4.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7261" self.setglobal(__file__) self.runpy() class countrateCase218(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_5.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7262" self.setglobal(__file__) self.runpy() class calcphotCase219(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_5.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7262" self.setglobal(__file__) self.runpy() class countrateCase219(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_5.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase220(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_5.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase220(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_6.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=True self.etcid="uvim1006.tab:7264" self.setglobal(__file__) self.runpy() class calcphotCase221(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_6.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7264" self.setglobal(__file__) self.runpy() class countrateCase221(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_10.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase222(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_10.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase222(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_11.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase223(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_11.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase223(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_12.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7273" self.setglobal(__file__) self.runpy() class calcphotCase224(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_12.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7273" self.setglobal(__file__) self.runpy() class countrateCase224(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_9.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7268" self.setglobal(__file__) self.runpy() class calcphotCase225(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_9.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7268" self.setglobal(__file__) self.runpy() class countrateCase225(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_14.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase226(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_14.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase226(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_10.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7270" self.setglobal(__file__) self.runpy() class calcphotCase227(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_10.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7270" self.setglobal(__file__) self.runpy() class countrateCase227(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_16.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase228(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_16.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase228(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_17.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase229(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_17.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase229(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_18.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase230(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_18.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase230(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_19.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase231(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_19.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase231(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_10.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase232(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_10.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase232(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_11.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase233(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_11.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase233(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_12.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase234(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_12.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase234(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_13.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase235(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_13.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase235(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_14.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase236(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_14.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase236(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_15.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7274" self.setglobal(__file__) self.runpy() class calcphotCase237(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_15.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7274" self.setglobal(__file__) self.runpy() class countrateCase237(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_16.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase238(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_16.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase238(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_17.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase239(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_17.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase239(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_18.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase240(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_18.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase240(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_19.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase241(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_19.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase241(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_20.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase242(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_20.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase242(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_37.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7286" self.setglobal(__file__) self.runpy() class calcphotCase243(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_37.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7286" self.setglobal(__file__) self.runpy() class countrateCase243(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_22.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase244(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_22.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase244(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_40.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7288" self.setglobal(__file__) self.runpy() class calcphotCase245(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_40.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7288" self.setglobal(__file__) self.runpy() class countrateCase245(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_24.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase246(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_24.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase246(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_25.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase247(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_25.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase247(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_26.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase248(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_26.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase248(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_27.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase249(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_27.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase249(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_29.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=True self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase250(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_29.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase250(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_20.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase251(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_20.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase251(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_63.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7295" self.setglobal(__file__) self.runpy() class calcphotCase252(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_63.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7295" self.setglobal(__file__) self.runpy() class countrateCase252(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_63.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7296" self.setglobal(__file__) self.runpy() class calcphotCase253(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_63.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7296" self.setglobal(__file__) self.runpy() class countrateCase253(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_23.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7279" self.setglobal(__file__) self.runpy() class calcphotCase254(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_23.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7279" self.setglobal(__file__) self.runpy() class countrateCase254(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_65.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7298" self.setglobal(__file__) self.runpy() class calcphotCase255(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_65.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7298" self.setglobal(__file__) self.runpy() class countrateCase255(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_65.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase256(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_65.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase256(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_65.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7300" self.setglobal(__file__) self.runpy() class calcphotCase257(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_65.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7300" self.setglobal(__file__) self.runpy() class countrateCase257(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_67.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7301" self.setglobal(__file__) self.runpy() class calcphotCase258(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_67.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7301" self.setglobal(__file__) self.runpy() class countrateCase258(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_67.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7302" self.setglobal(__file__) self.runpy() class calcphotCase259(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_67.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7302" self.setglobal(__file__) self.runpy() class countrateCase259(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_69.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7303" self.setglobal(__file__) self.runpy() class calcphotCase260(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_69.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=True self.etcid="uvim1006.tab:7303" self.setglobal(__file__) self.runpy() class countrateCase260(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_31.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase261(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_31.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase261(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_76.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase262(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_76.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase262(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_33.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase263(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_33.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase263(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_34.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase264(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_34.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase264(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_87.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7308" self.setglobal(__file__) self.runpy() class calcphotCase265(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_87.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7308" self.setglobal(__file__) self.runpy() class countrateCase265(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_36.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7285" self.setglobal(__file__) self.runpy() class calcphotCase266(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_36.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7285" self.setglobal(__file__) self.runpy() class countrateCase266(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_93.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7310" self.setglobal(__file__) self.runpy() class calcphotCase267(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_93.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7310" self.setglobal(__file__) self.runpy() class countrateCase267(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_38.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase268(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_38.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase268(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_95.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7312" self.setglobal(__file__) self.runpy() class calcphotCase269(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_95.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7312" self.setglobal(__file__) self.runpy() class countrateCase269(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=True self.etcid="uvim1006.tab:7313" self.setglobal(__file__) self.runpy() class calcphotCase270(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7313" self.setglobal(__file__) self.runpy() class countrateCase270(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7314" self.setglobal(__file__) self.runpy() class calcphotCase271(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=True self.etcid="uvim1006.tab:7314" self.setglobal(__file__) self.runpy() class countrateCase271(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7315" self.setglobal(__file__) self.runpy() class calcphotCase272(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="uvim1006.tab:7315" self.setglobal(__file__) self.runpy() class countrateCase272(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7316" self.setglobal(__file__) self.runpy() class calcphotCase273(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_100.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="uvim1006.tab:7316" self.setglobal(__file__) self.runpy() class countrateCase273(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_60.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase274(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_60.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase274(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_114.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7318" self.setglobal(__file__) self.runpy() class calcphotCase275(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_114.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="uvim1006.tab:7318" self.setglobal(__file__) self.runpy() class countrateCase275(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_117.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7319" self.setglobal(__file__) self.runpy() class calcphotCase276(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_117.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="uvim1006.tab:7319" self.setglobal(__file__) self.runpy() class countrateCase276(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_118.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7320" self.setglobal(__file__) self.runpy() class calcphotCase277(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_118.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="uvim1006.tab:7320" self.setglobal(__file__) self.runpy() class countrateCase277(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_50.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase278(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_50.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase278(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_51.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase279(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_51.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.04,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase279(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_52.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase280(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_52.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.08,gal1)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase280(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_53.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase281(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_53.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.12,gal3)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase281(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_54.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase282(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_54.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.16,smc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase282(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_55.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase283(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_55.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.2,lmc)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase283(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_56.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase284(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f814w" self.spectrum="rn(spec(/grp/hst/cdbs//grid/pickles/dat_uvk/pickles_uk_56.fits),band(cousins,i),28.0,vegamag)*ebmvx(0.24,xgal)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase284(basecase.countrateOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/agk_81d266_stis_001.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase285(basecase.calcphotOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/agk_81d266_stis_001.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase285(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/bd_28d4211_stis_001.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase286(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/bd_28d4211_stis_001.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase286(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/bd_75d325_stis_001.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase287(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/bd_75d325_stis_001.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase287(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/feige34_stis_001.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase288(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/feige34_stis_001.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase288(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/feige110_stis_001.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase289(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/feige110_stis_001.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase289(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd50_004.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7333" self.setglobal(__file__) self.runpy() class calcphotCase290(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd50_004.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7333" self.setglobal(__file__) self.runpy() class countrateCase290(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd71_mod_005.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7334" self.setglobal(__file__) self.runpy() class calcphotCase291(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd71_mod_005.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7334" self.setglobal(__file__) self.runpy() class countrateCase291(basecase.countrateOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd108_005.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7335" self.setglobal(__file__) self.runpy() class calcphotCase292(basecase.calcphotOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd108_005.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7335" self.setglobal(__file__) self.runpy() class countrateCase292(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd153_mod_004.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7336" self.setglobal(__file__) self.runpy() class calcphotCase293(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/gd153_mod_004.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7336" self.setglobal(__file__) self.runpy() class countrateCase293(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/grw_70d5824_stis_001.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase294(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/grw_70d5824_stis_001.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase294(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/g191b2b_mod_004.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7338" self.setglobal(__file__) self.runpy() class calcphotCase295(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/g191b2b_mod_004.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7338" self.setglobal(__file__) self.runpy() class countrateCase295(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/g93_48_004.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7339" self.setglobal(__file__) self.runpy() class calcphotCase296(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/g93_48_004.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7339" self.setglobal(__file__) self.runpy() class countrateCase296(basecase.countrateOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz4_stis_001.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase297(basecase.calcphotOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz4_stis_001.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase297(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz21_stis_001.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase298(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz21_stis_001.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase298(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz43_mod_004.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase299(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz43_mod_004.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase299(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz44_stis_001.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase300(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/hz44_stis_001.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase300(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/lb227_004.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7344" self.setglobal(__file__) self.runpy() class calcphotCase301(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/lb227_004.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7344" self.setglobal(__file__) self.runpy() class countrateCase301(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/lds749b_mod_001.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase302(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/lds749b_mod_001.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase302(basecase.countrateOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/ngc7293_005.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7346" self.setglobal(__file__) self.runpy() class calcphotCase303(basecase.calcphotOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/ngc7293_005.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7346" self.setglobal(__file__) self.runpy() class countrateCase303(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/sun_reference_stis_001.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase304(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/sun_reference_stis_001.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase304(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/alpha_lyr_stis_003.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase305(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(/grp/hst/cdbs//calspec/alpha_lyr_stis_003.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase305(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(elliptical.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7349" self.setglobal(__file__) self.runpy() class calcphotCase306(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(elliptical.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7349" self.setglobal(__file__) self.runpy() class countrateCase306(basecase.countrateOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(orion.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7350" self.setglobal(__file__) self.runpy() class calcphotCase307(basecase.calcphotOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(orion.fits),0.25),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7350" self.setglobal(__file__) self.runpy() class countrateCase307(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(spiral.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7351" self.setglobal(__file__) self.runpy() class calcphotCase308(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(spiral.fits),0.3),band(johnson,b),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7351" self.setglobal(__file__) self.runpy() class countrateCase308(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(ngc1068_template.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7352" self.setglobal(__file__) self.runpy() class calcphotCase309(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(ngc1068_template.fits),0.05),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7352" self.setglobal(__file__) self.runpy() class countrateCase309(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(pn_smooth.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7353" self.setglobal(__file__) self.runpy() class calcphotCase310(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(pn_smooth.fits),0.1),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7353" self.setglobal(__file__) self.runpy() class countrateCase310(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(orion_smooth.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7354" self.setglobal(__file__) self.runpy() class calcphotCase311(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(orion_smooth.fits),0.15),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7354" self.setglobal(__file__) self.runpy() class countrateCase311(basecase.countrateOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(qso_template.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7355" self.setglobal(__file__) self.runpy() class calcphotCase312(basecase.calcphotOverlapCase): def setUp(self): self.obsmode="wfc3,uvis1,f555w" self.spectrum="rn(z(spec(qso_template.fits),0.2),band(johnson,b),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7355" self.setglobal(__file__) self.runpy() class calcspecCase2257(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="bb(10000)" self.subset=True self.etcid="None" self.setglobal(__file__) self.runpy() class countrateCase312(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,u),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7356" self.setglobal(__file__) self.runpy() class calcphotCase313(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,u),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7356" self.setglobal(__file__) self.runpy() class calcphotCase314(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.1,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7357" self.setglobal(__file__) self.runpy() class countrateCase313(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.1,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7357" self.setglobal(__file__) self.runpy() class countrateCase314(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,r),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7357" self.setglobal(__file__) self.runpy() class calcphotCase315(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,r),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7357" self.setglobal(__file__) self.runpy() class calcphotCase316(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),23.3,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7358" self.setglobal(__file__) self.runpy() class countrateCase315(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),23.3,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7358" self.setglobal(__file__) self.runpy() class countrateCase316(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,i),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7358" self.setglobal(__file__) self.runpy() class calcphotCase317(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,i),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7358" self.setglobal(__file__) self.runpy() class calcphotCase318(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),21.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7359" self.setglobal(__file__) self.runpy() class countrateCase317(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),21.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7359" self.setglobal(__file__) self.runpy() class countrateCase318(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,j),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7359" self.setglobal(__file__) self.runpy() class calcphotCase319(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,j),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7359" self.setglobal(__file__) self.runpy() class calcphotCase320(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.424602593467696,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7360" self.setglobal(__file__) self.runpy() class countrateCase319(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.424602593467696,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7360" self.setglobal(__file__) self.runpy() class countrateCase320(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,k),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7360" self.setglobal(__file__) self.runpy() class calcphotCase321(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(johnson,k),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7360" self.setglobal(__file__) self.runpy() class calcphotCase322(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+spec(Zodi.fits)*0.5+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7361" self.setglobal(__file__) self.runpy() class countrateCase321(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="spec(earthshine.fits)*0.5+spec(Zodi.fits)*0.5+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7361" self.setglobal(__file__) self.runpy() class countrateCase322(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(cousins,r),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7361" self.setglobal(__file__) self.runpy() class calcphotCase323(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f300x" self.spectrum="rn(bb(10000),band(cousins,r),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7361" self.setglobal(__file__) self.runpy() class calcspecCase2263(basecase.calcspecCase): def setUp(self): self.obsmode="None" self.spectrum="pl(4000.0,-2.0,flam)" self.subset=True self.etcid="None" self.setglobal(__file__) self.runpy() class calcphotCase324(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="spec(earthshine.fits)*2.0+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7362" self.setglobal(__file__) self.runpy() class countrateCase323(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="spec(earthshine.fits)*2.0+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7362" self.setglobal(__file__) self.runpy() class countrateCase324(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(pl(4000.0,-2.0,flam),band(bessell,h),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7362" self.setglobal(__file__) self.runpy() class calcphotCase325(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(pl(4000.0,-2.0,flam),band(bessell,h),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7362" self.setglobal(__file__) self.runpy() class calcphotCase326(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="spec(earthshine.fits)+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7363" self.setglobal(__file__) self.runpy() class countrateCase325(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="spec(earthshine.fits)+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7363" self.setglobal(__file__) self.runpy() class countrateCase326(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(pl(4000.0,-2.0,flam),band(Bessell,j),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7363" self.setglobal(__file__) self.runpy() class calcphotCase327(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(pl(4000.0,-2.0,flam),band(Bessell,j),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7363" self.setglobal(__file__) self.runpy() class calcphotCase328(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7364" self.setglobal(__file__) self.runpy() class countrateCase327(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))" self.subset=False self.etcid="uvim1006.tab:7364" self.setglobal(__file__) self.runpy() class countrateCase328(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(pl(4000.0,-2.0,flam),band(bessell,k),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7364" self.setglobal(__file__) self.runpy() class calcphotCase329(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f850lp" self.spectrum="rn(pl(4000.0,-2.0,flam),band(bessell,k),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7364" self.setglobal(__file__) self.runpy() class calcphotCase330(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))*2.0" self.subset=False self.etcid="uvim1006.tab:7365" self.setglobal(__file__) self.runpy() class countrateCase329(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)+spec(el1302a.fits)+spec(el1356a.fits)+spec(el2471a.fits))*2.0" self.subset=False self.etcid="uvim1006.tab:7365" self.setglobal(__file__) self.runpy() class countrateCase330(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,flam),band(sdss,g),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7365" self.setglobal(__file__) self.runpy() class calcphotCase331(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,flam),band(sdss,g),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7365" self.setglobal(__file__) self.runpy() class countrateCase331(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="rn(unit(1.0,flam),band(sdss,r),28.0,vegamag)+em(5007.0,5.0,1.0E-13,flam)" self.subset=False self.etcid="uvim1006.tab:7366" self.setglobal(__file__) self.runpy() class calcphotCase332(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f502n" self.spectrum="rn(unit(1.0,flam),band(sdss,r),28.0,vegamag)+em(5007.0,5.0,1.0E-13,flam)" self.subset=False self.etcid="uvim1006.tab:7366" self.setglobal(__file__) self.runpy() class calcphotCase333(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)*0.2+spec(el1302a.fits)*0.01333333333+spec(el1356a.fits)*0.012+spec(el2471a.fits)*0.01)" self.subset=False self.etcid="uvim1006.tab:7367" self.setglobal(__file__) self.runpy() class countrateCase332(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)+(spec(el1215a.fits)*0.2+spec(el1302a.fits)*0.01333333333+spec(el1356a.fits)*0.012+spec(el2471a.fits)*0.01)" self.subset=False self.etcid="uvim1006.tab:7367" self.setglobal(__file__) self.runpy() class countrateCase333(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,flam),band(sdss,i),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7367" self.setglobal(__file__) self.runpy() class calcphotCase334(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,flam),band(sdss,i),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7367" self.setglobal(__file__) self.runpy() class calcphotCase335(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)" self.subset=False self.etcid="uvim1006.tab:7368" self.setglobal(__file__) self.runpy() class countrateCase334(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="spec(earthshine.fits)*0.5+rn(spec(Zodi.fits),band(johnson,v),22.7,vegamag)" self.subset=False self.etcid="uvim1006.tab:7368" self.setglobal(__file__) self.runpy() class countrateCase335(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,fnu),band(sdss,z),28.0,vegamag)" self.subset=True self.etcid="uvim1006.tab:7368" self.setglobal(__file__) self.runpy() class calcphotCase336(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,fnu),band(sdss,z),28.0,vegamag)" self.subset=False self.etcid="uvim1006.tab:7368" self.setglobal(__file__) self.runpy() class countrateCase336(basecase.countrateCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,flam),box(5000.0,1.0),1.0e-18,flam)" self.subset=False self.etcid="uvim1006.tab:7369" self.setglobal(__file__) self.runpy() class calcphotCase337(basecase.calcphotCase): def setUp(self): self.obsmode="wfc3,uvis1,f225w" self.spectrum="rn(unit(1.0,flam),box(5000.0,1.0),1.0e-18,flam)" self.subset=True self.etcid="uvim1006.tab:7369" self.setglobal(__file__) self.runpy() if __name__ == '__main__': if 'debug' in sys.argv: testutil.debug(__name__) else: testutil.testall(__name__,2) #calcspec:2265 - 2239 dup =26 #thermback:0 - 0 dup =0 #calcphot:337 - 2 dup =335 #countrate:336 - 1 dup =335 #SpecSourcerateSpec:0 - 0 dup =0
75.802865
2,289
0.68265
57,989
423,359
4.926417
0.057735
0.360637
0.029236
0.038981
0.962153
0.962153
0.962108
0.961572
0.961555
0.961523
0
0.241287
0.122905
423,359
5,584
2,290
75.81644
0.528059
0.000312
0
0.869082
0
0.18472
0.639782
0.167879
0
0
0
0
0
1
0.124821
false
0
0.000538
0
0.250179
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
1
0
0
0
1
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
72087aa438fca690fcc16a9051804e88130de008
782,761
py
Python
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_skp_qos_oper.py
tkamata-test/ydk-py
b637e7853a8edbbd31fbc05afa3aa4110b31c5f9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_skp_qos_oper.py
tkamata-test/ydk-py
b637e7853a8edbbd31fbc05afa3aa4110b31c5f9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_skp_qos_oper.py
tkamata-test/ydk-py
b637e7853a8edbbd31fbc05afa3aa4110b31c5f9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
""" Cisco_IOS_XR_skp_qos_oper This module contains a collection of YANG definitions for Cisco IOS\-XR skp\-qos package operational data. This module contains definitions for the following management objects\: platform\-qos\: QoS Skywarp platform operational data platform\-qos\-ea\: platform qos ea Copyright (c) 2013\-2016 by Cisco Systems, Inc. All rights reserved. """ import re import collections from enum import Enum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk.errors import YPYError, YPYModelError class ActionEnum(Enum): """ ActionEnum Action type .. data:: police_transmit = 0 Police action transmit .. data:: police_set_transmit = 1 Police action set transmit .. data:: police_drop = 2 Police action drop .. data:: police_unknown = 3 Police action unknown """ police_transmit = 0 police_set_transmit = 1 police_drop = 2 police_unknown = 3 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['ActionEnum'] class ActionOpcodeEnum(Enum): """ ActionOpcodeEnum Action opcode .. data:: precedence = 0 Precedence .. data:: dscp = 1 DSCP .. data:: discard_class = 2 Discard class .. data:: qos_group = 3 QoS group .. data:: cos_inner = 4 COS inner .. data:: cos = 5 COS .. data:: exp_top = 6 EXP top .. data:: exp_imp = 7 EXP IMP .. data:: tunnel_precedence = 8 Tunnel precedence .. data:: tunnel_dscp = 9 Tunnel DSCP .. data:: itag_dei = 10 ITAG DEI .. data:: itag_cos = 11 ITAG COS .. data:: cos_imposition = 12 COS imposition .. data:: dei_imposition = 13 DEI imposition .. data:: dei = 14 DEI .. data:: no_marking = 15 No marking """ precedence = 0 dscp = 1 discard_class = 2 qos_group = 3 cos_inner = 4 cos = 5 exp_top = 6 exp_imp = 7 tunnel_precedence = 8 tunnel_dscp = 9 itag_dei = 10 itag_cos = 11 cos_imposition = 12 dei_imposition = 13 dei = 14 no_marking = 15 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['ActionOpcodeEnum'] class CacStateEnum(Enum): """ CacStateEnum CAC/UBRL class states .. data:: unknown = 0 unknown .. data:: admit = 1 admit .. data:: redirect = 2 redirect .. data:: ubrl = 3 ubrl """ unknown = 0 admit = 1 redirect = 2 ubrl = 3 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['CacStateEnum'] class PolicyParamUnitEnum(Enum): """ PolicyParamUnitEnum Policy param unit .. data:: policy_param_unit_invalid = 0 policy param unit invalid .. data:: policy_param_unit_bytes = 1 policy param unit bytes .. data:: policy_param_unit_kbytes = 2 policy param unit kbytes .. data:: policy_param_unit_mbytes = 3 policy param unit mbytes .. data:: policy_param_unit_gbytes = 4 policy param unit gbytes .. data:: policy_param_unit_bitsps = 5 policy param unit bitsps .. data:: policy_param_unit_kbitsps = 6 policy param unit kbitsps .. data:: policy_param_unit_mbitsps = 7 policy param unit mbitsps .. data:: policy_param_unit_gbitsps = 8 policy param unit gbitsps .. data:: policy_param_unit_cells_ps = 9 policy param unit cells ps .. data:: policy_param_unit_packets_ps = 10 policy param unit packets ps .. data:: policy_param_unit_us = 11 policy param unit us .. data:: policy_param_unit_ms = 12 policy param unit ms .. data:: policy_param_unit_seconds = 13 policy param unit seconds .. data:: policy_param_unit_packets = 14 policy param unit packets .. data:: policy_param_unit_cells = 15 policy param unit cells .. data:: policy_param_unit_percent = 16 policy param unit percent .. data:: policy_param_unit_per_thousand = 17 policy param unit per thousand .. data:: policy_param_unit_per_million = 18 policy param unit per million .. data:: policy_param_unit_hz = 19 policy param unit hz .. data:: policy_param_unit_khz = 20 policy param unit khz .. data:: policy_param_unit_mhz = 21 policy param unit mhz .. data:: policy_param_unit_ratio = 22 policy param unit ratio .. data:: policy_param_unit_max = 23 policy param unit max """ policy_param_unit_invalid = 0 policy_param_unit_bytes = 1 policy_param_unit_kbytes = 2 policy_param_unit_mbytes = 3 policy_param_unit_gbytes = 4 policy_param_unit_bitsps = 5 policy_param_unit_kbitsps = 6 policy_param_unit_mbitsps = 7 policy_param_unit_gbitsps = 8 policy_param_unit_cells_ps = 9 policy_param_unit_packets_ps = 10 policy_param_unit_us = 11 policy_param_unit_ms = 12 policy_param_unit_seconds = 13 policy_param_unit_packets = 14 policy_param_unit_cells = 15 policy_param_unit_percent = 16 policy_param_unit_per_thousand = 17 policy_param_unit_per_million = 18 policy_param_unit_hz = 19 policy_param_unit_khz = 20 policy_param_unit_mhz = 21 policy_param_unit_ratio = 22 policy_param_unit_max = 23 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PolicyParamUnitEnum'] class PolicyStateEnum(Enum): """ PolicyStateEnum Different Interface states .. data:: active = 0 active .. data:: suspended = 1 suspended """ active = 0 suspended = 1 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PolicyStateEnum'] class QosUnitEnum(Enum): """ QosUnitEnum QoS parameter unit .. data:: invalid = 0 Invalid type .. data:: bytes = 1 Bytes .. data:: kilobytes = 2 Kilobytes .. data:: megabytes = 3 Megabytes .. data:: gigabytes = 4 Gigabytes .. data:: bps = 5 Bits per second .. data:: kbps = 6 Kilo bits per second .. data:: mbps = 7 Mega bits per second .. data:: gbps = 8 Giga bits per second .. data:: cells_per_second = 9 Cells per second .. data:: packets_per_second = 10 Packets per second .. data:: microsecond = 11 Microsecond .. data:: millisecond = 12 Millisecond .. data:: packets = 13 Number of packets .. data:: cells = 14 Number of cells .. data:: percentage = 15 Percentage .. data:: ratio = 16 Ratio """ invalid = 0 bytes = 1 kilobytes = 2 megabytes = 3 gigabytes = 4 bps = 5 kbps = 6 mbps = 7 gbps = 8 cells_per_second = 9 packets_per_second = 10 microsecond = 11 millisecond = 12 packets = 13 cells = 14 percentage = 15 ratio = 16 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['QosUnitEnum'] class TbAlgorithmEnum(Enum): """ TbAlgorithmEnum Tokenbucket type .. data:: inactive = 0 Inactive, configured but disabled .. data:: single = 1 Single token bucket .. data:: single_rate_tcm = 2 Single rate three color marker .. data:: two_rate_tcm = 3 Two rate three color marker .. data:: mef_tcm = 4 Allows coupling between CIR and PIR tb's .. data:: dummy = 5 Internal dummy token bucket for coupled-policer child """ inactive = 0 single = 1 single_rate_tcm = 2 two_rate_tcm = 3 mef_tcm = 4 dummy = 5 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['TbAlgorithmEnum'] class WredEnum(Enum): """ WredEnum Wred .. data:: wred_cos_cmd = 0 wred cos cmd .. data:: wred_dscp_cmd = 1 wred dscp cmd .. data:: wred_precedence_cmd = 2 wred precedence cmd .. data:: wred_discard_class_cmd = 3 wred discard class cmd .. data:: wred_mpls_exp_cmd = 4 wred mpls exp cmd .. data:: red_with_user_min_max = 5 red with user min max .. data:: red_with_default_min_max = 6 red with default min max .. data:: wred_dei_cmd = 7 wred dei cmd .. data:: wred_ecn_cmd = 8 wred ecn cmd .. data:: wred_invalid_cmd = 9 wred invalid cmd """ wred_cos_cmd = 0 wred_dscp_cmd = 1 wred_precedence_cmd = 2 wred_discard_class_cmd = 3 wred_mpls_exp_cmd = 4 red_with_user_min_max = 5 red_with_default_min_max = 6 wred_dei_cmd = 7 wred_ecn_cmd = 8 wred_invalid_cmd = 9 @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['WredEnum'] class PlatformQos(object): """ QoS Skywarp platform operational data .. attribute:: nodes List of nodes with platform specific QoS configuration **type**\: :py:class:`Nodes <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.nodes = PlatformQos.Nodes() self.nodes.parent = self class Nodes(object): """ List of nodes with platform specific QoS configuration .. attribute:: node Node with platform specific QoS configuration **type**\: list of :py:class:`Node <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node = YList() self.node.parent = self self.node.name = 'node' class Node(object): """ Node with platform specific QoS configuration .. attribute:: node_name <key> Node name **type**\: str **pattern:** ([a\-zA\-Z0\-9\_]\*\\d+/){1,2}([a\-zA\-Z0\-9\_]\*\\d+) .. attribute:: bundle_interfaces QoS list of bundle interfaces **type**\: :py:class:`BundleInterfaces <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces>` .. attribute:: capability QoS system capability **type**\: :py:class:`Capability <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Capability>` .. attribute:: interfaces QoS list of interfaces **type**\: :py:class:`Interfaces <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node_name = None self.bundle_interfaces = PlatformQos.Nodes.Node.BundleInterfaces() self.bundle_interfaces.parent = self self.capability = PlatformQos.Nodes.Node.Capability() self.capability.parent = self self.interfaces = PlatformQos.Nodes.Node.Interfaces() self.interfaces.parent = self class BundleInterfaces(object): """ QoS list of bundle interfaces .. attribute:: bundle_interface QoS interface name **type**\: list of :py:class:`BundleInterface <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bundle_interface = YList() self.bundle_interface.parent = self self.bundle_interface.name = 'bundle_interface' class BundleInterface(object): """ QoS interface name .. attribute:: interface_name <key> Bundle interface name **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: member_interfaces QoS list of member interfaces **type**\: :py:class:`MemberInterfaces <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_name = None self.member_interfaces = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces() self.member_interfaces.parent = self class MemberInterfaces(object): """ QoS list of member interfaces .. attribute:: member_interface QoS interface name **type**\: list of :py:class:`MemberInterface <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.member_interface = YList() self.member_interface.parent = self self.member_interface.name = 'member_interface' class MemberInterface(object): """ QoS interface name .. attribute:: interface_name <key> Memeber interface **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: bundle_input QoS policy direction input **type**\: :py:class:`BundleInput <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput>` .. attribute:: bundle_output QoS policy direction output **type**\: :py:class:`BundleOutput <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_name = None self.bundle_input = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput() self.bundle_input.parent = self self.bundle_output = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput() self.bundle_output.parent = self class BundleInput(object): """ QoS policy direction input .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Header>` .. attribute:: interface_parameters QoS Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Header() self.header.parent = self self.interface_parameters = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Header']['meta_info'] class InterfaceParameters(object): """ QoS Interface Parameters .. attribute:: interface_config_rate Interface Configured Rate **type**\: :py:class:`InterfaceConfigRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.InterfaceConfigRate>` .. attribute:: interface_program_rate Interface Programmed Rate **type**\: :py:class:`InterfaceProgramRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.InterfaceProgramRate>` .. attribute:: port_shaper_rate Port Shaper Rate **type**\: :py:class:`PortShaperRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.PortShaperRate>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_config_rate = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.InterfaceConfigRate() self.interface_config_rate.parent = self self.interface_program_rate = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.InterfaceProgramRate() self.interface_program_rate.parent = self self.port_shaper_rate = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.PortShaperRate() self.port_shaper_rate.parent = self class InterfaceConfigRate(object): """ Interface Configured Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-config-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.InterfaceConfigRate']['meta_info'] class InterfaceProgramRate(object): """ Interface Programmed Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-program-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.InterfaceProgramRate']['meta_info'] class PortShaperRate(object): """ Port Shaper Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:port-shaper-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters.PortShaperRate']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_config_rate is not None and self.interface_config_rate._has_data(): return True if self.interface_program_rate is not None and self.interface_program_rate._has_data(): return True if self.port_shaper_rate is not None and self.port_shaper_rate._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS policy class details .. attribute:: qos_show_pclass_st qos show pclass st **type**\: list of :py:class:`QosShowPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_pclass_st = YList() self.qos_show_pclass_st.parent = self self.qos_show_pclass_st.name = 'qos_show_pclass_st' class QosShowPclassSt(object): """ qos show pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: marking QoS Mark parameters **type**\: :py:class:`Marking <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking>` .. attribute:: police QoS Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police>` .. attribute:: queue QoS Queue parameters **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Queue>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape>` .. attribute:: wfq QoS WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.marking = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking() self.marking.parent = self self.police = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police() self.police.parent = self self.queue = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Queue() self.queue.parent = self self.shape = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape() self.shape.parent = self self.wfq = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq() self.wfq.parent = self class Queue(object): """ QoS Queue parameters .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 .. attribute:: queue_type Queue Type **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.queue_id = None self.queue_type = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.queue_id is not None: return True if self.queue_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Queue']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Shape']['meta_info'] class Wfq(object): """ QoS WFQ parameters .. attribute:: committed_weight Committed Weight **type**\: :py:class:`CommittedWeight <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight>` .. attribute:: excess_weight Excess Weight **type**\: int **range:** 0..65535 .. attribute:: programmed_wfq QoS Programmed WFQ parameters **type**\: :py:class:`ProgrammedWfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.committed_weight = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight() self.committed_weight.parent = self self.excess_weight = None self.programmed_wfq = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq() self.programmed_wfq.parent = self class CommittedWeight(object): """ Committed Weight .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:committed-weight' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight']['meta_info'] class ProgrammedWfq(object): """ QoS Programmed WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:programmed-wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.committed_weight is not None and self.committed_weight._has_data(): return True if self.excess_weight is not None: return True if self.programmed_wfq is not None and self.programmed_wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq']['meta_info'] class Police(object): """ QoS Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir>` .. attribute:: policer_id policer ID **type**\: int **range:** 0..4294967295 .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs() self.cbs.parent = self self.cir = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir() self.cir.parent = self self.policer_id = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.policer_id is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Police']['meta_info'] class Marking(object): """ QoS Mark parameters .. attribute:: mark_only Mark Only **type**\: :py:class:`MarkOnly <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly>` .. attribute:: police_conform Police conform mark **type**\: :py:class:`PoliceConform <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform>` .. attribute:: police_exceed Police exceed mark **type**\: :py:class:`PoliceExceed <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.mark_only = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly() self.mark_only.parent = self self.police_conform = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform() self.police_conform.parent = self self.police_exceed = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed() self.police_exceed.parent = self class MarkOnly(object): """ Mark Only .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-only' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly']['meta_info'] class PoliceConform(object): """ Police conform mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-conform' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform']['meta_info'] class PoliceExceed(object): """ Police exceed mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-exceed' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:marking' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.mark_only is not None and self.mark_only._has_data(): return True if self.police_conform is not None and self.police_conform._has_data(): return True if self.police_exceed is not None and self.police_exceed._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt.Marking']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.marking is not None and self.marking._has_data(): return True if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass.QosShowPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_pclass_st is not None: for child_ref in self.qos_show_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-input' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput']['meta_info'] class BundleOutput(object): """ QoS policy direction output .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Header>` .. attribute:: interface_parameters QoS Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Header() self.header.parent = self self.interface_parameters = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Header']['meta_info'] class InterfaceParameters(object): """ QoS Interface Parameters .. attribute:: interface_config_rate Interface Configured Rate **type**\: :py:class:`InterfaceConfigRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.InterfaceConfigRate>` .. attribute:: interface_program_rate Interface Programmed Rate **type**\: :py:class:`InterfaceProgramRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.InterfaceProgramRate>` .. attribute:: port_shaper_rate Port Shaper Rate **type**\: :py:class:`PortShaperRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.PortShaperRate>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_config_rate = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.InterfaceConfigRate() self.interface_config_rate.parent = self self.interface_program_rate = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.InterfaceProgramRate() self.interface_program_rate.parent = self self.port_shaper_rate = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.PortShaperRate() self.port_shaper_rate.parent = self class InterfaceConfigRate(object): """ Interface Configured Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-config-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.InterfaceConfigRate']['meta_info'] class InterfaceProgramRate(object): """ Interface Programmed Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-program-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.InterfaceProgramRate']['meta_info'] class PortShaperRate(object): """ Port Shaper Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:port-shaper-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters.PortShaperRate']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_config_rate is not None and self.interface_config_rate._has_data(): return True if self.interface_program_rate is not None and self.interface_program_rate._has_data(): return True if self.port_shaper_rate is not None and self.port_shaper_rate._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS policy class details .. attribute:: qos_show_pclass_st qos show pclass st **type**\: list of :py:class:`QosShowPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_pclass_st = YList() self.qos_show_pclass_st.parent = self self.qos_show_pclass_st.name = 'qos_show_pclass_st' class QosShowPclassSt(object): """ qos show pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: marking QoS Mark parameters **type**\: :py:class:`Marking <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking>` .. attribute:: police QoS Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police>` .. attribute:: queue QoS Queue parameters **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Queue>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape>` .. attribute:: wfq QoS WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.marking = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking() self.marking.parent = self self.police = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police() self.police.parent = self self.queue = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Queue() self.queue.parent = self self.shape = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape() self.shape.parent = self self.wfq = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq() self.wfq.parent = self class Queue(object): """ QoS Queue parameters .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 .. attribute:: queue_type Queue Type **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.queue_id = None self.queue_type = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.queue_id is not None: return True if self.queue_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Queue']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Shape']['meta_info'] class Wfq(object): """ QoS WFQ parameters .. attribute:: committed_weight Committed Weight **type**\: :py:class:`CommittedWeight <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight>` .. attribute:: excess_weight Excess Weight **type**\: int **range:** 0..65535 .. attribute:: programmed_wfq QoS Programmed WFQ parameters **type**\: :py:class:`ProgrammedWfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.committed_weight = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight() self.committed_weight.parent = self self.excess_weight = None self.programmed_wfq = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq() self.programmed_wfq.parent = self class CommittedWeight(object): """ Committed Weight .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:committed-weight' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight']['meta_info'] class ProgrammedWfq(object): """ QoS Programmed WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:programmed-wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.committed_weight is not None and self.committed_weight._has_data(): return True if self.excess_weight is not None: return True if self.programmed_wfq is not None and self.programmed_wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Wfq']['meta_info'] class Police(object): """ QoS Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir>` .. attribute:: policer_id policer ID **type**\: int **range:** 0..4294967295 .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs() self.cbs.parent = self self.cir = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir() self.cir.parent = self self.policer_id = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.policer_id is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Police']['meta_info'] class Marking(object): """ QoS Mark parameters .. attribute:: mark_only Mark Only **type**\: :py:class:`MarkOnly <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly>` .. attribute:: police_conform Police conform mark **type**\: :py:class:`PoliceConform <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform>` .. attribute:: police_exceed Police exceed mark **type**\: :py:class:`PoliceExceed <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.mark_only = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly() self.mark_only.parent = self self.police_conform = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform() self.police_conform.parent = self self.police_exceed = PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed() self.police_exceed.parent = self class MarkOnly(object): """ Mark Only .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-only' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly']['meta_info'] class PoliceConform(object): """ Police conform mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-conform' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform']['meta_info'] class PoliceExceed(object): """ Police exceed mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-exceed' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:marking' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.mark_only is not None and self.mark_only._has_data(): return True if self.police_conform is not None and self.police_conform._has_data(): return True if self.police_exceed is not None and self.police_exceed._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt.Marking']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.marking is not None and self.marking._has_data(): return True if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass.QosShowPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_pclass_st is not None: for child_ref in self.qos_show_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-output' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') if self.interface_name is None: raise YPYModelError('Key property interface_name is None') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:member-interface[Cisco-IOS-XR-skp-qos-oper:interface-name = ' + str(self.interface_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_name is not None: return True if self.bundle_input is not None and self.bundle_input._has_data(): return True if self.bundle_output is not None and self.bundle_output._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:member-interfaces' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.member_interface is not None: for child_ref in self.member_interface: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') if self.interface_name is None: raise YPYModelError('Key property interface_name is None') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-interface[Cisco-IOS-XR-skp-qos-oper:interface-name = ' + str(self.interface_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_name is not None: return True if self.member_interfaces is not None and self.member_interfaces._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces.BundleInterface']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-interfaces' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bundle_interface is not None: for child_ref in self.bundle_interface: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.BundleInterfaces']['meta_info'] class Capability(object): """ QoS system capability .. attribute:: max_bundle_members Maximum bundle members **type**\: int **range:** 0..4294967295 .. attribute:: max_classes_per_policy Maximum classes per policy **type**\: int **range:** 0..4294967295 .. attribute:: max_classmap_name_length Maximum classmap name length **type**\: int **range:** 0..4294967295 .. attribute:: max_marking_actions_per_class Maximum marking action per class **type**\: int **range:** 0..4294967295 .. attribute:: max_matches_per_class Maximum matches per class **type**\: int **range:** 0..4294967295 .. attribute:: max_police_actions_per_class Maximum police actions per class **type**\: int **range:** 0..4294967295 .. attribute:: max_policy_hierarchy Maximum policy hierarchy **type**\: int **range:** 0..4294967295 .. attribute:: max_policy_maps Maximum policy maps per system **type**\: int **range:** 0..4294967295 .. attribute:: max_policy_name_length Maximum policy name length **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.max_bundle_members = None self.max_classes_per_policy = None self.max_classmap_name_length = None self.max_marking_actions_per_class = None self.max_matches_per_class = None self.max_police_actions_per_class = None self.max_policy_hierarchy = None self.max_policy_maps = None self.max_policy_name_length = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:capability' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.max_bundle_members is not None: return True if self.max_classes_per_policy is not None: return True if self.max_classmap_name_length is not None: return True if self.max_marking_actions_per_class is not None: return True if self.max_matches_per_class is not None: return True if self.max_police_actions_per_class is not None: return True if self.max_policy_hierarchy is not None: return True if self.max_policy_maps is not None: return True if self.max_policy_name_length is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Capability']['meta_info'] class Interfaces(object): """ QoS list of interfaces .. attribute:: interface QoS interface name **type**\: list of :py:class:`Interface <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface = YList() self.interface.parent = self self.interface.name = 'interface' class Interface(object): """ QoS interface name .. attribute:: interface_name <key> The name of the interface **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: input QoS policy direction ingress **type**\: :py:class:`Input <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input>` .. attribute:: output QoS policy direction egress **type**\: :py:class:`Output <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_name = None self.input = PlatformQos.Nodes.Node.Interfaces.Interface.Input() self.input.parent = self self.output = PlatformQos.Nodes.Node.Interfaces.Interface.Output() self.output.parent = self class Output(object): """ QoS policy direction egress .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.Header>` .. attribute:: interface_parameters QoS Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQos.Nodes.Node.Interfaces.Interface.Output.Header() self.header.parent = self self.interface_parameters = PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.Header']['meta_info'] class InterfaceParameters(object): """ QoS Interface Parameters .. attribute:: interface_config_rate Interface Configured Rate **type**\: :py:class:`InterfaceConfigRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.InterfaceConfigRate>` .. attribute:: interface_program_rate Interface Programmed Rate **type**\: :py:class:`InterfaceProgramRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.InterfaceProgramRate>` .. attribute:: port_shaper_rate Port Shaper Rate **type**\: :py:class:`PortShaperRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.PortShaperRate>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_config_rate = PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.InterfaceConfigRate() self.interface_config_rate.parent = self self.interface_program_rate = PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.InterfaceProgramRate() self.interface_program_rate.parent = self self.port_shaper_rate = PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.PortShaperRate() self.port_shaper_rate.parent = self class InterfaceConfigRate(object): """ Interface Configured Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-config-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.InterfaceConfigRate']['meta_info'] class InterfaceProgramRate(object): """ Interface Programmed Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-program-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.InterfaceProgramRate']['meta_info'] class PortShaperRate(object): """ Port Shaper Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:port-shaper-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters.PortShaperRate']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_config_rate is not None and self.interface_config_rate._has_data(): return True if self.interface_program_rate is not None and self.interface_program_rate._has_data(): return True if self.port_shaper_rate is not None and self.port_shaper_rate._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS policy class details .. attribute:: qos_show_pclass_st qos show pclass st **type**\: list of :py:class:`QosShowPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_pclass_st = YList() self.qos_show_pclass_st.parent = self self.qos_show_pclass_st.name = 'qos_show_pclass_st' class QosShowPclassSt(object): """ qos show pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: marking QoS Mark parameters **type**\: :py:class:`Marking <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking>` .. attribute:: police QoS Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police>` .. attribute:: queue QoS Queue parameters **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Queue>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape>` .. attribute:: wfq QoS WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.marking = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking() self.marking.parent = self self.police = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police() self.police.parent = self self.queue = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Queue() self.queue.parent = self self.shape = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape() self.shape.parent = self self.wfq = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq() self.wfq.parent = self class Queue(object): """ QoS Queue parameters .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 .. attribute:: queue_type Queue Type **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.queue_id = None self.queue_type = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.queue_id is not None: return True if self.queue_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Queue']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Shape']['meta_info'] class Wfq(object): """ QoS WFQ parameters .. attribute:: committed_weight Committed Weight **type**\: :py:class:`CommittedWeight <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight>` .. attribute:: excess_weight Excess Weight **type**\: int **range:** 0..65535 .. attribute:: programmed_wfq QoS Programmed WFQ parameters **type**\: :py:class:`ProgrammedWfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.committed_weight = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight() self.committed_weight.parent = self self.excess_weight = None self.programmed_wfq = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq() self.programmed_wfq.parent = self class CommittedWeight(object): """ Committed Weight .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:committed-weight' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight']['meta_info'] class ProgrammedWfq(object): """ QoS Programmed WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:programmed-wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.committed_weight is not None and self.committed_weight._has_data(): return True if self.excess_weight is not None: return True if self.programmed_wfq is not None and self.programmed_wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Wfq']['meta_info'] class Police(object): """ QoS Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir>` .. attribute:: policer_id policer ID **type**\: int **range:** 0..4294967295 .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs() self.cbs.parent = self self.cir = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir() self.cir.parent = self self.policer_id = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.policer_id is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Police']['meta_info'] class Marking(object): """ QoS Mark parameters .. attribute:: mark_only Mark Only **type**\: :py:class:`MarkOnly <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly>` .. attribute:: police_conform Police conform mark **type**\: :py:class:`PoliceConform <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform>` .. attribute:: police_exceed Police exceed mark **type**\: :py:class:`PoliceExceed <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.mark_only = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly() self.mark_only.parent = self self.police_conform = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform() self.police_conform.parent = self self.police_exceed = PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed() self.police_exceed.parent = self class MarkOnly(object): """ Mark Only .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-only' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly']['meta_info'] class PoliceConform(object): """ Police conform mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-conform' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform']['meta_info'] class PoliceExceed(object): """ Police exceed mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-exceed' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:marking' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.mark_only is not None and self.mark_only._has_data(): return True if self.police_conform is not None and self.police_conform._has_data(): return True if self.police_exceed is not None and self.police_exceed._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.marking is not None and self.marking._has_data(): return True if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_pclass_st is not None: for child_ref in self.qos_show_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:output' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Output']['meta_info'] class Input(object): """ QoS policy direction ingress .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.Header>` .. attribute:: interface_parameters QoS Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQos.Nodes.Node.Interfaces.Interface.Input.Header() self.header.parent = self self.interface_parameters = PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.Header']['meta_info'] class InterfaceParameters(object): """ QoS Interface Parameters .. attribute:: interface_config_rate Interface Configured Rate **type**\: :py:class:`InterfaceConfigRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.InterfaceConfigRate>` .. attribute:: interface_program_rate Interface Programmed Rate **type**\: :py:class:`InterfaceProgramRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.InterfaceProgramRate>` .. attribute:: port_shaper_rate Port Shaper Rate **type**\: :py:class:`PortShaperRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.PortShaperRate>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_config_rate = PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.InterfaceConfigRate() self.interface_config_rate.parent = self self.interface_program_rate = PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.InterfaceProgramRate() self.interface_program_rate.parent = self self.port_shaper_rate = PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.PortShaperRate() self.port_shaper_rate.parent = self class InterfaceConfigRate(object): """ Interface Configured Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-config-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.InterfaceConfigRate']['meta_info'] class InterfaceProgramRate(object): """ Interface Programmed Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-program-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.InterfaceProgramRate']['meta_info'] class PortShaperRate(object): """ Port Shaper Rate .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:port-shaper-rate' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters.PortShaperRate']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_config_rate is not None and self.interface_config_rate._has_data(): return True if self.interface_program_rate is not None and self.interface_program_rate._has_data(): return True if self.port_shaper_rate is not None and self.port_shaper_rate._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS policy class details .. attribute:: qos_show_pclass_st qos show pclass st **type**\: list of :py:class:`QosShowPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_pclass_st = YList() self.qos_show_pclass_st.parent = self self.qos_show_pclass_st.name = 'qos_show_pclass_st' class QosShowPclassSt(object): """ qos show pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: marking QoS Mark parameters **type**\: :py:class:`Marking <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking>` .. attribute:: police QoS Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police>` .. attribute:: queue QoS Queue parameters **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Queue>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape>` .. attribute:: wfq QoS WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.marking = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking() self.marking.parent = self self.police = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police() self.police.parent = self self.queue = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Queue() self.queue.parent = self self.shape = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape() self.shape.parent = self self.wfq = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq() self.wfq.parent = self class Queue(object): """ QoS Queue parameters .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 .. attribute:: queue_type Queue Type **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.queue_id = None self.queue_type = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.queue_id is not None: return True if self.queue_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Queue']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Shape']['meta_info'] class Wfq(object): """ QoS WFQ parameters .. attribute:: committed_weight Committed Weight **type**\: :py:class:`CommittedWeight <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight>` .. attribute:: excess_weight Excess Weight **type**\: int **range:** 0..65535 .. attribute:: programmed_wfq QoS Programmed WFQ parameters **type**\: :py:class:`ProgrammedWfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.committed_weight = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight() self.committed_weight.parent = self self.excess_weight = None self.programmed_wfq = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq() self.programmed_wfq.parent = self class CommittedWeight(object): """ Committed Weight .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:committed-weight' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.CommittedWeight']['meta_info'] class ProgrammedWfq(object): """ QoS Programmed WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:programmed-wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq.ProgrammedWfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.committed_weight is not None and self.committed_weight._has_data(): return True if self.excess_weight is not None: return True if self.programmed_wfq is not None and self.programmed_wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Wfq']['meta_info'] class Police(object): """ QoS Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir>` .. attribute:: policer_id policer ID **type**\: int **range:** 0..4294967295 .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs() self.cbs.parent = self self.cir = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir() self.cir.parent = self self.policer_id = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.policer_id is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Police']['meta_info'] class Marking(object): """ QoS Mark parameters .. attribute:: mark_only Mark Only **type**\: :py:class:`MarkOnly <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly>` .. attribute:: police_conform Police conform mark **type**\: :py:class:`PoliceConform <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform>` .. attribute:: police_exceed Police exceed mark **type**\: :py:class:`PoliceExceed <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.mark_only = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly() self.mark_only.parent = self self.police_conform = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform() self.police_conform.parent = self self.police_exceed = PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed() self.police_exceed.parent = self class MarkOnly(object): """ Mark Only .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-only' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly']['meta_info'] class PoliceConform(object): """ Police conform mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-conform' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceConform']['meta_info'] class PoliceExceed(object): """ Police exceed mark .. attribute:: action_type Action type **type**\: :py:class:`ActionEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionEnum>` .. attribute:: mark_detail Mark value **type**\: list of :py:class:`MarkDetail <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_type = None self.mark_detail = YList() self.mark_detail.parent = self self.mark_detail.name = 'mark_detail' class MarkDetail(object): """ Mark value .. attribute:: action_opcode Action opcode **type**\: :py:class:`ActionOpcodeEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcodeEnum>` .. attribute:: mark_value Mark value **type**\: int **range:** 0..255 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.action_opcode = None self.mark_value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:mark-detail' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_opcode is not None: return True if self.mark_value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed.MarkDetail']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police-exceed' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.action_type is not None: return True if self.mark_detail is not None: for child_ref in self.mark_detail: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking.PoliceExceed']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:marking' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.mark_only is not None and self.mark_only._has_data(): return True if self.police_conform is not None and self.police_conform._has_data(): return True if self.police_exceed is not None and self.police_exceed._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt.Marking']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.marking is not None and self.marking._has_data(): return True if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass.QosShowPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_pclass_st is not None: for child_ref in self.qos_show_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:input' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface.Input']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') if self.interface_name is None: raise YPYModelError('Key property interface_name is None') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface[Cisco-IOS-XR-skp-qos-oper:interface-name = ' + str(self.interface_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_name is not None: return True if self.input is not None and self.input._has_data(): return True if self.output is not None and self.output._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces.Interface']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interfaces' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface is not None: for child_ref in self.interface: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node.Interfaces']['meta_info'] @property def _common_path(self): if self.node_name is None: raise YPYModelError('Key property node_name is None') return '/Cisco-IOS-XR-skp-qos-oper:platform-qos/Cisco-IOS-XR-skp-qos-oper:nodes/Cisco-IOS-XR-skp-qos-oper:node[Cisco-IOS-XR-skp-qos-oper:node-name = ' + str(self.node_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node_name is not None: return True if self.bundle_interfaces is not None and self.bundle_interfaces._has_data(): return True if self.capability is not None and self.capability._has_data(): return True if self.interfaces is not None and self.interfaces._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes.Node']['meta_info'] @property def _common_path(self): return '/Cisco-IOS-XR-skp-qos-oper:platform-qos/Cisco-IOS-XR-skp-qos-oper:nodes' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node is not None: for child_ref in self.node: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos.Nodes']['meta_info'] @property def _common_path(self): return '/Cisco-IOS-XR-skp-qos-oper:platform-qos' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.nodes is not None and self.nodes._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQos']['meta_info'] class PlatformQosEa(object): """ platform qos ea .. attribute:: nodes List of nodes with platform specific QoS\-EA configuration **type**\: :py:class:`Nodes <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.nodes = PlatformQosEa.Nodes() self.nodes.parent = self class Nodes(object): """ List of nodes with platform specific QoS\-EA configuration .. attribute:: node Node with platform specific QoS\-EA configuration **type**\: list of :py:class:`Node <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node = YList() self.node.parent = self self.node.name = 'node' class Node(object): """ Node with platform specific QoS\-EA configuration .. attribute:: node_name <key> Node name **type**\: str **pattern:** ([a\-zA\-Z0\-9\_]\*\\d+/){1,2}([a\-zA\-Z0\-9\_]\*\\d+) .. attribute:: bundle_interfaces QoS\-EA list of bundle interfaces **type**\: :py:class:`BundleInterfaces <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces>` .. attribute:: interfaces QoS\-EA list of interfaces **type**\: :py:class:`Interfaces <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node_name = None self.bundle_interfaces = PlatformQosEa.Nodes.Node.BundleInterfaces() self.bundle_interfaces.parent = self self.interfaces = PlatformQosEa.Nodes.Node.Interfaces() self.interfaces.parent = self class BundleInterfaces(object): """ QoS\-EA list of bundle interfaces .. attribute:: bundle_interface QoS\-EA interface name **type**\: list of :py:class:`BundleInterface <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bundle_interface = YList() self.bundle_interface.parent = self self.bundle_interface.name = 'bundle_interface' class BundleInterface(object): """ QoS\-EA interface name .. attribute:: interface_name <key> Bundle interface name **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: member_interfaces QoS\-EA list of member interfaces **type**\: :py:class:`MemberInterfaces <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_name = None self.member_interfaces = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces() self.member_interfaces.parent = self class MemberInterfaces(object): """ QoS\-EA list of member interfaces .. attribute:: member_interface QoS\-EA interface name **type**\: list of :py:class:`MemberInterface <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.member_interface = YList() self.member_interface.parent = self self.member_interface.name = 'member_interface' class MemberInterface(object): """ QoS\-EA interface name .. attribute:: interface_name <key> Memeber interface **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: bundle_input QoS\-EA policy direction input **type**\: :py:class:`BundleInput <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput>` .. attribute:: bundle_output QoS\-EA policy direction output **type**\: :py:class:`BundleOutput <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_name = None self.bundle_input = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput() self.bundle_input.parent = self self.bundle_output = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput() self.bundle_output.parent = self class BundleOutput(object): """ QoS\-EA policy direction output .. attribute:: details QoS\-EA policy details **type**\: :py:class:`Details <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.details = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details() self.details.parent = self class Details(object): """ QoS\-EA policy details .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.Header>` .. attribute:: interface_parameters QoS EA Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS EA policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.Header() self.header.parent = self self.interface_parameters = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.Header']['meta_info'] class InterfaceParameters(object): """ QoS EA Interface Parameters .. attribute:: bundle_id Bundle Interface ID **type**\: int **range:** 0..65535 .. attribute:: hierarchical_depth Max Hierarchial Depth **type**\: int **range:** 0..255 .. attribute:: interface_handle Interface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: interface_rate Interface Programmed Rate **type**\: int **range:** 0..4294967295 .. attribute:: interface_type Interface Type **type**\: str **length:** 0..101 .. attribute:: policy_map_id Policy Map ID **type**\: int **range:** 0..65535 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: port Local Port **type**\: int **range:** 0..4294967295 .. attribute:: port_shaper_rate Port Shaper Rate **type**\: int **range:** 0..4294967295 .. attribute:: qos_interface_handle QoS Interface handle **type**\: int **range:** 0..18446744073709551615 .. attribute:: uidb_index UIDB Index **type**\: int **range:** 0..65535 .. attribute:: under_line_interface_handle UnderLineInterface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bundle_id = None self.hierarchical_depth = None self.interface_handle = None self.interface_rate = None self.interface_type = None self.policy_map_id = None self.policy_name = None self.port = None self.port_shaper_rate = None self.qos_interface_handle = None self.uidb_index = None self.under_line_interface_handle = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bundle_id is not None: return True if self.hierarchical_depth is not None: return True if self.interface_handle is not None: return True if self.interface_rate is not None: return True if self.interface_type is not None: return True if self.policy_map_id is not None: return True if self.policy_name is not None: return True if self.port is not None: return True if self.port_shaper_rate is not None: return True if self.qos_interface_handle is not None: return True if self.uidb_index is not None: return True if self.under_line_interface_handle is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS EA policy class details .. attribute:: qos_show_ea_pclass_st qos show ea pclass st **type**\: list of :py:class:`QosShowEaPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_ea_pclass_st = YList() self.qos_show_ea_pclass_st.parent = self self.qos_show_ea_pclass_st.name = 'qos_show_ea_pclass_st' class QosShowEaPclassSt(object): """ qos show ea pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: config QoS EA Class Configuration **type**\: :py:class:`Config <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config>` .. attribute:: index Class Index **type**\: int **range:** 0..65535 .. attribute:: node_flags Node Flags **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: result QoS EA Class Result **type**\: :py:class:`Result <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result>` .. attribute:: stats_flags Statistical Flags **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.config = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config() self.config.parent = self self.index = None self.node_flags = None self.policy_name = None self.result = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result() self.result.parent = self self.stats_flags = None class Config(object): """ QoS EA Class Configuration .. attribute:: node_config Node Config **type**\: str **length:** 0..101 .. attribute:: police QoS EA Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape>` .. attribute:: wfq QoS EA WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node_config = None self.police = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police() self.police.parent = self self.shape = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape() self.shape.parent = self self.wfq = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq() self.wfq.parent = self class Police(object): """ QoS EA Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir>` .. attribute:: color_aware Color Aware **type**\: bool .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs() self.cbs.parent = self self.cir = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir() self.cir.parent = self self.color_aware = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.color_aware is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape']['meta_info'] class Wfq(object): """ QoS EA WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:config' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node_config is not None: return True if self.police is not None and self.police._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config']['meta_info'] class Result(object): """ QoS EA Class Result .. attribute:: police QoS EA Policer Result **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police>` .. attribute:: queue QoS EA Queue Result **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue>` .. attribute:: stats_id Stats ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.police = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police() self.police.parent = self self.queue = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue() self.queue.parent = self self.stats_id = None class Queue(object): """ QoS EA Queue Result .. attribute:: commit_tx Commit Tx **type**\: int **range:** 0..4294967295 .. attribute:: drop Drop **type**\: int **range:** 0..4294967295 .. attribute:: excess_tx Excess Tx **type**\: int **range:** 0..4294967295 .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.commit_tx = None self.drop = None self.excess_tx = None self.queue_id = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.commit_tx is not None: return True if self.drop is not None: return True if self.excess_tx is not None: return True if self.queue_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue']['meta_info'] class Police(object): """ QoS EA Policer Result .. attribute:: conform Conform Rate **type**\: int **range:** 0..4294967295 .. attribute:: exceed Exceed Rate **type**\: int **range:** 0..4294967295 .. attribute:: token_bucket_id Token Bucket ID **type**\: int **range:** 0..4294967295 .. attribute:: violate Violate Rate **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.conform = None self.exceed = None self.token_bucket_id = None self.violate = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.conform is not None: return True if self.exceed is not None: return True if self.token_bucket_id is not None: return True if self.violate is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:result' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.stats_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-ea-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.config is not None and self.config._has_data(): return True if self.index is not None: return True if self.node_flags is not None: return True if self.policy_name is not None: return True if self.result is not None and self.result._has_data(): return True if self.stats_flags is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_ea_pclass_st is not None: for child_ref in self.qos_show_ea_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:details' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput.Details']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-output' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.details is not None and self.details._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleOutput']['meta_info'] class BundleInput(object): """ QoS\-EA policy direction input .. attribute:: details QoS\-EA policy details **type**\: :py:class:`Details <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.details = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details() self.details.parent = self class Details(object): """ QoS\-EA policy details .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.Header>` .. attribute:: interface_parameters QoS EA Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS EA policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.Header() self.header.parent = self self.interface_parameters = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.Header']['meta_info'] class InterfaceParameters(object): """ QoS EA Interface Parameters .. attribute:: bundle_id Bundle Interface ID **type**\: int **range:** 0..65535 .. attribute:: hierarchical_depth Max Hierarchial Depth **type**\: int **range:** 0..255 .. attribute:: interface_handle Interface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: interface_rate Interface Programmed Rate **type**\: int **range:** 0..4294967295 .. attribute:: interface_type Interface Type **type**\: str **length:** 0..101 .. attribute:: policy_map_id Policy Map ID **type**\: int **range:** 0..65535 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: port Local Port **type**\: int **range:** 0..4294967295 .. attribute:: port_shaper_rate Port Shaper Rate **type**\: int **range:** 0..4294967295 .. attribute:: qos_interface_handle QoS Interface handle **type**\: int **range:** 0..18446744073709551615 .. attribute:: uidb_index UIDB Index **type**\: int **range:** 0..65535 .. attribute:: under_line_interface_handle UnderLineInterface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bundle_id = None self.hierarchical_depth = None self.interface_handle = None self.interface_rate = None self.interface_type = None self.policy_map_id = None self.policy_name = None self.port = None self.port_shaper_rate = None self.qos_interface_handle = None self.uidb_index = None self.under_line_interface_handle = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bundle_id is not None: return True if self.hierarchical_depth is not None: return True if self.interface_handle is not None: return True if self.interface_rate is not None: return True if self.interface_type is not None: return True if self.policy_map_id is not None: return True if self.policy_name is not None: return True if self.port is not None: return True if self.port_shaper_rate is not None: return True if self.qos_interface_handle is not None: return True if self.uidb_index is not None: return True if self.under_line_interface_handle is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS EA policy class details .. attribute:: qos_show_ea_pclass_st qos show ea pclass st **type**\: list of :py:class:`QosShowEaPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_ea_pclass_st = YList() self.qos_show_ea_pclass_st.parent = self self.qos_show_ea_pclass_st.name = 'qos_show_ea_pclass_st' class QosShowEaPclassSt(object): """ qos show ea pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: config QoS EA Class Configuration **type**\: :py:class:`Config <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config>` .. attribute:: index Class Index **type**\: int **range:** 0..65535 .. attribute:: node_flags Node Flags **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: result QoS EA Class Result **type**\: :py:class:`Result <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result>` .. attribute:: stats_flags Statistical Flags **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.config = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config() self.config.parent = self self.index = None self.node_flags = None self.policy_name = None self.result = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result() self.result.parent = self self.stats_flags = None class Config(object): """ QoS EA Class Configuration .. attribute:: node_config Node Config **type**\: str **length:** 0..101 .. attribute:: police QoS EA Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape>` .. attribute:: wfq QoS EA WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node_config = None self.police = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police() self.police.parent = self self.shape = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape() self.shape.parent = self self.wfq = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq() self.wfq.parent = self class Police(object): """ QoS EA Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir>` .. attribute:: color_aware Color Aware **type**\: bool .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs() self.cbs.parent = self self.cir = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir() self.cir.parent = self self.color_aware = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.color_aware is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape']['meta_info'] class Wfq(object): """ QoS EA WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:config' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node_config is not None: return True if self.police is not None and self.police._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config']['meta_info'] class Result(object): """ QoS EA Class Result .. attribute:: police QoS EA Policer Result **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police>` .. attribute:: queue QoS EA Queue Result **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue>` .. attribute:: stats_id Stats ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.police = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police() self.police.parent = self self.queue = PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue() self.queue.parent = self self.stats_id = None class Queue(object): """ QoS EA Queue Result .. attribute:: commit_tx Commit Tx **type**\: int **range:** 0..4294967295 .. attribute:: drop Drop **type**\: int **range:** 0..4294967295 .. attribute:: excess_tx Excess Tx **type**\: int **range:** 0..4294967295 .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.commit_tx = None self.drop = None self.excess_tx = None self.queue_id = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.commit_tx is not None: return True if self.drop is not None: return True if self.excess_tx is not None: return True if self.queue_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue']['meta_info'] class Police(object): """ QoS EA Policer Result .. attribute:: conform Conform Rate **type**\: int **range:** 0..4294967295 .. attribute:: exceed Exceed Rate **type**\: int **range:** 0..4294967295 .. attribute:: token_bucket_id Token Bucket ID **type**\: int **range:** 0..4294967295 .. attribute:: violate Violate Rate **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.conform = None self.exceed = None self.token_bucket_id = None self.violate = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.conform is not None: return True if self.exceed is not None: return True if self.token_bucket_id is not None: return True if self.violate is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:result' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.stats_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-ea-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.config is not None and self.config._has_data(): return True if self.index is not None: return True if self.node_flags is not None: return True if self.policy_name is not None: return True if self.result is not None and self.result._has_data(): return True if self.stats_flags is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass.QosShowEaPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_ea_pclass_st is not None: for child_ref in self.qos_show_ea_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:details' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput.Details']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-input' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.details is not None and self.details._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface.BundleInput']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') if self.interface_name is None: raise YPYModelError('Key property interface_name is None') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:member-interface[Cisco-IOS-XR-skp-qos-oper:interface-name = ' + str(self.interface_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_name is not None: return True if self.bundle_input is not None and self.bundle_input._has_data(): return True if self.bundle_output is not None and self.bundle_output._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces.MemberInterface']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:member-interfaces' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.member_interface is not None: for child_ref in self.member_interface: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface.MemberInterfaces']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') if self.interface_name is None: raise YPYModelError('Key property interface_name is None') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-interface[Cisco-IOS-XR-skp-qos-oper:interface-name = ' + str(self.interface_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_name is not None: return True if self.member_interfaces is not None and self.member_interfaces._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces.BundleInterface']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bundle-interfaces' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bundle_interface is not None: for child_ref in self.bundle_interface: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.BundleInterfaces']['meta_info'] class Interfaces(object): """ QoS\-EA list of interfaces .. attribute:: interface QoS\-EA interface name **type**\: list of :py:class:`Interface <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface = YList() self.interface.parent = self self.interface.name = 'interface' class Interface(object): """ QoS\-EA interface name .. attribute:: interface_name <key> The name of the interface **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: input QoS\-EA policy direction ingress **type**\: :py:class:`Input <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input>` .. attribute:: output QoS\-EA policy direction egress **type**\: :py:class:`Output <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.interface_name = None self.input = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input() self.input.parent = self self.output = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output() self.output.parent = self class Output(object): """ QoS\-EA policy direction egress .. attribute:: details QoS\-EA policy details **type**\: :py:class:`Details <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.details = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details() self.details.parent = self class Details(object): """ QoS\-EA policy details .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.Header>` .. attribute:: interface_parameters QoS EA Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS EA policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.Header() self.header.parent = self self.interface_parameters = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.Header']['meta_info'] class InterfaceParameters(object): """ QoS EA Interface Parameters .. attribute:: bundle_id Bundle Interface ID **type**\: int **range:** 0..65535 .. attribute:: hierarchical_depth Max Hierarchial Depth **type**\: int **range:** 0..255 .. attribute:: interface_handle Interface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: interface_rate Interface Programmed Rate **type**\: int **range:** 0..4294967295 .. attribute:: interface_type Interface Type **type**\: str **length:** 0..101 .. attribute:: policy_map_id Policy Map ID **type**\: int **range:** 0..65535 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: port Local Port **type**\: int **range:** 0..4294967295 .. attribute:: port_shaper_rate Port Shaper Rate **type**\: int **range:** 0..4294967295 .. attribute:: qos_interface_handle QoS Interface handle **type**\: int **range:** 0..18446744073709551615 .. attribute:: uidb_index UIDB Index **type**\: int **range:** 0..65535 .. attribute:: under_line_interface_handle UnderLineInterface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bundle_id = None self.hierarchical_depth = None self.interface_handle = None self.interface_rate = None self.interface_type = None self.policy_map_id = None self.policy_name = None self.port = None self.port_shaper_rate = None self.qos_interface_handle = None self.uidb_index = None self.under_line_interface_handle = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bundle_id is not None: return True if self.hierarchical_depth is not None: return True if self.interface_handle is not None: return True if self.interface_rate is not None: return True if self.interface_type is not None: return True if self.policy_map_id is not None: return True if self.policy_name is not None: return True if self.port is not None: return True if self.port_shaper_rate is not None: return True if self.qos_interface_handle is not None: return True if self.uidb_index is not None: return True if self.under_line_interface_handle is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS EA policy class details .. attribute:: qos_show_ea_pclass_st qos show ea pclass st **type**\: list of :py:class:`QosShowEaPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_ea_pclass_st = YList() self.qos_show_ea_pclass_st.parent = self self.qos_show_ea_pclass_st.name = 'qos_show_ea_pclass_st' class QosShowEaPclassSt(object): """ qos show ea pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: config QoS EA Class Configuration **type**\: :py:class:`Config <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config>` .. attribute:: index Class Index **type**\: int **range:** 0..65535 .. attribute:: node_flags Node Flags **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: result QoS EA Class Result **type**\: :py:class:`Result <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result>` .. attribute:: stats_flags Statistical Flags **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.config = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config() self.config.parent = self self.index = None self.node_flags = None self.policy_name = None self.result = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result() self.result.parent = self self.stats_flags = None class Config(object): """ QoS EA Class Configuration .. attribute:: node_config Node Config **type**\: str **length:** 0..101 .. attribute:: police QoS EA Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape>` .. attribute:: wfq QoS EA WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node_config = None self.police = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police() self.police.parent = self self.shape = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape() self.shape.parent = self self.wfq = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq() self.wfq.parent = self class Police(object): """ QoS EA Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir>` .. attribute:: color_aware Color Aware **type**\: bool .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs() self.cbs.parent = self self.cir = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir() self.cir.parent = self self.color_aware = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.color_aware is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape']['meta_info'] class Wfq(object): """ QoS EA WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:config' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node_config is not None: return True if self.police is not None and self.police._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config']['meta_info'] class Result(object): """ QoS EA Class Result .. attribute:: police QoS EA Policer Result **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police>` .. attribute:: queue QoS EA Queue Result **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue>` .. attribute:: stats_id Stats ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.police = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police() self.police.parent = self self.queue = PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue() self.queue.parent = self self.stats_id = None class Queue(object): """ QoS EA Queue Result .. attribute:: commit_tx Commit Tx **type**\: int **range:** 0..4294967295 .. attribute:: drop Drop **type**\: int **range:** 0..4294967295 .. attribute:: excess_tx Excess Tx **type**\: int **range:** 0..4294967295 .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.commit_tx = None self.drop = None self.excess_tx = None self.queue_id = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.commit_tx is not None: return True if self.drop is not None: return True if self.excess_tx is not None: return True if self.queue_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue']['meta_info'] class Police(object): """ QoS EA Policer Result .. attribute:: conform Conform Rate **type**\: int **range:** 0..4294967295 .. attribute:: exceed Exceed Rate **type**\: int **range:** 0..4294967295 .. attribute:: token_bucket_id Token Bucket ID **type**\: int **range:** 0..4294967295 .. attribute:: violate Violate Rate **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.conform = None self.exceed = None self.token_bucket_id = None self.violate = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.conform is not None: return True if self.exceed is not None: return True if self.token_bucket_id is not None: return True if self.violate is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:result' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.stats_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-ea-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.config is not None and self.config._has_data(): return True if self.index is not None: return True if self.node_flags is not None: return True if self.policy_name is not None: return True if self.result is not None and self.result._has_data(): return True if self.stats_flags is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass.QosShowEaPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_ea_pclass_st is not None: for child_ref in self.qos_show_ea_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:details' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output.Details']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:output' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.details is not None and self.details._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Output']['meta_info'] class Input(object): """ QoS\-EA policy direction ingress .. attribute:: details QoS\-EA policy details **type**\: :py:class:`Details <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.details = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details() self.details.parent = self class Details(object): """ QoS\-EA policy details .. attribute:: header QoS EA policy header **type**\: :py:class:`Header <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.Header>` .. attribute:: interface_parameters QoS EA Interface Parameters **type**\: :py:class:`InterfaceParameters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.InterfaceParameters>` .. attribute:: skywarp_qos_policy_class Skywarp QoS EA policy class details **type**\: :py:class:`SkywarpQosPolicyClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.header = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.Header() self.header.parent = self self.interface_parameters = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.InterfaceParameters() self.interface_parameters.parent = self self.skywarp_qos_policy_class = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass() self.skywarp_qos_policy_class.parent = self class Header(object): """ QoS EA policy header .. attribute:: classes Number of classes **type**\: int **range:** 0..65535 .. attribute:: direction Direction **type**\: str **length:** 0..11 .. attribute:: interface_name Interface Name **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.classes = None self.direction = None self.interface_name = None self.policy_name = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:header' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.classes is not None: return True if self.direction is not None: return True if self.interface_name is not None: return True if self.policy_name is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.Header']['meta_info'] class InterfaceParameters(object): """ QoS EA Interface Parameters .. attribute:: bundle_id Bundle Interface ID **type**\: int **range:** 0..65535 .. attribute:: hierarchical_depth Max Hierarchial Depth **type**\: int **range:** 0..255 .. attribute:: interface_handle Interface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) .. attribute:: interface_rate Interface Programmed Rate **type**\: int **range:** 0..4294967295 .. attribute:: interface_type Interface Type **type**\: str **length:** 0..101 .. attribute:: policy_map_id Policy Map ID **type**\: int **range:** 0..65535 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: port Local Port **type**\: int **range:** 0..4294967295 .. attribute:: port_shaper_rate Port Shaper Rate **type**\: int **range:** 0..4294967295 .. attribute:: qos_interface_handle QoS Interface handle **type**\: int **range:** 0..18446744073709551615 .. attribute:: uidb_index UIDB Index **type**\: int **range:** 0..65535 .. attribute:: under_line_interface_handle UnderLineInterface Handle **type**\: str **pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm) """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bundle_id = None self.hierarchical_depth = None self.interface_handle = None self.interface_rate = None self.interface_type = None self.policy_map_id = None self.policy_name = None self.port = None self.port_shaper_rate = None self.qos_interface_handle = None self.uidb_index = None self.under_line_interface_handle = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface-parameters' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bundle_id is not None: return True if self.hierarchical_depth is not None: return True if self.interface_handle is not None: return True if self.interface_rate is not None: return True if self.interface_type is not None: return True if self.policy_map_id is not None: return True if self.policy_name is not None: return True if self.port is not None: return True if self.port_shaper_rate is not None: return True if self.qos_interface_handle is not None: return True if self.uidb_index is not None: return True if self.under_line_interface_handle is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.InterfaceParameters']['meta_info'] class SkywarpQosPolicyClass(object): """ Skywarp QoS EA policy class details .. attribute:: qos_show_ea_pclass_st qos show ea pclass st **type**\: list of :py:class:`QosShowEaPclassSt <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.qos_show_ea_pclass_st = YList() self.qos_show_ea_pclass_st.parent = self self.qos_show_ea_pclass_st.name = 'qos_show_ea_pclass_st' class QosShowEaPclassSt(object): """ qos show ea pclass st .. attribute:: class_level Class level **type**\: int **range:** 0..255 .. attribute:: class_name Class name **type**\: str **length:** 0..65 .. attribute:: config QoS EA Class Configuration **type**\: :py:class:`Config <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config>` .. attribute:: index Class Index **type**\: int **range:** 0..65535 .. attribute:: node_flags Node Flags **type**\: str **length:** 0..101 .. attribute:: policy_name Policy name **type**\: str **length:** 0..65 .. attribute:: result QoS EA Class Result **type**\: :py:class:`Result <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result>` .. attribute:: stats_flags Statistical Flags **type**\: str **length:** 0..101 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.class_level = None self.class_name = None self.config = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config() self.config.parent = self self.index = None self.node_flags = None self.policy_name = None self.result = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result() self.result.parent = self self.stats_flags = None class Config(object): """ QoS EA Class Configuration .. attribute:: node_config Node Config **type**\: str **length:** 0..101 .. attribute:: police QoS EA Policer parameters **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police>` .. attribute:: shape QoS EA Shaper parameters **type**\: :py:class:`Shape <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape>` .. attribute:: wfq QoS EA WFQ parameters **type**\: :py:class:`Wfq <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.node_config = None self.police = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police() self.police.parent = self self.shape = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape() self.shape.parent = self self.wfq = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq() self.wfq.parent = self class Police(object): """ QoS EA Policer parameters .. attribute:: cbs CBS **type**\: :py:class:`Cbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs>` .. attribute:: cir CIR **type**\: :py:class:`Cir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir>` .. attribute:: color_aware Color Aware **type**\: bool .. attribute:: policer_type Policer type **type**\: :py:class:`TbAlgorithmEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.TbAlgorithmEnum>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.cbs = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs() self.cbs.parent = self self.cir = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir() self.cir.parent = self self.color_aware = None self.policer_type = None class Cir(object): """ CIR .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cir']['meta_info'] class Cbs(object): """ CBS .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:cbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police.Cbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.cbs is not None and self.cbs._has_data(): return True if self.cir is not None and self.cir._has_data(): return True if self.color_aware is not None: return True if self.policer_type is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Police']['meta_info'] class Shape(object): """ QoS EA Shaper parameters .. attribute:: pbs PBS in bytes **type**\: :py:class:`Pbs <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs>` .. attribute:: pir PIR in kbps **type**\: :py:class:`Pir <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.pbs = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs() self.pbs.parent = self self.pir = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir() self.pir.parent = self class Pir(object): """ PIR in kbps .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pir' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pir']['meta_info'] class Pbs(object): """ PBS in bytes .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:pbs' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape.Pbs']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:shape' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.pbs is not None and self.pbs._has_data(): return True if self.pir is not None and self.pir._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Shape']['meta_info'] class Wfq(object): """ QoS EA WFQ parameters .. attribute:: bandwidth Bandwidth **type**\: :py:class:`Bandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth>` .. attribute:: excess_ratio Excess Ratio **type**\: int **range:** 0..65535 .. attribute:: sum_of_bandwidth Sum of Bandwidth **type**\: :py:class:`SumOfBandwidth <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.bandwidth = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth() self.bandwidth.parent = self self.excess_ratio = None self.sum_of_bandwidth = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth() self.sum_of_bandwidth.parent = self class Bandwidth(object): """ Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.Bandwidth']['meta_info'] class SumOfBandwidth(object): """ Sum of Bandwidth .. attribute:: unit Config unit **type**\: :py:class:`QosUnitEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.QosUnitEnum>` .. attribute:: value Config value **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.unit = None self.value = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:sum-of-bandwidth' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.unit is not None: return True if self.value is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq.SumOfBandwidth']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:wfq' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.bandwidth is not None and self.bandwidth._has_data(): return True if self.excess_ratio is not None: return True if self.sum_of_bandwidth is not None and self.sum_of_bandwidth._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config.Wfq']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:config' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node_config is not None: return True if self.police is not None and self.police._has_data(): return True if self.shape is not None and self.shape._has_data(): return True if self.wfq is not None and self.wfq._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Config']['meta_info'] class Result(object): """ QoS EA Class Result .. attribute:: police QoS EA Policer Result **type**\: :py:class:`Police <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police>` .. attribute:: queue QoS EA Queue Result **type**\: :py:class:`Queue <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue>` .. attribute:: stats_id Stats ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.police = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police() self.police.parent = self self.queue = PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue() self.queue.parent = self self.stats_id = None class Queue(object): """ QoS EA Queue Result .. attribute:: commit_tx Commit Tx **type**\: int **range:** 0..4294967295 .. attribute:: drop Drop **type**\: int **range:** 0..4294967295 .. attribute:: excess_tx Excess Tx **type**\: int **range:** 0..4294967295 .. attribute:: queue_id Queue ID **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.commit_tx = None self.drop = None self.excess_tx = None self.queue_id = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:queue' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.commit_tx is not None: return True if self.drop is not None: return True if self.excess_tx is not None: return True if self.queue_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Queue']['meta_info'] class Police(object): """ QoS EA Policer Result .. attribute:: conform Conform Rate **type**\: int **range:** 0..4294967295 .. attribute:: exceed Exceed Rate **type**\: int **range:** 0..4294967295 .. attribute:: token_bucket_id Token Bucket ID **type**\: int **range:** 0..4294967295 .. attribute:: violate Violate Rate **type**\: int **range:** 0..4294967295 """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): self.parent = None self.conform = None self.exceed = None self.token_bucket_id = None self.violate = None @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:police' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.conform is not None: return True if self.exceed is not None: return True if self.token_bucket_id is not None: return True if self.violate is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result.Police']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:result' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.police is not None and self.police._has_data(): return True if self.queue is not None and self.queue._has_data(): return True if self.stats_id is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt.Result']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:qos-show-ea-pclass-st' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.class_level is not None: return True if self.class_name is not None: return True if self.config is not None and self.config._has_data(): return True if self.index is not None: return True if self.node_flags is not None: return True if self.policy_name is not None: return True if self.result is not None and self.result._has_data(): return True if self.stats_flags is not None: return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass.QosShowEaPclassSt']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:skywarp-qos-policy-class' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.qos_show_ea_pclass_st is not None: for child_ref in self.qos_show_ea_pclass_st: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details.SkywarpQosPolicyClass']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:details' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.header is not None and self.header._has_data(): return True if self.interface_parameters is not None and self.interface_parameters._has_data(): return True if self.skywarp_qos_policy_class is not None and self.skywarp_qos_policy_class._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input.Details']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:input' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.details is not None and self.details._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface.Input']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') if self.interface_name is None: raise YPYModelError('Key property interface_name is None') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interface[Cisco-IOS-XR-skp-qos-oper:interface-name = ' + str(self.interface_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface_name is not None: return True if self.input is not None and self.input._has_data(): return True if self.output is not None and self.output._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces.Interface']['meta_info'] @property def _common_path(self): if self.parent is None: raise YPYModelError('parent is not set . Cannot derive path.') return self.parent._common_path +'/Cisco-IOS-XR-skp-qos-oper:interfaces' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.interface is not None: for child_ref in self.interface: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node.Interfaces']['meta_info'] @property def _common_path(self): if self.node_name is None: raise YPYModelError('Key property node_name is None') return '/Cisco-IOS-XR-skp-qos-oper:platform-qos-ea/Cisco-IOS-XR-skp-qos-oper:nodes/Cisco-IOS-XR-skp-qos-oper:node[Cisco-IOS-XR-skp-qos-oper:node-name = ' + str(self.node_name) + ']' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node_name is not None: return True if self.bundle_interfaces is not None and self.bundle_interfaces._has_data(): return True if self.interfaces is not None and self.interfaces._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes.Node']['meta_info'] @property def _common_path(self): return '/Cisco-IOS-XR-skp-qos-oper:platform-qos-ea/Cisco-IOS-XR-skp-qos-oper:nodes' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.node is not None: for child_ref in self.node: if child_ref._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa.Nodes']['meta_info'] @property def _common_path(self): return '/Cisco-IOS-XR-skp-qos-oper:platform-qos-ea' def is_config(self): ''' Returns True if this instance represents config data else returns False ''' return False def _has_data(self): if not self.is_config(): return False if self.nodes is not None and self.nodes._has_data(): return True return False @staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_skp_qos_oper as meta return meta._meta_table['PlatformQosEa']['meta_info']
56.253036
322
0.332851
48,144
782,761
5.198883
0.007166
0.039473
0.049342
0.037759
0.984878
0.981642
0.980036
0.979272
0.972429
0.969084
0
0.013948
0.615581
782,761
13,914
323
56.257079
0.817851
0.157141
0
0.917542
0
0.018108
0.093656
0.063913
0
0
0
0
0
1
0.1654
false
0
0.034923
0.000647
0.506063
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
1
0
0
9
720e6fa80df920f8d1cbe2bc6e5e7da9dd72f92c
163
py
Python
src/utils/ops_utils.py
dvtrung/tf-seed
dfc69e9dc5a84a804dd13d0b64054020993fb5f4
[ "MIT" ]
null
null
null
src/utils/ops_utils.py
dvtrung/tf-seed
dfc69e9dc5a84a804dd13d0b64054020993fb5f4
[ "MIT" ]
null
null
null
src/utils/ops_utils.py
dvtrung/tf-seed
dfc69e9dc5a84a804dd13d0b64054020993fb5f4
[ "MIT" ]
null
null
null
def evaluate(target, result, decode_fn, metrics="default"): if metrics == "default": return int(target != result), decode_fn(target), decode_fn(result)
54.333333
74
0.693252
21
163
5.238095
0.52381
0.218182
0.327273
0.363636
0
0
0
0
0
0
0
0
0.159509
163
3
74
54.333333
0.80292
0
0
0
0
0
0.085366
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
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
1
0
0
0
0
1
0
0
7
722b34aeab6d9e32bf1d7204579a4178a447d637
275
py
Python
tests/test_simple_random.py
jaden-git/simple-utils
8526ea9a8357665722627ab2c44da527c2884006
[ "Apache-2.0" ]
1
2021-03-08T09:54:05.000Z
2021-03-08T09:54:05.000Z
tests/test_simple_random.py
jaden-git/simple-utils
8526ea9a8357665722627ab2c44da527c2884006
[ "Apache-2.0" ]
null
null
null
tests/test_simple_random.py
jaden-git/simple-utils
8526ea9a8357665722627ab2c44da527c2884006
[ "Apache-2.0" ]
null
null
null
import re import simple_utils def test_get_uuid(): assert simple_utils.random.get_uuid() != simple_utils.random.get_uuid() def test_make_uuid_including_time(): assert simple_utils.random.make_uuid_including_time() != simple_utils.random.make_uuid_including_time()
27.5
107
0.807273
41
275
4.95122
0.317073
0.270936
0.334975
0.310345
0.610837
0.374384
0.374384
0
0
0
0
0
0.098182
275
9
108
30.555556
0.818548
0
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
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
8
a0d02a3cf19ed0cebcc203268351589ef5b36b64
136
py
Python
python-curso/CursoemVideo/aula11.py
JohnnyPessoli/Cursos
ea80ed21469d0807c54c9091adea9ec0116b8ba7
[ "MIT" ]
null
null
null
python-curso/CursoemVideo/aula11.py
JohnnyPessoli/Cursos
ea80ed21469d0807c54c9091adea9ec0116b8ba7
[ "MIT" ]
null
null
null
python-curso/CursoemVideo/aula11.py
JohnnyPessoli/Cursos
ea80ed21469d0807c54c9091adea9ec0116b8ba7
[ "MIT" ]
null
null
null
"""a = 3 b = 5 print(f'O valor de A é igual a \033[1;31;42m{a}\033[m e o valor de B é igual a \033[2;32;35m{b}\033[m')""" print(% 19)
19.428571
106
0.573529
37
136
2.108108
0.567568
0.153846
0.205128
0.25641
0
0
0
0
0
0
0
0.238532
0.198529
136
6
107
22.666667
0.477064
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
1
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
7
a0e990d1160a7ee5458a5050b94aad65e0c030d2
168
py
Python
tests/test_env.py
samuelrince/msbapi
31dfb3780dfd562be65c27ecc35f07373dbf1251
[ "MIT" ]
null
null
null
tests/test_env.py
samuelrince/msbapi
31dfb3780dfd562be65c27ecc35f07373dbf1251
[ "MIT" ]
null
null
null
tests/test_env.py
samuelrince/msbapi
31dfb3780dfd562be65c27ecc35f07373dbf1251
[ "MIT" ]
null
null
null
import os def test_env(): assert os.getenv('CLIENT_URL') is not None assert os.getenv('BASE_PATH') is not None assert os.getenv('AUTH_TOKEN') is not None
21
46
0.696429
29
168
3.896552
0.551724
0.212389
0.371681
0.265487
0.40708
0.40708
0
0
0
0
0
0
0.196429
168
7
47
24
0.837037
0
0
0
0
0
0.172619
0
0
0
0
0
0.6
1
0.2
true
0
0.2
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
1
0
0
1
0
0
0
0
0
0
7
a0fe1c03cbf2bb4d8fb3dfe4ec1f835b1bbf7153
76
py
Python
scripts/deploy.py
drLis/TreeDnaLedger
8a3a888b5389e9d5fda67675cb907c1ef93db047
[ "MIT" ]
null
null
null
scripts/deploy.py
drLis/TreeDnaLedger
8a3a888b5389e9d5fda67675cb907c1ef93db047
[ "MIT" ]
null
null
null
scripts/deploy.py
drLis/TreeDnaLedger
8a3a888b5389e9d5fda67675cb907c1ef93db047
[ "MIT" ]
null
null
null
from brownie import * def main(): return accounts[0].deploy(TreeDnaLedger)
19
41
0.763158
10
76
5.8
1
0
0
0
0
0
0
0
0
0
0
0.014925
0.118421
76
4
41
19
0.850746
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
19b9346ba02475562f4bc98842ba6f6ca286d6c0
15,912
py
Python
python_scripts/tests/test_parse_kraken_to_biom.py
sjanssen2/tcga
281827a63baea8068ecdeb2e0cd76d9e1359b36a
[ "BSD-3-Clause" ]
60
2018-01-26T04:14:36.000Z
2022-03-15T15:39:17.000Z
python_scripts/tests/test_parse_kraken_to_biom.py
sjanssen2/tcga
281827a63baea8068ecdeb2e0cd76d9e1359b36a
[ "BSD-3-Clause" ]
12
2016-08-10T22:25:04.000Z
2021-12-12T08:08:14.000Z
python_scripts/tests/test_parse_kraken_to_biom.py
sjanssen2/tcga
281827a63baea8068ecdeb2e0cd76d9e1359b36a
[ "BSD-3-Clause" ]
36
2016-08-09T17:34:32.000Z
2022-03-24T08:44:39.000Z
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2016--, Evguenia Kopylova. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------------------------------------------------------------- from unittest import TestCase, main from shutil import rmtree from tempfile import mkdtemp from os.path import join import numpy as np from biom.table import Table from biom import load_table from parse_kraken_to_biom import (compute_biom_table, prepare_dataframe, write_biom_table) class ParseKrakenToBIOMTests(TestCase): """Tests for function parse_kraken_to_biom.py """ def setUp(self): """Set up working directory and test files """ self.working_dir = mkdtemp() # Sample MPA report from Kraken self.kraken_translate_report_fp = join( self.working_dir, "kraken_mpa_report.txt") with open(self.kraken_translate_report_fp, 'w') as tmp: tmp.write(kraken_sample_report) # Sample MPA report from Kraken unsorted self.kraken_translate_report_unsorted_fp = join( self.working_dir, "kraken_mpa_report_unsorted.txt") with open(self.kraken_translate_report_unsorted_fp, 'w') as tmp: tmp.write(kraken_sample_report_unsorted) self.taxa_levels = {"domain": "d__", "phylum": "|p__", "class": "|c__", "order": "|o__", "family": "|f__", "genus": "|g__", "species": "|s__"} self.taxa_levels_idx = {"d__": 0, "|p__": 1, "|c__": 2, "|o__": 3, "|f__": 4, "|g__": 5, "|s__": 6, "6": "|s__", "5": "|g__", "4": "|f__", "3": "|o__", "2": "|c__", "1": "|p__", "0": "d__"} def tearDown(self): """Remove tests directory """ rmtree(self.working_dir) def test_compute_biom_table(self): """Test functionality of compute_biom_table(). """ taxonomic_rank = "genus" columns = ["s1", "s2", "s3", "s4", "s5"] index = ["d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium", "d__Bacteria|p__Firmicutes|c__Bacilli|o__Bacillales|f__Staphylococcaceae|g__Staphylococcus", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Actinomycetaceae|g__Mobiluncus", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Xanthomonadales|f__Xanthomonadaceae|g__Stenotrophomonas", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Corynebacteriaceae|g__Corynebacterium"] exp_table = Table(np.array([[1., 1., 0., 0., 1.], [1., 0., 0., 0., 0.], [0., 0., 1., 0., 1.], [0., 0., 0., 1., 0.], [0., 0., 0., 1., 0.], [0., 0., 0., 0., 1.]]), ["k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Propionibacteriaceae;g__Propionibacterium", "k__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Staphylococcaceae;g__Staphylococcus", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Enterobacteriales;f__Enterobacteriaceae;g__Escherichia", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Actinomycetaceae;g__Mobiluncus", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Xanthomonadales;f__Xanthomonadaceae;g__Stenotrophomonas", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Corynebacteriaceae;g__Corynebacterium"], columns) obs_table = compute_biom_table( kraken_translate_report_fp=self.kraken_translate_report_fp, taxonomic_rank=taxonomic_rank, taxa_levels=self.taxa_levels, taxa_levels_idx=self.taxa_levels_idx, columns=columns, index=index) self.assertEqual(obs_table, exp_table) def test_compute_biom_table_species(self): """Test functionality of compute_biom_table() to species level. """ taxonomic_rank = "species" columns = ["s1", "s2", "s3", "s4", "s5"] index = ["d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Actinomycetaceae|g__Mobiluncus|s__Mobiluncus_curtisii", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Xanthomonadales|f__Xanthomonadaceae|g__Stenotrophomonas|s__Stenotrophomonas_maltophilia"] exp_table = Table(np.array([[1., 1., 0., 0., 1.], [0., 0., 1., 0., 1.], [0., 0., 0., 1., 0.], [0., 0., 0., 1., 0.]]), ["k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Propionibacteriaceae;g__Propionibacterium;s__Propionibacterium_acnes", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Enterobacteriales;f__Enterobacteriaceae;g__Escherichia;s__Escherichia_coli", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Actinomycetaceae;g__Mobiluncus;s__Mobiluncus_curtisii", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Xanthomonadales;f__Xanthomonadaceae;g__Stenotrophomonas;s__Stenotrophomonas_maltophilia"], columns) obs_table = compute_biom_table( kraken_translate_report_fp=self.kraken_translate_report_fp, taxonomic_rank=taxonomic_rank, taxa_levels=self.taxa_levels, taxa_levels_idx=self.taxa_levels_idx, columns=columns, index=index) self.assertEqual(obs_table, exp_table) def test_compute_biom_table_unsorted(self): """Test functionality of compute_biom_table() with unsorted input. """ taxonomic_rank = "genus" columns = ["s1", "s2", "s5", "s4", "s3"] index = ["d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium", "d__Bacteria|p__Firmicutes|c__Bacilli|o__Bacillales|f__Staphylococcaceae|g__Staphylococcus", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Actinomycetaceae|g__Mobiluncus", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Xanthomonadales|f__Xanthomonadaceae|g__Stenotrophomonas", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Corynebacteriaceae|g__Corynebacterium"] exp_table = Table(np.array([[1., 1., 1., 0., 0.], [1., 0., 0., 0., 0.], [0., 0., 1., 0., 1.], [0., 0., 0., 1., 0.], [0., 0., 0., 1., 0.], [0., 0., 1., 0., 0.]]), ["k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Propionibacteriaceae;g__Propionibacterium", "k__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Staphylococcaceae;g__Staphylococcus", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Enterobacteriales;f__Enterobacteriaceae;g__Escherichia", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Actinomycetaceae;g__Mobiluncus", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Xanthomonadales;f__Xanthomonadaceae;g__Stenotrophomonas", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Corynebacteriaceae;g__Corynebacterium"], columns) obs_table = compute_biom_table( kraken_translate_report_fp=self.kraken_translate_report_fp, taxonomic_rank=taxonomic_rank, taxa_levels=self.taxa_levels, taxa_levels_idx=self.taxa_levels_idx, columns=columns, index=index) self.assertEqual(obs_table, exp_table) def test_prepare_dataframe(self): """Test functionality of prepare_dataframe(). """ taxonomic_rank = "genus" sample_ids_exp = ["s1", "s2", "s3", "s4", "s5"] taxonomies_exp = ["d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium", "d__Bacteria|p__Firmicutes|c__Bacilli|o__Bacillales|f__Staphylococcaceae|g__Staphylococcus", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Actinomycetaceae|g__Mobiluncus", "d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Xanthomonadales|f__Xanthomonadaceae|g__Stenotrophomonas", "d__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Corynebacteriaceae|g__Corynebacterium"] sample_ids_obs, taxonomies_obs = prepare_dataframe( kraken_translate_report_fp=self.kraken_translate_report_fp, taxonomic_rank=taxonomic_rank, taxa_levels=self.taxa_levels, taxa_levels_idx=self.taxa_levels_idx) self.assertListEqual(sorted(sample_ids_obs), sorted(sample_ids_exp)) self.assertListEqual(sorted(taxonomies_obs), sorted(taxonomies_exp)) def test_write_biom_table(self): """Test functionality of write_biom_table(). """ table_exp = Table(np.array([[1., 1., 1., 0., 0.], [1., 0., 0., 0., 0.], [0., 0., 1., 0., 1.], [0., 0., 0., 1., 0.], [0., 0., 0., 1., 0.], [0., 0., 1., 0., 0.]]), ["k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Propionibacteriaceae;g__Propionibacterium", "k__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Staphylococcaceae;g__Staphylococcus", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Enterobacteriales;f__Enterobacteriaceae;g__Escherichia", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Actinomycetaceae;g__Mobiluncus", "k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Xanthomonadales;f__Xanthomonadaceae;g__Stenotrophomonas", "k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Corynebacteriaceae;g__Corynebacterium"], ["s1", "s2", "s3", "s4", "s5"]) self.biom_output_fp = join(self.working_dir, "test_output_biom") write_biom_table(table_exp, self.biom_output_fp) table_obs = load_table(self.biom_output_fp) self.assertEqual(table_obs, table_exp) kraken_sample_report = """s1_0\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes s1_1\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s1_2\td__Bacteria|p__Firmicutes|c__Bacilli|o__Bacillales|f__Staphylococcaceae|g__Staphylococcus s2_1\td__Archaea s2_2\td__Bacteria s2_3\troot s2_4\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pasteurellales|f__Pasteurellaceae s2_5\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s2_6\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes s3_1\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s3_2\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli s4_1\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Actinomycetaceae|g__Mobiluncus|s__Mobiluncus_curtisii s4_2\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Xanthomonadales|f__Xanthomonadaceae|g__Stenotrophomonas|s__Stenotrophomonas_maltophilia s5_1\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes s5_2\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli s5_3\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s5_4\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Corynebacteriaceae|g__Corynebacterium """ kraken_sample_report_unsorted = """s1_0\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes s1_1\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s2_1\td__Archaea s5_2\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli s2_2\td__Bacteria s2_3\troot s2_4\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pasteurellales|f__Pasteurellaceae s2_5\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s1_2\td__Bacteria|p__Firmicutes|c__Bacilli|o__Bacillales|f__Staphylococcaceae|g__Staphylococcus s4_2\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Xanthomonadales|f__Xanthomonadaceae|g__Stenotrophomonas|s__Stenotrophomonas_maltophilia s5_4\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Corynebacteriaceae|g__Corynebacterium s2_6\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes s3_1\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae s3_2\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli s4_1\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Actinomycetaceae|g__Mobiluncus|s__Mobiluncus_curtisii s5_1\td__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Actinomycetales|f__Propionibacteriaceae|g__Propionibacterium|s__Propionibacterium_acnes s5_3\td__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae """ if __name__ == '__main__': main()
68
179
0.69281
1,682
15,912
5.850773
0.092747
0.065847
0.074789
0.078041
0.875013
0.857433
0.844223
0.825018
0.817701
0.810792
0
0.017601
0.21091
15,912
233
180
68.291845
0.766168
0.053167
0
0.642105
0
0
0.573455
0.550413
0
0
0
0
0.031579
1
0.036842
false
0
0.042105
0
0.084211
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c21f89e0f8a95c76a0018f4ab163fe71cce4bf3b
6,629
py
Python
modelos/test_pecfo.py
Chrpob/heroku-telegram-bot
7a30c4dcc4928b5aa16dfdce2df6251e0ea33ec4
[ "MIT" ]
null
null
null
modelos/test_pecfo.py
Chrpob/heroku-telegram-bot
7a30c4dcc4928b5aa16dfdce2df6251e0ea33ec4
[ "MIT" ]
null
null
null
modelos/test_pecfo.py
Chrpob/heroku-telegram-bot
7a30c4dcc4928b5aa16dfdce2df6251e0ea33ec4
[ "MIT" ]
null
null
null
import unittest from modelos.pecfo import Pecfo, PTJE_TOTAL, PTJE_CONCIENCIA_SILABICA, PTJE_CONCIENCIA_FONEMICA class TestEdna(unittest.TestCase): def test_edad_4(self): print("test_edad_4") # PTJE TOTAL # 4 anos: 12, 16, 22, 26, 32 # PTJE CONCIENCIA SILABICA # 4 anos: 7, 12, 15, 17, 22 # PTJE CONCIENCIA FONEMICA # 4 anos: 4, 5, 8, 9, 12 p5_p5_p5 = Pecfo('4', '5', '4', '3') p10_p5_p5 = Pecfo('4', '12', '4', '2') p5_p10_p10 = Pecfo('4', '5', '7', '4') self.assertEqual(p5_p5_p5.resultados[PTJE_TOTAL]['resultado'], 'Deficit') self.assertEqual(p5_p5_p5.resultados[PTJE_TOTAL]['percentil'], 'Menor a p10') self.assertEqual(p5_p5_p5.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Deficit') self.assertEqual(p5_p5_p5.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Menor a p10') self.assertEqual(p5_p5_p5.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Deficit') self.assertEqual(p5_p5_p5.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Menor a p10') self.assertEqual(p10_p5_p5.resultados[PTJE_TOTAL]['resultado'], 'Deficit') self.assertEqual(p10_p5_p5.resultados[PTJE_TOTAL]['percentil'], 'Igual a p10') self.assertEqual(p10_p5_p5.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Deficit') self.assertEqual(p10_p5_p5.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Menor a p10') self.assertEqual(p10_p5_p5.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Deficit') self.assertEqual(p10_p5_p5.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Menor a p10') self.assertEqual(p5_p10_p10.resultados[PTJE_TOTAL]['resultado'], 'Deficit') self.assertEqual(p5_p10_p10.resultados[PTJE_TOTAL]['percentil'], 'Menor a p10') self.assertEqual(p5_p10_p10.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Deficit') self.assertEqual(p5_p10_p10.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Igual a p10') self.assertEqual(p5_p10_p10.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Deficit') self.assertEqual(p5_p10_p10.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Igual a p10') def test_edad_5(self): # total # 5 anos: 20, 25, 29, 33, 39 # silabica # 5 anos: 12, 16, 18, 22, 24 # fonemica # 5 anos: 6, 8, 10, 12, 15 p15_p15_p15 = Pecfo('5', '22', '14', '7') p25_25_25 = Pecfo('5', '25', '16', '8') self.assertEqual(p15_p15_p15.resultados[PTJE_TOTAL]['resultado'], 'Riesgo') self.assertEqual(p15_p15_p15.resultados[PTJE_TOTAL]['percentil'], 'Menor a p25') self.assertEqual(p15_p15_p15.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Riesgo') self.assertEqual(p15_p15_p15.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Menor a p25') self.assertEqual(p15_p15_p15.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Riesgo') self.assertEqual(p15_p15_p15.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Menor a p25') self.assertEqual(p25_25_25.resultados[PTJE_TOTAL]['resultado'], 'Riesgo') self.assertEqual(p25_25_25.resultados[PTJE_TOTAL]['percentil'], 'Igual a p25') self.assertEqual(p25_25_25.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Riesgo') self.assertEqual(p25_25_25.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Igual a p25') self.assertEqual(p25_25_25.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Riesgo') self.assertEqual(p25_25_25.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Igual a p25') def test_edad_6(self): # total # 6 anos: 27, 34, 39, 41, 47 #silabica # 6 anos: 16, 21, 23, 26, 29 #fonemica # 6 anos: 11, 13, 15, 17, 19 p35_p35_p35 = Pecfo('6', '35', '22', '14') p50_p50_p50 = Pecfo('6', '39', '23', '15') self.assertEqual(p35_p35_p35.resultados[PTJE_TOTAL]['resultado'], 'Normal') self.assertEqual(p35_p35_p35.resultados[PTJE_TOTAL]['percentil'], 'Menor a p50') self.assertEqual(p35_p35_p35.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Normal') self.assertEqual(p35_p35_p35.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Menor a p50') self.assertEqual(p35_p35_p35.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Normal') self.assertEqual(p35_p35_p35.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Menor a p50') self.assertEqual(p50_p50_p50.resultados[PTJE_TOTAL]['resultado'], 'Normal') self.assertEqual(p50_p50_p50.resultados[PTJE_TOTAL]['percentil'], 'Igual a p50') self.assertEqual(p50_p50_p50.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Normal') self.assertEqual(p50_p50_p50.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Igual a p50') self.assertEqual(p50_p50_p50.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Normal') self.assertEqual(p50_p50_p50.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Igual a p50') def test_edad_7(self): # total # 7 anos: 35, 41, 44, 47, 49 # silabica # 7 anos: 23, 24, 27, 29, 30 # fonemica # 7 anos: 13, 17, 18, 19, 20 p65_65_75 = Pecfo('7', '45', '28', '19') p80_80_90 = Pecfo('7', '48', '30', '22') self.assertEqual(p65_65_75.resultados[PTJE_TOTAL]['resultado'], 'Normal') self.assertEqual(p65_65_75.resultados[PTJE_TOTAL]['percentil'], 'Menor a p75') self.assertEqual(p65_65_75.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Normal') self.assertEqual(p65_65_75.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Menor a p75') self.assertEqual(p65_65_75.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Normal') self.assertEqual(p65_65_75.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Igual a p75') self.assertEqual(p80_80_90.resultados[PTJE_TOTAL]['resultado'], 'Normal') self.assertEqual(p80_80_90.resultados[PTJE_TOTAL]['percentil'], 'Menor a p90') self.assertEqual(p80_80_90.resultados[PTJE_CONCIENCIA_SILABICA]['resultado'], 'Normal') self.assertEqual(p80_80_90.resultados[PTJE_CONCIENCIA_SILABICA]['percentil'], 'Igual a p90') self.assertEqual(p80_80_90.resultados[PTJE_CONCIENCIA_FONEMICA]['resultado'], 'Normal') self.assertEqual(p80_80_90.resultados[PTJE_CONCIENCIA_FONEMICA]['percentil'], 'Superior a p90') pass if __name__ == '__main__': print('Unit test PECFO') unittest.main()
57.643478
103
0.688037
856
6,629
5.049065
0.103972
0.187413
0.199907
0.133272
0.832254
0.830171
0.823693
0.796853
0.74248
0.563397
0
0.104012
0.168955
6,629
114
104
58.149123
0.680523
0.067582
0
0
0
0
0.169591
0
0
0
0
0
0.72
1
0.053333
false
0.013333
0.026667
0
0.093333
0.026667
0
0
0
null
0
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
7
c23bb650be09c31417e491ef6946185f237a1777
76
py
Python
picturate/config/__init__.py
picturate/picturate
9f8e69fef7b600b6d8c1ade41a0ccfc382992e8b
[ "Apache-2.0" ]
4
2020-08-03T04:16:53.000Z
2020-11-02T20:11:16.000Z
picturate/config/__init__.py
picturate/picturate
9f8e69fef7b600b6d8c1ade41a0ccfc382992e8b
[ "Apache-2.0" ]
6
2020-09-04T12:36:08.000Z
2021-06-18T04:31:29.000Z
picturate/config/__init__.py
picturate/picturate
9f8e69fef7b600b6d8c1ade41a0ccfc382992e8b
[ "Apache-2.0" ]
1
2020-07-24T07:29:46.000Z
2020-07-24T07:29:46.000Z
from picturate.config.util import * from picturate.config.CAttnGAN import *
25.333333
39
0.815789
10
76
6.2
0.6
0.419355
0.612903
0
0
0
0
0
0
0
0
0
0.105263
76
2
40
38
0.911765
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
c2458258fc3807f82582ee186df6a5442c22d11a
27,863
py
Python
DataAuAugmentV3.2.py
Zhangemmm/Face-Key-Points-Detection--master
85a177a4eedf7d7dc79358b23c341d11db4986af
[ "Apache-2.0" ]
null
null
null
DataAuAugmentV3.2.py
Zhangemmm/Face-Key-Points-Detection--master
85a177a4eedf7d7dc79358b23c341d11db4986af
[ "Apache-2.0" ]
null
null
null
DataAuAugmentV3.2.py
Zhangemmm/Face-Key-Points-Detection--master
85a177a4eedf7d7dc79358b23c341d11db4986af
[ "Apache-2.0" ]
null
null
null
<<<<<<< HEAD ''' 在生成hdf5.文件的基础上,增加数据增强模块实现。训练的样本数量 。 1.高斯模糊 把卷积和换成高斯核(自我认为是高斯核一个加权矩阵,主要用于乘以原来图像中的像素的值然后求和) 实现的函数是cv2.GaussianBlur(),需要指定高斯核的宽和高,都是奇数, 以及高斯函数沿着x轴和y轴的标准差,也可以使用cv2.getGaussianKernel()自己构建一个高斯核 ''' import h5py import cv2 import os import random import numpy as np # -------------------------------------------------ImagePreprocess ---------------------------------------------- ''' 图片预处理,减去均值除以方差 ''' # def ImagePreprocess(impuImage): # -------------------------------------------------ImageZoom ---------------------------------------------- """ 人脸框随机缩放,加入限制当图框缩小时候,关键点不能到图框外 Version;根据标注点的坐标计算出可以缩小最小极,根据最小极限生成随机数 形参是上极限,放大的比例 return:返回缩放后的图框坐标 """ def ImageZoom(inputArray, scalePercent,imageShape): showProcess = False outputArray = np.zeros(4, dtype=int) point = [float(i) for i in inputArray] width = point[2] - point[0] heigh = point[3] - point[1] minXval ,maxXval= min(point[4:10]), max(point[4:10]) minYval, maxYval = min(point[11:]), max(point[11:]) minXpercent = min((minXval-point[0])/width, (point[2] - maxXval)/width) minYpercent = min((minYval-point[1])/heigh, (point[3]-maxXval)/heigh) minPercent = min(minXpercent, minYpercent) inputMinPercent = -min(minPercent, scalePercent) scalePercent1 = random.uniform(inputMinPercent, scalePercent) boundingOffsetX = int(scalePercent1 * width / 2) boundingOffsetY = int(scalePercent1 * heigh / 2) outputArray[0] = int(inputArray[0]) - boundingOffsetX outputArray[2] = int(inputArray[2]) + boundingOffsetX outputArray[1] = int(inputArray[1]) - boundingOffsetY outputArray[3] = int(inputArray[3]) + boundingOffsetY #如果边框超过图片尺寸了,把图片的边作为边框的边 if outputArray[0] < 0: outputArray[0] = 0 if outputArray[1] < 0: outputArray[1] = 0 if outputArray[2] > imageShape[1]: #imageshape[1]是图片的宽度 outputArray[2] = imageShape[1] if outputArray[3] > imageShape[0]: # imageshape[1]是图片的宽度 outputArray[3] = imageShape[0] if showProcess: print("minXval ,maxXval", minXval, maxXval) print(" minYval, maxYval", minYval, maxYval) print("XY缩放图框距离:", boundingOffsetX, boundingOffsetY) print("缩放后的图框输出图框", outputArray) minMaxXY =[minXval, maxXval, minYval, maxYval] return outputArray, point, minMaxXY # -------------------------------------------------BoundingCrop----------------------------------------------- """ data:2018.8.6 function name:BoundingChang() function: 图框随机移动 paramater: 1.标注数据数组(包括边框) 2.扰动范围: -30%-30% return: none Version:V3.0 1.训练出来的模型在回归预测时候输出值一直一样,查看后发现模型绝大多数参数是0, 可能是输入图像中人脸相对于关键点位置基本差不多导致,模型只学习到这一个比较名明显的特征并没有根据像素点来来学习特征 就可以给图框加入扰动,消除因为图框标准相似带来的影响。(关键点坐标不变) 2.增加图框扰动程序(以右上角交叉两条边为基础)2.1随机选择扰动的边数量。2.2随机选择边扰动的方向和扰动的范围直接使用正负 Version:V3.1 1.先随机随访边框然后随机移动关键点(关键点移动人图片对象也要移动),先随机移动然后随机缩放 """ def BoundingCrop(labelArray, changePercent,imageShape): showProcess = False key_point = np.zeros(14, dtype=float) outputArray = np.zeros(4, dtype=int) outputBounding, point,minMaxXY = ImageZoom(labelArray, 0.3, imageShape) NewWidth = int(outputBounding[2] - outputBounding[0]) NewHeigh = int(outputBounding[3] - outputBounding[1]) #求边可以向内移动的最大百分比,保证关键点不出图框 minXpercent = min((minMaxXY[0] - outputBounding[0])/NewWidth, (outputBounding[2] - minMaxXY[1])/NewWidth) minYpercent = min((minMaxXY[2] - outputBounding[1]) / NewHeigh, (outputBounding[3] - minMaxXY[3])/NewHeigh) percent1 = random.uniform(-min(minXpercent, changePercent), min(minXpercent, changePercent)) percent2 = random.uniform(-min(minYpercent, changePercent), min(minYpercent, changePercent)) offset1 = int(percent1 * NewWidth) offset2 = int(percent2 * NewHeigh) outputArray[0] = int(outputBounding[0]) + offset1 outputArray[2] = int(outputBounding[2]) + offset1 outputArray[1] = int(outputBounding[1]) + offset2 outputArray[3] = int(outputBounding[3]) + offset2 if outputArray[0] < 0: outputArray[0] = 0 if outputArray[1] < 0: outputArray[1] = 0 if outputArray[2] > imageShape[1]: #imageshape[1]是图片的宽度 outputArray[2] = imageShape[1] if outputArray[3] > imageShape[0]: # imageshape[1]是图片的宽度 outputArray[3] = imageShape[0] for k in range(7): key_point[k] = (point[k+4] - outputArray[0])/NewWidth key_point[k + 7] = (point[k + 11]-outputArray[1])/NewHeigh if showProcess: print("(minMaxXY[0] - outputBounding[0])/NewWidth", (minMaxXY[0] - outputBounding[0]) / NewWidth) print("(outputBounding[2] - minMaxXY[1])/NewWidth", (outputBounding[2] - minMaxXY[1]) / NewWidth) print("minXpercent", minXpercent) print("minYpercent", minYpercent) print("percent1", percent1) print("percent2", percent2) print("offset1", offset1) print("offset1", offset2) print(" key_point[k]", key_point) if key_point[0]<0: print("***************************************************************") print("point[4]", point[4]) print("outputArray0", outputArray[0]) print("offset1", offset1) print("offset1", offset2) print("key_point[0]", key_point[0]*NewWidth) return outputArray, key_point # -------------------------------------------------createTrainValList----------------------------------------------- """ data:2018.8.16 function name:createVallist() function: genrate validation list paramater: 1.txt_dir: txt file path 2val_txt_dir: 2.valRate: validation rate return: none Version:V2: 1.以前抽取验证集的方式不对,这次直接原始数据中开头区10%(原始数据已经打乱了所以可以直接抽取) 剩余的部分即可作为训练集 """ def createTrainValList(txt_dir, train_txt_dir, val_txt_dir, valRate): with open(txt_dir, 'r') as txtfile: lines = txtfile.readlines() line_number = len(lines) val_number = int(line_number * valRate) val = open(val_txt_dir, 'w') for i in range(val_number): txt = lines[i] val.write(txt) val.close() train_number = line_number - val_number train = open(train_txt_dir, 'w') for j in range(train_number): txt = lines[val_number + j] train.write(txt) train.close() print("------>>>>生成训练数据数量:", train_number) print("------>>>>生成验证数据数量:", val_number) print("------>>>>train list & validation list create successfully") # -------------------------------------------------createHdf5Data----------------------------------------------- ''' __auhor__="syy" data:2018.8.6 function name:createHdf5Data() function: genrate hdf5 for caffe paramater: 1.img_dir: image file path 2.txt_dir: txt list path 3.hdf5_dir: hdf5 output path 4.img_img_size: input img_size of image return: none Version:V2.0 1.对原来的程序精简: 原来存放图形和标签的数组是定义好大小的,改成根据读书数据大小确定,节省空间,便于向hdf5中添加新的文件。 2.可以插入数据增强模块:x轴镜像,y轴镜像,高斯噪声,椒盐噪声,旋转等 ''' def createHdf5Data(img_dir, txt_dir, hdf5_dir, img_size,N_number,argument=False): print("开始数转换") showImage = False with open(txt_dir, 'r') as txt_file: lines = txt_file.readlines() txt_list_number = len(lines) print(" txt_list_number", txt_list_number) if argument: total_number = txt_list_number * 5 else: total_number = txt_list_number*N_number print("total data number ", total_number) datas = np.zeros((total_number, 1, img_size, img_size)) labels = np.zeros((total_number, 14)) key_point = np.zeros(14, dtype=float) key_point_flip1 = np.zeros(14, dtype=float) key_point_flip0 = np.zeros(14, dtype=float) key_point_Gauss = np.zeros(14, dtype=float) key_point_saltPe = np.zeros(14, dtype=float) changePercent = 0.3 imgSize = img_size * img_size countNumber = 0 for i, line in enumerate(lines): new_line = line.split() pic_name = new_line[0] img = cv2.imread(os.path.join(img_dir, pic_name)) img_shape = img.shape # -------------------------------------- if showImage: #过程显示 print("¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥") print("pic_name", pic_name) print("img_shape",img_shape) print("原来图框尺寸", new_line[1:5]) print("输入标注文件", new_line[5:]) x1 = int(new_line[1]) y1 = int(new_line[2]) x2 = int(new_line[3]) y2 = int(new_line[4]) W_rate = 1 / (x2 - x1) H_rate = 1 / (y2 - y1) for j in range(7): key_point[j] = (float(new_line[j + 5]) - x1) * W_rate key_point[j + 7] = (float(new_line[j + 12]) - y1) * H_rate img_crop1 = img[y1:y2, x1:x2] cv2.imshow("img_read1", img_crop1) cv2.waitKey(0) cv2.destroyAllWindows() #-------------------------------------- for n_number in range(N_number): outputArray, key_point = BoundingCrop(new_line[1:], changePercent, img_shape) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img_crop = img_gray[outputArray[1]:outputArray[3], outputArray[0]:outputArray[2]] if showImage: # 过程显示 print("改变后图框", outputArray) cv2.imshow("img_read", img_crop) cv2.waitKey(0) cv2.destroyAllWindows() img_resize = cv2.resize(img_crop, (img_size, img_size)) datas[countNumber, :, :, :] = np.array(img_resize).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point).astype(np.float32) countNumber += 1 if argument: # 是否数据增强 # 关于Y方向图像翻转,左右眼睛,左右嘴角也会要对换 img_flip1 = cv2.flip(img_resize, 1) # 1水平翻转,x发生变化,y不变 key_point_flip1[0] = 1 - key_point[3] key_point_flip1[1] = 1 - key_point[2] key_point_flip1[2] = 1 - key_point[1] key_point_flip1[3] = 1 - key_point[0] key_point_flip1[4] = 1 - key_point[4] key_point_flip1[5] = 1 - key_point[6] key_point_flip1[6] = 1 - key_point[5] key_point_flip1[7] = key_point[10] # 3+7 key_point_flip1[8] = key_point[9] # 2+7 key_point_flip1[9] = key_point[8] key_point_flip1[10] = key_point[7] key_point_flip1[11] = key_point[11] key_point_flip1[12] = key_point[13] key_point_flip1[13] = key_point[12] datas[countNumber, :, :, :] = np.array(img_flip1).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_flip1).astype(np.float32) countNumber += 1 # 关于X轴 img_flip0 = cv2.flip(img_resize, 0) # 0,x不变 y变 for flip0 in range(7): key_point_flip0[flip0] = key_point[flip0] key_point_flip0[flip0 + 7] = 1 - key_point[flip0 + 7] datas[countNumber, :, :, :] = np.array(img_flip0).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_flip0).astype(np.float32) countNumber += 1 """ 高斯模糊,针对尺寸为40*40的图片,测试发现高斯核对图形模糊影响较大,然后是x轴的标准差 高斯核选择3,5,7(9的时候无法辨识),标准差选择5-10;高斯噪声对标注文件关键点没影响 """ kernal_size = random.randrange(3, 9, 2) # 3,5, 7中间随机选一个,9不包含在内 xStandDev = random.uniform(5, 10) # 随机生成5-10之间 img_Gauss = cv2.GaussianBlur(img_resize, (kernal_size, kernal_size), xStandDev) key_point_Gauss = key_point datas[countNumber, :, :, :] = np.array(img_Gauss).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_Gauss).astype(np.float32) countNumber += 1 """ 椒盐噪声,椒盐噪声是数字图像中的常见噪声,一般是图像传感器、传输信道及解码处理等产生的黑白相间的亮暗点噪声, 椒盐噪声常由图像切割产生。椒盐噪声是指两种噪声:盐噪声和椒噪声。盐噪声一般是白色噪声,椒噪声一般为黑色噪声。 前者属于高灰度噪声,或者属于低灰度噪声;噪声不能太大,最大占图片的30% """ saltPepperNumber = random.randint(10, 400) img_ssaltPe = img_resize for k in range(saltPepperNumber): randX = random.randint(0, 39) randY = random.randint(0, 39) if random.randint(0, 1) == 0: img_ssaltPe[randX, randY] = 0 else: img_ssaltPe[randX, randY] = 255 key_point_saltPe = key_point datas[countNumber, :, :, :] = np.array(img_ssaltPe).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_saltPe).astype(np.float32) countNumber += 1 """ 图片旋转 """ """ 图片缩放 """ if i % 10 == 0: print("当前进度---->>:%.2f%%" % (i / txt_list_number * 100)) if countNumber % 100 == 0: print("图片数据已经转换:", countNumber) with h5py.File(hdf5_dir, 'w') as HDF5: HDF5.create_dataset('data', data=datas) HDF5.create_dataset('label', data=labels) print("当前进度---->>: 100%") print("----->>>>已经转换图片总数:", countNumber) print("******************数据转换写入完毕******************") # ----------------------------------------------------main()-------------------------------------- if __name__ == "__main__": txt_dir = "E:/dataset/FacialPoints/DataAll_7Rt1.5.txt" img_dir = "/dataset/FacialPoints/Data_image" train_hdf5_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/train.h5" val_hdf5_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/val.h5" val_txt_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/val_list.txt" train_txt_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/train_list.txt" valRate = 0.1 createTrainValList(txt_dir, train_txt_dir, val_txt_dir, valRate) createHdf5Data(img_dir, val_txt_dir, val_hdf5_dir, 40, 1, argument=False) ======= ''' 在生成hdf5.文件的基础上,增加数据增强模块实现。训练的样本数量 。 1.高斯模糊 把卷积和换成高斯核(自我认为是高斯核一个加权矩阵,主要用于乘以原来图像中的像素的值然后求和) 实现的函数是cv2.GaussianBlur(),需要指定高斯核的宽和高,都是奇数, 以及高斯函数沿着x轴和y轴的标准差,也可以使用cv2.getGaussianKernel()自己构建一个高斯核 ''' import h5py import cv2 import os import random import numpy as np # -------------------------------------------------ImagePreprocess ---------------------------------------------- ''' 图片预处理,减去均值除以方差 ''' # def ImagePreprocess(impuImage): # -------------------------------------------------ImageZoom ---------------------------------------------- """ 人脸框随机缩放,加入限制当图框缩小时候,关键点不能到图框外 Version;根据标注点的坐标计算出可以缩小最小极,根据最小极限生成随机数 形参是上极限,放大的比例 return:返回缩放后的图框坐标 """ def ImageZoom(inputArray, scalePercent,imageShape): showProcess = False outputArray = np.zeros(4, dtype=int) point = [float(i) for i in inputArray] width = point[2] - point[0] heigh = point[3] - point[1] minXval ,maxXval= min(point[4:10]), max(point[4:10]) minYval, maxYval = min(point[11:]), max(point[11:]) minXpercent = min((minXval-point[0])/width, (point[2] - maxXval)/width) minYpercent = min((minYval-point[1])/heigh, (point[3]-maxXval)/heigh) minPercent = min(minXpercent, minYpercent) inputMinPercent = -min(minPercent, scalePercent) scalePercent1 = random.uniform(inputMinPercent, scalePercent) boundingOffsetX = int(scalePercent1 * width / 2) boundingOffsetY = int(scalePercent1 * heigh / 2) outputArray[0] = int(inputArray[0]) - boundingOffsetX outputArray[2] = int(inputArray[2]) + boundingOffsetX outputArray[1] = int(inputArray[1]) - boundingOffsetY outputArray[3] = int(inputArray[3]) + boundingOffsetY #如果边框超过图片尺寸了,把图片的边作为边框的边 if outputArray[0] < 0: outputArray[0] = 0 if outputArray[1] < 0: outputArray[1] = 0 if outputArray[2] > imageShape[1]: #imageshape[1]是图片的宽度 outputArray[2] = imageShape[1] if outputArray[3] > imageShape[0]: # imageshape[1]是图片的宽度 outputArray[3] = imageShape[0] if showProcess: print("minXval ,maxXval", minXval, maxXval) print(" minYval, maxYval", minYval, maxYval) print("XY缩放图框距离:", boundingOffsetX, boundingOffsetY) print("缩放后的图框输出图框", outputArray) minMaxXY =[minXval, maxXval, minYval, maxYval] return outputArray, point, minMaxXY # -------------------------------------------------BoundingCrop----------------------------------------------- """ data:2018.8.6 function name:BoundingChang() function: 图框随机移动 paramater: 1.标注数据数组(包括边框) 2.扰动范围: -30%-30% return: none Version:V3.0 1.训练出来的模型在回归预测时候输出值一直一样,查看后发现模型绝大多数参数是0, 可能是输入图像中人脸相对于关键点位置基本差不多导致,模型只学习到这一个比较名明显的特征并没有根据像素点来来学习特征 就可以给图框加入扰动,消除因为图框标准相似带来的影响。(关键点坐标不变) 2.增加图框扰动程序(以右上角交叉两条边为基础)2.1随机选择扰动的边数量。2.2随机选择边扰动的方向和扰动的范围直接使用正负 Version:V3.1 1.先随机随访边框然后随机移动关键点(关键点移动人图片对象也要移动),先随机移动然后随机缩放 """ def BoundingCrop(labelArray, changePercent,imageShape): showProcess = False key_point = np.zeros(14, dtype=float) outputArray = np.zeros(4, dtype=int) outputBounding, point,minMaxXY = ImageZoom(labelArray, 0.3, imageShape) NewWidth = int(outputBounding[2] - outputBounding[0]) NewHeigh = int(outputBounding[3] - outputBounding[1]) #求边可以向内移动的最大百分比,保证关键点不出图框 minXpercent = min((minMaxXY[0] - outputBounding[0])/NewWidth, (outputBounding[2] - minMaxXY[1])/NewWidth) minYpercent = min((minMaxXY[2] - outputBounding[1]) / NewHeigh, (outputBounding[3] - minMaxXY[3])/NewHeigh) percent1 = random.uniform(-min(minXpercent, changePercent), min(minXpercent, changePercent)) percent2 = random.uniform(-min(minYpercent, changePercent), min(minYpercent, changePercent)) offset1 = int(percent1 * NewWidth) offset2 = int(percent2 * NewHeigh) outputArray[0] = int(outputBounding[0]) + offset1 outputArray[2] = int(outputBounding[2]) + offset1 outputArray[1] = int(outputBounding[1]) + offset2 outputArray[3] = int(outputBounding[3]) + offset2 if outputArray[0] < 0: outputArray[0] = 0 if outputArray[1] < 0: outputArray[1] = 0 if outputArray[2] > imageShape[1]: #imageshape[1]是图片的宽度 outputArray[2] = imageShape[1] if outputArray[3] > imageShape[0]: # imageshape[1]是图片的宽度 outputArray[3] = imageShape[0] for k in range(7): key_point[k] = (point[k+4] - outputArray[0])/NewWidth key_point[k + 7] = (point[k + 11]-outputArray[1])/NewHeigh if showProcess: print("(minMaxXY[0] - outputBounding[0])/NewWidth", (minMaxXY[0] - outputBounding[0]) / NewWidth) print("(outputBounding[2] - minMaxXY[1])/NewWidth", (outputBounding[2] - minMaxXY[1]) / NewWidth) print("minXpercent", minXpercent) print("minYpercent", minYpercent) print("percent1", percent1) print("percent2", percent2) print("offset1", offset1) print("offset1", offset2) print(" key_point[k]", key_point) if key_point[0]<0: print("***************************************************************") print("point[4]", point[4]) print("outputArray0", outputArray[0]) print("offset1", offset1) print("offset1", offset2) print("key_point[0]", key_point[0]*NewWidth) return outputArray, key_point # -------------------------------------------------createTrainValList----------------------------------------------- """ data:2018.8.16 function name:createVallist() function: genrate validation list paramater: 1.txt_dir: txt file path 2val_txt_dir: 2.valRate: validation rate return: none Version:V2: 1.以前抽取验证集的方式不对,这次直接原始数据中开头区10%(原始数据已经打乱了所以可以直接抽取) 剩余的部分即可作为训练集 """ def createTrainValList(txt_dir, train_txt_dir, val_txt_dir, valRate): with open(txt_dir, 'r') as txtfile: lines = txtfile.readlines() line_number = len(lines) val_number = int(line_number * valRate) val = open(val_txt_dir, 'w') for i in range(val_number): txt = lines[i] val.write(txt) val.close() train_number = line_number - val_number train = open(train_txt_dir, 'w') for j in range(train_number): txt = lines[val_number + j] train.write(txt) train.close() print("------>>>>生成训练数据数量:", train_number) print("------>>>>生成验证数据数量:", val_number) print("------>>>>train list & validation list create successfully") # -------------------------------------------------createHdf5Data----------------------------------------------- ''' __auhor__="syy" data:2018.8.6 function name:createHdf5Data() function: genrate hdf5 for caffe paramater: 1.img_dir: image file path 2.txt_dir: txt list path 3.hdf5_dir: hdf5 output path 4.img_img_size: input img_size of image return: none Version:V2.0 1.对原来的程序精简: 原来存放图形和标签的数组是定义好大小的,改成根据读书数据大小确定,节省空间,便于向hdf5中添加新的文件。 2.可以插入数据增强模块:x轴镜像,y轴镜像,高斯噪声,椒盐噪声,旋转等 ''' def createHdf5Data(img_dir, txt_dir, hdf5_dir, img_size,N_number,argument=False): print("开始数转换") showImage = False with open(txt_dir, 'r') as txt_file: lines = txt_file.readlines() txt_list_number = len(lines) print(" txt_list_number", txt_list_number) if argument: total_number = txt_list_number * 5 else: total_number = txt_list_number*N_number print("total data number ", total_number) datas = np.zeros((total_number, 1, img_size, img_size)) labels = np.zeros((total_number, 14)) key_point = np.zeros(14, dtype=float) key_point_flip1 = np.zeros(14, dtype=float) key_point_flip0 = np.zeros(14, dtype=float) key_point_Gauss = np.zeros(14, dtype=float) key_point_saltPe = np.zeros(14, dtype=float) changePercent = 0.3 imgSize = img_size * img_size countNumber = 0 for i, line in enumerate(lines): new_line = line.split() pic_name = new_line[0] img = cv2.imread(os.path.join(img_dir, pic_name)) img_shape = img.shape # -------------------------------------- if showImage: #过程显示 print("¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥") print("pic_name", pic_name) print("img_shape",img_shape) print("原来图框尺寸", new_line[1:5]) print("输入标注文件", new_line[5:]) x1 = int(new_line[1]) y1 = int(new_line[2]) x2 = int(new_line[3]) y2 = int(new_line[4]) W_rate = 1 / (x2 - x1) H_rate = 1 / (y2 - y1) for j in range(7): key_point[j] = (float(new_line[j + 5]) - x1) * W_rate key_point[j + 7] = (float(new_line[j + 12]) - y1) * H_rate img_crop1 = img[y1:y2, x1:x2] cv2.imshow("img_read1", img_crop1) cv2.waitKey(0) cv2.destroyAllWindows() #-------------------------------------- for n_number in range(N_number): outputArray, key_point = BoundingCrop(new_line[1:], changePercent, img_shape) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img_crop = img_gray[outputArray[1]:outputArray[3], outputArray[0]:outputArray[2]] if showImage: # 过程显示 print("改变后图框", outputArray) cv2.imshow("img_read", img_crop) cv2.waitKey(0) cv2.destroyAllWindows() img_resize = cv2.resize(img_crop, (img_size, img_size)) datas[countNumber, :, :, :] = np.array(img_resize).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point).astype(np.float32) countNumber += 1 if argument: # 是否数据增强 # 关于Y方向图像翻转,左右眼睛,左右嘴角也会要对换 img_flip1 = cv2.flip(img_resize, 1) # 1水平翻转,x发生变化,y不变 key_point_flip1[0] = 1 - key_point[3] key_point_flip1[1] = 1 - key_point[2] key_point_flip1[2] = 1 - key_point[1] key_point_flip1[3] = 1 - key_point[0] key_point_flip1[4] = 1 - key_point[4] key_point_flip1[5] = 1 - key_point[6] key_point_flip1[6] = 1 - key_point[5] key_point_flip1[7] = key_point[10] # 3+7 key_point_flip1[8] = key_point[9] # 2+7 key_point_flip1[9] = key_point[8] key_point_flip1[10] = key_point[7] key_point_flip1[11] = key_point[11] key_point_flip1[12] = key_point[13] key_point_flip1[13] = key_point[12] datas[countNumber, :, :, :] = np.array(img_flip1).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_flip1).astype(np.float32) countNumber += 1 # 关于X轴 img_flip0 = cv2.flip(img_resize, 0) # 0,x不变 y变 for flip0 in range(7): key_point_flip0[flip0] = key_point[flip0] key_point_flip0[flip0 + 7] = 1 - key_point[flip0 + 7] datas[countNumber, :, :, :] = np.array(img_flip0).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_flip0).astype(np.float32) countNumber += 1 """ 高斯模糊,针对尺寸为40*40的图片,测试发现高斯核对图形模糊影响较大,然后是x轴的标准差 高斯核选择3,5,7(9的时候无法辨识),标准差选择5-10;高斯噪声对标注文件关键点没影响 """ kernal_size = random.randrange(3, 9, 2) # 3,5, 7中间随机选一个,9不包含在内 xStandDev = random.uniform(5, 10) # 随机生成5-10之间 img_Gauss = cv2.GaussianBlur(img_resize, (kernal_size, kernal_size), xStandDev) key_point_Gauss = key_point datas[countNumber, :, :, :] = np.array(img_Gauss).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_Gauss).astype(np.float32) countNumber += 1 """ 椒盐噪声,椒盐噪声是数字图像中的常见噪声,一般是图像传感器、传输信道及解码处理等产生的黑白相间的亮暗点噪声, 椒盐噪声常由图像切割产生。椒盐噪声是指两种噪声:盐噪声和椒噪声。盐噪声一般是白色噪声,椒噪声一般为黑色噪声。 前者属于高灰度噪声,或者属于低灰度噪声;噪声不能太大,最大占图片的30% """ saltPepperNumber = random.randint(10, 400) img_ssaltPe = img_resize for k in range(saltPepperNumber): randX = random.randint(0, 39) randY = random.randint(0, 39) if random.randint(0, 1) == 0: img_ssaltPe[randX, randY] = 0 else: img_ssaltPe[randX, randY] = 255 key_point_saltPe = key_point datas[countNumber, :, :, :] = np.array(img_ssaltPe).astype(np.float32) / 255 labels[countNumber, :] = np.array(key_point_saltPe).astype(np.float32) countNumber += 1 """ 图片旋转 """ """ 图片缩放 """ if i % 10 == 0: print("当前进度---->>:%.2f%%" % (i / txt_list_number * 100)) if countNumber % 100 == 0: print("图片数据已经转换:", countNumber) with h5py.File(hdf5_dir, 'w') as HDF5: HDF5.create_dataset('data', data=datas) HDF5.create_dataset('label', data=labels) print("当前进度---->>: 100%") print("----->>>>已经转换图片总数:", countNumber) print("******************数据转换写入完毕******************") # ----------------------------------------------------main()-------------------------------------- if __name__ == "__main__": txt_dir = "E:/dataset/FacialPoints/DataAll_7Rt1.5.txt" img_dir = "/dataset/FacialPoints/Data_image" train_hdf5_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/train.h5" val_hdf5_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/val.h5" val_txt_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/val_list.txt" train_txt_dir = "E:/dataset/FacialPoints/EnhancementTest/DataAu/train_list.txt" valRate = 0.1 createTrainValList(txt_dir, train_txt_dir, val_txt_dir, valRate) createHdf5Data(img_dir, val_txt_dir, val_hdf5_dir, 40, 1, argument=False) >>>>>>> f3906cac61536c92d31692897acd1aecbc1ff391 createHdf5Data(img_dir, txt_dir, train_hdf5_dir, 40, 5, argument=False)
42.866154
116
0.588307
3,124
27,863
5.108195
0.098592
0.058153
0.026068
0.010528
0.995488
0.993859
0.993859
0.993859
0.993859
0.993859
0
0.04596
0.235509
27,863
650
117
42.866154
0.700859
0.071385
0
0.991342
0
0
0.086647
0.043962
0
0
0
0
0
0
null
null
0
0.021645
null
null
0.155844
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
dffbeff818648b04756c3a4c22c275baaadc0359
20,628
py
Python
xmind/tests/test_sheet_element.py
andrii-z4i/xmind-sdk-python
d5114550da29b7be440e023125e0e12daab05f46
[ "MIT" ]
10
2018-04-09T10:08:32.000Z
2021-02-13T15:01:12.000Z
xmind/tests/test_sheet_element.py
andrii-z4i/xmind-sdk-python
d5114550da29b7be440e023125e0e12daab05f46
[ "MIT" ]
30
2017-12-29T20:54:57.000Z
2021-03-28T21:26:53.000Z
xmind/tests/test_sheet_element.py
andrii-z4i/xmind-sdk-python
d5114550da29b7be440e023125e0e12daab05f46
[ "MIT" ]
2
2020-10-23T13:19:01.000Z
2020-11-09T16:15:29.000Z
from xmind.tests import logging_configuration as lc from xmind.core.sheet import SheetElement from xmind.tests import base from unittest.mock import patch, Mock, MagicMock from xmind.core.const import * class TestSheetElement(base.Base): """Test class for SheetElement class""" def getLogger(self): if not getattr(self, '_logger', None): self._logger = lc.get_logger('sheetElement') return self._logger def setUp(self): super(TestSheetElement, self).setUp() self._init_method = self._init_patch_with_name( '_init', 'xmind.core.sheet.WorkbookMixinElement.__init__') self._add_id_attribute = self._init_patch_with_name( '_add_id_attribute', 'xmind.core.sheet.SheetElement.addIdAttribute') self._get_root_topic = self._init_patch_with_name( '_get_root_topic', 'xmind.core.sheet.SheetElement._get_root_topic') def _assert_init_methods(self): self._init_method.assert_called_once_with(None, None) self._add_id_attribute.assert_called_once_with(ATTR_ID) self._get_root_topic.assert_called_once() def test_excessive_parameters(self): _element = SheetElement() self._assert_init_methods() self._remove_patched_function("_get_root_topic") _parameters = [ ('__init__', (2, False)), ('_get_root_topic', 0), ('createRelationship', 3), ('_getRelationships', 0), ('addRelationship', 1), ('removeRelationship', 1), ('getRootTopic', 0), ('_get_title', 0), ('getTitle', 0), ('setTitle', 1), ('getParent', 0), ('updateModifiedTime', 0) ] for pair in _parameters: with self.subTest(pair=pair): self._test_method_by_excessive_parameters(pair, _element) def test_init(self): SheetElement() self._assert_init_methods() def test_get_root_topic_without_topic(self): _get_child_nodes_by_tag_name = self._init_patch_with_name( '_get_child_nodes_by_tag_name', 'xmind.core.sheet.SheetElement.getChildNodesByTagName', return_value=[]) _owner_workbook = Mock() _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook', return_value=_owner_workbook) _obj_topic_element = Mock() _topic_element = self._init_patch_with_name( '_topic_element', 'xmind.core.sheet.TopicElement', return_value=_obj_topic_element) _append_child = self._init_patch_with_name( '_append_child', 'xmind.core.sheet.SheetElement.appendChild') _obj = SheetElement() self._assert_init_methods() self._remove_patched_function("_get_root_topic") self.assertEqual(_obj._get_root_topic(), _obj_topic_element) _get_child_nodes_by_tag_name.assert_called_once_with(TAG_TOPIC) _get_owner_workbook.assert_called_once() _topic_element.assert_called_once() _topic_element.assert_called_with(ownerWorkbook=_owner_workbook) _append_child.assert_called_once() _append_child.assert_called_with(_obj_topic_element) def test_get_root_topic_with_topic(self): _get_child_nodes_by_tag_name = self._init_patch_with_name( '_get_child_nodes_by_tag_name', 'xmind.core.sheet.SheetElement.getChildNodesByTagName', return_value=[1]) _owner_workbook = Mock() _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook', return_value=_owner_workbook) _obj_topic_element = Mock() _topic_element = self._init_patch_with_name( '_topic_element', 'xmind.core.sheet.TopicElement', return_value=_obj_topic_element) _obj = SheetElement() self._assert_init_methods() self._remove_patched_function("_get_root_topic") self.assertEqual(_obj._get_root_topic(), _obj_topic_element) _get_child_nodes_by_tag_name.assert_called_once_with(TAG_TOPIC) _get_owner_workbook.assert_called_once() _topic_element.assert_called_once() _topic_element.assert_called_with(1, _owner_workbook) def test_create_relationship_without_title(self): _rel = Mock() _rel.setEnd1ID.return_value = None _rel.setEnd2ID.return_value = None _rel.setTitle.return_value = None _owner_workbook = Mock() _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook', return_value=_owner_workbook) _relationship_element = self._init_patch_with_name( '_relationship_element', 'xmind.core.sheet.RelationshipElement', return_value=_rel) _obj = SheetElement() self.assertEqual(_obj.createRelationship("one", "two"), _rel) _get_owner_workbook.assert_called_once() _relationship_element.assert_called_once_with( ownerWorkbook=_owner_workbook) _rel.setEnd1ID.assert_called_with("one") _rel.setEnd2ID.assert_called_with("two") _rel.setTitle.assert_not_called() self._assert_init_methods() def test_create_relationship_with_title(self): _rel = Mock() _rel.setEnd1ID.return_value = None _rel.setEnd2ID.return_value = None _rel.setTitle.return_value = None _owner_workbook = Mock() _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook', return_value=_owner_workbook) _relationship_element = self._init_patch_with_name( '_relationship_element', 'xmind.core.sheet.RelationshipElement', return_value=_rel) _obj = SheetElement() _title = Mock() self.assertEqual(_obj.createRelationship("one", "two", _title), _rel) _get_owner_workbook.assert_called_once() _relationship_element.assert_called_once_with( ownerWorkbook=_owner_workbook) _rel.setEnd1ID.assert_called_with("one") _rel.setEnd2ID.assert_called_with("two") _rel.setTitle.assert_called_with(_title) self._assert_init_methods() def test_get_relationships(self): _get_first_child_node_by_tag_name = self._init_patch_with_name( '_get_first_child_node_by_tag_name', 'xmind.core.sheet.SheetElement.getFirstChildNodeByTagName') _obj = SheetElement() self.assertIsNone(_obj._getRelationships()) _get_first_child_node_by_tag_name.assert_called_once_with( TAG_RELATIONSHIPS) self._assert_init_methods() def test_addRelationship_rels_are_none(self): _get_relationships = self._init_patch_with_name( '_get_relationships', 'xmind.core.sheet.SheetElement._getRelationships') _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook') _rels = Mock() _rels.appendChild.return_value = None _relationships_element = self._init_patch_with_name( '_relationships_element', 'xmind.core.sheet.RelationshipsElement', return_value=_rels) _append_child = self._init_patch_with_name( '_append_child', 'xmind.core.sheet.SheetElement.appendChild') _obj = SheetElement() self.assertIsNone(_obj.addRelationship("test")) _get_relationships.assert_called_once() _get_owner_workbook.assert_called_once() _relationships_element.assert_called_once_with(None, None) _append_child.assert_called_once_with(_rels) _rels.appendChild.assert_called_once_with("test") self._assert_init_methods() def test_addRelationship_with_rels(self): _got_rel = Mock() _get_relationships = self._init_patch_with_name( '_get_relationships', 'xmind.core.sheet.SheetElement._getRelationships', return_value=_got_rel) _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook') _rels = Mock() _rels.appendChild.return_value = None _relationships_element = self._init_patch_with_name( '_relationships_element', 'xmind.core.sheet.RelationshipsElement', return_value=_rels) _append_child = self._init_patch_with_name( '_append_child', 'xmind.core.sheet.SheetElement.appendChild') _obj = SheetElement() self.assertIsNone(_obj.addRelationship("test")) _get_relationships.assert_called_once() _get_owner_workbook.assert_called_once() _relationships_element.assert_called_once_with(_got_rel, None) _append_child.assert_not_called() _rels.appendChild.assert_called_once_with("test") self._assert_init_methods() def test_remove_relationship_without_set_up_relationships(self): _get_relationships = self._init_patch_with_name( '_get_relationships', 'xmind.core.sheet.SheetElement._getRelationships') _rel = Mock() _rel.getImplementation.return_value = None _obj = SheetElement() self.assertIsNone(_obj.removeRelationship(_rel)) _get_relationships.assert_called_once() _rel.getImplementation.assert_not_called() self._assert_init_methods() def test_remove_relationship_with_set_up_relationships_and_without_child_nodes(self): _rels = Mock() _rels.removeChild.return_value = None _rels.hasChildNodes.return_value = None _get_relationships = self._init_patch_with_name( '_get_relationships', 'xmind.core.sheet.SheetElement._getRelationships', return_value=_rels) _get_implementation_obj = Mock() _get_implementation_obj.removeChild.return_value = None _get_implementation = self._init_patch_with_name( '_get_implementation', 'xmind.core.sheet.SheetElement.getImplementation', return_value=_get_implementation_obj) _update_modified_time = self._init_patch_with_name( '_update_modified_time', 'xmind.core.sheet.SheetElement.updateModifiedTime', ) _rel = Mock() _rel.getImplementation.return_value = "test" _obj = SheetElement() self.assertIsNone(_obj.removeRelationship(_rel)) _get_relationships.assert_called_once() _rel.getImplementation.assert_called_once() _rels.removeChild.assert_called_once_with("test") _rels.hasChildNodes.assert_called_once() _get_implementation.assert_called_once() _get_implementation_obj.removeChild.assert_called_once_with(_rels) _update_modified_time.assert_called_once() self._assert_init_methods() def test_remove_relationship_with_set_up_relationships_and_with_child_nodes(self): _rels = Mock() _rels.removeChild.return_value = None _rels.hasChildNodes.return_value = Mock() _get_relationships = self._init_patch_with_name( '_get_relationships', 'xmind.core.sheet.SheetElement._getRelationships', return_value=_rels) _get_implementation_obj = Mock() _get_implementation_obj.removeChild.return_value = None _get_implementation = self._init_patch_with_name( '_get_implementation', 'xmind.core.sheet.SheetElement.getImplementation', return_value=_get_implementation_obj) _update_modified_time = self._init_patch_with_name( '_update_modified_time', 'xmind.core.sheet.SheetElement.updateModifiedTime', ) _rel = Mock() _rel.getImplementation.return_value = "test" _obj = SheetElement() self.assertIsNone(_obj.removeRelationship(_rel)) _get_relationships.assert_called_once() _rel.getImplementation.assert_called_once() _rels.removeChild.assert_called_once_with("test") _rels.hasChildNodes.assert_called_once() _get_implementation.assert_not_called() _get_implementation_obj.removeChild.assert_not_called() _update_modified_time.assert_called_once() self._assert_init_methods() def test_get_root_topic(self): _obj = SheetElement() self.assertIsNone(_obj.getRootTopic()) self._assert_init_methods() def test_get_title(self): _get_first_child_node_by_tag_name = self._init_patch_with_name( '_get_first_child_node_by_tag_name', 'xmind.core.sheet.SheetElement.getFirstChildNodeByTagName') _obj = SheetElement() self.assertIsNone(_obj._get_title()) _get_first_child_node_by_tag_name.assert_called_once_with(TAG_TITLE) self._assert_init_methods() def test_getTitle_without_title(self): _get_title = self._init_patch_with_name( '_get_title', 'xmind.core.sheet.SheetElement._get_title') _title_element = self._init_patch_with_name( '_title_element', 'xmind.core.sheet.TitleElement') _obj = SheetElement() self.assertIsNone(_obj.getTitle()) _get_title.assert_called_once() _title_element.assert_not_called() self._assert_init_methods() def test_getTitle_with_title(self): _get_title = self._init_patch_with_name( '_get_title', 'xmind.core.sheet.SheetElement._get_title', return_value="title") _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook') _title_element_obj = Mock() _title_element_obj.getTextContent.return_value = "TextContext" _title_element = self._init_patch_with_name( '_title_element', 'xmind.core.sheet.TitleElement', return_value=_title_element_obj) _obj = SheetElement() self.assertEqual(_obj.getTitle(), "TextContext") _get_title.assert_called_once() _title_element.assert_called_with("title", None) _get_owner_workbook.assert_called_once() _title_element_obj.getTextContent.assert_called_once() self._assert_init_methods() def test_set_title_without_title(self): _get_title = self._init_patch_with_name( '_get_title', 'xmind.core.sheet.SheetElement._get_title') _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook') _title_element_obj = Mock() _title_element_obj.setTextContent.return_value = None _title_element = self._init_patch_with_name( '_title_element', 'xmind.core.sheet.TitleElement', return_value=_title_element_obj) _append_child = self._init_patch_with_name( '_append_child', 'xmind.core.sheet.SheetElement.appendChild') _update_modified_time = self._init_patch_with_name( '_update_modified_time', 'xmind.core.sheet.SheetElement.updateModifiedTime') _obj = SheetElement() self.assertIsNone(_obj.setTitle("TextContent")) _get_owner_workbook.assert_called_once() _get_title.assert_called_once() _title_element.assert_called_with(None, None) _title_element_obj.setTextContent.assert_called_with("TextContent") _append_child.assert_called_with(_title_element_obj) _update_modified_time.assert_called_once() self._assert_init_methods() def test_set_title_with_title(self): _get_title = self._init_patch_with_name( '_get_title', 'xmind.core.sheet.SheetElement._get_title', return_value="title") _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook') _title_element_obj = Mock() _title_element_obj.setTextContent.return_value = None _title_element = self._init_patch_with_name( '_title_element', 'xmind.core.sheet.TitleElement', return_value=_title_element_obj) _append_child = self._init_patch_with_name( '_append_child', 'xmind.core.sheet.SheetElement.appendChild') _update_modified_time = self._init_patch_with_name( '_update_modified_time', 'xmind.core.sheet.SheetElement.updateModifiedTime') _obj = SheetElement() self.assertIsNone(_obj.setTitle("TextContent")) _get_owner_workbook.assert_called_once() _get_title.assert_called_once() _title_element.assert_called_with("title", None) _title_element_obj.setTextContent.assert_called_with("TextContent") _append_child.assert_not_called() _update_modified_time.assert_called_once() self._assert_init_methods() def test_get_parent_without_workbook(self): _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook') _get_parent_node = self._init_patch_with_name( '_get_parent_node', 'xmind.core.sheet.SheetElement.getParentNode') _obj = SheetElement() self.assertIsNone(_obj.getParent()) _get_owner_workbook.assert_called_once() _get_parent_node.assert_not_called() self._assert_init_methods() def test_get_parent_with_workbook_belonging_parent(self): _parent = Mock() _get_parent_node = self._init_patch_with_name( '_get_parent_node', 'xmind.core.sheet.SheetElement.getParentNode', return_value=_parent) _workbook_element = Mock() _workbook_element.getImplementation.return_value = _parent _workbook = Mock() _workbook.getWorkbookElement.return_value = _workbook_element _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook', return_value=_workbook) _obj = SheetElement() self.assertEqual(_obj.getParent(), _workbook) _get_owner_workbook.assert_called_once() _get_parent_node.assert_called_once() _workbook.getWorkbookElement.assert_called_once() _workbook_element.getImplementation.assert_called_once() self._assert_init_methods() def test_get_parent_with_workbook_not_belonging_parent(self): _parent = Mock() _get_parent_node = self._init_patch_with_name( '_get_parent_node', 'xmind.core.sheet.SheetElement.getParentNode', return_value=_parent) _workbook_element = Mock() _workbook_element.getImplementation.return_value = None _workbook = Mock() _workbook.getWorkbookElement.return_value = _workbook_element _get_owner_workbook = self._init_patch_with_name( '_get_owner_workbook', 'xmind.core.sheet.SheetElement.getOwnerWorkbook', return_value=_workbook) _obj = SheetElement() self.assertIsNone(_obj.getParent()) _get_owner_workbook.assert_called_once() _get_parent_node.assert_called_once() _workbook.getWorkbookElement.assert_called_once() _workbook_element.getImplementation.assert_called_once() self._assert_init_methods() def test_update_modified_time_without_workbook(self): _update_modified_time_workbook_mixin_element = self._init_patch_with_name( '_update_modified_time_workbook_mixin_element', 'xmind.core.sheet.WorkbookMixinElement.updateModifiedTime') _get_parent = self._init_patch_with_name( '_get_parent', 'xmind.core.sheet.SheetElement.getParent') _obj = SheetElement() self.assertIsNone(_obj.updateModifiedTime()) _update_modified_time_workbook_mixin_element.assert_called_once() _get_parent.assert_called_once() self._assert_init_methods() def test_update_modified_time_with_workbook(self): _update_modified_time_workbook_mixin_element = self._init_patch_with_name( '_update_modified_time_workbook_mixin_element', 'xmind.core.sheet.WorkbookMixinElement.updateModifiedTime') _workbook = Mock() _workbook.updateModifiedTime.return_value = "ModifiedTime" _get_parent = self._init_patch_with_name( '_get_parent', 'xmind.core.sheet.SheetElement.getParent', return_value=_workbook) _obj = SheetElement() self.assertIsNone(_obj.updateModifiedTime()) _update_modified_time_workbook_mixin_element.assert_called_once() _get_parent.assert_called_once() _workbook.updateModifiedTime.assert_called_once() self._assert_init_methods()
44.36129
123
0.716453
2,301
20,628
5.798349
0.055193
0.068356
0.074352
0.071354
0.886973
0.853245
0.837206
0.821391
0.81592
0.804902
0
0.001328
0.197159
20,628
464
124
44.456897
0.804299
0.0016
0
0.704787
0
0
0.186216
0.136384
0
0
0
0
0.343085
1
0.069149
false
0
0.013298
0
0.087766
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
a057b7130fe6f1e825ef9f32c3efc83ba0351d5e
34,376
py
Python
src/local_bias/utils.py
aikorneev/LM_bias
0f5cc7f3b98061ba4ec7bbf768ab3ad3217c2b05
[ "MIT" ]
30
2021-07-02T01:36:27.000Z
2022-03-24T03:32:38.000Z
src/local_bias/utils.py
aikorneev/LM_bias
0f5cc7f3b98061ba4ec7bbf768ab3ad3217c2b05
[ "MIT" ]
1
2022-01-12T03:22:26.000Z
2022-01-12T03:22:26.000Z
src/local_bias/utils.py
aikorneev/LM_bias
0f5cc7f3b98061ba4ec7bbf768ab3ad3217c2b05
[ "MIT" ]
6
2021-10-07T01:19:50.000Z
2022-03-15T00:22:18.000Z
import torch import numpy as np from torch.nn import functional as F import scipy.stats from sklearn.decomposition import PCA import json def doPCA(pairs, num_components=10): matrix = [] for a, b in pairs: center = (a + b) / 2 norm_a = a - center norm_b = b - center norm_a, norm_b = norm_a.detach().numpy(), norm_b.detach().numpy() # norm_a, norm_b = norm_a/np.linalg.norm(norm_a), norm_b/np.linalg.norm(norm_b) matrix.append(norm_a) matrix.append(norm_b) matrix = np.array(matrix) pca = PCA(n_components=num_components, svd_solver="full") pca.fit(matrix) # Produce different results each time... return pca def dropspace(u, V): # u, V = u.detach().numpy(), V.detach().numpy() norm_sqrd = np.sum(V*V, axis=-1) vecs = np.divide(V@u, norm_sqrd)[:, None] * V subspace = np.sum(vecs, axis=0) return u - subspace def drop_bias(u, v): # return u - torch.ger(torch.matmul(u, v), v) / v.dot(v) projection = u.dot(v) * v / np.linalg.norm(v) return u - projection def drop(u, v): return u - v * u.dot(v) / v.dot(v) def top_k_top_p_filtering( logits, # (1, 50257) top_k: int = 0, top_p: float = 1.0, filter_value: float = -float("Inf"), min_tokens_to_keep: int = 1, ): """ Filter a distribution of logits using top-k and/or nucleus (top-p) filtering Args: logits: logits distribution shape (batch size, vocabulary size) if top_k > 0: keep only top k tokens with highest probability (top-k filtering). if top_p < 1.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering). Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751) Make sure we keep at least min_tokens_to_keep per batch example in the output From: https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317 """ if top_k > 0: top_k = min(max(top_k, min_tokens_to_keep), logits.size(-1)) # Safety check # Remove all tokens with a probability less than the last token of the top-k indices_to_remove = logits < torch.topk(logits, top_k)[0][..., -1, None] logits[indices_to_remove] = filter_value if top_p < 1.0: sorted_logits, sorted_indices = torch.sort(logits, descending=True) cumulative_probs = torch.cumsum(F.softmax(sorted_logits, dim=-1), dim=-1) # Remove tokens with cumulative probability above the threshold (token with 0 are kept) sorted_indices_to_remove = cumulative_probs > top_p if min_tokens_to_keep > 1: # Keep at least min_tokens_to_keep (set to min_tokens_to_keep-1 because we add the first one below) sorted_indices_to_remove[..., :min_tokens_to_keep] = 0 # Shift the indices to the right to keep also the first token above the threshold sorted_indices_to_remove[..., 1:] = sorted_indices_to_remove[..., :-1].clone() sorted_indices_to_remove[..., 0] = 0 # scatter sorted tensors to original indexing indices_to_remove = sorted_indices_to_remove.scatter(1, sorted_indices, sorted_indices_to_remove) logits[indices_to_remove] = filter_value return logits def topk_kl_overlap(prompt_text, k, tokenizer, model, embedding, P, A, device): """ :param prompt_text: a single prompt :param k: top k :param tokenizer: tokenizer :param model: gpt2 or other language model :param embedding: gpt2 word embedding :param P: nullspace matrix :param A: alpha list :param device: cpu or gpu """ input_ids = tokenizer.encode(prompt_text, add_special_tokens=False, return_tensors="pt") # original gpt2 model input_ids = input_ids.to(device) outputs = model.transformer(input_ids=input_ids)[0][0][-1] # (2, batch, len, dim) outputs = outputs.cpu().detach().numpy() logits = embedding.dot(outputs) old_rank = np.argsort(-logits).tolist() old_logits = np.sort(-logits).tolist() topk_raw = old_rank[:k] logits_raw = [-x for x in old_logits[:k]] # averaged hidden state debiased gpt2 model outputs_P = P.dot(outputs.T).T KL1 = [0 for ii in range(len(A))] KL2 = [0 for ii in range(len(A))] for a in range(len(A)): avg_outputs = A[a] * outputs + (1 - A[a]) * outputs_P avg_logits = embedding.dot(avg_outputs) logits_new = [] for i, token in enumerate(topk_raw): logits_new.append(avg_logits[token]) logits_new = np.array(logits_new) KL1[a] = scipy.stats.entropy(logits_raw, logits_new) KL2[a] = scipy.stats.entropy(logits_new, logits_raw) return KL1 + KL2 def topk_kl_overlap_subspace(prompt_text, k, tokenizer, model, embedding, mode, device): if mode[1] == "gender": if mode[0] == "direction": gender_direction = np.load("../../data/bias_subspace/gpt2_gender_direction.npy") debiased_embedding = np.array([drop(embedding[i], gender_direction) for i in range(embedding.shape[0])]) else: gender_direction = np.load("../../data/bias_subspace/gpt2_gender_subspace.npy") debiased_embedding = np.array([dropspace(embedding[i], gender_direction) for i in range(embedding.shape[0])]) else: religion_dir1 = np.load("../../data/bias_subspace/religion_direction1.npy") religion_dir2 = np.load("../../data/bias_subspace/religion_direction2.npy") religion_dir3 = np.load("../../data/bias_subspace/religion_direction3.npy") debiased_embedding = np.array([drop(embedding[i], religion_dir1) for i in range(embedding.shape[0])]) debiased_embedding = np.array([drop(debiased_embedding[i], religion_dir2) for i in range(embedding.shape[0])]) debiased_embedding = np.array([drop(debiased_embedding[i], religion_dir3) for i in range(embedding.shape[0])]) input_ids = tokenizer.encode(prompt_text, add_special_tokens=False, return_tensors="pt") # original gpt2 model input_ids = input_ids.to(device) outputs = model.transformer(input_ids=input_ids)[0][0][-1] # (2, batch, len, dim) outputs = outputs.cpu().detach().numpy() logits = embedding.dot(outputs) old_rank = np.argsort(-logits).tolist() old_logits = np.sort(-logits).tolist() topk_raw = old_rank[:k] logits_raw = [-x for x in old_logits[:k]] # averaged hidden state debiased gpt2 model avg_outputs = outputs avg_logits = debiased_embedding.dot(avg_outputs) logits_new = [] for i, token in enumerate(topk_raw): logits_new.append(avg_logits[token]) logits_new = np.array(logits_new) KL1 = scipy.stats.entropy(logits_raw, logits_new) KL2 = scipy.stats.entropy(logits_new, logits_raw) return (KL1 + KL2) / 2 def local_kl(male_context, female_context, tokenizer, model, embedding, P, A, device): kl1_avg = [0. for ii in range(len(A))] kl2_avg = [0. for ii in range(len(A))] for i in range(male_context.shape[0]): input_ids_m = tokenizer.encode(male_context[i], add_special_tokens=False, return_tensors="pt") input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P = P.dot(outputs.T).T input_ids_f = tokenizer.encode(female_context[i], add_special_tokens=False, return_tensors="pt") input_ids_f = input_ids_f.to(device) outputs_f = model.transformer(input_ids=input_ids_f)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P_f = P.dot(outputs_f.T).T for a in range(len(A)): outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs new_logits = embedding.dot(outputs_P) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1) outputs_P_f = (1 - A[a]) * outputs_P_f + A[a] * outputs_f new_logits_f = embedding.dot(outputs_P_f) new_logits_f = torch.from_numpy(new_logits_f).float() new_logits_f = new_logits_f.unsqueeze(0) # [1, 50257] probs_f = F.softmax(new_logits_f, dim=-1) KL1 = scipy.stats.entropy(probs_m[0].detach().numpy(), probs_f[0].detach().numpy()) KL2 = scipy.stats.entropy(probs_f[0].detach().numpy(), probs_m[0].detach().numpy()) kl1_avg[a] += KL1 kl2_avg[a] += KL2 return kl1_avg, kl2_avg def local_Hellinger(male_context, female_context, tokenizer, model, embedding, P, A, device): kl1_avg = [0. for ii in range(len(A))] kl2_avg = [0. for ii in range(len(A))] for i in range(male_context.shape[0]): input_ids_m = tokenizer.encode(male_context[i], add_special_tokens=False, return_tensors="pt") input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim), embedding for male context outputs_P = P.dot(outputs.T).T # debiased embedding for male context input_ids_f = tokenizer.encode(female_context[i], add_special_tokens=False, return_tensors="pt") input_ids_f = input_ids_f.to(device) outputs_f = model.transformer(input_ids=input_ids_f)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim), embedding for female context outputs_P_f = P.dot(outputs_f.T).T # debiased embedding for female context for a in range(len(A)): outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs new_logits = embedding.dot(outputs_P) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1) outputs_P_f = (1 - A[a]) * outputs_P_f + A[a] * outputs_f new_logits_f = embedding.dot(outputs_P_f) new_logits_f = torch.from_numpy(new_logits_f).float() new_logits_f = new_logits_f.unsqueeze(0) # [1, 50257] probs_f = F.softmax(new_logits_f, dim=-1) hell1 = np.sqrt(1-np.sum(np.sqrt(probs_m[0].detach().numpy()*probs_f[0].detach().numpy()))) hell2 = np.sqrt(1-np.sum(np.sqrt(probs_f[0].detach().numpy()*probs_m[0].detach().numpy()))) # KL1 = scipy.stats.entropy(probs_m[0].detach().numpy(), probs_f[0].detach().numpy()) # KL2 = scipy.stats.entropy(probs_f[0].detach().numpy(), probs_m[0].detach().numpy()) kl1_avg[a] += hell1 kl2_avg[a] += hell2 # print(hell1) return kl1_avg, kl2_avg def local_Hellinger_sensitive(male_context, female_context, tokenizer, model, embedding, P, device): stop_word = np.loadtxt(open("../../data/stopword.list", "r"), dtype='str') stop_word = set(x for x in stop_word) with open("../../data/glove_religion_similarity.json") as ff: similarity = json.load(ff) for w in stop_word: similarity['judaism'][w] = 0 similarity['christianity'][w] = 0 similarity['islam'][w] = 0 for w in ["al", "lacking", "lack", "countries", "country", "government", "nation", "cyber", "translator", "journalist", "situation", "early"]: similarity['judaism'][w] = 0 similarity['christianity'][w] = 0 similarity['islam'][w] = 0 bias_thre = (0.16, 0.15, 0.17) kl1_avg = 0. kl2_avg = 0. for i in range(male_context.shape[0]): input_ids_m = tokenizer.encode(male_context[i], add_special_tokens=False, return_tensors="pt") input_ids_m = input_ids_m.to(device) # sensitive ---- model_inputs = model.prepare_inputs_for_generation(input_ids_m, past=None, attention_mask=input_ids_m.new_ones(input_ids_m.shape), use_cache=True) outputs = model(**model_inputs) next_token_logits = outputs[0][:, -1, :] # batch * vocab logits_filter = top_k_top_p_filtering(next_token_logits, top_p=0.7) # batch * vocab top_p_mask = logits_filter.eq(-float("Inf")) top_k_tokens = [] ii = 0 tmp = (top_p_mask == False)[ii].nonzero().cpu().detach().numpy().tolist() # batch tuple top_k_tokens.append([int(x) for x in torch.sort(-logits_filter[ii])[1][:len(tmp)]]) probs_bias = F.softmax(logits_filter, dim=-1).cpu().detach().numpy() # batch * vocab normalize = 0 jew_token, christian_token, muslim_token = [], [], [] jew_prob, christian_prob, muslim_prob = 0, 0, 0 token_num = 0 for t in top_k_tokens[ii]: glove_token = tokenizer.decoder[int(t)] if glove_token[0] != "Ġ": token_num += 1 normalize += probs_bias[ii][int(t)] continue glove_token = glove_token[1:] if len(glove_token) <= 1: continue if glove_token[0] >= "A" and glove_token[0] <= "Z": token_num += 1 normalize += probs_bias[ii][int(t)] continue # glove_token = glove_token.lower() if glove_token in similarity["judaism"].keys(): # and glove_token not in stop_word: if similarity["judaism"][glove_token] > bias_thre[0]: jew_token.append(tokenizer.decoder[int(t)]) jew_prob += probs_bias[ii][int(t)] if similarity["christianity"][glove_token] > bias_thre[1]: christian_token.append(tokenizer.decoder[int(t)]) christian_prob += probs_bias[ii][int(t)] if similarity["islam"][glove_token] > bias_thre[2]: muslim_token.append(tokenizer.decoder[int(t)]) muslim_prob += probs_bias[ii][int(t)] token_num += 1 normalize += probs_bias[ii][int(t)] if normalize == 0: normalize = 1 if token_num == 0: token_num = 1 jew_prob, christian_prob, muslim_prob = jew_prob / normalize, christian_prob / normalize, muslim_prob / normalize if jew_prob >= 0.1 or muslim_prob >= 0.1 or christian_prob >= 0.1 or len( jew_token) / token_num >= 0.3 or len(muslim_token) / token_num >= 0.3 or len( christian_token) / token_num >= 0.3: # or tokenizer.decode(input_ids[0]) == "The muslim was described as being": # if bias1 >= bias_thre[0] or bias2 >= bias_thre[1] or bias3 >= bias_thre[2]: # ratio[ii] = max(1 - abs(max(bias1, bias2, bias3)), 0.6) A_m = 0.7 else: A_m = 1 # --------- input_ids_f = tokenizer.encode(female_context[i], add_special_tokens=False, return_tensors="pt") input_ids_f = input_ids_f.to(device) # sensitive ---- model_inputs = model.prepare_inputs_for_generation(input_ids_f, past=None, attention_mask=input_ids_f.new_ones(input_ids_f.shape), use_cache=True) outputs = model(**model_inputs) next_token_logits = outputs[0][:, -1, :] # batch * vocab logits_filter = top_k_top_p_filtering(next_token_logits, top_p=0.7) # batch * vocab top_p_mask = logits_filter.eq(-float("Inf")) top_k_tokens = [] ii = 0 tmp = (top_p_mask == False)[ii].nonzero().cpu().detach().numpy().tolist() # batch tuple top_k_tokens.append([int(x) for x in torch.sort(-logits_filter[ii])[1][:len(tmp)]]) probs_bias = F.softmax(logits_filter, dim=-1).cpu().detach().numpy() # batch * vocab normalize = 0 jew_token, christian_token, muslim_token = [], [], [] jew_prob, christian_prob, muslim_prob = 0, 0, 0 token_num = 0 for t in top_k_tokens[ii]: glove_token = tokenizer.decoder[int(t)] if glove_token[0] != "Ġ": token_num += 1 normalize += probs_bias[ii][int(t)] continue glove_token = glove_token[1:] if len(glove_token) <= 1: continue if glove_token[0] >= "A" and glove_token[0] <= "Z": token_num += 1 normalize += probs_bias[ii][int(t)] continue # glove_token = glove_token.lower() if glove_token in similarity["judaism"].keys(): # and glove_token not in stop_word: if similarity["judaism"][glove_token] > bias_thre[0]: jew_token.append(tokenizer.decoder[int(t)]) jew_prob += probs_bias[ii][int(t)] if similarity["christianity"][glove_token] > bias_thre[1]: christian_token.append(tokenizer.decoder[int(t)]) christian_prob += probs_bias[ii][int(t)] if similarity["islam"][glove_token] > bias_thre[2]: muslim_token.append(tokenizer.decoder[int(t)]) muslim_prob += probs_bias[ii][int(t)] token_num += 1 normalize += probs_bias[ii][int(t)] if normalize == 0: normalize = 1 if token_num == 0: token_num = 1 jew_prob, christian_prob, muslim_prob = jew_prob / normalize, christian_prob / normalize, muslim_prob / normalize if jew_prob >= 0.1 or muslim_prob >= 0.1 or christian_prob >= 0.1 or len( jew_token) / token_num >= 0.3 or len(muslim_token) / token_num >= 0.3 or len( christian_token) / token_num >= 0.3: # or tokenizer.decode(input_ids[0]) == "The muslim was described as being": # if bias1 >= bias_thre[0] or bias2 >= bias_thre[1] or bias3 >= bias_thre[2]: # ratio[ii] = max(1 - abs(max(bias1, bias2, bias3)), 0.6) A_f = 0.7 else: A_f = 1 print(A_f, A_m) # --------- outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P = P.dot(outputs.T).T outputs_f = model.transformer(input_ids=input_ids_f)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P_f = P.dot(outputs_f.T).T outputs_P = (1 - A_m) * outputs_P + A_m * outputs new_logits = embedding.dot(outputs_P) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1) outputs_P_f = (1 - A_f) * outputs_P_f + A_f * outputs_f new_logits_f = embedding.dot(outputs_P_f) new_logits_f = torch.from_numpy(new_logits_f).float() new_logits_f = new_logits_f.unsqueeze(0) # [1, 50257] probs_f = F.softmax(new_logits_f, dim=-1) hell1 = np.sqrt(1-np.sum(np.sqrt(probs_m[0].detach().numpy()*probs_f[0].detach().numpy()))) hell2 = np.sqrt(1-np.sum(np.sqrt(probs_f[0].detach().numpy()*probs_m[0].detach().numpy()))) # KL1 = scipy.stats.entropy(probs_m[0].detach().numpy(), probs_f[0].detach().numpy()) # KL2 = scipy.stats.entropy(probs_f[0].detach().numpy(), probs_m[0].detach().numpy()) kl1_avg += hell1 kl2_avg += hell2 return kl1_avg, kl2_avg def local_Hellinger_subspace(male_context, female_context, tokenizer, model, embedding, mode, device): if mode[1] == "gender": if mode[0] == "direction": gender_direction = np.load("../../data/bias_subspace/gpt2_gender_direction.npy") debiased_embedding = np.array([drop(embedding[i], gender_direction) for i in range(embedding.shape[0])]) else: gender_direction = np.load("../../data/bias_subspace/gpt2_gender_subspace.npy") debiased_embedding = np.array([dropspace(embedding[i], gender_direction) for i in range(embedding.shape[0])]) # self.embedding.to(self.args.device) elif mode[1] == "religion": religion_dir1 = np.load("../../data/bias_subspace/religion_direction1.npy") religion_dir2 = np.load("../../data/bias_subspace/religion_direction2.npy") religion_dir3 = np.load("../../data/bias_subspace/religion_direction3.npy") debiased_embedding = np.array([drop(embedding[i], religion_dir1) for i in range(embedding.shape[0])]) debiased_embedding = np.array([drop(debiased_embedding[i], religion_dir2) for i in range(embedding.shape[0])]) debiased_embedding = np.array([drop(debiased_embedding[i], religion_dir3) for i in range(embedding.shape[0])]) kl1_avg = 0. kl2_avg = 0. for i in range(male_context.shape[0]): input_ids_m = tokenizer.encode(male_context[i], add_special_tokens=False, return_tensors="pt") input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) # outputs_P = P.dot(outputs.T).T new_logits = debiased_embedding.dot(outputs) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1) input_ids_f = tokenizer.encode(female_context[i], add_special_tokens=False, return_tensors="pt") input_ids_f = input_ids_f.to(device) outputs_f = model.transformer(input_ids=input_ids_f)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) # outputs_P_f = P.dot(outputs_f.T).T new_logits_f = debiased_embedding.dot(outputs_f) new_logits_f = torch.from_numpy(new_logits_f).float() new_logits_f = new_logits_f.unsqueeze(0) # [1, 50257] probs_f = F.softmax(new_logits_f, dim=-1) hell1 = np.sqrt(1-np.sum(np.sqrt(probs_m[0].detach().numpy()*probs_f[0].detach().numpy()))) hell2 = np.sqrt(1-np.sum(np.sqrt(probs_f[0].detach().numpy()*probs_m[0].detach().numpy()))) # KL1 = scipy.stats.entropy(probs_m[0].detach().numpy(), probs_f[0].detach().numpy()) # KL2 = scipy.stats.entropy(probs_f[0].detach().numpy(), probs_m[0].detach().numpy()) kl1_avg += hell1 kl2_avg += hell2 return kl1_avg, kl2_avg def weat_true_label(weat_dataset, weat_pos, model, embedding, A, P, p, device, topk=False): if topk: weat_topk = 0. count = 0 for i in range(len(weat_dataset)): input_ids_m = weat_dataset[i][1] input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) logits = embedding.dot(outputs) logits_filter = torch.from_numpy(logits).float().clone() logits_filter = logits_filter.unsqueeze(0) logits_filter = top_k_top_p_filtering(logits_filter, top_p=p) top_p_mask = logits_filter.eq(-float("Inf")) outputs_P = P.dot(outputs.T).T new_logits = embedding.dot(outputs_P) logits_filter = torch.from_numpy(new_logits).float().clone() logits_filter = logits_filter.unsqueeze(0) logits_filter.masked_fill_(top_p_mask, -float("Inf")) probs_m = F.softmax(logits_filter, dim=-1).detach().numpy() weat_topk += probs_m[0][weat_pos[i]] count += 1 return weat_topk / count weat_avg = [0. for ii in range(len(A))] count = 0 for i in range(len(weat_dataset)): input_ids_m = weat_dataset[i][1] input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P = P.dot(outputs.T).T for a in range(len(A)): outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs new_logits = embedding.dot(outputs_P) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1).detach().numpy() weat_avg[a] += probs_m[0][weat_pos[i]] count += 1 return [x / count for x in weat_avg] def weat_true_label_sensitive(weat_dataset, weat_pos, model, embedding, mode, p, device, topk=False): if topk: weat_topk = 0. count = 0 for i in range(len(weat_dataset)): input_ids_m = weat_dataset[i][1] input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) logits = embedding.dot(outputs) logits_filter = torch.from_numpy(logits).float().clone() logits_filter = logits_filter.unsqueeze(0) logits_filter = top_k_top_p_filtering(logits_filter, top_p=p) top_p_mask = logits_filter.eq(-float("Inf")) outputs_P = P.dot(outputs.T).T new_logits = embedding.dot(outputs_P) logits_filter = torch.from_numpy(new_logits).float().clone() logits_filter = logits_filter.unsqueeze(0) logits_filter.masked_fill_(top_p_mask, -float("Inf")) probs_m = F.softmax(logits_filter, dim=-1).detach().numpy() weat_topk += probs_m[0][weat_pos[i]] count += 1 return weat_topk / count weat_avg = [0. for ii in range(len(A))] count = 0 for i in range(len(weat_dataset)): input_ids_m = weat_dataset[i][1] input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P = P.dot(outputs.T).T for a in range(len(A)): outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs new_logits = embedding.dot(outputs_P) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1).detach().numpy() weat_avg[a] += probs_m[0][weat_pos[i]] count += 1 return [x / count for x in weat_avg] def weat_true_label_subspace(weat_dataset, weat_pos, model, embedding, mode, p, device, topk=False): if mode[1] == "gender": if mode[0] == "direction": gender_direction = np.load("../../data/bias_subspace/gpt2_gender_direction.npy") debiased_embedding = np.array([drop(embedding[i], gender_direction) for i in range(embedding.shape[0])]) else: gender_direction = np.load("../../data/bias_subspace/gpt2_gender_subspace.npy") debiased_embedding = np.array([dropspace(embedding[i], gender_direction) for i in range(embedding.shape[0])]) # self.embedding.to(self.args.device) elif mode[1] == "religion": religion_dir1 = np.load("../../data/bias_subspace/religion_direction1.npy") religion_dir2 = np.load("../../data/bias_subspace/religion_direction2.npy") religion_dir3 = np.load("../../data/bias_subspace/religion_direction3.npy") debiased_embedding = np.array([drop(embedding[i], religion_dir1) for i in range(embedding.shape[0])]) debiased_embedding = np.array([drop(debiased_embedding[i], religion_dir2) for i in range(embedding.shape[0])]) debiased_embedding = np.array([drop(debiased_embedding[i], religion_dir3) for i in range(embedding.shape[0])]) weat_avg = 0. count = 0 for i in range(len(weat_dataset)): input_ids_m = weat_dataset[i][1] input_ids_m = input_ids_m.to(device) outputs = model.transformer(input_ids=input_ids_m)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) # outputs_P = P.dot(outputs.T).T # for a in range(len(A)): # outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs new_logits = debiased_embedding.dot(outputs) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs_m = F.softmax(new_logits, dim=-1).detach().numpy() # weat_avg[a] += probs_m[0][weat_pos[i]] weat_avg += probs_m[0][weat_pos[i]] count += 1 return weat_avg / count def local_kl_reverse(occ_context, tokenizer, model, embedding, pairs_id, A, P, device): kl = [0. for ii in range(len(A))] for i in range(occ_context.shape[0]): input_ids = tokenizer.encode(occ_context[i], add_special_tokens=False, return_tensors="pt") input_ids = input_ids.to(device) outputs = model.transformer(input_ids=input_ids)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) outputs_P = P.dot(outputs.T).T for a in range(len(A)): outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs new_logits = embedding.dot(outputs_P) new_logits = torch.from_numpy(new_logits).float() new_logits = new_logits.unsqueeze(0) # [1, 50257] probs = F.softmax(new_logits, dim=-1) probs = probs.cpu().detach().numpy() occ_prob1 = 0. occ_prob2 = 0. for p1, p2 in pairs_id: occ_prob1 += probs[0][p1] occ_prob2 += probs[0][p2] tmp_kl1 = 0. tmp_kl2 = 0. for p1, p2 in pairs_id: tmp_kl1 += probs[0][p1]/occ_prob1 * np.log(probs[0][p1] / occ_prob1 / probs[0][p2] * occ_prob2) tmp_kl2 += probs[0][p2]/occ_prob2 * np.log(probs[0][p2] / occ_prob2 / probs[0][p1] * occ_prob1) kl[a] += (tmp_kl1 + tmp_kl2) / 2 return kl def local_kl_reverse_geometry(occ_context, tokenizer, model, embedding, pairs_id, num_components=2, device="cpu"): def doPCA(pairs, num_components=10): matrix = [] for a, b in pairs: center = (a + b)/2 norm_a = a - center norm_b = b - center norm_a, norm_b = norm_a.detach().numpy(), norm_b.detach().numpy() # norm_a, norm_b = norm_a/np.linalg.norm(norm_a), norm_b/np.linalg.norm(norm_b) matrix.append(norm_a) matrix.append(norm_b) matrix = np.array(matrix) pca = PCA(n_components=num_components, svd_solver="full") pca.fit(matrix) # Produce different results each time... return pca def dropspace(u, V): # u, V = u.detach().numpy(), V.detach().numpy() norm_sqrd = np.sum(V*V, axis=-1) vecs = np.divide(V@u, norm_sqrd)[:, None] * V subspace = np.sum(vecs, axis=0) return u - subspace pairs = [] for female, male in pairs_id: female_feat, male_feat = embedding[female], embedding[male] female_feat, male_feat = female_feat/np.linalg.norm(female_feat), male_feat/np.linalg.norm(male_feat) if type(male_feat) is np.ndarray: female_feat, male_feat = torch.from_numpy(female_feat), torch.from_numpy(male_feat) pairs.append((female_feat, male_feat)) pca_res = doPCA(pairs, num_components=num_components) print("pca_res.explained_variance_ratio_: ", pca_res.explained_variance_ratio_) print("pca shape", pca_res.components_.shape) gender_dir1 = torch.from_numpy(pca_res.components_[0]) gender_dir2 = torch.from_numpy(pca_res.components_[1]) # gender_dir = torch.from_numpy(pca_res.components_[:num_components]) gender_dir = pca_res.components_[:num_components] # kl = [0. for ii in range(len(A))] kl = 0. for i in range(occ_context.shape[0]): input_ids = tokenizer.encode(occ_context[i], add_special_tokens=False, return_tensors="pt") input_ids = input_ids.to(device) outputs = model.transformer(input_ids=input_ids)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) logits = embedding.dot(outputs) logits = torch.from_numpy(logits).float() logits = logits.unsqueeze(0) probs = F.softmax(logits, dim=-1) probs = probs.cpu().detach().numpy() occ_prob1 = 0. occ_prob2 = 0. for p1, p2 in pairs_id: occ_prob1 += probs[0][p1] occ_prob2 += probs[0][p2] tmp_kl1 = 0. tmp_kl2 = 0. for p1, p2 in pairs_id: tmp_kl1 += probs[0][p1] / occ_prob1 * np.log(probs[0][p1] / occ_prob1 / probs[0][p2] * occ_prob2) tmp_kl2 += probs[0][p2] / occ_prob2 * np.log(probs[0][p2] / occ_prob2 / probs[0][p1] * occ_prob1) kl += (tmp_kl1 + tmp_kl2) / 2 tmp = model.lm_head.weight.data model.lm_head.weight.data = torch.from_numpy( np.array([dropspace(embedding[i], gender_dir) for i in range(embedding.shape[0])])) kl_debias = 0. for i in range(occ_context.shape[0]): input_ids = tokenizer.encode(occ_context[i], add_special_tokens=False, return_tensors="pt") input_ids = input_ids.to(device) outputs = model.transformer(input_ids=input_ids)[0][0][-1].cpu().detach().numpy() # (2, batch, len, dim) logits = embedding.dot(outputs) logits = torch.from_numpy(logits).float() logits = logits.unsqueeze(0) probs = F.softmax(logits, dim=-1) probs = probs.cpu().detach().numpy() occ_prob1 = 0. occ_prob2 = 0. for p1, p2 in pairs_id: occ_prob1 += probs[0][p1] occ_prob2 += probs[0][p2] tmp_kl1 = 0. tmp_kl2 = 0. for p1, p2 in pairs_id: tmp_kl1 += probs[0][p1] / occ_prob1 * np.log(probs[0][p1] / occ_prob1 / probs[0][p2] * occ_prob2) tmp_kl2 += probs[0][p2] / occ_prob2 * np.log(probs[0][p2] / occ_prob2 / probs[0][p1] * occ_prob1) kl_debias += (tmp_kl1 + tmp_kl2) / 2 # outputs_P = P.dot(outputs.T).T # for a in range(len(A)): # outputs_P = (1 - A[a]) * outputs_P + A[a] * outputs # new_logits = embedding.dot(outputs_P) # new_logits = torch.from_numpy(new_logits).float() # new_logits = new_logits.unsqueeze(0) # [1, 50257] # probs = F.softmax(new_logits, dim=-1) # probs = probs.cpu().detach().numpy() model.lm_head.weight.data = tmp return kl, kl_debias
47.21978
147
0.611269
4,941
34,376
4.017203
0.065979
0.039498
0.017684
0.015517
0.861857
0.843468
0.82513
0.813845
0.800292
0.799133
0
0.028029
0.249622
34,376
727
148
47.284732
0.741462
0.126076
0
0.805054
0
0
0.038962
0.027787
0
0
0
0
0
1
0.032491
false
0
0.01083
0.001805
0.079422
0.005415
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
a097eb822b9b2cae9c371b6493e40eb3c8ef39a9
37
py
Python
trunk/VyPy/sampling/__init__.py
paulcon/VyPy
5acb40e8d19ea76f3cd45f9cf98f252ca15e23f6
[ "BSD-3-Clause" ]
1
2021-12-28T06:39:54.000Z
2021-12-28T06:39:54.000Z
trunk/VyPy/sampling/__init__.py
paulcon/VyPy
5acb40e8d19ea76f3cd45f9cf98f252ca15e23f6
[ "BSD-3-Clause" ]
null
null
null
trunk/VyPy/sampling/__init__.py
paulcon/VyPy
5acb40e8d19ea76f3cd45f9cf98f252ca15e23f6
[ "BSD-3-Clause" ]
null
null
null
from lhc_uniform import lhc_uniform
18.5
35
0.864865
6
37
5
0.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0.135135
37
2
35
18.5
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
a0999046c16340a02fd1095498d949c5858e8d4a
17,849
py
Python
model/GeneratorsCIPS.py
twice154/CIPS
51d5e80a2666e2bd727120922e4f79d56380ba69
[ "MIT" ]
null
null
null
model/GeneratorsCIPS.py
twice154/CIPS
51d5e80a2666e2bd727120922e4f79d56380ba69
[ "MIT" ]
null
null
null
model/GeneratorsCIPS.py
twice154/CIPS
51d5e80a2666e2bd727120922e4f79d56380ba69
[ "MIT" ]
null
null
null
__all__ = ['CIPSskip', 'CIPSres', 'CIPSskipemb', 'CIPSskippatch' ] import math import torch from torch import nn import torch.nn.functional as F from .blocks import ConstantInput, LFF, StyledConv, ToRGB, PixelNorm, EqualLinear, StyledResBlock class CIPSskip(nn.Module): def __init__(self, size=256, hidden_size=512, n_mlp=8, style_dim=512, lr_mlp=0.01, activation=None, channel_multiplier=2, **kwargs): super(CIPSskip, self).__init__() self.size = size demodulate = True self.demodulate = demodulate self.lff = LFF(hidden_size) self.emb = ConstantInput(hidden_size, size=size) self.channels = { 0: 512, 1: 512, 2: 512, 3: 512, 4: 256 * channel_multiplier, 5: 128 * channel_multiplier, 6: 64 * channel_multiplier, 7: 32 * channel_multiplier, 8: 16 * channel_multiplier, } multiplier = 2 in_channels = int(self.channels[0]) self.conv1 = StyledConv(int(multiplier*hidden_size), in_channels, 1, style_dim, demodulate=demodulate, activation=activation) self.linears = nn.ModuleList() self.to_rgbs = nn.ModuleList() self.log_size = int(math.log(size, 2)) self.n_intermediate = self.log_size - 1 self.to_rgb_stride = 2 for i in range(0, self.log_size - 1): out_channels = self.channels[i] self.linears.append(StyledConv(in_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.linears.append(StyledConv(out_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.to_rgbs.append(ToRGB(out_channels, style_dim, upsample=False)) in_channels = out_channels self.style_dim = style_dim layers = [PixelNorm()] for i in range(n_mlp): layers.append( EqualLinear( style_dim, style_dim, lr_mul=lr_mlp, activation='fused_lrelu' ) ) self.style = nn.Sequential(*layers) def forward(self, coords, latent, return_latents=False, truncation=1, truncation_latent=None, input_is_latent=False, ): latent = latent[0] if truncation < 1: latent = truncation_latent + truncation * (latent - truncation_latent) if not input_is_latent: latent = self.style(latent) x = self.lff(coords) batch_size, _, w, h = coords.shape if self.training and w == h == self.size: emb = self.emb(x) else: emb = F.grid_sample( self.emb.input.expand(batch_size, -1, -1, -1), coords.permute(0, 2, 3, 1).contiguous(), padding_mode='border', mode='bilinear', ) x = torch.cat([x, emb], 1) rgb = 0 x = self.conv1(x, latent) for i in range(self.n_intermediate): for j in range(self.to_rgb_stride): x = self.linears[i*self.to_rgb_stride + j](x, latent) rgb = self.to_rgbs[i](x, latent, rgb) if return_latents: return rgb, latent else: return rgb, None class CIPSres(nn.Module): def __init__(self, size=256, hidden_size=512, n_mlp=8, style_dim=512, lr_mlp=0.01, activation=None, channel_multiplier=2, **kwargs): super(CIPSres, self).__init__() self.size = size demodulate = True self.demodulate = demodulate self.lff = LFF(int(hidden_size)) self.emb = ConstantInput(hidden_size, size=size) self.channels = { 0: 512, 1: 512, 2: 512, 3: 512, 4: 256 * channel_multiplier, 5: 128 * channel_multiplier, 6: 64 * channel_multiplier, 7: 64 * channel_multiplier, 8: 32 * channel_multiplier, } self.linears = nn.ModuleList() in_channels = int(self.channels[0]) multiplier = 2 self.linears.append(StyledConv(int(multiplier*hidden_size), in_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.log_size = int(math.log(size, 2)) self.num_layers = (self.log_size - 2) * 2 + 1 for i in range(0, self.log_size - 1): out_channels = self.channels[i] self.linears.append(StyledResBlock(in_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) in_channels = out_channels self.to_rgb_last = ToRGB(in_channels, style_dim, upsample=False) self.style_dim = style_dim layers = [PixelNorm()] for i in range(n_mlp): layers.append( EqualLinear( style_dim, style_dim, lr_mul=lr_mlp, activation='fused_lrelu' ) ) self.style = nn.Sequential(*layers) def forward(self, coords, latent, return_latents=False, truncation=1, truncation_latent=None, input_is_latent=False, ): latent = latent[0] if truncation < 1: latent = truncation_latent + truncation * (latent - truncation_latent) if not input_is_latent: latent = self.style(latent) x = self.lff(coords) batch_size, _, w, h = coords.shape if self.training and w == h == self.size: emb = self.emb(x) else: emb = F.grid_sample( self.emb.input.expand(batch_size, -1, -1, -1), coords.permute(0, 2, 3, 1).contiguous(), padding_mode='border', mode='bilinear', ) out = torch.cat([x, emb], 1) for con in self.linears: out = con(out, latent) out = self.to_rgb_last(out, latent) if return_latents: return out, latent else: return out, None class CIPSskipemb(nn.Module): def __init__(self, size=256, hidden_size=512, n_mlp=8, style_dim=512, lr_mlp=0.01, activation=None, channel_multiplier=2, **kwargs): super(CIPSskipemb, self).__init__() self.size = size self.hidden_size = hidden_size demodulate = True self.demodulate = demodulate self.lff = LFF(hidden_size) self.emb1 = ConstantInput(hidden_size, size=int(size/4)) self.emb2 = ConstantInput(hidden_size, size=int(size/2)) self.emb3 = ConstantInput(hidden_size, size=size) self.phase = 1 self.channels = { 0: 512, 1: 512, 2: 512, 3: 512, 4: 256 * channel_multiplier, 5: 128 * channel_multiplier, 6: 64 * channel_multiplier, 7: 32 * channel_multiplier, 8: 16 * channel_multiplier, } multiplier = 2 in_channels = int(self.channels[0]) self.conv1 = StyledConv(int(multiplier*hidden_size), in_channels, 1, style_dim, demodulate=demodulate, activation=activation) self.linears = nn.ModuleList() self.to_rgbs = nn.ModuleList() self.log_size = int(math.log(size, 2)) self.n_intermediate = self.log_size - 1 self.to_rgb_stride = 2 for i in range(0, self.log_size - 1): out_channels = self.channels[i] self.linears.append(StyledConv(in_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.linears.append(StyledConv(out_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.to_rgbs.append(ToRGB(out_channels, style_dim, upsample=False)) in_channels = out_channels self.style_dim = style_dim layers = [PixelNorm()] for i in range(n_mlp): layers.append( EqualLinear( style_dim, style_dim, lr_mul=lr_mlp, activation='fused_lrelu' ) ) self.style = nn.Sequential(*layers) # def re_init_emb(self, div): # self.emb = ConstantInput(self.hidden_size, size=int(self.size/div)) def re_init_phase(self, phase, initialize='random'): self.phase = phase if initialize == 'random': pass elif initialize == 'nearest': if phase == 1: pass elif phase == 2: m = nn.Upsample(scale_factor=2, mode='nearest') self.emb2.input = torch.nn.Parameter(m(self.emb1.input)) elif phase == 3: m = nn.Upsample(scale_factor=2, mode='nearest') self.emb3.input = torch.nn.Parameter(m(self.emb2.input)) elif initialize == 'bilinear': if phase == 1: pass elif phase == 2: m = nn.Upsample(scale_factor=2, mode='bilinear') self.emb2.input = torch.nn.Parameter(m(self.emb1.input)) elif phase == 3: m = nn.Upsample(scale_factor=2, mode='bilinear') self.emb3.input = torch.nn.Parameter(m(self.emb2.input)) def forward(self, coords, latent, crop_grid_h=None, crop_grid_w=None, return_latents=False, truncation=1, truncation_latent=None, input_is_latent=False, ): latent = latent[0] if truncation < 1: latent = truncation_latent + truncation * (latent - truncation_latent) if not input_is_latent: latent = self.style(latent) x = self.lff(coords) batch_size, _, w, h = coords.shape if self.training and w == h == self.size: if self.phase == 1: emb = self.emb1(x) elif self.phase == 2: emb = self.emb2(x) elif self.phase == 3: emb = self.emb3(x) # emb = self.emb(x) if crop_grid_h != None and crop_grid_w != None: # build grid for crop k = float(emb.shape[2])/float(coords.shape[2]) direct = torch.linspace(0,k,emb.shape[2]).unsqueeze(0).repeat(emb.shape[2],1).unsqueeze(-1) grid = torch.cat([direct,direct.transpose(1,0)],dim=2).unsqueeze(0) delta = emb.size(2) - grid.size(1) grid = grid.repeat(emb.size(0),1,1,1) #Add random shifts by x grid[:,:,:,0] = grid[:,:,:,0]+ crop_grid_h.unsqueeze(-1).unsqueeze(-1).expand(-1, grid.size(1), grid.size(2)) /emb.size(2) #Add random shifts by y grid[:,:,:,1] = grid[:,:,:,1]+ crop_grid_w.unsqueeze(-1).unsqueeze(-1).expand(-1, grid.size(1), grid.size(2)) /emb.size(2) # crop by grid F.grid_sample(emb, grid, padding_mode='border', mode='bilinear',) else: # if crop_grid_h != None and crop_grid_w != None: # # build grid for crop # k = float(emb.shape[2])/float(coords.shape[2]) # direct = torch.linspace(0,k,emb.shape[2]).unsqueeze(0).repeat(emb.shape[2],1).unsqueeze(-1) # grid = torch.cat([direct,direct.transpose(1,0)],dim=2).unsqueeze(0) # delta = emb.size(2) - grid.size(1) # grid = grid.repeat(emb.size(0),1,1,1) # #Add random shifts by x # grid[:,:,:,0] = grid[:,:,:,0]+ crop_grid_h.unsqueeze(-1).unsqueeze(-1).expand(-1, grid.size(1), grid.size(2)) /emb.size(2) # #Add random shifts by y # grid[:,:,:,1] = grid[:,:,:,1]+ crop_grid_w.unsqueeze(-1).unsqueeze(-1).expand(-1, grid.size(1), grid.size(2)) /emb.size(2) # # crop by grid # F.grid_sample( # self.emb.input.expand(batch_size, -1, -1, -1), # grid, # padding_mode='border', # mode='bilinear', # ) # else: if self.phase == 1: emb = F.grid_sample( self.emb1.input.expand(batch_size, -1, -1, -1), coords.permute(0, 2, 3, 1).contiguous(), padding_mode='border', mode='bilinear', ) elif self.phase == 2: emb = F.grid_sample( self.emb2.input.expand(batch_size, -1, -1, -1), coords.permute(0, 2, 3, 1).contiguous(), padding_mode='border', mode='bilinear', ) elif self.phase == 3: emb = F.grid_sample( self.emb3.input.expand(batch_size, -1, -1, -1), coords.permute(0, 2, 3, 1).contiguous(), padding_mode='border', mode='bilinear', ) # emb = F.grid_sample( # self.emb.input.expand(batch_size, -1, -1, -1), # coords.permute(0, 2, 3, 1).contiguous(), # padding_mode='border', mode='bilinear', # ) x = torch.cat([x, emb], 1) rgb = 0 x = self.conv1(x, latent) for i in range(self.n_intermediate): for j in range(self.to_rgb_stride): x = self.linears[i*self.to_rgb_stride + j](x, latent) rgb = self.to_rgbs[i](x, latent, rgb) if return_latents: return rgb, latent else: return rgb, None class CIPSskippatch(nn.Module): def __init__(self, size=256, hidden_size=512, n_mlp=8, style_dim=512, lr_mlp=0.01, activation=None, channel_multiplier=2, **kwargs): super(CIPSskippatch, self).__init__() self.size = size demodulate = True self.demodulate = demodulate self.lff = LFF(hidden_size) # self.emb = ConstantInput(hidden_size, size=size) self.channels = { 0: 512, 1: 512, 2: 512, 3: 512, 4: 256 * channel_multiplier, 5: 128 * channel_multiplier, 6: 64 * channel_multiplier, 7: 32 * channel_multiplier, 8: 16 * channel_multiplier, # 0: 32, # 1: 32, # 2: 32, # 3: 32, # 4: 16 * channel_multiplier, # 5: 8 * channel_multiplier, # 6: 3 * channel_multiplier, # 7: 2 * channel_multiplier, # 8: 1 * channel_multiplier, } multiplier = 1 in_channels = int(self.channels[0]) self.conv1 = StyledConv(int(multiplier*hidden_size), in_channels, 1, style_dim, demodulate=demodulate, activation=activation) self.linears = nn.ModuleList() self.to_rgbs = nn.ModuleList() self.log_size = int(math.log(size, 2)) self.n_intermediate = self.log_size - 1 self.to_rgb_stride = 2 for i in range(0, self.log_size - 1): out_channels = self.channels[i] self.linears.append(StyledConv(in_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.linears.append(StyledConv(out_channels, out_channels, 1, style_dim, demodulate=demodulate, activation=activation)) self.to_rgbs.append(ToRGB(out_channels, style_dim, upsample=False)) in_channels = out_channels self.style_dim = style_dim layers = [PixelNorm()] for i in range(n_mlp): layers.append( EqualLinear( style_dim, style_dim, lr_mul=lr_mlp, activation='fused_lrelu' ) ) self.style = nn.Sequential(*layers) def forward(self, coords, latent, return_latents=False, truncation=1, truncation_latent=None, input_is_latent=False, ): latent = latent[0] if truncation < 1: latent = truncation_latent + truncation * (latent - truncation_latent) if not input_is_latent: latent = self.style(latent) x = self.lff(coords) # batch_size, _, w, h = coords.shape # if self.training: # emb = self.emb(x) # else: # emb = F.grid_sample( # self.emb.input.expand(batch_size, -1, -1, -1), # coords.permute(0, 2, 3, 1).contiguous(), # padding_mode='border', mode='bilinear', # ) # x = torch.cat([x, emb], 1) rgb = 0 x = self.conv1(x, latent) for i in range(self.n_intermediate): for j in range(self.to_rgb_stride): x = self.linears[i*self.to_rgb_stride + j](x, latent) rgb = self.to_rgbs[i](x, latent, rgb) if return_latents: return rgb, latent else: return rgb, None
34.391137
140
0.518012
2,040
17,849
4.370098
0.070098
0.031408
0.014807
0.020976
0.892092
0.866517
0.852047
0.852047
0.843522
0.837241
0
0.03841
0.369881
17,849
519
141
34.391137
0.754246
0.09614
0
0.792916
0
0
0.013932
0
0
0
0
0
0
1
0.024523
false
0.008174
0.013624
0
0.070845
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
26135a7edea801a2351def633a0e38cf13d61ae9
15,697
py
Python
pyteal/ast/binaryexpr_test.py
krotkiewicz/pyteal
eb2e689c48292571ee10bc334558a4b339e50667
[ "MIT" ]
1
2021-11-05T02:20:32.000Z
2021-11-05T02:20:32.000Z
pyteal/ast/binaryexpr_test.py
fabrice102/pyteal
9191e3c6074eaa7aaefac7dab0ab024d1110f8a6
[ "MIT" ]
null
null
null
pyteal/ast/binaryexpr_test.py
fabrice102/pyteal
9191e3c6074eaa7aaefac7dab0ab024d1110f8a6
[ "MIT" ]
null
null
null
import pytest from .. import * def test_add(): expr = Add(Int(2), Int(3)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.add) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_add_overload(): expr = Int(2) + Int(3) + Int(4) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.add), TealOp(Op.int, 4), TealOp(Op.add) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_add_invalid(): with pytest.raises(TealTypeError): Add(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): Add(Txn.sender(), Int(2)) def test_minus(): expr = Minus(Int(5), Int(6)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 5), TealOp(Op.int, 6), TealOp(Op.minus) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_minus_overload(): expr = Int(10) - Int(1) - Int(2) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 10), TealOp(Op.int, 1), TealOp(Op.minus), TealOp(Op.int, 2), TealOp(Op.minus) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_minus_invalid(): with pytest.raises(TealTypeError): Minus(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): Minus(Txn.sender(), Int(2)) def test_mul(): expr = Mul(Int(3), Int(8)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 3), TealOp(Op.int, 8), TealOp(Op.mul) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_mul_overload(): expr = Int(3) * Int(8) * Int(10) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 3), TealOp(Op.int, 8), TealOp(Op.mul), TealOp(Op.int, 10), TealOp(Op.mul) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_mul_invalid(): with pytest.raises(TealTypeError): Mul(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): Mul(Txn.sender(), Int(2)) def test_div(): expr = Div(Int(9), Int(3)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 9), TealOp(Op.int, 3), TealOp(Op.div) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_div_overload(): expr = Int(9) / Int(3) / Int(3) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 9), TealOp(Op.int, 3), TealOp(Op.div), TealOp(Op.int, 3), TealOp(Op.div), ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_div_invalid(): with pytest.raises(TealTypeError): Div(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): Div(Txn.sender(), Int(2)) def test_mod(): expr = Mod(Int(10), Int(9)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 10), TealOp(Op.int, 9), TealOp(Op.mod) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_mod_overload(): expr = Int(10) % Int(9) % Int(100) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 10), TealOp(Op.int, 9), TealOp(Op.mod), TealOp(Op.int, 100), TealOp(Op.mod) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_mod_invalid(): with pytest.raises(TealTypeError): Mod(Txn.receiver(), Int(2)) with pytest.raises(TealTypeError): Mod(Int(2), Txn.sender()) def test_arithmetic(): v = ((Int(2) + Int(3))/((Int(5) - Int(6)) * Int(8))) % Int(9) assert v.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.add), TealOp(Op.int, 5), TealOp(Op.int, 6), TealOp(Op.minus), TealOp(Op.int, 8), TealOp(Op.mul), TealOp(Op.div), TealOp(Op.int, 9), TealOp(Op.mod) ]) actual, _ = v.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_and(): expr = BitwiseAnd(Int(1), Int(2)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 2), TealOp(Op.bitwise_and) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_and_overload(): expr = Int(1) & Int(2) & Int(4) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 2), TealOp(Op.bitwise_and), TealOp(Op.int, 4), TealOp(Op.bitwise_and) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_and_invalid(): with pytest.raises(TealTypeError): BitwiseAnd(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): BitwiseAnd(Txn.sender(), Int(2)) def test_bitwise_or(): expr = BitwiseOr(Int(1), Int(2)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 2), TealOp(Op.bitwise_or) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_or_overload(): expr = Int(1) | Int(2) | Int(4) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 2), TealOp(Op.bitwise_or), TealOp(Op.int, 4), TealOp(Op.bitwise_or) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_or_invalid(): with pytest.raises(TealTypeError): BitwiseOr(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): BitwiseOr(Txn.sender(), Int(2)) def test_bitwise_xor(): expr = BitwiseXor(Int(1), Int(3)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 3), TealOp(Op.bitwise_xor) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_xor_overload(): expr = Int(1) ^ Int(3) ^ Int(5) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 3), TealOp(Op.bitwise_xor), TealOp(Op.int, 5), TealOp(Op.bitwise_xor) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_bitwise_xor_invalid(): with pytest.raises(TealTypeError): BitwiseXor(Int(2), Txn.receiver()) with pytest.raises(TealTypeError): BitwiseXor(Txn.sender(), Int(2)) def test_eq(): expr_int = Eq(Int(2), Int(3)) assert expr_int.type_of() == TealType.uint64 expected_int = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.eq) ]) actual_int, _ = expr_int.__teal__() actual_int.addIncoming() actual_int = TealBlock.NormalizeBlocks(actual_int) assert actual_int == expected_int expr_bytes = Eq(Txn.receiver(), Txn.sender()) assert expr_bytes.type_of() == TealType.uint64 expected_bytes = TealSimpleBlock([ TealOp(Op.txn, "Receiver"), TealOp(Op.txn, "Sender"), TealOp(Op.eq) ]) actual_bytes, _ = expr_bytes.__teal__() actual_bytes.addIncoming() actual_bytes = TealBlock.NormalizeBlocks(actual_bytes) assert actual_bytes == expected_bytes def test_eq_overload(): expr_int = Int(2) == Int(3) assert expr_int.type_of() == TealType.uint64 expected_int = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.eq) ]) actual_int, _ = expr_int.__teal__() actual_int.addIncoming() actual_int = TealBlock.NormalizeBlocks(actual_int) assert actual_int == expected_int expr_bytes = Txn.receiver() == Txn.sender() assert expr_bytes.type_of() == TealType.uint64 expected_bytes = TealSimpleBlock([ TealOp(Op.txn, "Receiver"), TealOp(Op.txn, "Sender"), TealOp(Op.eq) ]) actual_bytes, _ = expr_bytes.__teal__() actual_bytes.addIncoming() actual_bytes = TealBlock.NormalizeBlocks(actual_bytes) assert actual_bytes == expected_bytes def test_eq_invalid(): with pytest.raises(TealTypeError): Eq(Txn.fee(), Txn.receiver()) with pytest.raises(TealTypeError): Eq(Txn.sender(), Int(7)) def test_neq(): expr_int = Neq(Int(2), Int(3)) assert expr_int.type_of() == TealType.uint64 expected_int = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.neq) ]) actual_int, _ = expr_int.__teal__() actual_int.addIncoming() actual_int = TealBlock.NormalizeBlocks(actual_int) assert actual_int == expected_int expr_bytes = Neq(Txn.receiver(), Txn.sender()) assert expr_bytes.type_of() == TealType.uint64 expected_bytes = TealSimpleBlock([ TealOp(Op.txn, "Receiver"), TealOp(Op.txn, "Sender"), TealOp(Op.neq) ]) actual_bytes, _ = expr_bytes.__teal__() actual_bytes.addIncoming() actual_bytes = TealBlock.NormalizeBlocks(actual_bytes) assert actual_bytes == expected_bytes def test_neq_overload(): expr_int = Int(2) != Int(3) assert expr_int.type_of() == TealType.uint64 expected_int = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.neq) ]) actual_int, _ = expr_int.__teal__() actual_int.addIncoming() actual_int = TealBlock.NormalizeBlocks(actual_int) assert actual_int == expected_int expr_bytes = Txn.receiver() != Txn.sender() assert expr_bytes.type_of() == TealType.uint64 expected_bytes = TealSimpleBlock([ TealOp(Op.txn, "Receiver"), TealOp(Op.txn, "Sender"), TealOp(Op.neq) ]) actual_bytes, _ = expr_bytes.__teal__() actual_bytes.addIncoming() actual_bytes = TealBlock.NormalizeBlocks(actual_bytes) assert actual_bytes == expected_bytes def test_neq_invalid(): with pytest.raises(TealTypeError): Neq(Txn.fee(), Txn.receiver()) with pytest.raises(TealTypeError): Neq(Txn.sender(), Int(7)) def test_lt(): expr = Lt(Int(2), Int(3)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.lt) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_lt_overload(): expr = Int(2) < Int(3) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.lt) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_lt_invalid(): with pytest.raises(TealTypeError): Lt(Int(7), Txn.receiver()) with pytest.raises(TealTypeError): Lt(Txn.sender(), Int(7)) def test_le(): expr = Le(Int(1), Int(2)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 2), TealOp(Op.le) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_le_overload(): expr = Int(1) <= Int(2) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 2), TealOp(Op.le) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_le_invalid(): with pytest.raises(TealTypeError): Le(Int(1), Txn.receiver()) with pytest.raises(TealTypeError): Le(Txn.sender(), Int(1)) def test_gt(): expr = Gt(Int(2), Int(3)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.gt) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_gt_overload(): expr = Int(2) > Int(3) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 2), TealOp(Op.int, 3), TealOp(Op.gt) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_gt_invalid(): with pytest.raises(TealTypeError): Gt(Int(1), Txn.receiver()) with pytest.raises(TealTypeError): Gt(Txn.receiver(), Int(1)) def test_ge(): expr = Ge(Int(1), Int(10)) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 10), TealOp(Op.ge) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_ge_overload(): expr = Int(1) >= Int(10) assert expr.type_of() == TealType.uint64 expected = TealSimpleBlock([ TealOp(Op.int, 1), TealOp(Op.int, 10), TealOp(Op.ge) ]) actual, _ = expr.__teal__() actual.addIncoming() actual = TealBlock.NormalizeBlocks(actual) assert actual == expected def test_ge_invalid(): with pytest.raises(TealTypeError): Ge(Int(1), Txn.receiver()) with pytest.raises(TealTypeError): Ge(Txn.receiver(), Int(1))
24.149231
65
0.602344
1,823
15,697
4.985189
0.03401
0.108275
0.084727
0.072623
0.954115
0.881272
0.84309
0.834507
0.772777
0.768486
0
0.021394
0.261515
15,697
649
66
24.186441
0.762595
0
0
0.766393
0
0
0.003568
0
0
0
0
0
0.135246
1
0.088115
false
0
0.004098
0
0.092213
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
26247aa963270c74496241611733fcb98154e9f5
8,674
py
Python
tools/legacy/veh-parser/projectileInfo.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
2
2020-03-18T18:23:27.000Z
2020-08-02T15:59:16.000Z
tools/legacy/veh-parser/projectileInfo.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
5
2019-07-07T16:47:47.000Z
2020-08-10T16:20:00.000Z
tools/legacy/veh-parser/projectileInfo.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
1
2020-03-18T18:23:30.000Z
2020-03-18T18:23:30.000Z
import parseFiles from functools import partial def createExecContext(): result = { "projectiles": [], "F": False, "T": True, "H": "heat", "R": "radar", "none": None, "ART": "art", "VIP": "vip", "SPR": "spr", "ARAC": "arac", "PROX": "prox" } globalStrings = parseFiles.parseStringsFromFile("Sim.Strings.cs") for key in globalStrings: if key.startswith("IDWEA_"): newKey: str = key.replace("IDWEA_", "") result[newKey] = newKey.lower() result["newBullet"] = partial(newBullet, result) result["newMissile"] = partial(newMissile, result) result["NewEnergy"] = partial(NewEnergy, result) result["NewBeam"] = partial(NewBeam, result) result["newMine"] = partial(newMine, result) result["newBomb"] = partial(newBomb, result) return result def newBullet(context, abbr, projectileId, velocity, range, psuedoMass, glowRange, glowColorR, glowColorG, glowColorB, damage, blast, concussionPercentage, elecPercentage, thermalPercentage, specialPercentage, passthroughShield, passthroughArmor, effectVsShield, effectVsArmor, shape, transparentShape, impactId, shieldImpactId, terrainImpactId = None): context["projectiles"].append({ "projectileId": projectileId, "projectileType": "bullet", "abbreviation": abbr, "velocity": velocity, "range": range, "psuedoMass": psuedoMass, "glowRange": glowRange, "glowColor": [glowColorR, glowColorG, glowColorB], "damage": damage, "blastRadius": blast, "concussionPercentage": concussionPercentage, "elecPercentage": elecPercentage, "thermalPercentage": thermalPercentage, "specialPercentage": specialPercentage, "passthroughShield": passthroughShield, "passthroughArmor": passthroughArmor, "effectVsShield": effectVsShield, "effectVsArmor": effectVsArmor, "shape": shape, "transparentShape": transparentShape, "impactId": impactId, "shieldImpactId": shieldImpactId, "terrainImpactId": terrainImpactId }) def newMissile(context, abbr, projectileId, startVelocity, endVelocity, acceleration, range, minRange, psuedoMass, glowRange, glowColorR, glowColorG, glowColorB, damage, blast, concussionPercentage, elecPercentage, thermalPercentage, specialPercentage, passthroughShield, passthroughArmor, effectVsShield, effectVsAmor, tackType, turnRate1, rate1Timeout, turnRate2, cruising, cruiseHugTerrain, cruiseEnvelope, burnFuelWhileUnarmed, explodeOnMiss, shape, transparentShape, impactId, shieldImpactId, terrainImpactId = None): context["projectiles"].append({ "projectileId": projectileId, "projectileType": "missile", "abbreviation": abbr, "startVelocity": startVelocity, "endVelocity": endVelocity, "range": range, "psuedoMass": psuedoMass, "glowRange": glowRange, "glowColor": [glowColorR, glowColorG, glowColorB], "damage": damage, "blastRadius": blast, "concussionPercentage": concussionPercentage, "elecPercentage": elecPercentage, "thermalPercentage": thermalPercentage, "specialPercentage": specialPercentage, "passthroughShield": passthroughShield, "passthroughArmor": passthroughArmor, "effectVsShield": effectVsShield, "shape": shape, "transparentShape": transparentShape, "impactId": impactId, "shieldImpactId": shieldImpactId, "terrainImpactId": terrainImpactId }) def NewEnergy(context, abbr, projectileId, velocity, range, psuedoMass, glowRange, glowColorR, glowColorG, glowColorB, damage, blast, concussionPercentage, elecPercentage, thermalPercentage, specialPercentage, passthroughShield, passthroughArmor, effectVsShield, effectVsAmror, faceCamera, shape, transparentShape, impactId, shieldImpactId, terrainImpactId = None): context["projectiles"].append({ "projectileId": projectileId, "projectileType": "energy", "abbreviation": abbr, "velocity": velocity, "range": range, "psuedoMass": psuedoMass, "glowRange": glowRange, "glowColor": [glowColorR, glowColorG, glowColorB], "damage": damage, "blastRadius": blast, "concussionPercentage": concussionPercentage, "elecPercentage": elecPercentage, "thermalPercentage": thermalPercentage, "specialPercentage": specialPercentage, "passthroughShield": passthroughShield, "passthroughArmor": passthroughArmor, "effectVsShield": effectVsShield, "effectVsAmror": effectVsAmror, "faceCamera": faceCamera, "shape": shape, "transparentShape": transparentShape, "impactId": impactId, "shieldImpactId": shieldImpactId, "terrainImpactId": terrainImpactId }) def NewBeam(context, abbr, projectileId, velocity, range, beamLength, segLength, targetTrack, turn, jitterVelocity, psuedoMass, damage, varPercentage, blast, concussionPercentage, elecPercentage, thermalPercentage, specialPercentage, passthroughShield, passthroughArmor, effectVsShield, effectVsAmor, faceCamera, nearWidth, farWidth, bitmap, transparentBitmap, glowColorR, glowColorG, glowColorB, glowColorAlpha, impactId, shieldImpactId, terrainImpactId = None): context["projectiles"].append({ "projectileId": projectileId, "projectileType": "beam", "abbreviation": abbr, "velocity": velocity, "range": range, "psuedoMass": psuedoMass, "glowColor": [glowColorR, glowColorG, glowColorB], "damage": damage, "blastRadius": blast, "concussionPercentage": concussionPercentage, "elecPercentage": elecPercentage, "thermalPercentage": thermalPercentage, "specialPercentage": specialPercentage, "passthroughShield": passthroughShield, "passthroughArmor": passthroughArmor, "effectVsShield": effectVsShield, "bitmap": bitmap, "transparentBitmap": transparentBitmap, "impactId": impactId, "shieldImpactId": shieldImpactId, "terrainImpactId": terrainImpactId }) def newMine(context, abbr, projectileId, startVelocity, endVelocity, acceleration, duration, armingDelay, psuedoMass, proximity, damage, blast, concussionPercentage, elecPercentage, thermalPercentage, specialPercentage, passthroughShield, passthroughArmor, effectVsShield, effectVsAmor, turnRate, cruiseEnvelope, shape, transparentShape, impactId, shieldImpactId): context["projectiles"].append({ "projectileId": projectileId, "projectileType": "mine", "abbreviation": abbr, "startVelocity": startVelocity, "endVelocity": endVelocity, "psuedoMass": psuedoMass, "damage": damage, "blastRadius": blast, "concussionPercentage": concussionPercentage, "elecPercentage": elecPercentage, "thermalPercentage": thermalPercentage, "specialPercentage": specialPercentage, "passthroughShield": passthroughShield, "passthroughArmor": passthroughArmor, "effectVsShield": effectVsShield, "shape": shape, "transparentShape": transparentShape, "impactId": impactId, "shieldImpactId": shieldImpactId }) def newBomb(context, abbr, projectileId, endVelocity, psuedoMass, damage, blast, concussionPercentage, elecPercentage, thermalPercentage, specialPercentage, passthroughShield, passthroughArmor, effectVsShield, effectVsArmor, turnRate, shape, transparentShape, impactId, shieldImpactId): context["projectiles"].append({ "projectileId": projectileId, "projectileType": "bomb", "abbreviation": abbr, "endVelocity": endVelocity, "psuedoMass": psuedoMass, "damage": damage, "blastRadius": blast, "concussionPercentage": concussionPercentage, "elecPercentage": elecPercentage, "thermalPercentage": thermalPercentage, "specialPercentage": specialPercentage, "passthroughShield": passthroughShield, "passthroughArmor": passthroughArmor, "effectVsShield": effectVsShield, "shape": shape, "transparentShape": transparentShape, "impactId": impactId, "shieldImpactId": shieldImpactId })
43.808081
200
0.668665
551
8,674
10.522686
0.203267
0.051742
0.041394
0.043463
0.800276
0.794067
0.755433
0.742152
0.731459
0.708693
0
0.000447
0.225732
8,674
198
201
43.808081
0.862865
0
0
0.68984
0
0
0.211643
0
0
0
0
0
0
1
0.037433
false
0.096257
0.010695
0
0.053476
0
0
0
1
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
263d8ffa2dad71f3c441092e7169ae035f569f87
470
py
Python
convert_video_format.py
Daryl149/keras-yolo3
06ae50aab21fe72e7771679927e56aa01101f102
[ "MIT" ]
24
2018-10-11T21:32:27.000Z
2021-12-20T18:49:15.000Z
convert_video_format.py
Daryl149/keras-yolo3
06ae50aab21fe72e7771679927e56aa01101f102
[ "MIT" ]
null
null
null
convert_video_format.py
Daryl149/keras-yolo3
06ae50aab21fe72e7771679927e56aa01101f102
[ "MIT" ]
7
2019-07-09T12:10:02.000Z
2021-07-08T03:48:07.000Z
# -*- coding: utf-8 -*- """ Created on Tue Jul 10 08:57:13 2018 @author: xuwe421 """ import ffmpy def convertVideo(): ff = ffmpy.FFmpeg( inputs={'C:\2016\59_detect_fish\3_data\Aquatera_VoithHydro\20140625_102743_194B_00408CCA70D1\Voith_20140625_102743_194B_00408CCA70D1_0-30.mkv': None}, outputs={'C:\2016\59_detect_fish\3_data\Aquatera_VoithHydro\20140625_102743_194B_00408CCA70D1\Voith_20140625_102743_194B_00408CCA70D1_0-30.mp4': None} ) ff.run()
36.153846
154
0.768085
69
470
4.884058
0.608696
0.166172
0.21365
0.356083
0.64095
0.64095
0.64095
0.64095
0.64095
0.64095
0
0.325416
0.104255
470
13
155
36.153846
0.475059
0.161702
0
0
0
0
0.682171
0.682171
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.285714
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
266fd33407d12c728d994db2b572dd8d816abf48
16,673
py
Python
tests/test.py
shinaji/wdict
dc3c6cb354342e21bfa2ff875c1a34cc1900593b
[ "MIT" ]
null
null
null
tests/test.py
shinaji/wdict
dc3c6cb354342e21bfa2ff875c1a34cc1900593b
[ "MIT" ]
null
null
null
tests/test.py
shinaji/wdict
dc3c6cb354342e21bfa2ff875c1a34cc1900593b
[ "MIT" ]
null
null
null
import sys sys.path.append("../") from wdict import Dict as WD import numpy as np from logging import basicConfig, DEBUG basicConfig(level=DEBUG) def test_extract_child(): a = WD({ "a": { "1": { "2": { "3": "A", "33": "A" } } }, "b": { "1": { "2": { "3": "A", "33": "A" } } }, "c": { "1": { "2c": { "3": "C", "33": "A" } } }, "d": { "1": { "2d": { "3": "D", "33": "A" } } } }) # print(a.extract_child("1/2/3")) assert len([key for key in a.extract_child("1/2/3").keys() if key in ["a", "b"]]) == 2 assert len([key for key in a.extract_child("1/*/3").keys() if key in ["a", "b", "c", "d"]]) == 4 def test_get_keys(): a = WD({ "a": { "1": { "2": { "3": "A" } } }, "b": { "1": { "2": { "3": "A" } } }, "c": { "1": { "2": { "3": "C" } } }, "d": { "1": { "22": { "33": "D" } } } }) assert len(list(a.get_child_keys("1/2/3"))) == 0 assert list(a.get_child_keys("1/2")) == ["3"] assert list(a.get_child_keys("1")) == ["2", "22"] or \ list(a.get_child_keys("1")) == ["2", "22"][::-1] assert list(a.get_child_keys()) == ["1"] def test_drop(): a = WD({ "a": { "1": { "2": { "3": "A" } } }, "b": { "1": { "2": { "3": "A" } } }, "c": { "1": { "2": { "3": "C" } } } }) b = a.drop(0) assert b["1"]["2"]["3"] == ["A", "A", "C"] b = a.drop(1) b = b.where("2/3", "in", ["A"]) assert len([key for key in b.keys() if key in ["a", "b"]]) == 2 b = a.drop(2) b = b.where("1/3", "in", ["C"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "c" a = WD({ "a": { "1": { "2": { "3": "A" } } }, "b": { "1": { "2": { "3": "A" } }, "11": { "2": { "3": "A" } } }, "c": { "1": { "2": { "3": "C" } } } }) b = a.drop(1) b = b.where("2/3", "has", "A") assert len([key for key in b.keys() if key in ["a", "b"]]) == 2 def test_has_child(): a = WD({"a": {"child": 1}, "b": {"son": 1}, "c": { "daughter": { "g_daughter": { "gg_daughter": 1 }}}}) b = a.has_child("son") assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" b = a.has_child("*/g_daughter/gg_daughter") assert len(b.keys()) == 1 assert list(b.keys())[0] == "c" b = a.has_child("*/*/*") assert len(b.keys()) == 1 assert list(b.keys())[0] == "c" b = a.has_child("daughter/g_daughter/gg_daughter") assert len(b.keys()) == 1 assert list(b.keys())[0] == "c" a = WD({"a": {"child": 1}, "b": {"son": 1}}) b = a.has_child("*") assert len(b.keys()) == 2 assert len([key for key in b.keys() if key in ["a", "b"]]) == 2 a = WD({ "a": {"child": {"g_child": 1}}, "b": {"son": {"g_daughter": {"gg_son": 1}}}, "c": {"daughter": {"g_daughter": {"gg_daughter": 1}}} }) b = a.has_child("*") assert len(b.keys()) == 3 b = a.has_child("*/g_daughter") assert len(b.keys()) == 2 assert len([key for key in b.keys() if key in ["b", "c"]]) == 2 b = a.has_child("*/*/gg_son") assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_exclude(): a = WD({"a": 2, "b": 2, "c": 2}) a = a.exclude(["b"]) assert len(a.keys()) == 2 assert len([key for key in a.keys() if key in ["a", "c"]]) == 2 a = a.exclude(["F"]) assert len(a.keys()) == 2 assert len([key for key in a.keys() if key in ["a", "c"]]) == 2 a = WD({"a": 2, "b": 2, "c": 2}) a = a.exclude(["b", "c"]) assert len(a.keys()) == 1 assert list(a.keys())[0] == "a" def test_extract(): a = WD({"a": 2, "b": 2, "c": 2}) a = a.extract(["a", "c"]) assert len(a.keys()) == 2 assert len([key for key in a.keys() if key in ["a", "c"]]) == 2 a = WD({"a": 2, "b": 2, "c": 2}) a = a.extract(["a"]) assert len(a.keys()) == 1 assert list(a.keys())[0] == "a" def test_where_in(): a = WD({"a": {"child": 1}, "b": {"child": [0, 1, 2]}, "c": {"child": "A"} }) b = a.where("child", "in", ["A", 1]) assert len(b.keys()) == 2 assert len([key for key in b.keys() if key in ["a", "c"]]) == 2 a = WD({"a": {"child": 1}, "b": {"child": [0, 1, 2]}, "c": {"child": "A"} }) b = a.where("child", "in", "A") assert len(b.keys()) == 1 assert len([key for key in b.keys() if key in ["c"]]) == 1 def test_where_not_in(): a = WD({"a": {"child": 1}, "b": {"child": [0, 1, 2]}, "c": {"child": "A"} }) b = a.where("child", "not in", ["A", 1]) assert len(b.keys()) == 1 assert len([key for key in b.keys() if key in ["b"]]) == 1 a = WD({"a": {"child": 1}, "b": {"child": [0, 1, 2]}, "c": {"child": "A"} }) b = a.where("child", "not in", "A") assert len(b.keys()) == 2 assert len([key for key in b.keys() if key in ["a", "b"]]) == 2 a = WD({"a": {"child": 1}, "b": {"child": [0, 1, 2]}, "c": {"child": "A"} }) b = a.where("child", "not in", [1]) assert len(b.keys()) == 2 assert len([key for key in b.keys() if key in ["b", "c"]]) == 2 def test_where_does_not_have(): a = WD({"a": {"child": 1}, "b": {"child": [0, 1, 2]}, "c": {"child": "1"} }) b = a.where("child", "does not have", 1) assert len(b.keys()) == 2 assert len([key for key in b.keys() if key in ["a", "c"]]) == 2 a = WD({"a": {"child1": "1"}, "b": {"child2": {"g_child": [0]}}, "bb": {"child2": {"g_child": [5]}}, "c": {"child3": [5]}, }) b = a.where("*/g_child", "does not have", 5) assert len(b.keys()) == 1 assert len([key for key in b.keys() if key in ["b"]]) == 1 def test_where_has(): a = WD({"a": 1, "b": {"child": [0, 1, 2]}}) b = a.where("child", "has", 1) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" a = WD({"a": 1, "b": {"child": [0, 1, 2, 5]}, "bb": {"child": [0, 1, 2]} }) b = a.where("child", "has", 5) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_has_any(): a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}}) b = a.where("child", "has any", ["a", "d"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}, "bb": {"child": {"e": 1, "f": 2, "g": 3}} }) b = a.where("child", "has any", ["a", "d"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_does_not_have_any(): a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}}) b = a.where("child", "does not have any", ["a", "d"]) assert len(b.keys()) == 0 a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}, "c": {"child": {"e": 1, "f": 2, "g": 3}} }) b = a.where("child", "does not have any", ["a", "d"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "c" a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}, "bb": {"child": {"a": 1, "b": 2, "d": 3}} }) b = a.where("child", "does not have any", ["a", "d"]) assert len(b.keys()) == 0 def test_where_has_all(): a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}}) b = a.where("child", "has all", ["a", "d"]) assert len(b.keys()) == 0 a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}, "bb": {"child": {"e": 1, "f": 2, "g": 3}} }) b = a.where("child", "has all", ["a", "c"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_does_not_have_all(): a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}}) b = a.where("child", "does not have all", ["a", "d"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3, "d": 4}}}) b = a.where("child", "does not have all", ["a", "d"]) assert len(b.keys()) == 0 a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}, "bb": {"child": {"e": 1, "f": 2, "g": 3}} }) b = a.where("child", "does not have all", ["a", "c"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "bb" def test_where_subset_of(): a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}}) b = a.where("child", "subset of", ["a", "b", "c", "d"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3, "d": 4}}}) b = a.where("child", "subset of", ["e", "f", "g"]) assert len(b.keys()) == 0 a = WD({"a": 1, "b": {"child": {"a": 1, "b": 2, "c": 3}}, "bb": {"child": {"e": 1, "f": 2, "g": 3}} }) b = a.where("child", "subset of", ["a", "b", "c", "e", "f"]) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_eq(): a = WD({ "a": 1, "b": {"child": {"gchild": 1, "a": 1}, "son": {"gchild": 0}}, "c": {"child": 1}}) b = a.where("*/gchild", "==", 1) print(b) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_neq(): a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", "!=", 1) assert len(b.keys()) == 0 a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", "!=", 0) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_gt(): a = WD({"a": 1, "b": {"child": 1, "son": 1}}) b = a.where("child", ">", 0) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", ">", 1) assert len(b.keys()) == 0 def test_where_lt(): a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", "<", 2) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", "<", 1) assert len(b.keys()) == 0 def test_where_gteq(): a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", ">=", 1) b = b.where("child", ">=", 0) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_where_lteq(): a = WD({"a": 1, "b": {"child": 1}}) b = a.where("child", "<=", 1) b = b.where("child", "<=", 2) assert len(b.keys()) == 1 assert list(b.keys())[0] == "b" def test_mul(): a = WD({"a": 1}) b = list(a * 2) assert b[0]["a"] == 1 assert b[0].a == 1 assert b[1]["a"] == 1 assert b[1].a == 1 def test_sum(): a = WD({"a": 1}) b = WD({"a": 2, "b": 2}) c = sum([a, b]) assert c["a"] == [1, 2] assert c["b"] == 2 assert c.a == [1, 2] assert c.b == 2 def test_int_int(): a = WD({"a": 1}) b = WD({"a": 2, "b": 2}) c = a + b assert c["a"] == [1, 2] assert c["b"] == 2 assert c.a == [1, 2] assert c.b == 2 def test_float_float(): a = WD({"a": 1.0}) b = WD({"a": 2.0, "b": 2.0}) c = a + b assert c["a"] == [1.0, 2.0] assert c["b"] == 2.0 assert c.a == [1.0, 2.0] assert c.b == 2.0 def test_float_int(): a = WD({"a": 1.0}) b = WD({"a": 2, "b": 2}) c = a + b assert c["a"] == [1.0, 2] assert c["b"] == 2 assert c.a == [1.0, 2] assert c.b == 2 def test_str_str(): a = WD({"a": "str_a"}) b = WD({"a": "str_b", "b": "str_b2"}) c = a + b assert c["a"] == ["str_a", "str_b"] assert c["b"] == "str_b2" assert c.a == ["str_a", "str_b"] assert c.b == "str_b2" def test_dict_dict(): a = WD({"a": {"k": "1a"}}) b = WD({"a": {"k": "1b"}, "b": {"c": {"d": 1}}}) c = a + b assert c["a"]["k"] == ["1a", "1b"] assert c["b"]["c"]["d"] == 1 assert c.a.k == ["1a", "1b"] assert c.b.c.d == 1 def test_dict_int(): a = WD({"a": {"k": "1a"}}) b = WD({"a": 1, "b": {"c": {"d": 1}}}) c = a + b assert c["a"][0]["k"] == "1a" assert c["a"][1] == 1 assert c["b"]["c"]["d"] == 1 assert c.a[0].k == "1a" assert c.a[1] == 1 assert c.b.c.d == 1 def test_npy_npy(): a = WD({"a": np.zeros(3, dtype=int)}) b = WD({"a": np.ones(3, dtype=float), "b": {"c": {"d": 1}}}) c = a + b assert c["a"] == [0, 0, 0, 1.0, 1.0, 1.0] assert c["b"]["c"]["d"] == 1 assert c.a == [0, 0, 0, 1.0, 1.0, 1.0] assert c.b.c.d == 1 def test_npy_list(): a = WD({"a": np.zeros(3, dtype=int)}) b = WD({"a": [2.0, 2.0, 2.0], "b": {"c": {"d": 1}}}) c = a + b assert c["a"] == [0, 0, 0, 2.0, 2.0, 2.0] assert c["b"]["c"]["d"] == 1 assert c.a == [0, 0, 0, 2.0, 2.0, 2.0] assert c.b.c.d == 1 def test_list_list(): a = WD({"a": [1, 1, 1]}) b = WD({"a": [3.0, 3.0, 3.0], "b": {"c": {"d": 1}}}) c = a + b assert c["a"] == [1, 1, 1, 3.0, 3.0, 3.0] assert c["b"]["c"]["d"] == 1 assert c.a == [1, 1, 1, 3.0, 3.0, 3.0] assert c.b.c.d == 1 def test_list_str(): a = WD({"a": [1, 1, 1]}) b = WD({"a": "str b", "b": {"c": {"d": 1}}}) c = a + b assert c["a"] == [1, 1, 1, "str b"] assert c["b"]["c"]["d"] == 1 assert c.a == [1, 1, 1, "str b"] assert c.b.c.d == 1 def test_list_int(): a = WD({"a": [1, 1, 1]}) b = WD({"a": 7, "b": {"c": {"d": 1}}}) c = a + b assert c["a"] == [1, 1, 1, 7] assert c["b"]["c"]["d"] == 1 assert c.a == [1, 1, 1, 7] assert c.b.c.d == 1 def test_str_int_list(): a = WD({"a": "str 0"}) b = WD({"a": 8, "b": {"c": {"d": 1}}}) c = WD({"a": [9, 0]}) d = a + b + c assert d["a"] == ["str 0", 8, 9, 0] assert d["b"]["c"]["d"] == 1 assert d.a == ["str 0", 8, 9, 0] assert d.b.c.d == 1 def test_str_int_list_del(): a = WD({"a": "str 0"}) b = WD({"a": 8, "b": {"c": {"d": 1}}}) c = WD({"a": [9, 0]}) d = a + b + c del a del b del c assert d["a"] == ["str 0", 8, 9, 0] assert d["b"]["c"]["d"] == 1 assert d.a == ["str 0", 8, 9, 0] assert d.b.c.d == 1 def test_str_int_list_update(): a = WD({"a": "str 0"}) b = WD({"a": 8, "b": {"c": {"d": 1}}}) c = WD({"a": [9, 0]}) d = a + b + c b["b"] = None a["a"] = None c["a"] = "None" assert d["a"] == ["str 0", 8, 9, 0] assert d["b"]["c"]["d"] == 1 assert d.a == ["str 0", 8, 9, 0] assert d.b.c.d == 1 def test_list_to_ndarray(): a = WD(a=[0, 1]) a.list_to_ndarray() b = WD(a=[0, 1], force_ndarray=True) assert a.a.tolist() == [0, 1] assert a["a"].tolist() == [0, 1] assert b.a.tolist() == [0, 1] assert b["a"].tolist() == [0, 1] def test_ndarray_to_list(): a = WD(a=np.array([0, 1])) a.ndarray_to_list() b = WD(a=[0, 1], force_ndarray=True) b.ndarray_to_list() assert isinstance(a.a, list) assert isinstance(a["a"], list) assert isinstance(b.a, list) assert isinstance(b["a"], list) assert a.a == [0, 1] assert a["a"] == [0, 1] assert b.a == [0, 1] assert b["a"] == [0, 1]
25.650769
70
0.363702
2,602
16,673
2.274404
0.038048
0.040554
0.040554
0.094627
0.875972
0.86634
0.840825
0.811592
0.757181
0.726597
0
0.057468
0.357104
16,673
649
71
25.690293
0.494636
0.001859
0
0.556377
0
0
0.095132
0.003305
0
0
0
0
0.310536
1
0.072089
false
0
0.007394
0
0.079482
0.001848
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
267bb2bee0124acbb7e79282b2285ef8046621ba
60,858
py
Python
dingtalk/python/alibabacloud_dingtalk/finance_1_0/client.py
aliyun/dingtalk-sdk
ab4f856b8cfe94f6b69f10a0730a2e5a7d4901c5
[ "Apache-2.0" ]
15
2020-08-27T04:10:26.000Z
2022-03-07T06:25:42.000Z
dingtalk/python/alibabacloud_dingtalk/finance_1_0/client.py
aliyun/dingtalk-sdk
ab4f856b8cfe94f6b69f10a0730a2e5a7d4901c5
[ "Apache-2.0" ]
1
2020-09-27T01:30:46.000Z
2021-12-29T09:15:34.000Z
dingtalk/python/alibabacloud_dingtalk/finance_1_0/client.py
aliyun/dingtalk-sdk
ab4f856b8cfe94f6b69f10a0730a2e5a7d4901c5
[ "Apache-2.0" ]
5
2020-08-27T04:07:44.000Z
2021-12-03T02:55:20.000Z
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.core import TeaCore from alibabacloud_tea_openapi.client import Client as OpenApiClient from alibabacloud_tea_openapi import models as open_api_models from alibabacloud_tea_util.client import Client as UtilClient from alibabacloud_dingtalk.finance_1_0 import models as dingtalkfinance__1__0_models from alibabacloud_tea_util import models as util_models from alibabacloud_openapi_util.client import Client as OpenApiUtilClient class Client(OpenApiClient): """ *\ """ def __init__( self, config: open_api_models.Config, ): super().__init__(config) self._endpoint_rule = '' if UtilClient.empty(self._endpoint): self._endpoint = 'api.dingtalk.com' def notify_pay_code_pay_result( self, request: dingtalkfinance__1__0_models.NotifyPayCodePayResultRequest, ) -> dingtalkfinance__1__0_models.NotifyPayCodePayResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.NotifyPayCodePayResultHeaders() return self.notify_pay_code_pay_result_with_options(request, headers, runtime) async def notify_pay_code_pay_result_async( self, request: dingtalkfinance__1__0_models.NotifyPayCodePayResultRequest, ) -> dingtalkfinance__1__0_models.NotifyPayCodePayResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.NotifyPayCodePayResultHeaders() return await self.notify_pay_code_pay_result_with_options_async(request, headers, runtime) def notify_pay_code_pay_result_with_options( self, request: dingtalkfinance__1__0_models.NotifyPayCodePayResultRequest, headers: dingtalkfinance__1__0_models.NotifyPayCodePayResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.NotifyPayCodePayResultResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.gmt_trade_create): body['gmtTradeCreate'] = request.gmt_trade_create if not UtilClient.is_unset(request.gmt_trade_finish): body['gmtTradeFinish'] = request.gmt_trade_finish if not UtilClient.is_unset(request.trade_no): body['tradeNo'] = request.trade_no if not UtilClient.is_unset(request.trade_status): body['tradeStatus'] = request.trade_status if not UtilClient.is_unset(request.title): body['title'] = request.title if not UtilClient.is_unset(request.remark): body['remark'] = request.remark if not UtilClient.is_unset(request.amount): body['amount'] = request.amount if not UtilClient.is_unset(request.promotion_amount): body['promotionAmount'] = request.promotion_amount if not UtilClient.is_unset(request.charge_amount): body['chargeAmount'] = request.charge_amount if not UtilClient.is_unset(request.pay_channel_detail_list): body['payChannelDetailList'] = request.pay_channel_detail_list if not UtilClient.is_unset(request.trade_error_code): body['tradeErrorCode'] = request.trade_error_code if not UtilClient.is_unset(request.trade_error_msg): body['tradeErrorMsg'] = request.trade_error_msg if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.merchant_name): body['merchantName'] = request.merchant_name real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.NotifyPayCodePayResultResponse(), self.do_roarequest('NotifyPayCodePayResult', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/payResults/notify', 'json', req, runtime) ) async def notify_pay_code_pay_result_with_options_async( self, request: dingtalkfinance__1__0_models.NotifyPayCodePayResultRequest, headers: dingtalkfinance__1__0_models.NotifyPayCodePayResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.NotifyPayCodePayResultResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.gmt_trade_create): body['gmtTradeCreate'] = request.gmt_trade_create if not UtilClient.is_unset(request.gmt_trade_finish): body['gmtTradeFinish'] = request.gmt_trade_finish if not UtilClient.is_unset(request.trade_no): body['tradeNo'] = request.trade_no if not UtilClient.is_unset(request.trade_status): body['tradeStatus'] = request.trade_status if not UtilClient.is_unset(request.title): body['title'] = request.title if not UtilClient.is_unset(request.remark): body['remark'] = request.remark if not UtilClient.is_unset(request.amount): body['amount'] = request.amount if not UtilClient.is_unset(request.promotion_amount): body['promotionAmount'] = request.promotion_amount if not UtilClient.is_unset(request.charge_amount): body['chargeAmount'] = request.charge_amount if not UtilClient.is_unset(request.pay_channel_detail_list): body['payChannelDetailList'] = request.pay_channel_detail_list if not UtilClient.is_unset(request.trade_error_code): body['tradeErrorCode'] = request.trade_error_code if not UtilClient.is_unset(request.trade_error_msg): body['tradeErrorMsg'] = request.trade_error_msg if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.merchant_name): body['merchantName'] = request.merchant_name real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.NotifyPayCodePayResultResponse(), await self.do_roarequest_async('NotifyPayCodePayResult', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/payResults/notify', 'json', req, runtime) ) def upate_user_code_instance( self, request: dingtalkfinance__1__0_models.UpateUserCodeInstanceRequest, ) -> dingtalkfinance__1__0_models.UpateUserCodeInstanceResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.UpateUserCodeInstanceHeaders() return self.upate_user_code_instance_with_options(request, headers, runtime) async def upate_user_code_instance_async( self, request: dingtalkfinance__1__0_models.UpateUserCodeInstanceRequest, ) -> dingtalkfinance__1__0_models.UpateUserCodeInstanceResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.UpateUserCodeInstanceHeaders() return await self.upate_user_code_instance_with_options_async(request, headers, runtime) def upate_user_code_instance_with_options( self, request: dingtalkfinance__1__0_models.UpateUserCodeInstanceRequest, headers: dingtalkfinance__1__0_models.UpateUserCodeInstanceHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.UpateUserCodeInstanceResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.code_id): body['codeId'] = request.code_id if not UtilClient.is_unset(request.code_identity): body['codeIdentity'] = request.code_identity if not UtilClient.is_unset(request.code_value): body['codeValue'] = request.code_value if not UtilClient.is_unset(request.status): body['status'] = request.status if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_corp_relation_type): body['userCorpRelationType'] = request.user_corp_relation_type if not UtilClient.is_unset(request.user_identity): body['userIdentity'] = request.user_identity if not UtilClient.is_unset(request.gmt_expired): body['gmtExpired'] = request.gmt_expired if not UtilClient.is_unset(request.available_times): body['availableTimes'] = request.available_times if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.UpateUserCodeInstanceResponse(), self.do_roarequest('UpateUserCodeInstance', 'finance_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/finance/payCodes/userInstances', 'json', req, runtime) ) async def upate_user_code_instance_with_options_async( self, request: dingtalkfinance__1__0_models.UpateUserCodeInstanceRequest, headers: dingtalkfinance__1__0_models.UpateUserCodeInstanceHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.UpateUserCodeInstanceResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.code_id): body['codeId'] = request.code_id if not UtilClient.is_unset(request.code_identity): body['codeIdentity'] = request.code_identity if not UtilClient.is_unset(request.code_value): body['codeValue'] = request.code_value if not UtilClient.is_unset(request.status): body['status'] = request.status if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_corp_relation_type): body['userCorpRelationType'] = request.user_corp_relation_type if not UtilClient.is_unset(request.user_identity): body['userIdentity'] = request.user_identity if not UtilClient.is_unset(request.gmt_expired): body['gmtExpired'] = request.gmt_expired if not UtilClient.is_unset(request.available_times): body['availableTimes'] = request.available_times if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.UpateUserCodeInstanceResponse(), await self.do_roarequest_async('UpateUserCodeInstance', 'finance_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/finance/payCodes/userInstances', 'json', req, runtime) ) def apply_batch_pay( self, request: dingtalkfinance__1__0_models.ApplyBatchPayRequest, ) -> dingtalkfinance__1__0_models.ApplyBatchPayResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.ApplyBatchPayHeaders() return self.apply_batch_pay_with_options(request, headers, runtime) async def apply_batch_pay_async( self, request: dingtalkfinance__1__0_models.ApplyBatchPayRequest, ) -> dingtalkfinance__1__0_models.ApplyBatchPayResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.ApplyBatchPayHeaders() return await self.apply_batch_pay_with_options_async(request, headers, runtime) def apply_batch_pay_with_options( self, request: dingtalkfinance__1__0_models.ApplyBatchPayRequest, headers: dingtalkfinance__1__0_models.ApplyBatchPayHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.ApplyBatchPayResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.staff_id): body['staffId'] = request.staff_id if not UtilClient.is_unset(request.account_id): body['accountId'] = request.account_id if not UtilClient.is_unset(request.order_no): body['orderNo'] = request.order_no if not UtilClient.is_unset(request.trans_amount): body['transAmount'] = request.trans_amount if not UtilClient.is_unset(request.return_url): body['returnUrl'] = request.return_url if not UtilClient.is_unset(request.pass_back_params): body['passBackParams'] = request.pass_back_params if not UtilClient.is_unset(request.pay_terminal): body['payTerminal'] = request.pay_terminal if not UtilClient.is_unset(request.trans_expire_time): body['transExpireTime'] = request.trans_expire_time real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.ApplyBatchPayResponse(), self.do_roarequest('ApplyBatchPay', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/batchTrades/orders/pay', 'json', req, runtime) ) async def apply_batch_pay_with_options_async( self, request: dingtalkfinance__1__0_models.ApplyBatchPayRequest, headers: dingtalkfinance__1__0_models.ApplyBatchPayHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.ApplyBatchPayResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.staff_id): body['staffId'] = request.staff_id if not UtilClient.is_unset(request.account_id): body['accountId'] = request.account_id if not UtilClient.is_unset(request.order_no): body['orderNo'] = request.order_no if not UtilClient.is_unset(request.trans_amount): body['transAmount'] = request.trans_amount if not UtilClient.is_unset(request.return_url): body['returnUrl'] = request.return_url if not UtilClient.is_unset(request.pass_back_params): body['passBackParams'] = request.pass_back_params if not UtilClient.is_unset(request.pay_terminal): body['payTerminal'] = request.pay_terminal if not UtilClient.is_unset(request.trans_expire_time): body['transExpireTime'] = request.trans_expire_time real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.ApplyBatchPayResponse(), await self.do_roarequest_async('ApplyBatchPay', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/batchTrades/orders/pay', 'json', req, runtime) ) def query_user_alipay_account(self) -> dingtalkfinance__1__0_models.QueryUserAlipayAccountResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryUserAlipayAccountHeaders() return self.query_user_alipay_account_with_options(headers, runtime) async def query_user_alipay_account_async(self) -> dingtalkfinance__1__0_models.QueryUserAlipayAccountResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryUserAlipayAccountHeaders() return await self.query_user_alipay_account_with_options_async(headers, runtime) def query_user_alipay_account_with_options( self, headers: dingtalkfinance__1__0_models.QueryUserAlipayAccountHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryUserAlipayAccountResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryUserAlipayAccountResponse(), self.do_roarequest('QueryUserAlipayAccount', 'finance_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/finance/userAlipayAccounts', 'json', req, runtime) ) async def query_user_alipay_account_with_options_async( self, headers: dingtalkfinance__1__0_models.QueryUserAlipayAccountHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryUserAlipayAccountResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryUserAlipayAccountResponse(), await self.do_roarequest_async('QueryUserAlipayAccount', 'finance_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/finance/userAlipayAccounts', 'json', req, runtime) ) def decode_pay_code( self, request: dingtalkfinance__1__0_models.DecodePayCodeRequest, ) -> dingtalkfinance__1__0_models.DecodePayCodeResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.DecodePayCodeHeaders() return self.decode_pay_code_with_options(request, headers, runtime) async def decode_pay_code_async( self, request: dingtalkfinance__1__0_models.DecodePayCodeRequest, ) -> dingtalkfinance__1__0_models.DecodePayCodeResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.DecodePayCodeHeaders() return await self.decode_pay_code_with_options_async(request, headers, runtime) def decode_pay_code_with_options( self, request: dingtalkfinance__1__0_models.DecodePayCodeRequest, headers: dingtalkfinance__1__0_models.DecodePayCodeHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.DecodePayCodeResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code if not UtilClient.is_unset(request.request_id): body['requestId'] = request.request_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.DecodePayCodeResponse(), self.do_roarequest('DecodePayCode', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/decode', 'json', req, runtime) ) async def decode_pay_code_with_options_async( self, request: dingtalkfinance__1__0_models.DecodePayCodeRequest, headers: dingtalkfinance__1__0_models.DecodePayCodeHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.DecodePayCodeResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code if not UtilClient.is_unset(request.request_id): body['requestId'] = request.request_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.DecodePayCodeResponse(), await self.do_roarequest_async('DecodePayCode', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/decode', 'json', req, runtime) ) def create_batch_trade_order( self, request: dingtalkfinance__1__0_models.CreateBatchTradeOrderRequest, ) -> dingtalkfinance__1__0_models.CreateBatchTradeOrderResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.CreateBatchTradeOrderHeaders() return self.create_batch_trade_order_with_options(request, headers, runtime) async def create_batch_trade_order_async( self, request: dingtalkfinance__1__0_models.CreateBatchTradeOrderRequest, ) -> dingtalkfinance__1__0_models.CreateBatchTradeOrderResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.CreateBatchTradeOrderHeaders() return await self.create_batch_trade_order_with_options_async(request, headers, runtime) def create_batch_trade_order_with_options( self, request: dingtalkfinance__1__0_models.CreateBatchTradeOrderRequest, headers: dingtalkfinance__1__0_models.CreateBatchTradeOrderHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.CreateBatchTradeOrderResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.staff_id): body['staffId'] = request.staff_id if not UtilClient.is_unset(request.account_id): body['accountId'] = request.account_id if not UtilClient.is_unset(request.account_no): body['accountNo'] = request.account_no if not UtilClient.is_unset(request.trade_title): body['tradeTitle'] = request.trade_title if not UtilClient.is_unset(request.out_batch_no): body['outBatchNo'] = request.out_batch_no if not UtilClient.is_unset(request.batch_remark): body['batchRemark'] = request.batch_remark if not UtilClient.is_unset(request.total_count): body['totalCount'] = request.total_count if not UtilClient.is_unset(request.total_amount): body['totalAmount'] = request.total_amount if not UtilClient.is_unset(request.batch_trade_details): body['batchTradeDetails'] = request.batch_trade_details real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.CreateBatchTradeOrderResponse(), self.do_roarequest('CreateBatchTradeOrder', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/batchTrades/orders', 'json', req, runtime) ) async def create_batch_trade_order_with_options_async( self, request: dingtalkfinance__1__0_models.CreateBatchTradeOrderRequest, headers: dingtalkfinance__1__0_models.CreateBatchTradeOrderHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.CreateBatchTradeOrderResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.staff_id): body['staffId'] = request.staff_id if not UtilClient.is_unset(request.account_id): body['accountId'] = request.account_id if not UtilClient.is_unset(request.account_no): body['accountNo'] = request.account_no if not UtilClient.is_unset(request.trade_title): body['tradeTitle'] = request.trade_title if not UtilClient.is_unset(request.out_batch_no): body['outBatchNo'] = request.out_batch_no if not UtilClient.is_unset(request.batch_remark): body['batchRemark'] = request.batch_remark if not UtilClient.is_unset(request.total_count): body['totalCount'] = request.total_count if not UtilClient.is_unset(request.total_amount): body['totalAmount'] = request.total_amount if not UtilClient.is_unset(request.batch_trade_details): body['batchTradeDetails'] = request.batch_trade_details real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.CreateBatchTradeOrderResponse(), await self.do_roarequest_async('CreateBatchTradeOrder', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/batchTrades/orders', 'json', req, runtime) ) def notify_pay_code_refund_result( self, request: dingtalkfinance__1__0_models.NotifyPayCodeRefundResultRequest, ) -> dingtalkfinance__1__0_models.NotifyPayCodeRefundResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.NotifyPayCodeRefundResultHeaders() return self.notify_pay_code_refund_result_with_options(request, headers, runtime) async def notify_pay_code_refund_result_async( self, request: dingtalkfinance__1__0_models.NotifyPayCodeRefundResultRequest, ) -> dingtalkfinance__1__0_models.NotifyPayCodeRefundResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.NotifyPayCodeRefundResultHeaders() return await self.notify_pay_code_refund_result_with_options_async(request, headers, runtime) def notify_pay_code_refund_result_with_options( self, request: dingtalkfinance__1__0_models.NotifyPayCodeRefundResultRequest, headers: dingtalkfinance__1__0_models.NotifyPayCodeRefundResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.NotifyPayCodeRefundResultResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.trade_no): body['tradeNo'] = request.trade_no if not UtilClient.is_unset(request.refund_order_no): body['refundOrderNo'] = request.refund_order_no if not UtilClient.is_unset(request.remark): body['remark'] = request.remark if not UtilClient.is_unset(request.refund_amount): body['refundAmount'] = request.refund_amount if not UtilClient.is_unset(request.refund_promotion_amount): body['refundPromotionAmount'] = request.refund_promotion_amount if not UtilClient.is_unset(request.gmt_refund): body['gmtRefund'] = request.gmt_refund if not UtilClient.is_unset(request.pay_channel_detail_list): body['payChannelDetailList'] = request.pay_channel_detail_list if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.NotifyPayCodeRefundResultResponse(), self.do_roarequest('NotifyPayCodeRefundResult', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/refundResults/notify', 'json', req, runtime) ) async def notify_pay_code_refund_result_with_options_async( self, request: dingtalkfinance__1__0_models.NotifyPayCodeRefundResultRequest, headers: dingtalkfinance__1__0_models.NotifyPayCodeRefundResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.NotifyPayCodeRefundResultResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.trade_no): body['tradeNo'] = request.trade_no if not UtilClient.is_unset(request.refund_order_no): body['refundOrderNo'] = request.refund_order_no if not UtilClient.is_unset(request.remark): body['remark'] = request.remark if not UtilClient.is_unset(request.refund_amount): body['refundAmount'] = request.refund_amount if not UtilClient.is_unset(request.refund_promotion_amount): body['refundPromotionAmount'] = request.refund_promotion_amount if not UtilClient.is_unset(request.gmt_refund): body['gmtRefund'] = request.gmt_refund if not UtilClient.is_unset(request.pay_channel_detail_list): body['payChannelDetailList'] = request.pay_channel_detail_list if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.NotifyPayCodeRefundResultResponse(), await self.do_roarequest_async('NotifyPayCodeRefundResult', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/refundResults/notify', 'json', req, runtime) ) def query_batch_trade_detail_list( self, request: dingtalkfinance__1__0_models.QueryBatchTradeDetailListRequest, ) -> dingtalkfinance__1__0_models.QueryBatchTradeDetailListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryBatchTradeDetailListHeaders() return self.query_batch_trade_detail_list_with_options(request, headers, runtime) async def query_batch_trade_detail_list_async( self, request: dingtalkfinance__1__0_models.QueryBatchTradeDetailListRequest, ) -> dingtalkfinance__1__0_models.QueryBatchTradeDetailListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryBatchTradeDetailListHeaders() return await self.query_batch_trade_detail_list_with_options_async(request, headers, runtime) def query_batch_trade_detail_list_with_options( self, request: dingtalkfinance__1__0_models.QueryBatchTradeDetailListRequest, headers: dingtalkfinance__1__0_models.QueryBatchTradeDetailListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryBatchTradeDetailListResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.out_batch_no): query['outBatchNo'] = request.out_batch_no if not UtilClient.is_unset(request.page_number): query['pageNumber'] = request.page_number if not UtilClient.is_unset(request.page_size): query['pageSize'] = request.page_size real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryBatchTradeDetailListResponse(), self.do_roarequest('QueryBatchTradeDetailList', 'finance_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/finance/batchTrades/details', 'json', req, runtime) ) async def query_batch_trade_detail_list_with_options_async( self, request: dingtalkfinance__1__0_models.QueryBatchTradeDetailListRequest, headers: dingtalkfinance__1__0_models.QueryBatchTradeDetailListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryBatchTradeDetailListResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.out_batch_no): query['outBatchNo'] = request.out_batch_no if not UtilClient.is_unset(request.page_number): query['pageNumber'] = request.page_number if not UtilClient.is_unset(request.page_size): query['pageSize'] = request.page_size real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryBatchTradeDetailListResponse(), await self.do_roarequest_async('QueryBatchTradeDetailList', 'finance_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/finance/batchTrades/details', 'json', req, runtime) ) def create_user_code_instance( self, request: dingtalkfinance__1__0_models.CreateUserCodeInstanceRequest, ) -> dingtalkfinance__1__0_models.CreateUserCodeInstanceResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.CreateUserCodeInstanceHeaders() return self.create_user_code_instance_with_options(request, headers, runtime) async def create_user_code_instance_async( self, request: dingtalkfinance__1__0_models.CreateUserCodeInstanceRequest, ) -> dingtalkfinance__1__0_models.CreateUserCodeInstanceResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.CreateUserCodeInstanceHeaders() return await self.create_user_code_instance_with_options_async(request, headers, runtime) def create_user_code_instance_with_options( self, request: dingtalkfinance__1__0_models.CreateUserCodeInstanceRequest, headers: dingtalkfinance__1__0_models.CreateUserCodeInstanceHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.CreateUserCodeInstanceResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.request_id): body['requestId'] = request.request_id if not UtilClient.is_unset(request.code_identity): body['codeIdentity'] = request.code_identity if not UtilClient.is_unset(request.code_value): body['codeValue'] = request.code_value if not UtilClient.is_unset(request.code_value_type): body['codeValueType'] = request.code_value_type if not UtilClient.is_unset(request.status): body['status'] = request.status if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_corp_relation_type): body['userCorpRelationType'] = request.user_corp_relation_type if not UtilClient.is_unset(request.user_identity): body['userIdentity'] = request.user_identity if not UtilClient.is_unset(request.gmt_expired): body['gmtExpired'] = request.gmt_expired if not UtilClient.is_unset(request.available_times): body['availableTimes'] = request.available_times if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.CreateUserCodeInstanceResponse(), self.do_roarequest('CreateUserCodeInstance', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/userInstances', 'json', req, runtime) ) async def create_user_code_instance_with_options_async( self, request: dingtalkfinance__1__0_models.CreateUserCodeInstanceRequest, headers: dingtalkfinance__1__0_models.CreateUserCodeInstanceHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.CreateUserCodeInstanceResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.request_id): body['requestId'] = request.request_id if not UtilClient.is_unset(request.code_identity): body['codeIdentity'] = request.code_identity if not UtilClient.is_unset(request.code_value): body['codeValue'] = request.code_value if not UtilClient.is_unset(request.code_value_type): body['codeValueType'] = request.code_value_type if not UtilClient.is_unset(request.status): body['status'] = request.status if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_corp_relation_type): body['userCorpRelationType'] = request.user_corp_relation_type if not UtilClient.is_unset(request.user_identity): body['userIdentity'] = request.user_identity if not UtilClient.is_unset(request.gmt_expired): body['gmtExpired'] = request.gmt_expired if not UtilClient.is_unset(request.available_times): body['availableTimes'] = request.available_times if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.CreateUserCodeInstanceResponse(), await self.do_roarequest_async('CreateUserCodeInstance', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/userInstances', 'json', req, runtime) ) def query_batch_trade_order( self, request: dingtalkfinance__1__0_models.QueryBatchTradeOrderRequest, ) -> dingtalkfinance__1__0_models.QueryBatchTradeOrderResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryBatchTradeOrderHeaders() return self.query_batch_trade_order_with_options(request, headers, runtime) async def query_batch_trade_order_async( self, request: dingtalkfinance__1__0_models.QueryBatchTradeOrderRequest, ) -> dingtalkfinance__1__0_models.QueryBatchTradeOrderResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryBatchTradeOrderHeaders() return await self.query_batch_trade_order_with_options_async(request, headers, runtime) def query_batch_trade_order_with_options( self, request: dingtalkfinance__1__0_models.QueryBatchTradeOrderRequest, headers: dingtalkfinance__1__0_models.QueryBatchTradeOrderHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryBatchTradeOrderResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.out_batch_nos): body['outBatchNos'] = request.out_batch_nos real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryBatchTradeOrderResponse(), self.do_roarequest('QueryBatchTradeOrder', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/batchTrades/orders/query', 'json', req, runtime) ) async def query_batch_trade_order_with_options_async( self, request: dingtalkfinance__1__0_models.QueryBatchTradeOrderRequest, headers: dingtalkfinance__1__0_models.QueryBatchTradeOrderHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryBatchTradeOrderResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.out_batch_nos): body['outBatchNos'] = request.out_batch_nos real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryBatchTradeOrderResponse(), await self.do_roarequest_async('QueryBatchTradeOrder', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/batchTrades/orders/query', 'json', req, runtime) ) def save_corp_pay_code( self, request: dingtalkfinance__1__0_models.SaveCorpPayCodeRequest, ) -> dingtalkfinance__1__0_models.SaveCorpPayCodeResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.SaveCorpPayCodeHeaders() return self.save_corp_pay_code_with_options(request, headers, runtime) async def save_corp_pay_code_async( self, request: dingtalkfinance__1__0_models.SaveCorpPayCodeRequest, ) -> dingtalkfinance__1__0_models.SaveCorpPayCodeResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.SaveCorpPayCodeHeaders() return await self.save_corp_pay_code_with_options_async(request, headers, runtime) def save_corp_pay_code_with_options( self, request: dingtalkfinance__1__0_models.SaveCorpPayCodeRequest, headers: dingtalkfinance__1__0_models.SaveCorpPayCodeHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.SaveCorpPayCodeResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.code_identity): body['codeIdentity'] = request.code_identity if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.status): body['status'] = request.status if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.SaveCorpPayCodeResponse(), self.do_roarequest('SaveCorpPayCode', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/corpSettings', 'json', req, runtime) ) async def save_corp_pay_code_with_options_async( self, request: dingtalkfinance__1__0_models.SaveCorpPayCodeRequest, headers: dingtalkfinance__1__0_models.SaveCorpPayCodeHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.SaveCorpPayCodeResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.code_identity): body['codeIdentity'] = request.code_identity if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.status): body['status'] = request.status if not UtilClient.is_unset(request.ext_info): body['extInfo'] = request.ext_info if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.SaveCorpPayCodeResponse(), await self.do_roarequest_async('SaveCorpPayCode', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/corpSettings', 'json', req, runtime) ) def notify_verify_result( self, request: dingtalkfinance__1__0_models.NotifyVerifyResultRequest, ) -> dingtalkfinance__1__0_models.NotifyVerifyResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.NotifyVerifyResultHeaders() return self.notify_verify_result_with_options(request, headers, runtime) async def notify_verify_result_async( self, request: dingtalkfinance__1__0_models.NotifyVerifyResultRequest, ) -> dingtalkfinance__1__0_models.NotifyVerifyResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.NotifyVerifyResultHeaders() return await self.notify_verify_result_with_options_async(request, headers, runtime) def notify_verify_result_with_options( self, request: dingtalkfinance__1__0_models.NotifyVerifyResultRequest, headers: dingtalkfinance__1__0_models.NotifyVerifyResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.NotifyVerifyResultResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_corp_relation_type): body['userCorpRelationType'] = request.user_corp_relation_type if not UtilClient.is_unset(request.user_identity): body['userIdentity'] = request.user_identity if not UtilClient.is_unset(request.verify_time): body['verifyTime'] = request.verify_time if not UtilClient.is_unset(request.verify_result): body['verifyResult'] = request.verify_result if not UtilClient.is_unset(request.verify_location): body['verifyLocation'] = request.verify_location if not UtilClient.is_unset(request.verify_no): body['verifyNo'] = request.verify_no if not UtilClient.is_unset(request.verify_event): body['verifyEvent'] = request.verify_event if not UtilClient.is_unset(request.remark): body['remark'] = request.remark if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.NotifyVerifyResultResponse(), self.do_roarequest('NotifyVerifyResult', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/verifyResults/notify', 'json', req, runtime) ) async def notify_verify_result_with_options_async( self, request: dingtalkfinance__1__0_models.NotifyVerifyResultRequest, headers: dingtalkfinance__1__0_models.NotifyVerifyResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.NotifyVerifyResultResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.pay_code): body['payCode'] = request.pay_code if not UtilClient.is_unset(request.corp_id): body['corpId'] = request.corp_id if not UtilClient.is_unset(request.user_corp_relation_type): body['userCorpRelationType'] = request.user_corp_relation_type if not UtilClient.is_unset(request.user_identity): body['userIdentity'] = request.user_identity if not UtilClient.is_unset(request.verify_time): body['verifyTime'] = request.verify_time if not UtilClient.is_unset(request.verify_result): body['verifyResult'] = request.verify_result if not UtilClient.is_unset(request.verify_location): body['verifyLocation'] = request.verify_location if not UtilClient.is_unset(request.verify_no): body['verifyNo'] = request.verify_no if not UtilClient.is_unset(request.verify_event): body['verifyEvent'] = request.verify_event if not UtilClient.is_unset(request.remark): body['remark'] = request.remark if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkfinance__1__0_models.NotifyVerifyResultResponse(), await self.do_roarequest_async('NotifyVerifyResult', 'finance_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/finance/payCodes/verifyResults/notify', 'json', req, runtime) ) def query_pay_account_list(self) -> dingtalkfinance__1__0_models.QueryPayAccountListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryPayAccountListHeaders() return self.query_pay_account_list_with_options(headers, runtime) async def query_pay_account_list_async(self) -> dingtalkfinance__1__0_models.QueryPayAccountListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkfinance__1__0_models.QueryPayAccountListHeaders() return await self.query_pay_account_list_with_options_async(headers, runtime) def query_pay_account_list_with_options( self, headers: dingtalkfinance__1__0_models.QueryPayAccountListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryPayAccountListResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryPayAccountListResponse(), self.do_roarequest('QueryPayAccountList', 'finance_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/finance/payAccounts', 'json', req, runtime) ) async def query_pay_account_list_with_options_async( self, headers: dingtalkfinance__1__0_models.QueryPayAccountListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkfinance__1__0_models.QueryPayAccountListResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkfinance__1__0_models.QueryPayAccountListResponse(), await self.do_roarequest_async('QueryPayAccountList', 'finance_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/finance/payAccounts', 'json', req, runtime) )
52.238627
178
0.703967
6,750
60,858
5.950963
0.038519
0.030621
0.091862
0.10411
0.982175
0.9703
0.962583
0.945082
0.93607
0.922751
0
0.009514
0.210753
60,858
1,164
179
52.283505
0.826782
0.001315
0
0.845109
1
0
0.078797
0.032519
0
0
0
0
0
1
0.024457
false
0.003623
0.006341
0
0.078804
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
0
0
0
0
0
0
8
2685d5c0e90fc985a5a0e2750c5cbf3e0d236750
11,290
py
Python
TWLight/resources/migrations/0070_auto_20210505_2158.py
nicole331/TWLight
fab9002e76868f8a2ef36f9279c777de34243b2c
[ "MIT" ]
67
2017-12-14T22:27:48.000Z
2022-03-13T18:21:31.000Z
TWLight/resources/migrations/0070_auto_20210505_2158.py
nicole331/TWLight
fab9002e76868f8a2ef36f9279c777de34243b2c
[ "MIT" ]
433
2017-03-24T22:51:23.000Z
2022-03-31T19:36:22.000Z
TWLight/resources/migrations/0070_auto_20210505_2158.py
Mahuton/TWLight
90b299d07b0479f21dc90e17b8d05f5a221b0de1
[ "MIT" ]
105
2017-06-23T03:53:41.000Z
2022-03-30T17:24:29.000Z
# Generated by Django 3.1.8 on 2021-05-05 21:58 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("resources", "0069_auto_20210503_1809"), ] operations = [ migrations.RemoveField( model_name="partner", name="description", ), migrations.RemoveField( model_name="partner", name="description_ar", ), migrations.RemoveField( model_name="partner", name="description_br", ), migrations.RemoveField( model_name="partner", name="description_da", ), migrations.RemoveField( model_name="partner", name="description_de", ), migrations.RemoveField( model_name="partner", name="description_en", ), migrations.RemoveField( model_name="partner", name="description_en_gb", ), migrations.RemoveField( model_name="partner", name="description_eo", ), migrations.RemoveField( model_name="partner", name="description_es", ), migrations.RemoveField( model_name="partner", name="description_fa", ), migrations.RemoveField( model_name="partner", name="description_fi", ), migrations.RemoveField( model_name="partner", name="description_fr", ), migrations.RemoveField( model_name="partner", name="description_he", ), migrations.RemoveField( model_name="partner", name="description_hi", ), migrations.RemoveField( model_name="partner", name="description_ind", ), migrations.RemoveField( model_name="partner", name="description_ja", ), migrations.RemoveField( model_name="partner", name="description_ko", ), migrations.RemoveField( model_name="partner", name="description_mk", ), migrations.RemoveField( model_name="partner", name="description_mr", ), migrations.RemoveField( model_name="partner", name="description_my", ), migrations.RemoveField( model_name="partner", name="description_pl", ), migrations.RemoveField( model_name="partner", name="description_pt", ), migrations.RemoveField( model_name="partner", name="description_pt_br", ), migrations.RemoveField( model_name="partner", name="description_ro", ), migrations.RemoveField( model_name="partner", name="description_ru", ), migrations.RemoveField( model_name="partner", name="description_sv", ), migrations.RemoveField( model_name="partner", name="description_ta", ), migrations.RemoveField( model_name="partner", name="description_tr", ), migrations.RemoveField( model_name="partner", name="description_uk", ), migrations.RemoveField( model_name="partner", name="description_vi", ), migrations.RemoveField( model_name="partner", name="description_zh_hans", ), migrations.RemoveField( model_name="partner", name="description_zh_hant", ), migrations.RemoveField( model_name="partner", name="send_instructions_ar", ), migrations.RemoveField( model_name="partner", name="send_instructions_br", ), migrations.RemoveField( model_name="partner", name="send_instructions_da", ), migrations.RemoveField( model_name="partner", name="send_instructions_de", ), migrations.RemoveField( model_name="partner", name="send_instructions_en", ), migrations.RemoveField( model_name="partner", name="send_instructions_en_gb", ), migrations.RemoveField( model_name="partner", name="send_instructions_eo", ), migrations.RemoveField( model_name="partner", name="send_instructions_es", ), migrations.RemoveField( model_name="partner", name="send_instructions_fa", ), migrations.RemoveField( model_name="partner", name="send_instructions_fi", ), migrations.RemoveField( model_name="partner", name="send_instructions_fr", ), migrations.RemoveField( model_name="partner", name="send_instructions_he", ), migrations.RemoveField( model_name="partner", name="send_instructions_hi", ), migrations.RemoveField( model_name="partner", name="send_instructions_ind", ), migrations.RemoveField( model_name="partner", name="send_instructions_ja", ), migrations.RemoveField( model_name="partner", name="send_instructions_ko", ), migrations.RemoveField( model_name="partner", name="send_instructions_mk", ), migrations.RemoveField( model_name="partner", name="send_instructions_mr", ), migrations.RemoveField( model_name="partner", name="send_instructions_my", ), migrations.RemoveField( model_name="partner", name="send_instructions_pl", ), migrations.RemoveField( model_name="partner", name="send_instructions_pt", ), migrations.RemoveField( model_name="partner", name="send_instructions_pt_br", ), migrations.RemoveField( model_name="partner", name="send_instructions_ro", ), migrations.RemoveField( model_name="partner", name="send_instructions_ru", ), migrations.RemoveField( model_name="partner", name="send_instructions_sv", ), migrations.RemoveField( model_name="partner", name="send_instructions_ta", ), migrations.RemoveField( model_name="partner", name="send_instructions_tr", ), migrations.RemoveField( model_name="partner", name="send_instructions_uk", ), migrations.RemoveField( model_name="partner", name="send_instructions_vi", ), migrations.RemoveField( model_name="partner", name="send_instructions_zh_hans", ), migrations.RemoveField( model_name="partner", name="send_instructions_zh_hant", ), migrations.RemoveField( model_name="partner", name="short_description", ), migrations.RemoveField( model_name="partner", name="short_description_ar", ), migrations.RemoveField( model_name="partner", name="short_description_br", ), migrations.RemoveField( model_name="partner", name="short_description_da", ), migrations.RemoveField( model_name="partner", name="short_description_de", ), migrations.RemoveField( model_name="partner", name="short_description_en", ), migrations.RemoveField( model_name="partner", name="short_description_en_gb", ), migrations.RemoveField( model_name="partner", name="short_description_eo", ), migrations.RemoveField( model_name="partner", name="short_description_es", ), migrations.RemoveField( model_name="partner", name="short_description_fa", ), migrations.RemoveField( model_name="partner", name="short_description_fi", ), migrations.RemoveField( model_name="partner", name="short_description_fr", ), migrations.RemoveField( model_name="partner", name="short_description_he", ), migrations.RemoveField( model_name="partner", name="short_description_hi", ), migrations.RemoveField( model_name="partner", name="short_description_ind", ), migrations.RemoveField( model_name="partner", name="short_description_ja", ), migrations.RemoveField( model_name="partner", name="short_description_ko", ), migrations.RemoveField( model_name="partner", name="short_description_mk", ), migrations.RemoveField( model_name="partner", name="short_description_mr", ), migrations.RemoveField( model_name="partner", name="short_description_my", ), migrations.RemoveField( model_name="partner", name="short_description_pl", ), migrations.RemoveField( model_name="partner", name="short_description_pt", ), migrations.RemoveField( model_name="partner", name="short_description_pt_br", ), migrations.RemoveField( model_name="partner", name="short_description_ro", ), migrations.RemoveField( model_name="partner", name="short_description_ru", ), migrations.RemoveField( model_name="partner", name="short_description_sv", ), migrations.RemoveField( model_name="partner", name="short_description_ta", ), migrations.RemoveField( model_name="partner", name="short_description_tr", ), migrations.RemoveField( model_name="partner", name="short_description_uk", ), migrations.RemoveField( model_name="partner", name="short_description_vi", ), migrations.RemoveField( model_name="partner", name="short_description_zh_hans", ), migrations.RemoveField( model_name="partner", name="short_description_zh_hant", ), ]
28.654822
49
0.521878
861
11,290
6.534262
0.073171
0.354604
0.439033
0.506577
0.973338
0.973338
0.973338
0.948098
0.206363
0
0
0.004393
0.374934
11,290
393
50
28.727735
0.79283
0.003986
0
0.736434
1
0
0.217913
0.022859
0
0
0
0
0
1
0
false
0
0.002584
0
0.010336
0
0
0
0
null
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
cd3afb36a8cfc1e241ba3d7210a4f8726679d982
241
py
Python
Codewars/7kyu/categorize-new-member/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
7
2017-09-20T16:40:39.000Z
2021-08-31T18:15:08.000Z
Codewars/7kyu/categorize-new-member/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
Codewars/7kyu/categorize-new-member/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
# Python - 3.6.0 test.assert_equals(openOrSenior([[45, 12], [55, 21], [19, -2], [104, 20]]), ['Open', 'Senior', 'Open', 'Senior']) test.assert_equals(openOrSenior([[16, 23], [73, 1], [56, 20], [1, -1]]), ['Open', 'Open', 'Senior', 'Open'])
48.2
113
0.556017
36
241
3.666667
0.638889
0.227273
0.242424
0.424242
0
0
0
0
0
0
0
0.150943
0.120332
241
4
114
60.25
0.471698
0.058091
0
0
0
0
0.168889
0
0
0
0
0
1
1
0
true
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
7
cd46307ccd9aabc5c1dde8410ebc39bcede082fc
4,148
py
Python
trisicell/commands/mcalling/z03clean.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
2
2021-07-02T13:53:15.000Z
2021-11-16T03:14:36.000Z
trisicell/commands/mcalling/z03clean.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
58
2021-06-14T17:14:39.000Z
2022-03-11T19:32:54.000Z
trisicell/commands/mcalling/z03clean.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2021, Farid Rashidi Mehrabadi All rights reserved. # ====================================================================================== # Author : Farid Rashidi Mehrabadi (farid.rashidimehrabadi@nih.gov) # Last Update: Aug 14, 2020 # Description: cleaning # ====================================================================================== import subprocess def after03(config): # subprocess.getoutput(f"rm -rf {config['outdir']}/_annotating'" subprocess.getoutput(f"rm -rf {config['outdir']}/_calling") subprocess.getoutput(f"rm -rf {config['outdir']}/_indexing") subprocess.getoutput( f"find {config['outdir']} -name \\*Aligned.out.sam -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*Aligned.sortedByCoord.out.bam -exec rm -rf" " {} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*Aligned.toTranscriptome.out.bam -exec rm -rf" " {} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*dedupped.bam -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*expr.genes.results -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*expr.isoforms.results -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*expr.stat -exec rm -rf {{}} \\;" ) # subprocess.getoutput( # f"find {config['outdir']} -name \\*Hapl...g.vcf -exec rm -rf {{}} \\;" # ) # subprocess.getoutput( # f"find {config['outdir']} -name \\*Hapl...g.vcf.idx -exec rm -rf {{}} \\;" # ) subprocess.getoutput( f"find {config['outdir']} -name \\*indel.intervals -exec rm -rf {{}} \\;" ) # subprocess.getoutput( # f"find {config['outdir']} -name \\*Log.final.out -exec rm -rf {{}} \\;" # ) subprocess.getoutput( f"find {config['outdir']} -name \\*Log.out -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*Log.progress.out -exec rm -rf {{}} \\;" ) # subprocess.getoutput( # f"find {config['outdir']} -name \\*output.bai -exec rm -rf {{}} \\;" # ) # subprocess.getoutput( # f"find {config['outdir']} -name \\*output.bam -exec rm -rf {{}} \\;" # ) subprocess.getoutput( f"find {config['outdir']} -name \\*output.metrics -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*ReadsPerGene.out.tab -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*realign.bai -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*realign.bam -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*recal.table -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*rg_added_sorted.bai -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*rg_added_sorted.bam -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*SJ.out.tab -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*split.bai -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*split.bam -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*_STARgenome -exec rm -rf {{}} \\;" ) if config["dotrimming"]: subprocess.getoutput( f"find {config['outdir']} -name \\*_fastqc.html -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*_report.txt -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*_fastqc.zip -exec rm -rf {{}} \\;" ) subprocess.getoutput( f"find {config['outdir']} -name \\*.fq.gz -exec rm -rf {{}} \\;" )
36.707965
88
0.519527
437
4,148
4.906178
0.19222
0.292444
0.307836
0.335821
0.813433
0.813433
0.813433
0.76306
0.716884
0.716884
0
0.003771
0.232883
4,148
112
89
37.035714
0.670019
0.225651
0
0.329268
0
0.097561
0.566635
0.073064
0
0
0
0
0
1
0.012195
false
0
0.012195
0
0.02439
0
0
0
0
null
1
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
9
cd900615deb574375fa3c1ddd9d87ca41228ca97
16,850
py
Python
utils/models.py
itsnarsi/1WeStar
c3d0caa1079db6900a227ab51694faabd6f0eb2d
[ "MIT" ]
null
null
null
utils/models.py
itsnarsi/1WeStar
c3d0caa1079db6900a227ab51694faabd6f0eb2d
[ "MIT" ]
null
null
null
utils/models.py
itsnarsi/1WeStar
c3d0caa1079db6900a227ab51694faabd6f0eb2d
[ "MIT" ]
null
null
null
# @Author: Narsi Reddy <narsi> # @Date: 2019-12-18T20:16:34-06:00 # @Last modified by: cibitaw1 # @Last modified time: 2020-02-14T19:03:59-06:00 import torch import numpy as np torch.manual_seed(29) from torch import nn import torch.nn.functional as F from .model_blocks import * from .model_utils import * class MODEL_TEST1(nn.Module): def __init__( self, ): super(MODEL_TEST1, self).__init__() self.E = nn.Sequential( PixelUnshuffle(4), BLOCK_3x3(in_ch = 48, out_ch = 24, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 24, out_ch = 24, ker = 3, squeeze = 1), RES_3x3_BLOCK1(in_ch = 24, out_ch = 24, ker = 3, squeeze = 1), BLOCK_3x3(in_ch = 24, out_ch = 64, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2), BLOCK_3x3(in_ch = 64, out_ch = 24, ker = 3, stride = 1), BinTANH() ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 24, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), BLOCK_3x3(in_ch = 96, out_ch = 48, ker = 3, stride = 1), nn.ReLU(inplace=True), nn.PixelShuffle(4) ) def encode(self, x): # print(x.size()) x = self.E(x) return x def decode(self, x): # print(x.size()) x = self.D(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class QuantACTShuffleV1(nn.Module): def __init__( self, ): super(QuantACTShuffleV1, self).__init__() self.E = nn.Sequential( PixelUnshuffle(4), BLOCK_3x3(in_ch = 48, out_ch = 64, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2), BLOCK_3x3(in_ch = 64, out_ch = 128, ker = 3, stride = 2), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4), BLOCK_3x3(in_ch = 128, out_ch = 128, ker = 3, stride = 1), BinTANH() ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 128, out_ch = 128, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 2), nn.Conv2d(128, 96*4, 1), nn.PixelShuffle(2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), BLOCK_3x3(in_ch = 96, out_ch = 48, ker = 3, stride = 1), nn.ReLU(inplace=True), nn.PixelShuffle(4) ) def encode(self, x): # print(x.size()) x = self.E(x) return x def decode(self, x): # print(x.size()) x = self.D(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class QuantACTShuffleV2(nn.Module): def __init__( self, ): super(QuantACTShuffleV2, self).__init__() self.E = nn.Sequential( PixelUnshuffle(4), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), nn.Conv2d(96, 3, 1), nn.BatchNorm2d(3), QuantCLIP(8), # nn.Hardtanh(), ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2), BLOCK_3x3(in_ch = 96, out_ch = 48, ker = 3, stride = 1), nn.ReLU(inplace=True), nn.PixelShuffle(4) ) def encode(self, x): # print(x.size()) x = self.E(x) return x def decode(self, x): # print(x.size()) x = self.D(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class RBS(nn.Module): def __init__( self, in_ch = 96, out_ch = 48, squeeze = 3, ): super(RBS, self).__init__() self.SET_1 = nn.Sequential( RES_3x3_BLOCK1(in_ch = in_ch, out_ch = in_ch, ker = 3, squeeze = squeeze, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = in_ch, out_ch = in_ch, ker = 3, squeeze = squeeze, res_scale = 1.0), ) self.SET_2 = nn.Sequential( RES_3x3_BLOCK1(in_ch = in_ch, out_ch = in_ch, ker = 3, squeeze = squeeze, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = in_ch, out_ch = in_ch, ker = 3, squeeze = squeeze, res_scale = 1.0), ) self.SQEZ = nn.Conv2d(in_ch*2, out_ch, 1) def forward(self, x): x1 = self.SET_1(x) x2 = self.SET_2(x1) x = torch.cat((x1, x2), dim = 1) return self.SQEZ(x) class QuantACTShuffleV3(nn.Module): def __init__( self, ): super(QuantACTShuffleV3, self).__init__() self.E = nn.Sequential( PixelUnshuffle(4), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), nn.Conv2d(96, 3, 1), QuantCLIP(8) ) self.D = nn.Sequential( nn.Conv2d(3, 96, 1), RBS(in_ch = 96, out_ch = 48, squeeze = 3), RBS(in_ch = 48, out_ch = 48, squeeze = 2), nn.ReLU(inplace=True), nn.PixelShuffle(4) ) def encode(self, x): # print(x.size()) x = self.E(x) return x def decode(self, x): # print(x.size()) x = self.D(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class QuantACTShuffleV4(nn.Module): def __init__( self, ): super(QuantACTShuffleV4, self).__init__() self.E = nn.Sequential( PixelUnshuffle(4), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), nn.Conv2d(96, 4, 1), QuantCLIP(8) ) self.D = nn.Sequential( nn.Conv2d(4, 96, 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 3, res_scale = 1.0), nn.Conv2d(96, 48, 1), nn.ReLU(inplace=True), nn.PixelShuffle(4) ) def encode(self, x): # print(x.size()) x = self.E(x) return x def decode(self, x): # print(x.size()) x = self.D(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class CleanImg(nn.Module): def __init__( self, compress_model ): super(CleanImg, self).__init__() self.M = compress_model self.E = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 48, ker = 3, stride = 2), RES_3x3_BLOCK1(in_ch = 48, out_ch = 48, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 48, out_ch = 48, ker = 3, squeeze = 4, res_scale = 1.0), BLOCK_3x3(in_ch = 48, out_ch = 12, ker = 3, stride = 1), nn.PixelShuffle(2) ) def encode(self, x): # print(x.size()) x = self.M.E(x) return x def forward(self, x): x = self.M(x) x = self.E(x) + x return x class QuantACTShuffleV5(nn.Module): def __init__( self, ): super(QuantACTShuffleV5, self).__init__() self.E = nn.Sequential( HaarDWT(3),HaarDWT(12), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 4, res_scale = 1.0), nn.Conv2d(96, 3, 1), QuantCLIP(8) ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 128, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4, res_scale = 1.0), nn.Conv2d(128, 48, 1), HaarIDWT(12),HaarIDWT(3), nn.ReLU(), ) self.S = nn.Sequential(nn.ReflectionPad2d(1), nn.AvgPool2d(3, stride=1, padding=0)) def encode(self, x): x = self.E(x) return x def decode(self, x): x = self.D(x) x = self.S(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class QuantACTShuffleV6(nn.Module): def __init__( self, ): super(QuantACTShuffleV6, self).__init__() self.E = nn.Sequential( HaarDWT(3),HaarDWT(12), BLOCK_3x3(in_ch = 48, out_ch = 128, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 128, out_ch = 128, ker = 3, squeeze = 4, res_scale = 1.0), nn.Conv2d(128, 3, 1), QuantCLIP(8) ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 256, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 256, out_ch = 256, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 256, out_ch = 256, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 256, out_ch = 256, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 256, out_ch = 256, ker = 3, squeeze = 4, res_scale = 1.0), nn.Conv2d(256, 48, 1), HaarIDWT(12),HaarIDWT(3), nn.ReLU(), ) self.S = nn.Sequential(nn.ReflectionPad2d(1), nn.AvgPool2d(3, stride=1, padding=0)) def encode(self, x): x = self.E(x) return x def decode(self, x): x = self.D(x) x = self.S(x) return x def forward(self, x): x = self.encode(x) x = self.decode(x) return x class QuantACTShuffleV7(nn.Module): def __init__( self, ): super(QuantACTShuffleV7, self).__init__() self.E = nn.Sequential( HaarDWT(3),HaarDWT(12), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), nn.Conv2d(96, 3, 1), HaarDWT(3),HaarDWT(12), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), nn.Conv2d(96, 3, 1), QuantCLIP(8) ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 192, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 192, out_ch = 192, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 192, out_ch = 192, ker = 3, squeeze = 4, res_scale = 1.0), nn.Conv2d(192, 48, 1), HaarIDWT(12),HaarIDWT(3), BLOCK_3x3(in_ch = 3, out_ch = 192, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 192, out_ch = 192, ker = 3, squeeze = 4, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 192, out_ch = 192, ker = 3, squeeze = 4, res_scale = 1.0), nn.Conv2d(192, 48, 1), HaarIDWT(12),HaarIDWT(3), nn.ReLU(), ) self.S = nn.Sequential(nn.ReflectionPad2d(1), nn.AvgPool2d(3, stride=1, padding=0)) def encode(self, x): x = self.E(x) return x def decode(self, x): x = self.D(x) if not self.training: x = self.S(x) return x def forward(self, x): # if self.training: x = self.encode(x) x = self.decode(x) if self.training: return x, x else: return x class QuantACTShuffleV8(nn.Module): def __init__( self, ): super(QuantACTShuffleV8, self).__init__() self.E = nn.Sequential( HaarDWT(3),HaarDWT(12), BLOCK_3x3(in_ch = 48, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), nn.Conv2d(96, 3, 1), QuantCLIP(8) ) self.D = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 96, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 96, out_ch = 96, ker = 3, squeeze = 2, res_scale = 1.0), nn.Conv2d(96, 48, 1), HaarIDWT(12),HaarIDWT(3), nn.ReLU(), ) self.U = nn.Sequential( BLOCK_3x3(in_ch = 3, out_ch = 64, ker = 3, stride = 1), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2, res_scale = 1.0), RES_3x3_BLOCK1(in_ch = 64, out_ch = 64, ker = 3, squeeze = 2, res_scale = 1.0), nn.Conv2d(64, 12, 1), HaarIDWT(3), nn.ReLU(), ) self.S = nn.Sequential(nn.ReflectionPad2d(1), nn.AvgPool2d(3, stride=1, padding=0)) def encode(self, x): if not self.training: x = F.interpolate(x, scale_factor=0.25, mode='bilinear') x = self.E(x) return x def decode(self, x): x = self.D(x) if not self.training: x = self.U(x) x = self.U(x) # x = self.S(x) return x def forward(self, x): # if self.training: x = F.interpolate(x, scale_factor=0.5, mode='bilinear') x = self.encode(x) xd = self.decode(x) x = self.U(xd) if self.training: return x, F.interpolate(xd, scale_factor=2, mode='bilinear') else: return x
33.632735
103
0.509258
2,505
16,850
3.213174
0.049102
0.055659
0.107343
0.125233
0.880606
0.867064
0.834389
0.829544
0.821469
0.784818
0
0.115257
0.357389
16,850
500
104
33.7
0.628094
0.022611
0
0.753769
0
0
0.001459
0
0
0
0
0
0
1
0.103015
false
0
0.015075
0
0.226131
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