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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3a10db88b8e63122312fa6eadb6be1464b7f840f | 134 | py | Python | backend/src/fibonacci/api/urls.py | alfonsorodrigo/fibonacci-series | 4e9290404037a0b6ef26043d4aab1e5de6c2ad82 | [
"MIT"
] | null | null | null | backend/src/fibonacci/api/urls.py | alfonsorodrigo/fibonacci-series | 4e9290404037a0b6ef26043d4aab1e5de6c2ad82 | [
"MIT"
] | 6 | 2021-03-18T23:53:51.000Z | 2021-09-22T18:36:27.000Z | backend/src/fibonacci/api/urls.py | alfonsorodrigo/fibonacci-series | 4e9290404037a0b6ef26043d4aab1e5de6c2ad82 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import FibonacciSeries
urlpatterns = [
path('fibonacci/', FibonacciSeries.as_view())
]
| 16.75 | 49 | 0.746269 | 15 | 134 | 6.6 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.149254 | 134 | 7 | 50 | 19.142857 | 0.868421 | 0 | 0 | 0 | 0 | 0 | 0.074627 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
3a16e456062aab19ac37b11ba7858d6e985cd3b4 | 368 | py | Python | verba/settings/testing.py | nhsuk/verba | c0354ae2012a046e7f7cc7482e293737de9d28bc | [
"MIT"
] | null | null | null | verba/settings/testing.py | nhsuk/verba | c0354ae2012a046e7f7cc7482e293737de9d28bc | [
"MIT"
] | 2 | 2016-08-11T09:30:41.000Z | 2016-08-11T15:04:08.000Z | verba/settings/testing.py | nhsuk/verba | c0354ae2012a046e7f7cc7482e293737de9d28bc | [
"MIT"
] | 1 | 2021-04-11T07:41:27.000Z | 2021-04-11T07:41:27.000Z | from .base import * # noqa
VERBA_CONFIG.update({
'GITHUB_HTTP_HOST': 'https://example.com',
'GITHUB_API_HOST': 'https://api.example.com',
'REPO': 'test-owner/test-repo'
})
VERBA_CONFIG['ASSIGNEES'] = {
'ALLOWED': ['test-owner', 'test-owner-2', 'test-developer'],
'WRITERS': ['test-owner', 'test-ow... | 26.285714 | 64 | 0.625 | 45 | 368 | 4.977778 | 0.511111 | 0.200893 | 0.174107 | 0.160714 | 0.169643 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006369 | 0.146739 | 368 | 13 | 65 | 28.307692 | 0.707006 | 0.01087 | 0 | 0 | 0 | 0 | 0.558011 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.090909 | 0 | 0.090909 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3a21eae0f92710a574fbd3a4dae3608f04b49cdd | 364 | py | Python | main.py | hartono-wen/python-oop-skeleton | c132c3fabe2475bb24e76c97f10f14d1e8586112 | [
"MIT"
] | null | null | null | main.py | hartono-wen/python-oop-skeleton | c132c3fabe2475bb24e76c97f10f14d1e8586112 | [
"MIT"
] | null | null | null | main.py | hartono-wen/python-oop-skeleton | c132c3fabe2475bb24e76c97f10f14d1e8586112 | [
"MIT"
] | null | null | null | from entities.employee import *
from entities.department import *
from entities.company import *
hartono = employee("Hartono", '1980-01-01', "M", "+62-123-456-789", "hartono@test.com")
finance_department = department("finance", "Finance Department", 5)
hartono.save()
print(finance_department.id)
print(finance_depar... | 26 | 87 | 0.766484 | 47 | 364 | 5.851064 | 0.489362 | 0.309091 | 0.24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.060423 | 0.090659 | 364 | 13 | 88 | 28 | 0.770393 | 0 | 0 | 0 | 0 | 0 | 0.203297 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0.333333 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
3a2c008bc6e54b0303ecb579638f8655eb62b27b | 4,205 | py | Python | test_canSim.py | pm657/gdbp | b8b2b3145a830f52c1811b27a655600cd41e29a7 | [
"MIT"
] | null | null | null | test_canSim.py | pm657/gdbp | b8b2b3145a830f52c1811b27a655600cd41e29a7 | [
"MIT"
] | null | null | null | test_canSim.py | pm657/gdbp | b8b2b3145a830f52c1811b27a655600cd41e29a7 | [
"MIT"
] | null | null | null | import unittest
import canSim
import can
import tkinter
class CanSimTest(unittest.TestCase):
def test_types(self):
"""Test data types."""
self.assertIsInstance(canSim.interface, str)
self.assertIsInstance(canSim.channel, str)
self.assertIsInstance(canSim.freq, int)
self.ass... | 45.706522 | 82 | 0.691795 | 466 | 4,205 | 6.165236 | 0.197425 | 0.142012 | 0.280543 | 0.189349 | 0.429864 | 0.306996 | 0.095023 | 0 | 0 | 0 | 0 | 0.024691 | 0.1717 | 4,205 | 91 | 83 | 46.208791 | 0.800172 | 0.033769 | 0 | 0 | 0 | 0 | 0.017566 | 0 | 0 | 0 | 0.015834 | 0 | 0.849315 | 1 | 0.054795 | false | 0 | 0.054795 | 0 | 0.123288 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3a4646857a25dd835a6eb70c2d143848cba645fa | 76 | py | Python | sample_print.py | malai001/codebank | 6834107ab683a38a8799102278369a66b1c1b336 | [
"bzip2-1.0.6"
] | 1 | 2017-07-11T05:02:12.000Z | 2017-07-11T05:02:12.000Z | sample_print.py | malai001/codebank | 6834107ab683a38a8799102278369a66b1c1b336 | [
"bzip2-1.0.6"
] | null | null | null | sample_print.py | malai001/codebank | 6834107ab683a38a8799102278369a66b1c1b336 | [
"bzip2-1.0.6"
] | null | null | null |
a = ['123.pfx','456.pem']
for i in a:
if i.endswith('.pfx'):
print i | 15.2 | 26 | 0.526316 | 15 | 76 | 2.666667 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 0.236842 | 76 | 5 | 27 | 15.2 | 0.586207 | 0 | 0 | 0 | 0 | 0 | 0.25 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3a4f1add29cf9bcc7ff94a6c9cf2c1d73b728d2a | 30 | py | Python | bgscraper/__init__.py | AvidSoftware-be/ScrapeBGMenen | 48a558eaca063b612f0bc7c65d43576d3fbceb71 | [
"MIT"
] | 1 | 2016-04-05T20:46:17.000Z | 2016-04-05T20:46:17.000Z | bgscraper/__init__.py | AvidSoftware-be/ScrapeBGMenen | 48a558eaca063b612f0bc7c65d43576d3fbceb71 | [
"MIT"
] | null | null | null | bgscraper/__init__.py | AvidSoftware-be/ScrapeBGMenen | 48a558eaca063b612f0bc7c65d43576d3fbceb71 | [
"MIT"
] | null | null | null | __author__ = 'Dennis Decoene'
| 15 | 29 | 0.766667 | 3 | 30 | 6.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 30 | 1 | 30 | 30 | 0.730769 | 0 | 0 | 0 | 0 | 0 | 0.466667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
28abf18ab30172beb16b79868c0f6946d8f593d2 | 143 | py | Python | thingsboard_gateway/connectors/mitsubishi/mitsubishi_plc_enum.py | xiaotangji/sinLot-gateway | 23680e96defa5af3fca772e4908b7387901c3e02 | [
"Apache-2.0"
] | 1 | 2021-11-24T02:44:58.000Z | 2021-11-24T02:44:58.000Z | thingsboard_gateway/connectors/mitsubishi/mitsubishi_plc_enum.py | xiaotangji/sinLot-gateway | 23680e96defa5af3fca772e4908b7387901c3e02 | [
"Apache-2.0"
] | null | null | null | thingsboard_gateway/connectors/mitsubishi/mitsubishi_plc_enum.py | xiaotangji/sinLot-gateway | 23680e96defa5af3fca772e4908b7387901c3e02 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class MitsubishiPlcConnectType(Enum):
BINARY = 0 # BINARY for 3E
ASCII = 1 # ASCII for 3E
A1E = 2 #
| 17.875 | 37 | 0.622378 | 19 | 143 | 4.684211 | 0.684211 | 0.11236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061224 | 0.314685 | 143 | 7 | 38 | 20.428571 | 0.846939 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
28b2320d476457bfeb625b3893bd73165b238c16 | 9,272 | py | Python | code p2.py | harikan2007/virus | a20f3f47abc57c035f79ca71ac32078daa3dd534 | [
"Apache-2.0"
] | 1 | 2021-03-23T19:57:17.000Z | 2021-03-23T19:57:17.000Z | code p2.py | harikan2007/virus | a20f3f47abc57c035f79ca71ac32078daa3dd534 | [
"Apache-2.0"
] | null | null | null | code p2.py | harikan2007/virus | a20f3f47abc57c035f79ca71ac32078daa3dd534 | [
"Apache-2.0"
] | null | null | null | import numpy as np
L= int(input('L'))
N= int(input('N'))
T= int(input('T'))
p= int(input('Pacient number'))
pmariz=float(input('percentage of infection'))
ts=int(input('ts'))
counter=0
base=np.zeros((L,L),dtype=float)
randmake =np.random.randint(L, size=(2, N))
randmakep =np.random.randint(L, size=(2, p))... | 37.088 | 98 | 0.35645 | 1,361 | 9,272 | 2.428362 | 0.045555 | 0.133132 | 0.072617 | 0.055068 | 0.842663 | 0.79062 | 0.744327 | 0.632073 | 0.518608 | 0.451437 | 0 | 0.088947 | 0.425259 | 9,272 | 250 | 99 | 37.088 | 0.531244 | 0.029659 | 0 | 0.364103 | 0 | 0 | 0.005086 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.005128 | 0 | 0.005128 | 0.005128 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 0 | 0 | 0 | 3 |
28b82260e0fedc3fd39e9c048a336da47a089c93 | 66 | py | Python | src/templates/python2/pattern_module/__init__.py | ErichDonGubler/CS-3450-Project-Templates | e77acd271466672d7aa04a26aeec0c28f55cdd35 | [
"Unlicense"
] | null | null | null | src/templates/python2/pattern_module/__init__.py | ErichDonGubler/CS-3450-Project-Templates | e77acd271466672d7aa04a26aeec0c28f55cdd35 | [
"Unlicense"
] | 4 | 2017-03-12T20:07:18.000Z | 2017-04-13T07:01:03.000Z | src/templates/python3/pattern_module/__init__.py | ErichDonGubler/CS-3450-Project-Templates | e77acd271466672d7aa04a26aeec0c28f55cdd35 | [
"Unlicense"
] | null | null | null | __all__ = ["pattern"]
from pattern_module.pattern import Pattern
| 16.5 | 42 | 0.787879 | 8 | 66 | 5.875 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 66 | 3 | 43 | 22 | 0.810345 | 0 | 0 | 0 | 0 | 0 | 0.106061 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
28c44ce129b1026a3eef5d19229be75bb9140b0b | 137 | py | Python | db/location/createwxdbConfig.py | rand-projects/fisb-decode | 870f6be8b7e7013fcba0c4f2f894aae425700563 | [
"BSD-2-Clause-Patent"
] | 7 | 2021-05-29T13:12:20.000Z | 2021-12-26T02:38:34.000Z | db/location/createwxdbConfig.py | rand-projects/fisb-decode | 870f6be8b7e7013fcba0c4f2f894aae425700563 | [
"BSD-2-Clause-Patent"
] | null | null | null | db/location/createwxdbConfig.py | rand-projects/fisb-decode | 870f6be8b7e7013fcba0c4f2f894aae425700563 | [
"BSD-2-Clause-Patent"
] | null | null | null | """createwxdb configuration information.
"""
#: MongoDb URI where fisb_location DB is located.
MONGO_URI = 'mongodb://localhost:27017/'
| 22.833333 | 49 | 0.751825 | 16 | 137 | 6.3125 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041322 | 0.116788 | 137 | 5 | 50 | 27.4 | 0.793388 | 0.627737 | 0 | 0 | 0 | 0 | 0.590909 | 0.590909 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
28cc5b607436dfa9c83e8ee3d5d1e23f10aad297 | 3,334 | py | Python | src/onegov/winterthur/collections/mission_report.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/collections/mission_report.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/collections/mission_report.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import sedate
from datetime import datetime, date
from onegov.core.collection import GenericCollection, Pagination
from onegov.org.models.file import ImageFileCollection
from onegov.winterthur.models import MissionReport
from onegov.winterthur.models import MissionReportFile
from onegov.winterthur.models import Missio... | 28.991304 | 78 | 0.653269 | 378 | 3,334 | 5.613757 | 0.280423 | 0.032988 | 0.028275 | 0.036758 | 0.156456 | 0.091423 | 0.036758 | 0.036758 | 0 | 0 | 0 | 0.002389 | 0.246851 | 3,334 | 114 | 79 | 29.245614 | 0.842692 | 0.04769 | 0 | 0.189873 | 0 | 0 | 0.022734 | 0.006947 | 0 | 0 | 0 | 0 | 0 | 1 | 0.21519 | false | 0 | 0.101266 | 0.126582 | 0.544304 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
28d06690f8d085a48cd90199a95ebd2f7af33aec | 458 | py | Python | peeringdb_server/templatetags/two_factor_ext.py | CyberFlameGO/peeringdb | 83461deb58805fe1d83c5ff4276fa3bcb59a7323 | [
"BSD-2-Clause"
] | 224 | 2016-10-13T10:32:33.000Z | 2022-03-23T13:08:48.000Z | peeringdb_server/templatetags/two_factor_ext.py | CyberFlameGO/peeringdb | 83461deb58805fe1d83c5ff4276fa3bcb59a7323 | [
"BSD-2-Clause"
] | 1,063 | 2016-06-07T02:57:11.000Z | 2022-03-31T00:08:07.000Z | peeringdb_server/templatetags/two_factor_ext.py | CyberFlameGO/peeringdb | 83461deb58805fe1d83c5ff4276fa3bcb59a7323 | [
"BSD-2-Clause"
] | 92 | 2016-10-22T14:59:40.000Z | 2022-03-26T11:30:12.000Z | """
Template filters / tags to help with two-factor auth
"""
from django import template
from django.utils.translation import ugettext_lazy as _
from django_otp.plugins.otp_email.models import EmailDevice
from two_factor.templatetags import two_factor
register = template.Library()
@register.filter
def device_action(... | 25.444444 | 59 | 0.783843 | 61 | 458 | 5.721311 | 0.57377 | 0.103152 | 0.103152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.141921 | 458 | 17 | 60 | 26.941176 | 0.888041 | 0.113537 | 0 | 0 | 0 | 0 | 0.057789 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0.1 | 0.4 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
28f5504b94d8fb97321943acef27fd63ecf3740d | 200 | py | Python | backend/payment/api/v1/serializers.py | crowdbotics-apps/shabeebapp-32726 | a739f4680342f9dff6ef9d967ba2bfecc0ebc27c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/payment/api/v1/serializers.py | crowdbotics-apps/shabeebapp-32726 | a739f4680342f9dff6ef9d967ba2bfecc0ebc27c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/payment/api/v1/serializers.py | crowdbotics-apps/shabeebapp-32726 | a739f4680342f9dff6ef9d967ba2bfecc0ebc27c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from rest_framework import serializers
from payment.models import Services
class ServicesSerializer(serializers.ModelSerializer):
class Meta:
model = Services
fields = "__all__"
| 22.222222 | 54 | 0.75 | 20 | 200 | 7.25 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 200 | 8 | 55 | 25 | 0.90625 | 0 | 0 | 0 | 0 | 0 | 0.035 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
28f8c6555acc34e1493b1a07f696e229b35a9ba2 | 2,664 | py | Python | src/zsl/errors.py | AtteqCom/zsl | 0d418ef957c9780263b1031dbc59482cd974bc04 | [
"MIT"
] | 2 | 2017-05-17T08:08:52.000Z | 2019-03-25T00:24:51.000Z | src/zsl/errors.py | AtteqCom/zsl | 0d418ef957c9780263b1031dbc59482cd974bc04 | [
"MIT"
] | 100 | 2017-01-11T13:43:11.000Z | 2022-02-10T09:27:18.000Z | src/zsl/errors.py | AtteqCom/zsl | 0d418ef957c9780263b1031dbc59482cd974bc04 | [
"MIT"
] | 1 | 2017-05-10T10:27:01.000Z | 2017-05-10T10:27:01.000Z | from abc import ABCMeta, abstractmethod
from typing import List
class ZslError(Exception):
"""
A base class intended for all exceptions thrown by ZSL or ZSL application.
"""
pass
ERROR_CONFIG_NAME = 'ERRORS'
class ErrorHandler(object):
"""
Custom error handler providing a response on a par... | 29.274725 | 119 | 0.655781 | 320 | 2,664 | 5.3625 | 0.378125 | 0.02331 | 0.043706 | 0.026224 | 0.121795 | 0.087413 | 0.087413 | 0.061772 | 0 | 0 | 0 | 0 | 0.265015 | 2,664 | 90 | 120 | 29.6 | 0.876404 | 0.520646 | 0 | 0.4375 | 0 | 0 | 0.005561 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.21875 | false | 0.125 | 0.0625 | 0.0625 | 0.5625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
e9011b871f550281faac20cea926075444a582c6 | 902 | py | Python | tests/mirror_init_tests/test_mirror_init_check_tree.py | ralphqq/gitchm | 1b403efb30fda127333575c131723a75200a0ab3 | [
"MIT"
] | 1 | 2020-07-06T17:43:52.000Z | 2020-07-06T17:43:52.000Z | tests/mirror_init_tests/test_mirror_init_check_tree.py | ralphqq/gitchm | 1b403efb30fda127333575c131723a75200a0ab3 | [
"MIT"
] | null | null | null | tests/mirror_init_tests/test_mirror_init_check_tree.py | ralphqq/gitchm | 1b403efb30fda127333575c131723a75200a0ab3 | [
"MIT"
] | null | null | null | import pytest
class TestCheckTreeState:
@pytest.fixture
def mirror(self, modified_chm):
return modified_chm["mirror"]
def test_check_dest_no_tree(self, mirror, dest_repo_no_tree):
mirror.dest_repo = dest_repo_no_tree
mirror._check_tree_state()
assert not mirror.dest_has_tr... | 32.214286 | 79 | 0.733925 | 125 | 902 | 4.792 | 0.184 | 0.200334 | 0.186978 | 0.106845 | 0.784641 | 0.580968 | 0.343907 | 0.343907 | 0.288815 | 0.217028 | 0 | 0 | 0.2051 | 902 | 27 | 80 | 33.407407 | 0.835425 | 0 | 0 | 0.333333 | 0 | 0 | 0.006652 | 0 | 0 | 0 | 0 | 0 | 0.190476 | 1 | 0.238095 | false | 0 | 0.047619 | 0.047619 | 0.380952 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
e90b5ad8662d73fc1e580af0512bffe44c5331a4 | 1,855 | py | Python | twitter_scraper/infrastructure/tests/test_utils.py | burakdonmez/twitter_scraper | 62d886ac7edb7a43d13ec6168ec930ff9b6efd08 | [
"MIT"
] | null | null | null | twitter_scraper/infrastructure/tests/test_utils.py | burakdonmez/twitter_scraper | 62d886ac7edb7a43d13ec6168ec930ff9b6efd08 | [
"MIT"
] | null | null | null | twitter_scraper/infrastructure/tests/test_utils.py | burakdonmez/twitter_scraper | 62d886ac7edb7a43d13ec6168ec930ff9b6efd08 | [
"MIT"
] | null | null | null | from django.test import TestCase
from twitter_scraper.infrastructure.utils import enforce_sequence, get_list
class EnforceSequenceTestCase(TestCase):
def test_given_not_sequence(self):
value = 1
expected_value = (value,)
result = enforce_sequence(value)
self.assertEqual(result, ex... | 30.409836 | 75 | 0.58814 | 212 | 1,855 | 4.933962 | 0.174528 | 0.198853 | 0.200765 | 0.221797 | 0.795411 | 0.735182 | 0.680688 | 0.640535 | 0.583174 | 0.583174 | 0 | 0.011005 | 0.265229 | 1,855 | 60 | 76 | 30.916667 | 0.75642 | 0 | 0 | 0.543478 | 0 | 0 | 0.018868 | 0 | 0 | 0 | 0 | 0 | 0.217391 | 1 | 0.086957 | false | 0 | 0.043478 | 0 | 0.173913 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
e92acdb5fa40f0dae082127092baecd1cf7eef71 | 2,255 | py | Python | results_plots/fall2021/resnet18_metaoverfitting.py | brando90/Does-MAML-Only-Work-via-Feature-Re-use-A-Data-Set-Centric-Perspective | 45c4fabf35d6d8d19e49092e84e8ac9fa55aee8d | [
"MIT"
] | null | null | null | results_plots/fall2021/resnet18_metaoverfitting.py | brando90/Does-MAML-Only-Work-via-Feature-Re-use-A-Data-Set-Centric-Perspective | 45c4fabf35d6d8d19e49092e84e8ac9fa55aee8d | [
"MIT"
] | null | null | null | results_plots/fall2021/resnet18_metaoverfitting.py | brando90/Does-MAML-Only-Work-via-Feature-Re-use-A-Data-Set-Centric-Perspective | 45c4fabf35d6d8d19e49092e84e8ac9fa55aee8d | [
"MIT"
] | null | null | null | #%%
# resnet18 meta-overfitting
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from pylab import MaxNLocator
import uutils
from pathlib import Path
print('running')
save_plot = True
# save_plot = False
# d: list[tuple[float, int, float]] = uutils.load_json_list(path='~/Desktop/', filenam... | 30.890411 | 129 | 0.697118 | 320 | 2,255 | 4.7125 | 0.378125 | 0.079576 | 0.050398 | 0.055703 | 0.377984 | 0.360743 | 0.27321 | 0.27321 | 0.153846 | 0.153846 | 0 | 0.018274 | 0.126386 | 2,255 | 73 | 130 | 30.890411 | 0.747208 | 0.859867 | 0 | 0 | 0 | 0 | 0.041667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 0.2 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
3a5dc1fafa514ef7e46d384d5bd8fb166d6f583c | 310 | py | Python | validators.py | TerryLun/Rekognize | f557541c7f0f73e414d5caf313c3c6e710749b6b | [
"MIT"
] | null | null | null | validators.py | TerryLun/Rekognize | f557541c7f0f73e414d5caf313c3c6e710749b6b | [
"MIT"
] | null | null | null | validators.py | TerryLun/Rekognize | f557541c7f0f73e414d5caf313c3c6e710749b6b | [
"MIT"
] | null | null | null | def validate_extension(filename: str) -> bool:
"""
Validate file extension
:param filename: file name as string
:return: True if extension is allowed
"""
allowed_extensions = {'png', 'jpg', 'jpeg'}
return '.' in filename and filename.rsplit('.', 1)[1].lower() in allowed_extensions | 34.444444 | 87 | 0.658065 | 38 | 310 | 5.289474 | 0.657895 | 0.169154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00813 | 0.206452 | 310 | 9 | 87 | 34.444444 | 0.808943 | 0.319355 | 0 | 0 | 0 | 0 | 0.06383 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
3a61df471c8f4a42b72750b057f06b7bf3c6027d | 184 | py | Python | answer/a10_6_dict_sosa.py | breeze-shared-inc/python_training_01 | 7e918b37adbce062ae279f060bc25cfacda2fb85 | [
"MIT"
] | null | null | null | answer/a10_6_dict_sosa.py | breeze-shared-inc/python_training_01 | 7e918b37adbce062ae279f060bc25cfacda2fb85 | [
"MIT"
] | 1 | 2020-05-11T04:59:04.000Z | 2020-05-11T05:29:08.000Z | answer/a10_6_dict_sosa.py | bzgwhite/python_training_01 | 7e918b37adbce062ae279f060bc25cfacda2fb85 | [
"MIT"
] | null | null | null | my_dict = {
"key":"value",
"key2":"value2"
}
# dictに要素[key3:value3]を追加してみよう!
my_dict["key3"] = "value3"
print(my_dict)
# 識別子key2を削除してみよう!
my_dict.pop("key2")
print(my_dict)
| 13.142857 | 31 | 0.652174 | 25 | 184 | 4.6 | 0.52 | 0.26087 | 0.191304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050955 | 0.146739 | 184 | 13 | 32 | 14.153846 | 0.681529 | 0.25 | 0 | 0.25 | 0 | 0 | 0.237037 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3a791f814223a96b0799ee16ec1092384f8e2900 | 187 | py | Python | proj/ui.py | larsyencken/proj | 13c26c4a885d2f685ce92316b54e0526f347a57b | [
"BSD-3-Clause"
] | 1 | 2016-01-10T06:19:24.000Z | 2016-01-10T06:19:24.000Z | proj/ui.py | larsyencken/proj | 13c26c4a885d2f685ce92316b54e0526f347a57b | [
"BSD-3-Clause"
] | null | null | null | proj/ui.py | larsyencken/proj | 13c26c4a885d2f685ce92316b54e0526f347a57b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# ui.py
# proj
#
import sys
from typing import NoReturn
import click
def bail(message: str) -> NoReturn:
click.echo(message, err=True)
sys.exit(1)
| 11.6875 | 35 | 0.631016 | 27 | 187 | 4.37037 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013699 | 0.219251 | 187 | 15 | 36 | 12.466667 | 0.794521 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.5 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
3a8ed8f96796575bc8698a57bea7cf3a181f332a | 51 | py | Python | sauri/messaging/blocking/protocols.py | healem/sauri | 3233106c830fdb2901d647a7019d61b290f9c727 | [
"MIT"
] | null | null | null | sauri/messaging/blocking/protocols.py | healem/sauri | 3233106c830fdb2901d647a7019d61b290f9c727 | [
"MIT"
] | null | null | null | sauri/messaging/blocking/protocols.py | healem/sauri | 3233106c830fdb2901d647a7019d61b290f9c727 | [
"MIT"
] | null | null | null | class Protocol:
AMQP = 'amqp'
MQTT = 'mqtt' | 17 | 17 | 0.568627 | 6 | 51 | 4.833333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.294118 | 51 | 3 | 18 | 17 | 0.805556 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
3aecfd38f84b4ea88ac37f05f791a11cc10795a4 | 243 | py | Python | pynotify/apps.py | jsilhan/django-pynotify | 2c32f50d8fd35a8c2de2225125f1e19212ae0bde | [
"MIT"
] | 4 | 2019-03-21T01:03:55.000Z | 2019-10-01T13:11:04.000Z | pynotify/apps.py | jsilhan/django-pynotify | 2c32f50d8fd35a8c2de2225125f1e19212ae0bde | [
"MIT"
] | 29 | 2019-03-20T21:32:55.000Z | 2022-03-10T15:55:37.000Z | pynotify/apps.py | jsilhan/django-pynotify | 2c32f50d8fd35a8c2de2225125f1e19212ae0bde | [
"MIT"
] | 3 | 2019-03-27T20:13:00.000Z | 2021-11-10T18:28:00.000Z | from django.apps import AppConfig
from .helpers import autoload
class PyNotifyConfig(AppConfig):
name = 'pynotify'
verbose_name = 'PyNotify'
def ready(self):
from .notify import NotifyHandler # noqa
autoload()
| 18.692308 | 49 | 0.687243 | 26 | 243 | 6.384615 | 0.692308 | 0.144578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.238683 | 243 | 12 | 50 | 20.25 | 0.897297 | 0.016461 | 0 | 0 | 0 | 0 | 0.067511 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.875 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
3af1a3f89fac0cd378a75b377158e7ac7ac98d93 | 257 | py | Python | loan_calculator/grossup/service_fee.py | yanomateus/loan-calculator | b6b8eb8102f40c4ec151ba2331e2122f6162f093 | [
"MIT"
] | 17 | 2020-02-15T20:14:49.000Z | 2022-03-16T01:00:00.000Z | loan_calculator/grossup/service_fee.py | yanomateus/loan-calculator | b6b8eb8102f40c4ec151ba2331e2122f6162f093 | [
"MIT"
] | null | null | null | loan_calculator/grossup/service_fee.py | yanomateus/loan-calculator | b6b8eb8102f40c4ec151ba2331e2122f6162f093 | [
"MIT"
] | 2 | 2021-01-03T19:14:29.000Z | 2021-06-01T06:24:25.000Z | def linear_service_fee(principal, fee=0.0):
"""Calculate service fee proportional to the principal.
If :math:`S` is the principal and :math:`g` is the fee aliquot, then the
fee is given by :math:`gS`.
"""
return float(principal * fee)
| 28.555556 | 76 | 0.669261 | 40 | 257 | 4.25 | 0.575 | 0.117647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009901 | 0.214008 | 257 | 8 | 77 | 32.125 | 0.831683 | 0.599222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
c90cbc97b74524f93d29e16032b9be65f6b77d90 | 208 | py | Python | Hackerrank/Regex/find-a-word.py | PROxZIMA/Competitive-Coding | ba6b365ea130b6fcaa15c5537b530ed363bab793 | [
"MIT"
] | 1 | 2021-01-10T13:29:21.000Z | 2021-01-10T13:29:21.000Z | Hackerrank/Regex/find-a-word.py | PROxZIMA/Competitive-Coding | ba6b365ea130b6fcaa15c5537b530ed363bab793 | [
"MIT"
] | null | null | null | Hackerrank/Regex/find-a-word.py | PROxZIMA/Competitive-Coding | ba6b365ea130b6fcaa15c5537b530ed363bab793 | [
"MIT"
] | null | null | null | import re
s = ''
for _ in range(int(input())):
s += input() + ' '
for _ in range(int(input())):
f = input()
regex = r'(?:(?<=[\W])|^)('+f+r')(?:(?=[\W])|$)'
print(len(re.findall(regex, s)))
| 18.909091 | 52 | 0.442308 | 29 | 208 | 3.103448 | 0.517241 | 0.111111 | 0.222222 | 0.288889 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.216346 | 208 | 10 | 53 | 20.8 | 0.552147 | 0 | 0 | 0.25 | 0 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0.125 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c93e11bc2f1e6d984c586831707260a36aaf340f | 157 | py | Python | backend/apps/lymessages/apps.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | 1 | 2022-03-01T07:20:36.000Z | 2022-03-01T07:20:36.000Z | backend/apps/lymessages/apps.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | backend/apps/lymessages/apps.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class LymessagesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.lymessages'
| 22.428571 | 56 | 0.770701 | 18 | 157 | 6.611111 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140127 | 157 | 6 | 57 | 26.166667 | 0.881481 | 0 | 0 | 0 | 0 | 0 | 0.280255 | 0.184713 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
a334ce64d5beb3d35c91fc36084bfbe81d57a6d3 | 1,450 | py | Python | MoinMoin/widget/dialog.py | RealTimeWeb/wikisite | 66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5 | [
"Apache-2.0"
] | null | null | null | MoinMoin/widget/dialog.py | RealTimeWeb/wikisite | 66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5 | [
"Apache-2.0"
] | 3 | 2020-06-26T21:21:32.000Z | 2020-06-26T21:21:36.000Z | wiki/MoinMoin/widget/dialog.py | simtk/src | 52086415ef60527e6556698c6e216e4217961d53 | [
"BSD-2-Clause",
"MIT"
] | 2 | 2017-01-25T20:06:44.000Z | 2021-03-25T18:39:55.000Z | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - dialog
@copyright: 2004 Nir Soffer <nirs@freeshell.org>
@license: GNU GPL, see COPYING for details.
"""
from MoinMoin.widget import base
class Dialog(base.Widget):
""" Dialog for user interaction.
Use a dialog when you want to present and get data to ... | 25.438596 | 76 | 0.628966 | 190 | 1,450 | 4.715789 | 0.431579 | 0.044643 | 0.066964 | 0.075893 | 0.497768 | 0.453125 | 0.453125 | 0.453125 | 0.453125 | 0.453125 | 0 | 0.008341 | 0.255862 | 1,450 | 56 | 77 | 25.892857 | 0.822057 | 0.505517 | 0 | 0.615385 | 0 | 0 | 0.126712 | 0.089041 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0 | 0.076923 | 0.153846 | 0.692308 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a33d13172811028b05c92b95f7168b5d9ef6bc9f | 109 | py | Python | SnackDown Round 1A/RRR.py | Jks08/CodeChef | a8aec8a563c441176a36b8581031764e99f09833 | [
"MIT"
] | 1 | 2021-09-17T13:10:04.000Z | 2021-09-17T13:10:04.000Z | SnackDown Round 1A/RRR.py | Jks08/CodeChef | a8aec8a563c441176a36b8581031764e99f09833 | [
"MIT"
] | null | null | null | SnackDown Round 1A/RRR.py | Jks08/CodeChef | a8aec8a563c441176a36b8581031764e99f09833 | [
"MIT"
] | null | null | null | t = int(input())
for i in range(t):
b,c=map(int,input().split())
ans = (2*b-c-1)//2
print(2*ans)
| 18.166667 | 32 | 0.513761 | 23 | 109 | 2.434783 | 0.652174 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.047059 | 0.220183 | 109 | 5 | 33 | 21.8 | 0.611765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a362f1a87d2f866c16ee2f38faa543bff18b6fad | 267 | py | Python | src/test.py | Extomvi/CovidSDG | 29e773001d9ff69a598ebfc6c6860022fca250cf | [
"MIT"
] | 1 | 2020-04-08T01:34:11.000Z | 2020-04-08T01:34:11.000Z | src/test.py | Extomvi/CovidSDG | 29e773001d9ff69a598ebfc6c6860022fca250cf | [
"MIT"
] | null | null | null | src/test.py | Extomvi/CovidSDG | 29e773001d9ff69a598ebfc6c6860022fca250cf | [
"MIT"
] | 1 | 2020-04-13T17:15:17.000Z | 2020-04-13T17:15:17.000Z | import unittest
from unittest.mock import patch
import math
from unittest import mock
from unittest import TestCase
class EstimatorTest(unittest.TestCase):
def addition(self):
self.assertEqual((5+5), 10)
if __name__ == '__main__':
unittest.main() | 19.071429 | 39 | 0.737828 | 34 | 267 | 5.558824 | 0.529412 | 0.190476 | 0.190476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018182 | 0.17603 | 267 | 14 | 40 | 19.071429 | 0.840909 | 0 | 0 | 0 | 0 | 0 | 0.029851 | 0 | 0 | 0 | 0 | 0 | 0.1 | 1 | 0.1 | false | 0 | 0.5 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
a387e6d1e22d1a8734f0ead3052d1d7020c9879a | 614 | py | Python | src/part_1_coding/lessons/class_agregation.py | AndreiHustiuc/IT_Factory_Course | c6f3e4a9282a1c19c0f52c79f0c81f026814a02a | [
"MIT"
] | null | null | null | src/part_1_coding/lessons/class_agregation.py | AndreiHustiuc/IT_Factory_Course | c6f3e4a9282a1c19c0f52c79f0c81f026814a02a | [
"MIT"
] | null | null | null | src/part_1_coding/lessons/class_agregation.py | AndreiHustiuc/IT_Factory_Course | c6f3e4a9282a1c19c0f52c79f0c81f026814a02a | [
"MIT"
] | 1 | 2022-03-16T10:39:03.000Z | 2022-03-16T10:39:03.000Z | class Salary:
def __init__(self, pay):
self._pay = pay
def get_total(self):
return (self._pay * 12) // 4.9545
class SalarySenior:
def __init__(self, pay):
self._pay = pay
def get_total(self):
return (self._pay * 24) // 4.9545
class Employee:
def __init__(self, p... | 20.466667 | 72 | 0.630293 | 83 | 614 | 4.325301 | 0.313253 | 0.175487 | 0.091922 | 0.116992 | 0.289694 | 0.289694 | 0.289694 | 0.289694 | 0.289694 | 0.289694 | 0 | 0.064935 | 0.247557 | 614 | 29 | 73 | 21.172414 | 0.712121 | 0 | 0 | 0.368421 | 0 | 0 | 0.087948 | 0.035831 | 0 | 0 | 0 | 0 | 0 | 1 | 0.315789 | false | 0 | 0 | 0.157895 | 0.631579 | 0.052632 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a39ff9dc220d497321630b2a44cf1ef1ae80ce84 | 5,025 | py | Python | ModelsFromText/text-to-triples-services/app_text_to_triples.py | GEGlobalResearch/DARPA-ASKE-TA1 | d2b06f4733be524bcfed1b5a288006e4c761118c | [
"BSD-3-Clause"
] | 6 | 2019-05-09T18:58:31.000Z | 2021-05-06T15:02:38.000Z | ModelsFromText/text-to-triples-services/app_text_to_triples.py | GEGlobalResearch/DARPA-ASKE-TA1 | d2b06f4733be524bcfed1b5a288006e4c761118c | [
"BSD-3-Clause"
] | 64 | 2019-09-09T13:48:09.000Z | 2022-03-02T14:23:17.000Z | ModelsFromText/text-to-triples-services/app_text_to_triples.py | GEGlobalResearch/DARPA-ASKE-TA1 | d2b06f4733be524bcfed1b5a288006e4c761118c | [
"BSD-3-Clause"
] | 4 | 2019-07-15T13:11:28.000Z | 2021-05-06T15:03:07.000Z | '''
/**********************************************************************
* Note: This license has also been called the "New BSD License" or
* "Modified BSD License". See also the 2-clause BSD License.
*
* Copyright © 2018-2019 - General Electric Company, All Rights Reserved
*
* Project: ANSWER, developed with ... | 35.892857 | 105 | 0.729353 | 690 | 5,025 | 5.131884 | 0.362319 | 0.0305 | 0.05874 | 0.036148 | 0.229879 | 0.143462 | 0.118893 | 0.094606 | 0.074838 | 0.074838 | 0 | 0.014201 | 0.159204 | 5,025 | 139 | 106 | 36.151079 | 0.823669 | 0.525572 | 0 | 0.056604 | 0 | 0 | 0.103128 | 0 | 0 | 0 | 0 | 0.007194 | 0 | 1 | 0.207547 | false | 0 | 0.169811 | 0.132075 | 0.584906 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
6e7ba1174b5e55b041392d08b91c01037d8502e0 | 10,692 | py | Python | Utils/py/ActionSelection/experimental/QLearning/gamefield.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/experimental/QLearning/gamefield.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/experimental/QLearning/gamefield.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from tools import field_info as field
from Tkinter import *
import threading
import time
master = Tk()
# create functions to draw field + decisions made / q values ranging from green to red
# draw field + update field
square_size = 200 # relative to field
field_x = field.x_field_length + 200 # add a few pixels, fo... | 36.868966 | 202 | 0.62832 | 1,491 | 10,692 | 4.277666 | 0.142857 | 0.205864 | 0.269207 | 0.087488 | 0.577924 | 0.546723 | 0.517717 | 0.515365 | 0.505958 | 0.492004 | 0 | 0.03601 | 0.254583 | 10,692 | 289 | 203 | 36.99654 | 0.764241 | 0.089039 | 0 | 0.282895 | 0 | 0 | 0.02883 | 0 | 0 | 0 | 0 | 0.00692 | 0 | 0 | null | null | 0.006579 | 0.026316 | null | null | 0.039474 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
6eb28e7c085a835938ad8ac2e118e8a19af277d4 | 19 | py | Python | diamond_agent/tests/resources/__init__.py | junaid-ali/cloudify-diamond-plugin | 1bdca486271231c5e437dc0ac1c70b6c100829e4 | [
"Apache-2.0"
] | 58 | 2015-01-11T09:05:15.000Z | 2022-03-17T23:44:07.000Z | ckanext-ytp-request/__init__.py | datopian/hdx-ckan | 2d8871c035a18e48b53859fec522b997b500afe9 | [
"Apache-2.0"
] | 1,467 | 2015-01-01T16:47:44.000Z | 2022-02-28T16:51:20.000Z | ckanext-ytp-request/__init__.py | datopian/hdx-ckan | 2d8871c035a18e48b53859fec522b997b500afe9 | [
"Apache-2.0"
] | 17 | 2015-05-06T14:04:21.000Z | 2021-11-11T19:58:16.000Z | __author__ = 'dan'
| 9.5 | 18 | 0.684211 | 2 | 19 | 4.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 19 | 1 | 19 | 19 | 0.5625 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
6ef0495d6d445aec4e0ec67baa24a3cd3ef804f2 | 596 | py | Python | offer/urls.py | noriHanda/study_matching | 55e9525c9502c45c799f8f3a4c9c2b54406ed9e1 | [
"MIT"
] | null | null | null | offer/urls.py | noriHanda/study_matching | 55e9525c9502c45c799f8f3a4c9c2b54406ed9e1 | [
"MIT"
] | null | null | null | offer/urls.py | noriHanda/study_matching | 55e9525c9502c45c799f8f3a4c9c2b54406ed9e1 | [
"MIT"
] | null | null | null | from rest_framework import routers
from .views import OfferViewSet
from . import views
from django.urls import path
router = routers.DefaultRouter()
router.register(r'', OfferViewSet)
app_name = 'offer'
urlpatterns = [
path('fetch_user_offer_set_list', views.fetch_user_offer_set_list, name='fetch_user_offer_set_... | 37.25 | 138 | 0.825503 | 88 | 596 | 5.090909 | 0.284091 | 0.180804 | 0.1875 | 0.227679 | 0.587054 | 0.399554 | 0.200893 | 0 | 0 | 0 | 0 | 0 | 0.087248 | 596 | 15 | 139 | 39.733333 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0.32047 | 0.312081 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
42cd34b2ad613aa98d79191014bb7e327cb6c86d | 963 | py | Python | SAMKNN/BaseClassifier.py | johaq/SAMkNN | bbb8124f334946a794b48daa45ddada2b337dbb8 | [
"MIT"
] | 3 | 2018-11-20T13:52:17.000Z | 2019-10-08T13:49:40.000Z | SAMKNN/BaseClassifier.py | johaq/SAMkNN | bbb8124f334946a794b48daa45ddada2b337dbb8 | [
"MIT"
] | null | null | null | SAMKNN/BaseClassifier.py | johaq/SAMkNN | bbb8124f334946a794b48daa45ddada2b337dbb8 | [
"MIT"
] | 7 | 2017-03-16T19:07:32.000Z | 2021-03-25T01:19:43.000Z | __author__ = 'vlosing'
class BaseClassifier(object):
"""
Base class for classifier.
"""
def __init__(self):
pass
def fit(self, samples, labels, epochs):
raise NotImplementedError()
def partial_fit(self, samples, labels, classes):
raise NotImplementedError()
def alt... | 26.75 | 92 | 0.681205 | 84 | 963 | 7.690476 | 0.369048 | 0.297214 | 0.334365 | 0.143963 | 0.275542 | 0.157895 | 0.157895 | 0 | 0 | 0 | 0 | 0 | 0.228453 | 963 | 35 | 93 | 27.514286 | 0.869448 | 0.026999 | 0 | 0.347826 | 0 | 0 | 0.0076 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.434783 | false | 0.043478 | 0 | 0 | 0.521739 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
6e13a32763d0fefe4461be7b367f24b7d381e9d8 | 84 | py | Python | exts.py | Fireblossom/project_save_roommate | 3fe9ec368ec4a9205d6c368ec8be43e9adc3b26b | [
"MIT"
] | null | null | null | exts.py | Fireblossom/project_save_roommate | 3fe9ec368ec4a9205d6c368ec8be43e9adc3b26b | [
"MIT"
] | null | null | null | exts.py | Fireblossom/project_save_roommate | 3fe9ec368ec4a9205d6c368ec8be43e9adc3b26b | [
"MIT"
] | null | null | null | #encoding: utf-8
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
| 12 | 40 | 0.714286 | 10 | 84 | 5.9 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015152 | 0.214286 | 84 | 6 | 41 | 14 | 0.878788 | 0.178571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
6e165f46d6bd3b285932264fb0aeef82c51c084b | 594 | py | Python | scte35/exceptions.py | spsandiford/scte35-python | c325b170b87164da9cd08802d4861149596cd231 | [
"MIT"
] | 2 | 2020-01-16T09:55:52.000Z | 2020-05-14T09:10:47.000Z | scte35/exceptions.py | spsandiford/scte35-python | c325b170b87164da9cd08802d4861149596cd231 | [
"MIT"
] | null | null | null | scte35/exceptions.py | spsandiford/scte35-python | c325b170b87164da9cd08802d4861149596cd231 | [
"MIT"
] | null | null | null | class InvalidTableIdException(Exception):
"""
Indicate that the table id was not 0xFC as required
"""
pass
class ReservedBitsException(Exception):
"""
Indicate that bits reserved by the specification were not set to 1 as required
"""
pass
class SectionParsingErrorException(Exception)... | 16.054054 | 82 | 0.734007 | 56 | 594 | 7.785714 | 0.517857 | 0.144495 | 0.206422 | 0.087156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004237 | 0.205387 | 594 | 36 | 83 | 16.5 | 0.919492 | 0.218855 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
6e26b9e2ea9ae8150c9b06e6fef6f308abfd2722 | 1,093 | py | Python | geology.py | johwiebe/drill-scheduling | c070adde1b9e8eacbe333a570cf1fc5e480f2f32 | [
"MIT"
] | 1 | 2021-09-16T19:36:33.000Z | 2021-09-16T19:36:33.000Z | geology.py | johwiebe/drill-scheduling | c070adde1b9e8eacbe333a570cf1fc5e480f2f32 | [
"MIT"
] | null | null | null | geology.py | johwiebe/drill-scheduling | c070adde1b9e8eacbe333a570cf1fc5e480f2f32 | [
"MIT"
] | null | null | null | #!/usr/bin/env
"""geology.py: tools for modeling geology."""
import bisect
class Rock():
""" Stores rock parameters for Detournay bit-rock interaction model. """
def __init__(self, Sstar, wstar, xieps, mugam, betaw, xi):
self.Sstar = Sstar
self.wstar = wstar
self.xieps = xieps
... | 26.658537 | 76 | 0.590119 | 147 | 1,093 | 4.29932 | 0.401361 | 0.118671 | 0.03481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005089 | 0.280878 | 1,093 | 40 | 77 | 27.325 | 0.798982 | 0.186642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.269231 | false | 0 | 0.038462 | 0.115385 | 0.576923 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
6e2cfb49de30b8e3ffc886cb710bf361ce04ad3a | 919 | py | Python | Demo/liaoxf/rational.py | felix9064/PythonProject | bbe4607ba8bf6a188ab01cf16f8b39b5938079e4 | [
"MIT"
] | null | null | null | Demo/liaoxf/rational.py | felix9064/PythonProject | bbe4607ba8bf6a188ab01cf16f8b39b5938079e4 | [
"MIT"
] | null | null | null | Demo/liaoxf/rational.py | felix9064/PythonProject | bbe4607ba8bf6a188ab01cf16f8b39b5938079e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 有理数的四则运算
class Rational:
def __init__(self, p, q):
self.p = p
self.q = q
self.gys = Rational.gcb(p, q)
@classmethod
def gcb(cls, a, b):
while b:
a, b = b, a % b
return a
def __str__(self):
... | 19.145833 | 66 | 0.503808 | 156 | 919 | 2.814103 | 0.24359 | 0.102506 | 0.082005 | 0.173121 | 0.512528 | 0.512528 | 0.512528 | 0.430524 | 0.353075 | 0.271071 | 0 | 0.032415 | 0.328618 | 919 | 47 | 67 | 19.553191 | 0.679092 | 0.056583 | 0 | 0.133333 | 0 | 0 | 0.005787 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.233333 | false | 0 | 0 | 0.133333 | 0.466667 | 0.166667 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
6e3d9414538603f035db7ed9b10628d96f3a3b3e | 2,673 | py | Python | dpymenus/page.py | Hajime8673/dpymenus | 8a709c7e119569f071dcfa0c53dd2afaca0c36cd | [
"MIT"
] | null | null | null | dpymenus/page.py | Hajime8673/dpymenus | 8a709c7e119569f071dcfa0c53dd2afaca0c36cd | [
"MIT"
] | null | null | null | dpymenus/page.py | Hajime8673/dpymenus | 8a709c7e119569f071dcfa0c53dd2afaca0c36cd | [
"MIT"
] | 1 | 2021-03-26T17:37:19.000Z | 2021-03-26T17:37:19.000Z | from typing import Callable, List
from discord import Embed
class Page(Embed):
"""Represents a single page inside a menu."""
__slots__ = (*Embed.__slots__, '_index', '_buttons_list', '_on_next_event', '_on_fail_event', '_on_cancel_event', '_on_timeout_event')
def __init__(self, **kwargs):
super... | 32.204819 | 138 | 0.643472 | 358 | 2,673 | 4.547486 | 0.226257 | 0.02457 | 0.062654 | 0.067568 | 0.45086 | 0.436732 | 0.436732 | 0.265356 | 0.265356 | 0.265356 | 0 | 0.000493 | 0.240928 | 2,673 | 82 | 139 | 32.597561 | 0.801873 | 0.253648 | 0 | 0.22 | 0 | 0.02 | 0.163349 | 0.011741 | 0 | 0 | 0 | 0 | 0 | 1 | 0.32 | false | 0 | 0.04 | 0.16 | 0.68 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
6e482867e4b79b424a1f417b53f7c979e260c9b5 | 203 | py | Python | rapinator/fake_app.py | dremok/rapinator | 34f25df31fa3b6e3cc878996fd21e37a56f7b2fe | [
"MIT"
] | null | null | null | rapinator/fake_app.py | dremok/rapinator | 34f25df31fa3b6e3cc878996fd21e37a56f7b2fe | [
"MIT"
] | null | null | null | rapinator/fake_app.py | dremok/rapinator | 34f25df31fa3b6e3cc878996fd21e37a56f7b2fe | [
"MIT"
] | null | null | null | import falcon
from rapinator.model.static_model import StaticModel
from rapinator.resources.song import SongResource
api = falcon.API()
song = SongResource(StaticModel())
api.add_route('/song', song)
| 20.3 | 52 | 0.79803 | 26 | 203 | 6.153846 | 0.5 | 0.1625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 203 | 9 | 53 | 22.555556 | 0.879121 | 0 | 0 | 0 | 0 | 0 | 0.024631 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
28215c256e31af714435a6df994834ea10042494 | 15,652 | py | Python | methods.py | zsmn/numerical_methods | bbfc62deafc2cfc4cf3f1c401494abccf0d1c240 | [
"MIT"
] | 2 | 2019-11-27T22:43:39.000Z | 2020-10-18T00:53:43.000Z | methods.py | zsmn/numerical_methods | bbfc62deafc2cfc4cf3f1c401494abccf0d1c240 | [
"MIT"
] | null | null | null | methods.py | zsmn/numerical_methods | bbfc62deafc2cfc4cf3f1c401494abccf0d1c240 | [
"MIT"
] | 1 | 2019-12-13T20:56:39.000Z | 2019-12-13T20:56:39.000Z | import math
import sympy as sym
import matplotlib.pyplot as graphic
from sympy.parsing.sympy_parser import parse_expr
pts_y = [] # resultados
pts_t = [] # passos
y, t = sym.symbols('y t')
consts_bashforth = [
[1.0],
[3.0/2.0,-1.0/2.0],
[23.0/12.0,-4.0/3.0,5.0/12.0],
[55.0/24.0,-59.0/24.0,37.0/24.0,-3.0/8.0],
... | 44.339943 | 192 | 0.550856 | 2,585 | 15,652 | 3.2294 | 0.080077 | 0.089123 | 0.144825 | 0.046957 | 0.791806 | 0.754193 | 0.716339 | 0.652971 | 0.635721 | 0.631049 | 0 | 0.094636 | 0.251981 | 15,652 | 353 | 193 | 44.339943 | 0.618381 | 0.004728 | 0 | 0.496454 | 0 | 0 | 0.077822 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035461 | false | 0.003546 | 0.014184 | 0 | 0.08156 | 0.152482 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
282911b2877cf0fe4ff15ea12f483e14e03b127e | 188 | py | Python | python_interview_code/code/3_python_basics/exc.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | null | null | null | python_interview_code/code/3_python_basics/exc.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | null | null | null | python_interview_code/code/3_python_basics/exc.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | 1 | 2019-11-05T01:10:15.000Z | 2019-11-05T01:10:15.000Z | #!usr/bin/python
# -*- coding:utf8 -*-
class MyException(Exception):
pass
try:
raise MyException('my exception')
# exception MyException as e:
except Exception as e:
print(e) | 17.090909 | 37 | 0.680851 | 24 | 188 | 5.333333 | 0.666667 | 0.046875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006536 | 0.18617 | 188 | 11 | 38 | 17.090909 | 0.830065 | 0.335106 | 0 | 0 | 0 | 0 | 0.097561 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.166667 | 0 | 0 | 0.166667 | 0.166667 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
284251c42dd0bc47544403486c8ea455c0596b72 | 733 | py | Python | dadata/standartization.py | f213/dadata-client | dbd619d752a96bc0d48be51e07b53e8f9a795079 | [
"MIT"
] | 8 | 2018-06-11T13:35:30.000Z | 2021-11-12T12:17:52.000Z | dadata/standartization.py | f213/dadata-client | dbd619d752a96bc0d48be51e07b53e8f9a795079 | [
"MIT"
] | 74 | 2018-06-12T17:29:15.000Z | 2020-05-18T02:13:36.000Z | dadata/standartization.py | f213/dadata-client | dbd619d752a96bc0d48be51e07b53e8f9a795079 | [
"MIT"
] | 2 | 2018-06-12T16:05:37.000Z | 2018-08-05T21:39:18.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from dadata.base_client import DadataBasePaidClient
class DadataAddressStandartizationClient(DadataBasePaidClient):
"""DaData address standartization client."""
API_URL = 'https://dadata.ru/api/v2/clean/address'
def request(self, source):
... | 31.869565 | 80 | 0.694407 | 71 | 733 | 7.014085 | 0.633803 | 0.044177 | 0.180723 | 0.196787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005199 | 0.212824 | 733 | 22 | 81 | 33.318182 | 0.857886 | 0.181446 | 0 | 0 | 0 | 0 | 0.065404 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.166667 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
28517b5f9e53ef07cad7013125d08600235652df | 21 | py | Python | chroniclr/version.py | NBurley93/Chroniclr | 4ad97f0fb3ebeee0f805347bba735f33671928c4 | [
"MIT"
] | null | null | null | chroniclr/version.py | NBurley93/Chroniclr | 4ad97f0fb3ebeee0f805347bba735f33671928c4 | [
"MIT"
] | 5 | 2018-08-06T13:50:22.000Z | 2018-08-06T14:20:19.000Z | chroniclr/version.py | NBurley93/Chroniclr | 4ad97f0fb3ebeee0f805347bba735f33671928c4 | [
"MIT"
] | null | null | null | APP_VERSION = '1.0.0' | 21 | 21 | 0.666667 | 5 | 21 | 2.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 0.095238 | 21 | 1 | 21 | 21 | 0.526316 | 0 | 0 | 0 | 0 | 0 | 0.227273 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2857882a1eb3f1009e36dd9e7504c9a5f33901e5 | 21 | py | Python | examples/utils/project_settings.py | pichatelli/simple-settings | b0cb539a13581107effc674c823703e990e3463c | [
"MIT"
] | 213 | 2015-05-13T21:29:35.000Z | 2022-02-24T12:56:00.000Z | examples/utils/project_settings.py | pichatelli/simple-settings | b0cb539a13581107effc674c823703e990e3463c | [
"MIT"
] | 248 | 2015-05-13T23:32:16.000Z | 2022-02-02T21:41:30.000Z | examples/utils/project_settings.py | pichatelli/simple-settings | b0cb539a13581107effc674c823703e990e3463c | [
"MIT"
] | 39 | 2015-05-18T21:29:42.000Z | 2022-03-26T16:27:46.000Z | SOME_SETTING = 'bar'
| 10.5 | 20 | 0.714286 | 3 | 21 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 21 | 1 | 21 | 21 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2863a347fd23a8bee21de91a29caf31aeb2ec17c | 1,271 | py | Python | doe-traits.py | pettitpeon/doe-nft-traits | d05aee512364dfa0301ee859fecf524e7f1d2094 | [
"MIT"
] | null | null | null | doe-traits.py | pettitpeon/doe-nft-traits | d05aee512364dfa0301ee859fecf524e7f1d2094 | [
"MIT"
] | null | null | null | doe-traits.py | pettitpeon/doe-nft-traits | d05aee512364dfa0301ee859fecf524e7f1d2094 | [
"MIT"
] | null | null | null | import json
with open('json/ipfs_doe_nft_metadata.json') as metadata_f:
data = json.loads(metadata_f.read())
traits = {}
# Generate traits list
for asset in data['assets']:
for trait in asset['attributes']:
if trait['trait_type'] not in traits:
traits[trait['trait_t... | 43.827586 | 129 | 0.585366 | 159 | 1,271 | 4.509434 | 0.27044 | 0.199442 | 0.23431 | 0.306834 | 0.495119 | 0.411437 | 0.32636 | 0.103208 | 0 | 0 | 0 | 0.007239 | 0.239182 | 1,271 | 28 | 130 | 45.392857 | 0.73423 | 0.039339 | 0 | 0.095238 | 1 | 0 | 0.265189 | 0.045156 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.047619 | 0 | 0.047619 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
28695ad7539c2ea948492bc9b02c354f9686a37c | 263 | py | Python | src/tox_ansible/_yaml.py | strider/tox-ansible | e5963fac18b788d450c0b827538b54354e261fce | [
"MIT"
] | 7 | 2020-10-10T13:58:39.000Z | 2021-04-17T14:57:59.000Z | src/tox_ansible/_yaml.py | strider/tox-ansible | e5963fac18b788d450c0b827538b54354e261fce | [
"MIT"
] | 52 | 2020-08-19T16:44:08.000Z | 2021-08-31T13:34:02.000Z | src/tox_ansible/_yaml.py | strider/tox-ansible | e5963fac18b788d450c0b827538b54354e261fce | [
"MIT"
] | 5 | 2020-08-19T19:02:03.000Z | 2021-04-14T04:17:44.000Z | from yaml import load
try:
from yaml import CLoader as Loader
except ImportError: # pragma: no cover
from yaml import Loader # type: ignore
def load_yaml(filename: str):
with open(filename, "r") as c:
return load(c.read(), Loader=Loader)
| 21.916667 | 44 | 0.684411 | 39 | 263 | 4.589744 | 0.615385 | 0.134078 | 0.234637 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.228137 | 263 | 11 | 45 | 23.909091 | 0.881773 | 0.110266 | 0 | 0 | 0 | 0 | 0.004329 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.5 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
28758efbdaedcc7a280aaf04878ed300240285a4 | 1,014 | py | Python | src/modelo/gasto.py | CamiloPMISO/test-ci | 4ee3715cb10456d41ebe4ec53128f7c16369ef16 | [
"MIT"
] | null | null | null | src/modelo/gasto.py | CamiloPMISO/test-ci | 4ee3715cb10456d41ebe4ec53128f7c16369ef16 | [
"MIT"
] | null | null | null | src/modelo/gasto.py | CamiloPMISO/test-ci | 4ee3715cb10456d41ebe4ec53128f7c16369ef16 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, String, Boolean, Float , Date, ForeignKey
from src.modelo.declarative_base import Base
class Gasto(Base):
__tablename__ = 'gasto'
id = Column(Integer, primary_key=True)
concepto = Column(String)
valor = Column(String)
fecha_gasto = Column(Date)
viajero =... | 28.166667 | 81 | 0.685404 | 126 | 1,014 | 5.333333 | 0.293651 | 0.104167 | 0.083333 | 0.056548 | 0.056548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.215976 | 1,014 | 36 | 82 | 28.166667 | 0.845283 | 0 | 0 | 0 | 0 | 0 | 0.034483 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0 | 0.076923 | 0.153846 | 0.846154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
288353ab42c7523d751488a0319919f2b1f510ee | 333 | py | Python | res/PyTorchExamples/examples/normalize/__init__.py | chogba6/ONE | 3d35259f89ee3109cfd35ab6f38c231904487f3b | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | res/PyTorchExamples/examples/normalize/__init__.py | chogba6/ONE | 3d35259f89ee3109cfd35ab6f38c231904487f3b | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | res/PyTorchExamples/examples/normalize/__init__.py | chogba6/ONE | 3d35259f89ee3109cfd35ab6f38c231904487f3b | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | import torch
import torch.nn as nn
# model
class net_normalize(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input):
return torch.nn.functional.normalize(input, p=2.0, dim=3, eps=1e-12)
_model_ = net_normalize()
# dummy input for onnx generation
_dummy_ = torch.randn... | 18.5 | 76 | 0.675676 | 51 | 333 | 4.137255 | 0.607843 | 0.104265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037453 | 0.198198 | 333 | 17 | 77 | 19.588235 | 0.752809 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.222222 | 0.111111 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
95489305f2be8e7c8ea244d8336001cea90b7115 | 304 | py | Python | proyectodjango/Login/models.py | AnnieLan/Web | 5e901544f9293caa90b1c2ed222c3006b3b498eb | [
"bzip2-1.0.6"
] | null | null | null | proyectodjango/Login/models.py | AnnieLan/Web | 5e901544f9293caa90b1c2ed222c3006b3b498eb | [
"bzip2-1.0.6"
] | null | null | null | proyectodjango/Login/models.py | AnnieLan/Web | 5e901544f9293caa90b1c2ed222c3006b3b498eb | [
"bzip2-1.0.6"
] | null | null | null | from django.db import models
# Create your models here.
class Login (models.Model):
nombre = models.CharField(max_length = 254,null=False)
ap_pat = models.CharField(max_length = 254,null=False)
ap_mat = models.CharField(max_length = 254,null=False)
edad = models.IntegerField(null=False) | 38 | 58 | 0.740132 | 44 | 304 | 5 | 0.522727 | 0.163636 | 0.245455 | 0.327273 | 0.509091 | 0.509091 | 0.509091 | 0.345455 | 0 | 0 | 0 | 0.034884 | 0.151316 | 304 | 8 | 59 | 38 | 0.817829 | 0.078947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
956ddf12fc48ed5d94144c62785cfaff7b74999a | 196 | py | Python | PythonExercicios/Mundo1/ex031.py | leonardocsrod/Python-Curso-em-Video | d61e4f1f0779050d176419de2cec0ef539e48cb3 | [
"MIT"
] | null | null | null | PythonExercicios/Mundo1/ex031.py | leonardocsrod/Python-Curso-em-Video | d61e4f1f0779050d176419de2cec0ef539e48cb3 | [
"MIT"
] | null | null | null | PythonExercicios/Mundo1/ex031.py | leonardocsrod/Python-Curso-em-Video | d61e4f1f0779050d176419de2cec0ef539e48cb3 | [
"MIT"
] | null | null | null | distance = int(input('Inform the distance: '))
if distance <= 200:
price = distance * 0.5
else:
price = distance * 0.45
print('Your trip cost \033[1;33;44mR$ {:.2f}\033[m.'.format(price))
| 28 | 67 | 0.637755 | 31 | 196 | 4.032258 | 0.741935 | 0.208 | 0.224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123457 | 0.173469 | 196 | 6 | 68 | 32.666667 | 0.648148 | 0 | 0 | 0 | 0 | 0 | 0.331633 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.166667 | 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 | 0 | 0 | 0 | 3 |
9572e85f956e4a70d791fb40ef026b24c0d2e19a | 183 | py | Python | testsuite/iff/run.py | scott-wilson/oiio | f67cce9b7b8623aca730af0fb2faaafcbe785dde | [
"BSD-3-Clause"
] | 1 | 2021-01-22T21:12:24.000Z | 2021-01-22T21:12:24.000Z | testsuite/iff/run.py | sobotka/oiio | 7f1f1d64933a51e1610da22a26f80528e3dd6dd8 | [
"BSD-3-Clause"
] | null | null | null | testsuite/iff/run.py | sobotka/oiio | 7f1f1d64933a51e1610da22a26f80528e3dd6dd8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
imagedir = parent + "/oiio-images"
command += oiiotool (imagedir+"/grid.tif --scanline -o grid.iff")
command += diff_command (imagedir+"/grid.tif", "grid.iff")
| 30.5 | 65 | 0.688525 | 25 | 183 | 5 | 0.64 | 0.192 | 0.24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.10929 | 183 | 5 | 66 | 36.6 | 0.766871 | 0.10929 | 0 | 0 | 0 | 0 | 0.376543 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 3 |
958da748d74a13fc37d5a4894c62801091a03b31 | 271 | py | Python | engine/src/hopeit/cli/__init__.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 15 | 2020-07-09T17:41:14.000Z | 2021-10-04T20:13:08.000Z | engine/src/hopeit/cli/__init__.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 48 | 2020-07-10T15:16:17.000Z | 2022-03-03T19:46:46.000Z | engine/src/hopeit/cli/__init__.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 3 | 2020-07-08T20:12:58.000Z | 2021-01-10T15:57:21.000Z | """
hopeit.engine CLI (Command Line Interface) module
provides implementation for the following CLI commands:
* **openapi** (hopeit_openapi): creation, diff and update openapi.json spec files
* **server** (hopeit_server): tool for running a server instance
"""
| 30.111111 | 85 | 0.734317 | 34 | 271 | 5.794118 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162362 | 271 | 8 | 86 | 33.875 | 0.867841 | 0.96679 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
959f22014f6428b1086e2f205253c6563287d8b3 | 164 | py | Python | problem_solving/algorithms/strings/q2_camelcase.py | mxdzi/hackerrank | 4455f73e4479a4204b2e1167253f6a02351aa5b7 | [
"MIT"
] | null | null | null | problem_solving/algorithms/strings/q2_camelcase.py | mxdzi/hackerrank | 4455f73e4479a4204b2e1167253f6a02351aa5b7 | [
"MIT"
] | null | null | null | problem_solving/algorithms/strings/q2_camelcase.py | mxdzi/hackerrank | 4455f73e4479a4204b2e1167253f6a02351aa5b7 | [
"MIT"
] | null | null | null | from string import ascii_uppercase
def camelcase(s):
count = 1
for char in s:
if char in ascii_uppercase:
count += 1
return count
| 16.4 | 35 | 0.609756 | 23 | 164 | 4.26087 | 0.652174 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018519 | 0.341463 | 164 | 9 | 36 | 18.222222 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0 | 0.428571 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
95bc255252bfca70a0219b581a9d3ce4da3cd44e | 562 | py | Python | example/dict.py | isprime/marrow.interface | f269772d46b74bb97a1f74dcbd0e33c967010495 | [
"MIT"
] | 2 | 2016-03-22T15:21:48.000Z | 2017-02-21T23:52:46.000Z | example/dict.py | isprime/marrow.interface | f269772d46b74bb97a1f74dcbd0e33c967010495 | [
"MIT"
] | 1 | 2019-01-21T22:09:00.000Z | 2019-01-21T22:09:00.000Z | example/dict.py | isprime/marrow.interface | f269772d46b74bb97a1f74dcbd0e33c967010495 | [
"MIT"
] | 2 | 2015-12-21T03:24:06.000Z | 2016-11-10T15:19:27.000Z | # encoding: utf-8
from marrow.interface import Interface
from marrow.interface.schema import Method
try:
from collections import UserDict
except ImportError:
from UserDict import UserDict
__all__ = ['IDictionary']
class IDictionary(Interface):
__assume_interface__ = (dict, )
__getitem__ = Me... | 19.37931 | 42 | 0.752669 | 61 | 562 | 6.590164 | 0.442623 | 0.159204 | 0.201493 | 0.154229 | 0.328358 | 0.19403 | 0 | 0 | 0 | 0 | 0 | 0.008493 | 0.161922 | 562 | 28 | 43 | 20.071429 | 0.845011 | 0.02669 | 0 | 0 | 0 | 0 | 0.020183 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | false | 0 | 0.3125 | 0 | 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 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
95d1d22f3c4fb410c11da34cfbab15f6f8a46d5d | 103 | py | Python | kedroio/__init__.py | atsangarides/kedroio | bc678e3b47e1c19076c2d498d3761445bfefeeb1 | [
"MIT"
] | null | null | null | kedroio/__init__.py | atsangarides/kedroio | bc678e3b47e1c19076c2d498d3761445bfefeeb1 | [
"MIT"
] | null | null | null | kedroio/__init__.py | atsangarides/kedroio | bc678e3b47e1c19076c2d498d3761445bfefeeb1 | [
"MIT"
] | null | null | null | import logging
__version__ = "0.1.3"
logging.getLogger("kedro-io").addHandler(logging.NullHandler())
| 17.166667 | 63 | 0.757282 | 13 | 103 | 5.692308 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.031579 | 0.07767 | 103 | 5 | 64 | 20.6 | 0.747368 | 0 | 0 | 0 | 0 | 0 | 0.126214 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
95eb02dc2bad1a7dc38f26793a45fc7c4e20dc39 | 20 | py | Python | meerk40t/device/lhystudios/__init__.py | apbarratt/meerk40t | 7049ab7693d482bd96ff3a298a9fc164836a750d | [
"MIT"
] | 118 | 2019-09-09T14:15:28.000Z | 2022-03-17T18:54:27.000Z | meerk40t/device/lhystudios/__init__.py | apbarratt/meerk40t | 7049ab7693d482bd96ff3a298a9fc164836a750d | [
"MIT"
] | 656 | 2019-07-21T03:34:12.000Z | 2022-03-30T18:10:31.000Z | meerk40t/device/lhystudios/__init__.py | apbarratt/meerk40t | 7049ab7693d482bd96ff3a298a9fc164836a750d | [
"MIT"
] | 48 | 2019-12-22T23:05:27.000Z | 2022-03-17T18:54:25.000Z | name = "lhystudios"
| 10 | 19 | 0.7 | 2 | 20 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 20 | 1 | 20 | 20 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
251aa82c729a5211542bdc05ab6c9a6f6e6f7d57 | 95 | py | Python | rgbd_seg/models/decoders/registry.py | tomchol/ShapeConv | 41ead20854daed43b59ef978665fa53f113cbb65 | [
"Apache-2.0"
] | 57 | 2021-08-03T08:03:56.000Z | 2022-03-25T12:17:44.000Z | rgbd_seg/models/decoders/registry.py | tomchol/ShapeConv | 41ead20854daed43b59ef978665fa53f113cbb65 | [
"Apache-2.0"
] | 6 | 2021-08-30T10:06:46.000Z | 2022-03-08T12:47:20.000Z | rgbd_seg/models/decoders/registry.py | tomchol/ShapeConv | 41ead20854daed43b59ef978665fa53f113cbb65 | [
"Apache-2.0"
] | 8 | 2021-08-13T08:32:54.000Z | 2022-03-25T11:12:13.000Z | from rgbd_seg.utils import Registry
BRICKS = Registry('brick')
DECODERS = Registry('decoder')
| 19 | 35 | 0.768421 | 12 | 95 | 6 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115789 | 95 | 4 | 36 | 23.75 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0.126316 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
252036936cf225d38479041e09b29a8d46b67780 | 48 | py | Python | tests/functional/pages/generic/__init__.py | mayank-sfdc/directory-tests | 6e978bc1a27c19389e99e454143122aa27e47b85 | [
"MIT"
] | 4 | 2017-06-02T09:09:10.000Z | 2018-01-25T19:06:12.000Z | tests/functional/pages/generic/__init__.py | mayank-sfdc/directory-tests | 6e978bc1a27c19389e99e454143122aa27e47b85 | [
"MIT"
] | 53 | 2016-10-27T22:31:03.000Z | 2022-03-07T11:18:25.000Z | tests/functional/pages/generic/__init__.py | mayank-sfdc/directory-tests | 6e978bc1a27c19389e99e454143122aa27e47b85 | [
"MIT"
] | 3 | 2017-11-22T11:42:40.000Z | 2022-02-21T01:20:04.000Z | # -*- coding: utf-8 -*-
__all__ = ["not_found"]
| 16 | 23 | 0.541667 | 6 | 48 | 3.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025 | 0.166667 | 48 | 2 | 24 | 24 | 0.5 | 0.4375 | 0 | 0 | 0 | 0 | 0.36 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
25648b08a8b732a90943425b11134774c04f6b50 | 304 | py | Python | runtests.py | theatlantic/django-admin-testutils | 6f30cbf286c26e1c354051fd3fecf8d28403ecd8 | [
"BSD-2-Clause"
] | 1 | 2017-04-25T22:25:38.000Z | 2017-04-25T22:25:38.000Z | runtests.py | theatlantic/django-admin-testutils | 6f30cbf286c26e1c354051fd3fecf8d28403ecd8 | [
"BSD-2-Clause"
] | null | null | null | runtests.py | theatlantic/django-admin-testutils | 6f30cbf286c26e1c354051fd3fecf8d28403ecd8 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import warnings
import django_admin_testutils
def main():
warnings.simplefilter("error", Warning)
runtests = django_admin_testutils.RunTests(
"django_admin_testutils.tests.settings", "django_admin_testutils")
runtests()
if __name__ == '__main__':
main()
| 20.266667 | 74 | 0.726974 | 34 | 304 | 6.029412 | 0.558824 | 0.214634 | 0.390244 | 0.273171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.161184 | 304 | 14 | 75 | 21.714286 | 0.803922 | 0.065789 | 0 | 0 | 0 | 0 | 0.254417 | 0.208481 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.222222 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c270b6f6ed6d43caa78de9eb65a6ddd80961f99f | 23 | py | Python | judgesite/__init__.py | NJUST-FishTeam/OnlineJudgeSite_M6 | 31ef866ea596c0b4889f8118adf5451ba3971c92 | [
"MIT"
] | 18 | 2015-04-13T00:46:59.000Z | 2021-11-16T08:23:58.000Z | judgesite/__init__.py | maemual/OnlineJudgeSite_M6 | 842a39bed52545d78f41835be73eeca23ef28096 | [
"MIT"
] | 5 | 2016-01-09T11:44:34.000Z | 2017-06-04T10:34:24.000Z | judgesite/__init__.py | maemual/OnlineJudgeSite_M6 | 842a39bed52545d78f41835be73eeca23ef28096 | [
"MIT"
] | 2 | 2015-03-23T13:22:02.000Z | 2017-01-06T17:47:47.000Z | __author__ = 'maemual'
| 11.5 | 22 | 0.73913 | 2 | 23 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 23 | 1 | 23 | 23 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0.304348 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c2794f9e47489caf9cf880edb3ee15771873ba23 | 1,888 | py | Python | game_play/db.py | tgruby/dungeon-hunt | f8c636e50e4041817d8c4d07fcbcd853a58b395d | [
"MIT"
] | 3 | 2020-11-23T17:50:22.000Z | 2020-12-14T22:19:12.000Z | game_play/db.py | tgruby/dungeon-hunt | f8c636e50e4041817d8c4d07fcbcd853a58b395d | [
"MIT"
] | 15 | 2020-12-11T13:24:58.000Z | 2020-12-23T09:50:19.000Z | game_play/db.py | tgruby/dungeon-hunt | f8c636e50e4041817d8c4d07fcbcd853a58b395d | [
"MIT"
] | null | null | null | import os
import pickle
from game_play import leader_board
def init_db():
try:
os.mkdir('../data')
except OSError as error:
# supressed due to this is the normal operation. TODO: fix this so we check first before trying to make.
pass
def load_leaderboard():
lb = load('data/leader... | 27.764706 | 112 | 0.654131 | 296 | 1,888 | 4.074324 | 0.331081 | 0.039801 | 0.049751 | 0.034826 | 0.323383 | 0.258706 | 0.212272 | 0.212272 | 0.212272 | 0.212272 | 0 | 0 | 0.258475 | 1,888 | 67 | 113 | 28.179104 | 0.861429 | 0.389301 | 0 | 0.184211 | 0 | 0 | 0.109649 | 0 | 0 | 0 | 0 | 0.014925 | 0 | 1 | 0.236842 | false | 0.052632 | 0.078947 | 0.026316 | 0.421053 | 0.052632 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
c2820da320022a1cdc91123ac9a17bfbe37234dc | 80 | py | Python | app_src/__init__.py | Reinski/netdevices_manager | fa4c563313ef6bc9969e4878cf79998e23be0ec6 | [
"MIT"
] | null | null | null | app_src/__init__.py | Reinski/netdevices_manager | fa4c563313ef6bc9969e4878cf79998e23be0ec6 | [
"MIT"
] | null | null | null | app_src/__init__.py | Reinski/netdevices_manager | fa4c563313ef6bc9969e4878cf79998e23be0ec6 | [
"MIT"
] | null | null | null | import flask
app = flask.Flask(__name__)
app.secret_key = 'P35ANBRM055GufuWuukR' | 26.666667 | 39 | 0.8125 | 10 | 80 | 6 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.068493 | 0.0875 | 80 | 3 | 39 | 26.666667 | 0.753425 | 0 | 0 | 0 | 0 | 0 | 0.246914 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
c29a591f0012091d0dab901c5a00effe6ba44fdb | 376 | py | Python | ecommerce/blog/admin.py | mhdirajabi/django-drf-e-commerce | 526044a728f9f073a21386ff7f67ac570f4755c6 | [
"MIT"
] | null | null | null | ecommerce/blog/admin.py | mhdirajabi/django-drf-e-commerce | 526044a728f9f073a21386ff7f67ac570f4755c6 | [
"MIT"
] | null | null | null | ecommerce/blog/admin.py | mhdirajabi/django-drf-e-commerce | 526044a728f9f073a21386ff7f67ac570f4755c6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Category, Post, Tag
# Register your models here.
class PostAdmin(admin.ModelAdmin):
list_display = ("title", "content", "slug")
class CategoryAdmin(admin.ModelAdmin):
list_display = ("name", "owner")
admin.site.register(Post, PostAdmin)
admin.site.reg... | 19.789474 | 47 | 0.744681 | 46 | 376 | 6.043478 | 0.521739 | 0.097122 | 0.183453 | 0.18705 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130319 | 376 | 18 | 48 | 20.888889 | 0.850153 | 0.069149 | 0 | 0 | 0 | 0 | 0.071839 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.222222 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
c2a5d4c2eea01132dddf0dcf07f33408b24acd26 | 2,695 | py | Python | dcsh/merge.py | eanderton/dash | 3e35a7a8288a3ba66a2947a5a61d7a4551fa1b91 | [
"MIT"
] | null | null | null | dcsh/merge.py | eanderton/dash | 3e35a7a8288a3ba66a2947a5a61d7a4551fa1b91 | [
"MIT"
] | null | null | null | dcsh/merge.py | eanderton/dash | 3e35a7a8288a3ba66a2947a5a61d7a4551fa1b91 | [
"MIT"
] | null | null | null | """Utility for configurable dictionary merges."""
class NoValue(object):
""" Placeholder for a no-value type. """
pass
# singleton for NoValue
no_value = NoValue()
def discard(dst, src, key, default):
"""Does nothing, effectively discarding the merged value."""
return no_value
def override(left,... | 28.670213 | 88 | 0.632653 | 395 | 2,695 | 4.222785 | 0.220253 | 0.064748 | 0.052758 | 0.067146 | 0.351918 | 0.351918 | 0.309353 | 0.295564 | 0.218825 | 0.218825 | 0 | 0 | 0.246382 | 2,695 | 93 | 89 | 28.978495 | 0.82127 | 0.34026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010753 | 0 | 1 | 0.266667 | false | 0.022222 | 0 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
c2a851298af9088a1e5056007dd82a73c517b0ef | 165 | py | Python | poc_dependabot/__init__.py | xmnlab/poc-dependabot | ab8935bfe1d16c0b684f20b7e30bbe49470030af | [
"MIT"
] | null | null | null | poc_dependabot/__init__.py | xmnlab/poc-dependabot | ab8935bfe1d16c0b684f20b7e30bbe49470030af | [
"MIT"
] | 9 | 2022-02-01T20:43:25.000Z | 2022-02-11T22:28:21.000Z | poc_dependabot/__init__.py | xmnlab/poc-dependabot | ab8935bfe1d16c0b684f20b7e30bbe49470030af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for PoC DependaBot."""
__author__ = """Ivan Ogasawara"""
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '1.0.0'
| 20.625 | 43 | 0.654545 | 21 | 165 | 4.571429 | 0.857143 | 0.270833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027972 | 0.133333 | 165 | 7 | 44 | 23.571429 | 0.643357 | 0.363636 | 0 | 0 | 0 | 0 | 0.434343 | 0.242424 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c2b0ce4da307cb766626d54e38bf998dca06e3b7 | 159 | py | Python | Python_Basic_Programs/03_Data_Types.py | abhayanigam/Learn_Python_Programming | 801e3fff2b1fe35e4c93f4ced649516c519eb8f9 | [
"MIT"
] | 1 | 2021-08-28T15:10:26.000Z | 2021-08-28T15:10:26.000Z | Python_Basic_Programs/03_Data_Types.py | abhayanigam/Learn_Python_Programming | 801e3fff2b1fe35e4c93f4ced649516c519eb8f9 | [
"MIT"
] | null | null | null | Python_Basic_Programs/03_Data_Types.py | abhayanigam/Learn_Python_Programming | 801e3fff2b1fe35e4c93f4ced649516c519eb8f9 | [
"MIT"
] | null | null | null | # Data Types
a = 5
print(a, "is of type", type(a))
a = 2.0
print(a, "is of type", type(a))
a = 1+2j
print(a, "is complex number?", isinstance(1+2j,complex)) | 15.9 | 56 | 0.610063 | 33 | 159 | 2.939394 | 0.454545 | 0.185567 | 0.247423 | 0.206186 | 0.412371 | 0.412371 | 0.412371 | 0.412371 | 0 | 0 | 0 | 0.053846 | 0.18239 | 159 | 10 | 56 | 15.9 | 0.692308 | 0.062893 | 0 | 0.333333 | 0 | 0 | 0.256757 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
c2c9c13177f4b25d82b251702e09592343de443f | 2,229 | py | Python | blogs/models.py | AgnosticMe/phleeb | 48f85048d2db5d16d243feee2f84a961682a0f4d | [
"MIT"
] | null | null | null | blogs/models.py | AgnosticMe/phleeb | 48f85048d2db5d16d243feee2f84a961682a0f4d | [
"MIT"
] | null | null | null | blogs/models.py | AgnosticMe/phleeb | 48f85048d2db5d16d243feee2f84a961682a0f4d | [
"MIT"
] | null | null | null | from django.db import models
from django.conf import settings
from django.utils.text import slugify
import uuid
# Create your models here.
class Category(models.Model):
title = models.CharField(max_length=50)
slug = models.SlugField(editable=False)
def save(self, *args, **kwargs):
self.slug = f'... | 28.21519 | 102 | 0.680574 | 286 | 2,229 | 5.160839 | 0.283217 | 0.054201 | 0.066396 | 0.065041 | 0.51897 | 0.48374 | 0.48374 | 0.462737 | 0.462737 | 0.462737 | 0 | 0.00884 | 0.187977 | 2,229 | 78 | 103 | 28.576923 | 0.80663 | 0.010767 | 0 | 0.480769 | 0 | 0 | 0.046364 | 0.033636 | 0 | 0 | 0 | 0 | 0 | 1 | 0.211538 | false | 0 | 0.076923 | 0.153846 | 0.884615 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
c2d24a631ce975d662b9f0385bf8ca113bd3d156 | 262 | py | Python | doc/movies/extract_snippets/Reader.py | palmskog/hydra-battles | 8ad2a5397c748cac56c676e5a0745a5935ceec46 | [
"MIT"
] | 40 | 2020-10-20T13:51:22.000Z | 2022-03-09T10:22:16.000Z | doc/movies/extract_snippets/Reader.py | palmskog/hydra-battles | 8ad2a5397c748cac56c676e5a0745a5935ceec46 | [
"MIT"
] | 78 | 2020-10-20T16:48:09.000Z | 2022-03-26T17:49:00.000Z | doc/movies/extract_snippets/Reader.py | palmskog/hydra-battles | 8ad2a5397c748cac56c676e5a0745a5935ceec46 | [
"MIT"
] | 7 | 2020-10-20T12:06:08.000Z | 2021-08-30T16:10:35.000Z | from typing import Tuple
from abc import abstractmethod
class Reader:
"""
Read line by line
"""
@abstractmethod
def __iter__(self) -> Tuple[int, str]:
"""
return tuple with line number and line
:yield:
"""
pass
| 15.411765 | 42 | 0.587786 | 30 | 262 | 5 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.320611 | 262 | 16 | 43 | 16.375 | 0.842697 | 0.244275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.166667 | 0.333333 | 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 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
6c2f9014d55f0b3df42112ac18cc1cf5d75d6da7 | 442 | py | Python | Inheritance/mix_it_new/project/parking_mall/parking_mall.py | MNikov/Python-OOP-October-2020 | a53e4555758ec810605e31e7b2c71b65c49b2332 | [
"MIT"
] | null | null | null | Inheritance/mix_it_new/project/parking_mall/parking_mall.py | MNikov/Python-OOP-October-2020 | a53e4555758ec810605e31e7b2c71b65c49b2332 | [
"MIT"
] | null | null | null | Inheritance/mix_it_new/project/parking_mall/parking_mall.py | MNikov/Python-OOP-October-2020 | a53e4555758ec810605e31e7b2c71b65c49b2332 | [
"MIT"
] | null | null | null | from project.capacity_mixin import CapacityMixin
class ParkingMall(CapacityMixin):
def __init__(self, parking_lots):
self.parking_lots = parking_lots
def check_availability(self):
fn_value = self.get_capacity(self.parking_lots, 1)
if isinstance(fn_value, str):
return "Ther... | 31.571429 | 61 | 0.696833 | 56 | 442 | 5.232143 | 0.517857 | 0.300341 | 0.255973 | 0.150171 | 0.177474 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005831 | 0.223982 | 442 | 13 | 62 | 34 | 0.848397 | 0 | 0 | 0 | 0 | 0 | 0.167421 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.1 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
6c489591ca076dc4e68d56363aa97009538ae687 | 776 | py | Python | proxy/indexer/pg_common.py | nghiatomo/proxy-model.py | a52737d3418bbceaf9dd64c3a985b00f526a8ea3 | [
"BSD-3-Clause"
] | 4 | 2021-09-10T21:29:27.000Z | 2021-11-17T01:43:58.000Z | proxy/indexer/pg_common.py | nghiatomo/proxy-model.py | a52737d3418bbceaf9dd64c3a985b00f526a8ea3 | [
"BSD-3-Clause"
] | 339 | 2021-04-28T06:38:54.000Z | 2022-03-31T11:16:36.000Z | proxy/indexer/pg_common.py | nghiatomo/proxy-model.py | a52737d3418bbceaf9dd64c3a985b00f526a8ea3 | [
"BSD-3-Clause"
] | 5 | 2021-08-17T14:30:28.000Z | 2022-01-18T07:19:47.000Z | import psycopg2
import os
POSTGRES_DB = os.environ.get("POSTGRES_DB", "neon-db")
POSTGRES_USER = os.environ.get("POSTGRES_USER", "neon-proxy")
POSTGRES_PASSWORD = os.environ.get("POSTGRES_PASSWORD", "neon-proxy-pass")
POSTGRES_HOST = os.environ.get("POSTGRES_HOST", "localhost")
try:
from cPickle import dumps, loa... | 27.714286 | 81 | 0.740979 | 105 | 776 | 5.352381 | 0.457143 | 0.064057 | 0.085409 | 0.142349 | 0.16726 | 0.16726 | 0.16726 | 0.16726 | 0 | 0 | 0 | 0.003008 | 0.143041 | 776 | 27 | 82 | 28.740741 | 0.842105 | 0.16366 | 0 | 0 | 0 | 0 | 0.150079 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1875 | false | 0.0625 | 0.3125 | 0 | 0.6875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
6c6ae757333709f1d6baa9ea7433cc347a9bba71 | 209,545 | py | Python | reefbot_hudui/bin/vlc.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | reefbot_hudui/bin/vlc.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | reefbot_hudui/bin/vlc.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | #! /usr/bin/python
#
# Python ctypes bindings for VLC
# Copyright (C) 2009 the VideoLAN team
# $Id: $
#
# Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free ... | 40.625242 | 177 | 0.71597 | 29,241 | 209,545 | 4.840874 | 0.039944 | 0.058282 | 0.03569 | 0.053535 | 0.83772 | 0.763041 | 0.678895 | 0.612842 | 0.533119 | 0.486231 | 0 | 0.007959 | 0.191744 | 209,545 | 5,157 | 178 | 40.63312 | 0.827817 | 0.008833 | 0 | 0.476204 | 0 | 0.001154 | 0.366863 | 0.111112 | 0 | 0 | 0.000356 | 0.000388 | 0 | 0 | null | null | 0.001731 | 0.003173 | null | null | 0.006057 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
6c6ef371f75559ac2ae1cc686771a714889b6a4a | 580 | py | Python | json_default.py | funkybob/json_default | 902cee5d3300228c3ae6accf8a6644702064b82f | [
"MIT"
] | 6 | 2017-10-27T23:08:45.000Z | 2020-10-27T12:16:32.000Z | json_default.py | funkybob/json_default | 902cee5d3300228c3ae6accf8a6644702064b82f | [
"MIT"
] | null | null | null | json_default.py | funkybob/json_default | 902cee5d3300228c3ae6accf8a6644702064b82f | [
"MIT"
] | null | null | null |
'''
Implementaion of the ideas from https://hynek.me/articles/serialization/
'''
import datetime
from functools import singledispatch
__version__ = '0.2'
@singledispatch
def default(obj):
'''Safe and sane default'''
return str(obj)
@default.register(datetime.datetime)
def _(obj):
r = obj.replace(micro... | 17.575758 | 72 | 0.682759 | 74 | 580 | 5.256757 | 0.5 | 0.115681 | 0.177378 | 0.113111 | 0.159383 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018634 | 0.167241 | 580 | 32 | 73 | 18.125 | 0.786749 | 0.162069 | 0 | 0.166667 | 0 | 0 | 0.021186 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.111111 | 0.111111 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
6c718e5bd0418c32775584efd5c378733b050828 | 1,011 | py | Python | tests/python/unittest/test_autotvm_dispatch_context.py | titikid/tvm | 0cf3765b28d457d2503ec20b551e9a8eadb1491d | [
"Apache-2.0"
] | 1 | 2020-12-30T02:48:44.000Z | 2020-12-30T02:48:44.000Z | tests/python/unittest/test_autotvm_dispatch_context.py | titikid/tvm | 0cf3765b28d457d2503ec20b551e9a8eadb1491d | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_autotvm_dispatch_context.py | titikid/tvm | 0cf3765b28d457d2503ec20b551e9a8eadb1491d | [
"Apache-2.0"
] | 1 | 2018-11-25T19:35:25.000Z | 2018-11-25T19:35:25.000Z | """Test dispatcher.
The dispatcher can choose which template to use according
to the parameters of workload"""
from collections import namedtuple
from tvm.autotvm.task import dispatcher, DispatchContext
SimpleWorkload = namedtuple("SimpleWorkload", ["key"])
SimpleConfig = namedtuple("SimpleConfig", ["template_key"])
... | 27.324324 | 67 | 0.667656 | 119 | 1,011 | 5.478992 | 0.462185 | 0.092025 | 0.03681 | 0.02454 | 0.042945 | 0 | 0 | 0 | 0 | 0 | 0 | 0.024359 | 0.228487 | 1,011 | 36 | 68 | 28.083333 | 0.811538 | 0.116716 | 0 | 0 | 0 | 0 | 0.095937 | 0 | 0 | 0 | 0 | 0 | 0.086957 | 1 | 0.217391 | false | 0 | 0.086957 | 0.130435 | 0.521739 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
6c7b9fc32923c58a6f94af313b5910427d04922d | 189 | py | Python | fastapi_auth/fastapi_util/settings/base_api_settings.py | dmontagu/fastapi-auth | d0e86774f66bd43e80376de19bdf034eb228dc07 | [
"MIT"
] | 87 | 2019-12-18T05:43:25.000Z | 2022-03-30T20:04:11.000Z | fastapi_auth/fastapi_util/settings/base_api_settings.py | dmontagu/fastapi-auth | d0e86774f66bd43e80376de19bdf034eb228dc07 | [
"MIT"
] | 2 | 2020-08-07T05:17:18.000Z | 2021-09-14T03:20:04.000Z | fastapi_auth/fastapi_util/settings/base_api_settings.py | dmontagu/fastapi-auth | d0e86774f66bd43e80376de19bdf034eb228dc07 | [
"MIT"
] | 7 | 2020-03-08T17:14:33.000Z | 2022-01-01T21:38:47.000Z | from pydantic import BaseSettings
class BaseAPISettings(BaseSettings):
class Config:
env_prefix = ""
arbitrary_types_allowed = True
validate_assignment = True
| 21 | 38 | 0.703704 | 18 | 189 | 7.166667 | 0.833333 | 0.263566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.248677 | 189 | 8 | 39 | 23.625 | 0.908451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 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 | 0 | 0 | 0 | 0 | 0 | 3 |
6664d8ef0b4838070d4bda1fe96c2e05c7dd28f6 | 632 | py | Python | py/pyfeng/ex.py | AHrmnd/ASP-1 | 097ebf0a6a84ce2c8078026f0da8e930ff74d613 | [
"MIT"
] | null | null | null | py/pyfeng/ex.py | AHrmnd/ASP-1 | 097ebf0a6a84ce2c8078026f0da8e930ff74d613 | [
"MIT"
] | null | null | null | py/pyfeng/ex.py | AHrmnd/ASP-1 | 097ebf0a6a84ce2c8078026f0da8e930ff74d613 | [
"MIT"
] | null | null | null | #from .heston_fft import HestonFft
# SV models (CMC, AE) from ASP 2021
from .heston_mc import HestonMcAndersen2008, HestonMcGlassermanKim2011, HestonMcTseWan2013, HestonMcChoiKwok2023
from .sv32_mc import Sv32McCondQE, Sv32McAe
from .garch import GarchMcTimeStep, GarchUncorrBaroneAdesi2004
# SABR / OUSV models for re... | 39.5 | 112 | 0.849684 | 68 | 632 | 7.808824 | 0.588235 | 0.045198 | 0.041431 | 0.056497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109929 | 0.107595 | 632 | 15 | 113 | 42.133333 | 0.83156 | 0.199367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
66699c32300a5578cde7d2ac9bcaae6ecc31ab41 | 166 | py | Python | tests/forms_tests/urls.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/forms_tests/urls.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/forms_tests/urls.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | from django.urls import path
from .views import ArticleFormView
urlpatterns = [
path("model_form/<int:pk>/", ArticleFormView.as_view(), name="article_form"),
]
| 20.75 | 81 | 0.73494 | 21 | 166 | 5.666667 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.126506 | 166 | 7 | 82 | 23.714286 | 0.82069 | 0 | 0 | 0 | 0 | 0 | 0.192771 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
6683c6da0989248a5c9aa79f3215b523dbbd5a69 | 213 | py | Python | agent/random_agent.py | Kulbear/endless-2048 | 939479e6ae5d4dae6fb636c9803f8d4ebf5be0e8 | [
"MIT"
] | 11 | 2017-05-14T19:29:56.000Z | 2020-05-24T07:02:03.000Z | agent/random_agent.py | Kulbear/endless-2048 | 939479e6ae5d4dae6fb636c9803f8d4ebf5be0e8 | [
"MIT"
] | null | null | null | agent/random_agent.py | Kulbear/endless-2048 | 939479e6ae5d4dae6fb636c9803f8d4ebf5be0e8 | [
"MIT"
] | 7 | 2017-07-08T05:54:55.000Z | 2021-11-13T14:01:39.000Z | from .base_agent import BaseAgent
from random import choice
class RandomAgent(BaseAgent):
"""A game agent pick the next move randomly."""
def get_move(self, game):
return self.random_move(game)
| 21.3 | 51 | 0.71831 | 30 | 213 | 5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.197183 | 213 | 9 | 52 | 23.666667 | 0.877193 | 0.192488 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0.2 | 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 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 3 |
66888596c077828cae5b9fd6ce3053cfae609913 | 579 | py | Python | my_puzzle_example.py | ddurler/water_sort_puzzle | 6f605f52ba63c74908f7e28cee4c850724c67dc6 | [
"MIT"
] | null | null | null | my_puzzle_example.py | ddurler/water_sort_puzzle | 6f605f52ba63c74908f7e28cee4c850724c67dc6 | [
"MIT"
] | null | null | null | my_puzzle_example.py | ddurler/water_sort_puzzle | 6f605f52ba63c74908f7e28cee4c850724c67dc6 | [
"MIT"
] | null | null | null | """
Puzzle resolution example.
See README.md file.
"""
# Import required modules
from bottle import Bottle
from puzzle import Puzzle
from puzzle_solver import solve_generic
"""
Puzzle to be solved in this example:
| R | | | | V | | |
| R | | | | V | | |
| B | | R | ... | 23.16 | 85 | 0.455959 | 62 | 579 | 4.209677 | 0.516129 | 0.076628 | 0.137931 | 0.030651 | 0.034483 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01084 | 0.362694 | 579 | 24 | 86 | 24.125 | 0.696477 | 0.136442 | 0 | 0 | 0 | 0 | 0.057971 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
668efd1205224a92c1d3ed11647276739d0a85ab | 278 | py | Python | scikits/statsmodels/stats/__init__.py | matthew-brett/statsmodels | 915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c | [
"BSD-3-Clause"
] | null | null | null | scikits/statsmodels/stats/__init__.py | matthew-brett/statsmodels | 915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c | [
"BSD-3-Clause"
] | null | null | null | scikits/statsmodels/stats/__init__.py | matthew-brett/statsmodels | 915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c | [
"BSD-3-Clause"
] | null | null | null | #collect some imports of verified (at least one example) functions
from scikits.statsmodels.sandbox.stats.multicomp import \
multipletests, fdrcorrection0, fdrcorrection_twostage, tukeyhsd
from scikits.statsmodels import NoseWrapper as Tester
test = Tester().test
| 39.714286 | 76 | 0.794964 | 32 | 278 | 6.875 | 0.8125 | 0.1 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004219 | 0.147482 | 278 | 6 | 77 | 46.333333 | 0.924051 | 0.233813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 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 | 3 |
66a99f3ad85666bf30241b2c6c9efc6f2618eb8a | 438 | py | Python | ezread3.py | eigencode/Caerus | cb00635767b38665f20220699cbe2a2d10aae9ed | [
"Apache-2.0"
] | null | null | null | ezread3.py | eigencode/Caerus | cb00635767b38665f20220699cbe2a2d10aae9ed | [
"Apache-2.0"
] | null | null | null | ezread3.py | eigencode/Caerus | cb00635767b38665f20220699cbe2a2d10aae9ed | [
"Apache-2.0"
] | null | null | null | #!/system/xbin/env python3
#!/system/xbin/env python3
import fileinput
import re
while True
S = fileinput.input():
S =
datalist = ["[" + S.rstrip() + "]\n" for S in fileinput.input() if not re.match("\s*\n",S) ]
print(*datalist)
#!/system/xbin/env python3
import io
import sys
import codecs
import w... | 19.043478 | 94 | 0.66895 | 66 | 438 | 4.378788 | 0.469697 | 0.103806 | 0.134948 | 0.207612 | 0.179931 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008451 | 0.189498 | 438 | 22 | 95 | 19.909091 | 0.805634 | 0.171233 | 0 | 0 | 0 | 0 | 0.026706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.375 | null | null | 0.1875 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
66afdd63c1ea7ed5098b7bf57c98d2bda9430295 | 236 | py | Python | tests/turtle.py | hitmeet5/free-python-games | d703890e516d8bb66b74a37061644335683e84c8 | [
"Apache-2.0"
] | null | null | null | tests/turtle.py | hitmeet5/free-python-games | d703890e516d8bb66b74a37061644335683e84c8 | [
"Apache-2.0"
] | null | null | null | tests/turtle.py | hitmeet5/free-python-games | d703890e516d8bb66b74a37061644335683e84c8 | [
"Apache-2.0"
] | 1 | 2020-11-04T02:51:57.000Z | 2020-11-04T02:51:57.000Z | """Mock turtle module.
"""
def goto(x, y):
pass
def up():
pass
def down():
pass
def color(name):
pass
def begin_fill():
pass
def end_fill():
pass
def forward(steps):
pass
def left(degrees):
pass
| 8.428571 | 22 | 0.567797 | 34 | 236 | 3.882353 | 0.558824 | 0.371212 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.29661 | 236 | 27 | 23 | 8.740741 | 0.795181 | 0.080508 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
66cf04b63104a48786b822a338c359c28bb42a45 | 363 | py | Python | LabelExpressions/labelExpression.py | cdflint/arcpy-wizardry | bb9b68305bfdb3812ae951c49fc37d2eb29cf237 | [
"Apache-2.0"
] | 1 | 2017-07-17T20:13:19.000Z | 2017-07-17T20:13:19.000Z | LabelExpressions/labelExpression.py | cdflint/arcpy-wizardry | bb9b68305bfdb3812ae951c49fc37d2eb29cf237 | [
"Apache-2.0"
] | null | null | null | LabelExpressions/labelExpression.py | cdflint/arcpy-wizardry | bb9b68305bfdb3812ae951c49fc37d2eb29cf237 | [
"Apache-2.0"
] | null | null | null | # Define a custom python label expression that will
# Take three fields NAME,LASTCENSUS and POP_EST and
# will return a custom formatted text blob with a Bolded NAME and Red census pop
def FindLabel ([NAME],[LASTCENSUS],[POP_EST]):
label = "<BOL>{0}</BOL>\n{1} Census:\n<CLR red = '255'>{2:,}</CLR>".format([NAME],[L... | 60.5 | 114 | 0.705234 | 59 | 363 | 4.288136 | 0.59322 | 0.166008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019293 | 0.143251 | 363 | 6 | 115 | 60.5 | 0.794212 | 0.490358 | 0 | 0 | 0 | 0.333333 | 0.313187 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 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 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
66d0b97dc43ff1c867e1ace5a43de89c532726bc | 1,588 | py | Python | python/experiments/latest/tools/mention.py | boyuanzheng010/friends_semeval | 7891d072fd2598374e4bc1af6a9febed2577e118 | [
"Apache-2.0"
] | 39 | 2017-04-21T00:19:31.000Z | 2022-03-07T21:37:55.000Z | python/experiments/latest/tools/mention.py | BarryZM/character-identification | 5c47347aeff7ff8a16460b6f38637bc47a2efa1b | [
"Apache-2.0"
] | 1 | 2020-07-05T11:22:31.000Z | 2021-02-25T12:04:56.000Z | python/experiments/latest/tools/mention.py | BarryZM/character-identification | 5c47347aeff7ff8a16460b6f38637bc47a2efa1b | [
"Apache-2.0"
] | 8 | 2018-05-11T06:55:24.000Z | 2020-07-15T20:53:28.000Z | import numpy as np
from structure import TokenNode
class PluralMentionNode(object):
def __init__(self, id, tokens, gold_refs, auto_refs=None, feat_map=None, plural=False):
self.id = id
self.tokens = tokens
self.gold_refs = [gref.lower() for gref in gold_refs]
self.auto_refs = [ar... | 32.408163 | 91 | 0.647985 | 230 | 1,588 | 4.226087 | 0.252174 | 0.08642 | 0.074074 | 0.045267 | 0.281893 | 0.281893 | 0.281893 | 0.166667 | 0.166667 | 0.166667 | 0 | 0.011067 | 0.203401 | 1,588 | 48 | 92 | 33.083333 | 0.757312 | 0 | 0 | 0 | 0 | 0 | 0.04534 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.258065 | false | 0 | 0.064516 | 0.193548 | 0.548387 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
66da55db88808c4a30877d7685e7dea2973e89d2 | 1,031 | py | Python | slurp/plugin_types.py | iksteen/slurp | 751ef1ee15fbb2a928661ae4e94888c7fdd6d11a | [
"MIT"
] | 1 | 2020-02-26T14:40:11.000Z | 2020-02-26T14:40:11.000Z | slurp/plugin_types.py | iksteen/slurp | 751ef1ee15fbb2a928661ae4e94888c7fdd6d11a | [
"MIT"
] | null | null | null | slurp/plugin_types.py | iksteen/slurp | 751ef1ee15fbb2a928661ae4e94888c7fdd6d11a | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
class Plugin(metaclass=ABCMeta):
@abstractmethod
def __init__(self, core, *, loop=None):
...
@abstractmethod
async def start(self):
...
@abstractmethod
async def run(self):
...
class BackendPlugin(Plugin):
pass
class Met... | 19.092593 | 54 | 0.657614 | 98 | 1,031 | 6.816327 | 0.367347 | 0.22006 | 0.230539 | 0.323353 | 0.413174 | 0.296407 | 0.164671 | 0.164671 | 0 | 0 | 0 | 0 | 0.236663 | 1,031 | 53 | 55 | 19.45283 | 0.848793 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0.027778 | 0.027778 | 0 | 0.277778 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
dd00cd295c94c712ac16eb0b68703b881398ede0 | 171 | py | Python | script/simple_html_strip.py | jdsayle/scripts | 46e7e2e37dde74c6b2b10474c7fb6cb6bdb6921c | [
"MIT"
] | null | null | null | script/simple_html_strip.py | jdsayle/scripts | 46e7e2e37dde74c6b2b10474c7fb6cb6bdb6921c | [
"MIT"
] | null | null | null | script/simple_html_strip.py | jdsayle/scripts | 46e7e2e37dde74c6b2b10474c7fb6cb6bdb6921c | [
"MIT"
] | null | null | null | import re
import fileinput
# change NAME_OF_FILE to local file
for line in fileinput.input(['NAME_OF_FILE'], inplace=True):
print(re.sub(r'<.*?>', '', line), end='')
| 24.428571 | 60 | 0.678363 | 27 | 171 | 4.148148 | 0.703704 | 0.107143 | 0.178571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140351 | 171 | 6 | 61 | 28.5 | 0.761905 | 0.192982 | 0 | 0 | 0 | 0 | 0.125 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
dd1650a94d7ab60eebe5b9f57471176d217c1ac9 | 231 | py | Python | lang/py/pylib/12/urlparse_urljoin_v2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/pylib/12/urlparse_urljoin_v2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/pylib/12/urlparse_urljoin_v2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from urlparse import urljoin
print urljoin('http://www.example.com/path/',
'/subpath/file.html')
print urljoin('http://www.example.com/path/file.html',
'subpath/file.html')
| 21 | 54 | 0.623377 | 30 | 231 | 4.8 | 0.566667 | 0.166667 | 0.222222 | 0.263889 | 0.458333 | 0.458333 | 0.458333 | 0 | 0 | 0 | 0 | 0 | 0.207792 | 231 | 10 | 55 | 23.1 | 0.786885 | 0.08658 | 0 | 0 | 0 | 0 | 0.478469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.4 | 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 | 0 | 0 | 3 |
dd3598c5214f8669b745a590619f7c18967e7e18 | 58 | py | Python | backend/apps/projects/case/__init__.py | wuchaofan1654/tester | ff38d42e06cbdfa04882e8e95ada2dd93e6609f2 | [
"MIT"
] | null | null | null | backend/apps/projects/case/__init__.py | wuchaofan1654/tester | ff38d42e06cbdfa04882e8e95ada2dd93e6609f2 | [
"MIT"
] | null | null | null | backend/apps/projects/case/__init__.py | wuchaofan1654/tester | ff38d42e06cbdfa04882e8e95ada2dd93e6609f2 | [
"MIT"
] | null | null | null | default_app_config = 'apps.projects.case.apps.CaseConfig'
| 29 | 57 | 0.827586 | 8 | 58 | 5.75 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.051724 | 58 | 1 | 58 | 58 | 0.836364 | 0 | 0 | 0 | 0 | 0 | 0.586207 | 0.586207 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
dd48bba9c909dc7ba3f87f97833446de2f2d71be | 239 | py | Python | tflib/step.py | relaxdiego/auto | c850fad817f9f1bf8286897ff5f4eae09c37a752 | [
"Apache-2.0"
] | null | null | null | tflib/step.py | relaxdiego/auto | c850fad817f9f1bf8286897ff5f4eae09c37a752 | [
"Apache-2.0"
] | null | null | null | tflib/step.py | relaxdiego/auto | c850fad817f9f1bf8286897ff5f4eae09c37a752 | [
"Apache-2.0"
] | null | null | null | from tflib.mixins.loggable import LoggableMixin
class Step(object, LoggableMixin):
def get_expectation(self, name):
return getattr(self, "%s_expectation" % name)
def undo(self):
self.log.info("Nothing to undo")
| 21.727273 | 53 | 0.690377 | 30 | 239 | 5.433333 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.200837 | 239 | 10 | 54 | 23.9 | 0.853403 | 0 | 0 | 0 | 0 | 0 | 0.121339 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 0.166667 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
dd5085fd3e392e39b89683504a5aed2054cfa631 | 2,704 | py | Python | src/web/PaginaWeb/General/models.py | madscientist98/Berserk-Project | 9336f6893a071b52fa45c057a34bc84217ecdb41 | [
"MIT"
] | null | null | null | src/web/PaginaWeb/General/models.py | madscientist98/Berserk-Project | 9336f6893a071b52fa45c057a34bc84217ecdb41 | [
"MIT"
] | null | null | null | src/web/PaginaWeb/General/models.py | madscientist98/Berserk-Project | 9336f6893a071b52fa45c057a34bc84217ecdb41 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
# Create your models here.
class Usuario(models.Model):
username = models.CharField(max_length=100, default='',unique = True)
password = models.CharField(max_length=100, default='')
cash ... | 37.041096 | 78 | 0.732618 | 333 | 2,704 | 5.741742 | 0.24024 | 0.131799 | 0.183054 | 0.066946 | 0.452929 | 0.411088 | 0.315377 | 0.292364 | 0.226464 | 0.178347 | 0 | 0.020114 | 0.154216 | 2,704 | 72 | 79 | 37.555556 | 0.815916 | 0.008876 | 0 | 0.192308 | 0 | 0 | 0.00924 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.134615 | false | 0.019231 | 0.057692 | 0.134615 | 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 | 0 | 1 | 1 | 0 | 0 | 3 |
dd55b6450d2279c2fdee3e3323752a703b0263f6 | 279 | py | Python | src/mmw/apps/modeling/admin.py | lsetiawan/model-my-watershed | 4646ebb486cb7902dce1b13c9ada32e80d22fcf0 | [
"Apache-2.0"
] | 45 | 2015-05-25T22:55:21.000Z | 2022-02-27T14:51:52.000Z | src/mmw/apps/modeling/admin.py | lsetiawan/model-my-watershed | 4646ebb486cb7902dce1b13c9ada32e80d22fcf0 | [
"Apache-2.0"
] | 3,213 | 2015-05-22T00:32:00.000Z | 2022-03-31T15:05:08.000Z | src/mmw/apps/modeling/admin.py | lsetiawan/model-my-watershed | 4646ebb486cb7902dce1b13c9ada32e80d22fcf0 | [
"Apache-2.0"
] | 37 | 2015-05-22T12:30:46.000Z | 2021-09-10T02:13:44.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.contrib import admin
from apps.modeling.models import Project, Scenario
admin.site.register(Project)
admin.site.register(Scenario)
| 25.363636 | 50 | 0.817204 | 37 | 279 | 5.783784 | 0.567568 | 0.140187 | 0.224299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004016 | 0.107527 | 279 | 10 | 51 | 27.9 | 0.855422 | 0.075269 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.714286 | 0 | 0.714286 | 0.142857 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
dd5e76422f6f7b08e04e139e3bd9aac6efcc1628 | 1,428 | py | Python | python/src/main/python/pygw/base/range.py | radiant-maxar/geowave | 2d9f39d32e4621c8f5965a4dffff0623c1c03231 | [
"Apache-2.0"
] | 280 | 2017-06-14T01:26:19.000Z | 2022-03-28T15:45:23.000Z | python/src/main/python/pygw/base/range.py | radiant-maxar/geowave | 2d9f39d32e4621c8f5965a4dffff0623c1c03231 | [
"Apache-2.0"
] | 458 | 2017-06-12T20:00:59.000Z | 2022-03-31T04:41:59.000Z | python/src/main/python/pygw/base/range.py | radiant-maxar/geowave | 2d9f39d32e4621c8f5965a4dffff0623c1c03231 | [
"Apache-2.0"
] | 135 | 2017-06-12T20:39:34.000Z | 2022-03-15T13:42:30.000Z | #
# Copyright (c) 2013-2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 whic... | 32.454545 | 102 | 0.655462 | 175 | 1,428 | 5.2 | 0.52 | 0.053846 | 0.030769 | 0.03956 | 0.046154 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013193 | 0.203782 | 1,428 | 43 | 103 | 33.209302 | 0.787159 | 0.482493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.266667 | false | 0 | 0.2 | 0.133333 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
dd6ec625100836c1f63f5bb360401ef1403bd0b9 | 334 | py | Python | pycorrector/ccm_conf.py | ccm120/pycorrector | ba44731c7fdbdc2a5d367adc3f41c51d70b25ad9 | [
"Apache-2.0"
] | null | null | null | pycorrector/ccm_conf.py | ccm120/pycorrector | ba44731c7fdbdc2a5d367adc3f41c51d70b25ad9 | [
"Apache-2.0"
] | null | null | null | pycorrector/ccm_conf.py | ccm120/pycorrector | ba44731c7fdbdc2a5d367adc3f41c51d70b25ad9 | [
"Apache-2.0"
] | null | null | null | import os
pwd_path = os.path.abspath(os.path.dirname(__file__))
# 领导人排序
name_sort_path = os.path.join(pwd_path, 'data/LSQLIB.txt')
leader_job_path = os.path.join(pwd_path, 'data/LNDLIB.txt')
quotation_word_path = os.path.join(pwd_path, 'data/QTLIB.txt')
leader_job_freq_dict_path = os.path.join(pwd_path, 'data/leader_j... | 37.111111 | 78 | 0.778443 | 60 | 334 | 3.983333 | 0.366667 | 0.150628 | 0.209205 | 0.23431 | 0.41841 | 0.41841 | 0.41841 | 0 | 0 | 0 | 0 | 0 | 0.071856 | 334 | 8 | 79 | 41.75 | 0.770968 | 0.01497 | 0 | 0 | 0 | 0 | 0.207951 | 0.073395 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 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 | 0 | 0 | 0 | 0 | 3 |
dd85080a0bc8d6a48b7d2f5ab49e00fd0d1ac003 | 357 | py | Python | appdigiconsult/models.py | leandrocaprara/DigiConsult | 3a57c56203584414910711fce1639b8e90292de8 | [
"MIT"
] | 1 | 2020-04-23T21:38:57.000Z | 2020-04-23T21:38:57.000Z | appdigiconsult/models.py | leandrocaprara/digiconsult | 3a57c56203584414910711fce1639b8e90292de8 | [
"MIT"
] | null | null | null | appdigiconsult/models.py | leandrocaprara/digiconsult | 3a57c56203584414910711fce1639b8e90292de8 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Pacientes(models.Model):
nome = models.CharField(max_length=50, blank=False, null=True, verbose_name=u'Nome')
cpf = models.CharField(max_length=11, blank=False, null=True, verbose_name=u'CPF')
class Meta:
ordering = ['-pk']
def __... | 27.461538 | 88 | 0.689076 | 51 | 357 | 4.666667 | 0.627451 | 0.12605 | 0.151261 | 0.201681 | 0.252101 | 0.252101 | 0.252101 | 0 | 0 | 0 | 0 | 0.013793 | 0.187675 | 357 | 13 | 89 | 27.461538 | 0.806897 | 0.067227 | 0 | 0 | 0 | 0 | 0.03012 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0.125 | 0.875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
06c33ba56d1335eaa0535e91062f8dd090c895b1 | 928 | py | Python | pipeline/output_pipeline.py | Forestjylee/scut_spider | 8b37f4d714da0dd93451f22cabbc05acfd40b129 | [
"MIT"
] | 1 | 2019-04-20T03:39:14.000Z | 2019-04-20T03:39:14.000Z | pipeline/output_pipeline.py | Forest75/scut_spider | 8b37f4d714da0dd93451f22cabbc05acfd40b129 | [
"MIT"
] | 2 | 2021-03-31T19:12:04.000Z | 2021-12-13T20:02:09.000Z | pipeline/output_pipeline.py | Forest75/scut_spider | 8b37f4d714da0dd93451f22cabbc05acfd40b129 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
爬取信息输出管道
@file: output_pipeline.py
@time: 2019/4/18 15:50
Created by Junyi
"""
from pprint import pprint
from pipeline.mongo_pipeline import MongoPipeline
class OutputPipeline(object):
"""
输出管道实现类
注意:
由于可能用于多进程环境下执行,
若需要保存到文件中则需使用文件锁保证同步,
推荐保存在数据库中
"""
def _... | 18.938776 | 81 | 0.577586 | 94 | 928 | 5.531915 | 0.585106 | 0.092308 | 0.042308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018663 | 0.307112 | 928 | 48 | 82 | 19.333333 | 0.790047 | 0.283405 | 0 | 0 | 0 | 0 | 0.024762 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0.071429 | 0.142857 | 0 | 0.571429 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
06ce9278cc07bbef718f5e3ea868339fc1df5a03 | 1,297 | py | Python | tasks/patched-python/goldreich.py | HackerDom/qctf-starter-2018 | f4eef0fd41d777661b9fbcc61dcee9709d9f6268 | [
"MIT"
] | 8 | 2018-03-15T12:07:11.000Z | 2020-12-01T15:02:46.000Z | tasks/patched-python/goldreich.py | HackerDom/qctf-starter-2018 | f4eef0fd41d777661b9fbcc61dcee9709d9f6268 | [
"MIT"
] | 17 | 2020-01-28T22:17:42.000Z | 2022-03-11T23:18:09.000Z | tasks/patched-python/goldreich.py | HackerDom/qctf-starter-2018 | f4eef0fd41d777661b9fbcc61dcee9709d9f6268 | [
"MIT"
] | 2 | 2018-11-26T18:54:27.000Z | 2018-12-05T17:37:32.000Z | import itertools
import random
N = 128
D = 10
SEED = 'substitutethis'
def generate_subsets(n, d):
S = []
indices = range(n)
for _ in range(n):
S.append(sorted(random.sample(indices, d)))
return S
def construct_predicate(true_arguments):
def predicate(bit_string):
return '1' if ... | 21.262295 | 84 | 0.645335 | 175 | 1,297 | 4.571429 | 0.297143 | 0.09 | 0.075 | 0.0425 | 0.085 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01503 | 0.230532 | 1,297 | 60 | 85 | 21.616667 | 0.786573 | 0 | 0 | 0 | 1 | 0 | 0.029298 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.05 | 0.125 | 0.55 | 0.025 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
06d3c9f400026590f5e0754966f027e1bd11995d | 88 | py | Python | unitext/parsers/__init__.py | evfredericksen/unitext | 36569c05a2406325169f1faa834128aa98e609ce | [
"MIT"
] | null | null | null | unitext/parsers/__init__.py | evfredericksen/unitext | 36569c05a2406325169f1faa834128aa98e609ce | [
"MIT"
] | null | null | null | unitext/parsers/__init__.py | evfredericksen/unitext | 36569c05a2406325169f1faa834128aa98e609ce | [
"MIT"
] | null | null | null | from unitext.parsers.plaintext.obj import PlainTextParser
__all__ = ['PlainTextParser'] | 29.333333 | 57 | 0.829545 | 9 | 88 | 7.666667 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079545 | 88 | 3 | 58 | 29.333333 | 0.851852 | 0 | 0 | 0 | 0 | 0 | 0.168539 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
66068daf75504bafd2c282ec0a888218cc5197b3 | 559 | py | Python | data/train/python/66068daf75504bafd2c282ec0a888218cc5197b3DTMLDocument.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/66068daf75504bafd2c282ec0a888218cc5197b3DTMLDocument.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/66068daf75504bafd2c282ec0a888218cc5197b3DTMLDocument.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from App.special_dtml import DTMLFile
from OFS.DTMLDocument import DTMLDocument
from Products.ERP5Type import _dtmldir
# Patch for displaying textearea in full window instead of
# remembering a quantity of lines to display in a cookie
manage_editForm = DTMLFile("documentEdit", _dtmldir)
manage_editForm._setName('manag... | 39.928571 | 58 | 0.856887 | 69 | 559 | 6.710145 | 0.478261 | 0.302376 | 0.280778 | 0.345572 | 0.233261 | 0.233261 | 0.233261 | 0 | 0 | 0 | 0 | 0.00198 | 0.096601 | 559 | 13 | 59 | 43 | 0.914851 | 0.198569 | 0 | 0.2 | 0 | 0 | 0.060674 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.3 | 0 | 0.3 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
661afce764cb7537e7297dd08a1953fdb0618077 | 254 | py | Python | Imagens/admin.py | luigiMinardi/dive_code_alura | c7163e20a565d6aef3cb47bc67462495d9ad7c7f | [
"MIT"
] | null | null | null | Imagens/admin.py | luigiMinardi/dive_code_alura | c7163e20a565d6aef3cb47bc67462495d9ad7c7f | [
"MIT"
] | null | null | null | Imagens/admin.py | luigiMinardi/dive_code_alura | c7163e20a565d6aef3cb47bc67462495d9ad7c7f | [
"MIT"
] | null | null | null | from django.contrib import admin
from Imagens.models import Imagem
class ListandoImagens(admin.ModelAdmin):
list_display = ('id', 'descricao', 'foto', 'data')
list_display_link = ('id', 'descricao')
admin.site.register(Imagem, ListandoImagens)
| 28.222222 | 53 | 0.744094 | 30 | 254 | 6.2 | 0.666667 | 0.11828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125984 | 254 | 8 | 54 | 31.75 | 0.837838 | 0 | 0 | 0 | 0 | 0 | 0.11811 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
66407a6e799f64c6a2b7f44b945e9f5275cce49a | 227 | py | Python | reviews/get_page.py | YakhyaevRasul/the-voice.uz | 9abe0030c2fca39b5b11641ccf97ff8469785fe6 | [
"MIT"
] | null | null | null | reviews/get_page.py | YakhyaevRasul/the-voice.uz | 9abe0030c2fca39b5b11641ccf97ff8469785fe6 | [
"MIT"
] | null | null | null | reviews/get_page.py | YakhyaevRasul/the-voice.uz | 9abe0030c2fca39b5b11641ccf97ff8469785fe6 | [
"MIT"
] | null | null | null | import requests
from fb_page_access_token import page_access_token
rating = requests.get('https://graph.facebook.com/v12.0/{page-id}/ratings/',
headers = {'Authorization': f"Bearer {page_access_token}"}) | 45.4 | 81 | 0.704846 | 30 | 227 | 5.1 | 0.7 | 0.196078 | 0.294118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015789 | 0.162996 | 227 | 5 | 81 | 45.4 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0.394737 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 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 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.