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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3412879ccc937da17f18ea747dc449ac7d5696a6 | 508 | py | Python | test/test_dude_api.py | bioexcel/virtualscreening | e973958e012e38f99b0c8ed2b798c5e5a7f72b22 | [
"Apache-2.0"
] | 3 | 2020-02-17T11:11:08.000Z | 2021-12-03T18:54:47.000Z | test/test_dude_api.py | bioexcel/virtualscreening | e973958e012e38f99b0c8ed2b798c5e5a7f72b22 | [
"Apache-2.0"
] | 1 | 2019-12-05T15:32:50.000Z | 2019-12-10T16:13:08.000Z | test/test_dude_api.py | bioexcel/virtualscreening | e973958e012e38f99b0c8ed2b798c5e5a7f72b22 | [
"Apache-2.0"
] | 2 | 2019-09-26T20:21:14.000Z | 2021-07-10T04:37:31.000Z | from os.path import join as opj
from test import fixtures as fx
from dude_api.dude import Dude
class TestDudeApi(object):
def setUp(self):
fx.test_setup(self,'dude')
def tearDown(self):
pass
#fx.test_teardown(self)
def test_launch(self):
output_sdf_path=opj(self.properties['path'], self.properties['output_sdf_path'])
Dude(output_sdf_path=output_sdf_path, properties=self.properties).get_decoys_from_pdb()
assert fx.not_empty(output_sdf_path)
| 28.222222 | 95 | 0.71063 | 75 | 508 | 4.573333 | 0.4 | 0.131195 | 0.189504 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.190945 | 508 | 17 | 96 | 29.882353 | 0.83455 | 0.043307 | 0 | 0 | 0 | 0 | 0.047423 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 1 | 0.25 | false | 0.083333 | 0.25 | 0 | 0.583333 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 4 |
3474a75cd5d6f4cfce1eaa1c4a08d7a1855fe284 | 290 | py | Python | ezfuse/__init__.py | essembeh/ezfuse | a71f7bd26472dffedcdf2da2f55fed8289b2808d | [
"Apache-2.0"
] | 1 | 2022-03-23T09:12:26.000Z | 2022-03-23T09:12:26.000Z | ezfuse/__init__.py | essembeh/ezfuse | a71f7bd26472dffedcdf2da2f55fed8289b2808d | [
"Apache-2.0"
] | null | null | null | ezfuse/__init__.py | essembeh/ezfuse | a71f7bd26472dffedcdf2da2f55fed8289b2808d | [
"Apache-2.0"
] | null | null | null | """
project metadata
"""
try:
import importlib.metadata as importlib_metadata
except ModuleNotFoundError:
import importlib_metadata
__version__ = importlib_metadata.version(__name__)
__title__ = "ezfuse"
__description__ = "Quickly mount fuse filesystems in temporary directories"
| 22.307692 | 75 | 0.803448 | 29 | 290 | 7.37931 | 0.689655 | 0.317757 | 0.214953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131034 | 290 | 12 | 76 | 24.166667 | 0.849206 | 0.055172 | 0 | 0 | 0 | 0 | 0.229323 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
cafb3fd6de004df753db3cf93d7a128007a56db3 | 1,557 | py | Python | erpnext_biotrack/config/traceability.py | webonyx/erpnext_biotrack | eb2384a6c3fda84a91c81c959f095a5386a89665 | [
"MIT"
] | 11 | 2017-05-29T23:35:21.000Z | 2022-03-12T04:29:21.000Z | erpnext_biotrack/config/traceability.py | webonyx/erpnext_biotrack | eb2384a6c3fda84a91c81c959f095a5386a89665 | [
"MIT"
] | 1 | 2016-12-11T16:58:36.000Z | 2016-12-11T16:58:36.000Z | erpnext_biotrack/config/traceability.py | webonyx/erpnext_biotrack | eb2384a6c3fda84a91c81c959f095a5386a89665 | [
"MIT"
] | 14 | 2016-12-17T11:01:03.000Z | 2021-11-01T10:21:45.000Z | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Cultivation"),
"items": [
{
"type": "doctype",
"name": "Plant",
},
{
"type": "doctype",
"name": "Plant Entry",
},
{
"type": "doctype",
"name": "Plant Room",
},
{
"type": "doctype",
"name": "Strain",
}
]
},
{
"label": _("Inventory"),
"items": [
{
"type": "doctype",
"name": "Item",
},
{
"type": "doctype",
"name": "Item Group",
},
{
"type": "doctype",
"name": "Stock Entry",
},
{
"type": "doctype",
"name": "Warehouse",
}
]
},
{
"label": _("Reports"),
"items": [
{
"type": "report",
"name": "Growing Plants",
"doctype": "Plant",
"is_query_report": True
}
]
},{
"label": _("Setup"),
"items": [
{
"type": "doctype",
"name": "Traceability Settings",
},
{
"type": "doctype",
"name": "BioTrack Settings",
"label": "BioTrackTHC Settings",
}
]
}
]
| 21.040541 | 42 | 0.305716 | 84 | 1,557 | 5.511905 | 0.440476 | 0.237581 | 0.323974 | 0.12959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.537572 | 1,557 | 73 | 43 | 21.328767 | 0.643056 | 0 | 0 | 0.197183 | 0 | 0 | 0.260758 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.014085 | true | 0 | 0.028169 | 0.014085 | 0.056338 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 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 |
1b29feda4b117b6b82445150282aebfad954e61b | 210 | py | Python | backend/handlers/graphql/types/deleted.py | al-indigo/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | null | null | null | backend/handlers/graphql/types/deleted.py | al-indigo/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | 8 | 2017-10-11T13:26:10.000Z | 2021-12-13T20:27:52.000Z | backend/handlers/graphql/types/deleted.py | ispras/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | 4 | 2017-07-27T12:25:42.000Z | 2018-01-28T02:06:26.000Z | import graphene
from handlers.graphql.types.base.gxenobjecttype import GXenObjectType
class Deleted(GXenObjectType):
ref = graphene.Field(graphene.ID, required=True, description="Deleted object's ref")
| 23.333333 | 88 | 0.8 | 25 | 210 | 6.72 | 0.72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109524 | 210 | 8 | 89 | 26.25 | 0.898396 | 0 | 0 | 0 | 0 | 0 | 0.095694 | 0 | 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 |
1b65d43df1cffb63d1aedd7eb68d8a7d9c521a65 | 122 | py | Python | terrascript/provider/packet.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/packet.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/packet.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/packet.py
import terrascript
class packet(terrascript.Provider):
pass
__all__ = ["packet"]
| 12.2 | 35 | 0.745902 | 13 | 122 | 6.692308 | 0.615385 | 0.436782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147541 | 122 | 9 | 36 | 13.555556 | 0.836538 | 0.245902 | 0 | 0 | 0 | 0 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.25 | 0.25 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 4 |
1b69c729e0b7ac5c7198fa8de5cbc69d77bc2d92 | 974 | py | Python | MonthTranslator.py | panherz/MyPyCode | 0bb0dc18859a2f74abc71bcd79f977e15e6bfffe | [
"Apache-2.0"
] | null | null | null | MonthTranslator.py | panherz/MyPyCode | 0bb0dc18859a2f74abc71bcd79f977e15e6bfffe | [
"Apache-2.0"
] | null | null | null | MonthTranslator.py | panherz/MyPyCode | 0bb0dc18859a2f74abc71bcd79f977e15e6bfffe | [
"Apache-2.0"
] | null | null | null | # Program to determine the month as entered by the user as an int.
whatMonth = input('Please enter the month you think it is as an int?\n')
while (whatMonth >= 13):
if whatMonth == 1:
scp 'admin@10.0.70.41:/home/isop/out.csv /home/dk .'
elif whatMonth == 2:
print('The month is February\n')
elif whatMonth == 3:
print('The month is March\n')
elif whatMonth == 4:
print('The month is April\n')
elif whatMonth == 5:
print('The month is June\n')
elif whatMonth == 6:
print('The month is July\n')
elif whatMonth == 7:
print('The month is August\n')
elif whatMonth == 8:
print('The month is September\n')
elif whatMonth == 9:
print('The month is October\n')
elif whatMonth == 10:
print('The month is November\n')
elif whatMonth == 11:
print('The month is November\n')
else:
print('The month is December\n')
# print('END OF PROGRAM') | 31.419355 | 72 | 0.593429 | 146 | 974 | 3.958904 | 0.40411 | 0.179931 | 0.247405 | 0.285467 | 0.083045 | 0.083045 | 0 | 0 | 0 | 0 | 0 | 0.031429 | 0.281314 | 974 | 31 | 73 | 31.419355 | 0.794286 | 0.090349 | 0 | 0.076923 | 0 | 0.038462 | 0.377828 | 0.039593 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.423077 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
1b75d9837e9ee07f00daf581f5f0d6c17295e818 | 28 | py | Python | graphene_framework/__init__.py | Donnyyyyy/graphene-superstructure | 7db7ceeebb6b163a092e5e294e02fe825150dcc6 | [
"MIT"
] | 14 | 2019-07-31T08:02:22.000Z | 2021-11-24T06:13:01.000Z | graphene_framework/__init__.py | Donnyyyyy/graphene-superstructure | 7db7ceeebb6b163a092e5e294e02fe825150dcc6 | [
"MIT"
] | null | null | null | graphene_framework/__init__.py | Donnyyyyy/graphene-superstructure | 7db7ceeebb6b163a092e5e294e02fe825150dcc6 | [
"MIT"
] | null | null | null | name = 'graphene_framework'
| 14 | 27 | 0.785714 | 3 | 28 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107143 | 28 | 1 | 28 | 28 | 0.84 | 0 | 0 | 0 | 0 | 0 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
1b8c7b2b4534f6e044bb2d306a94a37064f39381 | 364 | py | Python | deprecated/environments/pybullet/pybullet_environment.py | MinRegret/TigerControl | b1ca0617cbb2198f9d5cb37f725f3d7accbab08f | [
"Apache-2.0"
] | 31 | 2019-11-08T06:01:54.000Z | 2021-11-20T04:50:43.000Z | deprecated/environments/pybullet/pybullet_environment.py | johnhallman/ctsb | b1ca0617cbb2198f9d5cb37f725f3d7accbab08f | [
"Apache-2.0"
] | 32 | 2019-06-27T15:05:04.000Z | 2019-08-07T04:23:47.000Z | deprecated/environments/pybullet/pybullet_environment.py | MinRegret/tigercontrol | b1ca0617cbb2198f9d5cb37f725f3d7accbab08f | [
"Apache-2.0"
] | 3 | 2020-09-30T17:06:50.000Z | 2021-04-12T22:39:34.000Z | # PyBullet Environments
from tigercontrol import error
from tigercontrol.environments import Environment
from tigercontrol.environments.deprecated.pybullet.simulator import Simulator
class PyBulletEnvironment(Simulator):
''' Description: class for online control tests '''
def get_simulator(self): # same as calling fork()
return self.fork()
| 28 | 77 | 0.777473 | 39 | 364 | 7.230769 | 0.615385 | 0.170213 | 0.198582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 364 | 12 | 78 | 30.333333 | 0.915584 | 0.247253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.5 | 0.166667 | 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 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 4 |
1bc28ca7fa1096796fd440f8cea6f97505aa4171 | 201 | py | Python | templates/base.py | easy-quest/4vk-soup | a2d8bb5e2a779fb5ecdd9feba29bb025910c7828 | [
"Apache-2.0"
] | null | null | null | templates/base.py | easy-quest/4vk-soup | a2d8bb5e2a779fb5ecdd9feba29bb025910c7828 | [
"Apache-2.0"
] | null | null | null | templates/base.py | easy-quest/4vk-soup | a2d8bb5e2a779fb5ecdd9feba29bb025910c7828 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 15:23:17 12-11-2021
# @Author : Ivan Yastrebov (esim.i2p@gmail.com)
# @Link : https://github.com/easy-quest
# @Version : $Id$
import os
| 22.333333 | 48 | 0.606965 | 31 | 201 | 3.935484 | 0.967742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.10303 | 0.179104 | 201 | 8 | 49 | 25.125 | 0.636364 | 0.885572 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
59ee3cf15eb366786973d8f3c1195a1b836ff3d1 | 190 | py | Python | users/source/ports/events.py | elpapi42/reactive-microservices-with-kafka-python | e14cf09ea814244dc794522464ff2945f3a02c13 | [
"MIT"
] | null | null | null | users/source/ports/events.py | elpapi42/reactive-microservices-with-kafka-python | e14cf09ea814244dc794522464ff2945f3a02c13 | [
"MIT"
] | null | null | null | users/source/ports/events.py | elpapi42/reactive-microservices-with-kafka-python | e14cf09ea814244dc794522464ff2945f3a02c13 | [
"MIT"
] | null | null | null | import abc
from source.domain.entities import User
class UserRegisteredEvent(abc.ABC):
@abc.abstractmethod
async def trigger(self, user:User):
raise NotImplementedError()
| 19 | 39 | 0.742105 | 22 | 190 | 6.409091 | 0.727273 | 0.085106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.178947 | 190 | 9 | 40 | 21.111111 | 0.903846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 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 |
59f3b78ad5c22086362b2b3129493f0b6d4f98e3 | 85 | py | Python | generate.py | Zataras/ExampleWithTinyproto | 9e16e8dae47410b6cc1fb0e2fa1ade6ccd5d101a | [
"MIT"
] | null | null | null | generate.py | Zataras/ExampleWithTinyproto | 9e16e8dae47410b6cc1fb0e2fa1ade6ccd5d101a | [
"MIT"
] | null | null | null | generate.py | Zataras/ExampleWithTinyproto | 9e16e8dae47410b6cc1fb0e2fa1ade6ccd5d101a | [
"MIT"
] | null | null | null | import subprocess
subprocess.call(["cmake", "-B./build", "-C./initial_cache.cmake"]) | 28.333333 | 66 | 0.705882 | 11 | 85 | 5.363636 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058824 | 85 | 3 | 66 | 28.333333 | 0.7375 | 0 | 0 | 0 | 0 | 0 | 0.430233 | 0.267442 | 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 |
94020064d903a5a5cfb1366b4bc4c5e64e06ccda | 130 | py | Python | vendor-local/lib/python/djcelery/app.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 41 | 2015-02-28T15:34:24.000Z | 2022-03-22T18:29:14.000Z | vendor-local/lib/python/djcelery/app.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:44:53.000Z | 2019-03-28T03:54:39.000Z | vendor-local/lib/python/djcelery/app.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 14 | 2015-02-27T02:57:37.000Z | 2021-02-08T05:59:59.000Z | from __future__ import absolute_import
from celery.app import default_app
#: The Django-Celery app instance.
app = default_app
| 16.25 | 38 | 0.807692 | 19 | 130 | 5.157895 | 0.526316 | 0.183673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146154 | 130 | 7 | 39 | 18.571429 | 0.882883 | 0.253846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
94071f4798afc9930df28b3d77ee0a2ec8a8e69c | 61 | py | Python | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/webui/__init__.py | aocks/cookiecutter-py-flask-docker | b72f89aca9f4f4bac2262d717415ba9e5bd17692 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/webui/__init__.py | aocks/cookiecutter-py-flask-docker | b72f89aca9f4f4bac2262d717415ba9e5bd17692 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/webui/__init__.py | aocks/cookiecutter-py-flask-docker | b72f89aca9f4f4bac2262d717415ba9e5bd17692 | [
"MIT"
] | null | null | null | """Web user interface for {{cookiecutter.project_slug}}.
"""
| 20.333333 | 56 | 0.704918 | 7 | 61 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.098361 | 61 | 2 | 57 | 30.5 | 0.763636 | 0.868852 | 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 |
94220e36a723d5300590f560582188e45867262d | 353 | py | Python | application/KitchenMagician/kitchen_magician/search/popular_search.py | AsuPaul19/Kitchen-Magician | 8c22bc1a45942d22c183096f8e92f858983d351d | [
"MIT"
] | null | null | null | application/KitchenMagician/kitchen_magician/search/popular_search.py | AsuPaul19/Kitchen-Magician | 8c22bc1a45942d22c183096f8e92f858983d351d | [
"MIT"
] | 8 | 2021-04-08T20:50:25.000Z | 2022-03-12T00:53:18.000Z | application/KitchenMagician/kitchen_magician/search/popular_search.py | AsuPaul19/Kitchen-Magician | 8c22bc1a45942d22c183096f8e92f858983d351d | [
"MIT"
] | null | null | null | from search.models import SearchKeyword
def popular_search(n=3):
# Return top n search, default set is top 3 search
search_keywords = SearchKeyword.objects.order_by("-count")[:n]
popular_search_keywords = [search_keyword.keyword for search_keyword in search_keywords]
# print(popular_search_keywords)
return popular_search_keywords
| 39.222222 | 92 | 0.78187 | 48 | 353 | 5.5 | 0.479167 | 0.265152 | 0.238636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006645 | 0.147309 | 353 | 8 | 93 | 44.125 | 0.870432 | 0.223796 | 0 | 0 | 0 | 0 | 0.02214 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.6 | 0 | 0 | 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 | 1 | 0 | 0 | 4 |
9485aa337b240e0679dcc3ba66cf161d5bb94c87 | 123 | py | Python | example.py | hiyoi/proxies | b10f31508f047aabedf7484c3f45ecca74812226 | [
"MIT"
] | null | null | null | example.py | hiyoi/proxies | b10f31508f047aabedf7484c3f45ecca74812226 | [
"MIT"
] | null | null | null | example.py | hiyoi/proxies | b10f31508f047aabedf7484c3f45ecca74812226 | [
"MIT"
] | null | null | null | import proxies
if __name__ == '__main__':
proxies.get_address()
proxies.verify_address()
print(proxies.get())
| 17.571429 | 28 | 0.691057 | 14 | 123 | 5.357143 | 0.642857 | 0.266667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.178862 | 123 | 6 | 29 | 20.5 | 0.742574 | 0 | 0 | 0 | 0 | 0 | 0.065041 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.2 | 0 | 0.2 | 0.2 | 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 |
94891e402a4fa014fc30254e4116ee7e86990d47 | 67 | py | Python | tests/resources/target_files/home/.begin/targets2.py | markharley/begin | a8fcff29a4c77b40926477de84659a51fdcbdd00 | [
"MIT"
] | 2 | 2022-01-24T12:27:56.000Z | 2022-03-10T10:34:19.000Z | tests/resources/target_files/home/.begin/targets2.py | markharley/begin | a8fcff29a4c77b40926477de84659a51fdcbdd00 | [
"MIT"
] | 23 | 2022-01-13T00:05:48.000Z | 2022-03-14T22:01:07.000Z | tests/resources/target_files/home/.begin/targets2.py | markharley/begin | a8fcff29a4c77b40926477de84659a51fdcbdd00 | [
"MIT"
] | 1 | 2022-03-12T12:43:58.000Z | 2022-03-12T12:43:58.000Z | # This should not be collected because it is not named *targets.py
| 33.5 | 66 | 0.776119 | 12 | 67 | 4.333333 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.179104 | 67 | 1 | 67 | 67 | 0.945455 | 0.955224 | 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 |
84c775627a4dfe79083f651eb4afa99caf9e3553 | 164 | py | Python | comment/urls.py | jt1024/NewDjangoBlog | c73e5af1cdca8f7d4a3c1f56d634ca453725bfe0 | [
"MIT"
] | null | null | null | comment/urls.py | jt1024/NewDjangoBlog | c73e5af1cdca8f7d4a3c1f56d634ca453725bfe0 | [
"MIT"
] | 10 | 2020-03-24T17:28:53.000Z | 2022-01-13T01:35:30.000Z | comment/urls.py | jt1024/NewDjangoBlog | c73e5af1cdca8f7d4a3c1f56d634ca453725bfe0 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = "comment"
urlpatterns = [
path('update_comment', views.update_comment, name='update_comment'),
]
| 16.4 | 72 | 0.731707 | 21 | 164 | 5.52381 | 0.52381 | 0.336207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.152439 | 164 | 9 | 73 | 18.222222 | 0.834532 | 0 | 0 | 0 | 0 | 0 | 0.213415 | 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 |
84ce15def46c649d60e25fe598de6fb4382815d8 | 458 | py | Python | test/test_db_matches_ui.py | Belyanova/Python_-training | 2e38e489bbed05995cf067187e62c2842ad8f661 | [
"Apache-2.0"
] | null | null | null | test/test_db_matches_ui.py | Belyanova/Python_-training | 2e38e489bbed05995cf067187e62c2842ad8f661 | [
"Apache-2.0"
] | null | null | null | test/test_db_matches_ui.py | Belyanova/Python_-training | 2e38e489bbed05995cf067187e62c2842ad8f661 | [
"Apache-2.0"
] | null | null | null | from model.configurations_group import Configurations_group
from timeit import timeit
def test_group_list(app, db):
print(timeit(lambda: app.group.get_group_list(), number=1))
def clean (group):
return Configurations_group (id=group.id, name=group.name.strip())
print(timeit(lambda:map(clean,db.get_group_list()), number=1))
#sorted(ui_list, key=Configurations_group.id_or_max) == sorted(db_list, key=Configurations_group.id_or_max) | 50.888889 | 111 | 0.764192 | 70 | 458 | 4.771429 | 0.4 | 0.284431 | 0.188623 | 0.107784 | 0.311377 | 0.197605 | 0.197605 | 0 | 0 | 0 | 0 | 0.004926 | 0.113537 | 458 | 9 | 111 | 50.888889 | 0.815271 | 0.231441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.285714 | null | null | 0.285714 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
84f2b07e89df0f2e5082d6af41344a3bfc9136c2 | 80 | py | Python | ht/tip/apps.py | caoxuCarlos/htyw_ecust | 90277333510de14d936153fa2b164efbc5d068b8 | [
"MIT"
] | null | null | null | ht/tip/apps.py | caoxuCarlos/htyw_ecust | 90277333510de14d936153fa2b164efbc5d068b8 | [
"MIT"
] | null | null | null | ht/tip/apps.py | caoxuCarlos/htyw_ecust | 90277333510de14d936153fa2b164efbc5d068b8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TipConfig(AppConfig):
name = 'tip'
| 16 | 33 | 0.7375 | 10 | 80 | 5.9 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.175 | 80 | 4 | 34 | 20 | 0.893939 | 0 | 0 | 0 | 0 | 0 | 0.0375 | 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 |
ca854b74168a73991c6a13a13803413e7cc689ac | 27 | py | Python | drifter/__init__.py | bizurkur/drifter | a3787b773fb3525242daebfa7b7e4d90b9af7b97 | [
"MIT"
] | 2 | 2019-10-12T03:52:04.000Z | 2021-03-10T14:38:58.000Z | drifter/__init__.py | bizurkur/drifter | a3787b773fb3525242daebfa7b7e4d90b9af7b97 | [
"MIT"
] | 7 | 2019-08-17T11:43:18.000Z | 2019-08-17T11:45:04.000Z | drifter/__init__.py | bizurkur/drifter | a3787b773fb3525242daebfa7b7e4d90b9af7b97 | [
"MIT"
] | null | null | null | """The drifter package."""
| 13.5 | 26 | 0.62963 | 3 | 27 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 27 | 1 | 27 | 27 | 0.708333 | 0.740741 | 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 |
047c9c5758eb1247f0d9d96248a73b1455d2a0e1 | 878 | py | Python | jezdzenka/database/collection.py | naruciakk/jezdzenka | 230ab165751be5ff0b4c9fa9e9ce0b8c10639562 | [
"CC0-1.0"
] | null | null | null | jezdzenka/database/collection.py | naruciakk/jezdzenka | 230ab165751be5ff0b4c9fa9e9ce0b8c10639562 | [
"CC0-1.0"
] | null | null | null | jezdzenka/database/collection.py | naruciakk/jezdzenka | 230ab165751be5ff0b4c9fa9e9ce0b8c10639562 | [
"CC0-1.0"
] | null | null | null | from jezdzenka.application import app as jezdzenka
from tinydb import Query
def get_all():
return jezdzenka.table.all()
def get_current():
ticket = Query()
return jezdzenka.table.search(ticket.archived == False)
def get_archived():
ticket = Query()
return jezdzenka.table.search(ticket.archived == True)
def get_all_by_tag(all_tag):
return jezdzenka.table.search(Query().tags.any(all_tag))
def get_all_by_year(all_years):
years = [int(x) for x in all_years]
return jezdzenka.table.search(Query().validation_date.date.year.one_of(years))
def get_filename_by_id(doc_id: int):
return jezdzenka.table.get(doc_id=int(doc_id))['filename']
def get_archived_status_by_id(doc_id: int):
return jezdzenka.table.get(doc_id=int(doc_id))['archived']
def get_object_by_id(doc_id: int):
return jezdzenka.table.get(doc_id=int(doc_id))
| 23.105263 | 82 | 0.738041 | 139 | 878 | 4.417266 | 0.273381 | 0.07329 | 0.260586 | 0.169381 | 0.501629 | 0.400651 | 0.400651 | 0.400651 | 0.234528 | 0.234528 | 0 | 0 | 0.138952 | 878 | 37 | 83 | 23.72973 | 0.812169 | 0 | 0 | 0.095238 | 0 | 0 | 0.018223 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.380952 | false | 0 | 0.095238 | 0.238095 | 0.857143 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 4 |
04a07194053416c2b06fe8b90a84a14d452dff37 | 297 | py | Python | agent/worker/ray_rollout_worker.py | ParradoxSVK/elite_buffer_vtrace | 28490f3222e0d489a0ca11530e10bfc027698eb5 | [
"MIT"
] | 1 | 2022-03-28T13:40:33.000Z | 2022-03-28T13:40:33.000Z | agent/worker/ray_rollout_worker.py | ParradoxSVK/elite_buffer_vtrace | 28490f3222e0d489a0ca11530e10bfc027698eb5 | [
"MIT"
] | null | null | null | agent/worker/ray_rollout_worker.py | ParradoxSVK/elite_buffer_vtrace | 28490f3222e0d489a0ca11530e10bfc027698eb5 | [
"MIT"
] | null | null | null | import ray
from agent.worker.rollout_worker import RolloutWorker
@ray.remote
class RayRolloutWorker(RolloutWorker):
def __init__(self, worker_id, flags, state_transf_model, file_save_url, verbose=False):
super().__init__(worker_id, flags, state_transf_model, file_save_url, verbose)
| 33 | 91 | 0.79798 | 40 | 297 | 5.45 | 0.6 | 0.073395 | 0.119266 | 0.165138 | 0.431193 | 0.431193 | 0.431193 | 0.431193 | 0.431193 | 0.431193 | 0 | 0 | 0.117845 | 297 | 8 | 92 | 37.125 | 0.832061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
04a5a3a75d85cb46505b9790bfe6a81b3d825e65 | 213 | py | Python | SadovaHW/HW5/HW_5.2.py | kolyasalubov/Lv-639.pythonCore | 06f10669a188318884adb00723127465ebdf2907 | [
"MIT"
] | null | null | null | SadovaHW/HW5/HW_5.2.py | kolyasalubov/Lv-639.pythonCore | 06f10669a188318884adb00723127465ebdf2907 | [
"MIT"
] | null | null | null | SadovaHW/HW5/HW_5.2.py | kolyasalubov/Lv-639.pythonCore | 06f10669a188318884adb00723127465ebdf2907 | [
"MIT"
] | null | null | null | login="First"
user_login=input("Enter your login ")
while user_login == login:
print("Your authentication is successful, congrats!")
break
if user_login != login:
print("Your login an incorrect,sorry") | 30.428571 | 57 | 0.723005 | 29 | 213 | 5.206897 | 0.586207 | 0.178808 | 0.18543 | 0.251656 | 0.304636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.159624 | 213 | 7 | 58 | 30.428571 | 0.843575 | 0 | 0 | 0 | 0 | 0 | 0.443925 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.285714 | 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 |
04bdf10211bacd7e43f3299f4e01616aae87d556 | 2,438 | py | Python | ssip_saugerties/members/migrations/0003_auto_20160420_0316.py | mooja/ssip_saugerties | 1d3020d02fc8d44750a4129971a4e6a7b8dd7687 | [
"MIT"
] | null | null | null | ssip_saugerties/members/migrations/0003_auto_20160420_0316.py | mooja/ssip_saugerties | 1d3020d02fc8d44750a4129971a4e6a7b8dd7687 | [
"MIT"
] | null | null | null | ssip_saugerties/members/migrations/0003_auto_20160420_0316.py | mooja/ssip_saugerties | 1d3020d02fc8d44750a4129971a4e6a7b8dd7687 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-20 03:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('members', '0002_auto_20160420_0245'),
]
operations = [
migrations.AddField(
model_name='member',
name='occupation',
field=models.CharField(blank=True, max_length=1500, null=True),
),
migrations.AddField(
model_name='member',
name='zipcode',
field=models.CharField(blank=True, max_length=400, null=True),
),
migrations.AlterField(
model_name='member',
name='address',
field=models.CharField(blank=True, max_length=400, null=True),
),
migrations.AlterField(
model_name='member',
name='birthday',
field=models.CharField(blank=True, max_length=200, null=True),
),
migrations.AlterField(
model_name='member',
name='canhelp',
field=models.CharField(blank=True, max_length=1500, null=True),
),
migrations.AlterField(
model_name='member',
name='cellphone',
field=models.CharField(blank=True, max_length=20, null=True),
),
migrations.AlterField(
model_name='member',
name='comments',
field=models.TextField(blank=True, max_length=5000, null=True),
),
migrations.AlterField(
model_name='member',
name='email',
field=models.EmailField(blank=True, max_length=200, null=True),
),
migrations.AlterField(
model_name='member',
name='hobbies',
field=models.CharField(blank=True, max_length=1500, null=True),
),
migrations.AlterField(
model_name='member',
name='homephone',
field=models.CharField(blank=True, max_length=20, null=True),
),
migrations.AlterField(
model_name='member',
name='needhelp',
field=models.CharField(blank=True, max_length=1500, null=True),
),
migrations.AlterField(
model_name='member',
name='town',
field=models.CharField(blank=True, max_length=400, null=True),
),
]
| 32.078947 | 75 | 0.561116 | 241 | 2,438 | 5.543568 | 0.257261 | 0.080838 | 0.134731 | 0.170659 | 0.743263 | 0.743263 | 0.695359 | 0.680389 | 0.64521 | 0.64521 | 0 | 0.042591 | 0.316243 | 2,438 | 75 | 76 | 32.506667 | 0.758848 | 0.027482 | 0 | 0.661765 | 1 | 0 | 0.080659 | 0.009713 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.029412 | 0 | 0.073529 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
04c2133754c37cb1522ace462966c1c127f54b0e | 179 | py | Python | lib/ansible_netcli/models/os/ios/bgp.py | ganeshrn/ansible-netcli | e4caccb428c0b8f17034df895b7f4c4f7ce59ad7 | [
"Apache-2.0"
] | 2 | 2019-03-07T09:24:12.000Z | 2021-05-27T08:27:00.000Z | lib/ansible_netcli/models/os/ios/bgp.py | ganeshrn/ansible-netcli | e4caccb428c0b8f17034df895b7f4c4f7ce59ad7 | [
"Apache-2.0"
] | null | null | null | lib/ansible_netcli/models/os/ios/bgp.py | ganeshrn/ansible-netcli | e4caccb428c0b8f17034df895b7f4c4f7ce59ad7 | [
"Apache-2.0"
] | 1 | 2019-03-07T09:24:16.000Z | 2019-03-07T09:24:16.000Z | """
Pythonifier for BGP Ansible model
"""
from os.path import splitext
from ansible_netcli.config.loader import loadyaml
anm_ios_bgp = loadyaml(splitext(__file__)[0] + '.yaml')
| 19.888889 | 55 | 0.765363 | 25 | 179 | 5.2 | 0.76 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006369 | 0.122905 | 179 | 8 | 56 | 22.375 | 0.821656 | 0.184358 | 0 | 0 | 0 | 0 | 0.036232 | 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 |
04cd77e88dee6bb0533c3b78ef9eb476c9268b57 | 261 | py | Python | rcvformats/test/testsafety.py | artoonie/rcvformats | 323e73592a68b7a1bb7f3d851f3be4ea78f7ea65 | [
"MIT"
] | 1 | 2021-07-06T19:59:40.000Z | 2021-07-06T19:59:40.000Z | rcvformats/test/testsafety.py | artoonie/rcvformats | 323e73592a68b7a1bb7f3d851f3be4ea78f7ea65 | [
"MIT"
] | null | null | null | rcvformats/test/testsafety.py | artoonie/rcvformats | 323e73592a68b7a1bb7f3d851f3be4ea78f7ea65 | [
"MIT"
] | null | null | null | """
Safety tests: enforce security measures here
"""
import nose
from openpyxl import DEFUSEDXML
def test_electionbuddy_conversions_succeed():
""" Ensures defusedXml is installed to prevent malicious XML attacks """
nose.tools.assert_true(DEFUSEDXML)
| 23.727273 | 76 | 0.777778 | 31 | 261 | 6.419355 | 0.870968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145594 | 261 | 10 | 77 | 26.1 | 0.892377 | 0.421456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.25 | true | 0 | 0.5 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
04e710bc5adaf0d5130899bee7fcf74a81d51d98 | 2,267 | py | Python | operators/face_detector.py | JustusSchwan/MasterThesis | a9b928ed1c121a72ad1bfec28d941d31e4b232e8 | [
"MIT"
] | null | null | null | operators/face_detector.py | JustusSchwan/MasterThesis | a9b928ed1c121a72ad1bfec28d941d31e4b232e8 | [
"MIT"
] | null | null | null | operators/face_detector.py | JustusSchwan/MasterThesis | a9b928ed1c121a72ad1bfec28d941d31e4b232e8 | [
"MIT"
] | null | null | null | import dlib
from os import path
from dataflow import ports
import numpy as np
class FaceDetector:
def __init__(self, threshold=0.05):
self.detector = dlib.get_frontal_face_detector()
self.threshold = threshold
self.sink_image = ports.StateSink()
def out_bounds(self):
img = self.sink_image.get()
if img is None:
return
dets, _, _ = self.detector.run(img, 0, self.threshold)
if not dets:
return None
return dets[0]
def _dlib_track_to_array(prediction):
np_pts = np.zeros([68, 2], dtype=np.float32)
for i, p in enumerate(prediction.parts()):
np_pts[i, :] = (p.x, p.y)
return np_pts
class LandmarkDetector:
def __init__(self):
model_dir = path.join(path.dirname(path.abspath(__file__)), 'models')
self.predictor = dlib.shape_predictor(
path.join(model_dir, 'shape_predictor_68_face_landmarks.dat'))
self.sink_image = ports.StateSink()
self.sink_bounds = ports.StateSink()
def __call__(self):
return self.detect_landmarks()
def detect_landmarks(self):
img = self.sink_image.get()
bounds = self.sink_bounds.get()
if img is None or bounds is None:
return None
rect = dlib.rectangle(
int(round(bounds.left())),
int(round(bounds.top())),
int(round(bounds.right())),
int(round(bounds.bottom())))
if min(rect.top(), rect.left()) < 0 or rect.bottom() > img.shape[0] or rect.right() > img.shape[1]:
return None
return _dlib_track_to_array(prediction=self.predictor(img, rect))
def outline(prediction):
return prediction[0:17, :]
def brow_l(prediction):
return prediction[17:22, :]
def brow_r(prediction):
return prediction[22:27, :]
def nose_above(prediction):
return prediction[27:31, :]
def nose_below(prediction):
return prediction[31:36, :]
def eye_l(prediction):
return prediction[36:42, :]
def eye_r(prediction):
return prediction[42:48, :]
def mouth_out(prediction):
return prediction[48:60, :]
def mouth_in(prediction):
return prediction[60:68, :]
def get_all(prediction):
return prediction[0:68, :]
| 23.614583 | 107 | 0.631672 | 299 | 2,267 | 4.598662 | 0.32107 | 0.116364 | 0.189091 | 0.026182 | 0.128727 | 0.033455 | 0 | 0 | 0 | 0 | 0 | 0.031012 | 0.24614 | 2,267 | 95 | 108 | 23.863158 | 0.773552 | 0 | 0 | 0.109375 | 0 | 0 | 0.018968 | 0.016321 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.0625 | 0.171875 | 0.625 | 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 |
b6c6b1cfaa6d90678d19c502ba74e1bb484b7c89 | 1,851 | py | Python | pytconf/enum_subset.py | nadavweidman/pytconf | 6203d3607c1cc383c60d1c138efc1109c7a6ab59 | [
"MIT"
] | null | null | null | pytconf/enum_subset.py | nadavweidman/pytconf | 6203d3607c1cc383c60d1c138efc1109c7a6ab59 | [
"MIT"
] | 1 | 2021-12-03T11:35:46.000Z | 2021-12-03T11:52:52.000Z | pytconf/enum_subset.py | nadavweidman/pytconf | 6203d3607c1cc383c60d1c138efc1109c7a6ab59 | [
"MIT"
] | 8 | 2021-12-03T11:07:55.000Z | 2022-03-23T13:35:05.000Z | from collections import OrderedDict
from enum import Enum
from typing import Type, List
from pytconf.extended_enum import str_to_enum_value, ExtendedEnum
class EnumSubset:
def __init__(self, enum_type: Type[Enum], list_of_values: List[Type[Enum]]) -> None:
self.enum_type = enum_type
# TODO: this should actually be an ordered set
self.selected = OrderedDict()
for value in list_of_values:
self.add(value)
def add(self, enum_value):
assert (
enum_value in enum_value.__class__.__members__.values()
), f"bad value {enum_value}"
self.selected[enum_value] = None
def delete(self, enum_value):
del self.selected[enum_value]
def yield_values(self):
for value in self.selected.keys():
yield value
def values(self):
return self.selected.keys()
def __contains__(self, item):
return item in self.selected
def has_value(self, item):
return item in {x.value for x in self.selected}
def list_of_strings(self):
my_list = []
for x in self.selected:
my_list.append(x.name)
return my_list
def to_string(self):
return ",".join(self.list_of_strings())
@classmethod
def from_enum_all(cls, e):
return g_from_enum_all(e)
@classmethod
def from_string(cls, e, s):
return g_from_string(e, s)
def g_from_enum_all(e: Type[ExtendedEnum]) -> EnumSubset:
return EnumSubset(enum_type=e, list_of_values=e.get_list_of_all_values(),)
def g_from_string(e: Type[Enum], s: str) -> EnumSubset:
r = EnumSubset(enum_type=e, list_of_values=[])
for name in s.split(","):
v = str_to_enum_value(s=name, e=e)
r.add(v)
return r
def enum_subset_to_str(e: EnumSubset) -> str:
return e.to_string()
| 25.708333 | 88 | 0.647758 | 269 | 1,851 | 4.182156 | 0.237918 | 0.072 | 0.042667 | 0.024889 | 0.145778 | 0.055111 | 0.055111 | 0 | 0 | 0 | 0 | 0 | 0.251756 | 1,851 | 71 | 89 | 26.070423 | 0.812274 | 0.023771 | 0 | 0.040816 | 0 | 0 | 0.013296 | 0 | 0 | 0 | 0 | 0.014085 | 0.020408 | 1 | 0.285714 | false | 0 | 0.081633 | 0.163265 | 0.591837 | 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 |
b6e44d5694677d51a30b637fe548ea7edbc39712 | 96 | py | Python | characters/MikeRoss.py | christina05011/say_my_name_acm | 75b3a15d55689de0fdf584bcab7f444ca420ecd1 | [
"Apache-2.0"
] | null | null | null | characters/MikeRoss.py | christina05011/say_my_name_acm | 75b3a15d55689de0fdf584bcab7f444ca420ecd1 | [
"Apache-2.0"
] | null | null | null | characters/MikeRoss.py | christina05011/say_my_name_acm | 75b3a15d55689de0fdf584bcab7f444ca420ecd1 | [
"Apache-2.0"
] | 4 | 2021-06-12T22:32:27.000Z | 2021-06-12T22:47:12.000Z | class MikeRoss:
def SayName(self):
print("Mike Ross: Hi! I'm Mike Roos! No, Mike.")
| 24 | 56 | 0.604167 | 15 | 96 | 3.866667 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 96 | 3 | 57 | 32 | 0.805556 | 0 | 0 | 0 | 0 | 0 | 0.40625 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
b6e7f2e553c0d718b14167762e20d4c20b7ec902 | 121 | py | Python | 02_Beyond_Fundamentals/02_03.py | AnmolTomer/lynda_programming_foundations | 2f1269f2984ae8707acd80017b892ff4cceb0ee9 | [
"MIT"
] | null | null | null | 02_Beyond_Fundamentals/02_03.py | AnmolTomer/lynda_programming_foundations | 2f1269f2984ae8707acd80017b892ff4cceb0ee9 | [
"MIT"
] | null | null | null | 02_Beyond_Fundamentals/02_03.py | AnmolTomer/lynda_programming_foundations | 2f1269f2984ae8707acd80017b892ff4cceb0ee9 | [
"MIT"
] | null | null | null | i = 5
print("\nCount to 100 by fives:\n")
while (i <= 100):
print(i)
i += 5
print("---------Completed---------")
| 17.285714 | 36 | 0.471074 | 18 | 121 | 3.166667 | 0.611111 | 0.070175 | 0.245614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 0.206612 | 121 | 6 | 37 | 20.166667 | 0.510417 | 0 | 0 | 0 | 0 | 0 | 0.438017 | 0.223141 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
b6e81c5c097d39555a334be088d99ef26daafafd | 169 | py | Python | wbia_finfindr/__init__.py | WildbookOrg/ibeis-finfindr-module | 2ff944f3609a12f739816ac59dd322bf087c6a3c | [
"Apache-2.0"
] | null | null | null | wbia_finfindr/__init__.py | WildbookOrg/ibeis-finfindr-module | 2ff944f3609a12f739816ac59dd322bf087c6a3c | [
"Apache-2.0"
] | null | null | null | wbia_finfindr/__init__.py | WildbookOrg/ibeis-finfindr-module | 2ff944f3609a12f739816ac59dd322bf087c6a3c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
try:
from wbia_finfindr._version import __version__
except ImportError:
__version__ = '0.0.0'
from wbia_finfindr import _plugin # NOQA
| 21.125 | 50 | 0.710059 | 22 | 169 | 4.909091 | 0.636364 | 0.148148 | 0.296296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028986 | 0.183432 | 169 | 7 | 51 | 24.142857 | 0.753623 | 0.153846 | 0 | 0 | 0 | 0 | 0.035714 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 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 |
8e01c23c31b17fd8712cd49a9fdcd0dae46cd50f | 727 | py | Python | pageSpeedTest/testWebsite.py | appleseed-web/pyStagingTests | 950522dbff54ff15bea61227cae15dcade6f25d1 | [
"Apache-2.0"
] | null | null | null | pageSpeedTest/testWebsite.py | appleseed-web/pyStagingTests | 950522dbff54ff15bea61227cae15dcade6f25d1 | [
"Apache-2.0"
] | null | null | null | pageSpeedTest/testWebsite.py | appleseed-web/pyStagingTests | 950522dbff54ff15bea61227cae15dcade6f25d1 | [
"Apache-2.0"
] | null | null | null | import sys
import json
import urllib.parse
import requests
valid = True
url=sys.argv[1]
apiKey="AIzaSyA-ZkVp0wt8eBgLFTU22uKxfgmFCHsfx5A"
vurl='https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url='+ urllib.parse.quote_plus(url) +'&filter_third_party_resources=true&locale=it_IT&screenshot=false&key=' + apiKey
response = requests.get(vurl)
x=json.loads(response.text)
print();
print();
print();
print('--------------------------------------')
print('--------------------------------------')
print(' |||' + url + '|||');
print('--------------------------------------')
print('--------------------------------------')
print();
print(x['ruleGroups'])
print();
print();
print();
exit("pagespeedtest url " + url )
| 22.71875 | 182 | 0.562586 | 73 | 727 | 5.534247 | 0.575342 | 0.247525 | 0.259901 | 0.19802 | 0.074257 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010401 | 0.074278 | 727 | 31 | 183 | 23.451613 | 0.589896 | 0 | 0 | 0.458333 | 0 | 0 | 0.49381 | 0.357634 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0.541667 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
8e0b3311724ce038258fa1c437ed2df101483d06 | 156 | py | Python | pontoon/tags/utils/__init__.py | g-k/pontoon | 764cc18b7174d7c197a75584727e9626c89904ff | [
"BSD-3-Clause"
] | null | null | null | pontoon/tags/utils/__init__.py | g-k/pontoon | 764cc18b7174d7c197a75584727e9626c89904ff | [
"BSD-3-Clause"
] | 795 | 2017-11-02T12:26:10.000Z | 2020-06-01T13:34:22.000Z | pontoon/tags/utils/__init__.py | psiinon/pontoon | 8108b0ead4999754b231c81145be7c544b06ad71 | [
"BSD-3-Clause"
] | null | null | null |
from .stats import TagsStatsTool
from .translations import TagsLatestTranslationsTool
__all__ = (
'TagsStatsTool',
'TagsLatestTranslationsTool')
| 17.333333 | 52 | 0.782051 | 11 | 156 | 10.727273 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 156 | 8 | 53 | 19.5 | 0.893939 | 0 | 0 | 0 | 0 | 0 | 0.251613 | 0.167742 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
8e12a26868ff299789bff463de5d968e1f7c956a | 298 | py | Python | practice/date/timedeltatest.py | wilding/Playground | 7649837e0ac099c0eed39fa9d4a69c7c0064b046 | [
"MIT"
] | null | null | null | practice/date/timedeltatest.py | wilding/Playground | 7649837e0ac099c0eed39fa9d4a69c7c0064b046 | [
"MIT"
] | null | null | null | practice/date/timedeltatest.py | wilding/Playground | 7649837e0ac099c0eed39fa9d4a69c7c0064b046 | [
"MIT"
] | null | null | null | from datetime import timedelta
print timedelta.min
print timedelta.max
print timedelta.resolution
print '\n'
interval = timedelta(7, 54, 1234, 5, 5, 5, 5)
print interval
print '\n'
print interval.days
print interval.seconds
print interval.microseconds
print '\n'
print interval.total_seconds()
| 16.555556 | 45 | 0.778523 | 43 | 298 | 5.372093 | 0.418605 | 0.281385 | 0.025974 | 0.164502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042471 | 0.130872 | 298 | 17 | 46 | 17.529412 | 0.849421 | 0 | 0 | 0.230769 | 0 | 0 | 0.020134 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.076923 | null | null | 0.846154 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
8e23a54c152286ab38c2ba969879ec93c8a0dc86 | 72 | py | Python | haxballgym/utils/obs_builders/__init__.py | HaxballGym/HaxballGym | de499df3e9bf9832e609b2cc5486b8b45d4372e3 | [
"Apache-2.0"
] | 4 | 2022-02-04T21:25:53.000Z | 2022-02-13T11:06:03.000Z | haxballgym/utils/obs_builders/__init__.py | HaxballGym/HaxballGym | de499df3e9bf9832e609b2cc5486b8b45d4372e3 | [
"Apache-2.0"
] | null | null | null | haxballgym/utils/obs_builders/__init__.py | HaxballGym/HaxballGym | de499df3e9bf9832e609b2cc5486b8b45d4372e3 | [
"Apache-2.0"
] | null | null | null | from .obs_builder import ObsBuilder
from .default_obs import DefaultObs
| 24 | 35 | 0.861111 | 10 | 72 | 6 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 72 | 2 | 36 | 36 | 0.9375 | 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 |
8e320baf3a73ea17a1f4857556c1bfe84ead604c | 2,891 | py | Python | wxcloudrun/model.py | lion-k-2020/lion-k-2020 | e0a4de851ccb0832184932806a692c040be6c2c3 | [
"MIT"
] | null | null | null | wxcloudrun/model.py | lion-k-2020/lion-k-2020 | e0a4de851ccb0832184932806a692c040be6c2c3 | [
"MIT"
] | null | null | null | wxcloudrun/model.py | lion-k-2020/lion-k-2020 | e0a4de851ccb0832184932806a692c040be6c2c3 | [
"MIT"
] | null | null | null | from wxcloudrun import db
from datetime import datetime
# 计数表
class Counters(db.Model):
# 设置结构体表格名称
__tablename__ = 'Counters'
# 设定结构体对应表格的字段
id = db.Column(db.Integer, primary_key=True)
count = db.Column(db.Integer, default=1)
created_at = db.Column('createdAt', db.TIMESTAMP, nullable=False, default=datetime.now())
updated_at = db.Column('updatedAt', db.TIMESTAMP, nullable=False, default=datetime.now())
class Article(db.Model):
__tablename__ = 'article'
id = db.Column(db.String(50), primary_key=True, autoincrement=False)
title = db.Column(db.String(50), nullable=False)
describe = db.Column(db.String(200), unique=False, nullable=False)
read_count = db.Column(db.Integer, default=0)
update_time = db.Column(db.TIMESTAMP, onupdate=datetime.now(), default=datetime.now())
create_time = db.Column(db.TIMESTAMP, default=datetime.now())
class Tab(db.Model):
__tablename__ = 'tab'
id = db.Column(db.String(32), primary_key=True, autoincrement=False)
name = db.Column(db.String(50), nullable=False)
index = db.Column(db.Integer, unique=True, autoincrement=True)
create_time = db.Column(db.TIMESTAMP, default=datetime.now())
update_time = db.Column(db.TIMESTAMP, default=datetime.now())
deleted = db.Column(db.SmallInteger, default=0)
class Video(db.Model):
__tablename__ = 'video'
id = db.Column(db.String(32), primary_key=True, autoincrement=False)
tab_id = db.Column(db.String(32), nullable=False)
name = db.Column(db.String(50), nullable=False)
cover_src = db.Column(db.String(250), nullable=False)
src = db.Column(db.String(250), nullable=False)
index = db.Column(db.Integer, unique=True, autoincrement=True)
create_time = db.Column(db.TIMESTAMP, default=datetime.now())
update_time = db.Column(db.TIMESTAMP, default=datetime.now())
deleted = db.Column(db.SmallInteger, default=0)
class User(db.Model):
__tablename__ = 'user'
id = db.Column(db.String(50), primary_key=True, autoincrement=False)
user_id = db.Column(db.String(50), nullable=False)
name = db.Column(db.String(50), nullable=False)
is_vip = db.Column(db.SmallInteger, default=0)
create_time = db.Column(db.TIMESTAMP, default=datetime.now())
update_time = db.Column(db.TIMESTAMP, default=datetime.now())
deleted = db.Column(db.SmallInteger, default=0)
class Favorite(db.Model):
__tablename__ = 'favorite'
id = db.Column(db.String(32), primary_key=True, autoincrement=False)
user_id = db.Column(db.String(32), nullable=False)
video_id = db.Column(db.String(32), nullable=False)
is_favorite = db.Column(db.SmallInteger, default=0)
create_time = db.Column(db.TIMESTAMP, default=datetime.now())
update_time = db.Column(db.TIMESTAMP, default=datetime.now())
deleted = db.Column(db.SmallInteger, default=0)
db.create_all()
| 40.152778 | 93 | 0.708405 | 402 | 2,891 | 4.967662 | 0.146766 | 0.156234 | 0.185278 | 0.128192 | 0.771657 | 0.771657 | 0.728092 | 0.659489 | 0.596895 | 0.562344 | 0 | 0.017423 | 0.146316 | 2,891 | 71 | 94 | 40.71831 | 0.791734 | 0.008993 | 0 | 0.425926 | 0 | 0 | 0.018531 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.037037 | 0 | 0.981481 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
8e48f0a201e650049bee31b006710ba547fdf248 | 10,263 | py | Python | pyPreservica/parAPI.py | carj/pyPreservica | 0b07b67971e89e366964a22d44066c30c42cc5cc | [
"Apache-2.0"
] | 8 | 2020-07-01T12:20:59.000Z | 2022-02-22T09:11:38.000Z | pyPreservica/parAPI.py | carj/pyPreservica | 0b07b67971e89e366964a22d44066c30c42cc5cc | [
"Apache-2.0"
] | 5 | 2020-11-13T13:38:36.000Z | 2022-02-21T09:12:20.000Z | pyPreservica/parAPI.py | carj/pyPreservica | 0b07b67971e89e366964a22d44066c30c42cc5cc | [
"Apache-2.0"
] | null | null | null | """
pyPreservica Preservation Action Registry module definition
A client library for the Preservica PAR API
https://us.preservica.com/Registry/par/documentation.html
author: James Carr
licence: Apache License 2.0
"""
from typing import AnyStr
from requests.auth import HTTPBasicAuth
from pyPreservica.common import *
def __get_contents__(document) -> AnyStr:
try:
with open(document, "rb") as f:
return f.read()
except (OSError, TypeError):
return json.dumps(json.loads(document))
class PreservationActionRegistry:
def __init__(self, server: str = None, username: str = None, password: str = None, protocol: str = 'https'):
self.protocol = protocol
self.session = requests.Session()
self.session.headers.update({'accept': 'application/json;charset=UTF-8'})
config = configparser.ConfigParser()
config.read('credentials.properties')
if not server:
server = os.environ.get('PRESERVICA_SERVER')
if server is None:
try:
server = config['credentials']['server']
except KeyError:
pass
if not server:
msg = "No valid server found in method arguments, environment variables or credentials.properties file"
logger.error(msg)
raise RuntimeError(msg)
else:
self.server = server
if not username:
username = os.environ.get('PRESERVICA_USERNAME')
if username is None:
try:
username = config['credentials']['username']
except KeyError:
pass
self.username = username
if not password:
password = os.environ.get('PRESERVICA_PASSWORD')
if password is None:
try:
password = config['credentials']['password']
except KeyError:
pass
self.password = password
def format_family(self, guid: str) -> str:
return self.__guid__(guid, "format-families")
def format_families(self) -> str:
return self.__all_("format-families")
def add_format_family(self, document) -> str:
return self.__add__("format-families", document)
def update_format_family(self, guid: str, document) -> str:
return self.__update__(guid, "format-families", document)
def delete_format_family(self, guid) -> str:
return self.__delete__(guid, "format-families")
def preservation_action_type(self, guid: str) -> str:
return self.__guid__(guid, "preservation-action-types")
def preservation_action_types(self) -> str:
return self.__all_("preservation-action-types")
def add_preservation_action_type(self, document) -> str:
return self.__add__("preservation-action-types", document)
def update_preservation_action_type(self, guid: str, document) -> str:
return self.__update__(guid, "preservation-action-types", document)
def delete_preservation_action_type(self, guid) -> str:
return self.__delete__(guid, "preservation-action-types")
def property(self, guid: str) -> str:
return self.__guid__(guid, "properties")
def properties(self) -> str:
return self.__all_("properties")
def add_property(self, document) -> str:
return self.__add__("properties", document)
def update_property(self, guid: str, document) -> str:
return self.__update__(guid, "properties", document)
def delete_property(self, guid) -> str:
return self.__delete__(guid, "properties")
def representation_format(self, guid: str) -> str:
return self.__guid__(guid, "representation-formats")
def representation_formats(self) -> str:
return self.__all_("representation-formats")
def add_representation_format(self, document) -> str:
return self.__add__("representation-formats", document)
def update_representation_format(self, guid: str, document) -> str:
return self.__update__(guid, "representation-formats", document)
def delete_representation_format(self, guid) -> str:
return self.__delete__(guid, "representation-formats")
def file_format(self, puid: str) -> str:
return self.__guid__(puid, "file-formats")
def file_formats(self) -> str:
return self.__all_("file-formats")
def add_file_format(self, document) -> str:
return self.__add__("file-formats", document)
def update_file_format(self, guid: str, document) -> str:
return self.__update__(guid, "file-formats", document)
def delete_file_format(self, guid) -> str:
return self.__delete__(guid, "file-formats")
def tool(self, guid: str) -> str:
return self.__guid__(guid, "tools")
def tools(self) -> str:
return self.__all_("tools")
def add_tool(self, document) -> str:
return self.__add__("tools", document)
def update_tool(self, guid: str, document) -> str:
return self.__update__(guid, "tools", document)
def delete_tool(self, guid) -> str:
return self.__delete__(guid, "tools")
def preservation_action(self, guid: str) -> str:
return self.__guid__(guid, "preservation-actions")
def preservation_actions(self) -> str:
return self.__all_("preservation-actions")
def add_preservation_action(self, document) -> str:
return self.__add__("preservation-actions", document)
def update_preservation_action(self, guid: str, document) -> str:
return self.__update__(guid, "preservation-actions", document)
def delete_preservation_action(self, guid) -> str:
return self.__delete__(guid, "preservation-actions")
def business_rule(self, guid: str) -> str:
return self.__guid__(guid, "business-rules")
def business_rules(self) -> str:
return self.__all_("business-rules")
def add_business_rule(self, document) -> str:
return self.__add__("business-rules", document)
def update_business_rule(self, guid: str, document) -> str:
return self.__update__(guid, "business-rules", document)
def delete_business_rule(self, guid) -> str:
return self.__delete__(guid, "business-rules")
def rule_set(self, guid: str) -> str:
return self.__guid__(guid, "rulesets")
def rule_sets(self) -> str:
return self.__all_("rulesets")
def add_rule_set(self, document) -> str:
return self.__add__("rulesets", document)
def update_rule_set(self, guid: str, document) -> str:
return self.__update__(guid, "rulesets", document)
def delete_rule_set(self, guid) -> str:
return self.__delete__(guid, "rulesets")
def __guid__(self, guid: str, endpoint: str) -> str:
request = self.session.get(f'{self.protocol}://{self.server}/Registry/par/{endpoint}/{guid}')
if request.status_code == requests.codes.ok:
return request.content.decode('utf-8')
else:
logger.debug(request.content.decode('utf-8'))
raise RuntimeError(request.status_code, f"{endpoint} failed")
def __all_(self, endpoint: str) -> str:
request = self.session.get(f'{self.protocol}://{self.server}/Registry/par/{endpoint}')
if request.status_code == requests.codes.ok:
return request.content.decode('utf-8')
else:
logger.debug(request.content.decode('utf-8'))
raise RuntimeError(request.status_code, f"{endpoint} failed")
def __add__(self, endpoint: str, document) -> str:
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
if self.username is None or self.password is None:
logger.error(f"add {endpoint} is an authenticated call, please provide credentials")
raise RuntimeError(f"add {endpoint} is an authenticated call, please provide credentials")
contents = __get_contents__(document)
request = self.session.post(f'{self.protocol}://{self.server}/Registry/par/{endpoint}',
auth=HTTPBasicAuth(self.username, self.password), headers=headers, data=contents)
if request.status_code == requests.codes.created:
return request.content.decode('utf-8')
else:
logger.debug(request.content.decode('utf-8'))
raise RuntimeError(request.status_code, f"add {endpoint} failed")
def __update__(self, guid: str, endpoint: str, document) -> str:
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
if self.username is None or self.password is None:
logger.error(f"update {endpoint} is an authenticated call, please provide credentials")
raise RuntimeError(f"update {endpoint} is an authenticated call, please provide credentials")
contents = __get_contents__(document)
request = self.session.put(f'{self.protocol}://{self.server}/Registry/par/{endpoint}/{guid}',
auth=HTTPBasicAuth(self.username, self.password), headers=headers, data=contents)
if request.status_code == requests.codes.created:
return request.content.decode('utf-8')
else:
logger.debug(request.content.decode('utf-8'))
raise RuntimeError(request.status_code, f"update {endpoint} failed")
def __delete__(self, guid: str, endpoint: str) -> str:
if self.username is None or self.password is None:
logger.error(f"delete {endpoint} is an authenticated call, please provide credentials")
raise RuntimeError(f"delete {endpoint} is an authenticated call, please provide credentials")
request = self.session.delete(f'{self.protocol}://{self.server}/Registry/par/{endpoint}/{guid}',
auth=HTTPBasicAuth(self.username, self.password))
if request.status_code == requests.codes.no_content:
return request.content.decode('utf-8')
else:
logger.debug(request.content.decode('utf-8'))
raise RuntimeError(request.status_code, f"delete {endpoint} failed")
| 39.473077 | 117 | 0.647082 | 1,176 | 10,263 | 5.40051 | 0.118197 | 0.063769 | 0.092111 | 0.059518 | 0.624784 | 0.553614 | 0.491891 | 0.444182 | 0.382145 | 0.334593 | 0 | 0.001656 | 0.235214 | 10,263 | 259 | 118 | 39.625483 | 0.807491 | 0.021144 | 0 | 0.231183 | 0 | 0 | 0.188403 | 0.060277 | 0 | 0 | 0 | 0 | 0 | 1 | 0.27957 | false | 0.080645 | 0.016129 | 0.241935 | 0.580645 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 4 |
8e4c7b73d3bf709c9055d7c23c7bb6b538e50cce | 10,932 | py | Python | sdk/python/pulumi_opsgenie/service.py | pulumi/pulumi-opsgenie | 4bc7d0cbb5b0437c59422a5977a61468baa2c4a7 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-12-01T20:57:42.000Z | 2021-12-01T20:57:42.000Z | sdk/python/pulumi_opsgenie/service.py | pulumi/pulumi-opsgenie | 4bc7d0cbb5b0437c59422a5977a61468baa2c4a7 | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2021-02-03T20:15:32.000Z | 2022-03-25T19:57:20.000Z | sdk/python/pulumi_opsgenie/service.py | pulumi/pulumi-opsgenie | 4bc7d0cbb5b0437c59422a5977a61468baa2c4a7 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-07-08T15:16:09.000Z | 2021-07-20T11:12:44.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['ServiceArgs', 'Service']
@pulumi.input_type
class ServiceArgs:
def __init__(__self__, *,
team_id: pulumi.Input[str],
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Service resource.
:param pulumi.Input[str] team_id: Team id of the service. This field must not be longer than 512 characters.
:param pulumi.Input[str] description: Description field of the service that is generally used to provide a detailed information about the service.
:param pulumi.Input[str] name: Name of the service. This field must not be longer than 100 characters.
"""
pulumi.set(__self__, "team_id", team_id)
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
@property
@pulumi.getter(name="teamId")
def team_id(self) -> pulumi.Input[str]:
"""
Team id of the service. This field must not be longer than 512 characters.
"""
return pulumi.get(self, "team_id")
@team_id.setter
def team_id(self, value: pulumi.Input[str]):
pulumi.set(self, "team_id", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description field of the service that is generally used to provide a detailed information about the service.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the service. This field must not be longer than 100 characters.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@pulumi.input_type
class _ServiceState:
def __init__(__self__, *,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
team_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Service resources.
:param pulumi.Input[str] description: Description field of the service that is generally used to provide a detailed information about the service.
:param pulumi.Input[str] name: Name of the service. This field must not be longer than 100 characters.
:param pulumi.Input[str] team_id: Team id of the service. This field must not be longer than 512 characters.
"""
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if team_id is not None:
pulumi.set(__self__, "team_id", team_id)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description field of the service that is generally used to provide a detailed information about the service.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the service. This field must not be longer than 100 characters.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="teamId")
def team_id(self) -> Optional[pulumi.Input[str]]:
"""
Team id of the service. This field must not be longer than 512 characters.
"""
return pulumi.get(self, "team_id")
@team_id.setter
def team_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "team_id", value)
class Service(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
team_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages a Service within Opsgenie.
## Example Usage
```python
import pulumi
import pulumi_opsgenie as opsgenie
payment = opsgenie.Team("payment", description="This team deals with all the things")
this = opsgenie.Service("this", team_id="$opsgenie_team.payment.id")
```
## Import
Teams can be imported using the `service_id`, e.g.
```sh
$ pulumi import opsgenie:index/service:Service this service_id`
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] description: Description field of the service that is generally used to provide a detailed information about the service.
:param pulumi.Input[str] name: Name of the service. This field must not be longer than 100 characters.
:param pulumi.Input[str] team_id: Team id of the service. This field must not be longer than 512 characters.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: ServiceArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a Service within Opsgenie.
## Example Usage
```python
import pulumi
import pulumi_opsgenie as opsgenie
payment = opsgenie.Team("payment", description="This team deals with all the things")
this = opsgenie.Service("this", team_id="$opsgenie_team.payment.id")
```
## Import
Teams can be imported using the `service_id`, e.g.
```sh
$ pulumi import opsgenie:index/service:Service this service_id`
```
:param str resource_name: The name of the resource.
:param ServiceArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ServiceArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
team_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ServiceArgs.__new__(ServiceArgs)
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
if team_id is None and not opts.urn:
raise TypeError("Missing required property 'team_id'")
__props__.__dict__["team_id"] = team_id
super(Service, __self__).__init__(
'opsgenie:index/service:Service',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
team_id: Optional[pulumi.Input[str]] = None) -> 'Service':
"""
Get an existing Service resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] description: Description field of the service that is generally used to provide a detailed information about the service.
:param pulumi.Input[str] name: Name of the service. This field must not be longer than 100 characters.
:param pulumi.Input[str] team_id: Team id of the service. This field must not be longer than 512 characters.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _ServiceState.__new__(_ServiceState)
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["team_id"] = team_id
return Service(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
Description field of the service that is generally used to provide a detailed information about the service.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Name of the service. This field must not be longer than 100 characters.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="teamId")
def team_id(self) -> pulumi.Output[str]:
"""
Team id of the service. This field must not be longer than 512 characters.
"""
return pulumi.get(self, "team_id")
| 39.182796 | 154 | 0.632089 | 1,318 | 10,932 | 5.046282 | 0.118361 | 0.071117 | 0.086303 | 0.079387 | 0.759284 | 0.73598 | 0.715231 | 0.695835 | 0.673733 | 0.654638 | 0 | 0.005403 | 0.272045 | 10,932 | 278 | 155 | 39.323741 | 0.830359 | 0.364526 | 0 | 0.634483 | 1 | 0 | 0.07395 | 0.004792 | 0 | 0 | 0 | 0 | 0 | 1 | 0.151724 | false | 0.006897 | 0.034483 | 0 | 0.275862 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
6d2bb92e6731674b68cb46f539c82b7b78b50684 | 630 | py | Python | test/test_airtunnel/operators/test_transformation.py | joerg-schneider/airflow-bootstrap | bbed0a2d5addd0dd6221b75c06982f47e0d837d4 | [
"MIT"
] | 23 | 2019-09-30T15:22:58.000Z | 2021-04-09T10:53:23.000Z | test/test_airtunnel/operators/test_transformation.py | joerg-schneider/airflow-bootstrap | bbed0a2d5addd0dd6221b75c06982f47e0d837d4 | [
"MIT"
] | 1 | 2019-11-24T18:37:56.000Z | 2019-11-24T18:37:56.000Z | test/test_airtunnel/operators/test_transformation.py | joerg-schneider/airflow-bootstrap | bbed0a2d5addd0dd6221b75c06982f47e0d837d4 | [
"MIT"
] | 4 | 2020-01-14T03:31:34.000Z | 2021-05-07T21:34:22.000Z | import pytest
from airflow.hooks.dbapi_hook import DbApiHook
from airtunnel import PandasDataAsset, SQLDataAsset
from airtunnel.operators.transformation import (
SQLTransformationOperator,
)
@pytest.fixture
def test_sql_asset(test_db_hook: DbApiHook) -> SQLDataAsset:
return SQLDataAsset("test_schema.test_table", test_db_hook)
@pytest.fixture
def test_pandas_asset() -> PandasDataAsset:
return PandasDataAsset("test_parquet_in_asset")
def test_pyspark_transformation_operator():
pass
def test_sql_transformation_operator(test_sql_asset: SQLDataAsset):
SQLTransformationOperator(asset=test_sql_asset)
| 24.230769 | 67 | 0.822222 | 73 | 630 | 6.767123 | 0.39726 | 0.05668 | 0.072874 | 0.080972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109524 | 630 | 25 | 68 | 25.2 | 0.88057 | 0 | 0 | 0.125 | 0 | 0 | 0.068254 | 0.068254 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.0625 | 0.25 | 0.125 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 4 |
6d601f5550f1a7f7335be22f371ff92a5240f3ed | 80 | py | Python | sqlalchemy_toolbox/__init__.py | coding-kitties/sqlalchemy-toolbox | e4c2cda23013b7d8bb056a0c7ef6221e07f5695b | [
"MIT"
] | null | null | null | sqlalchemy_toolbox/__init__.py | coding-kitties/sqlalchemy-toolbox | e4c2cda23013b7d8bb056a0c7ef6221e07f5695b | [
"MIT"
] | null | null | null | sqlalchemy_toolbox/__init__.py | coding-kitties/sqlalchemy-toolbox | e4c2cda23013b7d8bb056a0c7ef6221e07f5695b | [
"MIT"
] | null | null | null | from .database_type import DatabaseType
from .wrappers import SQLAlchemyWrapper
| 26.666667 | 39 | 0.875 | 9 | 80 | 7.666667 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 80 | 2 | 40 | 40 | 0.958333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
eda73545378db4660205d7923833be5764c5f71e | 682 | py | Python | tests/conftest.py | databio/bbconf | c555fe481ded2b854b07c29c95e643fbb7713a5a | [
"BSD-2-Clause"
] | 1 | 2020-03-17T21:44:25.000Z | 2020-03-17T21:44:25.000Z | tests/conftest.py | databio/bbconf | c555fe481ded2b854b07c29c95e643fbb7713a5a | [
"BSD-2-Clause"
] | 9 | 2020-02-06T17:20:38.000Z | 2021-11-11T17:35:26.000Z | tests/conftest.py | databio/bbconf | c555fe481ded2b854b07c29c95e643fbb7713a5a | [
"BSD-2-Clause"
] | 1 | 2020-02-12T00:21:02.000Z | 2020-02-12T00:21:02.000Z | """ Test suite shared objects and setup """
import os
import pytest
@pytest.fixture
def test_data_bed():
s = "test_string"
return {"name": s, "md5sum": s, "bedfile": {"path": s, "title": s}, "regions_no": 1}
@pytest.fixture
def test_data_bedset():
s = "test_string"
return {"name": s, "md5sum": s, "bedset_tar_archive_path": {"path": s, "title": s}}
@pytest.fixture
def data_path():
return os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
@pytest.fixture
def cfg_pth(data_path):
return os.path.join(data_path, "config.yaml")
@pytest.fixture
def invalid_cfg_pth(data_path):
return os.path.join(data_path, "config_invalid.yaml")
| 21.3125 | 88 | 0.678886 | 103 | 682 | 4.271845 | 0.349515 | 0.147727 | 0.181818 | 0.109091 | 0.495455 | 0.386364 | 0.331818 | 0.331818 | 0.2 | 0.2 | 0 | 0.005181 | 0.151026 | 682 | 31 | 89 | 22 | 0.75475 | 0.05132 | 0 | 0.368421 | 0 | 0 | 0.209703 | 0.035994 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0.105263 | 0.157895 | 0.631579 | 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 |
eddb6ba5940cd1e5bdaba49ab1a876a7f906af41 | 193 | py | Python | harpy/core/__init__.py | serhatcelik/hARPy | 8aa66634aa103543b03b3ccb0d6c4eb0be14f743 | [
"MIT"
] | 6 | 2020-08-10T11:12:24.000Z | 2020-09-11T04:37:42.000Z | harpy/core/__init__.py | serhatcelik/hARPy | 8aa66634aa103543b03b3ccb0d6c4eb0be14f743 | [
"MIT"
] | 2 | 2020-08-25T14:51:12.000Z | 2020-09-02T17:14:31.000Z | harpy/core/__init__.py | serhatcelik/hARPy | 8aa66634aa103543b03b3ccb0d6c4eb0be14f743 | [
"MIT"
] | null | null | null | # coding=utf-8
#
# This file is part of hARPy
# See https://github.com/serhatcelik/harpy for more information
# Released under the MIT license
# Copyright (C) Serhat Çelik
"""Core modules."""
| 21.444444 | 63 | 0.725389 | 29 | 193 | 4.827586 | 0.965517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006135 | 0.15544 | 193 | 8 | 64 | 24.125 | 0.852761 | 0.901554 | 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 |
6102be5ec54689c8e3fd3d930938d2981fde925d | 95 | py | Python | timemachines/inclusion/threezainclusion.py | vishalbelsare/timemachines | 34321bc2bcbfdbae89f6394c4e1dfd9e3c070506 | [
"MIT"
] | null | null | null | timemachines/inclusion/threezainclusion.py | vishalbelsare/timemachines | 34321bc2bcbfdbae89f6394c4e1dfd9e3c070506 | [
"MIT"
] | null | null | null | timemachines/inclusion/threezainclusion.py | vishalbelsare/timemachines | 34321bc2bcbfdbae89f6394c4e1dfd9e3c070506 | [
"MIT"
] | null | null | null | try:
import threeza
using_threeza = True
except ImportError:
using_threeza = False
| 15.833333 | 25 | 0.715789 | 11 | 95 | 6 | 0.727273 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242105 | 95 | 5 | 26 | 19 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 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 |
b61d288bbae3cd827d3b45ec334098a2aaa99a2e | 178 | py | Python | taotao-cloud-python/taotao-cloud-oldboy/day32-python-ftp/day32/FTP_sever/bin/ftp_sever.py | shuigedeng/taotao-cloud-paren | 3d281b919490f7cbee4520211e2eee5da7387564 | [
"Apache-2.0"
] | 47 | 2021-04-13T10:32:13.000Z | 2022-03-31T10:30:30.000Z | taotao-cloud-python/taotao-cloud-oldboy/day32-python-ftp/day32/FTP_sever/bin/ftp_sever.py | shuigedeng/taotao-cloud-paren | 3d281b919490f7cbee4520211e2eee5da7387564 | [
"Apache-2.0"
] | 1 | 2021-11-01T07:41:04.000Z | 2021-11-01T07:41:10.000Z | taotao-cloud-python/taotao-cloud-oldboy/day32-python-ftp/day32/FTP_sever/bin/ftp_sever.py | shuigedeng/taotao-cloud-paren | 3d281b919490f7cbee4520211e2eee5da7387564 | [
"Apache-2.0"
] | 21 | 2021-04-13T10:32:17.000Z | 2022-03-26T07:43:22.000Z | import os ,sys
PATH=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(PATH)
from core import main
if __name__ == '__main__':
main.ArgvHandler() | 16.181818 | 64 | 0.730337 | 27 | 178 | 4.37037 | 0.518519 | 0.152542 | 0.220339 | 0.254237 | 0.271186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123596 | 178 | 11 | 65 | 16.181818 | 0.75641 | 0 | 0 | 0 | 0 | 0 | 0.044693 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
b6257fe6fb9115462f88ac531b1881dd811438d8 | 174 | py | Python | beethon/tests/test_messages.py | wblxyxolbkhv/beethon | f320b769fb30990a89fcd1cf6229b90d725fd206 | [
"MIT"
] | 6 | 2019-10-31T11:58:47.000Z | 2020-02-24T19:34:16.000Z | beethon/tests/test_messages.py | wblxyxolbkhv/beethon | f320b769fb30990a89fcd1cf6229b90d725fd206 | [
"MIT"
] | null | null | null | beethon/tests/test_messages.py | wblxyxolbkhv/beethon | f320b769fb30990a89fcd1cf6229b90d725fd206 | [
"MIT"
] | null | null | null | import pytest
from beethon.messages.base import Request
@pytest.mark.unit
def test_register_wrong_class():
with pytest.raises(ValueError):
Request.parse("{}")
| 17.4 | 41 | 0.735632 | 22 | 174 | 5.681818 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155172 | 174 | 9 | 42 | 19.333333 | 0.85034 | 0 | 0 | 0 | 0 | 0 | 0.011494 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | true | 0 | 0.333333 | 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 |
b6424a140a6177c4bb172b48d797730a49e4e70b | 102 | py | Python | py_tdlib/constructors/t_me_url_type_supergroup.py | Mr-TelegramBot/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 24 | 2018-10-05T13:04:30.000Z | 2020-05-12T08:45:34.000Z | py_tdlib/constructors/t_me_url_type_supergroup.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 3 | 2019-06-26T07:20:20.000Z | 2021-05-24T13:06:56.000Z | py_tdlib/constructors/t_me_url_type_supergroup.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 5 | 2018-10-05T14:29:28.000Z | 2020-08-11T15:04:10.000Z | from ..factory import Type
class tMeUrlTypeSupergroup(Type):
supergroup_id = None # type: "int53"
| 17 | 38 | 0.745098 | 12 | 102 | 6.25 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023256 | 0.156863 | 102 | 5 | 39 | 20.4 | 0.848837 | 0.127451 | 0 | 0 | 0 | 0 | 0 | 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 |
b6591baad9020937c8bd5d7556a5a8d701ffde89 | 99 | py | Python | beerhunter/my_syte/apps.py | zhukovvlad/beerhunt-project | e841f4946c08275e9d189605ffe9026d6657d63f | [
"MIT"
] | null | null | null | beerhunter/my_syte/apps.py | zhukovvlad/beerhunt-project | e841f4946c08275e9d189605ffe9026d6657d63f | [
"MIT"
] | null | null | null | beerhunter/my_syte/apps.py | zhukovvlad/beerhunt-project | e841f4946c08275e9d189605ffe9026d6657d63f | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MySyteConfig(AppConfig):
name = 'beerhunter.my_syte'
| 16.5 | 33 | 0.767677 | 12 | 99 | 6.25 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.151515 | 99 | 5 | 34 | 19.8 | 0.892857 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 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 |
b694f315296b4c0b7a47c6d680239b661f81acf4 | 112 | py | Python | ex002.py | anderson-felix/Learning_python | 29b267d1325125e251d3d5bba8736ab85c2ce116 | [
"MIT"
] | null | null | null | ex002.py | anderson-felix/Learning_python | 29b267d1325125e251d3d5bba8736ab85c2ce116 | [
"MIT"
] | null | null | null | ex002.py | anderson-felix/Learning_python | 29b267d1325125e251d3d5bba8736ab85c2ce116 | [
"MIT"
] | null | null | null | nome = input('Qual o seu nome ? : ')
print('Muito prazer em te conhecer {}. Seja muito bem vindo!'.format(nome)) | 56 | 75 | 0.678571 | 18 | 112 | 4.222222 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160714 | 112 | 2 | 75 | 56 | 0.808511 | 0 | 0 | 0 | 0 | 0 | 0.646018 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
b69f356e651d55ea7a2d2a6cfa70a0153bece4ef | 119 | py | Python | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson01-introduction to neural networks/exercise01-perceptrons as logical operators/xor_perceptron.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson01-introduction to neural networks/exercise01-perceptrons as logical operators/xor_perceptron.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson01-introduction to neural networks/exercise01-perceptrons as logical operators/xor_perceptron.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | """
# !/usr/bin/env python
# -*- coding: utf-8 -*-
@Time : 2022/3/26 11:09
@File : xor_perceptron.py
"""
| 17 | 32 | 0.504202 | 17 | 119 | 3.470588 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 0.260504 | 119 | 6 | 33 | 19.833333 | 0.534091 | 0.92437 | 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 |
fcb223c53c4ed9888b84a975db47a991ba09fe94 | 164 | py | Python | linear_regression.py | CogitoNTNU/grunnkurs-template-1 | f25a7dc8474ccfcf0d358e30b59a11e1487817fd | [
"MIT"
] | null | null | null | linear_regression.py | CogitoNTNU/grunnkurs-template-1 | f25a7dc8474ccfcf0d358e30b59a11e1487817fd | [
"MIT"
] | null | null | null | linear_regression.py | CogitoNTNU/grunnkurs-template-1 | f25a7dc8474ccfcf0d358e30b59a11e1487817fd | [
"MIT"
] | null | null | null | import numpy
import matplotlib.pyplot as plot
import pandas
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
| 23.428571 | 52 | 0.878049 | 23 | 164 | 6.086957 | 0.695652 | 0.157143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103659 | 164 | 6 | 53 | 27.333333 | 0.952381 | 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 |
fcbf0283f4b9e376201a68cbe32ae879b0333401 | 118 | py | Python | config.py | iamvukasin/filminds | 54c9d7175f3a06f411cc750a694758bd683af1ee | [
"MIT"
] | 2 | 2019-06-15T01:40:04.000Z | 2019-12-19T05:11:17.000Z | config.py | iamvukasin/filminds | 54c9d7175f3a06f411cc750a694758bd683af1ee | [
"MIT"
] | 1 | 2021-03-09T05:22:51.000Z | 2021-03-09T05:22:51.000Z | config.py | iamvukasin/filminds | 54c9d7175f3a06f411cc750a694758bd683af1ee | [
"MIT"
] | 2 | 2019-06-24T19:24:25.000Z | 2020-05-29T13:57:35.000Z | import os
TMDB_API_KEY = os.environ.get('TMDB_API_KEY', '')
WIT_ACCESS_TOKEN = os.environ.get('WIT_ACCESS_TOKEN', '') | 29.5 | 57 | 0.745763 | 20 | 118 | 4 | 0.5 | 0.175 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084746 | 118 | 4 | 57 | 29.5 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0.235294 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 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 |
fcdecdb6d7b2ac0e1007767023b74b6b459e7bd4 | 146 | py | Python | quizzer/domain/answer.py | davidmogar/quizzer-python | dae64132063d0ba163549f03280421d9e6e8b4d5 | [
"MIT"
] | null | null | null | quizzer/domain/answer.py | davidmogar/quizzer-python | dae64132063d0ba163549f03280421d9e6e8b4d5 | [
"MIT"
] | null | null | null | quizzer/domain/answer.py | davidmogar/quizzer-python | dae64132063d0ba163549f03280421d9e6e8b4d5 | [
"MIT"
] | null | null | null | __author__ = 'David'
class Answer:
def __init__(self, question_id, value):
self.question_id = question_id
self.value = value | 20.857143 | 43 | 0.664384 | 18 | 146 | 4.777778 | 0.555556 | 0.348837 | 0.325581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.246575 | 146 | 7 | 44 | 20.857143 | 0.781818 | 0 | 0 | 0 | 0 | 0 | 0.034014 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
fcf21fb88c89412fe9ed237d2dc01ff64496b287 | 1,485 | py | Python | test/test_smart_computer_groups_preview_api.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | 1 | 2021-04-20T15:28:57.000Z | 2021-04-20T15:28:57.000Z | test/test_smart_computer_groups_preview_api.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | null | null | null | test/test_smart_computer_groups_preview_api.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
Jamf Pro API
## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and should be used soley for documentation purposes. # noqa: E501
The version of the OpenAPI document: 10.25.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import jamf
from jamf.api.smart_computer_groups_preview_api import SmartComputerGroupsPreviewApi # noqa: E501
from jamf.rest import ApiException
class TestSmartComputerGroupsPreviewApi(unittest.TestCase):
"""SmartComputerGroupsPreviewApi unit test stubs"""
def setUp(self):
self.api = jamf.api.smart_computer_groups_preview_api.SmartComputerGroupsPreviewApi() # noqa: E501
def tearDown(self):
pass
def test_v1_computers_id_recalculate_smart_groups_post(self):
"""Test case for v1_computers_id_recalculate_smart_groups_post
Recalculate a smart group for the given id # noqa: E501
"""
pass
def test_v1_smart_computer_groups_id_recalculate_post(self):
"""Test case for v1_smart_computer_groups_id_recalculate_post
Recalculate the smart group for the given id # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 30.9375 | 342 | 0.740741 | 197 | 1,485 | 5.345178 | 0.482234 | 0.037987 | 0.072175 | 0.037987 | 0.309592 | 0.309592 | 0.281102 | 0.066477 | 0.066477 | 0 | 0 | 0.021097 | 0.20202 | 1,485 | 47 | 343 | 31.595745 | 0.867511 | 0.515152 | 0 | 0.1875 | 0 | 0 | 0.012403 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.1875 | 0.3125 | 0 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 4 |
1e0d3e78dd94e79dd939faebcbaa0394a1272509 | 206 | py | Python | agent/modules/utils.py | dsmith73/scantron | 9b82c9fb7e3f2d95c56e7e52aa5a090a4ac8ed6e | [
"Apache-2.0"
] | 2 | 2020-07-12T11:11:26.000Z | 2021-02-12T00:24:45.000Z | agent/modules/utils.py | dsmith73/scantron | 9b82c9fb7e3f2d95c56e7e52aa5a090a4ac8ed6e | [
"Apache-2.0"
] | 6 | 2021-03-19T13:21:02.000Z | 2022-02-10T09:49:06.000Z | agent/modules/utils.py | dsmith73/scantron | 9b82c9fb7e3f2d95c56e7e52aa5a090a4ac8ed6e | [
"Apache-2.0"
] | null | null | null | import datetime
def get_current_time():
"""Retrieve a Django compliant pre-formated datetimestamp."""
now_datetime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
return now_datetime
| 22.888889 | 72 | 0.699029 | 28 | 206 | 5 | 0.75 | 0.157143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150485 | 206 | 8 | 73 | 25.75 | 0.8 | 0.26699 | 0 | 0 | 0 | 0 | 0.117241 | 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 |
1e8f31b5743318aaf1fb14fc9607a8cbf2a6aa16 | 33 | py | Python | python/testData/completion/epydocTags.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/completion/epydocTags.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/completion/epydocTags.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def foo(bar):
""" <caret> """ | 16.5 | 19 | 0.424242 | 4 | 33 | 3.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242424 | 33 | 2 | 19 | 16.5 | 0.56 | 0.212121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | false | 0 | 0 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
1ea6bf73834fa107bed9489f9d5419ec114c63b8 | 83 | py | Python | 11-modules/main2.py | johnehunt/PythonIntroDS | 7e9d5c5494191cd68bc71e140df5fb30290a8da6 | [
"Apache-2.0"
] | 1 | 2021-09-20T11:22:47.000Z | 2021-09-20T11:22:47.000Z | 11-modules/main2.py | johnehunt/PythonIntroDS | 7e9d5c5494191cd68bc71e140df5fb30290a8da6 | [
"Apache-2.0"
] | null | null | null | 11-modules/main2.py | johnehunt/PythonIntroDS | 7e9d5c5494191cd68bc71e140df5fb30290a8da6 | [
"Apache-2.0"
] | null | null | null | from utils import *
printer(default_shape)
shape = Shape("circle")
printer(shape)
| 13.833333 | 23 | 0.759036 | 11 | 83 | 5.636364 | 0.636364 | 0.322581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.120482 | 83 | 5 | 24 | 16.6 | 0.849315 | 0 | 0 | 0 | 0 | 0 | 0.072289 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0.5 | 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 |
94ab45e2041ecca34ada650f38dbf0f910d0cb68 | 67 | py | Python | debug_toolbar_line_profiler/signals.py | tufedtm/django-debug-toolbar-line-profiler | bc43cf697c637619a01398514fa3b3a7d2745652 | [
"BSD-3-Clause"
] | 8 | 2020-06-23T21:16:49.000Z | 2022-02-14T11:42:59.000Z | debug_toolbar_line_profiler/signals.py | tufedtm/django-debug-toolbar-line-profiler | bc43cf697c637619a01398514fa3b3a7d2745652 | [
"BSD-3-Clause"
] | 5 | 2021-01-05T19:21:15.000Z | 2022-01-21T11:30:25.000Z | debug_toolbar_line_profiler/signals.py | tufedtm/django-debug-toolbar-line-profiler | bc43cf697c637619a01398514fa3b3a7d2745652 | [
"BSD-3-Clause"
] | 3 | 2020-08-19T13:59:12.000Z | 2021-11-22T03:36:02.000Z | import django.dispatch
profiler_setup = django.dispatch.Signal()
| 13.4 | 41 | 0.80597 | 8 | 67 | 6.625 | 0.75 | 0.528302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104478 | 67 | 4 | 42 | 16.75 | 0.883333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 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 |
a200bbea05b25a13ce492889dbfeefeea77bab86 | 102 | py | Python | website/archive/binaries/mac/src/globplot/biopython-1.50/Bio/Encodings/__init__.py | homiak/jabaws | f9c48c1311a07bffd99866f3d70a82e889f10493 | [
"Apache-2.0"
] | 3 | 2017-10-23T21:53:57.000Z | 2019-09-23T05:14:12.000Z | website/archive/binaries/mac/src/globplot/biopython-1.50/Bio/Encodings/__init__.py | homiak/jabaws | f9c48c1311a07bffd99866f3d70a82e889f10493 | [
"Apache-2.0"
] | null | null | null | website/archive/binaries/mac/src/globplot/biopython-1.50/Bio/Encodings/__init__.py | homiak/jabaws | f9c48c1311a07bffd99866f3d70a82e889f10493 | [
"Apache-2.0"
] | 6 | 2020-02-26T16:34:20.000Z | 2020-03-04T15:34:00.000Z | # This is a Python module.
"""Properties for functionality such as transcription and translation.
"""
| 25.5 | 70 | 0.764706 | 13 | 102 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 102 | 3 | 71 | 34 | 0.896552 | 0.911765 | 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 |
a2076a7d1db08a29d44ca14365251ebefb5779b5 | 114 | py | Python | src/metecho/plot/__init__.py | danielk333/metecho | 9df2e542e5e5d1a76cc793c6874bc41de26eb51f | [
"MIT"
] | null | null | null | src/metecho/plot/__init__.py | danielk333/metecho | 9df2e542e5e5d1a76cc793c6874bc41de26eb51f | [
"MIT"
] | null | null | null | src/metecho/plot/__init__.py | danielk333/metecho | 9df2e542e5e5d1a76cc793c6874bc41de26eb51f | [
"MIT"
] | null | null | null | from .raw_data import rti
from .general import basic_matplotlib_kw
from .generalized_matched_filter import gmf
| 28.5 | 44 | 0.842105 | 17 | 114 | 5.352941 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131579 | 114 | 3 | 45 | 38 | 0.919192 | 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 |
a2289d6ebcd99a721097f59d99929061d8e78bc6 | 32 | py | Python | data/studio21_generated/introductory/3944/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3944/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3944/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def sum_triangular_numbers(n):
| 16 | 30 | 0.8125 | 5 | 32 | 4.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09375 | 32 | 2 | 31 | 16 | 0.827586 | 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 |
bf60bfcfb89686b12122c38a9a029e814eaf4bb2 | 2,736 | py | Python | cheap_pie_core/cp_banner.py | bat52/cheap_pie | 63ec1df725d4abccab56fe8337af8fbcff3fc7c5 | [
"Apache-2.0"
] | 5 | 2021-11-19T12:19:07.000Z | 2021-12-24T16:36:07.000Z | cheap_pie_core/cp_banner.py | bat52/cheap_pie | 63ec1df725d4abccab56fe8337af8fbcff3fc7c5 | [
"Apache-2.0"
] | null | null | null | cheap_pie_core/cp_banner.py | bat52/cheap_pie | 63ec1df725d4abccab56fe8337af8fbcff3fc7c5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
#
## this file is part of cheap_pie, a python tool for chip validation
## author: Marco Merlin
## email: marcomerli@gmail.com
def cp_banner():
logo = (
" _..._ ",
" .-'_..._''. ",
" .' .' '.\ . __.....__ _________ _...._ ",
" / .' .'| .-'' '. \ |.' '-. ",
". ' < | / .-''`'-. `. \ .'```'. '. ",
"| | | | / /________\ \ __ \ | \ \ ",
"| | | | .'''-. | | .:--.'. | | | | ",
". ' | |/.'''. \| .-------------'/ | \ | | \ / . ",
" \ '. .| / | | \ '-.____...---.`` __ | | | |\`'-.-' .' ",
" '. `._____.-'/| | | | `. .' .'.''| | | | '-....-'` ",
" `-.______ / | | | | `''-...... -' / / | |_ .' '. ",
" ` | '. | '. \ \._,\ '/'-----------' ",
" '---' '---' `--' `` ",
" ___ ",
" .'/ \ ",
"_________ _...._ / / \ __.....__ ",
"\ |.' '-. | | | .-'' '. ",
" \ .'```'. '. | | | / .-''`'-. `. ",
" \ | \ \|/`. .'/ /________\ \ ",
" | | | | `.| | | | ",
" | \ / . ||___| \ .-------------' ",
" | |\`'-.-' .' |/___/ \ '-.____...---. ",
" | | '-....-'` .'.--. `. .' ",
" .' '. | | | `''-...... -' ",
"'-----------' \_\ / ",
" `''--' ",
"A python tool for chip validation by Marco Merlin\n"
)
for line in logo:
print(line)
def test_banner():
return cp_banner()
pass
if __name__ == '__main__':
cp_banner()
pass | 59.478261 | 90 | 0.122442 | 56 | 2,736 | 4.232143 | 0.678571 | 0.101266 | 0.092827 | 0.118143 | 0.236287 | 0.236287 | 0 | 0 | 0 | 0 | 0 | 0.00108 | 0.66155 | 2,736 | 46 | 91 | 59.478261 | 0.25486 | 0.048246 | 0 | 0.052632 | 0 | 0 | 0.843666 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.052632 | false | 0.052632 | 0 | 0 | 0.078947 | 0.026316 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 4 |
bf6213cf8bd3b8ca08c087daa01735c562bc49a8 | 172 | py | Python | LuoguCodes/AT2201.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | LuoguCodes/AT2201.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | LuoguCodes/AT2201.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | dict = { ';b'; : ';d';, ';d'; : ';b';, ';p'; : ';q';, ';q'; : ';p'; }
s = raw_input()
t = ';';.join(map(lambda x : dict[x], list(s[::-1])))
print [';No';, ';Yes';][s == t]
| 34.4 | 69 | 0.348837 | 27 | 172 | 2.185185 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007092 | 0.180233 | 172 | 4 | 70 | 43 | 0.411348 | 0 | 0 | 0 | 0 | 0 | 0.139535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.25 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
bf6e5bd6719f81b0dd14da3f5df751f20eb8caba | 195 | py | Python | pioreactor/automations/temperature/__init__.py | Pioreactor/pioreactor | 63288a2b7ef90b663ff19b85f19586ac0b42bc1b | [
"MIT"
] | 32 | 2021-01-01T01:56:04.000Z | 2022-03-31T21:23:22.000Z | pioreactor/automations/temperature/__init__.py | Pioreactor/pioreactor | 63288a2b7ef90b663ff19b85f19586ac0b42bc1b | [
"MIT"
] | 222 | 2020-11-28T18:21:56.000Z | 2022-03-30T19:23:32.000Z | pioreactor/automations/temperature/__init__.py | Pioreactor/pioreactor | 63288a2b7ef90b663ff19b85f19586ac0b42bc1b | [
"MIT"
] | 3 | 2021-02-12T17:50:22.000Z | 2022-02-18T18:53:21.000Z | # -*- coding: utf-8 -*-
from .silent import Silent
from .constant_duty_cycle import ConstantDutyCycle
from .pid_stable import PIDStable
__all__ = ("Silent", "ConstantDutyCycle", "PIDStable")
| 19.5 | 54 | 0.748718 | 22 | 195 | 6.318182 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005917 | 0.133333 | 195 | 9 | 55 | 21.666667 | 0.816568 | 0.107692 | 0 | 0 | 0 | 0 | 0.186047 | 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 |
bf9ecbaa5b2c8bc684e195d5da7c423c6b4da301 | 720 | py | Python | RemotePy/msg_queue.py | csjy309450/cscrum | 992c9671c34c784e0536c173bafac2f97d659972 | [
"MIT"
] | null | null | null | RemotePy/msg_queue.py | csjy309450/cscrum | 992c9671c34c784e0536c173bafac2f97d659972 | [
"MIT"
] | null | null | null | RemotePy/msg_queue.py | csjy309450/cscrum | 992c9671c34c784e0536c173bafac2f97d659972 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding:utf-8 -*-
import threading
class MsgQueue:
def __init__(self):
self.__msg_queue = []
self.__msg_queue_locker = threading.Lock()
def push_back(self, msg_):
self.__msg_queue_locker.acquire()
self.__msg_queue.append(msg_)
self.__msg_queue_locker.release()
def pop_front(self):
item = None
self.__msg_queue_locker.acquire()
if self.__msg_queue is not None and self.__msg_queue != []:
item = self.__msg_queue.pop(0)
self.__msg_queue_locker.release()
return item
def empty(self):
return len(self.__msg_queue) == 0
def size(self):
return len(self.__msg_queue)
| 24 | 67 | 0.625 | 94 | 720 | 4.265957 | 0.37234 | 0.226933 | 0.359102 | 0.224439 | 0.389027 | 0.124688 | 0 | 0 | 0 | 0 | 0 | 0.007533 | 0.2625 | 720 | 29 | 68 | 24.827586 | 0.747646 | 0.052778 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.05 | 0.1 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
bfa7bd3662b841be62d15c0068025fc6a53a89f9 | 227 | py | Python | student/serializers.py | sreejith-octec/Student-api | e7bbffacc1e8f22a0a7be521f833ac52805aa300 | [
"MIT"
] | null | null | null | student/serializers.py | sreejith-octec/Student-api | e7bbffacc1e8f22a0a7be521f833ac52805aa300 | [
"MIT"
] | null | null | null | student/serializers.py | sreejith-octec/Student-api | e7bbffacc1e8f22a0a7be521f833ac52805aa300 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import Student
class StudentSerializer(serializers.ModelSerializer):
class Meta:
model = Student
fields = ('name', 'roll_number', 'date_of_birth') | 28.375 | 57 | 0.709251 | 24 | 227 | 6.541667 | 0.791667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.211454 | 227 | 8 | 57 | 28.375 | 0.877095 | 0 | 0 | 0 | 0 | 0 | 0.126697 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
bfadb1bcd06cedd14107e39e24102247381c842b | 839 | py | Python | tests/constants.py | ZaiusDR/hack_assembler | 553e576c148815e5551ab05a59456824820f69f5 | [
"MIT"
] | null | null | null | tests/constants.py | ZaiusDR/hack_assembler | 553e576c148815e5551ab05a59456824820f69f5 | [
"MIT"
] | null | null | null | tests/constants.py | ZaiusDR/hack_assembler | 553e576c148815e5551ab05a59456824820f69f5 | [
"MIT"
] | null | null | null | CODE = [
'@0',
'D=M',
'@INFINITE_LOOP',
'D;JLE',
'@counter',
'M=D',
'@SCREEN',
'D=A',
'@address',
'M=D',
'(LOOP)',
'@address',
'A=M',
'M=-1',
'@address',
'D=M',
'@32',
'D=D+A',
'@address',
'M=D',
'@counter',
'MD=M-1',
'@LOOP',
'D;JGT',
'(INFINITE_LOOP)',
'@INFINITE_LOOP',
'0;JMP']
INSTRUCTIONS = ('''0000000000000000
1111110000010000
0000000000010111
1110001100000110
0000000000010000
1110001100001000
0100000000000000
1110110000010000
0000000000010001
1110001100001000
0000000000010001
1111110000100000
1110111010001000
0000000000010001
1111110000010000
0000000000100000
1110000010010000
0000000000010001
1110001100001000
0000000000010000
1111110010011000
0000000000001010
1110001100000001
0000000000010111
1110101010000111''')
| 15.254545 | 35 | 0.65435 | 72 | 839 | 7.583333 | 0.472222 | 0.065934 | 0.032967 | 0.03663 | 0.040293 | 0 | 0 | 0 | 0 | 0 | 0 | 0.603269 | 0.197855 | 839 | 54 | 36 | 15.537037 | 0.208024 | 0 | 0 | 0.490566 | 0 | 0 | 0.702026 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
bfc9e01c44635b7d9ebb5a30e657c4f80917ac50 | 118 | py | Python | tools/remove_log_files.py | muj-programmer/cp_template | 6933be445d6c8c1068b9cc20d47acad876951fc2 | [
"MIT"
] | 10 | 2019-08-26T09:53:54.000Z | 2020-06-06T05:25:55.000Z | tools/remove_log_files.py | muj-programmer/cp_solutions | 6933be445d6c8c1068b9cc20d47acad876951fc2 | [
"MIT"
] | 1 | 2019-08-30T18:41:46.000Z | 2019-09-11T20:13:01.000Z | tools/remove_log_files.py | muj-programmer/cp_solutions | 6933be445d6c8c1068b9cc20d47acad876951fc2 | [
"MIT"
] | null | null | null | import constants as const
from shutil import rmtree
rmtree(const.LOG_PATH, ignore_errors=True)
print('Removed Logs')
| 19.666667 | 42 | 0.813559 | 18 | 118 | 5.222222 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.110169 | 118 | 5 | 43 | 23.6 | 0.895238 | 0 | 0 | 0 | 0 | 0 | 0.101695 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
bfd15525a212bb7c35f3e808a1316288d82ea2ae | 3,559 | py | Python | LearningHardWay/20200422/ex_2.py | kevinnls/python | ecd483e4666da9afe84662210751f2e3d8d94d16 | [
"MIT"
] | null | null | null | LearningHardWay/20200422/ex_2.py | kevinnls/python | ecd483e4666da9afe84662210751f2e3d8d94d16 | [
"MIT"
] | null | null | null | LearningHardWay/20200422/ex_2.py | kevinnls/python | ecd483e4666da9afe84662210751f2e3d8d94d16 | [
"MIT"
] | null | null | null | print("I did it")
#'''
#Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tincidunt massa sem, quis porttitor sem suscipit in. Vestibulum suscipit dignissim turpis et pulvinar. Aenean efficitur fermentum sem, et dictum lacus finibus eget. Pellentesque sagittis odio elit, ut fermentum risus bibendum at. Aenean vestibulum congue luctus. Donec semper, ligula auctor congue posuere, nulla lacus semper lectus, in hendrerit nibh diam vel lectus. Mauris sagittis eget orci sed ultricies. Sed vestibulum est vitae enim rutrum suscipit. Pellentesque auctor pulvinar eros eget eleifend. Donec molestie et ipsum et pulvinar. Vestibulum vestibulum egestas neque ac tincidunt. Nullam in rhoncus ex, eu lacinia sapien. Aliquam mauris eros, mattis et aliquam nec, gravida quis ligula.
#Duis sed egestas eros, et tincidunt augue. Aliquam sapien elit, ultricies cursus lorem vel, tempus efficitur nibh. Donec tincidunt finibus lorem. Cras sollicitudin maximus leo vitae suscipit. Integer vehicula rhoncus magna, ut scelerisque leo pharetra tristique. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vulputate purus enim, nec fermentum felis vehicula sit amet. Mauris pulvinar lacinia mi, ac sollicitudin nisl porttitor a. Proin vestibulum posuere felis sed cursus. Sed commodo fringilla dui, a placerat urna viverra vitae. Vestibulum facilisis tellus in fringilla luctus. Nulla sit amet nunc ut felis efficitur aliquam. Morbi gravida congue venenatis.
#Nulla mattis tortor et dictum efficitur. Fusce vitae tristique mauris, ut eleifend odio. Sed in ultricies libero, in placerat tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer viverra faucibus risus, at gravida justo suscipit ac. Proin commodo luctus sapien in molestie. Curabitur id tempus sem, vel placerat nunc. Curabitur bibendum sapien at neque consequat, non viverra felis interdum. Sed accumsan cursus nisi, et pellentesque urna malesuada ut. Sed nec venenatis mi.
#Maecenas sit amet risus at lacus accumsan varius a vitae diam. Fusce porta rhoncus eros quis gravida. Donec nec ligula vel quam bibendum viverra. In rutrum arcu in dui finibus molestie. Donec sed mauris id diam ultricies vulputate sit amet in dui. Aenean viverra maximus arcu sed vehicula. Pellentesque accumsan fermentum fringilla. Integer fermentum sem eget lacinia suscipit. Curabitur pellentesque, leo a efficitur porta, quam purus porta purus, pellentesque fermentum velit justo sed leo. Quisque aliquam, turpis ac lobortis finibus, metus mauris ultricies arcu, quis porta ante enim sit amet risus. Sed non enim pellentesque, iaculis purus at, porta tellus. Nunc ac semper nisi, in ornare nibh. In ullamcorper, dui sed commodo laoreet, enim magna finibus dolor, eu volutpat velit tortor quis ante.
#Ut at fermentum nibh. Quisque molestie commodo magna. Aliquam vel lacus lobortis, cursus magna sit amet, fermentum quam. Nunc neque orci, rhoncus sed vulputate ultrices, eleifend vitae sapien. Nunc non molestie tellus. Fusce nunc enim, tristique ac finibus id, efficitur ac tellus. Praesent dapibus tincidunt lectus quis luctus. Integer eros ante, porta sed ullamcorper sit amet, egestas vitae neque. Mauris porta dui at justo rutrum viverra. Curabitur mollis purus non ante faucibus, ac finibus justo ultrices. Sed pharetra lacus ut lectus laoreet varius. Phasellus porttitor massa vel egestas elementum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc consequat justo vulputate nulla mollis, vitae suscipit odio faucibus.
#I did it
#''')
| 237.266667 | 803 | 0.815679 | 519 | 3,559 | 5.593449 | 0.289017 | 0.024113 | 0.015501 | 0.018601 | 0.04857 | 0.04857 | 0.04857 | 0.04857 | 0 | 0 | 0 | 0 | 0.147513 | 3,559 | 14 | 804 | 254.214286 | 0.956823 | 0.989042 | 0 | 0 | 0 | 0 | 0.258065 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
44a777d35f537d99f582cccf9b442105cba378e9 | 690 | py | Python | tests/test_image.py | AwesomeGitHubRepos/mpu | 90afe28368b9c6acb719ff881612733216f18c38 | [
"MIT"
] | 43 | 2018-05-22T08:20:21.000Z | 2022-03-06T16:44:59.000Z | tests/test_image.py | AwesomeGitHubRepos/mpu | 90afe28368b9c6acb719ff881612733216f18c38 | [
"MIT"
] | 83 | 2018-05-01T21:02:34.000Z | 2022-02-02T21:13:17.000Z | tests/test_image.py | AwesomeGitHubRepos/mpu | 90afe28368b9c6acb719ff881612733216f18c38 | [
"MIT"
] | 7 | 2019-02-21T17:28:58.000Z | 2021-12-27T09:16:17.000Z | #!/usr/bin/env python
# Core Library
import sys
from unittest import mock
# Third party
import pkg_resources
# First party
from mpu.image import get_meta
# def test_get_meta():
# path = "files/example.png"
# source = pkg_resources.resource_filename(__name__, path)
# meta = get_meta(source)
# meta["file"] = None
# assert meta == {"width": 252, "height": 167, "channels": 4, "file": None}
# def test_import_error():
# path = "files/example.png"
# source = pkg_resources.resource_filename(__name__, path)
# with mock.patch.dict(sys.modules, {"PIL": None}):
# meta = get_meta(source)
# meta["file"] = None
# assert meta == {"file": None}
| 24.642857 | 79 | 0.649275 | 91 | 690 | 4.703297 | 0.494505 | 0.065421 | 0.084112 | 0.088785 | 0.46729 | 0.46729 | 0.46729 | 0.46729 | 0.46729 | 0.285047 | 0 | 0.012727 | 0.202899 | 690 | 27 | 80 | 25.555556 | 0.765455 | 0.813043 | 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 |
7825dcc7148e4920094b7699474d80ce48aba296 | 271 | py | Python | mosquitto/admin.py | glomium/cmstemplate | 6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c | [
"BSD-3-Clause"
] | null | null | null | mosquitto/admin.py | glomium/cmstemplate | 6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c | [
"BSD-3-Clause"
] | null | null | null | mosquitto/admin.py | glomium/cmstemplate | 6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# ex:set fileencoding=utf-8:
from __future__ import unicode_literals
from django.contrib import admin
# from django.utils.translation import ugettext_lazy as _
from .models import ACL
@admin.register(ACL)
class ACLAdmin(admin.ModelAdmin):
pass
| 18.066667 | 57 | 0.782288 | 38 | 271 | 5.394737 | 0.736842 | 0.097561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004255 | 0.132841 | 271 | 14 | 58 | 19.357143 | 0.868085 | 0.365314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.166667 | 0.5 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 4 |
782711320f28d9acabe8dea923e1e62eb235db3a | 544 | py | Python | tests_tf/test_confidence_report.py | qwang70/cleverhans | 6f58e15cbc8d660fff5e09afe5d1f7f2f15a8e03 | [
"MIT"
] | null | null | null | tests_tf/test_confidence_report.py | qwang70/cleverhans | 6f58e15cbc8d660fff5e09afe5d1f7f2f15a8e03 | [
"MIT"
] | null | null | null | tests_tf/test_confidence_report.py | qwang70/cleverhans | 6f58e15cbc8d660fff5e09afe5d1f7f2f15a8e03 | [
"MIT"
] | null | null | null | """
Tests for cleverhans.confidence_report
"""
import numpy as np
from cleverhans.confidence_report import ConfidenceReport
from cleverhans.confidence_report import ConfidenceReportEntry
def test_confidence_report():
# Test that we can make a confidence report, put an entry in it, and get
# that entry back out
report = ConfidenceReport()
entry = ConfidenceReportEntry(correctness=np.array([True, False]),
confidence=np.array([0.9, 0.1]))
report['clean'] = entry
assert report['clean'] is entry
| 28.631579 | 74 | 0.720588 | 68 | 544 | 5.691176 | 0.558824 | 0.206718 | 0.20155 | 0.248062 | 0.186047 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009091 | 0.191176 | 544 | 18 | 75 | 30.222222 | 0.870455 | 0.238971 | 0 | 0 | 0 | 0 | 0.024691 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 1 | 0.111111 | false | 0 | 0.333333 | 0 | 0.444444 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
783eb2aed744b84f828ec447958effbad328d6be | 188 | py | Python | api/app/db/base.py | stephenhillier/feedback | 3c26ba3278b520ac192d23ebb4801c3c802fdcb8 | [
"Apache-2.0"
] | null | null | null | api/app/db/base.py | stephenhillier/feedback | 3c26ba3278b520ac192d23ebb4801c3c802fdcb8 | [
"Apache-2.0"
] | 1 | 2021-06-02T00:44:01.000Z | 2021-06-02T00:44:01.000Z | api/app/db/base.py | stephenhillier/feedback | 3c26ba3278b520ac192d23ebb4801c3c802fdcb8 | [
"Apache-2.0"
] | null | null | null | # Import all the models, so that Base has them before being
# imported by Alembic
from app.db.base_class import BaseTable # noqa
from app.feedback.repo import Rating, Feedback, RatingCode | 47 | 59 | 0.797872 | 30 | 188 | 4.966667 | 0.8 | 0.09396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148936 | 188 | 4 | 60 | 47 | 0.93125 | 0.43617 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
78601c0b74389e567c451c5cce191dda7f598606 | 243 | py | Python | lk_scraper/__init__.py | bbhunter/lk_scraper | 2c9b31baca212dfcd4d3e13a2a0ee0b7f5de658a | [
"BSD-3-Clause"
] | 50 | 2020-04-19T22:28:35.000Z | 2022-01-07T09:30:45.000Z | lk_scraper/__init__.py | bbhunter/lk_scraper | 2c9b31baca212dfcd4d3e13a2a0ee0b7f5de658a | [
"BSD-3-Clause"
] | 3 | 2020-04-19T14:12:49.000Z | 2021-04-20T19:19:46.000Z | lk_scraper/__init__.py | bbhunter/lk_scraper | 2c9b31baca212dfcd4d3e13a2a0ee0b7f5de658a | [
"BSD-3-Clause"
] | 13 | 2020-04-19T12:51:17.000Z | 2022-03-05T21:04:09.000Z | # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Copyright 2020 The lk_scraper Authors. All rights reserved.
from .config.config import ScraperConfig
from .scraper.scraper import Scraper
| 34.714286 | 61 | 0.794239 | 39 | 243 | 4.923077 | 0.794872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019608 | 0.160494 | 243 | 6 | 62 | 40.5 | 0.921569 | 0.646091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
78684a128564f01aac2f880be0319d548ef55c23 | 278 | py | Python | tools/flake8_install.py | darrida/flask-blog-darrida.py | b12f403f576bcfd995a8a338188c02f72abc55e0 | [
"MIT"
] | 1 | 2019-11-26T19:37:14.000Z | 2019-11-26T19:37:14.000Z | tools/flake8_install.py | darrida/flask-blog-darrida.py | b12f403f576bcfd995a8a338188c02f72abc55e0 | [
"MIT"
] | 3 | 2019-12-26T17:32:21.000Z | 2020-02-18T04:50:32.000Z | tools/flake8_install.py | darrida/Flask-Blog | b12f403f576bcfd995a8a338188c02f72abc55e0 | [
"MIT"
] | null | null | null | pip install flake8
pip install flake8-comprehensions
pip install flake8-blind-except
pip install flake8-docstring
pip install flake8-rst-docstring
pip install flake8-builtin
pip install black
# Example: flake8 --extend-ignore=E501 ./db_classes.py
# Example: black ./pymoney.py
| 25.272727 | 54 | 0.81295 | 40 | 278 | 5.625 | 0.45 | 0.311111 | 0.426667 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.040486 | 0.111511 | 278 | 10 | 55 | 27.8 | 0.870445 | 0.28777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
78ae76c748519129474ccdb6de114e5899235e6e | 1,834 | py | Python | fight_tracker/dice.py | jm-begon/fight_tracker | 82dc6bbb9e24015e1dc3edbd05ce319b3c88626d | [
"BSD-3-Clause"
] | null | null | null | fight_tracker/dice.py | jm-begon/fight_tracker | 82dc6bbb9e24015e1dc3edbd05ce319b3c88626d | [
"BSD-3-Clause"
] | null | null | null | fight_tracker/dice.py | jm-begon/fight_tracker | 82dc6bbb9e24015e1dc3edbd05ce319b3c88626d | [
"BSD-3-Clause"
] | null | null | null | from random import Random
# TODO context_manager for advantage and disadvantage ?
from fight_tracker.arithmetic import Intable
class RNG:
__instances__ = {}
@classmethod
def get(cls, seed=None):
inst = cls.__instances__.get(seed)
if inst is None:
inst = cls(seed)
cls.__instances__[seed] = inst
return inst
def __init__(self, seed):
self.gen = Random(seed)
def draw(self, maximum_value):
return self.gen.randint(1, maximum_value)
class Dice(Intable):
def __init__(self, sides, rng=None):
self.sides = sides
if rng is None or isinstance(rng, int):
rng = RNG.get(rng)
self.rng = rng
def __int__(self):
return self.rng.draw(self.sides)
def __repr__(self):
return f"{self.__class__.__name__}({repr(self.sides)}, " \
f"{repr(self.rng)})"
def __str__(self):
return f"d{self.sides}"
class D20(Dice):
def __init__(self, rng=None):
super(D20, self).__init__(sides=20, rng=rng)
# TODO manage adv/dis
def __repr__(self):
return f"{self.__class__.__name__}({repr(self.rng)})"
class Roll(Intable):
def __init__(self, decorated):
self.decorated = decorated
self.value = None
def set_value(self, v):
self.value = v
return self
def unset(self):
self.value = None
return self
def __int__(self):
if self.value is None:
self.set_value(int(self.decorated))
return self.value
def __repr__(self):
s = f"{self.__class__.__name__}({repr(self.decorated)})"
if self.value is not None:
s += f".set_value({self.value})"
return s
def __str__(self):
return f"{self.value} ({self.decorated})"
| 23.512821 | 66 | 0.592148 | 236 | 1,834 | 4.216102 | 0.245763 | 0.072362 | 0.044221 | 0.045226 | 0.134673 | 0.100503 | 0.078392 | 0.078392 | 0.078392 | 0.078392 | 0 | 0.005376 | 0.290076 | 1,834 | 77 | 67 | 23.818182 | 0.758833 | 0.039804 | 0 | 0.203704 | 0 | 0 | 0.126849 | 0.091581 | 0 | 0 | 0 | 0.012987 | 0 | 1 | 0.277778 | false | 0 | 0.037037 | 0.111111 | 0.611111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
78bfca480ceff2fdc9a7b1499b4cb6d8e43fd1a2 | 175 | py | Python | baekjoon/python/sort_inside.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | baekjoon/python/sort_inside.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | 1 | 2019-11-04T06:44:04.000Z | 2019-11-04T06:46:55.000Z | baekjoon/python/sort_inside.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | # https://www.acmicpc.net/problem/1427
def sort_number(n):
return "".join(sorted(n, reverse=True))
if __name__ == "__main__":
N = input()
print(sort_number(N))
| 17.5 | 43 | 0.645714 | 25 | 175 | 4.12 | 0.8 | 0.194175 | 0.213592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027586 | 0.171429 | 175 | 9 | 44 | 19.444444 | 0.682759 | 0.205714 | 0 | 0 | 0 | 0 | 0.058394 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0.2 | 0.4 | 0.2 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 4 |
1528d6fc888b996092d8a1f3dbe5e3176c05fda3 | 441 | py | Python | microblogcli/cli/__init__.py | andymitchhank/microblogcli | a209e9891bb9c5f7b11b3af0178e49ec43e63709 | [
"MIT"
] | 3 | 2018-01-11T22:06:16.000Z | 2018-01-12T00:11:27.000Z | microblogcli/cli/__init__.py | andymitchhank/microblogcli | a209e9891bb9c5f7b11b3af0178e49ec43e63709 | [
"MIT"
] | 1 | 2021-06-01T21:31:37.000Z | 2021-06-01T21:31:37.000Z | microblogcli/cli/__init__.py | andymitchhank/microblogcli | a209e9891bb9c5f7b11b3af0178e49ec43e63709 | [
"MIT"
] | null | null | null | import click
from click import echo
from ..models import create_tables
from .account import account
from .post import post
from .feed import feed
from .users import follow, unfollow, following, am_following
create_tables()
@click.group()
def cli():
pass
cli.add_command(account)
cli.add_command(post)
cli.add_command(feed)
cli.add_command(follow)
cli.add_command(unfollow)
cli.add_command(following)
cli.add_command(am_following)
| 16.961538 | 60 | 0.793651 | 67 | 441 | 5.059701 | 0.313433 | 0.123894 | 0.268437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117914 | 441 | 25 | 61 | 17.64 | 0.871465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | true | 0.055556 | 0.388889 | 0 | 0.444444 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 4 |
15305f98db9b4b801158eeefc8f1fd410d4b1601 | 210 | py | Python | simpleml/regression/baseregressor.py | get9/ml-test | 544103f1ddc536b23e5c499f1ad9c61d844a8466 | [
"Apache-2.0"
] | 1 | 2015-10-15T18:58:57.000Z | 2015-10-15T18:58:57.000Z | simpleml/regression/baseregressor.py | get9/ml-test | 544103f1ddc536b23e5c499f1ad9c61d844a8466 | [
"Apache-2.0"
] | null | null | null | simpleml/regression/baseregressor.py | get9/ml-test | 544103f1ddc536b23e5c499f1ad9c61d844a8466 | [
"Apache-2.0"
] | null | null | null | class BaseRegressor:
def __init__(self):
pass
def train(self, dataset, labels):
pass
def predict(self, dataset):
pass
def error(self, predicted, actual):
pass
| 16.153846 | 39 | 0.580952 | 23 | 210 | 5.130435 | 0.565217 | 0.177966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 210 | 12 | 40 | 17.5 | 0.842857 | 0 | 0 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.444444 | false | 0.444444 | 0 | 0 | 0.555556 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 4 |
158398d9ad76bfda8939a18e99271fea30e830b2 | 2,542 | py | Python | lib/environment/control.py | vyahello/snakegame-gui | 1eb23744174035f49dd0a33c48d365e8b3836178 | [
"MIT"
] | null | null | null | lib/environment/control.py | vyahello/snakegame-gui | 1eb23744174035f49dd0a33c48d365e8b3836178 | [
"MIT"
] | null | null | null | lib/environment/control.py | vyahello/snakegame-gui | 1eb23744174035f49dd0a33c48d365e8b3836178 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from pygame import K_RIGHT, K_LEFT, K_UP, K_DOWN, K_ESCAPE, KEYDOWN, QUIT, SRCALPHA, BLEND_RGBA_MAX, BLEND_RGBA_MIN
class Key(ABC):
"""Abstract interface for a game control key."""
@abstractmethod
def right(self) -> int:
pass
@abstractmethod
def left(self) -> int:
pass
@abstractmethod
def down(self) -> int:
pass
@abstractmethod
def up(self) -> int:
pass
@abstractmethod
def escape(self) -> int:
pass
class Type(ABC):
"""Abstract interface for control type."""
@abstractmethod
def down(self) -> int:
pass
@abstractmethod
def quit(self) -> int:
pass
@abstractmethod
def src_alpha(self) -> int:
pass
@abstractmethod
def blend_rgba_max(self) -> int:
pass
@abstractmethod
def blend_rgba_min(self) -> int:
pass
class Controls(ABC):
"""Abstract factory for game controls."""
@abstractmethod
def key(self) -> Key:
pass
@abstractmethod
def type(self) -> Type:
pass
class ControlKey(Key):
"""Key game control."""
def __init__(self) -> None:
self._right: int = K_RIGHT
self._left: int = K_LEFT
self._up: int = K_UP
self._down: int = K_DOWN
self._escape: int = K_ESCAPE
def right(self) -> int:
return self._right
def left(self) -> int:
return self._left
def down(self) -> int:
return self._down
def up(self) -> int:
return self._up
def escape(self) -> int:
return self._escape
class ControlType(Type):
"""Type game control."""
def __init__(self) -> None:
self._quit: int = QUIT
self._down: int = KEYDOWN
self._scr_alpha: int = SRCALPHA
self._blend_rgba_max: int = BLEND_RGBA_MAX
self._blend_rgba_min: int = BLEND_RGBA_MIN
def down(self) -> int:
return self._down
def quit(self) -> int:
return self._quit
def src_alpha(self) -> int:
return self._scr_alpha
def blend_rgba_max(self) -> int:
return self._blend_rgba_max
def blend_rgba_min(self) -> int:
return self._blend_rgba_min
class GameControls(Controls):
"""Concrete game controls."""
def __init__(self) -> None:
self._key: Key = ControlKey()
self._type: Type = ControlType()
def key(self) -> Key:
return self._key
def type(self) -> Type:
return self._type
| 19.705426 | 115 | 0.592447 | 316 | 2,542 | 4.531646 | 0.136076 | 0.097765 | 0.076816 | 0.118715 | 0.369413 | 0.271648 | 0.205307 | 0.111732 | 0 | 0 | 0 | 0 | 0.301731 | 2,542 | 128 | 116 | 19.859375 | 0.806761 | 0.069237 | 0 | 0.638554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.325301 | false | 0.144578 | 0.024096 | 0.144578 | 0.566265 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 4 |
158ffba54f535648f2bee67aeb0cff448b577898 | 335 | py | Python | testjava.py | qatix/PythonBase | 7e0eb260c571e3ab7d63424d955795d4638c4b6b | [
"MIT"
] | null | null | null | testjava.py | qatix/PythonBase | 7e0eb260c571e3ab7d63424d955795d4638c4b6b | [
"MIT"
] | null | null | null | testjava.py | qatix/PythonBase | 7e0eb260c571e3ab7d63424d955795d4638c4b6b | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# python3
__author__ = 'hawk'
import sys
sys.path.append("lib")
import javalib
import snowflake
import pinyinlib
print javalib.getHashCode("12345")
print javalib.getHashCode("234567")
s = snowflake.generator(1, 1)
print s.next()
print pinyinlib.single_get_first("可")
print pinyinlib.multi_get_letter("中国人") | 17.631579 | 39 | 0.749254 | 46 | 335 | 5.282609 | 0.630435 | 0.098765 | 0.1893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050336 | 0.110448 | 335 | 19 | 39 | 17.631579 | 0.765101 | 0.086567 | 0 | 0 | 0 | 0 | 0.072607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.333333 | null | null | 0.416667 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 4 |
15a9fe92248f662910dab78fcbce13988a4e43a9 | 328 | py | Python | parsesync/management/commands/__init__.py | cereigido/django-parse-sync | 966955d3faa9bb641617b12515eea0827f1c958e | [
"MIT"
] | 8 | 2015-08-04T22:28:51.000Z | 2017-02-13T22:18:05.000Z | parsesync/management/commands/__init__.py | cereigido/django-parse-sync | 966955d3faa9bb641617b12515eea0827f1c958e | [
"MIT"
] | 1 | 2016-04-14T16:07:13.000Z | 2016-04-14T18:07:17.000Z | parsesync/management/commands/__init__.py | cereigido/django-parse-sync | 966955d3faa9bb641617b12515eea0827f1c958e | [
"MIT"
] | 3 | 2015-10-14T22:19:39.000Z | 2015-12-28T15:01:51.000Z | # -*- coding=utf-8 -*-
from re import split
class ParseSyncException(Exception):
pass
def to_camel_case(var_name):
parts = var_name.split('_')
return parts[0] + "".join(x.title() for x in parts[1:])
def to_snake_case(var_name):
return '_'.join([t.lower() for t in split(r'([A-Z][a-z]*)', var_name) if t])
| 19.294118 | 80 | 0.634146 | 55 | 328 | 3.6 | 0.6 | 0.141414 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011111 | 0.176829 | 328 | 16 | 81 | 20.5 | 0.722222 | 0.060976 | 0 | 0 | 0 | 0 | 0.04902 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.125 | 0.125 | 0.125 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 4 |
15b1b374a4a3bc8ccf3c69ed6743bb74d7a1ad9e | 934 | py | Python | api/dc/models.py | dgeorgievd/ovirtctl | 245f9eb1ac3edb6c34aff1d9dc9c0b9278278f0d | [
"Apache-2.0"
] | null | null | null | api/dc/models.py | dgeorgievd/ovirtctl | 245f9eb1ac3edb6c34aff1d9dc9c0b9278278f0d | [
"Apache-2.0"
] | null | null | null | api/dc/models.py | dgeorgievd/ovirtctl | 245f9eb1ac3edb6c34aff1d9dc9c0b9278278f0d | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
class DC(models.Model):
name = models.CharField(max_length=30)
storage_datastore = ForeignKey(StorageDatastore)
clusters = ForeignKey(Clusters)
class StorageDatastore(models.Model):
storage_datastore = models.CharField(max_length=50)
host_name = models.CharField(max_length=30)
storage_type = models.CharField(max_length=10)
storage_name = models.CharField(max_length=50)
storage_address = models.CharField(max_length=15)
target_name = models.CharField(max_length=25)
lun_guid = models.CharField(max_length=30)
class Clusters(models.Model):
name = models.CharField(max_length=20)
hosts = models.ForeignKey(Hosts)
class Hosts(models.Model):
name = models.CharField(max_length=30)
address = models.CharField(max_length=15)
rootpasswd = models.CharField(widget=forms.PasswordInput) | 31.133333 | 61 | 0.748394 | 116 | 934 | 5.818966 | 0.318966 | 0.266667 | 0.293333 | 0.391111 | 0.505185 | 0.342222 | 0.244444 | 0.121481 | 0 | 0 | 0 | 0.027954 | 0.157388 | 934 | 30 | 61 | 31.133333 | 0.829733 | 0 | 0 | 0.095238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.047619 | 0.095238 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
ec77641110b63e23288c3d3104864eee66efed2e | 214 | py | Python | pcdet/models/backbones_2d/__init__.py | penghao1990/ASCNet | 8b0d8b44e559ead644fc4bcf35e53975cf40f3a6 | [
"Apache-2.0"
] | 1 | 2021-12-30T10:10:42.000Z | 2021-12-30T10:10:42.000Z | pcdet/models/backbones_2d/__init__.py | penghao1990/ASCNet | 8b0d8b44e559ead644fc4bcf35e53975cf40f3a6 | [
"Apache-2.0"
] | null | null | null | pcdet/models/backbones_2d/__init__.py | penghao1990/ASCNet | 8b0d8b44e559ead644fc4bcf35e53975cf40f3a6 | [
"Apache-2.0"
] | null | null | null | from .base_bev_backbone import BaseBEVBackbone
from .base_bev_backbone_ascnet import BaseBEVBackboneASCNet
__all__ = {
'BaseBEVBackbone': BaseBEVBackbone,
'BaseBEVBackboneASCNet': BaseBEVBackboneASCNet
}
| 26.75 | 59 | 0.82243 | 18 | 214 | 9.277778 | 0.5 | 0.095808 | 0.131737 | 0.227545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121495 | 214 | 7 | 60 | 30.571429 | 0.888298 | 0 | 0 | 0 | 0 | 0 | 0.168224 | 0.098131 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
ec8dd37f45b777d80fe9bd3cf4ec5155f9caad89 | 52 | py | Python | create_db.py | vlizanae/annxious-bot | 5ba4b02fb2dc6f51d355cc7ff6e1f37cb0934f28 | [
"MIT"
] | 1 | 2018-10-26T03:07:33.000Z | 2018-10-26T03:07:33.000Z | create_db.py | vlizanae/annxious-bot | 5ba4b02fb2dc6f51d355cc7ff6e1f37cb0934f28 | [
"MIT"
] | null | null | null | create_db.py | vlizanae/annxious-bot | 5ba4b02fb2dc6f51d355cc7ff6e1f37cb0934f28 | [
"MIT"
] | null | null | null | from db import Database
Database().create_schema()
| 13 | 26 | 0.788462 | 7 | 52 | 5.714286 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 52 | 3 | 27 | 17.333333 | 0.869565 | 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 | 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 |
ec90b9f6e305f67430e760f71504a5170adf9b55 | 411 | py | Python | generate/generate/legacy_predicates.py | trigger-corp/libreforge | 3da17f1d26fabe3b9df6518b4e96473fd078def1 | [
"MIT"
] | 4 | 2021-12-08T16:04:42.000Z | 2021-12-17T20:09:31.000Z | generate/generate/legacy_predicates.py | trigger-corp/forge | 3da17f1d26fabe3b9df6518b4e96473fd078def1 | [
"MIT"
] | 103 | 2019-01-29T07:54:37.000Z | 2021-12-02T07:40:50.000Z | generate/generate/legacy_predicates.py | trigger-corp/libreforge | 3da17f1d26fabe3b9df6518b4e96473fd078def1 | [
"MIT"
] | null | null | null | from lib import predicate
@predicate
def icon_available(build, platform, size):
return "modules" in build.config and \
"icons" in build.config["modules"] and \
"config" in build.config["modules"]["icons"] and \
(size in build.config["modules"]["icons"]["config"] or \
size in build.config["modules"]["icons"]["config"].get(platform, {}))
| 41.1 | 85 | 0.581509 | 47 | 411 | 5.06383 | 0.382979 | 0.147059 | 0.273109 | 0.336134 | 0.39916 | 0.294118 | 0.294118 | 0 | 0 | 0 | 0 | 0 | 0.260341 | 411 | 9 | 86 | 45.666667 | 0.782895 | 0 | 0 | 0 | 0 | 0 | 0.177616 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0.125 | 0.375 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 4 |
ec9d14b2eb5d1cb8107f7b79e87a57aa6b66cf03 | 4,158 | py | Python | app/models.py | bvbgrad/diskfiles | 1f5363ef7f3fc7ab68a9dbdc3e369f2390ef36f3 | [
"MIT"
] | null | null | null | app/models.py | bvbgrad/diskfiles | 1f5363ef7f3fc7ab68a9dbdc3e369f2390ef36f3 | [
"MIT"
] | null | null | null | app/models.py | bvbgrad/diskfiles | 1f5363ef7f3fc7ab68a9dbdc3e369f2390ef36f3 | [
"MIT"
] | null | null | null | """
Data model - persistent data objects
"""
from datetime import datetime
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from app import db, login
class User(UserMixin, db.Model):
""" User object """
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(64), index=True, unique=True)
admin_type = db.Column(db.String(20), default="none")
last_seen = db.Column(db.DateTime, default=datetime.utcnow)
email = db.Column(db.String(120), index=True, unique=True)
password_hash = db.Column(db.String(128))
disks = db.relationship('Disk', backref='owner', lazy='dynamic')
def __repr__(self):
return '<Username {}, email: {}, Admin type: {}>'\
.format(self.username, self.email, self.admin_type)
def __init__(self, username, email, admin_type):
self.username = username
self.email = email
self.admin_type = admin_type
def set_password(self, password):
""" One way hash of password string """
self.password_hash = generate_password_hash(password)
def check_password(self, password):
"""
check if clear text password will generate the same hash
that is stored in database for the 'current' password
"""
return check_password_hash(self.password_hash, password)
@login.user_loader
def load_user(user_id):
""" Check if user is logged-in on every page load """
return User.query.get(int(user_id))
class Disk(db.Model):
""" Disks in the catalog """
id = db.Column(db.Integer, primary_key=True)
serial_number = db.Column(db.String(9), index=True, unique=True, nullable=False)
name = db.Column(db.String(64), nullable=False, default='NA')
seq = db.Column(db.String(2), default='00')
description = db.Column(db.Text, default='TBD')
loc_type = db.Column(db.String(20), default='TBD')
loc_seq = db.Column(db.String(2), default='00')
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
files = db.relationship('File', backref='Disk', lazy='dynamic')
def __repr__(self):
return '<Serial: {}, name:Sequence = {}:{}>'\
.format(self.serial_number, self.name, self.seq)
def __init__(self, serial_number, name, description):
self.serial_number = serial_number
self.name = name
self.description = description
def set_name(self, name, seq):
""" Update the disk name and seqence number """
self.name = name
self.seq = seq
def set_location(self, loc_type, loc_seq):
""" Update the location type and seqence number """
self.loc_type = loc_type
self.loc_seq = loc_seq
def set_user_id(self, user_id):
""" Update user id reference """
self.user_id = user_id
class File(db.Model):
""" All files """
id = db.Column(db.Integer, primary_key=True)
disk_id = db.Column(db.Integer, db.ForeignKey('disk.id'))
filepath = db.Column(db.String(255))
filename = db.Column(db.String(100))
size = db.Column(db.Integer)
created = db.Column(db.DateTime)
file_hash = db.Column(db.String(128))
def __repr__(self):
return '<filename: {}, size = {}>'\
.format(self.filename, self.size)
def __init__(self, disk_id, filepath, filename, size, created):
self.disk_id = disk_id
self.filepath = filepath
self.filename = filename
self.size = size
self.created = created
def set_disk_id(self, disk_id):
""" Update the disk_id """
self.disk_id = disk_id
def set_filepathname(self, filepath, filename):
""" Update the file path and file name """
self.filepath = filepath
self.filename = filename
def set_file_size(self, size):
""" Update the size """
self.size = size
def set_file_created(self, created):
""" Update the created timestamp """
self.created = created
def set_file_hash(self, file_hash):
""" Update the file_hash """
self.file_hash = file_hash
| 33 | 84 | 0.638528 | 555 | 4,158 | 4.614414 | 0.207207 | 0.065599 | 0.081999 | 0.074971 | 0.265912 | 0.179227 | 0.108161 | 0.061304 | 0 | 0 | 0 | 0.009419 | 0.234007 | 4,158 | 125 | 85 | 33.264 | 0.794662 | 0.122655 | 0 | 0.227848 | 1 | 0 | 0.045752 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.21519 | false | 0.075949 | 0.050633 | 0.037975 | 0.658228 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 4 |
ecb8ebcee6dff1167fb5e0dc14e35871b68a2664 | 909 | py | Python | tests/test_1790.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | tests/test_1790.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | tests/test_1790.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pytest
"""
Test 1790. Check if One String Swap Can Make Strings Equal
"""
@pytest.fixture(scope="session")
def init_variables_1790():
from src.leetcode_1790_check_if_one_string_swap_can_make_strings_equal import (
Solution,
)
solution = Solution()
def _init_variables_1790():
return solution
yield _init_variables_1790
class TestClass1790:
def test_solution_0(self, init_variables_1790):
assert init_variables_1790().areAlmostEqual("bank", "kanb")
def test_solution_1(self, init_variables_1790):
assert not init_variables_1790().areAlmostEqual("attack", "defend")
def test_solution_2(self, init_variables_1790):
assert init_variables_1790().areAlmostEqual("kelb", "kelb")
def test_solution_3(self, init_variables_1790):
assert not init_variables_1790().areAlmostEqual("abcd", "dcba")
| 25.25 | 83 | 0.727173 | 116 | 909 | 5.336207 | 0.396552 | 0.231018 | 0.3021 | 0.135703 | 0.523425 | 0.523425 | 0.523425 | 0.523425 | 0.523425 | 0.336026 | 0 | 0.08 | 0.174917 | 909 | 35 | 84 | 25.971429 | 0.745333 | 0.022002 | 0 | 0 | 0 | 0 | 0.052311 | 0 | 0 | 0 | 0 | 0 | 0.210526 | 1 | 0.315789 | false | 0 | 0.105263 | 0.052632 | 0.526316 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
019dc5c692186d9357f7d873d773b90052cd7415 | 601 | py | Python | jakso_ml/training_data/combine_processors.py | JaksoSoftware/jakso-ml | 5720ea557ca2fcf9ae16e329c198acd8e31258c4 | [
"MIT"
] | null | null | null | jakso_ml/training_data/combine_processors.py | JaksoSoftware/jakso-ml | 5720ea557ca2fcf9ae16e329c198acd8e31258c4 | [
"MIT"
] | 3 | 2020-09-25T18:40:52.000Z | 2021-08-25T14:44:30.000Z | jakso_ml/training_data/combine_processors.py | JaksoSoftware/jakso-ml | 5720ea557ca2fcf9ae16e329c198acd8e31258c4 | [
"MIT"
] | null | null | null | def combine_processors(processors):
def process(samples):
generated_samples = []
for sample in samples:
generated_samples.extend(augment_sample(sample))
return generated_samples
def augment_sample(sample):
generated_samples = [sample]
for processor in processors:
generated_samples = run_processor(processor, generated_samples)
return generated_samples
def run_processor(processor, samples):
generated_samples = []
for sample in samples:
generated_samples.extend(processor.process(sample))
return generated_samples
return process
| 22.259259 | 69 | 0.742097 | 65 | 601 | 6.630769 | 0.215385 | 0.37123 | 0.213457 | 0.12065 | 0.292343 | 0.292343 | 0.292343 | 0.292343 | 0.292343 | 0.292343 | 0 | 0 | 0.191348 | 601 | 26 | 70 | 23.115385 | 0.886831 | 0 | 0 | 0.411765 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.235294 | false | 0 | 0 | 0 | 0.470588 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
01a101a297bbcba0f1af96557f5ad7a6c260021e | 379 | py | Python | vta/python/vta/top/__init__.py | ElaineBao/tvm | 2386e74b0372315e5152e39cc18cb24821a04123 | [
"Apache-2.0"
] | 15 | 2019-05-02T00:06:28.000Z | 2022-03-25T03:11:14.000Z | vta/python/vta/top/__init__.py | ElaineBao/tvm | 2386e74b0372315e5152e39cc18cb24821a04123 | [
"Apache-2.0"
] | 5 | 2019-05-13T20:44:51.000Z | 2019-09-25T19:56:29.000Z | vta/python/vta/top/__init__.py | ElaineBao/tvm | 2386e74b0372315e5152e39cc18cb24821a04123 | [
"Apache-2.0"
] | 11 | 2019-07-01T05:21:36.000Z | 2022-01-04T18:38:27.000Z | """TVM TOPI connector, eventually most of these should go to TVM repo"""
from . import bitpack
from .graphpack import graph_pack
from . import op
from . import vta_conv2d
from . import vta_conv2d_transpose
from . import vta_dense
from . import util
# NNVM is deprecated for VTA
# from . import nnvm_bitpack
# from .nnvm_graphpack import nnvm_graph_pack
# from . import nnvm_op
| 25.266667 | 72 | 0.778364 | 59 | 379 | 4.830508 | 0.457627 | 0.280702 | 0.136842 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006329 | 0.166227 | 379 | 14 | 73 | 27.071429 | 0.89557 | 0.493404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
01aa8cf7c000440027b3c7d554a28408b6cf94fe | 250 | py | Python | turbopy/__init__.py | iaescala/turbopy | d9b6a09d1dab9a1236668734b051e57b4a5a142f | [
"MIT"
] | null | null | null | turbopy/__init__.py | iaescala/turbopy | d9b6a09d1dab9a1236668734b051e57b4a5a142f | [
"MIT"
] | null | null | null | turbopy/__init__.py | iaescala/turbopy | d9b6a09d1dab9a1236668734b051e57b4a5a142f | [
"MIT"
] | 2 | 2020-11-11T17:50:07.000Z | 2021-11-29T20:25:43.000Z | from __future__ import absolute_import, division, print_function
from .version import __version__
from .linelists import get_default_linelist, TSLineList
from .marcs import interp_atmosphere, load_atmosphere, MARCSModel
from .synth import run_synth
| 35.714286 | 65 | 0.86 | 32 | 250 | 6.25 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104 | 250 | 6 | 66 | 41.666667 | 0.892857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0.2 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
01b3d98dc2b407cc276761bfc12f768ef462378e | 3,474 | py | Python | DailyProgrammer/DP20150114B.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/DP20150114B.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/DP20150114B.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
[2015-01-14] Challenge #197 [Intermediate] Food Delivery Problem
https://www.reddit.com/r/dailyprogrammer/comments/2sfs8f/20150114_challenge_197_intermediate_food_delivery/
#Description:
You are owner of a new restaurant that is open 24 hours a day 7 days a week. To be helpful to your customers you
deliver. To make sure you are the best in business you offer a guarantee of the fastest delivery of food during your
hours of operation (which is all the time)
Our challenge this week is to build a program our delivery people can use to help pick the fastest route in time to get
from a source to a destination in the town of our restaurant.
#City Routes
The city has many streets connected to many intersections. For the sake of naming we will label intersections with
letters. Streets between intersections will use their street name.
#Time Intervals
The data for each street has 4 values of time in minutes. They represent the time it takes one to travel that street
based on a fixed interval of time of day to travel on that street. The varied time is due to different traffic loads on
that street.
* T1 = 0600-1000 (6 am to 10 am)
* T2 = 1000 - 1500 (10 am to 3 pm)
* T3 = 1500 - 1900 (3 pm to 7 pm)
* T4 = 1900 - 0600 (7 pm to 6 am)
#Data Format
(Start Intersection) (Stop Intersection) (Name of street) (T1) (T2) (T3) (T4)
(Start Intersection) - The letter of that unique intersection
(Stop Intersection) - The letter of that unique intersection
(Name of Street) - Name of the street with this time data
(T1 to T4) are the minutes it takes to travel based on fixed time intervals (described above)
#Data
The data:
A B "South Acorn Drive" 5 10 5 10
B C "Acorn Drive" 15 5 15 5
C D "North Acorn Drive" 7 10 15 7
H G "South Almond Way" 10 10 10 10
G F "Almond Way" 15 20 15 20
F E "North Almond Way" 5 6 5 6
I J "South Peanut Lane" 8 9 10 11
J K "Peanut Lane" 11 10 9 8
K L "North Peanut Lane" 7 5 7 5
P O "South Walnut" 6 5 6 5
O N "Walnut" 10 8 10 8
N M "North Walnut" 9 6 9 6
D E "West Elm Street" 10 8 12 7
E L "Elm Street" 12 11 12 8
L M "East Elm Street" 5 4 5 4
C F "West Central Avenue" 9 8 9 8
F K "Central Avenue" 5 4 5 4
K N "East Central Avenue" 9 9 9 9
B G "West Pine Road" 7 6 7 6
G J "Pine Road" 9 8 9 8
J O "East Pine Road" 6 5 6 5
A H "West Oak Expressway" 9 8 7 7
H I "Oak Expressway" 10 10 10 10
I P "East Oak Expressway" 8 7 8 7
#Time Changes and Routes
It is possible that a route might take you long enough that it might cross you over a time change such that the route
times get change. To make this easier just please consider the time between intersections based on the start time of
the drive. So say I pick 5:50am - and if the route would take us into 6am hour you don't have to compute the route
times for 6am to 10am but just keep the route computed based on 7pm to 6am since our starting time was 5:50am.
#Challenge Input:
You will be given start and end intersections and time of day to compute a route.
#Challenge Output:
List the route direction street by street and time. This must be the "Fastest" route from start to end at that time of
day. Also list the time it took you in minutes.
#Challenge Routes to solve:
A M 0800
A M 1200
A M 1800
A M 2200
P D 0800
P D 1200
P D 1800
P D 2200
"""
def main():
pass
if __name__ == "__main__":
main()
| 41.855422 | 119 | 0.70236 | 678 | 3,474 | 3.579646 | 0.334808 | 0.009889 | 0.009889 | 0.023074 | 0.066749 | 0.037083 | 0.037083 | 0 | 0 | 0 | 0 | 0.095512 | 0.249568 | 3,474 | 82 | 120 | 42.365854 | 0.835443 | 0.979275 | 0 | 0 | 0 | 0 | 0.125 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0.25 | 0 | 0 | 0.25 | 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 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 |
01e7fff671b8a3ccc9c36f49b57fa45f42ace8ef | 377 | py | Python | access/mergedsecret.py | Mangiang/mergedsecretsoperator | 1419ce6d9b0ed1c3285c04650658b6f1507c12c9 | [
"MIT"
] | null | null | null | access/mergedsecret.py | Mangiang/mergedsecretsoperator | 1419ce6d9b0ed1c3285c04650658b6f1507c12c9 | [
"MIT"
] | null | null | null | access/mergedsecret.py | Mangiang/mergedsecretsoperator | 1419ce6d9b0ed1c3285c04650658b6f1507c12c9 | [
"MIT"
] | null | null | null | from kubernetes import client
from kopf._core.actions.execution import Logger
from data.secret import Secret
from data.mergedsecret import crd_group, crd_version, crd_name
def get_all_merged_secrets(logger: Logger, namespace="*") -> list[Secret]:
return client.CustomObjectsApi().list_cluster_custom_object(
group=crd_group, version=crd_version, plural=crd_name)
| 37.7 | 74 | 0.803714 | 52 | 377 | 5.576923 | 0.557692 | 0.055172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114058 | 377 | 9 | 75 | 41.888889 | 0.868263 | 0 | 0 | 0 | 0 | 0 | 0.002653 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.571429 | 0.142857 | 0.857143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 4 |
bf0ad75f9277ca54d3f3b5c62128c5abe41d675b | 1,858 | py | Python | asnets/experiments/cosanostra_345.py | xf1590281/ASNets | 5f4b29fb62a5e72004b813228442d06246c9ec33 | [
"MIT"
] | 21 | 2017-12-05T13:27:36.000Z | 2021-11-16T20:32:33.000Z | asnets/experiments/cosanostra_345.py | xf1590281/ASNets | 5f4b29fb62a5e72004b813228442d06246c9ec33 | [
"MIT"
] | 2 | 2018-07-16T12:15:46.000Z | 2020-10-31T00:02:49.000Z | asnets/experiments/cosanostra_345.py | xf1590281/ASNets | 5f4b29fb62a5e72004b813228442d06246c9ec33 | [
"MIT"
] | 7 | 2018-03-19T13:45:13.000Z | 2022-03-24T07:52:20.000Z | """For experiments on our CosaNostra Pizza domain. This file is meant for use
in the sparse learning experiments."""
PDDL_DIR = '../problems/mine/cosanostra/'
COMMON_PDDLS = ['cosanostra.pddl']
TRAIN_PDDLS = [
# remove two smallest problems to avoid need for special-case logic
# 'problems/cosanostra-n1.pddl',
# 'problems/cosanostra-n2.pddl',
'problems/cosanostra-n3.pddl',
'problems/cosanostra-n4.pddl',
'problems/cosanostra-n5.pddl'
] # yapf: disable
TRAIN_NAMES = None
TEST_RUNS = [
(['problems/cosanostra-n6.pddl'], None),
(['problems/cosanostra-n7.pddl'], None),
(['problems/cosanostra-n8.pddl'], None),
(['problems/cosanostra-n9.pddl'], None),
(['problems/cosanostra-n10.pddl'], None),
(['problems/cosanostra-n11.pddl'], None),
(['problems/cosanostra-n12.pddl'], None),
(['problems/cosanostra-n13.pddl'], None),
(['problems/cosanostra-n14.pddl'], None),
(['problems/cosanostra-n15.pddl'], None),
(['problems/cosanostra-n20.pddl'], None),
(['problems/cosanostra-n25.pddl'], None),
(['problems/cosanostra-n30.pddl'], None),
(['problems/cosanostra-n35.pddl'], None),
# also remove big eval files; we don't really care about thorough eval for
# the sparsity experiments
# (['problems/cosanostra-n40.pddl'], None),
# (['problems/cosanostra-n45.pddl'], None),
# (['problems/cosanostra-n50.pddl'], None),
# (['problems/cosanostra-n55.pddl'], None),
# (['problems/cosanostra-n60.pddl'], None),
# (['problems/cosanostra-n65.pddl'], None),
# (['problems/cosanostra-n70.pddl'], None),
# (['problems/cosanostra-n75.pddl'], None),
# (['problems/cosanostra-n80.pddl'], None),
# (['problems/cosanostra-n85.pddl'], None),
# (['problems/cosanostra-n90.pddl'], None),
# (['problems/cosanostra-n95.pddl'], None),
] # yapf: disable
| 41.288889 | 78 | 0.6507 | 216 | 1,858 | 5.574074 | 0.375 | 0.463455 | 0.318937 | 0.518272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033587 | 0.1507 | 1,858 | 44 | 79 | 42.227273 | 0.729404 | 0.467707 | 0 | 0 | 0 | 0 | 0.53057 | 0.515026 | 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 | 0 | 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 |
bf1d0b23557785ad23b4a88dd69f60f73fa139a0 | 53 | py | Python | botx/bots/mixins/requests/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/bots/mixins/requests/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/bots/mixins/requests/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Mixins for shortcuts for requests to BotX API."""
| 26.5 | 52 | 0.716981 | 8 | 53 | 4.75 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150943 | 53 | 1 | 53 | 53 | 0.844444 | 0.867925 | 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 |
bf2dd44fc180a20639d70012696b8be5d29ba01f | 1,142 | py | Python | setup.py | tiffanyrzhou/braintreehttp_python | 5eed76751ed4de91a45e7841ab2b6947b5da19ab | [
"MIT"
] | 2 | 2018-04-25T17:13:05.000Z | 2019-03-24T13:23:23.000Z | setup.py | tiffanyrzhou/braintreehttp_python | 5eed76751ed4de91a45e7841ab2b6947b5da19ab | [
"MIT"
] | 5 | 2018-01-31T18:05:35.000Z | 2019-03-15T11:01:46.000Z | setup.py | tiffanyrzhou/braintreehttp_python | 5eed76751ed4de91a45e7841ab2b6947b5da19ab | [
"MIT"
] | 8 | 2018-03-31T02:06:47.000Z | 2021-03-28T02:13:55.000Z | from setuptools import setup
version = "0.5.0"
long_description = """
BraintreeHttp is a generic http client designed to be used with code-generated projects.
"""
setup(
name="braintreehttp",
long_description=long_description,
version=version,
author="Braintree",
author_email="support@braintreepayments.com",
packages=["braintreehttp", "braintreehttp/testutils", "braintreehttp/serializers"],
install_requires=['requests>=2.0.0', 'six>=1.0.0', 'pyopenssl>=0.15'],
license="MIT",
classifiers=[
'Intended Audience :: Developers',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
| 34.606061 | 89 | 0.639229 | 114 | 1,142 | 6.359649 | 0.587719 | 0.209655 | 0.275862 | 0.107586 | 0.074483 | 0 | 0 | 0 | 0 | 0 | 0 | 0.024664 | 0.218914 | 1,142 | 32 | 90 | 35.6875 | 0.788117 | 0 | 0 | 0 | 1 | 0 | 0.619089 | 0.067426 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.034483 | 0 | 0.034483 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
175f8d65365c9a243b929154c538361e9a57d781 | 722 | py | Python | src/route/__init__.py | dkletz-hackathon/bncc-sano-api | 0281962dcd6a8e4b9c1b97372964e98b59748a61 | [
"MIT"
] | null | null | null | src/route/__init__.py | dkletz-hackathon/bncc-sano-api | 0281962dcd6a8e4b9c1b97372964e98b59748a61 | [
"MIT"
] | null | null | null | src/route/__init__.py | dkletz-hackathon/bncc-sano-api | 0281962dcd6a8e4b9c1b97372964e98b59748a61 | [
"MIT"
] | null | null | null | from core.router import Router
from src.route.user import user_router
from src.route.category import category_router
from src.route.routine import routine_router
from src.route.event import event_router
from src.route.activity import activity_router
from src.route.location import location_router
from src.route.schedule import schedule_router
group_router = Router()
group_router.group("/user", user_router)
group_router.group("/category", category_router)
group_router.group("/routine", routine_router)
group_router.group("/event", event_router)
group_router.group("/activity", activity_router)
group_router.group("/location", location_router)
group_router.group("/schedule", schedule_router)
__all__ = [group_router]
| 36.1 | 48 | 0.828255 | 102 | 722 | 5.598039 | 0.147059 | 0.288967 | 0.238179 | 0.220666 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074792 | 722 | 19 | 49 | 38 | 0.85479 | 0 | 0 | 0 | 0 | 0 | 0.076177 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.470588 | 0 | 0.470588 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
1762a83917b05c54d91b183789edd26e94b080cb | 561 | py | Python | src/syrupy/extensions/image.py | dtczest/syrupy | c37d6521852c96cf1ae01873c02b94410d38b663 | [
"Apache-2.0"
] | 147 | 2019-11-24T22:44:39.000Z | 2022-03-28T17:19:34.000Z | src/syrupy/extensions/image.py | dtczest/syrupy | c37d6521852c96cf1ae01873c02b94410d38b663 | [
"Apache-2.0"
] | 560 | 2019-11-19T19:15:19.000Z | 2022-03-18T19:29:14.000Z | src/syrupy/extensions/image.py | dtczest/syrupy | c37d6521852c96cf1ae01873c02b94410d38b663 | [
"Apache-2.0"
] | 13 | 2020-03-07T23:23:10.000Z | 2022-01-25T17:05:07.000Z | from typing import (
TYPE_CHECKING,
Any,
)
from .single_file import SingleFileSnapshotExtension
if TYPE_CHECKING:
from syrupy.types import SerializableData
class PNGImageSnapshotExtension(SingleFileSnapshotExtension):
@property
def _file_extension(self) -> str:
return "png"
class SVGImageSnapshotExtension(SingleFileSnapshotExtension):
@property
def _file_extension(self) -> str:
return "svg"
def serialize(self, data: "SerializableData", **kwargs: Any) -> bytes:
return str(data).encode("utf-8")
| 22.44 | 74 | 0.71836 | 55 | 561 | 7.2 | 0.563636 | 0.060606 | 0.191919 | 0.212121 | 0.323232 | 0.323232 | 0.323232 | 0.323232 | 0 | 0 | 0 | 0.002208 | 0.192513 | 561 | 24 | 75 | 23.375 | 0.871965 | 0 | 0 | 0.235294 | 0 | 0 | 0.048128 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.176471 | false | 0 | 0.176471 | 0.176471 | 0.647059 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
176d283bdd99e8e4f98bb6b683431cdb9ceada61 | 136 | py | Python | tools/XstreamDL_CLI/extractors/dash/childs/location.py | wayneclub/Subtitle-Downloader | 4ab1e7ab075593d4245867996b0766efc5aa418a | [
"MIT"
] | 57 | 2021-12-05T02:31:51.000Z | 2022-03-31T03:36:26.000Z | tools/XstreamDL_CLI/extractors/dash/childs/location.py | wayneclub/Subtitle-Downloader | 4ab1e7ab075593d4245867996b0766efc5aa418a | [
"MIT"
] | 25 | 2021-12-08T09:16:30.000Z | 2022-03-31T11:09:10.000Z | tools/XstreamDL_CLI/extractors/dash/childs/location.py | wayneclub/Subtitle-Downloader | 4ab1e7ab075593d4245867996b0766efc5aa418a | [
"MIT"
] | 17 | 2021-12-01T03:11:41.000Z | 2022-03-26T15:22:35.000Z | from ..mpditem import MPDItem
class Location(MPDItem):
def __init__(self, name: str):
super(Location, self).__init__(name) | 22.666667 | 44 | 0.698529 | 17 | 136 | 5.117647 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.183824 | 136 | 6 | 44 | 22.666667 | 0.783784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
177f42a0d83eeb9b1a2b8ec899bd86ede29dfd38 | 481 | py | Python | Backend/travelagency/countries/models.py | jacr6/jose-cuevas-02201981 | 4afb80157622388019f1af48bf5bad2198f7b2ae | [
"MIT"
] | null | null | null | Backend/travelagency/countries/models.py | jacr6/jose-cuevas-02201981 | 4afb80157622388019f1af48bf5bad2198f7b2ae | [
"MIT"
] | null | null | null | Backend/travelagency/countries/models.py | jacr6/jose-cuevas-02201981 | 4afb80157622388019f1af48bf5bad2198f7b2ae | [
"MIT"
] | null | null | null | from djongo import models
# Create your models here.
class Country(models.Model):
name = models.CharField(max_length=100)
currency = models.CharField(max_length=100)
symbol = models.CharField(max_length=100)
centseparator = models.CharField(max_length=100)
millionseparator = models.CharField(max_length=100)
locale = models.CharField(max_length=100)
decimals = models.CharField(max_length=100)
displaysymbol = models.CharField(max_length=100)
| 30.0625 | 55 | 0.754678 | 60 | 481 | 5.916667 | 0.366667 | 0.338028 | 0.405634 | 0.540845 | 0.608451 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05868 | 0.149688 | 481 | 16 | 56 | 30.0625 | 0.809291 | 0.049896 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
17874b06ee10d8c25418d2ae40f61862dec61610 | 41 | py | Python | file/test_copy.py | eric999j/Udemy_Python_Hand_On | 7a985b3e2c9adfd3648d240af56ac00bb916c3ad | [
"Apache-2.0"
] | 1 | 2020-12-31T18:03:34.000Z | 2020-12-31T18:03:34.000Z | file/test_copy.py | cntfk2017/Udemy_Python_Hand_On | 52f2a5585bfdea95d893f961c8c21844072e93c7 | [
"Apache-2.0"
] | null | null | null | file/test_copy.py | cntfk2017/Udemy_Python_Hand_On | 52f2a5585bfdea95d893f961c8c21844072e93c7 | [
"Apache-2.0"
] | 2 | 2019-09-23T14:26:48.000Z | 2020-05-25T07:09:26.000Z | f = open("test.txt", "r")
print(f.read()) | 20.5 | 25 | 0.560976 | 8 | 41 | 2.875 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097561 | 41 | 2 | 26 | 20.5 | 0.621622 | 0 | 0 | 0 | 0 | 0 | 0.214286 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.