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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e74ac464fe1bba7963b3d165762b15c0880cdba8 | 285 | py | Python | library/components/JobModule.py | OpenSpaceProgram/pyOSP | aac6f7bcdce6c164e23fc00eeaf39415c64b0282 | [
"MIT"
] | null | null | null | library/components/JobModule.py | OpenSpaceProgram/pyOSP | aac6f7bcdce6c164e23fc00eeaf39415c64b0282 | [
"MIT"
] | null | null | null | library/components/JobModule.py | OpenSpaceProgram/pyOSP | aac6f7bcdce6c164e23fc00eeaf39415c64b0282 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import defaultdict
class JobModule(object):
specification = defaultdict(list)
def __init__(self, specification):
super(JobModule, self).__init__()
self.specification = specification
def run(self):
return | 20.357143 | 42 | 0.666667 | 28 | 285 | 6.5 | 0.642857 | 0.087912 | 0.230769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004545 | 0.22807 | 285 | 14 | 43 | 20.357143 | 0.822727 | 0.073684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.125 | 0.125 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
e75c64ae9c0b7ebfc8d2fa91d981422c412a2cb7 | 91 | py | Python | addons/s3compatinstitutions/__init__.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 11 | 2018-12-11T16:39:40.000Z | 2022-02-26T09:51:32.000Z | addons/s3compatinstitutions/__init__.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 52 | 2018-04-13T05:03:21.000Z | 2022-03-22T02:56:19.000Z | addons/s3compatinstitutions/__init__.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 16 | 2018-07-09T01:44:51.000Z | 2021-06-30T01:57:16.000Z | default_app_config = 'addons.s3compatinstitutions.apps.S3CompatInstitutionsAddonAppConfig'
| 45.5 | 90 | 0.901099 | 7 | 91 | 11.428571 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022727 | 0.032967 | 91 | 1 | 91 | 91 | 0.886364 | 0 | 0 | 0 | 0 | 0 | 0.736264 | 0.736264 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
e78abf9c24bc42143d2a4f1475eb12e8d10ac8d5 | 509 | py | Python | exams/2016/2_newton.py | JoaoCostaIFG/MNUM | 6e042d8a6f64feb9eae9c79afec2fbab51f46fbd | [
"MIT"
] | 1 | 2019-12-07T10:34:30.000Z | 2019-12-07T10:34:30.000Z | exams/2016/2_newton.py | JoaoCostaIFG/MNUM | 6e042d8a6f64feb9eae9c79afec2fbab51f46fbd | [
"MIT"
] | null | null | null | exams/2016/2_newton.py | JoaoCostaIFG/MNUM | 6e042d8a6f64feb9eae9c79afec2fbab51f46fbd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
a = 1.2
b = 1.0
def f(x, y):
return x**2 - y - a
def fx(x, y):
return 2 * x
def fy(x, y):
return -1
def g(x, y):
return -x + y**2 - b
def gx(x, y):
return -1
def gy(x, y):
return 2 * y
x = 1
y = 1
for i in range(2):
denom = fx(x, y) * gy(x, y) - gx(x, y) * fy(x, y)
nx = x - (f(x, y) * gy(x, y) - g(x, y) * fy(x, y)) / denom
ny = y - (g(x, y) * fx(x, y) - f(x, y) * gx(x, y)) / denom
x = nx
y = ny
print("x:", x, "y:", y)
| 12.414634 | 62 | 0.408644 | 115 | 509 | 1.808696 | 0.234783 | 0.192308 | 0.230769 | 0.086538 | 0.269231 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042683 | 0.355599 | 509 | 40 | 63 | 12.725 | 0.591463 | 0.041257 | 0 | 0.086957 | 0 | 0 | 0.008214 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.26087 | false | 0 | 0 | 0.26087 | 0.521739 | 0.043478 | 0 | 0 | 1 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
e7c5f1e7abe6285f4222e51c4c3b3dae3a52c358 | 78 | py | Python | server/__init__.py | Hexliath/zigbee-defender | 98160047b67f716f596169dd2c6874e0cfef3366 | [
"MIT"
] | null | null | null | server/__init__.py | Hexliath/zigbee-defender | 98160047b67f716f596169dd2c6874e0cfef3366 | [
"MIT"
] | 3 | 2020-01-28T22:41:55.000Z | 2020-11-13T18:11:36.000Z | server/__init__.py | Hexliath/zigbee-defender | 98160047b67f716f596169dd2c6874e0cfef3366 | [
"MIT"
] | null | null | null | from controller.CDatabase import *
from controller.CServer import *
CServer() | 19.5 | 34 | 0.807692 | 9 | 78 | 7 | 0.555556 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 78 | 4 | 35 | 19.5 | 0.913043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
99af8aa7bec63ad0616179c204cd29ff3167d243 | 49 | py | Python | test.py | wnetel/helloworld | 287a913a54a5fed961c9ab70f14fcc8f4d2e813a | [
"MIT"
] | 1 | 2021-07-12T16:41:26.000Z | 2021-07-12T16:41:26.000Z | test.py | wnetel/helloworld | 287a913a54a5fed961c9ab70f14fcc8f4d2e813a | [
"MIT"
] | 3 | 2019-07-23T01:11:11.000Z | 2019-07-23T01:12:36.000Z | test.py | wnetel/helloworld | 287a913a54a5fed961c9ab70f14fcc8f4d2e813a | [
"MIT"
] | 3 | 2021-01-15T11:19:36.000Z | 2021-09-16T07:20:52.000Z | import azhelloworldpackage as h
h.helloworld() | 16.333333 | 32 | 0.795918 | 6 | 49 | 6.5 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 49 | 3 | 33 | 16.333333 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
99ef2166af348566a8234be5fbedddfa8c5c5206 | 346 | py | Python | space_app/api/views.py | Shuzhengz/nasa-spaceapps-2021 | 71ac8130b36ce150b2952ce31d95b61c8316249f | [
"MIT"
] | null | null | null | space_app/api/views.py | Shuzhengz/nasa-spaceapps-2021 | 71ac8130b36ce150b2952ce31d95b61c8316249f | [
"MIT"
] | null | null | null | space_app/api/views.py | Shuzhengz/nasa-spaceapps-2021 | 71ac8130b36ce150b2952ce31d95b61c8316249f | [
"MIT"
] | 1 | 2021-10-02T23:57:29.000Z | 2021-10-02T23:57:29.000Z | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import permissions
class InitialApiView(APIView):
permission_classes = [permissions.AllowAny]
def get(self, request, *args, **kwargs):
return Response("Hello!", status=status.HTTP_200_OK)
| 31.454545 | 60 | 0.789017 | 43 | 346 | 6.186047 | 0.581395 | 0.120301 | 0.255639 | 0.172932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010033 | 0.135838 | 346 | 10 | 61 | 34.6 | 0.879599 | 0 | 0 | 0 | 0 | 0 | 0.017341 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.5 | 0.125 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 5 |
99fabab34002d6ee10227927055e7897ddc549e4 | 67 | py | Python | testplan/common/report/__init__.py | chiragmatkar/testplan | 13ee4fdeaaa41d8eea118d77921531277ef90147 | [
"Apache-2.0"
] | 96 | 2018-03-14T13:14:50.000Z | 2021-01-14T08:26:08.000Z | testplan/common/report/__init__.py | chiragmatkar/testplan | 13ee4fdeaaa41d8eea118d77921531277ef90147 | [
"Apache-2.0"
] | 135 | 2018-06-28T02:41:05.000Z | 2021-01-19T02:16:58.000Z | testplan/common/report/__init__.py | chiragmatkar/testplan | 13ee4fdeaaa41d8eea118d77921531277ef90147 | [
"Apache-2.0"
] | 53 | 2018-03-17T14:39:15.000Z | 2021-01-21T10:54:13.000Z | from .base import Report, ReportGroup, ExceptionLogger, MergeError
| 33.5 | 66 | 0.835821 | 7 | 67 | 8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104478 | 67 | 1 | 67 | 67 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8203b8add9eea56110ed2fd2a827153f2e83055c | 221 | py | Python | spear/labeling/__init__.py | decile-team/spear | 8f8641927325090f85af7a86bc8a5795ea4c3da9 | [
"MIT"
] | 89 | 2021-06-14T17:38:30.000Z | 2022-03-31T05:16:26.000Z | spear/labeling/__init__.py | harshading/spear | 7629cc46ce738a4a67e5b4a6ba7d1935c4833421 | [
"MIT"
] | null | null | null | spear/labeling/__init__.py | harshading/spear | 7629cc46ce738a4a67e5b4a6ba7d1935c4833421 | [
"MIT"
] | 7 | 2021-06-14T17:38:32.000Z | 2021-12-25T22:44:45.000Z | from .lf_set import LFSet
from .analysis import LFAnalysis
from .preprocess import preprocessor
from .prelabels import PreLabels
from .lf import labeling_function, ABSTAIN
from .continuous_scoring import continuous_scorer | 36.833333 | 49 | 0.859729 | 29 | 221 | 6.413793 | 0.551724 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108597 | 221 | 6 | 49 | 36.833333 | 0.944162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
415ecb0f251b201ca2b59c903c0a013efbd275ce | 48 | py | Python | wxobslog/__main__.py | dougives/wxobslog | 0f2e06a156827d5d74712293d02a93924c38ad0d | [
"MIT"
] | null | null | null | wxobslog/__main__.py | dougives/wxobslog | 0f2e06a156827d5d74712293d02a93924c38ad0d | [
"MIT"
] | 1 | 2019-05-08T20:52:11.000Z | 2019-05-08T20:52:11.000Z | wxobslog/__main__.py | dougives/wxobslog | 0f2e06a156827d5d74712293d02a93924c38ad0d | [
"MIT"
] | null | null | null | from wxobslog.wxobslog import main
exit(main()) | 16 | 34 | 0.791667 | 7 | 48 | 5.428571 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104167 | 48 | 3 | 35 | 16 | 0.883721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
418f9e2688e9f624d788ad26345bb2e4713841ad | 33 | py | Python | Lib/test/test_import/data/circular_imports/use.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 52,316 | 2015-01-01T15:56:25.000Z | 2022-03-31T23:19:01.000Z | Lib/test/test_import/data/circular_imports/use.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 25,286 | 2015-03-03T23:18:02.000Z | 2022-03-31T23:17:27.000Z | Lib/test/test_import/data/circular_imports/use.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 31,623 | 2015-01-01T13:29:37.000Z | 2022-03-31T19:55:06.000Z | from . import source
source.spam
| 11 | 20 | 0.787879 | 5 | 33 | 5.2 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.151515 | 33 | 2 | 21 | 16.5 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
68c40bcc8edea48ee1e8eb84469dee32ef92fea5 | 59 | py | Python | api/__init__.py | kinpa200296/cmdpy | 3ce1e2c2c8803ad296d9b7c3ac0be5100938632e | [
"MIT"
] | null | null | null | api/__init__.py | kinpa200296/cmdpy | 3ce1e2c2c8803ad296d9b7c3ac0be5100938632e | [
"MIT"
] | null | null | null | api/__init__.py | kinpa200296/cmdpy | 3ce1e2c2c8803ad296d9b7c3ac0be5100938632e | [
"MIT"
] | null | null | null | from decorators import cmd_completer, cmd_func, cmd_helper
| 29.5 | 58 | 0.864407 | 9 | 59 | 5.333333 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.101695 | 59 | 1 | 59 | 59 | 0.90566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
ec50710890641cde8a7c3b9c1abd930db9ff68e8 | 100 | py | Python | word/__init__.py | wu546300070/weiboanalysis | 10a72d1f6f87312090be845a8041849afe3b5132 | [
"Apache-2.0"
] | 685 | 2018-01-09T09:13:43.000Z | 2022-03-31T07:46:58.000Z | word/__init__.py | wu546300070/weiboanalysis | 10a72d1f6f87312090be845a8041849afe3b5132 | [
"Apache-2.0"
] | 9 | 2018-05-27T07:35:03.000Z | 2022-03-07T09:13:57.000Z | word/__init__.py | wu546300070/weiboanalysis | 10a72d1f6f87312090be845a8041849afe3b5132 | [
"Apache-2.0"
] | 199 | 2018-03-11T13:12:52.000Z | 2022-03-16T14:40:10.000Z | # 这个包用于编写处理文本的对象与函数
from .count import word_count
from .cut import CUT_METHODS
from .mood import *
| 16.666667 | 29 | 0.8 | 14 | 100 | 5.571429 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 100 | 5 | 30 | 20 | 0.917647 | 0.17 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
6b7d164dc636ca235025f0716d94c15361354a9a | 377 | py | Python | tests/fixtures/profile.py | artsalliancemedia/awsome | 44ece661e89aad61d753886620695712843f2755 | [
"MIT"
] | 1 | 2017-06-08T10:35:00.000Z | 2017-06-08T10:35:00.000Z | tests/fixtures/profile.py | artsalliancemedia/awsome | 44ece661e89aad61d753886620695712843f2755 | [
"MIT"
] | null | null | null | tests/fixtures/profile.py | artsalliancemedia/awsome | 44ece661e89aad61d753886620695712843f2755 | [
"MIT"
] | null | null | null | import pytest
from tests.fixtures import stub_file
@pytest.fixture
def yaml_config(request):
return stub_file(request, "commands:\n - a:\n vpc-id: {{ vpc }}")
@pytest.fixture
def yaml_profile(request):
return stub_file(request, "# A comment\nvpc: a\ngroup: { ci: { test: b } }")
@pytest.fixture
def yaml_profile_empty(request):
return stub_file(request, "")
| 19.842105 | 78 | 0.702918 | 54 | 377 | 4.759259 | 0.481481 | 0.124514 | 0.18677 | 0.233463 | 0.536965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.156499 | 377 | 18 | 79 | 20.944444 | 0.808176 | 0 | 0 | 0.272727 | 0 | 0 | 0.236074 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.272727 | false | 0 | 0.181818 | 0.272727 | 0.727273 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
6bc5635bf1f57de4b798b2e590e6c636e8652ef0 | 143 | py | Python | adb-file-transfer/src/service/transfer_service.py | Pippinrao/cautious-dollop | 138e1f7743a02334889bebadf2d414609640c724 | [
"Apache-2.0"
] | null | null | null | adb-file-transfer/src/service/transfer_service.py | Pippinrao/cautious-dollop | 138e1f7743a02334889bebadf2d414609640c724 | [
"Apache-2.0"
] | 1 | 2021-12-22T17:54:59.000Z | 2021-12-22T17:54:59.000Z | adb-file-transfer/src/service/transfer_service.py | Pippinrao/cautious-dollop | 138e1f7743a02334889bebadf2d414609640c724 | [
"Apache-2.0"
] | null | null | null | import os.path
class Service:
def __init__(self):
pass
def get_item_of_addr(self, addr: os.path) -> list[str]:
pass
| 14.3 | 59 | 0.608392 | 21 | 143 | 3.809524 | 0.714286 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.286713 | 143 | 9 | 60 | 15.888889 | 0.784314 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.333333 | 0.166667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 5 |
6be75cfefa0d585c991d82dcf02b70260357bf01 | 354 | py | Python | Exercicios/ex023COLORIDO.py | LeleCastanheira/cursoemvideo-python | 38f4c0613aa1f5d7385aee842db9aaaafb957a72 | [
"MIT"
] | null | null | null | Exercicios/ex023COLORIDO.py | LeleCastanheira/cursoemvideo-python | 38f4c0613aa1f5d7385aee842db9aaaafb957a72 | [
"MIT"
] | null | null | null | Exercicios/ex023COLORIDO.py | LeleCastanheira/cursoemvideo-python | 38f4c0613aa1f5d7385aee842db9aaaafb957a72 | [
"MIT"
] | null | null | null | n = int(input('Informe um número inteiro: '))
print('Analisando o núemro...')
print('{}Unidade: {}{}'.format('\033[1;4;36m', n//1%10, '\033[m'))
print('{}Dezena: {}{}'.format('\033[1;4;7;36m', n//10%10, '\033[m'))
print('{}Centena: {}{}'.format('\033[1;4;36m', n//100%10, '\033[m'))
print('{}Milhar: {}{}'.format('\033[1;4;7;36m', n//1000%10, '\033[m'))
| 50.571429 | 70 | 0.550847 | 61 | 354 | 3.196721 | 0.409836 | 0.184615 | 0.205128 | 0.225641 | 0.317949 | 0.317949 | 0.164103 | 0 | 0 | 0 | 0 | 0.182927 | 0.073446 | 354 | 6 | 71 | 59 | 0.411585 | 0 | 0 | 0 | 0 | 0 | 0.516949 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.833333 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
6be7d6d1d6de2f0a057cb88e9f7d7e6dd8cd4ad8 | 49 | py | Python | pyvino/__init__.py | hampen2929/openvino-python | 276760a54b8a8e5c96f63a8e7899d6bc02dae8c9 | [
"Apache-2.0"
] | 62 | 2019-08-21T23:34:52.000Z | 2021-05-18T21:47:05.000Z | pyvino/__init__.py | hampen2929/openvino-python | 276760a54b8a8e5c96f63a8e7899d6bc02dae8c9 | [
"Apache-2.0"
] | 15 | 2019-08-19T15:03:57.000Z | 2022-01-25T13:45:10.000Z | pyvino/__init__.py | hampen2929/openvino-python | 276760a54b8a8e5c96f63a8e7899d6bc02dae8c9 | [
"Apache-2.0"
] | 16 | 2019-08-31T03:48:44.000Z | 2021-08-08T19:14:57.000Z | # from .model import build_object_detection_model | 49 | 49 | 0.877551 | 7 | 49 | 5.714286 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081633 | 49 | 1 | 49 | 49 | 0.888889 | 0.959184 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
6bef0072072d1ecf195cf7da199dcb6018073c6a | 1,727 | py | Python | tests/routers/reports/test_reports_time.py | upwork/python-upwork | 63aa5ebfd91cbf6f019437358f3e89d0e3bc29aa | [
"Apache-2.0"
] | 150 | 2015-05-28T19:09:33.000Z | 2022-03-22T16:56:33.000Z | tests/routers/reports/test_reports_time.py | Top-coder-1/python-upwork | 0671e1e90cc2d770be4f96ae4bfb21bc111dd122 | [
"Apache-2.0"
] | 38 | 2015-05-28T18:45:55.000Z | 2021-06-14T09:34:27.000Z | tests/routers/reports/test_reports_time.py | upwork/python-upwork-oauth2 | 5a10558a5c4479e7aea462fec0193db40ecde9e2 | [
"Apache-2.0"
] | 61 | 2015-09-01T06:39:25.000Z | 2021-11-09T12:29:57.000Z | import upwork
from upwork.routers.reports import time
from unittest.mock import patch
def test_entry_point():
assert time.Gds.entry_point == "gds"
@patch.object(upwork.Client, "get")
def test_get_by_team_full(mocked_method):
time.Gds(upwork.Client).get_by_team_full("company", "team", {"a": "b"})
mocked_method.assert_called_with(
"/timereports/v1/companies/company/teams/team", {"a": "b"}
)
@patch.object(upwork.Client, "get")
def test_get_by_team_limited(mocked_method):
time.Gds(upwork.Client).get_by_team_limited("company", "team", {"a": "b"})
mocked_method.assert_called_with(
"/timereports/v1/companies/company/teams/team/hours", {"a": "b"}
)
@patch.object(upwork.Client, "get")
def test_get_by_agency(mocked_method):
time.Gds(upwork.Client).get_by_agency("company", "agency", {"a": "b"})
mocked_method.assert_called_with(
"/timereports/v1/companies/company/agencies/agency", {"a": "b"}
)
@patch.object(upwork.Client, "get")
def test_get_by_company(mocked_method):
time.Gds(upwork.Client).get_by_company("company", {"a": "b"})
mocked_method.assert_called_with("/timereports/v1/companies/company", {"a": "b"})
@patch.object(upwork.Client, "get")
def test_get_by_freelancer_limited(mocked_method):
time.Gds(upwork.Client).get_by_freelancer_limited("freelancer", {"a": "b"})
mocked_method.assert_called_with(
"/timereports/v1/providers/freelancer/hours", {"a": "b"}
)
@patch.object(upwork.Client, "get")
def test_get_by_freelancer_full(mocked_method):
time.Gds(upwork.Client).get_by_freelancer_full("freelancer", {"a": "b"})
mocked_method.assert_called_with("/timereports/v1/providers/freelancer", {"a": "b"})
| 33.211538 | 88 | 0.710481 | 240 | 1,727 | 4.841667 | 0.158333 | 0.123924 | 0.154905 | 0.118761 | 0.827883 | 0.827883 | 0.827883 | 0.827883 | 0.765921 | 0.598967 | 0 | 0.003932 | 0.116387 | 1,727 | 51 | 89 | 33.862745 | 0.757536 | 0 | 0 | 0.27027 | 0 | 0 | 0.209033 | 0.147076 | 0 | 0 | 0 | 0 | 0.189189 | 1 | 0.189189 | false | 0 | 0.081081 | 0 | 0.27027 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 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 | 5 |
d41986ca2ce70291fb5555a890c3b9edc64b1da6 | 199 | py | Python | apis_core/apis_metainfo/admin.py | acdh-oeaw/apis-core | f7ece05eec46c820321fd28d3e947653dcb98ae7 | [
"MIT"
] | 11 | 2018-07-11T18:11:40.000Z | 2022-03-25T11:07:12.000Z | apis_core/apis_metainfo/admin.py | acdh-oeaw/apis-core | f7ece05eec46c820321fd28d3e947653dcb98ae7 | [
"MIT"
] | 309 | 2018-06-11T08:38:50.000Z | 2022-03-31T13:45:22.000Z | apis_core/apis_metainfo/admin.py | acdh-oeaw/apis-core | f7ece05eec46c820321fd28d3e947653dcb98ae7 | [
"MIT"
] | 5 | 2017-08-21T10:37:07.000Z | 2021-09-27T19:08:47.000Z | from django.contrib import admin
from .models import Source, Collection, Text, Uri
admin.site.register(Source)
admin.site.register(Collection)
admin.site.register(Text)
admin.site.register(Uri)
| 16.583333 | 49 | 0.79397 | 28 | 199 | 5.642857 | 0.428571 | 0.227848 | 0.43038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.100503 | 199 | 11 | 50 | 18.090909 | 0.882682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
d41f96d206fb99d6c4b26c37767b792916cb3102 | 86 | py | Python | Object Oriented Programming/monopoly/die.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | Object Oriented Programming/monopoly/die.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | Object Oriented Programming/monopoly/die.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | class Die:
def __init__(self, face_count=6):
self.face_count = face_count
| 21.5 | 37 | 0.674419 | 13 | 86 | 3.923077 | 0.615385 | 0.529412 | 0.509804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015152 | 0.232558 | 86 | 3 | 38 | 28.666667 | 0.757576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
d4321be5d09f44c6a68dfd3e3506760fa6657728 | 145 | py | Python | facturador/contabilidad/admin.py | crodriguezud/Facturador | 1a1e08072ae1d54f3f7963cdd202444618a0fa2e | [
"Apache-2.0"
] | null | null | null | facturador/contabilidad/admin.py | crodriguezud/Facturador | 1a1e08072ae1d54f3f7963cdd202444618a0fa2e | [
"Apache-2.0"
] | 9 | 2020-06-05T17:25:18.000Z | 2022-03-11T23:15:36.000Z | facturador/contabilidad/admin.py | crodriguezud/Facturador | 1a1e08072ae1d54f3f7963cdd202444618a0fa2e | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Factura, FacturaProducto
admin.site.register(Factura)
admin.site.register(FacturaProducto) | 24.166667 | 44 | 0.841379 | 18 | 145 | 6.777778 | 0.555556 | 0.147541 | 0.278689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082759 | 145 | 6 | 45 | 24.166667 | 0.917293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
d43a16562b4ed3008cd00db1e9c75d44fcee50b9 | 95 | py | Python | lichess_client/helpers/__init__.py | amrout/lichess_python_SDK | 1e2a545b65111bfc58bb963c44ad56be9b4d0835 | [
"Apache-2.0"
] | 8 | 2020-03-14T23:01:59.000Z | 2021-04-02T16:02:32.000Z | lichess_client/helpers/__init__.py | amrout/lichess_python_SDK | 1e2a545b65111bfc58bb963c44ad56be9b4d0835 | [
"Apache-2.0"
] | 13 | 2020-03-08T23:38:53.000Z | 2020-03-14T20:51:16.000Z | lichess_client/helpers/__init__.py | amrout/lichess_python_SDK | 1e2a545b65111bfc58bb963c44ad56be9b4d0835 | [
"Apache-2.0"
] | 7 | 2020-04-11T16:54:43.000Z | 2021-07-18T21:24:15.000Z | from lichess_client.helpers.response_helpers import Response, ResponseEntity, ResponseMetadata
| 47.5 | 94 | 0.894737 | 10 | 95 | 8.3 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.063158 | 95 | 1 | 95 | 95 | 0.932584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d43a1e4aa504298863f26792e5ade706130c7fdb | 6,637 | py | Python | Intenprete/src/parsetab.py | cdossow/Interprete | 0ced93a82aabbb5ab420a6cb522fbc843b4087fa | [
"Apache-2.0"
] | null | null | null | Intenprete/src/parsetab.py | cdossow/Interprete | 0ced93a82aabbb5ab420a6cb522fbc843b4087fa | [
"Apache-2.0"
] | null | null | null | Intenprete/src/parsetab.py | cdossow/Interprete | 0ced93a82aabbb5ab420a6cb522fbc843b4087fa | [
"Apache-2.0"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
_lr_method = 'LALR'
_lr_signature = '\x16=\x8bH\xd4S7k\x9e\xb0\x98=g\x1f\xe7['
_lr_action_items = {'NUMBER':([2,9,11,24,28,30,39,41,42,43,44,45,46,47,48,49,50,51,52,53,],[-8,-7,18,18,33,18,18,18,-31,18,-29,18,-30,18,-26,18,-27,-25,18,-28,]),'MINUS':([18,36,38,],[-36,51,-35,]),'DOT':([18,21,22,25,32,33,34,37,54,56,57,58,59,60,61,],[-36,-35,27,31,-10,-9,40,-18,-17,-20,-23,-21,-24,-22,-19,]),'GTE':([18,36,38,],[-36,44,-35,]),'LPARENT':([1,5,35,38,],[11,-32,41,-32,]),'EQUALITY':([18,36,38,],[-36,43,-35,]),'DYNAMIC':([2,3,9,],[-8,12,-7,]),'LT':([18,36,38,],[-36,46,-35,]),'INEQUALITY':([18,36,38,],[-36,47,-35,]),'PLUS':([18,36,38,],[-36,48,-35,]),'RPARENT':([18,19,20,21,29,55,],[-36,-34,25,-35,-33,61,]),'COMMA':([18,19,20,21,22,29,32,33,34,37,54,55,56,57,58,59,60,61,],[-36,-34,24,-35,26,24,26,-9,39,-18,39,24,-20,-23,-21,-24,-22,-19,]),'ASSIGN':([0,4,7,8,10,17,18,25,27,31,36,38,40,],[9,-2,9,-4,-3,9,-36,30,-6,-15,9,-35,-16,]),'$end':([4,6,7,8,10,17,27,31,40,],[-2,0,-1,-4,-3,-5,-6,-15,-16,]),'GT':([18,36,38,],[-36,42,-35,]),'DIVIDE':([5,18,23,36,38,],[-32,-36,28,53,-35,]),'IS':([0,4,7,8,10,17,18,27,31,36,38,40,],[2,-2,2,-4,-3,2,-36,-6,-15,2,-35,-16,]),'TIMES':([18,36,38,],[-36,50,-35,]),'MULTIFILE':([2,3,9,],[-8,13,-7,]),'ID':([0,2,4,7,8,9,10,11,12,13,14,15,16,17,24,26,27,30,31,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,],[5,-8,-2,5,-4,-7,-3,21,-11,-13,-14,5,-12,5,21,5,-6,38,-15,38,-16,21,-31,21,-29,38,-30,21,-26,21,-27,-25,21,-28,]),'DISCONTIGUOUS':([2,3,9,],[-8,14,-7,]),'PUBLIC':([2,3,9,],[-8,16,-7,]),}
_lr_action = { }
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _lr_action.has_key(_x): _lr_action[_x] = { }
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'elements':([11,24,41,],[20,29,55,]),'goal':([30,39,],[34,54,]),'directive':([15,26,],[22,32,]),'factname':([0,7,15,17,26,30,39,45,],[1,1,23,1,23,35,35,35,]),'assing':([0,7,17,36,],[3,3,3,45,]),'rule':([0,7,17,],[4,4,4,]),'element':([11,24,30,39,41,43,45,47,49,52,],[19,19,36,36,19,56,36,58,59,60,]),'program':([0,],[6,]),'block':([0,7,17,],[7,17,17,]),'grules':([0,7,17,],[8,8,8,]),'goalRule':([30,39,45,],[37,37,57,]),'operator':([36,],[49,]),'property':([3,],[15,]),'check':([36,],[52,]),'fact':([0,7,17,],[10,10,10,]),}
_lr_goto = { }
for _k, _v in _lr_goto_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _lr_goto.has_key(_x): _lr_goto[_x] = { }
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S'",1,None,None,None),
('program',1,'p_program','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',23),
('block',1,'p_block1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',28),
('block',1,'p_block2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',32),
('block',1,'p_block3','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',36),
('block',2,'p_block4','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',40),
('grules',4,'p_grules1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',44),
('assing',1,'p_assing1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',49),
('assing',1,'p_assing2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',54),
('directive',3,'p_directive1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',59),
('directive',3,'p_directive2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',64),
('property',1,'p_property1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',69),
('property',1,'p_property2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',74),
('property',1,'p_property3','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',79),
('property',1,'p_property4','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',84),
('fact',5,'p_fact','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',89),
('rule',7,'p_rule','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',94),
('goal',3,'p_goal1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',99),
('goal',1,'p_goal2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',104),
('goalRule',4,'p_goalrule1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',110),
('goalRule',3,'p_goalrule2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',115),
('goalRule',3,'p_goalrule3','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',119),
('goalRule',3,'p_goalrule4','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',123),
('goalRule',3,'p_goalrule5','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',127),
('goalRule',3,'p_goalrule6','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',131),
('operator',1,'p_operator1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',135),
('operator',1,'p_operator2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',139),
('operator',1,'p_operator3','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',143),
('operator',1,'p_operator4','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',147),
('check',1,'p_check1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',151),
('check',1,'p_check2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',155),
('check',1,'p_check3','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',159),
('factname',1,'p_factname1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',163),
('elements',3,'p_elements1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',169),
('elements',1,'p_elements2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',174),
('element',1,'p_element1','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',179),
('element',1,'p_element2','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',184),
('empty',0,'p_empty','E:\\Workspace\\git\\Interprete\\Intenprete\\src\\analizadorSintactico.py',188),
]
| 100.560606 | 1,445 | 0.645322 | 1,071 | 6,637 | 3.904762 | 0.194211 | 0.088474 | 0.115017 | 0.203491 | 0.575323 | 0.557628 | 0.551889 | 0.540411 | 0.02726 | 0.02726 | 0 | 0.149976 | 0.044598 | 6,637 | 65 | 1,446 | 102.107692 | 0.509541 | 0.009342 | 0 | 0.035714 | 1 | 0 | 0.543191 | 0.415616 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
00fe82f64a900019bb7524995300e31d5077b78f | 66 | py | Python | zerokspot/recipe/__init__.py | zerok/zerokspot.gitrecipe | 41b73d688d52db3ce1569a41f9ba421921d84de3 | [
"BSD-3-Clause"
] | 3 | 2015-05-28T01:01:23.000Z | 2016-05-08T14:27:27.000Z | zerokspot/recipe/__init__.py | zerok/zerokspot.gitrecipe | 41b73d688d52db3ce1569a41f9ba421921d84de3 | [
"BSD-3-Clause"
] | 1 | 2016-01-28T16:40:20.000Z | 2016-02-01T13:48:12.000Z | zerokspot/recipe/__init__.py | zerok/zerokspot.gitrecipe | 41b73d688d52db3ce1569a41f9ba421921d84de3 | [
"BSD-3-Clause"
] | 3 | 2016-01-26T14:31:07.000Z | 2021-02-10T08:08:28.000Z | __import__('pkg_resources').declare_namespace('zerokspot.recipe')
| 33 | 65 | 0.833333 | 7 | 66 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015152 | 66 | 1 | 66 | 66 | 0.753846 | 0 | 0 | 0 | 0 | 0 | 0.439394 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2e2730789dfebd536c3d8fd0e044f08158db6609 | 177 | py | Python | dotfiles/thefuck/.config/thefuck/rules/pull.py | ianhomer/dotfiles | 29d25cf36625fdf7fc559a4b57f25b513f171205 | [
"Apache-2.0"
] | 6 | 2020-02-10T21:49:40.000Z | 2021-12-27T07:04:01.000Z | dotfiles/thefuck/.config/thefuck/rules/pull.py | ianhomer/dotfiles | 29d25cf36625fdf7fc559a4b57f25b513f171205 | [
"Apache-2.0"
] | 13 | 2020-07-23T21:03:58.000Z | 2021-08-08T09:38:09.000Z | dotfiles/thefuck/.config/thefuck/rules/pull.py | ianhomer/dotfiles | 29d25cf36625fdf7fc559a4b57f25b513f171205 | [
"Apache-2.0"
] | null | null | null | def match(command):
return "pull" in command.script and "set-upstream" in command.output
def get_new_command(command):
return "git push -u && git pull"
priority = 1
| 17.7 | 72 | 0.700565 | 27 | 177 | 4.518519 | 0.666667 | 0.213115 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006993 | 0.19209 | 177 | 9 | 73 | 19.666667 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0.220339 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.4 | 0.8 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 5 |
2e2b04364aa1544ebec412314a784316729d66fa | 45 | py | Python | pyseir/optimization/__init__.py | TomGoBravo/covid-data-model | 089e4e81db32befd6e86e4e105454629fd834ad2 | [
"MIT"
] | 5 | 2020-03-29T19:51:09.000Z | 2022-01-06T03:37:42.000Z | pyseir/optimization/__init__.py | paulirish/covid-data-model | b93ae5d598b8378f9c1f2698e3162f87136cde74 | [
"MIT"
] | null | null | null | pyseir/optimization/__init__.py | paulirish/covid-data-model | b93ae5d598b8378f9c1f2698e3162f87136cde74 | [
"MIT"
] | 4 | 2020-03-31T04:06:28.000Z | 2020-04-07T17:21:21.000Z | from .policy_optimizer import PolicyOptimizer | 45 | 45 | 0.911111 | 5 | 45 | 8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 45 | 1 | 45 | 45 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
2e51777681e924549c1ccba08f242515c4729084 | 157 | py | Python | schema_reg_viz/pydantic_models/pydantic_classes.py | Ycallaer/schema_registry_viz | dfd474445ff7f5188d92fca2091d3dcedf48106f | [
"MIT"
] | 1 | 2021-07-07T08:04:57.000Z | 2021-07-07T08:04:57.000Z | schema_reg_viz/pydantic_models/pydantic_classes.py | Ycallaer/schema_registry_viz | dfd474445ff7f5188d92fca2091d3dcedf48106f | [
"MIT"
] | null | null | null | schema_reg_viz/pydantic_models/pydantic_classes.py | Ycallaer/schema_registry_viz | dfd474445ff7f5188d92fca2091d3dcedf48106f | [
"MIT"
] | null | null | null | from pydantic import BaseModel
from typing import Optional
class VizTopicSubjectInput(BaseModel):
subjectname: str
persist: Optional[bool] = False
| 19.625 | 38 | 0.783439 | 17 | 157 | 7.235294 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.165605 | 157 | 7 | 39 | 22.428571 | 0.938931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2e7b3676d629745abdddcab92280c5e2ecd7cc30 | 148 | py | Python | herbieapp/initializers/abstract_initializer.py | merltron-pa/herbie-test | 2dd601ed09045fd109fde4f56c8412fd0fd0df11 | [
"MIT"
] | null | null | null | herbieapp/initializers/abstract_initializer.py | merltron-pa/herbie-test | 2dd601ed09045fd109fde4f56c8412fd0fd0df11 | [
"MIT"
] | 3 | 2020-12-14T12:03:48.000Z | 2021-06-30T10:57:00.000Z | herbieapp/initializers/abstract_initializer.py | merltron-pa/herbie-test | 2dd601ed09045fd109fde4f56c8412fd0fd0df11 | [
"MIT"
] | null | null | null |
class AbstractInitializer:
def get_name(self) -> str:
raise NotImplementedError
def init(self):
raise NotImplementedError | 18.5 | 33 | 0.682432 | 14 | 148 | 7.142857 | 0.714286 | 0.48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.256757 | 148 | 8 | 34 | 18.5 | 0.909091 | 0 | 0 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
5ced6a4bba63d707b93d7b240e2841c03b02065a | 37 | py | Python | tests/__init__.py | ranuzz/getsome | 27778a59305be00c00a9623af00f1181441f1a40 | [
"MIT"
] | 1 | 2022-01-19T18:50:10.000Z | 2022-01-19T18:50:10.000Z | tests/__init__.py | ranuzz/getsome | 27778a59305be00c00a9623af00f1181441f1a40 | [
"MIT"
] | null | null | null | tests/__init__.py | ranuzz/getsome | 27778a59305be00c00a9623af00f1181441f1a40 | [
"MIT"
] | null | null | null | """Unit test package for getsome."""
| 18.5 | 36 | 0.675676 | 5 | 37 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.135135 | 37 | 1 | 37 | 37 | 0.78125 | 0.810811 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
cf035f8c00755d3e6474bfef17982c354cf7e856 | 45 | py | Python | tests/test_color.py | dmxj/icv | 0b074ec9475f2c70038d2e8b7166414fd5b93e61 | [
"MIT"
] | 5 | 2019-09-10T04:02:19.000Z | 2020-07-24T07:46:08.000Z | tests/test_color.py | dmxj/icv | 0b074ec9475f2c70038d2e8b7166414fd5b93e61 | [
"MIT"
] | null | null | null | tests/test_color.py | dmxj/icv | 0b074ec9475f2c70038d2e8b7166414fd5b93e61 | [
"MIT"
] | 1 | 2020-03-20T03:44:04.000Z | 2020-03-20T03:44:04.000Z | from icv.vis.color import STANDARD_COLORS
| 9 | 41 | 0.8 | 7 | 45 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155556 | 45 | 4 | 42 | 11.25 | 0.921053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
cf373f4aab6a196820458471b0675bb29269ebed | 3,693 | py | Python | bioimageit_core/metadata/query.py | bioimageit/bioimageit_core | fe0fceee84acade14f49b136d9040ce0623e209f | [
"BSD-4-Clause"
] | 2 | 2021-05-10T12:03:45.000Z | 2021-05-12T06:16:25.000Z | bioimageit_core/metadata/query.py | NicolasCARPi/bioimageit_core | a5e6d273e05e7c3a7fdbf59cffd1c79d11d46f35 | [
"BSD-4-Clause"
] | 1 | 2021-05-12T09:55:37.000Z | 2021-05-12T09:55:37.000Z | bioimageit_core/metadata/query.py | NicolasCARPi/bioimageit_core | a5e6d273e05e7c3a7fdbf59cffd1c79d11d46f35 | [
"BSD-4-Clause"
] | 1 | 2021-05-10T11:44:33.000Z | 2021-05-10T11:44:33.000Z | from bioimageit_core.metadata.exceptions import MetadataQueryError
def query_list_single(search_list: list, query: str) -> list:
"""query internal function
Search if the query is on the search_list
Parameters
----------
search_list
data search list (list of SearchContainer)
query
String query with the key=value format. No 'AND', 'OR'...
Returns
-------
list
list of selected SearchContainer
"""
selected_list = list()
if 'name' in query:
split_query = query.split('=')
if len(split_query) != 2:
raise MetadataQueryError(
'Error: the query ' + query +
' is not correct. Must be (key<=value)'
)
value = split_query[1]
for i in range(len(search_list)):
if value in search_list[i].name():
selected_list.append(search_list[i])
return selected_list
if "<=" in query:
split_query = query.split('<=')
if len(split_query) != 2:
raise MetadataQueryError(
'Error: the query ' + query +
' is not correct. Must be (key<=value)'
)
key = split_query[0]
value = float(split_query[1].replace(' ', ''))
for i in range(len(search_list)):
if (
search_list[i].is_tag(key)
and float(search_list[i].tag(key).replace(' ', '')) <= value
):
selected_list.append(search_list[i])
elif ">=" in query:
split_query = query.split('>=')
if len(split_query) != 2:
raise MetadataQueryError(
'Error: the query ' + query +
' is not correct. Must be (key>=value)'
)
key = split_query[0]
value = split_query[1]
for i in range(len(search_list)):
if search_list[i].is_tag(key) and \
float(search_list[i].tag(key)) >= float(
value
):
selected_list.append(search_list[i])
elif "=" in query:
split_query = query.split('=')
if len(split_query) != 2:
raise MetadataQueryError(
'Error: the query ' + query +
' is not correct. Must be (key=value)'
)
key = split_query[0]
value = split_query[1]
for i in range(len(search_list)):
if search_list[i].is_tag(key) and search_list[i].tag(key) == value:
selected_list.append(search_list[i])
elif "<" in query:
split_query = query.split('<')
if len(split_query) != 2:
raise MetadataQueryError(
'Error: the query ' + query +
' is not correct. Must be (key<value)'
)
key = split_query[0]
value = split_query[1]
for i in range(len(search_list)):
if search_list[i].is_tag(key) and \
float(search_list[i].tag(key)) < float(
value
):
selected_list.append(search_list[i])
elif ">" in query:
split_query = query.split('>')
if len(split_query) != 2:
raise MetadataQueryError(
'Error: the query ' + query +
' is not correct. Must be (key>value)'
)
key = split_query[0]
value = split_query[1]
for i in range(len(search_list)):
if search_list[i].is_tag(key) and \
float(search_list[i].tag(key)) > float(
value
):
selected_list.append(search_list[i])
return selected_list
| 32.681416 | 79 | 0.51205 | 424 | 3,693 | 4.304245 | 0.129717 | 0.147945 | 0.102466 | 0.05589 | 0.795616 | 0.786301 | 0.786301 | 0.786301 | 0.786301 | 0.750685 | 0 | 0.007334 | 0.372326 | 3,693 | 112 | 80 | 32.973214 | 0.779983 | 0.074465 | 0 | 0.636364 | 0 | 0 | 0.101725 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.011364 | false | 0 | 0.011364 | 0 | 0.045455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 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 | 5 |
cf4fbba2f50a450b03a996e63d896758d613abc5 | 108 | py | Python | Workspace for Python/studying file/module/path test/moduletest.py | ArchibaldChain/python-workspace | 71890f296c376155e374b2096ac3d8f1d286b7d2 | [
"MIT"
] | null | null | null | Workspace for Python/studying file/module/path test/moduletest.py | ArchibaldChain/python-workspace | 71890f296c376155e374b2096ac3d8f1d286b7d2 | [
"MIT"
] | 3 | 2020-06-17T16:01:27.000Z | 2022-01-13T02:52:53.000Z | Workspace for Python/studying file/module/path test/moduletest.py | ArchibaldChain/python-workspace | 71890f296c376155e374b2096ac3d8f1d286b7d2 | [
"MIT"
] | null | null | null | print("The output of module")
name = "moduletest"
def mtpr():
print("the function in the module")
| 18 | 40 | 0.648148 | 15 | 108 | 4.666667 | 0.733333 | 0.228571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 108 | 5 | 41 | 21.6 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0.54902 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.25 | 0.5 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
cf69ae653a2558c8dd8ada67f01956b7b23cdbf3 | 126 | py | Python | src/cache.py | danztensai/covid-19-api | 411bf2fd8f71cb60627bc8f9f370ecfc195b75b8 | [
"MIT"
] | 53 | 2020-03-16T11:31:14.000Z | 2021-11-16T13:58:52.000Z | src/cache.py | danztensai/covid-19-api | 411bf2fd8f71cb60627bc8f9f370ecfc195b75b8 | [
"MIT"
] | 4 | 2020-03-21T06:34:31.000Z | 2020-03-29T13:30:28.000Z | src/cache.py | danztensai/covid-19-api | 411bf2fd8f71cb60627bc8f9f370ecfc195b75b8 | [
"MIT"
] | 19 | 2020-03-17T12:28:49.000Z | 2020-06-11T09:03:54.000Z | from flask_caching import Cache
cache = Cache(config={'CACHE_TYPE': 'simple'})
def init_app(app):
cache.init_app(app)
| 14 | 46 | 0.714286 | 19 | 126 | 4.526316 | 0.578947 | 0.232558 | 0.232558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150794 | 126 | 8 | 47 | 15.75 | 0.803738 | 0 | 0 | 0 | 0 | 0 | 0.126984 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
d854818ba5cc98e1a1cd355a5ce107347b66ee3c | 237 | py | Python | MainLibPython/ArrayHelper.py | emacslisp/pythonlib | 5f299b24c3c4ea56fed48ed71d4a4c826e1cb36b | [
"Apache-2.0"
] | null | null | null | MainLibPython/ArrayHelper.py | emacslisp/pythonlib | 5f299b24c3c4ea56fed48ed71d4a4c826e1cb36b | [
"Apache-2.0"
] | null | null | null | MainLibPython/ArrayHelper.py | emacslisp/pythonlib | 5f299b24c3c4ea56fed48ed71d4a4c826e1cb36b | [
"Apache-2.0"
] | null | null | null | class ArrayHelper:
def printArray(self, array):
for i in array:
print(i)
def reverseArray(self, array):
return list(reversed(array))
def reverseArraySlice(self, array):
return array[::-1] | 23.7 | 39 | 0.603376 | 27 | 237 | 5.296296 | 0.592593 | 0.188811 | 0.20979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005952 | 0.291139 | 237 | 10 | 40 | 23.7 | 0.845238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.375 | false | 0 | 0 | 0.25 | 0.75 | 0.25 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
d8743faf7dba8134586e81882981d0cf1df788dd | 287 | py | Python | agents/utils/custom_loss.py | Sayar1106/ChehraEncoder | 265a11e015418ff199e80e80cd3d413893d2b5ef | [
"MIT"
] | null | null | null | agents/utils/custom_loss.py | Sayar1106/ChehraEncoder | 265a11e015418ff199e80e80cd3d413893d2b5ef | [
"MIT"
] | null | null | null | agents/utils/custom_loss.py | Sayar1106/ChehraEncoder | 265a11e015418ff199e80e80cd3d413893d2b5ef | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
def kl_loss(mu, log_var):
return -0.5 * torch.sum(1 + log_var - torch.square(mu) - torch.exp(log_var), axis=1)
def vae_loss(data, pred, mu, log_var):
return F.binary_cross_entropy(data, pred, reduction='sum') + kl_loss(mu, log_var) | 31.888889 | 88 | 0.710801 | 53 | 287 | 3.660377 | 0.509434 | 0.154639 | 0.123711 | 0.113402 | 0.14433 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016327 | 0.146341 | 287 | 9 | 89 | 31.888889 | 0.77551 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 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 | 1 | 1 | 1 | 0 | 0 | 5 |
d8b58678d6a4b67272356c4da47e1b12fd1446c9 | 24 | py | Python | codigoRama.py | BrandonMont-git/HCAP2021 | 7a608d3262313267f8824ead5054094d161791ac | [
"MIT"
] | null | null | null | codigoRama.py | BrandonMont-git/HCAP2021 | 7a608d3262313267f8824ead5054094d161791ac | [
"MIT"
] | null | null | null | codigoRama.py | BrandonMont-git/HCAP2021 | 7a608d3262313267f8824ead5054094d161791ac | [
"MIT"
] | null | null | null | print ("Archivo nuevo")
| 12 | 23 | 0.708333 | 3 | 24 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 24 | 1 | 24 | 24 | 0.809524 | 0 | 0 | 0 | 0 | 0 | 0.541667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
d8b8fe7d22d2e075c62475dcfb7a274277311552 | 300 | py | Python | Newsapi/models.py | 1104028/StrativNewsFeed | 4499cbb17141ca1aa19d3fd00071828ff9ab3d7a | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | Newsapi/models.py | 1104028/StrativNewsFeed | 4499cbb17141ca1aa19d3fd00071828ff9ab3d7a | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | Newsapi/models.py | 1104028/StrativNewsFeed | 4499cbb17141ca1aa19d3fd00071828ff9ab3d7a | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | from django.db import models
class NewsItem(models.Model):
title = models.CharField(max_length=300)
source = models.CharField(max_length=200)
url = models.CharField(max_length=1000)
imageurl = models.CharField(max_length=1000,null=True)
country =models.CharField(max_length=100)
| 33.333333 | 58 | 0.756667 | 41 | 300 | 5.414634 | 0.536585 | 0.337838 | 0.405405 | 0.540541 | 0.252252 | 0 | 0 | 0 | 0 | 0 | 0 | 0.065637 | 0.136667 | 300 | 8 | 59 | 37.5 | 0.791506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
d8dda694cb39b6fbe1923a37ec935cf4a943192c | 48 | py | Python | src/Escavador/__init__.py | sswellington/armadillo | 292afd5c8286e8ba8fe0d53d88f4d374f542aeb8 | [
"MIT"
] | 1 | 2021-04-26T20:56:18.000Z | 2021-04-26T20:56:18.000Z | src/Escavador/__init__.py | sswellington/armadillo | 292afd5c8286e8ba8fe0d53d88f4d374f542aeb8 | [
"MIT"
] | null | null | null | src/Escavador/__init__.py | sswellington/armadillo | 292afd5c8286e8ba8fe0d53d88f4d374f542aeb8 | [
"MIT"
] | null | null | null | from .Auth import Auth
from .Query import Query
| 16 | 24 | 0.791667 | 8 | 48 | 4.75 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 48 | 2 | 25 | 24 | 0.95 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
2b1b07aa38f577d1284ca0d604c9b5d182a800a4 | 61 | py | Python | dojot_flow_node/__init__.py | fberanizo/dojot-flow-node-python | fde4e73e0309c92126881e87cfdd32daf1f13f5e | [
"Apache-2.0"
] | null | null | null | dojot_flow_node/__init__.py | fberanizo/dojot-flow-node-python | fde4e73e0309c92126881e87cfdd32daf1f13f5e | [
"Apache-2.0"
] | null | null | null | dojot_flow_node/__init__.py | fberanizo/dojot-flow-node-python | fde4e73e0309c92126881e87cfdd32daf1f13f5e | [
"Apache-2.0"
] | null | null | null | from .data_handler_base import *
from .dojot_handler import * | 30.5 | 32 | 0.819672 | 9 | 61 | 5.222222 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114754 | 61 | 2 | 33 | 30.5 | 0.87037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2b356e2c1c200bc293eb4e66177bff40bb125495 | 197 | py | Python | modulo 1/d019/aleatorio.py | rafa-evangelista/PYTHON | 761ec7e01f1617263bc023a6b82b599a936275ee | [
"MIT"
] | null | null | null | modulo 1/d019/aleatorio.py | rafa-evangelista/PYTHON | 761ec7e01f1617263bc023a6b82b599a936275ee | [
"MIT"
] | null | null | null | modulo 1/d019/aleatorio.py | rafa-evangelista/PYTHON | 761ec7e01f1617263bc023a6b82b599a936275ee | [
"MIT"
] | null | null | null | import random
aluno = ('Rafael', 'Mariana', 'Marcos', 'Júlia')
def selectrandom(aluno):
return random.choice(aluno)
print ('O aluno escolhido para apagar o quadro foi ', random.choice(aluno))
| 32.833333 | 75 | 0.715736 | 26 | 197 | 5.423077 | 0.692308 | 0.170213 | 0.241135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142132 | 197 | 5 | 76 | 39.4 | 0.83432 | 0 | 0 | 0 | 0 | 0 | 0.340102 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0.2 | 0.6 | 0.2 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
2b5a41e2a9adeca15979093067781bde3284d113 | 52 | py | Python | src/ansiblegalaxylocaldeps/__init__.py | andrewrothstein/ansible-galaxy-local-deps | 93711bdfb222bf23ea705edc83d4791b0547f681 | [
"MIT"
] | 2 | 2018-02-13T06:55:55.000Z | 2019-03-25T01:58:33.000Z | src/ansiblegalaxylocaldeps/__init__.py | andrewrothstein/ansible-galaxy-local-deps | 93711bdfb222bf23ea705edc83d4791b0547f681 | [
"MIT"
] | 4 | 2017-06-29T14:07:16.000Z | 2019-11-13T13:51:21.000Z | src/ansiblegalaxylocaldeps/__init__.py | andrewrothstein/ansible-galaxy-local-deps | 93711bdfb222bf23ea705edc83d4791b0547f681 | [
"MIT"
] | 3 | 2017-05-24T18:06:29.000Z | 2019-11-11T20:20:43.000Z | from .installdeps import *
from .writedeps import *
| 17.333333 | 26 | 0.769231 | 6 | 52 | 6.666667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 52 | 2 | 27 | 26 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2b62193785ea82f3652e4eb25f1c3f18878d7c40 | 176 | py | Python | data_relay/src/plugins/AwsSecretsManager.py | phil-d-wilson/connectorV2 | 7077aa1c74276e8e334a8046793e942eec8d9975 | [
"Apache-2.0"
] | null | null | null | data_relay/src/plugins/AwsSecretsManager.py | phil-d-wilson/connectorV2 | 7077aa1c74276e8e334a8046793e942eec8d9975 | [
"Apache-2.0"
] | 49 | 2021-04-09T14:41:50.000Z | 2021-07-28T10:54:48.000Z | data_relay/src/plugins/AwsSecretsManager.py | phil-d-wilson/connectorV2 | 7077aa1c74276e8e334a8046793e942eec8d9975 | [
"Apache-2.0"
] | 2 | 2021-04-24T10:47:57.000Z | 2021-07-17T07:13:00.000Z | NAME = "AWS Secrets"
TYPE = "secrets"
FILE = "AwsSecretsManager.yaml"
VARS = [
"AWS_SECRETSMGR_REGION",
"AWS_SECRETSMGR_ACCESS_KEY",
"AWS_SECRETSMGR_SECRET_KEY",
]
| 19.555556 | 32 | 0.710227 | 20 | 176 | 5.85 | 0.65 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164773 | 176 | 8 | 33 | 22 | 0.795918 | 0 | 0 | 0 | 0 | 0 | 0.630682 | 0.528409 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2b7505946295be0e939d5fabc30b8e234576a903 | 49 | py | Python | dataproject/dataproject.py | AskerNC/projects-2021-m-m | 9c2a38f2082faaddca034d615cdd5ec94c2c0a1a | [
"MIT"
] | null | null | null | dataproject/dataproject.py | AskerNC/projects-2021-m-m | 9c2a38f2082faaddca034d615cdd5ec94c2c0a1a | [
"MIT"
] | null | null | null | dataproject/dataproject.py | AskerNC/projects-2021-m-m | 9c2a38f2082faaddca034d615cdd5ec94c2c0a1a | [
"MIT"
] | null | null | null | #No functions as we have no repeatable operations | 49 | 49 | 0.836735 | 8 | 49 | 5.125 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 49 | 1 | 49 | 49 | 0.97619 | 0.979592 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
996db80987be0e9b6ab30f9f9279537354afb8ed | 83 | py | Python | gtas/generator/workflow/watchlist/generate_watchlist.py | minelytics/GTAS | 81b034a740837e61b00a17f6521a9a33fb0935bd | [
"MIT"
] | null | null | null | gtas/generator/workflow/watchlist/generate_watchlist.py | minelytics/GTAS | 81b034a740837e61b00a17f6521a9a33fb0935bd | [
"MIT"
] | null | null | null | gtas/generator/workflow/watchlist/generate_watchlist.py | minelytics/GTAS | 81b034a740837e61b00a17f6521a9a33fb0935bd | [
"MIT"
] | null | null | null | class GenerateApi():
def run(self):
print("Generating api files ...")
| 16.6 | 41 | 0.590361 | 9 | 83 | 5.444444 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.253012 | 83 | 4 | 42 | 20.75 | 0.790323 | 0 | 0 | 0 | 1 | 0 | 0.289157 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
99851c7b165431ad705d8c4aaa15f7d66a0d1c7d | 163 | py | Python | boards/admin.py | AdeyaOduor/django-project | a5f9052611d45f55c450ba3dcce14ae8967915ac | [
"MIT"
] | null | null | null | boards/admin.py | AdeyaOduor/django-project | a5f9052611d45f55c450ba3dcce14ae8967915ac | [
"MIT"
] | null | null | null | boards/admin.py | AdeyaOduor/django-project | a5f9052611d45f55c450ba3dcce14ae8967915ac | [
"MIT"
] | null | null | null | # this is a configuration file for a built-in Django app called Django Admin.
from django.contrib import admin
from .models import Board
admin.site.register(Board) | 40.75 | 77 | 0.809816 | 27 | 163 | 4.888889 | 0.703704 | 0.136364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134969 | 163 | 4 | 78 | 40.75 | 0.93617 | 0.460123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
999581b40e653a3d7f9fa7d92aea14b70b626ffe | 16,878 | py | Python | Tests/test_database.py | EngBioNUS/BMSS2 | 41163c61a4e0ef3c6430e5954d81a77832e49a9d | [
"Apache-2.0"
] | null | null | null | Tests/test_database.py | EngBioNUS/BMSS2 | 41163c61a4e0ef3c6430e5954d81a77832e49a9d | [
"Apache-2.0"
] | null | null | null | Tests/test_database.py | EngBioNUS/BMSS2 | 41163c61a4e0ef3c6430e5954d81a77832e49a9d | [
"Apache-2.0"
] | 4 | 2020-08-24T13:35:55.000Z | 2022-03-07T16:48:12.000Z | import add_BMSS_to_path
import pytest
import numpy as np
import pandas as pd
'''
Due to the dependency of settings_handler on model_handler, these two are tested
together
'''
import BMSS.models.model_handler as mh
import BMSS.models.settings_handler as sh
core_model_1 = None
settings_1 = None
core_model_2 = None
settings_2 = None
#add test for model code
class TestModelHandler:
def test_make_core_model(self):
global core_model_1
__model__ = {'system_type' : ['pyTestModel', 'Dummy'],
'states' : ['mRNA', 'Pep'],
'parameters' : ['syn_mRNA', 'deg_mRNA', 'syn_Pep', 'deg_Pep', 'Ki'],
'inputs' : ['Ind'],
'equations' : ['dmRNA = syn_mRNA*Ind/(Ind + Ki) - deg_mRNA*mRNA',
'dPep = syn_Pep*mRNA - deg_Pep'
],
'ia' : 'ia_result_bmss01001.csv'
}
core_model = mh.make_core_model(**__model__)
#Assert here
for key in __model__:
assert core_model[key] is not None
#Save for reuse
core_model_1 = core_model
@pytest.mark.xfail
def test_make_core_model_fail_1(self):
#Division by zero
__model__ = {'system_type' : ['pyTestModel', 'Dummy'],
'states' : ['mRNA', 'Pep'],
'parameters' : ['syn_mRNA', 'deg_mRNA', 'syn_Pep', 'deg_Pep', 'Ki'],
'inputs' : ['Ind'],
'equations' : ['dmRNA = syn_mRNA*Ind/(Ind + Ki) - deg_mRNA*mRNA',
'dPep = syn_Pep*mRNA - deg_Pep/0'
],
'ia' : 'ia_result_bmss01001.csv'
}
core_model = mh.make_core_model(**__model__)
@pytest.mark.xfail
def test_make_core_model_fail_2(self):
#Missing state
__model__ = {'system_type' : ['pyTestModel', 'Dummy'],
'states' : ['mRNA'],
'parameters' : ['syn_mRNA', 'deg_mRNA', 'syn_Pep', 'deg_Pep', 'Ki'],
'inputs' : ['Ind'],
'equations' : ['dmRNA = syn_mRNA*Ind/(Ind + Ki) - deg_mRNA*mRNA',
'dPep = syn_Pep*mRNA - deg_Pep'
],
'ia' : 'ia_result_bmss01001.csv'
}
core_model = mh.make_core_model(**__model__)
@pytest.mark.xfail
def test_make_core_model_fail_3(self):
#Missing parameter
__model__ = {'system_type' : ['pyTestModel', 'Dummy'],
'states' : ['mRNA', 'Pep'],
'parameters' : ['deg_mRNA', 'syn_Pep', 'deg_Pep', 'Ki'],
'inputs' : ['Ind'],
'equations' : ['dmRNA = syn_mRNA*Ind/(Ind + Ki) - deg_mRNA*mRNA',
'dPep = syn_Pep*mRNA - deg_Pep'
],
'ia' : 'ia_result_bmss01001.csv'
}
core_model = mh.make_core_model(**__model__)
@pytest.mark.xfail
def test_make_core_model_fail_4(self):
#Unused variable
__model__ = {'system_type' : ['pyTestModel', 'Dummy'],
'states' : ['mRNA', 'Pep', 'UnsedDummy'],
'parameters' : ['syn_mRNA', 'deg_mRNA', 'syn_Pep', 'deg_Pep', 'Ki'],
'inputs' : ['Ind'],
'equations' : ['dmRNA = syn_mRNA*Ind/(Ind + Ki) - deg_mRNA*mRNA',
'dPep = syn_Pep*mRNA - deg_Pep/0'
],
'ia' : 'ia_result_bmss01001.csv'
}
core_model = mh.make_core_model(**__model__)
def test_copy_core_model(self):
global core_model_1
copy = core_model_1.copy()
for key in copy:
assert copy[key] == core_model_1[key]
def test_add_to_database(self):
'''
Note: add_to_database already makes calls to search/quick_search
'''
global core_model_1
core_model = core_model_1
mh.add_to_database(core_model, dialog=False)
#Check if in database
lst = mh.list_models()
assert core_model['system_type'] in lst
def test_delete(self):
global core_model_1
system_type = core_model_1['system_type']
lst = mh.list_models()
assert core_model_1['system_type'] in lst
mh.delete(system_type)
#Check if in database
lst = mh.list_models()
assert system_type not in lst
def test_restore(self):
global core_model_1
system_type = core_model_1['system_type']
mh.restore(system_type)
#Check if in database
lst = mh.list_models()
assert system_type in lst
def test_from_config(self):
global core_model_2
core_model_2 = mh.from_config('pyTestModel.ini')
class TestSettingsHandler:
def test_make_settings(self):
global settings_1
global core_model_1
core_model = core_model_1
mh.add_to_database(core_model, dialog=False)
__settings__ = {'system_type' : ['pyTestModel', 'Dummy'],
'settings_name' : '__default__',
'units' : {'syn_mRNA' : 'M/min',
'deg_mRNA' : '1/min',
'syn_Pep' : '1/min',
'deg_Pep' : '1/min',
'Ki' : 'M',
'Ind' : 'M'
},
'parameters' : {'syn_mRNA' : np.array([0.02]),
'deg_mRNA' : np.array([0.15]),
'syn_Pep' : np.array([0.02]),
'deg_Pep' : np.array([0.012]),
'Ki' : np.array([0.5]),
'Ind' : np.array([1.0])
},
'init' : {1: [0, 0]},
'parameter_bounds' : {'deg_mRNA' : [0.001, 0.03],
'deg_Pep' : [0.01, 0.5],
},
'solver_args' : {'rtol' : 1.49012e-8,
'atol' : 1.49012e-8,
'tcrit' : [],
'h0' : 0.0,
'hmax' : 0.0,
'hmin' : 0.0,
'mxstep' : 0
},
}
settings = sh.make_settings(**__settings__)
###############################################################################
#Testing Parameter Formats
###############################################################################
__settings__['parameters'] = {key+'_1' : __settings__['parameters'][key] for key in __settings__['parameters']}
settings = sh.make_settings(**__settings__, user_core_model=core_model)
__settings__['parameters'] = pd.Series(__settings__['parameters'], name=500)
settings = sh.make_settings(**__settings__, user_core_model=core_model)
##############################################################################
#Testing Initial Value Formats
##############################################################################
__settings__['init'] = {'mRNA' : [0],
'Pep' : [0],
}
settings = sh.make_settings(**__settings__, init_orient='states', user_core_model=core_model)
__settings__['init'] = [[0, 0], [0, 0]]
settings = sh.make_settings(**__settings__, init_orient='states', user_core_model=core_model)
__settings__['init'] = pd.Series([0, 0], index=['mRNA', 'Pep'])
settings = sh.make_settings(**__settings__, init_orient='states', user_core_model=core_model)
__settings__['init'] = pd.DataFrame([[0, 0]], columns=['mRNA', 'Pep'], index=[1])
settings = sh.make_settings(**__settings__, init_orient='states', user_core_model=core_model)
#Assert here
for key in __settings__:
try:
assert settings[key] is not None
except ValueError as e:
pass
except Exception as e:
raise e
#Save for reuse
settings_1 = settings
@pytest.mark.xfail
def test_make_settings_fail_1(self):
#Init of wrong length
__settings__ = {'system_type' : ['pyTestModel, Dummy'],
'settings_name' : '__default__',
'units' : {'syn_mRNA' : 'M/min',
'deg_mRNA' : '1/min',
'syn_Pep' : '1/min',
'deg_Pep' : '1/min',
'Ind' : 'M'
},
'parameters' : {'syn_mRNA' : np.array([0.02]),
'deg_mRNA' : np.array([0.15]),
'syn_Pep' : np.array([0.02]),
'deg_Pep' : np.array([0.012]) ,
'Ind' : np.array([1.0])
},
'init' : {1: [0, 0, 0]},
'parameter_bounds' : {'deg_mRNA' : [0.001, 0.03],
'deg_Pep' : [0.01, 0.5],
},
'solver_args' : {'rtol' : 1.49012e-8,
'atol' : 1.49012e-8,
'tcrit' : [],
'h0' : 0.0,
'hmax' : 0.0,
'hmin' : 0.0,
'mxstep' : 0
},
}
settings = sh.make_settings(**__settings__)
@pytest.mark.xfail
def test_make_settings_fail_2(self):
#Invalid parameter bounds
__settings__ = {'system_type' : ['pyTestModel, Dummy'],
'settings_name' : '__default__',
'units' : {'syn_mRNA' : 'M/min',
'deg_mRNA' : '1/min',
'syn_Pep' : '1/min',
'deg_Pep' : '1/min',
'Ind' : 'M'
},
'parameters' : {'syn_mRNA' : np.array([0.02]),
'deg_mRNA' : np.array([0.15]),
'syn_Pep' : np.array([0.02]),
'deg_Pep' : np.array([0.012]) ,
'Ind' : np.array([1.0])
},
'init' : {1: [0, 0]},
'parameter_bounds' : {'deg_mRNA' : [0.001, 0.03, 1],
'deg_Pep' : [0.01, 0.5],
},
'solver_args' : {'rtol' : 1.49012e-8,
'atol' : 1.49012e-8,
'tcrit' : [],
'h0' : 0.0,
'hmax' : 0.0,
'hmin' : 0.0,
'mxstep' : 0
},
}
settings = sh.make_settings(**__settings__)
@pytest.mark.xfail
def test_make_settings_fail_3(self):
#Mismatched parameter length
__settings__ = {'system_type' : ['pyTestModel, Dummy'],
'settings_name' : '__default__',
'units' : {'syn_mRNA' : 'M/min',
'deg_mRNA' : '1/min',
'syn_Pep' : '1/min',
'deg_Pep' : '1/min',
'Ind' : 'M'
},
'parameters' : {'syn_mRNA' : np.array([0.02, 1]),
'deg_mRNA' : np.array([0.15]),
'syn_Pep' : np.array([0.02]),
'deg_Pep' : np.array([0.012]) ,
'Ind' : np.array([1.0])
},
'init' : {1: [0, 0]},
'parameter_bounds' : {'deg_mRNA' : [0.001, 0.03],
'deg_Pep' : [0.01, 0.5],
},
'solver_args' : {'rtol' : 1.49012e-8,
'atol' : 1.49012e-8,
'tcrit' : [],
'h0' : 0.0,
'hmax' : 0.0,
'hmin' : 0.0,
'mxstep' : 0
},
}
settings = sh.make_settings(**__settings__)
def test_copy_settings(self):
global settings_1
copy = settings_1.copy()
for key in copy:
try:
assert copy[key] == settings_1[key]
except ValueError as e:
pass
except Exception as e:
raise e
def test_add_to_database(self):
'''
Note: add_to_database already makes calls to search/quick_search
'''
global settings_1
settings = settings_1
sh.add_to_database(settings, dialog=False)
#Check if in database
lst = sh.list_settings()
assert (settings['system_type'], settings['settings_name']) in lst
def test_delete(self):
global settings_1
system_type = settings_1['system_type']
settings_name = settings_1['settings_name']
sh.delete(system_type, settings_name)
#Check if in database
lst = sh.list_settings()
assert (system_type, settings_name) not in lst
def test_restore(self):
global settings_1
system_type = settings_1['system_type']
settings_name = settings_1['settings_name']
sh.restore(system_type, settings_name)
#Check if in database
lst = sh.list_settings()
assert (system_type, settings_name) in lst
def test_from_config(self):
global core_model_2
global settings_2
user_core_models = {core_model_2['system_type'] : core_model_2}
settings_2 = sh.from_config('pyTestModel.ini', user_core_models=user_core_models)
if __name__ == '__main__':
# T = pyTestModelHandler()
# T.test_make_core_model()
# T.test_add_to_database()
# T.test_delete()
pass
| 42.946565 | 119 | 0.374985 | 1,421 | 16,878 | 4.092189 | 0.108374 | 0.08822 | 0.023388 | 0.037833 | 0.778676 | 0.763199 | 0.746002 | 0.714187 | 0.699054 | 0.668444 | 0 | 0.037236 | 0.503555 | 16,878 | 392 | 120 | 43.056122 | 0.656761 | 0.035549 | 0 | 0.675958 | 0 | 0 | 0.140162 | 0.00728 | 0 | 0 | 0 | 0 | 0.038328 | 1 | 0.066202 | false | 0.010453 | 0.020906 | 0 | 0.094077 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 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 | 5 |
999b6bac92ccfe1890e30adc2b5f6f831d3b88c0 | 80 | py | Python | src/djask/admin/__init__.py | greyli/Djask | b886610c792aaa40d6a3975fd26c44fc7825c8b6 | [
"MIT"
] | null | null | null | src/djask/admin/__init__.py | greyli/Djask | b886610c792aaa40d6a3975fd26c44fc7825c8b6 | [
"MIT"
] | null | null | null | src/djask/admin/__init__.py | greyli/Djask | b886610c792aaa40d6a3975fd26c44fc7825c8b6 | [
"MIT"
] | null | null | null | from .ext import Admin
from .decorators import admin_required
from . import cli
| 20 | 38 | 0.8125 | 12 | 80 | 5.333333 | 0.583333 | 0.34375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 80 | 3 | 39 | 26.666667 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
41e449548c22d6894e1b607654958ed0e9a25c38 | 357 | py | Python | ICS_Server/app/data_base_controller/SQLiteController.py | andrwnv/ICS | 9df97cea6ebf640c56fc51d985c8d30077056307 | [
"MIT"
] | 2 | 2020-01-06T08:04:46.000Z | 2020-11-12T19:46:21.000Z | ICS_Server/app/data_base_controller/SQLiteController.py | andrwnv/ICS | 9df97cea6ebf640c56fc51d985c8d30077056307 | [
"MIT"
] | null | null | null | ICS_Server/app/data_base_controller/SQLiteController.py | andrwnv/ICS | 9df97cea6ebf640c56fc51d985c8d30077056307 | [
"MIT"
] | null | null | null | from data_base_controller import IDataBaseController
import sqlite3
class SQLiteController(IDataBaseController):
def __init__(self):
pass
def connect(self) -> bool:
return True
def disconnect(self) -> bool:
return True
def fetch(self) -> []:
return []
def commit(self) -> bool:
return True
| 17 | 52 | 0.630252 | 37 | 357 | 5.918919 | 0.540541 | 0.109589 | 0.191781 | 0.246575 | 0.191781 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003922 | 0.285714 | 357 | 20 | 53 | 17.85 | 0.854902 | 0 | 0 | 0.230769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.384615 | false | 0.076923 | 0.153846 | 0.307692 | 0.923077 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 5 |
41fceebb81653873041097e947ce188c26b03fd0 | 8,363 | py | Python | Chapter01/unittest_chapter1/test_chapter1.py | arifmudi/The-Data-Wrangling-Workshop | c325f6fa1c6daf8dd22e9705df48ce2644217a73 | [
"MIT"
] | 22 | 2020-06-27T04:21:49.000Z | 2022-03-08T04:39:44.000Z | Chapter01/unittest_chapter1/test_chapter1.py | arifmudi/The-Data-Wrangling-Workshop | c325f6fa1c6daf8dd22e9705df48ce2644217a73 | [
"MIT"
] | 2 | 2021-02-02T22:49:16.000Z | 2021-06-02T02:09:21.000Z | Chapter01/unittest_chapter1/test_chapter1.py | Hubertus444/The-Data-Wrangling-Workshop | ddad20f8676602ac6624e72e802769fcaff45b0f | [
"MIT"
] | 46 | 2020-04-20T13:04:11.000Z | 2022-03-22T05:23:52.000Z | # These are the unit tests for each exersize, load the module and pass the answer to each function and it will
# return a bool of True or False depending on the answer being correct or false.
# exercise 1
def test_exercise_1_1(x) -> bool:
return x == ['218-68-9955',
'165-73-3124',
'432-47-4043',
'563-93-1393',
'153-93-3401',
'670-09-7369',
'123-05-9652',
'812-13-2476',
'726-13-1007',
'825-05-4836']
def test_exercise_1_2(x) -> bool:
return x == '218-68-9955'
def test_exercise_1_3(x) -> bool:
return x == '563-93-1393'
def test_exercise_1_4(x) -> bool:
return x == '825-05-4836'
def test_exercise_1_5(x) -> bool:
return x == '825-05-4836'
def test_exercise_1_6(x) -> bool:
return x == ['165-73-3124', '432-47-4043']
def test_exercise_1_7(x) -> bool:
return x == ['726-13-1007', '825-05-4836']
def test_exercise_1_8(x) -> bool:
return x == ['218-68-9955',
'165-73-3124',
'432-47-4043',
'563-93-1393',
'153-93-3401',
'670-09-7369',
'123-05-9652',
'812-13-2476']
def test_exercise_1_9(x) -> bool:
return x == ['825-05-4836',
'726-13-1007',
'812-13-2476',
'123-05-9652',
'670-09-7369',
'153-93-3401',
'563-93-1393',
'432-47-4043',
'165-73-3124',
'218-68-9955']
# exercise 2
def test_exercise_2_1(x) -> bool:
return x == ['218-68-9955',
'165-73-3124',
'432-47-4043',
'563-93-1393',
'153-93-3401',
'670-09-7369',
'123-05-9652',
'812-13-2476',
'726-13-1007',
'825-05-4836']
def test_exercise_2_2(x) -> bool:
return x == ['soc: 218-68-9955',
'soc: 165-73-3124',
'soc: 432-47-4043',
'soc: 563-93-1393',
'soc: 153-93-3401',
'soc: 670-09-7369',
'soc: 123-05-9652',
'soc: 812-13-2476',
'soc: 726-13-1007',
'soc: 825-05-4836']
def test_exercise_2_4(x) -> bool:
return x == ['soc: 218-68-9955',
'soc: 165-73-3124',
'soc: 563-93-1393',
'soc: 153-93-3401',
'soc: 123-05-9652',
'soc: 825-05-4836']
def test_exercise_2_5(x) -> bool:
return x == ['102-90-0314',
'247-17-2338',
'318-22-2760',
'218-68-9955',
'165-73-3124',
'432-47-4043',
'563-93-1393',
'153-93-3401',
'670-09-7369',
'123-05-9652',
'812-13-2476',
'726-13-1007',
'825-05-4836']
def test_exercise_2_6(x) -> bool:
return x == ['218-68-9955',
'165-73-3124',
'432-47-4043',
'563-93-1393',
'153-93-3401',
'670-09-7369',
'123-05-9652',
'812-13-2476',
'726-13-1007',
'825-05-4836',
'102-90-0314',
'247-17-2338',
'318-22-2760']
# exercise 3
def test_exercise_3_1(x) -> bool:
return x == ["Escalade",
"X5 M", "D150",
"Camaro",
"F350",
"Aurora",
"S8",
"E350",
"Tiburon",
"F-Series Super Duty"]
def test_exercise_2__2(x) -> bool:
return x == True
def test_exercise_2__3(x) -> bool:
return x == False
# exercise 4
def test_exercise_4__1(x) -> bool:
return x == [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
def test_exercise_4_2(x) -> bool:
return x == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
# exercise 5
def test_exercise_5__1(x) -> bool:
import sys
if "random" not in sys.modules:
return False
else:
return True
def test_exercise_5__2(x) -> bool:
return 100 == len(x)
# exercise 6
def test_exercise_6__1(x) -> bool:
return x == {"Solar Capital Ltd.": "$920.44M",
"Zoe's Kitchen, Inc.": "$262.32M",
"Toyota Motor Corp Ltd Ord": "$156.02B",
"Nuveen Virginia Quality Municipal Income Fund": "$238.33M",
"Kinross Gold Corporation": "$5.1B",
"Vulcan Materials Company": "$17.1B",
"Hi-Crush Partners LP": "$955.69M",
"Lennox International, Inc.": "$8.05B",
"WMIH Corp.": "$247.66M",
"Comerica Incorporated": "n/a"}
def test_exercise_6__2(x) -> bool:
return x == "'$247.66M'"
def test_exercise_6__3(x) -> bool:
return x == "$300M"
def test_exercise_6__4(x) -> bool:
return x == {'key1': 'Value1'}
# exercise 7
def test_exercise_7_1(x) -> bool:
return x == {'Solar Capital Ltd.': '920.44M',
"Zoe's Kitchen, Inc.": '262.32M',
'Toyota Motor Corp Ltd Ord': '156.02B',
'Nuveen Virginia Quality Municipal Income Fund': '238.33M',
'Kinross Gold Corporation': '5.1B',
'Vulcan Materials Company': '17.1B',
'Hi-Crush Partners LP': '955.69M',
'Lennox International, Inc.': '8.05B',
'WMIH Corp.': '300M',
'Comerica Incorporated': 'n/a'}
def test_exercise_7_2(x) -> bool:
return x == {'Solar Capital Ltd.': ['920.44', 'M'],
"Zoe's Kitchen, Inc.": ['262.32', 'M'],
'Toyota Motor Corp Ltd Ord': ['156.02', 'B'],
'Nuveen Virginia Quality Municipal Income Fund': ['238.33', 'M'],
'Kinross Gold Corporation': ['5.1', 'B'],
'Vulcan Materials Company': ['17.1', 'B'],
'Hi-Crush Partners LP': ['955.69', 'M'],
'Lennox International, Inc.': ['8.05', 'B'],
'WMIH Corp.': ['300', 'M'],
'Comerica Incorporated': ['n/', 'a']}
# exercise 8
def test_exercise_8__1(x) -> bool:
return 100 == len(x)
def test_exercise_8__2(x) -> bool:
return 31 == len(x)
# exercise 9
def test_exercise_9_1(x) -> bool:
return x == {'key1': 1,
'key2': ['list_element1', 34],
'key3': 'value3',
'key4': {'subkey1': 'v1'},
'key5': 4.5}
def test_exercise_9_2(x) -> bool:
return x == {'key1': 1, 'key3': 'value3', 'key4': {'subkey1': 'v1'}, 'key5': 4.5}
def test_exercise_9_3(x) -> bool:
return x == {'key1': 1, 'key4': {'subkey1': 'v1'}, 'key5': 4.5}
def test_exercise_9_4(x) -> bool:
return x == {'key1': 1, 'key5': 4.5}
# exercise 10
def test_exercise_10_1(x) -> bool:
return x == {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81}
def test_exercise_10_2(x) -> bool:
return x == {'Tom': 100, 'Dick': 200, 'Harry': 300}
def test_exercise_10_3(x) -> bool:
return x == {'Tom': 100, 'Dick': 200, 'Harry': 300}
# exercise 11
def test_exercise_11_1(x) -> bool:
return x == ('1', '3', '5')
# exercise 12
def test_exercise_12_1(x) -> bool:
return x == 'Hello World!'
def test_exercise_12_3(x) -> bool:
return x == 'o'
def test_exercise_12_4(x) -> bool:
return x == '!'
def test_exercise_12_5(x) -> bool:
return x == '!'
# exercise 13
def test_exercise_13_1(x) -> bool:
return x == 'Hello World! I am learning data wrangling'
def test_exercise_13_2(x) -> bool:
return x == 'llo Worl'
def test_exercise_13_3(x) -> bool:
return x == 'd! I am learning data wrangling'
def test_exercise_13_4(x) -> bool:
return x == ' wran'
# exercise 14
def test_exercise_13_4(x) -> bool:
return x == ['Name', ' Age', ' Sex', ' Address']
def test_exercise_13_4(x) -> bool:
return x == 'Name | Age | Sex | Address'
| 24.524927 | 110 | 0.46921 | 1,118 | 8,363 | 3.372987 | 0.182469 | 0.087245 | 0.186953 | 0.136834 | 0.646513 | 0.571732 | 0.528242 | 0.47388 | 0.451074 | 0.390082 | 0 | 0.226777 | 0.364104 | 8,363 | 340 | 111 | 24.597059 | 0.482324 | 0.041373 | 0 | 0.373206 | 0 | 0 | 0.287875 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.22488 | false | 0 | 0.004785 | 0.220096 | 0.45933 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 5 |
515eb463dfffe0d6f9d3288008e87b33da317ca2 | 47 | py | Python | djmail/exceptions.py | CuriousLearner/djmail | da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4 | [
"BSD-3-Clause"
] | 53 | 2015-06-22T11:24:00.000Z | 2021-08-30T21:00:08.000Z | djmail/exceptions.py | CuriousLearner/djmail | da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4 | [
"BSD-3-Clause"
] | 28 | 2015-11-04T16:11:00.000Z | 2021-02-24T17:48:14.000Z | djmail/exceptions.py | CuriousLearner/djmail | da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4 | [
"BSD-3-Clause"
] | 22 | 2015-07-29T15:53:53.000Z | 2020-12-21T04:32:26.000Z | class TemplateNotFound(RuntimeError):
pass
| 15.666667 | 37 | 0.787234 | 4 | 47 | 9.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148936 | 47 | 2 | 38 | 23.5 | 0.925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
5165e7022032b74b9e50f289ecc6b60f6b05a92c | 4,998 | py | Python | codejudge_solutions/hash_gugy_v1.py | Gyrst/HyperLogLog | 73b485999ed4dd9657fbcbbc7f0ca5b7d0b17449 | [
"Apache-2.0"
] | null | null | null | codejudge_solutions/hash_gugy_v1.py | Gyrst/HyperLogLog | 73b485999ed4dd9657fbcbbc7f0ca5b7d0b17449 | [
"Apache-2.0"
] | null | null | null | codejudge_solutions/hash_gugy_v1.py | Gyrst/HyperLogLog | 73b485999ed4dd9657fbcbbc7f0ca5b7d0b17449 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import sys
A_hex = [0x21ae4036, 0x32435171, 0xac3338cf, 0xea97b40c, 0x0e504b22, 0x9ff9a4ef, 0x111d014d, 0x934f3787, 0x6cd079bf, 0x69db5c31, 0xdf3c28ed, 0x40daf2ad, 0x82a5891c, 0x4659c7b0, 0x73dc0ca8, 0xdad3aca2, 0x00c74c7e, 0x9a2521e2, 0xf38eb6aa, 0x64711ab6, 0x5823150a, 0xd13a3a9a, 0x30a5aa04, 0x0fb9a1da, 0xef785119, 0xc9f0b067, 0x1e7dde42, 0xdda4a7b2, 0x1a1c2640, 0x297c0633, 0x744edb48, 0x19adce93]
def get_A(list_of_hex):
A_auto = []
for hex in A_hex:
row = []
bin_rep = "{:032b}".format(hex)
for bit in bin_rep:
row.append(int(bit))
A_auto.append(row)
return A_auto
def hex2bin(hex):
hex_bin_rep_row = []
decimal = int(hex, 16)
bin_rep = "{:032b}".format(decimal)
for bit in bin_rep:
hex_bin_rep_row.append(int(bit))
return hex_bin_rep_row
def hash(x):
A = [[0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0],
[0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1],
[1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1],
[1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0],
[0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0],
[1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1],
[0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1],
[1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1],
[0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1],
[0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1],
[1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1],
[0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1],
[1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0],
[0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0],
[0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0],
[1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0],
[1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0],
[1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],
[0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0],
[0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0],
[1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0],
[0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0],
[1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1],
[1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1],
[0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0],
[1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0],
[0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1],
[0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0],
[0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1]]
x_bin = hex2bin(x)
#print(x_bin)
matrix_mul = np.dot(A,x_bin)
#print(matrix_mul)
res_bin = matrix_mul % 2
#print(res_bin)
bin_str = ""
for i in reversed(res_bin):
bin_str += str(i)
res_hex_rep = hex(int(bin_str, 2))
# if res_hex_rep[2:] % 8 != 0:
# zeros_to_add = res_hex_rep[2:0] % 8
# for i in zeros_to_add:
# res_hex_rep[2:0]
return res_hex_rep[2:].zfill(8)
# test_input = ['00000001',
# '00000002',
# '00000003',
# '00000004',
# '00000005']
# for input in test_input:
# print(hash(input))
for line in sys.stdin:
print(hash(line)) | 56.795455 | 392 | 0.39896 | 1,238 | 4,998 | 1.571082 | 0.069467 | 0.283805 | 0.219023 | 0.158355 | 0.580977 | 0.569666 | 0.548072 | 0.548072 | 0.526478 | 0.523393 | 0 | 0.389602 | 0.345738 | 4,998 | 88 | 393 | 56.795455 | 0.205199 | 0.070428 | 0 | 0.032258 | 0 | 0 | 0.003022 | 0 | 0 | 0 | 0.06907 | 0 | 0 | 1 | 0.048387 | false | 0 | 0.032258 | 0 | 0.129032 | 0.016129 | 0 | 0 | 1 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5af58cd324b7d9a119ce726710b67a86425cd06a | 285 | py | Python | blatann/services/battery/data_types.py | teeheee/blatann | f8a75e68cd9d46b83d10482c5349842433dfa490 | [
"BSD-3-Clause"
] | 40 | 2018-03-01T19:49:20.000Z | 2022-03-31T11:35:06.000Z | blatann/services/battery/data_types.py | teeheee/blatann | f8a75e68cd9d46b83d10482c5349842433dfa490 | [
"BSD-3-Clause"
] | 29 | 2019-03-12T18:29:57.000Z | 2022-03-30T04:21:22.000Z | blatann/services/battery/data_types.py | teeheee/blatann | f8a75e68cd9d46b83d10482c5349842433dfa490 | [
"BSD-3-Clause"
] | 17 | 2019-03-27T19:11:12.000Z | 2022-03-16T06:00:08.000Z | from blatann.services import ble_data_types
# See https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.battery_service.xml
# For more info about the data types and values defined here
class BatteryLevel(ble_data_types.Uint8):
pass
| 31.666667 | 118 | 0.796491 | 40 | 285 | 5.55 | 0.825 | 0.121622 | 0.108108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004032 | 0.129825 | 285 | 8 | 119 | 35.625 | 0.891129 | 0.610526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 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 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
85170ba7fce029706de8126a5e0034b5fe436d21 | 144 | py | Python | dss/util/version.py | ucsc-cgp/cgp-data-store | 1d583d654a07a14df0c566a66fb6ba574be36cbc | [
"MIT"
] | null | null | null | dss/util/version.py | ucsc-cgp/cgp-data-store | 1d583d654a07a14df0c566a66fb6ba574be36cbc | [
"MIT"
] | 21 | 2018-06-11T23:23:02.000Z | 2018-11-30T00:37:13.000Z | dss/util/version.py | ucsc-cgp/cgp-data-store | 1d583d654a07a14df0c566a66fb6ba574be36cbc | [
"MIT"
] | null | null | null | import datetime
def datetime_to_version_format(timestamp: datetime.datetime) -> str:
return timestamp.strftime("%Y-%m-%dT%H%M%S.%fZ")
| 24 | 68 | 0.715278 | 21 | 144 | 4.761905 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131944 | 144 | 5 | 69 | 28.8 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0.131944 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 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 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 5 |
5182eb6317b3baecfde72caab1b23600daa6ade3 | 100 | py | Python | ELPLib/__init__.py | Versatilus/ELPLib | 3acbb2b6b31c44cf9479eab4651b826eb09bedbe | [
"MIT"
] | null | null | null | ELPLib/__init__.py | Versatilus/ELPLib | 3acbb2b6b31c44cf9479eab4651b826eb09bedbe | [
"MIT"
] | null | null | null | ELPLib/__init__.py | Versatilus/ELPLib | 3acbb2b6b31c44cf9479eab4651b826eb09bedbe | [
"MIT"
] | null | null | null | from .keyboard import KeyBind
from .mouse import pause_mouse, MousePauseFunction, eyemouse_launcher
| 33.333333 | 69 | 0.86 | 12 | 100 | 7 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 100 | 2 | 70 | 50 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
51e7179d7f05a149e000019383330cd786be0d44 | 249 | py | Python | keras_self_attention/__init__.py | CyberZHG/keras-global-self-attention | f3bf21dbb1f3251b5417a8bb254dd91807b1aec5 | [
"MIT"
] | null | null | null | keras_self_attention/__init__.py | CyberZHG/keras-global-self-attention | f3bf21dbb1f3251b5417a8bb254dd91807b1aec5 | [
"MIT"
] | null | null | null | keras_self_attention/__init__.py | CyberZHG/keras-global-self-attention | f3bf21dbb1f3251b5417a8bb254dd91807b1aec5 | [
"MIT"
] | null | null | null | from .seq_self_attention import SeqSelfAttention
from .seq_weighted_attention import SeqWeightedAttention
from .scaled_dot_attention import ScaledDotProductAttention
from .real_former import ResidualScaledDotProductAttention
__version__ = '0.51.0'
| 35.571429 | 59 | 0.883534 | 27 | 249 | 7.740741 | 0.62963 | 0.215311 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017467 | 0.080321 | 249 | 6 | 60 | 41.5 | 0.895197 | 0 | 0 | 0 | 0 | 0 | 0.024096 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
a4042715944f98160a2ca94066970b3954b62571 | 97 | py | Python | enthought/mayavi/sources/volume_reader.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/mayavi/sources/volume_reader.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/mayavi/sources/volume_reader.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from mayavi.sources.volume_reader import *
| 24.25 | 42 | 0.845361 | 13 | 97 | 5.846154 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113402 | 97 | 3 | 43 | 32.333333 | 0.883721 | 0.123711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
cf9b2e81873c69db0d7068e30ff85c87953f5f4b | 34 | py | Python | snippets/python/snippets/imports/urlparse.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | snippets/python/snippets/imports/urlparse.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | snippets/python/snippets/imports/urlparse.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | from urllib.parse import urlparse
| 17 | 33 | 0.852941 | 5 | 34 | 5.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117647 | 34 | 1 | 34 | 34 | 0.966667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
cfd15c9d393e1ca42da09e06fdfdfc75e1087485 | 328 | py | Python | src/is_even.py | kemingy/techie-delight | 886e2da8c95d0ea596b902b37f95f55f0f1c5053 | [
"FTL"
] | 2 | 2019-08-19T06:06:44.000Z | 2021-05-09T14:00:59.000Z | src/is_even.py | kemingy/techie-delight | 886e2da8c95d0ea596b902b37f95f55f0f1c5053 | [
"FTL"
] | null | null | null | src/is_even.py | kemingy/techie-delight | 886e2da8c95d0ea596b902b37f95f55f0f1c5053 | [
"FTL"
] | null | null | null | # Given a number, find out if it is even or odd without using any conditional
# statement (if-else) or ternary operator.
def is_even(n):
return n & 1 == 0
def print_even_or_odd(n):
word = ['even', 'odd']
print(word[n & 1])
if __name__ == '__main__':
print_even_or_odd(4)
print_even_or_odd(1)
| 23.428571 | 78 | 0.637195 | 55 | 328 | 3.472727 | 0.527273 | 0.125654 | 0.188482 | 0.219895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020243 | 0.246951 | 328 | 13 | 79 | 25.230769 | 0.753036 | 0.353659 | 0 | 0 | 0 | 0 | 0.076531 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0.125 | 0.375 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 5 |
32249a0fd196f3f03dcef04589ef786632c19ef3 | 59 | py | Python | HackerEarth/BitManipulation/Binary2Gray.py | AbhiSaphire/Codechef.Practice | f671292dad2695e37458866442a6b951ba4e1a71 | [
"MIT"
] | 27 | 2020-05-19T06:46:45.000Z | 2022-02-06T20:29:58.000Z | HackerEarth/BitManipulation/Binary2Gray.py | AbhiSaphire/Codechef.Practice | f671292dad2695e37458866442a6b951ba4e1a71 | [
"MIT"
] | 1 | 2020-06-23T13:08:08.000Z | 2020-10-06T06:27:15.000Z | HackerEarth/BitManipulation/Binary2Gray.py | AbhiSaphire/Codechef.Practice | f671292dad2695e37458866442a6b951ba4e1a71 | [
"MIT"
] | 4 | 2020-05-19T06:47:52.000Z | 2021-07-09T02:49:09.000Z | def Binary2Gray(n):
return n^(n>>1)
print(Binary2Gray(4)) | 14.75 | 21 | 0.694915 | 10 | 59 | 4.1 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.075472 | 0.101695 | 59 | 4 | 21 | 14.75 | 0.698113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0.333333 | 0.666667 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
32257851ef0d3ab404cabdb4ac48f5ba97524250 | 2,421 | py | Python | examples/games/othello/run.py | sdrees/mCRL2 | bbda4c85022bc21cfa3eab3aafd07e60e89dee2d | [
"BSL-1.0"
] | null | null | null | examples/games/othello/run.py | sdrees/mCRL2 | bbda4c85022bc21cfa3eab3aafd07e60e89dee2d | [
"BSL-1.0"
] | null | null | null | examples/games/othello/run.py | sdrees/mCRL2 | bbda4c85022bc21cfa3eab3aafd07e60e89dee2d | [
"BSL-1.0"
] | null | null | null | import os
os.system('mcrl22lps -vo othello.mcrl2 othello.lps')
os.system('lpssuminst -v -rjitty othello.lps temp0.lps')
os.system('lpsparunfold -n6 -lv -sBoard temp0.lps > temp1.lps')
os.system('lpsrewr -v -rjitty temp1.lps | lpsconstelm -c -v | lpsrewr -v > temp2.lps')
os.system('lpsparunfold -n6 -lv -sRow temp2.lps > temp3.lps')
os.system('lpsrewr -v -rjitty temp3.lps temp4.lps')
os.system('lpsconstelm -c -v -rjitty temp4.lps temp4a.lps')
os.system('lpsrewr -v -rjitty temp4a.lps temp5.lps')
os.system('lps2lts -v -rjitty temp5.lps')
os.system('echo ----------------------------------------------')
os.system('echo Red can always win, i.e. red has a winning strategy.')
os.system('echo ---------------------------------------------- ')
os.system('lps2pbes -v -fred_wins_always.mcf temp5.lps othello.pbes')
os.system('pbes2bool -v -rjitty othello.pbes')
os.system('echo ----------------------------------------------')
os.system('echo White can always win, i.e. white has a winning strategy.')
os.system('echo ----------------------------------------------')
os.system('lps2pbes -v -fwhite_wins_always.mcf temp5.lps othello.pbes')
os.system('pbes2bool -v -rjitty othello.pbes')
os.system('echo ----------------------------------------------')
os.system('echo Nodeadlock.')
os.system('echo ----------------------------------------------')
os.system('lps2pbes -v -fnodeadlock.mcf temp5.lps othello.pbes')
os.system('pbes2bool -v -rjitty othello.pbes')
os.system('echo ----------------------------------------------')
os.system('echo There exists a draw.')
os.system('echo ----------------------------------------------')
os.system('lps2pbes -v -fexists_draw.mcf temp5.lps othello.pbes')
os.system('pbes2bool -v -rjitty othello.pbes')
os.system('echo ----------------------------------------------')
os.system('echo White can win.')
os.system('echo ----------------------------------------------')
os.system('lps2pbes -v -fwhite_can_win.mcf temp5.lps othello.pbes')
os.system('pbes2bool -v -rjitty othello.pbes')
os.system('echo ----------------------------------------------')
os.system('echo Red can win.')
os.system('echo ----------------------------------------------')
os.system('lps2pbes -v -fred_can_win.mcf temp5.lps othello.pbes')
os.system('pbes2bool -v -rjitty othello.pbes')
os.system('echo ----------------------------------------------')
os.system('echo ----------------------------------------------')
| 53.8 | 86 | 0.531599 | 292 | 2,421 | 4.376712 | 0.178082 | 0.256651 | 0.187793 | 0.14241 | 0.750391 | 0.733177 | 0.632238 | 0.586854 | 0.545383 | 0.492958 | 0 | 0.016957 | 0.074349 | 2,421 | 44 | 87 | 55.022727 | 0.553324 | 0 | 0 | 0.47619 | 0 | 0.02381 | 0.758264 | 0.284298 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.02381 | 0 | 0.02381 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5ca0ea38de27b5ce5a1ab7e0cc6505b8f7ee48a9 | 252 | py | Python | Task/Parsing-RPN-calculator-algorithm/Python/parsing-rpn-calculator-algorithm-2.py | LaudateCorpus1/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 5 | 2021-01-29T20:08:05.000Z | 2022-03-22T06:16:05.000Z | Task/Parsing-RPN-calculator-algorithm/Python/parsing-rpn-calculator-algorithm-2.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/Parsing-RPN-calculator-algorithm/Python/parsing-rpn-calculator-algorithm-2.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2021-04-13T04:19:31.000Z | 2021-04-13T04:19:31.000Z | a=[]
b={'+': lambda x,y: y+x, '-': lambda x,y: y-x, '*': lambda x,y: y*x,'/': lambda x,y:y/x,'^': lambda x,y:y**x}
for c in '3 4 2 * 1 5 - 2 3 ^ ^ / +'.split():
if c in b: a.append(b[c](a.pop(),a.pop()))
else: a.append(float(c))
print c, a
| 36 | 109 | 0.464286 | 58 | 252 | 2.017241 | 0.344828 | 0.299145 | 0.34188 | 0.384615 | 0.42735 | 0.42735 | 0.42735 | 0.42735 | 0.42735 | 0.42735 | 0 | 0.035533 | 0.218254 | 252 | 6 | 110 | 42 | 0.558376 | 0 | 0 | 0 | 0 | 0 | 0.119048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.166667 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5cc4d22f9643c9c1a09920a8cc077c630e29109d | 64 | py | Python | 2019/08/04/Organizing a Flask Project Beyond Single File/app_structure/app_structure/models.py | kenjitagawa/youtube_video_code | ef3c48b9e136b3745d10395d94be64cb0a1f1c97 | [
"Unlicense"
] | 492 | 2019-06-25T12:54:31.000Z | 2022-03-30T12:38:28.000Z | 2019/08/04/Organizing a Flask Project Beyond Single File/app_structure/app_structure/models.py | kenjitagawa/youtube_video_code | ef3c48b9e136b3745d10395d94be64cb0a1f1c97 | [
"Unlicense"
] | 23 | 2019-10-01T01:36:08.000Z | 2022-02-10T12:46:16.000Z | 2019/08/04/Organizing a Flask Project Beyond Single File/app_structure/app_structure/models.py | kenjitagawa/youtube_video_code | ef3c48b9e136b3745d10395d94be64cb0a1f1c97 | [
"Unlicense"
] | 1,734 | 2019-06-03T06:25:13.000Z | 2022-03-31T23:57:53.000Z | from .extensions import db
class MyModel(db.Model):
pass | 16 | 27 | 0.703125 | 9 | 64 | 5 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.21875 | 64 | 4 | 28 | 16 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 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 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
7a3f204d5a6227e3a9580edd77b9f4cca48d492a | 103 | py | Python | amsdt/solver.py | alexisrosuel/AMSDT | c3a4f45b022770a87ce533cc39d948fabaf39030 | [
"MIT"
] | null | null | null | amsdt/solver.py | alexisrosuel/AMSDT | c3a4f45b022770a87ce533cc39d948fabaf39030 | [
"MIT"
] | null | null | null | amsdt/solver.py | alexisrosuel/AMSDT | c3a4f45b022770a87ce533cc39d948fabaf39030 | [
"MIT"
] | null | null | null | class Solver:
def __init__():
"""
class to find the best specification
"""
| 17.166667 | 44 | 0.514563 | 10 | 103 | 4.9 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.38835 | 103 | 5 | 45 | 20.6 | 0.777778 | 0.349515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
7a7e052e2034dda82b7dac7c7003daf3ec3a00ed | 205 | py | Python | app/models/__init__.py | msolorio/flask_world_api | a2d5394618b736aa7d5d5e75a422dbe9e5713533 | [
"MIT"
] | 1 | 2022-02-24T04:37:04.000Z | 2022-02-24T04:37:04.000Z | app/models/__init__.py | msolorio/flask_world_api | a2d5394618b736aa7d5d5e75a422dbe9e5713533 | [
"MIT"
] | null | null | null | app/models/__init__.py | msolorio/flask_world_api | a2d5394618b736aa7d5d5e75a422dbe9e5713533 | [
"MIT"
] | null | null | null | from .model_config import db, ma
from .Error import ServerError, ClientError, generalError
from .Country import Country, country_schema, countries_schema
from .City import City, city_schema, cities_schema
| 41 | 62 | 0.834146 | 28 | 205 | 5.928571 | 0.535714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.112195 | 205 | 4 | 63 | 51.25 | 0.912088 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
7ab8f42276ad1953af66ffcd5f14307b0809063b | 466 | py | Python | Program/common/rules_management/rule.py | AntonPashkowskiy/Tars | 07cf1a7eb466c763ffb7ab46cd173d76067fe9d3 | [
"MIT"
] | null | null | null | Program/common/rules_management/rule.py | AntonPashkowskiy/Tars | 07cf1a7eb466c763ffb7ab46cd173d76067fe9d3 | [
"MIT"
] | null | null | null | Program/common/rules_management/rule.py | AntonPashkowskiy/Tars | 07cf1a7eb466c763ffb7ab46cd173d76067fe9d3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
class Rule:
def __init__(self, target_directory, file_constraints, action):
self._target_directory = target_directory
self._file_constraints = file_constraints
self._action = action
@property
def target_directory(self):
return self._target_directory
@property
def file_constraints(self):
return self._file_constraints
@property
def action(self):
return self._action
| 22.190476 | 67 | 0.686695 | 51 | 466 | 5.882353 | 0.294118 | 0.25 | 0.19 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002833 | 0.242489 | 466 | 20 | 68 | 23.3 | 0.847026 | 0.036481 | 0 | 0.214286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0 | 0.214286 | 0.571429 | 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 | 1 | 1 | 0 | 0 | 5 |
8ff23937e9e5206e5a36b919c629ff39ea78ad0b | 74 | py | Python | nff/train/hooks/__init__.py | jkaraguesian/NeuralForceField | 4ca4f4c7edc0ed1f70952db9e42d8ef9bbe109d8 | [
"MIT"
] | 450 | 2018-09-04T08:37:47.000Z | 2022-03-30T08:05:37.000Z | nff/train/hooks/__init__.py | jkaraguesian/NeuralForceField | 4ca4f4c7edc0ed1f70952db9e42d8ef9bbe109d8 | [
"MIT"
] | 239 | 2018-09-11T21:09:08.000Z | 2022-03-18T09:25:11.000Z | nff/train/hooks/__init__.py | jkaraguesian/NeuralForceField | 4ca4f4c7edc0ed1f70952db9e42d8ef9bbe109d8 | [
"MIT"
] | 166 | 2018-09-13T13:01:06.000Z | 2022-03-31T12:59:12.000Z | from .base_hook import *
from .logging import *
from .scheduling import *
| 18.5 | 25 | 0.756757 | 10 | 74 | 5.5 | 0.6 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162162 | 74 | 3 | 26 | 24.666667 | 0.887097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
64e3b6c5d70351aca09b6b2a055a2787c54af9be | 36 | py | Python | src/adafruit_blinka/board/nanopi/__init__.py | Jcc99/Adafruit_Blinka | 41f8155bab83039ed9d45276addd3d501e83f3e6 | [
"MIT"
] | 294 | 2018-06-30T19:08:27.000Z | 2022-03-26T21:08:47.000Z | src/adafruit_blinka/board/nanopi/__init__.py | Jcc99/Adafruit_Blinka | 41f8155bab83039ed9d45276addd3d501e83f3e6 | [
"MIT"
] | 421 | 2018-06-30T20:54:46.000Z | 2022-03-31T15:08:37.000Z | src/adafruit_blinka/board/nanopi/__init__.py | Jcc99/Adafruit_Blinka | 41f8155bab83039ed9d45276addd3d501e83f3e6 | [
"MIT"
] | 234 | 2018-07-23T18:49:16.000Z | 2022-03-28T16:59:48.000Z | """Board definitions from NanoPi"""
| 18 | 35 | 0.722222 | 4 | 36 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 36 | 1 | 36 | 36 | 0.8125 | 0.805556 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
64e93a6ce7c65ca73f425e04ce9258856da1c55a | 537 | py | Python | tests/generators_and_iterators/test_multiiter.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/generators_and_iterators/test_multiiter.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/generators_and_iterators/test_multiiter.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from generators_and_iterators.iterators.multiiter import multiiter
# todo: fix generator
@unittest.skip
class MultiIterTests(unittest.TestCase):
def test1(self):
self.assertEquals(multiiter(0), [])
def test2(self):
self.assertEquals(multiiter(2), (0,), (1,))
def test3(self):
self.assertEquals(multiiter(2, 3), [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), ])
def test4(self):
self.assertEquals(multiiter(3, 2), [(0, 0), (0, 1), (1, 0), (1, 1), (2, 0), (2, 1), ])
| 26.85 | 94 | 0.592179 | 75 | 537 | 4.213333 | 0.333333 | 0.031646 | 0.253165 | 0.367089 | 0.189873 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084309 | 0.204842 | 537 | 19 | 95 | 28.263158 | 0.655738 | 0.035382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 0.333333 | 1 | 0.333333 | false | 0 | 0.166667 | 0 | 0.583333 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
8f07487f2545165a2712e0baa201834cce29d543 | 190 | py | Python | src/dsrlib/compiler/__init__.py | fraca7/dsremap | fb8f4fb13e74b512ed0cac05387fbe9694faebcf | [
"MIT"
] | 8 | 2020-09-06T02:15:10.000Z | 2022-01-12T22:49:20.000Z | src/dsrlib/compiler/__init__.py | fraca7/dsremap | fb8f4fb13e74b512ed0cac05387fbe9694faebcf | [
"MIT"
] | 5 | 2021-03-29T20:37:46.000Z | 2021-09-19T13:20:24.000Z | src/dsrlib/compiler/__init__.py | fraca7/dsremap | fb8f4fb13e74b512ed0cac05387fbe9694faebcf | [
"MIT"
] | 2 | 2020-09-16T01:45:49.000Z | 2021-06-12T12:38:15.000Z | #!/usr/bin/env python3
from .preprocessor import Preprocessor, FilePreprocessor
from .compiler import Compiler
from .interm import ICGenerator
from .codegen import CodeGenerator, StackSize
| 27.142857 | 56 | 0.831579 | 22 | 190 | 7.181818 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005917 | 0.110526 | 190 | 6 | 57 | 31.666667 | 0.928994 | 0.110526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8f147e3244578f36b99ee023f7bf5ececa882f18 | 130 | py | Python | libft/visualizers/__init__.py | kcosta42/Multilayer_Perceptron | 51e2f9e0532c6e1e9b826b12171903b780e0ba4f | [
"MIT"
] | 1 | 2020-09-26T10:40:45.000Z | 2020-09-26T10:40:45.000Z | libft/visualizers/__init__.py | kcosta42/Multilayer_Perceptron | 51e2f9e0532c6e1e9b826b12171903b780e0ba4f | [
"MIT"
] | null | null | null | libft/visualizers/__init__.py | kcosta42/Multilayer_Perceptron | 51e2f9e0532c6e1e9b826b12171903b780e0ba4f | [
"MIT"
] | null | null | null | from libft.visualizers.progbar import Progbar
from libft.visualizers.utils import plot_model
__all__ = ['Progbar', 'plot_model']
| 26 | 46 | 0.807692 | 17 | 130 | 5.823529 | 0.529412 | 0.181818 | 0.40404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 130 | 4 | 47 | 32.5 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0.130769 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8f54d2f760a831fd51e3b8926642867dc4a7ec35 | 32 | py | Python | env/Lib/site-packages/win32/transaction/__init__.py | Daniel-Key/HearStone-Python | 981584d2b9502319393bd92b48f0ec8d906b4d44 | [
"MIT"
] | null | null | null | env/Lib/site-packages/win32/transaction/__init__.py | Daniel-Key/HearStone-Python | 981584d2b9502319393bd92b48f0ec8d906b4d44 | [
"MIT"
] | 1 | 2020-10-27T14:44:08.000Z | 2020-10-27T14:44:08.000Z | env/Lib/site-packages/win32/transaction/__init__.py | Daniel-Key/HearStone-Python | 981584d2b9502319393bd92b48f0ec8d906b4d44 | [
"MIT"
] | null | null | null | from win32._transaction import * | 32 | 32 | 0.84375 | 4 | 32 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.068966 | 0.09375 | 32 | 1 | 32 | 32 | 0.827586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
8f6f0752aa9a042baf02c867e47a5ca62088dd24 | 1,398 | py | Python | src/riski/cli/local_import.py | GFDRR/RISKi | 98c75e642bfca72f6bb26f6301db049804c61151 | [
"0BSD"
] | null | null | null | src/riski/cli/local_import.py | GFDRR/RISKi | 98c75e642bfca72f6bb26f6301db049804c61151 | [
"0BSD"
] | null | null | null | src/riski/cli/local_import.py | GFDRR/RISKi | 98c75e642bfca72f6bb26f6301db049804c61151 | [
"0BSD"
] | null | null | null | """Import generated tiff files into local postgresql/postgis database.
geopackage details extracted with `gdalinfo [FILENAME].gpkg -json > data_details.json`
"""
@app.command()
def import_gpkg_rasters(settings_file: str, gpkg: str, dev: bool = False):
"""Import rasters from geopackage"""
pass
# import os
# import json
# import subprocess
# with open("data_details.json") as fp:
# details = json.loads(fp.read())
# sd_details = details['metadata']['SUBDATASETS']
# names = []
# for ent, sd in sd_details.items():
# if ent.endswith('_NAME'):
# names.append(sd)
# # Import each geotiff into postgis DB
# # base_cmd = "gdal_translate -ot Byte -of GTiff "
# # -I Create a GIST spatial index on the raster column.
# # -R register geotiff as out-of-database file
# base_cmd = "raster2pgsql -I -R" # [CONVERTED FILENAME].gpkg | psql -U[USERNAME] -d [DATABASE NAME]
# conn = "dbname=shapefile_test user=testuser password=meowmeowbeans"
# for idx, n in enumerate(names):
# infile = n.split(':')[-1]+".tiff"
# # -R option requires absolute paths to be given
# infile = os.path.abspath(infile)
# if idx > 0:
# cmd = f"{base_cmd} {infile} -a public.out_raster | psql \"{conn}\""
# else:
# cmd = f"{base_cmd} {infile} -c public.out_raster | psql \"{conn}\""
# print(infile)
# print(cmd)
# subprocess.call(cmd, shell=True)
| 27.96 | 101 | 0.655937 | 190 | 1,398 | 4.742105 | 0.584211 | 0.031077 | 0.033296 | 0.024417 | 0.08879 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002671 | 0.19671 | 1,398 | 49 | 102 | 28.530612 | 0.799644 | 0.864092 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.333333 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
56b0adea90cbafc5582a804796a476ab94a8e9d3 | 162 | py | Python | isserviceup/helpers/utils.py | EvgeshaGars/is-service-up | 9df5ebb1fbb09102300518855aaa35c0a84bb2bf | [
"Apache-2.0"
] | 182 | 2016-10-23T19:08:04.000Z | 2021-03-23T07:01:17.000Z | isserviceup/helpers/utils.py | EvgeshaGars/is-service-up | 9df5ebb1fbb09102300518855aaa35c0a84bb2bf | [
"Apache-2.0"
] | 22 | 2016-10-25T07:20:23.000Z | 2017-05-18T19:53:11.000Z | isserviceup/helpers/utils.py | EvgeshaGars/is-service-up | 9df5ebb1fbb09102300518855aaa35c0a84bb2bf | [
"Apache-2.0"
] | 37 | 2016-10-24T05:50:51.000Z | 2021-12-09T18:41:08.000Z | import random
import string
def random_string(n=10):
return ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(n))
| 23.142857 | 106 | 0.753086 | 23 | 162 | 5.173913 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014085 | 0.123457 | 162 | 6 | 107 | 27 | 0.823944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.5 | 0.25 | 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 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 5 |
56b4bf5b1eed58ad2fba6664cdd55fcb610d4879 | 71 | py | Python | scripts/templates/fastApiCrud/partials/repo_field_update.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | 39 | 2020-03-13T19:41:11.000Z | 2022-02-14T02:01:00.000Z | scripts/templates/fastApiCrud/partials/repo_field_update.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | 5 | 2020-08-01T08:55:48.000Z | 2022-02-10T00:55:39.000Z | scripts/templates/fastApiCrud/partials/repo_field_update.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | 4 | 2020-11-10T20:45:12.000Z | 2021-03-18T06:18:55.000Z | db_entity.zaruba_field_name = zaruba_entity_name_data.zaruba_field_name | 71 | 71 | 0.929577 | 12 | 71 | 4.833333 | 0.5 | 0.37931 | 0.517241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028169 | 71 | 1 | 71 | 71 | 0.84058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
712c0ba80a868fa213d825c06fa45ea3cc029039 | 2,218 | py | Python | src/app/resolvers/bot_button.py | taishengG/jama-slack-integration | 746b7186ceaf955ca81e9e0ad4862141ce35eb8d | [
"MIT"
] | 1 | 2019-07-17T22:39:21.000Z | 2019-07-17T22:39:21.000Z | src/app/resolvers/bot_button.py | taishengG/jama-slack-integration | 746b7186ceaf955ca81e9e0ad4862141ce35eb8d | [
"MIT"
] | 4 | 2018-11-16T05:56:06.000Z | 2018-11-29T05:07:52.000Z | src/app/resolvers/bot_button.py | taishengG/jama-slack-integration | 746b7186ceaf955ca81e9e0ad4862141ce35eb8d | [
"MIT"
] | 6 | 2018-11-08T03:49:28.000Z | 2019-04-29T19:53:25.000Z | from flask import make_response
from slack.slack_json_factories.dialog_json import comment
from slack.slack_json_factories import create_fields
from slack import tools
from jama.comment.comment import user_project_id_list
def resolve_submit_project(payload, slack_client):
"""Resolves slack bot button submission for project.
Arguments:
payload (JSON Object): Payload from dialog submission
slack_client (SlackClient Object): to invoke slack dialog
Returns:
Response (object): To make the response, we use make_response()
from the flask library.
"""
global user_project_id_list
if payload["actions"][0]["name"] == "comment":
slack_team_id = payload["team"]["id"]
slack_user_id = payload["user"]["id"]
if (slack_team_id, slack_user_id) in user_project_id_list:
del user_project_id_list[(slack_team_id, slack_user_id)]
slack_client.api_call(
"dialog.open",
trigger_id=payload["trigger_id"],
dialog=comment.comment_dialog(payload)
)
elif payload["actions"][0]["name"] == "create":
content = payload["actions"][0]["value"]
content = tools.string_to_int(content)
slack_client.api_call(
"dialog.open",
trigger_id=payload["trigger_id"],
dialog = create_fields(content)
)
return make_response("", 200)
def resolve_submit_item(payload, slack_client):
"""Resolves slack bot button submission for item.
Arguments:
payload (JSON Object): Payload from dialog submission
slack_client (SlackClient Object): to invoke slack dialog
Returns:
Response (object): To make the response, we use make_response()
from the flask library.
"""
global user_project_id_list
slack_team_id = payload["team"]["id"]
slack_user_id = payload["user"]["id"]
if (slack_team_id, slack_user_id) in user_project_id_list:
del user_project_id_list[(slack_team_id, slack_user_id)]
slack_client.api_call(
"dialog.open",
trigger_id=payload["trigger_id"],
dialog=comment.comment_dialog(payload)
)
return make_response("", 200)
| 33.606061 | 71 | 0.67358 | 283 | 2,218 | 4.992933 | 0.204947 | 0.03397 | 0.064402 | 0.084218 | 0.743808 | 0.705591 | 0.705591 | 0.705591 | 0.705591 | 0.630573 | 0 | 0.005263 | 0.229035 | 2,218 | 65 | 72 | 34.123077 | 0.821053 | 0.25789 | 0 | 0.605263 | 0 | 0 | 0.084971 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.052632 | false | 0 | 0.131579 | 0 | 0.236842 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 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 | 5 |
857c383dded24124618126acc26dc7107d7dc5ea | 456 | py | Python | tests/test_decibel.py | cnheider/python-acoustics | fbc87454422c41e1a39e282d7680126a6d8014dd | [
"BSD-3-Clause"
] | 371 | 2015-02-21T19:16:49.000Z | 2022-03-31T03:36:56.000Z | tests/test_decibel.py | sky-enter/python-acoustics | fbc87454422c41e1a39e282d7680126a6d8014dd | [
"BSD-3-Clause"
] | 80 | 2015-01-03T09:48:05.000Z | 2022-01-31T23:09:11.000Z | tests/test_decibel.py | sky-enter/python-acoustics | fbc87454422c41e1a39e282d7680126a6d8014dd | [
"BSD-3-Clause"
] | 109 | 2015-01-26T01:46:38.000Z | 2022-03-23T06:41:42.000Z | from acoustics.decibel import *
def test_dbsum():
assert (abs(dbsum([10.0, 10.0]) - 13.0103) < 1e-5)
def test_dbmean():
assert (dbmean([10.0, 10.0]) == 10.0)
def test_dbadd():
assert (abs(dbadd(10.0, 10.0) - 13.0103) < 1e-5)
def test_dbsub():
assert (abs(dbsub(13.0103, 10.0) - 10.0) < 1e-5)
def test_dbmul():
assert (abs(dbmul(10.0, 2) - 13.0103) < 1e-5)
def test_dbdiv():
assert (abs(dbdiv(13.0103, 2) - 10.0) < 1e-5)
| 17.538462 | 54 | 0.585526 | 83 | 456 | 3.144578 | 0.253012 | 0.126437 | 0.095785 | 0.114943 | 0.229885 | 0.229885 | 0.168582 | 0.168582 | 0.168582 | 0.168582 | 0 | 0.206044 | 0.201754 | 456 | 25 | 55 | 18.24 | 0.510989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.461538 | 1 | 0.461538 | true | 0 | 0.076923 | 0 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
857da9702ffb9c551bdac57c0dab18dae39939a3 | 29 | py | Python | __init__.py | prekolna/AlgorithmsGreatestHits | 7cdb60825b6e36abbffd5bdba480c3c70bc2c413 | [
"MIT"
] | 1 | 2017-04-07T03:57:04.000Z | 2017-04-07T03:57:04.000Z | __init__.py | doug-wade/AlgorithmsGreatestHits | 7cdb60825b6e36abbffd5bdba480c3c70bc2c413 | [
"MIT"
] | 1 | 2021-06-17T00:41:56.000Z | 2021-06-17T00:41:56.000Z | __init__.py | doug-wade/AlgorithmsGreatestHits | 7cdb60825b6e36abbffd5bdba480c3c70bc2c413 | [
"MIT"
] | null | null | null | from . import data_structures | 29 | 29 | 0.862069 | 4 | 29 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 29 | 1 | 29 | 29 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
85951e1e9d515cbbdb8bdca7f9c39d1473c6c04c | 148 | py | Python | hello.py | envia/hello-python | eb222ddaa7e862985ee4517dfb57908d0cc6392e | [
"Unlicense"
] | null | null | null | hello.py | envia/hello-python | eb222ddaa7e862985ee4517dfb57908d0cc6392e | [
"Unlicense"
] | null | null | null | hello.py | envia/hello-python | eb222ddaa7e862985ee4517dfb57908d0cc6392e | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8; -*-
# vim: set expandtab fileencoding=utf-8 shiftwidth=4 softtabstop=4 tabstop=8:
print "Hello, World!"
| 24.666667 | 77 | 0.689189 | 22 | 148 | 4.636364 | 0.818182 | 0.078431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03876 | 0.128378 | 148 | 5 | 78 | 29.6 | 0.751938 | 0.804054 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
859baa1f358d24dff18d0b96116d24e103f48172 | 125 | py | Python | src/home_page/admin.py | SkarioT/django | 756cdaf14f946e1a724c7fafbe7d13780d23c622 | [
"MIT"
] | null | null | null | src/home_page/admin.py | SkarioT/django | 756cdaf14f946e1a724c7fafbe7d13780d23c622 | [
"MIT"
] | 3 | 2020-07-28T10:00:16.000Z | 2021-06-04T23:25:09.000Z | src/home_page/admin.py | SkarioT/django | 756cdaf14f946e1a724c7fafbe7d13780d23c622 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import CourseData
# Register your models here.
admin.site.register(CourseData) | 25 | 32 | 0.824 | 17 | 125 | 6.058824 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.112 | 125 | 5 | 33 | 25 | 0.927928 | 0.208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
a4870a2b37784ab409d3ddf261f39bb88c3b55d7 | 195 | py | Python | acq4/util/Canvas/__init__.py | travis-open/acq4 | 2b3a2a6aa7616f6b65d09c3d01cb73e1a07b1088 | [
"MIT"
] | null | null | null | acq4/util/Canvas/__init__.py | travis-open/acq4 | 2b3a2a6aa7616f6b65d09c3d01cb73e1a07b1088 | [
"MIT"
] | null | null | null | acq4/util/Canvas/__init__.py | travis-open/acq4 | 2b3a2a6aa7616f6b65d09c3d01cb73e1a07b1088 | [
"MIT"
] | null | null | null | ## Extend canvas to add some new canvasItem classes
from acq4.pyqtgraph.canvas import *
from .Canvas import Canvas
from items import *
#from ScanCanvasItem import *
#from CellCanvasItem import *
| 27.857143 | 51 | 0.794872 | 26 | 195 | 5.961538 | 0.576923 | 0.193548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006024 | 0.148718 | 195 | 6 | 52 | 32.5 | 0.927711 | 0.533333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
a4a03e4d5bfcbb69089ce0f44b736c541ae06a83 | 600 | py | Python | ljdata/ds/__init__.py | scaramallion/pylibjpeg-data | 2ab4b8a65b070656eca2582bd23197a3d01cdccd | [
"MIT"
] | 3 | 2020-03-07T21:54:09.000Z | 2020-06-11T02:23:58.000Z | ljdata/ds/__init__.py | scaramallion/pylibjpeg-data | 2ab4b8a65b070656eca2582bd23197a3d01cdccd | [
"MIT"
] | 2 | 2020-03-08T00:35:51.000Z | 2020-07-19T23:42:13.000Z | ljdata/ds/__init__.py | scaramallion/pylibjpeg-data | 2ab4b8a65b070656eca2582bd23197a3d01cdccd | [
"MIT"
] | 1 | 2020-03-07T21:49:07.000Z | 2020-03-07T21:49:07.000Z | from .JPEG2000 import INDEX as JPEG2000_IDX
from .JPEG2000Lossless import INDEX as JPEG2000Lossless_IDX
from .JPEGBaseline import INDEX as JPEGBaseline_IDX
from .JPEGExtended import INDEX as JPEGExtended_IDX
from .JPEGLossless import INDEX as JPEGLossless_IDX
from .JPEGLosslessSV1 import INDEX as JPEGLosslessSV1_IDX
from .JPEGLS import INDEX as JPEGLS_IDX
from .JPEGLSLossless import INDEX as JPEGLSLossless_IDX
from .LittleEndianExplicit import INDEX as LittleEndianExplicit_IDX
from .LittleEndianImplicit import INDEX as LittleEndianImplicit_IDX
from .RLELossless import INDEX as RLELossless_IDX
| 50 | 67 | 0.871667 | 77 | 600 | 6.649351 | 0.207792 | 0.236328 | 0.279297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033708 | 0.11 | 600 | 11 | 68 | 54.545455 | 0.925094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 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 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8eff88e77242a8e9b28a269d75a2ddcb6a9f1162 | 40 | py | Python | retail/store/__init__.py | samijullien/airlab-retail | 940ccbaeeab7f97586d4b670581995fb76bdbce6 | [
"MIT"
] | 12 | 2020-12-07T19:50:59.000Z | 2021-08-21T11:49:21.000Z | retail/store/__init__.py | samijullien/airlab-retail | 940ccbaeeab7f97586d4b670581995fb76bdbce6 | [
"MIT"
] | null | null | null | retail/store/__init__.py | samijullien/airlab-retail | 940ccbaeeab7f97586d4b670581995fb76bdbce6 | [
"MIT"
] | 4 | 2020-11-04T10:21:25.000Z | 2021-08-23T17:36:12.000Z | from .store_factory import StoreFactory
| 20 | 39 | 0.875 | 5 | 40 | 6.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 40 | 1 | 40 | 40 | 0.944444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
f130998a575322565d42508f5072a93d0f7cef1f | 32 | py | Python | custom_components/sems/__init__.py | hesselonline/sems | afed8211a95395fbf90735f06574c653241286e0 | [
"MIT"
] | 3 | 2019-06-25T15:35:13.000Z | 2020-04-03T08:10:33.000Z | custom_components/sems/__init__.py | hesselonline/sems | afed8211a95395fbf90735f06574c653241286e0 | [
"MIT"
] | 1 | 2021-04-08T16:51:59.000Z | 2021-04-08T16:51:59.000Z | custom_components/sems/__init__.py | hesselonline/sems | afed8211a95395fbf90735f06574c653241286e0 | [
"MIT"
] | 3 | 2019-06-15T14:18:08.000Z | 2021-06-28T11:51:03.000Z | """GoodWe SEMS API Component.""" | 32 | 32 | 0.6875 | 4 | 32 | 5.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09375 | 32 | 1 | 32 | 32 | 0.758621 | 0.8125 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
f15ff3e866a07ea5818c2dc6020d7e3ac0257703 | 78 | py | Python | tests/conftest.py | kroo/wyzecam | 2313de655cbde6aebb476acb33e62a359a39128e | [
"MIT"
] | 76 | 2021-05-06T15:06:39.000Z | 2022-03-27T18:40:33.000Z | tests/conftest.py | mrlt8/wyzecam | 8852bc55e0b134f56ef81097bd416c995dc6a46c | [
"MIT"
] | 104 | 2021-05-06T05:45:07.000Z | 2022-03-30T17:12:24.000Z | tests/conftest.py | mrlt8/wyzecam | 8852bc55e0b134f56ef81097bd416c995dc6a46c | [
"MIT"
] | 16 | 2021-05-06T17:12:48.000Z | 2022-02-11T19:34:32.000Z | import pytest
from .fixtures import account, camera, iotc, tutk_platform_lib
| 19.5 | 62 | 0.820513 | 11 | 78 | 5.636364 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 78 | 3 | 63 | 26 | 0.911765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
74ae6b7466ba8dc1903a1d33ab18147de30e4aa8 | 1,168 | py | Python | meerkat/__init__.py | abidlabs/meerkat | a5f40ac8738845a1b3f7981f02c9d515722a9e66 | [
"Apache-2.0"
] | null | null | null | meerkat/__init__.py | abidlabs/meerkat | a5f40ac8738845a1b3f7981f02c9d515722a9e66 | [
"Apache-2.0"
] | null | null | null | meerkat/__init__.py | abidlabs/meerkat | a5f40ac8738845a1b3f7981f02c9d515722a9e66 | [
"Apache-2.0"
] | null | null | null | """Import common classes."""
# flake8: noqa
from meerkat.logging.utils import (
initialize_logging,
set_logging_level,
set_logging_level_for_imports,
)
initialize_logging()
from meerkat.cells.abstract import AbstractCell
from meerkat.cells.imagepath import ImagePath
from meerkat.cells.spacy import LazySpacyCell, SpacyCell
from meerkat.cells.volume import MedicalVolumeCell
from meerkat.columns.abstract import AbstractColumn
from meerkat.columns.cell_column import CellColumn
from meerkat.columns.embedding_column import EmbeddingColumn
from meerkat.columns.image_column import ImageColumn
from meerkat.columns.list_column import ListColumn
from meerkat.columns.numpy_column import NumpyArrayColumn
from meerkat.columns.prediction_column import ClassificationOutputColumn
from meerkat.columns.spacy_column import SpacyColumn
from meerkat.columns.tensor_column import TensorColumn
from meerkat.columns.video_column import VideoColumn
from meerkat.columns.volume_column import MedicalVolumeColumn
from meerkat.datapanel import DataPanel
from meerkat.ops.concat import concat
from meerkat.ops.merge import merge
from meerkat.provenance import provenance
| 37.677419 | 72 | 0.861301 | 145 | 1,168 | 6.813793 | 0.337931 | 0.222672 | 0.200405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000943 | 0.09161 | 1,168 | 30 | 73 | 38.933333 | 0.930254 | 0.030822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.84 | 0 | 0.84 | 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 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
74bbcb02fb01fa0824fef16d9f4e8652b84bf4dd | 114 | py | Python | Tests/Runnable2/r_tbfilename_t.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 5 | 2019-05-26T20:48:36.000Z | 2021-07-09T01:38:38.000Z | Tests/Runnable2/r_tbfilename_t.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | null | null | null | Tests/Runnable2/r_tbfilename_t.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 1 | 2022-02-10T07:14:58.000Z | 2022-02-10T07:14:58.000Z | import sys, traceback
import r_tbfilename
try:
r_tbfilename.foo()
except:
traceback.print_exc(None, sys.stdout)
| 16.285714 | 38 | 0.798246 | 17 | 114 | 5.176471 | 0.705882 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105263 | 114 | 6 | 39 | 19 | 0.862745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0.166667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
74c242b17817eb25fcd43561eee74d874b79bec5 | 60,467 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
NetworkTemplate,
)
def get_ospf_type(afi):
return "ospf" if afi == "ipv4" else "ospfv3"
def get_interface_type(name):
return (
"GigabitEthernet" if name.startswith("GigabitEthernet") else "Loopback"
)
def _compute_command(cfg):
ospf_type = get_ospf_type(cfg["address_family"]["afi"])
type = get_interface_type(cfg["name"])
area = cfg["address_family"]["processes"]["area"]
pid = cfg["address_family"]["processes"]["process_id"]
cmd = "router {0} {1} area {2} interface {3} {4}".format(
ospf_type, pid, area["area_id"], type, cfg["name"].split(type)[1]
)
return cmd
def _tmplt_ospf_int_delete(config_data):
ospf_type = get_ospf_type(config_data["afi"])
type = get_interface_type(config_data["name"])
area = config_data["area"]
command = "router {0} {1} area {2} interface {3} {4}".format(
ospf_type,
config_data["process"],
area["area_id"],
type,
config_data["name"].split(type)[1],
)
return command
def _tmplt_ospf_config(config_data):
command = _compute_command(config_data)
return command
def _tmplt_ospf_authentication_md_config(config_data):
command = _compute_command(config_data)
auth = config_data["address_family"]["authentication"]
if auth["message_digest"].get("keychain"):
command += (
" authentication message-digest keychain "
+ auth["message_digest"]["keychain"]
)
return command
def _tmplt_ospf_authentication_md_set(config_data):
command = _compute_command(config_data)
auth = config_data["address_family"]["authentication"]
if auth.get("message_digest") and auth["message_digest"].get("keychain"):
command += " authentication message-digest"
elif auth.get("null_auth"):
command += " authentication null"
return command
def _tmplt_ospf_authentication_key(config_data):
command = _compute_command(config_data)
auth = config_data["address_family"]["authentication_key"]
if auth.get("password"):
command += " authentication-key " + auth["password"]
elif auth.get("encrypted"):
command += " authentication-key encrypted " + auth["encrypted"]
elif auth.get("clear"):
command += " authentication-key clear " + auth["clear"]
return command
def _tmplt_ospf_int_bfd_min_int(config_data):
command = _compute_command(config_data)
bfd = config_data["address_family"]["bfd"]
if bfd.get("minimum_interval"):
command += " bfd minimum-interval " + str(bfd["minimum_interval"])
return command
def _tmplt_ospf_int_bfd_mult(config_data):
command = _compute_command(config_data)
bfd = config_data["address_family"]["bfd"]
if bfd.get("multiplier"):
command += " bfd multiplier " + str(bfd["multiplier"])
return command
def _tmplt_ospf_int_bfd_fd(config_data):
command = _compute_command(config_data)
bfd = config_data["address_family"]["bfd"]
if bfd.get("fast_detect") and bfd["fast_detect"].get("set"):
command += " bfd fast-detect"
elif bfd.get("fast_detect") and bfd["fast_detect"].get("disable"):
command += " bfd fast-detect disable"
elif bfd.get("fast_detect") and bfd["fast_detect"].get("strict_mode"):
command += " bfd fast-detect strict-mode"
return command
def _tmplt_ospf_cost_config(config_data):
command = _compute_command(config_data)
command += " cost " + str(config_data["address_family"]["cost"])
return command
def _tmplt_ospf_cost_fallback_config(config_data):
command = _compute_command(config_data)
fallback = config_data["address_family"]["cost_fallback"]
command += (
" cost-fallback "
+ str(fallback["cost"])
+ " threshold "
+ str(fallback["threshold"])
)
return command
def _tmplt_ospf_dead_int_config(config_data):
command = _compute_command(config_data)
command += " dead-interval " + str(
config_data["address_family"]["dead_interval"]
)
return command
def _tmplt_ospf_demand_config(config_data):
command = _compute_command(config_data)
if config_data["address_family"]["demand_circuit"]:
command += " demand-circuit enable"
else:
command += " demand-circuit disable"
return command
class Ospf_interfacesTemplate(NetworkTemplate):
def __init__(self, lines=None, module=None):
super(Ospf_interfacesTemplate, self).__init__(
lines=lines, tmplt=self, module=module
)
# fmt: off
PARSERS = [
{
"name": "name",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
$''',
re.VERBOSE),
"remval": _tmplt_ospf_int_delete,
"setval": _tmplt_ospf_config,
"compval": "name",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
},
},
},
"shared": True,
},
{
"name": "authentication.message_digest",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sauthentication(?P<authentication>)
\s(?P<opt>message-digest)
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_authentication_md_set,
"compval": "address_family.authentication.message_digest",
"result": {
"{{ name }}": {
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"authentication": {
"set": "{{ True if authentication is defined and opt is undefined }}",
"message_digest": {
"set": "{{ True if opt == 'message-digest' else None }}",
},
}
},
}
}
}
},
{
"name": "authentication.message_digest.keychain",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sauthentication(?P<authentication>)
\s(?P<message_digest>message-digest)
\skeychain\s(?P<keychain>\S+)$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_authentication_md_config,
"compval": "address_family.authentication.message_digest.keychain",
"result": {
"{{ name }}": {
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"authentication": {
"message_digest": {
"keychain": "{{ keychain }}",
},
}
},
}
}
}
},
{
"name": "authentication.null_auth",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sauthentication(?P<authentication>)
\s(?P<opt>null)
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_authentication_md_set,
"compval": "address_family.authentication.null_auth",
"result": {
"{{ name }}": {
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"authentication": {
"set": "{{ True if authentication is defined and opt is undefined }}",
"null_auth": "{{ True if opt == 'null' else None }}",
}
},
}
}
}
},
{
"name": "authentication_key",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sauthentication-key
(\sencrypted\s(?P<encrypted>\S+))?
(\s(?P<key>\S+))?
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_authentication_key,
"compval": "address_family.authentication_key",
"result": {
"{{ name }}": {
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"authentication_key": {
"encrypted": "{{ encrypted }}",
}
},
}
}
}
},
{
"name": "bfd.minimum_interval",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sbfd(?P<bfd>)
\sminimum-interval\s(?P<minimum_interval>\d+)
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_int_bfd_min_int,
"compval": "address_family.bfd.minimum_interval",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"bfd": {
"minimum_interval": "{{ minimum_interval|int }}",
},
},
},
},
}
},
{
"name": "bfd.multiplier",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sbfd(?P<bfd>)
\smultiplier\s(?P<multiplier>\d+)
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_int_bfd_mult,
"compval": "address_family.bfd.multiplier",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"bfd": {
"multiplier": "{{ multiplier|int }}",
},
},
},
},
}
},
{
"name": "bfd.fast_detect.set",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sbfd(?P<bfd>)
\sfast-detect(?P<fast_detect>)
(\s(?P<opt>(disable|strict-mode)))?
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_int_bfd_fd,
"compval": "address_family.bfd.fast_detect.set",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"bfd": {
"fast_detect": {
"set": "{{ True if opt != 'disable' and opt != 'strict-mode' and fast_detect is defined else None }}",
},
},
},
},
},
}
},
{
"name": "bfd.fast_detect.disable",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sbfd(?P<bfd>)
\sfast-detect(?P<fast_detect>)
(\s(?P<opt>(disable|strict-mode)))?
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_int_bfd_fd,
"compval": "address_family.bfd.fast_detect.disable",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"bfd": {
"fast_detect": {
"disable": "{{ True if opt == 'disable' else None }}"
},
},
},
},
},
},
},
{
"name": "bfd.fast_detect.strict_mode",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sbfd(?P<bfd>)
\sfast-detect(?P<fast_detect>)
\s(?P<opt>strict-mode)
$""",
re.VERBOSE,
),
"setval": _tmplt_ospf_int_bfd_fd,
"compval": "address_family.bfd.fast_detect.strict_mode",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"bfd": {
"fast_detect": {
"strict_mode": "{{ True if opt == 'strict-mode' else None }}",
},
},
},
},
},
},
},
{
"name": "cost",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\scost\s(?P<cost>\S+)$""",
re.VERBOSE),
"setval": _tmplt_ospf_cost_config,
"compval": "address_family.cost",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"cost": "{{ cost }}"
},
},
},
}
},
{
"name": "cost_fallback",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\scost-fallback\s(?P<cost>\S+)
\sthreshold\s(?P<threshold>\S+)
$""",
re.VERBOSE),
"setval": _tmplt_ospf_cost_fallback_config,
"compval": "address_family.cost_fallback",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"cost_fallback": {
"cost": "{{ cost }}",
"threshold": "{{ threshold }}"
}
},
},
},
}
},
{
"name": "dead_interval",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sdead-interval\s(?P<dead_interval>\S+)
$''',
re.VERBOSE),
"setval": _tmplt_ospf_dead_int_config,
"compval": "address_family.dead_interval",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"dead_interval": "{{ dead_interval }}"
},
},
},
}
},
{
"name": "demand_circuit",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sdemand-circuit\s(?P<demand_circuit>\S+)
$''',
re.VERBOSE),
"setval": _tmplt_ospf_demand_config,
"compval": "address_family.demand_circuit",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"demand_circuit": "{{ True if demand_circuit == 'enable' else False if demand_circuit == 'disable' else None }}"
},
},
},
}
},
{
"name": "flood_reduction",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sflood-reduction\s(?P<flood_reduction>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"flood-reduction {{ 'enable' if flood_reduction == True else 'disable' }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"flood_reduction": "{{ True if flood_reduction == 'enable' else False if flood_reduction == 'disable' else None }}"
},
},
},
}
},
{
"name": "hello_interval",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\shello-interval\s(?P<dead_interval>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"hello-interval {{ hello_interval }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"hello_interval": "{{ hello_interval }}"
},
},
},
}
},
{
"name": "link_down.set",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<link_down>link-down)
(\s(?P<disable>disable))?
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"link-down",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"link_down": {
"set": "{{ True if link_down is defined and disable is undefined else None}}"
}
},
},
},
}
},
{
"name": "link_down.disable",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<link_down>link-down)
\s(?P<disable>disable)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"link-down disable",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"link_down": {
"disable": "{{ True if disable is defined else None }}"
}
},
},
},
}
},
{
"name": "message_digest_key",
"getval": re.compile(
r"""
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\smessage-digest-key
\s(?P<id>\d+)
\smd5
\s(?P<encryption>\d)
\s(?P<key>\S+)$""",
re.VERBOSE,
),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface "
"{{ type }} {{ name }} #message-digest-key {{ message_digest_key.id }} "
"md5 encrypted {{ message_digest_key.encrypted}}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"message_digest_key": {
"id": "{{ id }}",
"encrypted": "{{ encryption }}",
}
},
}
}
}
},
{
"name": "mpls.set_ldp",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<mpls>mpls)
\s(?P<ldp>set_ldp)
(\s(?P<sync>sync))?
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"mpls ldp",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"mpls": {
"set_ldp": "{{ True if set_ldp is defined and sync is undefined else None}}"
}
},
},
},
}
},
{
"name": "mpls.ldp_sync",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<mpls>mpls)
\s(?P<ldp>ldp)
\s(?P<sync>sync)
(\s(?P<disable>disable))?
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"mpls ldp sync",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"mpls": {
"ldp_sync": "{{ True if sync is defined and disable is undefined else None}}"
}
},
},
},
}
},
{
"name": "mpls.ldp_sync_disable",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<mpls>mpls)
\s(?P<ldp>ldp)
\s(?P<sync>sync)
\s(?P<disable>disable)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"mpls ldp sync disable",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"mpls": {
"ldp_sync": "{{ False if disable is defined }}"
}
},
},
},
}
},
{
"name": "mtu_ignore",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\smtu-ignore\s(?P<mtu_ignore>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"mtu_ignore {{ 'enable' if mtu_ignore == 'True' else 'disable' if mtu_ignore == 'False' }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"mtu_ignore": "{{ True if mtu_ignore == 'enable' else False if mtu_ignore == 'disable' else None }}"
},
},
},
}
},
{
"name": "network",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\snetwork\s(?P<network>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"network {{ network }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"network": "{{ network }}"
},
},
},
}
},
{
"name": "packet_size",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\spacket-size\s(?P<packet_size>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"packet-size {{ packet_size }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"packet_size": "{{ packet_size }}"
},
},
},
}
},
{
"name": "passive",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\spassive\s(?P<passive>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"passive {{ 'enable' if passive == 'True' else 'disable' if passive == 'False' }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"passive": "{{ True if passive == 'enable' else False if passive == 'disable' else None }}"
},
},
},
}
},
{
"name": "prefix_suppression.disable",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sprefix-suppression\s(?P<prefix_suppression>\S+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"prefix-suppression {{ prefix_suppression }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"prefix_suppression": {
"disable": "{{ True if prefix_suppression == 'disable' else None }}"
}
},
},
},
}
},
{
"name": "prefix_suppression.secondary_address",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<prefix_suppression>prefix-suppression)
\s(?P<secondary_address>secondary-address)
(\s(?P<disable>disable))?
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"prefix-suppression secondary-address {{ disable if secondary_address is False }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"prefix_suppression": {
"secondary_address": "{{ True if secondary_address is defined and "
"disable is undefined else False if disable is defined else None }}"
},
},
},
},
}
},
{
"name": "priority",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\spriority\s(?P<priority>\d+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"priority {{ priority }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"priority": "{{ priority|int }}"
},
},
},
}
},
{
"name": "retransmit_interval",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\sretransmit-interval\s(?P<retransmit_interval>\d+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"retransmit-interval {{ retransmit_interval }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"retransmit_interval": "{{ retransmit_interval|int }}"
},
},
},
}
},
{
"name": "security.ttl_hops",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<security>security)
\s(?P<ttl>ttl)
\shops\s(?P<hops>\d+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"security ttl hops {{ hops }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"security_ttl": {
"hops": "{{ hops|int }}"
},
},
},
},
}
},
{
"name": "security.ttl",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\s(?P<security>security)
\s(?P<ttl>ttl)
(\s(?P<hops>hops))?
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"security ttl",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"security_ttl": {
"set": "{{ True if ttl is defined and hops is undefined }}"
},
},
},
},
}
},
{
"name": "transmit_delay",
"getval": re.compile(r'''
^router
\s(?P<ospf_type>ospf|ospfv3)
\s(?P<process_id>\S+)
\sarea\s(?P<area_id>\S+)
\sinterface\s(?P<name>\S+)
\stransmit-delay\s(?P<transmit_delay>\d+)
$''',
re.VERBOSE),
"setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
"transmit-delay {{ transmit_delay }}",
"result": {
"{{ name }}": {
"name": "{{ name }}",
"type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
"address_family": {
"{{ ospf_type }}": {
"afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
"processes": {
"{{ process_id }}": {
"process_id": "{{ process_id }}",
"area": {
"area_id": "{{ area_id }}",
},
}
},
"transmit_delay": "{{ transmit_delay|int }}"
},
},
},
}
},
]
# fmt: on
| 44.040058 | 143 | 0.310649 | 4,008 | 60,467 | 4.48503 | 0.043413 | 0.020583 | 0.043391 | 0.064085 | 0.776424 | 0.747664 | 0.727303 | 0.704105 | 0.689976 | 0.667668 | 0 | 0.004194 | 0.554385 | 60,467 | 1,372 | 144 | 44.072157 | 0.662943 | 0.000265 | 0 | 0.560065 | 0 | 0.025974 | 0.446073 | 0.063641 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012987 | false | 0.00487 | 0.002435 | 0.001623 | 0.029221 | 0.000812 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 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 | 5 |
74df8b10cff2baaaea90b3b23324bee0c40a3009 | 279 | py | Python | anomaly_detection/configuration.py | Kim-Ha-Jeong/Capstone_flask | 3160c3de37fde526a4a47b03f898b0c921e34884 | [
"Apache-1.1"
] | 3 | 2021-01-04T12:26:08.000Z | 2021-04-15T18:11:52.000Z | anomaly_detection/configuration.py | Kim-Ha-Jeong/Capstone_flask | 3160c3de37fde526a4a47b03f898b0c921e34884 | [
"Apache-1.1"
] | null | null | null | anomaly_detection/configuration.py | Kim-Ha-Jeong/Capstone_flask | 3160c3de37fde526a4a47b03f898b0c921e34884 | [
"Apache-1.1"
] | 5 | 2021-01-04T14:46:32.000Z | 2021-05-14T05:44:39.000Z | c3d_model_weights = './anomaly_detection/trained_models/c3d_sports1m.h5'
classifier_model_weigts = './anomaly_detection/trained_models/weights_L1L2.mat'
classifier_model_json = './anomaly_detection/trained_models/model.json'
input_folder = './input'
output_folder = './output'
| 39.857143 | 79 | 0.817204 | 35 | 279 | 6.057143 | 0.485714 | 0.226415 | 0.325472 | 0.410377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022901 | 0.060932 | 279 | 6 | 80 | 46.5 | 0.78626 | 0 | 0 | 0 | 0 | 0 | 0.577061 | 0.523297 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
74f8992e2e906c155d9ff9e49bee81c4bf2b0d44 | 253 | py | Python | python/ray/experimental/dag/__init__.py | takeshi-yoshimura/ray | cc577c10edbfc8b4248e2776947e1e0d5dbf4585 | [
"Apache-2.0"
] | 1 | 2022-03-14T04:24:17.000Z | 2022-03-14T04:24:17.000Z | python/ray/experimental/dag/__init__.py | takeshi-yoshimura/ray | cc577c10edbfc8b4248e2776947e1e0d5dbf4585 | [
"Apache-2.0"
] | 21 | 2022-01-30T15:49:41.000Z | 2022-03-19T07:14:33.000Z | python/ray/experimental/dag/__init__.py | takeshi-yoshimura/ray | cc577c10edbfc8b4248e2776947e1e0d5dbf4585 | [
"Apache-2.0"
] | null | null | null | from ray.experimental.dag.dag_node import DAGNode
from ray.experimental.dag.function_node import FunctionNode
from ray.experimental.dag.class_node import ClassNode, ClassMethodNode
__all__ = ["ClassNode", "ClassMethodNode", "DAGNode", "FunctionNode"]
| 36.142857 | 70 | 0.822134 | 30 | 253 | 6.7 | 0.433333 | 0.104478 | 0.283582 | 0.328358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083004 | 253 | 6 | 71 | 42.166667 | 0.866379 | 0 | 0 | 0 | 0 | 0 | 0.16996 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.75 | 0 | 0.75 | 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 | 1 | 0 | 1 | 0 | 0 | 5 |
2d118d472526af2c6391d0027365c5c596ae316e | 116 | py | Python | src/lib/pythoned/arboles/__init__.py | bjones1/skulpt | 4ebbc47ab9a787c167ce8fadc457609ec9041788 | [
"MIT"
] | 6 | 2017-03-15T07:30:56.000Z | 2020-09-12T03:27:15.000Z | src/lib/pythoned/arboles/__init__.py | bjones1/skulpt | 4ebbc47ab9a787c167ce8fadc457609ec9041788 | [
"MIT"
] | 2 | 2017-08-18T15:31:18.000Z | 2021-07-30T20:49:12.000Z | src/lib/pythoned/arboles/__init__.py | bjones1/skulpt | 4ebbc47ab9a787c167ce8fadc457609ec9041788 | [
"MIT"
] | 13 | 2017-07-02T03:16:46.000Z | 2021-07-05T14:53:56.000Z |
from .avl import ArbolAVL
from .abb import ArbolBinarioBusqueda
from .monticuloBinario import MonticuloBinario
| 12.888889 | 46 | 0.827586 | 12 | 116 | 8 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146552 | 116 | 8 | 47 | 14.5 | 0.969697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2d13d601c610c614d7458bb345dedd0f7378788e | 41 | py | Python | test/com/facebook/buck/features/python/testdata/prebuilt_package/main.py | jasonnam/buck | 1ddbbf986312b30413aa36cac337267536a11f04 | [
"Apache-2.0"
] | null | null | null | test/com/facebook/buck/features/python/testdata/prebuilt_package/main.py | jasonnam/buck | 1ddbbf986312b30413aa36cac337267536a11f04 | [
"Apache-2.0"
] | null | null | null | test/com/facebook/buck/features/python/testdata/prebuilt_package/main.py | jasonnam/buck | 1ddbbf986312b30413aa36cac337267536a11f04 | [
"Apache-2.0"
] | null | null | null | from package import file
file.say_hi()
| 8.2 | 24 | 0.756098 | 7 | 41 | 4.285714 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170732 | 41 | 4 | 25 | 10.25 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
2d37d460e87674c678ac0da6e13f135e7b488c53 | 166 | py | Python | katas/kyu_7/time_converter_hh_mm_ss_ms.py | the-zebulan/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 40 | 2016-03-09T12:26:20.000Z | 2022-03-23T08:44:51.000Z | katas/kyu_7/time_converter_hh_mm_ss_ms.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | null | null | null | katas/kyu_7/time_converter_hh_mm_ss_ms.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | from datetime import datetime
def convert(time):
return '{:02}:{:02}:{:02},{:03}'.format(
time.hour, time.minute, time.second, time.microsecond / 1000)
| 23.714286 | 69 | 0.644578 | 22 | 166 | 4.863636 | 0.681818 | 0.074766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086957 | 0.168675 | 166 | 6 | 70 | 27.666667 | 0.688406 | 0 | 0 | 0 | 0 | 0 | 0.138554 | 0.138554 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
7416a7c5764f1f2cc2cf1c57718271425cf24fee | 758 | py | Python | unittest_reinvent/standardization/__init__.py | MolecularAI/reinvent-chemistry | bf0235bc2b1168b1db54c1e04bdba04b166ab7bf | [
"MIT"
] | null | null | null | unittest_reinvent/standardization/__init__.py | MolecularAI/reinvent-chemistry | bf0235bc2b1168b1db54c1e04bdba04b166ab7bf | [
"MIT"
] | null | null | null | unittest_reinvent/standardization/__init__.py | MolecularAI/reinvent-chemistry | bf0235bc2b1168b1db54c1e04bdba04b166ab7bf | [
"MIT"
] | 1 | 2022-03-22T15:24:13.000Z | 2022-03-22T15:24:13.000Z | from unittest_reinvent.standardization.test_rdkit_standardizer import TestRDKitStandardizer
from unittest_reinvent.standardization.test_rdkit_standardizer_no_config import TestRDKitStandardizerNoConfig
from unittest_reinvent.standardization.test_rdkit_standardizer_aliphatic_filter import \
TestRDKitStandardizerAliphaticFilter
from unittest_reinvent.standardization.test_rdkit_standardizer_vocabulary_filter import \
TestRDKitStandardizerVocabularyFilter
from unittest_reinvent.standardization.test_rdkit_standardizer_default_long_aliphatic_off import \
TestRDKitStandardizerDefaultLongAliphaticOff
from unittest_reinvent.standardization.test_rdkit_standardizer_default_long_aliphatic_on import \
TestRDKitStandardizerDefaultLongAliphaticOn
| 68.909091 | 109 | 0.920844 | 68 | 758 | 9.794118 | 0.338235 | 0.108108 | 0.18018 | 0.315315 | 0.564565 | 0.564565 | 0.564565 | 0.228228 | 0.228228 | 0.228228 | 0 | 0 | 0.058047 | 758 | 10 | 110 | 75.8 | 0.932773 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
744372446d29c7b50f285ca9e49f7fd0c2a2da42 | 337 | py | Python | writer2wiki/w2w_office/lo_import.py | AlexanderMalahov/writer2wiki | 9b9f0d30e0a4720e6dc77db6c99975b643e139d5 | [
"BSL-1.0"
] | 4 | 2017-12-28T12:58:59.000Z | 2021-01-05T14:25:19.000Z | writer2wiki/w2w_office/lo_import.py | AlexanderMalahov/writer2wiki | 9b9f0d30e0a4720e6dc77db6c99975b643e139d5 | [
"BSL-1.0"
] | null | null | null | writer2wiki/w2w_office/lo_import.py | AlexanderMalahov/writer2wiki | 9b9f0d30e0a4720e6dc77db6c99975b643e139d5 | [
"BSL-1.0"
] | 1 | 2020-07-13T21:48:32.000Z | 2020-07-13T21:48:32.000Z | # Copyright Alexander Malahov 2017-2018.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file ../../LICENSE.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
def enum(enum_type_name, *values):
return __import__('com.sun.star.' + enum_type_name, fromlist=list(values))
| 37.444444 | 78 | 0.688427 | 47 | 337 | 4.723404 | 0.765957 | 0.018018 | 0.108108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043796 | 0.186944 | 337 | 8 | 79 | 42.125 | 0.766423 | 0.599407 | 0 | 0 | 0 | 0 | 0.108333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0.5 | 0.5 | 1.5 | 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 | 1 | 1 | 1 | 0 | 0 | 5 |
745f7c09fc06d34933aceb68efb97db3d7137a45 | 809 | py | Python | temboo/core/Library/Google/ComputeEngine/GlobalOperations/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/Google/ComputeEngine/GlobalOperations/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/Google/ComputeEngine/GlobalOperations/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | from temboo.Library.Google.ComputeEngine.GlobalOperations.AggregatedList import AggregatedList, AggregatedListInputSet, AggregatedListResultSet, AggregatedListChoreographyExecution
from temboo.Library.Google.ComputeEngine.GlobalOperations.DeleteGlobalOperation import DeleteGlobalOperation, DeleteGlobalOperationInputSet, DeleteGlobalOperationResultSet, DeleteGlobalOperationChoreographyExecution
from temboo.Library.Google.ComputeEngine.GlobalOperations.GetGlobalOperation import GetGlobalOperation, GetGlobalOperationInputSet, GetGlobalOperationResultSet, GetGlobalOperationChoreographyExecution
from temboo.Library.Google.ComputeEngine.GlobalOperations.ListGlobalOperations import ListGlobalOperations, ListGlobalOperationsInputSet, ListGlobalOperationsResultSet, ListGlobalOperationsChoreographyExecution
| 161.8 | 215 | 0.925834 | 48 | 809 | 15.604167 | 0.479167 | 0.053405 | 0.090788 | 0.12283 | 0.277704 | 0.277704 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034611 | 809 | 4 | 216 | 202.25 | 0.959027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
7497856aed8dad85dc38c9f597501c90636cb39f | 111 | py | Python | code/fastai_ext/setup.py | jandremarais/TabularLearner | 7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96 | [
"MIT"
] | 14 | 2019-07-15T07:38:36.000Z | 2021-12-08T23:54:15.000Z | code/fastai_ext/setup.py | jandremarais/TabularLearner | 7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96 | [
"MIT"
] | 2 | 2019-05-07T13:56:51.000Z | 2019-08-08T01:27:58.000Z | code/fastai_ext/setup.py | jandremarais/TabularLearner | 7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96 | [
"MIT"
] | 2 | 2021-03-23T11:06:45.000Z | 2021-03-23T11:34:48.000Z | from setuptools import setup, find_packages
setup(name='fastai_ext', version='0.0', packages=find_packages()) | 27.75 | 65 | 0.783784 | 16 | 111 | 5.25 | 0.6875 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019608 | 0.081081 | 111 | 4 | 65 | 27.75 | 0.803922 | 0 | 0 | 0 | 0 | 0 | 0.116071 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
77ccab4a00857d6361f5b569303e157903bc9da9 | 158 | py | Python | tutorials/unittests/python/src/get_factorial.py | sherryspain/UCSC-Software-Testing | 507a0857ac52283a2ce6ed612a80e7a6fd611649 | [
"MIT"
] | null | null | null | tutorials/unittests/python/src/get_factorial.py | sherryspain/UCSC-Software-Testing | 507a0857ac52283a2ce6ed612a80e7a6fd611649 | [
"MIT"
] | null | null | null | tutorials/unittests/python/src/get_factorial.py | sherryspain/UCSC-Software-Testing | 507a0857ac52283a2ce6ed612a80e7a6fd611649 | [
"MIT"
] | null | null | null | def factorial(x):
i = x
running_fact = 1
while i > 0:
running_fact *= i
print running_fact
i -= 1
return running_fact
| 17.555556 | 26 | 0.537975 | 22 | 158 | 3.681818 | 0.5 | 0.54321 | 0.296296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03125 | 0.392405 | 158 | 8 | 27 | 19.75 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.125 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
77d44361c7a8c8c6797b59e3db294d3dfa312536 | 164 | py | Python | aiopenapi3/v20/__init__.py | commonism/aiopenapi3 | 3efb0e65fdcdce7408c888df3f4adbad8abb4359 | [
"BSD-3-Clause"
] | null | null | null | aiopenapi3/v20/__init__.py | commonism/aiopenapi3 | 3efb0e65fdcdce7408c888df3f4adbad8abb4359 | [
"BSD-3-Clause"
] | 7 | 2022-01-03T19:48:06.000Z | 2022-03-14T22:01:57.000Z | aiopenapi3/v20/__init__.py | commonism/aiopenapi3 | 3efb0e65fdcdce7408c888df3f4adbad8abb4359 | [
"BSD-3-Clause"
] | null | null | null | from .root import Root
from .security import SecurityRequirement
from .glue import Request, AsyncRequest
from .schemas import Schema
from .general import Reference
| 27.333333 | 41 | 0.835366 | 21 | 164 | 6.52381 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128049 | 164 | 5 | 42 | 32.8 | 0.958042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
77e4ffba2a4065f662db795b99760a6356c7011b | 47 | py | Python | code/utils/__init__.py | elejke/shortest_path | 0d662b5b052ef579efa6b27627d65f54fb079ea3 | [
"MIT"
] | null | null | null | code/utils/__init__.py | elejke/shortest_path | 0d662b5b052ef579efa6b27627d65f54fb079ea3 | [
"MIT"
] | null | null | null | code/utils/__init__.py | elejke/shortest_path | 0d662b5b052ef579efa6b27627d65f54fb079ea3 | [
"MIT"
] | null | null | null | from geometry import *
from embedding import *
| 15.666667 | 23 | 0.787234 | 6 | 47 | 6.166667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170213 | 47 | 2 | 24 | 23.5 | 0.948718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
7afd6e3579da7eca384a4af60bd54a1b8b83ee69 | 370 | py | Python | exercises/es/test_02_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/test_02_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/test_02_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert gato_hash == nlp.vocab.strings["gato"], "¿Asignaste el hash correcto?"
assert 'nlp.vocab.strings["gato"]' in __solution__
assert gato_string == "gato", "¿Obtuviste el string correcto?"
assert (
"nlp.vocab.strings[gato_hash]" in __solution__
), "¿Obtuviste el string usando el hash?"
__msg__.good("¡Muy buen trabajo!")
| 37 | 81 | 0.667568 | 51 | 370 | 4.627451 | 0.45098 | 0.101695 | 0.190678 | 0.241525 | 0.279661 | 0.279661 | 0 | 0 | 0 | 0 | 0 | 0 | 0.189189 | 370 | 9 | 82 | 41.111111 | 0.773333 | 0 | 0 | 0 | 0 | 0 | 0.467568 | 0.143243 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0.125 | true | 0 | 0 | 0 | 0.125 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
bb38a02ba6bdf06a197af6220d1efc947462cbf5 | 210 | py | Python | parsec/commands/cmd_roles.py | abretaud/parsec | 8ebcafac34b5d6df45de4cecc882b129bb604170 | [
"Apache-2.0"
] | null | null | null | parsec/commands/cmd_roles.py | abretaud/parsec | 8ebcafac34b5d6df45de4cecc882b129bb604170 | [
"Apache-2.0"
] | null | null | null | parsec/commands/cmd_roles.py | abretaud/parsec | 8ebcafac34b5d6df45de4cecc882b129bb604170 | [
"Apache-2.0"
] | null | null | null | import click
from parsec.commands.roles.get_roles import cli as func0
from parsec.commands.roles.show_role import cli as func1
@click.group()
def cli():
pass
cli.add_command(func0)
cli.add_command(func1)
| 19.090909 | 56 | 0.785714 | 35 | 210 | 4.6 | 0.514286 | 0.124224 | 0.223602 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021739 | 0.12381 | 210 | 10 | 57 | 21 | 0.853261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | true | 0.125 | 0.375 | 0 | 0.5 | 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 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.