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
380daa42cadd31ed7ecf0e18e0921d5092d83637
1,077
py
Python
tools/scitools/conf/understand/python/python3/time.py
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
1
2020-01-20T21:26:46.000Z
2020-01-20T21:26:46.000Z
tools/scitools/conf/understand/python/python3/time.py
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/python/python3/time.py
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
import __builtin__ class struct_time(__builtin__.object): def __add__(): pass def __contains__(): pass def __eq__(): pass def __ge__(): pass def __getitem__(): pass def __getslice__(): pass def __gt__(): pass def __hash__(): pass def __le__(): pass def __len__(): pass def __lt__(): pass def __mul__(): pass def __ne__(): pass def __reduce__(): pass def __repr__(): pass def __rmul__(): pass tm_hour = 0 tm_isdst = 0 tm_mday = 0 tm_min = 0 tm_mon = 0 tm_sec = 0 tm_wday = 0 tm_yday = 0 tm_year = 0 __new__ = 0 n_fields = 9 n_sequence_fields = 9 n_unnamed_fields = 0 def asctime(): pass def clock(): pass def ctime(): pass def gmtime(): pass def localtime(): pass def mktime(): pass def sleep(): pass def strftime(): pass def strptime(): pass def time(): pass accept2dyear = 1 altzone = 14400 daylight = 1 timezone = 18000 tzname = ('Eastern Standard Time', 'Eastern Daylight Time')
21.979592
60
0.588672
140
1,077
3.878571
0.428571
0.309392
0.029466
0
0
0
0
0
0
0
0
0.035088
0.311978
1,077
48
61
22.4375
0.697706
0
0
0
0
0
0.040816
0
0
0
0
0
0
1
0.565217
false
0.565217
0.021739
0
0.891304
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
1
0
0
1
0
0
4
3818c751e8a55d4bccb9a723f6b94b6817de2c4b
221
py
Python
terrascript/resource/mailgun.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/resource/mailgun.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/resource/mailgun.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/resource/mailgun.py import terrascript class mailgun_domain(terrascript.Resource): pass class mailgun_route(terrascript.Resource): pass __all__ = [ "mailgun_domain", "mailgun_route", ]
13
43
0.733032
23
221
6.695652
0.434783
0.37013
0.298701
0
0
0
0
0
0
0
0
0
0.171946
221
16
44
13.8125
0.84153
0.140271
0
0.222222
0
0
0.143617
0
0
0
0
0
0
1
0
false
0.222222
0.111111
0
0.333333
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
1
0
0
0
0
0
4
384be0c70ef718e7edcf3f413d8f9baa289e6099
167
py
Python
tests/tests/__init__.py
tkw1536/django_selenium_test
a461c66f70911c3b88bfcfe570ec3064328da048
[ "BSD-3-Clause" ]
null
null
null
tests/tests/__init__.py
tkw1536/django_selenium_test
a461c66f70911c3b88bfcfe570ec3064328da048
[ "BSD-3-Clause" ]
null
null
null
tests/tests/__init__.py
tkw1536/django_selenium_test
a461c66f70911c3b88bfcfe570ec3064328da048
[ "BSD-3-Clause" ]
null
null
null
import os import django from django.core import management os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" django.setup() management.call_command("migrate")
18.555556
55
0.802395
22
167
5.954545
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.08982
167
8
56
20.875
0.861842
0
0
0
0
0
0.257485
0.131737
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
69b8e489af8bf6504c597933532e99a0ba6ce6fd
195
py
Python
audit/message.py
ukncsc/edge-mod
95737e71945f4a8823f20a554e5efb9841183a26
[ "Unlicense" ]
2
2016-08-23T07:55:01.000Z
2016-09-27T15:13:32.000Z
audit/message.py
ukncsc/edge-mod
95737e71945f4a8823f20a554e5efb9841183a26
[ "Unlicense" ]
null
null
null
audit/message.py
ukncsc/edge-mod
95737e71945f4a8823f20a554e5efb9841183a26
[ "Unlicense" ]
2
2020-10-02T13:27:10.000Z
2021-04-11T09:45:16.000Z
def format_audit_message(error_message, user_message): message = error_message if user_message: message = message + ('\n' if message else '') + user_message return message
21.666667
68
0.692308
24
195
5.333333
0.416667
0.257813
0.296875
0
0
0
0
0
0
0
0
0
0.225641
195
8
69
24.375
0.847682
0
0
0
0
0
0.010309
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
69c03eee95aa90a1115eb85323aa25a45304415b
7,966
py
Python
tests/chain/fixtures.py
tsifrer/ark
c678091e226d79fabe4a2c554e1d8e704a5b5cec
[ "MIT" ]
5
2019-02-01T01:22:27.000Z
2019-05-24T12:20:38.000Z
tests/chain/fixtures.py
tsifrer/ark
c678091e226d79fabe4a2c554e1d8e704a5b5cec
[ "MIT" ]
15
2019-03-29T13:12:10.000Z
2019-08-25T19:19:35.000Z
tests/chain/fixtures.py
tsifrer/ark
c678091e226d79fabe4a2c554e1d8e704a5b5cec
[ "MIT" ]
4
2019-01-31T13:52:03.000Z
2020-08-12T02:12:03.000Z
import pytest from chain.crypto.constants import TRANSACTION_TYPE_TRANSFER from chain.crypto.objects.block import Block from chain.crypto.objects.transactions import BaseTransaction @pytest.fixture def dummy_block_full_hash(): return ( "0000000078d07901593a22002b324b8b33a85802020000007c5c3b0000000000801d2c04000000" "0000c2eb0b00000000e00000003784b953afcf936bdffd43fdf005b5732b49c1fc6b11e195c364" "c20b2eb06282020f5df4d2bc736d12ce43af5b1663885a893fade7ee5e62b3cc59315a63e6a325" "3045022100eee6c37b5e592e99811d588532726353592923f347c701d52912e6d583443e400220" "277ffe38ad31e216ba0907c4738fed19b2071246b150c72c0a52bae4477ebe29a6000000ae0000" "00ff011700f515ff03034affdee0ef07d4f07fda19fc2be5b80adccc842445a187b2f80f2bb45c" "72c498f0370500000000000c5061747269636b205374617200e1f5050000000000000000170033" "5034427032fb2c2eee9c59e7f7c0eae0c0de3045022100f0e49ea11b99410ecb3a3b449659496f" "934ab5af8028701108f4df41c8e1feac02205c2cfd5e7c11d6dd8b206e631a445f676f8b23ea0c" "cc74bc802eb03abbec8092ff0117002b16ff0303e88b0c85ea85697c3db8fd6ea08bba896339ed" "edff04439f48c54d36e2ff9853a0860100000000001553706f6e6765626f622053717561726570" "616e747320145d0000000000000000001770777697adc76d51577c83bf2f3dfcb67acbe3063044" "022005e701c02340a0e929b223b6a545e6dcb1b0f2faf6eaaed51291cd5fa69fd14302206093f9" "d358579f44c304b1e854e7282ba48be79272c8f895dfc555e1937684c4" ).encode("utf-8") @pytest.fixture def dummy_block_hash(): return ( "0000000078d07901593a22002b324b8b33a85802020000007c5c3b0000000000801d2c04000000" "0000c2eb0b00000000e00000003784b953afcf936bdffd43fdf005b5732b49c1fc6b11e195c364" "c20b2eb06282020f5df4d2bc736d12ce43af5b1663885a893fade7ee5e62b3cc59315a63e6a325" "3045022100eee6c37b5e592e99811d588532726353592923f347c701d52912e6d583443e400220" "277ffe38ad31e216ba0907c4738fed19b2071246b150c72c0a52bae4477ebe29" ).encode("utf-8") @pytest.fixture def dummy_transaction_hash(): return ( "ff011700f515ff03034affdee0ef07d4f07fda19fc2be5b80adccc842445a187b2f80f2bb45c72" "c498f0370500000000000c5061747269636b205374617200e1f505000000000000000017003350" "34427032fb2c2eee9c59e7f7c0eae0c0de3045022100f0e49ea11b99410ecb3a3b449659496f93" "4ab5af8028701108f4df41c8e1feac02205c2cfd5e7c11d6dd8b206e631a445f676f8b23ea0ccc" "74bc802eb03abbec8092" ).encode("utf-8") @pytest.fixture def dummy_transaction(): return { "type": 0, "amount": 100000000, "fee": 342000, "recipientId": "AFnw7orqn9B4HBKrKawJgfn5dvoL7zr38B", "timestamp": 67048949, "asset": {}, "vendorField": "Patrick Star", "senderPublicKey": ( "034affdee0ef07d4f07fda19fc2be5b80adccc842445a187b2f80f2bb45c72c498" ), "signature": ( "3045022100f0e49ea11b99410ecb3a3b449659496f934ab5af8028701108f4df41c8e1feac" "02205c2cfd5e7c11d6dd8b206e631a445f676f8b23ea0ccc74bc802eb03abbec8092" ), "id": "f861b25c9a87fc8913282da8855ee63b9cbaa9324543377a5bdfc5afccb92aaa", "senderId": "AS2YSSDbbXBAehfbm1KAEvJMJFdPPT2aRT", "broadcast": False, } @pytest.fixture def dummy_transaction_2(): return { "type": 0, "amount": 6100000, "fee": 100000, "recipientId": "AS2YSSDbbXBAehfbm1KAEvJMJFdPPT2aRT", "timestamp": 67049003, "asset": {}, "vendorField": "Spongebob Squarepants", "senderPublicKey": ( "03e88b0c85ea85697c3db8fd6ea08bba896339ededff04439f48c54d36e2ff9853" ), "signature": ( "3044022005e701c02340a0e929b223b6a545e6dcb1b0f2faf6eaaed51291cd5fa69fd14302" "206093f9d358579f44c304b1e854e7282ba48be79272c8f895dfc555e1937684c4" ), "id": "c326a19ededdd77eba08b560488c243c2568b728f3a752e137b68713685510c7", "senderId": "AFnw7orqn9B4HBKrKawJgfn5dvoL7zr38B", "broadcast": False, } @pytest.fixture def dummy_block(dummy_transaction, dummy_transaction_2): dummy_transaction["block_id"] = "10977713934532967004" dummy_transaction_2["block_id"] = "10977713934532967004" return { "id": "10977713934532967004", "version": 0, "height": 2243161, "timestamp": 24760440, "previousBlock": "3112633353705641986", "numberOfTransactions": 2, "totalAmount": "3890300", "totalFee": "70000000", "reward": "200000000", "payloadLength": 224, "payloadHash": ( "3784b953afcf936bdffd43fdf005b5732b49c1fc6b11e195c364c20b2eb06282" ), "generatorPublicKey": ( "020f5df4d2bc736d12ce43af5b1663885a893fade7ee5e62b3cc59315a63e6a325" ), "blockSignature": ( "3045022100eee6c37b5e592e99811d588532726353592923f347c701d52912e6d583443e40" "0220277ffe38ad31e216ba0907c4738fed19b2071246b150c72c0a52bae4477ebe29" ), "transactions": [dummy_transaction, dummy_transaction_2], } @pytest.fixture def crypto_transaction(): transaction = BaseTransaction( type=TRANSACTION_TYPE_TRANSFER, timestamp=67048949, sender_public_key=( "034affdee0ef07d4f07fda19fc2be5b80adccc842445a187b2f80f2bb45c72c498" # Address: AS2YSSDbbXBAehfbm1KAEvJMJFdPPT2aRT ), fee=342000, amount=100000000, expiration=0, recipient_id="AFnw7orqn9B4HBKrKawJgfn5dvoL7zr38B", vendor_field="Patrick Star", id="f861b25c9a87fc8913282da8855ee63b9cbaa9324543377a5bdfc5afccb92aaa", signature=( "3045022100f0e49ea11b99410ecb3a3b449659496f934ab5af8028701108f4df41c8e1feac0220" "5c2cfd5e7c11d6dd8b206e631a445f676f8b23ea0ccc74bc802eb03abbec8092" ), sequence=0, ) return transaction @pytest.fixture def crypto_transaction_2(): transaction = BaseTransaction( type=TRANSACTION_TYPE_TRANSFER, timestamp=67049003, sender_public_key=( "03e88b0c85ea85697c3db8fd6ea08bba896339ededff04439f48c54d36e2ff9853" # Address: AFnw7orqn9B4HBKrKawJgfn5dvoL7zr38B ), fee=100000, amount=6100000, recipient_id="AS2YSSDbbXBAehfbm1KAEvJMJFdPPT2aRT", vendor_field="Spongebob Squarepants", id="c326a19ededdd77eba08b560488c243c2568b728f3a752e137b68713685510c7", signature=( "3044022005e701c02340a0e929b223b6a545e6dcb1b0f2faf6eaaed51291cd5fa69fd143022060" "93f9d358579f44c304b1e854e7282ba48be79272c8f895dfc555e1937684c4" ), ) return transaction @pytest.fixture def crypto_block(crypto_transaction, crypto_transaction_2): # TODO: Block is not from testnet and it has wrong data and signature # Change it once we're able to forge blocks with our code block = Block( height=2243161, id="10977713934532967004", id_hex=b"9858aca939b17a5c", number_of_transactions=2, payload_hash=( "3784b953afcf936bdffd43fdf005b5732b49c1fc6b11e195c364c20b2eb06282" ), payload_length=224, previous_block="3112633353705641986", previous_block_hex=b"2b324b8b33a85802", reward=200000000, timestamp=24760440, total_amount=3890300, total_fee=70000000, version=0, generator_public_key=( "020f5df4d2bc736d12ce43af5b1663885a893fade7ee5e62b3cc59315a63e6a325" ), block_signature=( "3045022100eee6c37b5e592e99811d588532726353592923f347c701d52912e6d583443e40022" "0277ffe38ad31e216ba0907c4738fed19b2071246b150c72c0a52bae4477ebe29" ), ) crypto_transaction.block_id = "7176646138626297930" crypto_transaction_2.block_id = "7176646138626297930" block.transactions = [crypto_transaction, crypto_transaction_2] return block
38.858537
92
0.735626
379
7,966
15.292876
0.385224
0.020186
0.024845
0.021739
0.217046
0.177881
0.041235
0.014493
0
0
0
0.423668
0.199096
7,966
204
93
39.04902
0.484796
0.026488
0
0.379888
0
0
0.549032
0.463484
0
0
0
0.004902
0
1
0.050279
false
0
0.022346
0.027933
0.122905
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
69c763d107659e0c30bc934653a8920daf44f5c4
18,764
py
Python
spykeutils/tests/test_tools.py
rproepp/spykeutils
0bdae5fc6493b01bc9744a84b0c288ae49a5614d
[ "BSD-3-Clause" ]
5
2015-06-01T04:07:13.000Z
2022-03-16T13:24:16.000Z
spykeutils/tests/test_tools.py
rproepp/spykeutils
0bdae5fc6493b01bc9744a84b0c288ae49a5614d
[ "BSD-3-Clause" ]
2
2015-07-05T22:42:39.000Z
2019-02-08T21:02:51.000Z
spykeutils/tests/test_tools.py
rproepp/spykeutils
0bdae5fc6493b01bc9744a84b0c288ae49a5614d
[ "BSD-3-Clause" ]
4
2015-10-23T11:35:07.000Z
2019-02-06T18:05:17.000Z
try: import unittest2 as ut assert ut # Suppress pyflakes warning about redefinition of unused ut except ImportError: import unittest as ut from builders import arange_spikes from numpy.testing import assert_array_equal, assert_array_almost_equal from spykeutils import tools import neo import neo.io.tools import neo.test.tools import quantities as pq import scipy as sp class TestApplyToDict(ut.TestCase): @staticmethod def fn(train, multiplier=1): return multiplier * train.size def test_maps_function_to_each_spike_train(self): st_dict = {'a': [arange_spikes(5 * pq.s), arange_spikes(4 * pq.s)], 'b': [arange_spikes(7 * pq.s)]} expected = {'a': [4, 3], 'b': [6]} actual = tools.apply_to_dict(self.fn, st_dict) self.assertEqual(expected, actual) def test_works_on_empty_lists(self): st_dict = {'a': [], 'b': []} expected = {'a': [], 'b': []} actual = tools.apply_to_dict(self.fn, st_dict) self.assertEqual(expected, actual) def test_works_on_empty_dict(self): st_dict = {} expected = {} actual = tools.apply_to_dict(self.fn, st_dict) self.assertEqual(expected, actual) def test_allows_to_pass_additional_args(self): st_dict = {'a': [arange_spikes(5 * pq.s), arange_spikes(4 * pq.s)], 'b': [arange_spikes(7 * pq.s)]} expected = {'a': [8, 6], 'b': [12]} actual = tools.apply_to_dict(self.fn, st_dict, 2) self.assertEqual(expected, actual) class TestBinSpikeTrains(ut.TestCase): def test_bins_spike_train_using_its_properties(self): a = neo.SpikeTrain( sp.array([1000.0]) * pq.ms, t_start=500.0 * pq.ms, t_stop=1500.0 * pq.ms) sampling_rate = 4.0 * pq.Hz expected = {0: [sp.array([0, 0, 1, 0])]} expectedBins = sp.array([0.5, 0.75, 1.0, 1.25, 1.5]) * pq.s actual, actualBins = tools.bin_spike_trains({0: [a]}, sampling_rate) self.assertEqual(len(expected), len(actual)) self.assertEqual(len(expected[0]), len(actual[0])) assert_array_equal(expected[0][0], actual[0][0]) assert_array_almost_equal( expectedBins, actualBins.rescale(expectedBins.units)) def test_bins_spike_train_using_passed_properties(self): a = neo.SpikeTrain( sp.array([1.0]) * pq.s, t_start=0.0 * pq.s, t_stop=5.0 * pq.s) sampling_rate = 4.0 * pq.Hz t_start = 0.5 * pq.s t_stop = 1.5 * pq.s expected = {0: [sp.array([0, 0, 1, 0])]} expectedBins = sp.array([0.5, 0.75, 1.0, 1.25, 1.5]) * pq.s actual, actualBins = tools.bin_spike_trains( {0: [a]}, sampling_rate=sampling_rate, t_start=t_start, t_stop=t_stop) self.assertEqual(len(expected), len(actual)) self.assertEqual(len(expected[0]), len(actual[0])) assert_array_equal(expected[0][0], actual[0][0]) assert_array_almost_equal( expectedBins, actualBins.rescale(expectedBins.units)) def test_uses_max_spike_train_interval(self): a = arange_spikes(5 * pq.s) b = arange_spikes(7 * pq.s, 15 * pq.s) sampling_rate = 4.0 * pq.Hz expectedBins = sp.arange(0.0, 15.1, 0.25) * pq.s actual, actualBins = tools.bin_spike_trains( {0: [a, b]}, sampling_rate=sampling_rate) assert_array_almost_equal( expectedBins, actualBins.rescale(expectedBins.units)) def test_handles_bin_size_which_is_not_divisor_of_duration(self): a = arange_spikes(5 * pq.s) sampling_rate = 1.0 / 1.3 * pq.Hz expected = {0: [sp.array([1, 1, 1, 1])]} expectedBins = sp.array([0.0, 1.3, 2.6, 3.9, 5.2]) * pq.s actual, actualBins = tools.bin_spike_trains({0: [a]}, sampling_rate) self.assertEqual(len(expected), len(actual)) self.assertEqual(len(expected[0]), len(actual[0])) assert_array_equal(expected[0][0], actual[0][0]) assert_array_almost_equal( expectedBins, actualBins.rescale(expectedBins.units)) class TestConcatenateSpikeTrains(ut.TestCase): def test_concatenates_spike_trains(self): a = arange_spikes(3.0 * pq.s) b = arange_spikes(2.0 * pq.s, 5.0 * pq.s) expected = arange_spikes(5.0 * pq.s) actual = tools.concatenate_spike_trains((a, b)) assert_array_almost_equal(expected, actual) def test_t_start_is_min_of_all_trains(self): a = arange_spikes(3.0 * pq.s, 5.0 * pq.s) b = arange_spikes(1.0 * pq.s, 6.0 * pq.s) expected = 1.0 * pq.s actual = tools.concatenate_spike_trains((a, b)).t_start self.assertAlmostEqual(expected, actual) def test_t_stop_is_max_of_all_trains(self): a = arange_spikes(3.0 * pq.s, 5.0 * pq.s) b = arange_spikes(1.0 * pq.s, 6.0 * pq.s) expected = 6.0 * pq.s actual = tools.concatenate_spike_trains((a, b)).t_stop self.assertAlmostEqual(expected, actual) class TestRemoveFromHierarchy(ut.TestCase): SEGMENTS = 5 CHANNEL_GROUPS = 4 UNITS = 3 CHANNELS = 4 @classmethod def create_hierarchy(cls, many_to_many): b = neo.Block() for ns in range(cls.SEGMENTS): b.segments.append(neo.Segment()) channels = [] if many_to_many: channels = [neo.RecordingChannel(name='Shared %d' % i, index=i + cls.CHANNELS) for i in range(cls.CHANNELS / 2)] for ng in range(cls.CHANNEL_GROUPS): rcg = neo.RecordingChannelGroup() for nu in range(cls.UNITS): unit = neo.Unit() for ns in range(cls.SEGMENTS): spike = neo.Spike(0 * pq.s) unit.spikes.append(spike) b.segments[ns].spikes.append(spike) st = neo.SpikeTrain([] * pq.s, 0 * pq.s) unit.spiketrains.append(st) b.segments[ns].spiketrains.append(st) rcg.units.append(unit) if not many_to_many: for nc in range(cls.CHANNELS): rc = neo.RecordingChannel( name='Single %d' % nc, index=nc) rc.recordingchannelgroups.append(rcg) rcg.recordingchannels.append(rc) else: for nc in range(cls.CHANNELS): if nc % 2 == 0: rc = neo.RecordingChannel( name='Single %d' % (nc / 2), index=nc / 2) else: rc = channels[nc / 2] rc.recordingchannelgroups.append(rcg) rcg.recordingchannels.append(rc) rcg.channel_indexes = sp.array( [c.index for c in rcg.recordingchannels]) rcg.channel_names = sp.array( [c.name for c in rcg.recordingchannels]) b.recordingchannelgroups.append(rcg) try: neo.io.tools.create_many_to_one_relationship(b) except AttributeError: b.create_many_to_one_relationship() return b def test_remove_block(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) tools.remove_from_hierarchy(block) neo.test.tools.assert_same_sub_schema(block, comp) def test_remove_segment_no_orphans(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) seg = block.segments[1] tools.remove_from_hierarchy(seg) self.assertFalse(seg in block.segments) self.assertEqual(len(block.list_units), self.UNITS * self.CHANNEL_GROUPS) for u in block.list_units: self.assertEqual(len(u.spikes), self.SEGMENTS - 1) self.assertEqual(len(u.spiketrains), self.SEGMENTS - 1) neo.test.tools.assert_same_sub_schema(seg, comp.segments[1]) def test_remove_segment_keep_orphans(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) seg = block.segments[1] tools.remove_from_hierarchy(seg, False) self.assertFalse(seg in block.segments) self.assertEqual(len(block.list_units), self.UNITS * self.CHANNEL_GROUPS) for u in block.list_units: self.assertEqual(len(u.spikes), self.SEGMENTS) self.assertEqual(len(u.spiketrains), self.SEGMENTS) neo.test.tools.assert_same_sub_schema(seg, comp.segments[1]) def test_remove_channel_group_no_orphans(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) rcg = block.recordingchannelgroups[1] tools.remove_from_hierarchy(rcg) self.assertFalse(rcg in block.recordingchannelgroups) self.assertEqual(len(block.segments), self.SEGMENTS) for s in block.segments: self.assertEqual(len(s.spikes), self.UNITS * (self.CHANNEL_GROUPS - 1)) self.assertEqual(len(s.spiketrains), self.UNITS * (self.CHANNEL_GROUPS - 1)) neo.test.tools.assert_same_sub_schema(rcg, comp.recordingchannelgroups[1]) def test_remove_channel_group_keep_orphans(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) rcg = block.recordingchannelgroups[1] tools.remove_from_hierarchy(rcg, False) self.assertFalse(rcg in block.recordingchannelgroups) self.assertEqual(len(block.segments), self.SEGMENTS) for s in block.segments: self.assertEqual(len(s.spikes), self.UNITS * self.CHANNEL_GROUPS) self.assertEqual(len(s.spiketrains), self.UNITS * self.CHANNEL_GROUPS) neo.test.tools.assert_same_sub_schema(rcg, comp.recordingchannelgroups[1]) def test_remove_channel(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) rc = block.list_recordingchannels[5] tools.remove_from_hierarchy(rc) self.assertFalse(rc in block.list_recordingchannels) neo.test.tools.assert_same_sub_schema(rc, comp.list_recordingchannels[5]) self.assertEqual(len(block.segments), self.SEGMENTS) self.assertEqual(len(block.recordingchannelgroups), self.CHANNEL_GROUPS) self.assertEqual(len(block.list_recordingchannels), self.CHANNEL_GROUPS * self.CHANNELS - 1) # Should be removed from its own channel group rcg = rc.recordingchannelgroups[0] self.assertEqual(len(rcg.recordingchannels), self.CHANNELS - 1) self.assertEqual(rcg.channel_indexes.shape[0], self.CHANNELS - 1) self.assertEqual(rcg.channel_names.shape[0], self.CHANNELS - 1) self.assertFalse(rc.index in rcg.channel_indexes) self.assertFalse(rc.name in rcg.channel_names) def test_remove_unique_channel_many_to_many(self): block = self.create_hierarchy(True) comp = self.create_hierarchy(True) self.assertEqual( len(block.list_recordingchannels), self.CHANNEL_GROUPS * (self.CHANNELS / 2) + (self.CHANNELS / 2)) rc = block.list_recordingchannels[0] # Unique channel tools.remove_from_hierarchy(rc) neo.test.tools.assert_same_sub_schema(rc, comp.list_recordingchannels[0]) self.assertFalse(rc in block.list_recordingchannels) self.assertEqual(len(block.segments), self.SEGMENTS) self.assertEqual(len(block.recordingchannelgroups), self.CHANNEL_GROUPS) self.assertEqual( len(block.list_recordingchannels), self.CHANNEL_GROUPS * (self.CHANNELS / 2) + (self.CHANNELS / 2) - 1) # Should be removed from its own channel group rcg = rc.recordingchannelgroups[0] self.assertEqual(len(rcg.recordingchannels), self.CHANNELS - 1) self.assertEqual(rcg.channel_indexes.shape[0], self.CHANNELS - 1) self.assertEqual(rcg.channel_names.shape[0], self.CHANNELS - 1) self.assertFalse(rc.index in rcg.channel_indexes) self.assertFalse(rc.name in rcg.channel_names) def test_remove_shared_channel_many_to_many(self): block = self.create_hierarchy(True) comp = self.create_hierarchy(True) self.assertEqual( len(block.list_recordingchannels), self.CHANNEL_GROUPS * (self.CHANNELS / 2) + (self.CHANNELS / 2)) rc = block.list_recordingchannels[1] # Shared channel tools.remove_from_hierarchy(rc) neo.test.tools.assert_same_sub_schema(rc, comp.list_recordingchannels[1]) self.assertFalse(rc in block.list_recordingchannels) self.assertEqual(len(block.segments), self.SEGMENTS) self.assertEqual(len(block.recordingchannelgroups), self.CHANNEL_GROUPS) self.assertEqual( len(block.list_recordingchannels), self.CHANNEL_GROUPS * (self.CHANNELS / 2) + (self.CHANNELS / 2) - 1) # Should be removed from all channel groups for rcg in block.recordingchannelgroups: self.assertEqual(len(rcg.recordingchannels), self.CHANNELS - 1) self.assertEqual(rcg.channel_indexes.shape[0], self.CHANNELS - 1) self.assertEqual(rcg.channel_names.shape[0], self.CHANNELS - 1) self.assertFalse(rc.index in rcg.channel_indexes) self.assertFalse(rc.name in rcg.channel_names) def test_remove_unit_no_orphans(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) unit = block.list_units[5] tools.remove_from_hierarchy(unit) self.assertFalse(unit in block.list_units) self.assertEqual(len(block.list_units), self.UNITS * self.CHANNEL_GROUPS - 1) self.assertEqual(len(block.segments), self.SEGMENTS) self.assertEqual(len(block.recordingchannelgroups), self.CHANNEL_GROUPS) for seg in block.segments: self.assertEqual(len(seg.spikes), self.UNITS * self.CHANNEL_GROUPS - 1) self.assertEqual(len(seg.spiketrains), self.UNITS * self.CHANNEL_GROUPS - 1) self.assertFalse(unit in [s.unit for s in seg.spikes]) self.assertFalse(unit in [st.unit for st in seg.spiketrains]) neo.test.tools.assert_same_sub_schema(unit, comp.list_units[5]) def test_remove_unit_keep_orphans(self): block = self.create_hierarchy(False) comp = self.create_hierarchy(False) unit = block.list_units[5] tools.remove_from_hierarchy(unit, False) self.assertFalse(unit in block.list_units) self.assertEqual(len(block.list_units), self.UNITS * self.CHANNEL_GROUPS - 1) self.assertEqual(len(block.segments), self.SEGMENTS) self.assertEqual(len(block.recordingchannelgroups), self.CHANNEL_GROUPS) for seg in block.segments: self.assertEqual(len(seg.spikes), self.UNITS * self.CHANNEL_GROUPS) self.assertEqual(len(seg.spiketrains), self.UNITS * self.CHANNEL_GROUPS) self.assertFalse(unit in [s.unit for s in seg.spikes]) self.assertFalse(unit in [st.unit for st in seg.spiketrains]) neo.test.tools.assert_same_sub_schema(unit, comp.list_units[5]) def test_remove_spike(self): unit = neo.Unit() segment = neo.Segment() s = neo.Spike(0 * pq.s) unit.spikes.append(s) segment.spikes.append(s) s.unit = unit s.segment = segment st = neo.SpikeTrain([] * pq.s, 0 * pq.s) unit.spiketrains.append(st) segment.spiketrains.append(st) st.unit = unit st.segment = segment tools.remove_from_hierarchy(s) self.assertTrue(st in unit.spiketrains) self.assertTrue(st in segment.spiketrains) self.assertFalse(s in unit.spikes) self.assertFalse(s in segment.spikes) def test_remove_spiketrain(self): unit = neo.Unit() segment = neo.Segment() s = neo.Spike(0 * pq.s) unit.spikes.append(s) segment.spikes.append(s) s.unit = unit s.segment = segment st = neo.SpikeTrain([] * pq.s, 0 * pq.s) unit.spiketrains.append(st) segment.spiketrains.append(st) st.unit = unit st.segment = segment tools.remove_from_hierarchy(st) self.assertTrue(s in unit.spikes) self.assertTrue(s in segment.spikes) self.assertFalse(st in unit.spiketrains) self.assertFalse(st in segment.spiketrains) def test_extract_spikes(self): s1 = sp.zeros(10000) s2 = sp.ones(10000) t = sp.arange(0.0, 10.1, 1.0) sig1 = neo.AnalogSignal(s1 * pq.uV, sampling_rate=pq.kHz) sig2 = neo.AnalogSignal(s2 * pq.uV, sampling_rate=pq.kHz) train = neo.SpikeTrain(t * pq.s, 10 * pq.s) spikes = tools.extract_spikes( train, [sig1, sig2], 100 * pq.ms, 10 * pq.ms) self.assertEqual(len(spikes), 9) for s in spikes: self.assertAlmostEqual(s.waveform[:, 0].mean(), 0.0) self.assertAlmostEqual(s.waveform[:, 1].mean(), 1.0) def test_extract_different_spikes(self): s1 = sp.ones(10500) s2 = -sp.ones(10500) for i in xrange(10): s1[i * 1000 + 500:i * 1000 + 1500] *= i s2[i * 1000 + 500:i * 1000 + 1500] *= i t = sp.arange(0.0, 10.1, 1.0) sig1 = neo.AnalogSignal(s1 * pq.uV, sampling_rate=pq.kHz) sig2 = neo.AnalogSignal(s2 * pq.uV, sampling_rate=pq.kHz) train = neo.SpikeTrain(t * pq.s, 10 * pq.s) spikes = tools.extract_spikes( train, [sig1, sig2], 100 * pq.ms, 10 * pq.ms) self.assertEqual(len(spikes), 10) for i, s in enumerate(spikes): self.assertAlmostEqual(s.waveform[:, 0].mean(), i) self.assertAlmostEqual(s.waveform[:, 1].mean(), -i) if __name__ == '__main__': ut.main()
40.008529
80
0.604349
2,356
18,764
4.654075
0.086587
0.073871
0.07223
0.044049
0.796261
0.771911
0.746831
0.701505
0.681988
0.676334
0
0.025416
0.284961
18,764
468
81
40.094017
0.791831
0.011671
0
0.596899
0
0
0.002535
0
0
0
0
0
0.276486
1
0.069767
false
0.005168
0.028424
0.002584
0.124031
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
69dd42ef5eeb97faf2d4cfa8fecc41b84a2f1b7c
90
py
Python
lecturesApp/admin.py
i3dprogrammer/Django-GraduationProject
2445b9f773638a344be8625f0d9ef6c149e68015
[ "MIT" ]
null
null
null
lecturesApp/admin.py
i3dprogrammer/Django-GraduationProject
2445b9f773638a344be8625f0d9ef6c149e68015
[ "MIT" ]
null
null
null
lecturesApp/admin.py
i3dprogrammer/Django-GraduationProject
2445b9f773638a344be8625f0d9ef6c149e68015
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Lecture admin.site.register(Lecture)
22.5
32
0.833333
13
90
5.769231
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.1
90
4
33
22.5
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
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
1
0
1
0
0
0
0
4
69e3f0345ab19c20abf12e205a8a685dbc9895e1
299
py
Python
code-exercises-etc/section_05_(loops)/ajm.loops5-zip-states.20151107.py
hannahkwarren/CLaG-Sp2016
a75862d187176d9f2f1778eb6300056364292b44
[ "MIT" ]
null
null
null
code-exercises-etc/section_05_(loops)/ajm.loops5-zip-states.20151107.py
hannahkwarren/CLaG-Sp2016
a75862d187176d9f2f1778eb6300056364292b44
[ "MIT" ]
null
null
null
code-exercises-etc/section_05_(loops)/ajm.loops5-zip-states.20151107.py
hannahkwarren/CLaG-Sp2016
a75862d187176d9f2f1778eb6300056364292b44
[ "MIT" ]
null
null
null
state_names = ['Alabama', 'Alaska', 'Arkansas'] state_abbrs = ['AL', 'AK', 'AR'] for name, abbr in zip(state_names, state_abbrs): print '{0} ({1})'.format(name, abbr) ##state_names.append('Arizona') ##for name, abbr in zip(state_names, state_abbrs): ## print '{0} ({1})'.format(name, abbr)
29.9
50
0.638796
44
299
4.181818
0.454545
0.217391
0.119565
0.141304
0.619565
0.619565
0.619565
0.619565
0.619565
0.619565
0
0.015504
0.137124
299
9
51
33.222222
0.697674
0.391304
0
0
0
0
0.204545
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
0
0
0
null
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
69e97aa392785632d5796c47727aa07bf4cee9cc
25
py
Python
OS_data/OS_Data_Parser.py
RedaMastouri/IoT-PenTesting-Research-
102e45ece6150f65b92f12331cc0162084f7fb4e
[ "MIT" ]
null
null
null
OS_data/OS_Data_Parser.py
RedaMastouri/IoT-PenTesting-Research-
102e45ece6150f65b92f12331cc0162084f7fb4e
[ "MIT" ]
null
null
null
OS_data/OS_Data_Parser.py
RedaMastouri/IoT-PenTesting-Research-
102e45ece6150f65b92f12331cc0162084f7fb4e
[ "MIT" ]
1
2022-03-11T04:53:33.000Z
2022-03-11T04:53:33.000Z
''' OS_Data_Parser.py '''
8.333333
17
0.64
4
25
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0.08
25
3
18
8.333333
0.608696
0.68
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
69ea2679397297bd2bb1ff80e7dad5963001c68a
302
py
Python
jdaviz/configs/cubeviz/plugins/viewers.py
mariobuikhuizen/jdaviz
1757f49b2ea8c679c23f5925d754798a1deb0c96
[ "BSD-3-Clause" ]
null
null
null
jdaviz/configs/cubeviz/plugins/viewers.py
mariobuikhuizen/jdaviz
1757f49b2ea8c679c23f5925d754798a1deb0c96
[ "BSD-3-Clause" ]
null
null
null
jdaviz/configs/cubeviz/plugins/viewers.py
mariobuikhuizen/jdaviz
1757f49b2ea8c679c23f5925d754798a1deb0c96
[ "BSD-3-Clause" ]
null
null
null
from glue_jupyter.bqplot.profile import BqplotProfileView from glue_jupyter.bqplot.image import BqplotImageView from jdaviz.core.registries import viewers viewers.add("g-profile-viewer", label="Profile 1D", cls=BqplotProfileView) viewers.add("g-image-viewer", label="Image 2D", cls=BqplotImageView)
33.555556
74
0.817881
40
302
6.125
0.5
0.065306
0.122449
0.171429
0
0
0
0
0
0
0
0.007168
0.076159
302
8
75
37.75
0.870968
0
0
0
0
0
0.15894
0
0
0
0
0
0
1
0
true
0
0.6
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
1
0
1
0
0
0
0
4
0e04018e1a3b5a2575908246650118c39922783d
1,166
py
Python
src/blog_to_twitter/configuration.py
franiglesias/blog-to-twitter
52f3ca2b2392644a3b755c36ccc55697bc815362
[ "MIT" ]
null
null
null
src/blog_to_twitter/configuration.py
franiglesias/blog-to-twitter
52f3ca2b2392644a3b755c36ccc55697bc815362
[ "MIT" ]
null
null
null
src/blog_to_twitter/configuration.py
franiglesias/blog-to-twitter
52f3ca2b2392644a3b755c36ccc55697bc815362
[ "MIT" ]
null
null
null
import os import yaml class Configuration: def __init__(self, options): if not os.path.isfile(options.config_file): raise Exception('File {} not found'.format(options.config_file)) self.config_file = options.config_file self.cfg = None self.load() self.override_with_cli(options) def load(self): with open(self.config_file, "r") as file: self.cfg = yaml.safe_load(file) def consumer_key(self): return self.cfg['twitter']['consumer_key'] def consumer_secret(self): return self.cfg['twitter']['consumer_secret'] def access_token(self): return self.cfg['twitter']['access_token'] def access_token_secret(self): return self.cfg['twitter']['access_token_secret'] def uri(self): return self.cfg['feed']['uri'] def days(self): return self.cfg['feed']['days'] def name(self): return self.cfg['feed']['name'] def override_with_cli(self, options): if options.days: self.override_days(options.days) def override_days(self, days): self.cfg['feed']['days'] = days
24.291667
76
0.618353
150
1,166
4.633333
0.266667
0.100719
0.141007
0.171223
0.300719
0.210072
0.100719
0
0
0
0
0
0.248714
1,166
47
77
24.808511
0.793379
0
0
0
0
0
0.11578
0
0
0
0
0
0
1
0.34375
false
0
0.0625
0.21875
0.65625
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
1
1
0
0
4
0e0f03abf0535f9ed2575a3d0f2517b7f5b82755
128
py
Python
main.py
teamclouday/DataImputation
be156efa91adf2ea27246dabaf8ea5832dda2ec3
[ "MIT" ]
null
null
null
main.py
teamclouday/DataImputation
be156efa91adf2ea27246dabaf8ea5832dda2ec3
[ "MIT" ]
null
null
null
main.py
teamclouday/DataImputation
be156efa91adf2ea27246dabaf8ea5832dda2ec3
[ "MIT" ]
null
null
null
# This file will download all the necessary datasets from utils.data import * if __name__ == "__main__": dataset_prepare()
21.333333
52
0.742188
17
128
5.058824
1
0
0
0
0
0
0
0
0
0
0
0
0.179688
128
6
53
21.333333
0.819048
0.390625
0
0
0
0
0.103896
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
3864c48b7319a76664968174021c576e5b138782
126
py
Python
agnosticcode/Incrementors.py
KoosieDeMoer/python-serverless-backend
8be72a6257f68ea114ef60b3c872cad727016da8
[ "MIT" ]
null
null
null
agnosticcode/Incrementors.py
KoosieDeMoer/python-serverless-backend
8be72a6257f68ea114ef60b3c872cad727016da8
[ "MIT" ]
null
null
null
agnosticcode/Incrementors.py
KoosieDeMoer/python-serverless-backend
8be72a6257f68ea114ef60b3c872cad727016da8
[ "MIT" ]
null
null
null
class Incrementors: def increment(self, inValue): print('increment inValue', inValue) return inValue + 1
25.2
43
0.650794
13
126
6.307692
0.692308
0
0
0
0
0
0
0
0
0
0
0.010753
0.261905
126
5
44
25.2
0.870968
0
0
0
0
0
0.133858
0
0
0
0
0
0
1
0.25
false
0
0
0
0.75
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
1
0
0
4
3864e911416d0feb4a8c4d7a59c9d67fdd6a62f7
637
py
Python
t2t_bert/data_generator/data_processor.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
34
2018-12-19T01:00:57.000Z
2021-03-26T09:36:37.000Z
t2t_bert/data_generator/data_processor.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
11
2018-12-25T03:37:59.000Z
2021-08-25T14:43:58.000Z
t2t_bert/data_generator/data_processor.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
9
2018-12-27T08:00:44.000Z
2020-06-08T03:05:14.000Z
import tensorflow as tf class DataProcessor(object): """Base class for data converters for sequence classification data sets.""" def get_train_examples(self, data_dir): """Gets a collection of `InputExample`s for the train set.""" raise NotImplementedError() def get_dev_examples(self, data_dir): """Gets a collection of `InputExample`s for the dev set.""" raise NotImplementedError() def get_labels(self, label_id): """Gets the list of labels for this data set.""" raise NotImplementedError() def _read_data(self, input_file, quotechar=None): """Reads a tab separated value file.""" raise NotImplementedError()
31.85
76
0.744113
88
637
5.261364
0.511364
0.207343
0.174946
0.194384
0.38013
0.237581
0.237581
0.237581
0.237581
0.237581
0
0
0.149137
637
20
77
31.85
0.854244
0.401884
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.1
0
0.6
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
3878a950554aa21feb989425de296b69dd66f594
77
py
Python
civil/apps/contribute/__init__.py
christopinka/django-civil
d134624da9d36c4ba0bea2df8a21698df196bdf6
[ "Apache-2.0" ]
3
2020-06-15T21:01:06.000Z
2022-02-17T17:41:57.000Z
civil/apps/contribute/__init__.py
christopinka/django-civil
d134624da9d36c4ba0bea2df8a21698df196bdf6
[ "Apache-2.0" ]
null
null
null
civil/apps/contribute/__init__.py
christopinka/django-civil
d134624da9d36c4ba0bea2df8a21698df196bdf6
[ "Apache-2.0" ]
1
2021-11-06T18:33:29.000Z
2021-11-06T18:33:29.000Z
__deps__ = ['civil.apps.base', 'civil.apps.definitions', 'civil.apps.mail']
25.666667
75
0.701299
10
77
5
0.6
0.54
0
0
0
0
0
0
0
0
0
0
0.077922
77
2
76
38.5
0.704225
0
0
0
0
0
0.684211
0.289474
0
0
0
0
0
1
0
false
0
0
0
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
38bf3213d21b9be3443fbac99bcb2e91debd5a2b
98
py
Python
codes_auto/647.palindromic-substrings.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/647.palindromic-substrings.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/647.palindromic-substrings.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
# # @lc app=leetcode.cn id=647 lang=python3 # # [647] palindromic-substrings # None # @lc code=end
14
41
0.693878
15
98
4.533333
0.866667
0
0
0
0
0
0
0
0
0
0
0.083333
0.142857
98
7
42
14
0.72619
0.826531
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
0
0
0
0
0
4
38e4482ec4aefb51de2bbe619b606fd4cc7b659d
367
py
Python
touchtechnology/news/query.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
null
null
null
touchtechnology/news/query.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
28
2016-12-09T21:14:19.000Z
2022-01-11T07:17:16.000Z
touchtechnology/news/query.py
goodtune/vitriolic
d135eecf7acbc229a872585ebafb8bbefca52df4
[ "BSD-3-Clause" ]
null
null
null
from django.db.models.query import QuerySet from django.utils import timezone class ArticleQuerySet(QuerySet): def active(self): return self.filter(is_active=True) def live(self): return self.filter(published__lte=timezone.now()).active() class CategoryQuerySet(QuerySet): def live(self): return self.filter(is_active=True)
20.388889
66
0.716621
47
367
5.510638
0.489362
0.11583
0.162162
0.23166
0.378378
0.378378
0.247104
0
0
0
0
0
0.182561
367
17
67
21.588235
0.863333
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.3
false
0
0.2
0.3
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
2a06b497a99d1add9f336bc563176d85371e5c83
114
py
Python
utilities/config.py
harry-100/qa-automation-framework
5fbe03e930820537e53f2d26b1c2b2bd2b222bf5
[ "MIT" ]
null
null
null
utilities/config.py
harry-100/qa-automation-framework
5fbe03e930820537e53f2d26b1c2b2bd2b222bf5
[ "MIT" ]
null
null
null
utilities/config.py
harry-100/qa-automation-framework
5fbe03e930820537e53f2d26b1c2b2bd2b222bf5
[ "MIT" ]
null
null
null
from json import loads def loadConfig(): with open("config/config.json", "r") as fp: return loads(fp.read())
16.285714
44
0.684211
18
114
4.333333
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.157895
114
6
45
19
0.8125
0
0
0
0
0
0.166667
0
0
0
0
0
0
1
0.25
true
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
1
0
0
0
0
0
0
4
2a13beeee5af6cbc31c3ba425f86ec3a015b60e8
110
py
Python
models/__init__.py
Joshua-Ren/Neural_Iterated_Learning
f8bfaadc11042f942cb374a2fc19c970790bb0a4
[ "MIT" ]
11
2020-03-07T18:56:31.000Z
2022-03-09T14:41:59.000Z
models/__init__.py
Joshua-Ren/Neural_Iterated_Learning
f8bfaadc11042f942cb374a2fc19c970790bb0a4
[ "MIT" ]
4
2021-01-19T20:46:58.000Z
2021-10-14T23:33:04.000Z
models/__init__.py
Joshua-Ren/Neural_Iterated_Learning
f8bfaadc11042f942cb374a2fc19c970790bb0a4
[ "MIT" ]
3
2020-03-11T19:53:55.000Z
2020-12-29T06:42:09.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 18 21:31:59 2019 @author: xiayezi """
12.222222
35
0.6
18
110
3.666667
1
0
0
0
0
0
0
0
0
0
0
0.155556
0.181818
110
8
36
13.75
0.577778
0.881818
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
2a3980ce94644ba227ee8d1d6341160da5ebb49e
61
py
Python
9_first-if-else.py
rahulbohra/Python-Basic
7dfadde341e9d02fdcb37f70cce10e8b689f36c9
[ "MIT" ]
null
null
null
9_first-if-else.py
rahulbohra/Python-Basic
7dfadde341e9d02fdcb37f70cce10e8b689f36c9
[ "MIT" ]
null
null
null
9_first-if-else.py
rahulbohra/Python-Basic
7dfadde341e9d02fdcb37f70cce10e8b689f36c9
[ "MIT" ]
null
null
null
x = 1 print x if x == 2 : print 'Two' else : print 'One'
8.714286
13
0.52459
12
61
2.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0.04878
0.327869
61
6
14
10.166667
0.731707
0
0
0
0
0
0.098361
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
1
0
4
2a446cc3a17a2616324ec959ee77f0cc04d27d69
1,075
py
Python
trebelge/XMLFileCoR/DespatchAdviceHandler.py
askmetoo/trebelge
bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6
[ "MIT" ]
null
null
null
trebelge/XMLFileCoR/DespatchAdviceHandler.py
askmetoo/trebelge
bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6
[ "MIT" ]
null
null
null
trebelge/XMLFileCoR/DespatchAdviceHandler.py
askmetoo/trebelge
bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6
[ "MIT" ]
1
2022-03-17T21:53:07.000Z
2022-03-17T21:53:07.000Z
import xml.etree.ElementTree as ET import frappe from trebelge.XMLFileCoR.AbstractXMLFileHandler import AbstractXMLFileHandler from trebelge.XMLFileTypeState.DespatchAdviceState import DespatchAdviceState from trebelge.XMLFileTypeState.XMLFileTypeStateContext import XMLFileTypeStateContext class DespatchAdviceHandler(AbstractXMLFileHandler): """ This Handler has no successor. CoR Handler method for checking if the FileType is DespatchAdvice. """ despatchAdviceNamespace: str = frappe.db.get_single_value('TR GIB eBelge Switchboard', 'despatch_advice_namespace_specification') def handle_xml_file(self, xml_file_type_context: XMLFileTypeStateContext): file_path = xml_file_type_context.get_file_path() if ET.parse(file_path).getroot().tag == self.despatchAdviceNamespace + 'DespatchAdvice': xml_file_type_context.set_state = DespatchAdviceState() else: # TODO: Raise 'File is of unknown type' warning and leave it be pass
44.791667
104
0.732093
109
1,075
7.027523
0.614679
0.036554
0.043081
0.070496
0
0
0
0
0
0
0
0
0.210233
1,075
23
105
46.73913
0.902238
0.148837
0
0
0
0
0.087151
0.043575
0
0
0
0.043478
0
1
0.071429
false
0.071429
0.357143
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
1
1
0
1
0
0
4
2a490b73ea4eefd9367ec955f781a16e123aebf8
105
py
Python
googleclassroom/apps.py
dakinwerneburg/gradify
276f20ba2830918eac13cb5cafe7261cd1d21e70
[ "Apache-2.0" ]
null
null
null
googleclassroom/apps.py
dakinwerneburg/gradify
276f20ba2830918eac13cb5cafe7261cd1d21e70
[ "Apache-2.0" ]
6
2021-01-15T20:59:11.000Z
2022-02-10T11:51:17.000Z
googleclassroom/apps.py
dakinwerneburg/gradify
276f20ba2830918eac13cb5cafe7261cd1d21e70
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class GoogleclassroomConfig(AppConfig): name = 'googleclassroom'
17.5
39
0.790476
10
105
8.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.142857
105
5
40
21
0.922222
0
0
0
0
0
0.142857
0
0
0
0
0
0
1
0
false
0
0.333333
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
1
0
1
0
0
4
2a4a04cca4a1034f5b43e4f8d62ab519c176fc6e
223
py
Python
sources/t12/t12ej10.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
sources/t12/t12ej10.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
sources/t12/t12ej10.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd df = pd.DataFrame(np.random.randn(3,4), index=['2','1','3'], columns=list('ACBD')) print(df) print(df.sort_index(axis=1, ascending=False)) print(df.sort_index(axis=0, ascending=True))
31.857143
82
0.717489
41
223
3.853659
0.609756
0.132911
0.139241
0.202532
0.253165
0
0
0
0
0
0
0.034146
0.080717
223
7
83
31.857143
0.736585
0
0
0
0
0
0.03125
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.5
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
1
0
4
aa714208547e08f1f5d4bc3852b98e6c5efccbf8
158
py
Python
deal/schemes.py
teners/deal
351e6646995641ecaabdd317deec744bab1f1551
[ "MIT" ]
null
null
null
deal/schemes.py
teners/deal
351e6646995641ecaabdd317deec744bab1f1551
[ "MIT" ]
null
null
null
deal/schemes.py
teners/deal
351e6646995641ecaabdd317deec744bab1f1551
[ "MIT" ]
null
null
null
class Scheme: def __init__(self, data): self.data = data def is_valid(self) -> bool: raise NotImplementedError # pragma: no cover
17.555556
53
0.620253
19
158
4.894737
0.736842
0.172043
0
0
0
0
0
0
0
0
0
0
0.291139
158
8
54
19.75
0.830357
0.101266
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
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
1
0
0
0
0
1
0
0
4
aabce22eef2967038e17c4cc6cbef03f4dc41d99
92
py
Python
AtCoder_Beginner_Contest/125/a.py
xianGuiye/AtCoder
da51229c22175833f2a32ed16b51d217435d25c0
[ "MIT" ]
1
2020-02-07T09:25:17.000Z
2020-02-07T09:25:17.000Z
AtCoder_Beginner_Contest/125/a.py
xianGuiye/AtCoder
da51229c22175833f2a32ed16b51d217435d25c0
[ "MIT" ]
null
null
null
AtCoder_Beginner_Contest/125/a.py
xianGuiye/AtCoder
da51229c22175833f2a32ed16b51d217435d25c0
[ "MIT" ]
null
null
null
A,B,T = [int(x) for x in input().split()] #(T+0.5)/A回ビスケットが生産される print(int((T+0.5)/A)*B)
13.142857
41
0.565217
21
92
2.47619
0.619048
0.076923
0.115385
0
0
0
0
0
0
0
0
0.05
0.130435
92
6
42
15.333333
0.6
0.228261
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
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
1
0
0
0
0
1
0
4
aac36063300b552fdde33e435032cbf642404cd9
10,329
py
Python
helpdesk/helper.py
lawrence-gandhar/Django-Helpdesk
c8725c9071eca2a8329d00707a85f38a64a1eb91
[ "MIT" ]
null
null
null
helpdesk/helper.py
lawrence-gandhar/Django-Helpdesk
c8725c9071eca2a8329d00707a85f38a64a1eb91
[ "MIT" ]
null
null
null
helpdesk/helper.py
lawrence-gandhar/Django-Helpdesk
c8725c9071eca2a8329d00707a85f38a64a1eb91
[ "MIT" ]
1
2021-11-28T11:00:47.000Z
2021-11-28T11:00:47.000Z
# # Author : Lawrence Gandhar # July - 2019 # This script will generate the data for the graphs displayed on dashboard # import calendar, re from django.contrib.auth import get_user_model from django.utils import timezone from django.db.models import Q from helpdesk.models import Ticket """ Output ============================================================================================= [ ['x', '2010-01-01', '2011-01-01', '2012-01-01', '2013-01-01', '2014-01-01', '2015-01-01'], ['Taken By Me', 30, 200, 100, 400, 150, 250], ['Open tickets', 50, 20, 10, 40, 15, 25] ] """ #=============================================================================================== # time series generation for line charts #=============================================================================================== def default_series(series_data,year=True): if year: for key in series_data.keys(): for i in range(1,13): if key == "x_axis": series_data[key].append(calendar.month_abbr[i]) else: series_data[key].append(0) else: for key in series_data.keys(): for i in range(1,32): if key == "x_axis": series_data[key].append(i) else: series_data[key].append(0) return series_data #=============================================================================================== # Year Wise Data Series Generation #=============================================================================================== def year_wise_data(request, status_codes, series_data, tickets): for ticket in tickets: series_data[status_codes[ticket["status"]]][ticket["created"].month] += 1 if ticket["assigned_to"] == request.user.id: series_data["assigned_tickets"][ticket["created"].month] += 1 if ticket["assigned_to"] is None: series_data["unassigned_tickets"][ticket["created"].month] += 1 return series_data #=============================================================================================== # Year Wise Data Series Generation #=============================================================================================== def month_wise_data(request, status_codes, series_data, tickets): for ticket in tickets: print(ticket["created"].day) series_data[status_codes[ticket["status"]]][ticket["created"].day] += 1 if ticket["assigned_to"] == request.user.id: series_data["assigned_tickets"][ticket["created"].day] += 1 if ticket["assigned_to"] is None: series_data["unassigned_tickets"][ticket["created"].day] += 1 return series_data #=============================================================================================== # Line Chart Data generation based on year, month, or both # # If Year then will create timeseries for all months # If month then will create timeseries data for the respective number of days present # If year is None and month is not then current year will be selected by default #=============================================================================================== def line_chart_data(request, s_year = None, s_month = None): status_codes = dict({ 1: "open_tickets", 2: "reopened_tickets", 3: "resolved_tickets", 4: "closed_tickets", 5: "duplicate_tickets", 6: "onhold_tickets", }) series_data = dict({ "x_axis" : ["x"], "open_tickets" : ["Open Tickets"], "closed_tickets" : ["Closed Tickets"], "reopened_tickets" : ["Reopened Tickets"], "resolved_tickets" : ["Resolved Tickets"], "duplicate_tickets" : ["Duplicate Tickets"], "onhold_tickets" : ["OnHold Tickets"], "assigned_tickets" : ["Tickets Assigned To Me"], "unassigned_tickets" : ["Unassigned Tickets"], }) if s_year is not None: if s_month is not None: default_series(series_data, False) tickets = Ticket.objects.filter(created__year = s_year, created__month = str(int(s_month) + 1)) tickets = tickets.values('status', 'created', 'assigned_to') month_wise_data(request, status_codes, series_data, tickets) else: # for year default_series(series_data, True) tickets = Ticket.objects.filter(created__year = s_year).values('status', 'created', 'assigned_to') year_wise_data(request, status_codes, series_data, tickets) else: s_year = timezone.now().year if s_month is not None: default_series(series_data, False) tickets = Ticket.objects.filter(created__year = s_year, created__month = str(int(s_month) + 1)) tickets = tickets.values('status', 'created', 'assigned_to') month_wise_data(request, status_codes, series_data, tickets) else: default_series(series_data, True) tickets = Ticket.objects.filter(created__year = s_year).values('status', 'created', 'assigned_to') year_wise_data(request, status_codes, series_data, tickets) main_data_series = [] for item in series_data.keys(): main_data_series.append(series_data[item]) return main_data_series #=============================================================================================== # Pie Chart Data generation based on year, month #=============================================================================================== def month_pie_series(request, s_year, s_month): year_month_series_data = [ ["Open Tickets", Ticket.objects.filter(status = Ticket.OPEN_STATUS, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["Closed Tickets", Ticket.objects.filter(status = Ticket.CLOSED_STATUS, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["Reopened Tickets", Ticket.objects.filter(status = Ticket.REOPENED_STATUS, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["Resolved Tickets", Ticket.objects.filter(status = Ticket.RESOLVED_STATUS, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["Duplicate Tickets", Ticket.objects.filter(status = Ticket.DUPLICATE_STATUS, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["OnHold Tickets", Ticket.objects.filter(status = Ticket.ONHOLD_STATUS, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["Tickets Assigned To Me", Ticket.objects.filter(assigned_to=request.user, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ["Unassigned Tickets", Ticket.objects.filter(assigned_to__isnull=True, created__year = s_year, created__month = str(int(s_month) + 1)).count()], ] return year_month_series_data #=============================================================================================== # Pie Chart Data generation based on year #=============================================================================================== def year_pie_series(request, s_year, s_month): year_series_data = [ ["Open Tickets", Ticket.objects.filter(status = Ticket.OPEN_STATUS, created__year = s_year).count()], ["Closed Tickets", Ticket.objects.filter(status = Ticket.CLOSED_STATUS, created__year = s_year).count()], ["Reopened Tickets", Ticket.objects.filter(status = Ticket.REOPENED_STATUS, created__year = s_year).count()], ["Resolved Tickets", Ticket.objects.filter(status = Ticket.RESOLVED_STATUS, created__year = s_year).count()], ["Duplicate Tickets", Ticket.objects.filter(status = Ticket.DUPLICATE_STATUS, created__year = s_year).count()], ["OnHold Tickets", Ticket.objects.filter(status = Ticket.ONHOLD_STATUS, created__year = s_year).count()], ["Tickets Assigned To Me", Ticket.objects.filter(assigned_to=request.user, created__year = s_year).count()], ["Unassigned Tickets", Ticket.objects.filter(assigned_to__isnull=True, created__year = s_year).count()], ] return year_series_data #=============================================================================================== # Pie Chart Data generation based on year, month, or both # # If Year then will create timeseries for all months # If month then will create timeseries data for the respective number of days present # If year is None and month is not then current year will be selected by default #=============================================================================================== def pie_chart_data(request, s_year = None, s_month = None): if s_year is not None: if s_month is not None: return month_pie_series(request, s_year, s_month) else: return year_pie_series(request, s_year, s_month) else: s_year = timezone.now().year if s_month is not None: return month_pie_series(request, s_year, s_month) else: return year_pie_series(request, s_year, s_month) #=============================================================================================== # Ticket details assigned to Users # #=============================================================================================== def tickets_assigned_to_users(): from django.db import connection with connection.cursor() as cursor: cursor.execute( '''select AU.id, AU.first_name, AU.last_name, AU.is_active, AU.email, AU.is_superuser, (select count(id) from helpdesk_ticket where assigned_to_id = AU.id) as assigned_tickets, (select count(id) from helpdesk_ticket where status = 1 and assigned_to_id = AU.id) as open_tickets, (select count(id) from helpdesk_ticket where status = 2 and assigned_to_id = AU.id) as reopen_tickets, (select count(id) from helpdesk_ticket where status = 3 and assigned_to_id = AU.id) as resolved_tickets, (select count(id) from helpdesk_ticket where status = 4 and assigned_to_id = AU.id) as closed_tickets, (select count(id) from helpdesk_ticket where status = 5 and assigned_to_id = AU.id) as duplicate_tickets, (select count(id) from helpdesk_ticket where status = 6 and assigned_to_id = AU.id) as onhold_tickets from auth_user AU where AU.id in (select id from auth_user) order by id asc''') columns = [col[0] for col in cursor.description] return [dict(zip(columns, row)) for row in cursor.fetchall()]
43.217573
159
0.583987
1,230
10,329
4.668293
0.134146
0.057471
0.066179
0.05573
0.764542
0.76193
0.758795
0.721874
0.673981
0.582898
0
0.013587
0.159164
10,329
238
160
43.39916
0.647553
0.233324
0
0.412698
1
0
0.133083
0
0
0
0
0
0
1
0.063492
false
0
0.047619
0
0.198413
0.007937
0
0
0
null
0
0
0
0
1
1
1
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
4
2aa3ec3988089fe931a37be9ea40d0a37308acd1
180
py
Python
nanitosbaby/inventario/apps.py
Hector-hedb12/nanitosbaby
86eff05157dab02a7daca61e1f70ec76bbf6cbdf
[ "MIT" ]
null
null
null
nanitosbaby/inventario/apps.py
Hector-hedb12/nanitosbaby
86eff05157dab02a7daca61e1f70ec76bbf6cbdf
[ "MIT" ]
null
null
null
nanitosbaby/inventario/apps.py
Hector-hedb12/nanitosbaby
86eff05157dab02a7daca61e1f70ec76bbf6cbdf
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class InventarioConfig(AppConfig): name = 'nanitosbaby.inventario' verbose_name = 'Inventario'
20
39
0.788889
19
180
7.157895
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.15
180
8
40
22.5
0.888889
0
0
0
0
0
0.177778
0.122222
0
0
0
0
0
1
0
false
0
0.4
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
1
0
1
0
0
4
2ad5186574de88ba85e2d153e713bacf7e5760d2
65
py
Python
medium/books/app.py
meysam81/SampleCRUD
2ceaf37c0296ffa534dc77b7b084eac0c36038b2
[ "MIT" ]
null
null
null
medium/books/app.py
meysam81/SampleCRUD
2ceaf37c0296ffa534dc77b7b084eac0c36038b2
[ "MIT" ]
null
null
null
medium/books/app.py
meysam81/SampleCRUD
2ceaf37c0296ffa534dc77b7b084eac0c36038b2
[ "MIT" ]
null
null
null
from flask import Blueprint app = Blueprint('books', __name__)
13
34
0.753846
8
65
5.625
0.875
0
0
0
0
0
0
0
0
0
0
0
0.153846
65
4
35
16.25
0.818182
0
0
0
0
0
0.076923
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
1
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
1
0
4
2aea3f1499a755b29d0f1946b13457f7fa0a278a
191
py
Python
scripts/numbered_eq.py
agmarrugo/sensors-actuators
da6dbb2f652c88f0daaa34d316458e9fc474afe4
[ "MIT" ]
12
2018-10-12T07:32:55.000Z
2021-08-21T11:02:16.000Z
scripts/numbered_eq.py
Mol01/sensors-actuators
5d2334ac277b2624edc2ad73b7afb3d608e68d54
[ "MIT" ]
null
null
null
scripts/numbered_eq.py
Mol01/sensors-actuators
5d2334ac277b2624edc2ad73b7afb3d608e68d54
[ "MIT" ]
8
2015-08-21T18:32:29.000Z
2020-09-04T14:36:16.000Z
from IPython.display import HTML js = r""" <script type="text/Javascript"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS", useLabelIds: true } } }); </script> """ HTML(js)
47.75
135
0.675393
23
191
5.608696
0.869565
0.093023
0
0
0
0
0
0
0
0
0
0
0.13089
191
4
136
47.75
0.777108
0
0
0
0
0.25
0.713542
0.119792
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2aec281873f7f70286b891b0cd20b9568ed4ec42
226
py
Python
common/tests.py
Fingel/tdecentral
445dc7b907ae6a23c469a5f8df225e7d796c9d2e
[ "MIT" ]
null
null
null
common/tests.py
Fingel/tdecentral
445dc7b907ae6a23c469a5f8df225e7d796c9d2e
[ "MIT" ]
null
null
null
common/tests.py
Fingel/tdecentral
445dc7b907ae6a23c469a5f8df225e7d796c9d2e
[ "MIT" ]
null
null
null
from django.test import TestCase from django.urls import reverse class TestViews(TestCase): def test_index(self): response = self.client.get(reverse('index')) self.assertContains(response, 'TDE Central')
25.111111
52
0.721239
28
226
5.785714
0.642857
0.123457
0
0
0
0
0
0
0
0
0
0
0.176991
226
8
53
28.25
0.870968
0
0
0
0
0
0.070796
0
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
0
0.666667
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
1
0
0
4
2d577d9a44d71be2f88925d3732884a9071d4749
1,003
py
Python
tag/command/options.py
hewlock/tag-cli
e2d915ac12a050258bd3f1ea28bf6c15f627b4ea
[ "MIT" ]
null
null
null
tag/command/options.py
hewlock/tag-cli
e2d915ac12a050258bd3f1ea28bf6c15f627b4ea
[ "MIT" ]
32
2021-11-24T13:45:48.000Z
2021-12-15T13:01:21.000Z
tag/command/options.py
hewlock/tag-cli
e2d915ac12a050258bd3f1ea28bf6c15f627b4ea
[ "MIT" ]
null
null
null
import click def all(): return click.option('--all', '-a', default=False, is_flag=True, help='Include hidden files.') def count(): return click.option('--count', '-c', default=False, is_flag=True, help='Show count of matches.') def debug(): return click.option('--debug', '-d', default=False, is_flag=True, help='Make no changes to the file system.') def null(): return click.option('--null', '-0', default=False, is_flag=True, help='End output lines with NULL (\\0) instead of newline.') def recursive(): return click.option('--recursive', '-r', default=False, is_flag=True, help='Include subdirectories recursively.') def tree(help = 'Show output as tree.'): return click.option('--tree', '-t', default=False, is_flag=True, help=help) def verbose(): return click.option('--verbose', '-v', default=False, is_flag=True, help='Show additional output.') def version(): return click.option('--version', default=False, is_flag=True, help='Show version information.')
38.576923
129
0.680957
143
1,003
4.72028
0.34965
0.13037
0.201481
0.213333
0.346667
0.346667
0.231111
0
0
0
0
0.002304
0.134596
1,003
25
130
40.12
0.775346
0
0
0
0
0
0.306082
0
0
0
0
0
0
1
0.470588
false
0
0.058824
0.470588
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
1
0
0
0
1
0
0
0
4
2d6a6218f768c38f3ff8fdda673cac4c8b392546
541
py
Python
upstream/spec_augment/expert.py
OlegJakushkin/s3prl
c0e41f07fa56f0f79b5bf3839b4d0a4cf7c421bf
[ "MIT" ]
856
2021-01-15T15:40:32.000Z
2022-03-31T07:08:17.000Z
upstream/spec_augment/expert.py
OlegJakushkin/s3prl
c0e41f07fa56f0f79b5bf3839b4d0a4cf7c421bf
[ "MIT" ]
210
2021-01-15T13:28:50.000Z
2022-03-30T06:13:51.000Z
upstream/spec_augment/expert.py
OlegJakushkin/s3prl
c0e41f07fa56f0f79b5bf3839b4d0a4cf7c421bf
[ "MIT" ]
208
2021-01-15T03:03:12.000Z
2022-03-31T08:33:27.000Z
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ upstream/spec_augment/expert.py ] # Synopsis [ the spec augment wrapper ] # Author [ Andy T. Liu (https://github.com/andi611) ] # Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ] """*********************************************************************************************""" ############### # IMPORTATION # ############### from ..mockingjay.expert import UpstreamExpert
41.615385
99
0.36414
35
541
5.6
0.914286
0.112245
0
0
0
0
0
0
0
0
0
0.008547
0.134935
541
13
100
41.615385
0.410256
0.628466
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
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
2d7925007d6ba1ed14cb831de5f7ea8b0dcace51
167
py
Python
katas/beta/multiples.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/beta/multiples.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/beta/multiples.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
def multiple(x): if x % 15 == 0: return 'BangBoom' elif x % 3 == 0: return 'Bang' elif x % 5 == 0: return 'Boom' return 'Miss'
18.555556
25
0.45509
23
167
3.304348
0.608696
0.276316
0
0
0
0
0
0
0
0
0
0.070707
0.407186
167
8
26
20.875
0.69697
0
0
0
0
0
0.11976
0
0
0
0
0
0
1
0.125
false
0
0
0
0.625
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
1
0
0
4
2ddd424e3bb8181493cc297897fb7c47e952ca69
96
py
Python
runtime/driver/digi/__main__.py
NetSys/dspace
c3e2942501288ae06b41d2daf1b81424c812b34d
[ "Apache-2.0" ]
8
2021-05-28T13:17:34.000Z
2021-11-16T07:55:52.000Z
runtime/driver/digi/__main__.py
digi-project/sosp21-artifact
1b4a11c648e456c9ff9d74f16b09f4238d6694a0
[ "BSD-3-Clause" ]
15
2021-05-25T18:07:13.000Z
2022-01-03T20:00:59.000Z
runtime/driver/digi/__main__.py
isabella232/dspace
c3e2942501288ae06b41d2daf1b81424c812b34d
[ "Apache-2.0" ]
4
2021-05-23T21:40:45.000Z
2021-05-31T12:27:44.000Z
""" Driver entry point. """ import digi.main as main if __name__ == '__main__': main.run()
12
26
0.635417
13
96
4.076923
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.197917
96
7
27
13.714286
0.688312
0.197917
0
0
0
0
0.115942
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
2de24367521739f4cf305cde8b49010110f366dd
192
py
Python
workspace/module/python-2.7/LxKit/qt/kitQtModels/_kitQtMdlUtility.py
no7hings/Lynxi
43c745198a714c2e5aca86c6d7a014adeeb9abf7
[ "MIT" ]
2
2018-03-06T03:33:55.000Z
2019-03-26T03:25:11.000Z
workspace/module/python-2.7/LxKit/qt/kitQtModels/_kitQtMdlUtility.py
no7hings/lynxi
43c745198a714c2e5aca86c6d7a014adeeb9abf7
[ "MIT" ]
null
null
null
workspace/module/python-2.7/LxKit/qt/kitQtModels/_kitQtMdlUtility.py
no7hings/lynxi
43c745198a714c2e5aca86c6d7a014adeeb9abf7
[ "MIT" ]
null
null
null
# coding:utf-8 from .. import kitQtMdlAbs class KitQtCustomToolUnitModel(kitQtMdlAbs.Abs_KitQtCustomToolUnitMdl): def __init__(self, *args): self._initAbsKitCustomUnitMdl(*args)
24
71
0.770833
18
192
7.888889
0.833333
0
0
0
0
0
0
0
0
0
0
0.006024
0.135417
192
7
72
27.428571
0.849398
0.0625
0
0
0
0
0
0
0
0
0
0
0
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
1
0
0
4
9315938dd7f6c5a276f80d50cdec7defba36f5f9
123
py
Python
apps/tool/forms/__init__.py
ranyong1997/Sakura_Infinity
700c3e8497077b266958f1d26525469d1f0cd87f
[ "MIT" ]
1
2022-03-24T05:33:30.000Z
2022-03-24T05:33:30.000Z
apps/tool/forms/__init__.py
ranyong1997/Sakura_Infinity
700c3e8497077b266958f1d26525469d1f0cd87f
[ "MIT" ]
null
null
null
apps/tool/forms/__init__.py
ranyong1997/Sakura_Infinity
700c3e8497077b266958f1d26525469d1f0cd87f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @File: __init__.py.py # @Author: HanWenLu # @E-mail: wenlupay@163.com # @Time: 2021/10/13 11:16
20.5
27
0.609756
20
123
3.55
0.95
0
0
0
0
0
0
0
0
0
0
0.153846
0.154472
123
5
28
24.6
0.528846
0.910569
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
9340ec20f6a15416dcd519e2e62cdec5fd2043ad
37
py
Python
foiamachine/local/lib/python2.7/encodings/cp852.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
3
2021-08-07T04:01:55.000Z
2021-08-07T05:12:11.000Z
foiamachine/local/lib/python2.7/encodings/cp852.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
null
null
null
foiamachine/local/lib/python2.7/encodings/cp852.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
1
2021-08-05T22:51:14.000Z
2021-08-05T22:51:14.000Z
/usr/lib/python2.7/encodings/cp852.py
37
37
0.810811
7
37
4.285714
1
0
0
0
0
0
0
0
0
0
0
0.135135
0
37
1
37
37
0.675676
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
936f51dfc11c6f22b1156a83e44f6575dccb9daf
2,360
py
Python
snake/themes.py
gkelly6/python-console-snake
84b2c18534c08fb3df0e82549a50731c2c5042cb
[ "MIT" ]
null
null
null
snake/themes.py
gkelly6/python-console-snake
84b2c18534c08fb3df0e82549a50731c2c5042cb
[ "MIT" ]
null
null
null
snake/themes.py
gkelly6/python-console-snake
84b2c18534c08fb3df0e82549a50731c2c5042cb
[ "MIT" ]
null
null
null
import curses #COLOR_BLACK #COLOR_RED #COLOR_GREEN #COLOR_YELLOW #COLOR_BLUE #COLOR_MAGENTA #COLOR_CYAN #COLOR_WHITE game_themes = { 'classic': { "colors": { "default": (curses.COLOR_WHITE, curses.COLOR_BLACK), "bg": (curses.COLOR_YELLOW, curses.COLOR_YELLOW), "snake": (curses.COLOR_RED, curses.COLOR_GREEN), "apple": (curses.COLOR_RED, curses.COLOR_RED), "border": (curses.COLOR_WHITE, curses.COLOR_BLACK), "lives": (curses.COLOR_RED, curses.COLOR_RED), }, "tiles": { } }, 'minimal': { "colors": { "default": (curses.COLOR_WHITE, curses.COLOR_BLACK), "bg": (curses.COLOR_BLACK, curses.COLOR_BLACK), "snake": (curses.COLOR_WHITE, curses.COLOR_BLACK), "apple": (curses.COLOR_WHITE, curses.COLOR_BLACK), "border": (curses.COLOR_WHITE, curses.COLOR_BLACK), "lives": (curses.COLOR_WHITE, curses.COLOR_BLACK), }, "tiles": { "snake-body": '[]', "apple": '()', "border-h": '-', "border-v": ' |', "border-c": ' +', "lives": '{}' } }, 'jungle': { "colors": { "default": (curses.COLOR_WHITE, curses.COLOR_BLACK), "bg": (curses.COLOR_GREEN, curses.COLOR_BLACK), "snake": (curses.COLOR_WHITE, curses.COLOR_RED), "apple": (curses.COLOR_CYAN, curses.COLOR_BLACK), "border": (curses.COLOR_BLACK, curses.COLOR_GREEN), "lives": (curses.COLOR_BLACK, curses.COLOR_GREEN), }, "tiles": { "bg": '~', "snake-body": ' ', "apple": '@-', "lives": 'O ' } }, '80s': { "colors": { "default": (curses.COLOR_WHITE, curses.COLOR_BLACK), "bg": (curses.COLOR_YELLOW, curses.COLOR_BLACK), "snake": (curses.COLOR_WHITE, curses.COLOR_BLUE), "apple": (curses.COLOR_CYAN, curses.COLOR_YELLOW), "border": (curses.COLOR_BLACK, curses.COLOR_CYAN), "lives": (curses.COLOR_BLACK, curses.COLOR_BLUE), }, "tiles": { "bg": '. ', "snake-body": ' ', "apple": ' ', "lives": ' ' } }, }
28.780488
64
0.501271
221
2,360
5.095023
0.135747
0.478686
0.269982
0.21492
0.798401
0.771758
0.450266
0.450266
0.450266
0.332149
0
0.001267
0.331356
2,360
81
65
29.135802
0.712294
0.036864
0
0.246154
0
0
0.131184
0
0
0
0
0
0
1
0
false
0
0.015385
0
0.015385
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fa735bad676b97c44995b7cbada224c310911e83
862
py
Python
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/SGIS/texture_filter4.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/SGIS/texture_filter4.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/SGIS/texture_filter4.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GL_SGIS_texture_filter4' def _f( function ): return _p.createFunction( function,_p.PLATFORM.GL,'GL_SGIS_texture_filter4',error_checker=_errors._error_checker) GL_FILTER4_SGIS=_C('GL_FILTER4_SGIS',0x8146) GL_TEXTURE_FILTER4_SIZE_SGIS=_C('GL_TEXTURE_FILTER4_SIZE_SGIS',0x8147) @_f @_p.types(None,_cs.GLenum,_cs.GLenum,arrays.GLfloatArray) def glGetTexFilterFuncSGIS(target,filter,weights):pass @_f @_p.types(None,_cs.GLenum,_cs.GLenum,_cs.GLsizei,arrays.GLfloatArray) def glTexFilterFuncSGIS(target,filter,n,weights):pass
39.181818
117
0.815545
132
862
4.984848
0.424242
0.075988
0.059271
0.068389
0.253799
0.082067
0.082067
0.082067
0
0
0
0.020228
0.082367
862
21
118
41.047619
0.811631
0.116009
0
0.117647
1
0
0.117881
0.098013
0
0
0.015894
0
0
1
0.176471
false
0.117647
0.352941
0.058824
0.588235
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
fa7a034754483cef8fe66995892d0c1b3de4979c
190
py
Python
utwitter/forms.py
cb1986ster/Django_Twitter_Demo
7b898710b0d823dd0586c7f9cd24e62978c92798
[ "MIT" ]
null
null
null
utwitter/forms.py
cb1986ster/Django_Twitter_Demo
7b898710b0d823dd0586c7f9cd24e62978c92798
[ "MIT" ]
null
null
null
utwitter/forms.py
cb1986ster/Django_Twitter_Demo
7b898710b0d823dd0586c7f9cd24e62978c92798
[ "MIT" ]
1
2020-05-10T17:03:10.000Z
2020-05-10T17:03:10.000Z
from django import forms from .models import Tweet class AddTweetForm(forms.ModelForm): class Meta: model = Tweet # Powiązany model fields = ['content'] # Pola z modelu
23.75
44
0.684211
23
190
5.652174
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.242105
190
7
45
27.142857
0.902778
0.152632
0
0
0
0
0.044304
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
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
1
0
0
4
fa7f80f72c151d43beb69728eb216b598a698cbe
106
py
Python
pNLsys/phaseplane/__init__.py
smallpondtom/pNLsys
ebaea9c2945391fccd076f8006baee7066951097
[ "MIT" ]
6
2021-12-17T16:44:14.000Z
2022-02-22T05:40:43.000Z
pNLsys/phaseplane/__init__.py
smallpondtom/pNLsys
ebaea9c2945391fccd076f8006baee7066951097
[ "MIT" ]
null
null
null
pNLsys/phaseplane/__init__.py
smallpondtom/pNLsys
ebaea9c2945391fccd076f8006baee7066951097
[ "MIT" ]
null
null
null
# Get sub-modules from . import phaseplane from .phaseplane import * __all__ = phaseplane.__all__.copy()
17.666667
35
0.764151
13
106
5.615385
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.141509
106
5
36
21.2
0.802198
0.141509
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
1
0
0
4
fa88d837798a0a41eeeb3a20b78351e124c67e46
99
py
Python
codes_auto/1666.make-the-string-great.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/1666.make-the-string-great.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/1666.make-the-string-great.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
# # @lc app=leetcode.cn id=1666 lang=python3 # # [1666] make-the-string-great # None # @lc code=end
14.142857
42
0.676768
17
99
3.941176
0.882353
0
0
0
0
0
0
0
0
0
0
0.105882
0.141414
99
7
43
14.142857
0.682353
0.828283
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
0
0
0
0
0
4
fa9bb6c26dfff57031f7704b5cb007e8c4292150
648
py
Python
common/libs/user/UserService.py
agamgn/flask-Jianzhi
a06ece768ae8e2325a359e9c7af600358afb0595
[ "MIT" ]
7
2019-04-09T23:39:35.000Z
2022-03-05T15:59:07.000Z
common/libs/user/UserService.py
agamgn/flask-Jianzhi
a06ece768ae8e2325a359e9c7af600358afb0595
[ "MIT" ]
3
2021-03-18T23:22:40.000Z
2022-01-13T01:08:52.000Z
common/libs/user/UserService.py
agamgn/flask-Jianzhi
a06ece768ae8e2325a359e9c7af600358afb0595
[ "MIT" ]
2
2019-06-30T06:34:36.000Z
2020-07-24T10:18:30.000Z
# -*- coding:utf-8 -*- #@Auhor : Agam #@Time : 2018-12-08 #@Email : agamgn@163.com import hashlib from werkzeug.security import check_password_hash, generate_password_hash class UserService: @staticmethod def geneAuthCode(user_info = None ): m = hashlib.md5() str = "%s-%s-%s-%s" % (user_info.uid, user_info.account, user_info.password, user_info.sex) m.update(str.encode("utf-8")) return m.hexdigest() # 密码解密机制 @staticmethod def genePwd(salt,pwd): return check_password_hash(salt,pwd) # 密码加密机制 @staticmethod def jiaPwd(pwd): return generate_password_hash(pwd)
22.344828
99
0.652778
84
648
4.880952
0.559524
0.097561
0.082927
0
0
0
0
0
0
0
0
0.027723
0.220679
648
29
100
22.344828
0.784158
0.137346
0
0.2
1
0
0.028933
0
0
0
0
0
0
1
0.2
false
0.266667
0.133333
0.133333
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
1
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
fab5e9b7302e86ead603aea178ea1208a351dee0
979
py
Python
systembridge/objects/bluetooth.py
bdraco/system-bridge-connector-py
fba1c74217c706501fafe0185f05430e2240590a
[ "MIT" ]
null
null
null
systembridge/objects/bluetooth.py
bdraco/system-bridge-connector-py
fba1c74217c706501fafe0185f05430e2240590a
[ "MIT" ]
10
2021-06-06T00:34:47.000Z
2022-01-06T08:01:18.000Z
systembridge/objects/bluetooth.py
bdraco/system-bridge-connector-py
fba1c74217c706501fafe0185f05430e2240590a
[ "MIT" ]
2
2021-04-13T21:10:40.000Z
2021-11-04T16:27:29.000Z
""" Class object for Bluetooth Documentation: https://system-bridge.timmo.dev """ from __future__ import annotations from .base import BridgeBase class Bluetooth(BridgeBase): @property def device(self) -> str | None: return self.attributes.get("device") @property def name(self) -> str | None: return self.attributes.get("name") @property def manufacturer(self) -> str | None: return self.attributes.get("manufacturer") @property def macDevice(self) -> str | None: return self.attributes.get("macDevice") @property def macHost(self) -> str | None: return self.attributes.get("macHost") @property def batteryPercent(self) -> str | None: return self.attributes.get("batteryPercent") @property def type(self) -> str | None: return self.attributes.get("type") @property def connected(self) -> str | None: return self.attributes.get("connected")
23.309524
52
0.643514
109
979
5.743119
0.293578
0.140575
0.140575
0.217252
0.434505
0.434505
0.434505
0
0
0
0
0
0.232891
979
41
53
23.878049
0.833555
0.074566
0
0.296296
0
0
0.072383
0
0
0
0
0
0
1
0.296296
false
0
0.074074
0.296296
0.703704
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
1
1
0
0
4
877d4b54f5a54b7b6937f2b2e4f56e2e5def6007
110
py
Python
tests/unittests/core/io/test_evc_builder.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
177
2018-08-24T20:37:10.000Z
2022-03-28T13:56:00.000Z
tests/unittests/core/io/test_evc_builder.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
574
2018-08-25T19:25:33.000Z
2022-03-31T19:42:13.000Z
tests/unittests/core/io/test_evc_builder.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
35
2018-08-27T17:06:09.000Z
2022-03-22T13:58:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Collection of tests for :mod:`orion.core.io.evc_builder`."""
27.5
63
0.636364
17
110
4.058824
1
0
0
0
0
0
0
0
0
0
0
0.010204
0.109091
110
3
64
36.666667
0.693878
0.909091
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
8788bcd90b8945619edcf13f8c82f9e59aee20d8
135
py
Python
04-Functions/3-Repeat_String.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
04-Functions/3-Repeat_String.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
04-Functions/3-Repeat_String.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
def new_string(word: str, repeat: int): return word * repeat word = input() repeat = int(input()) print(new_string(word, repeat))
19.285714
39
0.688889
20
135
4.55
0.5
0.197802
0.285714
0
0
0
0
0
0
0
0
0
0.162963
135
7
40
19.285714
0.80531
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0.2
0.4
0.2
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
4
87ae4985fc633f73e48fc503cb0b1851d8f5aa50
370
py
Python
mysite1/search/views.py
kevinbear/cyber_website
42c5d3bd3623bc7f62efb5b8708424e321d84906
[ "MIT" ]
null
null
null
mysite1/search/views.py
kevinbear/cyber_website
42c5d3bd3623bc7f62efb5b8708424e321d84906
[ "MIT" ]
null
null
null
mysite1/search/views.py
kevinbear/cyber_website
42c5d3bd3623bc7f62efb5b8708424e321d84906
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def search_product(request, product): return HttpResponse(str(product)) # return render(request, 'home.html') def search_shop(request): return render(request, 'home.html') def add(request, a, b): c = int(a) + int(b) return HttpResponse(str(c))
19.473684
41
0.708108
51
370
5.098039
0.490196
0.076923
0.161538
0.176923
0.230769
0.230769
0
0
0
0
0
0
0.175676
370
18
42
20.555556
0.852459
0.159459
0
0
0
0
0.029221
0
0
0
0
0
0
1
0.333333
false
0
0.222222
0.222222
0.888889
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
1
1
0
0
4
87d79ed3bec2ea81a3a7fb7babe8be0b547c852d
46
py
Python
ex/24 (6).py
Time2003/lr7
b47edaf11ced014022764b6c5edef34e4c107c0b
[ "MIT" ]
null
null
null
ex/24 (6).py
Time2003/lr7
b47edaf11ced014022764b6c5edef34e4c107c0b
[ "MIT" ]
null
null
null
ex/24 (6).py
Time2003/lr7
b47edaf11ced014022764b6c5edef34e4c107c0b
[ "MIT" ]
null
null
null
my_list = ['Monty', 'Python'] list_2 = my_list
23
29
0.673913
8
46
3.5
0.625
0.428571
0
0
0
0
0
0
0
0
0
0.025
0.130435
46
2
30
23
0.675
0
0
0
0
0
0.234043
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e217312fd6cb97e75a31662a1d7ec80ee958b271
466
py
Python
mpltools/style/__init__.py
dpsanders/mpltools
c65b74e528669faa4c4f8ef83de6c6450028f031
[ "BSD-3-Clause" ]
1
2020-03-12T02:52:34.000Z
2020-03-12T02:52:34.000Z
mpltools/style/__init__.py
dpsanders/mpltools
c65b74e528669faa4c4f8ef83de6c6450028f031
[ "BSD-3-Clause" ]
null
null
null
mpltools/style/__init__.py
dpsanders/mpltools
c65b74e528669faa4c4f8ef83de6c6450028f031
[ "BSD-3-Clause" ]
null
null
null
""" This module defines styles that tweak matplotlib rc parameters. In addition, you can override pre-defined styles with "mplstyle" files in the current directory and your home directory (`~`). See "Getting Started" in the ``mpltools`` documentation for details. Functions ========= use Redefine rc parameters using specified style. lib Style library. baselib Style library defined by mpltools (i.e. before user definitions). """ from core import *
23.3
76
0.738197
62
466
5.548387
0.806452
0.069767
0
0
0
0
0
0
0
0
0
0
0.17382
466
19
77
24.526316
0.893506
0.935622
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
355edb18539ea88e97d929270106e319034bf689
222
py
Python
sharper_utils/__init__.py
quanbingDG/sharper
4cd5c6b3238d5e430d5986829cc4e0bb47ab3dff
[ "MIT" ]
null
null
null
sharper_utils/__init__.py
quanbingDG/sharper
4cd5c6b3238d5e430d5986829cc4e0bb47ab3dff
[ "MIT" ]
2
2021-01-13T03:39:15.000Z
2021-01-19T08:50:18.000Z
sharper_utils/__init__.py
quanbingDG/sharper
4cd5c6b3238d5e430d5986829cc4e0bb47ab3dff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2020/12/16 10:39 上午 # @Author : quanbing # @Email : quanbinks@sina.com # @File : __init__.py.py from .utils import Utils from .plot_utils import PlotUtils from .decorator import Decorator
24.666667
33
0.702703
33
222
4.575758
0.757576
0.145695
0
0
0
0
0
0
0
0
0
0.069519
0.157658
222
9
34
24.666667
0.737968
0.536036
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
356c99df1fa286c68b5ed050b7f497ece143c96b
150
py
Python
Inheritance/players_and_monsters_03E/project/soul_master.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Inheritance/players_and_monsters_03E/project/soul_master.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Inheritance/players_and_monsters_03E/project/soul_master.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
from project.dark_wizard import DarkWizard class SoulMaster(DarkWizard): def __init__(self, name, level): super().__init__(name, level)
21.428571
42
0.726667
18
150
5.555556
0.777778
0.18
0
0
0
0
0
0
0
0
0
0
0.173333
150
6
43
25
0.806452
0
0
0
0
0
0
0
0
0
0
0
0
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
1
0
0
4
3595e57b09e7bf4e44721b41de2b36b95cd6bfae
501
py
Python
Level2/Lessons12939/wowo0709.py
StudyForCoding/ProgrammersLevel
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
[ "MIT" ]
null
null
null
Level2/Lessons12939/wowo0709.py
StudyForCoding/ProgrammersLevel
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
[ "MIT" ]
null
null
null
Level2/Lessons12939/wowo0709.py
StudyForCoding/ProgrammersLevel
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
[ "MIT" ]
1
2021-04-05T07:35:59.000Z
2021-04-05T07:35:59.000Z
# 최댓값과 최솟값 def solution(s): n = list(map(int,s.split())) return " ".join([str(min(n)),str(max(n))]) ''' 정확성 테스트 테스트 1 〉 통과 (0.04ms, 10.3MB) 테스트 2 〉 통과 (0.05ms, 10.4MB) 테스트 3 〉 통과 (0.02ms, 10.4MB) 테스트 4 〉 통과 (0.03ms, 10.3MB) 테스트 5 〉 통과 (0.04ms, 10.3MB) 테스트 6 〉 통과 (0.04ms, 10.3MB) 테스트 7 〉 통과 (0.02ms, 10.4MB) 테스트 8 〉 통과 (0.03ms, 10.3MB) 테스트 9 〉 통과 (0.03ms, 10.4MB) 테스트 10 〉 통과 (0.04ms, 10.3MB) 테스트 11 〉 통과 (0.03ms, 10.4MB) 테스트 12 〉 통과 (0.04ms, 10.3MB) 채점 결과 정확성: 100.0 합계: 100.0 / 100.0 '''
20.04
46
0.562874
127
501
2.314961
0.330709
0.122449
0.163265
0.136054
0.588435
0.588435
0.544218
0
0
0
0
0.250633
0.211577
501
25
47
20.04
0.463291
0.015968
0
0
0
0
0.009804
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
359916b84a39a06c2e736154d6b198ba301984fc
1,102
py
Python
torch2trt/converters/clone.py
captainfffsama/torch2trt
666c305dc79f7dd51c4f6f5acccc793cad0c0df2
[ "MIT" ]
null
null
null
torch2trt/converters/clone.py
captainfffsama/torch2trt
666c305dc79f7dd51c4f6f5acccc793cad0c0df2
[ "MIT" ]
null
null
null
torch2trt/converters/clone.py
captainfffsama/torch2trt
666c305dc79f7dd51c4f6f5acccc793cad0c0df2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Description: 用于辅助 Tensor.clone 的转换 # @Author: CaptainHu # @Date: 2021-03-31 17:06:27 # @LastEditors: CaptainHu from torch2trt.torch2trt import * from torch2trt.module_test import add_module_test,add_single_module_test # FIXME: 过测试提示:[TensorRT] ERROR: INVALID_ARGUMENT: Cannot find binding of given name: input_0 # @tensorrt_converter('torch.clone') # @tensorrt_converter('torch.Tensor.clone') def convert_Tensor_clone(ctx): input=ctx.method_args[0] output=ctx.method_return input_trt = add_missing_trt_tensors(ctx.network, [input])[0] dtype = check_torch_dtype(input) scalar = input.detach().cpu().numpy() output._trt= ctx.network.add_constant(input_trt.shape, scalar).get_output(0) class TensorClone(torch.nn.Module): def __init__(self): super(TensorClone, self).__init__() def forward(self,x): return x.clone() # @add_single_module_test(torch.float32, torch.device('cuda'), [(1, 3, 4, 5)]) # @add_module_test(torch.float32, torch.device('cuda'), [(1, 3, 4, 5)]) def test_Tensor_clone(): return TensorClone()
31.485714
93
0.715971
155
1,102
4.83871
0.490323
0.066667
0.034667
0.050667
0.109333
0.109333
0.109333
0.109333
0.109333
0.109333
0
0.035865
0.139746
1,102
35
94
31.485714
0.755274
0.402904
0
0
0
0
0
0
0
0
0
0.028571
0
1
0.25
false
0
0.125
0.125
0.5625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
359ef947fc7db4bae8d0d51e8cb6fd12badb478b
5,151
py
Python
src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py
ConnectionMaster/azure-cli-extensions
08d184f4efeac397c1ffcd21a83d651f4fad2782
[ "MIT" ]
1
2021-02-03T23:06:06.000Z
2021-02-03T23:06:06.000Z
src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py
ConnectionMaster/azure-cli-extensions
08d184f4efeac397c1ffcd21a83d651f4fad2782
[ "MIT" ]
null
null
null
src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py
ConnectionMaster/azure-cli-extensions
08d184f4efeac397c1ffcd21a83d651f4fad2782
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import AdminCredentials from ._models_py3 import Circuit from ._models_py3 import Cluster from ._models_py3 import ClusterList from ._models_py3 import ClusterProperties from ._models_py3 import ClusterUpdate from ._models_py3 import ClusterUpdateProperties from ._models_py3 import Endpoints from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorResponse from ._models_py3 import ExpressRouteAuthorization from ._models_py3 import ExpressRouteAuthorizationList from ._models_py3 import HcxEnterpriseSite from ._models_py3 import HcxEnterpriseSiteList from ._models_py3 import IdentitySource from ._models_py3 import LogSpecification from ._models_py3 import ManagementCluster from ._models_py3 import MetricDimension from ._models_py3 import MetricSpecification from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationList from ._models_py3 import OperationProperties from ._models_py3 import PrivateCloud from ._models_py3 import PrivateCloudList from ._models_py3 import PrivateCloudProperties from ._models_py3 import PrivateCloudUpdate from ._models_py3 import PrivateCloudUpdateProperties from ._models_py3 import Quota from ._models_py3 import Resource from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import TrackedResource from ._models_py3 import Trial except (SyntaxError, ImportError): from ._models import AdminCredentials # type: ignore from ._models import Circuit # type: ignore from ._models import Cluster # type: ignore from ._models import ClusterList # type: ignore from ._models import ClusterProperties # type: ignore from ._models import ClusterUpdate # type: ignore from ._models import ClusterUpdateProperties # type: ignore from ._models import Endpoints # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorResponse # type: ignore from ._models import ExpressRouteAuthorization # type: ignore from ._models import ExpressRouteAuthorizationList # type: ignore from ._models import HcxEnterpriseSite # type: ignore from ._models import HcxEnterpriseSiteList # type: ignore from ._models import IdentitySource # type: ignore from ._models import LogSpecification # type: ignore from ._models import ManagementCluster # type: ignore from ._models import MetricDimension # type: ignore from ._models import MetricSpecification # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationList # type: ignore from ._models import OperationProperties # type: ignore from ._models import PrivateCloud # type: ignore from ._models import PrivateCloudList # type: ignore from ._models import PrivateCloudProperties # type: ignore from ._models import PrivateCloudUpdate # type: ignore from ._models import PrivateCloudUpdateProperties # type: ignore from ._models import Quota # type: ignore from ._models import Resource # type: ignore from ._models import ServiceSpecification # type: ignore from ._models import Sku # type: ignore from ._models import TrackedResource # type: ignore from ._models import Trial # type: ignore from ._avs_client_enums import ( ClusterProvisioningState, ExpressRouteAuthorizationProvisioningState, HcxEnterpriseSiteStatus, InternetEnum, PrivateCloudProvisioningState, QuotaEnabled, SslEnum, TrialStatus, ) __all__ = [ 'AdminCredentials', 'Circuit', 'Cluster', 'ClusterList', 'ClusterProperties', 'ClusterUpdate', 'ClusterUpdateProperties', 'Endpoints', 'ErrorAdditionalInfo', 'ErrorResponse', 'ExpressRouteAuthorization', 'ExpressRouteAuthorizationList', 'HcxEnterpriseSite', 'HcxEnterpriseSiteList', 'IdentitySource', 'LogSpecification', 'ManagementCluster', 'MetricDimension', 'MetricSpecification', 'Operation', 'OperationDisplay', 'OperationList', 'OperationProperties', 'PrivateCloud', 'PrivateCloudList', 'PrivateCloudProperties', 'PrivateCloudUpdate', 'PrivateCloudUpdateProperties', 'Quota', 'Resource', 'ServiceSpecification', 'Sku', 'TrackedResource', 'Trial', 'ClusterProvisioningState', 'ExpressRouteAuthorizationProvisioningState', 'HcxEnterpriseSiteStatus', 'InternetEnum', 'PrivateCloudProvisioningState', 'QuotaEnabled', 'SslEnum', 'TrialStatus', ]
38.729323
102
0.722772
465
5,151
7.772043
0.176344
0.188157
0.122302
0.178749
0.325955
0.088545
0.088545
0.088545
0
0
0
0.00983
0.190254
5,151
132
103
39.022727
0.856629
0.152786
0
0
1
0
0.156568
0.061517
0
0
0
0
0
1
0
false
0
0.564516
0
0.564516
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
35bbd10598a497a80dd34020582f79ff605c3442
145
py
Python
High Scores/Reset.py
Nat-133/Multiplayer-Snake
f6b025b8b94fe39194134c09ae63846bd27d062c
[ "MIT" ]
null
null
null
High Scores/Reset.py
Nat-133/Multiplayer-Snake
f6b025b8b94fe39194134c09ae63846bd27d062c
[ "MIT" ]
null
null
null
High Scores/Reset.py
Nat-133/Multiplayer-Snake
f6b025b8b94fe39194134c09ae63846bd27d062c
[ "MIT" ]
null
null
null
import pickle with open("highscore1p.txt","wb") as f: pickle.dump(1,f) with open("highscore2p.txt","wb") as f: pickle.dump(1,f)
18.125
40
0.62069
24
145
3.75
0.5
0.177778
0.155556
0.177778
0.444444
0.444444
0.444444
0.444444
0
0
0
0.034483
0.2
145
7
41
20.714286
0.741379
0
0
0.4
0
0
0.246377
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0
1
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
1
0
0
0
0
0
0
4
35bd0088d7b2607d8f6be49d338395201ef21a55
320
py
Python
horsetailmatching/__init__.py
lwcook/horsetail-matching
f3d5f8d01249debbca978f412ce4eae017458119
[ "MIT" ]
2
2017-05-17T17:07:08.000Z
2018-03-29T12:42:36.000Z
horsetailmatching/__init__.py
lwcook/horsetail-matching
f3d5f8d01249debbca978f412ce4eae017458119
[ "MIT" ]
null
null
null
horsetailmatching/__init__.py
lwcook/horsetail-matching
f3d5f8d01249debbca978f412ce4eae017458119
[ "MIT" ]
null
null
null
from hm import HorsetailMatching from densitymatching import DensityMatching from weightedsum import WeightedSum from parameters import UncertainParameter, UniformParameter from parameters import GaussianParameter, IntervalParameter from surrogates import PolySurrogate from demoproblems import TP0, TP1, TP2, TP2b, TP3
40
59
0.875
34
320
8.235294
0.558824
0.1
0.142857
0
0
0
0
0
0
0
0
0.017483
0.10625
320
7
60
45.714286
0.961538
0
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
ea087a182d287ccdd7f7185a02028e50210b9937
107
py
Python
memit/settings.py
russlbrown/memit
cf89bb91264008d554602a6f44f2e0404a7903fc
[ "MIT" ]
null
null
null
memit/settings.py
russlbrown/memit
cf89bb91264008d554602a6f44f2e0404a7903fc
[ "MIT" ]
null
null
null
memit/settings.py
russlbrown/memit
cf89bb91264008d554602a6f44f2e0404a7903fc
[ "MIT" ]
null
null
null
# These are days between each review stage. REVIEW_STAGE = (0, 1, 7, 14, 28, 56, 112, 224, 448, 896, 10**5)
53.5
63
0.654206
21
107
3.285714
0.904762
0.318841
0
0
0
0
0
0
0
0
0
0.275862
0.186916
107
2
63
53.5
0.517241
0.383178
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
1
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
4
ea31caaca5cf12c75f3973b4f7c46c3c377a84c0
796
py
Python
wouso/core/game/__init__.py
AlexandruGhergut/wouso
f26244ff58ae626808ae8c58ccc93d21f9f2666f
[ "Apache-2.0" ]
null
null
null
wouso/core/game/__init__.py
AlexandruGhergut/wouso
f26244ff58ae626808ae8c58ccc93d21f9f2666f
[ "Apache-2.0" ]
null
null
null
wouso/core/game/__init__.py
AlexandruGhergut/wouso
f26244ff58ae626808ae8c58ccc93d21f9f2666f
[ "Apache-2.0" ]
null
null
null
from django.db.models import get_models from models import Game def get_games(): """Get a list of available games. This needs to be updated each time a game is added.""" from wouso.games.challenge.models import ChallengeGame from wouso.games.grandchallenge.models import GrandChallengeGame from wouso.games.qotd.models import QotdGame from wouso.games.quest.models import QuestGame from wouso.games.quiz.models import QuizGame from wouso.games.specialchallenge.models import SpecialChallengeGame from wouso.games.specialquest.models import SpecialQuestGame from wouso.games.workshop.models import WorkshopGame return [ChallengeGame, GrandChallengeGame, QotdGame, QuestGame, QuizGame, SpecialChallengeGame, SpecialQuestGame, WorkshopGame]
44.222222
75
0.78392
96
796
6.479167
0.416667
0.192926
0.180064
0
0
0
0
0
0
0
0
0
0.158291
796
17
76
46.823529
0.928358
0.103015
0
0
0
0
0
0
0
0
0
0
0
1
0.076923
true
0
0.769231
0
0.923077
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
0
1
0
1
0
0
4
ea6f079ecff910b49af7902338c3377d7646ebf3
206
py
Python
cap5_arquivos/arquivo.py
felipesch92/cursoFiap
b5c0d82a29a0660d87f27cd46d5635d9a5dbfea5
[ "MIT" ]
null
null
null
cap5_arquivos/arquivo.py
felipesch92/cursoFiap
b5c0d82a29a0660d87f27cd46d5635d9a5dbfea5
[ "MIT" ]
null
null
null
cap5_arquivos/arquivo.py
felipesch92/cursoFiap
b5c0d82a29a0660d87f27cd46d5635d9a5dbfea5
[ "MIT" ]
null
null
null
with open('arquivo.txt', 'w') as arq: arq.write('Felipe\n') arq.write('Tamara\n') arq.write('Malvo\n') with open('arquivo.txt', 'r') as arq: for l in arq.readlines(): print(f'{l}')
22.888889
37
0.567961
34
206
3.441176
0.558824
0.205128
0.25641
0.307692
0
0
0
0
0
0
0
0
0.208738
206
8
38
25.75
0.717791
0
0
0
0
0
0.242718
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ea9ab43d5c672e15dd0dd8f34371b2c2139902c9
165
py
Python
problem0209.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0209.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0209.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
########################### # # #209 Circular Logic - Project Euler # https://projecteuler.net/problem=209 # # Code by Kevin Marciniak # ###########################
18.333333
38
0.472727
14
165
5.571429
0.928571
0
0
0
0
0
0
0
0
0
0
0.041096
0.115152
165
8
39
20.625
0.493151
0.575758
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
577aca254d6c4bfeb82f0cf69f92866b578bf6dc
144
py
Python
orion_core/engine.py
nightred/orion-core
ad80eb9c18559f32e165245b1aa2e3b0927c5f9e
[ "MIT" ]
null
null
null
orion_core/engine.py
nightred/orion-core
ad80eb9c18559f32e165245b1aa2e3b0927c5f9e
[ "MIT" ]
null
null
null
orion_core/engine.py
nightred/orion-core
ad80eb9c18559f32e165245b1aa2e3b0927c5f9e
[ "MIT" ]
null
null
null
import os import threading import logging logger = logging.getLogger(__name__) logger.info("Loading Engine") def test(): return True
9.6
36
0.736111
18
144
5.666667
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.180556
144
14
37
10.285714
0.864407
0
0
0
0
0
0.098592
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
57805fc7bb63c2c246954a5862c9fd349b5de839
718
py
Python
tests/test_generate_thumbnails.py
AdamHawtin/bucket-thumbnail-generator
db42e0dca709156513b47f17cd540fb68c1dfe0e
[ "MIT" ]
null
null
null
tests/test_generate_thumbnails.py
AdamHawtin/bucket-thumbnail-generator
db42e0dca709156513b47f17cd540fb68c1dfe0e
[ "MIT" ]
6
2021-04-30T20:51:43.000Z
2022-03-11T23:54:26.000Z
tests/test_generate_thumbnails.py
AdamHawtin/bucket-thumbnail-generator
db42e0dca709156513b47f17cd540fb68c1dfe0e
[ "MIT" ]
null
null
null
from generate_thumbnails import is_event_supported_image def test_is_supported_image(): # Given event = {'name': 'test.jpg', 'contentType': 'image/jpeg'} file_extension = 'jpg' # Then assert is_event_supported_image(event, file_extension) def test_is_supported_image_unsupported_content_type(): # Given event = {'name': 'test.txt', 'contentType': 'text'} file_extension = 'txt' # Then assert not is_event_supported_image(event, file_extension) def test_is_supported_image_unsupported_extension(): # Given event = {'name': 'test.no', 'contentType': 'image/no'} file_extension = '.no' # Then assert not is_event_supported_image(event, file_extension)
24.758621
62
0.707521
89
718
5.337079
0.292135
0.206316
0.134737
0.176842
0.492632
0.444211
0.444211
0.444211
0.444211
0.444211
0
0
0.179666
718
28
63
25.642857
0.806452
0.044568
0
0.153846
1
0
0.145803
0
0
0
0
0
0.230769
1
0.230769
false
0
0.076923
0
0.307692
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
57c019daab64d095b9bca4b2f1e52cb1fcf56964
24
py
Python
gazelle/testdata/python_target_with_test_in_name/not_a_real_test.py
axivion/rules_python
7740b22d0bae942af0797967f2617daa19834cb3
[ "Apache-2.0" ]
null
null
null
gazelle/testdata/python_target_with_test_in_name/not_a_real_test.py
axivion/rules_python
7740b22d0bae942af0797967f2617daa19834cb3
[ "Apache-2.0" ]
null
null
null
gazelle/testdata/python_target_with_test_in_name/not_a_real_test.py
axivion/rules_python
7740b22d0bae942af0797967f2617daa19834cb3
[ "Apache-2.0" ]
null
null
null
import boto3 _ = boto3
6
12
0.708333
3
24
5.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0.111111
0.25
24
3
13
8
0.777778
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
1
0
0
0
0
4
57cca754427a58fe19235df9972575e8ac1c05e8
124
py
Python
source/__init__.py
chiqj/common-api
6e95b09290fa448a112dcdc5d74ab2ad1b2f3059
[ "MIT" ]
null
null
null
source/__init__.py
chiqj/common-api
6e95b09290fa448a112dcdc5d74ab2ad1b2f3059
[ "MIT" ]
null
null
null
source/__init__.py
chiqj/common-api
6e95b09290fa448a112dcdc5d74ab2ad1b2f3059
[ "MIT" ]
1
2022-03-09T15:15:13.000Z
2022-03-09T15:15:13.000Z
# coding=utf-8 from .dingtalk import DingTalkRobot from .wxoauth2 import WxOauth2 __all__ = ["DingTalkRobot", "WxOauth2"]
17.714286
39
0.766129
14
124
6.5
0.642857
0
0
0
0
0
0
0
0
0
0
0.037037
0.129032
124
6
40
20.666667
0.805556
0.096774
0
0
0
0
0.190909
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
1
0
0
4
57dcc10b9281618a5fa6e88b3fddfd1750eccb93
283
py
Python
asclib/checkers/__init__.py
AdaCore/style_checker
17108ebfc44375498063ecdad6c6e4430458e60a
[ "CNRI-Python" ]
2
2017-10-22T18:04:26.000Z
2020-03-06T11:07:41.000Z
asclib/checkers/__init__.py
AdaCore/style_checker
17108ebfc44375498063ecdad6c6e4430458e60a
[ "CNRI-Python" ]
null
null
null
asclib/checkers/__init__.py
AdaCore/style_checker
17108ebfc44375498063ecdad6c6e4430458e60a
[ "CNRI-Python" ]
4
2018-05-22T12:08:54.000Z
2020-12-14T15:25:27.000Z
class FileCheckerError(Exception): """The exception raised when detecting an error during style checking. The argument can be a string (the description of the error), or a list of strings, if the description of the error spans over multiple lines. """ pass
28.3
74
0.713781
40
283
5.05
0.7
0.138614
0.158416
0.188119
0.237624
0
0
0
0
0
0
0
0.233216
283
9
75
31.444444
0.930876
0.742049
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
57fa38b679980869d864d403c65a5d4a74617e5f
991
py
Python
molsysmt/_private/digestion/__init__.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/_private/digestion/__init__.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/_private/digestion/__init__.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
from .atom_indices import digest_atom_indices from .box import digest_box from .box import digest_box_lengths, digest_box_lengths_value from .box import digest_box_angles, digest_box_angles_value from .coordinates import digest_coordinates from .comparison import digest_comparison from .element import digest_element from .engine import digest_engine from .form import digest_form, digest_to_form from .group_indices import digest_group_indices from .indices import digest_indices from .item import digest_item from .molecular_system import digest_single_molecular_system, digest_multiple_molecular_systems from .output import digest_output from .selection import digest_selection, digest_multiple_selections from .step import digest_step from .structure_indices import digest_structure_indices, digest_multiple_structure_indices from .syntaxis import digest_syntaxis, digest_to_syntaxis from .element import digest_element from .time import digest_time from .viewers import digest_viewer
43.086957
95
0.87891
141
991
5.822695
0.219858
0.306943
0.09257
0.069428
0.163216
0.082826
0
0
0
0
0
0
0.092836
991
22
96
45.045455
0.913237
0
0
0.095238
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
17e00271b9db3fcab5bca7f560d26eb492cfbbaa
347
py
Python
serializers.py
touqeer-ahmad/SmartCam
9f2f46c91bcba175a1b3ea5c79fdcdce6388d97c
[ "MIT" ]
null
null
null
serializers.py
touqeer-ahmad/SmartCam
9f2f46c91bcba175a1b3ea5c79fdcdce6388d97c
[ "MIT" ]
null
null
null
serializers.py
touqeer-ahmad/SmartCam
9f2f46c91bcba175a1b3ea5c79fdcdce6388d97c
[ "MIT" ]
null
null
null
from myapp.models import Mode, Action from rest_framework import serializers class ModeSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Mode fields = ('url', 'name') class ActionSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Action fields = ('url', 'name')
26.692308
63
0.70317
33
347
7.363636
0.545455
0.304527
0.345679
0.378601
0.419753
0
0
0
0
0
0
0
0.210375
347
12
64
28.916667
0.886861
0
0
0.4
0
0
0.040346
0
0
0
0
0
0
1
0
false
0
0.2
0
0.6
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
1
0
0
4
17edc3699b20313b66bb855b1ba29553929b6334
90
py
Python
hs_core/tests/api/rest/__init__.py
tommac7/hydroshare
87c4543a55f98103d2614bf4c47f7904c3f9c029
[ "BSD-3-Clause" ]
178
2015-01-08T23:03:36.000Z
2022-03-03T13:56:45.000Z
hs_core/tests/api/rest/__init__.py
tommac7/hydroshare
87c4543a55f98103d2614bf4c47f7904c3f9c029
[ "BSD-3-Clause" ]
4,125
2015-01-01T14:26:15.000Z
2022-03-31T16:38:55.000Z
hs_core/tests/api/rest/__init__.py
tommac7/hydroshare
87c4543a55f98103d2614bf4c47f7904c3f9c029
[ "BSD-3-Clause" ]
53
2015-03-15T17:56:51.000Z
2022-03-17T00:32:16.000Z
# Do not import tests here as this will cause # some tests to be discovered and run twice
30
45
0.766667
17
90
4.058824
0.941176
0
0
0
0
0
0
0
0
0
0
0
0.211111
90
2
46
45
0.971831
0.944444
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
17f314f99ee35d82ecfb5550c18b0c8d66954df9
582
py
Python
tests/b013.py
kasium/flake8-bugbear
0d54ee6d14367e444664fa38b8522776aaaee5df
[ "MIT" ]
null
null
null
tests/b013.py
kasium/flake8-bugbear
0d54ee6d14367e444664fa38b8522776aaaee5df
[ "MIT" ]
null
null
null
tests/b013.py
kasium/flake8-bugbear
0d54ee6d14367e444664fa38b8522776aaaee5df
[ "MIT" ]
null
null
null
""" Should emit: B013 - on lines 10 and 28 """ import re try: pass except (ValueError,): # pointless use of tuple pass # fmt: off # Turn off black to keep brackets around # single exception for testing purposes. try: pass except (ValueError): # not using a tuple means it's OK (if odd) pass # fmt: on try: pass except ValueError: # no warning here, all good pass try: pass except (re.error,): # pointless use of tuple with dotted attribute pass try: pass except (a.b.c.d, b.c.d): # attribute of attribute, etc. pass
14.195122
50
0.635739
88
582
4.204545
0.602273
0.094595
0.175676
0.186486
0
0
0
0
0
0
0
0.016548
0.273196
582
40
51
14.55
0.858156
0.512027
0
0.714286
0
0
0
0
0
0
0
0
0
1
0
true
0.47619
0.047619
0
0.047619
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
aa3c151bf3109d3efc5debb781ab45a95bb54faf
56
py
Python
music_downloader/__init__.py
drforse/icq_music_bot
a0e09fef3ce553ac921fd2a729ec36c70401b95c
[ "MIT" ]
null
null
null
music_downloader/__init__.py
drforse/icq_music_bot
a0e09fef3ce553ac921fd2a729ec36c70401b95c
[ "MIT" ]
null
null
null
music_downloader/__init__.py
drforse/icq_music_bot
a0e09fef3ce553ac921fd2a729ec36c70401b95c
[ "MIT" ]
null
null
null
from .types import MusicFile from .search import Search
18.666667
28
0.821429
8
56
5.75
0.625
0
0
0
0
0
0
0
0
0
0
0
0.142857
56
2
29
28
0.958333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
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
4
aa421db4495dd67368e6a250ff35553d2ac75aa4
7,234
py
Python
6310545566_Phawit_ex4/coffee_machine_2.py
HelloYeew/helloyeew-computer-programming-i
cf8315bdc4b8e20ba410e0745778595805f51afb
[ "MIT" ]
null
null
null
6310545566_Phawit_ex4/coffee_machine_2.py
HelloYeew/helloyeew-computer-programming-i
cf8315bdc4b8e20ba410e0745778595805f51afb
[ "MIT" ]
null
null
null
6310545566_Phawit_ex4/coffee_machine_2.py
HelloYeew/helloyeew-computer-programming-i
cf8315bdc4b8e20ba410e0745778595805f51afb
[ "MIT" ]
1
2020-12-07T10:05:44.000Z
2020-12-07T10:05:44.000Z
import sys # function zone def summary(): global water, milk, coffee_beans, disposable_cups, money print("The coffee machine has:") print(f"{water} of water") print(f"{milk} of milk") print(f"{coffee_beans} of coffee beans") print(f"{disposable_cups} of disposable cups") if money != 0: print(f"${money} of money") else: print(f"{money} of money") def ask_action(): print("Write action (buy, fill, take, remaining, exit):") answer = str(input()) return answer def buy(): global water, milk, coffee_beans, disposable_cups, money print("What do you want to buy? 1 - espresso, 2 - espresso, 3 - cappuccino, back - to main menu:") buy_coffee = input() if buy_coffee == 1: if water >= 250 and coffee_beans >= 16 and disposable_cups >= 1: print("I have enough resources, making you a coffee!") water -= 250 coffee_beans -= 16 money += 4 disposable_cups -= 1 else: if water < 250 and coffee_beans < 16 and disposable_cups < 1: print("Sorry, not enough water, coffee beans and disposable cups!") elif water < 250 and coffee_beans < 16: print("Sorry, not enough water and coffee beans!") elif water < 250 and disposable_cups < 1: print("Sorry, not enough water and disposable cups!") elif coffee_beans < 16 and disposable_cups < 1: print("Sorry, not enough coffee beans and disposable cups!") elif water < 250: print("Sorry, not enough water!") elif coffee_beans < 16: print("Sorry, not enough coffee beans!") else: print("Sorry, not enough disposable cups!") elif buy_coffee == 2: if water >= 350 and milk >= 75 and coffee_beans >= 20 and disposable_cups >= 1: print("I have enough resources, making you a coffee!") water -= 350 milk -= 75 coffee_beans -= 20 money += 7 disposable_cups -= 1 else: # 1 + 4 + 6 + 4 = 15 if water < 350 and milk < 75 and coffee_beans < 20 and disposable_cups < 1: print("Sorry, not enough water, milk, coffee beans and disposable cups!") elif water < 350 and milk < 75 and coffee_beans < 20: print("Sorry, not enough water, milk and coffee beans!") elif water < 350 and milk < 75 and disposable_cups < 1: print("Sorry, not enough water, milk and disposable cups!") elif water < 350 and coffee_beans < 20 and disposable_cups < 1: print("Sorry, not enough water, coffee beans and disposable cups!") elif milk < 75 and coffee_beans < 20 and disposable_cups < 1: print("Sorry, not enough milk, coffee beans and disposable cups!") elif water < 350 and milk < 75: print("Sorry, not enough water and milk!") elif water < 350 and coffee_beans < 20: print("Sorry, not enough water and coffee beans!") elif water < 350 and disposable_cups < 1: print("Sorry, not enough water and disposable cups!") elif milk < 75 and coffee_beans < 20: print("Sorry, not enough milk and coffee beans!") elif milk < 75 and disposable_cups < 1: print("Sorry, not enough milk and disposable cups!") elif coffee_beans < 20 and disposable_cups < 1: print("Sorry, not enough coffee beans and disposable cups!") elif water < 350: print("Sorry, not enough water!") elif milk < 75: print("Sorry, not enough milk!") elif coffee_beans < 20: print("Sorry, not enough coffee beans!") else: print("Sorry, not enough disposable cups!") elif buy_coffee == 3: if water >= 200 and milk >= 100 and coffee_beans >= 12 and disposable_cups >= 1: print("I have enough resources, making you a coffee!") water -= 200 milk -= 100 coffee_beans -= 12 money += 6 disposable_cups -= 1 else: if water < 200 and milk < 100 and coffee_beans < 12 and disposable_cups < 1: print("Sorry, not enough water, milk, coffee beans and disposable cups!") elif water < 200 and milk < 100 and coffee_beans < 12: print("Sorry, not enough water, milk and coffee beans!") elif water < 200 and milk < 100 and disposable_cups < 1: print("Sorry, not enough water, milk and disposable cups!") elif water < 200 and coffee_beans < 12 and disposable_cups < 1: print("Sorry, not enough water, coffee beans and disposable cups!") elif milk < 100 and coffee_beans < 12 and disposable_cups < 1: print("Sorry, not enough milk, coffee beans and disposable cups!") elif water < 200 and milk < 100: print("Sorry, not enough water and milk!") elif water < 200 and coffee_beans < 12: print("Sorry, not enough water and coffee beans!") elif water < 200 and disposable_cups < 1: print("Sorry, not enough water and disposable cups!") elif milk < 100 and coffee_beans < 12: print("Sorry, not enough milk and coffee beans!") elif milk < 100 and disposable_cups < 1: print("Sorry, not enough milk and disposable cups!") elif coffee_beans < 12 and disposable_cups < 1: print("Sorry, not enough coffee beans and disposable cups!") elif water < 350: print("Sorry, not enough water!") elif milk < 75: print("Sorry, not enough milk!") elif coffee_beans < 12: print("Sorry, not enough coffee beans!") else: print("Sorry, not enough disposable cups!") else: pass def fill(): global water, milk, coffee_beans, disposable_cups print("Write how many ml of water do you want to add:") fill_water = int(input()) print("Write how many ml of milk do you want to add:") fill_milk = int(input()) print("Write how many grams of coffee beans do you want to add:") fill_coffee = int(input()) print("Write how many disposable cups of coffee do you want to add:") fill_cups = int(input()) water += fill_water milk += fill_milk coffee_beans += fill_coffee disposable_cups += fill_cups def take(): global money print(f"I gave you ${money}") money = 0 # main zone water = 400 milk = 540 coffee_beans = 120 disposable_cups = 9 money = 550 while True: action = ask_action() print() if action == "buy": buy() elif action == "fill": fill() elif action == "take": take() elif action == "remaining": summary() elif action == "exit": sys.exit() else: print("No valid action") print()
40.640449
102
0.568565
922
7,234
4.37961
0.09436
0.147103
0.15577
0.174096
0.787519
0.778603
0.71892
0.694156
0.691431
0.63893
0
0.048709
0.341581
7,234
177
103
40.870057
0.799076
0.005806
0
0.372671
0
0.006211
0.3133
0
0
0
0
0
0
1
0.031056
false
0.006211
0.006211
0
0.043478
0.354037
0
0
0
null
0
0
1
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
4
a4ca3859f37662584636cd9a30a284e2cdf5c410
31
py
Python
venv-lib/lib/python3.7/copyreg.py
migmaciasdiaz/venvs
bcdbb75931cb27fc4b5b30f12fc44be85952157e
[ "MIT" ]
2
2020-03-30T14:17:10.000Z
2020-10-04T12:33:00.000Z
venv-lib/lib/python3.7/copyreg.py
migmaciasdiaz/venvs
bcdbb75931cb27fc4b5b30f12fc44be85952157e
[ "MIT" ]
1
2020-11-24T03:31:13.000Z
2020-11-24T03:31:13.000Z
venv/lib/python3.7/copyreg.py
wensu425/aws-eb-webapp
4b149c75c11fe5b33c9a080313ec336fabb45824
[ "MIT" ]
1
2021-05-04T09:18:22.000Z
2021-05-04T09:18:22.000Z
/usr/lib64/python3.7/copyreg.py
31
31
0.806452
6
31
4.166667
1
0
0
0
0
0
0
0
0
0
0
0.129032
0
31
1
31
31
0.677419
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
a4ca4455ddf1e2db581af560e050a163375fd119
65
py
Python
mexico_map_tours/key.py
BrandonZoft/mexico-map-tours
3bc1eb7df102a99120198c051e4e6a168d53924b
[ "MIT" ]
null
null
null
mexico_map_tours/key.py
BrandonZoft/mexico-map-tours
3bc1eb7df102a99120198c051e4e6a168d53924b
[ "MIT" ]
null
null
null
mexico_map_tours/key.py
BrandonZoft/mexico-map-tours
3bc1eb7df102a99120198c051e4e6a168d53924b
[ "MIT" ]
null
null
null
SECRET_KEY = 'psixm!gy$3dq4_lvc4#61tuy#jaohv60$h6_fu%n6%#8^u6mmn'
65
65
0.784615
13
65
3.692308
1
0
0
0
0
0
0
0
0
0
0
0.174603
0.030769
65
1
65
65
0.587302
0
0
0
0
0
0.757576
0.757576
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a4cb22b266f0b7ee23dd1b10fc7535bf89f1627a
302
py
Python
sendim/views/__init__.py
ZuluPro/snafu
dbd79da4617db315ba7e76a0af6805cc3b1cbae2
[ "BSD-3-Clause" ]
1
2017-12-13T20:28:32.000Z
2017-12-13T20:28:32.000Z
sendim/views/__init__.py
ZuluPro/snafu
dbd79da4617db315ba7e76a0af6805cc3b1cbae2
[ "BSD-3-Clause" ]
null
null
null
sendim/views/__init__.py
ZuluPro/snafu
dbd79da4617db315ba7e76a0af6805cc3b1cbae2
[ "BSD-3-Clause" ]
null
null
null
from index import index, stat from login import snafu_login, snafu_logout from ajax import reload_alerts, eventHistory, eventReference, eventAlerts, eventsFiltered, choosePrimaryAlert, eventsAgr, closeEvents, followUp from event import events, EaddRef from config import * from apropos import apropos
43.142857
143
0.84106
37
302
6.783784
0.621622
0
0
0
0
0
0
0
0
0
0
0
0.119205
302
6
144
50.333333
0.943609
0
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
a4e6bb6a8eebb63a93706b4380c13ddce87d0c03
180
py
Python
jobs/files/test.py
solj/hpc-doc
71a5f85dd851c2f4a3c36051bda543b35d829a36
[ "CC-BY-4.0" ]
13
2015-09-28T13:13:53.000Z
2022-02-21T05:05:51.000Z
jobs/files/test.py
solj/hpc-doc
71a5f85dd851c2f4a3c36051bda543b35d829a36
[ "CC-BY-4.0" ]
47
2015-09-25T13:48:41.000Z
2022-02-17T07:52:39.000Z
jobs/files/test.py
solj/hpc-doc
71a5f85dd851c2f4a3c36051bda543b35d829a36
[ "CC-BY-4.0" ]
24
2016-02-10T07:39:33.000Z
2022-02-16T15:55:24.000Z
#!/usr/bin/env python import time print('start at ' + time.strftime('%H:%M:%S')) print('sleep for 10 seconds ...') time.sleep(10) print('stop at ' + time.strftime('%H:%M:%S'))
16.363636
46
0.616667
30
180
3.7
0.6
0.108108
0.252252
0.27027
0.306306
0.306306
0
0
0
0
0
0.025641
0.133333
180
10
47
18
0.685897
0.111111
0
0
0
0
0.358491
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0.6
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
1
0
0
0
0
1
0
4
35113f77557957ce66b5ac2cb77ef0d5daa653f0
274
py
Python
tests/two_machines_catchball/machine_b/context.py
muzudho/state-machine-py
f8f442c88fcc16db07960ffccc5e466bf20d9a11
[ "MIT" ]
null
null
null
tests/two_machines_catchball/machine_b/context.py
muzudho/state-machine-py
f8f442c88fcc16db07960ffccc5e466bf20d9a11
[ "MIT" ]
null
null
null
tests/two_machines_catchball/machine_b/context.py
muzudho/state-machine-py
f8f442c88fcc16db07960ffccc5e466bf20d9a11
[ "MIT" ]
null
null
null
class Context(): """ステートマシンは、このContextが何なのか知りません。 外部から任意に与えることができる変数です""" def __init__(self): self._number = None @property def number(self): return self._number @number.setter def number(self, val): self._number = val
18.266667
36
0.616788
27
274
6
0.518519
0.185185
0.160494
0
0
0
0
0
0
0
0
0
0.277372
274
14
37
19.571429
0.818182
0.182482
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.111111
0.555556
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
351db1c716fc99b66f34c016570c1766c403ff3f
199
py
Python
apiformypartner/favfood/serializers.py
CodeChefVIT/myPartner
e82ef1febc96ce88e256dda06f71b68ffcf5f1be
[ "MIT" ]
1
2021-05-20T05:44:14.000Z
2021-05-20T05:44:14.000Z
apiformypartner/favfood/serializers.py
CodeChefVIT/myPartner
e82ef1febc96ce88e256dda06f71b68ffcf5f1be
[ "MIT" ]
1
2020-07-26T07:48:14.000Z
2020-07-26T07:48:14.000Z
apiformypartner/favfood/serializers.py
CodeChefVIT/myPartner
e82ef1febc96ce88e256dda06f71b68ffcf5f1be
[ "MIT" ]
3
2020-07-12T17:34:10.000Z
2020-07-31T19:01:51.000Z
from rest_framework import serializers from .models import Rest_favfood class RestnfoodSerializer(serializers.ModelSerializer): class Meta: model= Rest_favfood fields= '__all__'
28.428571
55
0.763819
21
199
6.904762
0.666667
0.151724
0
0
0
0
0
0
0
0
0
0
0.18593
199
7
56
28.428571
0.895062
0
0
0
0
0
0.035
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
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
1
0
0
4
3534945cf554adfa9097805c7beeafb7307f234c
35
py
Python
tests/__init__.py
destos/bonfo
ac6052769f873c743ca14cffbc6d348b321495b7
[ "MIT" ]
null
null
null
tests/__init__.py
destos/bonfo
ac6052769f873c743ca14cffbc6d348b321495b7
[ "MIT" ]
1
2022-03-31T01:54:53.000Z
2022-03-31T01:54:53.000Z
tests/__init__.py
destos/bonfo
ac6052769f873c743ca14cffbc6d348b321495b7
[ "MIT" ]
null
null
null
"""Unit test package for bonfo."""
17.5
34
0.657143
5
35
4.6
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
1
35
35
0.766667
0.8
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
1024fff2c2520b30728e08f10377775881a8c953
269
py
Python
tests/test_multicast.py
jaycosaur/queue-utilities
ebba58c84f74f05c34f61dc1220836ccacb76a46
[ "MIT" ]
null
null
null
tests/test_multicast.py
jaycosaur/queue-utilities
ebba58c84f74f05c34f61dc1220836ccacb76a46
[ "MIT" ]
null
null
null
tests/test_multicast.py
jaycosaur/queue-utilities
ebba58c84f74f05c34f61dc1220836ccacb76a46
[ "MIT" ]
1
2022-01-29T09:25:30.000Z
2022-01-29T09:25:30.000Z
from queue import Queue import pytest from queue_utilities import Multicast def queues_for_test(): return Queue(), Queue() def test_can_close_select(): multicast = Multicast(*queues_for_test()) multicast.stop() assert multicast.is_stopped == True
16.8125
45
0.739777
35
269
5.428571
0.542857
0.094737
0.136842
0
0
0
0
0
0
0
0
0
0.174721
269
15
46
17.933333
0.855856
0
0
0
0
0
0
0
0
0
0
0
0.111111
1
0.222222
false
0
0.333333
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
1052bd023a7a19fb632c0687fff34447634fb633
601
py
Python
terrascript/resource/docker.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
null
null
null
terrascript/resource/docker.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
null
null
null
terrascript/resource/docker.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
null
null
null
# terrascript/resource/docker.py import terrascript class docker_container(terrascript.Resource): pass class docker_image(terrascript.Resource): pass class docker_network(terrascript.Resource): pass class docker_volume(terrascript.Resource): pass class docker_config(terrascript.Resource): pass class docker_secret(terrascript.Resource): pass class docker_service(terrascript.Resource): pass __all__ = [ "docker_container", "docker_image", "docker_network", "docker_volume", "docker_config", "docker_secret", "docker_service", ]
14.309524
45
0.727121
63
601
6.650794
0.238095
0.362769
0.384248
0.400955
0.486874
0
0
0
0
0
0
0
0.179701
601
41
46
14.658537
0.849899
0.049917
0
0.291667
0
0
0.16696
0
0
0
0
0
0
1
0
false
0.291667
0.041667
0
0.333333
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
1
0
0
0
0
0
4
10579825848ccc370d5ecd374363598b5c5f1925
948
py
Python
tests/regressions/test_direct_rule_call.py
bitranox/Arpeggio
62151cb8ef2cfe5113a4388da09892e7714c5e96
[ "MIT" ]
null
null
null
tests/regressions/test_direct_rule_call.py
bitranox/Arpeggio
62151cb8ef2cfe5113a4388da09892e7714c5e96
[ "MIT" ]
null
null
null
tests/regressions/test_direct_rule_call.py
bitranox/Arpeggio
62151cb8ef2cfe5113a4388da09892e7714c5e96
[ "MIT" ]
null
null
null
# stdlib from typing import Any from arpeggio import ParserPython from arpeggio import SemanticAction def test_direct_rule_call() -> None: """ Test regression where in direct rule call semantic action is erroneously attached to both caller and callee. """ def grammar(): return rule1, rule2 def rule1(): return "a" def rule2(): return rule1 call_count = [0] class DummySemAction(SemanticAction): def first_pass(self, parser, node, nodes): call_count[0] += 1 return SemanticAction.first_pass(self, parser, node, nodes) # Sem action is attached to rule2 only but # this bug will attach it to rule1 also resulting in # wrong call count. rule2.sem = DummySemAction() # type: ignore parser = ParserPython(grammar) parse_tree = parser.parse("aa") parser.getASG() assert call_count[0] == 1, "Semantic action should be called once!"
27.085714
71
0.667722
121
948
5.157025
0.53719
0.057692
0.048077
0.060897
0.089744
0.089744
0
0
0
0
0
0.01831
0.251055
948
34
72
27.882353
0.860563
0.25211
0
0
0
0
0.059854
0
0
0
0
0
0.058824
1
0.294118
false
0.117647
0.176471
0.176471
0.588235
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
105ea2f6010bbcbcea3377d2af22a530b6a5e6ce
148
py
Python
model/backbone/__init__.py
TWSFar/PanopticFPN
c286e70e1bf1f431ced164f96090da36d3fb6665
[ "MIT" ]
71
2019-03-03T13:46:02.000Z
2022-01-28T09:36:53.000Z
model/backbone/__init__.py
ElephantGit/Panoptic-Feature-Pyramid-Networks-Semantic-Segmentation-using-FPN
02c002d169ea7529614b2b0da83390a1de6d10a5
[ "MIT" ]
3
2019-03-30T05:21:17.000Z
2019-12-07T08:46:26.000Z
model/backbone/__init__.py
ElephantGit/Panoptic-Feature-Pyramid-Networks-Semantic-Segmentation-using-FPN
02c002d169ea7529614b2b0da83390a1de6d10a5
[ "MIT" ]
24
2019-03-11T08:26:47.000Z
2021-06-09T08:30:59.000Z
from model.backbone import resnet def build_backbone(back_bone): if back_bone == "resnet101": return resnet.ResNet101(pretrained=True)
24.666667
48
0.743243
19
148
5.631579
0.736842
0.149533
0
0
0
0
0
0
0
0
0
0.04878
0.168919
148
5
49
29.6
0.821138
0
0
0
0
0
0.060811
0
0
0
0
0
0
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
1
0
0
4
10772f13fc22228697b06ce5092efd28396e2eec
899
py
Python
sachima/api.py
DessertsLab/Sachima
5ddf2c8afd493b593e36703dbb09b000b08eeede
[ "MIT" ]
4
2019-01-25T01:44:36.000Z
2020-06-28T00:44:43.000Z
sachima/api.py
DessertsLab/Sachima
5ddf2c8afd493b593e36703dbb09b000b08eeede
[ "MIT" ]
154
2019-01-28T03:35:34.000Z
2022-03-24T03:04:25.000Z
sachima/api.py
DessertsLab/Sachima
5ddf2c8afd493b593e36703dbb09b000b08eeede
[ "MIT" ]
1
2019-02-18T06:10:55.000Z
2019-02-18T06:10:55.000Z
import inspect import functools import importlib import os import numpy as np import pandas as pd import json # from sachima.publish import Publisher # def api(platform="superset", isRun=False, **kw_api): # def wrapper(func): # @functools.wraps(func) # def api_called(*args, **kw): # if platform == "superset": # fpath = inspect.getfile(func) # fname = os.path.split(fpath)[1] # fmod = os.path.splitext(fname)[0] # Publisher.to_superset( # name=kw_api.get("name", fmod), # type_=kw_api.get("type_", "RPC"), # param=fmod, # ) # else: # pass # if isRun: # _result = func(*args, **kw) # return _result # return api_called # return wrapper
24.972222
55
0.497219
93
899
4.698925
0.505376
0.034325
0.036613
0
0
0
0
0
0
0
0
0.003643
0.389321
899
35
56
25.685714
0.79235
0.822024
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
52a346c0514431e1a6cc98d3aab34d785fce2131
4,570
py
Python
tests/model_blocks/test_regex.py
WormBase/genomic-info-from-papers
14395495edd945eaeb565cf0b929d150a1d1cefe
[ "MIT" ]
6
2021-08-11T14:05:11.000Z
2022-01-18T07:43:59.000Z
tests/model_blocks/test_regex.py
rishabgit/genomic-info-from-papers
e079492fb23b38e1503eb54a5a6f5c8a453528c4
[ "MIT" ]
10
2021-10-06T15:43:54.000Z
2021-11-16T18:27:20.000Z
tests/model_blocks/test_regex.py
WormBase/genomic-info-from-papers
14395495edd945eaeb565cf0b929d150a1d1cefe
[ "MIT" ]
2
2022-02-18T16:40:15.000Z
2022-03-20T05:17:40.000Z
import unittest from genomicinfo.model_blocks.regex import RegexBlock class TestRegexBlock(unittest.TestCase): def setUp(self) -> None: allele_variations = ['n983', 'n1550', 'n1014', 'n983', 'md2230', 'md2243',\ 'e15', 'me4', 'me9', 'me15', 'me17', 'me18', 'me19', 'me23',\ 'me24', 'me41', 'me42', 'me44', 'me45', 'n2888', 'ok367', 'adm-4', 'mn159', 'gk329', 'mn159'] allele_designations = ['oa', 'mh', 'qz', 'tu', 'djr', 'tt', 'shy', 'qy', 'ww', 'dm',\ 'cac', 'ex', 'reb', 'ktn', 'pen', 'uv', 'zen', 'as', 'sky', 'yqt'] gene_names = ['unc-93','mec-1','PPA41899', 'CJA19533', \ 'sup-10', 'sup-9', 'sup-18', 'Bm9466', 'CJA41250', \ 'CRE00014', 'Bma-rgr-1', 'CRE32070', 'ok265', 'met-1', \ 'CJA02939', 'OVOC9502', 'cr01.sctg4.wum.162.1', \ 'C26F1.1', 'ceh-39', 'acr-12', 'bar-1', 'clk-2'] self.extractor = RegexBlock(allele_variations, allele_designations, gene_names) def test_extract(self): ext = self.extractor.extract('Upon reanalyzing the che-1(ot73) sequence we found the molecular lesion to be a D233G change, rather than an earlier frameshift, as previ- ously reported (C hang et al .') self.assertTrue(ext[0][0] == 'D233G') ext = self.extractor.extract("r380 (Glu-87- Lys), r342 (Arg-107-Cys), and the r381-r424-r445 muta- tional cluster (Pro-126-Leu) alter residues within a con- served, hydrophobic region that likely contributes to ATP- ase activity.") self.assertTrue(set([t[0] for t in ext]) >= set(['Arg-107-Cys', 'Arg-107-Cys)', 'Glu-87- Lys)', 'Pro-126-Leu', 'Pro-126-Leu)'])) ext = self.extractor.extract("The modified lysine is thought to participate in the ATPase reaction by interacting with the phosphates of bound ATP Taken together, these data suggest that the region from Lys-82 to Lys-128 contributes to the ATPase activity of the protein.") self.assertTrue(ext[0][0] == 'Lys-82 to Lys') ext = self.extractor.extract("This conclusion is also supported by the adventitious finding of a point mutation, u753 (and its duplication by in vitro mutagenesis), P69L, that does not produce a mutant phenotype.") self.assertTrue(ext[0][0] == 'P69L') ext = self.extractor.extract("1996) abolished the killing activity of CED-3 in vivo. The processing of the ( n2433) mutation, which substitutes a serine for glycine at codon 360 ( Shaham and Horvitz 1996a).") self.assertTrue(ext[0][0] == 'serine for glycine at codon 360') ext = self.extractor.extract("The processing substitutes a ala for gly at position 560.") self.assertTrue(ext[0][0] == 'ala for gly at position 560') ext = self.extractor.extract('Table 4. sup-10 mutations Allele Mutation Effect Isolation background Mutagen Loss-of-function mutations n1017 a TGG to TAG W19 Amber sup-10(n983) EMS n1008 a CAA to TAA Q99 Opal sup-10(n983) EMS n2297 b TGG to TGA W139 Ochre sup-9(n1550); sup-18(n1014) EMS n1626 a AAA to TAA K170 Opal sup-10(n983) Gamma n619 c GAG to AAG E88K unc-93(e1500) EMS n240 c GGG to AGG G323R unc-93(e1500) DES n1007 a agAT to aaAT Exon 3 Donor sup-10(n983) EMS n250 c TTgtto TTga Exon 5 Donor unc-93(e1500) Gamma n342 c TTgtto TTga Exon 5 Donor unc-93(e1500) NTG n3558 d 85 bp del Codon 16 Fs unc-93(e1500) UV-TMP n3564 d 99 bp del Codon 34 Fs unc-93(e1500) UV-TMP n183 c 53 bp del, Codon 128 Fs unc-93(e1500) SPO e2127 e Tc1 insertion Codon 103 Fs Wild type SPO n1468 a Tc1 insertion Codon 136 Fs sup-10(n983) SPO Gain-of-function mutations n983 a gf TGG to TAG W322 Amber Wild type EMS ThesequencesofbothDNAstrandsweredeterminedforeachmutant.Forsplicemutations,intronsequenceisrepresentedinlowercase,andexonsequenceinuppercase.EMS,Ethylmethanesulfonate;SPO,spontaneous;UV-TMP,ultraviolet and trimethylpsoralen; NTG, nitrosoguanidine; DES, diethyl sulfate.') self.assertTrue(set([t[0] for t in ext]) >= set(['85 bp del', '99 bp del', 'G323R', 'K170 Opal', 'E88K', 'Q99 Opal', 'W19 Amber', 'W139 Ochre', 'e1500) UV-TMP n183 c 53 bp del, Codon 128 Fs unc-93(e1500) SPO e2127 e Tc1 insertion', 'W322 Amber', '53 bp del'])) ext = self.extractor.extract('We found six other mutations that introduce stop codons directly in the bar-1 reading frame: de6 (Q25STOP), mu350 (Q143STOP), sy324 (Q304STOP), mu236 (Q320 STOP), de7 (Q320 STOP), and ep479 (W711STOP).') self.assertTrue(set([t[0] for t in ext]) >= set(['Q320 STOP', 'Q143STOP', 'Q25STOP', 'Q304STOP', 'W711STOP'])) self.assertTrue(len(ext) == 6)
114.25
1,176
0.677899
704
4,570
4.389205
0.473011
0.014563
0.041424
0.059547
0.177346
0.129773
0.090939
0.090939
0.090939
0.070874
0
0.134084
0.184026
4,570
40
1,177
114.25
0.694556
0
0
0
0
0.235294
0.660906
0.043973
0
0
0
0
0.264706
1
0.058824
false
0
0.058824
0
0.147059
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
52c75e14a58a4f650a01269cae0bacf59065f680
2,873
py
Python
domain/test/test_main.py
pau13-loop/bowling-Game
b82ab1b67ead5feafed095fcc7649382781fb9ea
[ "MIT" ]
null
null
null
domain/test/test_main.py
pau13-loop/bowling-Game
b82ab1b67ead5feafed095fcc7649382781fb9ea
[ "MIT" ]
null
null
null
domain/test/test_main.py
pau13-loop/bowling-Game
b82ab1b67ead5feafed095fcc7649382781fb9ea
[ "MIT" ]
null
null
null
from src.main import BowlingScoreCard import pytest # INTEGRES tests def test_integres(): assert BowlingScoreCard('32611661144527814225').game_score() == 71 assert BowlingScoreCard('12345123451234512345').game_score() == 60 # SPARES tests def test_spare(): assert BowlingScoreCard('5/5/5/5/5/5/5/5/5/5/5').game_score() == 150 assert BowlingScoreCard('5/324/5/343152424152').game_score() == 82 assert BowlingScoreCard('3/4/5/3/1/421/8/2/6/7').game_score() == 136 # NULLS tests def test_null(): assert BowlingScoreCard('9-9-9-9-9-9-9-9-9-9-').game_score() == 90 assert BowlingScoreCard('2-452763----4245326-').game_score() == 55 # STRIKES tests # First throw is a strike and the following next two throws the following examples #!First throw after a strike is an integer #INT - INT def test_strike_int_int(): assert BowlingScoreCard('X24X17332542143517').game_score() == 88 assert BowlingScoreCard('42X4225X5224524536').game_score() == 90 assert BowlingScoreCard('3518X54X24X71X31').game_score() == 111 #INT - NULL def test_strike_int_null(): assert BowlingScoreCard('X6-52X7-4245722662').game_score() == 93 #INT - SPARE def test_strike_int_spare(): assert BowlingScoreCard('X5/35X2/4235712116').game_score() == 107 #! First throw after a strike is a null #NULL -INT def test_strike_null_integer(): assert BowlingScoreCard('X-471X-84215724571').game_score() == 90 #NULL - SPARE def test_strike_null_spare(): assert BowlingScoreCard('X-/42X-/5215423681').game_score() == 112 #NULL -NULL def test_strike_null_null(): assert BowlingScoreCard('X--42X--5234411836').game_score() == 63 #!First throw after strike is another strike #STRIKE - INT def test_strike_strike_integer(): assert BowlingScoreCard('XX6272X6235721662').game_score() == 119 assert BowlingScoreCard('XX5326XX52523651').game_score() == 130 #STRIKE - STRIKE # def test_strike_strike_strike(): assert BowlingScoreCard('XXXXXXXXXXXX').game_score() == 300 #STRIKE - NULL def test_strike_strike_null(): assert BowlingScoreCard('XX-625XX-5136235').game_score() == 109 # MIXED random test cases def test_mixed(): assert BowlingScoreCard('625/6353X436/2441-5').game_score() == 93 assert BowlingScoreCard('26X3/4281X422/5/2/5').game_score() == 121 assert BowlingScoreCard('5/3/X9---2/4/XXX4/').game_score() == 169 assert BowlingScoreCard('XX4/4/3/XX2-1-XX9').game_score() == 157 assert BowlingScoreCard('317/4/-79/532/X4/XXX').game_score() == 148 assert BowlingScoreCard('X7/326/XX5/435/XXX').game_score() == 174 assert BowlingScoreCard('13635/6/8/X6/545/X7/').game_score() == 151 assert BowlingScoreCard('4/6/XX9/X8/XXXXX').game_score() == 235 assert BowlingScoreCard('4/X-/4/-/XX7/4/7/X').game_score() == 182 assert BowlingScoreCard('2/6/X639/6/-4XXXXX').game_score() == 184
31.228261
82
0.716324
395
2,873
5.058228
0.321519
0.319319
0.013514
0.016016
0.067568
0.034535
0.010511
0.010511
0.010511
0.005506
0
0.164932
0.130526
2,873
91
83
31.571429
0.634908
0.1441
0
0
0
0.023256
0.216482
0.01722
0
0
0
0
0.674419
1
0.27907
true
0
0.046512
0
0.325581
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
1
0
1
1
0
0
0
0
0
0
4
52d676e841005d5adf9c0bcdeb540983729b81fb
289
py
Python
cfgov/v1/models/newsroom_page.py
cyVR/aur
269dad2e659f7366e6eea037110d38ab41e3ad53
[ "CC0-1.0" ]
null
null
null
cfgov/v1/models/newsroom_page.py
cyVR/aur
269dad2e659f7366e6eea037110d38ab41e3ad53
[ "CC0-1.0" ]
null
null
null
cfgov/v1/models/newsroom_page.py
cyVR/aur
269dad2e659f7366e6eea037110d38ab41e3ad53
[ "CC0-1.0" ]
null
null
null
from . import BlogPage, CFGOVPageManager, LegacyBlogPage class NewsroomPage(BlogPage): template = 'newsroom/newsroom-page.html' objects = CFGOVPageManager() class LegacyNewsroomPage(LegacyBlogPage): template = 'newsroom/newsroom-page.html' objects = CFGOVPageManager()
24.083333
56
0.761246
25
289
8.8
0.52
0.145455
0.218182
0.254545
0.5
0.5
0.5
0
0
0
0
0
0.145329
289
11
57
26.272727
0.890688
0
0
0.571429
0
0
0.186851
0.186851
0
0
0
0
0
1
0
false
0
0.142857
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
52df85168df18b16007455639ce6a6f5cc717f38
204
py
Python
travelperk_python_api_types/trips/bookings/segment.py
namelivia/travelperk-python-api-types
d71cee9757938ed4189479c81e4f2ff1f73ca489
[ "MIT" ]
null
null
null
travelperk_python_api_types/trips/bookings/segment.py
namelivia/travelperk-python-api-types
d71cee9757938ed4189479c81e4f2ff1f73ca489
[ "MIT" ]
1
2021-09-03T04:20:35.000Z
2021-09-03T04:20:35.000Z
travelperk_python_api_types/trips/bookings/segment.py
namelivia/travelperk-python-api-types
d71cee9757938ed4189479c81e4f2ff1f73ca489
[ "MIT" ]
null
null
null
from pydantic.dataclasses import dataclass from .origin import Origin from .destination import Destination @dataclass class Segment: origin: Origin destination: Destination external_id: str
18.545455
42
0.789216
23
204
6.956522
0.521739
0
0
0
0
0
0
0
0
0
0
0
0.171569
204
10
43
20.4
0.946746
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.375
0
0.875
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
52e1124822f0fe61738f0b870741b0fd937ae7d2
106
py
Python
compiledtrees/__init__.py
parvsaxena/sklearn-compiledtrees
b978cf2c0af35519de64127f9c70e27b06764ab9
[ "MIT" ]
null
null
null
compiledtrees/__init__.py
parvsaxena/sklearn-compiledtrees
b978cf2c0af35519de64127f9c70e27b06764ab9
[ "MIT" ]
null
null
null
compiledtrees/__init__.py
parvsaxena/sklearn-compiledtrees
b978cf2c0af35519de64127f9c70e27b06764ab9
[ "MIT" ]
null
null
null
from compiledtrees.compiled import CompiledRegressionPredictor __all__ = ["CompiledRegressionPredictor"]
26.5
62
0.867925
7
106
12.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.075472
106
3
63
35.333333
0.897959
0
0
0
0
0
0.254717
0.254717
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
1
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
4
52ecac0a13b501f78fec1165ee2ee7c48747fd79
41
py
Python
ClassFiles/WorkingWithExternalFiles/FileHandling.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
ClassFiles/WorkingWithExternalFiles/FileHandling.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
ClassFiles/WorkingWithExternalFiles/FileHandling.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
f = open("Quotes.txt") print(f.read(11))
13.666667
22
0.634146
8
41
3.25
0.875
0
0
0
0
0
0
0
0
0
0
0.054054
0.097561
41
3
23
13.666667
0.648649
0
0
0
0
0
0.238095
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
4
5e03a56486f8961a7fcc03a0bfcd8acf1ea54895
2,564
py
Python
pwndbg/__init__.py
jakuta-tech/pwndbg
26f7321c6049dbc92ba706ecdf5de2d7ad4a75a3
[ "MIT" ]
null
null
null
pwndbg/__init__.py
jakuta-tech/pwndbg
26f7321c6049dbc92ba706ecdf5de2d7ad4a75a3
[ "MIT" ]
null
null
null
pwndbg/__init__.py
jakuta-tech/pwndbg
26f7321c6049dbc92ba706ecdf5de2d7ad4a75a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals import sys import gdb import pwndbg.android import pwndbg.arch import pwndbg.arguments import pwndbg.argv import pwndbg.color import pwndbg.commands import pwndbg.commands.argv import pwndbg.commands.aslr import pwndbg.commands.auxv import pwndbg.commands.checksec import pwndbg.commands.config import pwndbg.commands.context import pwndbg.commands.cpsr import pwndbg.commands.dt import pwndbg.commands.dumpargs import pwndbg.commands.elf import pwndbg.commands.gdbinit import pwndbg.commands.heap import pwndbg.commands.hexdump import pwndbg.commands.ida import pwndbg.commands.misc import pwndbg.commands.next import pwndbg.commands.peda import pwndbg.commands.procinfo import pwndbg.commands.reload import pwndbg.commands.rop import pwndbg.commands.ropper import pwndbg.commands.search import pwndbg.commands.segments import pwndbg.commands.shell import pwndbg.commands.start import pwndbg.commands.telescope import pwndbg.commands.theme import pwndbg.commands.vmmap import pwndbg.commands.windbg import pwndbg.commands.xor import pwndbg.constants import pwndbg.disasm import pwndbg.disasm.arm import pwndbg.disasm.jump import pwndbg.disasm.mips import pwndbg.disasm.ppc import pwndbg.disasm.sparc import pwndbg.disasm.x86 import pwndbg.dt import pwndbg.elf import pwndbg.inthook import pwndbg.memory import pwndbg.net import pwndbg.proc import pwndbg.prompt import pwndbg.regs import pwndbg.stack import pwndbg.stdio import pwndbg.typeinfo import pwndbg.vmmap try: import unicorn import pwndbg.emu except: pass __all__ = [ 'arch', 'auxv', 'chain', 'color', 'compat', 'disasm', 'dt', 'elf', 'enhance', 'events', 'file', 'function', 'hexdump', 'ida', 'info', 'linkmap', 'malloc', 'memoize', 'memory', 'proc', 'regs', 'remote', 'search', 'stack', 'strings', 'symbol', 'typeinfo', 'ui', 'vmmap' ] prompt = "pwndbg> " prompt = "\x01" + prompt + "\x02" # SOH + prompt + STX prompt = pwndbg.color.red(prompt) prompt = pwndbg.color.bold(prompt) pre_commands = """ set confirm off set verbose off set prompt %s set height 0 set history expansion on set history save on set follow-fork-mode child set backtrace past-main on set step-mode on set print pretty on set width 0 set print elements 15 handle SIGALRM nostop print nopass handle SIGBUS stop print nopass handle SIGPIPE nostop print nopass handle SIGSEGV stop print nopass """.strip() % prompt for line in pre_commands.strip().splitlines(): gdb.execute(line)
19.424242
54
0.787051
361
2,564
5.545706
0.365651
0.341658
0.30969
0.022977
0
0
0
0
0
0
0
0.00485
0.115445
2,564
131
55
19.572519
0.877866
0.023791
0
0
0
0
0.2156
0
0
0
0
0
0
1
0
false
0.041667
0.516667
0
0.516667
0.058333
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5e0a20530c94cb511f529986c16deb5e62506b21
499
py
Python
Points.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
1
2019-10-22T14:02:34.000Z
2019-10-22T14:02:34.000Z
Points.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
Points.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
class Points: def __init__(self): self.points = 0 def lines(self, i): if i == 1: self.points = self.points + 40 if i == 2: self.points = self.points + 100 if i == 3: self.points = self.points + 300 if i == 4: self.points = self.points + 1200 def traversed_lines(self, y): if y > 0: self.points = self.points + y def new_block(self): self.points = self.points + 2
22.681818
44
0.486974
66
499
3.590909
0.318182
0.548523
0.35443
0.506329
0
0
0
0
0
0
0
0.063758
0.402806
499
21
45
23.761905
0.731544
0
0
0
0
0
0
0
0
0
0
0
0
1
0.235294
false
0
0
0
0.294118
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
5e12d98d9fee3f71b26d05240eb0c05284c63372
289
py
Python
setup.py
h-vetinari/automerge-action
c82d81aa4b96a86b1767fbdb1d82aa29d67044b2
[ "MIT", "BSD-3-Clause" ]
1
2021-05-25T16:47:57.000Z
2021-05-25T16:47:57.000Z
setup.py
h-vetinari/automerge-action
c82d81aa4b96a86b1767fbdb1d82aa29d67044b2
[ "MIT", "BSD-3-Clause" ]
2
2021-11-30T22:05:19.000Z
2022-02-11T13:16:06.000Z
setup.py
h-vetinari/automerge-action
c82d81aa4b96a86b1767fbdb1d82aa29d67044b2
[ "MIT", "BSD-3-Clause" ]
2
2020-06-11T01:11:10.000Z
2022-02-09T00:09:11.000Z
from setuptools import setup, find_packages setup( name="conda_forge_automerge_action", version="0.1", packages=find_packages(), entry_points={ 'console_scripts': [ 'run-automerge-action=conda_forge_automerge_action.__main__:main', ], }, )
22.230769
78
0.657439
31
289
5.677419
0.645161
0.255682
0.215909
0.284091
0
0
0
0
0
0
0
0.008929
0.224913
289
12
79
24.083333
0.776786
0
0
0
0
0
0.377163
0.314879
0
0
0
0
0
1
0
true
0
0.090909
0
0.090909
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
1
0
0
0
0
0
0
4
5e1d656cf80740d6b8f2e7a344711b11b5ad965a
307
py
Python
Exercicios/012 Calculando Descontos .py
isachlopes/PythonCursoEmVideo
b3814c408b13ff404bc73c8cac1367f66cd83792
[ "MIT" ]
1
2020-04-12T20:55:21.000Z
2020-04-12T20:55:21.000Z
Exercicios/012 Calculando Descontos .py
isachlopes/PythonCursoEmVideo
b3814c408b13ff404bc73c8cac1367f66cd83792
[ "MIT" ]
null
null
null
Exercicios/012 Calculando Descontos .py
isachlopes/PythonCursoEmVideo
b3814c408b13ff404bc73c8cac1367f66cd83792
[ "MIT" ]
null
null
null
#Faça um algoritmo que leia o preço de um produto, e mostre o seu novo preço com 5% de desconto. p = float(input('Digite o valor de um produto: R$')) d = (p*0.95) #pode ser assim tbm -- desconto = preço - (preço*5/100) print(f'O produto que custava R${p:.2f}, com 5% de desconto passa a custar R${d:.2f}.')
51.166667
96
0.677524
62
307
3.354839
0.596774
0.038462
0.105769
0.134615
0
0
0
0
0
0
0
0.043651
0.179153
307
5
97
61.4
0.781746
0.485342
0
0
0
0.333333
0.698718
0
0
0
0
0
0
1
0
false
0.333333
0
0
0
0.333333
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
5e32e87ace538616c84ca9d2e6f51b66789490de
68
py
Python
tests/__init__.py
vilkasgroup/Pakettikauppa
71545684d8516e95f933543fdd0cecc482824d28
[ "MIT" ]
null
null
null
tests/__init__.py
vilkasgroup/Pakettikauppa
71545684d8516e95f933543fdd0cecc482824d28
[ "MIT" ]
24
2018-01-24T16:09:29.000Z
2022-01-01T19:32:10.000Z
tests/__init__.py
vilkasgroup/Pakettikauppa
71545684d8516e95f933543fdd0cecc482824d28
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Unit test package for pakettikauppa."""
17
42
0.602941
8
68
5.125
1
0
0
0
0
0
0
0
0
0
0
0.017544
0.161765
68
3
43
22.666667
0.701754
0.867647
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
eac1db40145a79df9dad81363c5cce8ffe518f93
461
py
Python
src/setuplog/formatters.py
schireson/setuplog
eb7ea12e04d01ba9ab6c1f174e4243d781db17f6
[ "MIT" ]
null
null
null
src/setuplog/formatters.py
schireson/setuplog
eb7ea12e04d01ba9ab6c1f174e4243d781db17f6
[ "MIT" ]
null
null
null
src/setuplog/formatters.py
schireson/setuplog
eb7ea12e04d01ba9ab6c1f174e4243d781db17f6
[ "MIT" ]
null
null
null
import logging class UnicodeEscapeFormatter(logging.Formatter): def escape_str(self, string): return string.encode("unicode_escape").decode("utf-8") def formatException(self, exc_info): result = super(UnicodeEscapeFormatter, self).formatException(exc_info) return self.escape_str(result) def format(self, record): result = super(UnicodeEscapeFormatter, self).format(record) return self.escape_str(result)
30.733333
78
0.718004
51
461
6.372549
0.45098
0.083077
0.203077
0.227692
0.153846
0
0
0
0
0
0
0.002646
0.180043
461
14
79
32.928571
0.857143
0
0
0.2
0
0
0.041215
0
0
0
0
0
0
1
0.3
false
0
0.1
0.1
0.8
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
1
0
0
4
ead5f661102b67212a1def8c321114eab3a5ab5f
339
py
Python
lib/oeqa/runtime/cases/rubygems_rubygems_aws_sdk_cloudwatchlogs.py
tuxable-ltd/meta-rubygems
e80630e79b64e1be8339e1add0ab07644ec99425
[ "BSD-2-Clause" ]
null
null
null
lib/oeqa/runtime/cases/rubygems_rubygems_aws_sdk_cloudwatchlogs.py
tuxable-ltd/meta-rubygems
e80630e79b64e1be8339e1add0ab07644ec99425
[ "BSD-2-Clause" ]
141
2021-02-04T16:22:13.000Z
2022-03-27T08:29:40.000Z
lib/oeqa/runtime/cases/rubygems_rubygems_aws_sdk_cloudwatchlogs.py
tuxable-ltd/meta-rubygems
e80630e79b64e1be8339e1add0ab07644ec99425
[ "BSD-2-Clause" ]
3
2021-02-04T14:02:01.000Z
2022-02-02T16:46:52.000Z
from rubygems_utils import RubyGemsTestUtils class RubyGemsTestrubygems_aws_sdk_cloudwatchlogs(RubyGemsTestUtils): def test_gem_list_rubygems_aws_sdk_cloudwatchlogs(self): self.gem_is_installed("aws-sdk-cloudwatchlogs") def test_load_aws_sdk_cloudwatchlogs(self): self.gem_is_loadable("aws-sdk-cloudwatchlogs")
30.818182
69
0.814159
41
339
6.292683
0.463415
0.116279
0.387597
0.186047
0.255814
0.255814
0.255814
0
0
0
0
0
0.117994
339
10
70
33.9
0.862876
0
0
0
0
0
0.130178
0.130178
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
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
1
0
0
4
eadbf3e26618a6e3600ee693b335407fd4053617
145
py
Python
Py08/01/main.py
xhexe/Py8R
44238c5403e7f76988760a040bf5c292824c22e7
[ "WTFPL" ]
null
null
null
Py08/01/main.py
xhexe/Py8R
44238c5403e7f76988760a040bf5c292824c22e7
[ "WTFPL" ]
null
null
null
Py08/01/main.py
xhexe/Py8R
44238c5403e7f76988760a040bf5c292824c22e7
[ "WTFPL" ]
null
null
null
val = int(input("Enter value:")) if val > 0: print("Positive number") elif val < 0: print("Negative number") else: print("0 value.")
18.125
32
0.606897
21
145
4.190476
0.619048
0.090909
0.204545
0
0
0
0
0
0
0
0
0.026316
0.213793
145
8
33
18.125
0.745614
0
0
0
0
0
0.342466
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
dc52b2908cc79926d26dbe7e19742e935161c692
286
py
Python
src/yuva/admin.py
IndiaCFG3/team-38
c0237353701e94c7687af9c909118ece07a1c41d
[ "MIT" ]
1
2022-02-01T19:48:38.000Z
2022-02-01T19:48:38.000Z
src/yuva/admin.py
IndiaCFG3/team-38
c0237353701e94c7687af9c909118ece07a1c41d
[ "MIT" ]
null
null
null
src/yuva/admin.py
IndiaCFG3/team-38
c0237353701e94c7687af9c909118ece07a1c41d
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Profile from .models import Support_Team from .models import Audit from .models import HR admin.site.register(Profile) admin.site.register(Support_Team) admin.site.register(Audit) admin.site.register(HR)
26
33
0.818182
43
286
5.395349
0.348837
0.172414
0.275862
0
0
0
0
0
0
0
0
0
0.101399
286
11
34
26
0.902724
0.090909
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
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
0
1
0
1
0
0
4
dc586d002b2e4d9e267196724c8eb5a3c8207b46
85
py
Python
trees/apps.py
BtLutz/amazingco2
6b49d820afd4db7abad40ce7a6324923065926be
[ "MIT" ]
null
null
null
trees/apps.py
BtLutz/amazingco2
6b49d820afd4db7abad40ce7a6324923065926be
[ "MIT" ]
null
null
null
trees/apps.py
BtLutz/amazingco2
6b49d820afd4db7abad40ce7a6324923065926be
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TreesConfig(AppConfig): name = 'trees'
14.166667
33
0.741176
10
85
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
5
34
17
0.9
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0
false
0
0.333333
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
1
0
1
0
0
4
dc79b044eefa223978e4cc579b2139d79c3a1ffa
61
py
Python
django/apps/adverts/__init__.py
Haakenlid/tassen
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
16
2017-03-21T03:53:37.000Z
2021-08-14T06:28:02.000Z
django/apps/adverts/__init__.py
universitas/universitas.no
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
104
2017-03-25T00:12:46.000Z
2021-03-09T22:40:58.000Z
django/apps/adverts/__init__.py
Haakenlid/tassen
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
6
2017-03-21T03:53:40.000Z
2020-06-07T14:15:38.000Z
default_app_config = 'apps.adverts.appconf.AdvertsAppConfig'
30.5
60
0.852459
7
61
7.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.04918
61
1
61
61
0.862069
0
0
0
0
0
0.606557
0.606557
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4