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
517228178e56a897dd363cadf1ee90a0d7ff0f6c
332
py
Python
examples/idioms/programs/092.1100-save-object-into-json-file.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
31
2020-05-02T13:34:26.000Z
2021-06-06T17:25:52.000Z
examples/idioms/programs/092.1100-save-object-into-json-file.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
108
2019-11-18T19:41:52.000Z
2022-03-18T13:58:17.000Z
examples/idioms/programs/092.1100-save-object-into-json-file.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
4
2020-05-19T08:57:44.000Z
2020-09-21T08:53:46.000Z
"""Save object into JSON file. Write content of object _x into file _data._json. Source: programming-idioms.org """ # Implementation author: nickname # Created on 2016-02-18T16:58:02.298929Z # Last modified on 2016-02-18T16:58:02.298929Z # Version 1 import json with open("data.json", "w") as output: json.dump(x, output)
19.529412
50
0.725904
53
332
4.490566
0.660377
0.067227
0.067227
0.109244
0.201681
0.201681
0.201681
0
0
0
0
0.145907
0.153614
332
16
51
20.75
0.701068
0.716867
0
0
0
0
0.119048
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
5173fc85396310a3a2599f64438b785d2d003466
13,077
py
Python
test2.py
blockconsortium/pybitcointools
33274489f3927a855022f6495778de904f3b7617
[ "MIT" ]
1
2021-03-19T11:58:59.000Z
2021-03-19T11:58:59.000Z
test2.py
blockconsortium/pybitcointools
33274489f3927a855022f6495778de904f3b7617
[ "MIT" ]
null
null
null
test2.py
blockconsortium/pybitcointools
33274489f3927a855022f6495778de904f3b7617
[ "MIT" ]
1
2021-03-19T11:58:12.000Z
2021-03-19T11:58:12.000Z
import unittest from egulden import * from egulden.transaction import serialize_script #from egulden.pyspecials import * #from egulden.transaction import * #from egulden.mnemonic import * #from egulden.deterministic import * #from egulden.utils import * def get_op(s): """Returns OP_CODE for integer, or integer for OP_CODE""" getop = lambda o: OPCODES_BY_NAME.get(o.upper() if \ not o.startswith("OP_") else str(o[2:]).upper(), 0) if isinstance(s, int): return OPint.get(s, "") elif isinstance(s, string_types): return getop(s) def parse_script(s): def ishex(s): return set(s).issubset(set('0123456789abcdefABCDEF')) r = [] opcodes_by_name = {} for name, code in OPCODES_BY_NAME.items(): opcodes_by_name[name] = code opcodes_by_name[name[3:]] = code for word in s.split(): if word.isdigit() or (word[0] == '-' and word[1:].isdigit()): if int(word) in (0, 80): r.append(None) elif int(word) < 0: raise ValueError("Negative 1 error!") elif 81 <= int(word) <= 96: raise ValueError("Range of 81-96, should be 1-16\n" "WE SHOULDN'T GET HERE") # check r.append(int(word)) elif word.startswith('0x') and ishex(word[2:]): if int(word[2:], 16) <= 0x4e: continue # we don't need push codes else: r.append(word[2:]) elif len(word) >= 2 and ((word[0], word[-1]) == ("'", "'") or (word[0], word[-1]) == ("[", "]")): r.append(word[1:-1]) elif word in opcodes_by_name: # Should be op_codes > 0x60 assert opcodes_by_name[word] > 96 r.append(opcodes_by_name[word]) # r.append(get_op(v[3:])) else: raise ValueError("could not parse script! (word=\t%s)" % str(word)) sc = serialize_script(r) # 7,12,13,24 don't work return sc def load_txvalid(): with open('tests/tx_valid_EDITED.json', 'r') as fo: for tv in json.load(fo): if len(tv) == 1: continue assert len(tv) == 3 prevouts = {} for i, json_prevout in enumerate(tv[0]): assert len(json_prevout) == 3 n = 0xffffffff if json_prevout[1] == -1 else json_prevout[1] prevout = "%s:%d" % (json_prevout[0], n) try: spk = parse_script(json_prevout[2]) except Exception as e: if i in (7, ): # Tests we know are broken continue sys.stderr.write(str(e)) prevouts[prevout] = spk tx = str(tv[1]) flags = tv[2] yield (prevouts, tx, flags) def load_checktxs(): with open('tests/tx_valid_checktransaction.json', 'r') as fo: for tv in json.load(fo): if len(tv) == 1: continue assert len(tv) == 3 tx = str(tv[1]) yield tx class BitcoinCore_TransactionValid(unittest.TestCase): @classmethod def setUpClass(cls): print("Testing BitcoinCore Transactions (Valid)") OPS = {'OP_0': 0, 'OP_0NOTEQUAL': 146, 'OP_1': 81, 'OP_10': 90, 'OP_11': 91, 'OP_12': 92, 'OP_13': 93, 'OP_14': 94, 'OP_15': 95, 'OP_16': 96, 'OP_1ADD': 139, 'OP_1NEGATE': 79, 'OP_1SUB': 140, 'OP_2': 82, 'OP_2DIV': 142, 'OP_2DROP': 109, 'OP_2DUP': 110, 'OP_2MUL': 141, 'OP_2OVER': 112, 'OP_2ROT': 113, 'OP_2SWAP': 114, 'OP_3': 83, 'OP_3DUP': 111, 'OP_4': 84, 'OP_5': 85, 'OP_6': 86, 'OP_7': 87, 'OP_8': 88, 'OP_9': 89, 'OP_ABS': 144, 'OP_ADD': 147, 'OP_AND': 132, 'OP_BOOLAND': 154, 'OP_BOOLOR': 155, 'OP_CAT': 126, 'OP_CHECKLOCKTIMEVERIFY': 177, 'OP_CHECKMULTISIG': 174, 'OP_CHECKMULTISIGVERIFY': 175, 'OP_CHECKSIG': 172, 'OP_CHECKSIGVERIFY': 173, 'OP_CODESEPARATOR': 171, 'OP_DEPTH': 116, 'OP_DIV': 150, 'OP_DROP': 117, 'OP_DUP': 118, 'OP_ELSE': 103, 'OP_ENDIF': 104, 'OP_EQUAL': 135, 'OP_EQUALVERIFY': 136, 'OP_FALSE': 0, 'OP_FROMALTSTACK': 108, 'OP_GREATERTHAN': 160, 'OP_GREATERTHANOREQUAL': 162, 'OP_HASH160': 169, 'OP_HASH256': 170, 'OP_IF': 99, 'OP_IFDUP': 115, 'OP_INVALIDOPCODE': 255, 'OP_INVERT': 131, 'OP_LEFT': 128, 'OP_LESSTHAN': 159, 'OP_LESSTHANOREQUAL': 161, 'OP_LSHIFT': 152, 'OP_MAX': 164, 'OP_MIN': 163, 'OP_MOD': 151, 'OP_MUL': 149, 'OP_NEGATE': 143, 'OP_NIP': 119, 'OP_NOP': 97, 'OP_NOP1': 176, 'OP_NOP10': 185, 'OP_NOP2': 177, 'OP_NOP3': 178, 'OP_NOP4': 179, 'OP_NOP5': 180, 'OP_NOP6': 181, 'OP_NOP7': 182, 'OP_NOP8': 183, 'OP_NOP9': 184, 'OP_NOT': 145, 'OP_NOTIF': 100, 'OP_NUMEQUAL': 156, 'OP_NUMEQUALVERIFY': 157, 'OP_NUMNOTEQUAL': 158, 'OP_OR': 133, 'OP_OVER': 120, 'OP_PICK': 121, 'OP_PUBKEY': 254, 'OP_PUBKEYHASH': 253, 'OP_PUSHDATA1': 76, 'OP_PUSHDATA2': 77, 'OP_PUSHDATA4': 78, 'OP_RESERVED': 80, 'OP_RESERVED1': 137, 'OP_RESERVED2': 138, 'OP_RETURN': 106, 'OP_RIGHT': 129, 'OP_RIPEMD160': 166, 'OP_ROLL': 122, 'OP_ROT': 123, 'OP_RSHIFT': 153, 'OP_SHA1': 167, 'OP_SHA256': 168, 'OP_SIZE': 130, 'OP_SUB': 148, 'OP_SUBSTR': 127, 'OP_SWAP': 124, 'OP_TOALTSTACK': 107, 'OP_TRUE': 81, 'OP_TUCK': 125, 'OP_VER': 98, 'OP_VERIF': 101, 'OP_VERIFY': 105, 'OP_VERNOTIF': 102, 'OP_WITHIN': 165, 'OP_XOR': 134 } OPCODES_BY_NAME = dict([(k, v) for k, v in OPS.items()]) OPCODES_BY_NAME.update(dict([(k[3:], v) for k, v in OPS.items()])) def test_all(self): for i, tx in enumerate(load_checktxs()): print("Checking Tx (Valid) Test Vector #%d" % i) self.assertTrue(check_transaction(tx), "Check Tx Failed:\nIndex: %d\nTx hex: %s" % (i, str(tx))) for i, (prevs, txhex, flags) in enumerate(load_txvalid()): print("Checking Tx (Valid) Test Vector #%d" % i) self.assertTrue(check_transaction(tx), "Check Tx Failed:\nIndex: %d\nTx hex: %s" % (i, str(tx))) # [[[prevout_txid, prevout_vout, prevout_spk], ... ], serialized_tx] tx_valid_test_vectors = [ [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "514104cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4410461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af52ae"]], "0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000490047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000"], [[["406b2b06bcd34d3c8733e6b79f7a394c8a431fbf4ff5ac705c93f4076bb77602", 0, "76a914dc44b1164188067c3a32d4780f5996fa14a4f2d988ac"]], "01000000010276b76b07f4935c70acf54fbf1f438a4c397a9fb7e633873c4dd3bc062b6b40000000008c493046022100d23459d03ed7e9511a47d13292d3430a04627de6235b6e51a40f9cd386f2abe3022100e7d25b080f0bb8d8d5f878bba7d54ad2fda650ea8d158a33ee3cbd11768191fd004104b0e2c879e4daf7b9ab68350228c159766676a14f5815084ba166432aab46198d4cca98fa3e9981d0a90b2effc514b76279476550ba3663fdcaff94c38420e9d5000000000100093d00000000001976a9149a7b0f3b80c6baaeedce0a0842553800f832ba1f88ac00000000"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "76a9145b6462475454710f3c22f5fdf0b40704c92f25c388ad51"]], "01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000"], [[["b464e85df2a238416f8bdae11d120add610380ea07f4ef19c5f9dfd472f96c3d", 0, "76a914bef80ecf3a44500fda1bc92176e442891662aed288ac"], ["b7978cc96e59a8b13e0865d3f95657561a7f725be952438637475920bac9eb21", 1, "76a914bef80ecf3a44500fda1bc92176e442891662aed288ac"]], "01000000023d6cf972d4dff9c519eff407ea800361dd0a121de1da8b6f4138a2f25de864b4000000008a4730440220ffda47bfc776bcd269da4832626ac332adfca6dd835e8ecd83cd1ebe7d709b0e022049cffa1cdc102a0b56e0e04913606c70af702a1149dc3b305ab9439288fee090014104266abb36d66eb4218a6dd31f09bb92cf3cfa803c7ea72c1fc80a50f919273e613f895b855fb7465ccbc8919ad1bd4a306c783f22cd3227327694c4fa4c1c439affffffff21ebc9ba20594737864352e95b727f1a565756f9d365083eb1a8596ec98c97b7010000008a4730440220503ff10e9f1e0de731407a4a245531c9ff17676eda461f8ceeb8c06049fa2c810220c008ac34694510298fa60b3f000df01caa244f165b727d4896eb84f81e46bcc4014104266abb36d66eb4218a6dd31f09bb92cf3cfa803c7ea72c1fc80a50f919273e613f895b855fb7465ccbc8919ad1bd4a306c783f22cd3227327694c4fa4c1c439affffffff01f0da5200000000001976a914857ccd42dded6df32949d4646dfa10a92458cfaa88ac00000000"] ] # TODO: lose the tx_valid_test_vectors ?? for item in tx_valid_test_vectors: prevouts = item[0] txh = item[1] for i, prevout_item in enumerate(prevouts): prevout_txin, prevout_vout, prevout_spk = prevout_item calculated = get_outpoints(txh, i) actual = "%s:%d" % (prevout_txin, prevout_vout) self.assertEqual(actual, calculated, "get_outpoint at index %d failed" % int(i)) #assert actual == calculated final_scriptsig = deserialize_script(deserialize(txh)['ins'][i]['script']) txtype = None if all([x in deserialize_script(prevout_spk) for x in [118, 169, 136]]): txtype = 'p2pkh' elif 0xae in deserialize_script(prevout_spk): txtype = 'p2sh' if txtype == 'p2pkh': der, pub = final_scriptsig #assert verify_tx_input(txh, int(i), prevout_spk, der, pub) self.assertTrue( verify_tx_input(txh, int(i), prevout_spk, *final_scriptsig), "Tx Verif'n Failed:\nRawTx %s\nTxID In %s:%s\n" "ScriptPubKey %s\nSigning Index %s\nDER %s\nPub(s) %s" % ( txh, prevout_txin, str(prevout_vout), prevout_spk, str(i), final_scriptsig[0], final_scriptsig[1]) ) elif txtype == 'p2sh': der = final_scriptsig[1] pubs = [x for x in deserialize_script(prevout_spk) if is_pubkey(x)] #assert any([verify_tx_input(txh, int(i), prevout_spk, der, x) for x in pubs]) self.assertTrue( any([verify_tx_input(txh, int(i), prevout_spk, der, x) for x in pubs]), "Tx Verif'n Failed:\nRawTx %s\nTxID In %s\n" "Index %s\nScriptPubKey %s\nDER %s\nPub(s) %s" % ( txh, prevout_txin, str(prevout_vout), prevout_spk, der, repr(pubs) ) ) else: raise Exception("Unknown Tx Type") if __name__ == '__main__': unittest.main()
43.88255
1,076
0.561444
1,159
13,077
6.13805
0.363244
0.016868
0.018274
0.011808
0.11892
0.099663
0.091229
0.08673
0.082513
0.069722
0
0.263461
0.336774
13,077
298
1,077
43.88255
0.556785
0.046341
0
0.080972
0
0
0.349932
0.228496
0
0
0.001446
0.003356
0.036437
1
0.02834
false
0
0.012146
0.004049
0.060729
0.012146
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5177fd96a5f010b2efce5299730e8d65f6c07f2c
121
py
Python
Comprehensions - Lab/No Vowels.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Comprehensions - Lab/No Vowels.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Comprehensions - Lab/No Vowels.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
vowels = ['a', 'o', 'u', 'e', 'i'] word = [letter for letter in input() if letter not in vowels] print(''.join(word))
30.25
62
0.570248
20
121
3.45
0.75
0
0
0
0
0
0
0
0
0
0
0
0.190083
121
3
63
40.333333
0.704082
0
0
0
0
0
0.042373
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
517bf0b0fa5211a6b833a1724fda8af75dc17d31
380
py
Python
homeworks/03/problem1.py
armgabrielyan/python-2
69f733a93fd2a7a1d55052122096cb69ee6d12d3
[ "MIT" ]
null
null
null
homeworks/03/problem1.py
armgabrielyan/python-2
69f733a93fd2a7a1d55052122096cb69ee6d12d3
[ "MIT" ]
null
null
null
homeworks/03/problem1.py
armgabrielyan/python-2
69f733a93fd2a7a1d55052122096cb69ee6d12d3
[ "MIT" ]
1
2021-08-08T20:06:54.000Z
2021-08-08T20:06:54.000Z
import cv2 as cv img = cv.imread('data/pic1.jpg') cv.imshow('pic1', img) # RGB rgb = cv.cvtColor(img, cv.COLOR_BGR2RGB) cv.imshow('rgb', rgb) # HSV hsv = cv.cvtColor(img, cv.COLOR_BGR2HSV) cv.imshow('hsv', hsv) # LAB lab = cv.cvtColor(img, cv.COLOR_BGR2LAB) cv.imshow('lab', lab) # grayscale gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) cv.imshow('gray', gray) cv.waitKey(0)
16.521739
42
0.689474
65
380
3.969231
0.353846
0.096899
0.20155
0.232558
0.310078
0
0
0
0
0
0
0.024169
0.128947
380
22
43
17.272727
0.755287
0.055263
0
0
0
0
0.084746
0
0
0
0
0
0
1
0
false
0
0.083333
0
0.083333
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
5189122bd963a299fd7e39c00614ca16d9f4d2ba
37,912
py
Python
api/gen/chromite/api/binhost_pb2.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
api/gen/chromite/api/binhost_pb2.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
2
2021-03-26T00:29:32.000Z
2021-04-30T21:29:33.000Z
api/gen/chromite/api/binhost_pb2.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: chromite/api/binhost.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from chromite.api.gen.chromite.api import build_api_pb2 as chromite_dot_api_dot_build__api__pb2 from chromite.api.gen.chromite.api import sysroot_pb2 as chromite_dot_api_dot_sysroot__pb2 from chromite.api.gen.chromiumos import common_pb2 as chromiumos_dot_common__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='chromite/api/binhost.proto', package='chromite.api', syntax='proto3', serialized_options=_b('Z6go.chromium.org/chromiumos/infra/proto/go/chromite/api'), serialized_pb=_b('\n\x1a\x63hromite/api/binhost.proto\x12\x0c\x63hromite.api\x1a\x1c\x63hromite/api/build_api.proto\x1a\x1a\x63hromite/api/sysroot.proto\x1a\x17\x63hromiumos/common.proto\"-\n\x07\x42inhost\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x15\n\rpackage_index\x18\x02 \x01(\t\".\n\x0cPackageIndex\x12\x1e\n\x04path\x18\x01 \x01(\x0b\x32\x10.chromiumos.Path\"?\n\x0e\x41\x63lArgsRequest\x12-\n\x0c\x62uild_target\x18\x01 \x01(\x0b\x32\x17.chromiumos.BuildTarget\"k\n\x0f\x41\x63lArgsResponse\x12\x32\n\x04\x61rgs\x18\x01 \x03(\x0b\x32$.chromite.api.AclArgsResponse.AclArg\x1a$\n\x06\x41\x63lArg\x12\x0b\n\x03\x61rg\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"S\n\x11\x42inhostGetRequest\x12-\n\x0c\x62uild_target\x18\x01 \x01(\x0b\x32\x17.chromiumos.BuildTarget\x12\x0f\n\x07private\x18\x02 \x01(\x08\"=\n\x12\x42inhostGetResponse\x12\'\n\x08\x62inhosts\x18\x01 \x03(\x0b\x32\x15.chromite.api.Binhost\"\xdf\x01\n\x1cPrepareBinhostUploadsRequest\x12-\n\x0c\x62uild_target\x18\x01 \x01(\x0b\x32\x17.chromiumos.BuildTarget\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\"\n\x06\x63hroot\x18\x03 \x01(\x0b\x32\x12.chromiumos.Chroot\x12&\n\x07sysroot\x18\x04 \x01(\x0b\x32\x15.chromite.api.Sysroot\x12\x37\n\x13package_index_files\x18\x05 \x03(\x0b\x32\x1a.chromite.api.PackageIndex\"\x1c\n\x0cUploadTarget\x12\x0c\n\x04path\x18\x01 \x01(\t\"h\n\x1dPrepareBinhostUploadsResponse\x12\x13\n\x0buploads_dir\x18\x01 \x01(\t\x12\x32\n\x0eupload_targets\x18\x02 \x03(\x0b\x32\x1a.chromite.api.UploadTarget\"\x96\x01\n&PrepareDevInstallBinhostUploadsRequest\x12\x13\n\x0buploads_dir\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\"\n\x06\x63hroot\x18\x03 \x01(\x0b\x32\x12.chromiumos.Chroot\x12&\n\x07sysroot\x18\x04 \x01(\x0b\x32\x15.chromite.api.Sysroot\"]\n\'PrepareDevInstallBinhostUploadsResponse\x12\x32\n\x0eupload_targets\x18\x01 \x03(\x0b\x32\x1a.chromite.api.UploadTarget\"\x87\x01\n\x11SetBinhostRequest\x12-\n\x0c\x62uild_target\x18\x01 \x01(\x0b\x32\x17.chromiumos.BuildTarget\x12\x0f\n\x07private\x18\x02 \x01(\x08\x12%\n\x03key\x18\x03 \x01(\x0e\x32\x18.chromite.api.BinhostKey\x12\x0b\n\x03uri\x18\x04 \x01(\t\")\n\x12SetBinhostResponse\x12\x13\n\x0boutput_file\x18\x01 \x01(\t\"m\n\x16RegenBuildCacheRequest\x12/\n\x0coverlay_type\x18\x01 \x01(\x0e\x32\x19.chromite.api.OverlayType\x12\"\n\x06\x63hroot\x18\x02 \x01(\x0b\x32\x12.chromiumos.Chroot\"|\n\x17RegenBuildCacheResponse\x12H\n\x11modified_overlays\x18\x01 \x03(\x0b\x32-.chromite.api.RegenBuildCacheResponse.Overlay\x1a\x17\n\x07Overlay\x12\x0c\n\x04path\x18\x01 \x01(\t*o\n\nBinhostKey\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x16\n\x12POSTSUBMIT_BINHOST\x10\x01\x12!\n\x1dLATEST_RELEASE_CHROME_BINHOST\x10\x02\x12\x15\n\x11PREFLIGHT_BINHOST\x10\x03*\x87\x01\n\x0bOverlayType\x12\x1b\n\x17OVERLAYTYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10OVERLAYTYPE_BOTH\x10\x01\x12\x16\n\x12OVERLAYTYPE_PUBLIC\x10\x02\x12\x17\n\x13OVERLAYTYPE_PRIVATE\x10\x03\x12\x14\n\x10OVERLAYTYPE_NONE\x10\x04\x32\x8c\x05\n\x0e\x42inhostService\x12[\n\x03Get\x12\x1f.chromite.api.BinhostGetRequest\x1a .chromite.api.BinhostGetResponse\"\x11\xc2\xed\x1a\r\n\x0bGetBinhosts\x12X\n\x19GetPrivatePrebuiltAclArgs\x12\x1c.chromite.api.AclArgsRequest\x1a\x1d.chromite.api.AclArgsResponse\x12p\n\x15PrepareBinhostUploads\x12*.chromite.api.PrepareBinhostUploadsRequest\x1a+.chromite.api.PrepareBinhostUploadsResponse\x12\x8e\x01\n\x1fPrepareDevInstallBinhostUploads\x12\x34.chromite.api.PrepareDevInstallBinhostUploadsRequest\x1a\x35.chromite.api.PrepareDevInstallBinhostUploadsResponse\x12O\n\nSetBinhost\x12\x1f.chromite.api.SetBinhostRequest\x1a .chromite.api.SetBinhostResponse\x12^\n\x0fRegenBuildCache\x12$.chromite.api.RegenBuildCacheRequest\x1a%.chromite.api.RegenBuildCacheResponse\x1a\x0f\xc2\xed\x1a\x0b\n\x07\x62inhost\x10\x02\x42\x38Z6go.chromium.org/chromiumos/infra/proto/go/chromite/apib\x06proto3') , dependencies=[chromite_dot_api_dot_build__api__pb2.DESCRIPTOR,chromite_dot_api_dot_sysroot__pb2.DESCRIPTOR,chromiumos_dot_common__pb2.DESCRIPTOR,]) _BINHOSTKEY = _descriptor.EnumDescriptor( name='BinhostKey', full_name='chromite.api.BinhostKey', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='UNSPECIFIED', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='POSTSUBMIT_BINHOST', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='LATEST_RELEASE_CHROME_BINHOST', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='PREFLIGHT_BINHOST', index=3, number=3, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=1572, serialized_end=1683, ) _sym_db.RegisterEnumDescriptor(_BINHOSTKEY) BinhostKey = enum_type_wrapper.EnumTypeWrapper(_BINHOSTKEY) _OVERLAYTYPE = _descriptor.EnumDescriptor( name='OverlayType', full_name='chromite.api.OverlayType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='OVERLAYTYPE_UNSPECIFIED', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='OVERLAYTYPE_BOTH', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='OVERLAYTYPE_PUBLIC', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='OVERLAYTYPE_PRIVATE', index=3, number=3, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='OVERLAYTYPE_NONE', index=4, number=4, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=1686, serialized_end=1821, ) _sym_db.RegisterEnumDescriptor(_OVERLAYTYPE) OverlayType = enum_type_wrapper.EnumTypeWrapper(_OVERLAYTYPE) UNSPECIFIED = 0 POSTSUBMIT_BINHOST = 1 LATEST_RELEASE_CHROME_BINHOST = 2 PREFLIGHT_BINHOST = 3 OVERLAYTYPE_UNSPECIFIED = 0 OVERLAYTYPE_BOTH = 1 OVERLAYTYPE_PUBLIC = 2 OVERLAYTYPE_PRIVATE = 3 OVERLAYTYPE_NONE = 4 _BINHOST = _descriptor.Descriptor( name='Binhost', full_name='chromite.api.Binhost', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='uri', full_name='chromite.api.Binhost.uri', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='package_index', full_name='chromite.api.Binhost.package_index', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=127, serialized_end=172, ) _PACKAGEINDEX = _descriptor.Descriptor( name='PackageIndex', full_name='chromite.api.PackageIndex', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='path', full_name='chromite.api.PackageIndex.path', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=174, serialized_end=220, ) _ACLARGSREQUEST = _descriptor.Descriptor( name='AclArgsRequest', full_name='chromite.api.AclArgsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='build_target', full_name='chromite.api.AclArgsRequest.build_target', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=222, serialized_end=285, ) _ACLARGSRESPONSE_ACLARG = _descriptor.Descriptor( name='AclArg', full_name='chromite.api.AclArgsResponse.AclArg', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='arg', full_name='chromite.api.AclArgsResponse.AclArg.arg', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='chromite.api.AclArgsResponse.AclArg.value', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=358, serialized_end=394, ) _ACLARGSRESPONSE = _descriptor.Descriptor( name='AclArgsResponse', full_name='chromite.api.AclArgsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='args', full_name='chromite.api.AclArgsResponse.args', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_ACLARGSRESPONSE_ACLARG, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=287, serialized_end=394, ) _BINHOSTGETREQUEST = _descriptor.Descriptor( name='BinhostGetRequest', full_name='chromite.api.BinhostGetRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='build_target', full_name='chromite.api.BinhostGetRequest.build_target', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='private', full_name='chromite.api.BinhostGetRequest.private', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=396, serialized_end=479, ) _BINHOSTGETRESPONSE = _descriptor.Descriptor( name='BinhostGetResponse', full_name='chromite.api.BinhostGetResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='binhosts', full_name='chromite.api.BinhostGetResponse.binhosts', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=481, serialized_end=542, ) _PREPAREBINHOSTUPLOADSREQUEST = _descriptor.Descriptor( name='PrepareBinhostUploadsRequest', full_name='chromite.api.PrepareBinhostUploadsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='build_target', full_name='chromite.api.PrepareBinhostUploadsRequest.build_target', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='uri', full_name='chromite.api.PrepareBinhostUploadsRequest.uri', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='chroot', full_name='chromite.api.PrepareBinhostUploadsRequest.chroot', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sysroot', full_name='chromite.api.PrepareBinhostUploadsRequest.sysroot', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='package_index_files', full_name='chromite.api.PrepareBinhostUploadsRequest.package_index_files', index=4, number=5, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=545, serialized_end=768, ) _UPLOADTARGET = _descriptor.Descriptor( name='UploadTarget', full_name='chromite.api.UploadTarget', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='path', full_name='chromite.api.UploadTarget.path', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=770, serialized_end=798, ) _PREPAREBINHOSTUPLOADSRESPONSE = _descriptor.Descriptor( name='PrepareBinhostUploadsResponse', full_name='chromite.api.PrepareBinhostUploadsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='uploads_dir', full_name='chromite.api.PrepareBinhostUploadsResponse.uploads_dir', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='upload_targets', full_name='chromite.api.PrepareBinhostUploadsResponse.upload_targets', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=800, serialized_end=904, ) _PREPAREDEVINSTALLBINHOSTUPLOADSREQUEST = _descriptor.Descriptor( name='PrepareDevInstallBinhostUploadsRequest', full_name='chromite.api.PrepareDevInstallBinhostUploadsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='uploads_dir', full_name='chromite.api.PrepareDevInstallBinhostUploadsRequest.uploads_dir', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='uri', full_name='chromite.api.PrepareDevInstallBinhostUploadsRequest.uri', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='chroot', full_name='chromite.api.PrepareDevInstallBinhostUploadsRequest.chroot', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sysroot', full_name='chromite.api.PrepareDevInstallBinhostUploadsRequest.sysroot', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=907, serialized_end=1057, ) _PREPAREDEVINSTALLBINHOSTUPLOADSRESPONSE = _descriptor.Descriptor( name='PrepareDevInstallBinhostUploadsResponse', full_name='chromite.api.PrepareDevInstallBinhostUploadsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='upload_targets', full_name='chromite.api.PrepareDevInstallBinhostUploadsResponse.upload_targets', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1059, serialized_end=1152, ) _SETBINHOSTREQUEST = _descriptor.Descriptor( name='SetBinhostRequest', full_name='chromite.api.SetBinhostRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='build_target', full_name='chromite.api.SetBinhostRequest.build_target', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='private', full_name='chromite.api.SetBinhostRequest.private', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='key', full_name='chromite.api.SetBinhostRequest.key', index=2, number=3, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='uri', full_name='chromite.api.SetBinhostRequest.uri', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1155, serialized_end=1290, ) _SETBINHOSTRESPONSE = _descriptor.Descriptor( name='SetBinhostResponse', full_name='chromite.api.SetBinhostResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='output_file', full_name='chromite.api.SetBinhostResponse.output_file', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1292, serialized_end=1333, ) _REGENBUILDCACHEREQUEST = _descriptor.Descriptor( name='RegenBuildCacheRequest', full_name='chromite.api.RegenBuildCacheRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='overlay_type', full_name='chromite.api.RegenBuildCacheRequest.overlay_type', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='chroot', full_name='chromite.api.RegenBuildCacheRequest.chroot', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1335, serialized_end=1444, ) _REGENBUILDCACHERESPONSE_OVERLAY = _descriptor.Descriptor( name='Overlay', full_name='chromite.api.RegenBuildCacheResponse.Overlay', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='path', full_name='chromite.api.RegenBuildCacheResponse.Overlay.path', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1547, serialized_end=1570, ) _REGENBUILDCACHERESPONSE = _descriptor.Descriptor( name='RegenBuildCacheResponse', full_name='chromite.api.RegenBuildCacheResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='modified_overlays', full_name='chromite.api.RegenBuildCacheResponse.modified_overlays', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_REGENBUILDCACHERESPONSE_OVERLAY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1446, serialized_end=1570, ) _PACKAGEINDEX.fields_by_name['path'].message_type = chromiumos_dot_common__pb2._PATH _ACLARGSREQUEST.fields_by_name['build_target'].message_type = chromiumos_dot_common__pb2._BUILDTARGET _ACLARGSRESPONSE_ACLARG.containing_type = _ACLARGSRESPONSE _ACLARGSRESPONSE.fields_by_name['args'].message_type = _ACLARGSRESPONSE_ACLARG _BINHOSTGETREQUEST.fields_by_name['build_target'].message_type = chromiumos_dot_common__pb2._BUILDTARGET _BINHOSTGETRESPONSE.fields_by_name['binhosts'].message_type = _BINHOST _PREPAREBINHOSTUPLOADSREQUEST.fields_by_name['build_target'].message_type = chromiumos_dot_common__pb2._BUILDTARGET _PREPAREBINHOSTUPLOADSREQUEST.fields_by_name['chroot'].message_type = chromiumos_dot_common__pb2._CHROOT _PREPAREBINHOSTUPLOADSREQUEST.fields_by_name['sysroot'].message_type = chromite_dot_api_dot_sysroot__pb2._SYSROOT _PREPAREBINHOSTUPLOADSREQUEST.fields_by_name['package_index_files'].message_type = _PACKAGEINDEX _PREPAREBINHOSTUPLOADSRESPONSE.fields_by_name['upload_targets'].message_type = _UPLOADTARGET _PREPAREDEVINSTALLBINHOSTUPLOADSREQUEST.fields_by_name['chroot'].message_type = chromiumos_dot_common__pb2._CHROOT _PREPAREDEVINSTALLBINHOSTUPLOADSREQUEST.fields_by_name['sysroot'].message_type = chromite_dot_api_dot_sysroot__pb2._SYSROOT _PREPAREDEVINSTALLBINHOSTUPLOADSRESPONSE.fields_by_name['upload_targets'].message_type = _UPLOADTARGET _SETBINHOSTREQUEST.fields_by_name['build_target'].message_type = chromiumos_dot_common__pb2._BUILDTARGET _SETBINHOSTREQUEST.fields_by_name['key'].enum_type = _BINHOSTKEY _REGENBUILDCACHEREQUEST.fields_by_name['overlay_type'].enum_type = _OVERLAYTYPE _REGENBUILDCACHEREQUEST.fields_by_name['chroot'].message_type = chromiumos_dot_common__pb2._CHROOT _REGENBUILDCACHERESPONSE_OVERLAY.containing_type = _REGENBUILDCACHERESPONSE _REGENBUILDCACHERESPONSE.fields_by_name['modified_overlays'].message_type = _REGENBUILDCACHERESPONSE_OVERLAY DESCRIPTOR.message_types_by_name['Binhost'] = _BINHOST DESCRIPTOR.message_types_by_name['PackageIndex'] = _PACKAGEINDEX DESCRIPTOR.message_types_by_name['AclArgsRequest'] = _ACLARGSREQUEST DESCRIPTOR.message_types_by_name['AclArgsResponse'] = _ACLARGSRESPONSE DESCRIPTOR.message_types_by_name['BinhostGetRequest'] = _BINHOSTGETREQUEST DESCRIPTOR.message_types_by_name['BinhostGetResponse'] = _BINHOSTGETRESPONSE DESCRIPTOR.message_types_by_name['PrepareBinhostUploadsRequest'] = _PREPAREBINHOSTUPLOADSREQUEST DESCRIPTOR.message_types_by_name['UploadTarget'] = _UPLOADTARGET DESCRIPTOR.message_types_by_name['PrepareBinhostUploadsResponse'] = _PREPAREBINHOSTUPLOADSRESPONSE DESCRIPTOR.message_types_by_name['PrepareDevInstallBinhostUploadsRequest'] = _PREPAREDEVINSTALLBINHOSTUPLOADSREQUEST DESCRIPTOR.message_types_by_name['PrepareDevInstallBinhostUploadsResponse'] = _PREPAREDEVINSTALLBINHOSTUPLOADSRESPONSE DESCRIPTOR.message_types_by_name['SetBinhostRequest'] = _SETBINHOSTREQUEST DESCRIPTOR.message_types_by_name['SetBinhostResponse'] = _SETBINHOSTRESPONSE DESCRIPTOR.message_types_by_name['RegenBuildCacheRequest'] = _REGENBUILDCACHEREQUEST DESCRIPTOR.message_types_by_name['RegenBuildCacheResponse'] = _REGENBUILDCACHERESPONSE DESCRIPTOR.enum_types_by_name['BinhostKey'] = _BINHOSTKEY DESCRIPTOR.enum_types_by_name['OverlayType'] = _OVERLAYTYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) Binhost = _reflection.GeneratedProtocolMessageType('Binhost', (_message.Message,), dict( DESCRIPTOR = _BINHOST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.Binhost) )) _sym_db.RegisterMessage(Binhost) PackageIndex = _reflection.GeneratedProtocolMessageType('PackageIndex', (_message.Message,), dict( DESCRIPTOR = _PACKAGEINDEX, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.PackageIndex) )) _sym_db.RegisterMessage(PackageIndex) AclArgsRequest = _reflection.GeneratedProtocolMessageType('AclArgsRequest', (_message.Message,), dict( DESCRIPTOR = _ACLARGSREQUEST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.AclArgsRequest) )) _sym_db.RegisterMessage(AclArgsRequest) AclArgsResponse = _reflection.GeneratedProtocolMessageType('AclArgsResponse', (_message.Message,), dict( AclArg = _reflection.GeneratedProtocolMessageType('AclArg', (_message.Message,), dict( DESCRIPTOR = _ACLARGSRESPONSE_ACLARG, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.AclArgsResponse.AclArg) )) , DESCRIPTOR = _ACLARGSRESPONSE, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.AclArgsResponse) )) _sym_db.RegisterMessage(AclArgsResponse) _sym_db.RegisterMessage(AclArgsResponse.AclArg) BinhostGetRequest = _reflection.GeneratedProtocolMessageType('BinhostGetRequest', (_message.Message,), dict( DESCRIPTOR = _BINHOSTGETREQUEST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.BinhostGetRequest) )) _sym_db.RegisterMessage(BinhostGetRequest) BinhostGetResponse = _reflection.GeneratedProtocolMessageType('BinhostGetResponse', (_message.Message,), dict( DESCRIPTOR = _BINHOSTGETRESPONSE, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.BinhostGetResponse) )) _sym_db.RegisterMessage(BinhostGetResponse) PrepareBinhostUploadsRequest = _reflection.GeneratedProtocolMessageType('PrepareBinhostUploadsRequest', (_message.Message,), dict( DESCRIPTOR = _PREPAREBINHOSTUPLOADSREQUEST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.PrepareBinhostUploadsRequest) )) _sym_db.RegisterMessage(PrepareBinhostUploadsRequest) UploadTarget = _reflection.GeneratedProtocolMessageType('UploadTarget', (_message.Message,), dict( DESCRIPTOR = _UPLOADTARGET, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.UploadTarget) )) _sym_db.RegisterMessage(UploadTarget) PrepareBinhostUploadsResponse = _reflection.GeneratedProtocolMessageType('PrepareBinhostUploadsResponse', (_message.Message,), dict( DESCRIPTOR = _PREPAREBINHOSTUPLOADSRESPONSE, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.PrepareBinhostUploadsResponse) )) _sym_db.RegisterMessage(PrepareBinhostUploadsResponse) PrepareDevInstallBinhostUploadsRequest = _reflection.GeneratedProtocolMessageType('PrepareDevInstallBinhostUploadsRequest', (_message.Message,), dict( DESCRIPTOR = _PREPAREDEVINSTALLBINHOSTUPLOADSREQUEST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.PrepareDevInstallBinhostUploadsRequest) )) _sym_db.RegisterMessage(PrepareDevInstallBinhostUploadsRequest) PrepareDevInstallBinhostUploadsResponse = _reflection.GeneratedProtocolMessageType('PrepareDevInstallBinhostUploadsResponse', (_message.Message,), dict( DESCRIPTOR = _PREPAREDEVINSTALLBINHOSTUPLOADSRESPONSE, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.PrepareDevInstallBinhostUploadsResponse) )) _sym_db.RegisterMessage(PrepareDevInstallBinhostUploadsResponse) SetBinhostRequest = _reflection.GeneratedProtocolMessageType('SetBinhostRequest', (_message.Message,), dict( DESCRIPTOR = _SETBINHOSTREQUEST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.SetBinhostRequest) )) _sym_db.RegisterMessage(SetBinhostRequest) SetBinhostResponse = _reflection.GeneratedProtocolMessageType('SetBinhostResponse', (_message.Message,), dict( DESCRIPTOR = _SETBINHOSTRESPONSE, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.SetBinhostResponse) )) _sym_db.RegisterMessage(SetBinhostResponse) RegenBuildCacheRequest = _reflection.GeneratedProtocolMessageType('RegenBuildCacheRequest', (_message.Message,), dict( DESCRIPTOR = _REGENBUILDCACHEREQUEST, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.RegenBuildCacheRequest) )) _sym_db.RegisterMessage(RegenBuildCacheRequest) RegenBuildCacheResponse = _reflection.GeneratedProtocolMessageType('RegenBuildCacheResponse', (_message.Message,), dict( Overlay = _reflection.GeneratedProtocolMessageType('Overlay', (_message.Message,), dict( DESCRIPTOR = _REGENBUILDCACHERESPONSE_OVERLAY, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.RegenBuildCacheResponse.Overlay) )) , DESCRIPTOR = _REGENBUILDCACHERESPONSE, __module__ = 'chromite.api.binhost_pb2' # @@protoc_insertion_point(class_scope:chromite.api.RegenBuildCacheResponse) )) _sym_db.RegisterMessage(RegenBuildCacheResponse) _sym_db.RegisterMessage(RegenBuildCacheResponse.Overlay) DESCRIPTOR._options = None _BINHOSTSERVICE = _descriptor.ServiceDescriptor( name='BinhostService', full_name='chromite.api.BinhostService', file=DESCRIPTOR, index=0, serialized_options=_b('\302\355\032\013\n\007binhost\020\002'), serialized_start=1824, serialized_end=2476, methods=[ _descriptor.MethodDescriptor( name='Get', full_name='chromite.api.BinhostService.Get', index=0, containing_service=None, input_type=_BINHOSTGETREQUEST, output_type=_BINHOSTGETRESPONSE, serialized_options=_b('\302\355\032\r\n\013GetBinhosts'), ), _descriptor.MethodDescriptor( name='GetPrivatePrebuiltAclArgs', full_name='chromite.api.BinhostService.GetPrivatePrebuiltAclArgs', index=1, containing_service=None, input_type=_ACLARGSREQUEST, output_type=_ACLARGSRESPONSE, serialized_options=None, ), _descriptor.MethodDescriptor( name='PrepareBinhostUploads', full_name='chromite.api.BinhostService.PrepareBinhostUploads', index=2, containing_service=None, input_type=_PREPAREBINHOSTUPLOADSREQUEST, output_type=_PREPAREBINHOSTUPLOADSRESPONSE, serialized_options=None, ), _descriptor.MethodDescriptor( name='PrepareDevInstallBinhostUploads', full_name='chromite.api.BinhostService.PrepareDevInstallBinhostUploads', index=3, containing_service=None, input_type=_PREPAREDEVINSTALLBINHOSTUPLOADSREQUEST, output_type=_PREPAREDEVINSTALLBINHOSTUPLOADSRESPONSE, serialized_options=None, ), _descriptor.MethodDescriptor( name='SetBinhost', full_name='chromite.api.BinhostService.SetBinhost', index=4, containing_service=None, input_type=_SETBINHOSTREQUEST, output_type=_SETBINHOSTRESPONSE, serialized_options=None, ), _descriptor.MethodDescriptor( name='RegenBuildCache', full_name='chromite.api.BinhostService.RegenBuildCache', index=5, containing_service=None, input_type=_REGENBUILDCACHEREQUEST, output_type=_REGENBUILDCACHERESPONSE, serialized_options=None, ), ]) _sym_db.RegisterServiceDescriptor(_BINHOSTSERVICE) DESCRIPTOR.services_by_name['BinhostService'] = _BINHOSTSERVICE # @@protoc_insertion_point(module_scope)
39.124871
3,842
0.769915
4,283
37,912
6.516227
0.077282
0.035544
0.048909
0.039485
0.625497
0.529005
0.505428
0.493604
0.482998
0.475975
0
0.034578
0.11284
37,912
968
3,843
39.165289
0.795207
0.037191
0
0.634921
1
0.00907
0.17193
0.135471
0
0
0
0
0
1
0
false
0
0.010204
0
0.010204
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
51a9c950ac28ed7c215b4e7c7f81d109c7b6e58c
3,473
py
Python
puma/runnable/_in_runnable_indirect_publisher.py
gift-surg/puma
58beae3459a0c8d96adfe9af323e26868428df4d
[ "Apache-2.0" ]
null
null
null
puma/runnable/_in_runnable_indirect_publisher.py
gift-surg/puma
58beae3459a0c8d96adfe9af323e26868428df4d
[ "Apache-2.0" ]
13
2020-05-04T14:14:58.000Z
2020-07-29T16:37:03.000Z
puma/runnable/_in_runnable_indirect_publisher.py
gift-surg/puma
58beae3459a0c8d96adfe9af323e26868428df4d
[ "Apache-2.0" ]
null
null
null
from typing import Callable, Optional, TypeVar from puma.attribute import child_only, child_scope_value, copied, unmanaged from puma.attribute.mixin import ScopedAttributesMixin from puma.buffer import DEFAULT_PUBLISH_COMPLETE_TIMEOUT, DEFAULT_PUBLISH_VALUE_TIMEOUT, Publishable, Publisher from puma.context import Exit_1, Exit_2, Exit_3 from puma.primitives import AutoResetEvent from puma.unexpected_situation_action import UnexpectedSituationAction PType = TypeVar("PType") class _InRunnableIndirectPublisher(Publisher[PType], ScopedAttributesMixin): """Used in a Runnable, this implements the Publisher interface, passing on its calls to an actual Publisher which is set when the runnable executes. Before the runnable has executed, it is only legal to get the name of the publisher; other calls will fail. """ _id: int = copied("_id") _publishable: Publishable = copied("_publishable") _publisher: Optional[Publisher] = child_only("_publisher") _publisher_accessor: Callable[[int], Publisher] = unmanaged("_publisher_accessor") def __init__(self, publishable: Publishable, publisher_accessor: Callable[[int], Publisher]) -> None: super().__init__() self._id = hash(publishable) self._publishable = publishable self._publisher = child_scope_value(None) # MyPy complains about assigning to a method: https://github.com/python/mypy/issues/708 self._publisher_accessor = publisher_accessor # type: ignore def set_publisher(self, publisher: Optional[Publisher[PType]]) -> None: self._publisher = publisher def __enter__(self) -> 'Publisher[PType]': if self._get_publisher() is None: raise RuntimeError("Trying to enter context management of a publisher that has not been set up") self._get_publisher().__enter__() return self def __exit__(self, exc_type: Exit_1, exc_value: Exit_2, traceback: Exit_3) -> None: if self._get_publisher() is None: raise RuntimeError("Trying to exit context management of a publisher that has not been set up") self._get_publisher().__exit__(exc_type, exc_value, traceback) def publish_value(self, value: PType, timeout: float = DEFAULT_PUBLISH_VALUE_TIMEOUT, on_full_action: UnexpectedSituationAction = UnexpectedSituationAction.RAISE_EXCEPTION) -> None: self._get_publisher().publish_value(value, timeout, on_full_action) def publish_complete(self, error: Optional[BaseException], timeout: float = DEFAULT_PUBLISH_COMPLETE_TIMEOUT, on_full_action: UnexpectedSituationAction = UnexpectedSituationAction.RAISE_EXCEPTION) -> None: self._get_publisher().publish_complete(error, timeout, on_full_action) def buffer_name(self) -> str: return self._publishable.buffer_name() def invalidate(self) -> None: self._get_publisher().invalidate() def set_subscriber_event(self, subscriber_event: Optional[AutoResetEvent]) -> None: self._get_publisher().set_subscriber_event(subscriber_event) def _get_publisher(self) -> Publisher[PType]: if self._publisher is None: # Attempt to retrieve it once via _publisher_accessor for cross scope usage # MyPy again complains erroneously: https://github.com/python/mypy/issues/708 self._publisher = self._publisher_accessor(self._id) # type: ignore return self._publisher
50.333333
152
0.73366
414
3,473
5.857488
0.292271
0.053608
0.052784
0.03134
0.291959
0.221856
0.221856
0.221856
0.221856
0.183918
0
0.004233
0.183703
3,473
68
153
51.073529
0.851146
0.148863
0
0.086957
0
0
0.072183
0
0
0
0
0
0
1
0.217391
false
0
0.152174
0.021739
0.543478
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
51ac8632d350c422dea2ba0ea797fbc604f88f75
772
py
Python
data/train/python/51ac8632d350c422dea2ba0ea797fbc604f88f75__init__.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/51ac8632d350c422dea2ba0ea797fbc604f88f75__init__.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/51ac8632d350c422dea2ba0ea797fbc604f88f75__init__.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
from DCWorkflowGraph import getGraph from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition from Products.PageTemplates.PageTemplateFile import PageTemplateFile import os # Import "MessageFactory" to create messages in the DCWorkflowGraph domain from zope.i18nmessageid import MessageFactory _ = MessageFactory('DCWorkflowGraph') manage_workflowGraph = PageTemplateFile(os.path.join('www','manage_workflowGraph'), globals()) manage_workflowGraph.__name__ = 'manage_workflowGraph' manage_workflowGraph._need__name__ = 0 DCWorkflowDefinition.getGraph=getGraph DCWorkflowDefinition.manage_workflowGraph=manage_workflowGraph DCWorkflowDefinition.manage_options=tuple(DCWorkflowDefinition.manage_options)+({'label': _(u'Graph'), 'action': 'manage_workflowGraph'},)
45.411765
138
0.854922
75
772
8.52
0.453333
0.237872
0.078247
0.118936
0
0
0
0
0
0
0
0.004155
0.064767
772
16
139
48.25
0.880886
0.093264
0
0
0
0
0.13467
0
0
0
0
0
0
1
0
false
0
0.416667
0
0.416667
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
1
0
0
0
0
2
51bcfc9709caebe15db1125f890c4060392e9286
3,539
py
Python
ddns_clienter_core/migrations/0001_initial.py
rexzhang/ddns-clienter
f170cb579d49df2aa4aa1f607bbcf088af9cd4a5
[ "MIT" ]
null
null
null
ddns_clienter_core/migrations/0001_initial.py
rexzhang/ddns-clienter
f170cb579d49df2aa4aa1f607bbcf088af9cd4a5
[ "MIT" ]
null
null
null
ddns_clienter_core/migrations/0001_initial.py
rexzhang/ddns-clienter
f170cb579d49df2aa4aa1f607bbcf088af9cd4a5
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-12-03 14:26 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Address", fields=[ ( "name", models.CharField(max_length=255, primary_key=True, serialize=False), ), ("provider", models.CharField(max_length=255)), ("parameter", models.TextField()), ("ipv4", models.BooleanField()), ("ipv6", models.BooleanField()), ("ipv4_match_rule", models.TextField()), ("ipv6_match_rule", models.TextField()), ("ipv4_address", models.CharField(max_length=15, null=True)), ("ipv4_last_address", models.CharField(max_length=15, null=True)), ("ipv4_last_change_time", models.DateTimeField(null=True)), ("ipv6_address", models.CharField(max_length=45, null=True)), ("ipv6_last_address", models.CharField(max_length=45, null=True)), ("ipv6_last_change_time", models.DateTimeField(null=True)), ("time", models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name="Event", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "level", models.TextField( choices=[ ("INFO", "Info"), ("WARNING", "Warning"), ("ERROR", "Error"), ("CRITICAL", "Critical"), ] ), ), ("message", models.TextField()), ("time", models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name="Status", fields=[ ( "key", models.CharField(max_length=255, primary_key=True, serialize=False), ), ("value", models.TextField()), ], ), migrations.CreateModel( name="Task", fields=[ ( "name", models.CharField(max_length=255, primary_key=True, serialize=False), ), ("provider", models.CharField(max_length=255)), ("provider_token", models.TextField()), ("domain", models.CharField(max_length=255)), ("host", models.CharField(max_length=255)), ("address_name", models.CharField(max_length=255)), ("ipv4", models.BooleanField()), ("ipv6", models.BooleanField()), ("ip_addresses", models.CharField(max_length=62)), ("last_ip_addresses", models.TextField(max_length=62, null=True)), ("last_update_is_success", models.BooleanField()), ("last_update_time", models.DateTimeField()), ("time", models.DateTimeField(auto_now=True)), ], ), ]
37.648936
88
0.45267
271
3,539
5.730627
0.280443
0.081133
0.150676
0.200901
0.565357
0.512556
0.414037
0.366388
0.366388
0.290406
0
0.030627
0.418762
3,539
93
89
38.053763
0.724356
0.012715
0
0.430233
1
0
0.111111
0.018328
0
0
0
0
0
1
0
false
0
0.011628
0
0.05814
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
51e0e33ddbe206b0d56ce2aab6123557e1a4198f
1,435
py
Python
Utils/py/RL_ActionSelection/env_0/env.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/RL_ActionSelection/env_0/env.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/RL_ActionSelection/env_0/env.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
################################# # # # /\/\/\/\/\/\/\/\/\/\/\/\ # # \/\/\/\/\/\/\/\/\/\/\/\/ # # # # Environment wrapper # # # # /\/\/\/\/\/\/\/\/\/\/\/\ # # \/\/\/\/\/\/\/\/\/\/\/\/ # # # ################################# import gym # import gym for action spaces from rl import core # import Keras reinforcement learning import numpy as np import world class Env(core.Env): # Environment class # build as needed for keras-rl (https://github.com/keras-rl/keras-rl/blob/master/rl/core.py) reward_range = (-np.inf, np.inf) action_space = gym.spaces.Discrete(5) observation_space = gym.spaces.MultiBinary(872) # type: MultiBinary TODO: make derivable def __init__(self, reward, features): # reward and features are function, for further details see world class self.world = world.World(reward, features) def step(self, action=None): next_state, reward, done, info = self.world.step(action) return next_state, reward, done, info def render(self): # implement maybe in the futur # visualize traces and agent movement on field self.world.render() def close(self): self.world.close() def reset(self): observation = self.world.reset() return observation
29.285714
96
0.510801
145
1,435
4.993103
0.489655
0.062155
0.038674
0.052486
0.063536
0
0
0
0
0
0
0.00396
0.296167
1,435
48
97
29.895833
0.712871
0.420209
0
0
0
0
0
0
0
0
0
0.020833
0
1
0.25
false
0
0.2
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
1
0
0
1
0
0
0
0
0
0
0
2
51ff9b2796c2cec35dd88f62797ba80621edba76
1,447
py
Python
app/medical_store/registration_page/views_register.py
suman0907/E-Medics
b16b78c7d8871ed02d46780f8e5f40bb1d1ec0e6
[ "MIT" ]
null
null
null
app/medical_store/registration_page/views_register.py
suman0907/E-Medics
b16b78c7d8871ed02d46780f8e5f40bb1d1ec0e6
[ "MIT" ]
null
null
null
app/medical_store/registration_page/views_register.py
suman0907/E-Medics
b16b78c7d8871ed02d46780f8e5f40bb1d1ec0e6
[ "MIT" ]
null
null
null
from . import user_register from .models_register import * from flask import * from sqlalchemy import and_ from sqlalchemy import or_ @user_register.route('/login', methods=['POST']) def login(): try: user = Users.query.filter_by(email=request.json['email']).first() if not user or not user.check_password(request.json['password']): response = jsonify(response = 'error', message='Wrong Email or Password') #response.status_code = 401 return response return jsonify( response="success") except Exception as e: return jsonify({"response" : "error","message" : "Try Again"}) @user_register.route('/signup', methods=['POST']) def signup(): try: RequestObject = request.get_json() if Users.query.filter(Users.email == RequestObject['email']).count() > 0 or \ Users.query.filter(Users.mobile == RequestObject['mobile']).count() > 0: response = jsonify({"response" : "error", "message" : "There already exists a User with the Entered Email or Mobile"}) #response.status_code = 401 return response user = Users() user.import_data(RequestObject) db.session.add(user) db.session.commit() return jsonify(response = "success") except Exception as e: db.session.rollback() print str(e) return jsonify({"response": "error", "message" : "Try Again"})
31.456522
129
0.633034
168
1,447
5.380952
0.375
0.099558
0.088496
0.119469
0.348451
0.271018
0.193584
0.193584
0
0
0
0.007227
0.234969
1,447
46
130
31.456522
0.809395
0.035936
0
0.3125
0
0
0.161406
0
0
0
0
0
0
0
null
null
0.0625
0.1875
null
null
0.03125
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
cf8c00fe72ced536c5df39e0a17c8d22847e6db3
2,616
py
Python
recogniser/recogniser.py
bramfoo/legosorted
a374546cde91db58e30f51e17124d8d717df9c56
[ "MIT" ]
null
null
null
recogniser/recogniser.py
bramfoo/legosorted
a374546cde91db58e30f51e17124d8d717df9c56
[ "MIT" ]
null
null
null
recogniser/recogniser.py
bramfoo/legosorted
a374546cde91db58e30f51e17124d8d717df9c56
[ "MIT" ]
null
null
null
from point import Point from lego_block import LegoBlock from color_labeler import ColorLabeler import imutils import cv2 import glob debug = True def display(title, image): if debug: cv2.imshow(title, image) cv2.waitKey(0) def threshold_image(region): display("region", region) thresh1 = cv2.threshold(region, 100, 255, cv2.THRESH_BINARY)[1] display("thresh1", thresh1) gray = cv2.cvtColor(thresh1, cv2.COLOR_BGR2GRAY) display("gray", gray) thresh2 = cv2.threshold(gray, 60, 255, cv2.THRESH_BINARY)[1] display("thresh2", thresh2) return thresh2 def detect_shape(contour, color): # Get the (outer) length of the contour curve_length = cv2.arcLength(contour, True) if curve_length < 100: # Ignore small shapes which are likely light reflections, or regions from the side of the image return None approximated_poly = cv2.approxPolyDP(contour, 0.04 * curve_length, True) if len(approximated_poly) != 4: # For now, we're only interested in squares and rectangles return None return LegoBlock(approximated_poly, color) def find_single_block(file_name, top_left, lower_right): image = cv2.imread(file_name) region = image[top_left.y:lower_right.y, top_left.x:lower_right.x] lab = cv2.cvtColor(region, cv2.COLOR_BGR2LAB) thresholded = threshold_image(region) color_labeler = ColorLabeler() # Find contours in the thresholded image and initialize the shape detector contours = cv2.findContours(thresholded.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) contours = contours[0] if imutils.is_cv2() else contours[1] lego_blocks = [] for contour in contours: try: color = color_labeler.label(lab, contour) shape = detect_shape(contour, color) if shape is not None: lego_blocks.append(shape) except Exception: # Ignore this, most likely a contour from a light glare or side of the platform pass if len(lego_blocks) > 1: raise Exception('more than 1 block detected in ' + file_name) elif len(lego_blocks) < 1: return None return lego_blocks[0] def main(): top_left = Point(110, 45) lower_right = Point(430, 340) # TODO create the image and feed it to find_single_block() for f in glob.glob("*-6.png"): try: lego_block = find_single_block(f, top_left, lower_right) print str(lego_block) except Exception as e: print "%s" % e if __name__ == "__main__": main()
27.536842
103
0.668196
355
2,616
4.766197
0.383099
0.020686
0.026596
0.021277
0.030733
0.030733
0
0
0
0
0
0.033924
0.245031
2,616
94
104
27.829787
0.822785
0.151376
0
0.081967
0
0
0.032083
0
0
0
0
0.010638
0
0
null
null
0.016393
0.098361
null
null
0.032787
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
1
0
0
0
0
0
0
0
0
2
cf8d02f018cedf004848c511ff54a80cef3640d7
365
py
Python
src/classes_demo.py
snandasena/python-oop
405f3104b4b7ee3db1273aef8106aafb87b89fb2
[ "Apache-2.0" ]
null
null
null
src/classes_demo.py
snandasena/python-oop
405f3104b4b7ee3db1273aef8106aafb87b89fb2
[ "Apache-2.0" ]
null
null
null
src/classes_demo.py
snandasena/python-oop
405f3104b4b7ee3db1273aef8106aafb87b89fb2
[ "Apache-2.0" ]
null
null
null
class Dog: def __init__(self, name, age): self.name = name self.age = age def get_name(self): return self.name def set_name(self, name): self.name = name def bark(self): print(self.name, "is barking..") if __name__ == '__main__': dog = Dog("Tim") dog.bark() dog.name = 'Bill' dog.bark()
16.590909
40
0.539726
49
365
3.734694
0.367347
0.262295
0.131148
0
0
0
0
0
0
0
0
0
0.320548
365
21
41
17.380952
0.737903
0
0
0.266667
0
0
0.073973
0
0
0
0
0
0
1
0.266667
false
0
0
0.066667
0.4
0.066667
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
cf9d4a2a6e900d28ef8f000fc96ba4fed62bc8d8
3,496
py
Python
infusionsoft/api/file.py
LazyAfternoons/infusionsoft-im
80a5942fd0bd82e2d9e290b58cd049b8e0b07989
[ "MIT" ]
1
2022-03-23T11:23:23.000Z
2022-03-23T11:23:23.000Z
infusionsoft/api/file.py
LazyAfternoons/infusionsoft-im
80a5942fd0bd82e2d9e290b58cd049b8e0b07989
[ "MIT" ]
null
null
null
infusionsoft/api/file.py
LazyAfternoons/infusionsoft-im
80a5942fd0bd82e2d9e290b58cd049b8e0b07989
[ "MIT" ]
null
null
null
from infusionsoft.api.apimodel import ApiModel class File(ApiModel): """File object for calling Infusionsoft API related to the remote File Info object. """ def __init__(self, infusionsoft): """Creates a new EmailAddress object. `API reference <https://developer.infusionsoft.com/docs/rest/#!/Email/listEmailsUsingGET>` Args: infusionsoft: the Infusionsoft object representing the client. """ super(File, self).__init__(infusionsoft) self.service_url = f'{self.base_url}/files' def list_files(self, params=None): """Retrieves a list of all files. `API reference <https://developer.infusionsoft.com/docs/rest/#!/File/listFilesUsingGET>` Args: params: Dictionary, list of tuples or bytes to send in the query string for the Request. See the API reference for more information. Returns: The JSON result of the request. """ return self.infusionsoft.request('get', self.service_url, params) def upload_files(self, json): """Upload a base64 encoded file. contact_id is required only when file_association is CONTACT. `API reference <https://developer.infusionsoft.com/docs/rest/#!/File/createFileUsingPOST>`. Args: json: A JSON serializable Python object to send in the body of the Request. See the API reference for more information. Returns: The JSON result of the request. """ return self.infusionsoft.request('post', self.service_url, json=json) def delete_file(self, file_id): """Deletes the specified file. `API reference <https://developer.infusionsoft.com/docs/rest/#!/File/deleteFileUsingDELETE>`. Args: file_id: The ID of the file to be deleted. Returns: The JSON result of the request. """ url = f'{self.service_url}/{file_id}' return self.infusionsoft.request('delete', url) def retrieve_file(self, file_id, params): """Retrieves metadata about a specific file. Optionally returns the base64 encoded file data. `API reference <https://developer.infusionsoft.com/docs/rest/#!/File/getFileUsingGET>`. Args: file_id: The ID of the file to be deleted. params: Dictionary, list of tuples or bytes to send in the query string for the Request. See the API reference for more information. Returns: The JSON result of the request. """ url = f'{self.service_url}/{file_id}' return self.infusionsoft.request('get', url, params=params) def replace_file(self, file_id, json): """Upload a base64 encoded file to replace an existing one. contact_id is required only when file_association is CONTACT. `API reference <https://developer.infusionsoft.com/docs/rest/#!/File/updateFileUsingPUT>`. Args: file_id: The ID of the file to be deleted. json: A JSON serializable Python object to send in the body of the Request. See the API reference for more information. Returns: The JSON result of the request. """ url = f'{self.service_url}/{file_id}' return self.infusionsoft.request('get', url, json=json)
37.591398
102
0.618993
421
3,496
5.061758
0.228029
0.056312
0.039418
0.073205
0.644298
0.642891
0.616612
0.616612
0.593618
0.519005
0
0.002428
0.293192
3,496
92
103
38
0.859976
0.606121
0
0.166667
0
0
0.130389
0.11041
0
0
0
0
0
1
0.333333
false
0
0.055556
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
1
0
0
0
0
1
0
0
2
cfa102cd571031782946a1669bbaa2c62a12880c
388
py
Python
exporter/__init__.py
uktrade/tamato
4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca
[ "MIT" ]
14
2020-03-25T11:11:29.000Z
2022-03-08T20:41:33.000Z
exporter/__init__.py
uktrade/tamato
4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca
[ "MIT" ]
352
2020-03-25T10:42:09.000Z
2022-03-30T15:32:26.000Z
exporter/__init__.py
uktrade/tamato
4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca
[ "MIT" ]
3
2020-08-06T12:22:41.000Z
2022-01-16T11:51:12.000Z
""" Classes for exposing a number of different output data formats. Most notably, the exporter module implements the correct output of the transaction stream into TARIC XML envelopes and handles the process by which these envelopes are marshalled to CDS. This module also makes available the objects in the system as an `ActivityPub <https://www.w3.org/TR/activitypub/>`_ endpoint. """
35.272727
77
0.793814
59
388
5.20339
0.830508
0
0
0
0
0
0
0
0
0
0
0.00303
0.149485
388
10
78
38.8
0.927273
0.976804
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
cfb8c5a78e2a22a822cf612386620468e7430ae2
3,237
py
Python
tests/sms/integration/test_reschedule_and_update_cases.py
infobip-community/infobip-api-python-sdk
5ffc5ab877ee1748aa29391f991c8c5324387487
[ "MIT" ]
null
null
null
tests/sms/integration/test_reschedule_and_update_cases.py
infobip-community/infobip-api-python-sdk
5ffc5ab877ee1748aa29391f991c8c5324387487
[ "MIT" ]
null
null
null
tests/sms/integration/test_reschedule_and_update_cases.py
infobip-community/infobip-api-python-sdk
5ffc5ab877ee1748aa29391f991c8c5324387487
[ "MIT" ]
null
null
null
from pytest_cases import parametrize from tests.conftest import get_expected_put_headers from tests.sms.conftest import ( GenerateRescheduleSMSMessagesFactory, GenerateUpdateScheduledSMSMessagesStatusFactory, get_reschedule_sms_messages_query_parameters, get_scheduled_sms_messages_response, get_sms_request_error_response, get_update_scheduled_sms_messages_status_response, ) ENDPOINT_TEST_ARGUMENTS = { "reschedule_sms_messages": { "endpoint": "/sms/1/bulks", "http_method": "PUT", "expected_headers": get_expected_put_headers(), "expected_path_parameters": None, "expected_query_parameters": "bulkId=35122736310703571952", "expected_json": GenerateRescheduleSMSMessagesFactory, "request_query_parameters": get_reschedule_sms_messages_query_parameters(), "method_name": "reschedule_sms_messages", }, "update_scheduled_sms_messages_status": { "endpoint": "/sms/1/bulks/status", "http_method": "PUT", "expected_headers": get_expected_put_headers(), "expected_path_parameters": None, "expected_query_parameters": "bulkId=35122736310703571952", "expected_json": GenerateUpdateScheduledSMSMessagesStatusFactory, "request_query_parameters": get_reschedule_sms_messages_query_parameters(), "method_name": "update_scheduled_sms_messages_status", }, } @parametrize( endpoint_type=ENDPOINT_TEST_ARGUMENTS.keys(), responses=( [200, get_scheduled_sms_messages_response], [400, get_sms_request_error_response], ), ) def case__supported_status(endpoint_type, responses): status_code = responses[0] response_content = responses[1] if endpoint_type == "update_scheduled_sms_messages_status" and responses[0] == 200: response_content = get_update_scheduled_sms_messages_status_response return ( status_code, response_content(), ENDPOINT_TEST_ARGUMENTS[endpoint_type]["endpoint"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["http_method"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_headers"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_path_parameters"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_query_parameters"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_json"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["request_query_parameters"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["method_name"], ) @parametrize(endpoint_type=ENDPOINT_TEST_ARGUMENTS.keys()) def case__unsupported_status(endpoint_type): return ( 201, get_sms_request_error_response(), ENDPOINT_TEST_ARGUMENTS[endpoint_type]["endpoint"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["http_method"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_headers"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_path_parameters"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_query_parameters"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["expected_json"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["request_query_parameters"], ENDPOINT_TEST_ARGUMENTS[endpoint_type]["method_name"], )
40.974684
87
0.747915
332
3,237
6.740964
0.159639
0.112601
0.178284
0.207328
0.734138
0.628686
0.61126
0.529937
0.529937
0.529937
0
0.020971
0.160334
3,237
78
88
41.5
0.802428
0
0
0.4
1
0
0.238801
0.154464
0
0
0
0
0
1
0.028571
false
0
0.042857
0.014286
0.1
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
cfc21a5ec3165ef04418b452899f2d90a57d2f99
456
py
Python
core/views.py
m-e-l-u-h-a-n/Rapid-Results
e5bdec3b2c39ada80328e31030a19bbaf47b0dd2
[ "Apache-2.0" ]
null
null
null
core/views.py
m-e-l-u-h-a-n/Rapid-Results
e5bdec3b2c39ada80328e31030a19bbaf47b0dd2
[ "Apache-2.0" ]
null
null
null
core/views.py
m-e-l-u-h-a-n/Rapid-Results
e5bdec3b2c39ada80328e31030a19bbaf47b0dd2
[ "Apache-2.0" ]
null
null
null
from django.views.generic import ListView from django.contrib.auth.mixins import LoginRequiredMixin from django.conf import settings # Create your views here. class HomeView(LoginRequiredMixin, ListView): """Home view is used for listing of all the Items present for selling in the website.""" paginate_by = 10 template_name = "home.html" queryset = [] class ProfileView(LoginRequiredMixin, ListView): template_name = 'profile.html'
32.571429
93
0.760965
58
456
5.931034
0.689655
0.087209
0
0
0
0
0
0
0
0
0
0.005236
0.162281
456
13
94
35.076923
0.895288
0.236842
0
0
0
0
0.061404
0
0
0
0
0
0
1
0
false
0
0.333333
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
cfcfc49bbebf9ce6e53c89ab49a115b261c77ce3
404
py
Python
src/ribo_api/models/task.py
RinPham/RiBo-Core
8c5a00a215b42aad2f6a4167b9cb97fe11d78823
[ "MIT" ]
null
null
null
src/ribo_api/models/task.py
RinPham/RiBo-Core
8c5a00a215b42aad2f6a4167b9cb97fe11d78823
[ "MIT" ]
null
null
null
src/ribo_api/models/task.py
RinPham/RiBo-Core
8c5a00a215b42aad2f6a4167b9cb97fe11d78823
[ "MIT" ]
null
null
null
from mongoengine import Document,fields class Task(Document): title = fields.StringField(required=True) content = fields.StringField(required=True) user_id = fields.ObjectIdField(required=True) intent_id = fields.ObjectIdField(required=True) at_time = fields.DateTimeField(required=False) done = fields.BooleanField(default=False) class Meta(): app_label = 'no_sql'
31.076923
51
0.735149
47
404
6.212766
0.595745
0.164384
0.171233
0.19863
0.226027
0
0
0
0
0
0
0
0.165842
404
12
52
33.666667
0.866469
0
0
0
0
0
0.014851
0
0
0
0
0
0
1
0
false
0
0.1
0
0.9
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
0
0
0
0
1
0
0
2
cfe554b743a6178fcb359377b1702338d62e06ee
501
py
Python
tests/helpers.py
joowani/dtags
9e9d02267cc56bf406ee0bfe0af9c5e56db6a8e3
[ "MIT" ]
405
2016-01-25T05:51:42.000Z
2022-01-07T06:53:43.000Z
tests/helpers.py
joowani/dtags
9e9d02267cc56bf406ee0bfe0af9c5e56db6a8e3
[ "MIT" ]
21
2016-01-31T16:23:19.000Z
2019-08-24T15:14:03.000Z
tests/helpers.py
joowani/dtags
9e9d02267cc56bf406ee0bfe0af9c5e56db6a8e3
[ "MIT" ]
16
2016-02-01T09:06:00.000Z
2020-09-23T13:19:31.000Z
import re from typing import List from dtags.files import COMP_FILE, DEST_FILE, get_file_path ANSI_ESCAPE = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])") def clean_str(value: str) -> str: return ANSI_ESCAPE.sub("", value) def load_completion() -> List[str]: with open(get_file_path(COMP_FILE)) as fp: return sorted(tag for tag in fp.read().split(" ") if tag) def load_destination() -> str: with open(get_file_path(DEST_FILE)) as fp: return fp.read().strip()
23.857143
66
0.648703
78
501
3.961538
0.512821
0.067961
0.106796
0.090615
0.142395
0.142395
0
0
0
0
0
0.004831
0.173653
501
20
67
25.05
0.741546
0
0
0
0
0
0.075848
0.051896
0
0
0
0
0
1
0.25
false
0
0.25
0.083333
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
0
0
0
1
0
0
2
cffabfb825d457cd65954c984cb34a48d174eced
8,704
py
Python
example/example_views.py
Astron/astron.libpython
d0dbb23c638d4caf17e3ec534a8fbcf5c4550b35
[ "BSD-3-Clause" ]
3
2015-04-21T20:24:42.000Z
2021-02-25T06:07:41.000Z
example/example_views.py
chandler14362/astron.libpython
d0dbb23c638d4caf17e3ec534a8fbcf5c4550b35
[ "BSD-3-Clause" ]
null
null
null
example/example_views.py
chandler14362/astron.libpython
d0dbb23c638d4caf17e3ec534a8fbcf5c4550b35
[ "BSD-3-Clause" ]
3
2015-12-09T06:59:10.000Z
2021-02-25T06:07:43.000Z
from datetime import datetime from astron.object_repository import DistributedObject from shared_constants import LOGIN_SERVICE_ZONE, WORLD_ZONE, GAME_ROOT_DO_ID, AI_SERVICES_ZONE import random from pprint import pprint # Game settings avatar_speed = 3.0 avatar_rotation_speed = 90.0 # ------------------------------------------------------------------- # PointOfContact # * Is the only DOG, and is the only distobj that a player can # contact before logging in. # * Has interest in LoginServices # * Redirects player logins to a LoginService, if possible. # ------------------------------------------------------------------- class PointOfContact(DistributedObject): def init(self): print("PointOfContact view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def login(self, username, password): print("Client logging in") self.send_update("login", username, password) class PointOfContactUD(DistributedObject): def init(self): self.add_ai_interest(GAME_ROOT_DO_ID, LOGIN_SERVICE_ZONE) self.login_services = {} print("PointOfContactUD view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def login(self, sender, username, password): print("Received login request for %d" % (sender, )) if len(self.login_services.keys()) > 0: view = random.choice(self.login_services.values()) view.login(sender, username, password) else: # No login service is known. self.send_CLIENTAGENT_EJECT(sender, 999, "Server isn't ready for logins") print(" Dropping connection attempt due to missing LoginService") def interest_distobj_enter(self, view, do_id, parent_id, zone_id): print(" PointOfContactUD learned of new LoginService %d" % (do_id, )) if (parent_id == GAME_ROOT_DO_ID) and (zone_id == LOGIN_SERVICE_ZONE): self.login_services[do_id] = view def interest_changing_location_enter(self, sender, do_id, new_parent, new_zone, old_parent, old_zone): if (new_parent == GAME_ROOT_DO_ID) and (new_zone == LOGIN_SERVICE_ZONE): # A new maproot "service" has entered self.login_services.add(do_id) print(" PointOfContactUD added %d to maproot services." % (do_id, )) def interest_changing_location_leave(self, sender, do_id, new_parent, new_zone, old_parent, old_zone): if (old_parent == GAME_ROOT_DO_ID) and (old_zone == LOGIN_SERVICE_ZONE): # A maproot has just left self.login_services.remove(do_id) print(" PointOfContactUD removed %d from maproot services." % (do_id, )) # ------------------------------------------------------------------- # GameRoot # * Is a container for top-level objects, especially the world and # services. # ------------------------------------------------------------------- class GameRoot(DistributedObject): pass class GameRootAI(DistributedObject): pass class GameRootAE(DistributedObject): pass # ------------------------------------------------------------------- # LoginService # * Registers a CharacterServer # * Authenticates Clients # * Makes CharacterServer create an avatar for new Clients. # ------------------------------------------------------------------- # This one isn't used on the client. class LoginService(DistributedObject): def init(self): print("LoginService view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) class LoginServiceAE(DistributedObject): def init(self): print("LoginServiceAE view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def login(self, client_channel, username, password): print(" LoginServiceAE %d received login request for %d" % (self.do_id, client_channel, )) self.send_update('login', client_channel, username, password) class LoginServiceAI(DistributedObject): def init(self): self.add_ai_interest(GAME_ROOT_DO_ID, WORLD_ZONE) self.worlds = {} print("LoginServiceAI view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def login(self, sender, client_channel, username, password): print(" LoginServiceAI %d received login request for %d" % (self.do_id, client_channel, )) if username == "guest" and password == "guest": # Login successful self.repo.send_CLIENTAGENT_SET_STATE(client_channel, 2, sender = self.do_id) print(" Logging in successfully") # FIXME: Create Avatar else: # Bad credentials self.send_CLIENTAGENT_EJECT(client_channel, 122, "Bad credentials") print(" Disconnecting for bad credentials") def interest_distobj_enter(self, view, do_id, parent_id, zone_id): if (parent_id == GAME_ROOT_DO_ID) and (zone_id == WORLD_ZONE): print(" LoginServiceAI learned of new World %d" % (do_id, )) self.worlds[do_id] = view # ------------------------------------------------------------------- # World # * is a container for Avatars (so far) # ------------------------------------------------------------------- class World(DistributedObject): pass class WorldAI(DistributedObject): def init(self): self.add_ai_interest(GAME_ROOT_DO_ID, AI_SERVICES_ZONE) self.ai_services = {} print("WorldAI view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def create_avatar(self, sender, client): print(" not implemented: WorldAI %d should create avatar for %d" % (self.do_id, client)) def interest_distobj_enter(self, view, do_id, parent_id, zone_id): if (parent_id == GAME_ROOT_DO_ID) and (zone_id == AI_SERVICES_ZONE): print(" LoginServiceAI learned of new AIServer %d" % (do_id, )) self.ai_services[do_id] = view class WorldAE(DistributedObject): def init(self): print("WorldAE view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def create_avatar(self, client): self.send_update('create_avatar', client) # ------------------------------------------------------------------- # CharacterServer # * has all avatars in its zone 0 # * generates new avatars # ------------------------------------------------------------------- class AIServer(DistributedObject): pass class AIServerAI(DistributedObject): def init(self): print("AIServerAI view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) # self.repo.add_ai_interest(WORLD_PARENT, WORLD_ZONE) #def create_avatar(self, sender, client_id): # print("%d called CharacterServerAI.create_avatar(%d)" % (sender, client_id)) # self.repo.create_distobj_db('Avatar', AVATARS_PARENT, AVATARS_ZONE, set_ai = True, # creation_callback = self.avatar_created, additional_args = [client_id]) # # FIXME: Choose better interest_id # #def avatar_created(self, do_id, parent_id, zone_id, set_ai, client_id): # print("Avatar was created, now adding interest, setting owner and session object.") # self.repo.send_CLIENTAGENT_ADD_INTEREST(client_id, 666, AVATARS_PARENT, AVATARS_ZONE) # self.repo.send_STATESERVER_OBJECT_SET_OWNER(do_id, client_id) # self.repo.send_CLIENTAGENT_ADD_SESSION_OBJECT(do_id, client_id) class AIServerAE(DistributedObject): def init(self): print("AIServerAE view created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) def create_avatar(self, sender, client_id): print(" AIServerAE.create_avatar(sender %d, client_id %d)" % (sender, client_id)) self.send_update('create_avatar', client_id) # ------------------------------------------------------------------- # Avatar # * represents players in the scene graph # * routes indications of movement intents to AI # * updates the actual position and orientation # ------------------------------------------------------------------- class Avatar(DistributedObject): def init(self): print("Avatar created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) class AvatarAI(DistributedObject): def init(self): print("AvatarAI created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) class AvatarAE(DistributedObject): def init(self): print("AvatarAE created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone)) class AvatarOV(DistributedObject): def init(self): print("AvatarOV created for %d in (%d, %d)" % (self.do_id, self.parent, self.zone))
42.252427
108
0.612247
1,046
8,704
4.900574
0.180688
0.034335
0.028092
0.028092
0.438549
0.331252
0.289895
0.269216
0.269216
0.259657
0
0.002431
0.196461
8,704
205
109
42.458537
0.730483
0.281135
0
0.207207
0
0
0.196872
0.004998
0
0
0
0.004878
0
1
0.225225
false
0.117117
0.045045
0
0.432432
0.252252
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
3224c66a8647d54db83a817b26dde839cd1db14d
2,092
py
Python
constants_gzrs2.py
Krunklehorn/io-scene-gzrs2
78508811b72826c1c39f4e090ee652daa9550c5b
[ "MIT" ]
1
2022-03-28T08:27:58.000Z
2022-03-28T08:27:58.000Z
constants_gzrs2.py
Krunklehorn/io-scene-gzrs2
78508811b72826c1c39f4e090ee652daa9550c5b
[ "MIT" ]
null
null
null
constants_gzrs2.py
Krunklehorn/io-scene-gzrs2
78508811b72826c1c39f4e090ee652daa9550c5b
[ "MIT" ]
1
2022-03-28T08:27:47.000Z
2022-03-28T08:27:47.000Z
RS_ID = 0x12345678 RS_VERSION = 7 RBSP_ID = 0x35849298 RBSP_VERSION = 2 R_PAT_ID = 0x09784348 R_PAT_VERSION = 0 R_LM_ID = 0x30671804 R_LM_VERSION = 3 R_COL_ID = 0x5050178f R_COL_VERSION = 0 R_NAV_ID = 0x8888888f R_NAV_VERSION = 2 RM_FLAG_ADDITIVE = 0x0001 RM_FLAG_USEOPACITY = 0x0002 RM_FLAG_TWOSIDED = 0x0004 RM_FLAG_NOTWALKABLE = 0x0008 RM_FLAG_CASTSHADOW = 0x0010 RM_FLAG_RECEIVESHADOW = 0x0020 RM_FLAG_PASSTHROUGH = 0x0040 RM_FLAG_HIDE = 0x0080 RM_FLAG_PASSBULLET = 0x0100 RM_FLAG_PASSROCKET = 0x0200 RM_FLAG_USEALPHATEST = 0x0400 RM_FLAG_AI_NAVIGATION = 0x1000 AS_AABB = 0x01 AS_SPHERE = 0x02 AS_2D = 0x10 AS_3D = 0x20 ELU_ID = 0x0107f060 ELU_11 = 0x11 # GunZ: The Duel ELU_5001 = 0x5001 ELU_5002 = 0x5002 ELU_5003 = 0x5003 ELU_5004 = 0x5004 ELU_5005 = 0x5005 ELU_5006 = 0x5006 ELU_5007 = 0x5007 ELU_5008 = 0x5008 # GunZ: The Second Duel, RaiderZ ELU_500A = 0x500A ELU_500B = 0x500B ELU_500C = 0x500C ELU_500E = 0x500E ELU_500F = 0x500F ELU_5012 = 0x5012 # EluLoader.cpp ELU_5013 = 0x5013 ELU_VERSIONS = [ ELU_11, ELU_5001, ELU_5002, ELU_5003, ELU_5004, ELU_5005, ELU_5006, ELU_5007, ELU_5008, ELU_500A, ELU_500B, ELU_500C, ELU_500E, ELU_500F, ELU_5012, ELU_5013 ] ELU_SUPPORTED_VERSIONS = [ ELU_5005, ELU_5006, ELU_5007 ] ELU_NAME_LENGTH = 40 ELU_PATH_LENGTH = 256 ELU_PHYS_KEYS = 4
33.206349
111
0.491396
221
2,092
4.226244
0.479638
0.077088
0.019272
0.029979
0.051392
0.051392
0.051392
0
0
0
0
0.311935
0.471319
2,092
62
112
33.741935
0.53255
0.028203
0
0
0
0
0
0
0
0
0.128114
0
0
1
0
false
0.058824
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
32268b45ccdb3460268899580464d22f763df13a
689
py
Python
searchtools/ui.py
caltechlibrary/searchtools
6371e8b69994adb9f092f7b637d78fb632093821
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-09-23T04:12:30.000Z
2020-09-23T04:12:30.000Z
searchtools/ui.py
caltechlibrary/searchtools
6371e8b69994adb9f092f7b637d78fb632093821
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
searchtools/ui.py
caltechlibrary/searchtools
6371e8b69994adb9f092f7b637d78fb632093821
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
class SearchUI: '''SearchUI provides a means of easily assembling a search interface for either Elasticsearch or LunrJS powered search services''' def __init__(self, cfg): self.cfg = {} for key in cfg.keys(): self.cfg[key] = cfg.get(key, None) if not ('id' in self.cfg): self.cfg['id'] = 'id' if not ('href' in self.cfg): self.cfg['href'] = 'href' if not ('display_fields' in self.cfg): self.cfg['display_fields'] = [] if not ('aggregated_fields' in self.cfg): self.cfg['aggregated_fields'] = [] if not ('sort_fields' in self.cfg): self.cfg = []
32.809524
72
0.550073
89
689
4.157303
0.382022
0.245946
0.178378
0.227027
0.264865
0.178378
0
0
0
0
0
0
0.314949
689
20
73
34.45
0.783898
0.179971
0
0
0
0
0.164557
0
0
0
0
0
0
1
0.066667
false
0
0
0
0.133333
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5c4e62260754f6559cb60b6367a77d5bc85ca560
442
py
Python
scripts/genmaps.py
qlyoung/frr-devtools
82458d31ab8b8977be4e3442e935554a47f3c5f2
[ "MIT" ]
4
2018-06-21T02:41:59.000Z
2022-03-11T10:59:32.000Z
scripts/genmaps.py
qlyoung/frr-devtools
82458d31ab8b8977be4e3442e935554a47f3c5f2
[ "MIT" ]
null
null
null
scripts/genmaps.py
qlyoung/frr-devtools
82458d31ab8b8977be4e3442e935554a47f3c5f2
[ "MIT" ]
2
2019-03-18T18:47:44.000Z
2020-01-31T17:34:48.000Z
#!/usr/bin/env python3 # # Copyright (C) 2018 Quentin Young # # Generates route map entries for scale testing FRR # from sys import argv from math import log, ceil import random import string gen = int(argv[1]) places = ceil(log(gen, 24)) + 4 shit = set( ["".join(random.choices(string.ascii_lowercase, k=places)) for i in range(0, gen)] ) shit = map(lambda x: "route-map {} permit 5".format(x), shit) for turd in shit: print(turd)
22.1
86
0.690045
73
442
4.164384
0.684932
0.052632
0
0
0
0
0
0
0
0
0
0.030137
0.174208
442
19
87
23.263158
0.80274
0.237557
0
0
1
0
0.063444
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.083333
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
1
0
0
0
0
2
5c57210ed97c6778d7c396832a4e98455b7c4e83
371
py
Python
name_main/two.py
jekwatt/lightning_talks
314b5d6c39f989a46f061692b6ef6c963c70bcc2
[ "MIT" ]
null
null
null
name_main/two.py
jekwatt/lightning_talks
314b5d6c39f989a46f061692b6ef6c963c70bcc2
[ "MIT" ]
1
2020-09-23T00:54:15.000Z
2020-09-23T00:54:15.000Z
name_main/two.py
jekwatt/tech_talks
314b5d6c39f989a46f061692b6ef6c963c70bcc2
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 """two.py Second module for testing""" import one print(">>>Top level in two.py") print(repr(__name__)) print(repr(__name__)) one.main() one.func() def main(): print("hello from two.py") if __name__ == '__main__': print("two.py is being run directly") main() else: print("two.py is being imported into another module")
12.793103
57
0.652291
56
371
4.035714
0.571429
0.110619
0.115044
0.106195
0.150442
0
0
0
0
0
0
0.003311
0.185984
371
28
58
13.25
0.745033
0.148248
0
0.153846
0
0
0.383871
0
0
0
0
0
0
1
0.076923
true
0
0.153846
0
0.230769
0.461538
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
5c63dbfa59fc747a0d8bad39c164a626ae6c329a
1,363
py
Python
tests/test_checkout.py
matheus-francisco/Test-testing-development-in-python
14bf82e568959f27f8e2a0dd9006c4cbe7ced551
[ "MIT" ]
1
2020-06-28T20:23:48.000Z
2020-06-28T20:23:48.000Z
tests/test_checkout.py
matheus-francisco/Test-testing-development-in-python
14bf82e568959f27f8e2a0dd9006c4cbe7ced551
[ "MIT" ]
null
null
null
tests/test_checkout.py
matheus-francisco/Test-testing-development-in-python
14bf82e568959f27f8e2a0dd9006c4cbe7ced551
[ "MIT" ]
1
2019-11-25T12:34:14.000Z
2019-11-25T12:34:14.000Z
""" x Can create instance of Checkout class x Can add item price x Can add an item x Can calculate the current total x Can add multiple items and get correct total x Can add discount rules x Can add discount rules x Can apply discount rules to the total x Exception is throw for item added without a price """ import pytest from functions.checkout import Checkout @pytest.fixture() def checkout(): checkout = Checkout() checkout.add_item_price("a", 1) checkout.add_item_price("b", 2) return checkout def test_can_add_item_price(checkout): checkout.add_item_price("a", 1) def test_can_add_item(checkout): checkout.add_item_price("a", 1) checkout.add_item("a") def test_can_calculate_total(checkout): checkout.add_item("a") assert checkout.calculate_total() == 1 def test_get_correct_total_with_multiple_items(checkout): checkout.add_item("a") checkout.add_item("b") assert checkout.calculate_total() == 3 def test_can_add_discount_rule(checkout): checkout.add_discount("a", 3, 2) def test_can_apply_discount_rule(checkout): checkout.add_discount("a", 3, 2) checkout.add_item("a") checkout.add_item("a") checkout.add_item("a") assert checkout.calculate_total() == 2 def test_exception_with_bad_item(checkout): with pytest.raises(Exception): checkout.add_item("c")
22.716667
57
0.734409
211
1,363
4.511848
0.232227
0.110294
0.189076
0.10084
0.471639
0.419118
0.419118
0.308824
0.182773
0.094538
0
0.009683
0.166544
1,363
59
58
23.101695
0.828345
0.220836
0
0.354839
0
0
0.013283
0
0
0
0
0
0.096774
1
0.258065
false
0
0.064516
0
0.354839
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
1
0
0
0
0
0
0
0
2
5c6d0dab075590e34f50e255b6abed3caad9ceb4
287
py
Python
blogster/wsgi.py
iamtheblackunicorn/blogster
f5ff7df51f661370dc7bebb33e7c92c0a48a0549
[ "MIT" ]
null
null
null
blogster/wsgi.py
iamtheblackunicorn/blogster
f5ff7df51f661370dc7bebb33e7c92c0a48a0549
[ "MIT" ]
null
null
null
blogster/wsgi.py
iamtheblackunicorn/blogster
f5ff7df51f661370dc7bebb33e7c92c0a48a0549
[ "MIT" ]
null
null
null
# BLOGSTER by Alexander Abraham # a.k.a. "The Black Unicorn" a.k.a. "Angeldust Duke". # Licensed under the MIT license. import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogster.settings') application = get_wsgi_application()
31.888889
68
0.787456
42
287
5.238095
0.642857
0.018182
0.027273
0
0
0
0
0
0
0
0
0
0.108014
287
8
69
35.875
0.859375
0.393728
0
0
0
0
0.229412
0.129412
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
5c95c1d67b0b483ebf8410601547203866d18b48
128
py
Python
posts/settings.py
IlyaBoyur/youcute
a0384abb53084bfac928988ca1a1e998b7572a16
[ "BSD-3-Clause" ]
null
null
null
posts/settings.py
IlyaBoyur/youcute
a0384abb53084bfac928988ca1a1e998b7572a16
[ "BSD-3-Clause" ]
null
null
null
posts/settings.py
IlyaBoyur/youcute
a0384abb53084bfac928988ca1a1e998b7572a16
[ "BSD-3-Clause" ]
null
null
null
# Posts number per page for pagination. POSTS_PER_PAGE = 10 # Time period in seconds for a page in cache. CACHED_TIME_INDEX = 3
25.6
45
0.773438
23
128
4.130435
0.695652
0.147368
0
0
0
0
0
0
0
0
0
0.028571
0.179688
128
4
46
32
0.87619
0.632813
0
0
0
0
0
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
5cace7fc16505c9e73f99c93105c57480fd03a61
523
py
Python
flask_project/forms.py
MLH-Fellowship/0
427f9a4602837969e8b5de9a9feab6facc001fab
[ "MIT" ]
1
2022-01-19T09:32:03.000Z
2022-01-19T09:32:03.000Z
flask_project/forms.py
MLH-Fellowship/0
427f9a4602837969e8b5de9a9feab6facc001fab
[ "MIT" ]
13
2020-06-02T19:01:33.000Z
2021-03-31T19:57:10.000Z
flask_project/forms.py
MLH-Fellowship/0
427f9a4602837969e8b5de9a9feab6facc001fab
[ "MIT" ]
2
2020-06-02T15:26:03.000Z
2020-08-11T19:49:49.000Z
from flask_wtf import FlaskForm from wtforms import TextAreaField, SubmitField from wtforms.fields.html5 import URLField from wtforms.validators import DataRequired, URL, Length class SubmitWebsiteForm(FlaskForm): websiteUrl = URLField('Summarize from Website', validators=[DataRequired(), URL()]) submit_website = SubmitField('Go') class SubmitTextForm(FlaskForm): text = TextAreaField('Text', validators=[ DataRequired(), Length(min=150)]) submit = SubmitField('Go')
30.764706
61
0.718929
52
523
7.192308
0.5
0.088235
0
0
0
0
0
0
0
0
0
0.009368
0.183556
523
16
62
32.6875
0.866511
0
0
0
0
0
0.057361
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.833333
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
5cbd5c29c502ee4830f58a2411ddf8fcd5718a23
3,879
py
Python
SpiffWorkflow/util/weakmethod.py
LipotesOps/octo-fibula
14c7a2b5e4929c9f441f81485949d91ef9ab66a0
[ "MIT" ]
1
2020-12-23T06:14:27.000Z
2020-12-23T06:14:27.000Z
SpiffWorkflow/util/weakmethod.py
LipotesOps/octo-fibula
14c7a2b5e4929c9f441f81485949d91ef9ab66a0
[ "MIT" ]
7
2020-06-06T01:58:04.000Z
2022-02-10T14:02:38.000Z
SpiffWorkflow/util/weakmethod.py
LipotesOps/octo-fibula
14c7a2b5e4929c9f441f81485949d91ef9ab66a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division from builtins import object # # DO NOT EDIT THIS FILE. # THIS CODE IS TAKE FROM Exscript.util: # https://github.com/knipknap/exscript/tree/master/src/Exscript/util # # Copyright (C) 2007-2010 Samuel Abels. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ Weak references to bound and unbound methods. """ import weakref class DeadMethodCalled(Exception): """ Raised by :class:`WeakMethod` if it is called when the referenced object is already dead. """ pass class WeakMethod(object): """ Do not create this class directly; use :class:`ref()` instead. """ __slots__ = 'name', 'callback' def __init__(self, name, callback): """ Constructor. Do not use directly, use :class:`ref()` instead. """ self.name = name self.callback = callback def _dead(self, ref): if self.callback is not None: self.callback(self) def get_function(self): """ Returns the referenced method/function if it is still alive. Returns None otherwise. :rtype: callable|None :returns: The referenced function if it is still alive. """ raise NotImplementedError() def isalive(self): """ Returns True if the referenced function is still alive, False otherwise. :rtype: bool :returns: Whether the referenced function is still alive. """ return self.get_function() is not None def __call__(self, *args, **kwargs): """ Proxied to the underlying function or method. Raises :class:`DeadMethodCalled` if the referenced function is dead. :rtype: object :returns: Whatever the referenced function returned. """ method = self.get_function() if method is None: raise DeadMethodCalled('method called on dead object ' + self.name) method(*args, **kwargs) class _WeakMethodBound(WeakMethod): __slots__ = 'name', 'callback', 'f', 'c' def __init__(self, f, callback): name = f.__self__.__class__.__name__ + '.' + f.__func__.__name__ WeakMethod.__init__(self, name, callback) self.f = f.__func__ self.c = weakref.ref(f.__self__, self._dead) def get_function(self): cls = self.c() if cls is None: return None return getattr(cls, self.f.__name__) class _WeakMethodFree(WeakMethod): __slots__ = 'name', 'callback', 'f' def __init__(self, f, callback): WeakMethod.__init__(self, f.__class__.__name__, callback) self.f = weakref.ref(f, self._dead) def get_function(self): return self.f() def ref(function, callback=None): """ Returns a weak reference to the given method or function. If the callback argument is not None, it is called as soon as the referenced function is garbage deleted. :type function: callable :param function: The function to reference. :type callback: callable :param callback: Called when the function dies. """ try: function.__func__ except AttributeError: return _WeakMethodFree(function, callback) return _WeakMethodBound(function, callback)
29.165414
79
0.656613
487
3,879
5.032854
0.353183
0.042432
0.051408
0.037536
0.172583
0.090575
0
0
0
0
0
0.008282
0.2529
3,879
132
80
29.386364
0.837474
0.469966
0
0.106383
1
0
0.039339
0
0
0
0
0
0
1
0.212766
false
0.021277
0.06383
0.021277
0.553191
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
1
0
0
0
0
0
0
0
2
7a20b510b43db7ff46703962f3199996a231f815
5,521
py
Python
user_login.py
kithsirij/NLP-based-Syllabus-Coverage-Exam-paper-checker-Tool
b7b38a7b7c6d0a2ad5264df32acd75cdef552bd0
[ "MIT" ]
1
2019-07-17T09:08:41.000Z
2019-07-17T09:08:41.000Z
user_login.py
kithsirij/NLP-based-Syllabus-Coverage-Exam-paper-checker-Tool
b7b38a7b7c6d0a2ad5264df32acd75cdef552bd0
[ "MIT" ]
null
null
null
user_login.py
kithsirij/NLP-based-Syllabus-Coverage-Exam-paper-checker-Tool
b7b38a7b7c6d0a2ad5264df32acd75cdef552bd0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'user_login.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding) except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig) class Ui_Dialog_login(object): def setupUi(self, Dialog_login): Dialog_login.setObjectName(_fromUtf8("Dialog_login")) Dialog_login.resize(705, 348) Dialog_login.setStyleSheet(" background-image:url(SE_syllabus/videoblocks-two-feathers-down-moving-slowly-in-a-soft-light-decorative-blue-animation-for-background-or-illustration_rbxjcaiwz_thumbnail-full01.png)") # Dialog_login.setStyleSheet(_fromUtf8("QDialog{\n" # " background-image:url(:/newPrefix/videoblocks-two-feathers-down-moving-slowly-in-a-soft-light-decorative-blue-animation-for-background-or-illustration_rbxjcaiwz_thumbnail-full01.png)\n" # "}")) self.groupBox = QtGui.QGroupBox(Dialog_login) self.groupBox.setGeometry(QtCore.QRect(320, 70, 341, 211)) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(15) font.setBold(True) font.setWeight(75) self.groupBox.setFont(font) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setGeometry(QtCore.QRect(20, 50, 101, 21)) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) font.setBold(False) font.setWeight(50) font.setKerning(False) self.label_2.setFont(font) self.label_2.setStyleSheet(_fromUtf8("")) self.label_2.setObjectName(_fromUtf8("label_2")) self.label_3 = QtGui.QLabel(self.groupBox) self.label_3.setGeometry(QtCore.QRect(20, 100, 81, 21)) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) font.setBold(False) font.setWeight(50) font.setKerning(False) self.label_3.setFont(font) self.label_3.setObjectName(_fromUtf8("label_3")) self.lineEdit_user_name = QtGui.QLineEdit(self.groupBox) self.lineEdit_user_name.setGeometry(QtCore.QRect(130, 50, 189, 26)) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.lineEdit_user_name.setFont(font) self.lineEdit_user_name.setObjectName(_fromUtf8("lineEdit_user_name")) self.lineEdit_password = QtGui.QLineEdit(self.groupBox) self.lineEdit_password.setGeometry(QtCore.QRect(130, 100, 189, 26)) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.lineEdit_password.setFont(font) self.lineEdit_password.setInputMask(_fromUtf8("")) self.lineEdit_password.setEchoMode(QtGui.QLineEdit.Password) self.lineEdit_password.setObjectName(_fromUtf8("lineEdit_password")) self.pushButton_login = QtGui.QPushButton(self.groupBox) self.pushButton_login.setGeometry(QtCore.QRect(130, 150, 91, 28)) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.pushButton_login.setFont(font) self.pushButton_login.setStyleSheet(_fromUtf8("")) self.pushButton_login.setObjectName(_fromUtf8("pushButton_login")) self.pushButton = QtGui.QPushButton(Dialog_login) self.pushButton.setGeometry(QtCore.QRect(0, 10, 301, 281)) self.pushButton.setStyleSheet(_fromUtf8("QPushButton{\n" " border:1px;\n" "}")) self.pushButton.setText(_fromUtf8("")) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("SE_syllabus/gdqqylhslbhemylnuhrn.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton.setIcon(icon) self.pushButton.setIconSize(QtCore.QSize(300, 300)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.retranslateUi(Dialog_login) QtCore.QMetaObject.connectSlotsByName(Dialog_login) def retranslateUi(self, Dialog_login): Dialog_login.setWindowTitle(_translate("Dialog_login", "Dialog", None)) self.groupBox.setTitle(_translate("Dialog_login", "SignIn", None)) self.label_2.setText(_translate("Dialog_login", "User Name", None)) self.label_3.setText(_translate("Dialog_login", "Password", None)) self.pushButton_login.setText(_translate("Dialog_login", "Login", None)) # import xy_rc # import xz_rc if __name__ == "__main__": import sys app = QtGui.QApplication(sys.argv) Dialog_login = QtGui.QDialog() ui = Ui_Dialog_login() ui.setupUi(Dialog_login) Dialog_login.show() sys.exit(app.exec_())
42.79845
221
0.674697
628
5,521
5.754777
0.265924
0.066962
0.042612
0.029884
0.347814
0.333426
0.294687
0.294687
0.294687
0.294687
0
0.035388
0.206665
5,521
128
222
43.132813
0.789726
0.084767
0
0.333333
1
0.009524
0.109324
0.044178
0
0
0
0
0
1
0.047619
false
0.066667
0.019048
0.028571
0.104762
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
1
0
0
0
0
0
2
7a3047f51aeb30cf22f240d1cdb2815176c85fb7
554
py
Python
test/test_unionWith.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
1
2022-03-14T07:35:13.000Z
2022-03-14T07:35:13.000Z
test/test_unionWith.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
3
2022-03-24T02:30:18.000Z
2022-03-31T07:46:04.000Z
test/test_unionWith.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
null
null
null
import unittest import ramda as R """ https://github.com/ramda/ramda/blob/master/test/unionWith.js """ Ro = [{'a': 1}, {'a': 2}, {'a': 3}, {'a': 4}] So = [{'a': 3}, {'a': 4}, {'a': 5}, {'a': 6}] def eqA(r, s): return r['a'] == s['a'] class TestUnionWith(unittest.TestCase): def test_combines_two_lists_into_the_set_of_all_their_elements_based_on_the_passed_in_quiality_predicate(self): self.assertEqual([{'a': 1}, {'a': 2}, {'a': 3}, {'a': 4}, {'a': 5}, {'a': 6}], R.unionWith(eqA, Ro, So)) if __name__ == '__main__': unittest.main()
22.16
113
0.595668
91
554
3.351648
0.549451
0.019672
0.029508
0.039344
0.091803
0.091803
0.091803
0.091803
0
0
0
0.029536
0.144404
554
24
114
23.083333
0.613924
0
0
0
0
0
0.049485
0
0
0
0
0
0.090909
1
0.181818
false
0.090909
0.181818
0.090909
0.545455
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
7a3181928998d50a1a8ffab17c4c36d8c84165bb
449
py
Python
data_relay/src/plugins/GcpPubsub.py
phil-d-wilson/connectorV2
7077aa1c74276e8e334a8046793e942eec8d9975
[ "Apache-2.0" ]
null
null
null
data_relay/src/plugins/GcpPubsub.py
phil-d-wilson/connectorV2
7077aa1c74276e8e334a8046793e942eec8d9975
[ "Apache-2.0" ]
49
2021-04-09T14:41:50.000Z
2021-07-28T10:54:48.000Z
data_relay/src/plugins/GcpPubsub.py
phil-d-wilson/connectorV2
7077aa1c74276e8e334a8046793e942eec8d9975
[ "Apache-2.0" ]
2
2021-04-24T10:47:57.000Z
2021-07-17T07:13:00.000Z
import os NAME = "GCP Pubsub" TYPE = "remote" FILE = "GcpPubsub.yaml" VARS = [ "GCP_PUBSUB_TOPIC", "GCP_PUBSUB_SUBSCRIPTION", "GCP_PUBSUB_TYPE", "GCP_PUBSUB_PROJECT_ID", "GCP_PUBSUB_CLIENT_EMAIL", "GCP_PUBSUB_PRIVATE_KEY" ] def invoke(): if os.getenv("GCP_PUBSUB_SUBSCRIPTION") is None: print("Setting GCP Pub/Sub subscription to the default: unknown") os.environ["GCP_PUBSUB_SUBSCRIPTION"] = "unknown"
23.631579
73
0.69265
58
449
5.034483
0.586207
0.277397
0.215753
0
0
0
0
0
0
0
0
0
0.18931
449
18
74
24.944444
0.802198
0
0
0
0
0
0.576837
0.300668
0
0
0
0
0
1
0.0625
false
0
0.0625
0
0.125
0.0625
0
0
0
null
1
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
7a36af0648e50d92d87603aa79c0a09dbff98bd9
809
py
Python
instagram/accounts/decorators.py
developer-LeeSteve/django_instagram_clonecoding
efad44cb6bda89b935bf203e66cdc6b69a3caa6a
[ "MIT" ]
1
2020-12-16T14:23:49.000Z
2020-12-16T14:23:49.000Z
instagram/accounts/decorators.py
SihwanLee/django_instagram_clonecoding
efad44cb6bda89b935bf203e66cdc6b69a3caa6a
[ "MIT" ]
null
null
null
instagram/accounts/decorators.py
SihwanLee/django_instagram_clonecoding
efad44cb6bda89b935bf203e66cdc6b69a3caa6a
[ "MIT" ]
null
null
null
from django.contrib import messages from django.shortcuts import redirect from django.conf import settings def custom_login_required(view_func): def wrap_func(request, *args, **kwargs): if not request.user.is_authenticated: messages.info(request, "로그인하지 않으면 이용하실 수 없습니다.") return redirect('accounts:login') else: return view_func(request, *args, **kwargs) return view_func(request, *args, **kwargs) return wrap_func def already_logged_in(view_func): def wrap_func(request, *args, **kwargs): if request.user.is_authenticated: return redirect('accounts:index') else: return view_func(request, *args, **kwargs) return view_func(request, *args, **kwargs) return wrap_func # def not_blocked_requried(view_func): # def wrap_func(request, *args, **kwargs): # if not request.user
31.115385
51
0.749073
114
809
5.140351
0.342105
0.095563
0.179181
0.250853
0.525597
0.525597
0.525597
0.525597
0.525597
0.460751
0
0
0.13597
809
26
52
31.115385
0.83834
0.123609
0
0.5
0
0
0.070922
0
0
0
0
0
0
1
0.2
false
0
0.15
0
0.75
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
0
0
0
0
1
0
0
2
7a3ddb84637451bc224d8d45f302405834e9a803
919
py
Python
domain/trainoikiri.py
astroripple/horseview
fda3de3c451a8995603e048a6b2148df4b83384b
[ "MIT" ]
null
null
null
domain/trainoikiri.py
astroripple/horseview
fda3de3c451a8995603e048a6b2148df4b83384b
[ "MIT" ]
null
null
null
domain/trainoikiri.py
astroripple/horseview
fda3de3c451a8995603e048a6b2148df4b83384b
[ "MIT" ]
null
null
null
from ..sessioncontroll import ( baseobj, strobj, baseobj, intobj, colobj, fkyobj, ) class TrainOikiriData(baseobj): __tablename__ = "train_oikiri" racehorsekey = colobj(strobj, fkyobj("racehorse.racehorsekey"), primary_key=True) racekey = colobj(strobj) num = colobj(intobj) day_of_week = colobj(strobj) train_date = colobj(strobj) kaisu = colobj(intobj) train_course_code = colobj(strobj) oikiri_kind = colobj(intobj) oikiri_state = colobj(intobj) rider = colobj(intobj) train_f = colobj(intobj) ten_f = colobj(intobj) mid_f = colobj(intobj) end_f = colobj(intobj) ten_f_score = colobj(intobj) mid_f_score = colobj(intobj) end_f_score = colobj(intobj) oikiri_score = colobj(intobj) awase_result = colobj(strobj) aite_oikiri_kind = colobj(intobj) aite_age = colobj(intobj) aite_class = colobj(strobj)
26.257143
85
0.682263
110
919
5.436364
0.354545
0.301003
0.086957
0.090301
0.056856
0
0
0
0
0
0
0
0.219804
919
34
86
27.029412
0.834031
0
0
0.0625
0
0
0.036997
0.023939
0
0
0
0
0
1
0
false
0
0.03125
0
0.78125
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
7a44821c251e653923cd4afb6e463d8caa66855d
6,337
py
Python
mypython/Lib/site-packages/pandas/tests/indexes/test_datetimelike.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
null
null
null
mypython/Lib/site-packages/pandas/tests/indexes/test_datetimelike.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
null
null
null
mypython/Lib/site-packages/pandas/tests/indexes/test_datetimelike.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
1
2021-04-26T22:41:56.000Z
2021-04-26T22:41:56.000Z
""" Tests shared for DatetimeIndex/TimedeltaIndex/PeriodIndex """ from datetime import datetime, timedelta import numpy as np import pytest import pandas as pd from pandas import ( CategoricalIndex, DatetimeIndex, Index, PeriodIndex, TimedeltaIndex, date_range, period_range, ) import pandas._testing as tm class EqualsTests: def test_not_equals_numeric(self, index): assert not index.equals(Index(index.asi8)) assert not index.equals(Index(index.asi8.astype("u8"))) assert not index.equals(Index(index.asi8).astype("f8")) def test_equals(self, index): assert index.equals(index) assert index.equals(index.astype(object)) assert index.equals(CategoricalIndex(index)) assert index.equals(CategoricalIndex(index.astype(object))) def test_not_equals_non_arraylike(self, index): assert not index.equals(list(index)) def test_not_equals_strings(self, index): other = Index([str(x) for x in index], dtype=object) assert not index.equals(other) assert not index.equals(CategoricalIndex(other)) def test_not_equals_misc_strs(self, index): other = Index(list("abc")) assert not index.equals(other) class TestPeriodIndexEquals(EqualsTests): @pytest.fixture def index(self): return period_range("2013-01-01", periods=5, freq="D") # TODO: de-duplicate with other test_equals2 methods @pytest.mark.parametrize("freq", ["D", "M"]) def test_equals2(self, freq): # GH#13107 idx = PeriodIndex(["2011-01-01", "2011-01-02", "NaT"], freq=freq) assert idx.equals(idx) assert idx.equals(idx.copy()) assert idx.equals(idx.astype(object)) assert idx.astype(object).equals(idx) assert idx.astype(object).equals(idx.astype(object)) assert not idx.equals(list(idx)) assert not idx.equals(pd.Series(idx)) idx2 = PeriodIndex(["2011-01-01", "2011-01-02", "NaT"], freq="H") assert not idx.equals(idx2) assert not idx.equals(idx2.copy()) assert not idx.equals(idx2.astype(object)) assert not idx.astype(object).equals(idx2) assert not idx.equals(list(idx2)) assert not idx.equals(pd.Series(idx2)) # same internal, different tz idx3 = PeriodIndex._simple_new( idx._values._simple_new(idx._values.asi8, freq="H") ) tm.assert_numpy_array_equal(idx.asi8, idx3.asi8) assert not idx.equals(idx3) assert not idx.equals(idx3.copy()) assert not idx.equals(idx3.astype(object)) assert not idx.astype(object).equals(idx3) assert not idx.equals(list(idx3)) assert not idx.equals(pd.Series(idx3)) class TestDatetimeIndexEquals(EqualsTests): @pytest.fixture def index(self): return date_range("2013-01-01", periods=5) def test_equals2(self): # GH#13107 idx = DatetimeIndex(["2011-01-01", "2011-01-02", "NaT"]) assert idx.equals(idx) assert idx.equals(idx.copy()) assert idx.equals(idx.astype(object)) assert idx.astype(object).equals(idx) assert idx.astype(object).equals(idx.astype(object)) assert not idx.equals(list(idx)) assert not idx.equals(pd.Series(idx)) idx2 = DatetimeIndex(["2011-01-01", "2011-01-02", "NaT"], tz="US/Pacific") assert not idx.equals(idx2) assert not idx.equals(idx2.copy()) assert not idx.equals(idx2.astype(object)) assert not idx.astype(object).equals(idx2) assert not idx.equals(list(idx2)) assert not idx.equals(pd.Series(idx2)) # same internal, different tz idx3 = DatetimeIndex(idx.asi8, tz="US/Pacific") tm.assert_numpy_array_equal(idx.asi8, idx3.asi8) assert not idx.equals(idx3) assert not idx.equals(idx3.copy()) assert not idx.equals(idx3.astype(object)) assert not idx.astype(object).equals(idx3) assert not idx.equals(list(idx3)) assert not idx.equals(pd.Series(idx3)) # check that we do not raise when comparing with OutOfBounds objects oob = Index([datetime(2500, 1, 1)] * 3, dtype=object) assert not idx.equals(oob) assert not idx2.equals(oob) assert not idx3.equals(oob) # check that we do not raise when comparing with OutOfBounds dt64 oob2 = oob.map(np.datetime64) assert not idx.equals(oob2) assert not idx2.equals(oob2) assert not idx3.equals(oob2) @pytest.mark.parametrize("freq", ["B", "C"]) def test_not_equals_bday(self, freq): rng = date_range("2009-01-01", "2010-01-01", freq=freq) assert not rng.equals(list(rng)) class TestTimedeltaIndexEquals(EqualsTests): @pytest.fixture def index(self): return tm.makeTimedeltaIndex(10) def test_equals2(self): # GH#13107 idx = TimedeltaIndex(["1 days", "2 days", "NaT"]) assert idx.equals(idx) assert idx.equals(idx.copy()) assert idx.equals(idx.astype(object)) assert idx.astype(object).equals(idx) assert idx.astype(object).equals(idx.astype(object)) assert not idx.equals(list(idx)) assert not idx.equals(pd.Series(idx)) idx2 = TimedeltaIndex(["2 days", "1 days", "NaT"]) assert not idx.equals(idx2) assert not idx.equals(idx2.copy()) assert not idx.equals(idx2.astype(object)) assert not idx.astype(object).equals(idx2) assert not idx.astype(object).equals(idx2.astype(object)) assert not idx.equals(list(idx2)) assert not idx.equals(pd.Series(idx2)) # Check that we dont raise OverflowError on comparisons outside the # implementation range oob = Index([timedelta(days=10 ** 6)] * 3, dtype=object) assert not idx.equals(oob) assert not idx2.equals(oob) # FIXME: oob.apply(np.timedelta64) incorrectly overflows oob2 = Index([np.timedelta64(x) for x in oob], dtype=object) assert not idx.equals(oob2) assert not idx2.equals(oob2)
36.211429
83
0.626006
820
6,337
4.789024
0.159756
0.12605
0.125286
0.160428
0.669977
0.625414
0.602241
0.538579
0.502674
0.485358
0
0.043184
0.254537
6,337
174
84
36.41954
0.788103
0.073063
0
0.541985
0
0
0.035922
0
0
0
0
0.005747
0.580153
1
0.091603
false
0
0.045802
0.022901
0.19084
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
1
0
0
0
0
0
0
0
0
0
2
7a5a62763ddfec64255b552e5d58cb705cc0523d
2,141
py
Python
app/db/movie.py
vzool/fullstack-nanodegree-movie-trailer-website
ad9fe76d257bd785d17ea574317c1ba6137a314c
[ "MIT" ]
null
null
null
app/db/movie.py
vzool/fullstack-nanodegree-movie-trailer-website
ad9fe76d257bd785d17ea574317c1ba6137a314c
[ "MIT" ]
null
null
null
app/db/movie.py
vzool/fullstack-nanodegree-movie-trailer-website
ad9fe76d257bd785d17ea574317c1ba6137a314c
[ "MIT" ]
null
null
null
# importing Movie Model from app.model.movie import Movie # Movie Data movie_data = [ Movie("V for Vendetta", "Freedom forever", "http://upload.wikimedia.org/wikipedia/en/thumb/9/9f/Vforvendettamov.jpg/220px-Vforvendettamov.jpg", "https://www.youtube.com/watch?v=k_13fFIrhPk", "2005"), Movie("Matrix", "Freedom forever", "http://upload.wikimedia.org/wikipedia/en/thumb/c/c1/The_Matrix_Poster.jpg/220px-The_Matrix_Poster.jpg", "https://www.youtube.com/watch?v=m8e-FF8MsqU", "1999"), Movie("Toy Story", "Toy Story. Led by Woody, Andy's toys live happily in his room until Andy's birthday brings Buzz Lightyear onto the scene.", "http://upload.wikimedia.org/wikipedia/en/thumb/c/c4/Toy_Story_Soundtrack.jpg/220px-Toy_Story_Soundtrack.jpg", "https://www.youtube.com/watch?v=4KPTXpQehio", "1995"), Movie("Avatar", "A hybrid human-alien called an Avatar is created to facilitate communication with the indigenous Na'vis from the planet Pandora.", "http://upload.wikimedia.org/wikipedia/en/thumb/b/b0/Avatar-Teaser-Poster.jpg/220px-Avatar-Teaser-Poster.jpg", "https://www.youtube.com/watch?v=cRdxXPV9GNQ", "2009"), Movie("School of Rock", "The main plot follows struggling rock singer and guitarist, Dewey Finn (portrayed by Black), who is kicked out of his band and subsequently disguises himself as a substitute teacher at a prestigious prep school.", "http://upload.wikimedia.org/wikipedia/en/thumb/1/11/School_of_Rock_Poster.jpg/220px-School_of_Rock_Poster.jpg", "https://www.youtube.com/watch?v=XCwy6lW5Ixc", "2003"), Movie("Ratatouille", "storyline", "http://upload.wikimedia.org/wikipedia/en/5/50/RatatouillePoster.jpg", "https://www.youtube.com/watch?v=c3sBBRxDAqk", "2007"), Movie("Midnight in Paris", "storyline", "http://upload.wikimedia.org/wikipedia/en/thumb/9/9f/Midnight_in_Paris_Poster.jpg/215px-Midnight_in_Paris_Poster.jpg", "https://www.youtube.com/watch?v=BYRWfS2s2v4", "2011"), Movie("Hunger Games", "storyline", "http://upload.wikimedia.org/wikipedia/en/4/42/HungerGamesPoster.jpg", "https://www.youtube.com/watch?v=4S9a5V9ODuY", "2012"), ]
38.927273
216
0.739374
316
2,141
4.939873
0.433544
0.051249
0.097373
0.112748
0.428571
0.382447
0.382447
0.204997
0.094811
0
0
0.042708
0.103223
2,141
54
217
39.648148
0.770313
0.014946
0
0.116279
0
0.209302
0.831909
0
0
0
0
0
0
1
0
false
0
0.023256
0
0.023256
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7a691557fe6ae049143f6d66580c8409714f704f
1,849
py
Python
anagram_palindrome.py
YannMjl/Coding-Interview-Problems
84ecf237da52aca7822fc3074823f3faeb360e8b
[ "MIT" ]
null
null
null
anagram_palindrome.py
YannMjl/Coding-Interview-Problems
84ecf237da52aca7822fc3074823f3faeb360e8b
[ "MIT" ]
null
null
null
anagram_palindrome.py
YannMjl/Coding-Interview-Problems
84ecf237da52aca7822fc3074823f3faeb360e8b
[ "MIT" ]
null
null
null
# anagram_palindrome # # Write a function which accepts an input word and returns true or false # if there exists an anagram of that input word that is a palindrome. # We are going to try solve this question with a time complexcity of: # O(n) => linear # palindrome : is a string that read the same from front to back # and back to front : noon, eye, # Anagram of "cat" => "tac", "act", "tca"... # to check for palindrome: we compared the first character to the last character # and the second character to second last character and so until we can to the middle # for string that have odd character, we compared all the character until we get # to the single charcter in the middle # aotoa : compare first chart "a" to last character "a", then second character "o" # to second last character "o" and we get to the single character "t" in the middle # "gtgagtg" : or we can rever the string and check if the character match with the # orignal string # now let's write a function that implements the solution concept def anagram_palindrome(word): # this is a brute solution to check if the owrd is a palindrome # using python slicing notation to reverse the string and # assuming the string does not have space bewteen characters return word == word[::-1] # the run time will be O(n) as the slicing methot has to go throught each character # of the string and compare both strings. print(anagram_palindrome("noon")) ## should return true print(anagram_palindrome("carrace")) ## should return true ## "racecar", "carerac", "rcaeacr" print(anagram_palindrome("cutoo")) ## should return false ## "otcuo" print(anagram_palindrome("a")) ## should return true print(anagram_palindrome("aotoa")) ## should return true print(anagram_palindrome("ddaaa")) ## should return false # "daaad" or "adada"
39.340426
85
0.725798
287
1,849
4.648084
0.414634
0.101949
0.098951
0.047226
0.109445
0.085457
0
0
0
0
0
0.000672
0.195241
1,849
46
86
40.195652
0.895833
0.786371
0
0
0
0
0.076271
0
0
0
0
0
0
1
0.125
false
0
0
0.125
0.25
0.75
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
0
1
0
1
0
2
7a6bb5aedefbdd1299d8879a59c394822d87911a
177
py
Python
docs/_source/links/coleridgeinitiative.py
NYU-CI/adrf-userdocs
8f9ddd136d9e8020e548aaafb7027ff5ebeb0aa5
[ "CC0-1.0" ]
null
null
null
docs/_source/links/coleridgeinitiative.py
NYU-CI/adrf-userdocs
8f9ddd136d9e8020e548aaafb7027ff5ebeb0aa5
[ "CC0-1.0" ]
1
2020-08-05T15:53:46.000Z
2020-08-05T15:53:46.000Z
docs/_source/links/coleridgeinitiative.py
NYU-CI/adrf-userdocs
8f9ddd136d9e8020e548aaafb7027ff5ebeb0aa5
[ "CC0-1.0" ]
2
2020-01-08T20:32:20.000Z
2020-01-23T14:27:18.000Z
import link link_name = "coleridgeinitiative" user_text = "coleridge initiative" url = "https://coleridgeinitiative.org/" link.xref_links.update({link_name: (user_text, url)})
25.285714
53
0.774011
22
177
6
0.636364
0.121212
0
0
0
0
0
0
0
0
0
0
0.090395
177
7
53
25.285714
0.819876
0
0
0
0
0
0.398876
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
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
7a71b0801d05f4c5a79daaf1c509c389e541e82e
894
py
Python
bbpyp/ll_combinator/reserved.py
BloggerBust/bbpyp
078f940dd38bc3ee7c5adcfb2555c2843a4ca57b
[ "Apache-2.0" ]
null
null
null
bbpyp/ll_combinator/reserved.py
BloggerBust/bbpyp
078f940dd38bc3ee7c5adcfb2555c2843a4ca57b
[ "Apache-2.0" ]
null
null
null
bbpyp/ll_combinator/reserved.py
BloggerBust/bbpyp
078f940dd38bc3ee7c5adcfb2555c2843a4ca57b
[ "Apache-2.0" ]
null
null
null
from bbpyp.ll_combinator.model.token_enum import TokenEnum from bbpyp.ll_combinator.model.result import Result from bbpyp.abstract_parser.operand_combinator import OperandCombinator class Reserved(OperandCombinator): def __init__(self, tag, value, *args, **kwargs): super().__init__(*args, **kwargs) self._tag = tag self._value = value def __call__(self, tokens, position): if(position < len(tokens) and tokens[position][TokenEnum.TAG] is self.tag and tokens[position][TokenEnum.VALUE] == self.value): return Result(tokens[position][TokenEnum.VALUE], position + 1) return Result(None, position) @property def value(self): return self._value @property def tag(self): return self._tag def __repr__(self): return f"{type(self).__name__}({self.tag}, {self.value})"
29.8
74
0.665548
107
894
5.28972
0.364486
0.061837
0.121908
0.074205
0.091873
0
0
0
0
0
0
0.001439
0.222595
894
29
75
30.827586
0.81295
0
0
0.090909
0
0
0.052573
0.036913
0
0
0
0
0
1
0.227273
false
0
0.136364
0.136364
0.636364
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
1
0
0
0
2
7a765d4b7d6246af9031cbd794900f96dfb19781
100
py
Python
output/models/saxon_data/xml_versions/xv100_c_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/saxon_data/xml_versions/xv100_c_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/saxon_data/xml_versions/xv100_c_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.saxon_data.xml_versions.xv100_c_xsd.xv100_c import Doc __all__ = [ "Doc", ]
16.666667
73
0.75
16
100
4.125
0.8125
0.181818
0
0
0
0
0
0
0
0
0
0.069767
0.14
100
5
74
20
0.697674
0
0
0
0
0
0.03
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
7a7e898d8fe73bb5fde9485aa741faa2bc8453e8
1,917
py
Python
test/test_poerators.py
Algy/pipex
02b958f67b32cad4a492d098a2ed73f971c6ac5f
[ "MIT" ]
3
2018-12-24T03:48:40.000Z
2018-12-24T04:07:36.000Z
test/test_poerators.py
Algy/pipex
02b958f67b32cad4a492d098a2ed73f971c6ac5f
[ "MIT" ]
2
2021-03-18T21:56:12.000Z
2021-09-08T00:47:14.000Z
test/test_poerators.py
Algy/pipex
02b958f67b32cad4a492d098a2ed73f971c6ac5f
[ "MIT" ]
null
null
null
import pytest import numpy as np from pipex.poperators import source, pipe_map, pipe, sink, value_sink from pipex.pdatastructures import PRecord class one_forever(source): def generate(self): while True: yield 1 class set_sink(value_sink): def __init__(self, set): self.set = set def save_value(self, obj): self.set.add(obj) class one_shot_sink(sink): def __init__(self): self.saved_value = None def process(self, our, precords): for precord in precords: self.saved_value = precord.value break yield from [] class adder(pipe_map): def __init__(self, adding=1): self.adding = adding def map(self, value): return value + self.adding class select_even(pipe_map): def filter(self, value): return value % 2 == 0 class change_channel(pipe): def transform(self, our, precords): for precord in precords: yield precord.merge(another_channel=precord.value).with_channel('another_channel') def test_adder(): assert list(([1, 2, 3] >> adder).values()) == [2, 3, 4] assert list(([1, 2, 3] >> adder(11)).values()) == [12, 13, 14] arr = [] ([1, 2, 3] >> adder(11) >> arr).do() assert all(isinstance(x, PRecord) for x in arr) assert [precord.value for precord in arr] == [12, 13, 14] def test_filter(): assert list(([1, 2, 3] >> select_even).values()) == [2] def test_change_channel(): for precord in ([1, 2, 3] >> change_channel): assert isinstance(precord, PRecord) assert precord.value in [1, 2, 3] assert precord.active_channel == 'another_channel' def test_one_forever(): s = one_shot_sink() (one_forever >> adder >> s).do() assert s.saved_value == 2 def test_set_sink(): my_set = set() s = set_sink(my_set) ([1] >> adder >> s).do() assert my_set == set([2])
24.576923
94
0.615023
271
1,917
4.169742
0.261993
0.012389
0.015929
0.031858
0.165487
0.093805
0.061947
0
0
0
0
0.031315
0.250391
1,917
77
95
24.896104
0.755045
0
0
0.035714
1
0
0.015649
0
0
0
0
0
0.178571
1
0.25
false
0
0.071429
0.035714
0.464286
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
1
0
0
0
0
0
0
0
2
7a8414ffacdc62728624c2be1c1613a95ec5afdc
2,035
py
Python
scraper.py
jplattel/smp-scraper
a2d8050623816732d06f78f267eb01fa8f83fca4
[ "MIT" ]
5
2018-07-03T14:12:35.000Z
2020-04-11T15:41:46.000Z
scraper.py
jplattel/smp-scraper
a2d8050623816732d06f78f267eb01fa8f83fca4
[ "MIT" ]
null
null
null
scraper.py
jplattel/smp-scraper
a2d8050623816732d06f78f267eb01fa8f83fca4
[ "MIT" ]
2
2017-09-01T20:37:54.000Z
2020-10-31T12:28:42.000Z
import logging import sys import os import mechanize import xlrd import csv import datetime import peewee # Database db = peewee.MySQLDatabase("database_name", host="localhost", user="root", password="password") class BaseModel(peewee.Model): class Meta: database = db class Usage(BaseModel): date = peewee.DateTimeField(unique=True) value = peewee.FloatField() def setup(): db.connect() db.create_table(Usage) # Logging logger = logging.getLogger("mechanize") logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.INFO) def scrape(date=1416265200, email, password): """ Scrapes data from slimmemeterportal.nl """ # Open browser br = mechanize.Browser() br.open('https://slimmemeterportal.nl/login') # Fill out login form br.select_form(nr=0) br["user_session[email]"] = email br["user_session[password]"] = password br.submit() # Download the XLS file with r = br.retrieve('https://slimmemeterportal.nl/cust/consumption/chart.xls?commodity=power&datatype=consumption&range=86400&timeslot_start=' + str(date), str(date) + '.xls') # Save from excel to database def save_to_db(date): wb = xlrd.open_workbook(str(date) + '.xls') sh = wb.sheet_by_name('Sheet 1') r = range(sh.nrows) r.pop(0) # remove header for rownum in r: # convert datatime from excel d = xlrd.xldate_as_tuple(sh.row_values(rownum)[0], wb.datemode) # Convert Excel data to tuple d = datetime.datetime(*d) # tuple to datetime # Ugly way to check if it entry exists in the database, quick 'n dirty! e = False try: e = Usage.get(Usage.date == d) except: pass if not e: u = Usage(date=d, value=sh.row_values(rownum)[1]) u.save() # Delete xls file for cleanup os.remove(str(date) + '.xls') # Start scraping scrape(unix_timestamp_at_midnight_of_a_day, email, password) save_to_db(unix_timestamp_at_midnight_of_a_day)
26.428571
175
0.670762
278
2,035
4.805755
0.478417
0.020958
0.022455
0.025449
0.043413
0.043413
0.043413
0
0
0
0
0.012453
0.210811
2,035
76
176
26.776316
0.819427
0.149877
0
0
0
0.020833
0.154633
0.013237
0
0
0
0
0
0
null
null
0.104167
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
7a8e34b78e033bc592eba7001de0bd40538ccb16
223
py
Python
semestre01/exercises_university_uri/1125.py
alaanlimaa/impactaADS
307d0b2c7831a5038184592afae7a825b2774498
[ "MIT" ]
null
null
null
semestre01/exercises_university_uri/1125.py
alaanlimaa/impactaADS
307d0b2c7831a5038184592afae7a825b2774498
[ "MIT" ]
null
null
null
semestre01/exercises_university_uri/1125.py
alaanlimaa/impactaADS
307d0b2c7831a5038184592afae7a825b2774498
[ "MIT" ]
null
null
null
nota_trabalhos = float(input()) nota_prova = float(input()) media = (nota_trabalhos + nota_prova) / 2 if media >= 6: print('aprovado') elif nota_trabalhos >= 2: print('talvez com a sub') else: print('reprovado')
24.777778
41
0.672646
31
223
4.677419
0.580645
0.268966
0
0
0
0
0
0
0
0
0
0.016304
0.174888
223
9
42
24.777778
0.771739
0
0
0
0
0
0.147321
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
7a98b61d6712e46f798c58eeffedf0c241f9cf28
23,491
py
Python
pysnmp/ERI-DNX-STM1-OC3-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/ERI-DNX-STM1-OC3-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/ERI-DNX-STM1-OC3-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 ERI-DNX-STM1-OC3-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ERI-DNX-STM1-OC3-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:51: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) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint") NestSlotAddress, trapSequence, OneByteField, LinkPortAddress, PortStatus, LinkCmdStatus, devices = mibBuilder.importSymbols("ERI-DNX-SMC-MIB", "NestSlotAddress", "trapSequence", "OneByteField", "LinkPortAddress", "PortStatus", "LinkCmdStatus", "devices") eriMibs, = mibBuilder.importSymbols("ERI-ROOT-SMI", "eriMibs") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") ObjectIdentity, NotificationType, Counter32, TimeTicks, ModuleIdentity, Gauge32, IpAddress, Counter64, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Integer32, iso, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "NotificationType", "Counter32", "TimeTicks", "ModuleIdentity", "Gauge32", "IpAddress", "Counter64", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Integer32", "iso", "Bits") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") eriDNXStm1Oc3MIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 644, 3, 9)) eriDNXStm1Oc3MIB.setRevisions(('2003-05-05 00:00', '2003-02-27 00:00', '2002-04-19 00:00', '2002-04-12 00:00', '2002-03-01 00:00', '2002-01-04 00:00', '2001-11-12 00:00', '2001-08-30 00:00',)) if mibBuilder.loadTexts: eriDNXStm1Oc3MIB.setLastUpdated('200305050000Z') if mibBuilder.loadTexts: eriDNXStm1Oc3MIB.setOrganization('Eastern Research, Inc.') dnxStm1Oc3 = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7)) opticalConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1)) opticalDiag = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2)) class PayLoadGroupType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("e1", 0), ("t1", 1)) opticalDevConfigTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1), ) if mibBuilder.loadTexts: opticalDevConfigTable.setStatus('current') opticalDevConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optDevCfgAddr")) if mibBuilder.loadTexts: opticalDevConfigEntry.setStatus('current') optDevCfgAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 1), NestSlotAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optDevCfgAddr.setStatus('current') optDevCfgResource = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optDevCfgResource.setStatus('current') optDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("stm1", 0), ("oc3", 1), ("stm1X", 2), ("oc3X", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: optDevType.setStatus('current') optDevMultiplexMode = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("au3", 0), ("au4", 1), ("sts-3", 2), ("sts-3c", 3), ("au4-vc3-Seq", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevMultiplexMode.setStatus('current') optLineTiming = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("local", 0), ("loop", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optLineTiming.setStatus('current') optDevPayload1 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 6), PayLoadGroupType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevPayload1.setStatus('current') optDevPayload2 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 7), PayLoadGroupType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevPayload2.setStatus('current') optDevPayload3 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 8), PayLoadGroupType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevPayload3.setStatus('current') optDevCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 101, 400, 402, 403, 414, 415, 416, 419, 421, 424, 427, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update-config", 1), ("update-successful", 101), ("err-general-opt-config-error", 400), ("err-au4Seq-cannot-be-mixed-framing", 402), ("err-invalid-opt-dev-command", 403), ("err-device-is-protection-module", 414), ("err-invalid-multiplex-map", 415), ("err-invalid-payload-framing", 416), ("err-invalid-xlink-nest-num", 419), ("err-invalid-line-timing", 421), ("err-ts-alloc-not-applicable", 424), ("err-xlink-pair-not-applicable", 427), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevCmdStatus.setStatus('current') optDevTsAlloc = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("normal", 0), ("alternate", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevTsAlloc.setStatus('current') optDevAssignedToNest = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2, 8), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevAssignedToNest.setStatus('current') optT1E1LinkConfigTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2), ) if mibBuilder.loadTexts: optT1E1LinkConfigTable.setStatus('current') optT1E1LinkConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optT1E1CfgLinkAddr")) if mibBuilder.loadTexts: optT1E1LinkConfigEntry.setStatus('current') optT1E1CfgLinkAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 1), LinkPortAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optT1E1CfgLinkAddr.setStatus('current') optT1E1CfgResource = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optT1E1CfgResource.setStatus('current') optT1E1CfgLinkName = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1CfgLinkName.setStatus('current') optT1E1Status = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 4), PortStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1Status.setStatus('current') optT1E1Clear = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disabled", 0), ("framed", 1), ("unframed", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1Clear.setStatus('current') optT1E1Framing = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("e1", 0), ("e1Crc", 1), ("e1Cas", 2), ("e1CasCrc", 3), ("e1Unframed", 4), ("t1Esf", 5), ("t1D4", 6), ("t1Unframed", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1Framing.setStatus('current') optT1E1RecoverTime = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 10, 15))).clone(namedValues=NamedValues(("timeout-3-secs", 3), ("timeout-10-secs", 10), ("timeout-15-secs", 15)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1RecoverTime.setStatus('current') optT1E1EsfFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("att-54016", 0), ("ansi-t1-403", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1EsfFormat.setStatus('current') optT1E1UnusedTSs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("busy", 0), ("idle", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1UnusedTSs.setStatus('current') optT1E1CfgCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 10), LinkCmdStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1CfgCmdStatus.setStatus('current') optT1E1NationalBits = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 11), OneByteField()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1NationalBits.setStatus('current') optT1E1InterNational = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 12), OneByteField()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1InterNational.setStatus('current') opticalTUStatusTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1), ) if mibBuilder.loadTexts: opticalTUStatusTable.setStatus('current') opticalTUStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optTUStatusAddr")) if mibBuilder.loadTexts: opticalTUStatusEntry.setStatus('current') optTUStatusAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 1), LinkPortAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusAddr.setStatus('current') optTUStatusResrcId = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusResrcId.setStatus('current') optTUStatusLinkState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2, 8, 32, 64, 2048, 4096, 65535, 2097152, 4194304, 8388608, 6291456, 1073741824, 2147483647))).clone(namedValues=NamedValues(("ok", 0), ("yel", 2), ("ais", 8), ("lof", 32), ("los", 64), ("red", 2048), ("cfa", 4096), ("oos", 65535), ("txSlip", 2097152), ("rxSlip", 4194304), ("sef", 8388608), ("slip", 6291456), ("underTest", 1073741824), ("errors", 2147483647)))).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusLinkState.setStatus('current') optTUStatusErrSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusErrSecs.setStatus('current') optTUStatusAisErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusAisErrs.setStatus('current') optTUStatusLopErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusLopErrs.setStatus('current') optTUStatusRdiTUErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusRdiTUErrs.setStatus('current') optTUStatusRfiTUErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusRfiTUErrs.setStatus('current') optTUStatusPSLMErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusPSLMErrs.setStatus('current') optTUStatusPSLUErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusPSLUErrs.setStatus('current') optTUStatusErrFreeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusErrFreeSecs.setStatus('current') opticalMapperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2), ) if mibBuilder.loadTexts: opticalMapperStatusTable.setStatus('current') opticalMapperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optMapperStatusAddr")) if mibBuilder.loadTexts: opticalMapperStatusEntry.setStatus('current') optMapperStatusAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 1), LinkPortAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperStatusAddr.setStatus('current') optMapperStatusResrcId = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperStatusResrcId.setStatus('current') optMapperState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2, 8, 16, 32, 64, 128, 2048, 4096, 65535, 2097152, 4194304, 8388608, 6291456, 1073741824, 2147483647))).clone(namedValues=NamedValues(("ok", 0), ("yel", 2), ("ais", 8), ("lop", 16), ("lof", 32), ("los", 64), ("rdi", 128), ("red", 2048), ("cfa", 4096), ("oos", 65535), ("txSlip", 2097152), ("rxSlip", 4194304), ("sef", 8388608), ("slip", 6291456), ("underTest", 1073741824), ("errors", 2147483647)))).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperState.setStatus('current') optMapperErrSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperErrSecs.setStatus('current') optMapperErrFreeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperErrFreeSecs.setStatus('current') optMapperLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 3))).clone(namedValues=NamedValues(("off", 0), ("local", 1), ("line", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optMapperLoop.setStatus('current') optMapperPathLOPErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperPathLOPErrs.setStatus('current') optMapperPathAISErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperPathAISErrs.setStatus('current') optMapperPathRDIErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperPathRDIErrs.setStatus('current') optMapperCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 14, 101, 114, 200, 202, 206, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("updateTest", 1), ("clearErrors", 14), ("update-successful", 101), ("clear-successful", 114), ("err-general-test-error", 200), ("err-invalid-loop-type", 202), ("err-field-cannot-be-set", 206), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optMapperCmdStatus.setStatus('current') opticalTransportStatusTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3), ) if mibBuilder.loadTexts: opticalTransportStatusTable.setStatus('current') opticalTransportStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optTransportStatusAddr")) if mibBuilder.loadTexts: opticalTransportStatusEntry.setStatus('current') optTransportStatusAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 1), NestSlotAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportStatusAddr.setStatus('current') optTransportStatusResrcId = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportStatusResrcId.setStatus('current') optTransportLaserState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optTransportLaserState.setStatus('current') optTransportErrSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportErrSecs.setStatus('current') optTransportErrFreeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportErrFreeSecs.setStatus('current') optTransportLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("off", 0), ("terminal", 1), ("facility", 2), ("pathFacility", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optTransportLoop.setStatus('current') optTransportLineAISErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineAISErrs.setStatus('current') optTransportLineRDIErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineRDIErrs.setStatus('current') optTransportLineOOFErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineOOFErrs.setStatus('current') optTransportLineLOFErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineLOFErrs.setStatus('current') optTransportLineLOSErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineLOSErrs.setStatus('current') optTransportCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 14, 101, 114, 400, 402, 406, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("updateTest", 1), ("clearErrors", 14), ("update-successful", 101), ("clear-successful", 114), ("err-general-test-error", 400), ("err-invalid-loop-type", 402), ("err-field-cannot-be-set", 406), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optTransportCmdStatus.setStatus('current') dnxStm1Oc3Enterprise = ObjectIdentity((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0)) if mibBuilder.loadTexts: dnxStm1Oc3Enterprise.setStatus('current') optDevConfigTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0, 1)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-STM1-OC3-MIB", "optDevCfgAddr"), ("ERI-DNX-STM1-OC3-MIB", "optDevCmdStatus")) if mibBuilder.loadTexts: optDevConfigTrap.setStatus('current') optT1E1ConfigTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0, 2)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-STM1-OC3-MIB", "optT1E1CfgLinkAddr"), ("ERI-DNX-STM1-OC3-MIB", "optT1E1CfgCmdStatus")) if mibBuilder.loadTexts: optT1E1ConfigTrap.setStatus('current') mibBuilder.exportSymbols("ERI-DNX-STM1-OC3-MIB", optTransportLineLOFErrs=optTransportLineLOFErrs, dnxStm1Oc3=dnxStm1Oc3, optDevCmdStatus=optDevCmdStatus, optTransportErrSecs=optTransportErrSecs, opticalConfig=opticalConfig, optTUStatusRdiTUErrs=optTUStatusRdiTUErrs, optT1E1CfgLinkAddr=optT1E1CfgLinkAddr, optT1E1CfgLinkName=optT1E1CfgLinkName, optTUStatusLopErrs=optTUStatusLopErrs, optMapperPathAISErrs=optMapperPathAISErrs, opticalTUStatusTable=opticalTUStatusTable, optT1E1Clear=optT1E1Clear, optTransportErrFreeSecs=optTransportErrFreeSecs, optTUStatusErrSecs=optTUStatusErrSecs, optTransportLineAISErrs=optTransportLineAISErrs, optTransportLineOOFErrs=optTransportLineOOFErrs, optTransportLaserState=optTransportLaserState, optT1E1ConfigTrap=optT1E1ConfigTrap, opticalDiag=opticalDiag, optDevPayload1=optDevPayload1, optTUStatusPSLMErrs=optTUStatusPSLMErrs, optDevPayload3=optDevPayload3, optMapperStatusResrcId=optMapperStatusResrcId, optMapperCmdStatus=optMapperCmdStatus, optT1E1CfgCmdStatus=optT1E1CfgCmdStatus, optT1E1Framing=optT1E1Framing, optT1E1EsfFormat=optT1E1EsfFormat, optTUStatusPSLUErrs=optTUStatusPSLUErrs, optDevCfgAddr=optDevCfgAddr, optTUStatusErrFreeSecs=optTUStatusErrFreeSecs, optTransportStatusAddr=optTransportStatusAddr, optTransportLineLOSErrs=optTransportLineLOSErrs, PYSNMP_MODULE_ID=eriDNXStm1Oc3MIB, optDevType=optDevType, optTUStatusResrcId=optTUStatusResrcId, opticalMapperStatusEntry=opticalMapperStatusEntry, optMapperStatusAddr=optMapperStatusAddr, dnxStm1Oc3Enterprise=dnxStm1Oc3Enterprise, optT1E1NationalBits=optT1E1NationalBits, optDevTsAlloc=optDevTsAlloc, optT1E1UnusedTSs=optT1E1UnusedTSs, optT1E1InterNational=optT1E1InterNational, optT1E1LinkConfigTable=optT1E1LinkConfigTable, optTransportStatusResrcId=optTransportStatusResrcId, optLineTiming=optLineTiming, optTUStatusRfiTUErrs=optTUStatusRfiTUErrs, optT1E1Status=optT1E1Status, optTUStatusLinkState=optTUStatusLinkState, optTransportLineRDIErrs=optTransportLineRDIErrs, opticalDevConfigTable=opticalDevConfigTable, optTUStatusAddr=optTUStatusAddr, optDevCfgResource=optDevCfgResource, optTransportCmdStatus=optTransportCmdStatus, optDevPayload2=optDevPayload2, opticalTransportStatusTable=opticalTransportStatusTable, optDevMultiplexMode=optDevMultiplexMode, optDevAssignedToNest=optDevAssignedToNest, optMapperState=optMapperState, eriDNXStm1Oc3MIB=eriDNXStm1Oc3MIB, optMapperPathRDIErrs=optMapperPathRDIErrs, opticalDevConfigEntry=opticalDevConfigEntry, opticalTUStatusEntry=opticalTUStatusEntry, optTUStatusAisErrs=optTUStatusAisErrs, optT1E1RecoverTime=optT1E1RecoverTime, optMapperLoop=optMapperLoop, PayLoadGroupType=PayLoadGroupType, opticalMapperStatusTable=opticalMapperStatusTable, optMapperErrFreeSecs=optMapperErrFreeSecs, optDevConfigTrap=optDevConfigTrap, opticalTransportStatusEntry=opticalTransportStatusEntry, optMapperErrSecs=optMapperErrSecs, optTransportLoop=optTransportLoop, optT1E1CfgResource=optT1E1CfgResource, optMapperPathLOPErrs=optMapperPathLOPErrs, optT1E1LinkConfigEntry=optT1E1LinkConfigEntry)
140.664671
3,029
0.73956
2,852
23,491
6.090813
0.12237
0.009096
0.012607
0.01681
0.478902
0.432215
0.390133
0.379944
0.309366
0.275977
0
0.107093
0.087736
23,491
166
3,030
141.512048
0.7035
0.014218
0
0
0
0
0.142604
0.030543
0
0
0
0
0
1
0
false
0
0.050633
0
0.075949
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
7a99d2ba28872d2f46045a3c2e2c450c01ffae29
764
py
Python
user.py
moha-abdul/password-locker
beb86c31ae68d3992c38f9ed5cc67949129681b7
[ "Unlicense" ]
null
null
null
user.py
moha-abdul/password-locker
beb86c31ae68d3992c38f9ed5cc67949129681b7
[ "Unlicense" ]
null
null
null
user.py
moha-abdul/password-locker
beb86c31ae68d3992c38f9ed5cc67949129681b7
[ "Unlicense" ]
null
null
null
class User: user = [] ''' this class creates new instance of user data ''' def __init__(self, username, password): ''' init method to define objects Args: username: to ask user a username password: to either generate or ask user for a password ''' self.username = username self.password = password def new_user(self): ''' Method that appends a user ''' User.user.append(self) def save_user(self): ''' Method that saves a new user ''' User.user.append(self) def delete_user(self): ''' Method that deletes a user ''' User.user.remove(self)
23.151515
67
0.51178
84
764
4.571429
0.380952
0.145833
0.109375
0.140625
0.130208
0.130208
0
0
0
0
0
0
0.400524
764
33
68
23.151515
0.838428
0.282723
0
0.181818
0
0
0
0
0
0
0
0
0
1
0.363636
false
0.181818
0
0
0.545455
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
7a9b7be2e00919a5a7f2488a71f4d9e960701bb6
1,056
py
Python
data/utils.py
ispc-lab/HRegNet2
2d57dd3f8d6537c76cfbe726b1a02bba134a6635
[ "MIT" ]
2
2022-01-10T12:43:32.000Z
2022-01-15T22:48:27.000Z
data/utils.py
ispc-lab/HRegNet2
2d57dd3f8d6537c76cfbe726b1a02bba134a6635
[ "MIT" ]
null
null
null
data/utils.py
ispc-lab/HRegNet2
2d57dd3f8d6537c76cfbe726b1a02bba134a6635
[ "MIT" ]
null
null
null
import numpy as np from scipy.spatial.transform import Rotation def generate_rand_rotm(x_lim=5.0, y_lim=5.0, z_lim=180.0): ''' Input: x_lim y_lim z_lim return: rotm: [3,3] ''' rand_z = np.random.uniform(low=-z_lim, high=z_lim) rand_y = np.random.uniform(low=-y_lim, high=y_lim) rand_x = np.random.uniform(low=-x_lim, high=x_lim) rand_eul = np.array([rand_z, rand_y, rand_x]) r = Rotation.from_euler('zyx', rand_eul, degrees=True) rotm = r.as_matrix() return rotm def generate_rand_trans(x_lim=10.0, y_lim=1.0, z_lim=0.1): ''' Input: x_lim y_lim z_lim return: trans [3] ''' rand_x = np.random.uniform(low=-x_lim, high=x_lim) rand_y = np.random.uniform(low=-y_lim, high=y_lim) rand_z = np.random.uniform(low=-z_lim, high=z_lim) rand_trans = np.array([rand_x, rand_y, rand_z]) return rand_trans def apply_transform(pts, trans): R = trans[:3, :3] T = trans[:3, 3] pts = pts @ R.T + T return pts
24.55814
58
0.608902
187
1,056
3.187166
0.219251
0.053691
0.151007
0.181208
0.442953
0.442953
0.442953
0.442953
0.365772
0.365772
0
0.027813
0.250947
1,056
43
59
24.55814
0.725664
0.112689
0
0.285714
1
0
0.00346
0
0
0
0
0
0
1
0.142857
false
0
0.095238
0
0.380952
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
7a9f29d4c28ef96fe5291ef0cf54304402c9e392
105
py
Python
ACM ICPC/Math/gcd/gcd.py
shreejitverma/GeeksforGeeks
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-18T05:14:28.000Z
2022-03-08T07:00:08.000Z
ACM ICPC/Math/gcd/gcd.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
6
2022-01-13T04:31:04.000Z
2022-03-12T01:06:16.000Z
ACM ICPC/Math/gcd/gcd.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-14T19:53:53.000Z
2022-02-18T05:14:30.000Z
def gcd(a,b): if a==0: return b else: return gcd(b%a,a) c = gcd(100,35) # c = 5 print(c)
11.666667
23
0.495238
23
105
2.26087
0.565217
0
0
0
0
0
0
0
0
0
0
0.097222
0.314286
105
8
24
13.125
0.625
0.047619
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.428571
0.142857
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
8f862996b8ebaab6ec0ed52da781f6162c2e80f3
2,014
py
Python
time_series_detector/algorithm/prophetTest.py
js00070/Metis
075b3adb971c9af97e097ff7b05a3c6ad6277afa
[ "Apache-2.0" ]
4
2020-05-26T11:31:45.000Z
2022-01-19T10:55:23.000Z
time_series_detector/algorithm/prophetTest.py
msq0313/Metis
2e5b14763611d951eb2e08adaf3cf208e9bcbba2
[ "Apache-2.0" ]
null
null
null
time_series_detector/algorithm/prophetTest.py
msq0313/Metis
2e5b14763611d951eb2e08adaf3cf208e9bcbba2
[ "Apache-2.0" ]
3
2020-06-13T16:48:59.000Z
2020-06-18T13:59:21.000Z
# coding=utf-8 from time_series_detector.algorithm.prophet import predict # 示例数据 # l = [2,1,4,7,4,8,3,6,4,8] l = [660, 719, 649, 674, 672, 683, 679, 642, 758, 777, 731, 791, 776, 692, 724, 665, 698, 644, 691, 651, 710, 650, 576, 591, 589, 639, 655, 620, 678, 619, 620, 608, 604, 618, 598, 617, 584, 542, 584, 625, 548, 575, 607, 570, 555, 630, 571, 536, 547, 501, 518, 522, 496, 526, 526, 499, 527, 488, 479, 454, 541, 541, 501, 546, 523, 584, 538, 554, 540, 501, 541, 486, 551, 507, 571, 644, 534, 508, 544, 484, 502, 573, 551, 543, 546, 554, 560, 573, 493, 536, 548, 508, 488, 475, 531, 515, 520, 477, 547, 573, 546, 504, 537, 520, 524, 551, 515, 468, 548, 555, 564, 579, 542, 535, 573, 635, 594, 475, 484, 539, 520, 516, 542, 522, 519, 507, 550, 528, 525, 500, 467, 525, 591, 551, 536, 640, 590, 575, 516, 546, 630, 656, 556, 579, 556, 606, 574, 544, 603, 607, 667, 666, 571, 533, 489, 536, 552, 522, 599, 569, 581, 565, 552, 581, 621, 614, 642, 562, 559, 635, 680, 622, 591, 655, 642, 648, 633, 626, 627, 717, 737, 637, 630, 606, 698, 635, 652, 611, 700, 727, 670, 695, 682, 735, 684, 674, 673, 664, 783, 672, 702, 697, 636, 595, 690, 686, 750, 652, 677, 702, 704, 689, 734, 769, 756, 737, 672, 694, 678, 792, 687, 717, 712, 718, 744, 690, 672, 708, 707, 708, 717, 750, 679, 728, 916, 874, 814, 850, 754, 770, 711, 670, 699, 679, 694, 677, 714, 691, 652, 694, 685, 685, 716, 672, 681, 677, 709, 676, 670, 638, 710, 734, 774, 694, 732, 741, 725, 787, 750, 720, 747, 746, 800, 755, 759, 748, 750, 763, 720, 746, 792, 708, 739, 678, 665, 686, 791, 745, 742, 736, 720, 786, 727, 700, 732, 725, 735, 753, 685, 712, 732, 669, 709, 709, 688, 717, 750, 703, 738, 742, 691, 687, 694, 820, 753, 708, 749, 778, 737, 647, 690, 764, 811, 727, 721, 727, 658, 694, 738, 803, 759, 674, 766, 746, 730, 746, 700, 720, 747, 702, 721, 654, 699, 714, 742, 789, 740, 763, 709, 707, 797, 650, 719, 672, 741, 672, 703, 709, 686, 664, 776] print(predict(l))
83.916667
119
0.583416
388
2,014
3.023196
0.600515
0.00341
0
0
0
0
0
0
0
0
0
0.700833
0.224926
2,014
23
120
87.565217
0.050609
0.021351
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.055556
0
0.055556
0.055556
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
8f887e1d200af4c4aea0ba320dc42d9b1fd77883
664
py
Python
backend/fief/schemas/user.py
fief-dev/fief
cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1
[ "MIT" ]
1
2022-02-13T17:39:42.000Z
2022-02-13T17:39:42.000Z
backend/fief/schemas/user.py
fief-dev/fief
cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1
[ "MIT" ]
1
2022-02-13T14:46:24.000Z
2022-02-13T14:46:24.000Z
backend/fief/schemas/user.py
fief-dev/fief
cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1
[ "MIT" ]
null
null
null
from typing import Any, Dict from fastapi_users import models from pydantic import UUID4 from fief.schemas.tenant import TenantEmbedded class User(models.BaseUser): tenant_id: UUID4 class UserCreate(models.BaseUserCreate): pass class UserCreateInternal(UserCreate): """ Utility model so that we can hook into the logic of UserManager.create and add some attributes before persisting into database. """ tenant_id: UUID4 class UserUpdate(models.BaseUserUpdate): pass class UserDB(User, models.BaseUserDB): tenant_id: UUID4 class UserRead(User): tenant: TenantEmbedded class Config: orm_mode = True
17.025641
74
0.736446
82
664
5.902439
0.621951
0.049587
0.080579
0.11157
0
0
0
0
0
0
0
0.007561
0.203313
664
38
75
17.473684
0.907372
0.191265
0
0.277778
0
0
0
0
0
0
0
0
0
1
0
false
0.111111
0.222222
0
0.833333
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
8f9b91040f4086b89565d801abb5e2f4eb9bcf60
7,768
py
Python
RNAPuzzles/RNAPuzzles/settings.py
whinyadventure/RNA-Puzzles
bbd147e1a0748a77b5e3424a93ad57bb430b5a0e
[ "Apache-2.0" ]
null
null
null
RNAPuzzles/RNAPuzzles/settings.py
whinyadventure/RNA-Puzzles
bbd147e1a0748a77b5e3424a93ad57bb430b5a0e
[ "Apache-2.0" ]
26
2019-10-08T11:11:25.000Z
2022-03-12T00:52:30.000Z
RNAPuzzles/RNAPuzzles/settings.py
whinyadventure/RNA-Puzzles
bbd147e1a0748a77b5e3424a93ad57bb430b5a0e
[ "Apache-2.0" ]
1
2020-05-11T18:51:04.000Z
2020-05-11T18:51:04.000Z
""" Django settings for RNAPuzzles project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.getenv("SECRET_KEY", 'm7$0i2x2oqv%#gi5!6j*&k^sg5@djo(2f0!j^#*upn!+v-k7vy') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.getenv("DEBUG", "False") == "True" ALLOWED_HOSTS = ["127.0.0.1", "django-service"] LOGOUT_REDIRECT_URL = '/' DOMAIN_URL = "lepus.cs.put.poznan.pl" LOGIN_URL = "/accounts/signin/" # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'martor', 'crispy_forms', 'guardian', 'publications', 'captcha', 'tempus_dominus', 'rnapuzzles', ] CRISPY_TEMPLATE_PACK = 'bootstrap4' AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', # default 'guardian.backends.ObjectPermissionBackend', ) ANONYMOUS_USER_NAME = "AnonymousUser@foo.foo" MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'rnapuzzles.middleware.request.GuardianAuthenticationMiddleware', ] ROOT_URLCONF = 'RNAPuzzles.urls' TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, "rnapuzzles/templates")], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'RNAPuzzles.wsgi.application' AUTH_USER_MODEL = 'rnapuzzles.CustomUser' if os.getenv("EMAIL_HOST_USER") and os.getenv("EMAIL_HOST_PASSWORD"): EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER",False) EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD",False) else: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' from django.contrib.messages import constants as messages MESSAGE_TAGS = { messages.DEBUG: 'alert-info', messages.INFO: 'alert-info', messages.SUCCESS: 'alert-success', messages.WARNING: 'alert-warning', messages.ERROR: 'alert-danger', } # Database # https://docs.djangoproject.com/en/2.2/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.getenv("DB_NAME", 'rna'), 'USER': os.getenv("DB_USER",'postgres'), 'PASSWORD': os.getenv("DB_PASSWORD",'password'), 'HOST': os.getenv("DB_HOST", 'localhost'), 'PORT': os.getenv("DB_PORT", '5432'), } } # Password validation # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/2.2/topics/i18n/ #LANGUAGE_CODE = 'en-GB' TIME_ZONE = 'CET' #USE_I18N = True USE_L10N = False USE_TZ = True DATETIME_FORMAT = 'd M Y, H:i ' DATETIME_INPUT_FORMATS = ['%d-%m-%Y %H:%M'] TEMPUS_DOMINUS_LOCALIZE = False TEMPUS_DOMINUS_INCLUDE_ASSETS = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) STATIC_URL = '/static/' STATIC_ROOT = "/var/www/html/"#os.path.join(PROJECT_ROOT, 'static') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_SUBMISSIONS = "submissions" STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) STATICFILES_DIRS = ( os.path.join(BASE_DIR, "rnapuzzles/static"), ) # Global martor settings # Input: string boolean, `true/false` MARTOR_ENABLE_CONFIGS = { 'imgur': 'false', # to enable/disable imgur/custom uploader. 'mention': 'false', # to enable/disable mention 'jquery': 'true', # to include/revoke jquery (require for admin default django) 'living': 'false', # to enable/disable live updates in preview 'spellcheck': 'true', } # To setup the martor editor with label or not (default is False) MARTOR_ENABLE_LABEL = True # Imgur API Keys MARTOR_IMGUR_CLIENT_ID = 'your-client-id' MARTOR_IMGUR_API_KEY = 'your-api-key' # Safe Mode MARTOR_MARKDOWN_SAFE_MODE = True # default # Markdownify MARTOR_MARKDOWNIFY_FUNCTION = 'martor.utils.markdownify' # default MARTOR_MARKDOWNIFY_URL = '/martor/markdownify/' # default # Markdown extensions (default) MARTOR_MARKDOWN_EXTENSIONS = [ 'markdown.extensions.extra', 'markdown.extensions.nl2br', 'markdown.extensions.smarty', 'markdown.extensions.fenced_code', # Custom markdown extensions. 'martor.extensions.urlize', 'martor.extensions.del_ins', # ~~strikethrough~~ and ++underscores++ 'martor.extensions.mention', # to parse markdown mention 'martor.extensions.emoji', # to parse markdown emoji 'martor.extensions.mdx_video', # to parse embed/iframe video ] # Markdown Extensions Configs MARTOR_MARKDOWN_EXTENSION_CONFIGS = {} # Markdown urls MARTOR_UPLOAD_URL = '/martor/uploader/' # default MARTOR_SEARCH_USERS_URL = '/martor/search-user/' # default # Markdown Extensions # MARTOR_MARKDOWN_BASE_EMOJI_URL = 'https://www.webfx.com/tools/emoji-cheat-sheet/graphics/emojis/' # from webfx MARTOR_MARKDOWN_BASE_EMOJI_URL = 'https://github.githubassets.com/images/icons/emoji/' # default from github MARTOR_MARKDOWN_BASE_MENTION_URL = 'https://python.web.id/author/' SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error'] # RabbitMq CELERY_BROKER_URL = 'amqp://{user}:{password}@{host}:{port}'.format( host=os.getenv('RABBITMQ_HOST', 'localhost'), port=os.getenv('RABBITMQ_PORT', '5672'), user=os.getenv("RABBITMQ_USER", "user"), password=os.getenv("RABBITMQ_PASSWORD", "password") ) CELERY_ACCEPT_CONTENT = ['application/json'] CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json'
29.876923
125
0.71344
908
7,768
5.936123
0.352423
0.048237
0.025232
0.032468
0.160297
0.125232
0.072171
0.049536
0.022263
0
0
0.007872
0.149588
7,768
259
126
29.992278
0.808053
0.242019
0
0
1
0.006211
0.479081
0.31773
0
0
0
0
0
1
0
false
0.062112
0.012422
0
0.012422
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
1
0
0
0
0
0
2
8fb6151f8473873009e64e794c0e0795e70255f9
635
py
Python
stacks/remove_duplicate_letters.py
elenaborisova/A2SV-interview-prep
02b7166a96d22221cd6adaedf14f845537f0752d
[ "MIT" ]
null
null
null
stacks/remove_duplicate_letters.py
elenaborisova/A2SV-interview-prep
02b7166a96d22221cd6adaedf14f845537f0752d
[ "MIT" ]
null
null
null
stacks/remove_duplicate_letters.py
elenaborisova/A2SV-interview-prep
02b7166a96d22221cd6adaedf14f845537f0752d
[ "MIT" ]
null
null
null
from collections import Counter # Time: O(n); Space: O(n) def remove_duplicate_letters(s): counter = Counter(s) stack = [] visited = set() for char in s: counter[char] -= 1 if char not in stack: while stack and ord(stack[-1]) > ord(char) and counter[stack[-1]] > 0: visited.remove(stack.pop()) stack.append(char) visited.add(char) return ''.join(stack) # Test cases: print(remove_duplicate_letters('bcabc')) print(remove_duplicate_letters('cbacdcbc')) print(remove_duplicate_letters('bbcaac')) print(remove_duplicate_letters('bbbacacca'))
22.678571
82
0.631496
81
635
4.82716
0.469136
0.191816
0.28133
0.276215
0
0
0
0
0
0
0
0.008247
0.23622
635
27
83
23.518519
0.797938
0.055118
0
0
0
0
0.046901
0
0
0
0
0
0
1
0.058824
false
0
0.058824
0
0.176471
0.235294
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
8fd37361367b86f58b5fa2a138b0a4b967b2ddd9
3,444
py
Python
tests/unit/test_api_requestor.py
adyaksaw/xendit-python
47b05f2a6582104a274dc12a172c6421de86febc
[ "MIT" ]
10
2020-10-31T23:34:34.000Z
2022-03-08T19:08:55.000Z
tests/unit/test_api_requestor.py
adyaksaw/xendit-python
47b05f2a6582104a274dc12a172c6421de86febc
[ "MIT" ]
22
2020-07-30T14:25:07.000Z
2022-03-31T03:55:46.000Z
tests/unit/test_api_requestor.py
adyaksaw/xendit-python
47b05f2a6582104a274dc12a172c6421de86febc
[ "MIT" ]
11
2020-07-28T08:09:40.000Z
2022-03-18T00:14:02.000Z
import base64 import json import pytest import requests import responses import xendit from xendit._api_requestor import _APIRequestor def generate_auth(api_key): auth_pair = api_key + ":" auth_base64 = base64.b64encode(auth_pair.encode()) return f'Basic {auth_base64.decode("utf-8")}' def substitute_callback(request): resp_body = {"method": request.method} return (200, request.headers, json.dumps(resp_body)) @pytest.fixture def default_params(): api_key = "test-123" base_url = "https://mock-url.xendit.co" section = "/balance" http_client = requests url = base_url + section custom_headers = { "X-IDEMPOTENCY-KEY": "key-123", "for-user-id": "id-123", } return api_key, base_url, section, http_client, url, custom_headers @responses.activate def test_get_call_get_method(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="GET", url=url, callback=substitute_callback) _APIRequestor.get( section, api_key=api_key, base_url=base_url, http_client=http_client, ) @responses.activate def test_post_call_post_method(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="POST", url=url, callback=substitute_callback) _APIRequestor.post( section, api_key=api_key, base_url=base_url, http_client=http_client, ) @responses.activate def test_patch_call_patch_method(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="PATCH", url=url, callback=substitute_callback) _APIRequestor.patch( section, api_key=api_key, base_url=base_url, http_client=http_client, ) @responses.activate def test_request_send_correct_params_on_given_params(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="GET", url=url, callback=substitute_callback) xendit_response = _APIRequestor._request( "GET", section, api_key=api_key, base_url=base_url, http_client=http_client, ) assert xendit_response.headers["Authorization"] == generate_auth(api_key) @responses.activate def test_request_send_default_config_on_empty_params(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params xendit.api_key = api_key xendit.base_url = base_url responses.add_callback(method="GET", url=url, callback=substitute_callback) xendit_response = _APIRequestor._request("GET", section, http_client=http_client,) assert xendit_response.headers["Authorization"] == generate_auth(api_key) @responses.activate def test_request_header_have_custom_header_when_inserted(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="POST", url=url, callback=substitute_callback) xendit_response = _APIRequestor._request( "POST", section, api_key=api_key, base_url=base_url, http_client=http_client, headers=custom_headers, ) assert ( xendit_response.headers["X-IDEMPOTENCY-KEY"] == custom_headers["X-IDEMPOTENCY-KEY"] ) assert xendit_response.headers["for-user-id"] == custom_headers["for-user-id"]
31.59633
86
0.744193
454
3,444
5.286344
0.15859
0.06
0.05
0.065
0.6825
0.659167
0.624583
0.624583
0.624583
0.610833
0
0.007909
0.155633
3,444
108
87
31.888889
0.8174
0
0
0.3
1
0
0.069396
0.00842
0
0
0
0
0.05
1
0.1125
false
0
0.0875
0
0.2375
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8fd8cac542cdcb04a7b7676fbf1f1800ad109166
628
py
Python
apps/contrib/views/errors.py
vicobits/django-wise
3fdc01eabdff459b31e016f9f6d1cafc19c5a292
[ "MIT" ]
5
2020-04-11T20:11:48.000Z
2021-03-16T23:58:01.000Z
apps/contrib/views/errors.py
victoraguilarc/django-wise
3fdc01eabdff459b31e016f9f6d1cafc19c5a292
[ "MIT" ]
5
2020-04-11T20:17:56.000Z
2021-06-16T19:18:29.000Z
apps/contrib/views/errors.py
victoraguilarc/django-wise
3fdc01eabdff459b31e016f9f6d1cafc19c5a292
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.shortcuts import render def error400(request, exc=None): """Renders default template for bad request errors.""" return render(request, 'errors/400.html', {}) def error403(request, exc=None): """Renders default template for forbidden errors.""" return render(request, 'errors/403.html', {}) def error404(request, exc=None): """Renders default template for not found errors.""" return render(request, 'errors/404.html', {}) def error500(request, exc=None): """Renders default template for server errors.""" return render(request, 'errors/500.html', {})
26.166667
58
0.678344
78
628
5.461538
0.410256
0.152582
0.131455
0.197183
0.657277
0.366197
0.366197
0
0
0
0
0.04771
0.165605
628
23
59
27.304348
0.765267
0.332803
0
0
0
0
0.150754
0
0
0
0
0
0
1
0.444444
false
0
0.111111
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
8fdb8d3c986bc35ecb4147d35407db5904d86300
228
py
Python
homeassistant/components/cpuspeed/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/cpuspeed/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/cpuspeed/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Constants for the CPU Speed integration.""" import logging from typing import Final from homeassistant.const import Platform DOMAIN: Final = "cpuspeed" PLATFORMS = [Platform.SENSOR] LOGGER = logging.getLogger(__package__)
20.727273
46
0.785088
27
228
6.481481
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.127193
228
10
47
22.8
0.879397
0.175439
0
0
0
0
0.043956
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
1
0
0
0
0
2
8fe1f2783c0a96e495a54ef18571e89f1f966342
350
py
Python
portal/migrations/versions/8ecdd6381235_.py
ivan-c/truenth-portal
0b9d39ae43f42ea3413ed9634f295f5d856cbc77
[ "BSD-3-Clause" ]
3
2017-01-15T10:11:57.000Z
2018-10-02T23:46:44.000Z
portal/migrations/versions/8ecdd6381235_.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
876
2016-04-04T20:45:11.000Z
2019-02-28T00:10:36.000Z
portal/migrations/versions/8ecdd6381235_.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
9
2016-04-13T01:18:55.000Z
2018-09-19T20:44:23.000Z
from alembic import op import sqlalchemy as sa """empty message Revision ID: 8ecdd6381235 Revises: ('c0ab21bc488b', 'cea9fbdd98f9') Create Date: 2017-12-19 16:31:24.963128 """ # revision identifiers, used by Alembic. revision = '8ecdd6381235' down_revision = ('c0ab21bc488b', 'cea9fbdd98f9') def upgrade(): pass def downgrade(): pass
15.217391
48
0.722857
42
350
6
0.761905
0.190476
0
0
0
0
0
0
0
0
0
0.190476
0.16
350
22
49
15.909091
0.666667
0.108571
0
0.25
0
0
0.2
0
0
0
0
0
0
1
0.25
false
0.25
0.25
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
1
0
1
0
0
0
0
0
2
8ffa4805fe4d24996eac13f6709c7f060bff5de8
171
py
Python
app.py
k2on/interlock_hub
34740cb598cea75eaa716552414a1b1b1dcbc520
[ "MIT" ]
null
null
null
app.py
k2on/interlock_hub
34740cb598cea75eaa716552414a1b1b1dcbc520
[ "MIT" ]
null
null
null
app.py
k2on/interlock_hub
34740cb598cea75eaa716552414a1b1b1dcbc520
[ "MIT" ]
null
null
null
from local_server import LocalServer server = LocalServer() if __name__ == "__main__": try: server.run() except KeyboardInterrupt: server.stop()
17.1
36
0.660819
17
171
6.117647
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.245614
171
9
37
19
0.806202
0
0
0
0
0
0.046784
0
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
64e383fa5032d3fe900f54d525b7c4f1f9919844
266
py
Python
pyphone/controllers/window_controller.py
ChrisDeadman/pyPhone
3ed2a94f6d3434135172d8706dedf1963e2ff6da
[ "MIT" ]
1
2018-12-08T21:11:28.000Z
2018-12-08T21:11:28.000Z
pyphone/controllers/window_controller.py
ChrisDeadman/pyPhone
3ed2a94f6d3434135172d8706dedf1963e2ff6da
[ "MIT" ]
1
2018-09-26T15:40:42.000Z
2018-09-26T15:40:42.000Z
pyphone/controllers/window_controller.py
ChrisDeadman/pyPhone
3ed2a94f6d3434135172d8706dedf1963e2ff6da
[ "MIT" ]
null
null
null
from pyphone.controllers.controller import Controller class WindowController(Controller): def __init__(self, panel): super().__init__(panel) panel.protocol("WM_DELETE_WINDOW", self.panel.quit) def exit(self): self.panel.destroy()
22.166667
59
0.699248
30
266
5.866667
0.633333
0.153409
0
0
0
0
0
0
0
0
0
0
0.191729
266
11
60
24.181818
0.818605
0
0
0
0
0
0.060377
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
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
64e5320715151ab6b46ff3ae04bed30713c8f91c
3,646
py
Python
src/test/cli/test_service.py
pebble/flotilla
23d9b3aefd8312879549c50e52ea73f3e3f493be
[ "MIT" ]
5
2016-01-01T15:50:21.000Z
2018-11-27T17:38:15.000Z
src/test/cli/test_service.py
pebble/flotilla
23d9b3aefd8312879549c50e52ea73f3e3f493be
[ "MIT" ]
27
2015-12-17T07:49:56.000Z
2018-07-13T15:06:33.000Z
src/test/cli/test_service.py
pebble/flotilla
23d9b3aefd8312879549c50e52ea73f3e3f493be
[ "MIT" ]
7
2015-12-01T22:04:24.000Z
2021-11-28T13:21:35.000Z
import unittest from mock import patch from click import BadParameter from flotilla.cli.service import configure_service, get_updates, \ validate_health_check ENVIRONMENT = 'develop' REGIONS = ('us-east-1', 'us-west-2') SERVICE = 'test' ELB_SCHEME = 'internal' DNS = 'test.test.com' HEALTH_CHECK = 'HTTP:9200/' INSTANCE_TYPE = 't2.nano' NO_PROVISION = True INSTANCE_MIN = 1 INSTANCE_MAX = 2 KMS_KEY = '5901dc99-0a0e-480a-a67f-559347ff2c64' COREOS_CHANNEL = 'alpha' COREOS_VERSION = 'current' class TestService(unittest.TestCase): def test_get_updates_noop(self): updates = get_updates(None, None, None, None, None, None, None, None, None, None, (), ()) self.assertEquals(len(updates), 0) def test_get_updates_basic(self): updates = get_updates(ELB_SCHEME, DNS, HEALTH_CHECK, INSTANCE_TYPE, NO_PROVISION, INSTANCE_MIN, INSTANCE_MAX, KMS_KEY, COREOS_CHANNEL, COREOS_VERSION, None, None) self.assertEquals(len(updates), 10) def test_get_updates_public_ports(self): updates = get_updates(None, None, None, None, None, None, None, None, None, None, ('80-http', '9200-http'), None) self.assertEquals(len(updates), 1) ports = updates['public_ports'] self.assertEquals(len(ports), 2) self.assertEquals(ports[80], 'HTTP') self.assertEquals(ports[9200], 'HTTP') def test_get_updates_public_ports_invalid(self): updates = get_updates(None, None, None, None, None, None, None, None, None, None, ('swag',), None) self.assertEquals(len(updates), 0) def test_get_updates_private_ports(self): updates = get_updates(None, None, None, None, None, None, None, None, None, None, None, ('9300-tcp',)) self.assertEquals(len(updates), 1) ports = updates['private_ports'] self.assertEquals(len(ports), 1) self.assertEquals(ports[9300], ['TCP']) def test_get_updates_private_ports_invalid(self): updates = get_updates(None, None, None, None, None, None, None, None, None, None, None, ('swag',)) self.assertEquals(len(updates), 0) @patch('flotilla.cli.service.DynamoDbTables') @patch('boto.dynamodb2.connect_to_region') @patch('boto.kms.connect_to_region') def test_configure_service(self, kms, dynamo, tables): configure_service(ENVIRONMENT, REGIONS, SERVICE, {}) self.assertEquals(kms.call_count, len(REGIONS)) self.assertEquals(dynamo.call_count, len(REGIONS)) def test_validate_health_check_invalid(self): self.assert_invalid_health_check('10') def test_validate_health_check_badproto(self): self.assert_invalid_health_check('WS:443/') def test_validate_health_check_no_path(self): self.assert_invalid_health_check('HTTP:80') def test_validate_health_check_tcp(self): health_check = validate_health_check(None, None, 'TCP:6379') self.assertEquals('TCP:6379', health_check) def test_validate_health_check_http(self): health_check = validate_health_check(None, None, 'HTTP:80/ping') self.assertEquals('HTTP:80/ping', health_check) def test_validate_health_check_empty(self): health_check = validate_health_check(None, None, None) self.assertEquals(None, health_check) def assert_invalid_health_check(self, check): self.assertRaises(BadParameter, validate_health_check, None, None, check)
38.378947
80
0.66045
448
3,646
5.120536
0.205357
0.18483
0.224935
0.258065
0.510898
0.406277
0.316042
0.249782
0.194856
0.194856
0
0.028369
0.22655
3,646
94
81
38.787234
0.785106
0
0
0.131579
0
0
0.091059
0.035381
0
0
0
0
0.276316
1
0.184211
false
0
0.052632
0
0.25
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
64e701f498be06fcdfc73118c5c7938559253a92
417
py
Python
aleph/migrate/versions/e1d41654e85b_remove_event_log.py
jalmquist/aleph
28a56bc7edd77dbd7910c94dac40916032edc177
[ "MIT" ]
7
2020-02-18T14:35:10.000Z
2020-03-09T22:53:10.000Z
aleph/migrate/versions/e1d41654e85b_remove_event_log.py
heartofstone/aleph
d66b6615d2bfa10c291c63754f53b468de8bebde
[ "MIT" ]
4
2021-09-08T02:07:35.000Z
2022-03-12T00:33:46.000Z
aleph/migrate/versions/e1d41654e85b_remove_event_log.py
heartofstone/aleph
d66b6615d2bfa10c291c63754f53b468de8bebde
[ "MIT" ]
null
null
null
"""remove event log Revision ID: e1d41654e85b Revises: ea39c04daca4 Create Date: 2018-03-07 15:33:34.299841 """ from alembic import op # revision identifiers, used by Alembic. revision = 'e1d41654e85b' down_revision = 'ea39c04daca4' def upgrade(): op.drop_constraint('event_log_role_id_fkey', 'event_log', type_='foreignkey') op.drop_table('event_log') def downgrade(): pass
18.130435
55
0.697842
53
417
5.301887
0.679245
0.113879
0
0
0
0
0
0
0
0
0
0.136499
0.191847
417
22
56
18.954545
0.697329
0.347722
0
0
0
0
0.280303
0.083333
0
0
0
0
0
1
0.222222
false
0.111111
0.111111
0
0.333333
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
8f0bf1d45acc446c49257d9c78f307dc90413dc6
524
py
Python
NFCow/restaurants/models.py
jojoriveraa/titulacion-NFCOW
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
[ "Apache-2.0" ]
null
null
null
NFCow/restaurants/models.py
jojoriveraa/titulacion-NFCOW
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
[ "Apache-2.0" ]
11
2016-01-09T06:27:02.000Z
2016-01-10T05:21:05.000Z
NFCow/restaurants/models.py
jojoriveraa/titulacion-NFCOW
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
[ "Apache-2.0" ]
null
null
null
from django.db import models from categories.models import Category # Create your models here. class Restaurant(models.Model): name = models.CharField(max_length = 255) image = models.ImageField(upload_to = 'restaurants') categories = models.ManyToManyField('categories.Category', blank = True, related_name = 'restaurants_category',) def img(self): return """ <img src="%s" height="42"> """ % self.image.url img.allow_tags = True img.admin_order_field = 'image' def __str__(self): return self.name
26.2
113
0.725191
68
524
5.426471
0.617647
0.086721
0
0
0
0
0
0
0
0
0
0.011236
0.150763
524
20
114
26.2
0.817978
0.045802
0
0
0
0
0.178357
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
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
0
1
1
0
0
2
8f1d349bdb955362e0fa85de342d1667c1101a6a
1,052
py
Python
teams/api/views/teams_views.py
Onlynfk/Freshdesk-CRM-Platform
67137af09f7daf6fa2d19a9e70d573548137c9db
[ "MIT" ]
null
null
null
teams/api/views/teams_views.py
Onlynfk/Freshdesk-CRM-Platform
67137af09f7daf6fa2d19a9e70d573548137c9db
[ "MIT" ]
null
null
null
teams/api/views/teams_views.py
Onlynfk/Freshdesk-CRM-Platform
67137af09f7daf6fa2d19a9e70d573548137c9db
[ "MIT" ]
null
null
null
from rest_framework import generics from rest_framework.permissions import IsAuthenticated from teams.api.serializers.teams_serializers import TeamSerializer from teams.models import Teams class TeamAPIList(generics.ListAPIView): permission_classes = [IsAuthenticated] queryset = Teams.objects.all().order_by('-created_on') serializer_class = TeamSerializer class CreateTeam(generics.CreateAPIView): permission_classes = [IsAuthenticated] queryset = Teams.objects.all() serializer_class = TeamSerializer class UpdateTeam(generics.UpdateAPIView): permission_classes = [IsAuthenticated] queryset = Teams.objects.all() serializer_class = TeamSerializer class RetrieveTeam(generics.RetrieveAPIView): permission_classes = [IsAuthenticated] queryset = Teams.objects.all() serializer_class = TeamSerializer class DestroyTeam(generics.DestroyAPIView): permission_classes = [IsAuthenticated] queryset = Teams.objects.all() serializer_class = TeamSerializer
30.057143
67
0.761407
98
1,052
8.020408
0.336735
0.108142
0.203562
0.254453
0.516539
0.516539
0.516539
0.446565
0.446565
0.446565
0
0
0.16635
1,052
34
68
30.941176
0.896237
0
0
0.583333
0
0
0.010806
0
0
0
0
0
0
1
0
false
0
0.166667
0
1
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
8f1e244d3868aac3c29c10b406ad39fd7e07a952
740
py
Python
src/Data/DataSetSeparate.py
maeotaku/leaf_recognition_sdk
c00a0eb744f7eb73d58dfa84f0bbde42dc990259
[ "MIT" ]
2
2016-06-05T04:01:46.000Z
2017-07-06T16:13:14.000Z
src/Data/DataSetSeparate.py
maeotaku/leaf_recognition_sdk
c00a0eb744f7eb73d58dfa84f0bbde42dc990259
[ "MIT" ]
null
null
null
src/Data/DataSetSeparate.py
maeotaku/leaf_recognition_sdk
c00a0eb744f7eb73d58dfa84f0bbde42dc990259
[ "MIT" ]
null
null
null
import random import Constants as C from Files import * from Search.Label import Label from DataSetBase import DataSetBase class DataSetSeparate(DataSetBase): def __init__(self,): DataSetBase.__init__(self) def load(self, ht, trainingPath, testingPath): DataSetBase.load(self, ht, trainingPath, self.trainingData, self.trainingLabels) DataSetBase.load(self, ht, testingPath, self.testingData, self.testingLabels) ''' def AllvsAll(self): aux = self.testingData + self.trainingData self.testingData = aux self.trainingData = aux aux = self.testingLabels + self.trainingLabels self.testingLabels = aux self.trainingLabels = aux '''
28.461538
88
0.681081
76
740
6.526316
0.328947
0.056452
0.060484
0.08871
0
0
0
0
0
0
0
0
0.236486
740
26
89
28.461538
0.877876
0
0
0
0
0
0
0
0
0
0
0
0
1
0.181818
false
0
0.454545
0
0.727273
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
8f20b48d8e1f6df061ac5a826a19772fbf278092
13,535
py
Python
pysnmp/WIRELESS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/WIRELESS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/WIRELESS-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 WIRELESS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WIRELESS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:29:45 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, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") Timeticks, = mibBuilder.importSymbols("RFC1155-SMI", "Timeticks") MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("RFC1212", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") enterprises, iso, Integer32, TimeTicks, Gauge32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Unsigned32, Counter64, MibIdentifier, IpAddress, Bits, NotificationType, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "enterprises", "iso", "Integer32", "TimeTicks", "Gauge32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Unsigned32", "Counter64", "MibIdentifier", "IpAddress", "Bits", "NotificationType", "Counter32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") class MacAddress(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6) fixedLength = 6 ibm = MibIdentifier((1, 3, 6, 1, 4, 1, 2)) ibmProd = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6)) ibmwlan = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 10)) wrBase = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 10, 1)) wrRemote = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 10, 2)) baseName = MibScalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseName.setStatus('mandatory') baseNetworkName = MibScalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseNetworkName.setStatus('mandatory') baseAdminIPAddr = MibScalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseAdminIPAddr.setStatus('mandatory') wrBaseTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4), ) if mibBuilder.loadTexts: wrBaseTable.setStatus('mandatory') wrBaseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1), ).setIndexNames((0, "WIRELESS-MIB", "baseIfIndex")) if mibBuilder.loadTexts: wrBaseEntry.setStatus('mandatory') baseIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseIfIndex.setStatus('mandatory') baseHDLCaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 2), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseHDLCaddress.setStatus('mandatory') baseNbOFRemote = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseNbOFRemote.setStatus('mandatory') baseCellIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseCellIdentifier.setStatus('mandatory') baseAdapterStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("operational", 1), ("not-operational", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: baseAdapterStatus.setStatus('mandatory') baseEmittedPower = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseEmittedPower.setStatus('mandatory') baseControllerCardDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseControllerCardDesc.setStatus('mandatory') baseUnivAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 8), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseUnivAddress.setStatus('mandatory') baseModemDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseModemDesc.setStatus('mandatory') baseTopologyTrapActive = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: baseTopologyTrapActive.setStatus('mandatory') wrBaseStatsTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5), ) if mibBuilder.loadTexts: wrBaseStatsTable.setStatus('mandatory') wrBaseStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1), ).setIndexNames((0, "WIRELESS-MIB", "baseStatsIfIndex")) if mibBuilder.loadTexts: wrBaseStatsEntry.setStatus('mandatory') baseStatsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsIfIndex.setStatus('mandatory') baseStatsXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsXmit.setStatus('mandatory') baseStatsRxmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsRxmit.setStatus('mandatory') baseStatsNegAckRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNegAckRcv.setStatus('mandatory') baseStatsRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsRcv.setStatus('mandatory') baseStatsLineErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsLineErrors.setStatus('mandatory') baseStatsNegAckXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNegAckXmit.setStatus('mandatory') baseStatsFramePurged = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsFramePurged.setStatus('mandatory') baseStatsFreqDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsFreqDelete.setStatus('mandatory') baseStatsHopAdvance = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsHopAdvance.setStatus('mandatory') baseStatsCLineErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsCLineErrors.setStatus('mandatory') baseStatsRcvICRFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsRcvICRFrame.setStatus('mandatory') baseStatsXmitICRFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsXmitICRFrame.setStatus('mandatory') baseStatsNoICRBufferAvail = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNoICRBufferAvail.setStatus('mandatory') baseStatsNotRoutedICRFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNotRoutedICRFrame.setStatus('mandatory') baseStatsNbCUserEst = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNbCUserEst.setStatus('mandatory') wrRemoteTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1), ) if mibBuilder.loadTexts: wrRemoteTable.setStatus('mandatory') wrRemoteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1), ).setIndexNames((0, "WIRELESS-MIB", "remIfIndex"), (0, "WIRELESS-MIB", "remIndex")) if mibBuilder.loadTexts: wrRemoteEntry.setStatus('mandatory') remIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remIfIndex.setStatus('mandatory') remIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remIndex.setStatus('mandatory') remMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: remMacAddress.setStatus('mandatory') remName = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: remName.setStatus('mandatory') remControllerCardDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: remControllerCardDesc.setStatus('mandatory') remUnivAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 6), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: remUnivAddress.setStatus('mandatory') remModemDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: remModemDesc.setStatus('mandatory') wrRemoteStatsTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2), ) if mibBuilder.loadTexts: wrRemoteStatsTable.setStatus('mandatory') wrRemStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1), ).setIndexNames((0, "WIRELESS-MIB", "remStatsIfIndex"), (0, "WIRELESS-MIB", "remStatsIndex")) if mibBuilder.loadTexts: wrRemStatsEntry.setStatus('mandatory') remStatsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsIfIndex.setStatus('mandatory') remStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsIndex.setStatus('mandatory') remStatsXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsXmit.setStatus('mandatory') remStatsRxmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsRxmit.setStatus('mandatory') remStatsNegAckRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsNegAckRcv.setStatus('mandatory') remStatsRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsRcv.setStatus('mandatory') remStatsLineErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsLineErrors.setStatus('mandatory') remStatsNegAckXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsNegAckXmit.setStatus('mandatory') mibBuilder.exportSymbols("WIRELESS-MIB", baseAdapterStatus=baseAdapterStatus, remIfIndex=remIfIndex, wrBaseStatsEntry=wrBaseStatsEntry, baseHDLCaddress=baseHDLCaddress, baseControllerCardDesc=baseControllerCardDesc, remStatsIfIndex=remStatsIfIndex, MacAddress=MacAddress, baseNbOFRemote=baseNbOFRemote, remStatsIndex=remStatsIndex, baseStatsFramePurged=baseStatsFramePurged, wrRemote=wrRemote, baseUnivAddress=baseUnivAddress, wrBaseEntry=wrBaseEntry, baseStatsNoICRBufferAvail=baseStatsNoICRBufferAvail, baseStatsNegAckRcv=baseStatsNegAckRcv, baseStatsHopAdvance=baseStatsHopAdvance, baseStatsNbCUserEst=baseStatsNbCUserEst, remUnivAddress=remUnivAddress, wrRemoteStatsTable=wrRemoteStatsTable, baseStatsXmit=baseStatsXmit, remStatsRxmit=remStatsRxmit, baseStatsCLineErrors=baseStatsCLineErrors, remStatsLineErrors=remStatsLineErrors, baseStatsRcvICRFrame=baseStatsRcvICRFrame, baseNetworkName=baseNetworkName, baseCellIdentifier=baseCellIdentifier, baseStatsRcv=baseStatsRcv, baseIfIndex=baseIfIndex, baseTopologyTrapActive=baseTopologyTrapActive, baseAdminIPAddr=baseAdminIPAddr, baseStatsNegAckXmit=baseStatsNegAckXmit, baseModemDesc=baseModemDesc, baseStatsLineErrors=baseStatsLineErrors, ibmwlan=ibmwlan, wrRemStatsEntry=wrRemStatsEntry, remControllerCardDesc=remControllerCardDesc, wrRemoteEntry=wrRemoteEntry, remIndex=remIndex, baseStatsFreqDelete=baseStatsFreqDelete, remMacAddress=remMacAddress, remName=remName, baseStatsXmitICRFrame=baseStatsXmitICRFrame, baseStatsIfIndex=baseStatsIfIndex, wrRemoteTable=wrRemoteTable, baseName=baseName, wrBaseTable=wrBaseTable, baseStatsNotRoutedICRFrame=baseStatsNotRoutedICRFrame, baseStatsRxmit=baseStatsRxmit, remModemDesc=remModemDesc, baseEmittedPower=baseEmittedPower, remStatsNegAckRcv=remStatsNegAckRcv, ibmProd=ibmProd, ibm=ibm, remStatsXmit=remStatsXmit, remStatsRcv=remStatsRcv, remStatsNegAckXmit=remStatsNegAckXmit, wrBase=wrBase, wrBaseStatsTable=wrBaseStatsTable)
104.115385
1,928
0.748726
1,611
13,535
6.290503
0.108628
0.014407
0.02013
0.022893
0.4403
0.394711
0.298697
0.298697
0.195283
0.193211
0
0.075175
0.09287
13,535
129
1,929
104.922481
0.750204
0.023495
0
0
0
0
0.116445
0.003331
0
0
0
0
0
1
0
false
0
0.066116
0
0.090909
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
8f32a2add0ba3fafe0a315a2ea55b9e43832de98
806
py
Python
scripts/run_flake8.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
null
null
null
scripts/run_flake8.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
null
null
null
scripts/run_flake8.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
null
null
null
"""The flake8 command execution script. This is used by the deploying job mainly. Command example: $ python ./scripts/run_flake8.py """ import sys from logging import Logger sys.path.append('./') import scripts.command_util as command_util from apysc._console import loggers from scripts.apply_lints_and_build_docs import FLAKE8_COMMAND logger: Logger = loggers.get_info_logger() def _main() -> None: """ Run the flake8 command. Raises ------ Exception If command standard out is not blank. """ logger.info('flake8 command started.') stdout: str = command_util.run_command(command=FLAKE8_COMMAND) if stdout != '': raise Exception('There are flake8 errors or warning.') if __name__ == '__main__': _main()
21.783784
70
0.671216
101
806
5.118812
0.554455
0.125725
0.061896
0
0
0
0
0
0
0
0
0.011309
0.23201
806
36
71
22.388889
0.82391
0.272953
0
0
0
0
0.132813
0
0
0
0
0
0
1
0.071429
true
0
0.357143
0
0.428571
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
8f35ec22d4dc4e0fb498ed2a3d70c6f345a2d5c7
1,251
py
Python
src/mmgroup/tests/spaces/rep_aux.py
Martin-Seysen/mmgroup
6acd566f1079e7e27eec76352477fbba39eeb65f
[ "MIT" ]
14
2020-07-10T20:12:05.000Z
2022-03-10T13:46:59.000Z
src/mmgroup/tests/spaces/rep_aux.py
Martin-Seysen/mmgroup
6acd566f1079e7e27eec76352477fbba39eeb65f
[ "MIT" ]
1
2022-03-09T07:05:04.000Z
2022-03-18T20:17:11.000Z
src/mmgroup/tests/spaces/rep_aux.py
Martin-Seysen/mmgroup
6acd566f1079e7e27eec76352477fbba39eeb65f
[ "MIT" ]
1
2022-02-07T21:08:00.000Z
2022-02-07T21:08:00.000Z
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals """Auxilary functions for group representations""" import numpy as np def sgn(s): """return (-1)**(s)""" return 1 - ((s & 1) << 1) def zero_vector(length, *data): """Return zero numpy vector of given length and type np.int32""" return np.zeros(length, dtype = np.int32) #234567890123456789012345678901234567890123456789012345678901234567890 def pm_mat_from_function(f, l): """Create an l times l matrix from a function f. The returned matrix m has entries m[i,j] = (-1)**f(i,j), i, j = 0,...,l-1. It is a numpy array of shape (l,l) and type np.int32. """ a = np.zeros((l,l), dtype = np.int32) for i in range(l): for j in range(l): a[i,j] = 1 - 2 * (f(i,j) & 1) return a def pm_diag_from_function(f, l): """Create an l times l diagonal matrix from a function f. The returned matrix m has entries m[i,i] = (-1)**f(i), i = 0,...,l-1, and zero entries for i != j. It is a numpy array of shape (l,l) and type np.int32. """ a = np.zeros((l,l), dtype = np.int32) for i in range(l): a[i,i] = 1 - 2 * (f(i) & 1) return a
26.617021
70
0.605915
210
1,251
3.52381
0.285714
0.056757
0.036486
0.056757
0.424324
0.408108
0.408108
0.408108
0.408108
0.32973
0
0.103412
0.2502
1,251
46
71
27.195652
0.685501
0.429257
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.166667
0
0.611111
0.055556
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
8f39f3bee2279cb60ac86234ccf4902b0ed18423
300
py
Python
config.py
jlgoh/labeldat
057248a22c7f022110d712dbcb61befd40e62760
[ "MIT" ]
1
2021-09-07T06:34:54.000Z
2021-09-07T06:34:54.000Z
config.py
wilsonteng97/labeldat
bdca5df0af55bdd460807808861de25d762b28da
[ "MIT" ]
5
2021-09-08T02:44:59.000Z
2022-02-27T10:55:29.000Z
config.py
wilsonteng97/labeldat
bdca5df0af55bdd460807808861de25d762b28da
[ "MIT" ]
1
2020-12-31T11:03:39.000Z
2020-12-31T11:03:39.000Z
# DB Config from dotenv import load_dotenv load_dotenv() USER = "root" PASSWORD = "toor" HOST = "localhost" PORT = "3306" SCHEMA = "ase" # Config for AWS Server # USER = "ase_db" # PASSWORD = "labeldatdb" # HOST = "ase.c7htgranr5o5.ap-southeast-1.rds.amazonaws.com" # PORT = "3306" # SCHEMA = "ase"
18.75
60
0.683333
41
300
4.926829
0.658537
0.09901
0.138614
0.168317
0
0
0
0
0
0
0
0.047809
0.163333
300
16
61
18.75
0.756972
0.53
0
0
0
0
0.179104
0
0
0
0
0
0
1
0
false
0.142857
0.142857
0
0.142857
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
0
1
0
0
0
0
0
2
8f3ea7a73a34c6140262bf19ff23d9631523ffa8
2,680
py
Python
bin/kraken_parser.py
avantonder/bacQC
6882b66ac60947b0792c64f26d18ff7897cbf624
[ "MIT" ]
null
null
null
bin/kraken_parser.py
avantonder/bacQC
6882b66ac60947b0792c64f26d18ff7897cbf624
[ "MIT" ]
null
null
null
bin/kraken_parser.py
avantonder/bacQC
6882b66ac60947b0792c64f26d18ff7897cbf624
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os, argparse, sys, subprocess, glob import pandas as pd import numpy as np kraken_report_files = sorted(glob.glob('*.kraken2.report.txt')) species_abundance_files = sorted(glob.glob('*_output_species_abundance.txt')) kraken_report_df = [pd.read_csv(f, sep='\t', header=None) for f in kraken_report_files] kraken_report_df_filtered = [i.head(1).iloc[:,[5,1]] for i in kraken_report_df] species_abundance_df = [pd.read_csv(f, sep='\t') for f in species_abundance_files] species_abundance_names = [i.replace('_output_species_abundance.txt', '') for i in species_abundance_files] for a,b in zip(kraken_report_df_filtered, species_abundance_names): a.rename(columns = {5: 'name', 1: b}, inplace=True) for a,b in zip(species_abundance_df, species_abundance_names): a.rename(columns = {'new_est_reads': b, 'fraction_total_reads': b + '_frac'}, inplace=True) species_abundance_df_filtered = [i.iloc[:,[0,5]] for i in species_abundance_df] species_abundance_joined = pd.concat([i.set_index('name') for i in species_abundance_df_filtered], axis=1).reset_index() species_abundance_joined.rename(columns = {'index': 'name'}, inplace=True) kraken_report_joined = pd.concat([i.set_index('name') for i in kraken_report_df_filtered], axis=1).reset_index() species_abundance_unclassified = species_abundance_joined.append(kraken_report_joined, ignore_index=True) species_abundance_unclassified.fillna(0, inplace=True) for column in species_abundance_unclassified.columns[1:]: species_abundance_unclassified[column + '_freq'] = species_abundance_unclassified[column] / species_abundance_unclassified[column].sum() * 100 species_abundance_unclassified_filtered = pd.concat([species_abundance_unclassified['name'], species_abundance_unclassified.filter(like='_freq')], axis=1) species_abundance_unclassified_filtered['Max_value'] = species_abundance_unclassified_filtered.filter(like='_freq').max(axis=1) species_abundance_unclassified_filtered = species_abundance_unclassified_filtered[(species_abundance_unclassified_filtered['Max_value'] >= 5)] total = 100 - species_abundance_unclassified_filtered.filter(like='_freq').apply(np.sum) total['name'] = 'other' final_abundance = species_abundance_unclassified_filtered.append(pd.DataFrame(total.values, index=total.keys()).T, ignore_index=True) final_abundance_sorted = pd.concat([final_abundance['name'], final_abundance.filter(like = '_freq')], axis = 1) final_abundance_sorted.columns = final_abundance_sorted.columns.str.replace('_freq', '') final_abundance_tsv_name = 'Bracken_species_composition.tsv' final_abundance_sorted.T.to_csv(final_abundance_tsv_name, sep = '\t', header = False)
46.206897
154
0.798881
382
2,680
5.243456
0.227749
0.255617
0.223665
0.143784
0.370944
0.295557
0.193709
0.127808
0.032951
0.032951
0
0.008885
0.076119
2,680
58
155
46.206897
0.800081
0.007463
0
0
0
0
0.090226
0.033835
0
0
0
0
0
1
0
false
0
0.096774
0
0.096774
0
0
0
0
null
1
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
8f43d3497cb41d701d3581b0dffa15c4040203f6
830
py
Python
test/utils.py
hls4ml-testing/hls4ml
0956116c3419cbf349a67f119c5faa8a136ae57a
[ "Apache-2.0" ]
null
null
null
test/utils.py
hls4ml-testing/hls4ml
0956116c3419cbf349a67f119c5faa8a136ae57a
[ "Apache-2.0" ]
null
null
null
test/utils.py
hls4ml-testing/hls4ml
0956116c3419cbf349a67f119c5faa8a136ae57a
[ "Apache-2.0" ]
null
null
null
import hls4ml from qkeras import * __all__=['_accuracy','_output_shape','_layer_number','_alpha'] def _accuracy(prediction1,prediction2,percent): prediction1=prediction1[0] c=[] for i in range(len(prediction2)): if prediction1[i]==prediction2[i]: c.append(0) else: c.append(np.abs(prediction2[i] - prediction1[i]) * 100 /prediction1[i]) return np.average(c)<percent def _output_shape(prediction1,prediction2): return len(prediction1[0])==len(prediction2) def _layer_number(model,hls_model): return len(model.layers) + 1 == len(hls_model.get_layers()) def _alpha(model,hls_model): return (list(hls_model.get_layers())[1].attributes['class_name'] == model.layers[1].__class__.__name__) & (list(hls_model.get_layers())[2].attributes['class_name'] == 'Alpha')
33.2
179
0.692771
109
830
4.963303
0.366972
0.073937
0.060998
0.09427
0.077634
0
0
0
0
0
0
0.035361
0.148193
830
25
179
33.2
0.729844
0
0
0
0
0
0.079422
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.166667
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
1
0
0
0
2
8f55f681b9c9e8af9bccb352f80ef02badeb5540
575
py
Python
messenger/users/models.py
dvalentina/2019-2-Track-Backend-V-Danilova
42a05b286aadc5d05160ba91f6760edca3ddcfb9
[ "MIT" ]
null
null
null
messenger/users/models.py
dvalentina/2019-2-Track-Backend-V-Danilova
42a05b286aadc5d05160ba91f6760edca3ddcfb9
[ "MIT" ]
27
2020-03-11T10:08:08.000Z
2022-03-12T00:13:21.000Z
messenger/users/models.py
dvalentina/2019-2-Track-Backend-V-Danilova
42a05b286aadc5d05160ba91f6760edca3ddcfb9
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractUser class User(AbstractUser): class Meta: verbose_name = 'пользователь' verbose_name_plural = 'пользователи' username = models.CharField(max_length=32, verbose_name='пользователь') name = models.CharField(max_length=32, verbose_name='имя пользователя', default='some name') nick = models.CharField(max_length=16, verbose_name='никнейм пользователя', default='some nick') avatar = models.TextField(verbose_name='аватар пользователя', default='some avatar')
44.230769
100
0.749565
69
575
6.101449
0.449275
0.15677
0.128266
0.171021
0.175772
0.175772
0.175772
0
0
0
0
0.01222
0.146087
575
13
101
44.230769
0.845214
0
0
0
0
0
0.208333
0
0
0
0
0
0
1
0
false
0
0.2
0
0.8
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
0
0
0
0
1
0
0
2
8f577455f1907a1308ec7b5911eef62a8b40cfef
3,476
py
Python
rhapsody2gmusic.py
judsonmitchell/rhapsody2gmusic
e1f932108c9479a340db524a912a37e255bdbc39
[ "MIT" ]
null
null
null
rhapsody2gmusic.py
judsonmitchell/rhapsody2gmusic
e1f932108c9479a340db524a912a37e255bdbc39
[ "MIT" ]
null
null
null
rhapsody2gmusic.py
judsonmitchell/rhapsody2gmusic
e1f932108c9479a340db524a912a37e255bdbc39
[ "MIT" ]
null
null
null
""" rhapsody2gmusic.py Converts a Rhapsody playlist to a Google Music playlist Requires gmusicapi >= 7.0.0-dev and Beautiful Soup Required inputs: email - Google Music email for an All Access account password - Google Music password android_device_id - an android device id, 16 hex digits rhapsody_url - the url of the playlist as provided by the Rhapsody social sharing options, e.g http://www.rhapsody.com/playlist/mp.145164964 """ __author__ = 'Judson Mitchell' __email__ = 'judsonmitchell@gmail.com' __version__ = '0.0.1' from gmusicapi import Mobileclient, Musicmanager from operator import itemgetter import json import urllib2 import string from bs4 import BeautifulSoup from getpass import getpass import sys def parse_config(): config = {} try: with open(".config") as f: lines = f.readlines() for i in lines: words = i.split() if words[0] == 'email': config['email'] = words[1] elif words[0] == 'password': config['password'] = i.split(' ',1)[1] elif words[0] == 'android_device_id': config['android_device_id'] = i.split(' ',1)[1].strip() if 'password' not in config: # If Password not in Config, ask for it config['password'] = getpass() except IOError: print "Can't find .config file" return False return config config = parse_config() if not config: config = {} config['email'] = raw_input('email:') config['password'] = getpass() config['android_device_id'] = raw_input('your android device id:') # Ask for shareable URL of playlist, e.g.http://www.rhapsody.com/playlist/mp.145164964 rhapsody_url = raw_input('URL of your rhapsody playlist:') page = urllib2.urlopen(rhapsody_url).read() soup = BeautifulSoup(page, 'html.parser') if not soup.find('h1', {'id': 'page-name'}): print 'Playlist not found' sys.exit() name = soup.find('h1', {'id': 'page-name'}).text playlist_name = name.strip("\r\n") links = soup.select('ul#playlist-tracks li') queries = [] for link in links: #attempt to remove crap like (2007 Remastered LP Version) bad_parens = link['track_name'].rfind('(') if bad_parens > 1: #so, at least not at beginning of name track_name = link['track_name'][:bad_parens] else: track_name = link['track_name'] q = link['artist_name'] + ' ' + track_name queries.append(q) #Now Google mc = Mobileclient() mc.login(config['email'], config['password'], config['android_device_id']) hits = 0 misses = 0 track_ids = [] failed_queries = [] for q in queries: search = mc.search_all_access(q, max_results=5) g_songs = search['song_hits'] if any(g_songs): sort_by_score = sorted(g_songs, key=itemgetter('score'), reverse=True) #print sort_by_score[0]['track']['storeId'] track_ids.append(sort_by_score[0]['track']['storeId']) hits += 1 else: misses += 1 failed_queries.append(q) print 'Hits: {0} Misses: {1}'.format(hits,misses) if misses > 0: print 'Unable to find a Google Music match for these tracks:' print failed_queries playlist_id = mc.create_playlist(playlist_name) mc.add_songs_to_playlist(playlist_id, track_ids) print 'Playlist "{}" successfully added to Google Music with {} songs'.format(playlist_name, hits)
31.889908
98
0.643556
469
3,476
4.624733
0.356077
0.041955
0.048409
0.029046
0.116183
0.076533
0.035961
0.035961
0.035961
0
0
0.020638
0.233314
3,476
108
99
32.185185
0.793246
0.076812
0
0.077922
0
0
0.205166
0.008856
0
0
0
0
0
0
null
null
0.090909
0.103896
null
null
0.077922
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
8f624404f71f95f4769ea0c919b541768b94f1c4
1,436
py
Python
gilt/util.py
aellerton/gilt-python
a57e7f8f3af5eecb994cabdcd9fb4866c2a3af20
[ "Apache-2.0" ]
1
2017-04-25T09:10:30.000Z
2017-04-25T09:10:30.000Z
gilt/util.py
aellerton/gilt-python
a57e7f8f3af5eecb994cabdcd9fb4866c2a3af20
[ "Apache-2.0" ]
1
2016-11-26T02:31:14.000Z
2016-11-27T07:23:53.000Z
gilt/util.py
aellerton/gilt-python
a57e7f8f3af5eecb994cabdcd9fb4866c2a3af20
[ "Apache-2.0" ]
null
null
null
from textwrap import TextWrapper def print_sale_details(sale): """Convenience method to print sale details to console. Nothing special here, just makes samples easier to read. """ wrap = TextWrapper(initial_indent=' ', subsequent_indent=' ', width=80) print "Sale: \"%s\"" % sale.name print if sale.description: print '\n'.join(wrap.wrap(sale.description)) print print " Begins: %s" % sale.begins print " Ends: %s" % sale.ends print " Duration: %s" % (sale.ends-sale.begins) print print " Products:" if sale.products: print " %d products in this sale." % len(sale.products) for product in sale.products[0:3]: print " %s" % product n = len(sale.products)-3 if n>0: print " ... %d more" % n else: print " This sale has no products." print print " Media set:" print " %d resolution(s): %s" % ( len(sale.image_urls), ', '.join(["%s x %s" % (w,h) for (w,h) in sale.image_urls.image_sizes]) ) image_size = sale.image_urls.image_sizes[0] image_list = sale.image_urls.image_list(image_size) print " %d x %d: %d image(s)" % (image_size[0], image_size[1], len(image_list)) for image in image_list: print " %s" % image.url print def by_sale_name(a, b): return cmp(a.sale, b.sale) def by_sale_begins(a, b): return cmp(a.begins, b.begins) def by_sale_ends(a, b): return cmp(a.ends, b.ends)
27.615385
84
0.623955
219
1,436
3.981735
0.30137
0.022936
0.059633
0.061927
0.094037
0
0
0
0
0
0
0.008152
0.231198
1,436
51
85
28.156863
0.781703
0
0
0.125
0
0
0.169582
0
0
0
0
0
0
0
null
null
0
0.025
null
null
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
1
0
0
0
0
0
0
1
0
2
8f62f5e62a2688d4e4bea6993465a6f9240e33ea
668
py
Python
project/apps/adjudication/migrations/0002_auto_20190914_0836.py
dbinetti/barberscore
13c3d8193834bd2bb79922e28d3f5ab1675bdffd
[ "BSD-2-Clause" ]
13
2017-08-07T15:45:49.000Z
2019-07-03T13:58:50.000Z
project/apps/adjudication/migrations/0002_auto_20190914_0836.py
barberscore/barberscore-api
2aa9f8598c18c28ba1d4a294f76fd055619f803e
[ "BSD-2-Clause" ]
309
2017-07-14T02:34:12.000Z
2022-01-14T21:37:02.000Z
project/apps/adjudication/migrations/0002_auto_20190914_0836.py
dbinetti/barberscore-django
16fbd9945becda0a765bbdf52ad459a63655128f
[ "BSD-2-Clause" ]
5
2017-08-07T14:01:07.000Z
2019-06-24T19:44:55.000Z
# Generated by Django 2.2.5 on 2019-09-14 15:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('adjudication', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='appearance', name='representing', ), migrations.RemoveField( model_name='panelist', name='representing', ), migrations.AlterField( model_name='panelist', name='district', field=models.CharField(blank=True, default='', help_text='\n District', max_length=10), ), ]
24.740741
110
0.561377
61
668
6.04918
0.688525
0.073171
0.140921
0.162602
0
0
0
0
0
0
0
0.046256
0.320359
668
26
111
25.692308
0.76652
0.067365
0
0.45
1
0
0.167472
0
0
0
0
0
0
1
0
false
0
0.05
0
0.2
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
8f66a2d77adaf40f0e5258673ab8b25945e10caf
233
py
Python
PythonCode/MicroBit/Examples/Neopixels.py
CarterWS/Summer2020
120f8ed5e225dcbf9f469daf17a787e3f0b93417
[ "MIT" ]
null
null
null
PythonCode/MicroBit/Examples/Neopixels.py
CarterWS/Summer2020
120f8ed5e225dcbf9f469daf17a787e3f0b93417
[ "MIT" ]
null
null
null
PythonCode/MicroBit/Examples/Neopixels.py
CarterWS/Summer2020
120f8ed5e225dcbf9f469daf17a787e3f0b93417
[ "MIT" ]
11
2020-06-03T10:12:28.000Z
2020-06-05T16:02:40.000Z
import machine, neopixel, utime from microbit import * np = neopixel.NeoPixel(pin2, 10) from microbit import * np.clear() for fred in range(len(np)): np[fred] = (220,0,40) np.show() utime.sleep_ms(500) np.clear()
14.5625
32
0.656652
36
233
4.222222
0.611111
0.157895
0.236842
0.263158
0
0
0
0
0
0
0
0.064516
0.201717
233
15
33
15.533333
0.752688
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0
false
0
0.3
0
0.3
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
8f6809aacb4f2d03e9e87ceaa71d1139fb794164
659
py
Python
python/misc/max_of_all_subarrays_of_size_k.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
null
null
null
python/misc/max_of_all_subarrays_of_size_k.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
2
2022-03-10T03:49:14.000Z
2022-03-14T00:49:54.000Z
python/misc/max_of_all_subarrays_of_size_k.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Maximum of all subarrays of size k.""" from itertools import islice def maximum_of_all_subarrays(array, k: int): """Find all the maximum values of all subarrays of size k.""" maximum_of_all = [] for i in range(len(array)): subarray = list(islice(array, i, k+i)) if len(subarray) == k: maximum_of_all.append(max(subarray)) else: break return tuple(maximum_of_all) if __name__ == "__main__": print(maximum_of_all_subarrays(array=(1, 2, 3, 1, 4, 5, 2, 3, 6,), k=3)) print(maximum_of_all_subarrays( array=(8, 5, 10, 7, 9, 4, 15, 12, 90, 13,), k=4))
25.346154
76
0.608498
105
659
3.6
0.485714
0.10582
0.222222
0.222222
0.343915
0.275132
0
0
0
0
0
0.054435
0.247344
659
25
77
26.36
0.707661
0.171472
0
0
0
0
0.014953
0
0
0
0
0
0
1
0.071429
false
0
0.071429
0
0.214286
0.142857
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
8f6ba9eb219309e222fdf355e96a5bb00237d21a
9,750
py
Python
app/classes.py
MidoriRobin/comp3161-finalproject
e0676cb9cf66771c4eb9f7940133bcb3c5a8525a
[ "Apache-2.0" ]
null
null
null
app/classes.py
MidoriRobin/comp3161-finalproject
e0676cb9cf66771c4eb9f7940133bcb3c5a8525a
[ "Apache-2.0" ]
null
null
null
app/classes.py
MidoriRobin/comp3161-finalproject
e0676cb9cf66771c4eb9f7940133bcb3c5a8525a
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base from flask_login import UserMixin # from sqlalchemy import Column, Integer, String from app import db from sqlalchemy import bindparam from sqlalchemy.sql import text import datetime #engine = create_engine('sqlite:///database.db', echo=True) #db_session = scoped_session(sessionmaker(autocommit=False, # autoflush=False, # bind=engine)) #Base = declarative_base() #Base.query = db_session.query_property() # Set your classes here. class User(UserMixin): """docstring for User.""" def __init__(self, lname, fname, email, uid=None, uname=None, password=None, birth=None): self.uid = uid self.username = uname self.firstname = fname self.lastname = lname self.email = email self.age = None self.DOB = birth self.password = password # Might not be necessary here, better placed in comment class? def get_comment(self, postid): pass # Needs an update query def set_uname(self, newname): """This allows for the rewriting of the username of the user. Allows the user to change their username and carries over all changes from the front end to the database. """ self.username = newname with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("name", type_=str)) result = conn.execute() pass # Also needs an update query def set_pass(self, pname): """This allows for the rewriting of the passoword of the user. Allows the user to change their passoword and carries over all changes from the front end to the database. """ self.password = pname with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("pass", type_=str)) result = conn.execute() pass 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.uid) # python 2 support except NameError: return str(self.uid) # python 3 support @staticmethod def get(id): with db.connect() as conn: stmt = text("SELECT * FROM usr WHERE usr.u_id LIKE :id") stmt.bindparams(bindparam("id", type_=str)) result = conn.execute(stmt, {"id": id}) return result.fetchone() def __repr__(self): return '<User: %r,%r,%r,%r,%r,%r>' % (self.firstname, self.lastname, self.username, self.DOB, self.email, self.password) class Profile(): """docstring for Profile: An object to store users information regarding their Profile """ def __init__(self, p_id, uname, p_pic, bio, u_name, num_of_friends): super(Profile, self).__init__() self.profileId = p_id self.username = uname self.profilePic = p_pic self.biography = bio self.userName = u_name self.NoF = num_of_friends def set_picture(self, picture): """Allows the user to reset their profile picture. Changes the profile picture of the user and carries over all changes to the database """ pass def inc_friend(self, arg): self.NoF = self.NoF + 1 def edit_bio(self, about): self.biography = about def set_uname(self, nname): """This allows for the rewriting of the username of the user. Allows the user to change their username and carries over all changes from the front end to the database. """ pass def mname(self, arg): pass class Admin(User): """docstring for Admin.""" def __init__(self): super(Admin, self).__init__() def fetch_all_users(self, datejoined, firstname=None, lastname=None): pass #if name == None: # #A "Select *" query would go here # pass #elif: # pass def fetch_by_date(self, date, User=True, Posts=False): with db.connect() as conn: s = text("SELECT `u_id`, `lname`, `fname` FROM `usr`" "WHERE u_id BETWEEN 100000 AND 200000") result = conn.execute(s) pass def fetch_by_lname(self, lname): with db.connect() as conn: s = text("SELECT * FROM `usr`" "WHERE u_id BETWEEN 100000 AND 200000") result = conn.execute(s) pass def fetch_by_fname(self, fname): pass def fetch_by_uname(self, arg): pass def fetch_all_posts(self, arg): pass class FrontUser(User): """docstring for FrontUser.""" def __init__(self, dob, datejoined): super(FrontUser, self).__init__() self.dob = dob self.joindate = datejoined self.postLst = [] def view_friends(self): """Allows user to view all friends Makes a query to the database and fetches a list of friends, listing only ID and First and Last name """ with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() pass def add_friend(self, friendid): """Allows the user to add another user to thier friends list Adds another user to this user's list of friends, also makes a SQL insert, so changes are maintained on the database """ with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() pass def fetch_posts(self): """This fuction retrieves posts from the database. Using mySQL syntax, retrieves all the posts made by this user and stores them in an array. """ with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() return def add_post(self, content, datemade): """Allows the user to create a new post, and adds it to their list of posts. Upon creation of a new post, this post is added to the database via an insert statement, so changes are reflected """ with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() pass def get_comments(self): """This function fetches every comment ever made by the user Using mySQL syntax fetches all comments made by the user on the database and stores them in an array """ pass class Post(): """docstring for Post.""" def __init__(self, uid, content, date, pid=None, likes=0, comments=[]): self.pid = pid self.uid = uid self.content = content self.date = date self.commentLst = comments self.likes = likes def view_comments(self): with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() pass def incr_likes(self): with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() self.likes += 1 def add_comment(self, pid, uid, comment, date): return comments.append(comment(pid,uid,comment,date)) def type(self, arg): if pid == None: Type = "Photo" else: Type = "Text" return Type def __repr__(self): return '<PostID: %r>' % self.pid class BlogGroup(object): """docstring for BlogGroup.""" def __init__(self, name, posts, bid=None, members=None): super(BlogGroup, self).__init__() self.bid = bid self.bname = name self.members = members self.bposts = posts def list_members(self): """Lists all the members in this blog group""" pass def list_posts(self): with db.connect() as conn: # The SQL query goes in the text functon below # stmt = text() stmt.bindparams(bindparam("id", type_=str)) result = conn.execute() pass def add_editor(self, arg): pass def add_member(self, arg): pass def add_post(self, arg): pass class Profile(): """docstring for Profile.""" def __init__(self, arg): super(Profile, self).__init__() self.arg = arg class Comment(): """docstring for Comment.""" def __init__(self, postid, uid, content, dateMade): super(Comment, self).__init__() self.postID = postid self.uId = uid self.content = content self.date = dateMade def mname(self, arg): pass # Create tables.
27.083333
128
0.581128
1,212
9,750
4.564356
0.192244
0.020246
0.0282
0.032538
0.394975
0.338033
0.316341
0.305315
0.281453
0.266269
0
0.004425
0.327795
9,750
359
129
27.158774
0.83964
0.292308
0
0.393443
0
0
0.037945
0
0
0
0
0
0
1
0.240437
false
0.15847
0.043716
0.032787
0.387978
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
8f79f0806bcb640b32036ad6e69323fcd0f9dd30
1,361
py
Python
albow/core/ui/Screen.py
hasii2011/albow-python-3
04b9d42705b370b62f0e49d10274eebf3ac54bc1
[ "MIT" ]
6
2019-04-30T23:50:39.000Z
2019-11-04T06:15:02.000Z
albow/core/ui/Screen.py
hasii2011/albow-python-3
04b9d42705b370b62f0e49d10274eebf3ac54bc1
[ "MIT" ]
73
2019-05-12T18:43:14.000Z
2021-04-13T19:19:03.000Z
albow/core/ui/Screen.py
hasii2011/albow-python-3
04b9d42705b370b62f0e49d10274eebf3ac54bc1
[ "MIT" ]
null
null
null
from pygame.event import Event from albow.core.ui.Shell import Shell from albow.core.ui.Widget import Widget class Screen(Widget): """ Screen is an abstract base class for widgets to be uses as screens by a Shell. """ def __init__(self, shell: Shell, **kwds): """ Constructs a Screen associated with the given shell. Args: shell: The shell to associate with **kwds: """ # # Python 3 update super().__init__(shell.rect, **kwds) self.shell = shell self.center = shell.center def begin_frame(self): """Deprecated, use timer_event() instead.""" pass # # Abstract methods follow # def timer_event(self, event: Event): """ Called from the timer_event() method of the Shell when this screen is the current screen. The default implementation returns true so that a display update is performed. Args: event: """ self.begin_frame() return True def enter_screen(self): """ Called from the Shell after switching to this screen from another screen. """ pass def leave_screen(self): """ Called from the Shell before switching away from this screen to another screen. """ pass
24.303571
109
0.587068
164
1,361
4.780488
0.439024
0.040816
0.049745
0.038265
0.071429
0.071429
0
0
0
0
0
0.001101
0.332844
1,361
55
110
24.745455
0.862335
0.4482
0
0.176471
0
0
0
0
0
0
0
0
0
1
0.294118
false
0.176471
0.176471
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
1
0
1
0
0
0
0
0
2
8f7a88b8e132640dc6b329ab04d1dceb99412eb8
256
py
Python
output/models/nist_data/atomic/time/schema_instance/nistschema_sv_iv_atomic_time_max_inclusive_3_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/time/schema_instance/nistschema_sv_iv_atomic_time_max_inclusive_3_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/time/schema_instance/nistschema_sv_iv_atomic_time_max_inclusive_3_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.time.schema_instance.nistschema_sv_iv_atomic_time_max_inclusive_3_xsd.nistschema_sv_iv_atomic_time_max_inclusive_3 import NistschemaSvIvAtomicTimeMaxInclusive3 __all__ = [ "NistschemaSvIvAtomicTimeMaxInclusive3", ]
42.666667
195
0.894531
30
256
6.933333
0.633333
0.144231
0.134615
0.192308
0.355769
0.355769
0.355769
0.355769
0
0
0
0.016529
0.054688
256
5
196
51.2
0.842975
0
0
0
0
0
0.144531
0.144531
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
56b5d357e321fc4de6b8ad4adf9939643ad0e4dc
280
py
Python
RealAppAnalysis/test dump/browsers/chrome/test_jsp_trace_analyzer.py
benjaminy/Charcoal
a4117a5e373faff839a78afc5183906ae2a81445
[ "MIT" ]
4
2016-01-16T02:45:24.000Z
2017-07-19T18:14:18.000Z
RealAppAnalysis/test dump/browsers/chrome/test_jsp_trace_analyzer.py
benjaminy/Charcoal
a4117a5e373faff839a78afc5183906ae2a81445
[ "MIT" ]
null
null
null
RealAppAnalysis/test dump/browsers/chrome/test_jsp_trace_analyzer.py
benjaminy/Charcoal
a4117a5e373faff839a78afc5183906ae2a81445
[ "MIT" ]
null
null
null
import datautil import os from functools import reduce trace_profile = datautil.getJSONDataFromFile(); print(trace_profile.keys()); nodes = trace_profile["nodes"]; datautil.toTxt(nodes, "test_nodes"); start = trace_profile["startTime"]; end = trace_profile["endTime"];
25.454545
48
0.75
33
280
6.181818
0.545455
0.294118
0
0
0
0
0
0
0
0
0
0
0.121429
280
11
49
25.454545
0.829268
0
0
0
0
0
0.114391
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.111111
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
56b5e5edcc125fbebf767ef29d866c1d3de92893
16,904
py
Python
script_v1.1.4.py
jul1n/bloqueur
03c5b7a97a8585703427ce40734dca8afb841463
[ "MIT" ]
null
null
null
script_v1.1.4.py
jul1n/bloqueur
03c5b7a97a8585703427ce40734dca8afb841463
[ "MIT" ]
null
null
null
script_v1.1.4.py
jul1n/bloqueur
03c5b7a97a8585703427ce40734dca8afb841463
[ "MIT" ]
null
null
null
#charger les librairies python nécessaire import requests, time, datetime, os, shutil def get_file(site, filename): target = site try: r = requests.get(target, allow_redirects=True) open(filename, 'wb').write(r.content) return r.status_code except requests.exceptions.RequestException as e: print("File not downloaded, error: {}".format(e)) #Les petites listes < 100ko get_file('https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt', 'List-A 1.txt') get_file('https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt', 'List-A 2.txt') get_file('https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts', 'List-A 3.txt') get_file('https://v.firebog.net/hosts/static/w3kbl.txt', 'List-A 4.txt') get_file('https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt', 'List-A 5.txt') get_file('https://v.firebog.net/hosts/Easylist.txt', 'List-A 6.txt') get_file('https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext', 'List-A 7.txt') get_file('https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts', 'List-A 8.txt') get_file('https://v.firebog.net/hosts/Easyprivacy.txt', 'List-A 9.txt') get_file('https://v.firebog.net/hosts/Prigent-Ads.txt', 'List-A 10.txt') get_file('https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser', 'List-A 11.txt') get_file('https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts', 'List-A 12.txt') get_file('https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt', 'List-A 13.txt') get_file('https://osint.digitalside.it/Threat-Intel/lists/latestdomains.txt', 'List-A 14.txt') get_file('https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt', 'List-A 15.txt') get_file('https://mirror.cedia.org.ec/malwaredomains/immortal_domains.txt', 'List-A 16.txt') get_file('https://www.malwaredomainlist.com/hostslist/hosts.txt', 'List-A 17.txt') get_file('https://bitbucket.org/ethanr/dns-blacklists/raw/8575c9f96e5b4a1308f2f12394abd86d0927a4a0/bad_lists/Mandiant_APT1_Report_Appendix_D.txt', 'List-A 18.txt') get_file('https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts', 'List-A 19.txt') get_file('https://urlhaus.abuse.ch/downloads/hostfile/', 'List-A 20.txt') get_file('https://www.dshield.org/feeds/suspiciousdomains_Medium.txt', 'List-A 21.txt') get_file('https://www.dshield.org/feeds/suspiciousdomains_High.txt', 'List-A 22.txt') get_file('https://raw.githubusercontent.com/matomo-org/referrer-spam-blacklist/master/spammers.txt', 'List-A 23.txt') get_file('https://ssl.bblck.me/blacklists/hosts-file.txt', 'List-A 24.txt') get_file('https://raw.githubusercontent.com/InnoScorpio/W3C_annual_most_used_survey_blocklist/master/Top500_Domains.txt', 'List-A 25.txt') get_file('https://raw.githubusercontent.com/Spam404/lists/master/main-blacklist.txt', 'List-A 26.txt') get_file('https://raw.githubusercontent.com/anudeepND/blacklist/master/facebook.txt', 'List-A 27.txt') get_file('https://v.firebog.net/hosts/BillStearns.txt', 'List-A 28.txt') get_file('https://hosts.nfz.moe/basic/hosts', 'List-A 29.txt') get_file('https://raw.githubusercontent.com/mhhakim/pihole-blocklist/master/list.txt', 'List-A 30.txt') print("téléchargement des 30 premières listes terminé") #Les grandes listes > 100ko get_file('https://mirror1.malwaredomains.com/files/justdomains', 'List-B 1.txt') get_file('http://sysctl.org/cameleon/hosts', 'List-B 2.txt') get_file('https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt', 'List-B 3.txt') get_file('https://adaway.org/hosts.txt', 'List-B 4.txt') get_file('https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt', 'List-B 5.txt') get_file('https://phishing.army/download/phishing_army_blocklist_extended.txt', 'List-B 6.txt') get_file('https://v.firebog.net/hosts/AdguardDNS.txt', 'List-B 7.txt') get_file('https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt', 'List-B 8.txt') get_file('https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts', 'List-B 9.txt') get_file('https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt', 'List-B 10.txt') get_file('https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt', 'List-B 11.txt') get_file('https://v.firebog.net/hosts/Prigent-Malware.txt', 'List-B 12.txt') get_file('https://v.firebog.net/hosts/Shalla-mal.txt', 'List-B 13.txt') get_file('https://www.dshield.org/feeds/suspiciousdomains_Low.txt', 'List-B 14.txt') get_file('https://hostsfile.org/Downloads/hosts.txt', 'List-B 15.txt') get_file('https://raw.githubusercontent.com/vokins/yhosts/master/hosts', 'List-B 16.txt') get_file('https://winhelp2002.mvps.org/hosts.txt', 'List-B 17.txt') get_file('https://raw.githubusercontent.com/RooneyMcNibNug/pihole-stuff/master/SNAFU.txt', 'List-B 18.txt') get_file('https://hostsfile.mine.nu/hosts0.txt', 'List-B 19.txt') get_file('https://www.joewein.net/dl/bl/dom-bl-base.txt', 'List-B 20.txt') get_file('https://hostfiles.frogeye.fr/multiparty-trackers-hosts.txt', 'List-B 21.txt') get_file('https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/android-tracking.txt', 'List-B 22.txt') get_file('https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt', 'List-B 23.txt') get_file('https://v.firebog.net/hosts/Airelle-trc.txt', 'List-B 24.txt') get_file('https://raw.githubusercontent.com/HorusTeknoloji/TR-PhishingList/master/url-lists.txt', 'List-B 25.txt') get_file('https://v.firebog.net/hosts/Airelle-hrsk.txt', 'List-B 26.txt') get_file('https://raw.githubusercontent.com/chadmayfield/my-pihole-blocklists/master/lists/pi_blocklist_porn_top1m.list', 'List-B 27.txt') print("téléchargement des 27 listes suivantes terminé") #Très grande list #get_file('https://raw.githubusercontent.com/chadmayfield/my-pihole-blocklists/master/lists/pi_blocklist_porn_all.list', 'List 62.txt') #Nécessitant post-traitement # get_file('https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts', 'List 1.txt') # get_file('https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareHosts.txt', 'List 28.txt') # get_file('https://v.firebog.net/hosts/Kowabit.txt', 'List 51.txt') # get_file('https://adblock.mahakala.is', 'List 52.txt') # get_file('https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts', 'List 53.txt') # get_file('https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/AmazonFireTV.txt', 'List 58.txt') # get_file('https://someonewhocares.org/hosts/zero/hosts', 'List 64.txt') #Concaténe la liste des fichiers filenamesA = ['List-A 1.txt','List-A 2.txt','List-A 3.txt','List-A 4.txt','List-A 5.txt','List-A 6.txt','List-A 7.txt','List-A 8.txt','List-A 9.txt','List-A 10.txt', 'List-A 11.txt','List-A 12.txt','List-A 13.txt','List-A 14.txt','List-A 15.txt','List-A 16.txt','List-A 17.txt','List-A 18.txt','List-A 19.txt','List-A 20.txt', 'List-A 21.txt','List-A 22.txt','List-A 23.txt','List-A 24.txt','List-A 25.txt','List-A 26.txt','List-A 27.txt','List-A 28.txt','List-A 29.txt','List-A 30.txt'] filenamesB = ['List-B 1.txt','List-B 2.txt','List-B 3.txt','List-B 4.txt','List-B 5.txt','List-B 6.txt','List-B 7.txt','List-B 8.txt','List-B 9.txt','List-B 10.txt', 'List-B 11.txt','List-B 12.txt','List-B 13.txt','List-B 14.txt','List-B 15.txt','List-B 16.txt','List-B 17.txt','List-B 18.txt','List-B 19.txt','List-B 20.txt', 'List-B 21.txt','List-B 22.txt','List-B 23.txt','List-B 24.txt','List-B 25.txt','List-B 26.txt','List-B 27.txt'] with open('mix_A.txt', 'w') as outfile: for fname in filenamesA: with open(fname) as infile: for line in infile: outfile.write(line) print("regroupement des 30 premières listes terminé") with open('mix_B.txt', 'w') as outfile: for fname in filenamesB: with open(fname) as infile: for line in infile: outfile.write(line) print("regroupement des 27 listes suivante terminé") filenamesC = ['mix_A.txt','mix_B.txt'] with open('A+B.txt', 'w') as outfile: for fname in filenamesC: with open(fname) as infile: for line in infile: outfile.write(line) print("regroupement de toutes les listes terminé") #On supprime les caractères inutiles de Combinaison.txt with open('A+B.txt', 'r') as infile, \ open('A+B_net.txt', 'w') as outfile: data = infile.read() data = data.replace("0.0.0.0", "") data = data.replace(" ", "") data = data.replace(" ", "") data = data.replace("127.0.0.1", "") data = data.replace("www.", "") data = data.replace(" ", "") data = data.replace("::", "") data = data.replace(":", "") outfile.write(data) print("suppression des caractères inutiles terminé") #Supprime les lignes qui commencent par un commentaire import re input_file = 'A+B_net.txt' with open(input_file,"r") as f: data = f.read() data = re.sub(r'#.*', "", data) with open(input_file, "w") as f: f.write(data) print("suppression des lignes avec commentaire terminé") #Supprime les lignes contenant bad word, c'est a dire des nom de domaine très courant dans la présente liste. bad_words = ['cable.dyn.cableonline.com.mx','micpn.com','rfksrv.com','truoptik.com','braze.eu','adpredictive.net','hullapp.io','nonstoppartner.net','sendgrid.net','smartclip.net','smartology.net','xsph.ru','appdynamics.com','techtarget.com','infogix.com','insightexpressai.com','247realmedia.com','adsl.net.t-com.hr','swbell.net','sbcglobal.net','duo.carnet.hr','hsd1.tx.comcast.net','ga.comcast.net','online-metrix.net','appnexus.com','akstat.io','adreactor.com','themoneytizer.com','inmobicdn.net','ojrq.net','360safe.com','163.com','bumlam.com','heyzap.com','onesignal.com','qualtrics.com','skimlinks.com','rfihub.com','tapfiliate.com','2cnt.net','backtrace.io','2cnt.net','clickbank.net','meetrics.net','px-cloud.net','adj.st','adsservingtwig.xyz','regularimptracker.xyz','sailthru.com','pingdom.com','pubnub.com','ourtoolbar.com','intellitxt.com','re1.yahoo.com','sp1.yahoo.com','ukl.yahoo.com','scd.yahoo.com','netcabo.pt','dsl.telesp.net.br','pacbell.net','hsd1.fl.comcast.net','neoplus.adsl.tpnet.pl','broadband.hu','res.rr.com','infusionsoft.com','mscnet.com','intercom.io','xg4ken.com','fbcdn.net','ig.com.br','chartboost.com','adtelligent.com','adk2.co','adlightning.com','jivox.com','joystickinteractive.com','omniture.com','optimizely.com','scarabresearch.com','scorecardresearch.com','webtrends.com','ydigitalmedia.com','criteo.net','omtrdc.net','marketingautomation.services','footprintdns.com','mailerlite.com','akamai.net','hitbox.com','top.list.ru','top.mail.ru','wns.windows.com','fbsbx.com','51yes.com','sig-eb.me','web3000.com','adroll.com','clicktale.net','7eer.net','younetmedia.com','mangoads.vn','adnxs.com','clrstm.com','c3metrics.com','clickfunnels.com','igodigital.com','mktoresp.com','naturalbid.com','playziz.com','plista.com','taboola.com','brightedge.com','ampaign.adobe.com','apptimize.com','veinteractive.com','hoverr.media','mobileapptracking.com','kylelierman.com','is-best.net','liveadvert.com','swrve.com','mpstat.us','advertising.com','parsely.com','actonsoftware.com','news-subscribe.com','doubleclick.net','llnwd.net','admarketplace.net','adtdp.com','intellimize.co','apponic.com','casalemedia.com','drift.com','emltrk.com','fiksu.com','keywordblocks.com','marketo.com','motigo.com','ninthdecimal.com','placelocal.com','rockyou.com','socialannex.com','tremorhub.com','weborama.fr','page.link','adglare.net','monetate.net','silveregg.net','go2cloud.org','affex.org','eulerian.net','302br.net','statcounter.com','targetnet.com','2o7.net','civpro.co.za','stofanet.dk','user.ono.com','bezeqint.net','fibernet.hu','cust.tele2.se'] with open('A+B_net.txt') as oldfile, open('A+B_sub.txt', 'w') as newfile: for line in oldfile: if not any(bad_word in line for bad_word in bad_words): newfile.write(line) print("suppression des subdomain terminé") #Supprime les doublons #Mémorise les lignes déjà lu dans un fichier lines_seen = set() #Défini le fichier de sortie outfile = open("Liste.txt", "w") #Copie à condition de ne pas être un doublon for line in open("A+B_sub.txt", "r"): if line not in lines_seen: outfile.write(line) lines_seen.add(line) outfile.close() print("suppression des lignes en double terminé") #Pour ajouter des lignes dans un fichier texte with open('Liste.txt', 'a') as file: #Ajout des domain issu des subdomains file.write('\nbroadband.hu\nres.rr.com\ninfusionsoft.com\nmscnet.com\nintercom.io\nxg4ken.com\nfbcdn.net\nig.com.br\nchartboost.com\nadtelligent.com\nadk2.co\nadlightning.com\njivox.com\njoystickinteractive.com\nomniture.com\noptimizely.com\nscarabresearch.com\nscorecardresearch.com\nwebtrends.com\nydigitalmedia.com\ncriteo.net\nomtrdc.net\nmarketingautomation.services\nfootprintdns.com\nmailerlite.com\nakamai.net\nhitbox.com\ntop.list.ru\ntop.mail.ru\nwns.windows.com\nfbsbx.com\n51yes.com\nsig-eb.me\nweb3000.com\nadroll.com\nclicktale.net\n7eer.net\nyounetmedia.com\nmangoads.vn') file.write('\nadnxs.com\nclrstm.com\nc3metrics.com\nclickfunnels.com\nigodigital.com\nmktoresp.com\nnaturalbid.com\nplayziz.com\nplista.com\ntaboola.com\nbrightedge.com\nampaign.adobe.com\napptimize.com\nveinteractive.com\nhoverr.media\nmobileapptracking.com\nkylelierman.com\nis-best.net\nliveadvert.com\nswrve.com\nmpstat.us\nadvertising.com\nparsely.com\nactonsoftware.com\nnews-subscribe.com\ndoubleclick.net\nllnwd.net\nadmarketplace.net\nadtdp.com\nintellimize.co\napponic.com\ncasalemedia.com\ndrift.com\nemltrk.com\nfiksu.com\nkeywordblocks.com\nmarketo.com\nmotigo.com\nninthdecimal.com\nplacelocal.com\nrockyou.com\nsocialannex.com\ntremorhub.com\nweborama.fr\npage.link\nadglare.net\nmonetate.net\nsilveregg.net\ngo2cloud.org\naffex.org\neulerian.net\n302br.net\nstatcounter.com\ntargetnet.com\n2o7.net\ncivpro.co.za\nstofanet.dk\nuser.ono.com\nbezeqint.net\nfibernet.hu\ncust.tele2.se') file.write('\nonline-metrix.net\nappnexus.com\nakstat.io\nadreactor.com\nthemoneytizer.com\ninmobicdn.net\nojrq.net\n360safe.com\n163.com\nbumlam.com\nheyzap.com\nonesignal.com\nqualtrics.com\nskimlinks.com\nrfihub.com\ntapfiliate.com\n2cnt.net\nbacktrace.io\n2cnt.net\nclickbank.net\nmeetrics.net\npx-cloud.net\nadj.st\nadsservingtwig.xyz\nregularimptracker.xyz\nsailthru.com\npingdom.com\npubnub.com\nourtoolbar.com\nintellitxt.com\nre1.yahoo.com\nsp1.yahoo.com\nukl.yahoo.com\nscd.yahoo.com\nnetcabo.pt\ndsl.telesp.net.br\npacbell.net\nhsd1.fl.comcast.net\nneoplus.adsl.tpnet.pl') file.write('\nmicpn.com\nrfksrv.com\ntruoptik.com\nbraze.eu\nadpredictive.net\nhullapp.io\nnonstoppartner.net\nsendgrid.net\nsmartclip.net\nsmartology.net\nxsph.ru\nappdynamics.com\ntechtarget.com\ninfogix.com\ninsightexpressai.com\n247realmedia.com\nadsl.net.t-com.hr\nswbell.net\nsbcglobal.net\nduo.carnet.hr\nhsd1.tx.comcast.net\nga.comcast.net\ncable.dyn.cableonline.com.mx') #Ajout de la liste personnelle de blocage file.write('\nonclickalgo.com\nonclickperformance.com\nonclickgenius.com\nseaboblit.com\ndig.bdurl.net\nuanalysys.cn\ngetui.com\nhicloud.com\ndns.weixin.qq.com\nlf.snssdk.com\nixigua.com\npstatp.com\ndouyincdn.com') #Créer un dossier avec la date et l'heure du jour today = datetime.datetime.now() os.makedirs(today.strftime("%Y-%m-%d_%H-%M")) #Déplacer les fichiers intermédiaires files = ['List-A 1.txt','List-A 2.txt','List-A 3.txt','List-A 4.txt','List-A 5.txt','List-A 6.txt','List-A 7.txt','List-A 8.txt','List-A 9.txt','List-A 10.txt', 'List-A 11.txt','List-A 12.txt','List-A 13.txt','List-A 14.txt','List-A 15.txt','List-A 16.txt','List-A 17.txt','List-A 18.txt','List-A 19.txt','List-A 20.txt', 'List-A 21.txt','List-A 22.txt','List-A 23.txt','List-A 24.txt','List-A 25.txt','List-A 26.txt','List-A 27.txt','List-A 28.txt','List-A 29.txt','List-A 30.txt', 'List-B 1.txt','List-B 2.txt','List-B 3.txt','List-B 4.txt','List-B 5.txt','List-B 6.txt','List-B 7.txt','List-B 8.txt','List-B 9.txt','List-B 10.txt', 'List-B 11.txt','List-B 12.txt','List-B 13.txt','List-B 14.txt','List-B 15.txt','List-B 16.txt','List-B 17.txt','List-B 18.txt','List-B 19.txt','List-B 20.txt', 'List-B 21.txt','List-B 22.txt','List-B 23.txt','List-B 24.txt','List-B 25.txt','List-B 26.txt','List-B 27.txt','mix_A.txt','mix_B.txt','A+B.txt','A+B_net.txt','A+B_sub.txt'] for file in files: shutil.move(file, today.strftime("%Y-%m-%d_%H-%M"))
83.270936
2,567
0.722314
2,698
16,904
4.479985
0.284655
0.091503
0.052949
0.07446
0.383387
0.30719
0.299909
0.264416
0.228345
0.195913
0
0.028783
0.081283
16,904
203
2,568
83.270936
0.749517
0.088441
0
0.118056
0
0.118056
0.731392
0.181465
0
0
0
0
0
1
0.006944
false
0
0.013889
0
0.027778
0.083333
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
56ba98f6b270bb78937972fd64add13802cd968e
187
py
Python
test/test_version.py
saw-leipzig/pyocrd
a346f472d3dfff1fecc14eda7b8088ab882ee8ca
[ "Apache-2.0" ]
null
null
null
test/test_version.py
saw-leipzig/pyocrd
a346f472d3dfff1fecc14eda7b8088ab882ee8ca
[ "Apache-2.0" ]
null
null
null
test/test_version.py
saw-leipzig/pyocrd
a346f472d3dfff1fecc14eda7b8088ab882ee8ca
[ "Apache-2.0" ]
null
null
null
from test.base import TestCase, main import ocrd class TestVersion(TestCase): def runTest(self): self.assertIsNot(ocrd.VERSION, None) if __name__ == '__main__': main()
17
44
0.695187
23
187
5.304348
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.197861
187
10
45
18.7
0.813333
0
0
0
0
0
0.042781
0
0
0
0
0
0.142857
1
0.142857
false
0
0.285714
0
0.571429
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
0
0
0
0
1
0
0
2
56c0477041ae4325fb9c6bde001997212db3c408
288
py
Python
myUniSystem/timetable/urls.py
LukasKaziliunas/uniSystemDemo
11e8c19e6d2bd08eb0449e229dbaa2a0300d8263
[ "MIT" ]
null
null
null
myUniSystem/timetable/urls.py
LukasKaziliunas/uniSystemDemo
11e8c19e6d2bd08eb0449e229dbaa2a0300d8263
[ "MIT" ]
null
null
null
myUniSystem/timetable/urls.py
LukasKaziliunas/uniSystemDemo
11e8c19e6d2bd08eb0449e229dbaa2a0300d8263
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include from . import views urlpatterns = [ path('', views.index), path('ajax/load_week/', views.week_timetable, name="ajax_load_timetable"), path('makeNew/', views.make_timetableEntry, name="name_new_timetable") ]
28.8
77
0.746528
38
288
5.473684
0.526316
0.096154
0
0
0
0
0
0
0
0
0
0
0.121528
288
9
78
32
0.822134
0
0
0
0
0
0.208333
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
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
56e8c015c2af20db0ff7297a086c1abf01513393
215
py
Python
project/project/urls.py
cborao/Django-cms-put
b97a906c5183e5136d17969e8bb71345616ac451
[ "MIT" ]
null
null
null
project/project/urls.py
cborao/Django-cms-put
b97a906c5183e5136d17969e8bb71345616ac451
[ "MIT" ]
null
null
null
project/project/urls.py
cborao/Django-cms-put
b97a906c5183e5136d17969e8bb71345616ac451
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('cms_put/', include('cms_put.urls')), path('calc/', include('calc.urls')), path('admin/', admin.site.urls), ]
23.888889
46
0.669767
29
215
4.896552
0.448276
0.140845
0
0
0
0
0
0
0
0
0
0
0.148837
215
8
47
26.875
0.775956
0
0
0
0
0
0.186047
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
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
710bb8e1f988defe232964cbe475aafde235d31a
400
py
Python
chapter2/2.5/strip_test.py
yifengyou/crazy-python
28099bd5011de6981a7c5412783952cc7601ae0c
[ "Unlicense" ]
null
null
null
chapter2/2.5/strip_test.py
yifengyou/crazy-python
28099bd5011de6981a7c5412783952cc7601ae0c
[ "Unlicense" ]
null
null
null
chapter2/2.5/strip_test.py
yifengyou/crazy-python
28099bd5011de6981a7c5412783952cc7601ae0c
[ "Unlicense" ]
null
null
null
# coding:utf-8 # File Name: strip_test # Author : yifengyou # Date : 2021/07/18 s = " this is a puppy " print(s) print(s.lstrip()) print(s.rstrip()) print(s.strip()) print(s) print(s.lstrip(" this")) print("=========") print(s.startswith(" ")) print(s.find("puppy")) print(s.replace("puppy", "dog")) print("=========") print(s.split()) print(s.split("i")) print("-".join(s.split()))
21.052632
32
0.5775
60
400
3.833333
0.466667
0.286957
0.095652
0.104348
0.156522
0
0
0
0
0
0
0.026163
0.14
400
19
33
21.052632
0.642442
0.2225
0
0.266667
0
0
0.18241
0
0
0
0
0
0
1
0
false
0
0
0
0
0.933333
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
0
1
0
2
712657400e5da0f5dcd1d1538ca565af3e859a35
738
py
Python
tests/test_tensor.py
boeddeker/pytorch-complex
9311ea2e52909ca1f0f4c18152433d6315333ec1
[ "MIT" ]
45
2018-09-13T00:58:45.000Z
2020-11-18T06:43:33.000Z
tests/test_tensor.py
boeddeker/pytorch-complex
9311ea2e52909ca1f0f4c18152433d6315333ec1
[ "MIT" ]
8
2018-09-10T15:34:10.000Z
2019-04-04T16:56:48.000Z
tests/test_tensor.py
boeddeker/pytorch-complex
9311ea2e52909ca1f0f4c18152433d6315333ec1
[ "MIT" ]
11
2018-10-17T14:51:27.000Z
2020-04-07T16:09:57.000Z
import unittest from torch_complex import torch class TestComplexTensor(unittest.TestCase): def test_empty(self): torch.empty(2, 2, dtype=torch.complex64) torch.empty(2, 2, dtype=torch.complex128) def test_indexing(self): t = torch.empty(2, 2, dtype=torch.complex128) t[1] t[1, 1] def test_fill(self): t = torch.empty(2, 2, dtype=torch.complex128) t.fill_(1.0) t.fill_(1.0 + 2.0j) def test_scalar_binary_op(self): a = torch.ones(2, 2, dtype=torch.complex128) 2 * a 2 / a 2 - a 2 + a def test_blas(self): pass def test_rand(self): pass if __name__ == '__main__': unittest.main()
21.085714
53
0.574526
105
738
3.857143
0.314286
0.103704
0.08642
0.148148
0.395062
0.340741
0.266667
0.187654
0.187654
0.187654
0
0.072407
0.307588
738
34
54
21.705882
0.720157
0
0
0.153846
0
0
0.01084
0
0
0
0
0
0
1
0.230769
false
0.076923
0.076923
0
0.346154
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
712a862f8fbb853628a38b4fd21a7bc0201d1ede
441
py
Python
test.py
tienln4/PaddleOCR-1
786448503b3f23140798bdecde19e985027257b2
[ "DOC", "Apache-2.0" ]
null
null
null
test.py
tienln4/PaddleOCR-1
786448503b3f23140798bdecde19e985027257b2
[ "DOC", "Apache-2.0" ]
null
null
null
test.py
tienln4/PaddleOCR-1
786448503b3f23140798bdecde19e985027257b2
[ "DOC", "Apache-2.0" ]
null
null
null
from benchmark.main import Benchmark from benchmark.modules.configs.paddle_recognizer_config import PaddleRecognizerConfig from benchmark.modules.recognizer.paddle_recognizer import PaddleRecognizer config = PaddleRecognizerConfig("benchmark/configs/plate.yaml") bm = Benchmark(config) # bm.GenPythonRecord() # bm.GenCppRecord("benchmark/results/v2_tensorrt.txt", "tensorrt") bm.CalculateAccuracy("benchmark/results/v2_deepstream_test.txt")
49
85
0.85034
49
441
7.530612
0.469388
0.105691
0.108401
0
0
0
0
0
0
0
0
0.004796
0.054422
441
9
86
49
0.880096
0.192744
0
0
0
0
0.19209
0.19209
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
852fb9f3b49bc2b1fc91e07966556b1ad9d8f148
163
py
Python
example.py
pgupta07/AV-Jantahack-Recommendation-Systems
216efedd906425c00aebd7268b309f1aba0ea144
[ "MIT" ]
81
2018-04-26T10:17:56.000Z
2022-01-25T17:06:18.000Z
example.py
tobunka-git/CPT
a330969fe5acf6c0a3a7bc2ed5ab0b29413161df
[ "MIT" ]
null
null
null
example.py
tobunka-git/CPT
a330969fe5acf6c0a3a7bc2ed5ab0b29413161df
[ "MIT" ]
42
2018-04-28T10:05:47.000Z
2021-05-25T02:24:11.000Z
from CPT import * model = CPT() data,target = model.load_files("./data/train.csv","./data/test.csv") model.train(data) predictions = model.predict(data,target,5,3)
32.6
68
0.723926
26
163
4.5
0.576923
0.17094
0
0
0
0
0
0
0
0
0
0.013333
0.079755
163
5
69
32.6
0.766667
0
0
0
0
0
0.189024
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
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
85360a9b3d68fff6a1a66ec9ea226387e80f81c1
1,440
py
Python
tests/data_mocker.py
leduy8/gotit-final-project
02f2cabbaef0f9f0542aa3efc9f835774beec948
[ "MIT" ]
null
null
null
tests/data_mocker.py
leduy8/gotit-final-project
02f2cabbaef0f9f0542aa3efc9f835774beec948
[ "MIT" ]
null
null
null
tests/data_mocker.py
leduy8/gotit-final-project
02f2cabbaef0f9f0542aa3efc9f835774beec948
[ "MIT" ]
null
null
null
from main.engines.category import create_category from main.engines.item import create_item from main.engines.user import create_user from main.libs.jwt import create_access_token from main.libs.password import gen_salt, generate_password_hash def create_dummy_email(local_part_length=50, domain_part_length=250): return ( "".join("a" for _ in range(local_part_length)) + "@" + "".join("a" for _ in range(domain_part_length)) ) def create_dummy_text(length=60): return "".join("a" for _ in range(length)) def create_dummy_access_token(user): return create_access_token({"id": user.id}) def create_dummy_user(email="duy123@gmail.com"): salt = gen_salt() data = { "email": email, "password_hash": generate_password_hash("123456", salt), "password_salt": salt, } user = create_user(data=data) return user def create_dummy_item(category_id, user_id): data = { "name": "Item 0", "description": "Like no other", "category_id": category_id, } item = create_item(data=data, user_id=user_id) return item def create_dummy_category(user_id, name="Not Essentials"): data = {"name": name} category = create_category(data=data, user_id=user_id) return category def create_dummy_invalid_access_token(payload={"id": 1234}, key="hahadumbkey"): return create_access_token(payload=payload, key=key)
24.40678
79
0.691667
198
1,440
4.742424
0.267677
0.067093
0.104366
0.031949
0.116081
0.100107
0.055378
0
0
0
0
0.018057
0.192361
1,440
58
80
24.827586
0.789338
0
0
0.052632
0
0
0.09375
0
0
0
0
0
0
1
0.184211
false
0.078947
0.131579
0.105263
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
0
1
0
0
0
2
85476126eeca59d6dab047d19bc1951572b37c50
1,167
py
Python
src/authentication/views.py
viniciussslima/b2bit-mini-twitter
d37b6d1c3e8d92f5aeee8c8bfdde34b0e4f82e57
[ "MIT" ]
null
null
null
src/authentication/views.py
viniciussslima/b2bit-mini-twitter
d37b6d1c3e8d92f5aeee8c8bfdde34b0e4f82e57
[ "MIT" ]
null
null
null
src/authentication/views.py
viniciussslima/b2bit-mini-twitter
d37b6d1c3e8d92f5aeee8c8bfdde34b0e4f82e57
[ "MIT" ]
null
null
null
from rest_framework import generics, status from rest_framework.permissions import AllowAny from django.contrib.auth.hashers import make_password from rest_framework_simplejwt.serializers import TokenObtainPairSerializer from rest_framework.response import Response from .models import User from .serializers import UserSerializer class RegisterView(generics.CreateAPIView): model = User serializer_class = UserSerializer permission_classes = [ AllowAny, ] def perform_create(self, serializer): password = make_password(self.request.data["password"]) serializer.save(password=password) class LoginView(generics.GenericAPIView): permission_classes = [ AllowAny, ] def post(self, request): serializer = TokenObtainPairSerializer(data=request.data) serializer.is_valid(raise_exception=True) user = User.objects.get(username=request.data["username"]) user_data = UserSerializer(user).data response = {} response["user"] = user_data response["tokens"] = serializer.validated_data return Response(response, status=status.HTTP_200_OK)
28.463415
74
0.733505
122
1,167
6.868852
0.42623
0.038186
0.081146
0.066826
0
0
0
0
0
0
0
0.003168
0.188518
1,167
40
75
29.175
0.881732
0
0
0.137931
0
0
0.022279
0
0
0
0
0
0
1
0.068966
false
0.103448
0.241379
0
0.551724
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
8561701cef01e6d73154b8b6458869611e2614f2
283
py
Python
desafio 10.py
kelson-gs/Desafios-python
b40867a331c0dab84b4ceff5391c5dcd07c42da2
[ "MIT" ]
null
null
null
desafio 10.py
kelson-gs/Desafios-python
b40867a331c0dab84b4ceff5391c5dcd07c42da2
[ "MIT" ]
null
null
null
desafio 10.py
kelson-gs/Desafios-python
b40867a331c0dab84b4ceff5391c5dcd07c42da2
[ "MIT" ]
null
null
null
money = float(input('o quanto de dinheiro que a pessoa tem: ')) print('o dolar vale 3.27, quanto dolar ele podrá comprar?') s = money / 3.27 print('{:.2f} / 3.27 = {:.2f}'.format(money, s)) print('mais ou menos {:.2f} dólares'.format(s)) #acrescentando para ponto flutuante( ":.2f" )
47.166667
63
0.660777
47
283
3.978723
0.638298
0.048128
0
0
0
0
0
0
0
0
0
0.053719
0.144876
283
6
64
47.166667
0.719008
0.155477
0
0
0
0
0.58159
0
0
0
0
0
0
1
0
false
0
0
0
0
0.6
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
0
0
0
1
0
2
8590dff4805521552db41552cd3c2a63ab9c1db4
278
py
Python
UploadDataToMongo/accidents/AccidentData.py
andres0sorio/AODS4AWork
429aa737cdf459aa242f4dc4c234f2aad13b563f
[ "MIT" ]
1
2021-05-30T06:38:57.000Z
2021-05-30T06:38:57.000Z
UploadDataToMongo/accidents/AccidentData.py
andres0sorio/AODS4AWork
429aa737cdf459aa242f4dc4c234f2aad13b563f
[ "MIT" ]
null
null
null
UploadDataToMongo/accidents/AccidentData.py
andres0sorio/AODS4AWork
429aa737cdf459aa242f4dc4c234f2aad13b563f
[ "MIT" ]
null
null
null
class AccidentData: """Clase base que tiene por objetivo darle contexto a los datos de accidentes""" def __init__(self): self.client = 0 self.client_name = "" self.client_contact = "" self.client_phone = "" self.data_origin = ""
27.8
84
0.607914
33
278
4.878788
0.757576
0.248447
0
0
0
0
0
0
0
0
0
0.005076
0.291367
278
9
85
30.888889
0.812183
0.266187
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.285714
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
8597a7d30d1634f8b90c88dd3c2acd78653e5e95
1,106
py
Python
config.py
ClashLuke/denoising-diffusion-pytorch
ab2720902fc81985c9e39456961a146e73fdc2a0
[ "MIT" ]
null
null
null
config.py
ClashLuke/denoising-diffusion-pytorch
ab2720902fc81985c9e39456961a146e73fdc2a0
[ "MIT" ]
null
null
null
config.py
ClashLuke/denoising-diffusion-pytorch
ab2720902fc81985c9e39456961a146e73fdc2a0
[ "MIT" ]
1
2020-08-18T14:06:37.000Z
2020-08-18T14:06:37.000Z
from typing import Optional, List from pydantic import StrictStr, StrictInt, StrictFloat, StrictBool from tensorfn.config import Config, Optimizer, Scheduler, DataLoader class Dataset(Config): name: StrictStr path: StrictStr resolution: StrictInt class Model(Config): in_channel: StrictInt channel: StrictInt channel_multiplier: List[StrictInt] n_res_blocks: StrictInt attn_strides: List[StrictInt] dropout: StrictFloat fold: StrictInt class Training(Config): n_iter: StrictInt optimizer: Optimizer scheduler: Optional[Scheduler] dataloader: DataLoader class Eval(Config): wandb: StrictBool save_every: StrictInt valid_every: StrictInt log_every: StrictInt class DiffusionConfig(Config): n_gpu: Optional[StrictInt] n_machine: Optional[StrictInt] machine_rank: Optional[StrictInt] dist_url: Optional[StrictStr] distributed: Optional[StrictBool] ckpt: Optional[StrictStr] dataset: Dataset model: Model training: Training evaluate: Eval
22.571429
69
0.705244
113
1,106
6.787611
0.424779
0.054759
0.059974
0
0
0
0
0
0
0
0
0
0.232369
1,106
48
70
23.041667
0.903416
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.083333
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
1
0
0
0
1
0
0
2
8599308b965f84f130a6d2a6956797ec7e1dc1c0
403
py
Python
users/models.py
aryanshridhar/Ecommerce-Website
c582659e9b530555b9715ede7bb774c39f101c7e
[ "MIT" ]
1
2020-06-01T16:41:33.000Z
2020-06-01T16:41:33.000Z
users/models.py
aryanshridhar/Ecommerce-Website
c582659e9b530555b9715ede7bb774c39f101c7e
[ "MIT" ]
4
2020-03-17T03:37:23.000Z
2021-09-22T18:36:18.000Z
users/models.py
aryanshridhar/Ecommerce-Website
c582659e9b530555b9715ede7bb774c39f101c7e
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User import os class Profile(models.Model): user = models.OneToOneField(User , on_delete = models.CASCADE) image = models.ImageField(default='default.jpg' , upload_to='Ecommerce/images') def __str__(self): return self.user.username def filename(self): return os.path.basename(self.image.name)
25.1875
83
0.712159
53
403
5.301887
0.622642
0.071174
0
0
0
0
0
0
0
0
0
0
0.183623
403
16
84
25.1875
0.854103
0
0
0
0
0
0.066832
0
0
0
0
0
0
1
0.2
false
0
0.3
0.2
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
0
1
1
0
0
2
85c187d12ab8908a48aef6162313517a6dd52628
5,798
py
Python
hask/Prelude.py
forked-from-1kasper/hask
f0cb9fe50b8b4bea156f1c9543afc488a3ad209e
[ "BSD-2-Clause" ]
4
2017-11-20T09:51:19.000Z
2022-02-21T07:19:24.000Z
hask/Prelude.py
forked-from-1kasper/hask
f0cb9fe50b8b4bea156f1c9543afc488a3ad209e
[ "BSD-2-Clause" ]
null
null
null
hask/Prelude.py
forked-from-1kasper/hask
f0cb9fe50b8b4bea156f1c9543afc488a3ad209e
[ "BSD-2-Clause" ]
null
null
null
import math from .lang import H, sig, t #=============================================================================# # Standard types, classes, and related functions ## Basic data types from .Data.Maybe import Maybe, Just, Nothing, in_maybe, maybe from .Data.Either import Either, Left, Right, in_either, either from .Data.Ord import Ordering, LT, EQ, GT from .Data.Unit import Unit, Star ### Tuples from .Data.Tuple import fst, snd, curry, uncurry #=============================================================================# ## Basic type classes from .lang import Read, Show, show from .Data.Eq import Eq from .Data.Ord import Ord, max, min, compare from .lang import Enum, fromEnum, succ, pred, enumFromThen from .lang import enumFrom, enumFromThenTo, enumFromTo from .lang import Bounded from .Data.Functor import Functor, fmap, void from .Control.Applicative import Applicative from .Control.Monad import Monad from .Data.Foldable import Foldable from .Data.Traversable import Traversable #=============================================================================# # Numbers ### Numeric type classes from .Data.Num import Num, abs, negate, signum, Fractional, recip from .Data.Num import Integral, toRatio, Ratio, R, Rational, Floating from .Data.Num import sqrt, log, pow, logBase, sin, tan, cos, exp from .Data.Num import asin, atan, acos, sinh, tanh, cosh from .Data.Num import asinh, atanh, acosh, atan2 from .Data.Num import Real, RealFloat, RealFrac, toRational from .Data.Num import properFraction, truncate, round, ceiling, floor from .Data.Num import isNaN, isInfinite, isNegativeZero #=============================================================================# # Numeric functions @sig(H[(Num, "a")]/ "a" >> "a" >> "a") def subtract(x, y): """ subtract :: Num a => a -> a -> a the same as lambda x, y: y - x """ return y - x @sig(H[(Integral, "a")]/ "a" >> bool) def even(x): """ even :: Integral a => a -> Bool Returns True if the integral value is even, and False otherwise. """ return x % 2 == 0 @sig(H[(Integral, "a")]/ "a" >> bool) def odd(x): """ odd :: Integral a => a -> Bool Returns True if the integral value is odd, and False otherwise. """ return x % 2 == 1 @sig(H[(Integral, "a")]/ "a" >> "a" >> "a") def gcd(x, y): """ gcd :: Integral a => a -> a -> a gcd(x,y) is the non-negative factor of both x and y of which every common factor of x and y is also a factor; for example gcd(4,2) = 2, gcd(-4,6) = 2, gcd(0,4) = 4. gcd(0,0) = 0. (That is, the common divisor that is "greatest" in the divisibility preordering.) """ return math.gcd(x, y) @sig(H[(Integral, "a")]/ "a" >> "a" >> "a") def lcm(x, y): """ lcm :: Integral a => a -> a -> a lcm(x,y) is the smallest positive integer that both x and y divide. """ g = gcd(x, y) return 0 if g == 0 else (x * y) // g #=============================================================================# # Monads and functors from .Data.Functor import Functor from .Control.Applicative import Applicative from .Control.Monad import Monad @sig(H[(Monad, "m")]/ t("m", "a") >> t("m", Unit)) def sequence(xs): """ sequence :: Monad m => [m a] -> m [a] Evaluate each action in the sequence from left to right, and collect the results. """ raise NotImplementedError() @sig(H[(Monad, "m")]/ t("m", "a") >> t("m", Unit)) def sequence_(xs): """ sequence_ :: Monad m => [m a] -> m Unit Evaluate each action in the sequence from left to right, and ignore the results. """ raise NotImplementedError() def mapM(f, xs): """ mapM :: Monad m => (a -> m b) -> [a] -> m [b] mapM(f) is equivalent to sequence * map(f) """ return sequence(fmap(f, xs)) def mapM_(f, xs): """ mapM_ :: Monad m => (a -> m b) -> [a] -> m () mapM_(f) is equivalent to sequence_ * map(f) """ return sequence_(fmap(f, xs)) #=============================================================================# # Miscellaneous functions from hask.Data.Function import id, const, flip, comp from hask.Data.String import String @sig(H/ (H/ "a" >> bool) >> (H/ "a" >> "a") >> "a" >> "a") def until(p, f, a): """ until :: (a -> Bool) -> (a -> a) -> a -> a until(p, f, a) yields the result of applying f until p(a) holds. """ while not p(a): a = f(a) return a @sig(H/ "a" >> "a" >> "a") def asTypeOf(a, b): """ asTypeOf :: a -> a -> a asTypeOf is a type-restricted version of const. It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second. """ return a @sig(H/ String >> "a") def error(msg): """ error :: String -> a error(msg) stops execution and displays an error message. """ raise Exception(msg) from .lang import undefined # List operations from .Data.List import map, filter, head, last, tail, init from .Data.List import null, reverse, length, L from .Data.List import foldl, foldl1, foldr, foldr1 ## Special folds from .Data.List import and_, or_, any, all, sum, product from .Data.List import concat, concatMap, maximum, minimum ## Building lists ### Scans from .Data.List import scanl, scanl1, scanr, scanr1 ### Infinite lists from .Data.List import iterate, repeat, replicate, cycle ## Sublists from .Data.List import take, drop, splitAt, takeWhile, dropWhile, span, break_ ## Searching lists from .Data.List import elem, notElem, lookup ## Zipping and unzipping lists from .Data.List import zip, zip3, zipWith, zipWith3, unzip, unzip3 ## Functions on strings from .Data.List import lines, words, unlines, unwords
24.464135
79
0.580717
809
5,798
4.147095
0.339926
0.019672
0.016095
0.059016
0.260805
0.20924
0.194337
0.181818
0.170492
0.170492
0
0.005648
0.206106
5,798
236
80
24.567797
0.723224
0.392377
0
0.175
0
0
0.010245
0
0
0
0
0
0
1
0.15
false
0
0.5375
0
0.8
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
85c73b4ba3b46089091c66bb445eeaaf3c13dac3
768
py
Python
controlbeast/__init__.py
daemotron/controlbeast
8c69e954fe6a0c7ada4c2fa136c12c6dd0abed36
[ "0BSD" ]
2
2018-01-03T05:33:48.000Z
2018-03-23T03:43:39.000Z
controlbeast/__init__.py
daemotron/controlbeast
8c69e954fe6a0c7ada4c2fa136c12c6dd0abed36
[ "0BSD" ]
null
null
null
controlbeast/__init__.py
daemotron/controlbeast
8c69e954fe6a0c7ada4c2fa136c12c6dd0abed36
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- """ controlbeast ~~~~~~~~~~~~ :copyright: Copyright 2013, 2014 by the ControlBeast team, see AUTHORS. :license: ISC, see LICENSE for details. """ VERSION = (0, 1, 0, 'alpha', 0) COPYRIGHT = ('2013, 2014', 'the ControlBeast team') def get_version(*args, **kwargs): """ Returns PEP 386 compliant version number for the ControlBeast package """ from controlbeast.utils.version import get_version return get_version(*args, **kwargs) def get_development_status(*args, **kwargs): """ Returns PEP 301 compliant development status trove identifier for the ControlBeast package """ from controlbeast.utils.version import get_development_status return get_development_status(*args, **kwargs)
27.428571
94
0.683594
91
768
5.67033
0.428571
0.116279
0.116279
0.077519
0.356589
0.24031
0.24031
0.24031
0.24031
0.24031
0
0.043478
0.191406
768
28
95
27.428571
0.78744
0.419271
0
0
0
0
0.091603
0
0
0
0
0
0
1
0.25
false
0
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
0
0
0
1
0
0
2
a41711e33d899ca01a7e81de10ba5bf9619df0a8
208
py
Python
py/main.py
sector23-bob/MushieSense
11e4836f49459bf036b339927cf498af3c8ef581
[ "CC0-1.0" ]
null
null
null
py/main.py
sector23-bob/MushieSense
11e4836f49459bf036b339927cf498af3c8ef581
[ "CC0-1.0" ]
null
null
null
py/main.py
sector23-bob/MushieSense
11e4836f49459bf036b339927cf498af3c8ef581
[ "CC0-1.0" ]
null
null
null
# CircuitPython implementation of MushieSense, with LoRa! import gc from digitalio import DigitalInOut gc.collect() # Built in red LED red_led = DigitalInOut(board.D13) red_led.direction = Direction.OUTPUT
20.8
57
0.802885
28
208
5.892857
0.714286
0.109091
0
0
0
0
0
0
0
0
0
0.01105
0.129808
208
10
58
20.8
0.900552
0.346154
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
0
0
1
0
0
0
0
2
a41a3d285f0acc402f1a81014ea22430c192a011
1,755
py
Python
yowsup/layers/protocol_media/protocolentities/message_media_downloadable_audio.py
zulu494/Anoa-Bot-
6666b0257d0c5bd2ce57c473078c4059ecd0fecd
[ "MIT" ]
1
2021-09-11T13:38:47.000Z
2021-09-11T13:38:47.000Z
yowsup/layers/protocol_media/protocolentities/message_media_downloadable_audio.py
enigma-chan/Anti-Hoax-Bot
6666b0257d0c5bd2ce57c473078c4059ecd0fecd
[ "MIT" ]
null
null
null
yowsup/layers/protocol_media/protocolentities/message_media_downloadable_audio.py
enigma-chan/Anti-Hoax-Bot
6666b0257d0c5bd2ce57c473078c4059ecd0fecd
[ "MIT" ]
null
null
null
from .message_media_downloadable import DownloadableMediaMessageProtocolEntity from yowsup.layers.protocol_messages.protocolentities.attributes.attributes_audio import AudioAttributes from yowsup.layers.protocol_messages.protocolentities.attributes.attributes_message_meta import MessageMetaAttributes from yowsup.layers.protocol_messages.protocolentities.attributes.attributes_message import MessageAttributes class AudioDownloadableMediaMessageProtocolEntity(DownloadableMediaMessageProtocolEntity): def __init__(self, audio_attrs, message_meta_attrs): # type: (AudioAttributes, MessageMetaAttributes) -> None super(AudioDownloadableMediaMessageProtocolEntity, self).__init__( "audio", MessageAttributes(audio=audio_attrs), message_meta_attrs ) @property def media_specific_attributes(self): return self.message_attributes.audio @property def downloadablemedia_specific_attributes(self): return self.message_attributes.audio.downloadablemedia_attributes @property def seconds(self): return self.media_specific_attributes.seconds @seconds.setter def seconds(self, value): """ :type value: int """ self.media_specific_attributes.seconds = value @property def ptt(self): return self.media_specific_attributes.ptt @ptt.setter def ptt(self, value): """ :type value: bool """ self.media_specific_attributes.ptt = value @property def streaming_sidecar(self): return self.media_specific_attributes.streaming_sidecar @streaming_sidecar.setter def streaming_sidecar(self, value): self.media_specific_attributes.streaming_sidecar = value
34.411765
117
0.752707
168
1,755
7.583333
0.22619
0.11303
0.126374
0.127159
0.488226
0.389325
0.255887
0.255887
0.117739
0
0
0
0.180057
1,755
50
118
35.1
0.885337
0.051282
0
0.151515
0
0
0.00309
0
0
0
0
0
0
1
0.272727
false
0
0.121212
0.151515
0.575758
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
1
0
0
0
2
a41eecdb545e94a69e703b044e031314ab4287ab
323
py
Python
build_pipeline/helper/deploy_package/test.py
jakob-bagterp/timer-for-python
a48b60c8782bbf6d368d6ca2be249054c3b66c21
[ "MIT" ]
2
2022-03-22T11:14:37.000Z
2022-03-24T14:27:13.000Z
build_pipeline/helper/deploy_package/test.py
jakob-bagterp/timer-for-python
a48b60c8782bbf6d368d6ca2be249054c3b66c21
[ "MIT" ]
null
null
null
build_pipeline/helper/deploy_package/test.py
jakob-bagterp/timer-for-python
a48b60c8782bbf6d368d6ca2be249054c3b66c21
[ "MIT" ]
null
null
null
import subprocess from config.directory import temp_builds from .. import directory def deploy_to_test_pypi() -> None: directory.working.set_as_project_base_path() subprocess.call(f"python3 -m twine upload --repository testpypi {temp_builds()}/*".split()) if __name__ == "__main__": deploy_to_test_pypi()
21.533333
95
0.749226
43
323
5.162791
0.72093
0.09009
0.108108
0.144144
0
0
0
0
0
0
0
0.003597
0.139319
323
14
96
23.071429
0.794964
0
0
0
0
0
0.219814
0
0
0
0
0
0
1
0.125
true
0
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
1
0
1
0
0
0
0
2
a429be866a444149b04b11d6bba325a9e7466e70
155
py
Python
setup.py
PyDever/libpkt
076cc6b6bbdeedcdaed48f056c5fc44c033197a2
[ "BSD-2-Clause" ]
4
2018-08-20T00:15:10.000Z
2018-09-05T18:17:11.000Z
setup.py
PyDever/libpkt
076cc6b6bbdeedcdaed48f056c5fc44c033197a2
[ "BSD-2-Clause" ]
1
2018-12-30T22:09:16.000Z
2018-12-30T22:09:16.000Z
setup.py
PyDever/libpkt
076cc6b6bbdeedcdaed48f056c5fc44c033197a2
[ "BSD-2-Clause" ]
null
null
null
from distutils.core import setup setup(name='libpkt', version='0.1', description='libpkt', packages=["libpkt"], license="BSD" )
14.090909
32
0.6
17
155
5.470588
0.823529
0
0
0
0
0
0
0
0
0
0
0.016949
0.23871
155
10
33
15.5
0.771186
0
0
0
0
0
0.156863
0
0
0
0
0
0
1
0
true
0
0.142857
0
0.142857
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
a446b380930c24bd78b5ec318ba49732a885588f
691
py
Python
processing/2.5_init_tokenizers.py
AirNicco8/ICPC2020_GNN
ee54160af0f0722b8fd16f02411fe723185695f3
[ "MIT" ]
null
null
null
processing/2.5_init_tokenizers.py
AirNicco8/ICPC2020_GNN
ee54160af0f0722b8fd16f02411fe723185695f3
[ "MIT" ]
null
null
null
processing/2.5_init_tokenizers.py
AirNicco8/ICPC2020_GNN
ee54160af0f0722b8fd16f02411fe723185695f3
[ "MIT" ]
1
2022-02-03T22:40:07.000Z
2022-02-03T22:40:07.000Z
from tokenizer import Tokenizer import sys import pickle dim = 100000 # !TODO tune this parameter def init(a, dim, out): tok = Tokenizer() tok.train_from_file(a[0], dim) tok.update_from_file(a[1]) tok.update_from_file(a[2]) tok.save(out) test_dataset = "output/test_dataset.dats" train_dataset = "output/train_dataset.dats" val_dataset = "output/train_dataset.dats" tmp1 = [train_dataset, val_dataset, test_dataset] init(tmp1, dim, 'output/tdats.tok') test_dataset = "output/test_dataset.coms" train_dataset = "output/train_dataset.coms" val_dataset = "output/train_dataset.coms" tmp2 = [train_dataset, val_dataset, test_dataset] init(tmp2, dim, 'output/coms.tok')
25.592593
49
0.748191
105
691
4.695238
0.304762
0.194726
0.146045
0.20284
0.604462
0.150101
0.150101
0
0
0
0
0.021559
0.127352
691
26
50
26.576923
0.79602
0.036179
0
0
0
0
0.269578
0.222892
0
0
0
0.038462
0
1
0.05
false
0
0.15
0
0.2
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
1
0
0
0
0
0
0
0
0
0
0
2
a44cf3b4da944c40d632b55f8eb34ce45cc4096a
2,216
py
Python
sme_material_apps/proponentes/tests/test_proponente/test_bloqueio_proponente.py
luizhpriotto/piloto_apresentacao
c968025db819633ee4cd75df5357ab6a4ab7d9af
[ "MIT" ]
null
null
null
sme_material_apps/proponentes/tests/test_proponente/test_bloqueio_proponente.py
luizhpriotto/piloto_apresentacao
c968025db819633ee4cd75df5357ab6a4ab7d9af
[ "MIT" ]
null
null
null
sme_material_apps/proponentes/tests/test_proponente/test_bloqueio_proponente.py
luizhpriotto/piloto_apresentacao
c968025db819633ee4cd75df5357ab6a4ab7d9af
[ "MIT" ]
null
null
null
# import pytest # # from model_bakery import baker # # from sme_uniforme_apps.proponentes.models import Proponente, ListaNegra # # # pytestmark = pytest.mark.django_db # # # def test_nao_bloqueia_ao_cadastrar_proponente_com_cnpj_bloqueado(lista_negra, cnpj_bloqueado): # # Ao criar um proponente cujo CNPJ está na lista negra o status deve ficar como EM_PROCESSO e não como BLOQUEADO # novo_proponente = baker.make( # 'Proponente', # cnpj=cnpj_bloqueado, # razao_social='Teste Bloqueado', # end_logradouro='Rua Bloqueio, 123 apt. 101 Centro', # end_cidade='São Paulo', # end_uf='SP', # end_cep='99999-000', # telefone='(99) 99999-8888', # email='bloqueado@teste.com', # responsavel='José Bloqueio da Silva', # ) # # assert novo_proponente.status == Proponente.STATUS_EM_PROCESSO # # # def test_bloqueia_ao_concluir_cadastro_de_proponente_com_cnpj_bloqueado(lista_negra, cnpj_bloqueado): # # Ao concluir o cadastro de um proponente cujo CNPJ esteja na lista negra o seu status deve ficar como BLOQUEADO # novo_proponente = baker.make( # 'Proponente', # cnpj=cnpj_bloqueado, # razao_social='Teste Bloqueado', # end_logradouro='Rua Bloqueio, 123 apt. 101 Centro', # end_cidade='São Paulo', # end_uf='SP', # end_cep='99999-000', # telefone='(99) 99999-8888', # email='bloqueado@teste.com', # responsavel='José Bloqueio da Silva', # ) # # assert novo_proponente.status == Proponente.STATUS_EM_PROCESSO # # novo_proponente.status = Proponente.STATUS_INSCRITO # novo_proponente.save() # # proponente = Proponente.objects.get(id=novo_proponente.id) # assert proponente.status == Proponente.STATUS_BLOQUEADO # # # def test_desbloqueia_ao_atualizar_proponente_sem_cnpj_bloqueado(proponente_bloqueado, cnpj_bloqueado): # assert proponente_bloqueado.status == Proponente.STATUS_BLOQUEADO # ListaNegra.objects.get(cnpj=cnpj_bloqueado).delete() # proponente_bloqueado.save() # proponente = Proponente.objects.get(id=proponente_bloqueado.id) # assert proponente.status == Proponente.STATUS_INSCRITO # #
36.327869
118
0.700361
262
2,216
5.671756
0.328244
0.118439
0.088829
0.107672
0.59354
0.558546
0.456258
0.456258
0.456258
0.387618
0
0.028074
0.1963
2,216
60
119
36.933333
0.806289
0.944495
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
a468689b8b58bb56e6d86d827f98bdb8ccfcb3c3
96,929
py
Python
pysnmp-with-texts/BIANCA-BRICK-PPP-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/BIANCA-BRICK-PPP-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/BIANCA-BRICK-PPP-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 BIANCA-BRICK-PPP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-PPP-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:37:58 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, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Gauge32, MibIdentifier, iso, ObjectIdentity, Unsigned32, ModuleIdentity, Integer32, NotificationType, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, IpAddress, TimeTicks, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "MibIdentifier", "iso", "ObjectIdentity", "Unsigned32", "ModuleIdentity", "Integer32", "NotificationType", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "IpAddress", "TimeTicks", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") org = MibIdentifier((1, 3)) dod = MibIdentifier((1, 3, 6)) internet = MibIdentifier((1, 3, 6, 1)) private = MibIdentifier((1, 3, 6, 1, 4)) enterprises = MibIdentifier((1, 3, 6, 1, 4, 1)) bintec = MibIdentifier((1, 3, 6, 1, 4, 1, 272)) bibo = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4)) ppp = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4, 3)) dialmap = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4, 4)) class BitValue(Integer32): pass class Date(Integer32): pass biboPPPTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 1), ) if mibBuilder.loadTexts: biboPPPTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTable.setDescription("The biboPPPTable contains configuration information for the PPP interfaces. Each time a new entry is made here, a corresponding entry is made in the ifTable. Creating entries: Entries are created by assigning a value to the biboPPPType object. Deleting entries: Entries are removed by setting an entry's biboPPPEncapsulation object to 'delete'.") biboPPPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPType")) if mibBuilder.loadTexts: biboPPPEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEntry.setDescription('') biboPPPIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIfIndex.setDescription('Correlating PPP interface index. This value is assigned automatically by the system.') biboPPPType = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5))).clone(namedValues=NamedValues(("isdn-dialup", 1), ("leased", 2), ("isdn-dialin-only", 3), ("multiuser", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPType.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPType.setDescription("The type of link. A new dialup link is created when this field is set to the value isdn-dialup(1), dialin-only(3) or multiuser(5). The maximum number of dialup links is limited by system memory. Each dialup link should have at least one corresponding entry in the biboDialTable to configure the remote ISDN telephone number(s). A leased line link, can not be created by setting this field to leased(2), but is automatically established when the IsdnChType field is set to either 'leased-dte' or 'leased-dce' (which doesn't make a difference for PPP, but must be set correctly for other encapsulation methods). Naturally, when the IsdnChType field is set to any other value, the biboPPPTable entry is removed. In both cases, a new entry in the biboPPPTable creates corre- corresponding entries in the ifTable (a new interface) and in the biboPPPStatTable (PPP statistics). Setting this object to multiuser(5), up to biboPPPMaxConn matching incoming connections (see biboPPPAuthentication, biboPPPAuthSecret, biboPPPAuthIdent) from different dialin partners will be accepted.") biboPPPEncapsulation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("ppp", 1), ("x25", 2), ("x25-ppp", 3), ("ip-lapb", 4), ("delete", 5), ("ip-hdlc", 6), ("mpr-lapb", 7), ("mpr-hdlc", 8), ("frame-relay", 9), ("x31-bchan", 10), ("x75-ppp", 11), ("x75btx-ppp", 12), ("x25-nosig", 13), ("x25-ppp-opt", 14), ("x25-pad", 15), ("x25-noconfig", 16), ("x25-noconfig-nosig", 17)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPEncapsulation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEncapsulation.setDescription("The layer 2 encapsulation of the link. The use of ppp(1) as described in RFC 1661 is the preferred encapsulation for point-to-point links. The encapsulation is set to x25(2) for X.25-only links and to x25-ppp(3) for concurrent use of X.25 and PPP. Mpr-lapb(7) and mpr-hdlc(8) are popular proprietary encapsulations. They both use the ethertype number for protocol multiplexing. The former is used when error correction or data compression (v42bis) is desired. The latter (mpr-hdlc) is compatible to Cisco's HDLC encapsulation. On IP-only links it is also possible to use the ISO LAPB protocol (ip-lapb(4)), also known as X.75, or raw hdlc framing (ip-hdlc(6)). The x75-ppp encapsulation provides a proprietary solution for using PPP encapsulation over X.75 (LAPB) framing, x75btx-ppp provides PPP over T.70 and LAPB framing including a BTX protocol header to access BTX services over ISDN links. The x25-nosig(13) encapsulation is used to establish X.25 connections over dialup links without specific signalling on the D-channel (pure data call). The x25-ppp-opt encapsulation provides a special kind of the x25-ppp encapsulation. Dialin partner will be authenticated either outband to establish an X.25 connection via ISDN or optional inband by using the point-to-point protocol (PPP). Concurrent use of X.25 and PPP encapsulation is excluded. The x25-noconfig(16) and x25-noconfig-nosig(17) encapsulations provide a solution fr establishing X.25 connections via ISDN. The dial number will be derived from X.25 destination address by using special rules. V42bis data compression can be enabled on LAPB links only, because v42bis requires an error free connection. Dialup links can be removed by setting this field to delete(5). This has no effect on permanent links.") biboPPPKeepalive = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPKeepalive.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPKeepalive.setDescription('When set to on(1), keepalive packets are sent in regular intervals during the connection. Keepalive packets can not be sent using the ip-lapb or x25 encapsulation.') biboPPPTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(500, 10000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPTimeout.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTimeout.setDescription('The number of milliseconds waiting before retransmitting a PPP configure packet.') biboPPPCompression = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("v42bis", 2), ("stac", 3), ("ms-stac", 4), ("mppc", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPCompression.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCompression.setDescription('The throughput can be enhanced up to factor three using the V42bis compression method or the Stac LZS compression algorithm. V42bis is currently supported with the ip-lapb and mpr-lapb encapsulation. Stac LZS compression algorithm is provided using PPP encapsulated links, stac(3) indicates support of Sequence checking, ms-stac(4) indicates support of Extended mode which is prefered by Microsoft. Both check modes are implemented according RFC 1974. When set to mppc(5), the Microsoft Point-to-Point Compression (MPPC) Protocol according RFC 2118 is negotiated. MPPC uses an LZ based algorithm with a sliding window history buffer.') biboPPPAuthentication = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("none", 1), ("pap", 2), ("chap", 3), ("both", 4), ("radius", 5), ("ms-chap", 6), ("all", 7), ("ms-chapv2", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPAuthentication.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthentication.setDescription("The type of authentication used on the point-to-point link as described in RFC 1334. The authentication protocol supports pap(2) (Password Authentication Protocol), chap(3) (Challenge Handshake Authentication Protocol), or both(4). When set to both(4), the link must be successfully authenticated by either CHAP or PAP. The type ms-chap(6) and ms-chapv2(8) are Microsofts proprietary CHAP authentication procedures (using MD4 and DES encryption instead of MD5 encryption algorithm), all(7) includes PAP, CHAP and MS-CHAP. Another way to authenticate dial-in users is by using RADIUS (remote authentication dial in user service). Users can authenticate themselves either using PAP or CHAP (excluding MS-CHAP). In general the system creates PPP interfaces with this authentication itself, but it's also possible to take advance of the RADIUS dial-in services with pre-configured interfaces. See biboAdmRadiusServer for further details.") biboPPPAuthIdent = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPAuthIdent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthIdent.setDescription("The remote authentication identification string. The local authentication identification string is taken from the contents of the sysName field, up to the appearance of the first dot (e.g., the remote name would be `brick' if the content of the sysName field was `brick.bintec.de').") biboPPPAuthSecret = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPAuthSecret.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthSecret.setDescription('The authentication secret, which is used symmetrically for both local and remote sides of the PPP link.') biboPPPIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("static", 1), ("dynamic-server", 2), ("dynamic-client", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAddress.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAddress.setDescription('The IP control protocol as described in RFC1332 has a means of negotiating IP-addresses. When this option is set to dynamic-server(2), an available IP-address found in biboPPPIpAddrTable is assigned as the remote IP-address and a temporary route is created during the uptime of the interface. When set to dynamic-client(3), the remote system is asked to tell us our own IP-address. A host route will be created during the uptime of the interface. In most cases this option will be set automatically by the network address translation option. In static(1) mode, address-negotiation is not forced.') biboPPPRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPRetryTime.setDescription('Time in seconds to wait before retrying a call; currently not used.') biboPPPBlockTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPBlockTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPBlockTime.setDescription('Time in seconds to wait after a connection failure (e.g. the number of biboPPPMaxRetries calls failed). When set to zero, the interface state is never set to blocked.') biboPPPMaxRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPMaxRetries.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMaxRetries.setDescription('The number of dialup retries before changing to the blocked state.') biboPPPShortHold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 3600))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPShortHold.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPShortHold.setDescription('The time in seconds to wait, once the channel is silent, (that is, no data is being received or transmitted) before terminating the link. When set to zero the short hold mode is disabled, when set to -1 the short hold mode is disabled and the link will be reconnected when connection was lost.') biboPPPInitConn = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 250))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPInitConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPInitConn.setDescription(' The number of channels to initially set up for this interface.') biboPPPMaxConn = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 250))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPMaxConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMaxConn.setDescription('The maximum number of channels bundled for this interface.') biboPPPMinConn = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 250))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPMinConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMinConn.setDescription('The minimum number of channels bundled for this interface.') biboPPPCallback = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("expected", 3), ("ppp-offered", 4), ("delayed", 5), ("ppp-callback-optional", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPCallback.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCallback.setDescription("If this object is enabled(1), and the call is recognized by the dialed number then calls are never accepted, and a callback is forced for incoming calls at once. The callback can be delayed for biboPPPRetryTime seconds by setting this entry to delayed(5). If the call is recognized by inband authentication (PAP or CHAP) then the actual connection is closed and a callback is performed at once. Setting this value to ppp-offered(4) allows a called peer to call back the calling site if offered by PPP negotiation. For PABX dialout a dialprefix is added to the number, if offered by the calling site (see isdnStkTable). If this object is set to expected(3), only one initial outgoing call is made expecting a callback. If this object is set to ppp-callback-optional(6), the CBCP option 'no callback' is also offered to the Windows client so that the user can decide wether he wants to be called back or not.") biboPPPLayer1Protocol = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))).clone(namedValues=NamedValues(("data-64k", 1), ("data-56k", 2), ("modem", 3), ("dovb", 4), ("v110-1200", 5), ("v110-2400", 6), ("v110-4800", 7), ("v110-9600", 8), ("v110-14400", 9), ("v110-19200", 10), ("v110-38400", 11), ("modem-profile-1", 12), ("modem-profile-2", 13), ("modem-profile-3", 14), ("modem-profile-4", 15), ("modem-profile-5", 16), ("modem-profile-6", 17), ("modem-profile-7", 18), ("modem-profile-8", 19), ("pptp-pns", 20), ("pppoe", 21), ("aodi", 22), ("pptp-pac", 23)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLayer1Protocol.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLayer1Protocol.setDescription('This entry is used to select the layer 1 protocol settings for this partner. Normally the correct entry is hdlc-64.') biboPPPLoginString = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLoginString.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLoginString.setDescription('A textual string containing a login sequence (script) composed of fields in the format [expect send], comparable to chat scripts commonly used on other sytems. This script is required i.e. to establish an asynchronus PPP dialup connection to CompuServe.') biboPPPVJHeaderComp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPVJHeaderComp.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPVJHeaderComp.setDescription('This entry is used to enable Van Jacobsen TCP/IP header compression, which reduces the size of TCP/IP packet headers and increases the efficiency of line utilization.') biboPPPLayer2Mode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("auto", 1), ("dte", 2), ("dce", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLayer2Mode.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLayer2Mode.setDescription('This object specifies the layer 2 mode to be used for a connection. It is only relevant, if the Encapsulation involves an LAPB protocol. This is the case for x25, x25-ppp, ip-lapb, lapb, x31-bchan, x75-ppp, x75btx-ppp, x25-nosig. The Default value of this object is auto. For dialup connection, the layer 2 mode will than be DTE, on the calling side and DCE on the called side. For permanent connections, the layer 2 mode is set at lower layers (for example isdnChType in the isdnChTable). When this object is set to dte or dce, the layer 2 mode will always be DTE or DCE, regardless of the call direction or the settings at the lower layer.') biboPPPDynShortHold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPDynShortHold.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPDynShortHold.setDescription("Optimizes idle time disconnects depending on the charging information received during the connection. This value specifies the minimum inactivity time (channel is silent) in percents of the current charging interval length and is only used for outgoing connections. Incoming connections are disconnected after idle time according to the value biboPPPShortHold. Please note that this only works if your ISDN port has the AOCD service enabled (advice of charging during the call). For instance in Germany this is an extra paid service. (Even the 'Komfortanschluss' does only include AOCE [advice of charge at the end of the call], so AOCD has to be ordered and paid extra.)") biboPPPLocalIdent = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 24), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLocalIdent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLocalIdent.setDescription('This is the local identification string used for PPP authentication(PAP/CHAP). If this entry is empty the variable biboAdmLocalPPPIdent will be used.') biboPPPDNSNegotiation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2), ("dynamic-client", 3), ("dynamic-server", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPDNSNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPDNSNegotiation.setDescription('The IP control protocol extensions as described in RFC 1877 has a means of negotiating primary and secondary Domain Name System (DNS) server addresses. When this option is disabled(1), no DNS negotiation will be performed. If enabled(2), DNS negotiation behavier depends on biboPPPIpAddress switch (client or server mode). Setting to dynamic-client(3), the remote system is asked to tell us the IP-address(es) of primary and/or secondary DNS. Setting to dynamic_server(4), primary and/or secondary DNS IP-address(es) found in biboAdmNameServer or biboAdmNameServ2, if asked, will be send to remote.') biboPPPEncryption = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("mppe-40", 2), ("mppe-128", 3), ("des-56", 4), ("triple-des-168", 5), ("blowfish-168", 6), ("mppe-56", 7), ("mppev2-40", 8), ("mppev2-56", 9), ("mppev2-128", 10), ("blowfish-56", 11)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPEncryption.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEncryption.setDescription("This field specifies the data encryption scheme for en(de)crypting PPP encapsulated multi-protocol datagrams. Setting to mppe-40(2), mppe-128(3) or mppe-56(7) the Microsoft Point to Point Encryption Protocol (MPPE) will be enabled, using a 40 bit, 128 bit respectively 56 bit session key for initializing encryption tables. Setting to mppev2-40(8), mppev2-56(9) or mppev2-128(10) the Microsoft Point to Point Encryption Protocol (MPPE) 'stateless mode' will be enabled, using a 40 bit, 56 bit respectively 128 bit session key.") biboPPPLQMonitoring = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLQMonitoring.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLQMonitoring.setDescription('This parameter enables (2) or disables (1) PPP Link Quality Monitoring (LQM) according RFC 1989. When set to on(2) LQM is added to the list of parameters used in LCP negotiation. If LQM is acknowledged by peer link quality reports will be generated and send periodically.') biboPPPIpPoolId = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 28), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpPoolId.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpPoolId.setDescription('Pool ID value to select an IP address pool for dynamic IP address assignment via IPCP. See also PPPIpAssignTable for further details.') biboPPPSessionTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 29), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPSessionTimeout.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPSessionTimeout.setDescription('Maximum number of seconds before termination the established PPP session, regardless there is any data throughput on the corresponding link(s). When set to 0, there no limit for the duration of the PPP session.') biboPPPStatTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 2), ) if mibBuilder.loadTexts: biboPPPStatTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPStatTable.setDescription('The biboPPPStatTable contains statistical connection- specific information. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP interface is created in the biboPPPTable. Deleting entries: Entries are removed by the system when the corresponding PPP interface is removed.') biboPPPStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPConnIfIndex")) if mibBuilder.loadTexts: biboPPPStatEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPStatEntry.setDescription('') biboPPPConnIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIfIndex.setDescription('Correlating PPP interface index.') biboPPPConnActive = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 250))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnActive.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnActive.setDescription('The actual number of bundled channels.') biboPPPConnProtocols = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnProtocols.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnProtocols.setDescription('The bitwise ORed protocols successfully negotiated on this connection; currently the following protocols are supported: tcp/ip(1), ipx(2), bridge(4), bpdu(8), x25(16). These protocol values are most likely to change in future software releases.') biboPPPConnState = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("idle", 1), ("incoming", 2), ("outgoing", 3), ("connected", 4), ("dataxfer", 5), ("disconnect", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnState.setDescription('The physical state of the link. This field is obsolete and will not be supported in a future release.') biboPPPConnDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnDuration.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnDuration.setDescription('The current link duration on this interface in seconds.') biboPPPConnUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnUnits.setDescription('The current costs on this interface for all member links.') biboPPPConnTransmitOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnTransmitOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnTransmitOctets.setDescription("The octets transmitted on this interface since its last change to the 'up' state.") biboPPPConnReceivedOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnReceivedOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnReceivedOctets.setDescription("The octets received since its last change to the `up' state.") biboPPPConnOutgoingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnOutgoingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnOutgoingCalls.setDescription("The number of outgoing calls on this interface since its last change to the 'up' state.") biboPPPConnOutgoingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnOutgoingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnOutgoingFails.setDescription("The number of outgoing call failures on this interface since its last change to the 'up' state.") biboPPPConnIncomingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnIncomingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIncomingCalls.setDescription('The number of incoming calls on this interface since its last change to the up state.') biboPPPConnIncomingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnIncomingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIncomingFails.setDescription('The number of incoming call failures on this interface since its last change to the up state.') biboPPPTotalDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalDuration.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalDuration.setDescription('The total link duration in seconds.') biboPPPTotalUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalUnits.setDescription('The total costs on this interface for all member links.') biboPPPTotalTransmitOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalTransmitOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalTransmitOctets.setDescription('The total amount of octets transmitted.') biboPPPTotalReceivedOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalReceivedOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalReceivedOctets.setDescription('The total amount of octets received.') biboPPPTotalOutgoingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalOutgoingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalOutgoingCalls.setDescription('The total number of outgoing calls.') biboPPPTotalOutgoingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalOutgoingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalOutgoingFails.setDescription('The total number of outgoing call failures.') biboPPPTotalIncomingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalIncomingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalIncomingCalls.setDescription('The total number of incoming calls.') biboPPPTotalIncomingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalIncomingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalIncomingFails.setDescription('The total number of incoming call failures.') biboPPPThroughput = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPThroughput.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPThroughput.setDescription('The actual thoughput of the interface; updated every 5 seconds.') biboPPPCompressionMode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("inactive", 1), ("active", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPCompressionMode.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCompressionMode.setDescription('This object describes wether data compression is active for this interface. 42bis or Stac LZS compression algorithm can be enabled in the biboPPPTable.') biboPPPChargeInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPChargeInterval.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPChargeInterval.setDescription('Describes the measured interval between charging info elements received from the ISDN network.') biboPPPIdleTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPIdleTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIdleTime.setDescription('The currently measured connection inactivity time (channel is silent).') biboPPPConnCharge = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnCharge.setDescription('The current charge on this interface as 1/1000 of the respective currency.') biboPPPTotalCharge = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalCharge.setDescription('The total charge on this interface as 1/1000 of the respective currency.') pppSessionTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 10), ) if mibBuilder.loadTexts: pppSessionTable.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionTable.setDescription('The pppSessionTable contains statistical information for the PPP protocol. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP connection is created. Deleting entries: Entries are removed by the system when the corresponding PPP connection is terminated.') pppSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppSessionIfIndex")) if mibBuilder.loadTexts: pppSessionEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionEntry.setDescription('') pppSessionIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionIfIndex.setDescription('Correlating PPP interface index.') pppSessionMlp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("negotiated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionMlp.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionMlp.setDescription('Indicates negotiation of Multilink PPP.') pppSessionMru = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionMru.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionMru.setDescription("Peer's MRU/MRRU LCP option.") pppSessionLcpCallback = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("lcp", 2), ("cbcp", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionLcpCallback.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionLcpCallback.setDescription('Callback option inside LCP negotiation.') pppSessionAuthProt = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("pap", 2), ("chap", 3), ("ms-chapv1", 4), ("ms-chapv2", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionAuthProt.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionAuthProt.setDescription('The negotiated PPP authentication protocol.') pppSessionCompression = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("stac", 2), ("ms-stac", 3), ("mppc", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionCompression.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCompression.setDescription('The negotiated CCP compression mode.') pppSessionEncryption = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("mppe-40", 2), ("mppe-128", 3), ("des-56", 4), ("triple-des-168", 5), ("blowfish-168", 6), ("mppe-56", 7), ("mppev2-40", 8), ("mppev2-56", 9), ("mppev2-128", 10), ("blowfish-56", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionEncryption.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionEncryption.setDescription('The negotiated CCP encryption mode.') pppSessionCbcpMode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("no-callback", 2), ("user-specified", 3), ("pre-specified", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionCbcpMode.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCbcpMode.setDescription('The negotiated Callback Control Protocol (CBCP) mode.') pppSessionCbcpDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 60))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionCbcpDelay.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCbcpDelay.setDescription('The negotiated (CBCP) callback delay in seconds.') pppSessionLocIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 10), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionLocIpAddr.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionLocIpAddr.setDescription('The negotiated local IP Address.') pppSessionRemIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 11), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionRemIpAddr.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionRemIpAddr.setDescription('The negotiated remote IP Address.') pppSessionDNS1 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 12), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionDNS1.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionDNS1.setDescription('The negotiated first name server IP address.') pppSessionDNS2 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 13), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionDNS2.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionDNS2.setDescription('The negotiated second name server IP address.') pppSessionWINS1 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 14), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionWINS1.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionWINS1.setDescription('The negotiated first NetBIOS name server (WINS) IP address.') pppSessionWINS2 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 15), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionWINS2.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionWINS2.setDescription('The negotiated second NetBIOS name server (WINS) IP address.') pppSessionVJHeaderComp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("negotiated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionVJHeaderComp.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionVJHeaderComp.setDescription('The negotiation of Van Jacobsen TCP/IP header compression option (IPCP).') pppSessionIpxcpNodeNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 17), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionIpxcpNodeNumber.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionIpxcpNodeNumber.setDescription('Unique IPX Node Id dynamically assigned the client.') pppSessionBacpFavoredPeer = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("local", 2), ("remote", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionBacpFavoredPeer.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionBacpFavoredPeer.setDescription('The result of the BACP Favored-Peer negotiation.') biboPPPLinkTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 3), ) if mibBuilder.loadTexts: biboPPPLinkTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkTable.setDescription('The biboPPPLinkTable contains statistical information for each current PPP link on the system. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP interface is created in the biboPPPTable. Deleting entries: Entries are removed by the system when the corresponding PPP interface is removed.') biboPPPLinkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPLinkIfIndex")) if mibBuilder.loadTexts: biboPPPLinkEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkEntry.setDescription('') biboPPPLinkIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkIfIndex.setDescription('Correlating PPP interface index.') biboPPPLinkEstablished = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 2), Date()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkEstablished.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkEstablished.setDescription('Time when the link was established.') biboPPPLinkDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("incoming-dce", 1), ("outgoing-dte", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkDirection.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkDirection.setDescription('Direction of link, incoming(1) or outgoing(2). In case of permanent links, the meaning is dce(1) or dte(2).') biboPPPLinkProtocols = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkProtocols.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkProtocols.setDescription('The bitwise ORed protocols successfully negotiated on this link; currently the following protocols are supported: tcp/ip(1), ipx(2), bridge(4), bpdu(8), x25(16). These protocol values are most likely to change in future software releases.') biboPPPLinkState = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("starting", 3), ("loopbacked", 4), ("dialing", 5), ("retry-wait", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkState.setDescription('The actual state of each link in a bundle. The link is fully operational in the up(1) state, and not operational in the down(2) state. The starting(3) state is an inter- mediate state when the link is physically established but PPP or other link negotation has not finished yet. The loopbacked(4) state is entered when the PPP keepalive mechanism detects a loopbacked link. The dialing(5) state shows that a dialup link is in its link establishment phase, dialing. If there is no answer to the call, the link enters the retry-wait(6) state for biboPPPRetryTime seconds. After waiting that time either a call retry will occur, or the ifOperStatus will enter the blocked state, depending on the amount of retries already done (biboPPPLinkRetries) and the value of the biboPPPMaxRetries field.') biboPPPLinkUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkUnits.setDescription('The costs for this link in units.') biboPPPLinkRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkRetries.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkRetries.setDescription('The amount of retries taken to establish the link.') biboPPPLinkKeepaliveSent = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkKeepaliveSent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkKeepaliveSent.setDescription('The amount of keepalive packets sent on the link.') biboPPPLinkKeepalivePending = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkKeepalivePending.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkKeepalivePending.setDescription('The amount of keepalive answer packets waiting for since the last occurance of an echo reply packet.') biboPPPLinkDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkDeviceIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkDeviceIndex.setDescription('The underlying link device index.') biboPPPLinkSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkSpeed.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkSpeed.setDescription('The speed of the link.') biboPPPLinkStkNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkStkNumber.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkStkNumber.setDescription('The stack number of the dialup link, correlating to the isdnStkNumber field in the isdnCallTable.') biboPPPLinkCallType = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("undef", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkCallType.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCallType.setDescription('The call type of the dialup link, correlating to the isdnCallType field in the isdnCallTable.') biboPPPLinkCallReference = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkCallReference.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCallReference.setDescription('The call reference of the dialup link, correlating to the isdnCallReference field in the isdnCallTable.') biboPPPLinkCharge = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCharge.setDescription('The costs for this link as 1/1000 of the respective currency.') biboPPPLinkAccm = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 17), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkAccm.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkAccm.setDescription('.') biboPPPLinkLqm = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("negotiated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkLqm.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLqm.setDescription('Indicates the successful negotiation of the Link Quality Protocol (LQM).') biboPPPLinkLcpComp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("addr", 2), ("prot", 3), ("both", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkLcpComp.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLcpComp.setDescription('Address- and Protocol-Field compression.') biboPPPLinkLocDiscr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 20), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkLocDiscr.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLocDiscr.setDescription('Local LCP multilink endpoint discriminator.') biboPPPLinkRemDiscr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 21), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkRemDiscr.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkRemDiscr.setDescription("Peer's LCP multilink endpoint discriminator.") pppLqmTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 6), ) if mibBuilder.loadTexts: pppLqmTable.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmTable.setDescription('The pppLqmTable contains statistical information for each current PPP link on the system. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP link was established and LQM negotiated successful. Deleting entries: Entries are removed by the system when the corresponding PPP link is disconnected.') pppLqmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppLqmIfIndex")) if mibBuilder.loadTexts: pppLqmEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmEntry.setDescription('') pppLqmIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmIfIndex.setDescription('Correlating PPP interface index.') pppLqmCallReference = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmCallReference.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmCallReference.setDescription('The call reference of the dialup link, correlating to the isdnCallReference field in the isdnCallTable.') pppLqmReportingPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmReportingPeriod.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmReportingPeriod.setDescription('The LQMReportingPeriod field indicates the maximum time in hundredths of seconds between transmission of Link Quality Reports (LQR). The peer may transmit packets at a faster rate than that which was negotiated.') pppLqmOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutLQRs.setDescription('Number of transmitted Link Quality Reports (LQR) on this link.') pppLqmOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutPackets.setDescription('Number of transmitted Packets on this link.') pppLqmOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutOctets.setDescription('Number of transmitted Octets on this link, including framing data.') pppLqmInLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInLQRs.setDescription('Number of Link Quality Reports (LQR) received on this link.') pppLqmInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInPackets.setDescription('Number of Packets reveived on this link.') pppLqmInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInOctets.setDescription('Number of Octets reveived on this link, including framing data.') pppLqmInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInDiscards.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInDiscards.setDescription('Number of Packets received on this link, but discarded.') pppLqmInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInErrors.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInErrors.setDescription('Number of errorneous Packets received on this link.') pppLqmPeerOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutLQRs.setDescription('Number of Link Quality Reports (LQR) transmitted by remote on this link.') pppLqmPeerOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutPackets.setDescription('Number of Packets transmitted by remote on this link.') pppLqmPeerOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutOctets.setDescription('Number of Octets transmitted by remote on this link, including framing data.') pppLqmPeerInLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInLQRs.setDescription('Number of Link Quality Reports (LQR) received by remote on this link.') pppLqmPeerInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInPackets.setDescription('Number of Packets reveived by remote on this link.') pppLqmPeerInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInOctets.setDescription('Number of Octets reveived by remote on this link, including framing data.') pppLqmPeerInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInDiscards.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInDiscards.setDescription('Number of Packets received by remote on this link, but discarded.') pppLqmPeerInErrors = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInErrors.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInErrors.setDescription('Number of errorneous Packets received by remote on this link.') pppLqmLostOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutLQRs.setDescription('Number of lost Link Quality Reports (LQR) transmitted on this link.') pppLqmLostOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutPackets.setDescription('Number of lost Packets transmitted on this link.') pppLqmLostOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutOctets.setDescription('Number of lost Octets transmitted on this link.') pppLqmLostPeerOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostPeerOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutLQRs.setDescription('Number of lost Link Quality Reports (LQR) transmitted by remote on this link.') pppLqmLostPeerOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostPeerOutPkts.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutPkts.setDescription('Number of lost Packets transmitted by remote on this link.') pppLqmLostPeerOutOcts = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostPeerOutOcts.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutOcts.setDescription('Number of lost Octets transmitted by remote on this link.') biboPPPIpAssignTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 4), ) if mibBuilder.loadTexts: biboPPPIpAssignTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignTable.setDescription("The biboPPPIpAssignTable contains IP addresses used when dynamically assigning IP addresses; i.e. when the biboPPPIpAddress field is set to `dynamic'. Creating entries: Entries are created by assigning a value (IP address) to the biboPPPIpAssignAddress object. Deleting entries: An entry (address) can be removed by assigning the value `delete' to its biboPPPIpAssignState.") biboPPPIpAssignEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPIpAssignAddress")) if mibBuilder.loadTexts: biboPPPIpAssignEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignEntry.setDescription('Pool of IP addresses for dynamic IP address assignment via IPCP. See the biboPPPIpAddress field for further explanation.') biboPPPIpAssignAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignAddress.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignAddress.setDescription('First IP address of this range.') biboPPPIpAssignState = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unused", 1), ("assigned", 2), ("delete", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignState.setDescription('If an entry is currently in use, the state is set to as- signed(1). Otherwise it is set to unused(2). You may also delete this entry by changing it to delete(3).') biboPPPIpAssignPoolId = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignPoolId.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignPoolId.setDescription('Pool ID value.') biboPPPIpAssignRange = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignRange.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignRange.setDescription('Number of IP addresses that will be assigned starting from biboPPPIpAssignAddress. A range of 0 will disable this entry') pppIpInUseTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 7), ) if mibBuilder.loadTexts: pppIpInUseTable.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseTable.setDescription('The pppIpUseTable contains dynamically assigned IP addresses.') pppIpInUseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppIpInUseAddress")) if mibBuilder.loadTexts: pppIpInUseEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseEntry.setDescription('') pppIpInUseAddress = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseAddress.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseAddress.setDescription('assigned IP address') pppIpInUsePoolId = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUsePoolId.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUsePoolId.setDescription('Unique IP address pool ID') pppIpInUseIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseIfIndex.setDescription('Unique interface index') pppIpInUseIdent = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseIdent.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseIdent.setDescription('The remote authentication identification string.') pppIpInUseState = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("assigned", 1), ("reserved", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseState.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseState.setDescription('If an IP address is currently assigned, the state of this entry is set to assigned(1). Otherwise, after disconnect, it is set to reserved(2) until the same peer reconnects or this entry expires (see pppIpInUseAge).') pppIpInUseAge = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseAge.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseAge.setDescription('This object specifies the age of the entry after creation or after changing into state reserved(2). After expiration the IP address (see pppIpInUseAddress) is no longer reserved for peer specified by pppIpInUseIdent and this entry will be deleted.') biboPPPProfileTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 5), ) if mibBuilder.loadTexts: biboPPPProfileTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileTable.setDescription('The biboPPPProfileTable contains PPP default parameters used for PPP negotiation with unknown dialin partners. For PPP connections, PPP profiles are asigned to incoming connections via the isdnDispatchTable. Currently no entries can be created or deleted by user.') biboPPPProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPProfileName")) if mibBuilder.loadTexts: biboPPPProfileEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileEntry.setDescription('') biboPPPProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("profile-1", 1), ("profile-2", 2), ("profile-3", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPProfileName.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileName.setDescription('The name of the PPP profile. Three profiles are available.') biboPPPProfileAuthProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6, 7, 8))).clone(namedValues=NamedValues(("none", 1), ("pap", 2), ("chap", 3), ("both", 4), ("ms-chap", 6), ("all", 7), ("ms-chapv2", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileAuthProtocol.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileAuthProtocol.setDescription('The type of authentication used on the point-to-point link as described in RFC 1334. See biboPPPAuthentication for further details.') biboPPPProfileAuthRadius = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("inband", 2), ("outband", 3), ("both", 4), ("radius-only", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileAuthRadius.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileAuthRadius.setDescription('This entry is used to configure possible RADIUS authentication on incoming calls. The default value is inband(2), only inband RADIUS requests (PAP, CHAP) are sent to the defined RADIUS server. Outband requests (CALLERID) are sent in outband(3) mode. If set to both(3), both requests are sent. To disable RADIUS requests in the profile set this value to none(1). To disable authentication attempts via the local data base set this value to radius-only(5).') biboPPPProfileLQMonitoring = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileLQMonitoring.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileLQMonitoring.setDescription('This parameter enables (2) or disables (1) PPP Link Quality Monitoring (LQM) according RFC 1989. When set to on(2) LQM is added to the list of parameters acknowledged in LCP negotiation. Link quality reports (LQR) will be generated and send periodically.') biboPPPProfilePPPoEDevIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfilePPPoEDevIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfilePPPoEDevIfIndex.setDescription('Specifies the device to be used for PPP over Ethernet (PPPoE) according RFC 2516.') biboPPPProfileCallbackNegotiation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2), ("cbcp-optional", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileCallbackNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileCallbackNegotiation.setDescription("Specifies wether callback negotiation (LCP/CBCP) is allowed or not. If set to disabled(1), no callback negotiation will be performed or accepted. If set to enabled(2), PPP callback negotation will be accepted on demand. If this object is set to cbcp-optional(3), the CBCP option 'no callback' is also offered to the Windows client so that the user can decide wether he wants to be called back or not.") pppExtIfTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 9), ) if mibBuilder.loadTexts: pppExtIfTable.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfTable.setDescription("The pppExtIfTable contains extended configuration and information related to the PPP interfaces on the system. Entries are optional for each interface and can be added or deleted by the user. Deleting entries: Entries are removed by setting an entry's pppExtIfBodMode object to 'delete'.") pppExtIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppExtIfIndex")) if mibBuilder.loadTexts: pppExtIfEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEntry.setDescription('') pppExtIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfIndex.setDescription('Correlating PPP interface index.') pppExtIfBodMode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("disabled", 1), ("backup", 2), ("bod-active", 3), ("bod-passive", 4), ("bap-active", 5), ("bap-passive", 6), ("delete", 7), ("bap-both", 8), ("bap-first", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfBodMode.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfBodMode.setDescription('Enables bandwidth on demand (BOD) mode for leased line and dialup interfaces when setting to bod-active (3) respectively bod-passive (4) or backup only mode for leased line connections like X.21. When set to disabled (1), neither bandwidth on demand (as specified by the pppExtIfTable) or backup mode is enabled. Four modes (bap-active (5), bap-passive (6), bap-both(7) and bap-first (8)) are available for BAP (Bandwidth Allocation Protocol) support to specify wether BAP Call-Requests and BAP Callback-Requests should be initiated and/or accepted.') pppExtIfAlgorithm = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("equal", 1), ("proportional", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAlgorithm.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAlgorithm.setDescription('The algorithm to use for weighting line utilization. Line utilization is determined by calculating the average load for each interface. When set to equal (1) all samples taken over the time interval (defined in pppExtIfInterval) will be given equal weight, when set to proportional (2) the weighting disproportional to the age of the sample.') pppExtIfInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 300))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfInterval.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfInterval.setDescription('The time interval (in seconds) to use for sampling and calculating of the average throughput of the interface. See also: pppExtIfLoad.') pppExtIfLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppExtIfLoad.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfLoad.setDescription('The actual throughput (in percent) of the total bandwidth of this interface (load). This value is updated once every second.') pppExtIfMlpFragmentation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("proportional", 1), ("equal", 2), ("interleave", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMlpFragmentation.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMlpFragmentation.setDescription('The multilink PPP fragmentation mode. When set to proportional (1) packets will be divided into fragments proportional to the transmission rate of each link, when set to equal (2) packets will be divided into multiple equal fragments (equal to MlpFragSize) such that the number sent on each link is proportional to the transmission rate. When set to interleave (3), large datagrams will be fragmentated (maximum size determined by MlpFragSize) to reduce transmission delay of high-priority traffic on slower links.') pppExtIfMlpFragSize = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(30, 1500))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMlpFragSize.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMlpFragSize.setDescription('The multilink PPP fragment size. If MlpFragmentation is set to proportional (1) this value specifies the minimum size of the fragment in bytes. If MlpFragmentation is set to equal (2) this value specifies the maximum fragment size in bytes.') pppExtIfPPPoEService = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfPPPoEService.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfPPPoEService.setDescription('The PPPoE (PPP over Ethernet, RFC 2516) service name which indicates the requested service during PPPoE discovery stage. Examples of the use of the service name are to indicate an ISP name or a class or a quality of service.') pppExtIfPPPoEAcServer = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfPPPoEAcServer.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfPPPoEAcServer.setDescription('The PPPoE (PPP over Ethernet, RFC 2516) AC-Server name which determines the access concentrator during PPPoE discovery stage.') pppExtIfEncKeyNegotiation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("static", 1), ("authentication", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfEncKeyNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncKeyNegotiation.setDescription("This variable defines the specification of shared secrets (encryption keys) between the sender and receiver of encrypted data. If set to static (1), the keys specified in 'pppExtIfEncTxKey' and 'pppExtIfEncRxKey' will be used, if set to authentication (2), the key derivation is based on PPP authentication via CHAP or MS-CHAP.") pppExtIfEncTxKey = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 11), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfEncTxKey.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncTxKey.setDescription("Static (encryption) key used for transmission of encrypted data via PPP. It's size depends on the used encryption algorithm and the corresponding key length, e.g. 'des_56' or 'blowfish_168'.") pppExtIfEncRxKey = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 12), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfEncRxKey.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncRxKey.setDescription("Static (decryption) key used for decryption of encrypted data received on PPP connections. It's size depends on the used encryption algorithm and the corresponding key length, e.g. 'des_56' or 'blowfish_168'.") pppExtIfGearUpThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearUpThreshold.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearUpThreshold.setDescription('Gear up threshold for invoking current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with this value once per second. If exceeded longer than 5 seconds an additional B-channel will be requested.') pppExtIfGearDownThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearDownThreshold.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearDownThreshold.setDescription('Gear down threshold for decreasing current bandwidth. The expected throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) after dropping a B-channel is compared with this threshold value once per second. If the needed bandwidth falls below this threshold longer than 10 seconds, exactly one B-channel will be dropped.') pppExtIfAodiDChanQlen = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 15), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAodiDChanQlen.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAodiDChanQlen.setDescription('Upper threshold for the amount of data (in octets) waiting to be sent across the 9.6Kbit/sec D-channel. If exceeded, additional bandwidth will be invoked at once.') pppExtIfAodiGearDownTxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAodiGearDownTxRate.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAodiGearDownTxRate.setDescription('Lower threshold for the amount of data in bits per second to be sent across the 64Kbit/sec B-channel. If the measured throughput becomes smaller than this value over a period of pppExtIfGearDownPersistance seconds, the remaining B-channel will be dropped.') pppExtIfGearUpPersistance = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearUpPersistance.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearUpPersistance.setDescription('Gear up persistence interval for invoking current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with the current value of the variable pppExtIfGearUpThreshold once per second. If exceeded longer than pppExtIfGearUpPersistance seconds an additional B-channel will be requested.') pppExtIfGearDownPersistance = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearDownPersistance.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearDownPersistance.setDescription('Gear down persistence interval for decreasing current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with the current value of pppExtIfGearDownThreshold once per second. If exceeded longer than pppExtIfGearDownPersistance seconds, exactly one B-channel will be dropped.') pppExtIfL1Speed = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 19), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfL1Speed.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfL1Speed.setDescription("This object contains the interface's nominal bandwidth in bits per second. Please note that this parameter may not represent the real available transmission rate. The current purpose is only informational for example for PPTP or PPPoE interfaces where no accurate information from the underlaying network is available.") pppExtIfCurrentRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 36000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfCurrentRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfCurrentRetryTime.setDescription('Current time in seconds to wait before retrying a call when the smart retry algorithm is implemented.') pppExtIfMaxRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 36000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMaxRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMaxRetryTime.setDescription('Maximum time in seconds to wait before retrying a call when the smart retry algorithm is implemented. When set to zero this algorithm is disabled.') pppExtIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8192))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMtu.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMtu.setDescription('Determines size of the largest datagram which can be sent on the interface, specified in octets (see ifMtu). When set to zero (default), the value of the variable ifMtu depends on the received LCP MRU/MRRU option.') pppExtIfMru = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8192))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMru.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMru.setDescription('The maximum length for the PPP information field, including padding, but not including the protocol field, is termed the Maximum Receive Unit (MRU).') pppExtIfAuthMutual = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAuthMutual.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAuthMutual.setDescription('This object enables mutual PPP authentication between the peers.') biboDialTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 4, 1), ) if mibBuilder.loadTexts: biboDialTable.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTable.setDescription("The biboDialTable contains configuration information for incoming and outgoing ISDN telephone numbers. Creating entries: Entries are created by assigning a value to the biboDialIfIndex object. Deleting entries: An entry can be removed by assigning the value `delete' to its biboDialType object.") biboDialEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboDialIfIndex")) if mibBuilder.loadTexts: biboDialEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboDialEntry.setDescription('') biboDialIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboDialIfIndex.setDescription('The correlating PPP interface index.') biboDialType = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("isdn", 1), ("isdn-spv", 2), ("delete", 3), ("ppp-callback", 4), ("ppp-negotiated", 5), ("x25-dialout", 6), ("ip", 7), ("x25", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialType.setStatus('mandatory') if mibBuilder.loadTexts: biboDialType.setDescription('The dialup type can be set to plain isdn(1), isdn-spv(2) semi-permanent links used by the German 1TR6 D-channel protocol, or to delete(3) to delete a biboDialTable entry. The types ppp-callback(4) and ppp-negotiated(5) are used for the LCP callback option.') biboDialDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("both", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialDirection.setStatus('mandatory') if mibBuilder.loadTexts: biboDialDirection.setDescription('The allowed dial direction is either incoming(1), outgoing(2), or both(3) calls. No call is ever set up when set to incoming(1). Incoming calls will not be identified when set to outoing(2). Furthermore, once PPP authentication succeeds and there is at least one incoming number defined but for which none matches, the call will not be accepted for security reasons.') biboDialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialNumber.setStatus('mandatory') if mibBuilder.loadTexts: biboDialNumber.setDescription("The defined dialing number. Used for either dialing or comparing to incoming calls or both, depending on the content of the biboDialDirection field. The wildcards '*', '?', '[', ']', '{', '}' may be used.") biboDialSubaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 5), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialSubaddress.setStatus('mandatory') if mibBuilder.loadTexts: biboDialSubaddress.setDescription('The defined dial subaddress, if any. Also, see the biboDialNumber field.') biboDialClosedUserGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9999))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialClosedUserGroup.setStatus('mandatory') if mibBuilder.loadTexts: biboDialClosedUserGroup.setDescription('The defined closed user group, if any. Also, see the biboDialNumber field.') biboDialStkMask = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 7), BitValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialStkMask.setStatus('mandatory') if mibBuilder.loadTexts: biboDialStkMask.setDescription('The defined stack mask. Each value of IsdnStkNumber represents a bit in this bitmask. A mask of 0 disables dialup completely, while a mask of -1 enables dialup on all available ISDN stacks.') biboDialScreening = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("user", 1), ("user-verified", 2), ("user-failed", 3), ("network", 4), ("dont-care", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialScreening.setStatus('mandatory') if mibBuilder.loadTexts: biboDialScreening.setDescription("The screening indicator of the biboDialNumber. The biboDialScreening field can be used to gauge the `trustworthiness' of the biboDialNumber field. (See isdnCallScreening) Indicators are ordered from highest to lowest as follows: indicator: CPN assigned: verification: `network' by network none `user-verified' by user verification successful `user' by user none `user-failed' by user verification failed Set this field to `dont-care' to accept all calls. Otherwise calls are accepted only if the screening indicator matches or is higher than the set value.") biboDialCallingSubaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 9), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialCallingSubaddress.setStatus('mandatory') if mibBuilder.loadTexts: biboDialCallingSubaddress.setDescription('The defined calling dial subaddress, if any. Also, see the biboDialNumber field.') biboDialTypeOfCallingSubAdd = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("nsap", 1), ("user-specified", 2), ("reserved", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialTypeOfCallingSubAdd.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTypeOfCallingSubAdd.setDescription('The type of calling party subaddress.') biboDialTypeOfCalledSubAdd = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("nsap", 1), ("user-specified", 2), ("reserved", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialTypeOfCalledSubAdd.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTypeOfCalledSubAdd.setDescription('The type of called party subaddress.') mibBuilder.exportSymbols("BIANCA-BRICK-PPP-MIB", pppExtIfAodiDChanQlen=pppExtIfAodiDChanQlen, biboDialTable=biboDialTable, pppSessionDNS1=pppSessionDNS1, biboPPPLinkTable=biboPPPLinkTable, pppLqmLostOutOctets=pppLqmLostOutOctets, biboPPPIpAssignPoolId=biboPPPIpAssignPoolId, bintec=bintec, pppSessionLocIpAddr=pppSessionLocIpAddr, biboPPPConnIfIndex=biboPPPConnIfIndex, biboPPPConnIncomingCalls=biboPPPConnIncomingCalls, biboPPPLinkEntry=biboPPPLinkEntry, biboPPPIfIndex=biboPPPIfIndex, biboPPPMinConn=biboPPPMinConn, pppLqmPeerInLQRs=pppLqmPeerInLQRs, pppLqmLostOutLQRs=pppLqmLostOutLQRs, pppSessionCompression=pppSessionCompression, pppExtIfLoad=pppExtIfLoad, biboPPPLinkKeepalivePending=biboPPPLinkKeepalivePending, biboPPPVJHeaderComp=biboPPPVJHeaderComp, biboPPPProfileCallbackNegotiation=biboPPPProfileCallbackNegotiation, dialmap=dialmap, biboPPPTotalIncomingCalls=biboPPPTotalIncomingCalls, biboDialCallingSubaddress=biboDialCallingSubaddress, biboPPPConnOutgoingFails=biboPPPConnOutgoingFails, biboPPPEncapsulation=biboPPPEncapsulation, biboDialNumber=biboDialNumber, biboPPPLinkKeepaliveSent=biboPPPLinkKeepaliveSent, biboPPPRetryTime=biboPPPRetryTime, dod=dod, pppLqmPeerInOctets=pppLqmPeerInOctets, pppExtIfPPPoEService=pppExtIfPPPoEService, biboPPPConnReceivedOctets=biboPPPConnReceivedOctets, biboPPPMaxRetries=biboPPPMaxRetries, biboPPPLinkState=biboPPPLinkState, biboPPPTotalTransmitOctets=biboPPPTotalTransmitOctets, biboPPPLinkIfIndex=biboPPPLinkIfIndex, pppLqmOutLQRs=pppLqmOutLQRs, pppLqmPeerInErrors=pppLqmPeerInErrors, pppIpInUseTable=pppIpInUseTable, biboPPPType=biboPPPType, pppLqmInOctets=pppLqmInOctets, pppSessionEntry=pppSessionEntry, pppIpInUseIfIndex=pppIpInUseIfIndex, biboPPPCallback=biboPPPCallback, biboPPPProfileAuthRadius=biboPPPProfileAuthRadius, biboDialScreening=biboDialScreening, pppSessionRemIpAddr=pppSessionRemIpAddr, ppp=ppp, biboPPPTotalCharge=biboPPPTotalCharge, biboPPPConnOutgoingCalls=biboPPPConnOutgoingCalls, biboPPPLinkLqm=biboPPPLinkLqm, biboPPPLinkCallType=biboPPPLinkCallType, biboPPPStatEntry=biboPPPStatEntry, private=private, pppSessionCbcpMode=pppSessionCbcpMode, biboDialDirection=biboDialDirection, biboPPPProfileAuthProtocol=biboPPPProfileAuthProtocol, pppLqmEntry=pppLqmEntry, pppExtIfEncTxKey=pppExtIfEncTxKey, biboPPPLinkCallReference=biboPPPLinkCallReference, biboPPPProfileEntry=biboPPPProfileEntry, biboPPPIpAddress=biboPPPIpAddress, biboPPPLinkLocDiscr=biboPPPLinkLocDiscr, pppSessionVJHeaderComp=pppSessionVJHeaderComp, pppExtIfTable=pppExtIfTable, pppExtIfGearUpThreshold=pppExtIfGearUpThreshold, biboPPPLinkLcpComp=biboPPPLinkLcpComp, biboPPPIpAssignEntry=biboPPPIpAssignEntry, internet=internet, pppIpInUseState=pppIpInUseState, biboPPPMaxConn=biboPPPMaxConn, pppLqmLostPeerOutOcts=pppLqmLostPeerOutOcts, pppLqmInErrors=pppLqmInErrors, biboPPPTotalUnits=biboPPPTotalUnits, pppExtIfAodiGearDownTxRate=pppExtIfAodiGearDownTxRate, pppExtIfAlgorithm=pppExtIfAlgorithm, pppLqmInPackets=pppLqmInPackets, pppLqmPeerOutLQRs=pppLqmPeerOutLQRs, biboPPPTotalReceivedOctets=biboPPPTotalReceivedOctets, biboPPPLocalIdent=biboPPPLocalIdent, biboPPPSessionTimeout=biboPPPSessionTimeout, pppSessionMlp=pppSessionMlp, biboPPPLinkCharge=biboPPPLinkCharge, pppSessionIfIndex=pppSessionIfIndex, biboPPPLinkSpeed=biboPPPLinkSpeed, pppLqmPeerOutOctets=pppLqmPeerOutOctets, biboPPPStatTable=biboPPPStatTable, pppSessionLcpCallback=pppSessionLcpCallback, pppLqmInDiscards=pppLqmInDiscards, pppLqmLostPeerOutLQRs=pppLqmLostPeerOutLQRs, pppIpInUseAge=pppIpInUseAge, pppExtIfAuthMutual=pppExtIfAuthMutual, biboDialStkMask=biboDialStkMask, biboPPPIpAssignRange=biboPPPIpAssignRange, pppLqmReportingPeriod=pppLqmReportingPeriod, pppExtIfIndex=pppExtIfIndex, pppExtIfBodMode=pppExtIfBodMode, pppLqmIfIndex=pppLqmIfIndex, biboDialClosedUserGroup=biboDialClosedUserGroup, biboPPPLayer2Mode=biboPPPLayer2Mode, pppSessionWINS2=pppSessionWINS2, biboPPPLinkRetries=biboPPPLinkRetries, biboPPPConnActive=biboPPPConnActive, enterprises=enterprises, pppExtIfEncKeyNegotiation=pppExtIfEncKeyNegotiation, pppLqmCallReference=pppLqmCallReference, pppExtIfEntry=pppExtIfEntry, pppExtIfMlpFragmentation=pppExtIfMlpFragmentation, pppExtIfMlpFragSize=pppExtIfMlpFragSize, pppLqmPeerInDiscards=pppLqmPeerInDiscards, biboPPPConnCharge=biboPPPConnCharge, pppLqmLostOutPackets=pppLqmLostOutPackets, pppLqmPeerInPackets=pppLqmPeerInPackets, pppLqmOutOctets=pppLqmOutOctets, pppIpInUsePoolId=pppIpInUsePoolId, biboPPPConnUnits=biboPPPConnUnits, biboDialIfIndex=biboDialIfIndex, pppExtIfGearDownPersistance=pppExtIfGearDownPersistance, biboPPPConnDuration=biboPPPConnDuration, pppLqmOutPackets=pppLqmOutPackets, pppSessionIpxcpNodeNumber=pppSessionIpxcpNodeNumber, biboPPPEntry=biboPPPEntry, pppLqmPeerOutPackets=pppLqmPeerOutPackets, biboPPPAuthentication=biboPPPAuthentication, biboPPPIdleTime=biboPPPIdleTime, pppExtIfGearUpPersistance=pppExtIfGearUpPersistance, pppExtIfEncRxKey=pppExtIfEncRxKey, biboPPPLinkEstablished=biboPPPLinkEstablished, pppExtIfMru=pppExtIfMru, biboPPPEncryption=biboPPPEncryption, pppSessionDNS2=pppSessionDNS2, bibo=bibo, biboPPPLinkAccm=biboPPPLinkAccm, biboPPPProfilePPPoEDevIfIndex=biboPPPProfilePPPoEDevIfIndex, biboPPPIpAssignTable=biboPPPIpAssignTable, pppSessionBacpFavoredPeer=pppSessionBacpFavoredPeer, biboPPPConnProtocols=biboPPPConnProtocols, Date=Date, biboPPPTotalDuration=biboPPPTotalDuration, pppSessionMru=pppSessionMru, biboPPPLinkProtocols=biboPPPLinkProtocols, biboPPPTable=biboPPPTable, biboPPPInitConn=biboPPPInitConn, biboPPPDynShortHold=biboPPPDynShortHold, pppLqmInLQRs=pppLqmInLQRs, pppExtIfL1Speed=pppExtIfL1Speed, pppSessionCbcpDelay=pppSessionCbcpDelay, pppIpInUseEntry=pppIpInUseEntry, biboPPPConnState=biboPPPConnState, biboPPPTotalOutgoingFails=biboPPPTotalOutgoingFails, biboPPPLinkDirection=biboPPPLinkDirection, biboPPPIpAssignAddress=biboPPPIpAssignAddress, biboPPPKeepalive=biboPPPKeepalive, biboPPPLinkUnits=biboPPPLinkUnits, biboPPPTotalOutgoingCalls=biboPPPTotalOutgoingCalls, biboPPPCompressionMode=biboPPPCompressionMode, pppExtIfCurrentRetryTime=pppExtIfCurrentRetryTime, biboPPPThroughput=biboPPPThroughput, biboPPPCompression=biboPPPCompression, pppExtIfGearDownThreshold=pppExtIfGearDownThreshold, biboPPPProfileName=biboPPPProfileName, BitValue=BitValue, biboPPPLinkDeviceIndex=biboPPPLinkDeviceIndex, biboPPPLoginString=biboPPPLoginString, biboPPPConnTransmitOctets=biboPPPConnTransmitOctets, biboPPPIpPoolId=biboPPPIpPoolId, biboPPPTimeout=biboPPPTimeout, biboPPPAuthIdent=biboPPPAuthIdent, biboDialEntry=biboDialEntry, biboPPPLQMonitoring=biboPPPLQMonitoring, biboDialSubaddress=biboDialSubaddress, pppExtIfMaxRetryTime=pppExtIfMaxRetryTime, biboDialTypeOfCalledSubAdd=biboDialTypeOfCalledSubAdd, biboDialTypeOfCallingSubAdd=biboDialTypeOfCallingSubAdd, biboPPPDNSNegotiation=biboPPPDNSNegotiation, pppIpInUseIdent=pppIpInUseIdent, pppSessionEncryption=pppSessionEncryption, biboPPPShortHold=biboPPPShortHold, biboPPPConnIncomingFails=biboPPPConnIncomingFails, pppLqmTable=pppLqmTable, biboPPPChargeInterval=biboPPPChargeInterval, biboPPPLinkStkNumber=biboPPPLinkStkNumber, biboPPPLayer1Protocol=biboPPPLayer1Protocol, biboPPPAuthSecret=biboPPPAuthSecret, pppIpInUseAddress=pppIpInUseAddress, pppExtIfMtu=pppExtIfMtu, pppExtIfInterval=pppExtIfInterval, biboPPPProfileLQMonitoring=biboPPPProfileLQMonitoring, pppExtIfPPPoEAcServer=pppExtIfPPPoEAcServer, pppSessionAuthProt=pppSessionAuthProt, biboPPPLinkRemDiscr=biboPPPLinkRemDiscr, org=org, pppLqmLostPeerOutPkts=pppLqmLostPeerOutPkts, pppSessionWINS1=pppSessionWINS1, pppSessionTable=pppSessionTable, biboPPPIpAssignState=biboPPPIpAssignState, biboDialType=biboDialType, biboPPPProfileTable=biboPPPProfileTable, biboPPPTotalIncomingFails=biboPPPTotalIncomingFails, biboPPPBlockTime=biboPPPBlockTime)
162.360134
7,752
0.783718
12,155
96,929
6.24928
0.096833
0.059716
0.104502
0.010321
0.481688
0.346656
0.286585
0.266364
0.222788
0.216127
0
0.049135
0.098185
96,929
596
7,753
162.63255
0.819853
0.003446
0
0.003407
0
0.11925
0.374506
0.00409
0
0
0
0
0
1
0
false
0.042589
0.010221
0
0.013629
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