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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c967472bb8b76200c1985316990f833cfbbb7d46
| 144
|
py
|
Python
|
TimeWrapper_JE/venv/Lib/site-packages/setuptools/_distutils/debug.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | 207
|
2018-10-01T08:53:01.000Z
|
2022-03-14T12:15:54.000Z
|
TimeWrapper_JE/venv/Lib/site-packages/setuptools/_distutils/debug.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | 30
|
2019-01-04T10:14:56.000Z
|
2020-10-12T14:00:31.000Z
|
TimeWrapper_JE/venv/Lib/site-packages/setuptools/_distutils/debug.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | 76
|
2020-03-16T01:47:46.000Z
|
2022-03-21T16:37:07.000Z
|
import os
# If DISTUTILS_DEBUG is anything other than the empty string, we run in
# debug mode.
DEBUG = os.environ.get('DISTUTILS_DEBUG')
| 24
| 72
| 0.736111
| 23
| 144
| 4.521739
| 0.782609
| 0.269231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 144
| 5
| 73
| 28.8
| 0.888889
| 0.5625
| 0
| 0
| 0
| 0
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
c96eb5f2d0707323358b565c6145a0b296974e27
| 14,554
|
py
|
Python
|
tests/core_tests_fab_collection.py
|
gf712/AbPyTools
|
9ff0d4346ad80487d43875bc77d99fbe76170db4
|
[
"MIT"
] | 13
|
2017-06-13T12:31:47.000Z
|
2022-03-23T02:14:01.000Z
|
tests/core_tests_fab_collection.py
|
gf712/AbPyTools
|
9ff0d4346ad80487d43875bc77d99fbe76170db4
|
[
"MIT"
] | 8
|
2018-02-21T22:15:35.000Z
|
2022-02-01T12:27:58.000Z
|
tests/core_tests_fab_collection.py
|
gf712/AbPyTools
|
9ff0d4346ad80487d43875bc77d99fbe76170db4
|
[
"MIT"
] | 3
|
2018-04-10T08:01:39.000Z
|
2021-10-10T14:37:43.000Z
|
import unittest
from abpytools import FabCollection, ChainCollection, Fab
import os
from glob import glob
from . import ABNUM_URL, check_connection
class FabCollectionCore(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.light_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_light_2_sequences.json',
verbose=False, show_progressbar=False)
cls.heavy_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_heavy_2_sequences.json',
verbose=False, show_progressbar=False)
cls.heavy_chain_1 = cls.heavy_chain_collection[0]
cls.light_chain_1 = cls.light_chain_collection[0]
cls.heavy_chain_2 = cls.heavy_chain_collection[1]
cls.light_chain_2 = cls.light_chain_collection[1]
cls.fab_1 = Fab(heavy_chain=cls.heavy_chain_1, light_chain=cls.light_chain_1, name='Fab1')
cls.fab_2 = Fab(heavy_chain=cls.heavy_chain_2, light_chain=cls.light_chain_2, name='Fab2')
def test_FabCollection_input_exception_1(self):
self.assertRaises(ValueError, FabCollection, None, 0, 0)
def test_FabCollection_input_exception_2(self):
self.assertRaises(ValueError, FabCollection, None, [0, 0], [0, 0])
def test_FabCollection_input_exception_3(self):
self.assertRaises(ValueError, FabCollection, None, self.heavy_chain_1, [0, 0])
def test_FabCollection_input_exception_4(self):
self.assertRaises(ValueError, FabCollection, None, [0, 0], self.light_chain_1)
def test_FabCollection_input_exception_5(self):
self.assertRaises(ValueError, FabCollection)
def test_FabCollection_input_exception_6(self):
# instantiation of FabCollection checks if there are as many heavy as light chains
self.assertRaises(ValueError, FabCollection, None, [self.heavy_chain_1, self.heavy_chain_2],
[self.light_chain_1])
def test_FabCollection_input_exception_7(self):
# instantiation of FabCollection checks if there are as many names as fabs
self.assertRaises(ValueError, FabCollection, [self.fab_1], None, None, ['foo', 'bar'])
def test_FabCollection_input_exception_8(self):
# instantiation of FabCollection checks if names is a list of strings
self.assertRaises(ValueError, FabCollection, [self.fab_1], None, None, [1])
def test_FabCollection_input_1(self):
self.assertIsInstance(FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.light_chain_collection),
FabCollection)
def test_FabCollection_input_2(self):
# check if input with a list with fab objects works
self.assertIsInstance(FabCollection(fab=[self.fab_1, self.fab_2]),
FabCollection)
def test_FabCollection_input_3(self):
# check if input with a list of Chain objects
self.assertIsInstance(FabCollection(heavy_chains=[self.heavy_chain_1, self.heavy_chain_2],
light_chains=[self.light_chain_1, self.light_chain_2]),
FabCollection)
def test_FabCollection_input4(self):
light_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_light_2_sequences.json')
heavy_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_heavy_2_sequences.json')
fab_collection = FabCollection(light_chains=light_chain_collection,
heavy_chains=heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertEqual(fab_collection.numbering_table()['Light']['CDR3']['L89'].loc['Fab1'], 'Q')
def test_FabCollection_json1(self):
light_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_light_2_sequences.json')
heavy_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_heavy_2_sequences.json')
fab_collection = FabCollection(light_chains=light_chain_collection,
heavy_chains=heavy_chain_collection,
names=['Fab1', 'Fab2'])
fab_collection.save(file_format='json', path='./tests/fab_1')
self.assertTrue(os.path.isfile('./tests/fab_1.json'))
def test_FabCollection_json2(self):
fab_collection = FabCollection.load_from_file(path='./tests/fab_1.json',
show_progressbar=False,
verbose=False)
light_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_light_2_sequences.json')
heavy_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_heavy_2_sequences.json')
self.assertEqual(fab_collection._light_chains.sequences[0], light_chain_collection.sequences[0])
self.assertEqual(fab_collection._heavy_chains.sequences[0], heavy_chain_collection.sequences[0])
def test_FabCollection_pb2_1(self):
light_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_light_2_sequences.json')
heavy_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_heavy_2_sequences.json')
fab_collection = FabCollection(light_chains=light_chain_collection,
heavy_chains=heavy_chain_collection,
names=['Fab1', 'Fab2'])
fab_collection.save(file_format='pb2', path='./tests/fab_1')
self.assertTrue(os.path.isfile('./tests/fab_1.pb2'))
def test_FabCollection_pb2_2(self):
fab_collection = FabCollection.load_from_file(path='./tests/fab_1.pb2',
show_progressbar=False,
verbose=False)
light_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_light_2_sequences.json')
heavy_chain_collection = ChainCollection.load_from_file(
path='./tests/Data/chain_collection_heavy_2_sequences.json')
self.assertEqual(fab_collection._light_chains.sequences[0], light_chain_collection.sequences[0])
self.assertEqual(fab_collection._heavy_chains.sequences[0], heavy_chain_collection.sequences[0])
self.assertEqual(fab_collection._light_chains.names[0], light_chain_collection.names[0])
self.assertEqual(fab_collection._heavy_chains.names[0], heavy_chain_collection.names[0])
def test_FabCollection_MW(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertAlmostEqual(fab_collection.molecular_weights()[0], 25078.143331999992)
def test_FabCollection_ec_1(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection.extinction_coefficients()[0], 52870)
def test_FabCollection_ec_2(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertAlmostEqual(fab_collection.extinction_coefficients(normalise=True)[0], 2.1082102969136987)
def test_FabCollection_charge(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertAlmostEqual(fab_collection.charge().sum(), -2.0354649111988743)
def test_FabCollection_total_charge(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertAlmostEqual(fab_collection.total_charge()[0], 3.3658691836339365)
def test_FabCollection_name_1(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection._heavy_chains.names[0], 'Seq1')
def test_FabCollection_name_2(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection._heavy_chains.names[1], 'Seq2')
def test_FabCollection_name_3(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection._light_chains.names[0], 'LightSeq1')
def test_FabCollection_name_4(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection._light_chains.names[1], 'LightSeq2')
@unittest.skipUnless(check_connection(URL=ABNUM_URL), 'No internet connection, skipping test.')
def test_FabCollection_igblast_query_1(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
fab_collection.igblast_server_query()
self.assertAlmostEqual(fab_collection.germline_identity['Heavy', 'Total'].iloc[0], 93.8)
@unittest.skipUnless(check_connection(URL=ABNUM_URL), 'No internet connection, skipping test.')
def test_FabCollection_igblast_query_1(self):
# check germline assignment
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
fab_collection.igblast_server_query()
self.assertEqual(fab_collection.germline['Heavy', 'Assignment']['Fab1'], 'IGHV1-8*01')
@unittest.skipUnless(check_connection(URL=ABNUM_URL), 'No internet connection, skipping test.')
def test_FabCollection_igblast_query_1(self):
# check germline assignment score
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
fab_collection.igblast_server_query()
self.assertAlmostEqual(fab_collection.germline['Heavy', 'Score'].loc['Fab1'], 1.82e-66)
def test_FabCollection_HMatrix(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection.hydrophobicity_matrix().shape, (2, 296))
def test_FabCollection_names(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertEqual(fab_collection.names[0], 'Fab1')
def test_FabCollection_n_ab(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(fab_collection.n_ab, 2)
def test_FabCollection_len(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection)
self.assertEqual(len(fab_collection), 2)
@unittest.skipUnless(check_connection(URL=ABNUM_URL), 'No internet connection, skipping test.')
def test_FabCollection_germline_identity(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertAlmostEqual(fab_collection.germline_identity['Average']['CDR3'].loc['Fab1'], 78.55)
def test_FabCollection_slicing_1(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertIsInstance(fab_collection[0], Fab)
def test_FabCollection_slicing_2(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertEqual(fab_collection[0].name, 'Fab1')
def test_FabCollection_slicing_3(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertEqual(fab_collection[[0, 1]].names, ['Fab1', 'Fab2'])
def test_FabCollection_slicing_4(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertEqual(fab_collection[[0, 1]]._heavy_chains.names, ['Seq1', 'Seq2'])
def test_FabCollection_slicing_5(self):
fab_collection = FabCollection(light_chains=self.light_chain_collection,
heavy_chains=self.heavy_chain_collection,
names=['Fab1', 'Fab2'])
self.assertEqual(fab_collection[[0, 1]]._light_chains.names, ['LightSeq1', 'LightSeq2'])
@classmethod
def tearDownClass(cls):
for name in glob('./tests/*'):
if name.split('.')[-1] != 'py' and os.path.isfile(name):
os.remove(name)
| 56.19305
| 109
| 0.661055
| 1,579
| 14,554
| 5.737809
| 0.09373
| 0.142384
| 0.083885
| 0.071523
| 0.796578
| 0.754084
| 0.737528
| 0.720199
| 0.688852
| 0.653091
| 0
| 0.024084
| 0.249691
| 14,554
| 259
| 110
| 56.19305
| 0.805586
| 0.025629
| 0
| 0.514423
| 0
| 0
| 0.081417
| 0.044024
| 0
| 0
| 0
| 0
| 0.201923
| 1
| 0.192308
| false
| 0
| 0.024038
| 0
| 0.221154
| 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
|
c97083420761e3c940f7481a7a0b8aee1214a7ab
| 195
|
py
|
Python
|
Curso em Video/ex primeiro e ultimo nome.py
|
roldanbiel/ExerciciosPython
|
ec9cc774d85120837bd9373bb261ba6ec7d4ece2
|
[
"MIT"
] | null | null | null |
Curso em Video/ex primeiro e ultimo nome.py
|
roldanbiel/ExerciciosPython
|
ec9cc774d85120837bd9373bb261ba6ec7d4ece2
|
[
"MIT"
] | null | null | null |
Curso em Video/ex primeiro e ultimo nome.py
|
roldanbiel/ExerciciosPython
|
ec9cc774d85120837bd9373bb261ba6ec7d4ece2
|
[
"MIT"
] | null | null | null |
nome = str(input('Informe seu nome: ')).strip()
dividido = nome.split()
print('Seu primeiro nome é: {}'.format(dividido[0]))
print('Seu último nome é: {}'.format(dividido[len(dividido) - 1]))
| 24.375
| 66
| 0.661538
| 28
| 195
| 4.607143
| 0.571429
| 0.124031
| 0.170543
| 0.294574
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011696
| 0.123077
| 195
| 7
| 67
| 27.857143
| 0.74269
| 0
| 0
| 0
| 0
| 0
| 0.319588
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
c97bb12299e8084a48bf425d84c399fe1dc5ef81
| 165
|
py
|
Python
|
genomelink/__init__.py
|
genomelink/genomelink-python
|
8a92abdb7bf22ff901cd0547b79a734440d0fa29
|
[
"MIT"
] | 25
|
2018-06-24T17:55:14.000Z
|
2021-02-19T10:19:54.000Z
|
genomelink/__init__.py
|
AWAKENS-dev/genomelink-python
|
8a92abdb7bf22ff901cd0547b79a734440d0fa29
|
[
"MIT"
] | 1
|
2019-01-07T23:57:29.000Z
|
2019-01-07T23:57:29.000Z
|
genomelink/__init__.py
|
genomelink/genomelink-python
|
8a92abdb7bf22ff901cd0547b79a734440d0fa29
|
[
"MIT"
] | 7
|
2018-10-21T17:06:29.000Z
|
2022-02-04T21:18:52.000Z
|
import os
api_base = os.environ.get('GENOMELINK_API_BASE', 'https://genomelink.io')
from genomelink.oauth import OAuth
from genomelink.resource.report import Report
| 33
| 73
| 0.812121
| 24
| 165
| 5.458333
| 0.541667
| 0.10687
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084848
| 165
| 4
| 74
| 41.25
| 0.86755
| 0
| 0
| 0
| 0
| 0
| 0.242424
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c97c36410f92dda59ca0a8e36fdd803e1ea94cda
| 124
|
py
|
Python
|
bareasgi/websockets/websocket_errors.py
|
rob-blackbourn/bareasgi
|
c83e3020edcb5e1650b6137c21d7f3659467e687
|
[
"Apache-2.0"
] | 15
|
2019-02-23T11:09:06.000Z
|
2020-01-01T09:25:33.000Z
|
bareasgi/websockets/websocket_errors.py
|
rob-blackbourn/bareASGI
|
5966ab6b54bc99420b06fb90cff05d15447e98b7
|
[
"Apache-2.0"
] | 1
|
2021-09-20T10:55:49.000Z
|
2021-09-20T10:55:49.000Z
|
bareasgi/websockets/websocket_errors.py
|
rob-blackbourn/bareasgi
|
c83e3020edcb5e1650b6137c21d7f3659467e687
|
[
"Apache-2.0"
] | 1
|
2021-01-11T09:09:29.000Z
|
2021-01-11T09:09:29.000Z
|
"""Websocket errors"""
class WebSocketInternalError(Exception):
"""Exception raised for a WebSocket internal error"""
| 20.666667
| 57
| 0.741935
| 12
| 124
| 7.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137097
| 124
| 5
| 58
| 24.8
| 0.859813
| 0.516129
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
a32715a30e481ac6a4f22fb6eb3175fd5b049ff7
| 4,189
|
py
|
Python
|
plugin/avtodor-tr.py
|
pasha00000/mbplugin
|
e919c7c899495ae7f4b04fc2568991bb717bed9a
|
[
"MIT"
] | null | null | null |
plugin/avtodor-tr.py
|
pasha00000/mbplugin
|
e919c7c899495ae7f4b04fc2568991bb717bed9a
|
[
"MIT"
] | null | null | null |
plugin/avtodor-tr.py
|
pasha00000/mbplugin
|
e919c7c899495ae7f4b04fc2568991bb717bed9a
|
[
"MIT"
] | null | null | null |
# -*- coding: utf8 -*-
''' Автор ArtyLa '''
import os, sys, re, logging
import requests
import store
login_url = 'https://avtodor-tr.ru/account/login'
login_checkers = ['<input[^>]*id="username"[^>]*', '<input[^>]*id="password"[^>]*', '<input[^>]*type="submit"[^>]*']
# Строка для поиска баланса ФИО и лицевого счета на странице
re_balance_v1 = r'(?usi)<td>Баланс</td>.*?<td>(.*?)<'
re_balance_v2 = r'(?usi)Баланс.*?<h2[^>]*>\D?(.*?)\D*</h2>'
re_userName = r'(?usi)<td>Клиент ?</td>.*?<td>(.*?)<'
re_licSchet = r'(?usi)<td>Лицевой счет</td>.*?<td>(.*?)<'
icon = '789CED92DD4B936118C67F417F407F826E53A3830812EB2C282283A213AB83E82084223B089122D3AC24A3843E44A31A940C2953D230842888547469F32B9D5F5B664D74CEE9F6EEF3FDDADEF56C8DD161D069375C3C07F7733DD7755FF7B3FF68C956325522B05D605B165BC8FBDDC8F6FFACD4FFE25F30B7F003BBC34528A26018062BDE0DEC632E3E8FBB33B04FB80886E399DED8CC128E2937BAAEE7F807CA5D1495AD70F161102D61B0BCA1B1B7DA4751D53A85D57E0AEBFC58ED32492345A94D6257F32ADF3D2B18597EC59D0096135E2CA7D768EA8992481AF48E2B14556F62AE0D60BA19E090354C5C33A8FC2093F73842C7C07C4EBF77284EC1A9352C677C149C5FA7E65598B09CE4ED57959DB783986E05C96F94681C9219F526287816A1BC7D1643E8A4F991B841F185752C677D98C569AEF473F881C4805BC5E9D5296B8B907F3F84F95118EBA44A8B78B7D8B68ACFE7CFF08D9481C3A552D51A62B798D77C49F8AE1133D507A9E88E31ECD16977AA9476C4303D8F503BACF064466560D295E5A790E249167D0936A3493ECEA95CEF8D51FA34CC0EA16B690A71A43346CB84C6CB058D6B0E95F241056B9F33C78F2906FBEA031CBC17A4AA2B4AEB88C2E092CEF86A8277DF749AC784BF7E99E3EF654E7E92A91C55A9EBF72049526E0F973BA398AF6E62BA21326F9032999985F61E5B94633D31CEF5C95CF9A2D230A572774EA3CEA93032BD90DBC37220C99B49856E914FD7B4CAEB198DCE5981799D0E9746BB5BE4B0A8F342F86AFB99C0E649E05C0BE5F8691FE93FF6D77FD748DF4FF10B3797CA66'
def get_balance(login, password, storename=None, **kwargs):
logging.info(f'start get_balance {login}')
result = {}
url = 'https://avtodor-tr.ru/account'
url_ext = 'https://lk.avtodor-tr.ru/api/client/extended'
session = store.Session(storename)
response3 = session.get(url_ext)
if response3.status_code == 200 and 'json' in response3.headers.get('content-type'):
logging.info('Old session is ok')
else:
# Логинимся
logging.info(f'relogon {login}')
session.drop_and_create()
response1 = session.get(login_url)
if response1.status_code !=200:
raise RuntimeError(f'GET Login page {login_url} error: status_code {response1.status_code}')
try:
url_lk = re.search('action="(.*?)"',response1.text).group(1).replace('&','&')
except Exception:
raise RuntimeError(f'No action url on {login_url}')
data = {'username': login, 'password': password}
response2 = session.post(url_lk, data=data)
if response2.status_code not in (200, 301, 302):
raise RuntimeError(f'POST Login page {url_lk} error: status_code {response2.status_code}')
response3 = session.get(url_ext)
if response3.status_code != 200:
raise RuntimeError(f'GET Login page {url_ext} error: status_code {response3.status_code}')
if 'json' not in response3.headers.get('content-type'):
raise RuntimeError(f"{url_ext} not json: {response3.headers.get('content-type')}")
data = response3.json()
client = data.get('client',{})
contracts = data.get('contracts',[])
# Попытка получить баланс
result['Balance'] = data['contracts'][0]['account_balance']
# Если contracts>1 то прибавляем остальное
result['Balance'] += sum([el['account_balance'] for el in data['contracts'][1:]])
try:
result['Balance2'] = data['contracts'][0]['loyalty_member_balance']
except Exception:
logging.info(f'Not found bonus')
try:
result['userName'] = client['name']
except Exception:
logging.info(f'Not found userName')
try:
result['licSchet'] = client['id']
except Exception:
logging.info(f'Not found licSchet')
session.save_session()
return result
if __name__ == '__main__':
print('This is module avtodor-tr')
| 53.705128
| 1,182
| 0.719981
| 374
| 4,189
| 7.941176
| 0.34492
| 0.03367
| 0.020202
| 0.026263
| 0.142088
| 0.131987
| 0.092929
| 0.057576
| 0.057576
| 0.032997
| 0
| 0.223889
| 0.156601
| 4,189
| 77
| 1,183
| 54.402597
| 0.616756
| 0.040344
| 0
| 0.169492
| 0
| 0
| 0.547813
| 0.37767
| 0
| 1
| 0
| 0
| 0
| 1
| 0.016949
| false
| 0.050847
| 0.050847
| 0
| 0.084746
| 0.016949
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a35e14168158e4dd88d57586640c86691f7145e1
| 255
|
py
|
Python
|
Aula 04/questao05.py
|
eujonas/Python
|
6488221a40c2738753dc2b52d3daeeb1764321b8
|
[
"MIT"
] | 2
|
2021-03-04T21:05:35.000Z
|
2021-03-06T12:28:13.000Z
|
Aula 04/questao05.py
|
eujonas/Python
|
6488221a40c2738753dc2b52d3daeeb1764321b8
|
[
"MIT"
] | null | null | null |
Aula 04/questao05.py
|
eujonas/Python
|
6488221a40c2738753dc2b52d3daeeb1764321b8
|
[
"MIT"
] | 2
|
2021-03-05T17:10:28.000Z
|
2021-03-07T21:38:10.000Z
|
"""5- Escreva uma função para validar uma string. Ela deve receber como argumento, uma string, o número minimo e máximo de caracteres e retornar VERDADEIRO se o número de caracteres da string estiver dentro do min e max passado, e FALSO caso contrário."""
| 255
| 255
| 0.788235
| 43
| 255
| 4.674419
| 0.744186
| 0.089552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004695
| 0.164706
| 255
| 1
| 255
| 255
| 0.938967
| 0.976471
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a35f736d82e63e914aa141d93546e631da21a91c
| 231
|
py
|
Python
|
orgbook-issuer-agent/issuer_pipeline/von_pipeline/generate-creds.py
|
BrendanBeachBC/jag-lcrb-carla-public
|
cd270e463ea5995073a609a86be7ca5a1e9b8ca3
|
[
"Apache-2.0"
] | 7
|
2019-03-06T20:11:00.000Z
|
2021-09-04T13:58:10.000Z
|
orgbook-issuer-agent/issuer_pipeline/von_pipeline/generate-creds.py
|
BrendanBeachBC/jag-lcrb-carla-public
|
cd270e463ea5995073a609a86be7ca5a1e9b8ca3
|
[
"Apache-2.0"
] | 47
|
2018-07-21T22:39:11.000Z
|
2022-03-02T13:08:36.000Z
|
orgbook-issuer-agent/issuer_pipeline/von_pipeline/generate-creds.py
|
BrendanBeachBC/jag-lcrb-carla-public
|
cd270e463ea5995073a609a86be7ca5a1e9b8ca3
|
[
"Apache-2.0"
] | 20
|
2018-12-12T14:15:09.000Z
|
2022-03-23T00:01:34.000Z
|
#!/usr/bin/python
import psycopg2
import datetime
from von_pipeline.config import config
from von_pipeline.eventprocessor import EventProcessor
with EventProcessor() as event_processor:
event_processor.process_event_queue()
| 21
| 54
| 0.835498
| 29
| 231
| 6.448276
| 0.586207
| 0.074866
| 0.160428
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004854
| 0.108225
| 231
| 10
| 55
| 23.1
| 0.902913
| 0.069264
| 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
| 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
|
a3759cf45043177d9e281176bb6d614e0574e826
| 36
|
py
|
Python
|
maml/apps/symbolic/tests/__init__.py
|
anooptp/maml
|
fdd95f3d60c9281d871d89b25b073e87b6ba4e52
|
[
"BSD-3-Clause"
] | 161
|
2020-01-26T08:24:41.000Z
|
2022-03-29T06:42:42.000Z
|
maml/apps/symbolic/tests/__init__.py
|
anooptp/maml
|
fdd95f3d60c9281d871d89b25b073e87b6ba4e52
|
[
"BSD-3-Clause"
] | 195
|
2020-01-25T19:35:20.000Z
|
2022-03-28T13:14:30.000Z
|
maml/apps/symbolic/tests/__init__.py
|
anooptp/maml
|
fdd95f3d60c9281d871d89b25b073e87b6ba4e52
|
[
"BSD-3-Clause"
] | 46
|
2020-03-30T12:56:39.000Z
|
2022-03-27T12:53:23.000Z
|
"""
Tests for symbolic package.
"""
| 9
| 27
| 0.638889
| 4
| 36
| 5.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 36
| 3
| 28
| 12
| 0.766667
| 0.75
| 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
|
6ec0693b664557f03812dc06841f165c911b4c7e
| 119
|
py
|
Python
|
env/lib/python3.7/site-packages/django_class/apps.py
|
mejeng/kasir
|
cc6f9158b61c0cb45078ddf798af9588c8771311
|
[
"MIT"
] | 2
|
2019-12-04T16:24:44.000Z
|
2020-04-06T21:49:34.000Z
|
env/lib/python3.7/site-packages/django_class/apps.py
|
mejeng/kasir
|
cc6f9158b61c0cb45078ddf798af9588c8771311
|
[
"MIT"
] | null | null | null |
env/lib/python3.7/site-packages/django_class/apps.py
|
mejeng/kasir
|
cc6f9158b61c0cb45078ddf798af9588c8771311
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from django.apps import AppConfig
class DjangoPathConfig(AppConfig):
name = 'django_class'
| 17
| 34
| 0.756303
| 15
| 119
| 5.933333
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 119
| 6
| 35
| 19.833333
| 0.872549
| 0.168067
| 0
| 0
| 0
| 0
| 0.122449
| 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
|
6ecbd6c60237fce92efa0268c0b191bae2fd85bf
| 18,069
|
py
|
Python
|
swagger_server/test/test_user_data_controller.py
|
hedleyroos/core-user-data-store
|
b73ba3e89809e35e6c76ee44f837df1fc5ad6193
|
[
"BSD-3-Clause"
] | null | null | null |
swagger_server/test/test_user_data_controller.py
|
hedleyroos/core-user-data-store
|
b73ba3e89809e35e6c76ee44f837df1fc5ad6193
|
[
"BSD-3-Clause"
] | 43
|
2018-01-03T12:19:15.000Z
|
2018-10-18T11:52:21.000Z
|
swagger_server/test/test_user_data_controller.py
|
hedleyroos/core-user-data-store
|
b73ba3e89809e35e6c76ee44f837df1fc5ad6193
|
[
"BSD-3-Clause"
] | 1
|
2021-08-17T12:05:23.000Z
|
2021-08-17T12:05:23.000Z
|
# coding: utf-8
from __future__ import absolute_import
import random
import uuid
from flask import json
from ge_core_shared import db_actions, decorators
import werkzeug
from swagger_server.models import AdminNoteCreate
from swagger_server.models import SiteDataSchemaCreate
from swagger_server.models import UserSiteDataCreate
from swagger_server.models.admin_note import AdminNote
from swagger_server.models.admin_note_update import AdminNoteUpdate
from swagger_server.models.site_data_schema import SiteDataSchema
from swagger_server.models.site_data_schema_update import SiteDataSchemaUpdate
from swagger_server.models.user_site_data import UserSiteData
from swagger_server.models.user_site_data_update import UserSiteDataUpdate
from . import BaseTestCase
from project.settings import API_KEY_HEADER
class TestUserDataController(BaseTestCase):
""" UserDataController integration test stubs """
@decorators.db_exception
def setUp(self):
super().setUp()
self.adminnote_data = {
"creator_id": "%s" % uuid.uuid1(),
"note": "This is text",
"user_id": "%s" % uuid.uuid1(),
}
self.adminnote_model = db_actions.crud(
model="AdminNote",
api_model=AdminNote,
data=self.adminnote_data,
action="create"
)
self.sitedataschema_data = {
"site_id": random.randint(2, 2000000),
"schema": {
"type": "object",
"properties": {
"item_1": {"type": "number"},
"item_2": {"type": "string"}
},
"additionalProperties": False
}
}
self.sitedataschema_model = db_actions.crud(
model="SiteDataSchema",
api_model=SiteDataSchema,
data=self.sitedataschema_data,
action="create"
)
self.usersitedata_data = {
"site_id": random.randint(2, 2000000),
"user_id": "%s" % uuid.uuid1(),
"data": {"test": "data"},
}
self.usersitedata_model = db_actions.crud(
model="UserSiteData",
api_model=UserSiteData,
data=self.usersitedata_data,
action="create"
)
self.headers = {API_KEY_HEADER: "test-api-key"}
def test_adminnote_create(self):
"""
Test case for adminnote_create
"""
data = AdminNoteCreate(**{
"creator_id": "%s" % uuid.uuid1(),
"note": "This is text",
"user_id": "%s" % uuid.uuid1(),
})
response = self.client.open(
"/api/v1/adminnotes",
method="POST",
data=json.dumps(data),
content_type="application/json",
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(response_data["creator_id"], data.creator_id)
self.assertEqual(response_data["note"], data.note)
self.assertEqual(response_data["user_id"], data.user_id)
def test_adminnote_delete(self):
"""
Test case for adminnote_delete
"""
data = {
"creator_id": "%s" % uuid.uuid1(),
"note": "This is text",
"user_id": "%s" % uuid.uuid1(),
}
model = db_actions.crud(
model="AdminNote",
api_model=AdminNote,
data=data,
action="create"
)
response = self.client.open(
'/api/v1/adminnotes/{id}'.format(
id=model.id
), method='DELETE',
headers=self.headers)
with self.assertRaises(werkzeug.exceptions.NotFound):
db_actions.crud(
model="AdminNote",
api_model=AdminNote,
action="read",
query={
"id": model.id
}
)
def test_adminnote_list(self):
"""
Test case for adminnote_list
"""
objects = []
for index in range(2, 2+random.randint(2, 20)):
data = {
"user_id": "%s" % uuid.uuid1(),
"creator_id": "%s" % uuid.uuid1(),
"note": "List notes %s" % index
}
objects.append(db_actions.crud(
model="AdminNote",
api_model=AdminNote,
data=data,
action="create"
))
query_string = [
("admin_note_ids", ",".join(map(str, [adminnote.id for adminnote in objects])))
]
response = self.client.open(
'/api/v1/adminnotes',
method='GET',
query_string=query_string,
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(len(response_data), len(objects))
self.assertEqual(int(response.headers["X-Total-Count"]), len(objects))
query_string = [
("limit", 2),
("admin_note_ids", ",".join(map(str, [adminnote.id for adminnote in objects])))
]
response = self.client.open(
'/api/v1/adminnotes',
method='GET',
query_string=query_string,
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(len(response_data), 2)
self.assertEqual(int(response.headers["X-Total-Count"]), len(objects))
def test_adminnote_read(self):
"""
Test case for adminnote_read
"""
response = self.client.open(
'/api/v1/adminnotes/{admin_note_id}'.format(
admin_note_id=self.adminnote_model.id
),
method='GET',
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(response_data["user_id"], self.adminnote_model.user_id)
self.assertEqual(
response_data["creator_id"], self.adminnote_model.creator_id)
self.assertEqual(response_data["note"], self.adminnote_model.note)
def test_adminnote_update(self):
"""
Test case for adminnote_update
"""
data = {
"creator_id": "%s" % uuid.uuid1(),
"note": "This is text",
"user_id": "%s" % uuid.uuid1(),
}
model = db_actions.crud(
model="AdminNote",
api_model=AdminNote,
data=data,
action="create"
)
data = {
"note": "This is updated text",
}
data = AdminNoteUpdate(**data)
response = self.client.open(
'/api/v1/adminnotes/{admin_note_id}'.format(
admin_note_id=model.id),
method='PUT',
data=json.dumps(data),
content_type='application/json',
headers=self.headers)
response_data = json.loads(response.data)
updated_entry = db_actions.crud(
model="AdminNote",
api_model=AdminNote,
action="read",
query={"id": model.id}
)
self.assertEqual(response_data["user_id"], updated_entry.user_id)
self.assertEqual(
response_data["creator_id"], updated_entry.creator_id)
self.assertEqual(response_data["note"], updated_entry.note)
def test_sitedataschema_create(self):
"""
Test case for sitedataschema_create
"""
data = SiteDataSchemaCreate(**{
"site_id": random.randint(2, 2000000),
"schema": {"test": "data"}
})
response = self.client.open(
"/api/v1/sitedataschemas",
method="POST",
data=json.dumps(data),
content_type="application/json",
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(response_data["site_id"], data.site_id)
self.assertEqual(response_data["schema"], data.schema)
def test_sitedataschema_delete(self):
"""
Test case for sitedataschema_delete
"""
data = {
"site_id": random.randint(2, 2000000),
"schema": {"test": "data"}
}
model = db_actions.crud(
model="SiteDataSchema",
api_model=SiteDataSchema,
data=data,
action="create"
)
response = self.client.open(
'/api/v1/sitedataschemas/{site_id}'.format(
site_id=model.site_id
), method='DELETE',
headers=self.headers)
with self.assertRaises(werkzeug.exceptions.NotFound):
db_actions.crud(
model="SiteDataSchema",
api_model=SiteDataSchema,
action="read",
query={
"site_id": model.site_id
}
)
def test_sitedataschema_list(self):
"""
Test case for sitedataschema_list
"""
sitedataschema_data = {
"site_id": random.randint(2, 2000000),
"schema": {
"type": "object",
"properties": {
"item_1": {"type": "number"},
"item_2": {"type": "string"}
},
"additionalProperties": False
}
}
db_actions.crud(
model="SiteDataSchema",
api_model=SiteDataSchema,
data=sitedataschema_data,
action="create"
)
query_string = [
("limit", 5)
]
response = self.client.open(
'/api/v1/sitedataschemas',
method='GET',
query_string=query_string,
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(len(response_data), 2)
self.assertIn("X-Total-Count", response.headers)
def test_sitedataschema_read(self):
"""
Test case for sitedataschema_read
"""
response = self.client.open(
'/api/v1/sitedataschemas/{site_id}'.format(
site_id=self.sitedataschema_model.site_id
),
method='GET',
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(
response_data["site_id"], self.sitedataschema_model.site_id)
self.assertEqual(
response_data["schema"], self.sitedataschema_model.schema)
def test_sitedataschema_update(self):
"""
Test case for sitedataschema_update
"""
data = {
"site_id": random.randint(2, 2000000),
"schema": {"test": "data"}
}
model = db_actions.crud(
model="SiteDataSchema",
api_model=SiteDataSchema,
data=data,
action="create"
)
data = {
"schema": {"test": "updated_data"},
}
data = SiteDataSchemaUpdate(**data)
response = self.client.open(
'/api/v1/sitedataschemas/{site_id}'.format(
site_id=model.site_id),
method='PUT',
data=json.dumps(data),
content_type='application/json',
headers=self.headers)
response_data = json.loads(response.data)
updated_entry = db_actions.crud(
model="SiteDataSchema",
api_model=SiteDataSchema,
action="read",
query={"site_id": model.site_id}
)
self.assertEqual(updated_entry.site_id, model.site_id)
self.assertEqual(
response_data["site_id"], updated_entry.site_id)
self.assertEqual(
response_data["schema"], updated_entry.schema)
def test_usersitedata_create(self):
"""
Test case for usersitedata_create
"""
data = UserSiteDataCreate(**{
"site_id": self.sitedataschema_data["site_id"],
"user_id": "%s" % uuid.uuid1(),
"data": {"item_1": 1, "item_2": 2},
})
response = self.client.open(
"/api/v1/usersitedata",
method="POST",
data=json.dumps(data),
content_type="application/json",
headers=self.headers)
# Response should contain bad request
self.assertEquals(response.status_code, 400)
json_data = json.loads(response.data)
self.assertIn(
"Data does not match expected schema:2 is not of type 'string'",
json_data["detail"])
data = UserSiteDataCreate(**{
"site_id": self.sitedataschema_data["site_id"],
"user_id": "%s" % uuid.uuid1(),
"data": {"item_1": 1, "item_2": "a string"},
})
response = self.client.open(
"/api/v1/usersitedata",
method="POST",
data=json.dumps(data),
content_type="application/json",
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(response_data["site_id"], data.site_id)
self.assertEqual(response_data["user_id"], data.user_id)
self.assertEqual(response_data["data"], data.data)
def test_usersitedata_delete(self):
"""
Test case for usersitedata_delete
"""
data = {
"site_id": random.randint(2, 2000000),
"user_id": "%s" % uuid.uuid1(),
"data": {"test": "delete this data"},
}
model = db_actions.crud(
model="UserSiteData",
api_model=UserSiteData,
data=data,
action="create"
)
response = self.client.open(
'/api/v1/usersitedata/{user_id}/{site_id}'.format(
user_id=model.user_id,
site_id=model.site_id
), method='DELETE',
headers=self.headers)
with self.assertRaises(werkzeug.exceptions.NotFound):
db_actions.crud(
model="UserSiteData",
api_model=UserSiteData,
action="read",
query={
"user_id": model.user_id,
"site_id": model.site_id
}
)
def test_usersitedata_list(self):
"""
Test case for usersitedata_list
"""
usersitedata_data = {
"site_id": random.randint(2, 2000000),
"user_id": "%s" % uuid.uuid1(),
"data": {"test": "data"},
}
db_actions.crud(
model="UserSiteData",
api_model=UserSiteData,
data=usersitedata_data,
action="create"
)
query_string = [
("limit", 5)
]
response = self.client.open(
'/api/v1/usersitedata',
method='GET',
query_string=query_string,
headers=self.headers)
response_data = json.loads(response.data)
self.assertEqual(len(response_data), 2)
self.assertIn("X-Total-Count", response.headers)
def test_usersitedata_read(self):
"""
Test case for usersitedata_read
"""
response = self.client.open(
'/api/v1/usersitedata/{user_id}/{site_id}'.format(
user_id=self.usersitedata_model.user_id,
site_id=self.usersitedata_model.site_id
),
method='GET',
headers=self.headers)
response_data = json.loads(response.data)
self.assertEquals(
response_data["user_id"], self.usersitedata_model.user_id)
self.assertEquals(
response_data["site_id"], self.usersitedata_model.site_id)
def test_usersitedata_update(self):
"""
Test case for usersitedata_update
"""
data = {
"site_id": self.sitedataschema_data["site_id"],
"user_id": "%s" % uuid.uuid1(),
"data": {"test": "data"},
}
model = db_actions.crud(
model="UserSiteData",
api_model=UserSiteData,
data=data,
action="create"
)
data = {
"data": {"test": "updated_data"},
}
data = UserSiteDataUpdate(**data)
response = self.client.open(
'/api/v1/usersitedata/{user_id}/{site_id}'.format(
user_id=model.user_id,
site_id=model.site_id),
method='PUT',
data=json.dumps(data),
content_type='application/json',
headers=self.headers)
# Check for bad request
self.assertEqual(response.status_code, 400)
json_data = json.loads(response.data)
self.assertIn(
"Data does not match expected schema:Additional properties are not "
"allowed ('test' was unexpected)", json_data["detail"])
# Retry with correct data
data = {"data": {"item_1": 1, "item_2": "another string"}}
data = UserSiteDataUpdate(**data)
response = self.client.open(
'/api/v1/usersitedata/{user_id}/{site_id}'.format(
user_id=model.user_id,
site_id=model.site_id),
method='PUT',
data=json.dumps(data),
content_type='application/json',
headers=self.headers)
response_data = json.loads(response.data)
updated_entry = db_actions.crud(
model="UserSiteData",
api_model=UserSiteData,
action="read",
query={
"user_id": model.user_id,
"site_id": model.site_id
}
)
self.assertEqual(updated_entry.site_id, model.site_id)
self.assertEqual(
response_data["site_id"], updated_entry.site_id)
self.assertEqual(
response_data["data"], updated_entry.data)
if __name__ == '__main__':
import unittest
unittest.main()
| 31.099828
| 91
| 0.540152
| 1,776
| 18,069
| 5.293356
| 0.086149
| 0.037656
| 0.051378
| 0.057441
| 0.81268
| 0.744602
| 0.725136
| 0.667269
| 0.644931
| 0.622381
| 0
| 0.011011
| 0.34158
| 18,069
| 580
| 92
| 31.153448
| 0.779188
| 0.034977
| 0
| 0.666667
| 0
| 0
| 0.130134
| 0.023203
| 0
| 0
| 0
| 0
| 0.086093
| 1
| 0.03532
| false
| 0
| 0.039735
| 0
| 0.077263
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
|
6edb29f3e1c5c942f6d0b0c6f7f3592217cff1f7
| 128
|
py
|
Python
|
cwProject/cwApp/admin.py
|
cs-fullstack-2019-spring/django-validation-cw-autumn-ragland
|
0cd1dead7d660d88aa0af5abfd34a48e49ec653c
|
[
"Apache-2.0"
] | null | null | null |
cwProject/cwApp/admin.py
|
cs-fullstack-2019-spring/django-validation-cw-autumn-ragland
|
0cd1dead7d660d88aa0af5abfd34a48e49ec653c
|
[
"Apache-2.0"
] | null | null | null |
cwProject/cwApp/admin.py
|
cs-fullstack-2019-spring/django-validation-cw-autumn-ragland
|
0cd1dead7d660d88aa0af5abfd34a48e49ec653c
|
[
"Apache-2.0"
] | null | null | null |
from django.contrib import admin
from .models import NewCarModel
# Register your models here.
admin.site.register(NewCarModel)
| 21.333333
| 32
| 0.820313
| 17
| 128
| 6.176471
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117188
| 128
| 5
| 33
| 25.6
| 0.929204
| 0.203125
| 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
|
42bb42db6e9db1dafc8ee21044360e272d0c7a28
| 4,493
|
py
|
Python
|
test_translator.py
|
mrguima/python-server-app
|
31c1a71258c4fd5854d82c316c2788ffd783cf78
|
[
"MIT"
] | null | null | null |
test_translator.py
|
mrguima/python-server-app
|
31c1a71258c4fd5854d82c316c2788ffd783cf78
|
[
"MIT"
] | null | null | null |
test_translator.py
|
mrguima/python-server-app
|
31c1a71258c4fd5854d82c316c2788ffd783cf78
|
[
"MIT"
] | null | null | null |
import unittest
import translator
class TestTranslate(unittest.TestCase):
def test_translateReturnZero(self):
self.assertEqual(translator.translate(0), "zero")
self.assertEqual(translator.translate(00000), "zero")
self.assertEqual(translator.translate(-0), "zero")
self.assertEqual(translator.translate(+0), "zero")
def test_translateReturnTensThousandsNumbers(self):
self.assertEqual(translator.translate(10000), "dez mil")
self.assertEqual(translator.translate(11000), "onze mil")
self.assertEqual(translator.translate(15000), "quinze mil")
self.assertEqual(translator.translate(19000), "dezenove mil")
self.assertEqual(translator.translate(20000), "vinte mil")
self.assertEqual(translator.translate(21000), "vinte e um mil")
self.assertEqual(translator.translate(25000), "vinte e cinco mil")
self.assertEqual(translator.translate(50000), "cinquenta mil")
self.assertEqual(translator.translate(90000), "noventa mil")
self.assertEqual(translator.translate(99000), "noventa e nove mil")
def test_translateReturnThousandNumbers(self):
self.assertEqual(translator.translate(1000), "um mil")
self.assertEqual(translator.translate(2000), "dois mil")
self.assertEqual(translator.translate(3000), "três mil")
self.assertEqual(translator.translate(4000), "quatro mil")
self.assertEqual(translator.translate(5000), "cinco mil")
self.assertEqual(translator.translate(9000), "nove mil")
def test_translateReturnHundredNumbers(self):
self.assertEqual(translator.translate(100), "cem")
self.assertEqual(translator.translate(101), "cento e um")
self.assertEqual(translator.translate(105), "cento e cinco")
self.assertEqual(translator.translate(110), "cento e dez")
self.assertEqual(translator.translate(111), "cento e onze")
self.assertEqual(translator.translate(112), "cento e doze")
self.assertEqual(translator.translate(115), "cento e quinze")
self.assertEqual(translator.translate(119), "cento e dezenove")
self.assertEqual(translator.translate(120), "cento e vinte")
self.assertEqual(translator.translate(200), "duzentos")
self.assertEqual(translator.translate(201), "duzentos e um")
self.assertEqual(translator.translate(205), "duzentos e cinco")
self.assertEqual(translator.translate(209), "duzentos e nove")
self.assertEqual(translator.translate(210), "duzentos e dez")
self.assertEqual(translator.translate(299), "duzentos e noventa e nove")
self.assertEqual(translator.translate(300), "trezentos")
self.assertEqual(translator.translate(500), "quinhentos")
self.assertEqual(translator.translate(900), "novecentos")
self.assertEqual(translator.translate(999), "novecentos e noventa e nove")
def test_translateReturnTensNumbers(self):
self.assertEqual(translator.translate(10), "dez")
self.assertEqual(translator.translate(11), "onze")
self.assertEqual(translator.translate(12), "doze")
self.assertEqual(translator.translate(15), "quinze")
self.assertEqual(translator.translate(19), "dezenove")
self.assertEqual(translator.translate(20), "vinte")
self.assertEqual(translator.translate(30), "trinta")
self.assertEqual(translator.translate(50), "cinquenta")
self.assertEqual(translator.translate(90), "noventa")
self.assertEqual(translator.translate(99), "noventa e nove")
def test_translateReturnFullNumbers(self):
self.assertEqual(translator.translate(-1042), "menos um mil e quarenta e dois")
self.assertEqual(translator.translate(94587), "noventa e quatro mil e quinhentos e oitenta e sete")
self.assertEqual(translator.translate(27100), "vinte e sete mil e cem")
self.assertEqual(translator.translate(99101), "noventa e nove mil e cento e um")
self.assertEqual(translator.translate(94587), "noventa e quatro mil e quinhentos e oitenta e sete")
self.assertEqual(translator.translate(10010), "dez mil e dez")
self.assertEqual(translator.translate(-10010), "menos dez mil e dez")
self.assertEqual(translator.translate(94587), "noventa e quatro mil e quinhentos e oitenta e sete")
""" sem a função abaixo, use python -m unittest arquivo.py para rodar os testes"""
if __name__ == '__main__':
unittest.main()
| 56.873418
| 107
| 0.70888
| 501
| 4,493
| 6.329341
| 0.225549
| 0.269631
| 0.449385
| 0.611164
| 0.667613
| 0.315358
| 0.178808
| 0.160202
| 0.143173
| 0.143173
| 0
| 0.052927
| 0.167371
| 4,493
| 78
| 108
| 57.602564
| 0.794707
| 0
| 0
| 0.044118
| 0
| 0
| 0.17547
| 0
| 0
| 0
| 0
| 0
| 0.838235
| 1
| 0.088235
| false
| 0
| 0.029412
| 0
| 0.132353
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
42e56508917eb095c9633a105e021b68b0a3dd6c
| 3,609
|
py
|
Python
|
tasks-deploy/calc-1/generate.py
|
irdkwmnsb/lkshl-ctf
|
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
|
[
"MIT"
] | 3
|
2021-03-30T06:27:58.000Z
|
2021-04-03T17:56:35.000Z
|
tasks-deploy/calc-1/generate.py
|
irdkwmnsb/lkshl-ctf
|
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
|
[
"MIT"
] | null | null | null |
tasks-deploy/calc-1/generate.py
|
irdkwmnsb/lkshl-ctf
|
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
|
[
"MIT"
] | null | null | null |
TASK_URL = "calc-1.ctf.sicamp.ru 50002"
TITLE = "Простой калькулятор"
STATEMENT_TEMPLATE = f'''
Весьма ленивый компьютер не хочет считать. Поговорите с ним
`nc {TASK_URL}`
Ваш токен: `{{0}}`
'''
def generate(context):
participant = context['participant']
token = tokens[participant.id % len(tokens)]
return TaskStatement(TITLE, STATEMENT_TEMPLATE.format(token))
tokens = ['CYmDPYOd0ozF', 'tsMJbzUwvBM8', '9ZIfQSZWlUEM', 'aZyY84MtXqsP', 'NQc0Twe0rsTG', 'AWKw80OZi395', 'qa2bg6368L8g', 'KXntMFtaQxdq', 'bhgc2YEtfwHc', 's3NevCNTGlLA', 'fbf7ZvPv686Z', 'FutLqF84rhPL', '1GrvZ9q54ZJE', 'nobCQBuOgmOS', 'Cu2rOxomcpMN', 'fxN5DI5EPwYB', '36JZ7NiNo99g', 'tllG4gRFdS5R', 'AuW5lapjhNR5', 'xil09arkZuZ0', '4XM5DzKa8uSj', 'lq2t9XTtdL6x', 'Umkr3JfuICCB', 'PJ8EQdXtUpul', 'cdD3OU8Noiod', 'CyhzSR5ipY8W', '48EqJp8v5myv', 'eQfqqBramXSf', 'cGmBzN6K7kHZ', '2swVw1u4oU4A', '96C5oKrbTIt6', 'CxlVmoFwHmxJ', 'fRwmRgX6EVkJ', 'gnHHyImk0lhZ', 'Df8RpPL9VohZ', 'Er8tms265N0M', '2kCLG6mooL5R', 'J87ZreeaX73y', 'mknoSG1bdK33', 'QJS4TeBBvrC2', 'QkxszQok2cpK', '9Qf5FShx9pEV', 'Q6ODDqwZARcm', 'XpUnurGtFxhE', 'OjAdxluCS2zk', 'YyhvY2j6PaUt', 'sNbdwfA721vA', '1wszHAqmNrDu', 'XAv38zL1xZYZ', 'EglQL86ykJlL', 'FbKvGy3PBC4F', 'B7MaIuzbb1Ye', 'SDv2a3bCWDhc', 'pWyuHYLrANye', '59QbRMKMcn5r', 'fOb9dQKCg4Cf', 'M6NFXIZ1xYFe', 'c2X5otPPmt0w', 'J5EZfNjIasIR', 'BQwXZO8AYy66', '0VZRvzVe6kxW', 'kdwjKZoHEkCB', 'rKJvnTzXVOPc', 'kJBFGbYGT6Ds', 'tc9HLbFZBAba', 'kCaMlE9OkDWp', 'sKo1ldJADnIH', 'AFPDKPWHttbT', 'Xe7NCafXsjHK', 'e8g7UuhD4E2M', 'm3F1MjnNVipu', 'JQ1onZYN32cP', '5X4MO3ok8F15', 'apneKWp6Vi4S', 'rl5Ce98Lyyfd', '8vMehb59bl9j', 'JQvAdsLTkjYf', 'sIxcQWT5Fctc', 'NDalsziSz9e1', 'xzuCGcnbJ5x9', 'B7UANhjYJ9Rn', 'lXGdNnfTpowU', 'FDVIdWerjAnM', 'WDvJ8quQ8hMW', 'uNiYmXhXlbhW', 'qgF8IcN5Elvr', '6grzw8o3Qblq', 'CmKBiH6F041u', 'nrr76AtUR9Y4', 'Hnrefddpqzgi', 'gw9vcpGjU4Y4', 'fNnZhGm7ccfI', 'qWCeXOzfSNha', '8jiamfGYEznp', '2kkr0NABogE1', 'GYbgHEBXW6Kr', 'hesA22xF78zj', 'r5iEuPAWYpwT', 'pnoWKDPGG08u', 'darbEpfAdkV8', 'MT773tnN7ucM', 'W8s0M6ZWiRxW', 'QqmhL8Ut5fAE', 'MbohmimJJ3Rq', 'p9caxPiDX6sn', 'ROXW4HTHEuFo', 'g0NhIPLW3WgG', 'k67SjHVSHd3J', 'GC1GMJSQCpU2', 'dLhqKZycGbV3', 'tOQJxC3aO13l', 'VhSur0cLju51', 'l1IILUHqY5md', 'lrQvaKtJMSKW', 'YjxtaldGEuWH', '76JoytlWQE52', 'TzVXdmlLizr3', 'gjFjYtDPWIQY', 'rSGPGfwvAuJ1', 'xDWkUCH4Fs8O', 'RPbLPFmjNW8P', '2EsQTiypcBtb', '6EZb0oQ5j94n', 'jEj6isoeAOv4', 'QrTUibV9QrPn', 'nnRbHDURd1UV', 'mxE1ZDKfAYd7', 'Nntb0F4e8h3Q', 'GSyPTBiclqgq', 'oHyZLONoNA3w', 'MLUDnVwmnobF', 'kycUVRGpwGNx', 'd30nvqEdWtLx', 'RF2c7sIuiFj8', '3wjuoWVjNIV1', 'uq4z1Mx0jwbw', 'Qtz7DCOii6Tm', 'gKp7wl94teX5', 'HKUlbx4c09VC', 'c8gqUst9APmj', 'XVHWBk4VEopV', 'esXFa8WneTCC', 'VDDuZQddmLmN', 'OlNyT9GFOgX5', 'AQEX9r1DhWwv', '7FR0xfEZdOUp', 'PHtEGV7fMpq4', 'ANDro1Mo3vgI', 'RxBx1Cs1kxbJ', 'USEpZf3SErYP', '3II5I0zrpXTh', 'YxXpqd0fcAyu', '4KqMCx3ckB9t', 'sfI1RhqVVUyK', 'dJctgZD5BdUs', 'BkTAHIlmu8T3', 'K8QErY2sVDKI', 'mALTpHvtRUHd', '3PQM9D0SjlT8', 'tCzNUL0ZNHHC', 'q3SiC18hCcUq', 'PwRE3nJgtIKk', 'v1uoqVDsdxaT', 'j7PAFLbnHSiZ', 'v3Ggp5kJQIIi', 'HWDUsJg8TFIs', 'xJrFMinGO2dU', 'RziMkYcYsKOi', '7R6S3glnfpzB', 'V0nPkTKJMPjG', 'HLIHrzzkwqzU', 'chtR8w7gEnG1', 'nIywvrfWwLOb', 'I85aWbOI7Swf', 'l8vLUa86C7NC', 'dyflpfPfu6P4', 'gz3Ay1VeGXnc', 'mucsW6kywLp0', '6V0RnumlGgv1', 'eHfsG4GJLK6g', 'VipEO1d5Vjcl', 'eISDm5fig1an', 'vL6ebSASfaAk', 'BEtMf8Yw3qpx', '1fcmruiLd1gT', '8z5z6K4MWAT6', 'WVdIe72P4kkl', 'YnZ7EOIluLZ7', 'Fu8i2AQoth8m', 'uDZoMiGM42WB', 'YqHOsntSIaYe', '1WE1jMKUowPJ', 'SrkWfXL8k5wa', 'GdROPgDosKYK', '8jkA7RHT9Wfs', 'qUjUjMkoQEAk', 'QZNqFn6MxfDa', 'j6rEBOxn2Fii', 'Kzt8MMEgzNtt', 'eF8v6q4ms2Uk']
| 257.785714
| 3,209
| 0.742311
| 249
| 3,609
| 10.742972
| 0.955823
| 0.005234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116782
| 0.07703
| 3,609
| 14
| 3,209
| 257.785714
| 0.68628
| 0
| 0
| 0
| 0
| 0
| 0.711148
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
42e7c06c6774f9155bc9d42de9c97a70b8f43eee
| 120
|
py
|
Python
|
python/432.A.py
|
arechesk/cf
|
8d2209398f0fc4a73c139f4101634a8ed8c62ff6
|
[
"BSD-3-Clause"
] | null | null | null |
python/432.A.py
|
arechesk/cf
|
8d2209398f0fc4a73c139f4101634a8ed8c62ff6
|
[
"BSD-3-Clause"
] | null | null | null |
python/432.A.py
|
arechesk/cf
|
8d2209398f0fc4a73c139f4101634a8ed8c62ff6
|
[
"BSD-3-Clause"
] | null | null | null |
n,k=list(map(int,input().split()))
s=list(map(int,input().split()))
ans=int(len([i for i in s if 5-i>=k])/3)
print(ans)
| 24
| 40
| 0.616667
| 28
| 120
| 2.642857
| 0.607143
| 0.189189
| 0.27027
| 0.405405
| 0.540541
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018182
| 0.083333
| 120
| 4
| 41
| 30
| 0.654545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6e0cbeb815e5d9ae9a814ca04610abaa473d6eed
| 214
|
py
|
Python
|
ocdsapi/events.py
|
openprocurement/ocdsapi
|
137d979c1f674b251436b3f68da8164921218bd6
|
[
"Apache-2.0"
] | null | null | null |
ocdsapi/events.py
|
openprocurement/ocdsapi
|
137d979c1f674b251436b3f68da8164921218bd6
|
[
"Apache-2.0"
] | 4
|
2019-12-26T17:18:39.000Z
|
2022-03-21T22:16:51.000Z
|
ocdsapi/events.py
|
openprocurement/ocdsapi
|
137d979c1f674b251436b3f68da8164921218bd6
|
[
"Apache-2.0"
] | 2
|
2018-05-11T12:07:28.000Z
|
2018-07-27T16:19:30.000Z
|
class RecordBatchUpdate:
""" Event generated each time when record is created/update with new release """
def __init__(self, request, records):
self.request = request
self.records = records
| 35.666667
| 84
| 0.691589
| 25
| 214
| 5.76
| 0.76
| 0.152778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.228972
| 214
| 5
| 85
| 42.8
| 0.872727
| 0.336449
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6e1a3e43d20718b9da1812455dfffc68527292ce
| 961
|
py
|
Python
|
api/resources_portal/test/serializers/test_user.py
|
arielsvn/resources-portal
|
f5a25935e45ceb05e2f4738f567eec9ca8793441
|
[
"BSD-3-Clause"
] | null | null | null |
api/resources_portal/test/serializers/test_user.py
|
arielsvn/resources-portal
|
f5a25935e45ceb05e2f4738f567eec9ca8793441
|
[
"BSD-3-Clause"
] | null | null | null |
api/resources_portal/test/serializers/test_user.py
|
arielsvn/resources-portal
|
f5a25935e45ceb05e2f4738f567eec9ca8793441
|
[
"BSD-3-Clause"
] | null | null | null |
from django.contrib.auth.hashers import check_password
from django.forms.models import model_to_dict
from django.test import TestCase
from resources_portal.test.factories import UserFactory
from resources_portal.views.user import CreateUserSerializer
class TestCreateUserSerializer(TestCase):
def setUp(self):
self.user_data = model_to_dict(UserFactory.build())
def test_serializer_with_empty_data(self):
serializer = CreateUserSerializer(data={})
self.assertFalse(serializer.is_valid())
def test_serializer_with_valid_data(self):
serializer = CreateUserSerializer(data=self.user_data)
self.assertTrue(serializer.is_valid())
def test_serializer_hashes_password(self):
serializer = CreateUserSerializer(data=self.user_data)
self.assertTrue(serializer.is_valid())
user = serializer.save()
self.assertTrue(check_password(self.user_data.get("password"), user.password))
| 35.592593
| 86
| 0.762747
| 113
| 961
| 6.256637
| 0.345133
| 0.079208
| 0.067893
| 0.161245
| 0.371994
| 0.371994
| 0.229137
| 0.229137
| 0.229137
| 0.229137
| 0
| 0
| 0.150885
| 961
| 26
| 87
| 36.961538
| 0.866422
| 0
| 0
| 0.210526
| 0
| 0
| 0.008325
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 1
| 0.210526
| false
| 0.157895
| 0.263158
| 0
| 0.526316
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
6e2345cd2907c42fde0c45715538c0ae6c12b428
| 83
|
py
|
Python
|
RhymeSearch/RhymeSearch/__init__.py
|
Jezemy/ChineseRhymePhraseSearch
|
6e5edde6170e0a7995d3f4f2d2f569fd36d906ee
|
[
"MIT"
] | 19
|
2020-04-13T10:27:40.000Z
|
2021-09-17T11:22:49.000Z
|
RhymeSearch/RhymeSearch/__init__.py
|
Jezemy/ChineseRhymePhraseSearch
|
6e5edde6170e0a7995d3f4f2d2f569fd36d906ee
|
[
"MIT"
] | 1
|
2020-04-14T02:27:49.000Z
|
2020-04-14T02:27:49.000Z
|
RhymeSearch/RhymeSearch/__init__.py
|
Jezemy/ChineseRhymePhraseSearch
|
6e5edde6170e0a7995d3f4f2d2f569fd36d906ee
|
[
"MIT"
] | 1
|
2021-09-17T06:52:00.000Z
|
2021-09-17T06:52:00.000Z
|
# 如果使用pymysql+django2.1版本的将下列代码取消注释
# import pymysql
# pymysql.install_as_MySQLdb()
| 27.666667
| 35
| 0.831325
| 9
| 83
| 7.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025974
| 0.072289
| 83
| 3
| 36
| 27.666667
| 0.844156
| 0.927711
| 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
|
6e3f8c915476e0c1ef8051a813364999730f261e
| 133
|
py
|
Python
|
python/testData/formatter/wrapBeforeElse.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/formatter/wrapBeforeElse.py
|
Cyril-lamirand/intellij-community
|
60ab6c61b82fc761dd68363eca7d9d69663cfa39
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/formatter/wrapBeforeElse.py
|
Cyril-lamirand/intellij-community
|
60ab6c61b82fc761dd68363eca7d9d69663cfa39
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
id = 1 if looooooooooooooooooooooooong_vaaaaaaaaaaaaaaaar == 'loooooooooooooooong_vaaaaaaaaaaaaaaaaaaaaaaaaaalue' else list('foo')[0]
| 133
| 133
| 0.857143
| 11
| 133
| 10.181818
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016
| 0.06015
| 133
| 1
| 133
| 133
| 0.88
| 0
| 0
| 0
| 0
| 0
| 0.395522
| 0.373134
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2856a1708c1eda0da41b6d2a0e773ed30bf1c04b
| 142
|
py
|
Python
|
examples/test.py
|
jkpubsrc/python-module-jk-flexdata
|
34b5a00798428bd628c0a2210d3a0ca17b4e5f3c
|
[
"Apache-1.1"
] | null | null | null |
examples/test.py
|
jkpubsrc/python-module-jk-flexdata
|
34b5a00798428bd628c0a2210d3a0ca17b4e5f3c
|
[
"Apache-1.1"
] | null | null | null |
examples/test.py
|
jkpubsrc/python-module-jk-flexdata
|
34b5a00798428bd628c0a2210d3a0ca17b4e5f3c
|
[
"Apache-1.1"
] | null | null | null |
#!/usr/bin/python3
import jk_flexdata
x = jk_flexdata.FlexObject({
"a": [
{
"b": "c"
}
]
})
print(x.a[0])
print(x.a[0].b)
| 6.173913
| 28
| 0.507042
| 22
| 142
| 3.181818
| 0.590909
| 0.285714
| 0.2
| 0.228571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028302
| 0.253521
| 142
| 22
| 29
| 6.454545
| 0.632075
| 0.119718
| 0
| 0
| 0
| 0
| 0.025424
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.1
| 0
| 0.1
| 0.2
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9538cf4891d1fa56f85c8db8ce0b65668addcfc0
| 152
|
py
|
Python
|
curio/__init__.py
|
ABaldwinHunter/curio-clone-classic
|
43aebdb36d71296af63863b7a176acc831d4f8cf
|
[
"BSD-3-Clause"
] | null | null | null |
curio/__init__.py
|
ABaldwinHunter/curio-clone-classic
|
43aebdb36d71296af63863b7a176acc831d4f8cf
|
[
"BSD-3-Clause"
] | null | null | null |
curio/__init__.py
|
ABaldwinHunter/curio-clone-classic
|
43aebdb36d71296af63863b7a176acc831d4f8cf
|
[
"BSD-3-Clause"
] | null | null | null |
# curio/__init__.py
__version__ = '0.1'
from .kernel import *
from .sync import *
from .queue import *
from .workers import *
from .network import *
| 13.818182
| 22
| 0.703947
| 21
| 152
| 4.714286
| 0.619048
| 0.40404
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.184211
| 152
| 10
| 23
| 15.2
| 0.782258
| 0.111842
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9554c995c28d592ac4bb4941122622547c538057
| 145
|
py
|
Python
|
core/io.py
|
ponyatov/datalang
|
e0a154111fb620873e4134db6aab1b43588c83bc
|
[
"MIT"
] | 2
|
2021-01-12T09:57:58.000Z
|
2021-01-12T14:14:26.000Z
|
core/io.py
|
ponyatov/datalang
|
e0a154111fb620873e4134db6aab1b43588c83bc
|
[
"MIT"
] | null | null | null |
core/io.py
|
ponyatov/datalang
|
e0a154111fb620873e4134db6aab1b43588c83bc
|
[
"MIT"
] | null | null | null |
from .object import *
## input/output object
class IO(Object):
pass
## directory
class Dir(IO):
pass
## file
class File(IO):
pass
| 10.357143
| 22
| 0.634483
| 20
| 145
| 4.6
| 0.55
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241379
| 145
| 13
| 23
| 11.153846
| 0.836364
| 0.234483
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.428571
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
956436b008436d983c517613525aa842ebe0363f
| 50
|
py
|
Python
|
ch15/train-project/train_schedule/models/__init__.py
|
kxen42/Learn-Python-Programming-Third-Edition
|
851ddc5e6094fadd44f31a9ad1d3876456b04372
|
[
"MIT"
] | 19
|
2021-11-05T22:54:09.000Z
|
2022-03-29T15:03:47.000Z
|
ch15/train-project/train_schedule/models/__init__.py
|
kxen42/Learn-Python-Programming-Third-Edition
|
851ddc5e6094fadd44f31a9ad1d3876456b04372
|
[
"MIT"
] | null | null | null |
ch15/train-project/train_schedule/models/__init__.py
|
kxen42/Learn-Python-Programming-Third-Edition
|
851ddc5e6094fadd44f31a9ad1d3876456b04372
|
[
"MIT"
] | 26
|
2021-11-12T17:04:50.000Z
|
2022-03-29T01:10:35.000Z
|
# train-project/train_schedule/models/__init__.py
| 25
| 49
| 0.84
| 7
| 50
| 5.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 50
| 1
| 50
| 50
| 0.770833
| 0.94
| 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
|
958b6556ee7467fa4e11a0ae79d1bc6e1f0e2fa5
| 133
|
py
|
Python
|
build/lib/core/adaload.py
|
dyphen12/ada
|
cbe4f10755df7c58f803c3d21ab5406c40302622
|
[
"MIT"
] | 2
|
2021-07-18T08:44:10.000Z
|
2022-01-19T18:40:55.000Z
|
build/lib/core/adaload.py
|
dyphen12/ada
|
cbe4f10755df7c58f803c3d21ab5406c40302622
|
[
"MIT"
] | null | null | null |
build/lib/core/adaload.py
|
dyphen12/ada
|
cbe4f10755df7c58f803c3d21ab5406c40302622
|
[
"MIT"
] | 1
|
2021-07-18T08:45:24.000Z
|
2021-07-18T08:45:24.000Z
|
import tensorflow as tf
def load_model():
model = tf.keras.models.load_model("core/ADA1.h5", compile = False)
return model
| 19
| 71
| 0.706767
| 20
| 133
| 4.6
| 0.75
| 0.195652
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018349
| 0.180451
| 133
| 6
| 72
| 22.166667
| 0.825688
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 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
|
95a2cf5443c8d0e604d8da186924f9604d346b88
| 125
|
py
|
Python
|
src/onboard/components/honeycomb/service_worker.py
|
proballstar/atlas
|
6e4eb36b7e43e750dbb281c2051439198c82f296
|
[
"MIT"
] | null | null | null |
src/onboard/components/honeycomb/service_worker.py
|
proballstar/atlas
|
6e4eb36b7e43e750dbb281c2051439198c82f296
|
[
"MIT"
] | null | null | null |
src/onboard/components/honeycomb/service_worker.py
|
proballstar/atlas
|
6e4eb36b7e43e750dbb281c2051439198c82f296
|
[
"MIT"
] | null | null | null |
import pandas as pd
service_worker = pd.read_json('./service_worker.json') # load the json file
print(serviceworker.head(4))
| 31.25
| 75
| 0.776
| 20
| 125
| 4.7
| 0.75
| 0.276596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008929
| 0.104
| 125
| 3
| 76
| 41.666667
| 0.830357
| 0.144
| 0
| 0
| 0
| 0
| 0.2
| 0.2
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
95b5e45c18971623453e6394ef203ee573ae01e7
| 337
|
py
|
Python
|
tests/test_python/test_normalizer.py
|
cyberpunk317/inverted_index
|
f49ae3ca4f0255928986c1610c5ff8ee38c5f1ff
|
[
"MIT"
] | 9
|
2021-09-03T10:02:16.000Z
|
2021-12-22T14:19:33.000Z
|
tests/test_python/test_normalizer.py
|
cyberpunk317/inverted_index
|
f49ae3ca4f0255928986c1610c5ff8ee38c5f1ff
|
[
"MIT"
] | 3
|
2021-04-19T17:13:57.000Z
|
2022-03-18T15:11:53.000Z
|
tests/test_python/test_normalizer.py
|
cyberpunk317/inverted_index
|
f49ae3ca4f0255928986c1610c5ff8ee38c5f1ff
|
[
"MIT"
] | 1
|
2021-12-11T09:47:46.000Z
|
2021-12-11T09:47:46.000Z
|
from unittest import TestCase
class TestNormalizer(TestCase):
def test_normalize(self):
raise NotImplementedError
def test_removing_stop_words(self):
raise NotImplementedError
def test_lemmatization(self):
raise NotImplementedError
def test_denoising(self):
raise NotImplementedError
| 21.0625
| 39
| 0.732938
| 33
| 337
| 7.30303
| 0.515152
| 0.116183
| 0.46473
| 0.385892
| 0.435685
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222552
| 337
| 15
| 40
| 22.466667
| 0.919847
| 0
| 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 | 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
|
95c36a5dce5fec095d545f02be7d6a5ea50e0bdd
| 318
|
py
|
Python
|
master/tests.py
|
g12mcgov/grantmcgovern.com-V2
|
1fd920c6441dee914585577c5af6f2bc20309586
|
[
"Unlicense",
"MIT"
] | 1
|
2015-07-27T22:07:30.000Z
|
2015-07-27T22:07:30.000Z
|
master/tests.py
|
g12mcgov/grantmcgovern.com-V2
|
1fd920c6441dee914585577c5af6f2bc20309586
|
[
"Unlicense",
"MIT"
] | 10
|
2020-02-11T22:43:05.000Z
|
2022-03-11T23:13:08.000Z
|
master/tests.py
|
g12mcgov/grantmcgovern.com-V2
|
1fd920c6441dee914585577c5af6f2bc20309586
|
[
"Unlicense",
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: grantmcgovern
# @Date: 2015-06-24 17:55:56
# @Email: me@grantmcgovern.com
# @Web: http://grantmcgovern.com
#
# @Last Modified by: grantmcgovern
# @Last Modified time: 2015-07-12 19:56:21
from django.test import TestCase
# Create your tests here.
| 18.705882
| 42
| 0.666667
| 46
| 318
| 4.608696
| 0.826087
| 0.150943
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110266
| 0.172956
| 318
| 16
| 43
| 19.875
| 0.695817
| 0.814465
| 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
|
95e3887a32463ed5e473427087228724869a3a4d
| 204
|
py
|
Python
|
app/api/__init__.py
|
rivendale/ethsigns
|
8ffecc264a54b00d5615c6fa36c9f661dce468b5
|
[
"MIT"
] | 1
|
2021-01-24T04:27:57.000Z
|
2021-01-24T04:27:57.000Z
|
app/api/__init__.py
|
rivendale/ethsigns
|
8ffecc264a54b00d5615c6fa36c9f661dce468b5
|
[
"MIT"
] | 19
|
2021-02-07T18:24:31.000Z
|
2021-07-02T08:03:56.000Z
|
app/api/__init__.py
|
rivendale/ethsigns
|
8ffecc264a54b00d5615c6fa36c9f661dce468b5
|
[
"MIT"
] | null | null | null |
from flask import Blueprint
from flask_restplus import Namespace
api_blueprint = Blueprint('api_blueprint', __name__, url_prefix='/api/v1')
signs_ns = Namespace("signs", description="signs operations")
| 29.142857
| 74
| 0.79902
| 26
| 204
| 5.923077
| 0.576923
| 0.116883
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005435
| 0.098039
| 204
| 6
| 75
| 34
| 0.831522
| 0
| 0
| 0
| 0
| 0
| 0.20098
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
95e3c297a4edff3d6f48fe8315f7e2ce08bdb97b
| 26
|
py
|
Python
|
data/studio21_generated/introductory/3360/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3360/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3360/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def get_chance(n, x, a):
| 13
| 24
| 0.615385
| 6
| 26
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 26
| 2
| 25
| 13
| 0.714286
| 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
|
95fec137b4a27b2d43fa36c7838ffdb91ed8493e
| 22
|
py
|
Python
|
pylama/libs/__init__.py
|
rzuckerm/pylama
|
227ddc94eb73638d423833075b1af2ac6bb308f7
|
[
"MIT"
] | 463
|
2015-01-15T08:17:42.000Z
|
2022-03-28T15:10:20.000Z
|
pylama/libs/__init__.py
|
rzuckerm/pylama
|
227ddc94eb73638d423833075b1af2ac6bb308f7
|
[
"MIT"
] | 93
|
2015-01-02T12:35:32.000Z
|
2021-12-12T22:42:33.000Z
|
pylama/libs/__init__.py
|
rzuckerm/pylama
|
227ddc94eb73638d423833075b1af2ac6bb308f7
|
[
"MIT"
] | 249
|
2015-01-07T22:49:49.000Z
|
2022-03-18T02:32:06.000Z
|
""" Support libs. """
| 11
| 21
| 0.5
| 2
| 22
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 22
| 1
| 22
| 22
| 0.611111
| 0.590909
| 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
|
25258ca3e89040e2ba2beb5b799122fe803265e2
| 96
|
py
|
Python
|
aws_lambda_builders/workflows/__init__.py
|
garnaat/aws-lambda-builders
|
0ce436cacb7e5e756c65cb4fa4d78877ada307e5
|
[
"Apache-2.0"
] | 2
|
2020-11-12T22:58:17.000Z
|
2021-03-22T16:13:34.000Z
|
aws_lambda_builders/workflows/__init__.py
|
awood45/aws-lambda-builders
|
3744cea731403fc5d5aad36c4f60d9512231fd78
|
[
"Apache-2.0"
] | null | null | null |
aws_lambda_builders/workflows/__init__.py
|
awood45/aws-lambda-builders
|
3744cea731403fc5d5aad36c4f60d9512231fd78
|
[
"Apache-2.0"
] | null | null | null |
"""
Officially supported builder workflows
"""
import aws_lambda_builders.workflows.python_pip
| 16
| 47
| 0.822917
| 11
| 96
| 6.909091
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 96
| 5
| 48
| 19.2
| 0.873563
| 0.395833
| 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
|
c26f099532f33294a8e589b422d8c4192e21e557
| 187
|
py
|
Python
|
python/pylfq/setup.py
|
stormycatcat/FastestLocklessQueue
|
26ad35f1cadd0ff30f51732761fc03a31802588f
|
[
"MIT"
] | 2
|
2021-03-09T05:45:13.000Z
|
2021-06-13T17:05:15.000Z
|
python/pylfq/setup.py
|
stormycatcat/FastestLocklessQueue
|
26ad35f1cadd0ff30f51732761fc03a31802588f
|
[
"MIT"
] | null | null | null |
python/pylfq/setup.py
|
stormycatcat/FastestLocklessQueue
|
26ad35f1cadd0ff30f51732761fc03a31802588f
|
[
"MIT"
] | 2
|
2021-04-22T10:28:02.000Z
|
2021-12-09T06:44:43.000Z
|
from distutils.core import setup, Extension
setup(name='pylfq', version='0.1.0', include_dirs = '../../src',
ext_modules=[Extension('pylfq', ['src/pylfq.c', '../../src/queue.c'])])
| 46.75
| 77
| 0.636364
| 26
| 187
| 4.5
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017857
| 0.101604
| 187
| 4
| 77
| 46.75
| 0.678571
| 0
| 0
| 0
| 0
| 0
| 0.276596
| 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
|
c28e5cf1bdc51ca9873f8a2e5792e27cda708d43
| 2,418
|
py
|
Python
|
vulture_whitelist.py
|
howbazaar/dynamoquery
|
d666565af8cf4253c7601afe90866628b4394991
|
[
"MIT"
] | 14
|
2020-09-30T19:14:31.000Z
|
2021-08-08T18:34:19.000Z
|
vulture_whitelist.py
|
howbazaar/dynamoquery
|
d666565af8cf4253c7601afe90866628b4394991
|
[
"MIT"
] | 12
|
2020-10-27T02:12:57.000Z
|
2022-03-23T10:57:52.000Z
|
vulture_whitelist.py
|
howbazaar/dynamoquery
|
d666565af8cf4253c7601afe90866628b4394991
|
[
"MIT"
] | 3
|
2020-09-29T19:25:19.000Z
|
2022-02-22T22:58:29.000Z
|
DynamoTable # unused import (dynamo_query/__init__.py:8)
DynamoRecord # unused variable (dynamo_query/__init__.py:12)
create # unused function (dynamo_query/data_table.py:119)
memo # unused variable (dynamo_query/data_table.py:137)
filter_keys # unused function (dynamo_query/data_table.py:299)
get_column # unused function (dynamo_query/data_table.py:472)
drop_duplicates # unused function (dynamo_query/data_table.py:734)
sanitize_key # unused function (dynamo_query/dictclasses/dictclass.py:127)
compute_key # unused function (dynamo_query/dictclasses/dictclass.py:131)
sanitize # unused function (dynamo_query/dictclasses/dictclass.py:351)
get_field_names # unused function (dynamo_query/dictclasses/dynamo_dictclass.py:32)
DynamoAutoscaler # unused class (dynamo_query/dynamo_autoscaler.py:17)
deregister_auto_scaling # unused function (dynamo_query/dynamo_autoscaler.py:47)
register_auto_scaling # unused function (dynamo_query/dynamo_autoscaler.py:76)
get_last_evaluated_key # unused function (dynamo_query/dynamo_query_main.py:648)
reset_start_key # unused function (dynamo_query/dynamo_query_main.py:677)
get_raw_responses # unused function (dynamo_query/dynamo_query_main.py:684)
DynamoTable # unused class (dynamo_query/dynamo_table.py:63)
delete_table # unused function (dynamo_query/dynamo_table.py:232)
invalidate_cache # unused function (dynamo_query/dynamo_table.py:546)
cached_batch_get # unused function (dynamo_query/dynamo_table.py:552)
batch_get_records # unused function (dynamo_query/dynamo_table.py:729)
batch_delete_records # unused function (dynamo_query/dynamo_table.py:747)
batch_upsert_records # unused function (dynamo_query/dynamo_table.py:762)
cached_get_record # unused function (dynamo_query/dynamo_table.py:829)
upsert_record # unused function (dynamo_query/dynamo_table.py:851)
delete_record # unused function (dynamo_query/dynamo_table.py:920)
clear_records # unused function (dynamo_query/dynamo_table.py:1131)
NE # unused variable (dynamo_query/enums.py:58)
IN # unused variable (dynamo_query/enums.py:59)
EXISTS # unused variable (dynamo_query/enums.py:65)
NOT_EXISTS # unused variable (dynamo_query/enums.py:66)
CONTAINS # unused variable (dynamo_query/enums.py:68)
default # unused function (dynamo_query/json_tools.py:40)
pluralize # unused function (dynamo_query/utils.py:91)
get_nested_item # unused function (dynamo_query/utils.py:112)
| 65.351351
| 84
| 0.819686
| 355
| 2,418
| 5.28169
| 0.278873
| 0.2288
| 0.277333
| 0.346667
| 0.7072
| 0.636267
| 0.550933
| 0.347733
| 0.1056
| 0
| 0
| 0.042688
| 0.08933
| 2,418
| 36
| 85
| 67.166667
| 0.80881
| 0.751447
| 0
| 0.055556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
c29a372404b65c5f0fab3e4095aecec40e69e41a
| 87
|
py
|
Python
|
pypressure/__init__.py
|
Harry-Lees/PyPressure
|
97dc4894c50304c1d9e61521646c6b61a4982c61
|
[
"MIT"
] | 1
|
2021-06-02T09:29:19.000Z
|
2021-06-02T09:29:19.000Z
|
pypressure/__init__.py
|
Harry-Lees/PyPressure
|
97dc4894c50304c1d9e61521646c6b61a4982c61
|
[
"MIT"
] | null | null | null |
pypressure/__init__.py
|
Harry-Lees/PyPressure
|
97dc4894c50304c1d9e61521646c6b61a4982c61
|
[
"MIT"
] | null | null | null |
from .pressure import Pressure
__author__ = 'Harry Lees'
__maintainer__ = 'Harry Lees'
| 21.75
| 30
| 0.781609
| 10
| 87
| 6
| 0.7
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 87
| 4
| 31
| 21.75
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
6c296d5d92e4518f5ffbdf6ce6de2e3df12b0cb9
| 1,261
|
py
|
Python
|
nezzle/graphics/__init__.py
|
dwgoon/nezzle
|
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
|
[
"MIT"
] | 2
|
2021-10-06T08:54:02.000Z
|
2021-10-06T16:17:18.000Z
|
nezzle/graphics/__init__.py
|
dwgoon/nezzle
|
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
|
[
"MIT"
] | null | null | null |
nezzle/graphics/__init__.py
|
dwgoon/nezzle
|
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
|
[
"MIT"
] | null | null | null |
from nezzle.graphics.baseitem import MappableGraphicsItem
from nezzle.graphics.baseitem import PainterOptionItem
from nezzle.graphics.nodes.nodefactory import NodeClassFactory
from nezzle.graphics.nodes.basenode import BaseNode
from nezzle.graphics.nodes.ellipsenode import EllipseNode
from nezzle.graphics.nodes.ellipsenode import CircleNode
from nezzle.graphics.nodes.rectanglenode import RectangleNode
from nezzle.graphics.arrows.arrowclassfactory import ArrowClassFactory
from nezzle.graphics.arrows.basearrow import Triangle
from nezzle.graphics.arrows.basearrow import Hammer
from nezzle.graphics.edges.edgefactory import EdgeClassFactory
from nezzle.graphics.edges.baseedge import BaseEdge
from nezzle.graphics.edges.straightedge import StraightEdge
from nezzle.graphics.edges.curvededge import CurvedEdge
from nezzle.graphics.edges.elbowedge import VerticalElbowEdge
from nezzle.graphics.edges.elbowedge import HorizontalElbowEdge
from nezzle.graphics.edges.selfloopedge import SelfloopEdge
from nezzle.graphics.labels.labelfactory import LabelClassFactory
from nezzle.graphics.labels.textlabel import TextLabel
from nezzle.graphics.network import Network
from nezzle.graphics.screen import GraphicsScene
from nezzle.graphics.screen import GraphicsView
| 54.826087
| 70
| 0.88184
| 149
| 1,261
| 7.463087
| 0.248322
| 0.197842
| 0.356115
| 0.144784
| 0.321942
| 0.210432
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069786
| 1,261
| 22
| 71
| 57.318182
| 0.947997
| 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
| 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
|
6c44d083debe42f0f1abdba752c164ca551384d1
| 623
|
py
|
Python
|
server/app/admin/models/models.py
|
GringePP/Reask
|
613d90d09529fa44aaf556233d07106172bbd93a
|
[
"MIT"
] | 4
|
2018-01-06T15:06:06.000Z
|
2019-02-11T07:32:11.000Z
|
server/app/admin/models/models.py
|
GringePP/Reask
|
613d90d09529fa44aaf556233d07106172bbd93a
|
[
"MIT"
] | null | null | null |
server/app/admin/models/models.py
|
GringePP/Reask
|
613d90d09529fa44aaf556233d07106172bbd93a
|
[
"MIT"
] | 1
|
2019-02-11T07:33:50.000Z
|
2019-02-11T07:33:50.000Z
|
from ...base_app import db
class UserModel(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(20), nullable=False)
email = db.Column(db.String(50), nullable=False)
password = db.Column(db.String(20), nullable=False)
class SongModel(db.Model):
__tablename__ = 'songs'
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(20), nullable=False)
artist = db.Column(db.String(50), nullable=False)
poster = db.Column(db.String(20), nullable=False)
# category = db.Column(db.String(20), nullable=False)
| 32.789474
| 57
| 0.688604
| 89
| 623
| 4.696629
| 0.337079
| 0.172249
| 0.215311
| 0.267943
| 0.677033
| 0.677033
| 0.677033
| 0.157895
| 0
| 0
| 0
| 0.026718
| 0.158909
| 623
| 18
| 58
| 34.611111
| 0.770992
| 0.081862
| 0
| 0.153846
| 0
| 0
| 0.017544
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.076923
| 0.076923
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
6c74d6381ce1732dc21ab221829300c223e18aa0
| 466
|
py
|
Python
|
scuole/states/admin.py
|
texastribune/scuole
|
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
|
[
"MIT"
] | 1
|
2019-03-12T04:30:02.000Z
|
2019-03-12T04:30:02.000Z
|
scuole/states/admin.py
|
texastribune/scuole
|
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
|
[
"MIT"
] | 616
|
2017-08-18T21:15:39.000Z
|
2022-03-25T11:17:10.000Z
|
scuole/states/admin.py
|
texastribune/scuole
|
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib import admin
from scuole.core.admin import ReadOnlyAdmin
from .models import State, StateCohorts, StateStats
@admin.register(State)
class StateAdmin(ReadOnlyAdmin):
pass
@admin.register(StateStats)
class StateStatsAdmin(ReadOnlyAdmin):
pass
@admin.register(StateCohorts)
class StateCohortsAdmin(ReadOnlyAdmin):
search_fields = ('state__name',)
| 19.416667
| 56
| 0.781116
| 51
| 466
| 6.960784
| 0.54902
| 0.109859
| 0.123944
| 0.169014
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002457
| 0.126609
| 466
| 23
| 57
| 20.26087
| 0.869779
| 0.045064
| 0
| 0.153846
| 0
| 0
| 0.024831
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.153846
| 0.307692
| 0
| 0.615385
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
66630e040c35eb0053315cbad1b210ddbc818fb4
| 53,083
|
py
|
Python
|
medium/1011-capacity-to-ship-packages-within-d-days.py
|
wanglongjiang/leetcode
|
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
|
[
"MIT"
] | 2
|
2021-03-14T11:38:26.000Z
|
2021-03-14T11:38:30.000Z
|
medium/1011-capacity-to-ship-packages-within-d-days.py
|
wanglongjiang/leetcode
|
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
|
[
"MIT"
] | null | null | null |
medium/1011-capacity-to-ship-packages-within-d-days.py
|
wanglongjiang/leetcode
|
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
|
[
"MIT"
] | 1
|
2022-01-17T19:33:23.000Z
|
2022-01-17T19:33:23.000Z
|
'''
在 D 天内送达包裹的能力
传送带上的包裹必须在 D 天内从一个港口运送到另一个港口。
传送带上的第 i 个包裹的重量为 weights[i]。每一天,我们都会按给出重量的顺序往传送带上装载包裹。我们装载的重量不会超过船的最大运载重量。
返回能在 D 天内将传送带上的所有包裹送达的船的最低运载能力。
提示:
1 <= D <= weights.length <= 50000
1 <= weights[i] <= 500
'''
from typing import List
'''
思路1,暴力回溯
暴力回溯,首先把0..n-D个包裹全部分给第0个船,剩下的每个船分配一个包裹,计算出最大重量
然后逐步减少第0个船的包裹数,递归处理剩下的包裹数。
时间复杂度:O(D^(n-D)),测试案例跑到n=700时,超时了
空间复杂度:O((n-D)!)
思路2,还是回溯
设总计重量为total,平均每船重量为avg
上面的思路1为最大化开始的船重,然后逐步给前面的船减重,
思路2是将开始的船重设置为<=avg且最接近avg的那个数,然后逐步减少后面的船重
时间、空间复杂度:估算不出来了,测试案例跑到n=10000时,超时了
思路3,二分查找
每船的重量下限up=max(low//D,max(weights))
重量上限low=sum(weights)
可以取mid=(low+up)//2,设mid为每船的重量,安装这个重量划分,如果能运送完毕,则进一步降低上限up,
如果不能运送完毕,说明mid过小,需要加大下限low
直至下限超过上限,最近的一次下限肯定是合法的解
时间复杂度:O(nlogn)
空间复杂度:O(1)
'''
class Solution:
# 思路3,二分查找
def shipWithinDays(self, weights: List[int], D: int) -> int:
up = sum(weights)
low = max(up // D, max(weights))
def canFinish(mid):
curWeight = 0
shipNum = 1
for w in weights:
if curWeight + w > mid: # 如果重量超过规定的标准重量,需要加船数量
shipNum += 1
curWeight = 0
curWeight += w
return shipNum <= D # 如果船的数量不大于D,说明可以运送完毕
while low <= up: # 二分查找
mid = (up + low) >> 1
if canFinish(mid):
up = mid - 1
else:
low = mid + 1
return low
# 思路2,回溯
def shipWithinDays2(self, weights: List[int], D: int) -> int:
n = len(weights)
if n == D:
return max(weights)
prefixSum = [0] * n # 前缀和
prefixSum[0] = weights[0]
for i in range(1, n):
prefixSum[i] = prefixSum[i - 1] + weights[i]
avg = prefixSum[n - 1] / D # 平均值
dp = [{} for _ in range(D)] # 记忆化数组
def backtrack(index, start):
if start in dp[index]:
return dp[index][start]
end = n - (D - index) # 当前为第i船,最多允许包括下标[start, end]的包裹
prefix = 0 if start == 0 else prefixSum[start - 1]
curWeight = prefixSum[end] - prefix # 当前最大船重为2个前缀和之差
if index == D - 1:
dp[index][start] = curWeight
return curWeight # 当前是最后一船,直接返回
# 找到最接近avg的值
newstart = start
if prefixSum[newstart] - prefix <= avg:
while newstart <= end and prefixSum[newstart] - prefix <= avg:
newstart += 1
newstart -= 1
curWeight = prefixSum[newstart] - prefix
nextWeight = backtrack(index + 1, newstart + 1)
maxWeight = 0
if curWeight < nextWeight and newstart < end: # 如果当前船重小于后面船重,需要尝试将当前船增重
maxWeight = nextWeight
while curWeight < nextWeight and newstart < end: # 逐步增重
curWeight = prefixSum[newstart + 1] - prefix
nextWeight = backtrack(index + 1, newstart + 2)
newstart += 1
t = max(curWeight, nextWeight)
if t > maxWeight: # 如果新的分配造成最大重量上升,不再执行
break
else:
maxWeight = t
else:
maxWeight = curWeight
dp[index][start] = maxWeight
return maxWeight
return backtrack(0, 0)
# 思路1,暴力回溯
def shipWithinDays1(self, weights: List[int], D: int) -> int:
n = len(weights)
if n == D:
return max(weights)
prefixSum = [0] * n # 前缀和
prefixSum[0] = weights[0]
for i in range(1, n):
prefixSum[i] = prefixSum[i - 1] + weights[i]
dp = [{} for _ in range(D)] # 记忆化数组
def backtrack(index, start):
if start in dp[index]:
return dp[index][start]
end = n - (D - index) # 当前为第i船,最多允许包括下标[start, end]的包裹
curWeight = prefixSum[end] if start == 0 else prefixSum[end] - prefixSum[start - 1] # 当前最大船重为2个前缀和之差
if index == D - 1:
dp[index][start] = curWeight
return curWeight # 当前是最后一船,直接返回
maxWeight = float('inf')
for i in range(end + 1, start, -1): # 后面的船队包含的包裹数量依次增加,计算出后面的船队的最大船重
nextWeight = backtrack(index + 1, i)
maxWeight = min(maxWeight, max(nextWeight, curWeight))
if nextWeight < curWeight: # 后面的最大船重小于当前船,当前船可以减少一个包裹给后面的船
curWeight -= weights[i - 1]
else: # 一旦后面的船队的最大船重已经大于当前船,不需要继续减少当前船的船重了
break
dp[index][start] = maxWeight
return maxWeight
return backtrack(0, 0)
s = Solution()
'''
print(s.shipWithinDays([215,253,422,450,395,347,12,476,436,264,322,225,157,200,468,120,262,170,111,57,152,136,388,26,296,105,345,381,256,426,439,376,297,2,378,242,280,262,364,455,85,318,27,299,123,302,74,343,338,210,280,358,315,406,88,34,96,226,354,385,161,156,113,356,368,89,287,240,361,96,84,135,231,398,92,271,417,243,308,84,354,472,316,457,194,471,108,407,463,86,215,343,109,456,223,59,26,286,128,256,287,207,417,306,88,413,465,394,324,238,362,296,87,280,426,207,78,237,65,332,291,384,220,386,206,58,74,215,5,338,353,182,217,293,405,224,334,130,46,31,307,375,233,337,448,71,239,458,66,318,2,442,499,76,201,17,271,50,253,106,28,207,87,183,83,145,102,231,88,269,439,243,134,475,460,290,417,319,44,24,50,157,51,195,7,394,131,81,492,289,244,79,339,103,308,10,329,111,260,45,127,15,257,272,93,389,7,144,370,403,78,156,235,355,284,390,371,11,137,212,22,338,407,67,191,445,386,27,176,208,281,9,473,375,487,392,301,109,359,192,476,256,372,355,111,126,374,431,464,70,67,477,496,421,131,113,239,138,236,479,422,254,11,95,460,9,357,158,229,103,63,195,26,103,271,199,364,84,404,74,421,71,117,452,314,451,303,232,151,429,103,96,473,111,393,4,395,257,360,486,289,68,367,284,20,317,385,234,238,44,46,44,366,326,164,41,232,406,299,219,179,478,234,168,81,347,103,110,147,232,78,341,218,54,95,432,415,217,296,387,175,423,396,468,40,144,443,77,326,472,75,367,431,65,60,295,208,8,477,191,282,392,29,41,302,311,264,445,389,304,299,146,273,179,399,194,74,292,134,175,209,268,368,446,488,102,292,215,48,404,232,255,202,331,453,188,295,203,404,277,240,148,490,464,195,78,354,138,252,42,181,235,148,143,253,491,377,402,135,54,344,242,347,4,194,289,128,158,212,200,297,347,271,235,162,84,433,323,473,473,298,35,449,21,7,71,378,158,187,284,399,459,289,54,122,188,247,432,176,457,310,340,391,11,35,412,310,86,303,75,128,242,168,385,177,490,367,486,431,3,188,276,495,394,189,353,402,406,483,210,136,179,187,230,156,262,338,80,422,450,34,276,272,469,47,210,241,141,175,279,481,151,186,439,283,299,478,197,186,294,364,422,156,203,61,26,334,411,286,297,106,293,213,308,63,230,366,497,65,202,15,171,111,125,284,71,119,423,371,4,337,305,77,20,373,453,295,77,192,342,287,225,423,446,264,118,372,426,93,375,350,25,243,97,193,269,406,34,388,197,120,381,498,361,258,393,229,58,34,382,126,275,151,375,291,401,416,410,208,284,493,498,411,415,359,441,320,440,313,419,329,61,286,17,166,32,464,39,106,253,452,53,181,443,84,399,448,490,391,141,148,276,420,204,72,187,40,387,462,456,236,195,458,184,12,495,67,374,254,308,288,142,279,10,180,112,209,198,410,414,291,74,337,122,68,452,41,421,45,191,469,183,483,309,83,96,86,447,180,457,332,400,493,345,198,58,303,489,474,447,187,208,123,209,462,299,149,175,395,186,66,70,444,96,406,308,397,383,224,245,225,139,454,497,87,475,186,283,286,35,115,382,309,120,164,302,284,498,433,255,317,356,216,447,300,352,61,495,111,41,339,493,102,59,369,269,433,414,77,396,357,295,285,447,151,222,29,498,361,47,86,58,411,453,238,314,407,274,225,483,449,456,230,140,476,433,216,475,103,136,281,50,101,166,427,327,225,255,474,356,259,134,251,67,101,168,24,23,75,437,217,130,352,346,9,377,294,250,23,423,118,321,37,162,157,455,45,477,292,438,415,244,405,220,120,415,308,290,278,319,243,296,346,499,454,218,48,332,84,68,306,14,280,207,422,477,285,27,399,89,255,143,116,222,140,36,162,84,175,89,176,237,268,24,266,374,457,96,347,182,471,157,82,255,215,188,2,454,250,244,286,155,14,386,186,379,266,102,43,176,266,51,299,249,396,295,111,459,437,349,339,294,222,309,398,54,455,407,83,173,291,148,213,196,277,168,88,438,181,82,437,342,137,459,134,371,293,88,416,247,128,303,3,80,45,246,422,179,342,64,480,483,132,174,136,390,313,43,482,403,312,485,431,119,193,362,133,216,98,487,345,293,384,288,452,244,260,434,30,206,474,164,418,19,477,238,455,239,305,98,96,414,219,342,386,305,237,58,321,51,224,68,79,1,416,495,200,426,435,352,223,316,238,250,27,305,3,477,23,223,185,226,231,20,39,453,161,46,409,301,469,336,141,24,425,412,196,301,401,103,259,492,176,20,406,334,117,277,4,414,219,64,201,320,438,152,267,238,12,293,425,486,213,424,423,206,123,120,260,253,458,226,171,463,485,390,343,192,487,284,422,413,439,492,257,85,337,370,267,410,123,71,318,178,241,393,493,126,229,207,61,135,155,139,403,347,314,127,415,480,302,321,449,66,172,374,474,428,409,26,431,92,78,27,311,400,162,373,332,97,443,13,98,235,141,475,76,134,360,246,160,451,8,276,107,322,420,439,399,390,424,389,16,28,482,184,96,191,382,295,215,437,458,120,139,145,307,412,384,304,326,295,278,392,71,61,394,267,33,429,33,133,240,162,37,258,398,473,165,118,395,328,265,136,149,238,324,162,365,132,301,67,264,406,215,168,462,96,301,200,286,102,170,159,329,65,90,79,474,239,239,150,53,59,361,385,249,310,450,341,415,431,398,69,318,439,317,137,218,30,148,22,428,17,468,423,177,358,491,182,463,412,357,461,306,323,336,53,400,24,436,210,298,115,424,325,405,99,263,69,393,342,124,206,165,18,386,306,254,42,97,127,123,78,47,34,296,347,428,411,92,276,102,178,217,170,470,3,247,137,49,335,141,309,272,33,211,310,136,102,151,376,391,150,8,368,253,493,478,336,160,486,140,183,361,123,36,107,304,396,303,170,24,231,489,293,280,222,325,232,423,105,292,344,77,220,374,407,84,34,268,244,288,17,72,20,283,227,163,78,474,462,74,88,62,346,482,456,316,266,44,96,322,266,157,42,283,328,343,153,375,34,215,50,336,189,493,103,454,418,159,256,184,143,206,317,177,350,446,105,80,123,63,266,245,322,99,151,42,158,13,189,278,204,41,334,161,12,281,449,353,198,118,123,467,155,185,52,464,390,411,296,297,279,477,499,268,307,441,218,416,10,67,411,85,192,244,256,482,413,407,400,149,233,215,33,226,444,225,73,324,63,288,162,170,413,449,330,232,443,175,471,63,273,73,155,361,422,340,449,79,272,412,210,381,38,107,474,305,260,354,213,488,330,118,418,83,277,20,291,39,393,326,30,259,270,436,490,137,395,63,400,28,149,261,299,364,89,79,204,17,330,350,210,472,300,451,352,57,120,72,230,276,473,464,196,38,29,2,207,65,402,467,201,10,185,35,237,245,282,136,9,256,310,447,6,344,368,453,288,343,365,112,184,412,200,439,464,106,94,101,38,69,475,447,196,204,259,389,146,21,222,249,252,292,165,264,205,176,218,67,115,317,36,308,347,244,33,454,134,362,274,313,87,466,370,391,222,246,171,375,89,286,52,291,73,220,97,238,365,305,155,14,303,455,61,388,6,277,352,122,46,203,60,140,335,455,80,264,94,280,326,330,466,75,244,392,413,469,232,479,420,454,482,313,322,214,305,161,446,350,205,122,373,287,24,280,297,192,288,120,368,163,474,261,317,492,11,270,362,274,290,17,381,259,367,423,40,32,418,58,424,24,293,386,317,92,146,444,37,101,202,221,129,58,217,400,195,245,292,128,282,279,257,339,488,17,182,195,127,39,363,443,349,233,47,174,109,17,79,16,99,55,347,275,371,93,358,119,355,459,306,122,488,368,371,34,358,91,424,482,421,47,461,76,304,379,7,90,2,407,390,288,320,497,89,448,52,20,18,443,481,13,244,401,65,441,91,472,110,473,191,30,337,242,409,486,182,329,153,27,290,468,363,481,71,363,234,354,483,320,4,26,170,495,39,448,412,271,105,239,124,67,157,469,415,246,256,416,285,15,490,480,431,206,250,226,24,97,345,464,105,456,363,467,464,153,301,351,325,49,390,366,452,481,10,398,276,98,253,462,411,222,349,33,95,244,92,363,91,76,487,398,161,120,226,407,405,324,161,418,440,163,84,150,130,80,356,470,435,454,133,229,475,213,262,22,378,402,344,297,125,283,90,369,326,476,314,335,249,175,327,374,441,326,265,41,471,431,17,331,356,415,358,59,293,460,341,148,450,205,14,143,113,146,212,103,419,157,205,368,286,122,100,130,305,192,257,325,218,450,296,11,239,248,258,146,110,79,351,418,57,272,98,389,451,365,500,475,361,398,410,405,378,206,374,134,39,415,198,33,267,394,105,273,489,369,68,13,129,55,142,208,90,423,453,239,471,441,455,434,390,135,493,114,36,469,407,186,251,251,98,441,91,86,105,174,36,238,468,417,254,318,129,123,278,162,262,321,430,101,47,17,421,129,462,332,420,365,162,263,166,134,328,50,393,34,355,56,46,387,75,224,489,158,221,153,191,490,65,36,331,489,262,437,206,194,86,398,458,110,416,243,363,262,124,359,209,18,115,202,59,101,196,72,459,31,144,456,423,166,14,179,390,217,476,101,409,348,160,36,191,422,92,308,374,174,259,152,95,362,137,68,141,223,187,68,299,119,68,380,137,158,470,302,375,258,171,485,39,146,236,386,50,435,382,22,239,122,91,329,359,59,165,238,482,81,476,485,185,300,259,263,154,390,168,166,399,459,133,302,219,345,283,273,135,292,130,155,166,218,146,299,134,80,212,253,193,236,12,462,241,449,29,39,132,135,116,185,333,208,40,395,293,391,159,119,63,465,424,245,8,307,464,189,251,485,217,444,98,463,114,86,412,170,460,475,65,291,234,257,437,273,99,392,33,26,162,70,104,70,409,39,132,84,15,391,338,391,133,411,190,342,466,232,349,224,234,251,116,233,491,186,135,3,395,125,420,145,163,446,44,488,160,138,206,225,169,113,352,157,354,326,240,333,404,117,412,422,226,407,458,102,46,90,460,457,262,62,93,261,131,181,94,346,13,56,307,435,217,148,88,163,302,78,312,229,488,467,293,328,185,364,329,271,15,119,251,239,283,36,460,256,285,493,499,176,205,447,81,164,127,435,266,177,216,142,458,248,23,245,325,446,309,93,67,185,442,456,364,349,134,154,114,472,445,345,14,146,226,14,310,78,464,242,2,283,348,98,167,48,496,47,202,229,72,434,19,495,88,397,464,328,215,468,17,52,123,441,419,205,150,317,190,129,494,453,269,374,307,42,141,221,24,17,434,500,109,396,118,170,172,418,345,410,239,359,395,185,175,478,382,228,129,409,171,247,11,61,57,337,336,31,202,85,441,32,45,71,329,65,426,24,174,200,385,210,21,222,359,82,266,335,239,291,57,21,295,234,39,265,424,240,379,376,70,402,129,323,265,178,158,55,237,383,178,346,135,465,217,373,302,38,295,440,151,211,412,421,49,57,72,277,338,116,220,457,259,443,235,98,316,21,78,237,34,42,409,236,328,261,279,192,334,152,298,181,177,286,85,45,69,252,248,173,297,172,107,34,451,496,27,365,165,121,232,452,182,282,342,219,238,320,8,87,341,313,295,291,369,122,480,242,168,163,354,290,287,203,125,200,205,290,210,389,253,345,92,115,399,417,333,130,7,329,83,295,459,455,171,380,296,234,149,35,468,327,214,139,35,444,57,350,1,108,3,305,154,230,343,230,359,421,490,85,334,461,64,27,114,429,269,102,392,283,5,180,83,79,249,52,285,360,435,408,120,62,282,305,130,210,500,481,269,101,234,76,260,234,67,3,380,59,321,57,123,260,259,421,473,375,349,377,146,285,372,114,73,152,55,90,12,199,131,396,414,353,296,431,347,222,225,168,448,109,292,447,484,416,87,34,324,492,152,287,312,198,199,481,72,94,47,218,344,304,200,252,304,114,76,335,121,4,185,233,34,464,52,190,328,206,254,44,330,352,50,464,45,71,388,24,69,481,293,227,431,41,288,144,473,87,166,51,237,53,151,358,262,151,175,301,310,79,491,434,110,181,85,223,313,201,235,339,273,48,89,416,432,255,442,200,152,88,283,67,420,15,112,491,185,82,352,304,254,169,378,413,388,407,247,321,490,222,325,478,451,11,51,186,455,265,186,304,145,49,70,132,220,300,158,240,386,205,176,76,144,115,495,59,284,456,411,80,330,276,96,302,79,307,183,27,116,275,496,477,245,39,351,172,495,475,235,278,449,209,362,132,364,177,210,150,287,94,229,354,152,491,286,346,37,303,234,69,496,381,169,138,327,469,294,201,184,381,414,76,30,345,94,88,31,219,424,245,420,164,2,137,28,373,11,482,397,243,263,419,486,256,428,231,395,375,124,55,376,484,88,455,222,109,104,388,372,274,108,96,439,302,320,133,223,228,349,218,80,447,87,10,250,450,69,153,317,341,140,44,425,14,207,369,132,413,376,377,231,481,42,344,121,116,457,116,192,75,434,399,97,192,164,248,20,389,108,330,302,248,418,114,465,306,157,296,500,470,447,33,257,80,59,372,149,355,209,212,295,342,153,380,197,440,420,475,69,321,58,76,369,323,390,24,491,277,473,387,383,59,180,134,484,444,133,500,51,10,102,232,32,34,410,337,366,117,174,43,207,216,162,307,338,362,93,338,284,268,392,86,147,64,223,276,298,371,426,348,199,353,194,117,115,457,230,318,90,251,74,498,365,384,192,201,325,357,310,81,371,60,172,66,406,329,420,489,210,195,389,197,137,337,140,397,249,33,276,324,240,484,49,278,164,340,348,36,375,193,149,95,311,300,223,53,59,55,328,491,333,235,215,102,134,404,32,302,365,322,260,262,380,50,246,74,125,160,87,83,499,88,86,102,287,177,397,157,471,101,438,173,138,140,379,487,313,44,331,247,359,426,450,184,183,144,121,450,297,305,79,98,125,332,46,405,132,409,500,110,156,39,294,163,321,168,281,420,190,217,315,241,424,283,102,442,52,366,250,106,351,230,106,293,277,229,260,377,488,290,278,38,152,313,481,14,330,441,313,94,258,9,198,470,91,452,257,141,315,289,186,311,232,407,68,365,196,457,180,245,185,387,142,315,307,424,421,285,349,431,195,459,48,30,448,164,192,89,70,4,372,292,364,116,354,364,75,93,217,110,462,405,246,225,244,336,295,171,336,480,375,240,208,234,108,287,99,2,63,167,82,147,339,23,80,129,83,418,277,49,32,315,187,341,500,210,296,397,302,434,445,491,343,106,211,188,182,156,265,413,333,164,327,158,381,270,278,94,254,32,269,334,245,257,42,41,261,208,171,351,151,198,317,475,305,388,496,162,306,337,285,499,188,70,19,322,45,261,218,32,367,274,280,230,369,398,59,142,176,102,176,452,46,309,143,366,41,406,388,209,397,191,51,98,146,197,109,338,208,381,25,250,23,56,304,183,423,372,366,451,353,269,227,354,179,313,331,82,16,32,205,372,406,313,184,105,199,287,229,26,392,53,154,112,101,74,75,32,499,498,388,96,476,39,324,277,479,253,237,495,81,323,129,300,285,327,170,352,89,246,500,102,127,297,42,438,77,381,364,142,301,125,300,22,470,270,324,367,293,198,221,83,8,398,28,31,251,342,151,116,106,353,141,155,404,114,3,93,79,96,204,420,346,487,234,291,46,145,26,218,65,362,180,56,158,205,68,379,182,161,447,180,253,212,412,64,215,263,327,260,284,436,333,370,77,186,330,213,152,45,230,409,391,83,321,461,209,340,363,83,24,167,312,76,282,92,153,489,157,248,125,275,295,431,289,440,18,109,141,388,72,152,268,240,468,12,180,154,143,16,372,11,377,171,72,320,154,411,128,322,489,165,265,419,148,431,295,398,93,188,118,134,67,88,389,396,111,6,277,456,420,344,115,388,279,366,270,201,323,331,466,56,335,343,208,442,27,207,175,81,255,416,425,225,100,208,432,499,156,211,233,346,430,224,112,25,316,290,306,422,171,220,462,270,35,408,273,402,85,31,410,480,335,92,254,296,487,109,201,87,292,77,463,232,311,157,188,226,3,374,57,7,194,72,500,152,230,238,296,310,33,388,335,331,465,168,398,339,364,401,468,104,253,395,107,266,226,465,14,63,468,134,465,48,174,301,77,322,198,293,481,43,263,189,406,274,153,224,388,331,204,130,394,264,377,174,122,485,187,86,78,465,108,182,224,38,445,54,176,449,225,191,81,323,255,126,319,314,72,277,492,10,22,439,186,345,127,104,378,411,434,223,281,251,473,339,14,464,6,27,53,444,483,358,31,96,361,63,227,290,441,262,194,310,282,313,64,34,220,199,105,478,116,181,370,417,397,304,69,186,277,332,348,207,454,349,355,474,390,169,205,102,152,11,451,242,488,278,89,75,6,419,326,338,352,199,73,491,8,369,471,320,487,458,118,350,444,84,169,111,101,146,349,19,13,224,10,351,293,204,235,333,263,446,70,401,14,188,342,114,368,363,203,399,111,128,429,42,380,256,489,349,247,473,351,475,41,50,355,136,128,102,316,43,290,170,368,297,179,59,105,112,171,145,101,238,409,446,419,450,474,60,48,219,218,75,68,16,126,111,94,57,329,217,103,377,276,393,252,405,141,209,155,179,472,19,58,9,389,237,116,302,343,256,133,425,264,37,243,266,71,358,452,358,248,87,229,167,168,382,150,13,114,152,75,43,311,73,120,324,231,276,166,471,130,232,213,351,460,304,308,371,77,224,44,47,46,294,356,277,97,438,470,402,406,399,445,306,92,307,493,464,340,287,19,203,103,16,98,126,367,235,311,277,138,147,226,109,410,293,194,460,442,267,381,399,43,334,118,402,500,246,105,312,179,422,426,360,110,105,42,197,487,215,297,299,92,369,470,459,500,85,274,43,272,320,50,188,35,437,44,142,146,145,482,144,376,473,15,457,292,202,488,184,138,302,13,109,58,68,69,29,280,488,261,166,497,493,129,361,133,93,421,243,134,300,30,84,144,181,159,15,135,403,152,175,83,478,83,355,417,192,230,372,143,412,106,14,36,34,290,491,317,177,341,23,377,136,308,77,234,405,425,388,41,9,363,439,138,294,91,294,54,271,349,211,204,420,440,478,297,116,250,232,247,149,230,60,246,283,232,373,462,389,385,110,178,39,416,131,440,342,230,193,434,415,290,229,95,69,186,498,84,62,244,246,260,446,118,277,241,459,255,459,332,194,295,160,136,373,67,299,448,283,274,68,104,279,446,301,308,45,185,22,214,44,88,373,415,110,124,118,174,231,387,300,449,307,172,323,153,379,136,151,138,292,122,356,149,220,456,484,256,342,147,470,330,394,87,467,308,175,500,388,413,488,242,298,335,200,334,373,416,330,368,84,134,401,43,243,291,344,328,200,206,339,87,55,480,181,207,346,460,456,246,378,91,373,392,107,432,213,387,40,269,224,254,185,285,122,494,111,452,421,318,296,318,437,153,412,352,132,422,245,125,34,3,260,411,22,167,209,264,458,359,339,325,363,38,438,14,448,88,235,187,254,63,84,377,366,429,113,315,435,468,156,77,499,150,498,385,423,473,440,257,340,408,7,219,191,340,404,461,477,52,272,285,47,218,137,433,112,476,311,400,450,151,448,396,137,95,113,126,212,137,358,285,50,336,146,19,326,269,401,122,311,463,141,336,169,487,193,468,134,177,189,411,478,305,172,12,184,55,484,133,34,263,129,239,80,218,386,469,66,403,467,166,434,155,90,190,255,474,466,329,161,416,419,109,174,233,492,35,62,204,407,101,272,348,360,203,207,54,222,302,466,444,41,375,492,398,75,130,233,44,44,29,71,189,389,224,482,43,252,20,193,476,490,161,434,150,240,194,234,405,479,229,190,168,404,287,495,379,252,325,415,144,313,2,494,193,223,478,222,295,221,467,296,11,265,466,497,299,219,178,45,142,415,110,35,53,54,302,346,187,414,317,390,230,131,210,401,119,250,198,163,226,329,80,335,23,53,62,383,207,171,241,184,41,60,129,315,97,69,82,445,68,404,116,41,450,193,312,13,15,37,269,240,311,350,448,134,258,33,244,90,280,51,491,163,218,369,350,209,271,52,381,365,488,2,309,316,145,159,409,28,293,140,334,381,446,308,58,458,155,314,348,385,448,496,170,491,17,35,302,98,363,136,426,173,390,160,49,15,58,173,287,236,414,128,420,299,31,81,110,210,238,106,483,421,482,380,372,419,351,384,484,419,386,476,46,333,218,163,450,127,169,284,108,380,321,20,294,164,295,291,285,82,208,419,443,233,178,181,156,335,99,358,313,253,451,131,351,377,161,54,54,307,210,311,195,161,38,340,321,26,345,129,225,302,299,276,310,53,245,306,386,60,206,108,171,199,454,456,223,218,478,157,160,135,6,490,493,305,301,12,495,128,341,7,420,35,229,177,140,369,325,492,379,9,146,71,312,229,187,72,89,491,409,317,213,75,36,198,280,126,91,457,415,135,292,138,158,404,301,139,467,93,132,389,118,62,173,201,71,32,139,489,93,252,390,264,479,420,200,346,166,23,295,269,113,137,4,217,297,69,176,241,461,282,306,27,55,263,106,84,372,399,153,458,332,109,130,68,344,344,378,166,114,388,337,22,321,228,171,296,475,275,97,11,177,191,237,69,478,124,341,171,452,86,189,495,261,466,248,213,303,294,479,346,333,326,238,488,188,243,417,263,303,448,124,73,183,364,55,447,19,18,19,343,162,493,315,8,368,308,200,245,185,255,370,62,449,4,84,185,197,63,228,483,37,118,221,48,444,358,91,330,311,192,422,398,478,393,312,498,141,294,98,222,136,20,223,63,288,26,237,303,396,190,38,138,153,108,156,31,94,307,405,181,41,6,72,222,52,116,66,388,329,273,63,219,270,342,494,184,157,368,452,9,33,402,230,454,12,371,90,106,371,105,230,360,361,129,117,90,136,216,103,10,399,239,142,8,278,372,80,237,9,31,150,431,69,310,128,299,17,194,358,217,50,139,172,371,492,435,471,147,111,473,271,140,143,314,235,241,92,427,248,271,267,354,361,398,391,207,96,403,448,468,316,101,340,346,329,327,21,374,328,339,364,53,264,487,69,125,486,327,389,465,422,280,498,109,327,396,387,303,467,64,318,212,449,60,216,221,373,251,472,314,271,236,184,382,328,474,290,372,292,409,32,148,498,226,241,92,391,123,370,304,384,149,401,3,383,485,406,260,162,83,477,205,456,105,33,55,322,313,240,408,316,231,125,163,345,61,5,92,350,431,254,134,155,362,99,23,124,381,498,391,26,31,168,349,312,107,337,348,98,105,402,488,402,170,164,295,298,83,468,132,315,22,393,451,180,388,375,103,348,417,112,42,316,460,14,325,218,396,87,462,401,56,289,404,242,396,498,418,405,474,200,408,161,330,226,185,272,158,38,423,393,406,397,386,304,153,238,373,478,494,91,255,362,88,470,456,453,71,414,118,258,453,196,144,495,458,142,406,390,100,199,207,341,347,160,306,407,346,49,426,364,112,342,490,469,440,314,289,209,150,116,58,298,464,409,285,466,134,487,117,18,34,50,188,31,473,89,166,495,279,157,490,341,83,75,60,266,321,376,437,37,318,488,426,480,327,373,246,260,107,3,47,169,441,451,441,267,98,437,127,238,349,188,463,215,57,422,302,190,245,97,158,386,434,35,135,360,487,443,7,108,291,162,494,297,75,78,370,253,248,211,187,144,19,381,161,324,336,391,285,272,470,207,352,149,74,472,464,98,419,307,416,222,288,322,41,160,42,12,164,386,54,291,332,323,341,244,258,284,168,311,496,448,47,344,305,487,142,199,373,67,399,105,166,390,350,485,168,182,10,284,365,29,172,61,30,301,495,310,176,209,191,312,395,70,317,427,159,279,106,484,490,442,368,6,348,29,411,154,331,365,141,410,83,346,491,17,491,473,226,429,294,157,419,60,35,331,115,149,105,38,91,192,400,455,349,345,398,146,381,137,159,283,329,467,265,434,158,16,193,463,5,283,92,135,10,191,387,209,432,344,331,434,8,350,98,190,290,186,404,353,167,182,435,67,181,469,500,12,81,405,243,308,276,148,75,23,87,31,471,118,459,490,50,197,101,378,496,56,103,293,363,50,225,110,487,453,309,26,458,99,144,496,321,306,271,302,465,494,79,250,467,434,349,398,189,498,378,112,482,292,344,327,222,378,360,216,323,485,378,161,369,50,464,382,479,323,207,495,336,99,104,119,376,103,4,152,356,210,376,261,77,370,254,67,209,20,186,16,432,264,27,487,281,82,280,481,66,179,162,386,280,422,44,186,308,43,43,281,127,267,6,80,16,314,136,473,388,376,117,458,141,41,76,227,496,257,288,431,265,28,315,355,235,335,50,300,45,281,194,500,315,87,232,409,159,101,466,97,84,210,365,387,174,256,189,189,104,270,168,216,320,500,227,107,119,202,27,56,215,21,481,101,31,5,443,340,458,322,33,324,60,51,252,170,411,177,38,373,412,293,401,86,224,190,32,204,43,376,233,122,120,12,437,288,95,310,445,446,146,85,287,229,204,202,492,159,421,265,136,275,76,171,105,371,447,118,388,53,159,56,42,170,22,101,233,226,223,168,444,198,353,194,318,48,380,11,436,175,247,311,314,252,392,38,394,318,7,405,329,87,484,127,417,265,128,492,353,354,155,497,140,24,465,482,474,125,297,191,228,484,329,287,105,295,37,404,32,395,432,389,287,275,424,63,51,13,38,497,281,448,236,304,483,400,174,376,281,437,454,348,461,436,243,290,307,496,10,360,297,271,184,104,72,250,141,350,154,304,293,153,406,112,193,245,31,155,202,476,197,219,75,232,498,118,402,414,398,7,355,23,351,48,409,478,282,215,483,215,129,314,347,475,271,271,187,129,99,380,87,242,333,295,480,366,211,115,177,133,341,361,444,24,221,308,66,321,288,90,172,170,288,441,63,359,232,135,344,87,339,95,476,43,189,193,174,347,112,33,256,163,48,461,422,291,480,351,211,135,411,156,174,352,423,471,154,73,322,442,46,343,287,156,346,98,166,114,472,169,45,478,160,474,352,463,480,180,86,251,140,159,461,88,160,375,419,335,117,322,119,12,8,29,104,24,31,195,350,373,218,242,195,74,75,188,24,12,414,279,409,158,486,341,364,318,310,130,387,217,353,360,329,19,418,418,121,22,237,410,351,474,88,329,89,171,455,332,348,467,369,53,12,431,380,310,355,210,425,102,259,494,401,149,283,353,393,193,238,174,287,144,364,137,359,283,387,307,351,54,444,11,363,265,79,58,370,28,47,408,283,164,155,9,329,85,306,369,20,490,400,288,489,464,50,155,30,434,34,469,180,26,472,83,22,459,187,236,193,309,158,257,194,429,304,386,58,210,48,468,379,373,309,489,36,214,336,87,289,480,277,481,228,201,313,480,121,344,275,363,403,273,66,80,437,444,401,405,123,310,407,96,6,383,255,103,207,270,362,133,12,129,4,495,353,234,390,136,249,410,339,473,286,282,274,29,145,281,350,483,408,364,294,219,142,175,393,157,74,213,416,385,264,27,251,44,318,33,28,454,357,103,83,225,358,498,191,369,53,29,363,159,361,188,434,412,401,445,372,236,373,278,26,168,220,368,446,407,180,435,41,330,244,359,92,268,249,284,175,155,177,363,89,337,338,419,461,315,142,169,147,186,117,281,189,313,444,158,54,324,153,22,315,440,5,428,41,417,13,228,340,347,345,347,443,161,92,64,173,13,458,428,310,277,305,426,256,84,372,272,66,119,343,488,241,249,185,360,482,384,349,271,389,245,257,165,65,415,54,383,86,449,274,52,13,8,349,126,47,198,289,275,278,437,361,168,343,120,250,206,47,321,53,475,426,374,366,194,143,156,397,372,218,127,295,108,228,40,301,228,459,121,142,237,443,433,224,307,334,457,447,110,360,392,261,230,252,252,267,60,74,219,363,368,411,447,192,145,472,174,294,156,450,163,495,105,424,379,422,243,369,273,84,4,306,270,26,248,62,125,160,433,373,417,30,438,468,266,86,353,200,179,183,370,434,63,480,143,353,152,137,222,340,10,33,413,348,198,251,311,132,485,266,325,288,64,133,214,209,499,407,94,168,58,396,187,227,498,410,355,170,122,272,32,303,230,91,312,107,56,400,477,94,454,444,170,207,26,204,160,182,162,349,234,368,228,97,70,443,186,188,322,403,19,352,179,414,205,109,93,421,301,74,301,205,290,378,498,375,338,80,457,132,227,131,89,85,223,79,203,120,497,262,35,177,430,44,305,390,25,119,453,112,248,263,231,16,444,500,168,251,116,35,27,478,227,425,325,406,49,112,354,101,430,136,370,435,388,371,229,198,348,302,259,267,433,397,164,227,172,254,224,235,489,239,28,268,108,88,220,303,181,39,268,446,70,71,235,297,3,168,439,207,113,252,3,414,384,160,406,94,447,497,347,415,16,500,84,62,173,491,477,285,404,5,264,68,399,290,395,248,457,156,75,379,268,135,169,470,301,150,75,142,375,60,172,212,37,220,385,341,459,38,321,258,108,199,150,293,439,385,141,19,353,489,174,260,469,282,49,386,229,129,191,202,402,407,195,205,488,265,481,356,87,489,270,500,291,314,114,43,77,180,493,242,100,118,171,121,125,446,28,78,155,496,172,90,268,7,348,314,285,190,159,283,46,401,206,167,424,177,73,10,54,108,323,273,21,431,450,366,83,149,397,494,223,275,24,314,351,375,499,463,205,215,420,302,79,184,240,253,160,121,166,136,488,420,368,9,264,240,152,472,47,117,216,383,218,290,310,351,281,291,273,133,71,153,278,458,443,272,329,320,313,88,241,435,369,72,127,60,445,266,179,230,342,74,114,52,234,134,14,248,317,355,141,363,248,495,167,218,492,141,219,23,197,116,154,494,436,428,68,188,144,52,381,300,314,370,137,457,221,206,213,341,251,3,260,81,42,109,266,214,92,257,252,138,83,460,442,65,334,329,80,469,486,370,369,66,465,283,43,86,315,298,217,90,292,12,500,283,219,71,363,75,490,66,27,129,176,373,200,328,61,230,285,453,294,56,184,288,195,432,443,88,198,7,300,448,51,321,183,390,30,217,39,371,431,179,32,265,26,65,28,500,423,411,485,498,496,143,160,239,242,1,294,13,204,88,62,290,164,206,420,157,115,144,305,444,1,420,448,217,67,418,126,52,267,300,355,167,240,478,427,174,240,6,39,384,464,349,345,72,403,288,167,52,99,127,85,165,242,14,430,393,234,475,391,8,86,314,16,488,451,293,225,466,288,404,342,118,62,134,211,126,284,418,357,155,341,263,135,219,29,248,366,142,108,296,174,373,406,492,370,374,228,248,448,289,134,366,347,8,315,331,427,297,220,108,409,247,289,338,388,456,430,98,320,222,63,294,223,498,97,446,399,251,403,424,242,273,194,320,10,203,393,461,293,375,274,454,207,483,191,458,482,258,42,392,217,291,257,276,498,43,263,240,158,145,392,444,486,425,121,462,164,66,358,143,366,179,146,236,259,127,156,494,487,369,396,451,52,216,93,90,352,404,306,331,252,228,336,188,204,273,74,281,208,398,210,237,260,98,329,131,101,391,162,378,491,143,176,450,433,422,20,180,316,453,380,462,195,386,170,216,340,134,381,88,362,301,467,196,385,394,362,262,274,488,351,367,236,94,106,225,404,100,444,419,278,451,139,445,245,17,70,273,227,119,91,279,67,293,119,162,41,293,93,301,189,229,355,247,488,265,51,24,178,162,311,374,466,81,46,364,282,60,485,498,256,380,34,375,489,241,293,241,346,446,226,185,322,254,304,180,118,204,90,391,94,4,144,113,429,431,262,20,84,87,489,159,323,313,52,290,306,257,177,116,254,362,114,181,22,435,456,82,311,423,315,119,404,358,311,236,310,214,261,139,245,27,272,440,289,94,125,486,306,146,171,372,104,98,27,245,376,317,246,143,213,219,6,287,176,253,281,280,409,140,66,100,380,102,401,10,228,232,179,286,63,35,16,356,316,11,43,277,300,191,310,329,470,127,316,12,123,80,85,140,30,315,77,16,453,42,297,24,226,202,248,323,87,40,495,196,19,456,378,361,158,45,277,363,49,167,235,196,52,343,427,328,442,119,358,213,352,147,135,14,42,37,447,148,345,301,76,84,423,14,334,74,211,295,98,353,102,359,425,201,295,46,351,216,324,34,262,161,6,79,482,397,409,239,220,36,29,439,60,160,366,379,157,331,241,430,301,164,338,372,230,438,240,490,222,457,436,142,24,131,478,332,493,299,117,222,139,118,163,481,218,21,28,261,370,412,470,37,30,483,72,357,372,215,432,338,195,201,226,262,432,224,108,173,261,350,248,337,393,47,152,247,498,102,247,183,81,190,302,276,490,318,420,414,373,245,1,146,154,238,191,278,10,190,500,330,264,245,58,412,81,385,243,437,412,451,205,446,183,259,95,91,135,121,90,59,252,355,325,251,479,76,70,82,411,439,399,132,309,297,441,16,107,499,180,488,500,345,25,376,34,377,79,267,483,472,327,481,146,373,100,195,95,201,79,483,246,494,500,402,76,140,191,188,308,425,352,346,359,322,363,455,464,464,113,35,386,400,293,227,89,363,80,372,245,167,298,164,243,440,427,344,105,184,31,144,286,23,158,237,164,332,188,82,321,202,437,207,314,344,26,409,91,162,47,426,81,453,488,325,18,35,268,18,181,364,205,132,187,38,174,173,335,322,407,494,335,357,344,291,329,241,342,356,443,440,368,431,47,332,468,39,400,325,264,112,67,181,441,496,406,437,328,444,389,353,104,257,220,140,233,248,366,393,423,54,73,323,440,197,176,398,254,413,4,57,74,47,355,109,112,5,88,236,380,412,261,428,387,325,379,99,220,129,21,438,123,289,146,39,197,315,131,5,330,63,162,408,70,182,229,6,353,150,208,272,347,228,471,43,228,413,312,495,397,134,391,171,289,172,137,102,337,409,232,300,329,25,118,412,204,133,270,247,464,12,498,391,372,293,411,382,144,174,76,54,353,496,319,328,242,476,346,430,403,203,483,236,58,179,113,123,141,265,221,109,186,333,194,315,351,37,217,321,134,30,258,138,138,337,13,410,340,295,309,146,272,394,125,19,81,214,246,239,460,465,446,207,37,15,412,47,173,58,234,381,462,139,90,291,254,351,493,471,133,339,411,190,474,169,329,187,302,205,165,468,257,329,206,192,447,129,429,292,308,439,437,437,341,116,196,151,397,125,132,5,24,367,103,359,299,228,191,163,10,332,18,136,93,249,379,423,455,11,440,236,54,312,490,241,286,153,72,108,337,268,48,404,405,160,265,216,426,404,463,231,120,404,310,97,114,465,147,45,166,198,341,401,39,70,334,126,473,363,251,329,420,214,356,458,421,373,197,145,379,211,322,360,148,383,48,54,482,482,181,8,22,21,477,31,173,460,407,442,306,265,424,46,373,253,149,417,151,37,448,306,403,55,311,157,350,343,172,176,176,479,302,59,237,188,482,272,98,22,367,195,133,131,115,184,380,224,296,288,159,263,480,468,281,411,214,410,107,196,66,429,497,304,380,370,31,279,38,398,317,192,346,248,203,289,281,237,246,192,122,355,289,368,20,390,77,320,323,335,226,80,343,359,255,218,153,229,474,118,84,44,282,15,466,414,379,40,69,203,38,227,294,247,90,458,377,424,263,361,235,105,363,173,270,385,364,412,193,413,16,130,425,310,85,314,409,36,153,211,371,90,304,135,125,427,92,416,76,150,336,322,409,455,182,330,427,180,399,414,354,325,372,402,492,200,235,53,454,466,474,390,139,452,268,327,245,463,97,490,90,368,299,415,285,441,344,127,98,182,397,284,426,489,82,498,137,307,279,336,413,4,433,197,361,135,366,276,76,163,133,68,110,451,204,240,199,171,200,433,20,85,473,54,280,165,434,471,240,294,213,311,111,314,222,405,242,202,239,192,481,255,390,407,109,494,319,310,76,154,230,154,420,204,126,73,196,394,129,196,445,117,10,55,438,317,1,265,133,133,58,209,336,204,178,246,349,342,401,144,471,488,78,32,114,40,235,84,474,363,310,201,241,488,8,15,32,172,6,217,147,329,319,102,474,105,184,301,56,369,293,386,476,16,161,114,51,351,105,411,303,296,257,402,343,416,389,212,265,475,22,153,274,132,27,100,94,323,261,124,425,13,291,124,299,399,170,37,373,187,402,131,394,41,267,500,395,316,241,72,155,319,272,434,96,488,173,117,448,88,347,152,136,201,43,83,361,2,229,416,446,43,189,303,231,455,378,457,90,24,330,481,116,102,444,163,80,433,133,179,500,166,460,280,470,265,6,358,4,230,302,307,145,20,382,327,58,57,228,124,310,193,350,114,431,98,123,336,466,77,455,169,62,476,127,396,406,494,491,81,219,354,286,350,487,484,217,275,60,271,324,314,217,421,244,399,24,419,276,497,67,362,260,64,111,178,84,45,332,107,330,25,27,19,172,17,374,137,471,227,300,209,327,56,30,442,304,289,319,79,15,67,301,499,406,414,490,153,12,17,372,124,423,444,278,71,376,189,380,246,447,304,146,468,488,215,246,495,30,315,453,316,244,357,418,144,179,13,432,291,182,414,263,265,123,108,422,268,358,437,356,68,13,441,291,203,14,290,416,109,367,189,233,409,479,131,6,345,59,120,47,374,482,403,96,415,328,89,486,441,243,469,159,205,25,111,9,226,408,85,271,123,182,267,267,94,213,57,371,295,132,112,277,82,260,409,399,436,157,261,55,43,82,162,195,167,356,360,414,9,167,293,370,20,55,494,356,431,141,252,215,473,304,231,269,109,337,122,88,99,147,338,278,372,439,334,294,77,105,10,73,333,349,65,62,243,355,241,155,81,47,90,301,251,482,191,15,377,387,420,88,425,395,375,400,142,54,179,435,464,256,20,15,45,485,61,401,213,133,276,16,311,264,322,229,166,250,15,28,377,249,290,2,7,14,352,28,208,252,117,247,14,1,10,406,257,147,13,58,140,49,379,111,265,487,309,432,189,57,412,415,473,56,333,78,374,311,57,363,346,104,414,496,153,401,245,204,246,467,346,141,187,243,127,324,152,56,412,65,316,146,308,396,366,437,52,324,45,115,351,191,337,302,136,324,348,347,343,61,218,150,450,242,278,467,482,432,98,115,160,224,47,49,389,59,463,85,326,77,105,56,385,426,292,154,218,78,464,3,222,463,343,439,56,334,209,270,58,318,209,52,188,393,78,130,374,181,316,287,254,375,424,4,395,47,35,241,312,423,87,233,110,156,460,450,89,288,321,55,291,126,449,88,1,372,342,370,492,160,173,184,33,204,348,482,202,91,98,46,359,217,135,234,453,339,414,116,378,40,389,42,267,21,128,258,73,122,162,191,401,286,98,94,293,356,88,203,240,264,74,237,113,62,283,457,145,168,435,375,212,223,173,188,12,82,184,438,38,126,126,99,343,231,144,343,325,61,432,413,175,56,142,202,244,421,56,322,285,343,73,429,210,415,218,363,417,56,464,377,227,388,99,126,281,441,2,414,329,133,225,102,66,102,270,202,347,263,480,470,101,21,147,49,240,14,146,441,351,114,112,346,145,429,444,42,220,306,489,279,449,215,326,357,74,199,218,440,255,466,493,251,278,141,58,112,15,328,455,142,484,345,476,281,254,248,205,141,118,477,463,327,410,456,307,318,406,41,435,428,207,348,338,119,122,35,344,177,150,499,260,336,246,15,113,250,156,493,422,434,405,6,18,421,151,26,468,422,234,218,372,86,347,257,500,341,11,51,55,395,453,461,250,369,472,303,398,121,294,312,339,345,472,322,485,381,492,463,402,360,306,329,5,271,387,259,37,198,421,130,402,125,340,169,395,384,22,457,163,123,125,317,341,51,80,80,324,103,213,118,471,464,34,287,466,338,395,52,255,188,34,147,14,488,100,155,309,125,213,126,121,339,375,85,343,471,212,312,456,208,459,243,289,342,223,102,460,151,296,402,305,497,120,422,53,26,131,435,48,128,132,216,2,117,434,255,277,217,291,250,255,266,429,395,48,39,76,56,165,198,105,464,172,180,10,256,105,122,27,410,150,182,139,17,124,122,369,4,412,341,472,83,491,408,359,285,98,66,397,300,307,232,286,7,262,38,364,55,426,384,444,83,77,390,150,453,247,197,93,446,131,247,116,361,364,247,482,325,361,355,30,83,306,136,40,349,329,486,251,433,90,364,484,150,280,204,354,138,101,170,16,415,246,480,221,470,48,276,384,211,496,154,304,427,492,158,186,369,500,251,269,101,39,255,417,116,43,41,298,190,220,221,312,290,237,411,333,122,137,84,15,136,83,84,258,382,75,390,327,387,60,88,32,296,195,144,222,139,98,203,190,44,95,390,112,299,84,117,151,175,306,258,66,131,271,84,164,471,298,405,394,295,443,370,84,304,121,383,351,297,430,8,262,452,350,210,272,139,192,168,396,347,187,19,414,216,87,286,387,263,66,498,304,318,43,419,307,379,74,297,105,498,2,96,279,51,489,308,81,12,8,474,146,121,457,1,209,495,379,150,141,392,481,117,311,479,359,342,299,29,192,20,323,204,98,161,63,131,45,204,474,108,372,142,27,257,291,162,53,237,407,161,136,392,253,66,214,298,148,19,127,196,206,194,113,145,234,153,372,466,457,175,371,363,269,144,158,92,385,69,393,344,32,310,124,234,25,258,301,459,160,406,471,174,392,214,191,344,115,31,202,175,429,16,136,179,66,13,48,317,243,158,482,87,333,173,19,426,378,272,453,115,109,468,192,338,430,149,402,473,396,35,139,159,58,219,58,314,283,339,127,72,289,438,347,319,274,410,471,193,190,184,144,297,250,308,345,176,489,334,344,380,225,270,45,129,158,120,476,383,172,124,178,393,492,380,227,145,447,126,39,370,307,42,72,89,120,266,418,472,44,64,179,350,443,34,291,61,7,407,198,366,21,232,477,301,415,292,69,474,420,475,11,161,24,127,13,91,253,94,371,299,19,318,303,374,12,81,6,267,461,1,148,76,347,389,316,238,79,34,390,101,210,112,307,110,409,86,309,260,271,441,124,352,174,89,298,320,366,446,436,391,322,461,127,215,241,201,120,227,286,131,84,151,384,326,288,154,495,415,70,451,77,202,238,323,26,111,458,217,248,498,287,462,320,387,126,6,139,59,168,273,246,73,186,326,463,34,313,384,145,262,107,392,163,109,392,296,234,391,178,311,247,500,50,195,326,152,213,338,102,363,84,449,306,163,328,392,1,405,158,180,279,268,300,335,438,150,186,256,226,457,458,16,114,400,93,18,360,195,108,320,32,262,196,72,34,358,206,316,240,358,224,386,181,400,449,257,233,142,53,414,30,233,31,80,332,194,65,296,190,500,240,105,307,467,69,241,471,67,209,434,319,470,345,279,144,162,415,53,464,52,128,226,79,468,392,297,420,190,61,428,293,395,140,344,283,130,182,405,387,271,352,495,298,391,139,90,243,462,41,467,175,484,431,337,352,285,101,485,231,69,97,370,244,444,460,81,186,175,315,330,448,345,471,94,282,419,421,159,318,89,7,103,435,499,266,389,393,152,250,7,239,294,181,294,495,252,416,401,34,391,16,86,446,30,450,471,338,477,436,482,121,294,190,314,59,23,45,432,66,162,36,131,211,33,174,36,15,406,81,119,142,52,66,36,227,92,286,178,70,230,159,188,37,473,325,127,71,274,41,85,48,397,177,393,307,79,498,209,323,254,442,383,234,76,64,8,493,473,402,320,130,300,317,120,372,154,288,10,47,211,73,441,470,435,191,482,295,126,268,484,290,389,43,349,199,431,54,119,183,84,418,168,295,229,445,462,337,142,463,239,108,335,221,494,428,359,398,301,40,308,289,185,295,278,224,197,75,391,148,204,97,321,242,302,335,168,484,418,293,180,130,495,45,32,206,242,47,214,252,354,313,341,490,13,135,373,382,272,356,198,395,295,284,89,483,226,188,2,200,433,245,376,6,489,170,4,231,84,5,175,499,494,406,163,392,290,260,426,487,73,150,143,82,480,483,47,360,73,322,25,304,410,470,14,378,265,75,154,356,117,196,369,442,27,36,12,442,302,421,233,390,88,479,394,373,443,430,155,233,206,27,171,292,481,95,139,290,295,321,483,489,424,111,63,421,427,477,187,221,233,98,287,340,382,297,304,396,477,205,1,411,333,177,243,488,190,397,274,423,344,67,253,462,328,407,418,489,109,35,208,499,137,40,395,414,450,91,124,156,489,160,410,328,22,247,141,389,146,62,435,343,199,281,454,328,500,342,292,417,158,413,263,250,140,141,265,145,96,193,50,380,416,312,348,330,386,362,202,158,464,276,378,240,64,67,166,270,469,458,312,289,369,244,33,405,461,7,82,496,492,264,246,192,100,252,478,304,451,376,433,231,92,294,32,270,204,26,27,388,285,270,298,1,130,38,245,4,112,317,445,68,111,454,200,316,219,148,373,387,71,115,334,45,90,461,416,35,21,25,255,75,187,455,334,86,109,277,435,488,138,16,470,279,303,21,169,361,312,9,434,345,254,470,45,318,99,179,258,497,161,240,8,278,139,243,101,370,386,489,448,232,45,407,309,291,470,237,184,70,199,174,226,264,26,349,451,200,270,190,470,3,115,227,249,97,169,224,318,31,182,312,363,176,267,454,414,455,256,456,146,195,473,403,52,164,133,193,379,47,7,481,305,173,436,311,359,168,318,377,241,421,352,120,227,24,276,381,34,444,275,44,273,204,277,396,73,131,118,213,209,357,294,252,82,223,122,103,72,500,53,267,315,178,168,136,331,169,74,280,412,52,357,76,79,450,491,262,147,159,474,385,493,232,52,16,493,222,59,99,395,331,478,204,358,368,143,160,292,174,71,384,192,225,381,68,327,176,211,187,276,187,3,85,452,187,112,292,478,313,426,367,96,391,377,462,336,2,175,316,128,279,210,448,447,362,295,481,401,126,490,453,115,487,203,58,177,418,118,192,498,52,64,488,259,248,343,445,200,380,438,473,298,280,111,276,104,204,124,21,158,168,18,12,260,483,353,330,364,385,470,152,348,200,163,105,313,60,75,407,163,163,55,126,106,458,435,273,39,9,2,426,96,71,141,114,108,348,305,399,453,317,185,65,48,248,221,78,373,433,337,490,108,186,419,343,465,315,496,485,208,463,147,108,142,226,19,233,382,77,356,269,381,365,53,358,162,304,369,387,47,490,430,396,463,181,469,236,209,477,344,34,375,201,55,17,65,421,346,184,458,170,113,266,174,129,169,3,111,232,44,429,303,467,336,264,240,416,237,442,400,368,438,155,397,20,4,315,310,76,180,35,428,443,264,356,395,182,146,88,326,416,224,431,134,189,37,403,359,484,19,320,109,322,223,437,381,198,396,461,466,480,228,115,309,121,21,202,21,450,90,150,63,473,135,373,47,26,200,311,297,199,187,298,493,65,390,343,351,237,226,483,164,496,286,499,212,263,157,444,466,459,47,444,350,238,208,407,130,396,242,151,53,311,30,465,363,240,195,449,44,132,490,66,364,132,11,395,5,461,55,71,468,192,464,226,264,319,460,270,55,263,82,39,27,484,471,399,255,176,58,367,311,459,465,32,235,244,30,219,380,271,207,274,457,494,170,120,352,281,157,285,495,133,467,63,215,352,410,310,77,19,71,441,76,7,266,447,160,457,395,179,417,230,65,373,157,236,346,187,54,82,253,248,397,164,396,216,26,417,52,285,121,459,411,240,191,7,429,319,415,382,150,336,105,153,46,12,414,401,425,177,346,352,387,139,113,295,2,77,155,462,15,457,404,63,269,475,352,327,282,402,272,315,324,193,375,316,188,156,390,308,70,465,437,207,88,243,184,270,87,154,410,367,21,133,165,283,477,354,468,139,253,122,436,12,367,466,68,384,221,475,296,430,426,320,66,173,34,471,476,382,494,375,364,485,409,484,152,260,212,74,62,248,119,258,237,478,417,492,26,135,157,168,133,53,83,299,25,256,463,191,479,97,315,329,231,39,56,421,274,109,21,497,390,233,307,82,81,156,162,414,175,211,458,48,319,176,499,167,426,215,335,103,64,37,278,367,361,377,453,401,309,258,224,181,361,146,417,494,412,182,176,116,194,459,246,228,232,403,313,355,358,158,340,256,28,30,360,17,457,159,299,370,155,267,285,153,34,355,294,19,468,144,465,490,255,160,456,181,203,398,250,216,44,402,168,193,465,258,112,83,436,414,209,219,136,329,24,346,105,193,429,28,67,343,4,289,415,272,361,122,349,138,404,424,292,117,329,86,457,275,78,414,1,464,28,388,442,339,202,307,286,307,62,149,256,490,149,51,425,249,103,264,140,270,393,317,418,381,242,435,91,476,422,317,320,227,258,341,303,357,422,184,393,233,29,95,267,197,429,74,169,443,220,337,422,386,172,98,399,321,400,389,464,485,281,232,477,183,270,55,482,299,392,81,411,247,431,221,25,392,191,402,39,116,443,199,94,383,498,344,174,154,157,63,198,175,10,27,392,238,368,105,183,482,309,274,347,446,122,227,217,480,459,265,68,482,192,77,352,59,337,401,363,7,160,181,187,260,121,71,134,330,416,59,126,340,395,356,397,329,120,101,303,124,349,309,127,55,308,151,1,136,471,87,358,116,29,439,483,414,175,71,74,242,495,474,500,211,176,290,238,432,237,267,83,296,422,329,364,38,154,374,68,490,395,37,380,329,284,310,488,65,86,387,120,494,184,32,144,259,392,488,217,55,487,366,105,196,88,369,439,404,90,153,77,39,70,95,368,358,118,213,196,319,416,116,208,275,111,403,494,350,285,407,282,259,20,349,170,109,418,398,488,63,76,32,28,297,422,82,34,112,246,244,322,94,140,260,15,248,33,158,407,334,65,325,37,111,71,436,441,10,169,463,320,182,53,351,214,343,125,253,218,286,436,267,2,357,39,377,496,5,448,330,450,206,271,460,10,271,408,348,151,183,350,132,458,73,476,447,78,57,190,400,141,472,300,243,364,136,59,74,183,478,170,293,383,99,175,164,118,467,468,188,66,357,426,465,19,432,105,290,444,227,478,371,458,195,415,335,121,268,202,124,361,240,147,305,470,23,274,307,180,416,489,164,208,78,316,114,161,16,256,294,352,26,119,7,13,45,304,451,400,44,480,93,212,333,141,398,439,404,58,207,92,400,449,80,8,268,117,260,246,420,134,67,167,89,219,331,462,80,131,135,469,48,87,119,50,219,418,302,383,321,177,231,423,74,116,168,314,214,291,162,425,184,241,411,148,32,317,151,418,60,280,420,196,116,49,101,290,102,397,143,161,186,319,139,500,335,416,373,471,117,236,256,38,460,180,128,55,184,210,411,104,107,192,73,126,56,237,308,353,444,158,264,117,472,54,367,327,164,75,238,438,435,419,391,274,33,264,437,292,427,468,144,472,27,126,34,258,165,263,426,294,443,249,53,392,54,240,48,440,46,28,63,295,430,384,242,492,446,206,46,204,115,81,369,6,179,438,83,264,338,99,497,253,174,39,110,360,480,424,405,115,264,347,57,490,9,452,101,360,487,227,344,226,275,12,102,463,239,432,429,136,79,234,364,2,97,11,212,387,162,446,402,209,87,405,383,119,53,150,172,314,149,78,354,314,8,441,183,270,484,13,123,415,305,259,304,485,401,305,254,477,145,498,472,405,465,209,417,231,60,498,392,27,478,280,232,112,113,45,153,135,248,348,29,412,11,322,271,7,429,222,184,488,159,49,121,43,216,219,243,93,500,276,223,154,276,67,230,169,485,447,338,154,349,393,343,263,357,323,459,379,289,72,426,358,119,30,55,16,255,423,409,33,276,440,43,39,86,109,377,475,339,251,344,264,155,292,42,148,251,83,152,145,109,445,37,10,494,1,174,191,111,369,128,252,69,279,468,74,365,93,104,352,16,329,111,172,88,378,349,80,293,105,124,209,206,321,32,480,129,227,340,148,150,58,363,397,445,348,340,319,307,440,231,196,362,30,401,358,186,170,416,190,356,301,293,296,102,266,295,152,337,31,395,227,398,297,70,56,378,68,253,183]
,5832))
print(
s.shipWithinDays([
376, 80, 176, 64, 421, 250, 163, 252, 490, 229, 408, 179, 106, 185, 108, 483, 349, 206, 76, 127, 112, 384, 170, 125, 52, 111, 457, 326, 387, 140, 9,
205, 462, 453, 464, 464, 89, 17, 362, 290, 102, 278, 462, 343, 69, 430, 19, 476, 461, 270, 180, 148, 454, 422, 460, 20, 150, 271, 143, 491, 120, 111,
291, 383, 364, 101, 100, 38, 9, 306, 185, 326, 189, 325, 372, 74, 329, 240, 114, 154, 6, 257, 172, 355, 337, 186, 87, 377, 391, 453, 309, 47, 234, 257,
434, 338, 418, 207, 176, 403, 497, 201, 147, 164, 92, 451, 211, 135, 28, 73, 25, 223, 134, 418, 481, 81, 191, 268, 146, 452, 177, 158, 8, 169, 208, 149,
325, 472, 141, 423, 197, 241, 250, 423, 139, 101, 264, 94, 73, 454, 160, 256, 204, 354, 103, 281, 425, 413, 158, 93, 477, 330, 183, 285, 335, 370, 146,
135, 440, 496, 264, 97, 474, 190, 307, 142, 202, 95, 92, 56, 152, 108, 12, 109, 247, 191, 8, 11, 398, 279, 1, 240, 129, 349, 301, 482, 194, 164, 424,
43, 420, 355, 355, 294, 203, 485, 141, 124, 98, 128, 333, 85, 19, 39, 221, 329, 155, 207, 270, 191, 416, 395, 61, 85, 357, 400, 143, 337, 445, 177, 98,
150, 112, 195, 319, 21, 488, 407, 130, 133, 398, 55, 433, 307, 303, 297, 381, 234, 287, 257, 347, 25, 237, 5, 325, 112, 285, 132, 318, 427, 421, 448,
65, 259, 304, 78, 327, 490, 166, 27, 256, 139, 294, 361, 42, 52, 95, 122, 422, 442, 271, 441, 133, 397, 375, 186, 464, 314, 453, 183, 425, 431, 241, 22,
80, 490, 476, 232, 359, 65, 288, 361, 218, 480, 290, 389, 243, 343, 427, 404, 87, 149, 208, 479, 243, 312, 185, 469, 421, 305, 466, 335, 332, 117, 265,
409, 199, 47, 317, 355, 267, 279, 6, 429, 404, 211, 167, 75, 384, 360, 287, 137, 453, 361, 152, 283, 46, 208, 195, 207, 405, 412, 354, 278, 464, 381,
333, 487, 183, 311, 226, 225, 55, 451, 461, 263, 143, 160, 212, 451, 250, 296, 155, 424, 114, 296, 125, 470, 284, 443, 430, 494, 238, 144, 176, 180, 91,
500, 10, 339, 379, 189, 375, 388, 492, 461, 267, 104, 334, 167, 53, 93, 500, 445, 196, 89, 72, 409, 395, 415, 219, 157, 161, 88, 71, 98, 361, 31, 387,
216, 182, 110, 362, 437, 452, 495, 409, 74, 442, 3, 229, 197, 191, 78, 206, 69, 133, 217, 278, 436, 112, 11, 354, 496, 88, 164, 256, 103, 126, 293, 292,
20, 355, 458, 227, 467, 170, 431, 70, 404, 421, 56, 144, 73, 148, 105, 328, 51, 134, 426, 80, 18, 118, 440, 194, 158, 323, 366, 313, 162, 500, 297, 448,
217, 49, 333, 499, 124, 280, 230, 476, 73, 337, 487, 271, 499, 498, 98, 331, 76, 408, 338, 159, 154, 104, 208, 185, 250, 98, 479, 171, 360, 150, 112,
305, 177, 454, 102, 212, 43, 302, 123, 418, 124, 12, 133, 339, 244, 380, 254, 318, 107, 277, 149, 58, 268, 378, 98, 337, 56, 130, 470, 393, 459, 177,
468, 142, 498, 140, 490, 189, 380, 20, 338, 452, 330, 376, 409, 279, 50, 311, 219, 373, 312, 383, 105, 25, 268, 21, 278, 13, 181, 370, 191, 131, 233,
123, 375, 419, 403, 466, 11, 438, 91, 71, 455, 122, 382, 468, 479, 328, 135, 5, 467, 448, 311, 497, 400, 260, 310, 427, 349, 182, 152, 7, 62, 133, 225,
354, 40, 100, 313, 289, 195, 392, 249, 318, 287, 457, 387, 361, 136, 460, 243, 236, 50, 412, 440, 124, 93, 376, 95, 350, 430, 390, 149, 203, 440, 252,
32, 461, 300, 426, 170, 495, 217, 269, 57, 257, 105, 179, 380, 301, 58, 325, 440, 144, 102, 455, 352, 455, 80, 300, 370, 58, 393, 239, 380, 104, 364,
467, 136, 296, 169, 364, 224, 394, 338, 39, 319, 428, 81, 194, 314, 370, 143, 162, 472, 415, 149, 315, 318, 74, 258, 496, 475, 377, 346, 20, 14, 417,
26, 362, 295, 388, 493, 370, 249, 13, 488, 54, 195, 72, 263, 194, 155, 459, 250, 39, 210, 455, 86, 340, 6, 105, 297, 196, 23, 217, 333, 434, 129
], 361))
'''
print(s.shipWithinDays(weights=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], D=5))
print(
s.shipWithinDays([
190, 417, 495, 463, 169, 450, 350, 477, 49, 45, 18, 439, 475, 313, 492, 400, 427, 439, 153, 158, 48, 430, 375, 352, 454, 391, 238, 95, 255, 170, 203,
49, 387, 483
], 17))
print(s.shipWithinDays([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 10))
print(s.shipWithinDays(weights=[3, 2, 2, 4, 1, 4], D=3))
print(s.shipWithinDays(weights=[1, 2, 3, 1, 1], D=4) == 3)
| 286.935135
| 44,182
| 0.703408
| 12,986
| 53,083
| 2.875173
| 0.048899
| 0.002143
| 0.00375
| 0.001446
| 0.027158
| 0.024265
| 0.022176
| 0.01998
| 0.01998
| 0.01998
| 0
| 0.690167
| 0.051674
| 53,083
| 184
| 44,183
| 288.494565
| 0.05153
| 0.011039
| 0
| 0.45098
| 0
| 0
| 0.000734
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.058824
| false
| 0
| 0.009804
| 0
| 0.196078
| 0.04902
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6675134a832b6108e7afd2f301104a5a50770c2d
| 158
|
py
|
Python
|
jet_bridge/filters/integer_filter.py
|
BradyBromley/jet-bridge
|
06be16d3bbfdf56a943057dfa48340693c6ed5bb
|
[
"MIT"
] | 2
|
2020-07-27T22:18:42.000Z
|
2021-11-15T10:03:14.000Z
|
jet_bridge/filters/integer_filter.py
|
BradyBromley/jet-bridge
|
06be16d3bbfdf56a943057dfa48340693c6ed5bb
|
[
"MIT"
] | null | null | null |
jet_bridge/filters/integer_filter.py
|
BradyBromley/jet-bridge
|
06be16d3bbfdf56a943057dfa48340693c6ed5bb
|
[
"MIT"
] | null | null | null |
from jet_bridge.fields.integer import IntegerField
from jet_bridge.filters.filter import Filter
class IntegerFilter(Filter):
field_class = IntegerField
| 22.571429
| 50
| 0.829114
| 20
| 158
| 6.4
| 0.6
| 0.109375
| 0.203125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120253
| 158
| 6
| 51
| 26.333333
| 0.920863
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
66c05e49b6be1364016d2c2a7cd2ca66151cd105
| 86
|
py
|
Python
|
reclip/__init__.py
|
laddge/reclip
|
c0d6ae4bb757e452692176f96863266f58af8957
|
[
"MIT"
] | 3
|
2021-11-27T22:23:17.000Z
|
2021-12-12T12:15:23.000Z
|
reclip/__init__.py
|
laddge/reclip
|
c0d6ae4bb757e452692176f96863266f58af8957
|
[
"MIT"
] | null | null | null |
reclip/__init__.py
|
laddge/reclip
|
c0d6ae4bb757e452692176f96863266f58af8957
|
[
"MIT"
] | null | null | null |
from .server import serve
from .client import set, get, delete
__version__ = '1.0.2'
| 17.2
| 36
| 0.732558
| 14
| 86
| 4.214286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.162791
| 86
| 4
| 37
| 21.5
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.05814
| 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
|
66dd42cab5ac14e594eceb994efb1a3bc5e3a2a4
| 85
|
py
|
Python
|
main.py
|
jakebailey/pyright-action-test
|
778dd612e8e6b6dec50749747f593f3edc37aed6
|
[
"MIT"
] | null | null | null |
main.py
|
jakebailey/pyright-action-test
|
778dd612e8e6b6dec50749747f593f3edc37aed6
|
[
"MIT"
] | null | null | null |
main.py
|
jakebailey/pyright-action-test
|
778dd612e8e6b6dec50749747f593f3edc37aed6
|
[
"MIT"
] | null | null | null |
from typing import List
x: List[int] = []
x.append(1234)
x.append("not a number")
| 10.625
| 24
| 0.658824
| 15
| 85
| 3.733333
| 0.733333
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 0.176471
| 85
| 7
| 25
| 12.142857
| 0.742857
| 0
| 0
| 0
| 0
| 0
| 0.141176
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66f05ceff35d5389ea529942eeaf9f1598098a08
| 1,398
|
py
|
Python
|
my/lastfm/__init__.py
|
jhermann/HPI
|
a60c30868b285f233caf65a59d3496082fb9d5c2
|
[
"MIT"
] | null | null | null |
my/lastfm/__init__.py
|
jhermann/HPI
|
a60c30868b285f233caf65a59d3496082fb9d5c2
|
[
"MIT"
] | null | null | null |
my/lastfm/__init__.py
|
jhermann/HPI
|
a60c30868b285f233caf65a59d3496082fb9d5c2
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
from functools import lru_cache
from typing import NamedTuple, Dict, Any
from datetime import datetime
from pathlib import Path
import json
import pytz
from mycfg import paths
# TODO Json type?
# TODO memoised properties?
# TODO lazy mode and eager mode?
# lazy is a bit nicer in terms of more flexibility and less processing?
# eager is a bit more explicit for error handling
class Scrobble(NamedTuple):
raw: Dict[str, Any]
@property
def dt(self) -> datetime:
ts = int(self.raw['date'])
return datetime.fromtimestamp(ts, tz=pytz.utc)
@property
def artist(self) -> str:
return self.raw['artist']
@property
def name(self) -> str:
return self.raw['name']
@property
def track(self) -> str:
return f'{self.artist} — {self.name}'
# TODO __repr__, __str__
# TODO could also be nice to make generic? maybe even depending on eagerness
# TODO memoise...?
# TODO watch out, if we keep the app running it might expire
def _iter_scrobbles():
last = max(Path(paths.lastfm.export_path).glob('*.json'))
# TODO mm, no timezone? hopefuly it's UTC
j = json.loads(last.read_text())
for raw in j:
yield Scrobble(raw=raw)
@lru_cache(1)
def get_scrobbles():
return list(sorted(_iter_scrobbles(), key=lambda s: s.dt))
def test():
assert len(get_scrobbles()) > 1000
| 22.918033
| 80
| 0.67382
| 206
| 1,398
| 4.490291
| 0.558252
| 0.047568
| 0.042162
| 0.036757
| 0.043243
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00551
| 0.22103
| 1,398
| 60
| 81
| 23.3
| 0.842975
| 0.304721
| 0
| 0.125
| 0
| 0
| 0.048907
| 0
| 0
| 0
| 0
| 0.016667
| 0.03125
| 1
| 0.21875
| false
| 0
| 0.21875
| 0.125
| 0.65625
| 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
|
dd031ad51a1dc7f27d650561cd853b4caea1516d
| 128
|
py
|
Python
|
health/apps.py
|
h3nnn4n/git-o-matic-9k
|
d8241cc768591e0f41c02b2057d7b56697a4cc86
|
[
"MIT"
] | null | null | null |
health/apps.py
|
h3nnn4n/git-o-matic-9k
|
d8241cc768591e0f41c02b2057d7b56697a4cc86
|
[
"MIT"
] | null | null | null |
health/apps.py
|
h3nnn4n/git-o-matic-9k
|
d8241cc768591e0f41c02b2057d7b56697a4cc86
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
# pylint: disable=missing-class-docstring
class HealthConfig(AppConfig):
name = 'health'
| 21.333333
| 41
| 0.773438
| 15
| 128
| 6.6
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132813
| 128
| 5
| 42
| 25.6
| 0.891892
| 0.304688
| 0
| 0
| 0
| 0
| 0.068966
| 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
|
dd0ff94e2d1328f59440ccd4792deff5b380263a
| 109
|
py
|
Python
|
apps/ping/commands/ping.py
|
hiraq/typhoon
|
243a9c89fba806a6537bbd7a9b94bf5e74649896
|
[
"BSD-3-Clause"
] | null | null | null |
apps/ping/commands/ping.py
|
hiraq/typhoon
|
243a9c89fba806a6537bbd7a9b94bf5e74649896
|
[
"BSD-3-Clause"
] | 5
|
2016-09-27T12:10:41.000Z
|
2016-10-07T20:55:13.000Z
|
apps/ping/commands/ping.py
|
labs127/typhoon
|
243a9c89fba806a6537bbd7a9b94bf5e74649896
|
[
"BSD-3-Clause"
] | null | null | null |
import click
@click.command('ping:ping')
def cli():
"""
Just ping it
"""
click.echo('pong')
| 12.111111
| 27
| 0.550459
| 14
| 109
| 4.285714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.256881
| 109
| 8
| 28
| 13.625
| 0.740741
| 0.110092
| 0
| 0
| 0
| 0
| 0.160494
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dd224e52a28daf596e2f485a535a2c180f6e2c8e
| 217
|
py
|
Python
|
projects/views.py
|
FARBEX97/django-portfolio-public
|
11dab3b033254114ef255d614a739e47337a9ccd
|
[
"MIT"
] | null | null | null |
projects/views.py
|
FARBEX97/django-portfolio-public
|
11dab3b033254114ef255d614a739e47337a9ccd
|
[
"MIT"
] | null | null | null |
projects/views.py
|
FARBEX97/django-portfolio-public
|
11dab3b033254114ef255d614a739e47337a9ccd
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from django.views.generic import ListView
from .models import CodeProject
class ProjectListView(ListView):
model = CodeProject
template_name = 'projects/html/projects.html'
| 31
| 49
| 0.806452
| 26
| 217
| 6.692308
| 0.653846
| 0.114943
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 217
| 7
| 49
| 31
| 0.920635
| 0
| 0
| 0
| 0
| 0
| 0.123853
| 0.123853
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 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
|
dd388f1bd8d3e6fd0d8cf2e5abe83983db4c78e6
| 2,615
|
py
|
Python
|
ops.py
|
HAHA-DL/MLDG
|
19134860db3b02b511ea682d1cd353350322602f
|
[
"MIT"
] | 109
|
2018-06-21T16:41:40.000Z
|
2022-03-01T04:53:50.000Z
|
ops.py
|
qtrungphung/MLDG
|
19134860db3b02b511ea682d1cd353350322602f
|
[
"MIT"
] | 7
|
2019-10-10T04:13:24.000Z
|
2021-06-15T08:49:22.000Z
|
ops.py
|
qtrungphung/MLDG
|
19134860db3b02b511ea682d1cd353350322602f
|
[
"MIT"
] | 30
|
2018-07-29T10:59:48.000Z
|
2021-12-02T13:28:23.000Z
|
import torch.autograd as autograd
import torch.nn.functional as F
from torch.autograd import Variable
def linear(inputs, weight, bias, meta_step_size=0.001, meta_loss=None, stop_gradient=False):
if meta_loss is not None:
if not stop_gradient:
grad_weight = autograd.grad(meta_loss, weight, create_graph=True)[0]
if bias is not None:
grad_bias = autograd.grad(meta_loss, bias, create_graph=True)[0]
bias_adapt = bias - grad_bias * meta_step_size
else:
bias_adapt = bias
else:
grad_weight = Variable(autograd.grad(meta_loss, weight, create_graph=True)[0].data, requires_grad=False)
if bias is not None:
grad_bias = Variable(autograd.grad(meta_loss, bias, create_graph=True)[0].data, requires_grad=False)
bias_adapt = bias - grad_bias * meta_step_size
else:
bias_adapt = bias
return F.linear(inputs,
weight - grad_weight * meta_step_size,
bias_adapt)
else:
return F.linear(inputs, weight, bias)
def conv2d(inputs, weight, bias, meta_step_size=0.001, stride=1, padding=0, dilation=1, groups=1, meta_loss=None,
stop_gradient=False):
if meta_loss is not None:
if not stop_gradient:
grad_weight = autograd.grad(meta_loss, weight, create_graph=True)[0]
if bias is not None:
grad_bias = autograd.grad(meta_loss, bias, create_graph=True)[0]
bias_adapt = bias - grad_bias * meta_step_size
else:
bias_adapt = bias
else:
grad_weight = Variable(autograd.grad(meta_loss, weight, create_graph=True)[0].data,
requires_grad=False)
if bias is not None:
grad_bias = Variable(autograd.grad(meta_loss, bias, create_graph=True)[0].data, requires_grad=False)
bias_adapt = bias - grad_bias * meta_step_size
else:
bias_adapt = bias
return F.conv2d(inputs,
weight - grad_weight * meta_step_size,
bias_adapt, stride,
padding,
dilation, groups)
else:
return F.conv2d(inputs, weight, bias, stride, padding, dilation, groups)
def relu(inputs):
return F.threshold(inputs, 0, 0, inplace=True)
def maxpool(inputs, kernel_size, stride=None, padding=0):
return F.max_pool2d(inputs, kernel_size, stride, padding=padding)
| 36.830986
| 116
| 0.596558
| 330
| 2,615
| 4.512121
| 0.148485
| 0.064473
| 0.064473
| 0.107455
| 0.765615
| 0.723976
| 0.723976
| 0.723976
| 0.680994
| 0.623237
| 0
| 0.015194
| 0.320459
| 2,615
| 70
| 117
| 37.357143
| 0.822735
| 0
| 0
| 0.603774
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.075472
| false
| 0
| 0.056604
| 0.037736
| 0.245283
| 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
|
dd464d79b346c2d7562ca6510ec0222273f9d398
| 29
|
py
|
Python
|
bin/clear.py
|
briarfox/stash
|
7b368d59804026968a16e888ac8bdede840f75db
|
[
"MIT"
] | 2
|
2019-05-26T04:33:38.000Z
|
2020-07-26T05:02:36.000Z
|
bin/clear.py
|
briarfox/stash
|
7b368d59804026968a16e888ac8bdede840f75db
|
[
"MIT"
] | null | null | null |
bin/clear.py
|
briarfox/stash
|
7b368d59804026968a16e888ac8bdede840f75db
|
[
"MIT"
] | null | null | null |
_stash.term.truncate(size=0)
| 14.5
| 28
| 0.793103
| 5
| 29
| 4.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0.034483
| 29
| 1
| 29
| 29
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dd5097c2d7a89c140856b1e2080f644635461d97
| 59
|
py
|
Python
|
pyslackdesc/__main__.py
|
Carrion-Crow/py-slack-desc
|
48bf2eb3b92b4b8206fe9bd7faf42a35ba3de8d1
|
[
"MIT"
] | null | null | null |
pyslackdesc/__main__.py
|
Carrion-Crow/py-slack-desc
|
48bf2eb3b92b4b8206fe9bd7faf42a35ba3de8d1
|
[
"MIT"
] | null | null | null |
pyslackdesc/__main__.py
|
Carrion-Crow/py-slack-desc
|
48bf2eb3b92b4b8206fe9bd7faf42a35ba3de8d1
|
[
"MIT"
] | null | null | null |
"""Starting point."""
from .pyslackdesc import main
main()
| 14.75
| 29
| 0.711864
| 7
| 59
| 6
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118644
| 59
| 3
| 30
| 19.666667
| 0.807692
| 0.254237
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
dd60d15d590f30c17eec28baa6b0cefc0eac6e52
| 91
|
py
|
Python
|
Part_3_advanced/m06_re/grouping/example_1.py
|
Mikma03/InfoShareacademy_Python_Courses
|
3df1008c8c92831bebf1625f960f25b39d6987e6
|
[
"MIT"
] | null | null | null |
Part_3_advanced/m06_re/grouping/example_1.py
|
Mikma03/InfoShareacademy_Python_Courses
|
3df1008c8c92831bebf1625f960f25b39d6987e6
|
[
"MIT"
] | null | null | null |
Part_3_advanced/m06_re/grouping/example_1.py
|
Mikma03/InfoShareacademy_Python_Courses
|
3df1008c8c92831bebf1625f960f25b39d6987e6
|
[
"MIT"
] | null | null | null |
import re
text = "N1: +48 123 456 789"
pattern = re.compile(r"\+(\d{2})((?: \d{3}){3})")
| 15.166667
| 49
| 0.516484
| 17
| 91
| 2.764706
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197368
| 0.164835
| 91
| 5
| 50
| 18.2
| 0.421053
| 0
| 0
| 0
| 0
| 0
| 0.477778
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
dd7919f1d2a294a72ef82cebb0d69eacac4df8d5
| 6,110
|
py
|
Python
|
app/config.py
|
BrightID/brightid-nft-mint-relay
|
7c7b467e6a908aba319fc0f648ba7977e372ec11
|
[
"0BSD"
] | null | null | null |
app/config.py
|
BrightID/brightid-nft-mint-relay
|
7c7b467e6a908aba319fc0f648ba7977e372ec11
|
[
"0BSD"
] | null | null | null |
app/config.py
|
BrightID/brightid-nft-mint-relay
|
7c7b467e6a908aba319fc0f648ba7977e372ec11
|
[
"0BSD"
] | null | null | null |
import os
CONTRACT_ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"verifier","internalType":"address"},{"type":"bytes32","name":"context","internalType":"bytes32"},{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"}]},{"type":"event","name":"AddressBound","inputs":[{"type":"address","name":"addr","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ContextSet","inputs":[{"type":"bytes32","name":"context","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"VerifierSet","inputs":[{"type":"address","name":"verifier","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"bind","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"bytes32","name":"uuidHash","internalType":"bytes32"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"bytes","name":"signature","internalType":"bytes"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getUUIDHash","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"bytes32","name":"uuidHash","internalType":"bytes32"},{"type":"uint256","name":"nonce","internalType":"uint256"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"hashUUID","inputs":[{"type":"bytes32","name":"uuid","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"bytes32[]","name":"contextIds","internalType":"bytes32[]"},{"type":"uint256","name":"timestamp","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescue","inputs":[{"type":"bytes32[]","name":"contextIds","internalType":"bytes32[]"},{"type":"uint256","name":"timestamp","internalType":"uint256"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescue","inputs":[{"type":"bytes32[]","name":"contextIds","internalType":"bytes32[]"},{"type":"uint256","name":"timestamp","internalType":"uint256"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setContext","inputs":[{"type":"bytes32","name":"context","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setVerifier","inputs":[{"type":"address","name":"verifier","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]'
BRIGHTID_NODE = 'https://app.brightid.org/node/v5'
VERIFICATIONS_URL = BRIGHTID_NODE + '/verifications'
NOT_FOUND = 2
NOT_SPONSORED = 4
LINK_CHECK_NUM = 2
LINK_CHECK_PERIOD = 2
SPONSOR_CHECK_NUM = 6
SPONSOR_CHECK_PERIOD = 10
BIND_RATE_LIMIT_DURATION_MINUTES = os.environ['BIND_RATE_LIMIT_DURATION_MINUTES']
RELAY_BASE_ROUTE = os.environ['RELAY_BASE_ROUTE']
RPC_URL = os.environ['RPC_URL']
CHAINID = os.environ['CHAINID']
# GAS = os.environ['GAS']
# GAS_PRICE = os.environ['GAS_PRICE']
HOST = os.environ['HOST']
PORT = os.environ['PORT']
CONTEXT = os.environ['CONTEXT']
CONTRACT_ADDRESS = os.environ['CONTRACT_ADDRESS']
RELAYER_ADDRESS = os.environ['RELAYER_ADDRESS']
RELAYER_PRIVATE = os.environ['RELAYER_PRIVATE']
| 190.9375
| 5,375
| 0.671358
| 628
| 6,110
| 6.471338
| 0.165605
| 0.059055
| 0.119587
| 0.051673
| 0.739173
| 0.685285
| 0.612451
| 0.504183
| 0.433563
| 0.405512
| 0
| 0.025862
| 0.012766
| 6,110
| 31
| 5,376
| 197.096774
| 0.647878
| 0.009656
| 0
| 0
| 0
| 0.05
| 0.913856
| 0.891204
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.05
| 0
| 0.05
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dd7af5e7e47719edd6a26c54b850fe1247c7dad1
| 99
|
py
|
Python
|
references/aoapc-book/BeginningAlgorithmContests/python/ch1/p1-2.py
|
voleking/ICPC
|
fc2cf408fa2607ad29b01eb00a1a212e6d0860a5
|
[
"MIT"
] | 68
|
2017-10-08T04:44:23.000Z
|
2019-08-06T20:15:02.000Z
|
BAC/python/ch1/p1-2.py
|
Anyrainel/aoapc-related-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | null | null | null |
BAC/python/ch1/p1-2.py
|
Anyrainel/aoapc-related-code
|
e787a01380698fb9236d933462052f97b20e6132
|
[
"Apache-2.0"
] | 18
|
2017-05-31T02:52:23.000Z
|
2019-07-05T09:18:34.000Z
|
from sys import stdin
n = stdin.readline().strip().split()[0]
print '%c%c%c' % (n[2], n[1], n[0])
| 19.8
| 39
| 0.575758
| 20
| 99
| 2.85
| 0.65
| 0.070175
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047059
| 0.141414
| 99
| 4
| 40
| 24.75
| 0.623529
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
06fe135075554962876a0666f2af8e84cba34dea
| 59
|
py
|
Python
|
SimPEG/utils/curv_utils.py
|
prisae/simpeg
|
5cdd1b496bddcf3d9acd714b901a57bad6fb1ef9
|
[
"MIT"
] | 358
|
2015-03-11T05:48:41.000Z
|
2022-03-26T02:04:12.000Z
|
SimPEG/utils/curv_utils.py
|
thast/simpeg
|
8021082b8b53f3c08fa87fc085547bdd56437c6b
|
[
"MIT"
] | 885
|
2015-01-19T09:23:48.000Z
|
2022-03-29T12:08:34.000Z
|
SimPEG/utils/curv_utils.py
|
thast/simpeg
|
8021082b8b53f3c08fa87fc085547bdd56437c6b
|
[
"MIT"
] | 214
|
2015-03-11T05:48:43.000Z
|
2022-03-02T01:05:11.000Z
|
from discretize.utils import volTetra, indexCube, faceInfo
| 29.5
| 58
| 0.847458
| 7
| 59
| 7.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101695
| 59
| 1
| 59
| 59
| 0.943396
| 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
|
66076bdcbe8a495d965a689bf35895676d7b8d43
| 56
|
py
|
Python
|
auditing/analyzers/printer/LafPrinter.py
|
fumamatar/laf
|
e81b89aa6697234c7a905230bbfd8eb5f02d5d45
|
[
"BSD-3-Clause"
] | null | null | null |
auditing/analyzers/printer/LafPrinter.py
|
fumamatar/laf
|
e81b89aa6697234c7a905230bbfd8eb5f02d5d45
|
[
"BSD-3-Clause"
] | null | null | null |
auditing/analyzers/printer/LafPrinter.py
|
fumamatar/laf
|
e81b89aa6697234c7a905230bbfd8eb5f02d5d45
|
[
"BSD-3-Clause"
] | null | null | null |
def printPacket(packet):
print(packet.to_json())
| 11.2
| 28
| 0.678571
| 7
| 56
| 5.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 56
| 4
| 29
| 14
| 0.804348
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
660d2917f98f565fedf642517b34e90ee187199a
| 87
|
py
|
Python
|
pastes/apps.py
|
trdwll/tmpfile
|
09c8a97cc5b73db0ed8034a7fb8ffef777e14728
|
[
"MIT"
] | 4
|
2017-09-26T00:46:19.000Z
|
2022-03-01T06:27:24.000Z
|
pastes/apps.py
|
bramz/gridpaste
|
0c41bd26c24cdda98e365acb690de418be59c13b
|
[
"MIT"
] | 54
|
2015-01-09T15:48:15.000Z
|
2019-12-21T22:13:14.000Z
|
pastes/apps.py
|
bramz/gridpaste
|
0c41bd26c24cdda98e365acb690de418be59c13b
|
[
"MIT"
] | 3
|
2017-09-26T00:46:20.000Z
|
2019-03-19T22:42:49.000Z
|
from django.apps import AppConfig
class PastesConfig(AppConfig):
name = 'pastes'
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 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
|
6632cd63d7667f7a0a70b799db68ad248868a6de
| 73
|
py
|
Python
|
configs/swin_transformer/swin_tiny_224_b64x4_300e_imagenet.py
|
LiuXiaoxuanPKU/actnn-mmcls
|
c97d1116d54ddb3f9b1e51baebe25ffb2b3f7b75
|
[
"Apache-2.0"
] | null | null | null |
configs/swin_transformer/swin_tiny_224_b64x4_300e_imagenet.py
|
LiuXiaoxuanPKU/actnn-mmcls
|
c97d1116d54ddb3f9b1e51baebe25ffb2b3f7b75
|
[
"Apache-2.0"
] | null | null | null |
configs/swin_transformer/swin_tiny_224_b64x4_300e_imagenet.py
|
LiuXiaoxuanPKU/actnn-mmcls
|
c97d1116d54ddb3f9b1e51baebe25ffb2b3f7b75
|
[
"Apache-2.0"
] | null | null | null |
_base_ = ['../actnn/swin_tiny_224_b64x4_300e_imagenet.py']
actnn = False
| 24.333333
| 58
| 0.767123
| 11
| 73
| 4.454545
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134328
| 0.082192
| 73
| 2
| 59
| 36.5
| 0.597015
| 0
| 0
| 0
| 0
| 0
| 0.616438
| 0.616438
| 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
|
b08db8cae7f8caee0af0071d9bcc59d078c629f3
| 396
|
py
|
Python
|
web/vicopo/Vicopo/Vicopo.py
|
monoulou/lrm
|
170b84ae4c68d2731fd8533f4918fd219746ba44
|
[
"MIT"
] | 25
|
2016-12-21T11:53:04.000Z
|
2021-04-02T09:12:40.000Z
|
web/vicopo/Vicopo/Vicopo.py
|
monoulou/lrm
|
170b84ae4c68d2731fd8533f4918fd219746ba44
|
[
"MIT"
] | 34
|
2016-08-09T09:02:49.000Z
|
2021-10-13T10:50:50.000Z
|
web/vicopo/Vicopo/Vicopo.py
|
monoulou/lrm
|
170b84ae4c68d2731fd8533f4918fd219746ba44
|
[
"MIT"
] | 6
|
2016-08-31T16:47:40.000Z
|
2021-11-08T10:28:41.000Z
|
import urllib, json
class Vicopo:
@staticmethod
def get(search, protocol = 'https'):
response = urllib.urlopen(protocol + '://vicopo.selfbuild.fr/search/' + str(search))
return json.loads(response.read())
@staticmethod
def http(search):
return Vicopo.get(search, 'http')
@staticmethod
def https(search):
return Vicopo.get(search, 'https')
| 28.285714
| 92
| 0.641414
| 44
| 396
| 5.772727
| 0.454545
| 0.177165
| 0.141732
| 0.165354
| 0.212598
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.224747
| 396
| 13
| 93
| 30.461538
| 0.827362
| 0
| 0
| 0.25
| 0
| 0
| 0.111111
| 0.075758
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.083333
| 0.166667
| 0.666667
| 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
|
b0a02be72e6e13ca804f3114045a17451079aec5
| 37
|
py
|
Python
|
venv/lib/python3.6/encodings/cp500.py
|
JamesMusyoka/Blog
|
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
|
[
"Unlicense"
] | 2
|
2019-04-17T13:35:50.000Z
|
2021-12-21T00:11:36.000Z
|
venv/lib/python3.6/encodings/cp500.py
|
JamesMusyoka/Blog
|
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
|
[
"Unlicense"
] | 2
|
2021-03-31T19:51:24.000Z
|
2021-06-10T23:05:09.000Z
|
venv/lib/python3.6/encodings/cp500.py
|
JamesMusyoka/Blog
|
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
|
[
"Unlicense"
] | 2
|
2019-10-01T08:47:35.000Z
|
2020-07-11T06:32:16.000Z
|
/usr/lib/python3.6/encodings/cp500.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
|
b0a783f24fc6871b68f9488861b7254dfe290367
| 385
|
py
|
Python
|
photologue/templatetags/photologue_tags.py
|
ashishg656/django-photologue
|
602d38d572c44d0312f66d4074eb75fed3941bed
|
[
"BSD-3-Clause"
] | 5
|
2015-11-05T10:41:07.000Z
|
2021-01-05T17:07:17.000Z
|
photologue/templatetags/photologue_tags.py
|
ashishg656/django-photologue
|
602d38d572c44d0312f66d4074eb75fed3941bed
|
[
"BSD-3-Clause"
] | 1
|
2015-03-28T12:10:54.000Z
|
2015-03-28T12:10:54.000Z
|
photologue/templatetags/photologue_tags.py
|
ashishg656/django-photologue
|
602d38d572c44d0312f66d4074eb75fed3941bed
|
[
"BSD-3-Clause"
] | 1
|
2019-11-08T07:19:39.000Z
|
2019-11-08T07:19:39.000Z
|
from django import template
register = template.Library()
@register.inclusion_tag('photologue/tags/next_in_gallery.html')
def next_in_gallery(photo, gallery):
return {'photo': photo.get_next_in_gallery(gallery)}
@register.inclusion_tag('photologue/tags/prev_in_gallery.html')
def previous_in_gallery(photo, gallery):
return {'photo': photo.get_previous_in_gallery(gallery)}
| 32.083333
| 63
| 0.797403
| 53
| 385
| 5.490566
| 0.377358
| 0.185567
| 0.134021
| 0.206186
| 0.508591
| 0.274914
| 0.274914
| 0.274914
| 0
| 0
| 0
| 0
| 0.083117
| 385
| 11
| 64
| 35
| 0.824363
| 0
| 0
| 0
| 0
| 0
| 0.212987
| 0.187013
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.25
| 0.625
| 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
|
b0b3a1f0e3eafe53c54ec2c9f2861e99693266ac
| 287
|
py
|
Python
|
scripts/train.py
|
m-bain/pytorch-image-models
|
b85951c237e42ed50c3193b77edf4c58e686e3bb
|
[
"Apache-2.0"
] | 1
|
2021-06-24T14:45:48.000Z
|
2021-06-24T14:45:48.000Z
|
scripts/train.py
|
m-bain/pytorch-image-models
|
b85951c237e42ed50c3193b77edf4c58e686e3bb
|
[
"Apache-2.0"
] | null | null | null |
scripts/train.py
|
m-bain/pytorch-image-models
|
b85951c237e42ed50c3193b77edf4c58e686e3bb
|
[
"Apache-2.0"
] | null | null | null |
from torchvision import datasets
ds = datasets.UCF101(root='/datasets/UCF101-24',
annotation_path='/datasets/UCF101-24/UCF101_24Action_Detection_Annotations/UCF101_24Action_Detection_Annotations',
frames_per_clip=4)
import pdb; pdb.set_trace()
| 41
| 135
| 0.721254
| 33
| 287
| 5.969697
| 0.606061
| 0.213198
| 0.162437
| 0.345178
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 0.191638
| 287
| 7
| 136
| 41
| 0.74569
| 0
| 0
| 0
| 0
| 0
| 0.395833
| 0.329861
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b0caeb9cf854f389ed4af55d465e07a28bd9de2c
| 50
|
py
|
Python
|
quickSelect.py
|
ThomasB123/python
|
c02eb51a03bf1dfe1cc1d8ad01ef9c9a76f40e9d
|
[
"MIT"
] | 2
|
2019-12-11T01:52:36.000Z
|
2020-03-05T20:19:39.000Z
|
quickSelect.py
|
ThomasB123/Python
|
c02eb51a03bf1dfe1cc1d8ad01ef9c9a76f40e9d
|
[
"MIT"
] | null | null | null |
quickSelect.py
|
ThomasB123/Python
|
c02eb51a03bf1dfe1cc1d8ad01ef9c9a76f40e9d
|
[
"MIT"
] | null | null | null |
## QuickSelect algorithm
# From Andrei's ADS notes
| 25
| 25
| 0.78
| 7
| 50
| 5.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14
| 50
| 2
| 25
| 25
| 0.906977
| 0.9
| 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
|
b0d23c10d797845b46afb67ab9063da507b7b963
| 122
|
py
|
Python
|
test/test_canary.py
|
dglmoore/Neet
|
3486ce890ff296c6dc20f1fa04a8512786faff5e
|
[
"MIT"
] | 4
|
2020-04-07T14:20:02.000Z
|
2021-01-17T01:56:28.000Z
|
test/test_canary.py
|
akiaei/Neet
|
a7988575e011927cf61bf2eec7e390ae21c56cb1
|
[
"MIT"
] | 165
|
2017-02-24T21:09:19.000Z
|
2021-12-14T04:17:01.000Z
|
test/test_canary.py
|
akiaei/Neet
|
a7988575e011927cf61bf2eec7e390ae21c56cb1
|
[
"MIT"
] | 19
|
2017-02-15T22:01:14.000Z
|
2020-01-28T17:10:54.000Z
|
import unittest
class TestCanary(unittest.TestCase):
def test_add_one_two(self):
self.assertEqual(3, 1 + 2)
| 17.428571
| 36
| 0.704918
| 17
| 122
| 4.882353
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030612
| 0.196721
| 122
| 6
| 37
| 20.333333
| 0.816327
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
b0f89b4eab01a5a2464fb2704e66ff6caeb8bb9d
| 197
|
py
|
Python
|
gan/__init__.py
|
vab10266/wolfGANg_Vaud
|
254634cd2eb9043d282236d3af86ba7938d92319
|
[
"MIT"
] | 1
|
2022-01-28T00:03:19.000Z
|
2022-01-28T00:03:19.000Z
|
gan/__init__.py
|
vab10266/wolfGANg_Vaud
|
254634cd2eb9043d282236d3af86ba7938d92319
|
[
"MIT"
] | null | null | null |
gan/__init__.py
|
vab10266/wolfGANg_Vaud
|
254634cd2eb9043d282236d3af86ba7938d92319
|
[
"MIT"
] | 1
|
2021-11-23T00:49:26.000Z
|
2021-11-23T00:49:26.000Z
|
from .temp_network import TemporalNetwork
from .bar_generator import BarGenerator
from .generator import MuseGenerator
from .critic import MuseCritic
from .utils import Reshape, initialize_weights
| 32.833333
| 46
| 0.862944
| 24
| 197
| 6.958333
| 0.625
| 0.179641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106599
| 197
| 5
| 47
| 39.4
| 0.948864
| 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
|
7c029c671b386249f3334f843dcac9f2d1572b63
| 97
|
py
|
Python
|
Udemy/REST-Django-VueJS/C3-practice/03-demo/job_board/jobs/admin.py
|
runzezhang/MOOCs
|
8df8c7adc5af3d7b085be01ae9b6963fe33acd68
|
[
"Apache-2.0"
] | 3
|
2019-04-05T18:59:53.000Z
|
2020-09-24T09:05:46.000Z
|
Udemy/REST-Django-VueJS/C3-practice/03-demo/job_board/jobs/admin.py
|
runzezhang/MOOCs
|
8df8c7adc5af3d7b085be01ae9b6963fe33acd68
|
[
"Apache-2.0"
] | null | null | null |
Udemy/REST-Django-VueJS/C3-practice/03-demo/job_board/jobs/admin.py
|
runzezhang/MOOCs
|
8df8c7adc5af3d7b085be01ae9b6963fe33acd68
|
[
"Apache-2.0"
] | 1
|
2019-02-10T13:35:36.000Z
|
2019-02-10T13:35:36.000Z
|
from django.contrib import admin
from jobs.models import JobOffer
admin.site.register(JobOffer)
| 19.4
| 32
| 0.835052
| 14
| 97
| 5.785714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103093
| 97
| 4
| 33
| 24.25
| 0.931034
| 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
|
7c05f8f9de5a0ec11f092bf88c0dce04ee96638a
| 94
|
py
|
Python
|
OutputStreams/IOutputStream.py
|
shaharluftig/DoorKeeper
|
768382ac5bca2cc4330b06c1ac561a2675c791e2
|
[
"MIT"
] | 1
|
2020-10-04T16:48:33.000Z
|
2020-10-04T16:48:33.000Z
|
OutputStreams/IOutputStream.py
|
shaharluftig/DoorKeeper
|
768382ac5bca2cc4330b06c1ac561a2675c791e2
|
[
"MIT"
] | null | null | null |
OutputStreams/IOutputStream.py
|
shaharluftig/DoorKeeper
|
768382ac5bca2cc4330b06c1ac561a2675c791e2
|
[
"MIT"
] | null | null | null |
class IOutputStream:
def notify(self, *args, **kwargs):
raise NotImplementedError
| 23.5
| 38
| 0.691489
| 9
| 94
| 7.222222
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.212766
| 94
| 3
| 39
| 31.333333
| 0.878378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9fe1da013bb2b88472677cf0ee9776535de90ff5
| 248
|
py
|
Python
|
utils/pickle_handler.py
|
soujiro0725/finance-stats
|
3bb86ec7cb91e264f8da532f3a92ceb4c76d1a77
|
[
"MIT"
] | null | null | null |
utils/pickle_handler.py
|
soujiro0725/finance-stats
|
3bb86ec7cb91e264f8da532f3a92ceb4c76d1a77
|
[
"MIT"
] | null | null | null |
utils/pickle_handler.py
|
soujiro0725/finance-stats
|
3bb86ec7cb91e264f8da532f3a92ceb4c76d1a77
|
[
"MIT"
] | null | null | null |
import pickle
def save_dict(obj, name ):
with open('data/'+ name + '.pkl', 'wb') as f:
pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)
def load_dict(name ):
with open('data/' + name + '.pkl', 'rb') as f:
return pickle.load(f)
| 27.555556
| 52
| 0.596774
| 38
| 248
| 3.815789
| 0.526316
| 0.110345
| 0.165517
| 0.22069
| 0.317241
| 0.317241
| 0
| 0
| 0
| 0
| 0
| 0
| 0.225806
| 248
| 9
| 53
| 27.555556
| 0.755208
| 0
| 0
| 0
| 0
| 0
| 0.088353
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.571429
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9fe3f2bbe21d3c400cabfa1e178a36e30e249a5b
| 45
|
py
|
Python
|
apps/oauth/__init__.py
|
sbybfai/izone
|
7e5f868737a1ffdde11812bf094f241e97f62793
|
[
"MIT"
] | 1,009
|
2018-03-18T09:50:15.000Z
|
2022-03-28T13:35:31.000Z
|
apps/oauth/__init__.py
|
weibobo/izone
|
66eb03f1e263ab441919d144cfae2a6d043b8d45
|
[
"MIT"
] | 67
|
2018-05-01T02:49:26.000Z
|
2022-03-18T09:45:17.000Z
|
apps/oauth/__init__.py
|
weibobo/izone
|
66eb03f1e263ab441919d144cfae2a6d043b8d45
|
[
"MIT"
] | 413
|
2018-03-31T15:30:53.000Z
|
2022-03-31T12:26:36.000Z
|
default_app_config = 'oauth.apps.OauthConfig'
| 45
| 45
| 0.844444
| 6
| 45
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044444
| 45
| 1
| 45
| 45
| 0.837209
| 0
| 0
| 0
| 0
| 0
| 0.478261
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9fffbf1f1781c5231dd4f8dec9b5d14e75a434f3
| 163
|
py
|
Python
|
gui/setup.py
|
stvnrhodes/CNCAirbrush
|
9ad9721573130d601276ca9f0447132fd8cdde90
|
[
"MIT"
] | 1
|
2018-06-20T07:30:12.000Z
|
2018-06-20T07:30:12.000Z
|
gui/setup.py
|
stvnrhodes/CNCAirbrush
|
9ad9721573130d601276ca9f0447132fd8cdde90
|
[
"MIT"
] | null | null | null |
gui/setup.py
|
stvnrhodes/CNCAirbrush
|
9ad9721573130d601276ca9f0447132fd8cdde90
|
[
"MIT"
] | null | null | null |
from distutils.core import setup
import py2exe
"""console=['gui.py'], """
setup(windows=[{"script": "gui.py",
"icon_resources":[(0, "cal.ico")]}])
| 32.6
| 52
| 0.588957
| 20
| 163
| 4.75
| 0.8
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014815
| 0.171779
| 163
| 5
| 52
| 32.6
| 0.688889
| 0
| 0
| 0
| 0
| 0
| 0.23913
| 0
| 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
|
b022cc655dddf266d6f028333579f731d510cbd8
| 2,856
|
py
|
Python
|
subdom.py
|
KmB-new/Subdom
|
a9d1313dd441a5a66bbc377737ef6f98529feb68
|
[
"Apache-2.0"
] | null | null | null |
subdom.py
|
KmB-new/Subdom
|
a9d1313dd441a5a66bbc377737ef6f98529feb68
|
[
"Apache-2.0"
] | null | null | null |
subdom.py
|
KmB-new/Subdom
|
a9d1313dd441a5a66bbc377737ef6f98529feb68
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
#coding : utf-8 -*-
#python3
import requests, os, sys, time, datetime
os.system("clear")
print ("""\x1b[00m\x1b[96m ╔══════════════════════════════╦════════════════╗
║ \x1b[1;91m╦ ╦ ╦ ╔═╗ ╔═╗ ╔═╗ ╔═╗ ╔═╗ \x1b[1;96m║\x1b[41;92m KMB • ID \x1b[0m\x1b[1;96m║
║ \x1b[1;91m║ ╚-╣ • ╠╣ ║ ║ ║ ║ ║ \x1b[1;96m╠\x1b[41;96m════🛡️══════🛡️════\x1b[0m\x1b[96m╣
║ \x1b[1;97m╩╝ ╩ ╚═╝ ╩ ╩ ╚═╝ ╩ \x1b[93m404\x1b[1;96m║\x1b[1;47;91m© \x1b[94mcopyright \x1b[95m2019\x1b[0m\x1b[1;96m║
╚══════════════════════════════╩════════════════╝\033[97m\n
Code = PYTHON 3
Contack = https://t.me/KMBL4
Upload = 21-03-2020\033[0m""")
time.sleep(3)
os.system("clear")
Banner=(""" \033[95mB \033[91m██\033[96m╗ \033[91m██\033[96m╗ \033[91m██████\033[96m╗ \033[91m███████\033[96m╗\033[91m████████\033[96m╗
\033[95m U \033[91m██\033[96m║ \033[91m██\033[96m║\033[91m██\033[96m╔═══\033[91m██\033[96m╗\033[91m██\033[96m╔════╝╚══\033[91m██\033[96m╔══╝
\033[95m G \033[91m███████\033[96m║\033[91m██\033[96m║ \033[91m██\033[96m║\033[91m███████\033[96m╗ \033[91m██\033[96m║
\033[97m██\033[96m╔══\033[97m██\033[96m║\033[97m██\033[96m║ \033[97m██\033[96m║╚════\033[97m██\033[96m║ \033[97m██\033[96m║
\033[97m██\033[96m║ \033[97m██\033[96m║╚\033[97m██████\033[96m╔╝\033[97m███████\033[96m║ \033[97m██\033[96m║
╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝
\033[94m 🔛 TOOLS CHECKER \033[92mSUBDOMAIN 🔛
\x1b[1;41;96m💰NOOBY TEAM INDONESIA \x1b[1;47;91m KMB •ID {L4•ERROR}💰\x1b[0m""")
def main():
os.system("clear")
print (Banner)
print (44*"\033[1;96m═")
domain = input("\033[93m[✅] \033[94mDomain \033[97m(exc: facebook.com)\033[91m :\033[92m ")
print ("\033[93m[❕] \033[94mPlease wait\033[91m !!!")
print ("\033[93m[⏬] \033[94mProses\033[97m ... ")
print (44*"\033[1;96m═")
try:
url = ("https://api.indoxploit.or.id/domain/{}".format(domain))
data = requests.get(url).json()
ambil_data = data['data']['subdomains']
print ("\033[93m[🆗] \033[97mScan results \033[91m: ")
for i in ambil_data:
print("\033[92m"+i)
except IOError:
print ("\033[1;91m[!] No connection")
input("\n\033[1;91m[ \033[1;97mBack \033[1;91m]")
main()
except KeyError:
print ("\033[1;91m[!] No Result")
input("\n\033[1;91m[ \033[1;97mBack \033[1;91m]")
pilih(main)
def pilih(main):
opsi = input("\033[1;91m[👍] \033[1;97mScan Domain other (try again) ? \033[1;92m[Y/N]\033[1;91m:\033[1;96m ")
if opsi =="":
print ("\033[1;91m[!] Wrong")
pilih(main)
elif opsi =="Y" or opsi =="y":
os.system("clear")
main()
elif opsi =="N" or opsi =="n":
print (" THANKS for Use... By KMB.ID")
os.system("exit")
else:
print ("\033[1;91m[!] Wrong")
pilih(main)
if __name__ == '__main__':
main()
pilih(main)
| 40.8
| 145
| 0.52381
| 546
| 2,856
| 3.349817
| 0.269231
| 0.088573
| 0.08748
| 0.06561
| 0.338436
| 0.288682
| 0.251504
| 0.223073
| 0.194095
| 0.169492
| 0
| 0.248322
| 0.165266
| 2,856
| 70
| 146
| 40.8
| 0.375
| 0.015756
| 0
| 0.283333
| 0
| 0.216667
| 0.710584
| 0.280292
| 0
| 0
| 0
| 0
| 0
| 1
| 0.033333
| false
| 0
| 0.016667
| 0
| 0.05
| 0.216667
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b05010b01197afbde9080c32bab7e8c37cce2eff
| 1,101
|
py
|
Python
|
challenges/2021-07-20-balanced-brackets/solutions/python/laurelin/laurelin_test.py
|
JenniferToops/CodingDojo
|
25f594a7ce0600d885e2e5665d8a70e9529720d3
|
[
"MIT"
] | 34
|
2021-03-26T15:07:05.000Z
|
2022-02-28T12:56:38.000Z
|
challenges/2021-07-20-balanced-brackets/solutions/python/laurelin/laurelin_test.py
|
JenniferToops/CodingDojo
|
25f594a7ce0600d885e2e5665d8a70e9529720d3
|
[
"MIT"
] | 129
|
2021-03-26T15:45:40.000Z
|
2022-03-29T01:39:11.000Z
|
challenges/2021-07-20-balanced-brackets/solutions/python/laurelin/laurelin_test.py
|
JenniferToops/CodingDojo
|
25f594a7ce0600d885e2e5665d8a70e9529720d3
|
[
"MIT"
] | 51
|
2021-03-26T15:24:10.000Z
|
2022-03-28T22:56:43.000Z
|
import laurelin
def test_1_brackets():
output = laurelin.balanced_brackets("[[]]({}[])")
assert output == True
def test_2_brackets():
output = laurelin.balanced_brackets("[[({}[])")
assert output == False
def test_3_brackets():
output = laurelin.balanced_brackets("")
assert output == True
def test_4_brackets():
output = laurelin.balanced_brackets("(5 * 3) + [10 / {2}]")
assert output == True
def test_5_brackets():
output = laurelin.balanced_brackets(")]})]}")
assert output == False
def test_6_brackets():
output = laurelin.balanced_brackets("([{(((")
assert output == False
def test_7_brackets():
output = laurelin.balanced_brackets("no brackets at all")
assert output == True
def test_8_brackets():
output = laurelin.balanced_brackets(">>> (<> are not brackets) >>>")
assert output == True
def test_9_brackets():
output = laurelin.balanced_brackets("[///\\|||]")
assert output == True
def test_10_brackets():
output = laurelin.balanced_brackets("!@#$%%^&*(;',.<>?/\|~`'")
assert output == False
| 21.173077
| 72
| 0.63851
| 123
| 1,101
| 5.471545
| 0.203252
| 0.104012
| 0.326895
| 0.445765
| 0.913819
| 0.676077
| 0.630015
| 0.630015
| 0.548291
| 0.548291
| 0
| 0.017877
| 0.187103
| 1,101
| 51
| 73
| 21.588235
| 0.734078
| 0
| 0
| 0.322581
| 0
| 0
| 0.118074
| 0.02089
| 0
| 0
| 0
| 0
| 0.322581
| 1
| 0.322581
| false
| 0
| 0.032258
| 0
| 0.354839
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 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
|
b0717591ead5e2692ba777928a69f7adc5749eab
| 76
|
py
|
Python
|
docs/test.py
|
jelitox/proxylist
|
be4d3d595b8eb7ec48ca132d49a65dca20b6eee7
|
[
"Apache-2.0"
] | null | null | null |
docs/test.py
|
jelitox/proxylist
|
be4d3d595b8eb7ec48ca132d49a65dca20b6eee7
|
[
"Apache-2.0"
] | null | null | null |
docs/test.py
|
jelitox/proxylist
|
be4d3d595b8eb7ec48ca132d49a65dca20b6eee7
|
[
"Apache-2.0"
] | 1
|
2022-02-26T08:46:35.000Z
|
2022-02-26T08:46:35.000Z
|
from proxylists import get_proxies
proxies = get_proxies()
print(proxies)
| 12.666667
| 34
| 0.802632
| 10
| 76
| 5.9
| 0.6
| 0.338983
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 76
| 5
| 35
| 15.2
| 0.893939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
c65d644321425f1d20c46f00fdc168596786eebd
| 109
|
py
|
Python
|
bugswarm/common/credentials.py
|
BugSwarm/common
|
40fac88c29f4adc1f8ba0973c1a120d1ba1fad2a
|
[
"BSD-3-Clause"
] | 1
|
2020-02-27T00:50:05.000Z
|
2020-02-27T00:50:05.000Z
|
bugswarm/common/credentials.py
|
BugSwarm/common
|
40fac88c29f4adc1f8ba0973c1a120d1ba1fad2a
|
[
"BSD-3-Clause"
] | 9
|
2019-03-20T19:04:30.000Z
|
2020-02-06T19:57:20.000Z
|
bugswarm/common/credentials.py
|
BugSwarm/common
|
40fac88c29f4adc1f8ba0973c1a120d1ba1fad2a
|
[
"BSD-3-Clause"
] | 2
|
2019-12-13T22:13:45.000Z
|
2021-11-10T10:48:38.000Z
|
# DockerHub
DOCKER_HUB_USERNAME = 'bugswarm'
DOCKER_HUB_REPO = '{}/{}'.format(DOCKER_HUB_USERNAME, 'images')
| 27.25
| 63
| 0.752294
| 13
| 109
| 5.846154
| 0.615385
| 0.355263
| 0.447368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082569
| 109
| 3
| 64
| 36.333333
| 0.76
| 0.082569
| 0
| 0
| 0
| 0
| 0.193878
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
|
c68621d69ffcf5e91ac7a7870ce1a531f9955490
| 179
|
py
|
Python
|
test/cocotb/signed_adder/adder_model.py
|
zinka/DSP-BB
|
2bd393cebd81162f185417468fb9667395c59953
|
[
"MIT"
] | 2
|
2020-06-12T12:16:53.000Z
|
2022-03-29T22:27:01.000Z
|
test/cocotb/signed_adder/adder_model.py
|
zinka/DSP-BB
|
2bd393cebd81162f185417468fb9667395c59953
|
[
"MIT"
] | null | null | null |
test/cocotb/signed_adder/adder_model.py
|
zinka/DSP-BB
|
2bd393cebd81162f185417468fb9667395c59953
|
[
"MIT"
] | 1
|
2020-09-01T16:06:10.000Z
|
2020-09-01T16:06:10.000Z
|
def adder_model(a, b):
"""
My golden reference model
"""
return my_adder(a, b)
def my_adder(a, b):
"""
My golden reference model
"""
return a + b
| 16.272727
| 29
| 0.541899
| 26
| 179
| 3.615385
| 0.346154
| 0.085106
| 0.085106
| 0.212766
| 0.638298
| 0.638298
| 0.638298
| 0
| 0
| 0
| 0
| 0
| 0.324022
| 179
| 11
| 30
| 16.272727
| 0.77686
| 0.284916
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c68c2b908cdbac077cd4da0e7a7996e9837eb679
| 260
|
py
|
Python
|
hashlookup/managers.py
|
LD250/django-models-hashlookup
|
bf7aff236d0bbabc951a7eec4ba18ff925d411b3
|
[
"MIT"
] | null | null | null |
hashlookup/managers.py
|
LD250/django-models-hashlookup
|
bf7aff236d0bbabc951a7eec4ba18ff925d411b3
|
[
"MIT"
] | null | null | null |
hashlookup/managers.py
|
LD250/django-models-hashlookup
|
bf7aff236d0bbabc951a7eec4ba18ff925d411b3
|
[
"MIT"
] | null | null | null |
from querysets import HashFilterQuerySet
from django.db import models
class ManagerHashMixin(object):
def get_queryset(self):
return HashFilterQuerySet(self.model, using=self._db)
class ManagerHash(ManagerHashMixin, models.Manager):
pass
| 18.571429
| 61
| 0.773077
| 29
| 260
| 6.862069
| 0.689655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157692
| 260
| 13
| 62
| 20
| 0.908676
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0.142857
| 0.285714
| 0.142857
| 0.857143
| 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
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
c6907130a9cbd367e85c8a66121aaebce3e2a81c
| 959
|
py
|
Python
|
_solutions/design-patterns/behavioral/designpatterns_state.py
|
sages-pl/2022-01-pythonsqlalchemy-aptiv
|
1d6d856608e9dbe25b139e8968c48b7f46753b84
|
[
"MIT"
] | null | null | null |
_solutions/design-patterns/behavioral/designpatterns_state.py
|
sages-pl/2022-01-pythonsqlalchemy-aptiv
|
1d6d856608e9dbe25b139e8968c48b7f46753b84
|
[
"MIT"
] | null | null | null |
_solutions/design-patterns/behavioral/designpatterns_state.py
|
sages-pl/2022-01-pythonsqlalchemy-aptiv
|
1d6d856608e9dbe25b139e8968c48b7f46753b84
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class Language(ABC):
@abstractmethod
def hello(self) -> str: ...
@abstractmethod
def goodbye(self) -> str: ...
class Polish(Language):
def goodbye(self) -> str:
return 'Do widzenia'
def hello(self) -> str:
return 'Cześć'
class English(Language):
def goodbye(self) -> str:
return 'Goodbye'
def hello(self) -> str:
return 'Hello'
class Russian(Language):
def goodbye(self) -> str:
return 'До свидания'
def hello(self) -> str:
return 'Здравствуй'
class Chinese(Language):
def goodbye(self) -> str:
return '再见'
def hello(self) -> str:
return '你好'
class Translation:
__language: Language
def __init__(self, language: Language):
self.__language = language
def goodbye(self):
return self.__language.goodbye()
def hello(self):
return self.__language.hello()
| 17.125
| 43
| 0.601668
| 106
| 959
| 5.330189
| 0.245283
| 0.123894
| 0.184071
| 0.132743
| 0.368142
| 0.219469
| 0
| 0
| 0
| 0
| 0
| 0
| 0.280501
| 959
| 55
| 44
| 17.436364
| 0.818841
| 0
| 0
| 0.294118
| 0
| 0
| 0.055324
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.382353
| false
| 0
| 0.029412
| 0.294118
| 0.911765
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c6a705247fd77d44224bfda7c1c1b29378ed71a8
| 218
|
py
|
Python
|
packages/pyright-internal/src/tests/samples/self3.py
|
martindemello/pyright
|
4fe3f1f7c08f139715701fdf746183062b5165ff
|
[
"MIT"
] | 4,391
|
2019-05-07T01:18:57.000Z
|
2022-03-31T20:45:44.000Z
|
packages/pyright-internal/src/tests/samples/self3.py
|
martindemello/pyright
|
4fe3f1f7c08f139715701fdf746183062b5165ff
|
[
"MIT"
] | 2,740
|
2019-05-07T03:29:30.000Z
|
2022-03-31T12:57:46.000Z
|
packages/pyright-internal/src/tests/samples/self3.py
|
martindemello/pyright
|
4fe3f1f7c08f139715701fdf746183062b5165ff
|
[
"MIT"
] | 455
|
2019-05-07T12:55:14.000Z
|
2022-03-31T17:09:15.000Z
|
# This sample tests the special-case handling of Self when comparing
# two functions whose signatures differ only in the Self scope.
class SomeClass:
def __str__(self) -> str:
...
__repr__ = __str__
| 21.8
| 68
| 0.701835
| 29
| 218
| 4.862069
| 0.827586
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233945
| 218
| 9
| 69
| 24.222222
| 0.844311
| 0.587156
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
|
c6ca8c502e123e8003027c465b19e620ea1a47fd
| 179
|
py
|
Python
|
Darlington/phase1/python Basic 1/day 15 solution/qtn6.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 6
|
2020-05-23T19:53:25.000Z
|
2021-05-08T20:21:30.000Z
|
Darlington/phase1/python Basic 1/day 15 solution/qtn6.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 8
|
2020-05-14T18:53:12.000Z
|
2020-07-03T00:06:20.000Z
|
Darlington/phase1/python Basic 1/day 15 solution/qtn6.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 39
|
2020-05-10T20:55:02.000Z
|
2020-09-12T17:40:59.000Z
|
#program to find files and skip directories of a given directory.
import os
print([f for f in os.listdir('/home/students') if os.path.isfile(os.path.join('/home/students', f))])
| 35.8
| 101
| 0.731844
| 32
| 179
| 4.09375
| 0.75
| 0.183206
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122905
| 179
| 4
| 102
| 44.75
| 0.834395
| 0.357542
| 0
| 0
| 0
| 0
| 0.247788
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
c6da459bbb6896c19b9cab9aa7e871c75460268d
| 75
|
py
|
Python
|
python/taichi/dynamics/__init__.py
|
gonnavis/taichi
|
ba1898643e4548a23ecae340e963614b28b8a103
|
[
"MIT"
] | 2
|
2019-06-25T02:12:37.000Z
|
2019-06-25T02:12:48.000Z
|
python/taichi/dynamics/__init__.py
|
gonnavis/taichi
|
ba1898643e4548a23ecae340e963614b28b8a103
|
[
"MIT"
] | null | null | null |
python/taichi/dynamics/__init__.py
|
gonnavis/taichi
|
ba1898643e4548a23ecae340e963614b28b8a103
|
[
"MIT"
] | 1
|
2021-11-29T22:47:24.000Z
|
2021-11-29T22:47:24.000Z
|
from .mpm import MPM
from .simulation import Simulation
__all__ = ['MPM']
| 15
| 34
| 0.746667
| 10
| 75
| 5.2
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 75
| 4
| 35
| 18.75
| 0.825397
| 0
| 0
| 0
| 0
| 0
| 0.04
| 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
|
c6da75f3a54bbe81adc9673271bbac0aebe6f1ff
| 1,576
|
py
|
Python
|
test/test_rendered_element_cache.py
|
Garmelon/bowl
|
4a2eac58fea5111bfc1ab5760c27d6b592e10c2e
|
[
"MIT"
] | 1
|
2020-05-04T01:23:25.000Z
|
2020-05-04T01:23:25.000Z
|
test/test_rendered_element_cache.py
|
Garmelon/bowl
|
4a2eac58fea5111bfc1ab5760c27d6b592e10c2e
|
[
"MIT"
] | 1
|
2019-10-23T17:17:12.000Z
|
2019-10-23T17:17:12.000Z
|
test/test_rendered_element_cache.py
|
Garmelon/bowl
|
4a2eac58fea5111bfc1ab5760c27d6b592e10c2e
|
[
"MIT"
] | null | null | null |
import unittest
from bowl import Element, RenderedElementCache
__all__ = ["TestRenderedElementCache"]
class TestRenderedElementCache(unittest.TestCase):
def setUp(self):
self.cache = RenderedElementCache()
self.e1 = Element("e1", None)
self.e2 = Element("e2", "e1")
self.e3 = Element("e3", "xyz")
self.e1_2 = Element("e1", "bla")
def test_adding_and_getting(self):
self.assertEqual(self.cache.get("e1"), None)
self.assertEqual(self.cache.get("e2"), None)
self.cache.add(self.e1)
self.assertEqual(self.cache.get("e1"), self.e1)
self.cache.add(self.e2)
self.assertEqual(self.cache.get("e2"), self.e2)
self.cache.add(self.e1_2)
self.assertEqual(self.cache.get("e1"), self.e1_2)
self.assertEqual(self.cache.get("e3"), None)
self.cache.add(self.e3)
self.assertEqual(self.cache.get("e3"), self.e3)
def test_invalidating(self):
self.assertEqual(self.cache.get("e1"), None)
self.assertEqual(self.cache.get("e2"), None)
self.cache.add(self.e1)
self.cache.add(self.e2)
self.assertEqual(self.cache.get("e1"), self.e1)
self.assertEqual(self.cache.get("e2"), self.e2)
self.cache.invalidate("e1")
self.assertEqual(self.cache.get("e1"), None)
self.assertEqual(self.cache.get("e2"), self.e2)
self.cache.add(self.e1)
self.cache.invalidate_all()
self.assertEqual(self.cache.get("e1"), None)
self.assertEqual(self.cache.get("e2"), None)
| 30.901961
| 57
| 0.623731
| 207
| 1,576
| 4.690821
| 0.144928
| 0.23172
| 0.293512
| 0.370752
| 0.676622
| 0.656025
| 0.624099
| 0.61277
| 0.546859
| 0.512873
| 0
| 0.033816
| 0.211929
| 1,576
| 50
| 58
| 31.52
| 0.747987
| 0
| 0
| 0.472222
| 0
| 0
| 0.045685
| 0.015228
| 0
| 0
| 0
| 0
| 0.416667
| 1
| 0.083333
| false
| 0
| 0.055556
| 0
| 0.166667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
05d6363952d86c2a7662d657dcd9d3180b1ab6c1
| 193
|
py
|
Python
|
Testing/Base/NodeTest.py
|
Biomechanical-ToolKit/BTKPython
|
62c226367ba69b29576ea8fed45afdb9d0f8f946
|
[
"Barr",
"Unlicense"
] | 8
|
2016-07-21T20:29:27.000Z
|
2022-01-21T12:30:08.000Z
|
Testing/Base/NodeTest.py
|
Biomechanical-ToolKit/BTKPython
|
62c226367ba69b29576ea8fed45afdb9d0f8f946
|
[
"Barr",
"Unlicense"
] | 2
|
2016-07-19T09:32:12.000Z
|
2020-01-22T12:24:59.000Z
|
Testing/Base/NodeTest.py
|
Biomechanical-ToolKit/BTKPython
|
62c226367ba69b29576ea8fed45afdb9d0f8f946
|
[
"Barr",
"Unlicense"
] | 7
|
2016-12-05T09:28:35.000Z
|
2021-04-10T14:42:47.000Z
|
from _btk import btkBase
import unittest
class NodeTest(unittest.TestCase):
def test_Constructor(self):
test = btkBase.btkNode('test')
self.assertEqual(test.name(), 'test')
| 27.571429
| 45
| 0.704663
| 23
| 193
| 5.826087
| 0.652174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181347
| 193
| 7
| 45
| 27.571429
| 0.848101
| 0
| 0
| 0
| 0
| 0
| 0.041237
| 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
|
05eb7bbdae290053108c3746f56bf06da58107aa
| 134
|
py
|
Python
|
reddit2telegram/channels/~inactive/reddit_wtf/app.py
|
CaringCat/reddit2telegram
|
aa3195d9964dfe0f5d822b37a41d567d1af423b7
|
[
"MIT"
] | 187
|
2016-09-20T09:15:54.000Z
|
2022-03-29T12:22:33.000Z
|
reddit2telegram/channels/~inactive/reddit_wtf/app.py
|
CaringCat/reddit2telegram
|
aa3195d9964dfe0f5d822b37a41d567d1af423b7
|
[
"MIT"
] | 84
|
2016-09-22T14:25:07.000Z
|
2022-03-19T01:26:17.000Z
|
reddit2telegram/channels/~inactive/reddit_wtf/app.py
|
CaringCat/reddit2telegram
|
aa3195d9964dfe0f5d822b37a41d567d1af423b7
|
[
"MIT"
] | 172
|
2016-09-21T15:39:39.000Z
|
2022-03-16T15:15:58.000Z
|
#encoding:utf-8
subreddit = 'wtf'
t_channel = '@reddit_wtf'
def send_post(submission, r2t):
return r2t.send_simple(submission)
| 14.888889
| 38
| 0.731343
| 19
| 134
| 4.947368
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026087
| 0.141791
| 134
| 8
| 39
| 16.75
| 0.791304
| 0.104478
| 0
| 0
| 0
| 0
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
af0857d5daa0da7a2c28501ea0cc93371df41511
| 143
|
py
|
Python
|
main.py
|
asmyczek/indawo
|
34e79255c6681f78123b82cfab63ee0c1cfbb946
|
[
"MIT"
] | null | null | null |
main.py
|
asmyczek/indawo
|
34e79255c6681f78123b82cfab63ee0c1cfbb946
|
[
"MIT"
] | null | null | null |
main.py
|
asmyczek/indawo
|
34e79255c6681f78123b82cfab63ee0c1cfbb946
|
[
"MIT"
] | null | null | null |
from indawo.main import start_service
import time
import gc
import ntptime
time.sleep_ms(100)
gc.collect()
ntptime.settime()
start_service()
| 13
| 37
| 0.804196
| 22
| 143
| 5.090909
| 0.636364
| 0.214286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023622
| 0.111888
| 143
| 11
| 38
| 13
| 0.858268
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
af1753ee81d6a202da416cb6aa9e83b82b0f7670
| 37
|
py
|
Python
|
django/tests/auth_tests/templates/registration/password_reset_email.html.py
|
roshanba/mangal
|
f7b428811dc07214009cc33f0beb665ead402038
|
[
"bzip2-1.0.6",
"MIT"
] | null | null | null |
django/tests/auth_tests/templates/registration/password_reset_email.html.py
|
roshanba/mangal
|
f7b428811dc07214009cc33f0beb665ead402038
|
[
"bzip2-1.0.6",
"MIT"
] | null | null | null |
django/tests/auth_tests/templates/registration/password_reset_email.html.py
|
roshanba/mangal
|
f7b428811dc07214009cc33f0beb665ead402038
|
[
"bzip2-1.0.6",
"MIT"
] | null | null | null |
XXXXXXXXXXXX
XXXXX XXXXX XXXXXXXX XX
| 12.333333
| 23
| 0.864865
| 5
| 37
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 37
| 2
| 24
| 18.5
| 1
| 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
|
af2324e1468e183826bf24dbc1ed1062269b4a72
| 178
|
py
|
Python
|
form_auto_fill_in/__init__.py
|
hurukou0308/Form-Auto-Fill-In
|
d516774b380530b6bab739676507d6aa805924d4
|
[
"MIT"
] | null | null | null |
form_auto_fill_in/__init__.py
|
hurukou0308/Form-Auto-Fill-In
|
d516774b380530b6bab739676507d6aa805924d4
|
[
"MIT"
] | null | null | null |
form_auto_fill_in/__init__.py
|
hurukou0308/Form-Auto-Fill-In
|
d516774b380530b6bab739676507d6aa805924d4
|
[
"MIT"
] | null | null | null |
# coding: utf-8
import os
MODULE_DIR = os.path.abspath(os.path.dirname(__file__))
DATA_DIR = os.path.join(MODULE_DIR, "data")
from . import form, utils
from .__meta__ import *
| 19.777778
| 55
| 0.735955
| 29
| 178
| 4.137931
| 0.586207
| 0.15
| 0.15
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006452
| 0.129213
| 178
| 8
| 56
| 22.25
| 0.767742
| 0.073034
| 0
| 0
| 0
| 0
| 0.02454
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
af255d84a39fc053ecccbf22b96cb090097c4fae
| 15
|
py
|
Python
|
login.py
|
Black-Red-Hao/Git-
|
2023c5d2a4a163e7da53841f5f711de9e949a870
|
[
"MIT"
] | null | null | null |
login.py
|
Black-Red-Hao/Git-
|
2023c5d2a4a163e7da53841f5f711de9e949a870
|
[
"MIT"
] | null | null | null |
login.py
|
Black-Red-Hao/Git-
|
2023c5d2a4a163e7da53841f5f711de9e949a870
|
[
"MIT"
] | null | null | null |
QQ登录开发
微信登录开发
| 3.75
| 6
| 0.8
| 2
| 15
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 15
| 3
| 7
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
af3f04906ce387709f98d9ff00f6b9573cbd9fa4
| 122
|
py
|
Python
|
tests/test_extract_nominations.py
|
jwilk-forks/and-the-award-goes-to
|
94d05babf85bd06ad2aea42054e949940875cc22
|
[
"MIT"
] | 1
|
2017-12-26T15:43:31.000Z
|
2017-12-26T15:43:31.000Z
|
tests/test_extract_nominations.py
|
jwilk-forks/and-the-award-goes-to
|
94d05babf85bd06ad2aea42054e949940875cc22
|
[
"MIT"
] | null | null | null |
tests/test_extract_nominations.py
|
jwilk-forks/and-the-award-goes-to
|
94d05babf85bd06ad2aea42054e949940875cc22
|
[
"MIT"
] | 1
|
2018-08-14T06:49:51.000Z
|
2018-08-14T06:49:51.000Z
|
import unittest
class TestExtractAwards(unittest.TestCase):
def test_xyz(self):
self.assertEqual(True, True)
| 20.333333
| 43
| 0.737705
| 14
| 122
| 6.357143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172131
| 122
| 6
| 44
| 20.333333
| 0.881188
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
af4d16d2defb14a16325a81caa80eef64feb7fae
| 1,267
|
py
|
Python
|
padqc/steps/base_steps.py
|
qis-unipr/padqc
|
94599db20711dc755b53425951fa3cb15b749f64
|
[
"Apache-2.0"
] | null | null | null |
padqc/steps/base_steps.py
|
qis-unipr/padqc
|
94599db20711dc755b53425951fa3cb15b749f64
|
[
"Apache-2.0"
] | null | null | null |
padqc/steps/base_steps.py
|
qis-unipr/padqc
|
94599db20711dc755b53425951fa3cb15b749f64
|
[
"Apache-2.0"
] | 1
|
2021-02-18T22:11:18.000Z
|
2021-02-18T22:11:18.000Z
|
from abc import abstractmethod
class Step:
"""
Base step class.
"""
def __init__(self):
self._properties = dict()
pass
@property
def properties(self):
return self._properties
@properties.setter
def properties(self, properties):
self._properties = properties
@staticmethod
@abstractmethod
def run(*args):
pass
class AnalysisStep(Step):
"""
Base analysis step class.
"""
def __init__(self):
super().__init__()
pass
@staticmethod
@abstractmethod
def run(*args):
pass
class CancellationStep(Step):
"""
Base cancellation step class.
"""
def __init__(self):
super().__init__()
pass
@staticmethod
@abstractmethod
def run(q_circuit):
pass
class TransformationStep(Step):
"""
Base compiling step calss.
"""
def __init__(self):
super().__init__()
pass
@staticmethod
@abstractmethod
def run(q_circuit):
pass
class CompilingStep(Step):
"""
Base compiling step calss.
"""
def __init__(self):
super().__init__()
pass
@staticmethod
@abstractmethod
def run(q_circuit):
pass
| 15.8375
| 37
| 0.575375
| 117
| 1,267
| 5.871795
| 0.25641
| 0.058224
| 0.080058
| 0.232897
| 0.608443
| 0.57933
| 0.57933
| 0.494905
| 0.494905
| 0.494905
| 0
| 0
| 0.324388
| 1,267
| 79
| 38
| 16.037975
| 0.80257
| 0.099448
| 0
| 0.723404
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.255319
| false
| 0.212766
| 0.021277
| 0.021277
| 0.404255
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
af873620f2e0464a704d2cf26efb89cbe6bc0821
| 489
|
py
|
Python
|
ISTp/2014/korsakov_a_a/task_2_34.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
ISTp/2014/korsakov_a_a/task_2_34.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
ISTp/2014/korsakov_a_a/task_2_34.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
# Задача 2. Вариант 34
# Напишите программу, которая будет выводить на экран наиболее понравившееся
# вам высказывание, автором которого является Платон. Не забудьте о том,
# что автор должен быть упомянут на отдельной строке.
# Korsakov A.A.
# 31.03.2016
print ('\nНикто не знает, что такое смерть и не есть ли она величайшее для человека добро. И однако, все ее страшатся как бы в сознании, что она - величайшее зло.')
print ('\n\t\t Платон')
input ('\n\n Нажмите Enter для выхода')
| 44.454545
| 164
| 0.748466
| 79
| 489
| 4.64557
| 0.810127
| 0.070845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.167689
| 489
| 11
| 165
| 44.454545
| 0.872236
| 0.501022
| 0
| 0
| 0
| 0.333333
| 0.827004
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.666667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
afc044ae76db55e66b76e4ecdcd9c6b1c0128f38
| 129
|
py
|
Python
|
tests/test_4.py
|
Abdulrehmanvirus10/Automate_the_boring_stuff_with_Python
|
ecbe694e2a2f33ab75e87e815bca9fa63bc7efa5
|
[
"MIT"
] | null | null | null |
tests/test_4.py
|
Abdulrehmanvirus10/Automate_the_boring_stuff_with_Python
|
ecbe694e2a2f33ab75e87e815bca9fa63bc7efa5
|
[
"MIT"
] | null | null | null |
tests/test_4.py
|
Abdulrehmanvirus10/Automate_the_boring_stuff_with_Python
|
ecbe694e2a2f33ab75e87e815bca9fa63bc7efa5
|
[
"MIT"
] | 1
|
2020-09-30T18:39:17.000Z
|
2020-09-30T18:39:17.000Z
|
def printMyName(myName):
print('My name is' + myName)
print('Who are you ?')
myName = input()
printMyName(myName)
| 14.333333
| 33
| 0.627907
| 16
| 129
| 5.0625
| 0.6875
| 0.419753
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.232558
| 129
| 8
| 34
| 16.125
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0.190083
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.2
| 0.8
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
afc9bfa6cd1ed5caa1c9220eb5108846e4c58541
| 255
|
py
|
Python
|
apps/oob/mixins/user_is_object_user.py
|
dbjennings/order-of-business
|
8f424bd36b323e4c102b3d8704bb576c150d585a
|
[
"MIT"
] | null | null | null |
apps/oob/mixins/user_is_object_user.py
|
dbjennings/order-of-business
|
8f424bd36b323e4c102b3d8704bb576c150d585a
|
[
"MIT"
] | null | null | null |
apps/oob/mixins/user_is_object_user.py
|
dbjennings/order-of-business
|
8f424bd36b323e4c102b3d8704bb576c150d585a
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.mixins import UserPassesTestMixin
from django.urls import reverse_lazy
class UserIsObjectUserMixIn(UserPassesTestMixin):
def test_func(self):
object = self.get_object()
return object.user == self.request.user
| 31.875
| 58
| 0.768627
| 30
| 255
| 6.433333
| 0.7
| 0.103627
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 255
| 8
| 59
| 31.875
| 0.897674
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.333333
| 0.333333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
afd222f7946d9fa03b5b69a273ac689c5a3eb2af
| 205
|
py
|
Python
|
Body_Mass_Index.py
|
merttalug/BodyMassIndex
|
96b8a39931ff2a9748dbca0e4b13796ccc33e051
|
[
"MIT"
] | null | null | null |
Body_Mass_Index.py
|
merttalug/BodyMassIndex
|
96b8a39931ff2a9748dbca0e4b13796ccc33e051
|
[
"MIT"
] | null | null | null |
Body_Mass_Index.py
|
merttalug/BodyMassIndex
|
96b8a39931ff2a9748dbca0e4b13796ccc33e051
|
[
"MIT"
] | null | null | null |
weight = float(input("Please input your weight in kilograms: "))
height = float(input("Please input your height in meters: "))
bmi = weight/(height*height)
print("Your BMI percentage is: {} " .format(bmi))
| 51.25
| 64
| 0.717073
| 29
| 205
| 5.068966
| 0.482759
| 0.136054
| 0.217687
| 0.285714
| 0.340136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131707
| 205
| 4
| 65
| 51.25
| 0.825843
| 0
| 0
| 0
| 0
| 0
| 0.495146
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bb656a9ce0e421c515f08b27e62d843f40889d0e
| 355
|
py
|
Python
|
home/admin.py
|
Kshitij-Kumar-Singh-Chauhan/docon
|
bff0547e7bbd030e027217a2ca7800a8da529b56
|
[
"MIT"
] | null | null | null |
home/admin.py
|
Kshitij-Kumar-Singh-Chauhan/docon
|
bff0547e7bbd030e027217a2ca7800a8da529b56
|
[
"MIT"
] | null | null | null |
home/admin.py
|
Kshitij-Kumar-Singh-Chauhan/docon
|
bff0547e7bbd030e027217a2ca7800a8da529b56
|
[
"MIT"
] | 2
|
2021-06-17T05:35:07.000Z
|
2021-06-17T06:01:23.000Z
|
from django.contrib import admin
from .models import UserDetails
from .models import Contact
from .models import Book
from .models import Diagnostic
from .models import Report
# Register your models here.
admin.site.register(UserDetails)
admin.site.register(Contact)
admin.site.register(Book)
admin.site.register(Diagnostic)
admin.site.register(Report)
| 23.666667
| 32
| 0.819718
| 49
| 355
| 5.938776
| 0.306122
| 0.171821
| 0.274914
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101408
| 355
| 15
| 33
| 23.666667
| 0.912226
| 0.073239
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.545455
| 0
| 0.545455
| 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
|
bbacabf5836999e5cc9d6da57fc7b6bcb69c486a
| 18
|
py
|
Python
|
test/doctree_err/index.py
|
cortesi/countershape
|
8cc20921e603f0787f0477b3d0854c7aaf942cf4
|
[
"MIT"
] | 10
|
2015-02-18T03:12:36.000Z
|
2020-07-12T04:09:05.000Z
|
test/doctree_err/index.py
|
samtaufa/countershape
|
c10370d972a473f5fb0faae8de934aee2177b49f
|
[
"MIT"
] | 4
|
2015-01-05T22:21:37.000Z
|
2015-07-21T22:55:29.000Z
|
test/doctree_err/index.py
|
samtaufa/countershape
|
c10370d972a473f5fb0faae8de934aee2177b49f
|
[
"MIT"
] | 2
|
2015-07-21T11:19:04.000Z
|
2020-07-12T03:28:24.000Z
|
this is an error
| 6
| 16
| 0.722222
| 4
| 18
| 3.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.277778
| 18
| 2
| 17
| 9
| 1
| 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
|
bbc16a10427fa0a83f7051ce32dd4fe19532b225
| 466
|
py
|
Python
|
problem_29/test_distinct_powers.py
|
plilja/project-euler
|
646d1989cf15e903ef7e3c6e487284847d522ec9
|
[
"Apache-2.0"
] | null | null | null |
problem_29/test_distinct_powers.py
|
plilja/project-euler
|
646d1989cf15e903ef7e3c6e487284847d522ec9
|
[
"Apache-2.0"
] | null | null | null |
problem_29/test_distinct_powers.py
|
plilja/project-euler
|
646d1989cf15e903ef7e3c6e487284847d522ec9
|
[
"Apache-2.0"
] | null | null | null |
import unittest
from distinct_powers import *
class TestDistinctPowers(unittest.TestCase):
def test_distinct_powers(self):
self.assertEqual(distinct_powers(2), 1)
self.assertEqual(distinct_powers(3), 4)
self.assertEqual(distinct_powers(4), 8)
self.assertEqual(distinct_powers(5), 15)
def test_project_euler_input(self):
self.assertEqual(distinct_powers(100), 9183)
if __name__ == '__main__':
unittest.main()
| 24.526316
| 52
| 0.712446
| 56
| 466
| 5.589286
| 0.482143
| 0.313099
| 0.367412
| 0.463259
| 0.210863
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041995
| 0.182403
| 466
| 18
| 53
| 25.888889
| 0.779528
| 0
| 0
| 0
| 0
| 0
| 0.017167
| 0
| 0
| 0
| 0
| 0
| 0.416667
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.416667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bbe49442064fae80e356129f57365409a4f8809a
| 156
|
py
|
Python
|
integration/app_test.py
|
adele2020/object-detection-assistance
|
b64ba9aa183e82948fdca9e9fbd065511d34d37f
|
[
"MIT"
] | null | null | null |
integration/app_test.py
|
adele2020/object-detection-assistance
|
b64ba9aa183e82948fdca9e9fbd065511d34d37f
|
[
"MIT"
] | 1
|
2021-05-19T03:45:39.000Z
|
2021-05-19T03:45:39.000Z
|
integration/app_test.py
|
adele2020/object-detection-assistance
|
b64ba9aa183e82948fdca9e9fbd065511d34d37f
|
[
"MIT"
] | null | null | null |
import pytest
import requests
def test_code():
response = requests.get(url="http://localhost:5000" + "/healthz")
assert response.status_code == 200
| 26
| 69
| 0.717949
| 20
| 156
| 5.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.147436
| 156
| 6
| 70
| 26
| 0.774436
| 0
| 0
| 0
| 0
| 0
| 0.184713
| 0
| 0.2
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
bbee6b920d50286ea586d931d0754aef84dc3bb5
| 181
|
py
|
Python
|
lab_1/orthograph/make_orth_I.py
|
etzinis/speech_nlp_labs
|
128ea5a79a0502aa80fb2f4eee4af051049a9e0e
|
[
"MIT"
] | null | null | null |
lab_1/orthograph/make_orth_I.py
|
etzinis/speech_nlp_labs
|
128ea5a79a0502aa80fb2f4eee4af051049a9e0e
|
[
"MIT"
] | null | null | null |
lab_1/orthograph/make_orth_I.py
|
etzinis/speech_nlp_labs
|
128ea5a79a0502aa80fb2f4eee4af051049a9e0e
|
[
"MIT"
] | null | null | null |
fout=open('orth_I.txt','w')
alphabet='ΕΡΤΥΘΙΟΠΑΣΔΦΓΗΞΚΛΖΧΨΩΒΝΜ'
#alphabet='ΧΥ'
#fout.write('0 0 eps eps 0\n')
for i in alphabet:
fout.write('0 0 '+i+' '+i+' 0\n')
fout.write('0')
| 20.111111
| 35
| 0.651934
| 33
| 181
| 3.545455
| 0.454545
| 0.230769
| 0.25641
| 0.188034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.110497
| 181
| 8
| 36
| 22.625
| 0.68323
| 0.232044
| 0
| 0
| 0
| 0
| 0.328467
| 0.175182
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a52245adf49ecefea6240e8039ec6ab313ebca77
| 14,227
|
py
|
Python
|
CellModeller/Biophysics/SPP.py
|
knight-who-says-ni/CellModeller
|
df3e5901b604c55ec84cb675dadfda7c1d9aaddb
|
[
"BSD-3-Clause"
] | null | null | null |
CellModeller/Biophysics/SPP.py
|
knight-who-says-ni/CellModeller
|
df3e5901b604c55ec84cb675dadfda7c1d9aaddb
|
[
"BSD-3-Clause"
] | null | null | null |
CellModeller/Biophysics/SPP.py
|
knight-who-says-ni/CellModeller
|
df3e5901b604c55ec84cb675dadfda7c1d9aaddb
|
[
"BSD-3-Clause"
] | null | null | null |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
pkg = __name__.rpartition('.')[0]
mname = '.'.join((pkg, '_SPP')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_SPP')
_SPP = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_SPP', [dirname(__file__)])
except ImportError:
import _SPP
return _SPP
try:
_mod = imp.load_module('_SPP', fp, pathname, description)
finally:
if fp is not None:
fp.close()
return _mod
_SPP = swig_import_helper()
del swig_import_helper
else:
import _SPP
del _swig_python_version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr(self, class_type, name):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except __builtin__.Exception:
class _object:
pass
_newclass = 0
import collections
class SwigPyIterator(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _SPP.delete_SwigPyIterator
__del__ = lambda self: None
def value(self):
return _SPP.SwigPyIterator_value(self)
def incr(self, n=1):
return _SPP.SwigPyIterator_incr(self, n)
def decr(self, n=1):
return _SPP.SwigPyIterator_decr(self, n)
def distance(self, x):
return _SPP.SwigPyIterator_distance(self, x)
def equal(self, x):
return _SPP.SwigPyIterator_equal(self, x)
def copy(self):
return _SPP.SwigPyIterator_copy(self)
def next(self):
return _SPP.SwigPyIterator_next(self)
def __next__(self):
return _SPP.SwigPyIterator___next__(self)
def previous(self):
return _SPP.SwigPyIterator_previous(self)
def advance(self, n):
return _SPP.SwigPyIterator_advance(self, n)
def __eq__(self, x):
return _SPP.SwigPyIterator___eq__(self, x)
def __ne__(self, x):
return _SPP.SwigPyIterator___ne__(self, x)
def __iadd__(self, n):
return _SPP.SwigPyIterator___iadd__(self, n)
def __isub__(self, n):
return _SPP.SwigPyIterator___isub__(self, n)
def __add__(self, n):
return _SPP.SwigPyIterator___add__(self, n)
def __sub__(self, *args):
return _SPP.SwigPyIterator___sub__(self, *args)
def __iter__(self):
return self
SwigPyIterator_swigregister = _SPP.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
class VecFloat(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, VecFloat, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, VecFloat, name)
__repr__ = _swig_repr
def iterator(self):
return _SPP.VecFloat_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _SPP.VecFloat___nonzero__(self)
def __bool__(self):
return _SPP.VecFloat___bool__(self)
def __len__(self):
return _SPP.VecFloat___len__(self)
def __getslice__(self, i, j):
return _SPP.VecFloat___getslice__(self, i, j)
def __setslice__(self, *args):
return _SPP.VecFloat___setslice__(self, *args)
def __delslice__(self, i, j):
return _SPP.VecFloat___delslice__(self, i, j)
def __delitem__(self, *args):
return _SPP.VecFloat___delitem__(self, *args)
def __getitem__(self, *args):
return _SPP.VecFloat___getitem__(self, *args)
def __setitem__(self, *args):
return _SPP.VecFloat___setitem__(self, *args)
def pop(self):
return _SPP.VecFloat_pop(self)
def append(self, x):
return _SPP.VecFloat_append(self, x)
def empty(self):
return _SPP.VecFloat_empty(self)
def size(self):
return _SPP.VecFloat_size(self)
def swap(self, v):
return _SPP.VecFloat_swap(self, v)
def begin(self):
return _SPP.VecFloat_begin(self)
def end(self):
return _SPP.VecFloat_end(self)
def rbegin(self):
return _SPP.VecFloat_rbegin(self)
def rend(self):
return _SPP.VecFloat_rend(self)
def clear(self):
return _SPP.VecFloat_clear(self)
def get_allocator(self):
return _SPP.VecFloat_get_allocator(self)
def pop_back(self):
return _SPP.VecFloat_pop_back(self)
def erase(self, *args):
return _SPP.VecFloat_erase(self, *args)
def __init__(self, *args):
this = _SPP.new_VecFloat(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _SPP.VecFloat_push_back(self, x)
def front(self):
return _SPP.VecFloat_front(self)
def back(self):
return _SPP.VecFloat_back(self)
def assign(self, n, x):
return _SPP.VecFloat_assign(self, n, x)
def resize(self, *args):
return _SPP.VecFloat_resize(self, *args)
def insert(self, *args):
return _SPP.VecFloat_insert(self, *args)
def reserve(self, n):
return _SPP.VecFloat_reserve(self, n)
def capacity(self):
return _SPP.VecFloat_capacity(self)
__swig_destroy__ = _SPP.delete_VecFloat
__del__ = lambda self: None
VecFloat_swigregister = _SPP.VecFloat_swigregister
VecFloat_swigregister(VecFloat)
class VecVecFloat(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, VecVecFloat, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, VecVecFloat, name)
__repr__ = _swig_repr
def iterator(self):
return _SPP.VecVecFloat_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _SPP.VecVecFloat___nonzero__(self)
def __bool__(self):
return _SPP.VecVecFloat___bool__(self)
def __len__(self):
return _SPP.VecVecFloat___len__(self)
def __getslice__(self, i, j):
return _SPP.VecVecFloat___getslice__(self, i, j)
def __setslice__(self, *args):
return _SPP.VecVecFloat___setslice__(self, *args)
def __delslice__(self, i, j):
return _SPP.VecVecFloat___delslice__(self, i, j)
def __delitem__(self, *args):
return _SPP.VecVecFloat___delitem__(self, *args)
def __getitem__(self, *args):
return _SPP.VecVecFloat___getitem__(self, *args)
def __setitem__(self, *args):
return _SPP.VecVecFloat___setitem__(self, *args)
def pop(self):
return _SPP.VecVecFloat_pop(self)
def append(self, x):
return _SPP.VecVecFloat_append(self, x)
def empty(self):
return _SPP.VecVecFloat_empty(self)
def size(self):
return _SPP.VecVecFloat_size(self)
def swap(self, v):
return _SPP.VecVecFloat_swap(self, v)
def begin(self):
return _SPP.VecVecFloat_begin(self)
def end(self):
return _SPP.VecVecFloat_end(self)
def rbegin(self):
return _SPP.VecVecFloat_rbegin(self)
def rend(self):
return _SPP.VecVecFloat_rend(self)
def clear(self):
return _SPP.VecVecFloat_clear(self)
def get_allocator(self):
return _SPP.VecVecFloat_get_allocator(self)
def pop_back(self):
return _SPP.VecVecFloat_pop_back(self)
def erase(self, *args):
return _SPP.VecVecFloat_erase(self, *args)
def __init__(self, *args):
this = _SPP.new_VecVecFloat(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _SPP.VecVecFloat_push_back(self, x)
def front(self):
return _SPP.VecVecFloat_front(self)
def back(self):
return _SPP.VecVecFloat_back(self)
def assign(self, n, x):
return _SPP.VecVecFloat_assign(self, n, x)
def resize(self, *args):
return _SPP.VecVecFloat_resize(self, *args)
def insert(self, *args):
return _SPP.VecVecFloat_insert(self, *args)
def reserve(self, n):
return _SPP.VecVecFloat_reserve(self, n)
def capacity(self):
return _SPP.VecVecFloat_capacity(self)
__swig_destroy__ = _SPP.delete_VecVecFloat
__del__ = lambda self: None
VecVecFloat_swigregister = _SPP.VecVecFloat_swigregister
VecVecFloat_swigregister(VecVecFloat)
PI = _SPP.PI
def normalize(x, y, z):
return _SPP.normalize(x, y, z)
normalize = _SPP.normalize
def point_plane_distance(point, plane_norm, plane_point):
return _SPP.point_plane_distance(point, plane_norm, plane_point)
point_plane_distance = _SPP.point_plane_distance
def to_spherical(dir):
return _SPP.to_spherical(dir)
to_spherical = _SPP.to_spherical
def to_polar(dir):
return _SPP.to_polar(dir)
to_polar = _SPP.to_polar
def to_2Dcartesian(theta):
return _SPP.to_2Dcartesian(theta)
to_2Dcartesian = _SPP.to_2Dcartesian
def to_3Dcartesian(theta, phi):
return _SPP.to_3Dcartesian(theta, phi)
to_3Dcartesian = _SPP.to_3Dcartesian
class SPP(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SPP, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SPP, name)
__repr__ = _swig_repr
__swig_setmethods__["cell_centers"] = _SPP.SPP_cell_centers_set
__swig_getmethods__["cell_centers"] = _SPP.SPP_cell_centers_get
if _newclass:
cell_centers = _swig_property(_SPP.SPP_cell_centers_get, _SPP.SPP_cell_centers_set)
__swig_setmethods__["cell_directions"] = _SPP.SPP_cell_directions_set
__swig_getmethods__["cell_directions"] = _SPP.SPP_cell_directions_get
if _newclass:
cell_directions = _swig_property(_SPP.SPP_cell_directions_get, _SPP.SPP_cell_directions_set)
__swig_setmethods__["plane_pts"] = _SPP.SPP_plane_pts_set
__swig_getmethods__["plane_pts"] = _SPP.SPP_plane_pts_get
if _newclass:
plane_pts = _swig_property(_SPP.SPP_plane_pts_get, _SPP.SPP_plane_pts_set)
__swig_setmethods__["plane_norms"] = _SPP.SPP_plane_norms_set
__swig_getmethods__["plane_norms"] = _SPP.SPP_plane_norms_get
if _newclass:
plane_norms = _swig_property(_SPP.SPP_plane_norms_get, _SPP.SPP_plane_norms_set)
__swig_setmethods__["dt"] = _SPP.SPP_dt_set
__swig_getmethods__["dt"] = _SPP.SPP_dt_get
if _newclass:
dt = _swig_property(_SPP.SPP_dt_get, _SPP.SPP_dt_set)
__swig_setmethods__["radius"] = _SPP.SPP_radius_set
__swig_getmethods__["radius"] = _SPP.SPP_radius_get
if _newclass:
radius = _swig_property(_SPP.SPP_radius_get, _SPP.SPP_radius_set)
def __init__(self, dt_c=0.01, gamma_c=1, gamma_s_c=1, radius_c=1, W_s_c=1, W_c_c=1, f_pol_c=1, D_r_c=0.001, F_m_c=1, z_axis_c=True):
this = _SPP.new_SPP(dt_c, gamma_c, gamma_s_c, radius_c, W_s_c, W_c_c, f_pol_c, D_r_c, F_m_c, z_axis_c)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def addCell(self, pos_x=0, pos_y=0, pos_z=0, dir_1=0, dir_2=0, dir_3=0):
return _SPP.SPP_addCell(self, pos_x, pos_y, pos_z, dir_1, dir_2, dir_3)
def addPlane(self, p_x, p_y, p_z, n_x, n_y, n_z):
return _SPP.SPP_addPlane(self, p_x, p_y, p_z, n_x, n_y, n_z)
def step(self):
return _SPP.SPP_step(self)
def find_cell_contacts(self):
return _SPP.SPP_find_cell_contacts(self)
def find_plane_contacts(self):
return _SPP.SPP_find_plane_contacts(self)
def move_cells(self, cell_contacts, plane_contacts):
return _SPP.SPP_move_cells(self, cell_contacts, plane_contacts)
def repolarize(self):
return _SPP.SPP_repolarize(self)
__swig_destroy__ = _SPP.delete_SPP
__del__ = lambda self: None
SPP_swigregister = _SPP.SPP_swigregister
SPP_swigregister(SPP)
# This file is compatible with both classic and new-style classes.
| 29.639583
| 136
| 0.679834
| 1,853
| 14,227
| 4.658931
| 0.121964
| 0.095911
| 0.064752
| 0.041353
| 0.559481
| 0.470057
| 0.405305
| 0.335804
| 0.24638
| 0.159273
| 0
| 0.004795
| 0.223027
| 14,227
| 479
| 137
| 29.701461
| 0.77619
| 0.020735
| 0
| 0.375
| 1
| 0
| 0.020543
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.288889
| false
| 0.005556
| 0.055556
| 0.263889
| 0.727778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a54b60dc33901ff7dc2d8a9dea4924b76539259f
| 97
|
py
|
Python
|
ViewResults/apps.py
|
ph4r05/RTTWebInterface
|
bed02dde6d8f478c307e5a4343038a5fc4168a55
|
[
"MIT"
] | 2
|
2019-02-09T23:47:05.000Z
|
2019-09-23T10:26:06.000Z
|
ViewResults/apps.py
|
ph4r05/RTTWebInterface
|
bed02dde6d8f478c307e5a4343038a5fc4168a55
|
[
"MIT"
] | 2
|
2017-03-19T21:57:12.000Z
|
2017-03-27T14:50:53.000Z
|
ViewResults/apps.py
|
ph4r05/RTTWebInterface
|
bed02dde6d8f478c307e5a4343038a5fc4168a55
|
[
"MIT"
] | 2
|
2019-02-09T23:46:55.000Z
|
2019-09-23T03:58:53.000Z
|
from django.apps import AppConfig
class ViewresultsConfig(AppConfig):
name = 'ViewResults'
| 16.166667
| 35
| 0.773196
| 10
| 97
| 7.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 97
| 5
| 36
| 19.4
| 0.914634
| 0
| 0
| 0
| 0
| 0
| 0.113402
| 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
|
a55071e9fb37964480c664b04a196ae66d906924
| 677
|
py
|
Python
|
python/tests/test_fizzbuzz_tree.py
|
everydaytimmy/data-structures-and-algorithms
|
eb8166c79c5cccfd20ad591c496c81dab82e297d
|
[
"MIT"
] | null | null | null |
python/tests/test_fizzbuzz_tree.py
|
everydaytimmy/data-structures-and-algorithms
|
eb8166c79c5cccfd20ad591c496c81dab82e297d
|
[
"MIT"
] | 10
|
2021-04-14T20:08:53.000Z
|
2021-05-25T23:59:45.000Z
|
python/tests/test_fizzbuzz_tree.py
|
everydaytimmy/data-structures-and-algorithms
|
eb8166c79c5cccfd20ad591c496c81dab82e297d
|
[
"MIT"
] | null | null | null |
from code_challenges.fizzbuzz_tree.fizzbuzz_tree import Ktree, Node, fizz_buzz
# def test_node_has_value():
# node = Node("apple")
# assert node.value == "apple"
# def test_create_k_tree():
# tree = KTree()
# assert tree
# def test_fizz_buzz():
# one = Node(1)
# two = Node(2)
# three = Node(3)
# four = Node(4)
# five = Node(5)
# six = Node(6)
# seven = Node(7)
# eight = Node(8)
# one.children = [two,five]
# two.children = [three, four]
# five.children = [six, seven, eight]
# kt = Ktree()
# kt.root = one
# actual = fizz_buzz(kt)
# expected = kt.breadth(kt)
# assert actual == expected
| 21.15625
| 78
| 0.573117
| 90
| 677
| 4.166667
| 0.444444
| 0.064
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016293
| 0.274742
| 677
| 31
| 79
| 21.83871
| 0.747454
| 0.803545
| 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
|
a57f8efece0d7ddd40e81c6fcd0d189cb2335eab
| 245
|
py
|
Python
|
spiderpig/exceptions.py
|
papousek/spiderpig
|
b030809230f7945121c5523d081cb3d15d2d6473
|
[
"MIT"
] | 1
|
2017-05-26T21:07:51.000Z
|
2017-05-26T21:07:51.000Z
|
spiderpig/exceptions.py
|
papousek/spiderpig
|
b030809230f7945121c5523d081cb3d15d2d6473
|
[
"MIT"
] | null | null | null |
spiderpig/exceptions.py
|
papousek/spiderpig
|
b030809230f7945121c5523d081cb3d15d2d6473
|
[
"MIT"
] | null | null | null |
class SpiderpigError(Exception):
pass
class ValidationError(SpiderpigError):
pass
class NotInitialized(SpiderpigError):
pass
class CyclicExecution(SpiderpigError):
pass
class TooManyDependencies(SpiderpigError):
pass
| 12.894737
| 42
| 0.763265
| 20
| 245
| 9.35
| 0.4
| 0.192513
| 0.368984
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17551
| 245
| 18
| 43
| 13.611111
| 0.925743
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
3c17c8727fd9a76d3b05301596fe59e41d1f43b0
| 144
|
py
|
Python
|
CodeWars/8 Kyu/Grasshopper - Messi Goals.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
CodeWars/8 Kyu/Grasshopper - Messi Goals.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
CodeWars/8 Kyu/Grasshopper - Messi Goals.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
la_liga_goals = 43
champions_league_goals = 10
copa_del_rey_goals = 5
total_goals = la_liga_goals + champions_league_goals + copa_del_rey_goals
| 28.8
| 73
| 0.847222
| 25
| 144
| 4.28
| 0.48
| 0.11215
| 0.205607
| 0.280374
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039063
| 0.111111
| 144
| 5
| 73
| 28.8
| 0.796875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.