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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75dc4c10381dd192b2c922eacc2098eb2e59b504 | 27,229 | py | Python | pertama/buahbatu.py | alitkurniawan48/BelajarGIS | c52556bc6fa74b849b9c3461410805807b742967 | [
"MIT"
] | 2 | 2020-02-09T14:47:07.000Z | 2020-02-09T14:47:12.000Z | pertama/buahbatu.py | alitkurniawan48/BelajarGIS | c52556bc6fa74b849b9c3461410805807b742967 | [
"MIT"
] | 12 | 2019-12-11T06:45:59.000Z | 2020-01-06T09:35:35.000Z | pertama/buahbatu.py | alitkurniawan48/BelajarGIS | c52556bc6fa74b849b9c3461410805807b742967 | [
"MIT"
] | 71 | 2019-12-09T13:52:54.000Z | 2021-05-28T16:19:09.000Z | import shapefile
class buahbatu:
def __init__(self):
self.kelurahan = shapefile.Writer(
'kelurahan_buahbatu', shapeType=shapefile.POLYGON)
self.kelurahan.shapeType
self.kelurahan.field('kelurahan_di_buahbatu', 'C')
self.kantor = shapefile.Writer(
'kantor_kelurahan_buahbatu', shapeType=shapefile.POINT)
self.kantor.shapeType
self.kantor.field('kantor_kelurahan_di_buahbatu', 'C')
self.jalan = shapefile.Writer(
'jalan_buahbatu', shapeType=shapefile.POLYLINE)
self.jalan.shapeType
self.jalan.field('jalan_di_buahbatu', 'C')
# Kelurahan
def kelurahanCijaura(self, nama):
self.kelurahan.record(nama)
self.kelurahan.poly([[
[107.6420218,-6.9455508,0],
[107.6409556,-6.9457265,0],
[107.6402046,-6.9460247,0],
[107.6398399,-6.9461685,0],
[107.6397648,-6.9466371,0],
[107.6398291,-6.9470525,0],
[107.6395716,-6.9474465,0],
[107.639518,-6.9480003,0],
[107.6393463,-6.9483677,0],
[107.6392605,-6.9488363,0],
[107.6393463,-6.9493049,0],
[107.639518,-6.949683,0],
[107.6397433,-6.9500238,0],
[107.6396467,-6.9502847,0],
[107.6395073,-6.9508971,0],
[107.6392605,-6.9512432,0],
[107.6392069,-6.951632,0],
[107.639003,-6.9520313,0],
[107.6387992,-6.9523562,0],
[107.6389172,-6.9525425,0],
[107.6390674,-6.9527502,0],
[107.6391532,-6.9531549,0],
[107.6390459,-6.9533732,0],
[107.6390781,-6.9535916,0],
[107.6391532,-6.9538631,0],
[107.6391747,-6.9540708,0],
[107.6392605,-6.9544755,0],
[107.6395824,-6.9546033,0],
[107.6399257,-6.9547151,0],
[107.6402583,-6.9549654,0],
[107.6401081,-6.9552849,0],
[107.6400866,-6.9556789,0],
[107.640269,-6.956041,0],
[107.6404729,-6.956254,0],
[107.6406982,-6.9562966,0],
[107.640902,-6.95668,0],
[107.6410737,-6.9569037,0],
[107.6413633,-6.9569729,0],
[107.6416423,-6.9571007,0],
[107.6418998,-6.9572072,0],
[107.6420929,-6.9572232,0],
[107.642447,-6.9572658,0],
[107.6426294,-6.9577344,0],
[107.6426186,-6.9580326,0],
[107.6429083,-6.9580592,0],
[107.6434233,-6.9579367,0],
[107.6434447,-6.9582296,0],
[107.643552,-6.9584852,0],
[107.6438954,-6.9584852,0],
[107.6441958,-6.9585917,0],
[107.6447107,-6.9585917,0],
[107.6451828,-6.9587195,0],
[107.6456763,-6.9587035,0],
[107.6455905,-6.9589325,0],
[107.6455905,-6.9592307,0],
[107.6457622,-6.9594436,0],
[107.646084,-6.9595075,0],
[107.6464274,-6.9595714,0],
[107.6467278,-6.9596566,0],
[107.647114,-6.9597046,0],
[107.6473715,-6.959614,0],
[107.6478006,-6.959614,0],
[107.6481976,-6.9595981,0],
[107.6484015,-6.9596992,0],
[107.6487448,-6.959843,0],
[107.6491418,-6.9598111,0],
[107.6494958,-6.9599495,0],
[107.6494851,-6.9601412,0],
[107.649528,-6.9606205,0],
[107.6496782,-6.9607802,0],
[107.6498391,-6.9609932,0],
[107.6500215,-6.9611849,0],
[107.6501932,-6.961547,0],
[107.6501181,-6.9620262,0],
[107.6500752,-6.9627078,0],
[107.650043,-6.963613,0],
[107.6501503,-6.9641775,0],
[107.6501181,-6.9645608,0],
[107.6506331,-6.9646993,0],
[107.6513841,-6.9648164,0],
[107.6522209,-6.9649762,0],
[107.6531651,-6.9650241,0],
[107.6539805,-6.9652371,0],
[107.6553537,-6.9653862,0],
[107.6571884,-6.965711,0,],
[107.6583793,-6.9660252,0],
[107.659302,-6.9660039,0],
[107.6600315,-6.9662861,0],
[107.6606793,-6.9664458,0],
[107.6606578,-6.9662541,0],
[107.6602246,-6.9654714,0],
[107.6598384,-6.9648963,0],
[107.6595313,-6.9642414,0],
[107.6593865,-6.9636503,0],
[107.6592577,-6.96299,0],
[107.6591933,-6.9624309,0],
[107.6593435,-6.9617493,0],
[107.6595313,-6.9614139,0],
[107.6593865,-6.9608121,0],
[107.6591451,-6.9607003,0],
[107.6593382,-6.9603329,0],
[107.6594025,-6.9600294,0],
[107.659542,-6.9594277,0],
[107.65966,-6.9591295,0],
[107.6596922,-6.9588952,0],
[107.6589519,-6.9585544,0],
[107.6579434,-6.9581604,0],
[107.6573426,-6.9576279,0],
[107.6561906,-6.9565256,0],
[107.6553537,-6.9557162,0],
[107.6540019,-6.9556097,0],
[107.6484658,-6.9550772,0],
[107.6449468,-6.954779,0],
[107.6412775,-6.9543104,0],
[107.6403911,-6.9541241,0],
[107.6414277,-6.9500291,0],
[107.641582,-6.9486872,0],
[107.6417697,-6.9478565,0],
[107.6418998,-6.9467063,0],
[107.6420285,-6.9456839,0],
[107.6420218,-6.9455508,0],
]])
def Sekejati(self, nama):
self.kelurahan.record(nama)
self.kelurahan.poly([[
[107.6419038,-6.9455401,0],
[107.641873,-6.9462684,0],
[107.6416517,-6.9478458,0],
[107.6415082,-6.9485475,0],
[107.6414492,-6.9491345,0],
[107.6431551,-6.9493369,0],
[107.6432731,-6.9476861,0],
[107.646642,-6.9482719,0],
[107.6466527,-6.9479311,0],
[107.6481977,-6.9481867,0],
[107.6482728,-6.9478991,0],
[107.6491257,-6.9481428,0],
[107.6497158,-6.9482745,0],
[107.6500323,-6.948208,0],
[107.6521352,-6.9486979,0],
[107.6525267,-6.9482106,0],
[107.6531651,-6.948421,0],
[107.6533261,-6.9481654,0],
[107.6529291,-6.9494966,0],
[107.6549729,-6.9516799,0],
[107.6585027,-6.9524893,0],
[107.6584813,-6.9527436,0],
[107.6583311,-6.953501,0],
[107.6588031,-6.9536181,0],
[107.6594039,-6.9535968,0],
[107.6601013,-6.9536421,0],
[107.6606377,-6.9538125,0],
[107.6608845,-6.9538512,0],
[107.6611206,-6.9530844,0],
[107.6613566,-6.9525519,0],
[107.6616355,-6.9510183,0],
[107.6617857,-6.9501237,0],
[107.6622364,-6.9499107,0],
[107.662408,-6.9492291,0],
[107.6626011,-6.9477594,0],
[107.6626451,-6.9469332,0],
[107.6630088,-6.9455655,0],
[107.6634165,-6.9448839,0],
[107.6636096,-6.9435206,0],
[107.6636096,-6.9422639,0],
[107.6637813,-6.9409859,0],
[107.6638671,-6.939857,0],
[107.6639932,-6.9391221,0],
[107.6628667,-6.9392552,0],
[107.6616865,-6.9394256,0],
[107.6602274,-6.9397451,0],
[107.6589882,-6.940022,0],
[107.6577222,-6.9404108,0],
[107.6561075,-6.940922,0],
[107.6555925,-6.9411137,0],
[107.6542085,-6.9415557,0],
[107.6520949,-6.9421894,0],
[107.6509362,-6.9425994,0],
[107.6499974,-6.9428923,0],
[107.6473152,-6.9437336,0],
[107.6443594,-6.9446336,0],
[107.6430183,-6.9450862,0],
[107.6419038,-6.9455401,0],
]])
def KelurahanJatisari(self, nama):
self.kelurahan.record(nama)
self.kelurahan.poly([[
[107.6540824,-6.9415091,0],
[107.6559278,-6.9409979,0],
[107.6580736,-6.9402949,0],
[107.6597902,-6.9398476,0],
[107.6605841,-6.9396772,0],
[107.6619574,-6.939379,0],
[107.6641192,-6.9391128,0],
[107.6657983,-6.9391234,0],
[107.6677939,-6.9388465,0],
[107.6696822,-6.9386761,0],
[107.6695749,-6.9379732,0],
[107.669253,-6.9370786,0],
[107.6689741,-6.9364608,0],
[107.6683947,-6.9356301,0],
[107.6676866,-6.9347568,0],
[107.6671716,-6.9338196,0],
[107.6667425,-6.9330314,0],
[107.6667854,-6.9324563,0],
[107.6653048,-6.9318599,0],
[107.6641246,-6.9313913,0],
[107.6592323,-6.9295594,0],
[107.6591035,-6.9309866,0],
[107.6588675,-6.932009,0],
[107.6586744,-6.9322007,0],
[107.659125,-6.9327758,0],
[107.6589319,-6.9335213,0],
[107.6588675,-6.9360987,0],
[107.6581808,-6.935907,0],
[107.6580736,-6.9367591,0],
[107.6550266,-6.9360987,0],
[107.6550909,-6.9373981,0],
[107.6546832,-6.9375685,0],
[107.6540824,-6.9415091,0],
]])
def kelurahanMargasari(self, nama):
self.kelurahan.record(nama)
self.kelurahan.poly([[
[107.6403053,-6.9540921,0],
[107.6411917,-6.9542784,0],
[107.6424631,-6.9544701,0],
[107.6435252,-6.9546432,0],
[107.644861,-6.954747,0],
[107.6471301,-6.9548988,0],
[107.6489218,-6.9550878,0],
[107.651014,-6.9553035,0],
[107.6531597,-6.9555804,0],
[107.6552679,-6.9556842,0],
[107.655799,-6.9563046,0],
[107.6569363,-6.9573269,0],
[107.6578576,-6.9581284,0],
[107.6588661,-6.9585224,0],
[107.6602837,-6.9592226,0],
[107.6616784,-6.9598829,0],
[107.663395,-6.9603089,0],
[107.6650258,-6.9608201,0],
[107.6668283,-6.9612035,0],
[107.6683303,-6.9615017,0],
[107.6693174,-6.9617147,0],
[107.6708623,-6.9617785,0],
[107.6720425,-6.9619489,0],
[107.6722785,-6.9612035,0],
[107.6725146,-6.9601598,0],
[107.6725575,-6.9592226,0],
[107.6725146,-6.9582641,0],
[107.6724073,-6.9556869,0],
[107.6723214,-6.9543237,0],
[107.6691457,-6.9533865,0],
[107.668223,-6.9531735,0],
[107.6673003,-6.952854,0],
[107.6666995,-6.9530031,0],
[107.6662275,-6.9536421,0],
[107.6630088,-6.9532587,0],
[107.6627084,-6.9536847,0],
[107.6611849,-6.9534504,0],
[107.6610884,-6.9537353,0],
[107.6606699,-6.9537486,0],
[107.6601335,-6.9535782,0],
[107.6594361,-6.9535329,0],
[107.6588353,-6.9535542,0],
[107.6583633,-6.9534371,0],
[107.6585027,-6.9528966,0],
[107.6585349,-6.9524254,0],
[107.6567003,-6.9520446,0],
[107.6557347,-6.9518103,0],
[107.6550051,-6.951616,0],
[107.6539537,-6.9505536,0],
[107.6529613,-6.9494327,0],
[107.6533583,-6.9481015,0],
[107.6531973,-6.9483571,0],
[107.6525589,-6.9481467,0],
[107.6521674,-6.948634,0],
[107.6506439,-6.9482719,0],
[107.6500645,-6.9481441,0],
[107.649748,-6.9482106,0],
[107.6494208,-6.9481015,0],
[107.6489326,-6.9480402,0],
[107.648305,-6.9478352,0],
[107.6482299,-6.9481228,0],
[107.6466849,-6.9478672,0],
[107.6466742,-6.948208,0],
[107.6433053,-6.9476222,0],
[107.6431873,-6.949273,0],
[107.6414814,-6.9490706,0],
[107.6413419,-6.9499971,0],
[107.6410576,-6.9509796,0],
[107.6408645,-6.9519594,0],
[107.640607,-6.9529392,0],
[107.6403053,-6.9540921,0],
]])
# Kantor Kelurahan
def kantorKelurahanCijawura(self, nama):
self.kantor.record(nama)
self.kantor.point( 107.6552385,-6.9559026)
def kantorKelurahanMergasari(self, nama):
self.kantor.record(nama)
self.kantor.point( 107.648148,-6.9512326)
def kantorKelurahanSekejati(self, nama):
self.kantor.record(nama)
self.kantor.point(107.6619547,-6.9467622)
def kantorKelurahanJatisari(self, nama):
self.kantor.record(nama)
self.kantor.point( 107.6596735,-6.9337663)
# Jalan
def jalanKelurahanCijawura(self, nama):
self.jalan.record(nama)
self.jalan.line([[
[107.6566048,-6.9570187,0],
[107.6568223,-6.9565919,0],
[107.6561571,-6.9561446,0],
[107.6568867,-6.9566132,0],
[107.6569082,-6.9559103,0],
[107.6575733,-6.955889,0],
[107.657745,-6.9554204,0],
[107.6574446,-6.9552074,0],
[107.6568009,-6.9551648,0],
[107.6569296,-6.954824,0],
[107.6564575,-6.9547175,0],
[107.6563932,-6.9549731,0],
[107.6564575,-6.9546323,0],
[107.6558996,-6.954611,0],
[107.6558996,-6.955037,0],
[107.656243,-6.9551435,0],
[107.6561571,-6.9555695,0],
[107.6561357,-6.9559955,0],
[107.6558567,-6.9557399,0],
[107.6553847,-6.9555482,0],
[107.6553417,-6.9551222,0],
[107.6547838,-6.9552074,0],
[107.6542474,-6.9551435,0],
[107.6541616,-6.9547175,0],
[107.6540543,-6.9541211,0],
[107.6539685,-6.9536099,0],
[107.6547409,-6.9537803,0],
[107.6553417,-6.9538016,0],
[107.6553847,-6.9532904,0],
[107.654934,-6.9530987,0],
[107.6543118,-6.9529496,0],
[107.6539899,-6.9534182,0],
[107.6534106,-6.9534395,0],
[107.6529385,-6.953333,0],
[107.652445,-6.95312,0],
[107.6517798,-6.9530135,0],
[107.6513506,-6.952694,0],
[107.6515223,-6.9522467,0],
[107.6514794,-6.9518207,0],
[107.6517369,-6.9512882,0],
[107.6520158,-6.9504788,0],
[107.6522733,-6.9498824,0],
[107.6520158,-6.949712,0],
[107.6511575,-6.9495203,0],
[107.6504065,-6.9492434,0],
[107.6507498,-6.9483914,0],
[107.6504494,-6.949286,0],
[107.6496984,-6.9491582,0],
[107.6492907,-6.9489026,0],
[107.6489259,-6.9488174,0],
[107.6484324,-6.9487535,0],
[107.6485826,-6.9480932,0],
[107.6483895,-6.9487535,0],
[107.6491834,-6.94886,0],
[107.6495267,-6.9492647,0],
[107.6497842,-6.9496907,0],
[107.6497842,-6.9502871,0],
[107.6495267,-6.9503936,0],
[107.6497627,-6.9508196,0],
[107.6497198,-6.9510752,0],
[107.6497198,-6.9503936,0],
[107.6496984,-6.9491156,0],
[107.6507069,-6.9494138,0],
[107.651415,-6.9496055,0],
[107.651179,-6.9500954,0],
[107.6510931,-6.9506279,0],
[107.6513292,-6.9496694,0],
[107.652166,-6.9497972,0],
[107.6525952,-6.9500102,0],
[107.6525308,-6.9503084,0],
[107.6528741,-6.9502232,0],
[107.653196,-6.9503936,0],
[107.6531316,-6.95099,0],
[107.6529814,-6.9517994,0],
[107.6529814,-6.9522254,0],
[107.6527883,-6.9523958,0],
[107.6530458,-6.9521402,0],
[107.6534749,-6.9523319,0],
[107.6536466,-6.952481,0],
[107.6537539,-6.9521402,0],
[107.6542474,-6.9522254,0],
[107.6544191,-6.9523106,0],
[107.6538397,-6.9520976,0],
[107.6535822,-6.9525662,0],
[107.6537539,-6.9527579,0],
[107.653668,-6.9529922,0],
[107.653668,-6.9532478,0],
[107.653711,-6.952907,0],
]])
def jalankencanaarum(self, nama):
self.jalan.record(nama)
self.jalan.line([[
[107.6513077,-6.9643662,0],
[107.6513935,-6.9636633,0],
[107.6522518,-6.9639189,0],
[107.6513935,-6.9637272,0],
[107.6513935,-6.9628113,0],
[107.6514794,-6.962364,0],
[107.6509,-6.962364,0],
[107.6515008,-6.962364,0],
[107.6515652,-6.9617038,0],
[107.6515223,-6.9605962,0],
[107.6522089,-6.9605749,0],
[107.6531101,-6.9605323,0],
[107.6531101,-6.9614482,0],
[107.6536251,-6.9615121,0],
[107.6538397,-6.9612778,0],
[107.6538397,-6.9604045,0],
[107.6540114,-6.9597655,0],
[107.6545693,-6.9595738,0],
[107.6552988,-6.959659,0],
[107.6563073,-6.9598933,0],
[107.6563073,-6.9605962,0],
[107.6563073,-6.9610222,0],
[107.6573158,-6.9614695,0],
[107.6579596,-6.9616399,0],
[107.6580883,-6.9611926,0],
[107.6580454,-6.9610009,0],
[107.6584316,-6.9609583,0],
[107.6586891,-6.9609157,0],
[107.6588179,-6.9606175,0],
[107.6583029,-6.9605323,0],
[107.6578308,-6.9602554,0],
[107.6572729,-6.9600211,0],
[107.6568438,-6.9592969,0],
[107.656479,-6.958807,0],
[107.656243,-6.9587431,0],
[107.6563073,-6.9591478,0],
[107.6564146,-6.959659,0],
[107.6563717,-6.9591691,0],
[107.655964,-6.9592117,0],
[107.6551915,-6.9590413,0],
[107.6550843,-6.9586153,0],
[107.6547624,-6.9582319,0],
[107.6545049,-6.9577633,0],
[107.654183,-6.9575929,0],
[107.6541616,-6.9581893,0],
[107.6539685,-6.9585301,0],
[107.6535822,-6.9584875,0],
[107.6538397,-6.9585514,0],
[107.6537968,-6.9589561,0],
[107.6537324,-6.9591691,0],
[107.6540114,-6.9585727,0],
[107.6542259,-6.9580402,0],
[107.6542259,-6.9574438,0],
[107.6541401,-6.9566558,0],
[107.6543547,-6.9560168,0],
[107.6547409,-6.9561659,0],
[107.6549126,-6.9570178,0],
[107.6559426,-6.9577633,0],
[107.6557709,-6.9570391,0],
[107.655799,-6.9563046,0],
[107.6553632,-6.9564428,0],
[107.6552385,-6.9559026,0],
[107.6554276,-6.9564854,0],
[107.6557561,-6.9563792,0],
[107.6558996,-6.9576781,0],
[107.6565434,-6.9580402,0],
[107.6568009,-6.9580615,0],
[107.6569725,-6.9586366,0],
[107.6568867,-6.9582958,0],
[107.6568009,-6.9581254,0],
[107.6565005,-6.9580402,0],
[107.6558996,-6.9577846,0],
]])
def jalankewaluyanindah(self, nama):
self.jalan.record(nama)
self.jalan.line([[
[107.660096,-6.9303855,0],
[107.6600101,-6.9310671,0],
[107.6603749,-6.9311523,0],
[107.6599672,-6.9310245,0],
[107.6599458,-6.9314505,0],
[107.6598385,-6.9319192,0],
[107.6597741,-6.9321961,0],
[107.6604608,-6.9324517,0],
[107.6606539,-6.9325156,0],
[107.6609757,-6.9318553,0],
[107.6612118,-6.931344,0],
[107.6606539,-6.9325369,0],
[107.6603964,-6.9332398,0],
[107.6606324,-6.9325369,0],
[107.6611259,-6.9327925,0],
[107.6615766,-6.9319618,0],
[107.6611474,-6.9327925,0],
[107.6608255,-6.9332824,0],
[107.6611259,-6.9328138,0],
[107.6614693,-6.9329842,0],
[107.6618555,-6.9321109,0],
[107.6614693,-6.9329842,0],
[107.6613191,-6.9333037,0]
]])
def jalansanggarkencana(self, nama):
self.jalan.record(nama)
self.jalan.line([[
[107.6649722,-6.9318979,0],
[107.6647255,-6.9330694,0],
[107.6666245,-6.9333996,0],
[107.6646933,-6.9330481,0],
[107.6646075,-6.9336978,0],
[107.6644573,-6.9343794,0],
[107.6643821,-6.9347522,0],
[107.6662812,-6.9350504,0],
[107.6647362,-6.9347948,0],
[107.6650581,-6.9331546,0],
[107.664983,-6.9335167,0],
[107.6662704,-6.9337404,0],
[107.6649937,-6.9335167,0],
[107.6648971,-6.933996,0],
[107.6648649,-6.9341557,0],
[107.6662168,-6.934422,0],
[107.6648542,-6.9341344,0],
[107.6647791,-6.9344753,0],
[107.6661846,-6.9347096,0],
[107.6647684,-6.9344646,0],
[107.6647255,-6.9348161,0],
[107.6643285,-6.9347096,0],
[107.663835,-6.9345924,0],
[107.664071,-6.9335167,0],
[107.6638242,-6.9345179,0],
[107.6637491,-6.9349226,0],
[107.6638242,-6.9353273,0],
[107.6637491,-6.9354018,0],
[107.6633093,-6.9351462,0],
[107.6626226,-6.9347628,0],
[107.6621184,-6.9345498,0],
[107.6614532,-6.934209,0],
[107.6610777,-6.9340279,0],
[107.6604661,-6.9336978,0],
[107.6601443,-6.9334528,0],
[107.6597151,-6.9331972,0],
[107.6596507,-6.9332718,0],
[107.6602515,-6.9335167,0]
]])
def jalancijawura(self, nama):
self.jalan.record(nama)
self.jalan.line([[
[107.6470819,-6.9478626,0],
[107.647157,-6.9475537,0],
[107.6459125,-6.9473514,0],
[107.6471677,-6.9475431,0],
[107.6473072,-6.9466484,0],
[107.6473287,-6.946478,0],
[107.647908,-6.9466058,0],
[107.6472965,-6.9464887,0],
[107.647436,-6.9458603,0],
[107.6481011,-6.9458497,0],
[107.6479939,-6.9465632,0],
[107.6481011,-6.945839,0],
[107.6482299,-6.9450722,0],
[107.6482835,-6.9443693,0],
[107.6482943,-6.9441989,0],
[107.6477364,-6.944135,0],
[107.6476934,-6.9446675,0],
[107.6476827,-6.9441563,0],
[107.647393,-6.9440498,0],
[107.6473716,-6.9445397,0],
[107.6473823,-6.9440498,0],
[107.646921,-6.9440285,0],
[107.647554,-6.9440924,0],
[107.6479831,-6.9441883,0],
[107.6487127,-6.9442309,0],
[107.6490238,-6.9443587,0],
[107.648938,-6.9449444,0],
[107.6488736,-6.9455515,0],
[107.6488092,-6.9462544,0],
[107.6487449,-6.9467869,0],
[107.6496676,-6.9469999,0],
[107.6487449,-6.9467763,0],
[107.6486698,-6.9472342,0],
[107.6486376,-6.9476709,0],
[107.6485947,-6.9479371,0],
[107.648659,-6.9474898,0],
[107.649174,-6.9475111,0],
[107.6494101,-6.9475857,0],
[107.6493993,-6.9478945,0],
[107.6493993,-6.9475963,0],
[107.649174,-6.9475324,0],
[107.648659,-6.9475005,0],
[107.6487663,-6.9465313,0],
[107.6489702,-6.9447421,0],
[107.6490238,-6.944348,0],
[107.6495817,-6.9443906,0],
[107.6501825,-6.9443161,0],
[107.6503757,-6.9442309,0],
[107.6503435,-6.9445291,0],
[107.6503757,-6.944774,0],
[107.6508585,-6.9447314,0],
[107.6503864,-6.944806,0],
[107.6503864,-6.9451681,0],
[107.650955,-6.9451468,0],
[107.6503757,-6.9451468,0],
[107.6504293,-6.9455515,0],
[107.6508906,-6.9454556,0],
[107.65044,-6.9455408,0],
[107.65044,-6.9457858,0],
[107.6510408,-6.9457645,0],
[107.6507619,-6.9457645,0],
[107.6507619,-6.9461692,0],
[107.6507726,-6.9463822,0],
[107.650558,-6.9463609,0],
[107.6507619,-6.9463928,0],
[107.6507404,-6.9467336,0],
[107.6504829,-6.9467017,0],
[107.6507619,-6.9467443,0],
[107.6507297,-6.9470319,0],
[107.651588,-6.9471703,0],
[107.6517489,-6.9465313,0],
[107.6521459,-6.9465952,0],
[107.6520279,-6.9472449,0],
[107.652457,-6.9474046,0],
[107.6525858,-6.9468295,0],
[107.6526502,-6.9466591,0],
[107.6532188,-6.9467763,0],
[107.6532188,-6.9470319,0],
[107.6532939,-6.946936,0],
[107.6533046,-6.9465739,0],
[107.6532939,-6.9459775,0],
[107.6532939,-6.9464248,0],
[107.6531544,-6.9459668,0],
[107.6529398,-6.9458497,0],
[107.6527682,-6.9457538,0],
[107.6532081,-6.9459775,0],
[107.6533046,-6.9463822,0],
[107.6532832,-6.9458284,0],
]])
def close(self):
self.kelurahan.close()
self.kantor.close()
self.jalan.close()
| 39.750365 | 67 | 0.460649 | 3,201 | 27,229 | 3.913777 | 0.341456 | 0.186143 | 0.012452 | 0.006785 | 0.073436 | 0.058429 | 0.055316 | 0.048132 | 0.048132 | 0.048132 | 0 | 0.63656 | 0.354695 | 27,229 | 684 | 68 | 39.80848 | 0.076433 | 0.001175 | 0 | 0.06525 | 0 | 0 | 0.004634 | 0.002721 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022762 | false | 0 | 0.001517 | 0 | 0.025797 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
75e426829e02f525615a430b5ddff4f7ebdefe73 | 6,481 | py | Python | Vision/orange_cone_probability/make_orange_cone_probability.py | buthowz/elcano | 3489d7bb1c6f9fd5951b210dc974c7e8bad911ee | [
"MIT"
] | 65 | 2015-03-05T03:19:17.000Z | 2022-03-11T12:39:27.000Z | Vision/orange_cone_probability/make_orange_cone_probability.py | buthowz/elcano | 3489d7bb1c6f9fd5951b210dc974c7e8bad911ee | [
"MIT"
] | 44 | 2015-12-09T01:27:27.000Z | 2019-06-14T18:09:24.000Z | Vision/orange_cone_probability/make_orange_cone_probability.py | buthowz/elcano | 3489d7bb1c6f9fd5951b210dc974c7e8bad911ee | [
"MIT"
] | 71 | 2015-02-13T21:09:07.000Z | 2019-10-30T06:43:39.000Z | # Run all three parts:
# Histogram the cones.
# Histogram the backgrounds.
# Compute the conditional probability of orange cone given color.
#
# Example command line, for work in a directory called "vision_work", a single
# cone image "orange_cones.png" and background images in "backgrounds":
#
# python make_orange_cone_probabilities.py \
# --directory "vision_work" \
# --orange_cone_images "orange_cones.png" \
# --background_images "backgrounds" \
# --orange_cone_histogram "orange.csv" \
# --background_histogram "backgrounds.csv" \
# --orange_cone_probability_table "ocp.csv" \
# --orange_cone_probability_object "ocp.pkl" \
# --skip_color "255,255,255" \
# --binsize 4
#
# (Caution -- don't run this in your elcano git repository unless you really
# want to change the csv files there, else you'll have a spurious change.)
if __name__ == '__main__':
from orange_cone_probability import *
import argparse
import os
parser = argparse.ArgumentParser(
description = """
Generate table of conditional probability of an orange cone, given
a color.
""",
usage = """
python make_orange_cone_probabilities.py
--directory [If provided, will cd to this before attempting to
look up images. This is also where outputs will be written, else
to current directory.]
--orange_cone_images [Comma separated list of orange cone images.
If this is a directory, all files in the directory will be processed.]
--background_images [Comma separated list of background images.
If this is a directory, all files in the directory will be processed.]
--orange_cone_histogram [Name of file to receive the histogram of
orange colors, as a csv file.]
--background_histogram [Name of file to receive the histogram of
background colors, as a csv file.]
--orange_cone_probability_table [Name of file to receive the
orange cone conditional probability table, as a csv file.]
--orange_cone_probability_object [Name of file to receive the
pickled OrangeConeProbability object.]
--skip_color [Color to ignore when processing images, as an (r,g,b)
tuple with r,g,b in the range 0-255. If orange cones were cropped
and placed into a single image with a background color, supply
that here. Default is white. For preference, use a transparent
background and disable this by setting it to None. Background
images with orange cones cropped out will likely require the
holes to be transparent, as all colors are expected to be legal
in backgrounds.]
--binsize [At what granularity should r,g,b be binned in the
probability table indices? Default is 4.]
""")
parser.add_argument(
"--directory", dest=DIR,
help="""
If provided, will cd to this before attempting to look up images.
This is also where outputs will be written, else to current directory.
""")
parser.add_argument(
"--orange_cone_images", dest=CONEIMGS,
help="""
Comma separated list of orange cone images.
""")
parser.add_argument(
"--background_images", dest=BGIMGS,
help="""
Comma separated list of background images.
""")
parser.add_argument(
"--orange_cone_histogram", dest=CONEHIST,
help="""
Name of file to receive the histogram of orange colors, as a csv file.
""")
parser.add_argument(
"--background_histogram", dest=BGHIST,
help="""
Name of file to receive the histogram of background colors, as a csv file.
""")
parser.add_argument(
"--orange_cone_probability_table", dest=CONETBL,
help="""
Name of file to receive the orange cone conditional probability table,
as a csv file.
""")
parser.add_argument(
"--orange_cone_probability_object", dest=CONEOBJ,
help="""
Name of file to receive the pickled OrangeConeProbability object.
""")
parser.add_argument(
"--skip_color", dest=SKIP,
help="""
Color to ignore when processing images, as a comma-separated triple r,g,b with
values in the range 0-255. If orange cones were cropped and placed into a
single image with a background color other than white, supply that here.
For preference, use a transparent background and disable this by setting it
to False. Background images with orange cones cropped out will likely require
the holes to be transparent, as all colors are expected to be legal in
backgrounds.
""")
parser.add_argument(
"--binsize", dest=BIN,
help="""
At what granularity should r,g,b be binned in the probability table indices?
Default is 4.
""")
args = vars(parser.parse_args())
if args[DIR]:
os.chdir(args[DIR])
if args[SKIP]:
if args[SKIP] == "False":
args[SKIP] = False
else:
args[SKIP] = tuple(int(n) for n in args[SKIP].split(","))
else:
args[SKIP] = SKIP_COLOR
if args[BIN]:
args[BIN] = int(args[BIN])
else:
args[BIN] = BINSIZE
# First step is to histogram the orange cones by themselves. This is done
# first so we'll know the colors that are in the orange cones, which are a
# very small subset of all r,g,b space. Histograms and the final
# probability table are stored in dicts, which are hash tables, keyed by
# the r,g,b values, and we don't need to store values for anything but the
# orange colors, so this yields a much smaller storage requirement.
args[CONEIMGS] = [img.strip() for img in args[CONEIMGS].split(",")]
total = process_images(args[CONEHIST], "", args[CONEIMGS], args[SKIP], args[BIN])
print "Total # pixels included in cone histogram = %d" % total
# Next histogram the backgrounds.
args[BGIMGS] = [img.strip() for img in args[BGIMGS].split(",")]
total = process_images(args[CONEHIST], args[BGHIST], args[BGIMGS], args[SKIP], args[BIN])
print "Total # pixels included in background histogram = %d" % total
# And finally, compute the conditional probability that a pixel belongs to
# an orange cone, given the color.
ocp = ocp_from_histograms(args[CONEHIST], args[BGHIST])
ocp.write_ocp_csv(args[CONETBL])
ocp.write_ocp(args[CONEOBJ])
print "Orange cone probability table and object written." | 42.638158 | 93 | 0.671656 | 890 | 6,481 | 4.804494 | 0.232584 | 0.053789 | 0.035781 | 0.022451 | 0.524088 | 0.506782 | 0.481993 | 0.399673 | 0.395697 | 0.344247 | 0 | 0.004068 | 0.241321 | 6,481 | 152 | 94 | 42.638158 | 0.865568 | 0.207684 | 0 | 0.286957 | 0 | 0 | 0.651714 | 0.057003 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.026087 | null | null | 0.026087 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
75edc1e707ccc7b34ce9fb214f02dc2e86b0753d | 1,343 | py | Python | government/migrations/0002_auto_20161123_1157.py | openkamer/openkamer | 732facf01f2bb4d1649b0c6892466ae9e0982bd6 | [
"MIT"
] | 33 | 2016-05-12T13:16:23.000Z | 2022-03-11T10:21:26.000Z | government/migrations/0002_auto_20161123_1157.py | openkamer/openkamer | 732facf01f2bb4d1649b0c6892466ae9e0982bd6 | [
"MIT"
] | 69 | 2016-05-23T15:35:39.000Z | 2021-12-13T19:46:21.000Z | government/migrations/0002_auto_20161123_1157.py | openkamer/openkamer | 732facf01f2bb4d1649b0c6892466ae9e0982bd6 | [
"MIT"
] | 5 | 2016-05-17T19:49:05.000Z | 2020-06-09T13:37:25.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-23 10:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('government', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='government',
name='date_dissolved',
field=models.DateField(blank=True, db_index=True, null=True),
),
migrations.AlterField(
model_name='government',
name='date_formed',
field=models.DateField(db_index=True),
),
migrations.AlterField(
model_name='governmentmember',
name='end_date',
field=models.DateField(blank=True, db_index=True, null=True),
),
migrations.AlterField(
model_name='governmentmember',
name='start_date',
field=models.DateField(db_index=True),
),
migrations.AlterField(
model_name='governmentposition',
name='position',
field=models.CharField(choices=[('MIN', 'Minister'), ('MWP', 'Minister zonder portefeuille'), ('SOS', 'Staatssecretaris'), ('PMI', 'Minister-president'), ('DPM', 'Viceminister-president')], db_index=True, max_length=3),
),
]
| 32.756098 | 231 | 0.594192 | 130 | 1,343 | 5.976923 | 0.469231 | 0.1287 | 0.160875 | 0.186615 | 0.487773 | 0.487773 | 0.487773 | 0.352638 | 0.352638 | 0.352638 | 0 | 0.022495 | 0.27178 | 1,343 | 40 | 232 | 33.575 | 0.771984 | 0.050633 | 0 | 0.545455 | 1 | 0 | 0.196541 | 0.017296 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.060606 | 0 | 0.151515 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
75f0c9c840093c64d86798812e068479a1adda05 | 381 | py | Python | AppDB/zkappscale/start_zookeeper.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | 2 | 2018-10-09T17:48:12.000Z | 2019-01-15T10:18:19.000Z | AppDB/zkappscale/start_zookeeper.py | christianbaun/appscale | c24ddfd987c8eed8ed8864cc839cc0556a8af3c7 | [
"Apache-2.0"
] | null | null | null | AppDB/zkappscale/start_zookeeper.py | christianbaun/appscale | c24ddfd987c8eed8ed8864cc839cc0556a8af3c7 | [
"Apache-2.0"
] | 1 | 2022-02-20T20:57:12.000Z | 2022-02-20T20:57:12.000Z | """ A test script to start Zookeeper. """
import logging
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
import monit_interface
def run():
""" Starts up cassandra. """
logging.warning("Starting Zookeeper.")
monit_interface.start('zookeeper-9999', is_group=False)
logging.warning("Done!")
if __name__ == '__main__':
run()
| 21.166667 | 69 | 0.692913 | 50 | 381 | 4.98 | 0.66 | 0.11245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012158 | 0.136483 | 381 | 17 | 70 | 22.411765 | 0.744681 | 0.144357 | 0 | 0 | 0 | 0 | 0.176282 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | true | 0 | 0.363636 | 0 | 0.454545 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
75f7deeefd669eac22bee5691d04689613407396 | 907 | py | Python | src/lib/pointsManagement.py | nadimest/opentrons-colony-picker | 8097f12cab91398377463a3a76367b73fa0a2318 | [
"MIT"
] | null | null | null | src/lib/pointsManagement.py | nadimest/opentrons-colony-picker | 8097f12cab91398377463a3a76367b73fa0a2318 | [
"MIT"
] | 1 | 2021-06-15T09:40:58.000Z | 2021-06-15T09:40:58.000Z | src_old/lib/pointsManagement.py | nadimest/opentrons-colony-picker | 8097f12cab91398377463a3a76367b73fa0a2318 | [
"MIT"
] | null | null | null |
from math import hypot
''' Operation on a list of points with format (x,y) or (x,y,z) '''
class pointsManager():
def __init__(self):
self.elements=[]
self.redoCache=None
def add(self,point):
self.elements.append(point)
def undo(self):
self.redoCache=self.elements.pop()
def getPoints(self):
return self.elements
def redo(self):
self.elements.append(self.redoCache)
def remove(self,point):
if point in self.elements:
idx=self.elements.index(point)
self.elements.pop(idx)
def removeNearPoint(self,newpoint,distance_limit):
for point in self.elements:
difference=[x1 - x2 for (x1, x2) in zip(point, newpoint)]
dist= hypot(*difference)
if dist < distance_limit:
self.remove(point)
return True
return False | 23.25641 | 69 | 0.592062 | 111 | 907 | 4.783784 | 0.441441 | 0.20339 | 0.060264 | 0.071563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006329 | 0.303197 | 907 | 39 | 70 | 23.25641 | 0.833861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.28 | false | 0 | 0.04 | 0.04 | 0.48 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
75f82c57a7381cff919725fd197f188bcaa7b6fb | 353 | py | Python | ___init__.py | RebeccaHudson/sausage-linked-list | 54e2e0b2b6751aaf090f52a52ecac2e803cd5a4d | [
"MIT"
] | null | null | null | ___init__.py | RebeccaHudson/sausage-linked-list | 54e2e0b2b6751aaf090f52a52ecac2e803cd5a4d | [
"MIT"
] | null | null | null | ___init__.py | RebeccaHudson/sausage-linked-list | 54e2e0b2b6751aaf090f52a52ecac2e803cd5a4d | [
"MIT"
] | null | null | null | # What is this file about?? It is 'blank', I put a comment here as an
# explanation...
# see: http://stackoverflow.com/questions/448271/what-is-init-py-for
#refers to https://docs.python.org/2/tutorial/modules.html#packages,
#which refers to: The __init__.py files are required to make Python treat the directories as containing packages
#
#
#
#
#
#
| 29.416667 | 113 | 0.733711 | 56 | 353 | 4.553571 | 0.785714 | 0.047059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023102 | 0.141643 | 353 | 11 | 114 | 32.090909 | 0.818482 | 0.929178 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
75f90d8126630afed9ed9519c06fc5d300579d46 | 1,674 | py | Python | modules/dependencies/handlers.py | Multi-Agent-io/feecc-analytics-backend | 052d41a81b48f87f7ff33438c059b3087a45f5f3 | [
"Apache-2.0"
] | null | null | null | modules/dependencies/handlers.py | Multi-Agent-io/feecc-analytics-backend | 052d41a81b48f87f7ff33438c059b3087a45f5f3 | [
"Apache-2.0"
] | 1 | 2021-12-03T11:17:59.000Z | 2021-12-03T11:17:59.000Z | modules/dependencies/handlers.py | Multi-Agent-io/feecc-analytics-backend | 052d41a81b48f87f7ff33438c059b3087a45f5f3 | [
"Apache-2.0"
] | 1 | 2022-03-23T14:10:43.000Z | 2022-03-23T14:10:43.000Z | import typing as tp
from fastapi import Depends
from loguru import logger
from ..database import MongoDbWrapper
from ..exceptions import DatabaseException, ForbiddenActionException
from modules.routers.tcd.models import Protocol, ProtocolData
from ..models import User
from .security import get_current_user
async def handle_protocol(internal_id: str, protocol: Protocol, user: User = Depends(get_current_user)) -> ProtocolData:
if "approve" not in user.rule_set:
raise ForbiddenActionException(
details=f"You don't have access to process protocols. Your ruleset: {user.rule_set}"
)
logger.info(f"Processing protocol for unit {internal_id} with {len(protocol.rows)} rows")
passport = await MongoDbWrapper().get_concrete_passport(internal_id=internal_id)
if not passport:
raise DatabaseException(details=f"Unit with id {internal_id} not found. Can't create protocol")
latest_protocol = await MongoDbWrapper().get_concrete_protocol(internal_id=internal_id)
if not latest_protocol:
logger.debug(f"Creating new protocol for unit {internal_id}")
return ProtocolData(**protocol.dict(), associated_unit_id=internal_id)
logger.info(f"Found protocol for unit {internal_id}, status {latest_protocol.status}. Protocol will be updated")
latest_protocol.rows = protocol.rows
return latest_protocol
async def check_passport(internal_id: str) -> None:
passport = await MongoDbWrapper().get_concrete_passport(internal_id=internal_id)
if not passport:
# TODO: Create special exception for handling missing passports
raise ValueError(f"Passport {internal_id} not found")
| 42.923077 | 120 | 0.761649 | 217 | 1,674 | 5.714286 | 0.37788 | 0.112903 | 0.048387 | 0.055645 | 0.208065 | 0.147581 | 0.127419 | 0.127419 | 0.127419 | 0.127419 | 0 | 0 | 0.160693 | 1,674 | 38 | 121 | 44.052632 | 0.882562 | 0.03644 | 0 | 0.142857 | 0 | 0 | 0.238361 | 0.015518 | 0 | 0 | 0 | 0.026316 | 0 | 1 | 0 | false | 0.214286 | 0.285714 | 0 | 0.357143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
75fdb0a7c61bfd6efbfb8bcc3b7fd0621f731c85 | 1,330 | py | Python | tests/test.py | blavka/xComfortMQTT | 7ae1dd403706f3b57246c7522205b6a29a4dde27 | [
"MIT"
] | null | null | null | tests/test.py | blavka/xComfortMQTT | 7ae1dd403706f3b57246c7522205b6a29a4dde27 | [
"MIT"
] | 1 | 2020-12-28T19:23:24.000Z | 2021-01-06T15:05:03.000Z | tests/test.py | blavka/xComfortMQTT | 7ae1dd403706f3b57246c7522205b6a29a4dde27 | [
"MIT"
] | null | null | null | import unittest
from xComfortMQTT.config import load_config, ConfigError
import io
class TestCongig(unittest.TestCase):
def test_default(self):
fd = io.StringIO("""
shc:
host: 192.168.0.2
username: utest
password: ptest
""")
config = load_config(fd)
self.assertEqual(config['mqtt']['host'], '127.0.0.1')
self.assertEqual(config['mqtt']['port'], 1883)
self.assertEqual(config['mqtt']['prefix'], 'xcomfort')
def test_custom(self):
fd = io.StringIO("""
mqtt:
host: 192.168.0.1
port: 1990
prefix: aaa
shc:
host: 192.168.0.2
username: utest
password: ptest
""")
config = load_config(fd)
self.assertEqual(config['mqtt']['host'], '192.168.0.1')
self.assertEqual(config['mqtt']['port'], 1990)
self.assertEqual(config['mqtt']['prefix'], 'aaa')
self.assertEqual(config['shc']['host'], '192.168.0.2')
self.assertEqual(config['shc']['username'], 'utest')
self.assertEqual(config['shc']['password'], 'ptest')
def test_missing_shc_key(self):
fd = io.StringIO("""
mqtt:
host: 192.168.0.1
""")
with self.assertRaises(ConfigError) as cm:
load_config(fd)
self.assertEqual(cm.exception.args[0], "Missing key: 'shc'")
if __name__ == '__main__':
unittest.main()
| 23.333333 | 68 | 0.612782 | 168 | 1,330 | 4.75 | 0.291667 | 0.18797 | 0.236842 | 0.082707 | 0.516291 | 0.404762 | 0.378446 | 0.300752 | 0.300752 | 0.300752 | 0 | 0.06381 | 0.210526 | 1,330 | 56 | 69 | 23.75 | 0.69619 | 0 | 0 | 0.465116 | 0 | 0 | 0.273684 | 0 | 0 | 0 | 0 | 0 | 0.255814 | 1 | 0.069767 | false | 0.069767 | 0.069767 | 0 | 0.162791 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
f93090560e95dbca5462a8b18dc448af3f979213 | 1,132 | py | Python | tests/test_core.py | prodigyfinance/absolute | b0962f9d3cca6c027e442864d433c939f4cbc972 | [
"ISC"
] | 1 | 2019-07-13T14:15:36.000Z | 2019-07-13T14:15:36.000Z | tests/test_core.py | hodgestar/absolang | b0962f9d3cca6c027e442864d433c939f4cbc972 | [
"ISC"
] | null | null | null | tests/test_core.py | hodgestar/absolang | b0962f9d3cca6c027e442864d433c939f4cbc972 | [
"ISC"
] | 1 | 2018-07-10T11:09:15.000Z | 2018-07-10T11:09:15.000Z | # -*- coding: utf-8 -*-
""" Tests for absolutist.code. """
from unittest import TestCase
from absolang.core import absolutist_index, absolutist
class AbsolutistIndexTests(TestCase):
def check_index(self, text, value):
self.assertEqual(absolutist_index(text), value)
def test_no_absolutist_words(self):
self.check_index("The bigger dog is running.", 0 / 5.)
def test_one_absolutist_word(self):
self.check_index("He was completely bowled over.", 1 / 5.)
def test_negation_ignored(self):
self.check_index("He was not completely bowled over.", 0 / 6.)
def test_quantifier_ignored(self):
self.check_index("He was almost completely bowled over.", 0 / 6.)
def test_salutation_ignored(self):
self.check_index("Hello everyone.", 0 / 2.)
class AbsolutistTests(TestCase):
def check(self, text, value):
self.assertEqual(absolutist(text), value)
def test_less_than_one_percent(self):
self.check("The bigger dog is running.", False)
def test_more_than_one_percent(self):
self.check("He was completely bowled over.", True)
| 27.609756 | 73 | 0.689929 | 152 | 1,132 | 4.953947 | 0.375 | 0.065073 | 0.12085 | 0.119522 | 0.508632 | 0.359894 | 0.156707 | 0 | 0 | 0 | 0 | 0.012115 | 0.19788 | 1,132 | 40 | 74 | 28.3 | 0.817181 | 0.04417 | 0 | 0 | 0 | 0 | 0.184186 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 1 | 0.409091 | false | 0 | 0.090909 | 0 | 0.590909 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
f94257b7866becfc94dfdf8949c0c8f5b6960dcd | 350 | py | Python | codeEval/hard/robot_movements.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 25 | 2015-01-21T16:39:18.000Z | 2021-05-24T07:01:24.000Z | codeEval/hard/robot_movements.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 2 | 2020-09-30T19:39:36.000Z | 2020-10-01T17:15:16.000Z | codeEval/hard/robot_movements.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 15 | 2015-01-21T16:39:27.000Z | 2020-10-01T17:00:22.000Z | l = [[True] * 4 for _ in range(4)]
def s(r, c):
if r == 3 and c == 3:
return 1
elif max(r, c) > 3 or min(r, c) < 0:
return 0
elif not l[r][c]:
return 0
else:
l[r][c] = False
cnt = s(r + 1, c) + s(r - 1, c) + s(r, c + 1) + s(r, c - 1)
l[r][c] = True
return cnt
print s(0, 0)
| 18.421053 | 67 | 0.391429 | 70 | 350 | 1.942857 | 0.357143 | 0.117647 | 0.066176 | 0.058824 | 0.073529 | 0.073529 | 0 | 0 | 0 | 0 | 0 | 0.074257 | 0.422857 | 350 | 18 | 68 | 19.444444 | 0.59901 | 0 | 0 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.071429 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f94fd9f6a051157f8d906af83c085b176611035b | 150,106 | py | Python | pysnmp-with-texts/OMNI-gx2EDFA-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/OMNI-gx2EDFA-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/OMNI-gx2EDFA-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module OMNI-gx2EDFA-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/OMNI-gx2EDFA-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:33:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint")
gx2EDFA, = mibBuilder.importSymbols("GX2HFC-MIB", "gx2EDFA")
gi, motproxies = mibBuilder.importSymbols("NLS-BBNIDENT-MIB", "gi", "motproxies")
trapNetworkElemModelNumber, trapPerceivedSeverity, trapNetworkElemAlarmStatus, trapNETrapLastTrapTimeStamp, trapChangedValueInteger, trapNetworkElemAvailStatus, trapNetworkElemOperState, trapChangedValueDisplayString, trapChangedObjectId, trapText, trapNetworkElemAdminState, trapIdentifier, trapNetworkElemSerialNum = mibBuilder.importSymbols("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber", "trapPerceivedSeverity", "trapNetworkElemAlarmStatus", "trapNETrapLastTrapTimeStamp", "trapChangedValueInteger", "trapNetworkElemAvailStatus", "trapNetworkElemOperState", "trapChangedValueDisplayString", "trapChangedObjectId", "trapText", "trapNetworkElemAdminState", "trapIdentifier", "trapNetworkElemSerialNum")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
sysUpTime, = mibBuilder.importSymbols("SNMPv2-MIB", "sysUpTime")
MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Integer32, Counter64, MibIdentifier, IpAddress, Bits, Counter32, ModuleIdentity, Unsigned32, TimeTicks, Gauge32, NotificationType, iso, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Integer32", "Counter64", "MibIdentifier", "IpAddress", "Bits", "Counter32", "ModuleIdentity", "Unsigned32", "TimeTicks", "Gauge32", "NotificationType", "iso", "NotificationType")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
class Float(Counter32):
pass
gx2EDFADescriptor = MibIdentifier((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 1))
gx2EDFAAnalogTable = MibTable((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2), )
if mibBuilder.loadTexts: gx2EDFAAnalogTable.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAAnalogTable.setDescription('This table contains gx2EDFA specific parameters with nominal and current values.')
gx2EDFAAnalogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1), ).setIndexNames((0, "OMNI-gx2EDFA-MIB", "edfagx2EDFAAnalogTableIndex"))
if mibBuilder.loadTexts: gx2EDFAAnalogEntry.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAAnalogEntry.setDescription('This list contains digital product class and the associated RF channel parameters and descriptions.')
gx2EDFADigitalTable = MibTable((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3), )
if mibBuilder.loadTexts: gx2EDFADigitalTable.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFADigitalTable.setDescription('This table contains gx2EDFA specific parameters with nominal and current values.')
gx2EDFADigitalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2), ).setIndexNames((0, "OMNI-gx2EDFA-MIB", "edfagx2EDFADigitalTableIndex"))
if mibBuilder.loadTexts: gx2EDFADigitalEntry.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFADigitalEntry.setDescription('This list contains digital product class and the associated RF channel parameters and descriptions.')
gx2EDFAStatusTable = MibTable((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4), )
if mibBuilder.loadTexts: gx2EDFAStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAStatusTable.setDescription('This table contains gx2EDFA specific parameters with nominal and current values.')
gx2EDFAStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3), ).setIndexNames((0, "OMNI-gx2EDFA-MIB", "edfagx2EDFAStatusTableIndex"))
if mibBuilder.loadTexts: gx2EDFAStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAStatusEntry.setDescription('This list contains digital product class and the associated RF channel parameters and descriptions.')
gx2EDFAFactoryTable = MibTable((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5), )
if mibBuilder.loadTexts: gx2EDFAFactoryTable.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAFactoryTable.setDescription('This table contains gx2EDFA specific parameters with nominal and current values.')
gx2EDFAFactoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4), ).setIndexNames((0, "OMNI-gx2EDFA-MIB", "edfagx2EDFAFactoryTableIndex"))
if mibBuilder.loadTexts: gx2EDFAFactoryEntry.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAFactoryEntry.setDescription('This list contains digital product class and the associated RF channel parameters and descriptions.')
gx2EDFAHoldTimeTable = MibTable((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 6), )
if mibBuilder.loadTexts: gx2EDFAHoldTimeTable.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAHoldTimeTable.setDescription('This table contains gx2EDFA specific parameters with nominal and current values.')
gx2EDFAHoldTimeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 6, 5), ).setIndexNames((0, "OMNI-gx2EDFA-MIB", "gx2EDFAHoldTimeTableIndex"), (0, "OMNI-gx2EDFA-MIB", "gx2EDFAHoldTimeSpecIndex"))
if mibBuilder.loadTexts: gx2EDFAHoldTimeEntry.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAHoldTimeEntry.setDescription('This list contains digital product class and the associated RF channel parameters and descriptions.')
edfagx2EDFAAnalogTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfagx2EDFAAnalogTableIndex.setStatus('mandatory')
if mibBuilder.loadTexts: edfagx2EDFAAnalogTableIndex.setDescription('The value of this object identifies the network element. This index is equal to the hfcCommonTableIndex for the same element.')
edfalabelModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelModTemp.setStatus('optional')
if mibBuilder.loadTexts: edfalabelModTemp.setDescription('The value of this object provides the label of the Module Temperature Analog parameter.')
edfauomModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomModTemp.setStatus('optional')
if mibBuilder.loadTexts: edfauomModTemp.setDescription('The value of this object provides the Unit of Measure of the Module Temperature Analog parameter.')
edfamajorHighModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 4), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighModTemp.setDescription('The value of this object provides the Major High alarm value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 5), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowModTemp.setDescription('The value of this object provides the Major Low alarm value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 6), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighModTemp.setDescription('The value of this object provides the Minor High alarm value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 7), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowModTemp.setDescription('The value of this object provides the Minor Low alarm value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 8), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueModTemp.setDescription('The value of this object provides the Current value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagModTemp.setDescription('The value of this object provides the state of the Module Temperature Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 10), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueModTemp.setDescription('The value of this object provides the minimum value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 11), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueModTemp.setDescription('The value of this object provides the maximum value of the Module Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateModTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateModTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateModTemp.setDescription('The value of this object provides the curent alarm state of the Module Temperature Analog parameter.')
edfalabelOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelOptInPower.setStatus('optional')
if mibBuilder.loadTexts: edfalabelOptInPower.setDescription('The value of this object provides the label of the Optical Input Power Analog parameter.')
edfauomOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomOptInPower.setStatus('optional')
if mibBuilder.loadTexts: edfauomOptInPower.setDescription('The value of this object provides the Unit of Measure of the Optical Input Power Analog parameter.')
edfamajorHighOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 15), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighOptInPower.setDescription('The value of this object provides the Major High alarm value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 16), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowOptInPower.setDescription('The value of this object provides the Major Low alarm value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 17), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighOptInPower.setDescription('The value of this object provides the Minor High alarm value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 18), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowOptInPower.setDescription('The value of this object provides the Minor Low alarm value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 19), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueOptInPower.setDescription('The value of this object provides the Current value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagOptInPower.setDescription('The value of this object provides the state of the Optical Input Power Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 21), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueOptInPower.setDescription('The value of this object provides the minimum value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 22), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueOptInPower.setDescription('The value of this object provides the maximum value of the Optical Input Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateOptInPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateOptInPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateOptInPower.setDescription('The value of this object provides the curent alarm state of the Optical Input Power Analog parameter.')
edfalabelOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 24), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelOptOutPower.setStatus('optional')
if mibBuilder.loadTexts: edfalabelOptOutPower.setDescription('The value of this object provides the label of the Optical Output Power Analog parameter.')
edfauomOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 25), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomOptOutPower.setStatus('optional')
if mibBuilder.loadTexts: edfauomOptOutPower.setDescription('The value of this object provides the Unit of Measure of the Optical Output Power Analog parameter.')
edfamajorHighOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 26), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighOptOutPower.setDescription('The value of this object provides the Major High alarm value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 27), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowOptOutPower.setDescription('The value of this object provides the Major Low alarm value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 28), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighOptOutPower.setDescription('The value of this object provides the Minor High alarm value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 29), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowOptOutPower.setDescription('The value of this object provides the Minor Low alarm value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 30), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueOptOutPower.setDescription('The value of this object provides the Current value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagOptOutPower.setDescription('The value of this object provides the state of the Optical Output Power Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 32), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueOptOutPower.setDescription('The value of this object provides the minimum value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 33), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueOptOutPower.setDescription('The value of this object provides the maximum value of the Optical Output Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateOptOutPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateOptOutPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateOptOutPower.setDescription('The value of this object provides the curent alarm state of the Optical Output Power Analog parameter.')
edfalabelTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 35), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelTECTemp.setStatus('optional')
if mibBuilder.loadTexts: edfalabelTECTemp.setDescription('The value of this object provides the label of the TEC Temperature Analog parameter.')
edfauomTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 36), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomTECTemp.setStatus('optional')
if mibBuilder.loadTexts: edfauomTECTemp.setDescription('The value of this object provides the Unit of Measure of the TEC Temperature Analog parameter.')
edfamajorHighTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 37), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighTECTemp.setDescription('The value of this object provides the Major High alarm value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 38), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowTECTemp.setDescription('The value of this object provides the Major Low alarm value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 39), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighTECTemp.setDescription('The value of this object provides the Minor High alarm value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 40), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowTECTemp.setDescription('The value of this object provides the Minor Low alarm value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 41), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueTECTemp.setDescription('The value of this object provides the Current value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 42), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagTECTemp.setDescription('The value of this object provides the state of the TEC Temperature Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 43), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueTECTemp.setDescription('The value of this object provides the minimum value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 44), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueTECTemp.setDescription('The value of this object provides the maximum value of the TEC Temperature Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateTECTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 45), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateTECTemp.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateTECTemp.setDescription('The value of this object provides the curent alarm state of the TEC Temperature Analog parameter.')
edfalabelTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 46), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelTECCurrent.setStatus('optional')
if mibBuilder.loadTexts: edfalabelTECCurrent.setDescription('The value of this object provides the label of the TEC Current Analog parameter.')
edfauomTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 47), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomTECCurrent.setStatus('optional')
if mibBuilder.loadTexts: edfauomTECCurrent.setDescription('The value of this object provides the Unit of Measure of the TEC Current Analog parameter.')
edfamajorHighTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 48), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighTECCurrent.setDescription('The value of this object provides the Major High alarm value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 49), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowTECCurrent.setDescription('The value of this object provides the Major Low alarm value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 50), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighTECCurrent.setDescription('The value of this object provides the Minor High alarm value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 51), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowTECCurrent.setDescription('The value of this object provides the Minor Low alarm value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 52), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueTECCurrent.setDescription('The value of this object provides the Current value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 53), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagTECCurrent.setDescription('The value of this object provides the state of the TEC Current Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 54), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueTECCurrent.setDescription('The value of this object provides the minimum value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 55), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueTECCurrent.setDescription('The value of this object provides the maximum value of the TEC Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateTECCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 56), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateTECCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateTECCurrent.setDescription('The value of this object provides the curent alarm state of the TEC Current Analog parameter.')
edfalabelLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 57), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelLaserCurrent.setStatus('optional')
if mibBuilder.loadTexts: edfalabelLaserCurrent.setDescription('The value of this object provides the label of the Laser Current Analog parameter.')
edfauomLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 58), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomLaserCurrent.setStatus('optional')
if mibBuilder.loadTexts: edfauomLaserCurrent.setDescription('The value of this object provides the Unit of Measure of the Laser Current Analog parameter.')
edfamajorHighLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 59), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighLaserCurrent.setDescription('The value of this object provides the Major High alarm value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 60), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowLaserCurrent.setDescription('The value of this object provides the Major Low alarm value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 61), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighLaserCurrent.setDescription('The value of this object provides the Minor High alarm value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 62), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowLaserCurrent.setDescription('The value of this object provides the Minor Low alarm value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 63), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueLaserCurrent.setDescription('The value of this object provides the Current value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 64), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagLaserCurrent.setDescription('The value of this object provides the state of the Laser Current Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 65), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueLaserCurrent.setDescription('The value of this object provides the minimum value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 66), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueLaserCurrent.setDescription('The value of this object provides the maximum value of the Laser Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateLaserCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 67), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateLaserCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateLaserCurrent.setDescription('The value of this object provides the curent alarm state of the Laser Current Analog parameter.')
edfalabelLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 68), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelLaserPower.setStatus('optional')
if mibBuilder.loadTexts: edfalabelLaserPower.setDescription('The value of this object provides the label of the Laser Power Analog parameter.')
edfauomLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 69), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomLaserPower.setStatus('optional')
if mibBuilder.loadTexts: edfauomLaserPower.setDescription('The value of this object provides the Unit of Measure of the Laser Power Analog parameter.')
edfamajorHighLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 70), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighLaserPower.setDescription('The value of this object provides the Major High alarm value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 71), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowLaserPower.setDescription('The value of this object provides the Major Low alarm value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 72), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighLaserPower.setDescription('The value of this object provides the Minor High alarm value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 73), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowLaserPower.setDescription('The value of this object provides the Minor Low alarm value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 74), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueLaserPower.setDescription('The value of this object provides the Current value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 75), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagLaserPower.setDescription('The value of this object provides the state of the Laser Power Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 76), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueLaserPower.setDescription('The value of this object provides the minimum value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 77), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueLaserPower.setDescription('The value of this object provides the maximum value of the Laser Power Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateLaserPower = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 78), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateLaserPower.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateLaserPower.setDescription('The value of this object provides the curent alarm state of the Laser Power Analog parameter.')
edfalabel12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 79), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabel12Volt.setStatus('optional')
if mibBuilder.loadTexts: edfalabel12Volt.setDescription('The value of this object provides the label of the 12v Current Analog parameter.')
edfauom12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 80), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauom12Volt.setStatus('optional')
if mibBuilder.loadTexts: edfauom12Volt.setDescription('The value of this object provides the Unit of Measure of the 12v Current Analog parameter.')
edfamajorHigh12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 81), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHigh12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHigh12Volt.setDescription('The value of this object provides the Major High alarm value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLow12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 82), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLow12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLow12Volt.setDescription('The value of this object provides the Major Low alarm value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHigh12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 83), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHigh12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHigh12Volt.setDescription('The value of this object provides the Minor High alarm value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLow12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 84), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLow12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLow12Volt.setDescription('The value of this object provides the Minor Low alarm value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValue12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 85), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValue12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValue12Volt.setDescription('The value of this object provides the Current value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlag12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 86), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlag12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlag12Volt.setDescription('The value of this object provides the state of the 12v Current Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValue12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 87), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValue12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValue12Volt.setDescription('The value of this object provides the minimum value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValue12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 88), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValue12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValue12Volt.setDescription('The value of this object provides the maximum value of the 12 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmState12Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 89), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmState12Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmState12Volt.setDescription('The value of this object provides the curent alarm state of the 12v Current Analog parameter.')
edfalabel37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 90), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabel37Volt.setStatus('optional')
if mibBuilder.loadTexts: edfalabel37Volt.setDescription('The value of this object provides the label of the 3.7v Current Analog parameter.')
edfauom37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 91), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauom37Volt.setStatus('optional')
if mibBuilder.loadTexts: edfauom37Volt.setDescription('The value of this object provides the Unit of Measure of the 3.7v Current Analog parameter.')
edfamajorHigh37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 92), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHigh37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHigh37Volt.setDescription('The value of this object provides the Major High alarm value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLow37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 93), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLow37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLow37Volt.setDescription('The value of this object provides the Major Low alarm value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHigh37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 94), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHigh37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHigh37Volt.setDescription('The value of this object provides the Minor High alarm value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLow37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 95), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLow37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLow37Volt.setDescription('The value of this object provides the Minor Low alarm value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValue37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 96), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValue37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValue37Volt.setDescription('The value of this object provides the Current value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlag37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 97), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlag37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlag37Volt.setDescription('The value of this object provides the state of the 3.7v Current Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValue37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 98), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValue37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValue37Volt.setDescription('The value of this object provides the minimum value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValue37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 99), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValue37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValue37Volt.setDescription('The value of this object provides the maximum value of the 3.7 Volt Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmState37Volt = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 100), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmState37Volt.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmState37Volt.setDescription('The value of this object provides the curent alarm state of the 3.7v Current Analog parameter.')
edfalabelFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 101), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelFanCurrent.setStatus('optional')
if mibBuilder.loadTexts: edfalabelFanCurrent.setDescription('The value of this object provides the label of the Fan Current Analog parameter.')
edfauomFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 102), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomFanCurrent.setStatus('optional')
if mibBuilder.loadTexts: edfauomFanCurrent.setDescription('The value of this object provides the Unit of Measure of the Fan Current Analog parameter.')
edfamajorHighFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 103), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighFanCurrent.setDescription('The value of this object provides the Major High alarm value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 104), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowFanCurrent.setDescription('The value of this object provides the Major Low alarm value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 105), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighFanCurrent.setDescription('The value of this object provides the Minor High alarm value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 106), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowFanCurrent.setDescription('The value of this object provides the Minor Low alarm value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 107), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacurrentValueFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueFanCurrent.setDescription('The value of this object provides the Current value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 108), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagFanCurrent.setDescription('The value of this object provides the state of the Fan Current Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 109), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueFanCurrent.setDescription('The value of this object provides the minimum value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 110), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueFanCurrent.setDescription('The value of this object provides the maximum value of the Fan Current Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateFanCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 111), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateFanCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateFanCurrent.setDescription('The value of this object provides the curent alarm state of the Fan Current Analog parameter.')
edfalabelOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 112), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelOPSetting.setStatus('optional')
if mibBuilder.loadTexts: edfalabelOPSetting.setDescription('The value of this object provides the label of the Output Power Setting Analog parameter.')
edfauomOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 113), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomOPSetting.setStatus('optional')
if mibBuilder.loadTexts: edfauomOPSetting.setDescription('The value of this object provides the Unit of Measure of the 12v Current Analog parameter.')
edfamajorHighOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 114), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighOPSetting.setDescription('The value of this object provides the Major High alarm value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 115), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowOPSetting.setDescription('The value of this object provides the Major Low alarm value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 116), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighOPSetting.setDescription('The value of this object provides the Minor High alarm value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 117), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowOPSetting.setDescription('The value of this object provides the Minor Low alarm value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 118), Float()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfacurrentValueOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueOPSetting.setDescription('The value of this object provides the Current value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 119), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagOPSetting.setDescription('The value of this object provides the state of the Output Power Setting Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 120), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueOPSetting.setDescription('The value of this object provides the minimum value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 121), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueOPSetting.setDescription('The value of this object provides the maximum value of the Output Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateOPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 122), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateOPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateOPSetting.setDescription('The value of this object provides the curent alarm state of the Output Power Setting Analog parameter.')
edfalabelLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 123), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelLPSetting.setStatus('optional')
if mibBuilder.loadTexts: edfalabelLPSetting.setDescription('The value of this object provides the label of the Laser Power Setting Analog parameter.')
edfauomLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 124), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomLPSetting.setStatus('optional')
if mibBuilder.loadTexts: edfauomLPSetting.setDescription('The value of this object provides the Unit of Measure of the Laser Power Setting Analog parameter.')
edfamajorHighLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 125), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighLPSetting.setDescription('The value of this object provides the Major High alarm value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 126), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowLPSetting.setDescription('The value of this object provides the Major Low alarm value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 127), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighLPSetting.setDescription('The value of this object provides the Minor High alarm value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 128), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowLPSetting.setDescription('The value of this object provides the Minor Low alarm value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 129), Float()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfacurrentValueLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueLPSetting.setDescription('The value of this object provides the Current value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 130), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagLPSetting.setDescription('The value of this object provides the state of the Laser Power Setting Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 131), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueLPSetting.setDescription('The value of this object provides the minimum value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 132), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueLPSetting.setDescription('The value of this object provides the maximum value of the Laser Power Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateLPSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 133), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateLPSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateLPSetting.setDescription('The value of this object provides the curent alarm state of the Laser Power Setting Analog parameter.')
edfalabelCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 134), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelCGSetting.setStatus('optional')
if mibBuilder.loadTexts: edfalabelCGSetting.setDescription('The value of this object provides the label of the Constant Gain Setting Analog parameter.')
edfauomCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 135), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomCGSetting.setStatus('optional')
if mibBuilder.loadTexts: edfauomCGSetting.setDescription('The value of this object provides the Unit of Measure of the Constant Gain Setting Analog parameter.')
edfamajorHighCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 136), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighCGSetting.setDescription('The value of this object provides the Major High alarm value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 137), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowCGSetting.setDescription('The value of this object provides the Major Low alarm value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 138), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighCGSetting.setDescription('The value of this object provides the Minor High alarm value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 139), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowCGSetting.setDescription('The value of this object provides the Minor Low alarm value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 140), Float()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfacurrentValueCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueCGSetting.setDescription('The value of this object provides the Current value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 141), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagCGSetting.setDescription('The value of this object provides the state of the Constant Gain Setting Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 142), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueCGSetting.setDescription('The value of this object provides the minimum value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 143), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueCGSetting.setDescription('The value of this object provides the maximum value of the Constant Gain Setting Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateCGSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 144), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateCGSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateCGSetting.setDescription('The value of this object provides the curent alarm state of the Constant Gain Setting Analog parameter.')
edfalabelOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 145), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelOptThreshold.setStatus('optional')
if mibBuilder.loadTexts: edfalabelOptThreshold.setDescription('The value of this object provides the label of the Optical Input Threshold Analog parameter.')
edfauomOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 146), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfauomOptThreshold.setStatus('optional')
if mibBuilder.loadTexts: edfauomOptThreshold.setDescription('The value of this object provides the Unit of Measure of the Optical Input Threshold Analog parameter.')
edfamajorHighOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 147), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorHighOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorHighOptThreshold.setDescription('The value of this object provides the Major High alarm value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamajorLowOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 148), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamajorLowOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfamajorLowOptThreshold.setDescription('The value of this object provides the Major Low alarm value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorHighOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 149), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorHighOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorHighOptThreshold.setDescription('The value of this object provides the Minor High alarm value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaminorLowOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 150), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminorLowOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminorLowOptThreshold.setDescription('The value of this object provides the Minor Low alarm value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfacurrentValueOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 151), Float()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfacurrentValueOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfacurrentValueOptThreshold.setDescription('The value of this object provides the Current value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfastateFlagOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 152), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagOptThreshold.setDescription('The value of this object provides the state of the Optical Input Threshold Analog parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfaminValueOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 153), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaminValueOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfaminValueOptThreshold.setDescription('The value of this object provides the minimum value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfamaxValueOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 154), Float()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfamaxValueOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfamaxValueOptThreshold.setDescription('The value of this object provides the maximum value of the Optical Input Threshold Analog parameter. This value is a floating point number that is represented as an IEEE 32 bit number.')
edfaalarmStateOptThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 2, 1, 155), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noAlarm", 1), ("majorLowAlarm", 2), ("minorLowAlarm", 3), ("minorHighAlarm", 4), ("majorHighAlarm", 5), ("informational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaalarmStateOptThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: edfaalarmStateOptThreshold.setDescription('The value of this object provides the curent alarm state of the Optical Input Threshold Analog parameter.')
edfagx2EDFADigitalTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfagx2EDFADigitalTableIndex.setStatus('mandatory')
if mibBuilder.loadTexts: edfagx2EDFADigitalTableIndex.setDescription('The value of this object identifies the network element. This index is equal to the hfcCommonTableIndex for the same element.')
edfalabelModeSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelModeSetting.setStatus('optional')
if mibBuilder.loadTexts: edfalabelModeSetting.setDescription("The value of this object provides the label of the EDFA's Mode Digital parameter.")
edfaenumModeSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaenumModeSetting.setStatus('optional')
if mibBuilder.loadTexts: edfaenumModeSetting.setDescription('The value of this object represents the Enumeration values possible for the Digital parameter. Each Enumerated values is separated by a common. The first value has a enumerated value of 0.')
edfavalueModeSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("power-out-preset", 1), ("power-out-set", 2), ("laser-power-preset", 3), ("laser-power-set", 4), ("constant-gain-preset", 5), ("constant-gain-set", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfavalueModeSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueModeSetting.setDescription('The value of this object is the current value of the parameter. It is an integer value from 0 to 5 representing the operation mode of the module.')
edfastateFlagModeSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagModeSetting.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagModeSetting.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelModuleState = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelModuleState.setStatus('optional')
if mibBuilder.loadTexts: edfalabelModuleState.setDescription('The value of this object provides the label of the Module State Digital parameter.')
edfaenumModuleState = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaenumModuleState.setStatus('optional')
if mibBuilder.loadTexts: edfaenumModuleState.setDescription('The value of this object represents the Enumeration values possible for the Digital parameter. Each Enumerated values is separated by a common. The first value has a enumerated value of 1.')
edfavalueModuleState = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfavalueModuleState.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueModuleState.setDescription('The value of this object is the current value of the parameter.')
edfastateFlagModuleState = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagModuleState.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagModuleState.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelFactoryDefault = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelFactoryDefault.setStatus('optional')
if mibBuilder.loadTexts: edfalabelFactoryDefault.setDescription('The value of this object provides the label of the Factory Default Reset Digital parameter.')
edfaenumFactoryDefault = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaenumFactoryDefault.setStatus('optional')
if mibBuilder.loadTexts: edfaenumFactoryDefault.setDescription('The value of this object represents the Enumeration values possible for the Digital parameter. Each Enumerated values is separated by a common. The first value has a enumerated value of 1.')
edfavalueFactoryDefault = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: edfavalueFactoryDefault.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueFactoryDefault.setDescription('The value of this object is the current value of the parameter.')
edfastateFlagFactoryDefault = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 3, 2, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateFlagFactoryDefault.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateFlagFactoryDefault.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfagx2EDFAStatusTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfagx2EDFAStatusTableIndex.setStatus('mandatory')
if mibBuilder.loadTexts: edfagx2EDFAStatusTableIndex.setDescription('The value of this object identifies the network element. This index is equal to the hfcCommonTableIndex for the same element.')
edfalabelBoot = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelBoot.setStatus('optional')
if mibBuilder.loadTexts: edfalabelBoot.setDescription('The value of this object provides the label of the Boot Status Status parameter.')
edfavalueBoot = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueBoot.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueBoot.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagBoot = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagBoot.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagBoot.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelFlash = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelFlash.setStatus('optional')
if mibBuilder.loadTexts: edfalabelFlash.setDescription('The value of this object provides the label of the Flash Status Status parameter.')
edfavalueFlash = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueFlash.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueFlash.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagFlash = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagFlash.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagFlash.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelFactoryDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelFactoryDataCRC.setStatus('optional')
if mibBuilder.loadTexts: edfalabelFactoryDataCRC.setDescription('The value of this object provides the label of the Factory Data CRC Status parameter.')
edfavalueFactoryDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueFactoryDataCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueFactoryDataCRC.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagFactoryDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagFactoryDataCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagFactoryDataCRC.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelAlarmDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelAlarmDataCRC.setStatus('optional')
if mibBuilder.loadTexts: edfalabelAlarmDataCRC.setDescription('The value of this object provides the label of the Alarm Data CRC Status parameter.')
edfavalueAlarmDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueAlarmDataCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueAlarmDataCRC.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagAlarmDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagAlarmDataCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagAlarmDataCRC.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelCalibrationDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelCalibrationDataCRC.setStatus('optional')
if mibBuilder.loadTexts: edfalabelCalibrationDataCRC.setDescription('The value of this object provides the label of the Calibration Data CRC Status parameter.')
edfavalueCalibrationDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueCalibrationDataCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueCalibrationDataCRC.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagCalibrationDataCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagCalibrationDataCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagCalibrationDataCRC.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelOptInShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelOptInShutdown.setStatus('optional')
if mibBuilder.loadTexts: edfalabelOptInShutdown.setDescription('The value of this object provides the label of the Optical Input Power Shutdown Status parameter.')
edfavalueOptInShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueOptInShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueOptInShutdown.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagOptInShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagOptInShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagOptInShutdown.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelTECTempShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelTECTempShutdown.setStatus('optional')
if mibBuilder.loadTexts: edfalabelTECTempShutdown.setDescription('The value of this object provides the label of the TEC Temperature Shutdown Status parameter.')
edfavalueTECTempShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueTECTempShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueTECTempShutdown.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagTECTempShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagTECTempShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagTECTempShutdown.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelTECShutOverride = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 23), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelTECShutOverride.setStatus('optional')
if mibBuilder.loadTexts: edfalabelTECShutOverride.setDescription('The value of this object provides the label of the TEC Shutdown Override Status parameter.')
edfavalueTECShutOverride = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueTECShutOverride.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueTECShutOverride.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagTECShutOverride = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagTECShutOverride.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagTECShutOverride.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelPowerFail = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 26), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelPowerFail.setStatus('optional')
if mibBuilder.loadTexts: edfalabelPowerFail.setDescription('The value of this object provides the label of the Power Supply Fail Status parameter.')
edfavaluePowerFail = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavaluePowerFail.setStatus('mandatory')
if mibBuilder.loadTexts: edfavaluePowerFail.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagPowerFail = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagPowerFail.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagPowerFail.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelKeySwitch = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 29), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelKeySwitch.setStatus('optional')
if mibBuilder.loadTexts: edfalabelKeySwitch.setDescription('The value of this object provides the label of the Key Switch Setting Status parameter.')
edfavalueKeySwitch = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueKeySwitch.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueKeySwitch.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagKeySwitch = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagKeySwitch.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagKeySwitch.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelLaserCurrShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 32), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelLaserCurrShutdown.setStatus('optional')
if mibBuilder.loadTexts: edfalabelLaserCurrShutdown.setDescription('The value of this object provides the label of the Laser Current Shutdown Status parameter.')
edfavalueLaserCurrShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueLaserCurrShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueLaserCurrShutdown.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagLaserCurrShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagLaserCurrShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagLaserCurrShutdown.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelLaserPowShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 35), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelLaserPowShutdown.setStatus('optional')
if mibBuilder.loadTexts: edfalabelLaserPowShutdown.setDescription('The value of this object provides the label of the Laser Power Shutdown Status parameter.')
edfavalueLaserPowShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueLaserPowShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueLaserPowShutdown.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagLaserPowShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 37), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagLaserPowShutdown.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagLaserPowShutdown.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelADCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 38), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelADCStatus.setStatus('optional')
if mibBuilder.loadTexts: edfalabelADCStatus.setDescription('The value of this object provides the label of the ADC Operation Status parameter.')
edfavalueADCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 39), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueADCStatus.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueADCStatus.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagADCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 40), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagADCStatus.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagADCStatus.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelConstGainStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 41), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelConstGainStatus.setStatus('optional')
if mibBuilder.loadTexts: edfalabelConstGainStatus.setDescription('The value of this object provides the label of the Constant Gain Status parameter.')
edfavalueConstGainStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 42), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueConstGainStatus.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueConstGainStatus.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagConstGainStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 43), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagConstGainStatus.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagConstGainStatus.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfalabelStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 44), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfalabelStandbyStatus.setStatus('optional')
if mibBuilder.loadTexts: edfalabelStandbyStatus.setDescription('The value of this object provides the label of the Standby Status parameter.')
edfavalueStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 45), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("undetermined", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfavalueStandbyStatus.setStatus('mandatory')
if mibBuilder.loadTexts: edfavalueStandbyStatus.setDescription('The value of this object provides the current state of the parameter (0-Ok, 1-Undetermined 2-Warning, 3-Minor, 4-Major, 5-Critical).')
edfastateflagStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 4, 3, 46), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hidden", 1), ("read-only", 2), ("updateable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfastateflagStandbyStatus.setStatus('mandatory')
if mibBuilder.loadTexts: edfastateflagStandbyStatus.setDescription('The value of this object provides the state of the the parameter. (0-Hidden 1-Read-Only, 2-Updateable).')
edfagx2EDFAFactoryTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfagx2EDFAFactoryTableIndex.setStatus('mandatory')
if mibBuilder.loadTexts: edfagx2EDFAFactoryTableIndex.setDescription('The value of this object identifies the network element. This index is equal to the hfcCommonTableIndex for the same element.')
edfabootControlByte = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfabootControlByte.setStatus('mandatory')
if mibBuilder.loadTexts: edfabootControlByte.setDescription('The value of this object indicates which bank the firmware is currently being boot from.')
edfabootStatusByte = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfabootStatusByte.setStatus('mandatory')
if mibBuilder.loadTexts: edfabootStatusByte.setDescription('This object indicates the status of the last boot')
edfabank0CRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfabank0CRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfabank0CRC.setDescription('This object provides the CRC code of bank 0.')
edfabank1CRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfabank1CRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfabank1CRC.setDescription('This object provides the CRC code of bank 1.')
edfaprgEEPROMByte = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaprgEEPROMByte.setStatus('mandatory')
if mibBuilder.loadTexts: edfaprgEEPROMByte.setDescription('This object indicates if the EEPROM has been programmed')
edfafactoryCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfafactoryCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfafactoryCRC.setDescription('This object provides the CRC code for the Factory data.')
edfacalculateCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("factory", 1), ("calibration", 2), ("alarmdata", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfacalculateCRC.setStatus('mandatory')
if mibBuilder.loadTexts: edfacalculateCRC.setDescription('This object indicates which of the Emnums will have the CRC calculated.')
edfahourMeter = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfahourMeter.setStatus('mandatory')
if mibBuilder.loadTexts: edfahourMeter.setDescription('This object provides the hour meter reading of the module.')
edfaflashPrgCntA = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaflashPrgCntA.setStatus('mandatory')
if mibBuilder.loadTexts: edfaflashPrgCntA.setDescription('This object provides the number of times the flash has been programmed on side A.')
edfaflashPrgCntB = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfaflashPrgCntB.setStatus('mandatory')
if mibBuilder.loadTexts: edfaflashPrgCntB.setDescription('This object provides the number of times the flash has been programmed on side B.')
edfafwRev0 = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfafwRev0.setStatus('mandatory')
if mibBuilder.loadTexts: edfafwRev0.setDescription('This object provides the Revision of the firmware stores in bank 0.')
edfafwRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 5, 4, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: edfafwRev1.setStatus('mandatory')
if mibBuilder.loadTexts: edfafwRev1.setDescription('This object provides the Revision of the firmware stores in bank 1.')
gx2EDFAHoldTimeTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 6, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: gx2EDFAHoldTimeTableIndex.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAHoldTimeTableIndex.setDescription('The value of this object is the index of the data object.')
gx2EDFAHoldTimeSpecIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 6, 5, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: gx2EDFAHoldTimeSpecIndex.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAHoldTimeSpecIndex.setDescription('The value of this object identifies the index of the alarm object to be modified.')
gx2EDFAHoldTimeData = MibTableColumn((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11, 6, 5, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: gx2EDFAHoldTimeData.setStatus('mandatory')
if mibBuilder.loadTexts: gx2EDFAHoldTimeData.setDescription('The value of this object provides access to the hold timers used to suppress nose on analog objects. This object is a 32 bit object. Validation data is entered into bytes zero and one of the object. Bytes three and four are used to entering the hold time for the specified alarm object. The Hold timer data ranges from 0 to 1300 seconds. The index of this object corresponds to the alarm object to be modified. Alarm Hold timers correspond to the index of this object as follows: Index 1 = xxx, index 2 = xxxx, Index 3 = xxxx, The hold time is represented in seconds.')
trapEDFAConfigChangeInteger = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,1)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAConfigChangeInteger.setDescription("This trap is issued if configuration of a single variable with integer type was changed (via ANY interface). TrapChangedValueInteger variable may contain current reading of that variable. trapPerceivedSeverity - 'indeterminate'")
trapEDFAConfigChangeDisplayString = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,2)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueDisplayString"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAConfigChangeDisplayString.setDescription("This trap is issued if configuration of a single variable with DispalayString type was changed (via ANY interface). TrapChangedValueDisplayString variable may contain current reading of that variable. trapPerceivedSeverity - 'indeterminate'")
trapEDFAModuleTemperatureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,3)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAModuleTemperatureAlarm.setDescription("This trap is issued when the EDFA Module's Temperature goes out of range.")
trapEDFAOpticalInPowerAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,4)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAOpticalInPowerAlarm.setDescription('This trap is issued when the input Optical Input Power parameter goes out of range.')
trapEDFAOpticalOutPowerAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,5)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAOpticalOutPowerAlarm.setDescription('This trap is issued when the input Optical Output Power parameter goes out of range.')
trapEDFATECTemperatureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,6)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFATECTemperatureAlarm.setDescription('This trap is issued when the EDFA TEC Temperature goes out of range.')
trapEDFATECCurrentAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,7)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFATECCurrentAlarm.setDescription('This trap is issued when the EDFA TEC Current goes out of range.')
trapEDFALaserCurrentAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,8)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFALaserCurrentAlarm.setDescription('This trap is issued when the EDFA Laser Current goes out of range.')
trapEDFALaserPowerAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,9)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFALaserPowerAlarm.setDescription('This trap is issued when the EDFA Laser Power goes out of range.')
trapEDFAPlus12CurrentAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,10)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAPlus12CurrentAlarm.setDescription('This trap is issued when the EDFA 12 volt current parameter goes out of range.')
trapEDFAPlus37CurrentAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,11)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAPlus37CurrentAlarm.setDescription('This trap is issued when the EDFA 3.7 volt current parameter goes out of range.')
trapEDFAFanCurrentAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,12)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAFanCurrentAlarm.setDescription("This trap is issued when the EDFA Module's Fan Currrent parameter goes out of range.")
trapEDFAResetFacDefault = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,13)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAResetFacDefault.setDescription('This trap is issued when the EDFA resets to factory defaults')
trapEDFAStandbyMode = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,14)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAStandbyMode.setDescription('This trap is issued when the EDFA is in Standby Mode.')
trapEDFAOptInShutdown = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,15)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAOptInShutdown.setDescription('This trap is issued when the EDFA is in Optical Input Shutdown.')
trapEDFATECTempShutdown = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,16)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFATECTempShutdown.setDescription('This trap is issued when the EDFA is in TEC Temperature Shutdown.')
trapEDFAKeySwitch = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,17)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAKeySwitch.setDescription('This trap is issued when the Key Switch disables the EDFA.')
trapEDFAPowerFail = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,18)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAPowerFail.setDescription('This trap is issued when there is an EDFA Power Supply Failure.')
trapEDFALasCurrShutdown = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,19)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFALasCurrShutdown.setDescription('This trap is issued when the EDFA is in Laser Current Shutdown.')
trapEDFALasPowerShutdown = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,20)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFALasPowerShutdown.setDescription('This trap is issued when the EDFA is in Laser Power Shutdown.')
trapEDFAInvalidMode = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,21)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAInvalidMode.setDescription('This trap is issued when the EDFA is in an invalid mode.')
trapEDFAFlashAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,22)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAFlashAlarm.setDescription("This trap is issued when the EDFA Module's boot or flash programming sequence has detected a Flash error.")
trapEDFABoot0Alarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,23)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFABoot0Alarm.setDescription("This trap is issued when the EDFA Module's Bank 0 Boot sequence has detected an error.")
trapEDFABoot1Alarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,24)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFABoot1Alarm.setDescription("This trap is issued when the EDFA Module's Bank 1 Boot sequence has detected an error.")
trapEDFAAlarmDataCRCAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,25)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAAlarmDataCRCAlarm.setDescription('This trap is issued when the EDFA Module detects an error calculating the alarm limit CRC.')
trapEDFAFactoryDataCRCAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,26)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAFactoryDataCRCAlarm.setDescription('This trap is issued when the EDFA Module detects an error calculating the Factory data CRC.')
trapEDFACalDataCRCAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,27)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFACalDataCRCAlarm.setDescription('This trap is issued when the EDFA Module detects an error calculating the Calibration data CRC.')
trapEDFAFacCalFloatAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,28)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAFacCalFloatAlarm.setDescription('This trap is issued when the EDFA Module detects factory calibration float data alarm.')
trapEDFAOptInThreshAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,29)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAOptInThreshAlarm.setDescription('This trap is issued when the EDFA Module Optical Input drops below the user set threshold.')
trapEDFAGainErrorAlarm = NotificationType((1, 3, 6, 1, 4, 1, 1166, 6, 1, 2, 11) + (0,30)).setObjects(("NLSBBN-TRAPS-MIB", "trapIdentifier"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemModelNumber"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemSerialNum"), ("NLSBBN-TRAPS-MIB", "trapPerceivedSeverity"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemOperState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAlarmStatus"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAdminState"), ("NLSBBN-TRAPS-MIB", "trapNetworkElemAvailStatus"), ("NLSBBN-TRAPS-MIB", "trapText"), ("NLSBBN-TRAPS-MIB", "trapChangedObjectId"), ("NLSBBN-TRAPS-MIB", "trapChangedValueInteger"), ("NLSBBN-TRAPS-MIB", "trapNETrapLastTrapTimeStamp"))
if mibBuilder.loadTexts: trapEDFAGainErrorAlarm.setDescription('This trap is issued when the EDFA Module cannot produce the desired user set gain in Constant Gain Set Mode.')
mibBuilder.exportSymbols("OMNI-gx2EDFA-MIB", edfalabelADCStatus=edfalabelADCStatus, edfalabelLPSetting=edfalabelLPSetting, trapEDFAOpticalInPowerAlarm=trapEDFAOpticalInPowerAlarm, trapEDFAModuleTemperatureAlarm=trapEDFAModuleTemperatureAlarm, edfaminValueLaserCurrent=edfaminValueLaserCurrent, edfavalueBoot=edfavalueBoot, edfalabelPowerFail=edfalabelPowerFail, edfaminorLowLaserPower=edfaminorLowLaserPower, edfabootStatusByte=edfabootStatusByte, edfavalueFlash=edfavalueFlash, edfavalueOptInShutdown=edfavalueOptInShutdown, edfaminorHigh37Volt=edfaminorHigh37Volt, edfamaxValueOptOutPower=edfamaxValueOptOutPower, edfaminorLowTECCurrent=edfaminorLowTECCurrent, edfauomLPSetting=edfauomLPSetting, edfavalueTECTempShutdown=edfavalueTECTempShutdown, edfavalueLaserCurrShutdown=edfavalueLaserCurrShutdown, edfaminorHighOptOutPower=edfaminorHighOptOutPower, edfaalarmStateFanCurrent=edfaalarmStateFanCurrent, trapEDFALasCurrShutdown=trapEDFALasCurrShutdown, gx2EDFAStatusEntry=gx2EDFAStatusEntry, edfaminorHighLaserCurrent=edfaminorHighLaserCurrent, edfastateFlagFanCurrent=edfastateFlagFanCurrent, gx2EDFAStatusTable=gx2EDFAStatusTable, edfaminorLowOPSetting=edfaminorLowOPSetting, edfacurrentValueOptOutPower=edfacurrentValueOptOutPower, edfaalarmStateOptThreshold=edfaalarmStateOptThreshold, edfauomModTemp=edfauomModTemp, edfaminValueTECTemp=edfaminValueTECTemp, edfastateflagTECShutOverride=edfastateflagTECShutOverride, edfamaxValueModTemp=edfamaxValueModTemp, edfamajorHighOptInPower=edfamajorHighOptInPower, edfaminorLowLPSetting=edfaminorLowLPSetting, edfaminorLow37Volt=edfaminorLow37Volt, edfaminorLowModTemp=edfaminorLowModTemp, edfaminorHighCGSetting=edfaminorHighCGSetting, edfalabelTECTemp=edfalabelTECTemp, edfaminValueLaserPower=edfaminValueLaserPower, edfaminValue12Volt=edfaminValue12Volt, edfacurrentValueOPSetting=edfacurrentValueOPSetting, Float=Float, edfastateflagFactoryDataCRC=edfastateflagFactoryDataCRC, trapEDFAAlarmDataCRCAlarm=trapEDFAAlarmDataCRCAlarm, trapEDFATECCurrentAlarm=trapEDFATECCurrentAlarm, edfastateFlagLaserCurrent=edfastateFlagLaserCurrent, edfacurrentValueLaserPower=edfacurrentValueLaserPower, trapEDFAFanCurrentAlarm=trapEDFAFanCurrentAlarm, edfamajorHighCGSetting=edfamajorHighCGSetting, edfamajorLowOptOutPower=edfamajorLowOptOutPower, edfacurrentValueModTemp=edfacurrentValueModTemp, edfamaxValueFanCurrent=edfamaxValueFanCurrent, edfavalueModeSetting=edfavalueModeSetting, edfaminorHighOPSetting=edfaminorHighOPSetting, edfamajorHighOptOutPower=edfamajorHighOptOutPower, edfalabelConstGainStatus=edfalabelConstGainStatus, edfaminorLowTECTemp=edfaminorLowTECTemp, edfalabelModeSetting=edfalabelModeSetting, edfauom37Volt=edfauom37Volt, edfamaxValue12Volt=edfamaxValue12Volt, edfaalarmStateLaserCurrent=edfaalarmStateLaserCurrent, edfamaxValueCGSetting=edfamaxValueCGSetting, edfauomOptOutPower=edfauomOptOutPower, edfalabelTECTempShutdown=edfalabelTECTempShutdown, trapEDFAConfigChangeInteger=trapEDFAConfigChangeInteger, edfacurrentValue37Volt=edfacurrentValue37Volt, edfavalueConstGainStatus=edfavalueConstGainStatus, edfamaxValueTECTemp=edfamaxValueTECTemp, edfavalueLaserPowShutdown=edfavalueLaserPowShutdown, edfamajorLowCGSetting=edfamajorLowCGSetting, edfastateFlagModTemp=edfastateFlagModTemp, edfaalarmStateOptOutPower=edfaalarmStateOptOutPower, edfalabelTECCurrent=edfalabelTECCurrent, edfamajorLowLaserPower=edfamajorLowLaserPower, edfaenumFactoryDefault=edfaenumFactoryDefault, edfamaxValueLaserPower=edfamaxValueLaserPower, edfaminValueOPSetting=edfaminValueOPSetting, edfamajorLowOptInPower=edfamajorLowOptInPower, edfaminorLowOptThreshold=edfaminorLowOptThreshold, edfalabelFlash=edfalabelFlash, edfalabelFactoryDataCRC=edfalabelFactoryDataCRC, trapEDFAFacCalFloatAlarm=trapEDFAFacCalFloatAlarm, edfavalueKeySwitch=edfavalueKeySwitch, edfauomOptInPower=edfauomOptInPower, gx2EDFAAnalogTable=gx2EDFAAnalogTable, edfavalueFactoryDefault=edfavalueFactoryDefault, edfauomOPSetting=edfauomOPSetting, edfaalarmStateOPSetting=edfaalarmStateOPSetting, trapEDFALaserPowerAlarm=trapEDFALaserPowerAlarm, edfalabelFactoryDefault=edfalabelFactoryDefault, edfamajorLowModTemp=edfamajorLowModTemp, edfabank1CRC=edfabank1CRC, trapEDFAGainErrorAlarm=trapEDFAGainErrorAlarm, edfamajorHighOptThreshold=edfamajorHighOptThreshold, edfamajorHighLaserCurrent=edfamajorHighLaserCurrent, trapEDFAOpticalOutPowerAlarm=trapEDFAOpticalOutPowerAlarm, edfaminorHighModTemp=edfaminorHighModTemp, edfacurrentValueCGSetting=edfacurrentValueCGSetting, gx2EDFADigitalEntry=gx2EDFADigitalEntry, edfauomFanCurrent=edfauomFanCurrent, edfagx2EDFAAnalogTableIndex=edfagx2EDFAAnalogTableIndex, trapEDFALasPowerShutdown=trapEDFALasPowerShutdown, edfauomLaserPower=edfauomLaserPower, edfastateflagFlash=edfastateflagFlash, edfastateFlagOPSetting=edfastateFlagOPSetting, edfalabelModTemp=edfalabelModTemp, edfamajorHigh37Volt=edfamajorHigh37Volt, edfavalueCalibrationDataCRC=edfavalueCalibrationDataCRC, trapEDFATECTemperatureAlarm=trapEDFATECTemperatureAlarm, edfaminorHighLaserPower=edfaminorHighLaserPower, trapEDFAInvalidMode=trapEDFAInvalidMode, edfafwRev0=edfafwRev0, edfalabelCalibrationDataCRC=edfalabelCalibrationDataCRC, edfauomLaserCurrent=edfauomLaserCurrent, edfalabelLaserPowShutdown=edfalabelLaserPowShutdown, edfauomTECCurrent=edfauomTECCurrent, edfamaxValueLPSetting=edfamaxValueLPSetting, edfastateFlagFactoryDefault=edfastateFlagFactoryDefault, edfalabelKeySwitch=edfalabelKeySwitch, edfavalueStandbyStatus=edfavalueStandbyStatus, edfastateFlagTECTemp=edfastateFlagTECTemp, trapEDFABoot0Alarm=trapEDFABoot0Alarm, edfastateFlagOptOutPower=edfastateFlagOptOutPower, edfamajorHighTECTemp=edfamajorHighTECTemp, gx2EDFAFactoryEntry=gx2EDFAFactoryEntry, trapEDFAStandbyMode=trapEDFAStandbyMode, edfacurrentValueTECTemp=edfacurrentValueTECTemp, edfamajorHighLaserPower=edfamajorHighLaserPower, edfamajorLowFanCurrent=edfamajorLowFanCurrent, gx2EDFAHoldTimeData=gx2EDFAHoldTimeData, edfamajorLowLPSetting=edfamajorLowLPSetting, trapEDFAPowerFail=trapEDFAPowerFail, edfastateFlagOptInPower=edfastateFlagOptInPower, edfaminValueOptOutPower=edfaminValueOptOutPower, edfalabelBoot=edfalabelBoot, edfamajorHigh12Volt=edfamajorHigh12Volt, edfastateflagPowerFail=edfastateflagPowerFail, edfastateflagADCStatus=edfastateflagADCStatus, edfabootControlByte=edfabootControlByte, edfauomCGSetting=edfauomCGSetting, edfastateflagStandbyStatus=edfastateflagStandbyStatus, edfastateFlagLaserPower=edfastateFlagLaserPower, edfastateFlagModeSetting=edfastateFlagModeSetting, edfaminorLow12Volt=edfaminorLow12Volt, gx2EDFAHoldTimeTableIndex=gx2EDFAHoldTimeTableIndex, edfavalueModuleState=edfavalueModuleState, edfaminValueCGSetting=edfaminValueCGSetting, edfalabelStandbyStatus=edfalabelStandbyStatus, edfacurrentValueOptInPower=edfacurrentValueOptInPower, edfagx2EDFAStatusTableIndex=edfagx2EDFAStatusTableIndex, edfauomTECTemp=edfauomTECTemp, edfastateFlagTECCurrent=edfastateFlagTECCurrent, edfaminorHighLPSetting=edfaminorHighLPSetting, edfavalueADCStatus=edfavalueADCStatus, trapEDFABoot1Alarm=trapEDFABoot1Alarm, gx2EDFAFactoryTable=gx2EDFAFactoryTable, trapEDFAOptInThreshAlarm=trapEDFAOptInThreshAlarm, gx2EDFAAnalogEntry=gx2EDFAAnalogEntry, edfalabelOPSetting=edfalabelOPSetting, edfalabelFanCurrent=edfalabelFanCurrent, edfamajorLowOptThreshold=edfamajorLowOptThreshold, edfalabelOptThreshold=edfalabelOptThreshold, edfavalueTECShutOverride=edfavalueTECShutOverride, edfamajorHighFanCurrent=edfamajorHighFanCurrent, edfafactoryCRC=edfafactoryCRC, edfamajorHighModTemp=edfamajorHighModTemp, edfacurrentValueFanCurrent=edfacurrentValueFanCurrent, edfaenumModeSetting=edfaenumModeSetting, trapEDFAFactoryDataCRCAlarm=trapEDFAFactoryDataCRCAlarm, edfaminValue37Volt=edfaminValue37Volt, edfaflashPrgCntA=edfaflashPrgCntA, edfaalarmStateLPSetting=edfaalarmStateLPSetting, edfaalarmState12Volt=edfaalarmState12Volt, edfaminorHighFanCurrent=edfaminorHighFanCurrent, gx2EDFAHoldTimeTable=gx2EDFAHoldTimeTable, edfastateFlagModuleState=edfastateFlagModuleState, edfastateFlagOptThreshold=edfastateFlagOptThreshold, edfastateflagAlarmDataCRC=edfastateflagAlarmDataCRC, edfamaxValue37Volt=edfamaxValue37Volt, edfaminValueLPSetting=edfaminValueLPSetting, edfastateflagLaserCurrShutdown=edfastateflagLaserCurrShutdown, edfamajorLow12Volt=edfamajorLow12Volt, trapEDFAResetFacDefault=trapEDFAResetFacDefault, trapEDFALaserCurrentAlarm=trapEDFALaserCurrentAlarm, gx2EDFADescriptor=gx2EDFADescriptor, edfalabelLaserCurrShutdown=edfalabelLaserCurrShutdown, edfaalarmStateOptInPower=edfaalarmStateOptInPower, edfastateflagOptInShutdown=edfastateflagOptInShutdown, edfacurrentValue12Volt=edfacurrentValue12Volt, edfastateflagTECTempShutdown=edfastateflagTECTempShutdown, edfacurrentValueLPSetting=edfacurrentValueLPSetting, edfaminValueOptThreshold=edfaminValueOptThreshold, edfacalculateCRC=edfacalculateCRC, edfahourMeter=edfahourMeter, edfalabelOptInShutdown=edfalabelOptInShutdown, edfabank0CRC=edfabank0CRC, gx2EDFAHoldTimeEntry=gx2EDFAHoldTimeEntry, edfastateflagLaserPowShutdown=edfastateflagLaserPowShutdown, trapEDFAFlashAlarm=trapEDFAFlashAlarm, edfaminorHighTECTemp=edfaminorHighTECTemp, edfalabel37Volt=edfalabel37Volt, edfamajorHighLPSetting=edfamajorHighLPSetting, edfaminorHigh12Volt=edfaminorHigh12Volt, edfastateflagKeySwitch=edfastateflagKeySwitch, edfaalarmStateModTemp=edfaalarmStateModTemp, edfaalarmStateTECCurrent=edfaalarmStateTECCurrent, gx2EDFAHoldTimeSpecIndex=gx2EDFAHoldTimeSpecIndex, edfafwRev1=edfafwRev1, gx2EDFADigitalTable=gx2EDFADigitalTable, edfalabelLaserCurrent=edfalabelLaserCurrent, edfamaxValueLaserCurrent=edfamaxValueLaserCurrent, edfaalarmStateTECTemp=edfaalarmStateTECTemp, edfaprgEEPROMByte=edfaprgEEPROMByte, edfaminValueOptInPower=edfaminValueOptInPower, edfaminValueModTemp=edfaminValueModTemp, trapEDFAPlus12CurrentAlarm=trapEDFAPlus12CurrentAlarm, edfaminorLowOptOutPower=edfaminorLowOptOutPower, edfastateflagCalibrationDataCRC=edfastateflagCalibrationDataCRC, edfastateFlag37Volt=edfastateFlag37Volt, trapEDFATECTempShutdown=trapEDFATECTempShutdown, edfamajorLowOPSetting=edfamajorLowOPSetting, edfaminorHighOptThreshold=edfaminorHighOptThreshold, edfaalarmStateCGSetting=edfaalarmStateCGSetting, trapEDFAPlus37CurrentAlarm=trapEDFAPlus37CurrentAlarm, edfaalarmState37Volt=edfaalarmState37Volt, edfavalueFactoryDataCRC=edfavalueFactoryDataCRC, trapEDFAOptInShutdown=trapEDFAOptInShutdown, edfacurrentValueOptThreshold=edfacurrentValueOptThreshold, edfalabelOptInPower=edfalabelOptInPower, edfaminorLowFanCurrent=edfaminorLowFanCurrent, edfamaxValueOptInPower=edfamaxValueOptInPower, edfastateFlag12Volt=edfastateFlag12Volt, edfalabelCGSetting=edfalabelCGSetting, edfalabelModuleState=edfalabelModuleState, edfavalueAlarmDataCRC=edfavalueAlarmDataCRC, trapEDFAKeySwitch=trapEDFAKeySwitch, edfaminValueFanCurrent=edfaminValueFanCurrent, edfamaxValueOptThreshold=edfamaxValueOptThreshold, edfaminValueTECCurrent=edfaminValueTECCurrent, edfaminorLowCGSetting=edfaminorLowCGSetting, edfauom12Volt=edfauom12Volt, edfamajorLowLaserCurrent=edfamajorLowLaserCurrent, edfaalarmStateLaserPower=edfaalarmStateLaserPower, edfamajorLow37Volt=edfamajorLow37Volt, edfamaxValueTECCurrent=edfamaxValueTECCurrent, edfacurrentValueTECCurrent=edfacurrentValueTECCurrent, edfamajorHighOPSetting=edfamajorHighOPSetting, edfaenumModuleState=edfaenumModuleState, edfalabelLaserPower=edfalabelLaserPower, edfaminorLowOptInPower=edfaminorLowOptInPower, edfamajorLowTECCurrent=edfamajorLowTECCurrent, edfagx2EDFAFactoryTableIndex=edfagx2EDFAFactoryTableIndex, edfalabel12Volt=edfalabel12Volt, edfaflashPrgCntB=edfaflashPrgCntB, edfaminorLowLaserCurrent=edfaminorLowLaserCurrent)
mibBuilder.exportSymbols("OMNI-gx2EDFA-MIB", edfavaluePowerFail=edfavaluePowerFail, edfacurrentValueLaserCurrent=edfacurrentValueLaserCurrent, edfastateflagBoot=edfastateflagBoot, edfamajorLowTECTemp=edfamajorLowTECTemp, edfamajorHighTECCurrent=edfamajorHighTECCurrent, edfastateflagConstGainStatus=edfastateflagConstGainStatus, trapEDFACalDataCRCAlarm=trapEDFACalDataCRCAlarm, edfauomOptThreshold=edfauomOptThreshold, edfastateFlagCGSetting=edfastateFlagCGSetting, edfagx2EDFADigitalTableIndex=edfagx2EDFADigitalTableIndex, edfaminorHighOptInPower=edfaminorHighOptInPower, edfaminorHighTECCurrent=edfaminorHighTECCurrent, edfamaxValueOPSetting=edfamaxValueOPSetting, edfalabelAlarmDataCRC=edfalabelAlarmDataCRC, edfastateFlagLPSetting=edfastateFlagLPSetting, edfalabelTECShutOverride=edfalabelTECShutOverride, edfalabelOptOutPower=edfalabelOptOutPower, trapEDFAConfigChangeDisplayString=trapEDFAConfigChangeDisplayString)
| 186.699005 | 11,606 | 0.78236 | 17,886 | 150,106 | 6.565862 | 0.042156 | 0.00923 | 0.091198 | 0.00923 | 0.728144 | 0.643017 | 0.595477 | 0.589107 | 0.58542 | 0.580984 | 0 | 0.050965 | 0.091262 | 150,106 | 803 | 11,607 | 186.931507 | 0.809966 | 0.002172 | 0 | 0 | 0 | 0.198742 | 0.376795 | 0.048167 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.001258 | 0.012579 | 0 | 0.013836 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f95e53af502fd8e1bb77c88e8cd61b0f79bf3e45 | 696 | py | Python | Amogus.py | Timo46465/Ping-Pong | c6a6c96e3a0a8571f0a102090381b656d5d9d275 | [
"CC0-1.0"
] | null | null | null | Amogus.py | Timo46465/Ping-Pong | c6a6c96e3a0a8571f0a102090381b656d5d9d275 | [
"CC0-1.0"
] | null | null | null | Amogus.py | Timo46465/Ping-Pong | c6a6c96e3a0a8571f0a102090381b656d5d9d275 | [
"CC0-1.0"
] | null | null | null | class Player():
def update_l(self)
keys = key.get_pressed()
if keys[K_w]and self.rect.y > 5:
self.rect.y -= self.speed
if keys[K_s]and self.rect.y < win_height -80:
self.rect.y += self.speed
def update_r(self):
keys = key.get_pressed()
if keys[K_UP]and self.rect.y > 5:
self.rect.y -= self.speed
if keys[K_DOWN]and self.rect.y < win_height -80:
self.rect.y += self.speed
back = (200, 255, 255)
win_width = 600
win_height = 500
window = display.set_mode(win_width, win_height))
window.fill(back)
game = True
finish = False
clock = time.clock()
FPS = 60
racket1 = Player() | 30.26087 | 57 | 0.583333 | 110 | 696 | 3.554545 | 0.409091 | 0.163683 | 0.184143 | 0.122762 | 0.547315 | 0.547315 | 0.547315 | 0.547315 | 0.404092 | 0.404092 | 0 | 0.048583 | 0.29023 | 696 | 23 | 58 | 30.26087 | 0.742915 | 0 | 0 | 0.26087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f95ff24a4c901e38885e7da8859d9a5abe337035 | 271 | py | Python | config.py | i-m-pulse/export-google-drive-files | 460bab05cdd332de17f0a558925971ac87b364c0 | [
"MIT"
] | null | null | null | config.py | i-m-pulse/export-google-drive-files | 460bab05cdd332de17f0a558925971ac87b364c0 | [
"MIT"
] | null | null | null | config.py | i-m-pulse/export-google-drive-files | 460bab05cdd332de17f0a558925971ac87b364c0 | [
"MIT"
] | null | null | null | class Config(object):
#Google API keys
OAUTH2_SCOPE = 'https://www.googleapis.com/auth/drive'
DRIVE_CLIENT_ID = 'your drive client id'
DRIVE_CLIENT_SECRET = 'your drive client secret'
DRIVE_REDIRECT_URI = 'your redirect uri'
| 24.636364 | 59 | 0.653137 | 34 | 271 | 5 | 0.588235 | 0.258824 | 0.152941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005 | 0.261993 | 271 | 10 | 60 | 27.1 | 0.845 | 0.055351 | 0 | 0 | 0 | 0 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
f97c7ec5a8d775f51c06156b90aff84d84fb0678 | 266 | py | Python | tests/test_fixsim_simulator.py | NickleDave/active-vision-nengo | 2736fc5ec8f10d7a55a063963ecd1834ec1d3cd0 | [
"BSD-3-Clause"
] | 2 | 2019-03-03T23:30:02.000Z | 2019-07-13T00:29:21.000Z | tests/test_fixsim_simulator.py | NickleDave/active-vision-nengo | 2736fc5ec8f10d7a55a063963ecd1834ec1d3cd0 | [
"BSD-3-Clause"
] | 1 | 2019-06-10T14:14:56.000Z | 2019-06-10T14:14:56.000Z | tests/test_fixsim_simulator.py | NickleDave/active-vision-nengo | 2736fc5ec8f10d7a55a063963ecd1834ec1d3cd0 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import fvf
class TestFixSim(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_init(self):
an_fvf_model = fvf.FVFModel()
def test_
if __name__ == '__main__':
unittest.main()
| 13.3 | 37 | 0.62406 | 32 | 266 | 4.8125 | 0.59375 | 0.103896 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.281955 | 266 | 19 | 38 | 14 | 0.806283 | 0 | 0 | 0.166667 | 0 | 0 | 0.030075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.166667 | 0.166667 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
f98400d3be435414c57c0345098869caa28902e8 | 45,738 | py | Python | pysnmp/RFC1382-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/RFC1382-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/RFC1382-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module RFC1382-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RFC1382-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:32:43 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection")
PositiveInteger, = mibBuilder.importSymbols("RFC1253-MIB", "PositiveInteger")
EntryStatus, = mibBuilder.importSymbols("RFC1271-MIB", "EntryStatus")
IfIndexType, = mibBuilder.importSymbols("RFC1381-MIB", "IfIndexType")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, NotificationType, ObjectIdentity, IpAddress, TimeTicks, MibIdentifier, Unsigned32, Counter32, transmission, Gauge32, iso, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Counter64, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "NotificationType", "ObjectIdentity", "IpAddress", "TimeTicks", "MibIdentifier", "Unsigned32", "Counter32", "transmission", "Gauge32", "iso", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Counter64", "Bits")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
x25 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5))
class X121Address(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 17)
x25AdmnTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 1), )
if mibBuilder.loadTexts: x25AdmnTable.setStatus('mandatory')
x25AdmnEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 1, 1), ).setIndexNames((0, "RFC1382-MIB", "x25AdmnIndex"))
if mibBuilder.loadTexts: x25AdmnEntry.setStatus('mandatory')
x25AdmnIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25AdmnIndex.setStatus('mandatory')
x25AdmnInterfaceMode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("dte", 1), ("dce", 2), ("dxe", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnInterfaceMode.setStatus('mandatory')
x25AdmnMaxActiveCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnMaxActiveCircuits.setStatus('mandatory')
x25AdmnPacketSequencing = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnPacketSequencing.setStatus('mandatory')
x25AdmnRestartTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 5), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRestartTimer.setStatus('mandatory')
x25AdmnCallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 6), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnCallTimer.setStatus('mandatory')
x25AdmnResetTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 7), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnResetTimer.setStatus('mandatory')
x25AdmnClearTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 8), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnClearTimer.setStatus('mandatory')
x25AdmnWindowTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 9), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnWindowTimer.setStatus('mandatory')
x25AdmnDataRxmtTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 10), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnDataRxmtTimer.setStatus('mandatory')
x25AdmnInterruptTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 11), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnInterruptTimer.setStatus('mandatory')
x25AdmnRejectTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 12), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRejectTimer.setStatus('mandatory')
x25AdmnRegistrationRequestTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 13), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRegistrationRequestTimer.setStatus('mandatory')
x25AdmnMinimumRecallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 14), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnMinimumRecallTimer.setStatus('mandatory')
x25AdmnRestartCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRestartCount.setStatus('mandatory')
x25AdmnResetCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnResetCount.setStatus('mandatory')
x25AdmnClearCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnClearCount.setStatus('mandatory')
x25AdmnDataRxmtCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnDataRxmtCount.setStatus('mandatory')
x25AdmnRejectCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRejectCount.setStatus('mandatory')
x25AdmnRegistrationRequestCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRegistrationRequestCount.setStatus('mandatory')
x25AdmnNumberPVCs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnNumberPVCs.setStatus('mandatory')
x25AdmnDefCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 22), ObjectIdentifier()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnDefCallParamId.setStatus('mandatory')
x25AdmnLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 23), X121Address()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnLocalAddress.setStatus('mandatory')
x25AdmnProtocolVersionSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 24), ObjectIdentifier()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnProtocolVersionSupported.setStatus('mandatory')
x25OperTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 2), )
if mibBuilder.loadTexts: x25OperTable.setStatus('mandatory')
x25OperEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 2, 1), ).setIndexNames((0, "RFC1382-MIB", "x25OperIndex"))
if mibBuilder.loadTexts: x25OperEntry.setStatus('mandatory')
x25OperIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperIndex.setStatus('mandatory')
x25OperInterfaceMode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("dte", 1), ("dce", 2), ("dxe", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperInterfaceMode.setStatus('mandatory')
x25OperMaxActiveCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperMaxActiveCircuits.setStatus('mandatory')
x25OperPacketSequencing = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperPacketSequencing.setStatus('mandatory')
x25OperRestartTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 5), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRestartTimer.setStatus('mandatory')
x25OperCallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 6), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperCallTimer.setStatus('mandatory')
x25OperResetTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 7), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperResetTimer.setStatus('mandatory')
x25OperClearTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 8), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperClearTimer.setStatus('mandatory')
x25OperWindowTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 9), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperWindowTimer.setStatus('mandatory')
x25OperDataRxmtTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 10), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDataRxmtTimer.setStatus('mandatory')
x25OperInterruptTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 11), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperInterruptTimer.setStatus('mandatory')
x25OperRejectTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 12), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRejectTimer.setStatus('mandatory')
x25OperRegistrationRequestTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 13), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRegistrationRequestTimer.setStatus('mandatory')
x25OperMinimumRecallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 14), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperMinimumRecallTimer.setStatus('mandatory')
x25OperRestartCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRestartCount.setStatus('mandatory')
x25OperResetCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperResetCount.setStatus('mandatory')
x25OperClearCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperClearCount.setStatus('mandatory')
x25OperDataRxmtCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDataRxmtCount.setStatus('mandatory')
x25OperRejectCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRejectCount.setStatus('mandatory')
x25OperRegistrationRequestCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRegistrationRequestCount.setStatus('mandatory')
x25OperNumberPVCs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperNumberPVCs.setStatus('mandatory')
x25OperDefCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 22), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDefCallParamId.setStatus('mandatory')
x25OperLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 23), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperLocalAddress.setStatus('mandatory')
x25OperDataLinkId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 24), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDataLinkId.setStatus('mandatory')
x25OperProtocolVersionSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 25), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperProtocolVersionSupported.setStatus('mandatory')
x25StatTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 3), )
if mibBuilder.loadTexts: x25StatTable.setStatus('mandatory')
x25StatEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 3, 1), ).setIndexNames((0, "RFC1382-MIB", "x25StatIndex"))
if mibBuilder.loadTexts: x25StatEntry.setStatus('mandatory')
x25StatIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatIndex.setStatus('mandatory')
x25StatInCalls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInCalls.setStatus('mandatory')
x25StatInCallRefusals = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInCallRefusals.setStatus('mandatory')
x25StatInProviderInitiatedClears = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInProviderInitiatedClears.setStatus('mandatory')
x25StatInRemotelyInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInRemotelyInitiatedResets.setStatus('mandatory')
x25StatInProviderInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInProviderInitiatedResets.setStatus('mandatory')
x25StatInRestarts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInRestarts.setStatus('mandatory')
x25StatInDataPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInDataPackets.setStatus('mandatory')
x25StatInAccusedOfProtocolErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInAccusedOfProtocolErrors.setStatus('mandatory')
x25StatInInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInInterrupts.setStatus('mandatory')
x25StatOutCallAttempts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutCallAttempts.setStatus('mandatory')
x25StatOutCallFailures = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutCallFailures.setStatus('mandatory')
x25StatOutInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutInterrupts.setStatus('mandatory')
x25StatOutDataPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutDataPackets.setStatus('mandatory')
x25StatOutgoingCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutgoingCircuits.setStatus('mandatory')
x25StatIncomingCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 16), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatIncomingCircuits.setStatus('mandatory')
x25StatTwowayCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 17), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatTwowayCircuits.setStatus('mandatory')
x25StatRestartTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatRestartTimeouts.setStatus('mandatory')
x25StatCallTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatCallTimeouts.setStatus('mandatory')
x25StatResetTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatResetTimeouts.setStatus('mandatory')
x25StatClearTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatClearTimeouts.setStatus('mandatory')
x25StatDataRxmtTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatDataRxmtTimeouts.setStatus('mandatory')
x25StatInterruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInterruptTimeouts.setStatus('mandatory')
x25StatRetryCountExceededs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatRetryCountExceededs.setStatus('mandatory')
x25StatClearCountExceededs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatClearCountExceededs.setStatus('mandatory')
x25ChannelTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 4), )
if mibBuilder.loadTexts: x25ChannelTable.setStatus('mandatory')
x25ChannelEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 4, 1), ).setIndexNames((0, "RFC1382-MIB", "x25ChannelIndex"))
if mibBuilder.loadTexts: x25ChannelEntry.setStatus('mandatory')
x25ChannelIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ChannelIndex.setStatus('mandatory')
x25ChannelLIC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelLIC.setStatus('mandatory')
x25ChannelHIC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelHIC.setStatus('mandatory')
x25ChannelLTC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelLTC.setStatus('mandatory')
x25ChannelHTC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelHTC.setStatus('mandatory')
x25ChannelLOC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelLOC.setStatus('mandatory')
x25ChannelHOC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelHOC.setStatus('mandatory')
x25CircuitTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 5), )
if mibBuilder.loadTexts: x25CircuitTable.setStatus('mandatory')
x25CircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 5, 1), ).setIndexNames((0, "RFC1382-MIB", "x25CircuitIndex"), (0, "RFC1382-MIB", "x25CircuitChannel"))
if mibBuilder.loadTexts: x25CircuitEntry.setStatus('mandatory')
x25CircuitIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitIndex.setStatus('mandatory')
x25CircuitChannel = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitChannel.setStatus('mandatory')
x25CircuitStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("invalid", 1), ("closed", 2), ("calling", 3), ("open", 4), ("clearing", 5), ("pvc", 6), ("pvcResetting", 7), ("startClear", 8), ("startPvcResetting", 9), ("other", 10)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitStatus.setStatus('mandatory')
x25CircuitEstablishTime = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 4), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitEstablishTime.setStatus('mandatory')
x25CircuitDirection = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("pvc", 3))).clone('pvc')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitDirection.setStatus('mandatory')
x25CircuitInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInOctets.setStatus('mandatory')
x25CircuitInPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInPdus.setStatus('mandatory')
x25CircuitInRemotelyInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInRemotelyInitiatedResets.setStatus('mandatory')
x25CircuitInProviderInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInProviderInitiatedResets.setStatus('mandatory')
x25CircuitInInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInInterrupts.setStatus('mandatory')
x25CircuitOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitOutOctets.setStatus('mandatory')
x25CircuitOutPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitOutPdus.setStatus('mandatory')
x25CircuitOutInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitOutInterrupts.setStatus('mandatory')
x25CircuitDataRetransmissionTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitDataRetransmissionTimeouts.setStatus('mandatory')
x25CircuitResetTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitResetTimeouts.setStatus('mandatory')
x25CircuitInterruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInterruptTimeouts.setStatus('mandatory')
x25CircuitCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 17), ObjectIdentifier()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitCallParamId.setStatus('mandatory')
x25CircuitCalledDteAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 18), X121Address().clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitCalledDteAddress.setStatus('mandatory')
x25CircuitCallingDteAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 19), X121Address().clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitCallingDteAddress.setStatus('mandatory')
x25CircuitOriginallyCalledAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 20), X121Address().clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitOriginallyCalledAddress.setStatus('mandatory')
x25CircuitDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitDescr.setStatus('mandatory')
x25ClearedCircuitEntriesRequested = MibScalar((1, 3, 6, 1, 2, 1, 10, 5, 6), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ClearedCircuitEntriesRequested.setStatus('mandatory')
x25ClearedCircuitEntriesGranted = MibScalar((1, 3, 6, 1, 2, 1, 10, 5, 7), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitEntriesGranted.setStatus('mandatory')
x25ClearedCircuitTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 8), )
if mibBuilder.loadTexts: x25ClearedCircuitTable.setStatus('mandatory')
x25ClearedCircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 8, 1), ).setIndexNames((0, "RFC1382-MIB", "x25ClearedCircuitIndex"))
if mibBuilder.loadTexts: x25ClearedCircuitEntry.setStatus('mandatory')
x25ClearedCircuitIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 1), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitIndex.setStatus('mandatory')
x25ClearedCircuitPleIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 2), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitPleIndex.setStatus('mandatory')
x25ClearedCircuitTimeEstablished = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 3), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitTimeEstablished.setStatus('mandatory')
x25ClearedCircuitTimeCleared = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 4), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitTimeCleared.setStatus('mandatory')
x25ClearedCircuitChannel = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitChannel.setStatus('mandatory')
x25ClearedCircuitClearingCause = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitClearingCause.setStatus('mandatory')
x25ClearedCircuitDiagnosticCode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitDiagnosticCode.setStatus('mandatory')
x25ClearedCircuitInPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitInPdus.setStatus('mandatory')
x25ClearedCircuitOutPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitOutPdus.setStatus('mandatory')
x25ClearedCircuitCalledAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 10), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitCalledAddress.setStatus('mandatory')
x25ClearedCircuitCallingAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 11), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitCallingAddress.setStatus('mandatory')
x25ClearedCircuitClearFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 12), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 109))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitClearFacilities.setStatus('mandatory')
x25CallParmTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 9), )
if mibBuilder.loadTexts: x25CallParmTable.setStatus('mandatory')
x25CallParmEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 9, 1), ).setIndexNames((0, "RFC1382-MIB", "x25CallParmIndex"))
if mibBuilder.loadTexts: x25CallParmEntry.setStatus('mandatory')
x25CallParmIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 1), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CallParmIndex.setStatus('mandatory')
x25CallParmStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 2), EntryStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmStatus.setStatus('mandatory')
x25CallParmRefCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 3), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CallParmRefCount.setStatus('mandatory')
x25CallParmInPacketSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096)).clone(128)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInPacketSize.setStatus('mandatory')
x25CallParmOutPacketSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096)).clone(128)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutPacketSize.setStatus('mandatory')
x25CallParmInWindowSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127)).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInWindowSize.setStatus('mandatory')
x25CallParmOutWindowSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127)).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutWindowSize.setStatus('mandatory')
x25CallParmAcceptReverseCharging = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("default", 1), ("accept", 2), ("refuse", 3), ("neverAccept", 4))).clone('refuse')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmAcceptReverseCharging.setStatus('mandatory')
x25CallParmProposeReverseCharging = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("default", 1), ("reverse", 2), ("local", 3))).clone('local')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmProposeReverseCharging.setStatus('mandatory')
x25CallParmFastSelect = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("default", 1), ("notSpecified", 2), ("fastSelect", 3), ("restrictedFastResponse", 4), ("noFastSelect", 5), ("noRestrictedFastResponse", 6))).clone('noFastSelect')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmFastSelect.setStatus('mandatory')
x25CallParmInThruPutClasSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))).clone(namedValues=NamedValues(("tcReserved1", 1), ("tcReserved2", 2), ("tc75", 3), ("tc150", 4), ("tc300", 5), ("tc600", 6), ("tc1200", 7), ("tc2400", 8), ("tc4800", 9), ("tc9600", 10), ("tc19200", 11), ("tc48000", 12), ("tc64000", 13), ("tcReserved14", 14), ("tcReserved15", 15), ("tcReserved0", 16), ("tcNone", 17), ("tcDefault", 18))).clone('tcNone')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInThruPutClasSize.setStatus('mandatory')
x25CallParmOutThruPutClasSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))).clone(namedValues=NamedValues(("tcReserved1", 1), ("tcReserved2", 2), ("tc75", 3), ("tc150", 4), ("tc300", 5), ("tc600", 6), ("tc1200", 7), ("tc2400", 8), ("tc4800", 9), ("tc9600", 10), ("tc19200", 11), ("tc48000", 12), ("tc64000", 13), ("tcReserved14", 14), ("tcReserved15", 15), ("tcReserved0", 16), ("tcNone", 17), ("tcDefault", 18))).clone('tcNone')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutThruPutClasSize.setStatus('mandatory')
x25CallParmCug = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCug.setStatus('mandatory')
x25CallParmCugoa = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCugoa.setStatus('mandatory')
x25CallParmBcug = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 3)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmBcug.setStatus('mandatory')
x25CallParmNui = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 16), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmNui.setStatus('mandatory')
x25CallParmChargingInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("default", 1), ("noFacility", 2), ("noChargingInfo", 3), ("chargingInfo", 4))).clone('noFacility')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmChargingInfo.setStatus('mandatory')
x25CallParmRpoa = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmRpoa.setStatus('mandatory')
x25CallParmTrnstDly = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65537)).clone(65536)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmTrnstDly.setStatus('mandatory')
x25CallParmCallingExt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCallingExt.setStatus('mandatory')
x25CallParmCalledExt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCalledExt.setStatus('mandatory')
x25CallParmInMinThuPutCls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 17)).clone(17)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInMinThuPutCls.setStatus('mandatory')
x25CallParmOutMinThuPutCls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 17)).clone(17)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutMinThuPutCls.setStatus('mandatory')
x25CallParmEndTrnsDly = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 24), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 6)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmEndTrnsDly.setStatus('mandatory')
x25CallParmPriority = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 6)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmPriority.setStatus('mandatory')
x25CallParmProtection = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 26), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmProtection.setStatus('mandatory')
x25CallParmExptData = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("default", 1), ("noExpeditedData", 2), ("expeditedData", 3))).clone('noExpeditedData')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmExptData.setStatus('mandatory')
x25CallParmUserData = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 28), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmUserData.setStatus('mandatory')
x25CallParmCallingNetworkFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 29), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCallingNetworkFacilities.setStatus('mandatory')
x25CallParmCalledNetworkFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 30), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCalledNetworkFacilities.setStatus('mandatory')
x25Restart = NotificationType((1, 3, 6, 1, 2, 1, 10, 5) + (0,1)).setObjects(("RFC1382-MIB", "x25OperIndex"))
x25Reset = NotificationType((1, 3, 6, 1, 2, 1, 10, 5) + (0,2)).setObjects(("RFC1382-MIB", "x25CircuitIndex"), ("RFC1382-MIB", "x25CircuitChannel"))
x25ProtocolVersion = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10))
x25protocolCcittV1976 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 1))
x25protocolCcittV1980 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 2))
x25protocolCcittV1984 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 3))
x25protocolCcittV1988 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 4))
x25protocolIso8208V1987 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 5))
x25protocolIso8208V1989 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 6))
mibBuilder.exportSymbols("RFC1382-MIB", x25CallParmInPacketSize=x25CallParmInPacketSize, x25OperInterruptTimer=x25OperInterruptTimer, x25CallParmTable=x25CallParmTable, x25CallParmExptData=x25CallParmExptData, x25StatOutDataPackets=x25StatOutDataPackets, x25AdmnDefCallParamId=x25AdmnDefCallParamId, x25AdmnCallTimer=x25AdmnCallTimer, x25AdmnNumberPVCs=x25AdmnNumberPVCs, x25ClearedCircuitEntry=x25ClearedCircuitEntry, x25ClearedCircuitChannel=x25ClearedCircuitChannel, x25ClearedCircuitClearingCause=x25ClearedCircuitClearingCause, x25CallParmCallingExt=x25CallParmCallingExt, x25Restart=x25Restart, x25CircuitTable=x25CircuitTable, x25CircuitInterruptTimeouts=x25CircuitInterruptTimeouts, x25OperRestartCount=x25OperRestartCount, x25OperWindowTimer=x25OperWindowTimer, x25StatInCallRefusals=x25StatInCallRefusals, x25StatInInterrupts=x25StatInInterrupts, x25StatEntry=x25StatEntry, x25AdmnRegistrationRequestTimer=x25AdmnRegistrationRequestTimer, x25CircuitOutPdus=x25CircuitOutPdus, x25AdmnRestartCount=x25AdmnRestartCount, x25CallParmCalledExt=x25CallParmCalledExt, x25AdmnResetTimer=x25AdmnResetTimer, x25ClearedCircuitEntriesGranted=x25ClearedCircuitEntriesGranted, x25AdmnRejectCount=x25AdmnRejectCount, x25OperRejectCount=x25OperRejectCount, x25StatTwowayCircuits=x25StatTwowayCircuits, x25ClearedCircuitCallingAddress=x25ClearedCircuitCallingAddress, x25StatRestartTimeouts=x25StatRestartTimeouts, x25StatClearCountExceededs=x25StatClearCountExceededs, x25AdmnMaxActiveCircuits=x25AdmnMaxActiveCircuits, x25StatClearTimeouts=x25StatClearTimeouts, x25StatInCalls=x25StatInCalls, x25CallParmUserData=x25CallParmUserData, x25Reset=x25Reset, x25AdmnLocalAddress=x25AdmnLocalAddress, x25StatIndex=x25StatIndex, x25ProtocolVersion=x25ProtocolVersion, x25ChannelEntry=x25ChannelEntry, x25=x25, x25CallParmIndex=x25CallParmIndex, x25CallParmFastSelect=x25CallParmFastSelect, x25StatTable=x25StatTable, x25AdmnPacketSequencing=x25AdmnPacketSequencing, x25ChannelLOC=x25ChannelLOC, x25CallParmInMinThuPutCls=x25CallParmInMinThuPutCls, x25OperTable=x25OperTable, x25StatInProviderInitiatedResets=x25StatInProviderInitiatedResets, x25protocolCcittV1984=x25protocolCcittV1984, x25ClearedCircuitPleIndex=x25ClearedCircuitPleIndex, x25CircuitDescr=x25CircuitDescr, x25AdmnDataRxmtTimer=x25AdmnDataRxmtTimer, x25protocolIso8208V1989=x25protocolIso8208V1989, x25CircuitEstablishTime=x25CircuitEstablishTime, x25CallParmStatus=x25CallParmStatus, x25CircuitChannel=x25CircuitChannel, x25StatInRestarts=x25StatInRestarts, x25OperClearCount=x25OperClearCount, x25OperEntry=x25OperEntry, x25OperIndex=x25OperIndex, x25CircuitDataRetransmissionTimeouts=x25CircuitDataRetransmissionTimeouts, x25ClearedCircuitDiagnosticCode=x25ClearedCircuitDiagnosticCode, x25CallParmEntry=x25CallParmEntry, x25ChannelHOC=x25ChannelHOC, x25OperProtocolVersionSupported=x25OperProtocolVersionSupported, x25StatCallTimeouts=x25StatCallTimeouts, x25ChannelHTC=x25ChannelHTC, x25CircuitResetTimeouts=x25CircuitResetTimeouts, x25ClearedCircuitTimeEstablished=x25ClearedCircuitTimeEstablished, x25CallParmOutPacketSize=x25CallParmOutPacketSize, x25protocolIso8208V1987=x25protocolIso8208V1987, x25StatInProviderInitiatedClears=x25StatInProviderInitiatedClears, X121Address=X121Address, x25OperResetTimer=x25OperResetTimer, x25OperRegistrationRequestCount=x25OperRegistrationRequestCount, x25OperLocalAddress=x25OperLocalAddress, x25AdmnInterruptTimer=x25AdmnInterruptTimer, x25CircuitOutInterrupts=x25CircuitOutInterrupts, x25OperResetCount=x25OperResetCount, x25CircuitInProviderInitiatedResets=x25CircuitInProviderInitiatedResets, x25ClearedCircuitIndex=x25ClearedCircuitIndex, x25CallParmCugoa=x25CallParmCugoa, x25CallParmNui=x25CallParmNui, x25AdmnMinimumRecallTimer=x25AdmnMinimumRecallTimer, x25OperDataRxmtCount=x25OperDataRxmtCount, x25CircuitInPdus=x25CircuitInPdus, x25protocolCcittV1976=x25protocolCcittV1976, x25ClearedCircuitClearFacilities=x25ClearedCircuitClearFacilities, x25AdmnClearCount=x25AdmnClearCount, x25AdmnProtocolVersionSupported=x25AdmnProtocolVersionSupported, x25CallParmBcug=x25CallParmBcug, x25CallParmProposeReverseCharging=x25CallParmProposeReverseCharging, x25AdmnIndex=x25AdmnIndex, x25CallParmRpoa=x25CallParmRpoa, x25StatOutInterrupts=x25StatOutInterrupts, x25CircuitIndex=x25CircuitIndex, x25ClearedCircuitOutPdus=x25ClearedCircuitOutPdus, x25CallParmCallingNetworkFacilities=x25CallParmCallingNetworkFacilities, x25ChannelLIC=x25ChannelLIC, x25CircuitStatus=x25CircuitStatus, x25OperDataLinkId=x25OperDataLinkId, x25StatInRemotelyInitiatedResets=x25StatInRemotelyInitiatedResets, x25ChannelTable=x25ChannelTable, x25protocolCcittV1980=x25protocolCcittV1980, x25CallParmRefCount=x25CallParmRefCount, x25CallParmPriority=x25CallParmPriority, x25ClearedCircuitCalledAddress=x25ClearedCircuitCalledAddress, x25AdmnTable=x25AdmnTable, x25ChannelLTC=x25ChannelLTC, x25OperDefCallParamId=x25OperDefCallParamId, x25CallParmTrnstDly=x25CallParmTrnstDly, x25protocolCcittV1988=x25protocolCcittV1988, x25StatIncomingCircuits=x25StatIncomingCircuits, x25CircuitInInterrupts=x25CircuitInInterrupts, x25CallParmProtection=x25CallParmProtection, x25OperInterfaceMode=x25OperInterfaceMode, x25OperClearTimer=x25OperClearTimer, x25ClearedCircuitEntriesRequested=x25ClearedCircuitEntriesRequested, x25StatOutCallAttempts=x25StatOutCallAttempts, x25CallParmCalledNetworkFacilities=x25CallParmCalledNetworkFacilities, x25CircuitCalledDteAddress=x25CircuitCalledDteAddress, x25StatInDataPackets=x25StatInDataPackets, x25OperRestartTimer=x25OperRestartTimer, x25AdmnDataRxmtCount=x25AdmnDataRxmtCount, x25CallParmAcceptReverseCharging=x25CallParmAcceptReverseCharging, x25AdmnClearTimer=x25AdmnClearTimer, x25ChannelHIC=x25ChannelHIC, x25CircuitOutOctets=x25CircuitOutOctets, x25CallParmInWindowSize=x25CallParmInWindowSize, x25CallParmOutWindowSize=x25CallParmOutWindowSize, x25StatInterruptTimeouts=x25StatInterruptTimeouts, x25OperNumberPVCs=x25OperNumberPVCs, x25CircuitOriginallyCalledAddress=x25CircuitOriginallyCalledAddress, x25CallParmChargingInfo=x25CallParmChargingInfo, x25OperPacketSequencing=x25OperPacketSequencing, x25CircuitInOctets=x25CircuitInOctets, x25ChannelIndex=x25ChannelIndex, x25StatInAccusedOfProtocolErrors=x25StatInAccusedOfProtocolErrors, x25CircuitCallParamId=x25CircuitCallParamId, x25AdmnRestartTimer=x25AdmnRestartTimer, x25CallParmOutThruPutClasSize=x25CallParmOutThruPutClasSize, x25OperCallTimer=x25OperCallTimer, x25StatOutCallFailures=x25StatOutCallFailures, x25AdmnRejectTimer=x25AdmnRejectTimer, x25AdmnEntry=x25AdmnEntry, x25StatDataRxmtTimeouts=x25StatDataRxmtTimeouts, x25OperRejectTimer=x25OperRejectTimer, x25CallParmInThruPutClasSize=x25CallParmInThruPutClasSize, x25OperMaxActiveCircuits=x25OperMaxActiveCircuits, x25ClearedCircuitInPdus=x25ClearedCircuitInPdus, x25CallParmOutMinThuPutCls=x25CallParmOutMinThuPutCls, x25AdmnWindowTimer=x25AdmnWindowTimer, x25CallParmCug=x25CallParmCug, x25AdmnRegistrationRequestCount=x25AdmnRegistrationRequestCount, x25CircuitEntry=x25CircuitEntry, x25CircuitInRemotelyInitiatedResets=x25CircuitInRemotelyInitiatedResets, x25OperMinimumRecallTimer=x25OperMinimumRecallTimer, x25CircuitDirection=x25CircuitDirection, x25ClearedCircuitTimeCleared=x25ClearedCircuitTimeCleared, x25ClearedCircuitTable=x25ClearedCircuitTable, x25OperRegistrationRequestTimer=x25OperRegistrationRequestTimer, x25CallParmEndTrnsDly=x25CallParmEndTrnsDly, x25StatRetryCountExceededs=x25StatRetryCountExceededs, x25OperDataRxmtTimer=x25OperDataRxmtTimer, x25AdmnInterfaceMode=x25AdmnInterfaceMode, x25StatOutgoingCircuits=x25StatOutgoingCircuits, x25AdmnResetCount=x25AdmnResetCount, x25StatResetTimeouts=x25StatResetTimeouts, x25CircuitCallingDteAddress=x25CircuitCallingDteAddress)
| 130.307692 | 7,726 | 0.777887 | 4,775 | 45,738 | 7.451099 | 0.075393 | 0.011018 | 0.019225 | 0.019112 | 0.463195 | 0.432193 | 0.360522 | 0.346187 | 0.298153 | 0.289862 | 0 | 0.10468 | 0.074533 | 45,738 | 350 | 7,727 | 130.68 | 0.735855 | 0.006909 | 0 | 0 | 0 | 0 | 0.092595 | 0.002466 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.026316 | 0 | 0.032164 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f98583eaaaeba460fbd85c98498bcb5e5d425575 | 9,127 | py | Python | libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v9.py | Thinklab-SJTU/DCL_RetinaNet_Tensorflow | 1d14c9800c3eb1975e8832978f7a263783d171ec | [
"Apache-2.0"
] | 36 | 2020-11-19T07:23:42.000Z | 2022-03-30T03:35:57.000Z | libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v9.py | Thinklab-SJTU/DCL_RetinaNet_Tensorflow | 1d14c9800c3eb1975e8832978f7a263783d171ec | [
"Apache-2.0"
] | 4 | 2021-01-30T09:49:10.000Z | 2021-12-05T12:49:11.000Z | libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v9.py | Thinklab-SJTU/DCL_RetinaNet_Tensorflow | 1d14c9800c3eb1975e8832978f7a263783d171ec | [
"Apache-2.0"
] | 6 | 2020-11-23T07:54:47.000Z | 2021-07-09T07:20:15.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import tensorflow as tf
import math
"""
BCL + OMEGA = 180 / 4.
{'0.75': {'helicopter': 0.10876623376623376, 'plane': 0.6261590820350442, 'storage-tank': 0.5697743174702269, 'tennis-court': 0.6026590467841741, 'swimming-pool': 0.040106951871657755, 'bridge': 0.0606060606060606, 'soccer-ball-field': 0.29083413775222616, 'harbor': 0.028655598899814838, 'roundabout': 0.33217013884400926, 'small-vehicle': 0.12618998165181367, 'baseball-diamond': 0.22509909218769975, 'ship': 0.10926192442325014, 'ground-track-field': 0.1988529807689143, 'mAP': 0.24875341013031635, 'basketball-court': 0.34781582054309323, 'large-vehicle': 0.06434978435052693},
'0.55': {'helicopter': 0.4744347006621738, 'plane': 0.8957642309025142, 'storage-tank': 0.7849056299207573, 'tennis-court': 0.9046144991020904, 'swimming-pool': 0.4731508326847427, 'bridge': 0.24568597431068456, 'soccer-ball-field': 0.6514604520734688, 'harbor': 0.3024824698269053, 'roundabout': 0.6358730574048375, 'small-vehicle': 0.5728596038534517, 'baseball-diamond': 0.6488637457385472, 'ship': 0.5813158626785325, 'ground-track-field': 0.596124558196834, 'mAP': 0.5835838887166079, 'basketball-court': 0.5873186403325683, 'large-vehicle': 0.39890407306100956},
'0.9': {'helicopter': 0.0, 'plane': 0.11460877431026685, 'storage-tank': 0.05750737274009488, 'tennis-court': 0.15913486899947246, 'swimming-pool': 0.0005107252298263534, 'bridge': 0.0, 'soccer-ball-field': 0.0606060606060606, 'harbor': 0.0004318721658389117, 'roundabout': 0.045454545454545456, 'small-vehicle': 0.003896103896103896, 'baseball-diamond': 0.045454545454545456, 'ship': 0.018181818181818184, 'ground-track-field': 0.0025974025974025974, 'mAP': 0.035686426500772424, 'basketball-court': 0.025974025974025972, 'large-vehicle': 0.000938281901584654},
'0.8': {'helicopter': 0.08181818181818182, 'plane': 0.404965437561218, 'storage-tank': 0.4232554615094123, 'tennis-court': 0.49650701718239065, 'swimming-pool': 0.012987012987012986, 'bridge': 0.018181818181818184, 'soccer-ball-field': 0.20363997651628055, 'harbor': 0.008621630470369967, 'roundabout': 0.23755411255411257, 'small-vehicle': 0.03881685575364668, 'baseball-diamond': 0.11923583662714096, 'ship': 0.06079248864483764, 'ground-track-field': 0.11931818181818182, 'mAP': 0.16699553570063064, 'basketball-court': 0.25691587823940765, 'large-vehicle': 0.02232314564544774},
'mmAP': 0.31009260103172187,
'0.7': {'helicopter': 0.21655188246097337, 'plane': 0.7837033364268121, 'storage-tank': 0.6766325937707176, 'tennis-court': 0.7531337747437782, 'swimming-pool': 0.09962947624794305, 'bridge': 0.09666622037756059, 'soccer-ball-field': 0.45707870730439126, 'harbor': 0.053616761464057326, 'roundabout': 0.4640797232366124, 'small-vehicle': 0.2537630457539992, 'baseball-diamond': 0.4081837275217716, 'ship': 0.16469794133073, 'ground-track-field': 0.32010188669067174, 'mAP': 0.3526239900570703, 'basketball-court': 0.41375480404895904, 'large-vehicle': 0.1277659694770764},
'0.65': {'helicopter': 0.3536633867607319, 'plane': 0.8835043774088882, 'storage-tank': 0.7637731652459822, 'tennis-court': 0.9030454652902554, 'swimming-pool': 0.25313548287637216, 'bridge': 0.11907810499359794, 'soccer-ball-field': 0.5691651795869328, 'harbor': 0.11986035247388582, 'roundabout': 0.5211534232745603, 'small-vehicle': 0.40825064051775517, 'baseball-diamond': 0.5417445700267612, 'ship': 0.2511909509245631, 'ground-track-field': 0.4690010735364718, 'mAP': 0.46115890049630265, 'basketball-court': 0.5510538855220554, 'large-vehicle': 0.20976344900572677},
'0.95': {'helicopter': 0.0, 'plane': 0.09090909090909091, 'storage-tank': 0.0053475935828877, 'tennis-court': 0.0303030303030303, 'swimming-pool': 0.0, 'bridge': 0.0, 'soccer-ball-field': 0.008264462809917356, 'harbor': 0.0, 'roundabout': 0.0, 'small-vehicle': 7.867511112859446e-05, 'baseball-diamond': 0.0, 'ship': 0.00028498147620404675, 'ground-track-field': 0.0, 'mAP': 0.009570436703119784, 'basketball-court': 0.008264462809917356, 'large-vehicle': 0.00010425354462051711},
'0.6': {'helicopter': 0.44018350039740417, 'plane': 0.8929091417760971, 'storage-tank': 0.7795868875383778, 'tennis-court': 0.9046144991020904, 'swimming-pool': 0.36610502311359944, 'bridge': 0.19395421735639892, 'soccer-ball-field': 0.6047875952081441, 'harbor': 0.2072308643466718, 'roundabout': 0.5992163694373649, 'small-vehicle': 0.5254517203883775, 'baseball-diamond': 0.6031967704339226, 'ship': 0.44168316330138013, 'ground-track-field': 0.5522957518738691, 'mAP': 0.5325808460769651, 'basketball-court': 0.5767922084787784, 'large-vehicle': 0.30070497840199967},
'0.85': {'helicopter': 0.013986013986013986, 'plane': 0.2245208016504695, 'storage-tank': 0.2164994910939014, 'tennis-court': 0.36938527311764985, 'swimming-pool': 0.012987012987012986, 'bridge': 0.0, 'soccer-ball-field': 0.09860509860509861, 'harbor': 0.0031451250561629475, 'roundabout': 0.09420289855072464, 'small-vehicle': 0.022727272727272728, 'baseball-diamond': 0.045454545454545456, 'ship': 0.045454545454545456, 'ground-track-field': 0.012987012987012986, 'mAP': 0.08614401812853563, 'basketball-court': 0.1278409090909091, 'large-vehicle': 0.0043642711667151585},
'0.5': {'helicopter': 0.48498648287488183, 'plane': 0.8981158855171345, 'storage-tank': 0.7871516406647231, 'tennis-court': 0.9051918689811524, 'swimming-pool': 0.523559435802154, 'bridge': 0.30744775808322455, 'soccer-ball-field': 0.6703088675833423, 'harbor': 0.40542090785094587, 'roundabout': 0.667214208043851, 'small-vehicle': 0.5953549814024383, 'baseball-diamond': 0.6751587500651139, 'ship': 0.7207120062792685, 'ground-track-field': 0.606089076120964, 'mAP': 0.6238285578068979, 'basketball-court': 0.6009269105967685, 'large-vehicle': 0.5097895872375081}}
"""
# ------------------------------------------------
VERSION = 'RetinaNet_DOTA_DCL_B_2x_20200921'
NET_NAME = 'resnet50_v1d' # 'MobilenetV2'
ADD_BOX_IN_TENSORBOARD = True
# ---------------------------------------- System_config
ROOT_PATH = os.path.abspath('../')
print(20*"++--")
print(ROOT_PATH)
GPU_GROUP = "0,1,2"
NUM_GPU = len(GPU_GROUP.strip().split(','))
SHOW_TRAIN_INFO_INTE = 20
SMRY_ITER = 2000
SAVE_WEIGHTS_INTE = 20673 * 2
SUMMARY_PATH = ROOT_PATH + '/output/summary'
TEST_SAVE_PATH = ROOT_PATH + '/tools/test_result'
if NET_NAME.startswith("resnet"):
weights_name = NET_NAME
elif NET_NAME.startswith("MobilenetV2"):
weights_name = "mobilenet/mobilenet_v2_1.0_224"
else:
raise Exception('net name must in [resnet_v1_101, resnet_v1_50, MobilenetV2]')
PRETRAINED_CKPT = ROOT_PATH + '/data/pretrained_weights/' + weights_name + '.ckpt'
TRAINED_CKPT = os.path.join(ROOT_PATH, 'output/trained_weights')
EVALUATE_DIR = ROOT_PATH + '/output/evaluate_result_pickle/'
# ------------------------------------------ Train config
RESTORE_FROM_RPN = False
FIXED_BLOCKS = 1 # allow 0~3
FREEZE_BLOCKS = [True, False, False, False, False] # for gluoncv backbone
USE_07_METRIC = True
MUTILPY_BIAS_GRADIENT = 2.0 # if None, will not multipy
GRADIENT_CLIPPING_BY_NORM = 10.0 # if None, will not clip
CLS_WEIGHT = 1.0
REG_WEIGHT = 1.0
ANGLE_WEIGHT = 0.5
REG_LOSS_MODE = None
ALPHA = 1.0
BETA = 1.0
BATCH_SIZE = 1
EPSILON = 1e-5
MOMENTUM = 0.9
LR = 5e-4
DECAY_STEP = [SAVE_WEIGHTS_INTE*12, SAVE_WEIGHTS_INTE*16, SAVE_WEIGHTS_INTE*20]
MAX_ITERATION = SAVE_WEIGHTS_INTE*20
WARM_SETP = int(1.0 / 4.0 * SAVE_WEIGHTS_INTE)
# -------------------------------------------- Data_preprocess_config
DATASET_NAME = 'DOTATrain' # 'pascal', 'coco'
PIXEL_MEAN = [123.68, 116.779, 103.939] # R, G, B. In tf, channel is RGB. In openCV, channel is BGR
PIXEL_MEAN_ = [0.485, 0.456, 0.406]
PIXEL_STD = [0.229, 0.224, 0.225] # R, G, B. In tf, channel is RGB. In openCV, channel is BGR
IMG_SHORT_SIDE_LEN = 800
IMG_MAX_LENGTH = 800
CLASS_NUM = 15
OMEGA = 180 / 4.
ANGLE_MODE = 0
IMG_ROTATE = False
RGB2GRAY = False
VERTICAL_FLIP = False
HORIZONTAL_FLIP = True
IMAGE_PYRAMID = False
# --------------------------------------------- Network_config
SUBNETS_WEIGHTS_INITIALIZER = tf.random_normal_initializer(mean=0.0, stddev=0.01, seed=None)
SUBNETS_BIAS_INITIALIZER = tf.constant_initializer(value=0.0)
PROBABILITY = 0.01
FINAL_CONV_BIAS_INITIALIZER = tf.constant_initializer(value=-math.log((1.0 - PROBABILITY) / PROBABILITY))
WEIGHT_DECAY = 1e-4
USE_GN = False
FPN_CHANNEL = 256
# ---------------------------------------------Anchor config
LEVEL = ['P3', 'P4', 'P5', 'P6', 'P7']
BASE_ANCHOR_SIZE_LIST = [32, 64, 128, 256, 512]
ANCHOR_STRIDE = [8, 16, 32, 64, 128]
ANCHOR_SCALES = [2 ** 0, 2 ** (1.0 / 3.0), 2 ** (2.0 / 3.0)]
ANCHOR_RATIOS = [1, 1 / 2, 2., 1 / 3., 3., 5., 1 / 5.]
ANCHOR_ANGLES = [-90, -75, -60, -45, -30, -15]
ANCHOR_SCALE_FACTORS = None
USE_CENTER_OFFSET = True
METHOD = 'H'
USE_ANGLE_COND = False
ANGLE_RANGE = 180 # 90 or 180
# --------------------------------------------RPN config
SHARE_NET = True
USE_P5 = True
IOU_POSITIVE_THRESHOLD = 0.5
IOU_NEGATIVE_THRESHOLD = 0.4
NMS = True
NMS_IOU_THRESHOLD = 0.1
MAXIMUM_DETECTIONS = 100
FILTERED_SCORE = 0.05
VIS_SCORE = 0.4
| 71.304688 | 582 | 0.727293 | 1,137 | 9,127 | 5.710642 | 0.364116 | 0.018481 | 0.018481 | 0.024642 | 0.080856 | 0.071 | 0.035731 | 0.012013 | 0.012013 | 0.012013 | 0 | 0.356671 | 0.087652 | 9,127 | 127 | 583 | 71.866142 | 0.423082 | 0.072422 | 0 | 0 | 0 | 0 | 0.108846 | 0.050965 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.046512 | 0 | 0.046512 | 0.034884 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f99f76f779473638db6b1aad699181850a3f5661 | 500 | py | Python | tests/test/algorithms/generate/SvSequence/copyTo/test.py | Bestfast/reamberPy | 91b76ca6adf11fbe8b7cee7c186481776a4d7aaa | [
"MIT"
] | null | null | null | tests/test/algorithms/generate/SvSequence/copyTo/test.py | Bestfast/reamberPy | 91b76ca6adf11fbe8b7cee7c186481776a4d7aaa | [
"MIT"
] | null | null | null | tests/test/algorithms/generate/SvSequence/copyTo/test.py | Bestfast/reamberPy | 91b76ca6adf11fbe8b7cee7c186481776a4d7aaa | [
"MIT"
] | null | null | null | import unittest
from reamber.algorithms.generate.sv.SvPkg import SvPkg
from reamber.algorithms.generate.sv.SvSequence import SvSequence, SvObj
class TestCopyTo(unittest.TestCase):
def testCopy(self):
# Test Copy
seq = SvSequence([SvObj(0, 1.0), SvObj(100, 2.0)])
seqCopy = SvPkg.copyTo(seq=seq,offsets=[100, 200, 300]).combine(combineMethod=SvPkg.CombineMethod.DROP_BY_POINT)
self.assertEqual(len(seqCopy), 4)
if __name__ == '__main__':
unittest.main()
| 27.777778 | 120 | 0.71 | 64 | 500 | 5.390625 | 0.609375 | 0.063768 | 0.121739 | 0.168116 | 0.17971 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043165 | 0.166 | 500 | 17 | 121 | 29.411765 | 0.784173 | 0.018 | 0 | 0 | 1 | 0 | 0.01636 | 0 | 0 | 0 | 0 | 0 | 0.1 | 1 | 0.1 | false | 0 | 0.3 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9aa1447757197f11ec6730f669f7ae44e9d7f88 | 21,032 | py | Python | geoscreens/data/metadata.py | GiscardBiamby/geo | 54f54ea1c41c1d573eb59f67d1b4338f936414d9 | [
"MIT"
] | 1 | 2022-02-16T01:35:44.000Z | 2022-02-16T01:35:44.000Z | geoscreens/data/metadata.py | GiscardBiamby/geoscreens | 54f54ea1c41c1d573eb59f67d1b4338f936414d9 | [
"MIT"
] | null | null | null | geoscreens/data/metadata.py | GiscardBiamby/geoscreens | 54f54ea1c41c1d573eb59f67d1b4338f936414d9 | [
"MIT"
] | null | null | null | import json
import pickle
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
import pandas as pd
from tqdm.auto import tqdm
from geoscreens.utils import Singleton
from ..consts import DETECTIONS_PATH, FRAMES_METADATA_PATH, VIDEO_PATH
# fmt: off
GOOGLE_SHEET_IDS = set([
"8Bw7td5T49U", "tjTu5QhQgtg", "78xNkZqhB14", "5HueHB6D85g", "TZUU67D8eD4", "5vM8Vn8dzRc", "3e4p2WueJnk", "RoAIPgG1H-I", "D4POQX3geEs", "Fljin_26vug", "8YsakLYpA6I", "qHdMPFeIWf8", "X68B0Gpbbzs", "5DhfpT_BK14", "Xvxoq8uR3Zs", "uOpwZPtkEsk", "vtEQf5SeT8A", "tSwfT6dSwMg", "dO7TdYgtAWg", "RLjrxQJOubY", "mg_sgJJPNqM", "t6K0TXA4FT8", "78lriIFZvVw", "uN4hVUzQC5c", "x9mNJalP73w", "yDXcweSID4c", "5bQFKz_hAD8", "7l1elyK6smk", "8JvPC6mPjCE", "8EB6rbK6KIk", "hYzp8aT7Sqs", "AFTNudiAtWs", "yfNYtA__bJc", "XKIHkUfrTv0", "8TIlYg31Ys8", "7A6OIVDvNCM", "7Cb79FsTSbQ", "H2h8V2zWbNo", "G8muDcrX2vQ", "nr5cEg5dpN0", "k_59zOaQMYI", "ajWkg4k03UY", "XaR8S25aK-0", "EXwUtNeLUio", "FJjsv3hwGx8", "RtDIzWgaHsA", "zO8FOrHRCaE", "7yyMBkkFnl4", "_jRSHbYfCiI", "iS4dwvTr6Aw", "cgXjROAaR14", "Gx1eggPvvz8", "nWNVMm5Cjjc", "0YVorrXo3z0", "fyVctCdaycI", "V8RN33XDge0", "eF443S8Svso", "_w3ymH9Z4lg", "fALNGSKcgaY", "8INPrVUdwbY", "OIbJpKWlTv8", "7sbKs551sSw", "ygJYQcrPwWA", "iREpxVxkVy8", "7ZmbVYKuhJQ", "b56-pFJsYpo", "UNFGeLmSC8c", "yBITEq7yi7w", "z3MEEDh_VJ8", "C920wI0_lTU", "2HW4sUPH-SM", "9H44X63GrUY", "a-jofvbOEog", "ooDLsWuAPRI", "y93i-jEMTyE", "9hdrEQ2M2JQ", "-YqLmQhi2Mw", "5Tnf_wT3oTs", "pwohUNpbLgc", "SynBqjTP1WA", "S0x1s4d5VKY", "RmtlSq159xY", "bvaP9AsDyhM", "lIOFDYsjjO8", "SGdJ1-m0Il8", "Hsd15piApiM", "Hy9DB7WKGhA", "SlJnwQRThiM", "f9REixx1Cjw", "MCu_KujLtZc", "Y-UOwHtvBeo", "ID79S40DMGw", "V1I6qZ-1mo8", "97L6Imlixi8", "Ja5eSUlfrkY", "jbl8tS3LMdM", "TYR_miC66Kk", "hE_kQAVPe9Q", "Df1_jpBKCOI", "1LoeXjd0JwE", "7UXkRbjQPWU", "yYIpaVMG5uY", "T1SHlddMb1w", "TP_5VNhANkE", "n58XMSpPSmQ", "nKztCxH2QoQ", "sHCJccXO-XM", "s2j0LJMz2c8", "jZiZGE5Yw7M", "2RLc782IbG4", "y7o54MXyAmo", "6mfZIQJhzzw", "f4HYBPVfE5U", "hql2k-qRGQA", "XPN6ta4QP1s", "SF56rvgw9oU", "18uwUloxF70", "rBFbCUgtuTE", "XQghH7D9ivI", "YYpk9QuEb4Q", "uAAxSVBG3Ao", "SOQn-tAEqoA", "LYQqQR1-O8k", "9JhJLztPrcY", "-cpjdkdjSe4", "Dtwik5ME6k0", "op4ZXU65IEg", "rv0ExMrsoCQ", "ou6AXRCpTP0", "67h7PRS4DZQ", "8jQ7knB1dDw", "NB5CLD4_m6Y", "ttkayJHBKvM", "0Mh-3dij_yY", "EAcgPhHIz9k", "drAmJ8r8_UI", "NIr1XF0doag", "C085J8_mOFo", "SSiM_QcHUrw", "iG39LbO36OU", "4fpfMCbBZrY", "oPwC9_RkA6U", "xmzgSW9_qQQ", "J5zYNTUdJ7E", "f8Jhio30FcE", "lNAZnqZIe7Q", "Gj6Uf71DPjg", "Uq8-Mb6NuwA", "YMddopmzhaw", "y5o_LqLGTFk", "5PLdPga2l7A", "VFIvAelnjJk", "yZ8ZFqGGHEY", "9Y0iWInV50c", "sKaXS4L_LBE", "J4KwYAUjvps", "jTmdNqzyqoA", "qkgnZOiPhko", "6x7Vjf0eDZU", "dGv87y7orMk", "p8fWooyDeeg", "fGn-Yq7Pf0I", "V-8TDXRUL98", "k8VVUzrKsao", "jsiFQW7YhyU", "YpqCkIfj1kQ", "dY1RXh-43q4", "5ng7eZcmf08", "5Nyey2vqZjc", "3FOClyWnFLo", "_x5vekFIPwM", "bcUskY_-eaI", "frABgE4nvZE", "1gdystGUcWk", "N5PHW5fID5M", "cf1kiPYSQX0", "vK6YBEhT_a0", "j8YGygpejmM", "XzLmdfuT-aw", "Y09e38mJwxg", "BAHGhuTg0uc", "i7RbqNUpkzM", "bseiyQBfDFc", "qrppRbnm0Hs", "jSBbDebSEH8", "aPtUdHUZ3U4", "D-JVd1wiGmM", "FobVijiwcxo", "qQMeHkwP8hg", "tkrwURdzQD4", "erJJ6_dvqXQ", "S8Drmz7kb2Q", "nComDx3Hksk", "iSgTY8VsTf4", "M1ZCdTUpOMk", "KvP2xzlLuVQ", "_Yxhg-Ng6W4", "QAXV5-eUHVI", "UNJO7v2JqrQ", "oxGTI4ifaUI", "fvTmJro2lJs", "ucfvRONvrv4", "7Kov_ocesos", "KA3r-gF1ub8", "WYqh9IOP1ac", "RfGf4Sfi5eo", "dRG76uV8Gh8", "v-GbQnjx9qo", "I8aSkup6v5Y", "zg2Fsd_AQBY", "ByyXpvS5SsM", "L2x3gfC8JKk", "VeV2_pBKwyw", "fitpQnwDSF8", "MVA_CfddM7Q", "0GUAEM7yZfs", "NY3YDQvI1Ic", "ogJnHIuT8Yc", "LR2NyzmxUhU", "VNfQu_7ewMc", "71j61uq6dT0", "--0Kbpo9DtE", "N57v3XC_KgU", "7AAjhFb6vW4", "QeG3JIDj9X0", "eFlRk5-wfqE", "PhwZ9hgWbws", "BktA9fzbBFA", "8gW85SbDGms", "905EaxHE8uM", "2ZjvH8UJmMI", "Pz0sOLzEEc8", "fsHd9Dxb6dg", "jfvF7yBlUzw", "4h-GEDFgbyk", "9N5ehFTyiEA", "o0-B7oMrfYg", "dnw5qOqcUuc", "e7RSZvTrfxM", "S_CkGJ_2NRc", "auNws2QRR-I", "POJmNWuuWoU", "IcZkMPfJt9g", "9jU8kH2W4fw", "5mBTu5fSKrY", "3G7zcxVInzk", "G9iraVNE2YY", "PZNVXTPFpDg", "kheQo4Tpndc", "NhmN-Y4Ogt4", "EnLJRP3URAY", "AF9uezxZDeE", "ARWG_rDyo0w", "svHi_vMMz30", "RUAq8ypbS-M", "fgzsmVt8O9Q", "d9UM7dxWmSo", "HXsnKhMSXnA", "PzAXjKD4ZRg", "nurNqjV2BIE", "Vrc9iyOdffs", "HY_cFHStUdE", "7NpvRgadP6I", "1AAV73eCDng", "SB4UMgTRBe4", "IeN5MHlIFYs", "tqny4LpSUiE", "M1YxSawhLRM", "6dMleMbH1p4", "ycCwEbgAsBA", "28ST7y3V0Ts", "-IEDd8F93a4", "h_v9LNa-CJM", "KjCbBXm68t4", "M9EY3IUfc5k", "l9cwjJ8Fq18", "JPTuaNLK8Wo", "b8uR_dfzk1k", "U9B1tkrtRlE", "gkUCMaoMutQ", "15V7WLGkk_k", "k4IrMBjw4Wg", "XD03_-kYYIU", "qtnVQtoVVVc", "Fr7k4Of9MHc", "T2-lmTdq1xI", "5Zxg-TXyOI8", "FwvekZZF5Uc", "WBnhnil7BpE", "NRfetLNMgko", "khG49U9uA0w", "oipCIsg365Q", "jMRAXSUZfFM", "kAaInBtlT20", "1bYnXDko1Y0", "8F_j53zDM7Y", "ZKSH2u8LA3U", "yFUbV6e_gJU", "ri_34j2BrjQ", "vQ_K9yf88FY", "xEU6jN3g9-M", "mJf_LmgFK5Y", "4Q_7tdz1RLk", "NhWMpSodfiM", "wEhDoTH3z1Q", "Il_uQts188g", "6nqaSvpqq_4", "lUf2aUbevKI", "fNCt6HzDr5s", "uUThkhfRgcI", "NBdNAZ4xMHo", "Eww4ke7BRc8", "P-dCi2PGAbk", "kMxyUZjFRRk", "ZCHRMqF8WYo", "WdmLE97ZN3Y", "YWQsrpXutYI", "daYiBw4mumU", "XzBgSMyXKgc", "64Ig7a6W6Ew", "mkx8bU_di1k", "9FVnGjIxaMY", "CdIz5bo7Djk", "SpevCJaBI3c", "im7nCclNTkQ", "KqBtWllS4gI", "0takfE6ONYc", "8jWG2tLeVMw", "fH17ddueJWU", "x4-N7jQxQiw", "2mifm1pLKAA", "1OXB0WADaXg", "d7Traj8zMS8", "hkSU3XytNkA", "gNevBaS-uGA", "IQRT4fr8emQ", "Y9RLRlKbYdE", "6hFg9JyN2xs", "kx_IvEI7ank", "qB2CxfyYgaM", "bJ7gKGvwpY4", "XikyJPOxAz8", "Qzsf3DWibJk", "CWG3sDtKQDA", "QuiSL6Nkamg", "vtV5A5PcyVs", "ZBGy6D9KzpA", "9dw5HDcPPZc", "rWblyP6DWTI", "Zon59ELN9gY", "4PT2cRmp638", "0NZj6fl8oy8", "ca6GfGUTIBc", "5W-cXIqy7Qk", "1NUz6bWIxAk", "huqYMEJ0XAE", "OfLGN8vG8RI", "9S_aexwPTGY", "ZMNakOAS2PQ", "xFWjYDyiVgA", "oxQaoCK5-gw", "wchMLhhTThU", "DSQ0c3e1JIY", "EgiQcOFcKjI", "4gKwjSDe0pU", "rp0XRhlDaxs", "pEww8bI63pc", "ecTrx01X7Ww", "v3_XOVuqs7Q", "S9isSATsFrM", "Lo0Ss_RBBnE", "d7n1MfAE3Q8", "MZZi2H8arKw", "HTf1OrPoVeI", "3-12cTsYLBI", "26fy28wEjUg", "8QW8dm28hKI", "Jwcovn8B8pQ", "_0-N01oCEgM", "WGn2YyLrV74", "NSYJ8htKe3o", "H-gdaQB8YX8", "om0rl5inBb0", "K29Wr5eheZ0", "J__1wxI_PlI", "oN6DOjX2jwo", "jIao4NbL6RA", "Yv4A_RMBTUo", "7KHfnuxMvmM", "R6nxePpOwj4", "87PTLTwFIlM", "7s7h20eWyNQ", "KZr7oiGwvGo", "RWbEIssom0M", "Y-was9RqOPU", "-PVyrGvE_Ug", "q2pxWYFalxY", "GLbz7V42NTs", "t5BP1LMw7aE", "8qoNZIjLsNQ", "VgXRA5Rs2wY", "2BpNX3tDIp8", "RuPkSF1APFc", "itq0JKF_71k", "dDlabjh0d5M", "EVDZvdWO0Jk", "TWJwleci420", "DXmMV9u9Zu0", "XERAdiWQOjE", "vu_tBi3QEXU", "nBTTbo5aARY", "IIE40ZX84uM", "An7mR7syKAs", "RVntDFkxS7g", "PjBgUuSsA_4", "j7kDcRWH8x0", "LQM9dAUmXbc", "qtsbny47mdw", "3vLgiRXB5XA", "ISRYAscisFs", "yBvuC-gJLRk", "sIck3-vlSlA", "d24qTy_a2y8", "YuDMD_sxMFA", "4QQoRFg_afs", "FR7oa6EyJXw", "ZIJSGDK7JZE", "jQGV_kqnur0", "hZWt1PYH3hI", "5P_6PJMGCcM", "VR8fTKKaxkw", "yAy034yMsKM", "s-ujRzUvgv4", "HLDJp3hetEM", "OJXyK9Grzwg", "xdA779d7rf8", "nAGTYX024vs", "I7MYI_EAW18", "0rxcET_eukc", "tpI_5-rp7B4", "RZKXgfP57ao", "1R0jn0mXAhU", "3b4tPRdX2nk", "BGrHmcYSMqY", "_Wcx5qaUc3E", "nOcf_JCjA6E", "3a3oCg4gDlw", "b_-2uGDp8rU", "iA3wkEutnc8", "IYrmjKKnWsM", "8p8uAN8GMPg", "i1-b_LjegYI", "Uu17FqqvBPc", "0i22gBZe0Vs", "7PV1B8NglOw", "Qj4waaw1OzA", "5mMXaSzIH6M", "M_-STREt-B8", "t2cnHOQr0vQ", "5WPyovVixkY", "4Wloj3k9Gwc", "fsbZAcJXN5s", "az27quZLK8Q", "1963PvpQHlU", "xfIGSpWis6w", "xnvIL-m1Fs4", "U6PpJ8gh8g0", "7y2K0aGKzrI", "1COlCH966vk", "bG0JP1lpvc8", "RPELccF-qHs", "VE7JElrhOZk", "Lqce0YTaqvA", "apViju1pJSQ", "HuMA26sgEW8", "GZmvqMK704U", "kpSA5-dCUco", "-RdNktX6pe0", "4woMwBa9SsI", "TIujifYddi0", "URUobiG8DwM", "WhfHiLV10Dw", "NdX-qjViTnw", "EKU8wGUTXsE", "0LQeo_Ith1M", "dS2CRIjAkSc", "gMaG5H1711A", "EB29A-P4y_I", "uKAHruKnWcs", "3zv372sf060", "j51FXUb-x1Q", "Xg_u0FCyZ74", "Hi2USufrGtI", "JF1uIZRMUf4", "JvL8HHi_cbE", "pnr8PcRoDhU", "FZgw9gz3C1I", "0fbtLGFxJEo", "B6QqER1cyZQ", "1Fho_5uqk98", "KdbXMsZCW_s", "LK1kDgONDyA", "sDYDY5KOA0U", "YwYgHxtSUN8", "MUkhskdIzSw", "BZ9W12amjHo", "U2V25cli1rM", "i_LrB8xGX2Q", "bJmP1QtZRdc", "LXT9U8lhwSk", "yjog5dRToKM", "LlUKiEgP-fg", "7zM6-TZBjfY", "5KvWKvuM0Lw", "XWRcLFQ6SLc", "yQB9yV1aqkM", "4XvGmDO9MH4", "9RQUIk1OwAY", "7DEmYlGENng", "9bHgUYMyuus", "xhJhWN07d28", "QpkW-udMIV0", "Ti-CYdMC41I", "3Hff3DyKB5Y", "i2EytxoXbVw", "XP8VPh-Jck4", "6RtuulgTQEg", "S5gpj3dH04U", "zTnOM3pgsmI", "hPeUmmospU4", "P7oI4IXaQvQ", "42IPZRBbeZU", "R221KrCxkFI", "xiX18l1TJz0", "_pbDtZeN3Os", "eZZW9pr_5yA", "6Uin2eIjfAY", "Tr4OGLLjYnk", "ElcEPfop_CA", "1hu9EumykCw", "HQX9yeK4SuE", "RjzCc0kDGMA", "wPtPW4R3Bz8", "x9w0uk7G-8c", "T6G4wmkcZGg", "zOoUR17xnL0", "KQ7WRBhdKDo", "bIvCkvmf3Xs", "S5Ne5eoHxsY", "S6D18JLde4c", "rs2L2j6SE2Q", "L_PfdixvB1c", "G3FKN03gXIQ", "1NZsTHM_yvA", "PNpUEPXZO6c", "A3PGvLiUQeE", "klYiRchHrh0", "IVzbPudw9cw", "4x7zIn-ypMs", "8IuV-rUEJZQ", "1pvl8Xus5Ek", "9ffhZ_LWL40", "7h-TEPgvKas", "Walstb9S_U4", "5LBrotUmVKg", "U1sSt_i48f8", "6_iwi1av_Tg", "T5UQ0Fab3Ak", "JKwK2CdBka8", "81iad4yS8XA", "2ZU44Af4rGA", "XYVIHqjm7hk", "8I4DWSyhTaQ", "zIph871efJ4", "s3MM2Hn0578", "UO2IzVqYoT0", "JW_cY121vMU", "twuXShfe8ZY", "kXQSKQ-Iglo", "JnnvAlCn4-8", "04Rjc8cHKVA", "kPh7dYErCc8", "ylJlT37wcaE", "o5qTx0bKjrs", "V62niQ9D6wQ", "kko4Sug8_Us", "7KL_zitxz0w", "8HCqhfO4ukc", "5J5OiGLKqQM", "k-dT_m1bSuE", "8ytmWvud6-4", "S3MGYVhx2gM", "1s3Ax_KrLs0", "F6quWYzK7TU", "Z3V98L7YL00", "RH9p7jUHTBw", "-C7NJpYc3gw", "hpsYcBqu5gc", "wriKnOjJy6E", "c78FrBan-JQ", "MocC6pni5P8", "DuL3xoy_BAY", "DHhTo7sZrDg", "td1eP9FSL3Q", "1V35b_G7wok", "ThHk_Q1uovY", "VGNEtq4Bw3U", "K4GXuDACK40", "P8o_guQi41s", "YImUOaH7Uwg", "NC07yL_yN20", "hcdEoiWKPns", "T2r-_WM0enQ", "NrqC1YuBCuQ", "mBHXqKnDo6s", "1AmqyFQYSCU", "2he1eFOivTM", "Rnpm3wKt0Ls", "cpeIVVLO5QE", "1apsDpo_cGI", "Sn0XIA2aux4", "9Xr6LqfOIg0", "XvpAfKb67YE", "DsMej1SWfzU", "D7d-Wilesgw", "1hbFSXAZlro", "GtSNM5lM6Ww", "qRW9erqzcUA", "GungykjFga8", "QBJdM-PmiBY", "1AibHUd6TO4", "DJV5YcQ-lnU", "aJc9vJNv4G4", "2kcCNL3lxDw", "2cqIk-0WSdA", "M3BFifwYolI", "rTIYFLh2Y2Y", "mr08FdZmLa0", "DaX4ZuINsgg", "OLkXxaP5RRs", "pvjUGDcegGo", "mCDGajhSzn8", "U73B2rWWz4U", "ut6DwUYicv8", "OKOP1dnLRJE", "9fRE0IuFcZ8", "sA19OnfmFd4", "vnlSCnx5UUg", "2HGOjVDc1mY", "elgUkTn8snE", "OFuGaf8od_Q", "PzGs-GY1DaA", "SsQ4uMnSJRo", "SKxA0OEnCnk", "B511HI1RHuI", "MWR-h25GwmA", "89QEfKzSkzY", "0KJ0qXEVACs", "clB89mi-ZlY", "W82qLlUxuy0", "cKlp2iLl8Ps", "e-E1-hpK4w0", "khkp8TrFytQ", "a-8DyDJvglU", "KPVPU3vl_yI", "83m9ys4kxro",
"jsqkwpdurgw", "OD2_TpEG-C0", "YHHAQkgs32M", "XM87FwIenH4", "C1RHyCSkkKM", "ppYi2iGMht4", "TKTZoyKhHco", "19c03AjUyI8", "74jleDoImYc", "k6Cw-X3zDuo", "uCbXqNRiHRY", "HRsqlJmj-hE", "P9SWbIShXc8", "IV4Pb__t6ys", "_EJjfqyaebo", "5mTvphLejLU", "K2XcndcvzSc", "Sgp-xuDo1gs", "PF0_X0ilLNQ", "j-FROoAWAdw", "i7K9f9l05qA", "7UJ6f-iP6Bc", "7nb9W76qdEc", "1bKzHmmoofg", "osTwgzWluVs", "4mUPPVoQ-kI", "XTKWfDyejck", "3nPxLoDdlxY", "nqlxwD5RY94", "XoHvL7T10pM", "1g4aAtsCUCI", "87qBSgbwLq8", "C8l-D_z2p6k", "bbBeyBFvAyQ", "dVFTw5pacsY", "ZDAZvXbmOSs", "bz04LZDf0Oo", "vAtsI9ZA11U", "LtaV054F5Rs", "ldyQwxNCzlo", "AIHJQEtcPqY", "NjriHMSM26k", "pcxL0W0RuTk", "XjzDqqvMEcU", "V4D-N71EvvM", "hVBhp7U0xQQ", "8__DkawMrPo", "alKpLiE-KY4", "4ftLC-J963E", "HlAZm63ooQY", "OQFa34FoVY8", "KSlCyDyda1M", "SAmkg58TybQ", "IyfiCVAeyhg", "__qlp6JpcPc", "Tjxb3UzaduA", "-C2718vV9v4", "hYMPlDM5j80", "hzm0mRZAOrY", "X-3h3RTPoRg", "yDO_FdDeHfs", "IpWokx3CtDg", "1rpQNdmTtvk", "76F1NoCzNLY", "V2H1po51T-A", "A960qcFjXK8", "MaVbMOJg4Mg", "fBfmMCCMXHk", "CYe9uv5G1hw", "Gk-1toFmMZo", "jCJoc-6iqng", "Y8yW_BsZ018", "6FKmF1LDPrw", "1ShNH_1lVsw", "iT1c92P40z8", "DE-6w16AhcQ", "jNKj2MXeah4", "w-aTpX4_vcg", "CC8CCvle0Vc", "bErSxaBHc1U", "BslAPtFdAnE", "Mv8DWoW5Ojs", "DU7SmB9yqpQ", "ZKCPfy5gcKs", "pFZoRi-T9c0", "q5FEts6gKII", "hzjA9gfxMeQ", "TDL3Jk3SaK4", "FGGfQH0XxL0", "zFuNkVjC6hQ", "tOXrATngKOY", "18C7YgxCkIw", "GvTVU0Qslc0", "HKPpZx0E8FY", "no5rJt2Pj-0", "2SzL5VBF_BI", "8LXi_tpkpSg", "DJp6sBH46KI", "y2eFiEO3BdQ", "pP4VQ9JClM4", "Y0BjWF5gWmk", "wvl9ecRASFM", "l6TtoNu1_Jg", "88jRjbWTesc", "GbgHjGPVzao", "5LXv8t_-6_c", "LcIkJQgAOyA", "5PGCL_L81UA", "y2SDYOw0SDU", "o1GEEkLVFsk", "54c2PpV65hU", "ti2co-2tymo", "hdUTzzDEV8g", "RBPYrNfjnHY", "5IyXNi8TbzM", "t9YiBXcb49g", "qi3_M5Udics", "2ZioLZEZTdI", "dEi4H8QFxIg", "WtzVRdkaY7Y", "26VxX9_chSw", "6wrhV6SnfnE", "3xm58Ccps1c", "MKSRbvmbTVo", "NsUjPBgFJGw", "hXYKSf6QO04", "B7_WcWmSZ_Y", "vKWbEE-ttYA", "0J7cQ4FiDCc", "N_OLaiTShLA", "BuZ-ld13p1I", "izjFsRDbt5k", "TVt1GKBZMzc", "1kwoT-9ClV4", "BJ-bEId-7yQ", "JXUWefGu67A", "WD9ARP45p_M", "V6rWoMiKsAw", "WqKqqN54fHo", "WEqf7L2KL4g", "itGph3begOY", "ep8WGVBNq7M", "67SQuXM5J0o", "tuGOZme6Xjg", "fs98qK3Lnpk", "88FFBre9GFA", "D4fiQwrF5vw", "FTcYSsoAw28", "EAoVoLtzovk", "edPiYaSZvx0", "6h0faOkFVpI", "euFnkGaA5IY", "AX5D2Bt__gE", "IwX1wEQsngE", "DkLLhsfa-PU", "R1toABTIp9s", "AXxUyPWLoJA", "sf0ToMiRIvM", "zlsM4XM9_Rk", "4k57dSg8Cws", "iy8jWAIaG0w", "YZxqCnxHPtE", "TJbSoBC1qpc", "FGidXjJl1vA", "JyfpZuVSisU", "01zaYTxpmxk", "-L9-kfYb4_A", "ta4rw6YR8LQ", "7G_CTikQVEM", "PoNt0SfS5jk", "kdmw3fmfg88", "rb4dy7HLH8M", "HKTCO8mh5d8", "zfZ6BxPne4E", "nJPm9WqyTTU", "22v6KBUXEeQ", "rbfjUayf-gk", "wNr9eLPIits", "VQI85nD7h4U", "96Th1-UjSOU", "OSYcvcQn2w8", "hG6rJf0RBnk", "yYEk84kRqPo", "nuqUwvdZ30M", "hEZVNDqid2I", "pMgqa0mOExo", "E-rvEqFNBcs", "4aUHm5A_66w", "obF2AR2e5P8", "uhbki9G10zU", "GjuSYrjqaMs", "_osOExSsNyk", "UPWSMhAF3ME", "I_5u_woAjm4", "qQyXQtLoGyE", "o8qQAjkaXMM", "tCqhl589AdM", "m0e92O4DJKE", "_MBsJDwzn1M", "nyHeQWnm8YA", "kCSNzVDJ_W4", "7vz-osmi6tw", "Mk9x9VZpIi4", "De1Xc6EXj9Q", "UCQg1LJOywc", "HdQjTia26y4", "WMvw_CCYeG0", "utv4vBdgSG0", "liNzvqszWPc", "j4SXWDgDSSE", "ZcFbyUJbP94", "1GehhMoUwnc", "j_UyjWUW-cU", "jjTvJdgmsmc", "OwLe8JNyynw", "el4lgYNq6mY", "9w_En85TFqc", "E0DHszfXnsc", "7-uBrcBKCpE", "iRTAdF_o1-4", "nXx6gUklog8", "wnH6quY_MUE",
])
# fmt: on
def load_metadata(path: Union[str, Path]):
"""
Load metadata for a single .mp4, from the .info.json file. Drops some of the really verbose json keys before returning:
"formats", "thumbnails", "automatic_captions", "http_headers"
"""
if isinstance(path, str):
path = Path(path).resolve()
if path.suffix:
path = path.with_suffix("")
info_path = path.with_suffix(".info.json")
data = json.load(open(info_path, "r"))
drop_keys = set(["formats", "thumbnails", "automatic_captions", "http_headers"])
for k in drop_keys.intersection(data.keys()):
del data[k]
data["path"] = path
return data
def get_geoguessr_split_metadata(split: str) -> List[Dict]:
"""
Grace's geoguessr dataset has train/val/test splits. This meethod returns the metadata for the
specified split.
"""
json_path = Path(f"/shared/g-luo/geoguessr/data/data/{split}.json").resolve()
assert json_path.exists(), str(json_path)
data = json.load(open(json_path, "r"))
print(f"Length of metadata for split='{split}': ", len(data))
for video in data:
video["split"] = split
return data
def _clean_attributes(meta):
# fmt: off
drop_list = set([
'view_count', 'average_rating', 'age_limit', 'webpage_url', 'playable_in_embed', 'is_live', 'was_live', 'live_status', 'like_count',
'dislike_count', 'availability', 'webpage_url_basename', 'extractor', 'extractor_key', 'display_id', 'format_id',
'format_note', 'source_preference', 'tbr', 'language', 'language_preference', 'ext', 'vcodec', 'acodec',
'dynamic_range', 'protocol', 'video_ext', 'audio_ext', 'vbr', 'abr', 'format', 'filesize_approx', 'fulltitle', 'epoch', 'path',
"subtitles", "filesize", "release_timestamp", "release_date", "chapters", "track", "artist", "album", "creator", "alt_title", "tags",
"ner", "caption", "label", "label_geocoder", "url", "nemo_caption", "nemo_caption_entities",
])
# fmt: on
for col_name, value in list(meta.items()):
if col_name in drop_list or "nemo" in col_name:
del meta[col_name]
def get_all_geoguessr_split_metadata(force_include: Optional[list[str]] = None) -> Dict:
"""
Arguments:
force_include: if specified, a list of attributes from the meta data files to include in the
results.
"""
train_meta = get_geoguessr_split_metadata("train")
val_meta = get_geoguessr_split_metadata("val")
test_meta = get_geoguessr_split_metadata("test")
combined_meta = [] + train_meta + val_meta + test_meta
splits_meta = {m["id"]: m for m in combined_meta}
# fmt: off
drop_list = set([
'view_count', 'average_rating', 'age_limit', 'webpage_url', 'playable_in_embed', 'is_live', 'was_live', 'live_status', 'like_count',
'dislike_count', 'availability', 'webpage_url_basename', 'extractor', 'extractor_key', 'display_id', 'format_id',
'format_note', 'source_preference', 'tbr', 'language', 'language_preference', 'ext', 'vcodec', 'acodec',
'dynamic_range', 'protocol', 'video_ext', 'audio_ext', 'vbr', 'abr', 'format', 'filesize_approx', 'fulltitle', 'epoch', 'path',
"subtitles", "filesize", "release_timestamp", "release_date", "chapters", "track", "artist", "album", "creator", "alt_title", "tags",
"ner", "caption", "label", "label_geocoder", "url", "nemo_caption", "nemo_caption_entities",
])
# fmt: on
if force_include:
drop_list -= set(force_include)
for video_id, video_meta in list(splits_meta.items()):
for col_name, _ in list(video_meta.items()):
# if col_name in drop_list or "nemo" in col_name:
if col_name in drop_list:
del video_meta[col_name]
return splits_meta
def get_all_metadata() -> List[Dict[str, Any]]:
"""
Loads all three (e.g., train/val/test) metadata files and returns all as one list.
"""
files = sorted(VIDEO_PATH.glob("**/*.mp4"))
print("Total video files found: ", len(files))
all_metadata = []
for f in tqdm(files):
all_metadata.append(load_metadata(f))
train_meta = get_geoguessr_split_metadata("train")
val_meta = get_geoguessr_split_metadata("val")
test_meta = get_geoguessr_split_metadata("test")
splits_meta = {m["id"]: m for m in ([] + train_meta + val_meta + test_meta)}
for meta in all_metadata:
if meta["id"] in splits_meta:
meta.update(splits_meta[meta["id"]])
else:
meta["split"] = "None"
# print(f"WARNING: video_id {meta['id']} is not in any of the splits!")
_clean_attributes(meta)
return all_metadata
def parse_tuple(s: Union[str, tuple]) -> tuple:
"""Helper for load_detections_csv, to parse string column into column of Tuples."""
if isinstance(s, str):
result = s.replace("(", "[").replace(")", "]")
result = result.replace("'", '"').strip()
result = result.replace(",]", "]")
if result:
# print(result)
return tuple(sorted((json.loads(result))))
else:
return tuple()
else:
return s
def parse_dict(s: str):
"""Helper for load_detections_csv, to parse string column into Dict."""
if isinstance(s, str):
return json.loads(s.replace("'", '"'))
return s
def load_detections_csv(video_id: str, split: str = "val", model: str = "") -> pd.DataFrame:
csv_path = DETECTIONS_PATH / f"{model}/{split}/df_frame_dets-video_id_{video_id}.csv"
df = pd.read_csv(csv_path)
df.frame_id = df.frame_id.astype(int)
df.frame_idx = df.frame_idx.astype(int)
df.label_ids = df.label_ids.apply(lambda x: parse_dict(x))
df.labels = df.labels.apply(lambda x: parse_dict(x))
df.labels_set = df.labels_set.apply(lambda x: parse_tuple(x))
df.scores = df.scores.apply(lambda x: parse_dict(x))
df.bboxes = df.bboxes.apply(lambda x: parse_dict(x))
return df
def load_detections(
video_id: str,
split: str = "val",
model: str = "",
frame_sample_rate: float = 4.0,
prob_thresh: float = 0.7,
) -> pd.DataFrame:
"""
NOTE: This assumes the detections are using frame sample rate of 4.0 fps. Specify
frame_sample_rate if you're using a different setting.
"""
dets_path = DETECTIONS_PATH / f"{model}/{split}/df_frame_dets-video_id_{video_id}.pkl"
if dets_path.suffix == ".csv":
df = load_detections_csv(video_id, split=split, model=model)
else:
df = pickle.load(open(dets_path, "rb"))
def filter_dets(row):
return tuple(set([l for l, s in zip(row.labels, row.scores) if s >= prob_thresh]))
df.labels_set = df.apply(filter_dets, axis=1)
return df
class FramesList(metaclass=Singleton):
"""
A singleton class with a single method, `get()`, which returns a dictionary where keys are
video_id and values are a list of relative paths to all the extracted frames for that video_id.
"""
def __init__(self):
print("Loading frames list")
frames = pickle.load(open(FRAMES_METADATA_PATH.with_name("frames_list.pkl"), "rb"))
self.frames = {
video_id: [fl["file_path"] for fl in frame_dict]
for video_id, frame_dict in frames.items()
}
def get(self) -> dict[str, list[str]]:
return self.frames
| 103.098039 | 9,994 | 0.695084 | 2,195 | 21,032 | 6.484282 | 0.614123 | 0.006394 | 0.012366 | 0.012295 | 0.136443 | 0.130471 | 0.117895 | 0.116209 | 0.105108 | 0.105108 | 0 | 0.089157 | 0.119532 | 21,032 | 203 | 9,995 | 103.605911 | 0.679447 | 0.054869 | 0 | 0.261194 | 0 | 0 | 0.565409 | 0.009825 | 0 | 0 | 0 | 0 | 0.007463 | 1 | 0.089552 | false | 0 | 0.059701 | 0.014925 | 0.253731 | 0.022388 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9ab041c940049a4f9d5a78e377f913659b6d5cc | 746 | py | Python | 2020/15/main.py | zelane/advent-of-code-2016 | 72ebda3ec4eca4d1921dd8d94f2f84bbd0566fc5 | [
"MIT"
] | null | null | null | 2020/15/main.py | zelane/advent-of-code-2016 | 72ebda3ec4eca4d1921dd8d94f2f84bbd0566fc5 | [
"MIT"
] | null | null | null | 2020/15/main.py | zelane/advent-of-code-2016 | 72ebda3ec4eca4d1921dd8d94f2f84bbd0566fc5 | [
"MIT"
] | null | null | null | input = [16, 11, 15, 0, 1, 7]
x = input.pop()
seen = {v: i for (i, v) in enumerate(input)}
target = 30000000
for i in range(len(input), target - 1):
s = seen.get(x)
seen[x] = i
x = 0
if s is not None:
x = i - s
print(x)
# 0
# 8
# 14
# 8
# 2
# 165
# 1811
# 15075
# 182867
# 623065
# 0
# 10
# 65
# 2095
# 16
# 94
# 2228
# 80680
# 814903
# 0
# 9
# 91
# 181
# 1023
# 7249
# 6368
# 76878
# 66861
# 1311263
# 0
# 10
# 19
# 184
# 5834
# 39203
# 148935
# 2083996
# 0
# 8
# 35
# 614
# 576
# 7998
# 86813
# 153058
# 1867414
# 0
# 9
# 27
# 1518
# 906
# 23793
# 173873
# 874677
# 0
# 8
# 17
# 476
# 6439
# 84939
# 381816
# 3164173
# 0
# 8
# 8
# 1
# 98
# 1405
# 45015
# 60927
# 959333
# 0
# 9
# 25
# 210
# 1536
# 35921
# 1910139
| 7.770833 | 44 | 0.522788 | 126 | 746 | 3.095238 | 0.674603 | 0.020513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.55098 | 0.316354 | 746 | 95 | 45 | 7.852632 | 0.213725 | 0.454424 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.090909 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9b0a34294b9ba896965f53ca1f3a7a552c4fbfe | 1,847 | py | Python | applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/m1-01.py | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | 20 | 2017-07-03T19:09:09.000Z | 2021-09-10T02:53:56.000Z | applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/m1-01.py | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | null | null | null | applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/m1-01.py | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | 9 | 2017-09-17T02:05:06.000Z | 2020-01-31T00:12:01.000Z | #!/usr/bin/python
# Test the very basic 'make' functionality.
from BoostBuild import Tester, List
t = Tester()
t.set_tree("test1")
# Check that we can build something
t.run_build_system("-sTOOLSET=yfc")
t.expect_addition("bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj")
t.expect_addition("bin/a/yfc/debug/runtime-link-dynamic/a")
t.expect_nothing_more()
t.fail(t.read("bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj") !=\
"""
<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
a.cpp
""")
t.fail(t.read("bin/a/yfc/debug/runtime-link-dynamic/a") !=\
"""
<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
a.cpp
""")
# Check that we have vanilla target names available
t.touch("a.cpp")
t.run_build_system("-sTOOLSET a.obj")
t.expect_touch("bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj")
t.expect_no_modification("bin/a/yfc/debug/runtime-link-dynamic/a")
# Check that if build request cannot be completely matches, a warning is
# issued and subvariant with link-compatible properties is used
t.write("Jamfile", t.read("Jamfile2"))
stdout="""Warning: cannot exactly satisfy request for ./a with properties
<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
Using
<optimization>space <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
instead.
""")
t.run_build_system("-sTOOLSET=yfc", stdout=stdout)
# Check that conflicting link-incompatible requirements prevent building.
t.write("Jamfile", t.read("Jamfile3"))
stdout="""Warning: cannot satisfy request for ./a with properties
<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
Nothing will be built.
""")
t.run_build_system("-sTOOLSET=yfc", stdout=stdout, status=1)
t.pass_test()
| 30.278689 | 82 | 0.748782 | 287 | 1,847 | 4.759582 | 0.317073 | 0.096633 | 0.158126 | 0.083455 | 0.618594 | 0.558565 | 0.52489 | 0.52489 | 0.401171 | 0.367496 | 0 | 0.002392 | 0.094748 | 1,847 | 60 | 83 | 30.783333 | 0.814593 | 0 | 0 | 0.133333 | 0 | 0.1 | 0.606478 | 0.255061 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.033333 | 0.033333 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9ca7f5b7cc9435acbfc2e6125add92dd25b88cc | 78 | py | Python | optimizers/__init__.py | killf/STDC-Parser | 5f18ccc4f26b5a7dcd7922775b953bdcfed18d50 | [
"Apache-2.0"
] | null | null | null | optimizers/__init__.py | killf/STDC-Parser | 5f18ccc4f26b5a7dcd7922775b953bdcfed18d50 | [
"Apache-2.0"
] | null | null | null | optimizers/__init__.py | killf/STDC-Parser | 5f18ccc4f26b5a7dcd7922775b953bdcfed18d50 | [
"Apache-2.0"
] | null | null | null | from .optimizer import Optimizer
Optimizers = {
"Optimizer": Optimizer
}
| 13 | 32 | 0.717949 | 7 | 78 | 8 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.192308 | 78 | 5 | 33 | 15.6 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9cd1cb155b28558358d6d763f6f8e91d3355e66 | 549 | py | Python | Presenting myself.py | Lindit74/dephell | 45f2a4ef0cbab4b5e38512be7d5f8bd8fac2f2ca | [
"MIT"
] | null | null | null | Presenting myself.py | Lindit74/dephell | 45f2a4ef0cbab4b5e38512be7d5f8bd8fac2f2ca | [
"MIT"
] | null | null | null | Presenting myself.py | Lindit74/dephell | 45f2a4ef0cbab4b5e38512be7d5f8bd8fac2f2ca | [
"MIT"
] | null | null | null | Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> print("LINDITA LOHJA")
LINDITA LOHJA
>>> print("Teacher of Physics and informatics ")
Teacher of Physics and informatics
>>> print("Using different tools in education for trainning teachers to implemetn technology in education exspecially physics")
Using different tools in education for trainning teachers to implemetn technology in education exspecially physics
>>> | 61 | 128 | 0.752277 | 79 | 549 | 5.227848 | 0.620253 | 0.106538 | 0.077482 | 0.09201 | 0.62954 | 0.484262 | 0.484262 | 0.484262 | 0.484262 | 0.484262 | 0 | 0.068522 | 0.149362 | 549 | 9 | 129 | 61 | 0.815846 | 0 | 0 | 0 | 0 | 0 | 0.352399 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.333333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9d213201df8562b18c742f708803d75f084fd12 | 5,468 | py | Python | herokubot.py | maxineride/tele_bot | 7f0cf1188eaaed84b98b679c52be9c8675558ea8 | [
"MIT"
] | null | null | null | herokubot.py | maxineride/tele_bot | 7f0cf1188eaaed84b98b679c52be9c8675558ea8 | [
"MIT"
] | null | null | null | herokubot.py | maxineride/tele_bot | 7f0cf1188eaaed84b98b679c52be9c8675558ea8 | [
"MIT"
] | null | null | null | # import logging
# import os
# from pprint import pprint
# from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
# from telegram import ParseMode, InlineKeyboardMarkup, InlineKeyboardButton
# # Resolve message data to a readable name taken from https://github.com/Whalepool/Natalia/blob/master/natalia.py
# def get_name(update):
# try:
# name = update.message.from_user.first_name
# except (NameError, AttributeError):
# try:
# name = update.message.from_user.username
# except (NameError, AttributeError):
# logger.info("No username or first name.. wtf")
# return ""
# return name
# def start(bot, update):
# update.effective_message.reply_text("Hi!")
# def echo(bot, update):
# update.effective_message.reply_text(update.effective_message.text)
# def errors(bot, update, error):
# logger.warning('Update "%s" caused error "%s"' % (str(update), error))
# def new_post_rules(bot, update):
# user_id = update.message.from_user.id
# message_id = update.message.message_id
# chat_id = update.message.chat.id
# chat_name = update.message.chat.title
# name = get_name(update)
# new_chat_mem = update.message.new_chat_members
# BOT_NAME = bot.username
# for member in new_chat_mem:
# new_member = member.username
# if new_member == BOT_NAME:
# return False
# else:
# logger.info("welcoming = "+name)
# msg = ("Welcome to "+ str(chat_name) + " %s" % (member.name))+ '' + str(rules_list)
# message = bot.sendMessage(chat_id=chat_id, text=msg, parse_mode='MARKDOWN')
# pprint('Room: '+str(chat_name))
# pprint('Chat_id: '+str(chat_id))
# def post_rules(bot, update):
# user_id = update.message.from_user.id
# message_id = update.message.message_id
# chat_id = update.message.chat.id
# chat_name = update.message.chat.title
# name = get_name(update)
# new_chat_mem = update.message.new_chat_members
# BOT_NAME = bot.username
# logger.info("printing rules manually")
# msg =("Welcome to "+ str(chat_name) + '\n' + str(rules_list))
# bot.sendMessage(chat_id=chat_id, text=msg, parse_mode='MARKDOWN')
# pprint('Room: '+str(chat_name))
# pprint('Chat_id: '+str(chat_id))
# if __name__ == "__main__":
# # Set these variable to the appropriate values
# TOKEN = str(os.getenv('BOT_TOKEN'))
# NAME = str(os.getenv('BOT_H_NAME'))
# ### SET RULES HERE"
# rules_list ='''*General Hum Furs Chat rules*
# •Be respectful of others!
# •Respect others desires to not be a part of a conversation or topic.
# •Gossiping will not be tolerated in any connection to our group or the furry community.
# •Express any concerns you may have, regarding others, to Farrin, Tokala, and/or Benji.
# •Avoid doing or saying anything that would intentionally bother or offend other members.
# •Bullying of any kind will not be tolerated within the community.
# •Do not solicit minors with or for any sexual topics or content.
# •Do not post content with the nature of harmful "jokes" such as “Trap.”
# •Sexual harassment will NOT be tolerated.
# •Keep conversions and topics furry related within the Hum Fur Chats.
# •This community is a place of safety and security. We would like ALL of our members to feel safe and secure within the community.
# •Please feel free to contact Farrin, Tokala, and/or Benji with any questions or concerns you may have.
# •Unsolicited messages, images, or content of a sexual nature within chats, will be considered sexual harassment. Farrin, Tokala, and/or Benji will assess the situation and handle it.
# •Leaving one of the humfur telegram groups will create a cool-down period of at least 1 week to pass before attempting to rejoin any of the associated telegram groups.
# •Rules may be added as needed
# *Hum Furs SFW chat rules*
# •This chat is for age +16 years old.
# •This chat is for Hum Fur members.
# •No NSFW chats or topics with minors or in the SFW chat.
# *Hum Furs NSFW Chat Rules*
# •This chat is for Hum Fur members.
# •NSFW chats/topics/events/content is +18 only.
# •Do not post content of controversial topics.
# *Hum Furs Meet-Up Chat Rules*
# •This chat is for age +16 years old.
# •Meet-up telegram chat will be limited to local and visiting furs.
# •Explicitly state if your created Meet-up is +18 only or has other/different restrictions or rules.'''
# # Port is given by Heroku
# PORT = os.environ.get('PORT')
# # Enable logging
# logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
# level=logging.INFO)
# logger = logging.getLogger(__name__)
# # Set up the Updater
# updater = Updater(TOKEN)
# dp = updater.dispatcher
# # Add handlers
# dp.add_handler(CommandHandler('start', start))
# dp.add_handler(MessageHandler(Filters.text, echo))
# dp.add_handler(MessageHandler(Filters.status_update.new_chat_members, new_post_rules))
# dp.add_handler(CommandHandler('rules', post_rules))
# dp.add_error_handler(errors)
# # Start the webhook
# updater.start_webhook(listen="0.0.0.0",
# port=int(PORT),
# url_path=TOKEN)
# updater.bot.setWebhook("https://{}.herokuapp.com/{}".format(NAME, TOKEN))
# updater.idle()
| 39.338129 | 184 | 0.675384 | 786 | 5,468 | 4.618321 | 0.320611 | 0.042975 | 0.024793 | 0.023141 | 0.297521 | 0.251791 | 0.223691 | 0.199174 | 0.199174 | 0.184022 | 0 | 0.00303 | 0.215435 | 5,468 | 138 | 185 | 39.623188 | 0.837529 | 0.951353 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9d373cd70df6fb771fb5f91d41f6c9b2985bcc4 | 446 | py | Python | examples/simple_fibonachi.py | LeeDoYup/SafeAI | 49aefc6ba7e4a01008b5de562bdc349e7aa33df3 | [
"MIT"
] | null | null | null | examples/simple_fibonachi.py | LeeDoYup/SafeAI | 49aefc6ba7e4a01008b5de562bdc349e7aa33df3 | [
"MIT"
] | null | null | null | examples/simple_fibonachi.py | LeeDoYup/SafeAI | 49aefc6ba7e4a01008b5de562bdc349e7aa33df3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath('../safeai')))
from safeai.model.fibonachi import fib1
from safeai.model.fibonachi import fib2
import tensorflow as tf
def main():
n=100
value1 = fib1(n)
value2 = fib2(n)
print(value1)
print(value2)
if __name__ == '__main__':
main()
| 17.84 | 62 | 0.726457 | 62 | 446 | 4.870968 | 0.467742 | 0.099338 | 0.15894 | 0.15894 | 0.198676 | 0 | 0 | 0 | 0 | 0 | 0 | 0.030055 | 0.179372 | 446 | 24 | 63 | 18.583333 | 0.795082 | 0 | 0 | 0 | 0 | 0 | 0.038117 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.470588 | 0 | 0.529412 | 0.176471 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
f9d4d6c83d11b44db2b8ee9d1f046fbb486ecf65 | 293 | py | Python | setup.py | tadashi9e/quantum_computer_simulator | f8c1fa61e95feadca2f4778214860681c4863cb1 | [
"MIT"
] | null | null | null | setup.py | tadashi9e/quantum_computer_simulator | f8c1fa61e95feadca2f4778214860681c4863cb1 | [
"MIT"
] | null | null | null | setup.py | tadashi9e/quantum_computer_simulator | f8c1fa61e95feadca2f4778214860681c4863cb1 | [
"MIT"
] | null | null | null | # -*- coding:utf-8;mode:python -*-
# Copyright [2019] tadashi9e
from distutils.core import setup, Extension
setup(name='qc', version='0.0.2',
packages=['qc'],
ext_modules=[Extension('qc_py', ['qc_py.cc', 'qc.cc'],
extra_compile_args=['-std=c++11'])])
| 32.555556 | 65 | 0.580205 | 39 | 293 | 4.230769 | 0.769231 | 0.048485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.047619 | 0.211604 | 293 | 8 | 66 | 36.625 | 0.666667 | 0.201365 | 0 | 0 | 0 | 0 | 0.160173 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.2 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9e7d60c06037e13257e26ed5f496d6889de0ca4 | 1,696 | py | Python | dash_app/styles_file.py | zhampel/ClaimMapping | 33084058ca61d0396daabd056b968884ede81209 | [
"Apache-2.0"
] | 2 | 2020-11-22T03:32:27.000Z | 2020-12-14T22:47:43.000Z | dash_app/styles_file.py | zhampel/ClaimMapping | 33084058ca61d0396daabd056b968884ede81209 | [
"Apache-2.0"
] | 1 | 2020-12-17T16:03:22.000Z | 2020-12-17T18:34:05.000Z | dash_app/styles_file.py | zhampel/ClaimMapping | 33084058ca61d0396daabd056b968884ede81209 | [
"Apache-2.0"
] | 2 | 2020-12-02T20:20:02.000Z | 2020-12-17T00:20:24.000Z | '''
Name: styles_file.py
Description: Home to all the styles needed for any compoonent in the Dash App.
author: @Katelyn98
'''
import config_with_yaml as config
#load in config file
cfg = config.load("config/config.yml")
#Style used for the Twitter Metadata
styles = {
'pre': {
'font-family': cfg.getProperty("dash_app.styles.font-family"),
'overflowX': cfg.getProperty("dash_app.styles.overflowX"),
'font-size': cfg.getProperty("dash_app.styles.font-size")
},
'text': {
'font-family': cfg.getProperty("dash_app.styles.font-family"),
'background-color': 'rgb(255,255,255)',
'color': 'rgb(0,0,31)',
},
'title': {'textAlign': 'center',
'font-family': cfg.getProperty("dash_app.styles.font-family"),
'background-color': 'rgb(255,255,255)',
'color': 'rgb(0,0,31)',
}
}
colors = {
'background': 'gb(255,255,255)',
'text': 'rrgb(0,0,31)'
}
#Styles specifically for the tabs used in the Dash App
tabs_styles = {
'height': cfg.getProperty("dash_app.styles.tab.height"),
'font-family': cfg.getProperty("dash_app.styles.tab.font-family")
}
tab_style = {
'borderBottom': cfg.getProperty("dash_app.styles.tab.borderBottom"),
'padding': cfg.getProperty("dash_app.styles.tab.padding"),
'fontWeight': cfg.getProperty("dash_app.styles.tab.fontWeight")
}
tab_selected_style = {
'borderTop': cfg.getProperty("dash_app.styles.tab.borderTop"),
'borderBottom': cfg.getProperty("dash_app.styles.tab.borderBottom"),
'backgroundColor': 'rgb(0,0,31)',
'color': 'rgb(255,255,255)',
'font-family': 'tahoma',
'padding': cfg.getProperty("dash_app.styles.tab.padding")
} | 30.285714 | 78 | 0.65684 | 220 | 1,696 | 4.972727 | 0.272727 | 0.095978 | 0.213894 | 0.249543 | 0.566728 | 0.526508 | 0.413163 | 0.379342 | 0.200183 | 0.157221 | 0 | 0.038028 | 0.162736 | 1,696 | 56 | 79 | 30.285714 | 0.732394 | 0.134434 | 0 | 0.225 | 0 | 0 | 0.50377 | 0.250171 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.025 | 0 | 0.025 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
f9e9894d8ab1b41e19933e5e09bd5557ed523c70 | 76 | py | Python | scriptorium/_version.py | jasedit/papers_base | af8aa6e9a164861ad7b44471ce543002fa7129d9 | [
"MIT"
] | 8 | 2016-08-17T14:40:49.000Z | 2020-03-05T00:08:07.000Z | scriptorium/_version.py | jasedit/scriptorium | af8aa6e9a164861ad7b44471ce543002fa7129d9 | [
"MIT"
] | 35 | 2016-08-07T19:58:02.000Z | 2021-05-09T10:08:06.000Z | scriptorium/_version.py | jasedit/scriptorium | af8aa6e9a164861ad7b44471ce543002fa7129d9 | [
"MIT"
] | 2 | 2017-09-21T17:57:46.000Z | 2019-06-30T13:06:21.000Z | """Storage of version information for scriptorium."""
__version__ = "2.7.3"
| 25.333333 | 53 | 0.723684 | 10 | 76 | 5.1 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.044776 | 0.118421 | 76 | 2 | 54 | 38 | 0.716418 | 0.618421 | 0 | 0 | 0 | 0 | 0.217391 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ddb2d409aa3f12499375eee944dc4ba0939791c2 | 1,119 | py | Python | FITSxtractor/FITSClass.py | ovanov/FITSxtractor | ba6a1c51ed09798e76717d8db63dcffff73e6c44 | [
"MIT"
] | null | null | null | FITSxtractor/FITSClass.py | ovanov/FITSxtractor | ba6a1c51ed09798e76717d8db63dcffff73e6c44 | [
"MIT"
] | null | null | null | FITSxtractor/FITSClass.py | ovanov/FITSxtractor | ba6a1c51ed09798e76717d8db63dcffff73e6c44 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
This class will be used as a dataclass for the XML metadata from FITS output files.
In order for it to do so, one can add or remove certain objects.
@Author: ovanov
@date: 06.07.21
"""
from dataclasses import asdict, dataclass, field
@dataclass(order=True)
class FITS_obj:
"""
This Class uses defautlt values of "None" strings instead of bools in order for them to be shown in
the python dataframes as "None" and not empty cells (which can cause sorting problems). The list values
are used to store multiple values, if there are more than one in a file.
The dataclass attributes represent the values in each XML structured FITS output file. The order, in which
they are placed, resembles the columns which will be printed into a file.
"""
filepath: str = "None"
size: str = "None"
md5checksum: str = "None"
status: str = "None"
identity_format: list = field(default_factory=list)
mimetype: list = field(default_factory=list)
puid: str = field(default_factory=list)
well_formed: str = "None"
well_formed_stat: str = "None" | 37.3 | 110 | 0.713137 | 173 | 1,119 | 4.566474 | 0.566474 | 0.053165 | 0.072152 | 0.087342 | 0.068354 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00906 | 0.210903 | 1,119 | 30 | 111 | 37.3 | 0.885617 | 0.593387 | 0 | 0 | 0 | 0 | 0.057554 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.083333 | 0 | 0.916667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
ddcac13a2dde77de70d9821698bcb91caaf720c0 | 486 | py | Python | seizure prediction code/pylearn2ext/mlp.py | aimo84/epilepsy-system | de3b26039f76ce2ceac9a74a6bc179b8f7bddb1e | [
"BSD-3-Clause"
] | 13 | 2016-12-14T07:33:21.000Z | 2022-02-05T13:05:22.000Z | seizure prediction code/pylearn2ext/mlp.py | aimo84/epilepsy-system | de3b26039f76ce2ceac9a74a6bc179b8f7bddb1e | [
"BSD-3-Clause"
] | null | null | null | seizure prediction code/pylearn2ext/mlp.py | aimo84/epilepsy-system | de3b26039f76ce2ceac9a74a6bc179b8f7bddb1e | [
"BSD-3-Clause"
] | 6 | 2016-10-11T05:42:29.000Z | 2022-03-25T08:19:06.000Z | import theano.tensor as T
from pylearn2.utils import wraps
from pylearn2.models.mlp import Layer
from pylearn2.models.mlp import PretrainedLayer
class PretrainedLayerWeight(PretrainedLayer):
@wraps(Layer.get_weight_decay)
def get_weight_decay(self, coeff):
if isinstance(coeff, str):
coeff = float(coeff)
assert isinstance(coeff, float) or hasattr(coeff, 'dtype')
W = self.layer_content.get_weights()
return coeff * T.sqr(W).sum() | 30.375 | 66 | 0.711934 | 63 | 486 | 5.396825 | 0.555556 | 0.105882 | 0.105882 | 0.123529 | 0.158824 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007692 | 0.197531 | 486 | 16 | 67 | 30.375 | 0.864103 | 0 | 0 | 0 | 0 | 0 | 0.010267 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 1 | 0.083333 | false | 0 | 0.333333 | 0 | 0.583333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
ddcb30dec3b437219753c020cf7f73a8002d3621 | 315 | py | Python | Lesson3_ControlFlow/3-booleanVariables.py | StyvenSoft/degree-python | 644953608948f341f5a20ceb9a02976a128b472b | [
"MIT"
] | null | null | null | Lesson3_ControlFlow/3-booleanVariables.py | StyvenSoft/degree-python | 644953608948f341f5a20ceb9a02976a128b472b | [
"MIT"
] | null | null | null | Lesson3_ControlFlow/3-booleanVariables.py | StyvenSoft/degree-python | 644953608948f341f5a20ceb9a02976a128b472b | [
"MIT"
] | null | null | null | bool_one = 5 != 7
bool_two = 1 + 1 != 2
bool_three = 3 * 3 == 9
print(bool_one) #True
print(bool_two) #False
print(bool_three) #True
my_bool = "true"
print(type(my_bool)) #<class 'str'>
my_bool_two = True
print(type(my_bool_two)) #<class 'bool'>
my_bool_three = 452
print(type(my_bool_three)) #<class 'int'> | 16.578947 | 41 | 0.67619 | 57 | 315 | 3.45614 | 0.333333 | 0.182741 | 0.167513 | 0.228426 | 0.192893 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041509 | 0.15873 | 315 | 19 | 41 | 16.578947 | 0.701887 | 0.168254 | 0 | 0 | 0 | 0 | 0.015564 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
dddcab59f2c5c697d5a9fddbb7822e7dfc6fca70 | 491 | py | Python | multiview/base/argparse_formatter.py | prcvlabs/multiview | 1a03e14855292967ffb0c0ec7fff855c5abbc9d2 | [
"Apache-2.0"
] | 5 | 2021-09-03T23:12:08.000Z | 2022-03-04T21:43:32.000Z | multiview/base/argparse_formatter.py | prcvlabs/multiview | 1a03e14855292967ffb0c0ec7fff855c5abbc9d2 | [
"Apache-2.0"
] | 3 | 2021-09-08T02:57:46.000Z | 2022-02-26T05:33:02.000Z | multiview/base/argparse_formatter.py | prcvlabs/multiview | 1a03e14855292967ffb0c0ec7fff855c5abbc9d2 | [
"Apache-2.0"
] | 2 | 2021-09-26T03:14:40.000Z | 2022-01-26T06:42:52.000Z |
import argparse
class NullTextHelpFormatter(argparse.RawDescriptionHelpFormatter):
"""Text formatter for argparse help message that
(1) Doesn't mangle white space in the description, and
(2) Doesn't print "helpful" optional and postional argument secionts.
When using this text formatter, put all usage information in
the description field (of the argument parser), and format it
however you want. Done."""
def add_argument(self, action):
pass
| 30.6875 | 73 | 0.727088 | 63 | 491 | 5.650794 | 0.777778 | 0.073034 | 0.089888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005168 | 0.211813 | 491 | 15 | 74 | 32.733333 | 0.914729 | 0.651731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.25 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
dde6b26704af1e403d64c259e7542b7c25d8036d | 13,661 | py | Python | src/sim/06-allegheny-05-school-work-flu/sim-test-03c.py | momacs/pram | d2de43ea447d13a65d814f781ec86889754f76fe | [
"BSD-3-Clause"
] | 10 | 2019-01-18T19:11:54.000Z | 2022-03-16T08:39:36.000Z | src/sim/06-allegheny-05-school-work-flu/sim-test-03c.py | momacs/pram | d2de43ea447d13a65d814f781ec86889754f76fe | [
"BSD-3-Clause"
] | 2 | 2019-02-19T15:10:44.000Z | 2019-02-26T04:26:24.000Z | src/sim/06-allegheny-05-school-work-flu/sim-test-03c.py | momacs/pram | d2de43ea447d13a65d814f781ec86889754f76fe | [
"BSD-3-Clause"
] | 3 | 2019-02-19T15:11:08.000Z | 2021-08-20T11:51:04.000Z | '''
The simple flu model on the Allegheny County data (students only).
Identify good school to investigate:
SELECT COUNT(*) AS n, st.school_id, AVG(st.income) AS income_m, st.income_level, AVG(age) AS age_m, sc.latitude, sc.longitude
FROM students st INNER JOIN schools sc on sc.sp_id = st.school_id GROUP BY sc.sp_id, st.income_level ORDER BY n DESC, sc.sp_id
n school_id income_mean i age_mean lat lon
----------------------------------------------------------------------------------
6386 450066968 134790.52709051 m 5.70012527403696 0.0 0.0 m01
5655 450086847 129025.519186561 m 13.8258178603006 40.632399 -80.4466
3294 450086847 26074.3989071038 l 13.3023679417122 40.632399 -80.4466
2928 450066968 28083.0925546448 l 5.94330601092896 0.0 0.0 m01
2587 450067304 145389.131812911 m 12.0552763819095 0.0 0.0
1987 450063600 163197.256165073 m 15.9869149471565 0.0 0.0 m02
1792 450109054 144399.965959821 m 16.0848214285714 40.33306 -80.043229
1471 450143076 141918.295717199 m 16.1067301155676 40.376388 -80.050603
1355 450107620 124959.326937269 m 16.0236162361624 40.355898 -79.979719 m03
1255 450127687 136100.890836653 m 16.1003984063745 40.58123 -79.942932
1251 450067304 26346.5659472422 l 12.2134292565947 0.0 0.0
1125 450144545 147972.320888889 m 16.1066666666667 40.571955 -80.031351
1124 450114199 139027.40569395 m 16.1085409252669 40.378624 -80.110997
1108 450102516 116780.759927798 m 15.4837545126354 40.417125 -80.020406
1078 450125133 111076.614100186 m 16.0556586270872 40.429923 -79.751352
1018 450102513 25104.4184675835 l 16.0284872298625 40.429871 -79.920355
963 450140462 27159.015576324 l 16.202492211838 40.343793 -79.829742
954 450149633 108054.22851153 m 16.0649895178197 40.508254 -79.773995
947 450142450 108652.442449842 m 16.1045406546991 40.512505 -80.215362
936 450102513 105304.568376068 m 15.9957264957265 40.429871 -79.920355
916 450148402 102050.793668122 m 16.1495633187773 40.468266 -79.81889
899 450148402 23912.5806451613 l 15.9788654060067 40.468266 -79.81889
880 450140462 87066.2022727273 m 15.9681818181818 40.343793 -79.829742
864 450120864 148946.793981481 m 10.5636574074074 40.65769 -79.96114
830 450144841 124331.396385542 m 14.0518072289157 40.52379 -80.02957
805 450123912 134385.561490683 m 16.2086956521739 40.517303 -79.869527
785 450142414 111161.197452229 m 16.0509554140127 40.467685 -80.115075
759 450063600 25748.2608695652 l 15.6916996047431 0.0 0.0 m02
755 450144546 166684.495364238 m 16.0304635761589 40.605004 -80.05099
751 450102525 139161.288948069 m 16.0652463382157 40.488982 -80.017937
728 450149292 18925.1236263736 l 8.16483516483516 40.452781 -79.893929 l01
721 450142449 113066.205270458 m 12.1983356449376 40.5097 -80.222883
711 450144842 117614.555555556 m 16.2728551336146 40.523738 -80.0296
705 450137243 24313.5007092199 l 12.4524822695035 40.482632 -79.814739
695 450137243 92273.2805755396 m 12.0187050359712 40.482632 -79.814739
684 450067740 217273.074561404 m 8.26754385964912 40.6262522 -80.0561964
684 450110131 166532.228070175 m 12.1520467836257 40.315095 -80.098836
682 450102517 126804.721407625 m 8.69648093841642 40.389005 -80.007637
682 450143658 141804.609970675 m 12.2140762463343 40.305118 -80.022754
674 450127690 148147.166172107 m 12.1038575667656 40.589777 -79.945388
669 450114201 142415.784753363 m 12.2167414050822 40.378624 -80.110997
669 450123912 24042.466367713 l 16.0822122571001 40.517303 -79.869527
656 450140545 150377.222560976 m 8.41920731707317 40.572011 -80.028754
650 450102516 26042.4707692308 l 15.1338461538462 40.417125 -80.020406
638 450139597 174223.855799373 m 8.29937304075235 40.641729 -80.093503
622 450149286 23422.6173633441 l 14.6768488745981 40.444962 -79.998882
616 450102518 132250.548701299 m 8.79707792207792 40.451087 -80.049011
616 450134114 126814.237012987 m 16.0714285714286 40.388943 -80.034458
615 450107620 27387.0894308943 l 15.9040650406504 40.355898 -79.979719 m03
614 450119183 134104.633550489 m 12.1530944625407 40.56468 -79.903316
613 450149076 174293.849918434 m 11.9951060358891 40.655193 -80.010701
607 450128119 129650.810543657 m 12.2701812191104 40.3514 -80.002797
604 450131007 140199.850993377 m 12.2119205298013 40.340402 -80.041998
599 450143076 28855.0851419032 l 15.8347245409015 40.376388 -80.050603
595 450139639 180901.166386555 m 12.1361344537815 40.64174 -80.093871
593 450114202 129885.615514334 m 7.20910623946037 40.379123 -80.110204
588 450131157 160928.741496599 m 12.0952380952381 40.57834 -80.072185
585 450149633 25742.8547008547 l 15.9059829059829 40.508254 -79.773995
583 450124148 163431.46483705 m 8.42881646655232 40.586498 -80.094958
574 450121426 98662.668989547 m 15.9337979094077 40.256085 -79.854512
570 450107374 142676.285964912 m 8.38245614035088 40.539606 -80.094764
569 450125133 26461.1458699473 l 15.97539543058 40.429923 -79.751352
563 450150652 147882.95026643 m 16.0248667850799 40.561812 -80.203397
562 450129446 109572.960854093 m 16.085409252669 40.618188 -79.728338
553 450140459 115537.844484629 m 8.62025316455696 40.413465 -80.196843
544 450123763 156298.632352941 m 12.2132352941176 40.354663 -80.06425
542 450049316 216992.41697417 m 10.9428044280443 40.597899 -79.9675864
541 450146354 133122.3974122 m 8.6913123844732 40.516959 -79.863316
539 450112699 138908.515769944 m 12.0519480519481 40.569444 -80.035415
539 450149299 20029.6474953618 l 8.00185528756957 40.460504 -79.912605 l03
535 450149313 24830.3925233645 l 7.1981308411215 40.398001 -79.989084
534 450149287 27158.9887640449 l 15.9007490636704 40.391203 -79.988508
532 450131156 159046.781954887 m 8.38721804511278 40.581957 -80.052425
527 450149306 22905.2941176471 l 7.39848197343454 40.423232 -79.923386
523 450110212 182098.929254302 m 8.565965583174 40.638838 -80.081474
523 450149298 17862.5047801147 l 8.12045889101339 40.454862 -80.005402
519 450149285 99833.2986512524 m 7.55491329479769 40.394882 -80.024949
512 450109857 124343.09375 m 8.462890625 40.546359 -80.239929
493 450107553 152180.831643002 m 7.6369168356998 40.337294 -80.095692
493 450149305 24718.7423935091 l 13.501014198783 40.448801 -79.961581
492 450149310 24300.6178861789 l 14.2337398373984 40.457347 -79.919567
490 450140452 131497.716326531 m 9.23265306122449 40.550046 -80.004724
489 450149287 93150.0572597137 m 16.1676891615542 40.391203 -79.988508
483 450112506 99939.867494824 m 14.8364389233954 40.428239 -80.095631
479 450120925 121707.649269311 m 7.4133611691023 40.503202 -80.07687
477 450066931 220946.660377358 m 12.1635220125786 40.5217565 -79.8794891
477 450075546 164202.264150943 m 10.7672955974843 40.4514804 -79.9423784
474 450113419 157798.075949367 m 8.77004219409283 40.571708 -79.927196
474 450129446 27385.358649789 l 15.8248945147679 40.618188 -79.728338
473 450144842 28510.6596194503 l 16.1035940803383 40.523738 -80.0296
470 450121197 153004.212765957 m 7.65744680851064 40.348236 -80.063222
467 450107375 151091.299785867 m 16.0107066381156 40.529878 -80.075854
465 450102519 23726.6279569892 l 6.25806451612903 40.46877 -79.917847
461 450148400 84742.7462039045 m 7.61388286334056 40.45898 -79.826429
457 450149284 21898.9059080963 l 6.96498905908096 40.415647 -80.02084
455 450078733 112539.265934066 m 16.0813186813187 40.44265 -79.999317
455 450120959 164525.072527473 m 8.81538461538462 40.547807 -80.190828
453 450118168 133320.710816777 m 16.0485651214128 40.618295 -79.852952
452 450068129 112742.681415929 m 8.32964601769912 40.4412821 -79.771786
451 450102519 109135.521064302 m 6.74944567627494 40.46877 -79.917847
'''
import pram.util as util
from pram.data import GroupSizeProbe, ProbeMsgMode, ProbePersistenceDB
from pram.entity import Group, GroupDBRelSpec, GroupQry, Site
from pram.rule import SimpleFluLocationRule, SimpleFluProgressRule #, FluLocationAlleghenyRule, ProgressFluSimpleAlleghenyRule
from pram.sim import Simulation
import signal
def signal_handler(signal, frame):
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
# ----------------------------------------------------------------------------------------------------------------------
# (0) Init:
rand_seed = 1928
pragma_live_info = True
pragma_live_info_ts = False
fpath_db_in = os.path.join(os.path.dirname(__file__), '..', '..', '..', 'data', 'allegheny-county', 'allegheny-students.sqlite3')
# ----------------------------------------------------------------------------------------------------------------------
# (1) Sites:
sites = Simulation.gen_sites_from_db(
fpath_db_in,
lambda fpath_db: {
'school': Site.gen_from_db(fpath_db, 'schools', 'sp_id', 'school', [])
},
pragma_live_info=pragma_live_info,
pragma_live_info_ts=pragma_live_info_ts
)
site_home = Site('home')
# ----------------------------------------------------------------------------------------------------------------------
# (2) Probes:
# n_schools = 8
# few_schools = [sites['school'][k] for k in list(sites['school'].keys())[:n_schools]]
#
# probe_grp_size_few_schools = GroupSizeProbe('school', [GroupQry(rel={ Site.AT: s }) for s in few_schools], msg_mode=ProbeMsgMode.DISP)
fpath_db = os.path.join(os.path.dirname(__file__), 'out-test-03c.sqlite3')
if os.path.isfile(fpath_db):
os.remove(fpath_db)
pp = ProbePersistenceDB(fpath_db)
school_l01 = sites['school'][450149292]
school_l02 = sites['school'][450149286] # might be worse than l01
school_l03 = sites['school'][450149299] # ^
school_m01 = sites['school'][450066968]
school_m02 = sites['school'][450063600]
school_m03 = sites['school'][450107620]
def probe_grp_size_flu_school(name, school, pp):
return GroupSizeProbe(
name=name,
queries=[
GroupQry(attr={ 'flu': 's' }, rel={ 'school': school }),
GroupQry(attr={ 'flu': 'e' }, rel={ 'school': school }),
GroupQry(attr={ 'flu': 'r' }, rel={ 'school': school })
],
qry_tot=GroupQry(rel={ 'school': school }),
persistence=pp,
var_names=['ps', 'pe', 'pr', 'ns', 'ne', 'nr']
)
probe_grp_size_flu_school_l01 = probe_grp_size_flu_school('school-l01', school_l01, pp)
probe_grp_size_flu_school_l02 = probe_grp_size_flu_school('school-l02', school_l02, pp)
probe_grp_size_flu_school_l03 = probe_grp_size_flu_school('school-l03', school_l03, pp)
probe_grp_size_flu_school_m01 = probe_grp_size_flu_school('school-m01', school_m01, pp)
probe_grp_size_flu_school_m02 = probe_grp_size_flu_school('school-m02', school_m02, pp)
probe_grp_size_flu_school_m03 = probe_grp_size_flu_school('school-m03', school_m03, pp)
# ----------------------------------------------------------------------------------------------------------------------
# (3) Simulation:
(Simulation().
set().
rand_seed(rand_seed).
pragma_autocompact(True).
pragma_live_info(pragma_live_info).
pragma_live_info_ts(pragma_live_info_ts).
pragma_rule_analysis_for_db_gen(True).
done().
add().
rule(SimpleFluProgressRule()).
# rule(ProgressFluSimpleAlleghenyRule()).
# rule(FluLocationAlleghenyRule()).
# probe(probe_grp_size_few_schools).
probe(probe_grp_size_flu_school_l01).
probe(probe_grp_size_flu_school_l02).
probe(probe_grp_size_flu_school_l03).
probe(probe_grp_size_flu_school_m01).
probe(probe_grp_size_flu_school_m02).
probe(probe_grp_size_flu_school_m03).
done().
gen_groups_from_db(
fpath_db_in,
tbl = 'students',
attr_fix = { 'flu': 's' },
rel_fix = { 'home': site_home },
attr_db = [],
rel_db = [
GroupDBRelSpec('school', 'school_id', sites['school'])
],
rel_at = 'school'
).
run(3).
summary(True, 0,0,0,0, (1,0))
)
| 58.131915 | 136 | 0.634727 | 1,689 | 13,661 | 5.015394 | 0.470693 | 0.007791 | 0.029749 | 0.033644 | 0.105182 | 0.085468 | 0.054775 | 0.014166 | 0.014166 | 0.014166 | 0 | 0.56891 | 0.248444 | 13,661 | 234 | 137 | 58.380342 | 0.256161 | 0.758949 | 0 | 0.074074 | 0 | 0 | 0.087821 | 0.007956 | 0 | 0 | 0 | 0 | 0 | 1 | 0.024691 | false | 0 | 0.074074 | 0.012346 | 0.111111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fb07a067b2b6287d13415a394c277b2d0c239ab1 | 179 | py | Python | Others/aising/aising2019/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | Others/aising/aising2019/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | Others/aising/aising2019/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
n = int(input())
h = int(input())
w = int(input())
print((n - w + 1) * (n - h + 1))
if __name__ == '__main__':
main()
| 12.785714 | 36 | 0.430168 | 25 | 179 | 2.76 | 0.56 | 0.347826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02459 | 0.318436 | 179 | 13 | 37 | 13.769231 | 0.540984 | 0.117318 | 0 | 0 | 0 | 0 | 0.051282 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0 | 0 | 0.142857 | 0.142857 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fb08236d510de0c5eaeb8d4398eb6843243e68ed | 270 | py | Python | cellphonedb/src/core/exceptions/NoInteractionsFound.py | BioTuring-Notebooks/CellphoneDB | 9ab48d8888f11259bb3030c8d149d7bc7cdaf6e1 | [
"MIT"
] | 278 | 2018-10-03T22:12:09.000Z | 2022-03-28T15:33:17.000Z | cellphonedb/src/core/exceptions/NoInteractionsFound.py | BioTuring-Notebooks/CellphoneDB | 9ab48d8888f11259bb3030c8d149d7bc7cdaf6e1 | [
"MIT"
] | 263 | 2018-11-16T14:41:31.000Z | 2022-03-30T08:38:26.000Z | cellphonedb/src/core/exceptions/NoInteractionsFound.py | BioTuring-Notebooks/CellphoneDB | 9ab48d8888f11259bb3030c8d149d7bc7cdaf6e1 | [
"MIT"
] | 106 | 2018-10-18T15:11:57.000Z | 2022-03-14T19:50:27.000Z | class NoInteractionsFound(Exception):
def __init__(self, description: str = None, hint: str = None):
super(NoInteractionsFound, self).__init__('No CellPhoneDB interacions found in this input.')
self.description = description
self.hint = hint
| 45 | 100 | 0.707407 | 29 | 270 | 6.310345 | 0.62069 | 0.163934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 270 | 5 | 101 | 54 | 0.847222 | 0 | 0 | 0 | 0 | 0 | 0.174074 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fb2138ac2fd9d602b261473decc6ef4a24023361 | 709 | py | Python | server/tests/test_upload.py | dcalacci/weclocked | 27a8175d3d7d6d581714849df67fe0a8e6f7636e | [
"MIT"
] | null | null | null | server/tests/test_upload.py | dcalacci/weclocked | 27a8175d3d7d6d581714849df67fe0a8e6f7636e | [
"MIT"
] | null | null | null | server/tests/test_upload.py | dcalacci/weclocked | 27a8175d3d7d6d581714849df67fe0a8e6f7636e | [
"MIT"
] | null | null | null | from conftest import client
from pathlib import Path
resources = Path(__file__).parent / "resources"
def test_upload_csv_returns_response(client):
resp = client.post("/exports/upload/", data={
"name": "file",
"file": (resources / "data.csv").open('rb')
})
print("response:", resp)
assert resp is not None
# def test_upload_with_no_email_returns_error(client):
# TODO
# def test_upload_with_badly_formatted_file_returns_error(client):
# def test_upload_with_non_csv_returns_error(client):
# def test_upload_with_multiple_files_creates_one_sheet(client):
# def test_upload_with_bad_email_returns_error(client):
| 29.541667 | 70 | 0.689704 | 90 | 709 | 4.988889 | 0.455556 | 0.093541 | 0.173719 | 0.18931 | 0.207127 | 0.155902 | 0.155902 | 0 | 0 | 0 | 0 | 0 | 0.211566 | 709 | 23 | 71 | 30.826087 | 0.80322 | 0.410437 | 0 | 0 | 0 | 0 | 0.136253 | 0 | 0 | 0 | 0 | 0.043478 | 0.1 | 1 | 0.1 | false | 0 | 0.2 | 0 | 0.3 | 0.1 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fb246dacbe9089d21c984cf0935c9c54251b1dd0 | 743 | py | Python | planner/plan_writer.py | facebookresearch/Clockwork | 13381ac35feab30c58ff9addd7dd7ee89551859e | [
"MIT"
] | 5 | 2021-06-04T23:05:18.000Z | 2022-02-17T21:58:22.000Z | planner/plan_writer.py | facebookresearch/Clockwork | 13381ac35feab30c58ff9addd7dd7ee89551859e | [
"MIT"
] | null | null | null | planner/plan_writer.py | facebookresearch/Clockwork | 13381ac35feab30c58ff9addd7dd7ee89551859e | [
"MIT"
] | 1 | 2021-11-06T13:57:42.000Z | 2021-11-06T13:57:42.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations
import logging
import sys
from common.data_types import UnixtimeAssignments
__ALL__ = ["PlanWriter"]
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logger: logging.Logger = logging.getLogger(__name__)
class PlanWriter:
"""
This class contains methods that writes the Clockwork plans to a production datastore
"""
def __init__(self) -> None:
pass
async def overwrite_plan(self, plan: UnixtimeAssignments) -> None:
logger.debug(f'Final Plan: {plan}')
| 23.967742 | 89 | 0.736205 | 97 | 743 | 5.453608 | 0.701031 | 0.037807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001642 | 0.18035 | 743 | 30 | 90 | 24.766667 | 0.866995 | 0.371467 | 0 | 0 | 0 | 0 | 0.06264 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0.083333 | 0.333333 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 2 |
fb28a934e82ec4edd7115561e5d80fe3c3d65a11 | 2,775 | py | Python | uploads/core/models.py | joshua-taylor/dataIntegrator | dc0cdc6bb0177b6499d49ca2e39b42291656235e | [
"MIT"
] | null | null | null | uploads/core/models.py | joshua-taylor/dataIntegrator | dc0cdc6bb0177b6499d49ca2e39b42291656235e | [
"MIT"
] | null | null | null | uploads/core/models.py | joshua-taylor/dataIntegrator | dc0cdc6bb0177b6499d49ca2e39b42291656235e | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.contrib.auth.models import AbstractUser, BaseUserManager
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
#for validation of uploaded files:
def validate_file_extension(value):
import os
from django.core.exceptions import ValidationError
ext = os.path.splitext(value.name)[1]
valid_extensions = ['.csv','.xlsx','.xls']
if not ext.lower() in valid_extensions:
raise ValidationError(u'Unsupported file extension, please ensure you are uploading a spreadsheet with a file type ending in "csv", "xlsx", or "xls"')
class UserManager(BaseUserManager):
"""Define a model manager for User model with no username field."""
use_in_migrations = True
def _create_user(self, email, password, **extra_fields):
"""Create and save a User with the given email and password."""
if not email:
raise ValueError('The given email must be set')
email = self.normalize_email(email)
user = self.model(email=email, **extra_fields)
user.set_password(password)
user.save(using=self._db)
return user
def create_user(self, email, password=None, **extra_fields):
"""Create and save a regular User with the given email and password."""
extra_fields.setdefault('is_staff', False)
extra_fields.setdefault('is_superuser', False)
return self._create_user(email, password, **extra_fields)
def create_superuser(self, email, password, **extra_fields):
"""Create and save a SuperUser with the given email and password."""
extra_fields.setdefault('is_staff', True)
extra_fields.setdefault('is_superuser', True)
if extra_fields.get('is_staff') is not True:
raise ValueError('Superuser must have is_staff=True.')
if extra_fields.get('is_superuser') is not True:
raise ValueError('Superuser must have is_superuser=True.')
return self._create_user(email, password, **extra_fields)
class CustomUser(AbstractBaseUser, PermissionsMixin):
username = None
email = models.EmailField(_('email'), unique=True)
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = []
objects = UserManager()
def __str__(self):
return self.email
class Document(models.Model):
owner = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
)
description = models.CharField(max_length=255, blank=True)
document = models.FileField(upload_to='documents/', validators=[validate_file_extension])
uploaded_at = models.DateTimeField(auto_now_add=True)
| 39.084507 | 158 | 0.70955 | 350 | 2,775 | 5.451429 | 0.368571 | 0.069182 | 0.059748 | 0.050314 | 0.339623 | 0.30608 | 0.212788 | 0.19392 | 0.147799 | 0.0587 | 0 | 0.001789 | 0.194234 | 2,775 | 70 | 159 | 39.642857 | 0.851521 | 0.101622 | 0 | 0.039216 | 0 | 0.019608 | 0.127883 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.098039 | false | 0.117647 | 0.156863 | 0.019608 | 0.588235 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
fb3afb908984c5b9acf0b692aa98d9229e1526f2 | 187 | py | Python | verilog/benchmarks_small/muladd/generate.py | cliffordwolf/yosys-benchmarks | 52ff6fa991f2ab509618d8aaad02f307aac78848 | [
"0BSD"
] | 14 | 2018-10-08T05:08:54.000Z | 2022-01-29T23:12:20.000Z | verilog/benchmarks_small/muladd/generate.py | cliffordwolf/yosys-benchmarks | 52ff6fa991f2ab509618d8aaad02f307aac78848 | [
"0BSD"
] | 3 | 2019-02-27T15:16:50.000Z | 2020-02-15T16:15:43.000Z | verilog/benchmarks_small/muladd/generate.py | cliffordwolf/yosys-benchmarks | 52ff6fa991f2ab509618d8aaad02f307aac78848 | [
"0BSD"
] | 6 | 2019-02-04T20:16:49.000Z | 2021-02-05T03:29:29.000Z | #!/usr/bin/env python3
from common import gen_muladd
ARange = ['16','32s']
BRange = ['8','16s']
CRange = ['32','40s']
if __name__ == "__main__":
gen_muladd(ARange, BRange, CRange)
| 17 | 38 | 0.641711 | 26 | 187 | 4.230769 | 0.807692 | 0.163636 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.075949 | 0.15508 | 187 | 10 | 39 | 18.7 | 0.620253 | 0.112299 | 0 | 0 | 0 | 0 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fb3e9b08ce4db080995f0c7ff3e7d7553348dc93 | 34,302 | py | Python | pysnmp-with-texts/DEC-ATM-SIGNALLING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/DEC-ATM-SIGNALLING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/DEC-ATM-SIGNALLING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DEC-ATM-SIGNALLING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DEC-ATM-SIGNALLING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:37:24 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
decMIBextension, = mibBuilder.importSymbols("DECATM-MIB", "decMIBextension")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
TimeTicks, ObjectIdentity, ModuleIdentity, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Unsigned32, Integer32, Counter32, Gauge32, iso, NotificationType, MibIdentifier, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "ObjectIdentity", "ModuleIdentity", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Unsigned32", "Integer32", "Counter32", "Gauge32", "iso", "NotificationType", "MibIdentifier", "Counter64")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
decAtmSignallingMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 36, 2, 18, 34))
decAtmSignallingMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1))
decSignallingGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 1))
decSignallingConfigTable = MibTable((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 1, 1), )
if mibBuilder.loadTexts: decSignallingConfigTable.setStatus('mandatory')
if mibBuilder.loadTexts: decSignallingConfigTable.setDescription('')
decSignallingConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DEC-ATM-SIGNALLING-MIB", "decAtmSignallingIndex"))
if mibBuilder.loadTexts: decSignallingConfigEntry.setStatus('mandatory')
if mibBuilder.loadTexts: decSignallingConfigEntry.setDescription("Each entry describes one UNI / NNI. Note that the table is indexed by 'atm' interfaces, rather than 'aal5' entities.")
decAtmSignallingIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: decAtmSignallingIndex.setStatus('mandatory')
if mibBuilder.loadTexts: decAtmSignallingIndex.setDescription('An arbitrary integer index that can be used to distinguish among multiple signalling entities for the same (physical) interface.')
decAtmSignallingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoConfigure", 1), ("pnni", 2), ("uni30", 3), ("uni31", 4), ("uni40", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: decAtmSignallingMode.setStatus('mandatory')
if mibBuilder.loadTexts: decAtmSignallingMode.setDescription('Indicates the mode in which the port is configured to run.')
decQ2931Group = MibIdentifier((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2))
decQ2931MsgTable = MibTable((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1), )
if mibBuilder.loadTexts: decQ2931MsgTable.setStatus('mandatory')
if mibBuilder.loadTexts: decQ2931MsgTable.setDescription('Describes the number of call/connection processing messages sent and received on each UNI or NNI.')
decQ2931MsgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DEC-ATM-SIGNALLING-MIB", "decAtmSignallingIndex"))
if mibBuilder.loadTexts: decQ2931MsgEntry.setStatus('mandatory')
if mibBuilder.loadTexts: decQ2931MsgEntry.setDescription("Each entry contains signalling statistics for one UNI / NNI. Note that the table is indexed by ATM ports (ifType = 'atm') as opposed to AAL5 entities (ifType = 'aal5').")
callProceedingTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: callProceedingTx.setStatus('mandatory')
if mibBuilder.loadTexts: callProceedingTx.setDescription('The number of CALL PROCEEDING messages transmitted on this interface.')
callProceedingRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: callProceedingRx.setStatus('mandatory')
if mibBuilder.loadTexts: callProceedingRx.setDescription('The number of CALL PROCEEDING messages received on this interface.')
connectTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: connectTx.setStatus('mandatory')
if mibBuilder.loadTexts: connectTx.setDescription('The number of CONNECT messages transmitted on this interface.')
connectRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: connectRx.setStatus('mandatory')
if mibBuilder.loadTexts: connectRx.setDescription('The number of CONNECT messages received on this interface.')
connectAcknowledgeTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: connectAcknowledgeTx.setStatus('mandatory')
if mibBuilder.loadTexts: connectAcknowledgeTx.setDescription('The number of CONNECT ACKNOWLEDGE messages transmitted on this interface.')
connectAcknowledgeRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: connectAcknowledgeRx.setStatus('mandatory')
if mibBuilder.loadTexts: connectAcknowledgeRx.setDescription('The number of CONNECT ACKNOWLEDGE messages received on this interface.')
setupTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: setupTx.setStatus('mandatory')
if mibBuilder.loadTexts: setupTx.setDescription('The number of SETUP messages transmitted on this interface.')
setupRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: setupRx.setStatus('mandatory')
if mibBuilder.loadTexts: setupRx.setDescription('The number of SETUP messages received on this interface.')
releaseTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: releaseTx.setStatus('mandatory')
if mibBuilder.loadTexts: releaseTx.setDescription('The number of RELEASE messages transmitted on this interface.')
releaseRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: releaseRx.setStatus('mandatory')
if mibBuilder.loadTexts: releaseRx.setDescription('The number of RELEASE messages received on this interface.')
releaseCompleteTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: releaseCompleteTx.setStatus('mandatory')
if mibBuilder.loadTexts: releaseCompleteTx.setDescription('The number of RELEASE COMPLETE messages transmitted on this interface.')
releaseCompleteRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: releaseCompleteRx.setStatus('mandatory')
if mibBuilder.loadTexts: releaseCompleteRx.setDescription('The number of RELEASE COMPLETE messages received on this interface.')
restartTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: restartTx.setStatus('mandatory')
if mibBuilder.loadTexts: restartTx.setDescription('The number of RESTART messages transmitted on this interface.')
restartRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: restartRx.setStatus('mandatory')
if mibBuilder.loadTexts: restartRx.setDescription('The number of RESTART messages received on this interface.')
restartAcknowledgeTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: restartAcknowledgeTx.setStatus('mandatory')
if mibBuilder.loadTexts: restartAcknowledgeTx.setDescription('The number of RESTART ACKNOWLEDGE messages transmitted on this interface.')
restartAcknowledgeRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: restartAcknowledgeRx.setStatus('mandatory')
if mibBuilder.loadTexts: restartAcknowledgeRx.setDescription('The number of RESTART ACKNOWLEDGE messages received on this interface.')
statusTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: statusTx.setStatus('mandatory')
if mibBuilder.loadTexts: statusTx.setDescription('The number of STATUS messages transmitted on this interface.')
statusRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: statusRx.setStatus('mandatory')
if mibBuilder.loadTexts: statusRx.setDescription('The number of STATUS messages received on this interface.')
statusEnquiryTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: statusEnquiryTx.setStatus('mandatory')
if mibBuilder.loadTexts: statusEnquiryTx.setDescription('The number of STATUS ENQUIRY messages transmitted on this interface.')
statusEnquiryRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: statusEnquiryRx.setStatus('mandatory')
if mibBuilder.loadTexts: statusEnquiryRx.setDescription('The number of STATUS ENQUIRY messages received on this interface.')
addPartyTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: addPartyTx.setStatus('mandatory')
if mibBuilder.loadTexts: addPartyTx.setDescription('The number of ADD PARTY messages transmitted on this interface.')
addPartyRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: addPartyRx.setStatus('mandatory')
if mibBuilder.loadTexts: addPartyRx.setDescription('The number of ADD PARTY messages received on this interface.')
addPartyAcknowledgeTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: addPartyAcknowledgeTx.setStatus('mandatory')
if mibBuilder.loadTexts: addPartyAcknowledgeTx.setDescription('The number of ADD PARTY ACKNOWLEDGE messages transmitted on this interface.')
addPartyAcknowledgeRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: addPartyAcknowledgeRx.setStatus('mandatory')
if mibBuilder.loadTexts: addPartyAcknowledgeRx.setDescription('The number of ADD PARTY ACKNOWLEDGE messages received on this interface.')
addPartyRejectTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: addPartyRejectTx.setStatus('mandatory')
if mibBuilder.loadTexts: addPartyRejectTx.setDescription('The number of ADD PARTY REJECT messages transmitted on this interface.')
addPartyRejectRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: addPartyRejectRx.setStatus('mandatory')
if mibBuilder.loadTexts: addPartyRejectRx.setDescription('The number of ADD PARTY REJECT messages received on this interface.')
dropPartyTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 27), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dropPartyTx.setStatus('mandatory')
if mibBuilder.loadTexts: dropPartyTx.setDescription('The number of DROP PARTY messages transmitted on this interface.')
dropPartyRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 28), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dropPartyRx.setStatus('mandatory')
if mibBuilder.loadTexts: dropPartyRx.setDescription('The number of DROP PARTY messages received on this interface.')
dropPartyAcknowledgeTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 29), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dropPartyAcknowledgeTx.setStatus('mandatory')
if mibBuilder.loadTexts: dropPartyAcknowledgeTx.setDescription('The number of DROP PARTY ACKNOWLEDGE messages transmitted on this interface.')
dropPartyAcknowledgeRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 1, 1, 30), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dropPartyAcknowledgeRx.setStatus('mandatory')
if mibBuilder.loadTexts: dropPartyAcknowledgeRx.setDescription('The number of DROP PARTY ACKNOWLEDGE messages received on this interface.')
decQ2931StatusTable = MibTable((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2), )
if mibBuilder.loadTexts: decQ2931StatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: decQ2931StatusTable.setDescription('Contains additional Q2931 signalling statistics.')
decQ2931StatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DEC-ATM-SIGNALLING-MIB", "decAtmSignallingIndex"))
if mibBuilder.loadTexts: decQ2931StatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: decQ2931StatusEntry.setDescription("Each entry contains signalling statistics for one UNI / NNI. Note that the table is indexed by ATM ports (ifType = 'atm') as opposed to AAL5 entities (ifType = 'aal5').")
totalConns = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: totalConns.setStatus('mandatory')
if mibBuilder.loadTexts: totalConns.setDescription('The total number of connections established so far.')
activeConns = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: activeConns.setStatus('mandatory')
if mibBuilder.loadTexts: activeConns.setDescription('The number of currently-active connections.')
lastTxCause = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: lastTxCause.setStatus('mandatory')
if mibBuilder.loadTexts: lastTxCause.setDescription('The most recently transmitted cause code.')
lastTxDiagnostic = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: lastTxDiagnostic.setStatus('mandatory')
if mibBuilder.loadTexts: lastTxDiagnostic.setDescription('The most recently transmitted diagnostic code.')
lastRxCause = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: lastRxCause.setStatus('mandatory')
if mibBuilder.loadTexts: lastRxCause.setDescription('The most recently received cause code.')
lastRxDiagnostic = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 2, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: lastRxDiagnostic.setStatus('mandatory')
if mibBuilder.loadTexts: lastRxDiagnostic.setDescription('The most recently received diagnostic code.')
decQ2931TimerTable = MibTable((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3), )
if mibBuilder.loadTexts: decQ2931TimerTable.setStatus('mandatory')
if mibBuilder.loadTexts: decQ2931TimerTable.setDescription('Allows network managers to examine and configure the timers used for Q.2931 call processing.')
decQ2931TimerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DEC-ATM-SIGNALLING-MIB", "decAtmSignallingIndex"))
if mibBuilder.loadTexts: decQ2931TimerEntry.setStatus('mandatory')
if mibBuilder.loadTexts: decQ2931TimerEntry.setDescription("Each entry contains timers for one UNI / NNI. Note that the table is indexed by ATM ports (ifType = 'atm') as opposed to AAL5 entities (ifType = 'aal5'). Sorry about the cryptic timer names, but that's what the ATM Forum calls these timers in the UNI V3.0 Specification.")
t303 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 1), Integer32().clone(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t303.setStatus('mandatory')
if mibBuilder.loadTexts: t303.setDescription('SETUP message timeout, in seconds.')
t308 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 2), Integer32().clone(30)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t308.setStatus('mandatory')
if mibBuilder.loadTexts: t308.setDescription('RELEASE message timeout, in seconds.')
t309 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 3), Integer32().clone(90)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t309.setStatus('mandatory')
if mibBuilder.loadTexts: t309.setDescription('SAAL disconnection timeout, in seconds.')
t310 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 4), Integer32().clone(10)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t310.setStatus('mandatory')
if mibBuilder.loadTexts: t310.setDescription('CALL PROCEEDING timeout, in seconds.')
t313 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 5), Integer32().clone(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t313.setStatus('mandatory')
if mibBuilder.loadTexts: t313.setDescription('CONNECT timeout, in seconds. This timer is only used on the User side of a UNI.')
t316 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 6), Integer32().clone(120)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t316.setStatus('mandatory')
if mibBuilder.loadTexts: t316.setDescription('RESTART timeout, in seconds.')
t317 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: t317.setStatus('mandatory')
if mibBuilder.loadTexts: t317.setDescription("RESTART reply timeout, in seconds. This should be less than the value for timer 't316'.")
t322 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 8), Integer32().clone(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t322.setStatus('mandatory')
if mibBuilder.loadTexts: t322.setDescription('STATUS ENQUIRY timeout, in seconds.')
t398 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 9), Integer32().clone(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t398.setStatus('mandatory')
if mibBuilder.loadTexts: t398.setDescription('DROP PARTY timeout, in seconds.')
t399 = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 2, 3, 1, 10), Integer32().clone(14)).setMaxAccess("readonly")
if mibBuilder.loadTexts: t399.setStatus('mandatory')
if mibBuilder.loadTexts: t399.setDescription('ADD PARTY timeout, in seconds.')
decQSaalGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3))
decQSaalMsgTable = MibTable((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1), )
if mibBuilder.loadTexts: decQSaalMsgTable.setStatus('mandatory')
if mibBuilder.loadTexts: decQSaalMsgTable.setDescription('')
decQSaalMsgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DEC-ATM-SIGNALLING-MIB", "decAtmSignallingIndex"))
if mibBuilder.loadTexts: decQSaalMsgEntry.setStatus('mandatory')
if mibBuilder.loadTexts: decQSaalMsgEntry.setDescription("Each entry contains signalling statistics for one UNI / NNI. Note that the table is indexed by ATM ports (ifType = 'atm') as opposed to AAL5 entities (ifType = 'aal5').")
txDiscardedSdus = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: txDiscardedSdus.setStatus('mandatory')
if mibBuilder.loadTexts: txDiscardedSdus.setDescription('The number of outgoing SDUs which were discarded.')
rxErrorPdus = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rxErrorPdus.setStatus('mandatory')
if mibBuilder.loadTexts: rxErrorPdus.setDescription('The number of incoming PDUs which could not be received due to errors.')
txErrorPdus = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: txErrorPdus.setStatus('mandatory')
if mibBuilder.loadTexts: txErrorPdus.setDescription('The number of transmission errors for outgoing PDUs.')
rxDiscardedPdus = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rxDiscardedPdus.setStatus('mandatory')
if mibBuilder.loadTexts: rxDiscardedPdus.setDescription('The number of incoming PDUs which were discarded.')
txDiscardedPdus = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: txDiscardedPdus.setStatus('mandatory')
if mibBuilder.loadTexts: txDiscardedPdus.setDescription('The number of outgoing PDUs which were discarded.')
bgnTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bgnTx.setStatus('mandatory')
if mibBuilder.loadTexts: bgnTx.setDescription('The number of BGN (Request Initialization) messages transmitted over the interface.')
bgnRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bgnRx.setStatus('mandatory')
if mibBuilder.loadTexts: bgnRx.setDescription('The number of BGN (Request Initialization) messages received over the interface.')
bgakTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bgakTx.setStatus('mandatory')
if mibBuilder.loadTexts: bgakTx.setDescription('The number of BGAK (Request Acknowledgement) messages transmitted over the interface.')
bgakRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bgakRx.setStatus('mandatory')
if mibBuilder.loadTexts: bgakRx.setDescription('The number of BGAK (Request Acknowledgement) messages received over the interface.')
endTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: endTx.setStatus('mandatory')
if mibBuilder.loadTexts: endTx.setDescription('The number of END (Disconnect Command) messages transmitted over the interface.')
endRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: endRx.setStatus('mandatory')
if mibBuilder.loadTexts: endRx.setDescription('The number of END (Disconnect Command) messages received over the interface.')
endakTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: endakTx.setStatus('mandatory')
if mibBuilder.loadTexts: endakTx.setDescription('The number of ENDAK (Disconnect Acknowledgement) messages transmitted over the interface.')
endakRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: endakRx.setStatus('mandatory')
if mibBuilder.loadTexts: endakRx.setDescription('The number of ENDAK (Disconnect Acknowledgement) messages received over the interface.')
rsTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsTx.setStatus('mandatory')
if mibBuilder.loadTexts: rsTx.setDescription('The number of RS (Resynchronization Command) messages transmitted over the interface.')
rsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsRx.setStatus('mandatory')
if mibBuilder.loadTexts: rsRx.setDescription('The number of RS (Resynchronization Command) messages received over the interface.')
rsakTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsakTx.setStatus('mandatory')
if mibBuilder.loadTexts: rsakTx.setDescription('The number of RSAK (Resynchronization Acknowledgement) messages transmitted over the interface.')
rsakRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsakRx.setStatus('mandatory')
if mibBuilder.loadTexts: rsakRx.setDescription('The number of RSAK (Resynchronization Acknowledgement) messages received over the interface.')
bgrejTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bgrejTx.setStatus('mandatory')
if mibBuilder.loadTexts: bgrejTx.setDescription('The number of BGREJ (Connection Reject) messages transmitted over the interface.')
bgrejRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bgrejRx.setStatus('mandatory')
if mibBuilder.loadTexts: bgrejRx.setDescription('The number of BGREJ (Connection Reject) messages received over the interface.')
sdTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sdTx.setStatus('mandatory')
if mibBuilder.loadTexts: sdTx.setDescription('The number of SD (Sequenced Connection-Mode Data) messages transmitted over the interface.')
sdRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sdRx.setStatus('mandatory')
if mibBuilder.loadTexts: sdRx.setDescription('The number of SD (Sequenced Connection-Mode Data) messages received over the interface.')
sdpTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sdpTx.setStatus('mandatory')
if mibBuilder.loadTexts: sdpTx.setDescription('The number of SDP (Sequenced Connection-Mode Data with request for Receive State Information) messages transmitted over the interface. This object only applies to UNI 3.0.')
sdpRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sdpRx.setStatus('mandatory')
if mibBuilder.loadTexts: sdpRx.setDescription('The number of SDP (Sequenced Connection-Mode Data with request for Receive State Information) messages received over the interface. This object only applies to UNI 3.0.')
erTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: erTx.setStatus('mandatory')
if mibBuilder.loadTexts: erTx.setDescription('The number of ER (Recovery Command) messages transmitted over the interface. This object is not applicable to UNI 3.0.')
erRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: erRx.setStatus('mandatory')
if mibBuilder.loadTexts: erRx.setDescription('The number of ER (Recovery Command) messages received over the interface. This object is not applicable to UNI 3.0.')
pollTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pollTx.setStatus('mandatory')
if mibBuilder.loadTexts: pollTx.setDescription('The number of POLL (Transmitter State Information with request for Receive State Information) messages transmitted over the interface.')
pollRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 27), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pollRx.setStatus('mandatory')
if mibBuilder.loadTexts: pollRx.setDescription('The number of POLL (Transmitter State Information with request for Receive State Information) messages received over the interface.')
statTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 28), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: statTx.setStatus('mandatory')
if mibBuilder.loadTexts: statTx.setDescription('The number of STAT (Solicited Receiver State Information) messages transmitted over the interface.')
statRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 29), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: statRx.setStatus('mandatory')
if mibBuilder.loadTexts: statRx.setDescription('The number of STAT (Solicited Receiver State Information) messages received over the interface.')
ustatTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 30), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ustatTx.setStatus('mandatory')
if mibBuilder.loadTexts: ustatTx.setDescription('The number of USTAT (Unsolicited Receiver State Info) messages transmitted over the interface.')
ustatRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 31), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ustatRx.setStatus('mandatory')
if mibBuilder.loadTexts: ustatRx.setDescription('The number of USTAT (Unsolicited Receiver State Info) messages received over the interface.')
udTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 32), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: udTx.setStatus('mandatory')
if mibBuilder.loadTexts: udTx.setDescription('The number of UD (Unnumbered User Data) messages transmitted over the interface.')
udRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 33), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: udRx.setStatus('mandatory')
if mibBuilder.loadTexts: udRx.setDescription('The number of UD (Unnumbered User Data) messages received over the interface.')
mdTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 34), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mdTx.setStatus('mandatory')
if mibBuilder.loadTexts: mdTx.setDescription('The number of MD (Unnumbered Management Data) messages transmitted over the interface.')
mdRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 35), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mdRx.setStatus('mandatory')
if mibBuilder.loadTexts: mdRx.setDescription('The number of MD (Unnumbered Management Data) messages received over the interface.')
erakTx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 36), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: erakTx.setStatus('mandatory')
if mibBuilder.loadTexts: erakTx.setDescription('The number of ERAK (Recovery Acknowledgement) messages transmitted over the interface. This object is not applicable to UNI 3.0.')
erakRx = MibTableColumn((1, 3, 6, 1, 4, 1, 36, 2, 18, 34, 1, 3, 1, 1, 37), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: erakRx.setStatus('mandatory')
if mibBuilder.loadTexts: erakRx.setDescription('The number of ERAK (Recovery Acknowledgement) messages received over the interface. This object is not applicable to UNI 3.0.')
mibBuilder.exportSymbols("DEC-ATM-SIGNALLING-MIB", t322=t322, ustatTx=ustatTx, rsakTx=rsakTx, addPartyAcknowledgeTx=addPartyAcknowledgeTx, restartRx=restartRx, pollRx=pollRx, txDiscardedPdus=txDiscardedPdus, activeConns=activeConns, sdpTx=sdpTx, restartAcknowledgeTx=restartAcknowledgeTx, sdRx=sdRx, decSignallingConfigTable=decSignallingConfigTable, decQ2931StatusEntry=decQ2931StatusEntry, t317=t317, connectTx=connectTx, t309=t309, dropPartyTx=dropPartyTx, t313=t313, erakTx=erakTx, t303=t303, releaseTx=releaseTx, pollTx=pollTx, lastTxDiagnostic=lastTxDiagnostic, restartTx=restartTx, sdpRx=sdpRx, dropPartyAcknowledgeTx=dropPartyAcknowledgeTx, decAtmSignallingMIB=decAtmSignallingMIB, mdRx=mdRx, releaseCompleteRx=releaseCompleteRx, t316=t316, endRx=endRx, endakRx=endakRx, sdTx=sdTx, decSignallingConfigEntry=decSignallingConfigEntry, lastRxCause=lastRxCause, statTx=statTx, lastTxCause=lastTxCause, connectRx=connectRx, decQ2931TimerEntry=decQ2931TimerEntry, statusEnquiryRx=statusEnquiryRx, decAtmSignallingMIBObjects=decAtmSignallingMIBObjects, bgakTx=bgakTx, decQSaalMsgEntry=decQSaalMsgEntry, connectAcknowledgeRx=connectAcknowledgeRx, rsRx=rsRx, t310=t310, t398=t398, addPartyRejectTx=addPartyRejectTx, rxErrorPdus=rxErrorPdus, statusEnquiryTx=statusEnquiryTx, rxDiscardedPdus=rxDiscardedPdus, statusTx=statusTx, decAtmSignallingIndex=decAtmSignallingIndex, addPartyRejectRx=addPartyRejectRx, ustatRx=ustatRx, t399=t399, decQ2931MsgEntry=decQ2931MsgEntry, txDiscardedSdus=txDiscardedSdus, erRx=erRx, txErrorPdus=txErrorPdus, releaseCompleteTx=releaseCompleteTx, decAtmSignallingMode=decAtmSignallingMode, decQ2931MsgTable=decQ2931MsgTable, connectAcknowledgeTx=connectAcknowledgeTx, statRx=statRx, bgrejTx=bgrejTx, decQ2931Group=decQ2931Group, setupTx=setupTx, callProceedingTx=callProceedingTx, dropPartyAcknowledgeRx=dropPartyAcknowledgeRx, t308=t308, addPartyTx=addPartyTx, decQ2931StatusTable=decQ2931StatusTable, endakTx=endakTx, statusRx=statusRx, rsakRx=rsakRx, udRx=udRx, addPartyAcknowledgeRx=addPartyAcknowledgeRx, decQ2931TimerTable=decQ2931TimerTable, bgnTx=bgnTx, decSignallingGroup=decSignallingGroup, releaseRx=releaseRx, bgrejRx=bgrejRx, dropPartyRx=dropPartyRx, bgakRx=bgakRx, erakRx=erakRx, mdTx=mdTx, restartAcknowledgeRx=restartAcknowledgeRx, lastRxDiagnostic=lastRxDiagnostic, totalConns=totalConns, erTx=erTx, decQSaalMsgTable=decQSaalMsgTable, addPartyRx=addPartyRx, udTx=udTx, decQSaalGroup=decQSaalGroup, endTx=endTx, bgnRx=bgnRx, setupRx=setupRx, callProceedingRx=callProceedingRx, rsTx=rsTx)
| 111.732899 | 2,530 | 0.75567 | 4,543 | 34,302 | 5.705701 | 0.088708 | 0.08796 | 0.153929 | 0.015432 | 0.694456 | 0.504572 | 0.440994 | 0.406852 | 0.343351 | 0.215038 | 0 | 0.078598 | 0.105358 | 34,302 | 306 | 2,531 | 112.098039 | 0.766065 | 0.009854 | 0 | 0 | 0 | 0.046823 | 0.286556 | 0.008276 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.026756 | 0 | 0.026756 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
348792a5f18ad4aca87d277c1c4849e726309d21 | 1,600 | py | Python | wintermute/policy_evaluation/deterministic.py | floringogianu/wintermute | 097aed1017192dff616bcd9c5083bb74c4aa71f6 | [
"MIT"
] | 4 | 2018-04-02T11:33:48.000Z | 2019-09-04T16:29:10.000Z | wintermute/policy_evaluation/deterministic.py | floringogianu/wintermute | 097aed1017192dff616bcd9c5083bb74c4aa71f6 | [
"MIT"
] | 3 | 2018-12-30T15:16:26.000Z | 2019-04-19T09:50:59.000Z | wintermute/policy_evaluation/deterministic.py | floringogianu/wintermute | 097aed1017192dff616bcd9c5083bb74c4aa71f6 | [
"MIT"
] | null | null | null | from typing import NamedTuple
import torch
from wintermute.utils import get_estimator_device, to_device
class DeterministicOutput(NamedTuple):
""" The output of the deterministic policy. """
action: int
q_value: float
full: object
class DeterministicPolicy(object):
def __init__(self, estimator):
self.estimator = estimator
self.device = get_estimator_device(estimator)
def act(self, state, is_train=False):
""" Takes the best action based on estimated state-action values.
Returns the best Q-value and its subsequent action.
"""
state = to_device(state, self.device)
with torch.set_grad_enabled(is_train):
qvals = self.estimator(state)
q_val, argmax_a = qvals.max(1)
return DeterministicOutput(
action=argmax_a.squeeze().item(),
q_value=q_val.squeeze().item(),
full=qvals,
)
def get_estimator_state(self):
return self.estimator.state_dict()
def set_estimator_state(self, estimator_state):
self.estimator.load_state_dict(estimator_state)
def cuda(self):
self.estimator.cuda()
self.device = get_estimator_device(self.estimator)
def cpu(self):
self.estimator.cpu()
self.device = get_estimator_device(self.estimator)
def __call__(self, state):
return self.act(state)
def __str__(self):
return f"{self.__class__.__name__}"
def __repr__(self):
obj_id = hex(id(self))
name = self.__str__()
return f"{name} @ {obj_id}" | 26.666667 | 73 | 0.646875 | 194 | 1,600 | 5.030928 | 0.35567 | 0.133197 | 0.07377 | 0.067623 | 0.118852 | 0.090164 | 0.090164 | 0.090164 | 0 | 0 | 0 | 0.00084 | 0.255625 | 1,600 | 60 | 74 | 26.666667 | 0.81864 | 0.096875 | 0 | 0.051282 | 0 | 0 | 0.029745 | 0.017705 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.076923 | 0.076923 | 0.564103 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3492ba1bca82149a559b09e86e50b6453d4fa7c5 | 1,938 | py | Python | human_eval/b0899b1a-07ef-48a9-b0e1-a2e6d44ceb6b.py | LaudateCorpus1/code-align-evals-data | 97446d992c3785d6605f1500b2c9b95d042e7b9c | [
"MIT"
] | 3 | 2021-07-29T23:40:15.000Z | 2021-08-12T10:18:09.000Z | human_eval/b0899b1a-07ef-48a9-b0e1-a2e6d44ceb6b.py | openai/code-align-evals-data | 97446d992c3785d6605f1500b2c9b95d042e7b9c | [
"MIT"
] | 1 | 2021-09-19T06:44:15.000Z | 2021-09-19T06:44:15.000Z | human_eval/b0899b1a-07ef-48a9-b0e1-a2e6d44ceb6b.py | LaudateCorpus1/code-align-evals-data | 97446d992c3785d6605f1500b2c9b95d042e7b9c | [
"MIT"
] | 1 | 2021-09-19T06:44:03.000Z | 2021-09-19T06:44:03.000Z | ENTRY_POINT = 'sum_squares'
#[PROMPT]
def sum_squares(lst):
"""You are given a list of numbers.
You need to return the sum of squared numbers in the given list,
round each element in the list to the upper int(Ceiling) first.
Examples:
For lst = [1,2,3] the output should be 14
For lst = [1,4,9] the output should be 98
For lst = [1,3,5,7] the output should be 84
For lst = [1.4,4.2,0] the output should be 29
For lst = [-2.4,1,1] the output should be 6
"""
#[SOLUTION]
import math
squared = 0
for i in lst:
squared += math.ceil(i)**2
return squared
#[CHECK]
def check(candidate):
# Check some simple cases
assert candidate([1,2,3])==14, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([1.0,2,3])==14, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([1,3,5,7])==84, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([1.4,4.2,0])==29, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([-2.4,1,1])==6, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([100,1,15,2])==10230, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([10000,10000])==200000000, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([-1.4,4.6,6.3])==75, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([-1.4,17.9,18.9,19.9])==1086, "This prints if this assert fails 1 (good for debugging!)"
# Check some edge cases that are easy to work out by hand.
assert candidate([0])==0, "This prints if this assert fails 2 (also good for debugging!)"
assert candidate([-1])==1, "This prints if this assert fails 2 (also good for debugging!)"
assert candidate([-1,1,0])==2, "This prints if this assert fails 2 (also good for debugging!)"
| 43.066667 | 109 | 0.662539 | 336 | 1,938 | 3.8125 | 0.238095 | 0.140515 | 0.112412 | 0.149883 | 0.56128 | 0.555816 | 0.555816 | 0.555816 | 0.555816 | 0.555816 | 0 | 0.086476 | 0.206398 | 1,938 | 44 | 110 | 44.045455 | 0.746424 | 0.255934 | 0 | 0 | 0 | 0 | 0.502882 | 0 | 0 | 0 | 0 | 0 | 0.6 | 1 | 0.1 | false | 0 | 0.05 | 0 | 0.2 | 0.6 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
349d122f7d023bc7aa64226003abd88796744789 | 2,426 | py | Python | layers/mobilenet.py | zsync/target-classification | 4053ed891d425c440e9632a6bc68d94525594226 | [
"MIT"
] | 2 | 2021-09-24T01:58:51.000Z | 2021-10-16T11:43:30.000Z | layers/mobilenet.py | zsync/target-classification | 4053ed891d425c440e9632a6bc68d94525594226 | [
"MIT"
] | null | null | null | layers/mobilenet.py | zsync/target-classification | 4053ed891d425c440e9632a6bc68d94525594226 | [
"MIT"
] | null | null | null | import tensorflow as tf
from layers.utils import CustomLayer, IdentityLayer
"""
ref: https://github.com/keras-team/keras-applications/blob/master/keras_applications/mobilenet.py
"""
def _ConvBlock(filters, alpha, kernel=(3, 3), strides=(1, 1)):
filters = int(filters * alpha)
return tf.keras.Sequential([
tf.keras.layers.ZeroPadding2D(padding=((0, 1), (0, 1))),
tf.keras.layers.Conv2D(filters, kernel, padding='valid', use_bias=False, strides=strides),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.ReLU(6.)
])
def _DepthwiseConvBlock(pointwise_conv_filters, alpha, depth_multiplier=1, strides=(1, 1)):
pointwise_conv_filters = int(pointwise_conv_filters * alpha)
return tf.keras.Sequential([
IdentityLayer() if strides == (1, 1) else tf.keras.layers.ZeroPadding2D(((0, 1), (0, 1))),
tf.keras.layers.DepthwiseConv2D((3, 3),
padding='same' if strides == (1, 1) else 'valid',
depth_multiplier=depth_multiplier,
strides=strides,
use_bias=False),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.ReLU(6.),
tf.keras.layers.Conv2D(pointwise_conv_filters, (1, 1), padding='same', use_bias=False, strides=(1, 1)),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.ReLU(6.)
])
def MobileNet(alpha=1.0, depth_multiplier=1):
return tf.keras.Sequential([
_ConvBlock(32, alpha, strides=(2, 2)),
_DepthwiseConvBlock(64, alpha, depth_multiplier),
_DepthwiseConvBlock(128, alpha, depth_multiplier, strides=(2, 2)),
_DepthwiseConvBlock(128, alpha, depth_multiplier),
_DepthwiseConvBlock(256, alpha, depth_multiplier, strides=(2, 2)),
_DepthwiseConvBlock(256, alpha, depth_multiplier),
_DepthwiseConvBlock(512, alpha, depth_multiplier, strides=(2, 2)),
_DepthwiseConvBlock(512, alpha, depth_multiplier),
_DepthwiseConvBlock(512, alpha, depth_multiplier),
_DepthwiseConvBlock(512, alpha, depth_multiplier),
_DepthwiseConvBlock(512, alpha, depth_multiplier),
_DepthwiseConvBlock(512, alpha, depth_multiplier),
_DepthwiseConvBlock(1024, alpha, depth_multiplier, strides=(2, 2)),
_DepthwiseConvBlock(1024, alpha, depth_multiplier)
])
| 47.568627 | 111 | 0.648805 | 264 | 2,426 | 5.791667 | 0.219697 | 0.166776 | 0.183126 | 0.198823 | 0.534336 | 0.451929 | 0.406148 | 0.285808 | 0.245912 | 0.213865 | 0 | 0.046709 | 0.223413 | 2,426 | 50 | 112 | 48.52 | 0.764862 | 0 | 0 | 0.380952 | 0 | 0 | 0.007755 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.047619 | 0.02381 | 0.190476 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
34a012541ce61429058a21ee700fb3d8ac9f11d0 | 1,686 | py | Python | oms_cms/backend/menu/forms.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | oms_cms/backend/menu/forms.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | oms_cms/backend/menu/forms.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.admin import site
from django.forms import ModelForm
from django.contrib.admin.widgets import ForeignKeyRawIdWidget
from django.db.models.fields.related import ManyToOneRel
from .widgets import ContentTypeSelect
from .models import MenuItem
from oms_cms.backend.pages.models import Pages
class AdminRatingForm(ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# try:
model = self.instance.content_type.model_class()
# model_key = model._meta.get_field('id').rel
# except:
# model = Pages
# model_key = 'id'
self.fields['object_id'].widget = ForeignKeyRawIdWidget(model._meta.get_field('id').remote_field, site)
# self.fields['object_id'].widget = ForeignKeyRawIdWidget(model_key, site)
# self.fields['object_id'].widget = ForeignKeyRawIdWidget(ManyToOneRel(model, model_key), site),
# self.fields['content_type'].widget.widget = ContentTypeSelect('lookup_id_object_id',
# self.fields['content_type'].widget.widget.attrs,
# self.fields['content_type'].widget.widget.choices)
class Meta:
model = MenuItem
fields = ['title', 'menu', 'name', 'content_type', 'parent', 'object_id']
widgets = {
# "object_id": ForeignKeyRawIdWidget(imodel._meta.get_field('customer').remote_field, site),
# "content_type": ContentTypeSelect('lookup_id_object_id',
# fields['content_type'].attrs,
# fields['content_type'].choices)
} | 48.171429 | 115 | 0.627521 | 175 | 1,686 | 5.811429 | 0.302857 | 0.086529 | 0.083579 | 0.053097 | 0.359882 | 0.247788 | 0.150442 | 0 | 0 | 0 | 0 | 0 | 0.255042 | 1,686 | 35 | 116 | 48.171429 | 0.809713 | 0.431198 | 0 | 0 | 0 | 0 | 0.053968 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.411765 | 0 | 0.588235 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
34a1418afcce22f333cde876336c7427ff7aca02 | 327 | py | Python | shortest-repetition.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | shortest-repetition.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | shortest-repetition.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | import re
import sys
def find_shortest_repeating_substring(text):
r = re.compile(r"(.+?)(?=\1)")
return len(r.findall(text))
def main():
with open(sys.argv[1]) as input_file:
for line in input_file:
print(find_shortest_repeating_substring(line.strip()))
if __name__ == '__main__':
main()
| 21.8 | 66 | 0.651376 | 46 | 327 | 4.282609 | 0.630435 | 0.121827 | 0.213198 | 0.304569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007663 | 0.201835 | 327 | 14 | 67 | 23.357143 | 0.747126 | 0 | 0 | 0 | 0 | 0 | 0.058104 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.181818 | 0 | 0.454545 | 0.090909 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
34cab36d8d55687bb198296274cbbe71eb83b453 | 1,344 | py | Python | test_roc_analysis.py | brunno-oliveira/laboratorio-ia | b04b0e0a06729f6900a93bdc15c98f1e6bc59551 | [
"MIT"
] | null | null | null | test_roc_analysis.py | brunno-oliveira/laboratorio-ia | b04b0e0a06729f6900a93bdc15c98f1e6bc59551 | [
"MIT"
] | null | null | null | test_roc_analysis.py | brunno-oliveira/laboratorio-ia | b04b0e0a06729f6900a93bdc15c98f1e6bc59551 | [
"MIT"
] | 1 | 2020-10-21T15:44:11.000Z | 2020-10-21T15:44:11.000Z | import pytest
from main import calculate_distance, get_shorter_distance, get_x_y
@pytest.mark.parametrize(
"data,expected",
[
((440, 18, 14, 227), (0.058091286, 0.96069869),),
((446, 12, 22, 219), (0.091286307, 0.973799127)),
((444, 14, 8, 223), (0.034632035, 0.969432314)),
((192, 7, 15, 501), (0.02907, 0.964824)),
(
(192, 2, 3, 2, 5, 154, 3, 55, 6, 3, 206, 3, 4, 62, 5, 141),
(0.06494, 0.821138),
),
((4, 6, 0, 0), (1, 0.39999999996)),
],
)
def test_get_x_y(data, expected):
x_result, y_result = get_x_y(data)
assert x_result == pytest.approx(expected[0], 1e-5)
assert y_result == pytest.approx(expected[1], 1e-5)
@pytest.mark.parametrize(
"data,expected",
[
((0.058091286, 0.96069869), 0.070136941),
((0.091286307, 0.973799127), 0.094971973),
((0.034632035, 0.969432314), 0.046192653),
],
)
def test_get_distance(data, expected):
assert calculate_distance(*data) == pytest.approx(expected, 1e-7)
def test_get_shorter_distance():
data = (
("RNA", (440, 18, 14, 227)),
("KNN", (446, 12, 22, 219)),
("SVM", (444, 14, 8, 223)),
)
result = get_shorter_distance(data)
assert result[0] == "SVM"
assert result[1] == pytest.approx(0.046192653, rel=1e-8)
| 28.595745 | 71 | 0.566964 | 188 | 1,344 | 3.93617 | 0.345745 | 0.064865 | 0.072973 | 0.067568 | 0.089189 | 0 | 0 | 0 | 0 | 0 | 0 | 0.301775 | 0.245536 | 1,344 | 46 | 72 | 29.217391 | 0.428008 | 0 | 0 | 0.153846 | 0 | 0 | 0.028274 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 1 | 0.076923 | false | 0 | 0.051282 | 0 | 0.128205 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
34d13c790ac1e29e0f256bfb5b74264aa7bd2988 | 1,646 | py | Python | code/TitleCase.py | zhoujinl/CodeWarsPython | 4918b95e0e1522095ad0fd8fbd72cbc5e39d9da0 | [
"Apache-2.0"
] | null | null | null | code/TitleCase.py | zhoujinl/CodeWarsPython | 4918b95e0e1522095ad0fd8fbd72cbc5e39d9da0 | [
"Apache-2.0"
] | null | null | null | code/TitleCase.py | zhoujinl/CodeWarsPython | 4918b95e0e1522095ad0fd8fbd72cbc5e39d9da0 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
'''
A string is considered to be in title case if each word in the string is either (a) capitalised
(that is, only the first letter of the word is in upper case) or (b) considered to be an exception and put entirely into lower
case unless it is the first word, which is always capitalised.
将参数A 里面的单词全部改成首字母大写其余小写,而参数B里面的则是要排除转换的单词(第一个单词一定要转换的)。
title_case('a clash of KINGS', 'a an the of') # should return: 'A Clash of Kings'
title_case('THE WIND IN THE WILLOWS', 'The In') # should return: 'The Wind in the Willows'
title_case('the quick brown fox') # should return: 'The Quick Brown Fox'
'''
def title_case(title, minor_words=""):
if title == "" : return ""
lt = str(title).title().split()
nt = list()
nt.append(lt[0])
for s in lt[1:] : nt.append(str(s).lower() if str(minor_words).lower().split().__contains__(str(s).lower()) else str(s))
return " ".join(nt)
print(title_case('a clash of KINGS', 'a an the of'))
print(title_case('First a of in','an often into'))
print(title_case(''))
def title_case2(title, minor_words=''):
title = title.capitalize().split()
minor_words = minor_words.lower().split()
return ' '.join([word if word in minor_words else word.capitalize() for word in title])
def title_case3(title, minor_words=''):
return ' '.join(w if w in minor_words.lower().split() and i else w.capitalize() for i, w in enumerate(title.lower().split()))
def title_case4(title, minor_words=''):
return ' '.join(c if c in minor_words.lower().split() else c.title() for c in title.capitalize().split())
print(title_case2(''))
| 41.15 | 128 | 0.670717 | 264 | 1,646 | 4.087121 | 0.287879 | 0.092678 | 0.055607 | 0.074143 | 0.177943 | 0.055607 | 0.055607 | 0.055607 | 0.055607 | 0.055607 | 0 | 0.005201 | 0.18226 | 1,646 | 39 | 129 | 42.205128 | 0.796434 | 0.371203 | 0 | 0 | 0 | 0 | 0.057692 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.210526 | false | 0 | 0 | 0.105263 | 0.421053 | 0.210526 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
34d6bda3353534a63f3622406f01c071d1f1f797 | 400 | py | Python | api/tests.py | david30907d/My-Django-React-Template | 5b3b3763ea0a9c548a021a9f02ae5deeecfe5308 | [
"MIT"
] | null | null | null | api/tests.py | david30907d/My-Django-React-Template | 5b3b3763ea0a9c548a021a9f02ae5deeecfe5308 | [
"MIT"
] | 5 | 2020-03-06T04:35:52.000Z | 2021-05-11T05:35:17.000Z | api/tests.py | david30907d/My-Django-React-Template | 5b3b3763ea0a9c548a021a9f02ae5deeecfe5308 | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.test import Client, TestCase
class APITestCase(TestCase):
def setUp(self: TestCase) -> None:
self.client = Client()
def test_api_response(self: TestCase) -> None:
response = self.client.get("/health")
self.assertAlmostEqual(response.status_code, 200)
self.assertEqual(response.json(), {"status": "success"})
| 30.769231 | 64 | 0.69 | 46 | 400 | 5.934783 | 0.543478 | 0.07326 | 0.117216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009231 | 0.1875 | 400 | 12 | 65 | 33.333333 | 0.830769 | 0 | 0 | 0 | 0 | 0 | 0.05 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 1 | 0.222222 | false | 0 | 0.222222 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
34de6c559486af5ad2d5afb74dbe6045dccb184c | 200 | py | Python | src/sqlfluff/dialects/dialect_postgres.py | Katzmann1983/sqlfluff | 0e3983e84bf660fba69430964e69423112664233 | [
"MIT"
] | 1 | 2020-10-25T00:13:53.000Z | 2020-10-25T00:13:53.000Z | src/sqlfluff/dialects/dialect_postgres.py | azhard/sqlfluff | f2d9a96448f6bb17a7a2ffaad4adc80be92e46f9 | [
"MIT"
] | null | null | null | src/sqlfluff/dialects/dialect_postgres.py | azhard/sqlfluff | f2d9a96448f6bb17a7a2ffaad4adc80be92e46f9 | [
"MIT"
] | null | null | null | """The PostgreSQL dialect."""
from .dialect_ansi import ansi_dialect
# At the moment this is just a placeholder. Unique syntax to be added later.
postgres_dialect = ansi_dialect.copy_as('postgres')
| 28.571429 | 76 | 0.78 | 30 | 200 | 5.033333 | 0.733333 | 0.145695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.135 | 200 | 6 | 77 | 33.333333 | 0.872832 | 0.495 | 0 | 0 | 0 | 0 | 0.084211 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
34fb0d34949ff717b326a97fc2a5c12e0361a463 | 20,410 | py | Python | pysnmp-with-texts/FILTER-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/FILTER-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/FILTER-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module FILTER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FILTER-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:13:49 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
dlink_common_mgmt, = mibBuilder.importSymbols("DLINK-ID-REC-MIB", "dlink-common-mgmt")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, Unsigned32, ModuleIdentity, Gauge32, IpAddress, Counter64, MibIdentifier, Integer32, Counter32, iso, ObjectIdentity, Bits, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "Unsigned32", "ModuleIdentity", "Gauge32", "IpAddress", "Counter64", "MibIdentifier", "Integer32", "Counter32", "iso", "ObjectIdentity", "Bits", "NotificationType")
DisplayString, RowStatus, TextualConvention, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention", "MacAddress")
swFilterMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 12, 37))
if mibBuilder.loadTexts: swFilterMIB.setLastUpdated('0808120000Z')
if mibBuilder.loadTexts: swFilterMIB.setOrganization('D-Link Corp.')
if mibBuilder.loadTexts: swFilterMIB.setContactInfo('http://support.dlink.com')
if mibBuilder.loadTexts: swFilterMIB.setDescription('This MIB module defining objects for the management of filter.')
class PortList(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 127)
swFilterDhcp = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 1))
swFilterNetbios = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 2))
swFilterExtNetbios = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 3))
swFilterCPU = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 4))
swFilterEgress = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 5))
swFilterNotify = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100))
swFilterDhcpPermitTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1), )
if mibBuilder.loadTexts: swFilterDhcpPermitTable.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPermitTable.setDescription('The table specifies DHCP permit information.')
swFilterDhcpPermitEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterDhcpServerIP"), (0, "FILTER-MIB", "swFilterDhcpClientMac"))
if mibBuilder.loadTexts: swFilterDhcpPermitEntry.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPermitEntry.setDescription('This entry includes all port DHCP information which is supported by the device, like server IP address, client MAC address...')
swFilterDhcpServerIP = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swFilterDhcpServerIP.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpServerIP.setDescription('This object indicates the DHCP server IP address of this entry.')
swFilterDhcpClientMac = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swFilterDhcpClientMac.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpClientMac.setDescription('This object indicates the DHCP client MAC address of this entry.')
swFilterDhcpPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 3), PortList()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: swFilterDhcpPorts.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPorts.setDescription('This object indicates the operating port list of this entry.')
swFilterDhcpStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: swFilterDhcpStatus.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpStatus.setDescription('This object indicates the status of this entry.')
swFilterDhcpPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2), )
if mibBuilder.loadTexts: swFilterDhcpPortTable.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPortTable.setDescription('The table specifies the DHCP filter function of a particular port.')
swFilterDhcpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterDhcpPortIndex"))
if mibBuilder.loadTexts: swFilterDhcpPortEntry.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPortEntry.setDescription('This entry includes all port DHCP states which are supported by the device.')
swFilterDhcpPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swFilterDhcpPortIndex.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPortIndex.setDescription("This object indicates the module's port number. The range is from 1 to the maximum port number supported by this module.")
swFilterDhcpPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterDhcpPortState.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpPortState.setDescription('This object indicates the DHCP filter status of this entry.')
swFilterDhcpServerIllegalSerLogSuppressDuration = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("duration_1min", 1), ("duration_5min", 2), ("duration_30min", 3))).clone('duration_5min')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterDhcpServerIllegalSerLogSuppressDuration.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpServerIllegalSerLogSuppressDuration.setDescription('This object indicates the illegal server log suppression duration. The same illegal DHCP server IP address detected is logged just once within the log ceasing unauthorized duration. The log ceasing unauthorized duration is 1 minute, 5 minutes, and 30 minutes. The default value is 5 minutes.')
swFilterDhcpServerTrapLogState = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterDhcpServerTrapLogState.setStatus('current')
if mibBuilder.loadTexts: swFilterDhcpServerTrapLogState.setDescription('This object indicates the state of the filter DHCP server log or trap on the switch.')
swFilterNetbiosTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1), )
if mibBuilder.loadTexts: swFilterNetbiosTable.setStatus('current')
if mibBuilder.loadTexts: swFilterNetbiosTable.setDescription('The table specifies the NetBIOS filter function of a port.')
swFilterNetbiosEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterNetbiosPortIndex"))
if mibBuilder.loadTexts: swFilterNetbiosEntry.setStatus('current')
if mibBuilder.loadTexts: swFilterNetbiosEntry.setDescription('This entry includes all port NetBIOS states which are supported by the device.')
swFilterNetbiosPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swFilterNetbiosPortIndex.setStatus('current')
if mibBuilder.loadTexts: swFilterNetbiosPortIndex.setDescription("This object indicates the module's port number. The range is from 1 to the maximum port number supported by this module.")
swFilterNetbiosState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterNetbiosState.setStatus('current')
if mibBuilder.loadTexts: swFilterNetbiosState.setDescription('This object indicates the status of the NetBIOS filter.')
swFilterExtNetbiosTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1), )
if mibBuilder.loadTexts: swFilterExtNetbiosTable.setStatus('current')
if mibBuilder.loadTexts: swFilterExtNetbiosTable.setDescription('The table specifies the extensive NetBIOS filter function of a port.')
swFilterExtNetbiosEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterExtNetbiosPortIndex"))
if mibBuilder.loadTexts: swFilterExtNetbiosEntry.setStatus('current')
if mibBuilder.loadTexts: swFilterExtNetbiosEntry.setDescription('This entry includes all port extensive NetBIOS states which are supported by the device.')
swFilterExtNetbiosPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swFilterExtNetbiosPortIndex.setStatus('current')
if mibBuilder.loadTexts: swFilterExtNetbiosPortIndex.setDescription("This object indicates the module's port number. The range is from 1 to the maximum port number supported by this module.")
swFilterExtNetbiosState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterExtNetbiosState.setStatus('current')
if mibBuilder.loadTexts: swFilterExtNetbiosState.setDescription('This object indicates the extensive NetBIOS filter status.')
swFilterCPUL3CtrlPktTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1), )
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktTable.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktTable.setDescription('The table specifies the CPU filter of the layer 3 control packet function of a port.')
swFilterCPUL3CtrlPktEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterCPUL3CtrlPktPortIndex"))
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktEntry.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktEntry.setDescription('This entry includes all port CPU filters of layer 3 control packet states which are supported by the device.')
swFilterCPUL3CtrlPktPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPortIndex.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPortIndex.setDescription("This object indicates the module's port number. The range is from 1 to the maximum port number supported by this module.")
swFilterCPUL3CtrlPktRIPState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktRIPState.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktRIPState.setDescription('This object indicates the RIP status of the layer 3 control packet.')
swFilterCPUL3CtrlPktOSPFState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktOSPFState.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktOSPFState.setDescription('This object indicates the OSPF status of the layer 3 control packet.')
swFilterCPUL3CtrlPktVRRPState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktVRRPState.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktVRRPState.setDescription('This object indicates the VRRP status of the layer 3 control packet.')
swFilterCPUL3CtrlPktPIMState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPIMState.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPIMState.setDescription('This object indicates the PIM status of the layer 3 control packet.')
swFilterCPUL3CtrlPktDVMRPState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktDVMRPState.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktDVMRPState.setDescription('This object indicates the DVMRP status of the layer 3 control packet.')
swFilterCPUL3CtrlPktIGMPQueryState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktIGMPQueryState.setStatus('current')
if mibBuilder.loadTexts: swFilterCPUL3CtrlPktIGMPQueryState.setDescription('This object indicates the IGMP query status of the layer 3 control packet.')
swPktEgressFilterCtrlTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1), )
if mibBuilder.loadTexts: swPktEgressFilterCtrlTable.setStatus('current')
if mibBuilder.loadTexts: swPktEgressFilterCtrlTable.setDescription('A table that contains information about egress filter control.')
swPktEgressFilterCtrlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swPktEgressFilterPortIndex"))
if mibBuilder.loadTexts: swPktEgressFilterCtrlEntry.setStatus('current')
if mibBuilder.loadTexts: swPktEgressFilterCtrlEntry.setDescription('A list of information for each port of the device. unicast: Specifies the egress filter state of destination lookup fail packets. multicast: Specifies the egress filter state of unregistered multicast packets.')
swPktEgressFilterPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPktEgressFilterPortIndex.setStatus('current')
if mibBuilder.loadTexts: swPktEgressFilterPortIndex.setDescription("This object indicates the device's port number.(1..Max port number in the device).Used to specify a range of ports to be configured.")
swPktEgressFilterUnknownUnicastStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swPktEgressFilterUnknownUnicastStatus.setStatus('current')
if mibBuilder.loadTexts: swPktEgressFilterUnknownUnicastStatus.setDescription('This object indicates the egress filter state of destination lookup fail packets.')
swPktEgressFilterUnknownMulticastStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swPktEgressFilterUnknownMulticastStatus.setStatus('current')
if mibBuilder.loadTexts: swPktEgressFilterUnknownMulticastStatus.setDescription('This object indicates the egress filter state of unregistered multicast packets.')
swFilterNotifyPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 0))
swFilterDetectedTrap = NotificationType((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 0, 1)).setObjects(("FILTER-MIB", "swFilterDetectedIP"), ("FILTER-MIB", "swFilterDetectedport"))
if mibBuilder.loadTexts: swFilterDetectedTrap.setStatus('current')
if mibBuilder.loadTexts: swFilterDetectedTrap.setDescription('Send trap when illegal DHCP server is detected. The same illegal DHCP server IP address detected is just sent once to the trap receivers within the log ceasing unauthorized duration.')
swFilterNotificationBindings = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2))
swFilterDetectedIP = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2, 1), IpAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: swFilterDetectedIP.setStatus('current')
if mibBuilder.loadTexts: swFilterDetectedIP.setDescription('This object indicates the detected illegal DHCP server IP address.')
swFilterDetectedport = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2, 2), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: swFilterDetectedport.setStatus('current')
if mibBuilder.loadTexts: swFilterDetectedport.setDescription('This object indicates the port which detected the illegal DHCP server.')
mibBuilder.exportSymbols("FILTER-MIB", swFilterDhcpClientMac=swFilterDhcpClientMac, swFilterDetectedport=swFilterDetectedport, swFilterExtNetbiosPortIndex=swFilterExtNetbiosPortIndex, swFilterNetbios=swFilterNetbios, PortList=PortList, swFilterExtNetbios=swFilterExtNetbios, swFilterDhcpPorts=swFilterDhcpPorts, swPktEgressFilterPortIndex=swPktEgressFilterPortIndex, swFilterNotifyPrefix=swFilterNotifyPrefix, swPktEgressFilterCtrlEntry=swPktEgressFilterCtrlEntry, swFilterDhcpPortIndex=swFilterDhcpPortIndex, swFilterExtNetbiosTable=swFilterExtNetbiosTable, swFilterDhcpServerTrapLogState=swFilterDhcpServerTrapLogState, swFilterDhcpServerIP=swFilterDhcpServerIP, swFilterNetbiosPortIndex=swFilterNetbiosPortIndex, swFilterDhcp=swFilterDhcp, swPktEgressFilterUnknownMulticastStatus=swPktEgressFilterUnknownMulticastStatus, swFilterCPUL3CtrlPktEntry=swFilterCPUL3CtrlPktEntry, swFilterNetbiosState=swFilterNetbiosState, swFilterExtNetbiosState=swFilterExtNetbiosState, swFilterCPUL3CtrlPktOSPFState=swFilterCPUL3CtrlPktOSPFState, swFilterCPUL3CtrlPktDVMRPState=swFilterCPUL3CtrlPktDVMRPState, swFilterCPUL3CtrlPktRIPState=swFilterCPUL3CtrlPktRIPState, swFilterMIB=swFilterMIB, swFilterEgress=swFilterEgress, swFilterDhcpPortTable=swFilterDhcpPortTable, swFilterNetbiosEntry=swFilterNetbiosEntry, swFilterCPUL3CtrlPktPortIndex=swFilterCPUL3CtrlPktPortIndex, swFilterNotify=swFilterNotify, swFilterDhcpServerIllegalSerLogSuppressDuration=swFilterDhcpServerIllegalSerLogSuppressDuration, swPktEgressFilterCtrlTable=swPktEgressFilterCtrlTable, swFilterDhcpPermitTable=swFilterDhcpPermitTable, swFilterDetectedIP=swFilterDetectedIP, swFilterCPU=swFilterCPU, swFilterDetectedTrap=swFilterDetectedTrap, swFilterCPUL3CtrlPktIGMPQueryState=swFilterCPUL3CtrlPktIGMPQueryState, swFilterExtNetbiosEntry=swFilterExtNetbiosEntry, swFilterNetbiosTable=swFilterNetbiosTable, swFilterDhcpStatus=swFilterDhcpStatus, swFilterDhcpPortState=swFilterDhcpPortState, swFilterDhcpPortEntry=swFilterDhcpPortEntry, PYSNMP_MODULE_ID=swFilterMIB, swFilterCPUL3CtrlPktTable=swFilterCPUL3CtrlPktTable, swFilterNotificationBindings=swFilterNotificationBindings, swFilterCPUL3CtrlPktPIMState=swFilterCPUL3CtrlPktPIMState, swFilterCPUL3CtrlPktVRRPState=swFilterCPUL3CtrlPktVRRPState, swPktEgressFilterUnknownUnicastStatus=swPktEgressFilterUnknownUnicastStatus, swFilterDhcpPermitEntry=swFilterDhcpPermitEntry)
| 141.736111 | 2,375 | 0.799412 | 2,242 | 20,410 | 7.273863 | 0.124888 | 0.057395 | 0.100442 | 0.011283 | 0.512141 | 0.354734 | 0.31972 | 0.291023 | 0.281212 | 0.259505 | 0 | 0.054691 | 0.083537 | 20,410 | 143 | 2,376 | 142.727273 | 0.817161 | 0.015385 | 0 | 0 | 0 | 0.066667 | 0.249564 | 0.009558 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.059259 | 0 | 0.074074 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5514c9f6799f51225029b273e36bb426433aef23 | 339 | py | Python | pip_services3_facade/container/FacadeProcess.py | pip-services3-python/pip-services3-facade-python | dfe7db79f525a1d823637c1e1d030a6333e19aa8 | [
"MIT"
] | null | null | null | pip_services3_facade/container/FacadeProcess.py | pip-services3-python/pip-services3-facade-python | dfe7db79f525a1d823637c1e1d030a6333e19aa8 | [
"MIT"
] | null | null | null | pip_services3_facade/container/FacadeProcess.py | pip-services3-python/pip-services3-facade-python | dfe7db79f525a1d823637c1e1d030a6333e19aa8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pip_services3_container.ProcessContainer import ProcessContainer
from ..build.FacadeFactory import FacadeFactory
class FacadeProcess(ProcessContainer):
def __init__(self):
super(FacadeProcess, self).__init__('facade', 'Client facade microservice')
self._factories.add(FacadeFactory())
| 26.076923 | 83 | 0.752212 | 33 | 339 | 7.393939 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006873 | 0.141593 | 339 | 12 | 84 | 28.25 | 0.831615 | 0.061947 | 0 | 0 | 0 | 0 | 0.101266 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
55185ebc9947a1f10e20f640d30c157fca551337 | 817 | py | Python | utils/music_queue.py | WSU-4110/Discord-Study-Bot | c9a1d8b59686372ed653f57ac6a89c09b733ba4e | [
"MIT"
] | 3 | 2021-05-04T17:40:04.000Z | 2021-05-24T00:53:34.000Z | utils/music_queue.py | WSU-4110/Discord-Study-Bot | c9a1d8b59686372ed653f57ac6a89c09b733ba4e | [
"MIT"
] | 27 | 2021-02-04T16:51:34.000Z | 2021-04-22T22:42:32.000Z | utils/music_queue.py | WSU-4110/Discord-Study-Bot | c9a1d8b59686372ed653f57ac6a89c09b733ba4e | [
"MIT"
] | 1 | 2021-07-31T16:53:02.000Z | 2021-07-31T16:53:02.000Z | from collections import defaultdict as dd
from typing import Tuple
class MusicQueue:
__instance = None
def __init__(self):
self.items = dd(list) # dict (key = server id, val is list of tuples)
MusicQueue.__instance = self
@staticmethod
def get_instance():
"""Static function to get an instance of the MusicStack"""
if MusicQueue.__instance is None:
MusicQueue() # call init here
return MusicQueue.__instance # return the static instance
def add_url(self, url: str, server_id: int, ctx):
self.items[server_id].append((url, ctx))
def get_top(self, server_id: int) -> Tuple:
if self.items[server_id]:
return self.items[server_id].pop(0)
def clear_for(self, server_id):
del self.items[server_id] | 30.259259 | 78 | 0.651163 | 110 | 817 | 4.627273 | 0.445455 | 0.125737 | 0.117878 | 0.133595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00165 | 0.258262 | 817 | 27 | 79 | 30.259259 | 0.838284 | 0.172583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0.105263 | 0 | 0.578947 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
9b275e807501e5fb4d91d6df3cf5c588bad92774 | 607 | py | Python | src/q0012_Replace_sensitive_text.py | Yodeser/python-study | 647e2d5b17439e13c14605b9cb6ac8aff5438f98 | [
"MIT"
] | null | null | null | src/q0012_Replace_sensitive_text.py | Yodeser/python-study | 647e2d5b17439e13c14605b9cb6ac8aff5438f98 | [
"MIT"
] | 5 | 2021-03-18T20:31:58.000Z | 2022-03-11T23:21:07.000Z | src/q0012_Replace_sensitive_text.py | Yodeser/python-study | 647e2d5b17439e13c14605b9cb6ac8aff5438f98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# //todo
# Created 0:06, 2018/5/29 by Yodes Yang
from q0011_Filter_words import WordsFilter
class FilterText(WordsFilter):
def __init__(self, file_route):
WordsFilter.__init__(self, file_route)
pass
def replace(self, text):
text = str(text)
for word in self.words:
if text.__contains__(word):
text = text.replace(word, "*" * word.__len__())
return text
if __name__ == '__main__':
ft = FilterText("../data/0011/filtered_words.txt")
print(ft.words)
print(ft.replace("程序员的天堂,真心牛逼"))
pass
| 23.346154 | 63 | 0.614498 | 76 | 607 | 4.526316 | 0.618421 | 0.046512 | 0.069767 | 0.098837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041943 | 0.253707 | 607 | 25 | 64 | 24.28 | 0.717439 | 0.108731 | 0 | 0.125 | 0 | 0 | 0.094972 | 0.057728 | 0 | 0 | 0 | 0.04 | 0 | 1 | 0.125 | false | 0.125 | 0.0625 | 0 | 0.3125 | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
9b294e750185b75911b946e455dc82c7767fe192 | 376 | py | Python | cloudmesh-exercises/e-cloudmesh-5.py | cybertraining-dsc/sp20-516-245 | 6d6735d14085fc447474b76ffe438566ee5b3f10 | [
"Apache-2.0"
] | null | null | null | cloudmesh-exercises/e-cloudmesh-5.py | cybertraining-dsc/sp20-516-245 | 6d6735d14085fc447474b76ffe438566ee5b3f10 | [
"Apache-2.0"
] | 1 | 2020-01-22T20:09:36.000Z | 2020-01-22T20:09:36.000Z | cloudmesh-exercises/e-cloudmesh-5.py | cybertraining-dsc/sp20-516-245 | 6d6735d14085fc447474b76ffe438566ee5b3f10 | [
"Apache-2.0"
] | null | null | null | # fa19-516-000 E.Cloudmesh.Common.5
from cloudmesh.common.StopWatch import StopWatch
import time
StopWatch.start("outer")
time.sleep(1)
StopWatch.start("inner")
time.sleep(1)
StopWatch.stop("inner")
StopWatch.stop("outer")
print("Outer: {}".format(StopWatch.get("outer")))
print("Inner: {}".format(StopWatch.get("inner")))
print("Typo: {}".format(StopWatch.get("Inner")))
| 23.5 | 49 | 0.723404 | 51 | 376 | 5.333333 | 0.411765 | 0.165441 | 0.198529 | 0.139706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.031339 | 0.066489 | 376 | 15 | 50 | 25.066667 | 0.74359 | 0.087766 | 0 | 0.181818 | 0 | 0 | 0.178886 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.181818 | 0 | 0.181818 | 0.272727 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9b46aa89d62b72198f506285e049129254bba1ad | 1,838 | py | Python | disruptive/__init__.py | disruptive-technologies/disruptive-python | 5b04c62278950abc415e3f6c62d27a1eed74d0f4 | [
"MIT"
] | 4 | 2021-04-19T12:53:43.000Z | 2021-05-28T09:04:02.000Z | disruptive/__init__.py | disruptive-technologies/disruptive-python | 5b04c62278950abc415e3f6c62d27a1eed74d0f4 | [
"MIT"
] | null | null | null | disruptive/__init__.py | disruptive-technologies/disruptive-python | 5b04c62278950abc415e3f6c62d27a1eed74d0f4 | [
"MIT"
] | null | null | null | # Metadata
__version__ = "1.0.3"
# Authentication scheme.
from disruptive.authentication import Auth # noqa
# When auth is an instance of Auth set with the default constructor,
# the package is unauthenticated, throwing an Unauthorized error at call.
# To authorize, either overwrite the global variable `auth` or provide
# each individual method with the same auth object.
#
# Available authentication methods:
# auth = disruptive.Auth.service_account(key_id, secret, email)
#
# Initialize package with unauthenticated object.
default_auth = Auth.unauthenticated()
# Resources.
from disruptive.resources.device import Device # noqa
from disruptive.resources.data_connector import DataConnector # noqa
from disruptive.resources.organization import Organization # noqa
from disruptive.resources.project import Project # noqa
from disruptive.resources.stream import Stream # noqa
from disruptive.resources.eventhistory import EventHistory # noqa
from disruptive.resources.service_account import ServiceAccount # noqa
from disruptive.resources.role import Role # noqa
from disruptive.resources.emulator import Emulator # noqa
# Additional helper modules.
import disruptive.events as events # noqa
# If set, logs of chosen level and higher are printed to console.
# Available levels are: debug, info, warning, error, critical.
log_level = None
# REST API base URLs of which all endpoints are an expansion.
base_url = 'https://api.disruptive-technologies.com/v2'
emulator_base_url = 'https://emulator.disruptive-technologies.com/v2'
# If a request response contains an error for which a series of retries is
# worth considering, these variable determine how long to wait without an
# answer, and how many times the package should retry before raising an error.
request_timeout = 3 # seconds
request_attempts = 5 # attempts
| 40.844444 | 78 | 0.796518 | 246 | 1,838 | 5.890244 | 0.5 | 0.096618 | 0.142857 | 0.149068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004433 | 0.140914 | 1,838 | 44 | 79 | 41.772727 | 0.913236 | 0.516866 | 0 | 0 | 0 | 0 | 0.109942 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.611111 | 0 | 0.611111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
9b5916e428f2b148e5f01bc57e1658657f8f48c8 | 10,605 | py | Python | PyObjCTest/test_nslayoutmanager.py | Khan/pyobjc-framework-Cocoa | f8b015ea2a72d8d78be6084fb12925c4785b8f1f | [
"MIT"
] | 132 | 2015-01-01T10:02:42.000Z | 2022-03-09T12:51:01.000Z | mac/pyobjc-framework-Cocoa/PyObjCTest/test_nslayoutmanager.py | mba811/music-player | 7998986b34cfda2244ef622adefb839331b81a81 | [
"BSD-2-Clause"
] | 6 | 2015-01-06T08:23:19.000Z | 2019-03-14T12:22:06.000Z | mac/pyobjc-framework-Cocoa/PyObjCTest/test_nslayoutmanager.py | mba811/music-player | 7998986b34cfda2244ef622adefb839331b81a81 | [
"BSD-2-Clause"
] | 27 | 2015-02-23T11:51:43.000Z | 2022-03-07T02:34:18.000Z |
from PyObjCTools.TestSupport import *
from AppKit import *
try:
long
except NameError:
long = int
class TestNSLayoutManagerHelper (NSObject):
def layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange_(self, a, b, c, d, e): return 1
def layoutManager_didCompleteLayoutForTextContainer_atEnd_(self, a, b, c): return 1
class TestNSLayoutManager (TestCase):
def testConstants(self):
self.assertEqual(NSGlyphAttributeSoft, 0)
self.assertEqual(NSGlyphAttributeElastic, 1)
self.assertEqual(NSGlyphAttributeBidiLevel, 2)
self.assertEqual(NSGlyphAttributeInscribe, 5)
self.assertEqual(NSGlyphInscribeBase, 0)
self.assertEqual(NSGlyphInscribeBelow, 1)
self.assertEqual(NSGlyphInscribeAbove, 2)
self.assertEqual(NSGlyphInscribeOverstrike, 3)
self.assertEqual(NSGlyphInscribeOverBelow, 4)
self.assertEqual(NSTypesetterLatestBehavior, -1)
self.assertEqual(NSTypesetterOriginalBehavior, 0)
self.assertEqual(NSTypesetterBehavior_10_2_WithCompatibility, 1)
self.assertEqual(NSTypesetterBehavior_10_2, 2)
self.assertEqual(NSTypesetterBehavior_10_3, 3)
self.assertEqual(NSTypesetterBehavior_10_4, 4)
def testMethods(self):
self.assertArgIsOut(NSLayoutManager.invalidateGlyphsForCharacterRange_changeInLength_actualCharacterRange_, 2)
self.assertArgIsOut(NSLayoutManager.invalidateLayoutForCharacterRange_isSoft_actualCharacterRange_, 2)
self.assertArgIsOut(NSLayoutManager.getGlyphs_range_, 0)
self.assertArgSizeInArg(NSLayoutManager.getGlyphs_range_, 0, 1)
self.assertArgIsOut(NSLayoutManager.textContainerForGlyphAtIndex_effectiveRange_, 1)
self.assertArgIsOut(NSLayoutManager.lineFragmentRectForGlyphAtIndex_effectiveRange_, 1)
self.assertArgIsOut(NSLayoutManager.lineFragmentUsedRectForGlyphAtIndex_effectiveRange_, 1)
self.assertArgIsOut(NSLayoutManager.layoutRectForTextBlock_atIndex_effectiveRange_, 2)
self.assertArgIsOut(NSLayoutManager.boundsRectForTextBlock_atIndex_effectiveRange_, 2)
self.assertArgIsOut(NSLayoutManager.glyphRangeForCharacterRange_actualCharacterRange_, 1)
self.assertArgIsOut(NSLayoutManager.characterRangeForGlyphRange_actualGlyphRange_, 1)
self.assertArgIsOut(NSLayoutManager.temporaryAttributesAtCharacterIndex_effectiveRange_, 1)
self.assertArgIsOut(NSLayoutManager.lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, 1)
self.assertArgIsBOOL(NSLayoutManager.lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, 2)
self.assertArgIsOut(NSLayoutManager.lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, 1)
self.assertArgIsBOOL(NSLayoutManager.lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, 2)
self.assertArgIsOut(NSLayoutManager.textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, 1)
self.assertArgIsBOOL(NSLayoutManager.textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, 2)
self.assertArgIsOut(NSLayoutManager.getFirstUnlaidCharacterIndex_glyphIndex_, 0)
self.assertArgIsOut(NSLayoutManager.getFirstUnlaidCharacterIndex_glyphIndex_, 1)
self.assertArgIsOut(NSLayoutManager.glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_, 2)
self.assertResultSizeInArg(NSLayoutManager.rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_, 3)
self.assertArgIsOut(NSLayoutManager.rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_, 3)
self.assertResultSizeInArg(NSLayoutManager.rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_, 3)
self.assertArgIsOut(NSLayoutManager.rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_, 3)
self.assertArgIsOut(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 1)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 1, 0)
self.assertArgIsOut(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 2)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 2, 0)
self.assertArgIsOut(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 3)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 3, 0)
self.assertArgHasType(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 4, b'o^' + objc._C_NSBOOL)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_, 4, 0)
self.assertArgIsOut(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 1)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 1, 0)
self.assertArgIsOut(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 2)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 2, 0)
self.assertArgIsOut(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 3)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 3, 0)
self.assertArgHasType(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 4, b'o^' + objc._C_NSBOOL)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 4, 0)
self.assertArgHasType(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 5, b'o^' + objc._C_UCHR)
self.assertArgSizeInArg(NSLayoutManager.getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, 5, 0)
self.assertArgHasType(NSLayoutManager.showPackedGlyphs_length_glyphRange_atPoint_font_color_printingAdjustment_, 0, b'n^v')
self.assertArgSizeInArg(NSLayoutManager.showPackedGlyphs_length_glyphRange_atPoint_font_color_printingAdjustment_, 0, 1)
@min_os_level("10.5")
def testMethods10_5(self):
self.assertArgIsOut(NSLayoutManager.invalidateGlyphsForCharacterRange_changeInLength_actualCharacterRange_, 2)
self.assertArgHasType(NSLayoutManager.glyphAtIndex_isValidIndex_, 1, b'o^' + objc._C_NSBOOL)
self.assertArgIsIn(NSLayoutManager.setLocations_startingGlyphIndexes_count_forGlyphRange_, 0)
self.assertArgSizeInArg(NSLayoutManager.setLocations_startingGlyphIndexes_count_forGlyphRange_, 0, 2)
self.assertArgIsIn(NSLayoutManager.setLocations_startingGlyphIndexes_count_forGlyphRange_, 1)
self.assertArgSizeInArg(NSLayoutManager.setLocations_startingGlyphIndexes_count_forGlyphRange_, 1, 2)
self.assertArgIsOut(NSLayoutManager.temporaryAttribute_atCharacterIndex_effectiveRange_, 2)
self.assertArgIsOut(NSLayoutManager.temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange_, 2)
self.assertArgIsOut(NSLayoutManager.temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange_, 1)
self.assertArgIsBOOL(TestNSLayoutManagerHelper.layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange_, 2)
self.assertArgHasType(TestNSLayoutManagerHelper.layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange_, 3, objc._C_NSUInteger)
self.assertArgHasType(TestNSLayoutManagerHelper.layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange_, 4, b'o^' + NSRange.__typestr__)
self.assertArgIsBOOL(TestNSLayoutManagerHelper.layoutManager_didCompleteLayoutForTextContainer_atEnd_, 2)
self.assertArgIsBOOL(NSLayoutManager.getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes_, 1)
self.assertArgIsBOOL(NSLayoutManager.getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes_, 2)
self.assertArgIsOut(NSLayoutManager.getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes_, 3)
self.assertArgIsOut(NSLayoutManager.getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes_, 4)
@min_os_level('10.5')
@expectedFailure
def testMethods10_5_fail(self):
self.fail("Buffer size is non-trivial: - (NSUInteger)getLineFragmentInsertionPointsForCharacterAtIndex:(NSUInteger)charIndex alternatePositions:(BOOL)aFlag inDisplayOrder:(BOOL)dFlag positions:(CGFloat *)positions characterIndexes:(NSUInteger *)charIndexes;")
@min_os_level('10.6')
def testMethods10_6(self):
self.assertArgHasType(NSLayoutManager.characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints_, 0, NSPoint.__typestr__)
self.assertArgIsOut(NSLayoutManager.characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints_, 2)
self.assertArgHasType(NSLayoutManager.fillBackgroundRectArray_count_forCharacterRange_color_,
0, b'N^' + NSRect.__typestr__)
self.assertArgSizeInArg(NSLayoutManager.fillBackgroundRectArray_count_forCharacterRange_color_, 0, 1)
self.assertArgHasType(NSLayoutManager.fillBackgroundRectArray_count_forCharacterRange_color_,
2, NSRange.__typestr__)
@min_os_level('10.7')
def testMethods10_7(self):
self.assertArgIsIn(NSLayoutManager.showCGGlyphs_positions_count_font_matrix_attributes_inContext_, 0)
self.assertArgSizeInArg(NSLayoutManager.showCGGlyphs_positions_count_font_matrix_attributes_inContext_, 0, 2)
self.assertArgIsIn(NSLayoutManager.showCGGlyphs_positions_count_font_matrix_attributes_inContext_, 1)
self.assertArgSizeInArg(NSLayoutManager.showCGGlyphs_positions_count_font_matrix_attributes_inContext_, 1, 2)
if __name__ == "__main__":
main()
| 75.75 | 267 | 0.841396 | 819 | 10,605 | 10.452991 | 0.189255 | 0.067282 | 0.12335 | 0.111436 | 0.717089 | 0.642332 | 0.540357 | 0.436281 | 0.331737 | 0.16984 | 0 | 0.014729 | 0.103725 | 10,605 | 139 | 268 | 76.294964 | 0.885955 | 0 | 0 | 0.035714 | 0 | 0.008929 | 0.026877 | 0.015749 | 0 | 0 | 0 | 0 | 0.767857 | 1 | 0.071429 | false | 0 | 0.017857 | 0.017857 | 0.107143 | 0.017857 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9b5e5435bfc0dc8e4f7ec36f837870eefa0b32f2 | 235 | py | Python | PythonFiles/parameters.py | IamVaibhavsar/Python_Files | 283d73929a3e11955c71499407c4f8bff56e4273 | [
"MIT"
] | null | null | null | PythonFiles/parameters.py | IamVaibhavsar/Python_Files | 283d73929a3e11955c71499407c4f8bff56e4273 | [
"MIT"
] | null | null | null | PythonFiles/parameters.py | IamVaibhavsar/Python_Files | 283d73929a3e11955c71499407c4f8bff56e4273 | [
"MIT"
] | 1 | 2019-07-26T15:25:21.000Z | 2019-07-26T15:25:21.000Z | def sayhi(name):
print("Hello "+ name)
sayhi(" vaibhav .")
def data(name,age):
print("Hello " + name +" You are " + str(age)+ ".")
nm=input("Enter the name: ")
age=int(input("Enter the age: "))
data(nm,age)
| 15.666667 | 56 | 0.544681 | 33 | 235 | 3.878788 | 0.484848 | 0.15625 | 0.21875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.246809 | 235 | 14 | 57 | 16.785714 | 0.723164 | 0 | 0 | 0 | 0 | 0 | 0.285068 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9b6318a225dee36aa39e8794f55f77bc36c55f8a | 2,891 | py | Python | layers/functions/sph_prior_box.py | BoChenUIUC/realtime-action-detection | 98f6d0b3f5faa4da6a1395daf07771d5f157ba8f | [
"MIT"
] | null | null | null | layers/functions/sph_prior_box.py | BoChenUIUC/realtime-action-detection | 98f6d0b3f5faa4da6a1395daf07771d5f157ba8f | [
"MIT"
] | null | null | null | layers/functions/sph_prior_box.py | BoChenUIUC/realtime-action-detection | 98f6d0b3f5faa4da6a1395daf07771d5f157ba8f | [
"MIT"
] | null | null | null | """ Generates prior boxes for SSD netowrk
Original author: Ellis Brown, Max deGroot for VOC dataset
https://github.com/amdegroot/ssd.pytorch
"""
import torch
from math import sqrt as sqrt
from itertools import product as product
class SphPriorBox(object):
"""Compute priorbox coordinates in center-offset form for each source
feature map.
Note:
This 'layer' has changed between versions of the original SSD
paper, so we include both versions, but note v2 is the most tested and most
recent version of the paper.
"""
def __init__(self, cfg):
super(SphPriorBox, self).__init__()
# self.type = cfg.name
self.image_size = cfg['min_dim']
# number of priors for feature map location (either 4 or 6)
self.num_priors = len(cfg['aspect_ratios'])
self.variance = cfg['variance'] or [0.1]
self.feature_maps = cfg['feature_maps']
self.min_sizes = cfg['min_sizes']
self.max_sizes = cfg['max_sizes']
self.steps = cfg['steps']
self.aspect_ratios = cfg['aspect_ratios']
self.clip = cfg['clip']
self.version = cfg['name']
for v in self.variance:
if v <= 0:
raise ValueError('Variances must be greater than 0')
def forward(self):
mean = []
# TODO merge these
for k, f in enumerate(self.feature_maps):
h,w = f
for i in range(h):
for j in range(w):
boxes = []
f_kx = self.image_size[1] * 1. / self.steps[k][1]
f_ky = self.image_size[0] * 1. / self.steps[k][0]
# unit center x,y
cx = (j + 0.5) / f_kx
cy = (i + 0.5) / f_ky
# aspect_ratio: 1
# rel size: min_size
s_kx = self.min_sizes[k] * 1. /self.image_size[1]
s_ky = self.min_sizes[k] * 1. /self.image_size[0]
boxes.append([cx, cy, s_kx, s_ky])
# aspect_ratio: 1
# rel size: sqrt(s_k * s_(k+1))
s_kx_prime = sqrt(s_kx * (self.max_sizes[k] * 1. /self.image_size[1]))
s_ky_prime = sqrt(s_ky * (self.max_sizes[k] * 1. /self.image_size[0]))
boxes.append([cx, cy, s_kx_prime, s_ky_prime])
# rest of aspect ratios
for ar in self.aspect_ratios[k]:
boxes.append([cx, cy, s_kx*sqrt(ar), s_ky/sqrt(ar)])
boxes.append([cx, cy, s_kx/sqrt(ar), s_ky*sqrt(ar)])
for box in boxes:
mean += box
# back to torch land
output = torch.Tensor(mean).view(-1, 4)
if self.clip:
output.clamp_(max=1, min=0)
return output | 37.545455 | 90 | 0.522657 | 394 | 2,891 | 3.682741 | 0.350254 | 0.043418 | 0.062715 | 0.030324 | 0.180565 | 0.180565 | 0.15162 | 0.15162 | 0.132323 | 0.099242 | 0 | 0.017496 | 0.367347 | 2,891 | 77 | 91 | 37.545455 | 0.775834 | 0.216188 | 0 | 0 | 1 | 0 | 0.052299 | 0 | 0 | 0 | 0 | 0.012987 | 0 | 1 | 0.044444 | false | 0 | 0.066667 | 0 | 0.155556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9b65a1a99ae18bc5f7b78117de2774ba94ad3cb3 | 304 | py | Python | tests/pyReL.py | nelmiux/CS347-Data_Management | 1e9d87097b5a373f9312b0d6b413198e495fd6c0 | [
"CNRI-Jython"
] | null | null | null | tests/pyReL.py | nelmiux/CS347-Data_Management | 1e9d87097b5a373f9312b0d6b413198e495fd6c0 | [
"CNRI-Jython"
] | null | null | null | tests/pyReL.py | nelmiux/CS347-Data_Management | 1e9d87097b5a373f9312b0d6b413198e495fd6c0 | [
"CNRI-Jython"
] | null | null | null | connectTo 'jdbc:oracle:thin:@rising-sun.microlab.cs.utexas.edu:1521:orcl' 'CS347_prof' 'orcl_prof' 'remote'
persist class test(object):
a = "a"
b = 1
c = None
d = False
def func(self):
pass
#SQL "select * from test"
t = test()
t.b = "changed"
relInsert t
relCommit
| 19 | 107 | 0.611842 | 45 | 304 | 4.088889 | 0.822222 | 0.054348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035088 | 0.25 | 304 | 15 | 108 | 20.266667 | 0.77193 | 0.078947 | 0 | 0 | 0 | 0.083333 | 0.336918 | 0.218638 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.083333 | 0 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
9b6661f0d3d9f194e5046cee54245dcb4d10a13e | 322 | py | Python | tests/components/nexia/test_switch.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/nexia/test_switch.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | tests/components/nexia/test_switch.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The switch tests for the nexia platform."""
from homeassistant.const import STATE_ON
from .util import async_init_integration
async def test_hold_switch(hass):
"""Test creation of the hold switch."""
await async_init_integration(hass)
assert hass.states.get("switch.nick_office_hold").state == STATE_ON
| 26.833333 | 71 | 0.76087 | 47 | 322 | 5 | 0.595745 | 0.059574 | 0.170213 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 322 | 11 | 72 | 29.272727 | 0.851449 | 0.124224 | 0 | 0 | 0 | 0 | 0.097046 | 0.097046 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
9b76ffcb6e117108bfb38f2ce4a5cbc7f351829f | 808 | py | Python | src/parser/rules/name/rule_name_no_generics.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | src/parser/rules/name/rule_name_no_generics.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | src/parser/rules/name/rule_name_no_generics.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from .i_rule_name import IRuleName
from .i_rules_name import IRulesName
from ...dataclass.name_info import NameInfo
from ...common.util import Util
class RuleNameNoGenerics(IRuleName):
"""Cleans name to remove any Generic < U, T > like strings"""
def __init__(self, rules: IRulesName) -> None:
self._rules = rules
def get_is_match(self, ni: NameInfo) -> bool:
"""Gets if name is a match"""
parts = ni.name.split(sep='<', maxsplit=1)
if len(parts) == 1:
return False
return True
def process_name(self, ni: NameInfo) -> None:
"""
Cleans ni.name to remove any Generic < U, T > like strings
Args:
ni (NameInfo): name info
"""
ni.name = Util.get_clean_classname(ni.name)
| 27.862069 | 66 | 0.616337 | 108 | 808 | 4.472222 | 0.481481 | 0.049689 | 0.049689 | 0.062112 | 0.144928 | 0.144928 | 0.144928 | 0.144928 | 0.144928 | 0 | 0 | 0.005102 | 0.272277 | 808 | 28 | 67 | 28.857143 | 0.816327 | 0.233911 | 0 | 0 | 0 | 0 | 0.001757 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0 | 0.285714 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
9b7d563147731ebf4f8aabb45a50da5f59ee001f | 957 | py | Python | albumranker/views.py | leovictorsr/albumranker | 97b78669a9b077e2f7dd775e43a6e07ad810668d | [
"MIT"
] | null | null | null | albumranker/views.py | leovictorsr/albumranker | 97b78669a9b077e2f7dd775e43a6e07ad810668d | [
"MIT"
] | 7 | 2020-06-05T20:03:25.000Z | 2021-09-22T18:05:16.000Z | albumranker/views.py | leovictorsr/albumranker | 97b78669a9b077e2f7dd775e43a6e07ad810668d | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.views import View
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from .models import Ranking
from .serializers import RankingSerializer
from . import api_handler
def search(request, query, type):
result = api_handler.search(query, type)
return JsonResponse(result, safe=False)
class RankingView(APIView):
def get(self, request):
rankings = Ranking.objects.all()
serializer = RankingSerializer(rankings, many=True)
return Response(serializer.data)
def post(self, request, format=None):
serializer = RankingSerializer(data=request.data)
print(serializer)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
| 31.9 | 78 | 0.739812 | 113 | 957 | 6.168142 | 0.451327 | 0.034433 | 0.073171 | 0.080344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007682 | 0.183908 | 957 | 29 | 79 | 33 | 0.884763 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.130435 | false | 0 | 0.347826 | 0 | 0.695652 | 0.043478 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
9b8ee26519d492fa8da864fe6f5a9cd1f73a246d | 524 | py | Python | src/main/python/bktools/framework/money/exception.py | bspa10/bktools | 8ddff2bb325df6c4c2bb5cadd3029c0e11ba0734 | [
"MIT"
] | null | null | null | src/main/python/bktools/framework/money/exception.py | bspa10/bktools | 8ddff2bb325df6c4c2bb5cadd3029c0e11ba0734 | [
"MIT"
] | null | null | null | src/main/python/bktools/framework/money/exception.py | bspa10/bktools | 8ddff2bb325df6c4c2bb5cadd3029c0e11ba0734 | [
"MIT"
] | null | null | null | # encoding: utf-8
# Standard Library
from abc import ABC
# 3rd Party Library
# Current Folder
# Current Application
from bktools.framework.exception import FrameworkException
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class MoneyException(FrameworkException, ABC):
pass
class CurrencyMismatchException(MoneyException):
def __init__(self):
super().__init__('00001', 'Trying to perform operation with different currencies.')
| 24.952381 | 120 | 0.591603 | 43 | 524 | 7.023256 | 0.767442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015251 | 0.124046 | 524 | 20 | 121 | 26.2 | 0.642702 | 0.389313 | 0 | 0 | 0 | 0 | 0.188498 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0.142857 | 0.285714 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
9ba0b1996bfaae13ffa80c2bf3ccd426aaafab9a | 22,536 | py | Python | backend/registry/models/monitoring.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 10 | 2021-03-12T17:46:38.000Z | 2022-03-11T10:59:01.000Z | backend/registry/models/monitoring.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 214 | 2021-03-10T19:24:17.000Z | 2022-03-15T07:34:24.000Z | backend/registry/models/monitoring.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 9 | 2021-03-16T19:47:54.000Z | 2022-03-11T11:01:22.000Z | # """
# Author: Jan Suleiman
# Organization: terrestris GmbH & Co. KG, Bonn, Germany
# Contact: suleiman@terrestris.de
# Created on: 26.02.2020
# """
# from itertools import chain
# from django.conf import settings
# from django.contrib.gis.db import models
# from django.core.exceptions import ValidationError
# from django.core.validators import MaxValueValidator, MinValueValidator
# from django.db import transaction
# from django.utils import timezone
# from django.utils.translation import gettext_lazy as _
# from django_celery_beat.models import PeriodicTask, CrontabSchedule
# from MrMap.settings import TIME_ZONE
# from extras.models import CommonInfo, GenericModelMixin
# from extras.polymorphic_fk import PolymorphicForeignKey
# # TODO is this class effectively used for any functionality? Can it be removed?
# from registry.enums.monitoring import HealthStateEnum
# from registry.settings import MONITORING_DEFAULT_UNKNOWN_MESSAGE, CRITICAL_RESPONSE_TIME, WARNING_RESPONSE_TIME
# class MonitoringSetting(models.Model):
# # TODO other resource types
# metadatas = models.ManyToManyField('registry.Service',
# related_name='monitoring_setting')
# check_time = models.TimeField()
# timeout = models.IntegerField()
# periodic_task = models.OneToOneField(PeriodicTask, on_delete=models.CASCADE, null=True, blank=True)
# def update_periodic_tasks(self):
# """ Updates related PeriodicTask record based on the current MonitoringSetting
# Returns:
# """
# time = self.check_time
# schedule = CrontabSchedule.objects.get_or_create(
# minute=time.minute,
# hour=time.hour,
# timezone=TIME_ZONE,
# )[0]
# if self.periodic_task is not None:
# # Update interval to latest setting
# self.periodic_task.crontab = schedule
# self.periodic_task.save()
# else:
# # Create new PeriodicTask
# try:
# task = PeriodicTask.objects.get_or_create(
# task='run_service_monitoring',
# name=f'monitoring_setting_{self.id}',
# args=f'[{self.id}]'
# )[0]
# task.crontab = schedule
# task.save()
# self.periodic_task = task
# except ValidationError:
# pass
# def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
# """ Overwrites default save method.
# Updates related PeriodicTask to match the current state of MonitoringSetting.
# Args:
# force_insert:
# force_update:
# using:
# update_fields:
# Returns:
# """
# self.update_periodic_tasks()
# super().save(force_insert, force_update, using, update_fields)
# class MonitoringRun(CommonInfo, GenericModelMixin):
# start = models.DateTimeField(null=True, blank=True)
# end = models.DateTimeField(null=True, blank=True)
# duration = models.DurationField(null=True, blank=True)
# services = models.ManyToManyField('registry.Service',
# related_name='monitoring_runs', blank=True,
# verbose_name=_('Checked services'))
# layers = models.ManyToManyField('registry.Layer',
# related_name='monitoring_runs', blank=True,
# verbose_name=_('Checked layers'))
# feature_types = models.ManyToManyField('registry.FeatureType',
# related_name='monitoring_runs', blank=True,
# verbose_name=_('Checked feature types'))
# dataset_metadatas = models.ManyToManyField('registry.DatasetMetadata',
# related_name='monitoring_runs', blank=True,
# verbose_name=_('Checked dataset metadatas'))
# class Meta:
# ordering = ["-end"]
# verbose_name = _('Monitoring run')
# verbose_name_plural = _('Monitoring runs')
# def __str__(self):
# return str(self.id)
# @property
# def resources_all(self):
# return list(
# chain(self.services.all(), self.layers.all(), self.feature_types.all(), self.dataset_metadatas.all()))
# @property
# def result_view_uri(self):
# return f"{MonitoringResult.get_table_url()}?monitoring_run={self.id}"
# @property
# def health_state_view_uri(self):
# return f"{HealthState.get_table_url()}?monitoring_run={self.id}"
# def save(self, *args, **kwargs):
# adding = False
# if self._state.adding:
# adding = True
# super().save(*args, **kwargs)
# if adding:
# from registry.tasks.monitoring import run_manual_service_monitoring
# transaction.on_commit(lambda: run_manual_service_monitoring.apply_async(
# args=(self.owner.pk if self.owner else None,
# self.pk,),
# kwargs={'created_by_user_pk': self.created_by_user.pk},
# countdown=settings.CELERY_DEFAULT_COUNTDOWN))
# class MonitoringResult(CommonInfo, GenericModelMixin):
# # polymorphic fk (either service, layer, feature type or dataset metadata)
# service = models.ForeignKey('registry.Service', on_delete=models.CASCADE, null=True, blank=True,
# verbose_name=_('Service'))
# layer = models.ForeignKey('registry.Layer', on_delete=models.CASCADE, null=True, blank=True,
# verbose_name=_('Layer'))
# feature_type = models.ForeignKey('registry.FeatureType', on_delete=models.CASCADE, null=True, blank=True,
# verbose_name=_('Feature Type'))
# dataset_metadata = models.ForeignKey('registry.DatasetMetadata', on_delete=models.CASCADE, null=True, blank=True,
# verbose_name=_('Dataset Metadata'))
# _resource = PolymorphicForeignKey('service', 'layer', 'feature_type', 'dataset_metadata')
# timestamp = models.DateTimeField(auto_now_add=True)
# duration = models.DurationField(null=True, blank=True)
# status_code = models.IntegerField(null=True, blank=True)
# error_msg = models.TextField(null=True, blank=True)
# available = models.BooleanField(null=True)
# monitored_uri = models.CharField(max_length=2000)
# monitoring_run = models.ForeignKey(MonitoringRun, on_delete=models.CASCADE, related_name='monitoring_results')
# class Meta:
# ordering = ["-timestamp"]
# verbose_name = _('Monitoring result')
# verbose_name_plural = _('Monitoring results')
# # TODO consider integrating this into PolymorphicForeignKey
# @property
# def resource(self):
# return self._resource.get_target(self)
# # TODO consider integrating this into PolymorphicForeignKey
# @resource.setter
# def resource(self, value):
# self._resource.set_target(self, value)
# class MonitoringResultDocument(MonitoringResult):
# """Model used to signal if a given document differs from the remote document and needs an update"""
# needs_update = models.BooleanField(null=True, blank=True)
# diff = models.TextField(null=True, blank=True)
# class HealthState(CommonInfo, GenericModelMixin):
# monitoring_run = models.ForeignKey(MonitoringRun, on_delete=models.CASCADE, related_name='health_states',
# verbose_name=_('Monitoring Runs'))
# # polymorphic fk (either service, layer, feature type or dataset metadata)
# service = models.ForeignKey('registry.Service', on_delete=models.CASCADE, related_name='health_states',
# related_query_name='health_states', null=True, blank=True, verbose_name=_('Service'))
# layer = models.ForeignKey('registry.Layer', on_delete=models.CASCADE, related_name='health_states',
# related_query_name='health_states', null=True, blank=True, verbose_name=_('Layer'))
# feature_type = models.ForeignKey('registry.FeatureType', on_delete=models.CASCADE, related_name='health_states',
# related_query_name='health_states', null=True, blank=True,
# verbose_name=_('Feature Type'))
# dataset_metadata = models.ForeignKey('registry.DatasetMetadata', on_delete=models.CASCADE,
# related_name='health_states',
# related_query_name='health_states', null=True, blank=True,
# verbose_name=_('Dataset Metadata'))
# _resource = PolymorphicForeignKey('service', 'layer', 'feature_type', 'dataset_metadata')
# health_state_code = models.CharField(default=HealthStateEnum.UNKNOWN.value,
# choices=HealthStateEnum.as_choices(drop_empty_choice=True),
# max_length=12, verbose_name=_('Health state code'))
# health_message = models.CharField(default=MONITORING_DEFAULT_UNKNOWN_MESSAGE,
# max_length=512, ) # this is the teaser for tooltips
# reliability_1w = models.FloatField(default=0,
# validators=[MaxValueValidator(100), MinValueValidator(1)])
# reliability_1m = models.FloatField(default=0,
# validators=[MaxValueValidator(100), MinValueValidator(1)])
# reliability_3m = models.FloatField(default=0,
# validators=[MaxValueValidator(100), MinValueValidator(1)])
# average_response_time = models.DurationField(null=True, blank=True)
# average_response_time_1w = models.DurationField(null=True, blank=True)
# average_response_time_1m = models.DurationField(null=True, blank=True)
# average_response_time_3m = models.DurationField(null=True, blank=True)
# class Meta:
# ordering = ['-monitoring_run__start']
# verbose_name = _('Health state')
# verbose_name_plural = _('Health states')
# # TODO consider integrating this into the PolymorphicForeignKey
# @property
# def resource(self):
# return self._resource.get_target(self)
# # TODO consider integrating this into the PolymorphicForeignKey
# @resource.setter
# def resource(self, value):
# self._resource.set_target(self, value)
# @property
# def result_view_uri(self):
# return f"{MonitoringResult.get_table_url()}?monitoring_run={self.monitoring_run_id}&resource={self.resource.id}"
# @staticmethod
# def _get_last_check_runs_on_msg(monitoring_result):
# return 'Last check runs on <span class="font-italic text-info">' + \
# f'{timezone.localtime(monitoring_result.monitoring_run.end).strftime("%Y-%m-%d %H:%M:%S")}</span>.<br>' + \
# 'Click on this icon to see details.'
# def run_health_state(self):
# resource_field = self._resource.get_target_field(self)
# resource_value = self._resource.get_target(self)
# # Monitoring objects that are related to this run and given metadata
# monitoring_objects = MonitoringResult.objects.filter(monitoring_run=self.monitoring_run,
# **{resource_field: resource_value})
# # Get health states of the last 3 months, for statistic calculating
# now = timezone.now()
# health_states_3m = HealthState.objects.filter(
# monitoring_run__end__gte=now - timezone.timedelta(days=(3 * 365 / 12)),
# **{resource_field: resource_value}) \
# .order_by('-monitoring_run__end')
# # get only health states for 1m and 1w calculation to prevent from sql statements
# health_states_1m = list(
# filter(lambda _health_state: _health_state.monitoring_run.end > now - timezone.timedelta(days=(365 / 12)),
# list(health_states_3m)))
# health_states_1w = list(
# filter(lambda _health_state: _health_state.monitoring_run.end > now - timezone.timedelta(days=7),
# list(health_states_3m)))
# health_states_3m = list(health_states_3m)
# # append self, cause transaction is atomic in parent function,
# # so self would'nt be part of any calculation
# health_states_1w.append(self)
# health_states_1m.append(self)
# health_states_3m.append(self)
# self._calculate_average_response_times(monitoring_objects=monitoring_objects,
# health_states_1w=health_states_1w,
# health_states_1m=health_states_1m,
# health_states_3m=health_states_3m)
# self._calculate_health_state(monitoring_objects=monitoring_objects)
# self._calculate_reliability(health_states_1w=health_states_1w,
# health_states_1m=health_states_1m,
# health_states_3m=health_states_3m)
# def _calculate_average_response_times(self, monitoring_objects, health_states_1w, health_states_1m,
# health_states_3m):
# if monitoring_objects:
# average_response_time = None
# for monitoring_result in monitoring_objects:
# if not average_response_time:
# average_response_time = monitoring_result.duration
# else:
# average_response_time += monitoring_result.duration
# self.average_response_time = average_response_time / len(monitoring_objects)
# self.save()
# average_response_time_1w = None
# for health_state in health_states_1w:
# if average_response_time_1w:
# average_response_time_1w += health_state.average_response_time
# else:
# average_response_time_1w = health_state.average_response_time
# self.average_response_time_1w = average_response_time_1w / len(health_states_1w)
# average_response_time_1m = None
# for health_state in health_states_1m:
# if average_response_time_1m:
# average_response_time_1m += health_state.average_response_time
# else:
# average_response_time_1m = health_state.average_response_time
# self.average_response_time_1m = average_response_time_1m / len(health_states_1m)
# average_response_time_3m = None
# for health_state in health_states_3m:
# if average_response_time_3m:
# average_response_time_3m += health_state.average_response_time
# else:
# average_response_time_3m = health_state.average_response_time
# self.average_response_time_3m = average_response_time_3m / len(health_states_3m)
# self.save()
# def _calculate_reliability(self, health_states_1w, health_states_1m, health_states_3m):
# reliability_1w = 0
# for health_state in health_states_1w:
# if health_state.health_state_code == HealthStateEnum.OK.value or health_state.health_state_code == HealthStateEnum.WARNING.value:
# reliability_1w += 1
# reliability_1m = 0
# for health_state in health_states_1m:
# if health_state.health_state_code == HealthStateEnum.OK.value or health_state.health_state_code == HealthStateEnum.WARNING.value:
# reliability_1m += 1
# reliability_3m = 0
# for health_state in health_states_3m:
# if health_state.health_state_code == HealthStateEnum.OK.value or health_state.health_state_code == HealthStateEnum.WARNING.value:
# reliability_3m += 1
# if health_states_1w:
# self.reliability_1w = reliability_1w * 100 / len(health_states_1w)
# if health_states_1m:
# self.reliability_1m = reliability_1m * 100 / len(health_states_1m)
# if health_states_3m:
# self.reliability_3m = reliability_3m * 100 / len(health_states_3m)
# self.save()
# def _calculate_health_state(self, monitoring_objects):
# if monitoring_objects:
# warning = False
# critical = False
# for monitoring_result in monitoring_objects:
# # evaluate availability
# if not monitoring_result.available:
# if monitoring_result.status_code == 401:
# HealthStateReason(health_state=self,
# health_state_code=HealthStateEnum.UNAUTHORIZED.value,
# reason=_(
# f'The resource <span class="font-italic text-info">\'{monitoring_result.monitored_uri}\'</span> did response an exception.<br> '
# f'The http status code was <strong class="text-success">{monitoring_result.status_code}</strong>.'),
# monitoring_result=monitoring_result
# ).save()
# else:
# critical = True
# if 200 <= monitoring_result.status_code <= 208:
# HealthStateReason(health_state=self,
# health_state_code=HealthStateEnum.CRITICAL.value,
# reason=_(
# f'The resource <span class="font-italic text-info">\'{monitoring_result.monitored_uri}\'</span> did response an exception.<br> '
# f'The http status code was <strong class="text-success">{monitoring_result.status_code}</strong>.'),
# monitoring_result=monitoring_result,
# ).save()
# else:
# HealthStateReason(health_state=self,
# health_state_code=HealthStateEnum.CRITICAL.value,
# reason=_(
# f'The resource <span class="font-italic text-info">\'{monitoring_result.monitored_uri}\'</span> did not response.<br> '
# f'The http status code was <strong class="text-danger">{monitoring_result.status_code}</strong>.'),
# monitoring_result=monitoring_result,
# ).save()
# # evaluate response time
# if self.average_response_time_1w >= timezone.timedelta(milliseconds=CRITICAL_RESPONSE_TIME):
# critical = True
# HealthStateReason(health_state=self,
# health_state_code=HealthStateEnum.CRITICAL.value,
# reason=_(
# f'The average response time for 1 week statistic is too high.<br> <strong class="text-danger">{self.average_response_time_1w.total_seconds() * 1000} ms</strong> is greater than threshold <strong class="text-danger">{CRITICAL_RESPONSE_TIME} ms</strong>.'),
# monitoring_result=monitoring_result,
# ).save()
# elif self.average_response_time_1w >= timezone.timedelta(milliseconds=WARNING_RESPONSE_TIME):
# warning = True
# HealthStateReason(health_state=self,
# health_state_code=HealthStateEnum.WARNING.value,
# reason=_(
# f'The average response time for 1 week statistic is too high.<br> <strong class="text-danger">{self.average_response_time_1w.total_seconds() * 1000} ms</strong> is greater than threshold <strong class="text-danger">{WARNING_RESPONSE_TIME} ms</strong>.'),
# monitoring_result=monitoring_result,
# ).save()
# if critical:
# self.health_state_code = HealthStateEnum.CRITICAL.value
# self.health_message = _(
# 'The state of this resource is <strong class="text-danger">critical</strong>.<br>' +
# self._get_last_check_runs_on_msg(monitoring_result))
# elif warning:
# self.health_state_code = HealthStateEnum.WARNING.value
# self.health_message = _('This resource has some <strong class="text-warning">warnings</strong>.<br>' +
# self._get_last_check_runs_on_msg(monitoring_result))
# else:
# # We can't found any errors. Health state is ok
# self.health_state_code = HealthStateEnum.OK.value
# self.health_message = _('Everthing is <strong class="text-success">OK</strong>.<br>' +
# self._get_last_check_runs_on_msg(monitoring_result))
# self.save()
# class HealthStateReason(models.Model):
# health_state = models.ForeignKey(HealthState,
# on_delete=models.CASCADE,
# related_name='reasons', )
# reason = models.TextField(verbose_name=_('Reason'), )
# health_state_code = models.CharField(default=HealthStateEnum.UNKNOWN.value,
# choices=HealthStateEnum.as_choices(drop_empty_choice=True),
# max_length=12, )
# monitoring_result = models.ForeignKey(MonitoringResult, on_delete=models.CASCADE,
# related_name='health_state_reasons', )
| 54.303614 | 295 | 0.596424 | 2,235 | 22,536 | 5.732438 | 0.150336 | 0.051514 | 0.059319 | 0.027865 | 0.582189 | 0.564315 | 0.519357 | 0.486029 | 0.42788 | 0.342179 | 0 | 0.010821 | 0.311102 | 22,536 | 414 | 296 | 54.434783 | 0.814428 | 0.964901 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0.002415 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9bac9484aed29aebf7037098fec4478d25f5ae81 | 192 | py | Python | src/modeci_mdf/__init__.py | singular-value/MDF | 227216ffb2c9beea8539829b0b891196787d33ee | [
"Apache-2.0"
] | null | null | null | src/modeci_mdf/__init__.py | singular-value/MDF | 227216ffb2c9beea8539829b0b891196787d33ee | [
"Apache-2.0"
] | null | null | null | src/modeci_mdf/__init__.py | singular-value/MDF | 227216ffb2c9beea8539829b0b891196787d33ee | [
"Apache-2.0"
] | null | null | null | # Version of the specification for MDF
MODECI_MDF_VERSION = "0.1"
# Version of the python module. Use MDF version here and just change minor version
__version__ = "%s.3" % MODECI_MDF_VERSION
| 32 | 82 | 0.770833 | 31 | 192 | 4.516129 | 0.612903 | 0.214286 | 0.171429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018634 | 0.161458 | 192 | 5 | 83 | 38.4 | 0.850932 | 0.609375 | 0 | 0 | 0 | 0 | 0.097222 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9bb2b906f90e854e9fc654fbbd16509bb9e25635 | 26,584 | py | Python | LowLevelApi/NGPF/REST/1_Most_Common/appLibraryTrafficRawRest.py | NickKeating/IxNetwork | 0a54c0b8d1a1664d2826ad20a826ef384c48432f | [
"MIT"
] | 46 | 2018-01-24T06:43:45.000Z | 2022-03-17T07:27:08.000Z | LowLevelApi/NGPF/REST/1_Most_Common/appLibraryTrafficRawRest.py | NickKeating/IxNetwork | 0a54c0b8d1a1664d2826ad20a826ef384c48432f | [
"MIT"
] | 104 | 2018-03-16T18:16:29.000Z | 2022-03-17T07:16:43.000Z | LowLevelApi/NGPF/REST/1_Most_Common/appLibraryTrafficRawRest.py | NickKeating/IxNetwork | 0a54c0b8d1a1664d2826ad20a826ef384c48432f | [
"MIT"
] | 58 | 2018-01-23T05:54:20.000Z | 2022-03-30T22:55:20.000Z | #!/usr/local/python2.7.6/bin/python2.7
import requests, json, sys, os, time
def waitForComplete(response, sessionUrl, timeout=90):
# response: Provide the POST action response. Generally, after an /operations action.
# Such as /operations/startallprotocols, /operations/assignports
# sessionUrl: http://10.219.x.x:11009/api/v1/sessions/1/ixnetwork
#
# Returns 0 if the state is good
# Returns 1 if the state remains down or IN_PROGRESS after timeout.
if response.json().has_key("errors"):
print response.json()["errors"][0]
return 1
print "\n", sessionUrl
print "\t\tState:",response.json()["state"]
while response.json()["state"] == "IN_PROGRESS" or response.json()["state"] == "down":
if timeout == 0:
return 1
time.sleep(1)
response = requests.get(sessionUrl)
state = response.json()["state"]
print "\t\tState:", state
timeout = timeout - 1
# Falling down here means success
return 0
def getVportMapping(portNumber):
# Search all vport for the port number.
# Port format = 1/1/1. Not 1/1.
for vport in vportList:
# connectedTo = /api/v1/sessions/1/ixnetwork/availableHardware/chassis/1/card/1/port/1
response = requests.get(vport)
connectedTo = response.json()["connectedTo"]
chassisId = connectedTo.split("/")[8]
card = connectedTo.split("/")[10]
portNum = connectedTo.split("/")[12]
port = chassisId+"/"+card+"/"+portNum
if port == portNumber:
print "\nReturing vport:", vport
return vport
def verifyProtocolSessionsNgpf(protocolObjList, timeout=90):
# Verify the user specified protocol list to verify for session UP.
#
# sessionUrl = http://10.219.x.x:11009/api/v1/sessions/1/ixnetwork
#
# GET: http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1
# data={}
# headers={}
# GET RESPONSE: [u'notStarted', u'notStarted', u'notStarted', u'notStarted', u'notStarted', u'notStarted']
# GET: http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1
# data={}
# headers={}
# GET RESPONSE: [u'up', u'up', u'up', u'up', u'up', u'up', u'up', u'up']
# GET: http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1/bgpIpv4Peer/1
# data={}
# headers={}
#protocolObjList: ['http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1',
# 'http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1',
# 'http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1/bgpIpv4Peer/1',
# 'http://10.219.117.103:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1/ospfv2/1',]
# timeout: Total wait time for all the protocols in the provided list to come up.
timerStop = timeout
for eachProtocol in protocolObjList:
# notStarted, up or down
print '\nVerifyProtocolSessions: %s\n' % eachProtocol
for timer in range(1,timerStop+1):
response = requests.get(eachProtocol)
if response.status_code != 200:
print 'Failed to get response'
continue
protocolSessionStatus = response.json()['sessionStatus']
print '\tStatus: Down : Wait %s/%s seconds' % (timer, timerStop)
if timer < timerStop+1:
if 'down' in protocolSessionStatus or 'notStarted' in protocolSessionStatus:
time.sleep(1)
if timer < timerStop+1:
if 'down' not in protocolSessionStatus and 'notStarted' not in protocolSessionStatus:
print '\n\tStatus: All UP'
break
if timer == timerStop:
if 'down' in protocolSessionStatus or 'notStarted' in protocolSessionStatus:
print '\nverifyProtocolSessions Failed'
return 1
return 0
def regenerateAllTrafficItems(sessionUrl):
# Performs regenerate on all enabled Traffic Items.
# Requires API: waitForComplete.
#
# sessionUrl: http://10.219.x.x:11009/api/v1/sessions/1/ixnetwork
#
# Returns 0 if success
# Returns 1 if failed
serverUrl = sessionUrl.split('/api')[0]
response = requests.get(sessionUrl + "/traffic/trafficItem")
trafficItemList = ["%s%s" % (serverUrl, str(i["links"][0]["href"])) for i in response.json()]
for trafficItem in trafficItemList:
response = requests.get(trafficItem)
if response.status_code != 200:
return 1
if response.json()['enabled'] == True:
print '\nRegenerating:', trafficItem
response = requests.post(trafficItem+"/operations/generate",
data=json.dumps({"arg1": trafficItem}),
headers={"content-type": "application/json"})
if response.status_code != 202:
return 1
if waitForComplete(response, trafficItem+"/operations/generate/"+response.json()['id']) == 1:
return 1
else:
return 0
def getStats(sessionUrl, csvFile=None, csvEnableFileTimestamp=False, viewName='Flow Statistics'):
# sessionUrl: http://10.219.x.x:11009/api/v1/sessions/1/ixnetwork
#
# csvFile = None or <filename.csv>.
# None will not create a CSV file.
# Provide a <filename>.csv to record all stats to a CSV file.
# Example: getStats(sessionUrl, csvFile='Flow_Statistics.csv')
#
# csvEnableFileTimestamp = True or False. If True, timestamp will be appended to the filename.
#
# viewName options (Not case sensitive):
# NOTE: Not all statistics are listed here.
# You could get the statistic viewName directly from the IxNetwork GUI in the statistics.
#
# 'Port Statistics'
# 'Tx-Rx Frame Rate Statistics'
# 'Port CPU Statistics'
# 'Global Protocol Statistics'
# 'Protocols Summary'
# 'Port Summary'
# 'OSPFv2-RTR Drill Down'
# 'OSPFv2-RTR Per Port'
# 'IPv4 Drill Down'
# 'L2-L3 Test Summary Statistics'
# 'Flow Statistics'
# 'Traffic Item Statistics'
# 'IGMP Host Drill Down'
# 'IGMP Host Per Port'
# 'IPv6 Drill Down'
# 'MLD Host Drill Down'
# 'MLD Host Per Port'
# 'PIMv6 IF Drill Down'
# 'PIMv6 IF Per Port'
# Note: Not all of the viewNames are listed here. You have to get the exact names from
# the IxNetwork GUI in statistics based on your protocol(s).
#
# Return you a dictionary of all the stats: statDict[rowNumber][columnName] == statValue
# Get stats on row 2 for 'Tx Frames' = statDict[2]['Tx Frames']
urlHeadersJson = {'content-type': 'application/json'}
viewList = requests.get('%s/%s/%s' % (sessionUrl, 'statistics', 'view'), headers=urlHeadersJson)
views = ['%s/%s/%s/%s' % (sessionUrl, 'statistics', 'view', str(i['id'])) for i in viewList.json()]
for view in views:
# GetAttribute
response = requests.get('%s' % view, headers=urlHeadersJson)
if response.status_code != 200:
print '\ngetStats: Failed:', response.text
return 1
import re
#caption = response.json()['caption']
captionMatch = re.match(viewName, response.json()['caption'], re.I)
if captionMatch:
# viewObj: sessionUrl + /statistics/view/11'
viewObj = view
break
try:
response = requests.patch(viewObj, data=json.dumps({'enabled': 'true'}), headers=urlHeadersJson)
except:
print '\ngetStats error: No stats available'
return 0
response = requests.get(viewObj+'/page')
if response.status_code != 200:
print '\ngetStats: Failed to get total pages'
return 1
for counter in range(0,31):
totalPages = response.json()['totalPages']
if totalPages == 'null':
print '\nGetting total pages is not ready yet. Waiting %d/30 seconds' % counter
time.sleep(1)
if totalPages != 'null':
break
if totalPages == 'null' and counter == 30:
print '\ngetStats failed: Getting total pages'
return 1
response = requests.get(viewObj+'/page', '-columnCaptions')
if response.status_code != 200:
print '\ngetStats: Failed to get statistic column names'
return 1
if csvFile != None:
import csv
csvFileName = csvFile.replace(' ', '_')
if csvEnableFileTimestamp:
import datetime
timestamp = datetime.datetime.now().strftime('%H%M%S')
if '.' in csvFileName:
csvFileNameTemp = csvFileName.split('.')[0]
csvFileNameExtension = csvFileName.split('.')[1]
csvFileName = csvFileNameTemp+'_'+timestamp+'.'+csvFileNameExtension
else:
csvFileName = csvFileName+'_'+timestamp
csvFile = open(csvFileName, 'w')
csvWriteObj = csv.writer(csvFile)
# Get the stat column names
columnList = response.json()['columnCaptions']
if csvFile != None:
csvWriteObj.writerow(columnList)
# Get the stat values
response = requests.get(viewObj+'/page')
statValueList = response.json()['pageValues']
statDict = {}
flowNumber = 1
for statValue in statValueList:
if csvFile != None:
csvWriteObj.writerow(statValue[0])
print '\nRow: %d' % flowNumber
statDict[flowNumber] = {}
index = 0
for statValue in statValue[0]:
statName = columnList[index]
statDict[flowNumber].update({statName: statValue})
print '\t%s: %s' % (statName, statValue)
index += 1
flowNumber += 1
if csvFile != None:
csvFile.close()
return statDict
# Flow Statistics dictionary output example
'''
Flow: 50
Tx Port: Ethernet - 002
Rx Port: Ethernet - 001
Traffic Item: OSPF T1 to T2
Source/Dest Value Pair: 2.0.21.1-1.0.21.1
Flow Group: OSPF T1 to T2-FlowGroup-1 - Flow Group 0002
Tx Frames: 35873
Rx Frames: 35873
Frames Delta: 0
Loss %: 0
Tx Frame Rate: 3643.5
Rx Frame Rate: 3643.5
Tx L1 Rate (bps): 4313904
Rx L1 Rate (bps): 4313904
Rx Bytes: 4591744
Tx Rate (Bps): 466368
Rx Rate (Bps): 466368
Tx Rate (bps): 3730944
Rx Rate (bps): 3730944
Tx Rate (Kbps): 3730.944
Rx Rate (Kbps): 3730.944
Tx Rate (Mbps): 3.731
Rx Rate (Mbps): 3.731
Store-Forward Avg Latency (ns): 0
Store-Forward Min Latency (ns): 0
Store-Forward Max Latency (ns): 0
First TimeStamp: 00:00:00.722
Last TimeStamp: 00:00:10.568
'''
return
root = "http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork"
serverUrl = "http://192.168.70.127:11009"
# Create blank configuration
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/operations/newconfig', data=json.dumps({}), headers={'content-type': 'application/json'})
waitForComplete(response, root+"/operations/newconfig/"+response.json()["id"])
# Create virtual ports
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/vport', data=json.dumps({}), headers={'content-type': 'application/json'})
# Create virtual ports
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/vport', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.get('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/vport')
vportList = ["%s/vport/%s" % (root, str(i["id"])) for i in response.json()]
# Assign ports
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/operations/assignports', data=json.dumps({'arg1': [{'arg1': '192.168.70.10', 'arg2': '1', 'arg3': '1'}, {'arg1': '192.168.70.10', 'arg2': '2', 'arg3': '1'}], 'arg2': [], 'arg3': vportList, 'arg4': 'true'}), headers={'content-type': 'application/json'})
waitForComplete(response, root+"/operations/assignports/"+response.json()["id"])
[waitForComplete(requests.get(vport), vport) for vport in vportList]
# Create Topology
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology', data=json.dumps({}), headers={'content-type': 'application/json'})
topology1Vports = []
topology1Vports.append(getVportMapping("1/1/1"))
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1', data=json.dumps({'name': 'L2L3 Topo 1'}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1', data=json.dumps({'vports': topology1Vports}), headers={'content-type': 'application/json'})
# Create Topology
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology', data=json.dumps({}), headers={'content-type': 'application/json'})
topology2Vports = []
topology2Vports.append(getVportMapping("1/2/1"))
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2', data=json.dumps({'name': 'L2L3 Topo 2'}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2', data=json.dumps({'vports': topology2Vports}), headers={'content-type': 'application/json'})
# Create Device Group
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1', data=json.dumps({'multiplier': 4}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1', data=json.dumps({'name': 'T1DG1 DG1'}), headers={'content-type': 'application/json'})
# Create Device Group
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1', data=json.dumps({'multiplier': 4}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1', data=json.dumps({'name': 'T2DG1 DG1'}), headers={'content-type': 'application/json'})
# Create Ethernet
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1")
multiValue = response.json()['mac']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': '00:01:01:00:00:01', 'direction': 'increment', 'step': '00:00:00:00:00:01'}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1', data=json.dumps({'name': 'TG1DG1 Eth1'}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1")
multiValue = response.json()['enableVlans']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': True}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1")
multiValue = response.json()['mtu']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': 1500}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/vlan/1")
multiValue = response.json()['priority']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': 7}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/vlan/1")
multiValue = response.json()['vlanId']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': 103, 'direction': 'increment', 'step': 1}), headers={'content-type': 'application/json'})
# Create Ethernet
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1")
multiValue = response.json()['mac']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': '00:01:03:00:00:01', 'direction': 'increment', 'step': '00:00:00:00:00:01'}), headers={'content-type': 'application/json'})
response = requests.patch('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1', data=json.dumps({'name': 'TG2DG1 Eth1'}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1")
multiValue = response.json()['enableVlans']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': True}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1")
multiValue = response.json()['mtu']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': 1500}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/vlan/1")
multiValue = response.json()['priority']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': 5}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/vlan/1")
multiValue = response.json()['vlanId']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': 103, 'direction': 'increment', 'step': 1}), headers={'content-type': 'application/json'})
# Create IPv4
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['resolveGateway']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': True}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['prefix']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': 24}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['gatewayIp']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': '100.1.1.100', 'direction': 'increment', 'step': '0.0.0.1'}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['address']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': '100.1.1.1', 'direction': 'increment', 'step': '0.0.0.1'}), headers={'content-type': 'application/json'})
# Create IPv4
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/ipv4', data=json.dumps({}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['resolveGateway']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': True}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['prefix']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/singleValue", data=json.dumps({'value': 24}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['gatewayIp']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': '100.1.1.1', 'direction': 'increment', 'step': '0.0.0.1'}), headers={'content-type': 'application/json'})
response = requests.get("http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/ipv4/1")
multiValue = response.json()['address']
response = requests.patch('http://192.168.70.127:11009'+multiValue+"/counter", data=json.dumps({'start': '100.1.1.100', 'direction': 'increment', 'step': '0.0.0.1'}), headers={'content-type': 'application/json'})
# Start All Protocols
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/operations/startallprotocols', data=json.dumps({}), headers={'content-type': 'application/json'})
verifyProtocolSessionsNgpf(['http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1', 'http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1', 'http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv4/1', 'http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2/deviceGroup/1/ethernet/1/ipv4/1'])
# Create Traffic Item
print '\nCreating traffic item with appLibrary ...'
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic/trafficItem',
data=json.dumps({'name': 'Topo1 to Topo2',
'trafficType': 'ipv4ApplicationTraffic',
'trafficItemType': 'applicationLibrary'}),
headers={'content-type': 'application/json'})
# Create Endpoints
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic/trafficItem/1/endpointSet', data=json.dumps({'name': 'FlowGroup-1',
'sources': ['http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/1'],
'destinations': ['http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/topology/2']}), headers={'content-type': 'application/json'})
# Create appLibraryProfile
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic/trafficItem/1/appLibProfile',
data=json.dumps({'configuredFlows': ['Amazon_EC2_Create_Key_Pair_Flow']}),
headers={'content-type': 'application/json'})
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic/operations/applystatefultraffic', data=json.dumps({'arg1': 'http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic'}), headers={'content-type': 'application/json'})
waitForComplete(response, root+"/traffic/operations/applystatefultraffic/"+response.json()["id"])
response = requests.post('http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic/operations/startstatefultraffic', data=json.dumps({'arg1': 'http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork/traffic'}), headers={'content-type': 'application/json'})
print '\nWaiting for statistics ...'
time.sleep(17)
getStats(sessionUrl='http://192.168.70.127:11009/api/v1/sessions/1/ixnetwork',
csvFile=None, csvEnableFileTimestamp=False, viewName='Application Traffic Item TCP Statistics')
'''
Row: 1
Traffic Item: Topo1 to Topo2
Initiator SYNs Sent: 115532
Initiator SYN/SYN-ACKs Received: 115532
Initiator FINs Sent: 115432
Initiator FINs Received: 115431
Initiator FIN-ACKs Sent: 115431
Initiator FIN-ACKs Received: 115431
Initiator Resets Sent: 0
Initiator Resets Received: 0
Initiator Retries: 0
Initiator Timeouts: 0
Responder SYN-ACKs Sent: 115533
Responder SYN/SYN-ACKs Received: 115533
Responder FINs Sent: 115432
Responder FINs Received: 115433
Responder FIN-ACKs Sent: 115432
Responder FIN-ACKs Received: 115432
Responder Accept Queue Entries: 0
Responder Resets Sent: 0
Responder Resets Received: 0
Responder Retries: 0
Responder Timeouts: 0
Responder Connection Requests Failed: 0
Responder Listen Queue Drops: 0
| 48.072333 | 422 | 0.657538 | 3,402 | 26,584 | 5.132863 | 0.124633 | 0.026801 | 0.035735 | 0.052228 | 0.626561 | 0.599874 | 0.57754 | 0.575306 | 0.557554 | 0.549536 | 0 | 0.099704 | 0.175256 | 26,584 | 552 | 423 | 48.15942 | 0.696739 | 0 | 0 | 0.33574 | 0 | 0.205776 | 0.403309 | 0.009678 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.01444 | null | null | 0.075812 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
9bbf3f1949ba20aa8cc1ec58dcc83d8916629558 | 899 | py | Python | fsph/tf_ops.py | glotzerlab/fsph | 5896cffe2916763db57b801d2c9b092db232fc7a | [
"MIT"
] | 3 | 2019-02-09T12:50:28.000Z | 2019-07-30T15:49:49.000Z | fsph/tf_ops.py | glotzerlab/fsph | 5896cffe2916763db57b801d2c9b092db232fc7a | [
"MIT"
] | 3 | 2019-08-13T13:48:35.000Z | 2020-10-15T13:57:09.000Z | fsph/tf_ops.py | glotzerlab/fsph | 5896cffe2916763db57b801d2c9b092db232fc7a | [
"MIT"
] | null | null | null |
import tensorflow as tf
from tensorflow.python.framework import ops
from . import _fsph
so_name = _fsph.__file__.replace('/_fsph.', '/_tf_ops.')
all_ops = tf.load_op_library(so_name)
spherical_harmonic_series = all_ops.spherical_harmonic_series
spherical_harmonic_series_grad = all_ops.spherical_harmonic_series_grad
@ops.RegisterGradient('SphericalHarmonicSeries')
def _spherical_harmonic_series_grad(op, grad):
# input_grad:: (..., Nsphs, 2)
input_grad = spherical_harmonic_series_grad(*op.inputs)
# grad:: (..., Nsphs) -> (..., Nsphs, 1)
grad = tf.expand_dims(grad, -1)
# result::(..., 2, 1)
result = (tf.linalg.matmul(tf.math.conj(input_grad), grad, transpose_a=True) +
tf.linalg.matmul(input_grad, tf.math.conj(grad), transpose_a=True))
# result -> (..., 2)
result = tf.math.real(tf.squeeze(result, -1))*0.5
return [result, None, None]
| 32.107143 | 82 | 0.701891 | 123 | 899 | 4.804878 | 0.365854 | 0.172589 | 0.233503 | 0.182741 | 0.196278 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011749 | 0.147942 | 899 | 27 | 83 | 33.296296 | 0.759791 | 0.117909 | 0 | 0 | 0 | 0 | 0.049555 | 0.029225 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.2 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
32cea5e060c1b072cf56d1474c507ace5be1a142 | 2,260 | py | Python | omniture_python/omniture_wrapper.py | DeStars/omniture_python | 3e216474f58aa75a9ec6a208451e85808c4cb38e | [
"MIT"
] | 2 | 2016-05-27T07:20:08.000Z | 2016-09-13T23:50:42.000Z | omniture_python/omniture_wrapper.py | DeStars/omniture_python | 3e216474f58aa75a9ec6a208451e85808c4cb38e | [
"MIT"
] | 1 | 2016-12-22T10:12:09.000Z | 2016-12-22T10:12:09.000Z | omniture_python/omniture_wrapper.py | DeStars/omniture_python | 3e216474f58aa75a9ec6a208451e85808c4cb38e | [
"MIT"
] | null | null | null | import binascii
import urllib2
import json
from hashlib import sha1
import base64
import datetime
import calendar
import time
__author__ = 'DeStars'
class OmnitureWrapper:
def __init__(self, user_name, secret):
self._user_name = user_name
self._secret = secret
def __create_header(self):
"""
Creates header for request
:return: Header string
"""
utc_timestamp = datetime.datetime.utcnow()
nonce = str(calendar.timegm(utc_timestamp.timetuple()))
base64nonce = binascii.b2a_base64(binascii.a2b_qp(nonce))
created_on = utc_timestamp.strftime("%Y-%m-%dT%H:%M:%SZ")
sha_object = sha1(nonce + created_on + self._secret)
password_64 = base64.b64encode(bytes(sha_object.digest()))
return 'UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"' % (
self._user_name, password_64.strip(), base64nonce.strip(), created_on)
def __get_request_data(self, request):
request.add_header('X-WSSE', self.__create_header())
return json.loads(urllib2.urlopen(request).read(), encoding='utf-8')
def send_request(self, method, request_data, retry_delay=15):
"""
Sends request to the endpoint
:param method: String of method
:param request_data: json object of request body
:return: Response data
"""
request = urllib2.Request('https://api.omniture.com/admin/1.4/rest/?method=%s' % method,
json.dumps(request_data))
try:
return self.__get_request_data(request)
except urllib2.HTTPError as e:
print '{0}. Retrying in {1} seconds...'.format(e, retry_delay)
time.sleep(retry_delay)
return self.send_request(method, request_data)
def retrieve_report(self, request, delay=5):
"""
Queues and retrieves the report
:param request: json object of request body
:return: Report data
"""
response = self.send_request(method='Report.Queue', request_data=request)
time.sleep(delay)
report = self.send_request(method='Report.Get', request_data={'reportID': response['reportID']})
return report
| 36.451613 | 104 | 0.64115 | 269 | 2,260 | 5.174721 | 0.416357 | 0.063218 | 0.025862 | 0.045259 | 0.08046 | 0.041667 | 0 | 0 | 0 | 0 | 0 | 0.018768 | 0.245575 | 2,260 | 61 | 105 | 37.04918 | 0.797654 | 0 | 0 | 0 | 0 | 0 | 0.122986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.076923 | 0.205128 | null | null | 0.025641 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
32d13faac7815a918a855e65bb49eb381ca622c1 | 1,068 | py | Python | greedy/element_swapping.py | elenaborisova/LeetCode-Solutions | 98376aab7fd150a724e316357ae5ea46988d9eac | [
"MIT"
] | null | null | null | greedy/element_swapping.py | elenaborisova/LeetCode-Solutions | 98376aab7fd150a724e316357ae5ea46988d9eac | [
"MIT"
] | null | null | null | greedy/element_swapping.py | elenaborisova/LeetCode-Solutions | 98376aab7fd150a724e316357ae5ea46988d9eac | [
"MIT"
] | null | null | null | def find_min_idx(i, count, arr, min_element):
min_idx = 0
while i <= count and i < len(arr):
if arr[i] < min_element:
min_element = arr[i]
min_idx = i
i += 1
return min_idx
def find_min_array(arr, k):
min_element = 1_000_000
i = 0
count = k
while k:
min_idx = find_min_idx(i, count, arr, min_element)
while k and min_idx:
arr[min_idx], arr[min_idx - 1] = arr[min_idx - 1], arr[min_idx]
min_idx -= 1
k -= 1
i = min_idx + 1
min_element = 1_000_000
return arr
# Test cases:
print(find_min_array([5, 3, 1], 2) == [1, 5, 3])
print(find_min_array([8, 9, 11, 2, 1], 3) == [2, 8, 9, 11, 1])
print(find_min_array([5, 6, 1, 2, 6, 7, 8, 9], 3) == [1, 5, 2, 6, 6, 7, 8, 9])
print(find_min_array([8, 9, 11, 2, 1], 5) == [1, 8, 9, 2, 11])
print(find_min_array([8, 9, 11, 2, 1], 6) == [1, 8, 2, 9, 11])
print(find_min_array([5, 6, 1, 2, 6, 7, 8, 9], 100) == [1, 2, 5, 6, 6, 7, 8, 9])
print(find_min_array([5, 3, 1], 0) == [5, 3, 1])
| 26.7 | 80 | 0.514981 | 209 | 1,068 | 2.435407 | 0.143541 | 0.153242 | 0.188605 | 0.233792 | 0.607073 | 0.502947 | 0.502947 | 0.400786 | 0.286837 | 0.098232 | 0 | 0.148594 | 0.300562 | 1,068 | 39 | 81 | 27.384615 | 0.532798 | 0.0103 | 0 | 0.071429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0 | 0 | 0.142857 | 0.25 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
32e717dd24e85d1bcaba803cc1e79932f08ffd6f | 230 | py | Python | config/general.py | veltzer/pyeventroute | 1f1511d55b437a00ba5d3e0fce24d88b013d7c0b | [
"MIT"
] | 14 | 2017-01-06T20:01:29.000Z | 2021-09-26T08:26:07.000Z | config/general.py | veltzer/pyeventroute | 1f1511d55b437a00ba5d3e0fce24d88b013d7c0b | [
"MIT"
] | 3 | 2020-05-20T05:05:52.000Z | 2021-09-27T06:47:36.000Z | config/general.py | veltzer/pyeventroute | 1f1511d55b437a00ba5d3e0fce24d88b013d7c0b | [
"MIT"
] | 10 | 2017-04-01T04:36:34.000Z | 2020-12-26T07:36:25.000Z | import datetime
import os
import socket
general_current_folder = os.path.basename(os.getcwd())
general_current_year = datetime.datetime.now().year
general_homedir = os.path.expanduser("~")
general_hostname = socket.gethostname()
| 25.555556 | 54 | 0.804348 | 30 | 230 | 5.966667 | 0.533333 | 0.156425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082609 | 230 | 8 | 55 | 28.75 | 0.848341 | 0 | 0 | 0 | 0 | 0 | 0.004348 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
32f7669a6e0afdea8ea94778c4502f11d6406836 | 11,568 | py | Python | test/test_general.py | matthewdeanmartin/pydoc_fork | 174475b15be966f3751d5563b4db0beecc3ab1f9 | [
"MIT"
] | null | null | null | test/test_general.py | matthewdeanmartin/pydoc_fork | 174475b15be966f3751d5563b4db0beecc3ab1f9 | [
"MIT"
] | 1 | 2022-01-17T16:28:45.000Z | 2022-01-17T16:28:45.000Z | test/test_general.py | matthewdeanmartin/pydoc_fork | 174475b15be966f3751d5563b4db0beecc3ab1f9 | [
"MIT"
] | null | null | null | # import contextlib
# import importlib.util
# import inspect
# import os
# import pkgutil
# import py_compile
# import re
# import tempfile
# import unittest
# import urllib.parse
#
# import sys
#
#
# import test.support
# from test import pydoc_mod
# from test.support import import_helper
# from test.support import os_helper
# from test.support import reap_children, requires_docstrings
# from test.support import threading_helper
# from test.support.os_helper import TESTFN, rmtree, unlink
# from test.support.script_helper import assert_python_ok, assert_python_failure
#
#
# class nonascii:
# "Це не латиниця"
# pass
#
#
# if test.support.HAVE_DOCSTRINGS:
# expected_data_docstrings = (
# "dictionary for instance variables (if defined)",
# "list of weak references to the object (if defined)",
# ) * 2
# else:
# expected_data_docstrings = ("", "", "", "")
#
# expected_text_pattern = """
# NAME
# test.pydoc_mod - This is a test module for test_pydoc
# %s
# CLASSES
# builtins.object
# A
# B
# C
# \x20\x20\x20\x20
# class A(builtins.object)
# | Hello and goodbye
# |\x20\x20
# | Methods defined here:
# |\x20\x20
# | __init__()
# | Wow, I have no function!
# |\x20\x20
# | ----------------------------------------------------------------------
# | Data descriptors defined here:
# |\x20\x20
# | __dict__%s
# |\x20\x20
# | __weakref__%s
# \x20\x20\x20\x20
# class B(builtins.object)
# | Data descriptors defined here:
# |\x20\x20
# | __dict__%s
# |\x20\x20
# | __weakref__%s
# |\x20\x20
# | ----------------------------------------------------------------------
# | Data and other attributes defined here:
# |\x20\x20
# | NO_MEANING = 'eggs'
# |\x20\x20
# | __annotations__ = {'NO_MEANING': <class 'str'>}
# \x20\x20\x20\x20
# class C(builtins.object)
# | Methods defined here:
# |\x20\x20
# | get_answer(self)
# | Return say_no()
# |\x20\x20
# | is_it_true(self)
# | Return self.get_answer()
# |\x20\x20
# | say_no(self)
# |\x20\x20
# | ----------------------------------------------------------------------
# | Data descriptors defined here:
# |\x20\x20
# | __dict__
# | dictionary for instance variables (if defined)
# |\x20\x20
# | __weakref__
# | list of weak references to the object (if defined)
#
# FUNCTIONS
# doc_func()
# This function solves all of the world's problems:
# hunger
# lack of Python
# war
# \x20\x20\x20\x20
# nodoc_func()
#
# DATA
# __xyz__ = 'X, Y and Z'
#
# VERSION
# 1.2.3.4
#
# AUTHOR
# Benjamin Peterson
#
# CREDITS
# Nobody
#
# FILE
# %s
# """.strip()
#
# expected_text_data_docstrings = tuple(
# "\n | " + s if s else "" for s in expected_data_docstrings
# )
#
# html2text_of_expected = """
# test.pydoc_mod (version 1.2.3.4)
# This is a test module for test_pydoc
#
# Classes
# builtins.object
# A
# B
# C
#
# class A(builtins.object)
# Hello and goodbye
#
# Methods defined here:
# __init__()
# Wow, I have no function!
#
# Data descriptors defined here:
# __dict__
# dictionary for instance variables (if defined)
# __weakref__
# list of weak references to the object (if defined)
#
# class B(builtins.object)
# Data descriptors defined here:
# __dict__
# dictionary for instance variables (if defined)
# __weakref__
# list of weak references to the object (if defined)
# Data and other attributes defined here:
# NO_MEANING = 'eggs'
# __annotations__ = {'NO_MEANING': <class 'str'>}
#
#
# class C(builtins.object)
# Methods defined here:
# get_answer(self)
# Return say_no()
# is_it_true(self)
# Return self.get_answer()
# say_no(self)
# Data descriptors defined here:
# __dict__
# dictionary for instance variables (if defined)
# __weakref__
# list of weak references to the object (if defined)
#
# Functions
# doc_func()
# This function solves all of the world's problems:
# hunger
# lack of Python
# war
# nodoc_func()
#
# Data
# __xyz__ = 'X, Y and Z'
#
# Author
# Benjamin Peterson
#
# Credits
# Nobody
# """
#
# expected_html_data_docstrings = tuple(
# s.replace(" ", " ") for s in expected_data_docstrings
# )
#
# # output pattern for missing module
# missing_pattern = """\
# No Python documentation found for %r.
# Use help() to get the interactive help utility.
# Use help(str) for help on the str class.""".replace(
# "\n", os.linesep
# )
#
# # output pattern for module with bad imports
# badimport_pattern = "problem in %s - ModuleNotFoundError: No module named %r"
#
# expected_dynamicattribute_pattern = """
# Help on class DA in module %s:
#
# class DA(builtins.object)
# | Data descriptors defined here:
# |\x20\x20
# | __dict__%s
# |\x20\x20
# | __weakref__%s
# |\x20\x20
# | ham
# |\x20\x20
# | ----------------------------------------------------------------------
# | Data and other attributes inherited from Meta:
# |\x20\x20
# | ham = 'spam'
# """.strip()
#
# expected_virtualattribute_pattern1 = """
# Help on class Class in module %s:
#
# class Class(builtins.object)
# | Data and other attributes inherited from Meta:
# |\x20\x20
# | LIFE = 42
# """.strip()
#
# expected_virtualattribute_pattern2 = """
# Help on class Class1 in module %s:
#
# class Class1(builtins.object)
# | Data and other attributes inherited from Meta1:
# |\x20\x20
# | one = 1
# """.strip()
#
# expected_virtualattribute_pattern3 = """
# Help on class Class2 in module %s:
#
# class Class2(Class1)
# | Method resolution order:
# | Class2
# | Class1
# | builtins.object
# |\x20\x20
# | Data and other attributes inherited from Meta1:
# |\x20\x20
# | one = 1
# |\x20\x20
# | ----------------------------------------------------------------------
# | Data and other attributes inherited from Meta3:
# |\x20\x20
# | three = 3
# |\x20\x20
# | ----------------------------------------------------------------------
# | Data and other attributes inherited from Meta2:
# |\x20\x20
# | two = 2
# """.strip()
#
# expected_missingattribute_pattern = """
# Help on class C in module %s:
#
# class C(builtins.object)
# | Data and other attributes defined here:
# |\x20\x20
# | here = 'present!'
# """.strip()
#
#
# def run_pydoc(module_name, *args, **env):
# """
# Runs pydoc on the specified module. Returns the stripped
# output of pydoc.
# """
# args = args + (module_name,)
# # do not write bytecode files to avoid caching errors
# rc, out, err = assert_python_ok("-B", pydoc.__file__, *args, **env)
# return out.strip()
#
#
# def run_pydoc_fail(module_name, *args, **env):
# """
# Runs pydoc on the specified module expecting a failure.
# """
# args = args + (module_name,)
# rc, out, err = assert_python_failure("-B", pydoc.__file__, *args, **env)
# return out.strip()
#
#
# def get_pydoc_html(module):
# "Returns pydoc generated output as html"
# doc = pydoc.HTMLDoc()
# output = doc.docmodule(module)
# loc = doc.getdocloc(pydoc_mod) or ""
# if loc:
# loc = '<br><a href="' + loc + '">Module Docs</a>'
# return output.strip(), loc
#
#
# def get_html_title(text):
# # Bit of hack, but good enough for test purposes
# header, _, _ = text.partition("</head>")
# _, _, title = header.partition("<title>")
# title, _, _ = title.partition("</title>")
# return title
#
#
# def html2text(html):
# """A quick and dirty implementation of html2text.
#
# Tailored for pydoc tests only.
# """
# return pydoc.replace(
# re.sub("<.*?>", "", html), " ", " ", ">", ">", "<", "<"
# )
#
#
# class PydocBaseTest(unittest.TestCase):
# def _restricted_walk_packages(self, walk_packages, path=None):
# """
# A version of pkgutil.walk_packages() that will restrict itself to
# a given path.
# """
# default_path = path or [os.path.dirname(__file__)]
#
# def wrapper(path=None, prefix="", onerror=None):
# return walk_packages(path or default_path, prefix, onerror)
#
# return wrapper
#
# @contextlib.contextmanager
# def restrict_walk_packages(self, path=None):
# walk_packages = pkgutil.walk_packages
# pkgutil.walk_packages = self._restricted_walk_packages(walk_packages, path)
# try:
# yield
# finally:
# pkgutil.walk_packages = walk_packages
#
#
# class PydocDocTest(unittest.TestCase):
# maxDiff = None
#
# def test_stripid(self):
# # test with strings, other implementations might have different repr()
# stripid = pydoc.stripid
# # strip the id
# self.assertEqual(
# stripid("<function stripid at 0x88dcee4>"), "<function stripid>"
# )
# self.assertEqual(
# stripid("<function stripid at 0x01F65390>"), "<function stripid>"
# )
# # nothing to strip, return the same text
# self.assertEqual(stripid("42"), "42")
# self.assertEqual(
# stripid("<type 'exceptions.Exception'>"), "<type 'exceptions.Exception'>"
# )
#
# def test_synopsis(self):
# self.addCleanup(unlink, TESTFN)
# for encoding in ("ISO-8859-1", "UTF-8"):
# with open(TESTFN, "w", encoding=encoding) as script:
# if encoding != "UTF-8":
# print("#coding: {}".format(encoding), file=script)
# print('"""line 1: h\xe9', file=script)
# print('line 2: hi"""', file=script)
# synopsis = pydoc.synopsis(TESTFN, {})
# self.assertEqual(synopsis, "line 1: h\xe9")
#
# def test_splitdoc_with_description(self):
# example_string = "I Am A Doc\n\n\nHere is my description"
# self.assertEqual(
# pydoc.splitdoc(example_string), ("I Am A Doc", "\nHere is my description")
# )
#
# def test_is_package_when_not_package(self):
# with os_helper.temp_cwd() as test_dir:
# self.assertFalse(pydoc.ispackage(test_dir))
#
# # def test_is_package_when_is_package(self):
# # with os_helper.temp_cwd() as test_dir:
# # init_path = os.path.join(test_dir, '__init__.py')
# # print(init_path)
# # open(init_path, 'w').close()
# # self.assertTrue(pydoc.ispackage(test_dir))
# # os.remove(init_path)
#
#
# class TestDescriptions(unittest.TestCase):
# @requires_docstrings
# def test_html_for_https_links(self):
# def a_fn_with_https_link():
# """a link https://localhost/"""
# pass
#
# html = pydoc.HTMLDoc().document(a_fn_with_https_link)
# self.assertIn('<a href="https://localhost/">https://localhost/</a>', html)
#
#
# def setUpModule():
# thread_info = threading_helper.threading_setup()
# unittest.addModuleCleanup(threading_helper.threading_cleanup, *thread_info)
# unittest.addModuleCleanup(reap_children)
#
#
# if __name__ == "__main__":
# unittest.main()
| 27.874699 | 88 | 0.570712 | 1,297 | 11,568 | 4.887433 | 0.239784 | 0.039754 | 0.017037 | 0.031235 | 0.420098 | 0.35321 | 0.290109 | 0.260924 | 0.199401 | 0.160593 | 0 | 0.024839 | 0.262189 | 11,568 | 414 | 89 | 27.942029 | 0.717868 | 0.92704 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fd02036f99e8bf6af116de6a2316cbb2c4857270 | 3,179 | py | Python | AppServer/lib/django-1.2/tests/regressiontests/text/tests.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-1.2/tests/regressiontests/text/tests.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-1.2/tests/regressiontests/text/tests.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | # coding: utf-8
from django.test import TestCase
from django.utils.text import *
from django.utils.http import urlquote, urlquote_plus, cookie_date, http_date
from django.utils.encoding import iri_to_uri
class TextTests(TestCase):
"""
Tests for stuff in django.utils.text and other text munging util functions.
"""
def test_smart_split(self):
self.assertEquals(list(smart_split(r'''This is "a person" test.''')),
[u'This', u'is', u'"a person"', u'test.'])
self.assertEquals(list(smart_split(r'''This is "a person's" test.'''))[2],
u'"a person\'s"')
self.assertEquals(list(smart_split(r'''This is "a person\"s" test.'''))[2],
u'"a person\\"s"')
self.assertEquals(list(smart_split('''"a 'one''')), [u'"a', u"'one"])
self.assertEquals(list(smart_split(r'''all friends' tests'''))[1],
"friends'")
self.assertEquals(list(smart_split(u'url search_page words="something else"')),
[u'url', u'search_page', u'words="something else"'])
self.assertEquals(list(smart_split(u"url search_page words='something else'")),
[u'url', u'search_page', u"words='something else'"])
self.assertEquals(list(smart_split(u'url search_page words "something else"')),
[u'url', u'search_page', u'words', u'"something else"'])
self.assertEquals(list(smart_split(u'url search_page words-"something else"')),
[u'url', u'search_page', u'words-"something else"'])
self.assertEquals(list(smart_split(u'url search_page words=hello')),
[u'url', u'search_page', u'words=hello'])
self.assertEquals(list(smart_split(u'url search_page words="something else')),
[u'url', u'search_page', u'words="something', u'else'])
self.assertEquals(list(smart_split("cut:','|cut:' '")),
[u"cut:','|cut:' '"])
def test_urlquote(self):
self.assertEquals(urlquote(u'Paris & Orl\xe9ans'),
u'Paris%20%26%20Orl%C3%A9ans')
self.assertEquals(urlquote(u'Paris & Orl\xe9ans', safe="&"),
u'Paris%20&%20Orl%C3%A9ans')
self.assertEquals(urlquote_plus(u'Paris & Orl\xe9ans'),
u'Paris+%26+Orl%C3%A9ans')
self.assertEquals(urlquote_plus(u'Paris & Orl\xe9ans', safe="&"),
u'Paris+&+Orl%C3%A9ans')
def test_cookie_date(self):
t = 1167616461.0
self.assertEquals(cookie_date(t), 'Mon, 01-Jan-2007 01:54:21 GMT')
def test_http_date(self):
t = 1167616461.0
self.assertEquals(http_date(t), 'Mon, 01 Jan 2007 01:54:21 GMT')
def test_iri_to_uri(self):
self.assertEquals(iri_to_uri(u'red%09ros\xe9#red'),
'red%09ros%C3%A9#red')
self.assertEquals(iri_to_uri(u'/blog/for/J\xfcrgen M\xfcnster/'),
'/blog/for/J%C3%BCrgen%20M%C3%BCnster/')
self.assertEquals(iri_to_uri(u'locations/%s' % urlquote_plus(u'Paris & Orl\xe9ans')),
'locations/Paris+%26+Orl%C3%A9ans')
def test_iri_to_uri_idempotent(self):
self.assertEquals(iri_to_uri(iri_to_uri(u'red%09ros\xe9#red')),
'red%09ros%C3%A9#red')
| 38.768293 | 93 | 0.618433 | 454 | 3,179 | 4.202643 | 0.196035 | 0.184486 | 0.125786 | 0.157233 | 0.75 | 0.717505 | 0.602725 | 0.502621 | 0.502621 | 0.502621 | 0 | 0.038523 | 0.207927 | 3,179 | 81 | 94 | 39.246914 | 0.719222 | 0.028311 | 0 | 0.074074 | 0 | 0 | 0.336804 | 0.045884 | 0 | 0 | 0 | 0 | 0.407407 | 1 | 0.111111 | false | 0 | 0.074074 | 0 | 0.203704 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fd1f1e149436d952e670d564355388f74e045ceb | 738 | py | Python | src/modules/Curvature.py | aaanh/duplicated_accelcamp | 7d4b60ace023bede907f8ed367ba492731a1951d | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | src/modules/Curvature.py | aaanh/duplicated_accelcamp | 7d4b60ace023bede907f8ed367ba492731a1951d | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | 2 | 2021-05-21T16:31:41.000Z | 2021-08-25T16:05:48.000Z | src/modules/Curvature.py | aaanh/duplicated_accelcamp | 7d4b60ace023bede907f8ed367ba492731a1951d | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | import numpy as np
from modules.DataStructures import AccelData
def GenADot(_AccelData:AccelData):
""" Outputs an array of doubles that represents the first-order derivative of the acceleration data """
adot_list = np.array([])
dt = _AccelData.t[1]-_AccelData.t[0]
for i in range(len(_AccelData.getSingleAxis(0))-1):
# basically appends a new dy/dt to the list
adot_list = np.array(list(adot_list)+[(_AccelData.getSingleAxis(1)[i+1]-_AccelData.getSingleAxis(1)[i])/dt])
return adot_list
def Genyx2(_AccelData:AccelData):
"""does y*x^2 for the given data set"""
olist = (np.square(_AccelData.getSingleAxis(0))*_AccelData.getSingleAxis(1))[:-1]
return olist # double[]
| 38.842105 | 117 | 0.688347 | 103 | 738 | 4.805825 | 0.504854 | 0.222222 | 0.139394 | 0.060606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019967 | 0.185637 | 738 | 18 | 118 | 41 | 0.803661 | 0.246612 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.181818 | 0 | 0.545455 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
fd2066277e9f125e2d486f2a155c1e71ec535fb6 | 4,524 | py | Python | calvin/runtime/south/plugins/async/twistedimpl/http_client.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | 1 | 2016-05-10T22:36:31.000Z | 2016-05-10T22:36:31.000Z | calvin/runtime/south/plugins/async/twistedimpl/http_client.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | null | null | null | calvin/runtime/south/plugins/async/twistedimpl/http_client.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# from twisted.internet.task import react
from twisted.internet import reactor
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
try:
from twisted.internet.ssl import ClientContextFactory
HAS_OPENSSL = True
except:
# Probably no OpenSSL available.
HAS_OPENSSL = False
from twisted.web.client import FileBodyProducer
from twisted.internet.defer import Deferred
from twisted.internet.protocol import Protocol
from StringIO import StringIO
from urllib import urlencode
# from calvin.utilities.calvinlogger import get_logger
from calvin.utilities.calvin_callback import CalvinCBClass
# _log = get_logger(__name__)
class HTTPRequest(object):
def __init__(self):
self._response = {}
def parse_headers(self, response):
self._response = {}
self._response['version'] = "%s/%d.%d" % (response.version)
self._response['status'] = response.code
self._response['phrase'] = response.phrase
self._response['headers'] = {}
for hdr, val in response.headers.getAllRawHeaders():
self._response['headers'][hdr.lower()] = val[0] if isinstance(val, list) and len(val) > 0 else val
def parse_body(self, body):
self._response['body'] = body
def body(self):
return self._response.get('body', None)
def headers(self):
return self._response.get('headers', None)
def status(self):
return self._response.get('status', None)
def version(self):
return self._response.get('version', None)
def phrase(self):
return self._response.get('phrase', None)
def encode_params(params):
if params:
return "?" + urlencode(params)
return ""
def encode_headers(headers):
twisted_headers = Headers()
for k, v in headers.items():
key = k.encode('ascii', 'ignore')
val = v.encode('ascii', 'ignore')
twisted_headers.addRawHeader(key, val)
return twisted_headers
def encode_body(data):
if not data:
return None
if not isinstance(data, str):
return None
return FileBodyProducer(StringIO(data))
class BodyReader(Protocol):
def __init__(self, deferred, cb, request):
self.deferred = deferred
self.data = ""
self.cb = cb
self.request = request
def dataReceived(self, bytes):
self.data += bytes
def connectionLost(self, reason):
self.deferred.callback(None)
self.cb(self.data, self.request)
class HTTPClient(CalvinCBClass):
def create_agent(self):
if HAS_OPENSSL:
class WebClientContextFactory(ClientContextFactory):
"""TODO: enable certificate verification, hostname checking"""
def getContext(self, hostname, port):
return ClientContextFactory.getContext(self)
return Agent(reactor, WebClientContextFactory())
else:
return Agent(reactor)
def __init__(self, callbacks=None):
super(HTTPClient, self).__init__(callbacks)
self._agent = self.create_agent()
def _receive_headers(self, response, request):
request.parse_headers(response)
self._callback_execute('receive-headers', request)
finished = Deferred()
response.deliverBody(BodyReader(finished, self._receive_body, request))
return finished
def _receive_body(self, response, request):
request.parse_body(response)
self._callback_execute('receive-body', request)
def request(self, command, url, params, headers, data):
url += encode_params(params)
twisted_headers = encode_headers(headers)
body = encode_body(data)
deferred = self._agent.request(command, url, headers=twisted_headers, bodyProducer=body)
request = HTTPRequest()
deferred.addCallback(self._receive_headers, request)
return request
| 30.77551 | 110 | 0.679045 | 533 | 4,524 | 5.628518 | 0.315197 | 0.064 | 0.031667 | 0.036667 | 0.102333 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003128 | 0.222591 | 4,524 | 146 | 111 | 30.986301 | 0.849872 | 0.173298 | 0 | 0.042553 | 0 | 0 | 0.033629 | 0 | 0 | 0 | 0 | 0.006849 | 0 | 1 | 0.212766 | false | 0 | 0.106383 | 0.06383 | 0.531915 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
fd24a1d324963acf933dec8d20026251f8351945 | 431 | py | Python | drawing.py | limresgrp/free-energy-gnn | 22827686b488ec0f0ffa77367dba9e23122714ac | [
"Apache-2.0"
] | null | null | null | drawing.py | limresgrp/free-energy-gnn | 22827686b488ec0f0ffa77367dba9e23122714ac | [
"Apache-2.0"
] | null | null | null | drawing.py | limresgrp/free-energy-gnn | 22827686b488ec0f0ffa77367dba9e23122714ac | [
"Apache-2.0"
] | null | null | null | from torch_geometric.data import Data
from torch_geometric.utils import to_networkx
from networkx.drawing.nx_pydot import write_dot
def save_graph(nodes, edges, filename, to_undirected=True):
graph = Data(x=nodes, edge_index=edges)
nx_graph = to_networkx(graph, node_attrs=["x"], to_undirected=to_undirected)
write_dot(nx_graph, filename)
# dot_graph = to_pydot(nx_graph)
# dot_graph.write(filename)
pass
| 33.153846 | 80 | 0.767981 | 65 | 431 | 4.8 | 0.415385 | 0.115385 | 0.115385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.141531 | 431 | 12 | 81 | 35.916667 | 0.843243 | 0.12993 | 0 | 0 | 0 | 0 | 0.002688 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0.125 | 0.375 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 2 |
fd290cd0b744db2d793b1ef6e1d039e5ae14b568 | 257 | py | Python | source/StockDataLoader.py | moauris/cate_label_py | b70482fa9904d72ea3c6f7a14b198f4bc2fda65f | [
"MIT"
] | null | null | null | source/StockDataLoader.py | moauris/cate_label_py | b70482fa9904d72ea3c6f7a14b198f4bc2fda65f | [
"MIT"
] | null | null | null | source/StockDataLoader.py | moauris/cate_label_py | b70482fa9904d72ea3c6f7a14b198f4bc2fda65f | [
"MIT"
] | null | null | null | # 从某个 xlsx 中读取数据为 Pandas DataFrame 对象
import pandas as pd
import xlwings as xw
def ReadData(path: str, sheetName: str) -> pd.DataFrame:
book = xw.Book(path)
sheet = book.sheets[sheetName]
return sheet["A1"].expand().options(pd.DataFrame).value | 28.555556 | 59 | 0.715953 | 38 | 257 | 4.842105 | 0.631579 | 0.119565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004673 | 0.167315 | 257 | 9 | 59 | 28.555556 | 0.85514 | 0.136187 | 0 | 0 | 0 | 0 | 0.00905 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
fd3d9f5272113201bf7c16f496bd781bcf36aef1 | 5,115 | py | Python | Computer science/Fundamentals/Essentials/Web technologies/Domains/topic.py | chanchanchong/PYTHON-TRACK-IN-HYPERSKILL | 462fe08ff4a2b183fd45a0235ab1ec7a788bd54c | [
"MIT"
] | null | null | null | Computer science/Fundamentals/Essentials/Web technologies/Domains/topic.py | chanchanchong/PYTHON-TRACK-IN-HYPERSKILL | 462fe08ff4a2b183fd45a0235ab1ec7a788bd54c | [
"MIT"
] | null | null | null | Computer science/Fundamentals/Essentials/Web technologies/Domains/topic.py | chanchanchong/PYTHON-TRACK-IN-HYPERSKILL | 462fe08ff4a2b183fd45a0235ab1ec7a788bd54c | [
"MIT"
] | null | null | null | # Imagine how inconvenient it would be to communicate if
# people addressed each other not by name but by a
# numerical value corresponding to their birthday or phone
# number. If there were no names, people would definitely
# try to come up with them.
# When a computer connects to the Internet, it is assigned
# a unique number called IP Address. Each web resource
# also has one. For example, If you write it in the address bar, the
# browser will open the site of the search engine Google.
# Unless you have a phenomenal memory, it is way too
# difficult to remember long numeric values to visit several
# sites, and this is why domain names were invented. It's
# much easier to write google.com instead of a long set of
# numbers. The domain name acts as a unique name on the
# Internet and is a simpler and more human-friendly way of
# recoding IP addresses.
# All information about domain names is stored in a
# distributed database of DNS (Domain Name System),
# which is a network of computers scattered around the
# world.
# 1. Domain name structure
# Domain are arranged hierarchically: they consist of
# levels. The hierarchical structure allows the browser to
# quickly find and open the site. By default, each domain
# consists of two levels, but there can be more levels
# (three, four, etc).
# Let's take a closer look at domains placed from the root to
# third levels.
# 2. Root domain
# The root domain, or the top (zero) level domain, is
# marked with a dot. In common use, the dot is not
# displayed as part of the domain name.
# You can skip the root domain because it does not
# interfere with access to the site.
# 3. Top-level domain
# The top-level domains are divided into two groups:
# national domain names and public domains.
# The first group defines the region of the site and its
# geographical location: .us for the United States and .eu
# for the European Union.
# The second group does not reflect the geographical
# characteristics of the resource, but rather its affliation to
# a particular field. For example, an information site will
# have an .info endpoint, a commercial site will have
# .com, and a non-profit site will have .org.
# There are some more specific domains. The domain .net
# (from the network) was originally intended for network
# technology organizations. For example, Internet service
# providers. The domain .edu is used by the US-affiliated
# institutions of higher education.
# Today the domains .com, .org, .net are used
# with almost no restrictions. You can find any types
# of organizations registered under these domain
# names. But the .edu domain remains very
# restricted in use.
# 4. Second-level domain
# The second-level domain is a unique website address that
# people remember and use for surfing the Internet like
# google, facebook, uber, and others.
# This domain name can be taken when registering with
# registrars on the internet. It is worth remembering that
# you can use this resource only for a certain period of time,
# which is usually about a year. To use this part of the name,
# you have to annually renew the application for hosting.
# 5. Third-level domain
# Third level names are available to register resources with
# second-level domain name companies. The owner of this
# type of domain has the ability to create multiple
# resources at once on the site with a common domain
# name. For example, if the site is called google.com, the
# news blog will be news.google.com
# Not all organizations use third-level domains
# it's not the only way to organize the resources.
# We will not consider deeper domain levels (4th, 5th, etc),
# but they can also exist in the Internet. We hope the
# presented information is enough for practice and the
# successful completion of the interviews.
# 6. Localhost
# You can have the last question, how you can refer to your
# own computer in the network by name? The common
# alias for this purpose is the localhost. Localhost is the
# hostname that refers to the computer you're working on.
# Localhost is also a reserved top-level domain for DNS, but
# its only purpose is to access the current machine only.
# Besides localhost, you can set other aliases to
# access the current computer or even sites like
# Hyperskill in host files: on Unix at /etc/hosts and on
# Windows at
# C:\Windows\System32\driver\etc\hosts. Beware,
# this information can be used by malware because it
# allows redirecting you from goodsite.com to
# evilsite.com by modifying your host files.
# 7. Conclusion
# In summary, domain names are kind of labels associated
# with a specific IP address and saved in distributed
# database of DNS. Domain names consist of hierarchical
# levels, at least two. That way it is easier for a browser to
# find a specific website. Those two basic levels are a top-
# level domain like .eu or .com, and a second-level
# domain - an exclusive website name like google or
# uber.
# Also, don't forget that localhost in the network refers to
# the computer you're working on. | 41.92623 | 68 | 0.751906 | 840 | 5,115 | 4.578571 | 0.377381 | 0.025741 | 0.017681 | 0.0078 | 0.032761 | 0.017161 | 0.017161 | 0.017161 | 0 | 0 | 0 | 0.002681 | 0.197849 | 5,115 | 122 | 69 | 41.92623 | 0.934682 | 0.952102 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fd589c2e7533fbed3dd34cdacff8f86a07832dd7 | 185 | py | Python | python/002-even-fibonacci-numbers.py | timschlechter/project-euler | 8986863231cc2d7d6ad1922c5009b96d329712e4 | [
"MIT"
] | null | null | null | python/002-even-fibonacci-numbers.py | timschlechter/project-euler | 8986863231cc2d7d6ad1922c5009b96d329712e4 | [
"MIT"
] | null | null | null | python/002-even-fibonacci-numbers.py | timschlechter/project-euler | 8986863231cc2d7d6ad1922c5009b96d329712e4 | [
"MIT"
] | null | null | null | total = 0
current = 1
prev = 1
while current < 4000000:
temp = current
current = current + prev
prev = temp
if current % 2 == 0:
total += current
print (total) | 15.416667 | 28 | 0.583784 | 24 | 185 | 4.5 | 0.458333 | 0.259259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096 | 0.324324 | 185 | 12 | 29 | 15.416667 | 0.768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.1 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
b5be7bbec432012a9d8bbbf9dead6ebe8ce1d2f6 | 201 | py | Python | docker/prod/main.py | dmccloskey/smartPeakPy | 51085fe963eed1fe174438cd30135cd0bd71700f | [
"MIT"
] | null | null | null | docker/prod/main.py | dmccloskey/smartPeakPy | 51085fe963eed1fe174438cd30135cd0bd71700f | [
"MIT"
] | null | null | null | docker/prod/main.py | dmccloskey/smartPeakPy | 51085fe963eed1fe174438cd30135cd0bd71700f | [
"MIT"
] | null | null | null | from smartPeak.core.__main__ import __main__
m = __main__()
m.main(
filename_sequence='/home/user/Data/sequence.csv',
filename_params='/home/user/Data/parameters.csv',
delimiter=',',
) | 25.125 | 53 | 0.706468 | 25 | 201 | 5.12 | 0.6 | 0.078125 | 0.140625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.139303 | 201 | 8 | 54 | 25.125 | 0.739884 | 0 | 0 | 0 | 0 | 0 | 0.292079 | 0.287129 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
b5c3308ed00f0b6c7de511bb3e03d81878a7e6d0 | 664 | py | Python | schemas/student.py | shaban00/flask_rest_api_structure | d7c86920186184dd924aa99a60578fe3e97e1ec1 | [
"MIT"
] | null | null | null | schemas/student.py | shaban00/flask_rest_api_structure | d7c86920186184dd924aa99a60578fe3e97e1ec1 | [
"MIT"
] | null | null | null | schemas/student.py | shaban00/flask_rest_api_structure | d7c86920186184dd924aa99a60578fe3e97e1ec1 | [
"MIT"
] | null | null | null | __author__ = 'Shaban Hassan [shaban00]'
from . import DRAFT_4_SCHEMA, STRING_SCHEMA, INTEGER_SCHEMA, EMAIL_SCHEMA
ADD_STUDENT_SCHEMA = {
"$schema": DRAFT_4_SCHEMA,
"type": "object",
"properties": {
"student_id": STRING_SCHEMA,
"first_name": STRING_SCHEMA,
"last_name": STRING_SCHEMA,
"username": STRING_SCHEMA,
"gender": STRING_SCHEMA,
"email": EMAIL_SCHEMA,
"password": STRING_SCHEMA,
"department_ref_id": STRING_SCHEMA
},
"additionalProperties": False,
"required": ["student_id", "first_name", "last_name", "username", "gender", "email", "password", "department_ref_id"]
} | 33.2 | 121 | 0.652108 | 70 | 664 | 5.742857 | 0.414286 | 0.238806 | 0.059701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007619 | 0.209337 | 664 | 20 | 122 | 33.2 | 0.758095 | 0 | 0 | 0 | 0 | 0 | 0.338346 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.111111 | 0.055556 | 0 | 0.055556 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
b5c54a65d1a66ebb4b525541f65879e043ed7a96 | 2,912 | py | Python | waves_gateway/storage/transaction_attempt_list_storage.py | NeolithEra/WavesGatewayFramework | e7ba892427e1d0444f2bfdc2922c45ff5f4c4add | [
"MIT"
] | 25 | 2018-03-04T07:49:21.000Z | 2022-03-28T05:20:50.000Z | waves_gateway/storage/transaction_attempt_list_storage.py | NeolithEra/WavesGatewayFramework | e7ba892427e1d0444f2bfdc2922c45ff5f4c4add | [
"MIT"
] | 22 | 2018-03-25T13:19:45.000Z | 2020-11-28T17:21:08.000Z | waves_gateway/storage/transaction_attempt_list_storage.py | NeolithEra/WavesGatewayFramework | e7ba892427e1d0444f2bfdc2922c45ff5f4c4add | [
"MIT"
] | 31 | 2018-03-25T09:45:13.000Z | 2022-03-24T05:32:18.000Z | """
TransactionAttemptListStorage
"""
from abc import ABC, abstractmethod
from typing import Optional, List
import gevent.lock
from waves_gateway.common import DuplicateAttemptListTriggerError, DuplicateAttemptListIDError
from waves_gateway.model import TransactionAttemptList, AttemptListTrigger, AttemptListQuery
class TransactionAttemptListStorage(ABC):
"""
Defines what an storage for TransactionAttemptList instances must be capable of.
"""
def __init__(self):
self._save_lock = gevent.lock.Semaphore()
@abstractmethod
def find_by_trigger(self, trigger: AttemptListTrigger) -> Optional[TransactionAttemptList]:
"""
Finds a specific attempt_list by its trigger.
"""
pass
@abstractmethod
def find_by_attempt_list_id(self, attempt_list_id: str) -> Optional[TransactionAttemptList]:
"""
Finds a specific attempt_list by its trigger.
"""
pass
@abstractmethod
def trigger_exists(self, trigger: AttemptListTrigger) -> bool:
"""
Tests if an attempt_list with the given trigger exists.
"""
pass
@abstractmethod
def attempt_list_id_exists(self, attempt_list_id: str) -> bool:
"""
Tests if an attempt_list with the given id exists.
"""
pass
@abstractmethod
def gateway_transaction_exists(self, tx: str) -> bool:
"""
Tests if a given transaction identifier exists.
"""
pass
@abstractmethod
def save_attempt_list(self, attempt_list: TransactionAttemptList) -> None:
"""
Creates a new attempt_list.
"""
pass
def safely_save_attempt_list(self, attempt_list: TransactionAttemptList) -> None:
"""
Creates a new attempt_list. Throws an exception if the id or the trigger already exist.
"""
self._save_lock.acquire()
try:
if self.trigger_exists(attempt_list.trigger):
raise DuplicateAttemptListTriggerError()
if self.attempt_list_id_exists(attempt_list.attempt_list_id):
raise DuplicateAttemptListIDError()
self.save_attempt_list(attempt_list)
self._save_lock.release()
finally:
self._save_lock.release()
@abstractmethod
def update_attempt_list(self, attempt_list: TransactionAttemptList) -> None:
"""
Updates an existing attempt_list.
"""
pass
@abstractmethod
def query_attempt_lists(self, query: AttemptListQuery) -> List[TransactionAttemptList]:
"""
Searches for attempt lists by the given criteria.
"""
pass
@abstractmethod
def find_oldest_pending_attempt_list(self) -> Optional[TransactionAttemptList]:
"""
Queries for the oldest attempt list that is not complete.
"""
pass
| 28.54902 | 96 | 0.655563 | 293 | 2,912 | 6.296928 | 0.286689 | 0.149051 | 0.079675 | 0.027642 | 0.268835 | 0.247154 | 0.247154 | 0.21897 | 0.21897 | 0.179946 | 0 | 0 | 0.268887 | 2,912 | 101 | 97 | 28.831683 | 0.866604 | 0.211195 | 0 | 0.434783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.23913 | false | 0.195652 | 0.108696 | 0 | 0.369565 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
b5d6704ff304508dd6080d284b2bf271b9b5a2a8 | 408 | py | Python | api/exceptions.py | 5g-media/accounting-agent | 9ec653f1604bafbd8ec0757ddd7808835e4e798a | [
"Apache-2.0"
] | null | null | null | api/exceptions.py | 5g-media/accounting-agent | 9ec653f1604bafbd8ec0757ddd7808835e4e798a | [
"Apache-2.0"
] | 5 | 2020-04-16T07:07:03.000Z | 2020-04-16T07:07:56.000Z | api/exceptions.py | 5g-media/accounting-agent | 9ec653f1604bafbd8ec0757ddd7808835e4e798a | [
"Apache-2.0"
] | null | null | null | class VnfListNotAvailable(Exception):
"""VNF list is not included in the openmano instance"""
pass
class VmListNotAvailable(Exception):
"""VM list is not included in the VNF record, part of the openmano instance"""
pass
class InstanceNotFound(Exception):
"""Openmano instance not found"""
pass
class DateFormatParseError(Exception):
""" Date format parse error """
pass
| 21.473684 | 82 | 0.705882 | 47 | 408 | 6.12766 | 0.531915 | 0.166667 | 0.0625 | 0.118056 | 0.336806 | 0.152778 | 0 | 0 | 0 | 0 | 0 | 0 | 0.203431 | 408 | 18 | 83 | 22.666667 | 0.886154 | 0.428922 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
b5d9e5577d53deffed918c321707309075fefdfa | 262 | py | Python | setup.py | saquib-mehmood/pyproblib | 2619c7ebe7855abbead2a6d455bc1f35c00a1386 | [
"MIT"
] | 1 | 2020-07-27T01:28:00.000Z | 2020-07-27T01:28:00.000Z | setup.py | saquib-mehmood/pyproblib | 2619c7ebe7855abbead2a6d455bc1f35c00a1386 | [
"MIT"
] | null | null | null | setup.py | saquib-mehmood/pyproblib | 2619c7ebe7855abbead2a6d455bc1f35c00a1386 | [
"MIT"
] | null | null | null |
from setuptools import setup
setup(name='pyproblib',
version='1.1',
description='Probability Distribution Functions',
packages=['pyproblib'],
author='Saquib Mehmood',
author_email='indowhales@protonmail.com',
zip_safe=False) | 26.2 | 55 | 0.683206 | 27 | 262 | 6.555556 | 0.851852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009479 | 0.194656 | 262 | 10 | 56 | 26.2 | 0.829384 | 0 | 0 | 0 | 0 | 0 | 0.358779 | 0.09542 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.125 | 0 | 0.125 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
b5f9265e22046ce2255a5584c952cb04a7a44791 | 1,813 | py | Python | app/models.py | superrcoop/profile-manager | ddea77fefd26931e159ffb44f620948b22bbff82 | [
"MIT"
] | null | null | null | app/models.py | superrcoop/profile-manager | ddea77fefd26931e159ffb44f620948b22bbff82 | [
"MIT"
] | 1 | 2018-03-22T16:19:37.000Z | 2018-03-22T16:19:37.000Z | app/models.py | superrcoop/profile-manager | ddea77fefd26931e159ffb44f620948b22bbff82 | [
"MIT"
] | null | null | null | import uuid , datetime ,random , os, errno
from . import db, UPLOAD_FOLDER
def generate_id():
return int(str(uuid.uuid4().int)[:8])
def get_date():
return datetime.datetime.now().today()
def generate_file_URI():
URI=UPLOAD_FOLDER+'/'+str(uuid.uuid4().get_hex()[0:12])+'/'
if not os.path.exists(URI):
try:
os.makedirs(URI)
except OSError as e:
if e.errno != errno.EEXIST:
raise
return URI
class User(db.Model):
__tablename__ = 'profiles'
id = db.Column(db.Integer, primary_key=True)
fname = db.Column(db.String(80))
lname = db.Column(db.String(80))
gender = db.Column(db.String(80))
email = db.Column(db.String(80), unique=True,nullable=False)
location = db.Column(db.String(80))
bio = db.Column(db.String(300))
date_joined = db.Column(db.Date,nullable=False)
file_URI = db.Column(db.String(80),nullable=False)
def __init__(self,fname, lname, email,gender, location, bio, id=None):
if id:
self.id = id
else:
self.id = generate_id()
self.email = email
self.fname = fname
self.lname = lname
self.gender = gender
self.location = location
self.bio = bio
self.date_joined = get_date()
self.file_URI = generate_file_URI()
def is_authenticated(self):
return True
def is_active(self):
return True
def is_anonymous(self):
return False
def get_id(self):
try:
return unicode(self.id) # python 2 support
except NameError:
return str(self.id) # python 3 support
def __repr__(self):
return '<User %r>' % (self.email)
| 28.328125 | 74 | 0.570325 | 233 | 1,813 | 4.300429 | 0.334764 | 0.071856 | 0.08982 | 0.111776 | 0.145709 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018371 | 0.309432 | 1,813 | 63 | 75 | 28.777778 | 0.781949 | 0.018202 | 0 | 0.076923 | 1 | 0 | 0.010692 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.173077 | false | 0 | 0.038462 | 0.115385 | 0.596154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
b5fd23d470016d646dd4b4fcf940c9debb08cf0a | 816 | py | Python | shader_filters/__init__.py | rootcoma/imageglitch | 332a2fc7d18e28896b675efb524fac91c0b33028 | [
"MIT"
] | null | null | null | shader_filters/__init__.py | rootcoma/imageglitch | 332a2fc7d18e28896b675efb524fac91c0b33028 | [
"MIT"
] | null | null | null | shader_filters/__init__.py | rootcoma/imageglitch | 332a2fc7d18e28896b675efb524fac91c0b33028 | [
"MIT"
] | null | null | null | from filter_one import FirstFilter
from filter_two import SecondFilter
from filter_three import ThirdFilter
from filter_rgb_shift import RGBShiftFilter
from filter_repeat_end import RepeatEndFilter
from filter_static import StaticFilter
from filter_static_2 import StaticFilter2
from filter_scanlines import ScanlineFilter
ALL_FILTERS = {'first': FirstFilter,
'second': SecondFilter,
'third': ThirdFilter,
'rgb_shift': RGBShiftFilter,
'repeat_end': RepeatEndFilter,
'static': StaticFilter,
'static2': StaticFilter2,
'scanlines': ScanlineFilter}
# These are special shaders that probably won't work for filtering
from filter_ortho import OrthoFilter
from filter_console import ConsoleFilter
| 38.857143 | 67 | 0.716912 | 84 | 816 | 6.77381 | 0.5 | 0.175747 | 0.056239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006441 | 0.238971 | 816 | 20 | 68 | 40.8 | 0.909823 | 0.078431 | 0 | 0 | 0 | 0 | 0.078082 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.555556 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
b5fd8337da40956b3fb5a9295c780dad28ca22d8 | 538 | py | Python | terrascript/provider/hashicorp/kubernetes.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/hashicorp/kubernetes.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/hashicorp/kubernetes.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/hashicorp/kubernetes.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:20:43 UTC)
import terrascript
class kubernetes(terrascript.Provider):
"""terraform-provider-kubernetes"""
__description__ = "terraform-provider-kubernetes"
__namespace__ = "hashicorp"
__name__ = "kubernetes"
__source__ = "https://github.com/hashicorp/terraform-provider-kubernetes"
__version__ = "2.5.0"
__published__ = "2021-09-14T22:07:40Z"
__tier__ = "official"
__all__ = ["kubernetes"]
| 26.9 | 77 | 0.730483 | 57 | 538 | 6.333333 | 0.684211 | 0.141274 | 0.224377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.062907 | 0.143123 | 538 | 19 | 78 | 28.315789 | 0.720174 | 0.273234 | 0 | 0 | 1 | 0 | 0.388021 | 0.075521 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.9 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
bd090c63cce44f67db2cb7535e64aa227c88ef17 | 418 | py | Python | generate_video_list.py | APikielny/mannequinchallenge | 686ec20d86210005f1481a2f7c179ccba48636c5 | [
"Apache-2.0"
] | 1 | 2022-02-18T17:09:25.000Z | 2022-02-18T17:09:25.000Z | generate_video_list.py | APikielny/mannequinchallenge | 686ec20d86210005f1481a2f7c179ccba48636c5 | [
"Apache-2.0"
] | null | null | null | generate_video_list.py | APikielny/mannequinchallenge | 686ec20d86210005f1481a2f7c179ccba48636c5 | [
"Apache-2.0"
] | null | null | null | # Script to generate test_davis_video_list.txt
# Call to run inference with different datasets
# Run by calling ./generate_video_list
# Change directory by editing path variable
path = "/home/adam/Desktop/repos/mannequinchallenge/test_data/custom-handheld/translate"
import os
a = open("./test_data/test_video_list.txt", "w")
files = os.listdir(path)
for f in files:
a.write(path + "/" + f + "\n") | 29.857143 | 89 | 0.722488 | 62 | 418 | 4.725806 | 0.677419 | 0.09215 | 0.081911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162679 | 418 | 14 | 90 | 29.857143 | 0.837143 | 0.404306 | 0 | 0 | 1 | 0 | 0.491379 | 0.474138 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
bd1151505007f6bda4dd30dea933eb3d2f57a759 | 616 | py | Python | django_analyses/views/pipeline.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 1 | 2020-12-30T12:43:34.000Z | 2020-12-30T12:43:34.000Z | django_analyses/views/pipeline.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 59 | 2019-12-25T13:14:56.000Z | 2021-07-22T12:24:46.000Z | django_analyses/views/pipeline.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 2 | 2020-05-24T06:44:27.000Z | 2020-07-09T15:47:31.000Z | from django_analyses.filters.pipeline.pipeline import PipelineFilter
from django_analyses.models.pipeline.pipeline import Pipeline
from django_analyses.serializers.pipeline.pipeline import PipelineSerializer
from django_analyses.views.defaults import DefaultsMixin
from django_analyses.views.pagination import StandardResultsSetPagination
from rest_framework import viewsets
class PipelineViewSet(DefaultsMixin, viewsets.ModelViewSet):
queryset = Pipeline.objects.order_by("title")
filter_class = PipelineFilter
pagination_class = StandardResultsSetPagination
serializer_class = PipelineSerializer
| 44 | 76 | 0.862013 | 63 | 616 | 8.269841 | 0.444444 | 0.095969 | 0.172745 | 0.088292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.092532 | 616 | 13 | 77 | 47.384615 | 0.932021 | 0 | 0 | 0 | 0 | 0 | 0.008117 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.545455 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
bd2a57856b8bd61142dd0c260f66fd082793e822 | 9,556 | py | Python | _unittests/ut_pandashelper/test_pandashelper_df2.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 18 | 2015-11-10T08:09:23.000Z | 2022-02-16T11:46:45.000Z | _unittests/ut_pandashelper/test_pandashelper_df2.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 321 | 2015-06-14T21:34:28.000Z | 2021-11-28T17:10:03.000Z | _unittests/ut_pandashelper/test_pandashelper_df2.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 10 | 2015-06-20T01:35:00.000Z | 2022-01-19T15:54:32.000Z | """
@brief test log(time=3s)
"""
import os
import unittest
import numpy
import pandas
from pyquickhelper.pycode import ExtTestCase
from pyquickhelper.pandashelper import df2html, df2rst
class TestPandasHelper_df2(ExtTestCase):
def test_df2html(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2html(df)
self.assertStartsWith("<table>", conv)
self.assertEndsWith("</table>\n", conv)
def test_df2rst(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2rst(df)
self.assertIn("| city | year | time | seconds |", conv)
self.assertIn("| PARIS | 2011 | 02:06:29 | 7589 |", conv)
def test_df2rst_split_row(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2rst(df, split_row="city")
self.assertIn("+++++++++", conv)
self.assertIn("| city | year | time | seconds |", conv)
self.assertIn("| PARIS | 2011 | 02:06:29 | 7589 |", conv)
conv = df2rst(df, split_row="year")
self.assertIn("++++", conv)
self.assertIn("| city | year | time | seconds |", conv)
self.assertIn("| FUKUOKA | 1976 | 02:12:35 | 7955 |", conv)
conv = df2rst(df, split_row=["city", "year"])
self.assertIn("'AMSTERDAM', 1975", conv)
self.assertIn("| city | year | time | seconds |", conv)
def test_df2rst_split_row_label(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2rst(df, split_row="city")
self.assertIn("+++++++++", conv)
self.assertIn("| city | year | time | seconds |", conv)
self.assertIn("| PARIS | 2011 | 02:06:29 | 7589 |", conv)
conv = df2rst(df, split_row="year", label_pattern=".. _lpy-{section}:")
self.assertIn("++++", conv)
self.assertIn("| city | year | time | seconds |", conv)
self.assertIn("| FUKUOKA | 1976 | 02:12:35 | 7955 |", conv)
self.assertIn(".. _lpy-1949:", conv)
def test_df2rst_split_col(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
self.assertRaise(lambda: df2rst(df, split_col_common=["city", "time"],
split_col_subsets=[['time'], ['seconds']]),
ValueError)
conv = df2rst(df, split_col_common=["city", "year"],
split_col_subsets=[['time'], ['seconds']])
self.assertIn("| CHICAGO | 2005 | 7622 |", conv)
def test_df2rst_split_col_row(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2rst(df, split_row="city",
split_col_common=["city", "year"],
split_col_subsets=[['time'], ['seconds']])
self.assertIn("+++++++++", conv)
self.assertIn("| STOCKOLM | 2007 | 8456 |", conv)
def test_df2rst_split_col_row_ref(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
df['city'] = df.city.apply(
lambda v: ':ref:`{0} <{0}-h>`'.format(v)) # pylint: disable=W0108
conv = df2rst(df, split_row="city",
split_col_common=["city", "year"],
split_col_subsets=[['time'], ['seconds']])
self.assertIn("+++++++++", conv)
self.assertIn(
"| :ref:`AMSTERDAM <AMSTERDAM-h>` | 1982 | 02:12:15 |", conv)
def test_df2rst_split_col_row_ref2(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
df['city'] = df.city.apply(
lambda v: ':ref:`{0}`'.format(v)) # pylint: disable=W0108
conv = df2rst(df, split_row="city",
split_col_common=["city", "year"],
split_col_subsets=[['time'], ['seconds']])
self.assertIn("+++++++++", conv)
self.assertIn("| :ref:`AMSTERDAM` | 1982 | 02:12:15 |", conv)
def test_df2rst_split_col_row_ref2_func(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
df['city'] = df.city.apply(
lambda v: ':ref:`{0}`'.format(v)) # pylint: disable=W0108
conv = df2rst(df, split_row=lambda index: df.loc[index, "city"].split("`")[1],
split_col_common=["city", "year"],
split_col_subsets=[['time'], ['seconds']])
self.assertIn("+++++++++", conv)
self.assertIn("| :ref:`AMSTERDAM` | 1982 | 02:12:15 |", conv)
def test_df2rst_split_col_row_ref2_func2(self):
def build_key_split(key, index):
new_key = str(key).split('`')[1].split('<')[0].strip()
return new_key
df = pandas.DataFrame([
{'name': ':ref:`A <A>`', 'value': 1},
{'name': ':ref:`A <A2>`', 'value': 2},
{'name': ':ref:`B <B>`', 'value': 3},
{'name': ':ref:`B <B2>`', 'value': 4},
{'name': ':ref:`A <A3>`', 'value': 5},
])
conv = df2rst(df, split_row=lambda index: build_key_split(
df.loc[index, "name"], index))
self.assertIn("| :ref:`B <B>` | 3 |", conv)
def test_df2rst_split_col_complex(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "unittst.csv")
df = pandas.read_csv(mara)
common = ['name', 'problem', 'scenario']
subsets = [
['opset11', 'opset10', 'opset9'],
['ERROR-msg'], ['RT/SKL-N=1', 'N=10', 'N=100', 'N=1000', 'N=10000',
'N=100000', 'RT/SKL-N=1-min', 'RT/SKL-N=1-max', 'N=10-min', 'N=10-max',
'N=100-min', 'N=100-max', 'N=1000-min', 'N=1000-max', 'N=10000-min',
'N=10000-max', 'N=100000-min', 'N=100000-max']
]
def build_key_split(key, index):
new_key = str(key).split('`')[1].split('<')[0].strip()
return new_key
def filter_rows(df):
for c in ['ERROR-msg', 'RT/SKL-N=1']:
if c in df.columns:
return df[df[c].apply(lambda x: pandas.notnull(x) and x not in (None, '', 'nan'))]
return df
conv = df2rst(df, number_format=2,
replacements={'nan': '', 'ERR: 4convert': ''},
split_row=lambda index, dp=df: build_key_split(
dp.loc[index, "name"], index),
split_col_common=common,
split_col_subsets=subsets,
filter_rows=filter_rows)
self.assertIn("| :ref:`ARDRegression <l-ARDRegression-b-reg-default>` | b-reg | default "
"| | ? | ? |", conv)
spl = conv.split("+=============================")
self.assertEqual(len(spl), 7)
def test_df2rst_column_size(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2rst(df, column_size={'city': 40})
self.assertIn(
"| city | year | time | seconds |", conv)
self.assertIn(
"| PARIS | 2006 | 02:08:03 | 7683 |", conv)
def test_df2rst_column_size_i(self):
data = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
mara = os.path.join(data, "marathon.txt")
df = pandas.read_csv(
mara, names=["city", "year", "time", "seconds"], sep="\t")
conv = df2rst(df, column_size={0: 40})
self.assertIn(
"| city | year | time | seconds |", conv)
self.assertIn(
"| PARIS | 2006 | 02:08:03 | 7683 |", conv)
if __name__ == "__main__":
unittest.main()
| 45.942308 | 106 | 0.512139 | 1,136 | 9,556 | 4.151408 | 0.146127 | 0.061069 | 0.050891 | 0.076548 | 0.744487 | 0.725191 | 0.687659 | 0.667515 | 0.659245 | 0.659245 | 0 | 0.044309 | 0.298556 | 9,556 | 207 | 107 | 46.164251 | 0.659257 | 0.010046 | 0 | 0.561798 | 0 | 0.005618 | 0.236085 | 0.006561 | 0 | 0 | 0 | 0 | 0.202247 | 1 | 0.089888 | false | 0 | 0.033708 | 0 | 0.151685 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
bd3d71603f567e6d7a5fbc2bbdc8baff6f6ad04e | 534 | py | Python | setup.py | appdevelopmentandsuch/cold-silence | ce216676ab3251803e6b89e8293f7e52a0c8e278 | [
"MIT"
] | null | null | null | setup.py | appdevelopmentandsuch/cold-silence | ce216676ab3251803e6b89e8293f7e52a0c8e278 | [
"MIT"
] | 2 | 2021-05-11T20:07:01.000Z | 2021-05-17T19:20:46.000Z | setup.py | appdevelopmentandsuch/cold-silence | ce216676ab3251803e6b89e8293f7e52a0c8e278 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="cold_silence",
version="0.0.1",
author="App Development and Such",
author_email="appdevelopmentandsuch@gmail.com",
url="https://github.com/firstlast/cold-silence",
description="Generate Django projects sans boilerplate code.",
long_description="Generate Django projects sans boilerplate code.",
license="MIT",
package_dir={"": "src"},
packages=find_packages(where="src", exclude=("tests",)),
zip_safe=True,
)
| 29.666667 | 71 | 0.702247 | 65 | 534 | 5.661538 | 0.738462 | 0.065217 | 0.13587 | 0.179348 | 0.282609 | 0.282609 | 0.282609 | 0 | 0 | 0 | 0 | 0.006623 | 0.151685 | 534 | 17 | 72 | 31.411765 | 0.80574 | 0.037453 | 0 | 0 | 0 | 0 | 0.430799 | 0.060429 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.071429 | 0 | 0.071429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
bd419dee49228ab24f9fb500eaa19f973fcfa85d | 1,744 | py | Python | src/grokcore/catalog/tests/functional/catalog/indexes_multiple_conflict.py | zopefoundation/grokcore.catalog | ccfa29610f2dbdde2f06a3ab9faea4d658388aa8 | [
"ZPL-2.1"
] | 1 | 2015-12-05T05:39:43.000Z | 2015-12-05T05:39:43.000Z | src/grokcore/catalog/tests/functional/catalog/indexes_multiple_conflict.py | zopefoundation/grokcore.catalog | ccfa29610f2dbdde2f06a3ab9faea4d658388aa8 | [
"ZPL-2.1"
] | 4 | 2015-11-20T13:36:15.000Z | 2021-04-20T12:10:06.000Z | src/grokcore/catalog/tests/functional/catalog/indexes_multiple_conflict.py | zopefoundation/grokcore.catalog | ccfa29610f2dbdde2f06a3ab9faea4d658388aa8 | [
"ZPL-2.1"
] | 4 | 2015-03-13T15:50:54.000Z | 2018-01-12T06:15:40.000Z | """
Grok allows you to set up catalog indexes in your application with a
special indexes declaration. In fact, we have multiple grok.Indexes
setting up more than one set of indexes in the same catalog. What if these
indexes define the same names?
Let's set up a site in which we manage a couple of objects::
>>> herd = Herd()
>>> getRootFolder()['herd'] = herd
Traceback (most recent call last):
...
KeyError:...
>>> from zope.component.hooks import setSite
>>> setSite(herd)
>>> from zope.catalog.interfaces import ICatalog
>>> from zope.component import getUtility, queryUtility
>>> catalog = getUtility(ICatalog)
Nuke the catalog and intids in the end, so as not to confuse
other tests::
>>> sm = herd.getSiteManager()
>>> from zope.catalog.interfaces import ICatalog
>>> sm.unregisterUtility(catalog, provided=ICatalog)
True
>>> from zope.intid.interfaces import IIntIds
>>> from zope import component
>>> intids = component.getUtility(IIntIds)
>>> sm.unregisterUtility(intids, provided=IIntIds)
True
Unfortunately ftests don't have good isolation from each other yet.
"""
import grokcore.site
import grokcore.catalog
from grokcore.content import Container
from zope.interface import Interface, Attribute
class Herd(Container, grokcore.site.Application):
pass
class IMammoth(Interface):
name = Attribute('name')
class IMammoth2(Interface):
name = Attribute('name')
class MammothIndexes(grokcore.catalog.Indexes):
grokcore.site.site(Herd)
grokcore.catalog.context(IMammoth)
name = grokcore.catalog.Field()
class MammothIndexes2(grokcore.catalog.Indexes):
grokcore.site.site(Herd)
grokcore.catalog.context(IMammoth2)
name = grokcore.catalog.Field()
| 26.830769 | 74 | 0.735665 | 222 | 1,744 | 5.779279 | 0.427928 | 0.043648 | 0.0265 | 0.038971 | 0.208885 | 0.160561 | 0.099766 | 0.099766 | 0.099766 | 0.099766 | 0 | 0.002055 | 0.162844 | 1,744 | 64 | 75 | 27.25 | 0.876712 | 0.638761 | 0 | 0.333333 | 0 | 0 | 0.012862 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.055556 | 0.222222 | 0 | 0.722222 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
bd4204128edd035eac7c1e5ea6765ed956c13511 | 511 | py | Python | peerpy/exceptions.py | Rubilmax/python-p2p | ff12cd65a745cfb3828a4a692289a39e850e9114 | [
"MIT"
] | 2 | 2020-07-02T13:22:53.000Z | 2020-10-17T17:00:58.000Z | peerpy/exceptions.py | Rubilmax/peerpy | ff12cd65a745cfb3828a4a692289a39e850e9114 | [
"MIT"
] | 1 | 2020-06-26T15:19:14.000Z | 2020-07-02T13:21:54.000Z | peerpy/exceptions.py | Rubilmax/python-p2p | ff12cd65a745cfb3828a4a692289a39e850e9114 | [
"MIT"
] | null | null | null | class HandlerMissingException(Exception):
"""Raised when an event handler is missing a handler for a specific event."""
pass
class DataTypeError(Exception):
"""Raised when data type doesn't correspond to the connection's data type."""
pass
class HeaderSizeError(Exception):
"""Raised when the header's size is greater than the protocol's header size."""
pass
class DataSizeError(Exception):
"""Raised the data size doesn't correspond to the connection's data size."""
pass
| 26.894737 | 83 | 0.720157 | 69 | 511 | 5.333333 | 0.449275 | 0.163043 | 0.154891 | 0.097826 | 0.195652 | 0.195652 | 0.195652 | 0.195652 | 0 | 0 | 0 | 0 | 0.189824 | 511 | 18 | 84 | 28.388889 | 0.888889 | 0.563601 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
1f992f231703be7a317f5867ed30c1311d40e405 | 138 | py | Python | tests/open_page.py | Mai-ah/selenium-3.0-course | 2168e6acba1cc43460de4b8d7f2eaecbbcdf9a42 | [
"Apache-2.0"
] | null | null | null | tests/open_page.py | Mai-ah/selenium-3.0-course | 2168e6acba1cc43460de4b8d7f2eaecbbcdf9a42 | [
"Apache-2.0"
] | null | null | null | tests/open_page.py | Mai-ah/selenium-3.0-course | 2168e6acba1cc43460de4b8d7f2eaecbbcdf9a42 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
browser = webdriver.Firefox()
browser.get("https://github.com/Mai-ah/selenium-3.0-course")
browser.close() | 27.6 | 60 | 0.775362 | 20 | 138 | 5.35 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015504 | 0.065217 | 138 | 5 | 61 | 27.6 | 0.813953 | 0 | 0 | 0 | 0 | 0 | 0.323741 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
1f9ecb11311d1727bd67f01ccec5a891601ec6ab | 493 | py | Python | here/views.py | snetdev1/snetDjango | 461ef4e58218acd36fdcb8adbf25358d788c2542 | [
"MIT"
] | null | null | null | here/views.py | snetdev1/snetDjango | 461ef4e58218acd36fdcb8adbf25358d788c2542 | [
"MIT"
] | null | null | null | here/views.py | snetdev1/snetDjango | 461ef4e58218acd36fdcb8adbf25358d788c2542 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework import viewsets
from serializers import PartySerializer
from models import *
from rest_framework.permissions import IsAuthenticatedOrReadOnly, IsAdminUser, IsAuthenticated
# Create your views here.
class PartyViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows projects to be viewed or edited.
"""
permission_classes = (IsAuthenticated,)
queryset = party.objects.all()
serializer_class = PartySerializer | 35.214286 | 94 | 0.793103 | 53 | 493 | 7.301887 | 0.735849 | 0.041344 | 0.087855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150101 | 493 | 14 | 95 | 35.214286 | 0.923628 | 0.166329 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.555556 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
1fb20e7ca4aab384e7ac34968c88a0c2a59cd7e5 | 290 | py | Python | 06. Boolean.py | LPIX-11/quick-python | 6c52d54a51cd7a1ba6915b77d9efd919ce98b4bc | [
"MIT"
] | null | null | null | 06. Boolean.py | LPIX-11/quick-python | 6c52d54a51cd7a1ba6915b77d9efd919ce98b4bc | [
"MIT"
] | null | null | null | 06. Boolean.py | LPIX-11/quick-python | 6c52d54a51cd7a1ba6915b77d9efd919ce98b4bc | [
"MIT"
] | null | null | null | # In python you have this set of boolean expression
# == to check for equality or 'is'
# === to compare actual objects together
# True and False
# and, or, not
if 1 is 3:
print('What!! is that for real?')
elif 1 > 3:
print('Really????')
else:
print('Yeah that\'s what I know')
| 22.307692 | 51 | 0.637931 | 49 | 290 | 3.77551 | 0.755102 | 0.064865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017857 | 0.227586 | 290 | 12 | 52 | 24.166667 | 0.808036 | 0.513793 | 0 | 0 | 0 | 0 | 0.325926 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
1fb98085c372627621a36120da261fade54cae54 | 268 | py | Python | multicloud_storage/__init__.py | onXmaps/multicloud-storage | 185828404dd18473a1cc8404766641cdebc63f76 | [
"Apache-2.0"
] | null | null | null | multicloud_storage/__init__.py | onXmaps/multicloud-storage | 185828404dd18473a1cc8404766641cdebc63f76 | [
"Apache-2.0"
] | null | null | null | multicloud_storage/__init__.py | onXmaps/multicloud-storage | 185828404dd18473a1cc8404766641cdebc63f76 | [
"Apache-2.0"
] | null | null | null | """An amazing sample package!"""
__version__ = "0.8.0"
from .gcs import GCS
from .minio import S3
from .storage import Storage
from .exception import StorageException
from .http import HttpMethod
__all__ = ["GCS", "S3", "Storage", "HttpMethod", "StorageException"]
| 22.333333 | 68 | 0.735075 | 34 | 268 | 5.558824 | 0.529412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021645 | 0.13806 | 268 | 11 | 69 | 24.363636 | 0.796537 | 0.097015 | 0 | 0 | 0 | 0 | 0.182203 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.714286 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
1fbc3466f0dad92888b0daa6a4ae5b638fd89196 | 25,517 | py | Python | includes/ldap_helpers.py | OpenResourceManager/LdapDelegate | b901136dc7a32a1dc4dde210f2cd07a566f7feb2 | [
"MIT"
] | 1 | 2018-02-09T03:49:50.000Z | 2018-02-09T03:49:50.000Z | includes/ldap_helpers.py | OpenResourceManager/ldap-delegate | b901136dc7a32a1dc4dde210f2cd07a566f7feb2 | [
"MIT"
] | 1 | 2021-03-25T21:31:08.000Z | 2021-03-25T21:31:08.000Z | includes/ldap_helpers.py | OpenResourceManager/LdapDelegate | b901136dc7a32a1dc4dde210f2cd07a566f7feb2 | [
"MIT"
] | null | null | null | # coding=utf-8
import ldap
from includes.helpers import write_json_log, write_json_error
from ldap import modlist
import random
def generate_password():
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*().,?0123456789'
password = ''
for c in range(16):
password += random.choice(chars)
return password
def connect(bind_user, bind_pass, hosts):
write_json_log({
'action': 'connect_ldap',
'bind_user': bind_user,
'hosts': hosts,
'message': 'Connecting to LDAP',
'log-type': 'information'
})
connection = False
for host in hosts:
try:
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, 0)
ldap.set_option(ldap.OPT_REFERRALS, 0)
ldap.protocol_version = ldap.VERSION3
connection = ldap.initialize('ldaps://' + host + ':636')
connection.simple_bind_s(bind_user, bind_pass)
if connection:
write_json_log({
'action': 'connect_ldap_success',
'bind_user': bind_user,
'hosts': hosts,
'host': host,
'message': 'Successfully connected to LDAP host: ' + host,
'log-type': 'information'
})
return connection
except ldap.LDAPError, error_message:
write_json_error({
'action': 'connect_ldap_error',
'bind_user': bind_user,
'hosts': hosts,
'host': host,
'error_message': str(error_message),
'message': 'Error connecting to LDAP server: ' + host,
'log-type': 'error'
})
write_json_log({
'action': 'connect_ldap_success',
'bind_user': bind_user,
'hosts': hosts,
'message': 'Successfully connected to LDAP.',
'log-type': 'information'
})
return connection
def build_duty_ou_dn(name, base_account_ou):
return 'OU=' + ldap.dn.escape_dn_chars(name) + ',' + base_account_ou
def build_trash_ou_dn(base_account_ou):
return 'OU=Trash,' + base_account_ou
def build_group_cn(group):
return group['code']
def build_group_dn(cn, type_name, base_ou):
return 'CN=' + ldap.dn.escape_dn_chars(cn) + ',' + 'OU=' + ldap.dn.escape_dn_chars(type_name) + ',' + base_ou
def build_account_dn(cn, ou):
return 'CN=' + ldap.dn.escape_dn_chars(cn) + ',' + ou
def build_account_ou(account, base_ou, duties_map_to_ou):
ou = base_ou
if duties_map_to_ou:
ou = 'OU=' + ldap.dn.escape_dn_chars(account['primary_duty']['code']) + ',' + ou
return ou
def build_account_ext_name(account):
ext_name = account['name_last'].capitalize() + ','
ext_name = ext_name + ' ' + account['name_first'].capitalize()
middle = form_middle_name(account)
if middle:
ext_name = ext_name + ' ' + middle.capitalize()
return str(ext_name)
def build_initials(account):
middle = form_middle_name(account)
f = account['name_first'][0].capitalize()
if len(middle) > 0:
m = middle[0].capitalize()
else:
m = ''
l = account['name_last'][0].capitalize()
return str(f + m + l)
def build_home_share_path(account, pattern):
parts = pattern.split('%')
path = []
for part in parts:
if part.lower() == 'samaccountname':
path.append(account['username'])
elif part.lower() == 'employeeid':
path.append(account['identifier'])
else:
path.append(part)
return ''.join(path)
def build_unicode_password(password):
try:
unicode_pass = unicode('\"' + password + '\"', 'iso-8859-1')
except TypeError:
unicode_pass = '\"' + password + '\"'
return unicode_pass.encode('utf-16-le')
def form_set_password_action(unicode_password):
return [(ldap.MOD_REPLACE, 'unicodePwd', [unicode_password]), (ldap.MOD_REPLACE, 'pwdLastSet', '-1')]
def form_set_account_control_action(account_control):
return [(ldap.MOD_REPLACE, 'userAccountControl', str(account_control))]
def form_add_member_action(account_dn):
return [(ldap.MOD_ADD, 'member', str(account_dn))]
def form_modify_action(attributes):
modify_actions = []
for key, value in attributes.iteritems():
key = str(key).strip(' \t\n\r')
value = str(value).strip(' \t\n\r')
if key and value:
modify_actions.append((ldap.MOD_REPLACE, key, value))
return modify_actions
def form_del_member_action(account_dn):
return [(ldap.MOD_DELETE, 'member', str(account_dn))]
def form_middle_name(account):
if 'name_middle' in account:
if account['name_middle']:
return str(account['name_middle'])
return ''
def form_user(account, mail_domain, home_share_path, home_drive_letter='H', withpwd=False, pwd=''):
if withpwd:
return {
'description': 'ID: ' + str(account['identifier']) + ' - automatically managed by ORM',
'displayName': str(account['name_full']),
'givenName': str(account['name_first'].capitalize()),
'middleName': form_middle_name(account),
'sn': str(account['name_last'].capitalize()),
'extensionName': build_account_ext_name(account),
'employeeID': str(account['identifier']),
'homeDirectory': str(home_share_path),
'homeDrive': str(home_drive_letter[0].upper()) + ':',
'mail': str(account['username']) + '@' + str(mail_domain),
'sAMAccountName': str(account['username']),
'initials': build_initials(account),
'userAccountControl': '514',
'objectClass': ['top', 'organizationalPerson', 'person', 'user'],
'userPrincipalName': str(account['username']) + '@' + str(mail_domain),
'userPassword': str(pwd),
'unicodePwd': build_unicode_password(str(pwd))
}
else:
return {
'description': 'ID: ' + str(account['identifier']) + ' - automatically managed by ORM',
'displayName': str(account['name_full']),
'givenName': str(account['name_first'].capitalize()),
'middleName': form_middle_name(account),
'sn': str(account['name_last'].capitalize()),
'extensionName': build_account_ext_name(account),
'employeeID': str(account['identifier']),
'homeDirectory': str(home_share_path),
'homeDrive': str(home_drive_letter[0].upper()) + ':',
'mail': str(account['username']) + '@' + str(mail_domain),
'sAMAccountName': str(account['username']),
'initials': build_initials(account),
'userAccountControl': '514',
'objectClass': ['top', 'organizationalPerson', 'person', 'user'],
'userPrincipalName': str(account['username']) + '@' + str(mail_domain)
}
def form_group(cn, dn, display_name):
return {
'objectClass': ['top', 'group'],
'cn': str(cn),
'distinguishedName': str(dn),
'groupType': '-2147483646',
'description': str(cn) + ' ' + str(display_name) + ' - automatically managed by ORM',
'name': str(cn),
'sAMAccountName': str(cn),
'displayName': str(display_name)
}
def form_ou(cn, dn):
return {
'objectClass': ['top', 'organizationalUnit'],
'distinguishedName': str(dn),
'ou': str(cn)
}
def get_user_by_dn(dn, base_dn, connection):
ldap_filter = '(&(objectClass=top)(objectClass=person)(objectClass=user)(distinguishedName=' + dn + '))'
return __get_user(base_dn, connection, ldap_filter)
def get_user_by_username(username, base_dn, connection):
ldap_filter = '(&(objectClass=top)(objectClass=person)(objectClass=user)(sAMAccountName=' + username + '))'
return __get_user(base_dn, connection, ldap_filter)
def get_user_by_identifier(identifier, base_dn, connection):
ldap_filter = '(&(objectClass=top)(objectClass=person)(objectClass=user)(employeeID=' + identifier + '))'
return __get_user(base_dn, connection, ldap_filter)
def __get_user(base_dn, connection, ldap_filter):
attributes = ['objectGUID', 'cn', 'samAccountName', 'employeeID', 'distinguishedName', 'description', 'displayName',
'extensionName', 'givenName', 'homeDirectory', 'homeDrive', 'mail', 'middleName', 'name',
'objectCategory', 'objectClass', 'primaryGroupID', 'sAMAccountName', 'sAMAccountType', 'sn',
'initials', 'userAccountControl', 'userPrincipalName', ]
return perform_search(ldap_filter, base_dn, connection, attributes)
def get_group(dn, base_dn, connection):
ldap_filter = '(&(objectClass=top)(objectClass=group)(distinguishedName=' + dn + '))'
return perform_search(ldap_filter, base_dn, connection, ['objectGUID'])
def get_ou(dn, base_dn, connection):
ldap_filter = '(&(objectClass=top)(|(objectClass=organizationalUnit)(objectClass=container))(distinguishedName=' + dn + '))'
return perform_search(ldap_filter, base_dn, connection, ['objectGUID'])
def verify_parent_ou_exists(target_dn, tree_base, connection):
parent_ou_parts = target_dn.split(',')
parent_ou_parts.pop(0)
parent_ou_dn = ','.join(parent_ou_parts)
# Create the parent ou for the group if it does not exist
if not get_ou(parent_ou_dn, tree_base, connection):
cn = parent_ou_dn.split(',').pop(0).strip('OU=')
formed_ou = form_ou(cn, parent_ou_dn)
if not create_object(parent_ou_dn, formed_ou, connection):
return False
return True
def perform_search(ldap_filter, base_dn, connection, attributes):
try:
results = connection.search_s(str(base_dn).strip(' \t\n\r'), ldap.SCOPE_SUBTREE, ldap_filter, attributes)
if not results[0][0]:
return False
else:
write_json_log({
'action': 'perform_search',
'ldap_filter': ldap_filter,
'base_dn': base_dn,
'attributes': attributes,
'message': 'Successfully performed LDAP search.',
'log-type': 'information'
})
return results
except ldap.LDAPError, error_message:
write_json_error({
'action': 'perform_search_fail',
'ldap_filter': ldap_filter,
'base_dn': base_dn,
'attributes': attributes,
'message': 'LDAP Search error.',
'error_message': str(error_message),
'log-type': 'error'
})
return False
def create_object(dn, formed_object, connection):
try:
write_json_log({
'action': 'create_object',
'formed_object': formed_object,
'object': dn,
'message': 'Creating object.',
'log-type': 'information'
})
return connection.add_s(dn, modlist.addModlist(formed_object))
except ldap.LDAPError, error_message:
write_json_error({
'action': 'create_object_fail',
'formed_object': formed_object,
'object': dn,
'message': 'Failed to create object',
'error_message': str(error_message),
'log-type': 'error'
})
return False
def modify_object(dn, action, connection):
try:
write_json_log({
'action': 'modify_object',
'formed_action': action,
'object': dn,
'message': 'Modifying object.',
'log-type': 'information'
})
return connection.modify_s(dn, action)
except ldap.LDAPError, error_message:
write_json_error({
'action': 'modify_object_fail',
'formed_action': action,
'object': dn,
'message': 'Failed to modify object',
'error_message': str(error_message),
'log-type': 'error'
})
return False
def delete_object(dn, connection):
try:
write_json_log({
'action': 'delete_object',
'object': dn,
'message': 'Deleting object.',
'log-type': 'information'
})
return connection.delete_s(dn)
except ldap.LDAPError, error_message:
write_json_error({
'action': 'delete_object_fail',
'object': dn,
'message': 'Failed to delete object',
'error_message': str(error_message),
'log-type': 'error'
})
return False
def rename_object(current_dn, new_cn, new_ou, connection):
try:
write_json_log({
'action': 'rename_object',
'current_dn': current_dn,
'new_cn': new_cn,
'new_ou': new_ou,
'message': 'Renaming object.',
'log-type': 'information'
})
return connection.rename_s(current_dn, 'CN=' + new_cn, new_ou)
except ldap.LDAPError, error_message:
write_json_error({
'action': 'rename_object_fail',
'current_dn': current_dn,
'new_cn': new_cn,
'new_ou': new_ou,
'message': 'Failed to rename object',
'error_message': str(error_message),
'log-type': 'error'
})
return False
def create_ou(cn, dn, connection):
ou_object = form_ou(cn, dn)
result = create_object(dn, ou_object, connection)
if result:
write_json_log({
'action': 'create_ou',
'cn': cn,
'dn': dn,
'message': 'Creating OU.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'create_ou_fail',
'cn': cn,
'dn': dn,
'message': 'Failed to create ou',
'log-type': 'error'
})
return False
def create_group(cn, dn, display_name, tree_base, connection):
verify_parent_ou_exists(dn, tree_base, connection)
group_object = form_group(cn, dn, display_name)
result = create_object(dn, group_object, connection)
if result:
write_json_log({
'action': 'create_group',
'cn': cn,
'dn': dn,
'display_name': display_name,
'tree_base': tree_base,
'message': 'Creating group.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'create_group_fail',
'cn': cn,
'dn': dn,
'display_name': display_name,
'tree_base': tree_base,
'message': 'Failed to create group',
'log-type': 'error'
})
return False
def delete_group(dn, tree_base, connection):
group_exists = get_group(dn, tree_base, connection)
if group_exists:
result = delete_object(dn, connection)
if not result:
return False
write_json_log({
'action': 'delete_group',
'dn': dn,
'tree_base': tree_base,
'message': 'Deleted group.',
'log-type': 'information'
})
return True
def set_password(dn, password, connection):
write_json_log({
'action': 'set_password',
'dn': dn,
'message': 'Reached set_password.',
'log-type': 'information'
})
unicode_passwd = build_unicode_password(password)
set_password_action = form_set_password_action(unicode_passwd)
result = modify_object(dn, set_password_action, connection)
if result:
write_json_log({
'action': 'set_password_success',
'dn': dn,
'message': 'Successfully set password.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'set_password_fail',
'dn': dn,
'message': 'Failed to set password',
'log-type': 'error'
})
return False
def enable_account(dn, connection):
enable_account_action = form_set_account_control_action('512')
result = modify_object(dn, enable_account_action, connection)
if result:
write_json_log({
'action': 'enable_account',
'dn': dn,
'message': 'Successfully enabled account.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'enable_account_fail',
'dn': dn,
'message': 'Failed to enable account',
'log-type': 'error'
})
return False
def disable_account(dn, connection):
disable_account_action = form_set_account_control_action('514')
result = modify_object(dn, disable_account_action, connection)
if result:
write_json_log({
'action': 'disable_account',
'dn': dn,
'message': 'Successfully disabled account.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'disable_account_fail',
'dn': dn,
'message': 'Failed to disable account',
'log-type': 'error'
})
return False
def check_group_membership(target_dn, group_dn, tree_base, connection):
ldap_filter = '(&(distinguishedName=' + target_dn + ')(memberof=' + group_dn + '))'
result = perform_search(ldap_filter, tree_base, connection, ['objectGUID'])
if result:
write_json_log({
'action': 'check_group_membership',
'target_dn': target_dn,
'group_dn': group_dn,
'tree_base': tree_base,
'message': 'Successfully checked group membership.',
'log-type': 'information'
})
return True
else:
return False
def add_to_group(target_dn, group_dn, tree_base, connection):
if not check_group_membership(target_dn, group_dn, tree_base, connection):
add_member = form_add_member_action(target_dn)
result = modify_object(group_dn, add_member, connection)
if result:
write_json_log({
'action': 'add_to_group',
'target_dn': target_dn,
'group_dn': group_dn,
'tree_base': tree_base,
'message': 'Successfully set group membership.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'add_to_group_fail',
'target_dn': target_dn,
'group_dn': group_dn,
'tree_base': tree_base,
'message': 'Failed to set group membership.',
'log-type': 'error'
})
return False
return True
def remove_from_group(target_dn, group_dn, tree_base, connection):
if check_group_membership(target_dn, group_dn, tree_base, connection):
del_member = form_del_member_action(target_dn)
result = modify_object(group_dn, del_member, connection)
if result:
write_json_log({
'action': 'remove_from_group',
'target_dn': target_dn,
'group_dn': group_dn,
'tree_base': tree_base,
'message': 'Successfully removed group membership.',
'log-type': 'information'
})
return result
else:
write_json_error({
'action': 'remove_from_group_fail',
'target_dn': target_dn,
'group_dn': group_dn,
'tree_base': tree_base,
'message': 'Failed to terminate group membership.',
'log-type': 'error'
})
return False
return True
def add_account_to_primary_duty_group(account_dn, group_dn, group_cn, group_display_name, tree_base, connection):
if not get_group(group_dn, tree_base, connection):
create_group(group_cn, group_dn, group_display_name, tree_base, connection)
if add_to_group(account_dn, group_dn, tree_base, connection):
return True
else:
return False
def create_account(account, connection, settings):
ou = build_account_ou(account, settings['base_user_ou_dn'], settings['duties_map_to_ou'])
dn = build_account_dn(account['username'], ou)
primary_duty_group_dn = build_group_dn(account['primary_duty']['code'], 'Duty', settings['base_group_ou_dn'])
home_share_path = build_home_share_path(account, settings['home_drive_path_pattern'])
if account['should_propagate_password']:
new_account = form_user(account, settings['email_domain'], home_share_path, settings['home_drive_letter'], True,
account['password'])
else:
new_account = form_user(account, settings['email_domain'], home_share_path, settings['home_drive_letter'])
verify_parent_ou_exists(dn, settings['tree_base'], connection)
if create_object(dn, new_account, connection):
# If we should propagate the password then set it to a random password
# if account['should_propagate_password']:
# set_password(dn, generate_password(), connection)
# Enable the account
enable_account(dn, connection)
# If we should propagate the password then set it to the desired password
# if account['should_propagate_password']:
# set_password(dn, account['password'], connection)
# Add the account to a group based on it's primary duty
add_account_to_primary_duty_group(
dn,
primary_duty_group_dn,
account['primary_duty']['code'],
account['primary_duty']['label'],
settings['tree_base'],
connection
)
return True
def modify_account(account, old_ldap_account, connection, settings):
new_ou = build_account_ou(account, settings['base_user_ou_dn'], settings['duties_map_to_ou'])
new_dn = build_account_dn(account['username'], new_ou)
home_share_path = build_home_share_path(account, settings['home_drive_path_pattern'])
renamed = False
primary_duty_group_dn = build_group_dn(account['primary_duty']['code'], 'Duty', settings['base_group_ou_dn'])
new_attributes = form_user(account, settings['email_domain'], home_share_path, settings['home_drive_letter'])
old_dn = old_ldap_account[0][0]
old_attributes = old_ldap_account[0][1]
final_attributes = {}
# Strip any attributes from the modification that have not changed
for k, v in new_attributes.iteritems():
if not k == 'objectClass':
if not k == 'userAccountControl':
if not v == '':
if v:
if k in old_attributes:
if not v == old_attributes[k][0]:
final_attributes[k] = v
else:
final_attributes[k] = v
# If the old dn does not equal the new dn move the account object
if not new_dn == old_dn:
verify_parent_ou_exists(new_dn, settings['tree_base'], connection)
rename_object(old_dn, account['username'], new_ou, connection)
renamed = True
# Determine if we are modifying a new DN or the original DN based on if the account moved
dn_to_modify = new_dn if renamed else old_dn
# If the final attributes to modify are not empty modify the account
if final_attributes:
modify_actions = form_modify_action(final_attributes)
modify_object(dn_to_modify, modify_actions, connection)
enable_account(dn_to_modify, connection)
# If we should propagate the password then set it
if account['should_propagate_password']:
set_password(dn_to_modify, account['password'], connection)
# Add the account to a group based on it's primary duty
add_account_to_primary_duty_group(
dn_to_modify,
primary_duty_group_dn,
account['primary_duty']['code'],
account['primary_duty']['label'],
settings['tree_base'],
connection
)
return True
def create_or_modify_account(account, connection, tree_base, settings):
old_account = get_user_by_identifier(account['identifier'], tree_base, connection)
if old_account:
modify_account(account, old_account, connection, settings)
else:
create_account(account, connection, settings)
return True
def delete_or_disable_account(account, connection, settings):
result = get_user_by_username(account['username'], settings['tree_base'], connection)
account_dn = False
if len(result) > 0:
if len(result[0]) > 0:
account_dn = result[0][0]
if account_dn:
if settings['delete_users']:
delete_object(account_dn, connection)
else:
disable_account(account_dn, connection)
if settings['use_trash_ou']:
if account_dn != ''.join(
['CN=', account['username'], ',', build_trash_ou_dn(settings['base_user_ou_dn'])]):
rename_object(
account_dn,
account['username'],
build_trash_ou_dn(settings['base_user_ou_dn']),
connection
)
return True
| 35.147383 | 128 | 0.595446 | 2,825 | 25,517 | 5.089558 | 0.090973 | 0.0217 | 0.027542 | 0.022534 | 0.607108 | 0.514606 | 0.451245 | 0.41174 | 0.389693 | 0.32821 | 0 | 0.003777 | 0.284085 | 25,517 | 725 | 129 | 35.195862 | 0.783228 | 0.033311 | 0 | 0.505804 | 1 | 0 | 0.210467 | 0.024625 | 0.001658 | 0 | 0 | 0 | 0 | 0 | null | null | 0.046434 | 0.006634 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
1fd2573afe92d721dc0abf0eb732901a300b6d00 | 574 | py | Python | flask_blueprint_tutorial/forms.py | djidan10/flask-blueprint-task | cdcf5c33885a4fb803cb85b7518ac90e3aa11b2d | [
"MIT"
] | 1 | 2021-09-06T09:24:26.000Z | 2021-09-06T09:24:26.000Z | flask_blueprint_tutorial/forms.py | djidan10/flask-blueprint-task | cdcf5c33885a4fb803cb85b7518ac90e3aa11b2d | [
"MIT"
] | null | null | null | flask_blueprint_tutorial/forms.py | djidan10/flask-blueprint-task | cdcf5c33885a4fb803cb85b7518ac90e3aa11b2d | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms import SubmitField
from wtforms.validators import DataRequired
class SearchForm(FlaskForm):
"""Class for the main form.
Attributes:
Address (str): This field contained the typed address
that will be processed in the backed.
submit (button): the submission button
to calculate the distance to the MKAD.
"""
address_form = StringField(
'Address',
[DataRequired()]
)
submit = SubmitField('Calculate')
| 27.333333 | 62 | 0.660279 | 62 | 574 | 6.080645 | 0.580645 | 0.087533 | 0.090186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.278746 | 574 | 20 | 63 | 28.7 | 0.910628 | 0.39547 | 0 | 0 | 0 | 0 | 0.054054 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
1fde97c2e9723e16f11d9bb1d9f534d70a6029ee | 218 | py | Python | writefile.py | Iphytech/read_write | 0d557b370bc478759cbb804d31e92455c92a14b3 | [
"MIT"
] | null | null | null | writefile.py | Iphytech/read_write | 0d557b370bc478759cbb804d31e92455c92a14b3 | [
"MIT"
] | null | null | null | writefile.py | Iphytech/read_write | 0d557b370bc478759cbb804d31e92455c92a14b3 | [
"MIT"
] | null | null | null | # creating a txt file
write_file = open('sample.txt', 'w')
write_file.write("this is just a sample text\n")
write_file.close()
# reading file
read_file = open('sample.txt' , 'r')
text = read_file.read()
print(text)
| 18.166667 | 48 | 0.697248 | 37 | 218 | 3.972973 | 0.486486 | 0.183673 | 0.190476 | 0.231293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142202 | 218 | 11 | 49 | 19.818182 | 0.786096 | 0.146789 | 0 | 0 | 0 | 0 | 0.273224 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.166667 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
1fea7210c21b3f4effef8ebc475bc3f9934489a6 | 323 | py | Python | aoc_utils/debug.py | gchazot/aoc | 1926114b1060a927be3f87732ba0a399afd98ae4 | [
"MIT"
] | 1 | 2020-04-12T16:14:29.000Z | 2020-04-12T16:14:29.000Z | aoc_utils/debug.py | gchazot/aoc | 1926114b1060a927be3f87732ba0a399afd98ae4 | [
"MIT"
] | null | null | null | aoc_utils/debug.py | gchazot/aoc | 1926114b1060a927be3f87732ba0a399afd98ae4 | [
"MIT"
] | null | null | null | from contextlib import contextmanager
try:
from time import thread_time
except ImportError:
from time import time as thread_time
@contextmanager
def log_thread_time(title):
start = thread_time()
yield
elapsed = thread_time() - start
print("Timed {0}: {1:>10.4f} ms".format(title, elapsed * 1000))
| 23.071429 | 67 | 0.71517 | 44 | 323 | 5.113636 | 0.568182 | 0.222222 | 0.124444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034483 | 0.19195 | 323 | 13 | 68 | 24.846154 | 0.827586 | 0 | 0 | 0 | 0 | 0 | 0.074303 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.363636 | 0 | 0.454545 | 0.090909 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
1fed2bb4ca9d8ee2a225e71ebaa779139f1c91e9 | 15,370 | py | Python | tests/mvae/ops/test_universal.py | macio232/mvae | df3d5158ce29744e54b378ad663361e8b785632a | [
"Apache-2.0"
] | 53 | 2019-11-20T05:39:54.000Z | 2022-02-05T06:36:43.000Z | tests/mvae/ops/test_universal.py | macio232/mvae | df3d5158ce29744e54b378ad663361e8b785632a | [
"Apache-2.0"
] | 8 | 2020-03-14T20:25:08.000Z | 2021-06-10T08:06:15.000Z | tests/mvae/ops/test_universal.py | macio232/mvae | df3d5158ce29744e54b378ad663361e8b785632a | [
"Apache-2.0"
] | 10 | 2020-03-14T20:17:47.000Z | 2021-12-01T14:08:06.000Z | # Copyright 2019 Ondrej Skopek.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from typing import Any, Tuple
import numpy as np
import pytest
import torch
from torch import tensor as t
from mt.mvae.ops import Euclidean
from mt.mvae.ops import StereographicallyProjectedSphere
import mt.mvae.ops.poincare as P
import mt.mvae.ops.spherical_projected as SP
import mt.mvae.ops.euclidean as E
from mt.mvae.ops import PoincareBall
import mt.mvae.ops.universal as U
from mt.mvae.ops.common import eps
import tests.mvae.ops.test_spherical_projected as TSP
import tests.mvae.ops.test_poincare as TP
import tests.mvae.ops.test_euclidean as TE
np.random.seed(42)
random_nums = np.random.random_sample(100) * 100 + 1
test_eps = 5e-6
low_prec_test_eps = 1e-4
curvatures = [-1. / 4, 0., 1. / 4] # radii -2, 0, 2
def _create_manifold(curvature: float) -> U.Universal:
t = torch.tensor(curvature)
return U.Universal(lambda: t)
def lambda_x(x: torch.Tensor, manifold: U.Universal) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return torch.ones(x.shape[:-1] + (1,), dtype=x.dtype)
elif isinstance(manifold.manifold, PoincareBall):
return P.pm.lambda_x(x, c=-manifold.curvature, keepdim=True)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return SP.lambda_x_c(x, c=manifold.curvature)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def exp_map(x: torch.Tensor, at_point: torch.Tensor, manifold: U.Universal) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return E.exp_map(x, at_point)
elif isinstance(manifold.manifold, PoincareBall):
return P.exp_map(x, at_point, radius=manifold.radius)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return SP.exp_map(x, at_point, radius=manifold.radius)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def inverse_exp_map(x: torch.Tensor, at_point: torch.Tensor, manifold: U.Universal) -> \
torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return E.inverse_exp_map(x, at_point)
elif isinstance(manifold.manifold, PoincareBall):
return P.inverse_exp_map(x, at_point, radius=manifold.radius)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return SP.inverse_exp_map(x, at_point, radius=manifold.radius)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def inverse_sample_projection_mu0(x: torch.Tensor, at_point: torch.Tensor, manifold: U.Universal) -> \
Tuple[torch.Tensor, torch.Tensor]:
if isinstance(manifold.manifold, Euclidean):
return E.inverse_sample_projection_mu0(x, at_point)
elif isinstance(manifold.manifold, PoincareBall):
return P.inverse_sample_projection_mu0(x, at_point, radius=manifold.radius)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return SP.inverse_sample_projection_mu0(x, at_point, radius=manifold.radius)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def is_in_hyp_space(x: torch.Tensor, manifold: U.Universal, eps: float = eps) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return TE.is_in_hyp_space(x, eps=eps)
elif isinstance(manifold.manifold, PoincareBall):
return TP.is_in_hyp_space(x, radius=manifold.radius, eps=eps)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return TSP.is_in_hyp_space(x, radius=manifold.radius, eps=eps)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def is_in_tangent_space(x: torch.Tensor, at_point: torch.Tensor, manifold: U.Universal,
eps: float = eps) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return TE.is_in_tangent_space(x, at_point, eps=eps)
elif isinstance(manifold.manifold, PoincareBall):
return TP.is_in_tangent_space(x, at_point, radius=manifold.radius, eps=eps)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return TSP.is_in_tangent_space(x, at_point, radius=manifold.radius, eps=eps)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def distance(x: torch.Tensor, y: torch.Tensor, manifold: U.Universal, **kwargs: Any) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return TE.euclidean_distance(x, y, **kwargs)
elif isinstance(manifold.manifold, PoincareBall):
return P.poincare_distance(x, y, radius=manifold.radius, **kwargs)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return SP.spherical_projected_distance(x, y, K=manifold.curvature, **kwargs)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def parallel_transport(x: torch.Tensor, src: torch.Tensor, dst: torch.Tensor, manifold: U.Universal) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return TE.parallel_transport(x, src, dst)
elif isinstance(manifold.manifold, PoincareBall):
return TP.parallel_transport(x, src, dst, radius=manifold.radius)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return TSP.parallel_transport(x, src, dst, radius=manifold.radius)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
def inverse_parallel_transport(x: torch.Tensor, src: torch.Tensor, dst: torch.Tensor,
manifold: U.Universal) -> torch.Tensor:
if isinstance(manifold.manifold, Euclidean):
return TE.inverse_parallel_transport(x, src, dst)
elif isinstance(manifold.manifold, PoincareBall):
return TP.inverse_parallel_transport(x, src, dst, radius=manifold.radius)
elif isinstance(manifold.manifold, StereographicallyProjectedSphere):
return TSP.inverse_parallel_transport(x, src, dst, radius=manifold.radius)
else:
raise ValueError("Unknown manifold " + manifold.manifold.__class__.__name__)
@pytest.mark.parametrize("curvature", curvatures)
def test_mu_0(curvature: float) -> None:
manifold = _create_manifold(curvature)
res = manifold.mu_0((3, 3), dtype=torch.int64)
expected = t([[0, 0, 0], [0, 0, 0], [0, 0, 0]])
assert res.allclose(expected)
@pytest.mark.parametrize("curvature", curvatures)
def test_is_in_hyp_space(curvature: float) -> None:
manifold = _create_manifold(curvature)
radius = manifold.radius
assert is_in_hyp_space(radius * t([1., 0, 0]), manifold=manifold)
if curvature >= 0:
assert is_in_hyp_space(radius * t([0.1, 2, 3]), manifold=manifold)
assert is_in_hyp_space(radius * t([1, 1, np.sqrt(2)]), manifold=manifold)
assert is_in_hyp_space(radius * t([1, 1, np.sqrt(2)]), manifold=manifold)
assert is_in_hyp_space(radius * t([0, 2, -np.sqrt(2)]), manifold=manifold)
else:
assert not is_in_hyp_space(radius * t([0.1, 2, 3]), manifold=manifold)
assert not is_in_hyp_space(radius * t([1, 1, np.sqrt(2)]), manifold=manifold)
assert not is_in_hyp_space(radius * t([1, 1, np.sqrt(2)]), manifold=manifold)
assert not is_in_hyp_space(radius * t([0, 2, -np.sqrt(2)]), manifold=manifold)
@pytest.mark.parametrize("curvature", curvatures)
def test_is_in_tangent_space(curvature: float) -> None:
# manifold = _create_manifold(curvature)
# assert is_in_tangent_space(t([0., 2, 3]), manifold.radius * t([1., 0, 0]), manifold=manifold)
#
# if curvature <= 0:
# assert not is_in_tangent_space(t([0.1, 2, 3]), manifold.radius * t([1., 0, 0]), manifold=manifold)
# else:
# assert is_in_tangent_space(t([0.1, 2, 3]), manifold.radius * t([1., 0, 0]), manifold=manifold)
#
# assert is_in_tangent_space(t([0, 2, -np.sqrt(2)]), t([1, 0.5, np.sqrt(2) / 2]), eps=test_eps, manifold=manifold)
# TODO-LATER: Projected spaces tangent spaces don't work like this.
pass
@pytest.mark.parametrize("curvature", curvatures)
def test_distance(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu0 = manifold.radius * t([1., 0, 0])
mu = manifold.radius * t([2., 1., np.sqrt(2)])
assert distance(mu0, mu0, manifold=manifold).allclose(t(0.), atol=5e-4)
assert distance(mu, mu, manifold=manifold).allclose(t(0.), atol=5e-4)
assert distance(mu0, mu, manifold=manifold) == distance(mu, mu0, manifold=manifold)
@pytest.mark.parametrize("curvature", curvatures)
def test_parallel_transport(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu1 = t([2., 1, np.sqrt(2)]).double() / manifold.radius
mu2 = t([np.sqrt(5), 1, np.sqrt(3)]).double() / manifold.radius
assert is_in_hyp_space(mu1, manifold=manifold)
assert is_in_hyp_space(mu2, manifold=manifold)
u = t([0, 2, -np.sqrt(2)]).double()
# assert is_in_tangent_space(u, at_point=mu1, eps=test_eps, manifold=manifold)
assert parallel_transport(u, src=mu1, dst=mu1, manifold=manifold).allclose(u, atol=5e-4)
pt_u = parallel_transport(u, src=mu1, dst=mu2, manifold=manifold)
# assert is_in_tangent_space(pt_u, at_point=mu2, eps=test_eps, manifold=manifold)
u_ = parallel_transport(pt_u, src=mu2, dst=mu1, manifold=manifold)
assert u.allclose(u_, atol=5e-4)
u_inv = inverse_parallel_transport(pt_u, src=mu1, dst=mu2, manifold=manifold)
assert u.allclose(u_inv)
@pytest.mark.parametrize("curvature", curvatures)
def test_parallel_transport_batch(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu1 = t([2., 1, np.sqrt(2)])
mu2 = t([np.sqrt(5), 1, np.sqrt(3)])
u = t([0, 2, -np.sqrt(2)])
u2 = t([0, 4, -2 * np.sqrt(2)])
U = torch.stack((u, u2), dim=0)
res = parallel_transport(U, src=mu1, dst=mu2, manifold=manifold)
U_ = inverse_parallel_transport(res, src=mu1, dst=mu2, manifold=manifold)
assert U.allclose(U_, atol=test_eps)
@pytest.mark.parametrize("curvature", curvatures)
def test_parallel_transport_mu0(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu0 = t([0., 0, 0])
mu2 = t([np.sqrt(5), 1, np.sqrt(3)])
u = t([0, 2, -np.sqrt(2)])
assert manifold.parallel_transport_mu0(u, dst=mu0).allclose(u)
pt_u = manifold.parallel_transport_mu0(u, dst=mu2)
assert parallel_transport(u, src=mu0, dst=mu2, manifold=manifold).allclose(pt_u)
u_inv = manifold.inverse_parallel_transport_mu0(pt_u, src=mu2)
assert u.allclose(u_inv)
@pytest.mark.parametrize("curvature", curvatures)
def test_parallel_transport_mu0_batch(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu2 = manifold.radius * t([np.sqrt(5), 1, np.sqrt(3)])
u = t([0, 2, -np.sqrt(2)])
u2 = t([0, 4, -2 * np.sqrt(2)])
UU = torch.stack((u, u2), dim=0)
res = manifold.parallel_transport_mu0(UU, dst=mu2)
U_ = manifold.inverse_parallel_transport_mu0(res, src=mu2)
assert UU.allclose(U_)
@pytest.mark.parametrize("curvature", curvatures)
def test_exp_map(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu = t([1., 0.5, np.sqrt(2) / 2])
u = t([0, 2, -np.sqrt(2)])
assert is_in_tangent_space(u, at_point=mu, eps=test_eps, manifold=manifold)
u_mapped = exp_map(u, at_point=mu, manifold=manifold)
u_ = inverse_exp_map(u_mapped, at_point=mu, manifold=manifold)
assert u.allclose(u_, atol=test_eps)
assert distance(mu, u_mapped, manifold=manifold).allclose(lambda_x(mu, manifold=manifold) * torch.norm(u, p=2))
@pytest.mark.parametrize("curvature", curvatures)
def test_exp_map_mu0(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu0 = manifold.mu_0((3,)).double()
u = t([0, 2, -np.sqrt(2)]).double()
assert is_in_tangent_space(u, at_point=mu0, eps=test_eps, manifold=manifold)
u_mapped = exp_map(u, at_point=mu0, manifold=manifold)
u_mu0_mapped = manifold.exp_map_mu0(u)
assert u_mapped.allclose(u_mu0_mapped)
u_ = inverse_exp_map(u_mapped, at_point=mu0, manifold=manifold)
u_mu0 = manifold.inverse_exp_map_mu0(u_mu0_mapped)
assert u.allclose(u_, atol=test_eps)
assert u.allclose(u_mu0, atol=test_eps)
assert distance(mu0, u_mapped, manifold=manifold).allclose(lambda_x(mu0, manifold) * torch.norm(u, p=2))
assert distance(mu0, u_mu0_mapped, manifold=manifold).allclose(lambda_x(mu0, manifold) * torch.norm(u, p=2))
@pytest.mark.parametrize("curvature", curvatures)
def test_exp_map_large(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu = t([1., 0.5, np.sqrt(2) / 2]).double()
u = 1.8 * t([0, 2, -np.sqrt(2)]).double()
assert is_in_tangent_space(u, at_point=mu, eps=test_eps, manifold=manifold) # This should hold.
u_mapped = exp_map(u, at_point=mu, manifold=manifold)
u_ = inverse_exp_map(u_mapped, at_point=mu, manifold=manifold)
assert u.allclose(u_, atol=low_prec_test_eps)
assert distance(mu, u_mapped, manifold=manifold).allclose(lambda_x(mu, manifold) * torch.norm(u, p=2))
@pytest.mark.parametrize("curvature", curvatures)
def test_exp_map_batch(curvature: float) -> None:
manifold = _create_manifold(curvature)
mu = t([1., 0.5, np.sqrt(2) / 2]).double()
u = t([0, 2, -np.sqrt(2)]).double()
u2 = 0.9 * t([0, 4, -2 * np.sqrt(2)]).double()
assert is_in_tangent_space(u, at_point=mu, eps=test_eps, manifold=manifold)
assert is_in_tangent_space(u2, at_point=mu, eps=test_eps, manifold=manifold)
UU = torch.stack((u, u2), dim=0)
U_mapped = exp_map(UU, at_point=mu, manifold=manifold)
U_ = inverse_exp_map(U_mapped, at_point=mu, manifold=manifold)
assert UU.allclose(U_, atol=1e-5)
assert distance(mu, U_mapped,
manifold=manifold).allclose(lambda_x(mu, manifold) * torch.norm(UU, p=2, dim=-1, keepdim=True))
@pytest.mark.parametrize("curvature", curvatures)
def test_sample_projection(curvature: float) -> None:
manifold = _create_manifold(curvature)
v = t([0., 1, 2])
mu0 = t([0., 0, 0])
assert is_in_hyp_space(mu0, manifold=manifold)
assert is_in_tangent_space(v, at_point=mu0, manifold=manifold)
mu = t([1., 0.5, np.sqrt(2) / 2])
assert is_in_hyp_space(mu, manifold=manifold)
v_proj, _ = manifold.sample_projection_mu0(v, at_point=mu)
assert is_in_hyp_space(v_proj, eps=low_prec_test_eps, manifold=manifold)
_, v_ = inverse_sample_projection_mu0(v_proj, at_point=mu, manifold=manifold)
assert v.allclose(v_, atol=test_eps)
assert is_in_tangent_space(v_, at_point=mu0, eps=test_eps, manifold=manifold)
| 43.914286 | 118 | 0.706116 | 2,224 | 15,370 | 4.67446 | 0.085432 | 0.150827 | 0.067526 | 0.021932 | 0.795594 | 0.749134 | 0.726433 | 0.649192 | 0.60985 | 0.541266 | 0 | 0.022975 | 0.158946 | 15,370 | 349 | 119 | 44.040115 | 0.781233 | 0.088354 | 0 | 0.42 | 0 | 0 | 0.019309 | 0 | 0 | 0 | 0 | 0.002865 | 0.18 | 1 | 0.092 | false | 0.004 | 0.064 | 0 | 0.268 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.