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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11cb0485cd62599e53fadc0765d44e908fa5be0f | 729 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/util/url.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/util/url.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/util/url.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Utility functions related to urls.
"""
import sys
from importlib import import_module, reload
from django.conf import settings
from django.urls import set_urlconf
def reload_django_url_config():
"""
Reloads Django's URL config.
This is useful, for example, when a test enables new URLs
with a dj... | 22.78125 | 67 | 0.710562 | 100 | 729 | 5.05 | 0.53 | 0.053465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001733 | 0.208505 | 729 | 31 | 68 | 23.516129 | 0.873484 | 0.293553 | 0 | 0 | 0 | 0 | 0.002132 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.384615 | 0 | 0.615385 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
11ccd9a651b819f1fc57ce1eafed784fe72727c6 | 517 | py | Python | programs/signals.py | michael-xander/communique-webapp | 85b450d7f6d0313c5e5ef53a262a850b7e93c3d6 | [
"MIT"
] | null | null | null | programs/signals.py | michael-xander/communique-webapp | 85b450d7f6d0313c5e5ef53a262a850b7e93c3d6 | [
"MIT"
] | null | null | null | programs/signals.py | michael-xander/communique-webapp | 85b450d7f6d0313c5e5ef53a262a850b7e93c3d6 | [
"MIT"
] | null | null | null | from django.db.models.signals import post_save
from django.dispatch import receiver
from communique.utils.utils_signals import generate_notifications
from user.models import NotificationRegistration
from .models import Program
@receiver(post_save, sender=Program)
def post_program_save_callback(sender, **kwargs):
... | 36.928571 | 114 | 0.820116 | 64 | 517 | 6.5 | 0.546875 | 0.048077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121857 | 517 | 14 | 115 | 36.928571 | 0.9163 | 0.212766 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.625 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
11cd4ac47dd80be1874f5d5024dca04ec9d019ce | 4,947 | py | Python | tests/base/channels/test_channel.py | DHaspel/cavsim | a23e344b47b970e1a90e04c071e06860935d1694 | [
"Apache-2.0"
] | null | null | null | tests/base/channels/test_channel.py | DHaspel/cavsim | a23e344b47b970e1a90e04c071e06860935d1694 | [
"Apache-2.0"
] | null | null | null | tests/base/channels/test_channel.py | DHaspel/cavsim | a23e344b47b970e1a90e04c071e06860935d1694 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from cavsim.base.channels.base_channel import BaseChannel as Channel
from cavsim.measure import Measure
class TestChannel(TestCase):
def test___init__(self):
# Invalid tests
with self.assertRaises(TypeError):
Channel(123, False)
with self.assertRa... | 37.195489 | 68 | 0.638771 | 528 | 4,947 | 5.88447 | 0.083333 | 0.130673 | 0.217573 | 0.209527 | 0.754747 | 0.679112 | 0.608948 | 0.54168 | 0.509495 | 0.466044 | 0 | 0.011273 | 0.264807 | 4,947 | 132 | 69 | 37.477273 | 0.843002 | 0.015565 | 0 | 0.582609 | 0 | 0 | 0.001234 | 0 | 0 | 0 | 0 | 0 | 0.373913 | 1 | 0.078261 | false | 0 | 0.095652 | 0 | 0.182609 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
11d4cd5f5c0f6b1acb6f517a8275c3bf6e006622 | 2,130 | py | Python | testing/test_block.py | eberharf/cfl | 077b99a05824f1371ac47d76dfed6bb160222668 | [
"BSD-3-Clause"
] | 6 | 2021-01-09T04:46:55.000Z | 2022-03-19T22:27:13.000Z | testing/test_block.py | eberharf/cfl | 077b99a05824f1371ac47d76dfed6bb160222668 | [
"BSD-3-Clause"
] | 12 | 2021-01-11T16:32:58.000Z | 2022-03-19T13:21:30.000Z | testing/test_block.py | eberharf/cfl | 077b99a05824f1371ac47d76dfed6bb160222668 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from cfl.block import Block
# fake Block class for testing
class BabyBlock(Block):
def __init__(self, data_info, params):
super().__init__(data_info=data_info, params=params)
self.name = 'bb'
# functions that need to be instantiated but don't do anythin
def load_block(se... | 38.035714 | 135 | 0.620188 | 278 | 2,130 | 4.647482 | 0.435252 | 0.043344 | 0.0387 | 0.05418 | 0.239164 | 0.208204 | 0.118421 | 0.118421 | 0.118421 | 0 | 0 | 0.016287 | 0.279343 | 2,130 | 56 | 136 | 38.035714 | 0.825407 | 0.323005 | 0 | 0.129032 | 0 | 0 | 0.215493 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 1 | 0.225806 | false | 0.129032 | 0.064516 | 0 | 0.354839 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
11d8237ea5c0217a8705bf23c95f85b54b207529 | 77 | py | Python | config_vars.py | EPFL-LAP/fpl20-placement | 87b0fdc2252f0dca53dcd13801987e305d6c2619 | [
"MIT"
] | 3 | 2020-12-29T07:14:31.000Z | 2021-09-24T06:38:02.000Z | config_vars.py | stefannikolicns/fpl20-placement | 2175f6a4756c975c929278fe4180bec2e046a300 | [
"MIT"
] | null | null | null | config_vars.py | stefannikolicns/fpl20-placement | 2175f6a4756c975c929278fe4180bec2e046a300 | [
"MIT"
] | 1 | 2021-03-29T23:00:21.000Z | 2021-03-29T23:00:21.000Z | N = 10
I = 60
CROSSBAR_FEEDBACK_DELAY = 75e-12
CROSSBAR_INPUT_DELAY = 95e-12
| 15.4 | 32 | 0.766234 | 14 | 77 | 3.928571 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.184615 | 0.155844 | 77 | 4 | 33 | 19.25 | 0.661538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
11dcb7f792e6a6262ca0e365a04fce50fe48ad00 | 3,839 | py | Python | lib/kb_emirge/kb_emirgeClient.py | kbaseapps/kb_emirge | 6bc6bc71e0e17e6dcecb0376fb31123c9144d1cf | [
"MIT"
] | null | null | null | lib/kb_emirge/kb_emirgeClient.py | kbaseapps/kb_emirge | 6bc6bc71e0e17e6dcecb0376fb31123c9144d1cf | [
"MIT"
] | null | null | null | lib/kb_emirge/kb_emirgeClient.py | kbaseapps/kb_emirge | 6bc6bc71e0e17e6dcecb0376fb31123c9144d1cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
############################################################
#
# Autogenerated by the KBase type compiler -
# any changes made here will be overwritten
#
############################################################
from __future__ import print_function
# the following is a hack to get the basec... | 44.126437 | 79 | 0.632717 | 458 | 3,839 | 5.024017 | 0.286026 | 0.046936 | 0.034767 | 0.045198 | 0.601478 | 0.593655 | 0.557149 | 0.527162 | 0.513255 | 0.495002 | 0 | 0.002085 | 0.250326 | 3,839 | 86 | 80 | 44.639535 | 0.797429 | 0.480594 | 0 | 0.176471 | 1 | 0 | 0.101748 | 0.034956 | 0 | 0 | 0 | 0 | 0 | 1 | 0.147059 | false | 0.058824 | 0.088235 | 0.029412 | 0.382353 | 0.029412 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
11e1d94d8bb07397a346832506e980fb85edd72c | 302 | py | Python | hw_asr/model/__init__.py | kostyayatsok/asr_project_template | ee5fb8006fa4e4f5d4a2e5c6e9f6352c22ad5bbb | [
"MIT"
] | null | null | null | hw_asr/model/__init__.py | kostyayatsok/asr_project_template | ee5fb8006fa4e4f5d4a2e5c6e9f6352c22ad5bbb | [
"MIT"
] | null | null | null | hw_asr/model/__init__.py | kostyayatsok/asr_project_template | ee5fb8006fa4e4f5d4a2e5c6e9f6352c22ad5bbb | [
"MIT"
] | null | null | null | from hw_asr.model.baseline_model import BaselineModel
from hw_asr.model.gru_model import GRUModel
from hw_asr.model.jasper_model import JasperModel
from hw_asr.model.deepspeech2_model import DeepSpeech2Model
__all__ = [
"BaselineModel",
"GRUModel",
"JasperModel",
"DeepSpeech2Model"
]
| 25.166667 | 59 | 0.791391 | 37 | 302 | 6.135135 | 0.378378 | 0.105727 | 0.15859 | 0.246696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011494 | 0.135762 | 302 | 11 | 60 | 27.454545 | 0.858238 | 0 | 0 | 0 | 0 | 0 | 0.15894 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
11e35234c41c3b351e68440d97668080b7a115b9 | 273 | py | Python | core_get/configuration/environment_settings.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | core_get/configuration/environment_settings.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | core_get/configuration/environment_settings.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from pathlib import PurePath
from typing import Optional
@dataclass(frozen=True)
class EnvironmentSettings:
working_dir: PurePath
project_dir: Optional[PurePath]
app_dir: PurePath
cache_dir: PurePath
catalog_url: str
| 21 | 35 | 0.783883 | 33 | 273 | 6.333333 | 0.606061 | 0.157895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172161 | 273 | 12 | 36 | 22.75 | 0.924779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.3 | 0 | 0.9 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
11eb2c4b0e299910811b568a1822f17268b1d75c | 2,673 | py | Python | healthtools_ec/models/user.py | CodeForAfrica/healthtools-ezolwaluko | 21fac3c05e15c0b1492bb4f9004bc0d9e1d8392b | [
"Apache-2.0"
] | null | null | null | healthtools_ec/models/user.py | CodeForAfrica/healthtools-ezolwaluko | 21fac3c05e15c0b1492bb4f9004bc0d9e1d8392b | [
"Apache-2.0"
] | 1 | 2022-03-22T07:30:29.000Z | 2022-03-22T07:30:29.000Z | healthtools_ec/models/user.py | CodeForAfrica/healthtools-ezolwaluko | 21fac3c05e15c0b1492bb4f9004bc0d9e1d8392b | [
"Apache-2.0"
] | 1 | 2018-11-24T20:47:56.000Z | 2018-11-24T20:47:56.000Z | from flask_security import RoleMixin, Security, SQLAlchemyUserDatastore, UserMixin
from sqlalchemy import Boolean, Column, DateTime, Integer, String, func
from wtforms import PasswordField
from wtforms.fields import EmailField
from wtforms.validators import InputRequired
from ..app import app, db
from ..forms import F... | 26.73 | 86 | 0.664796 | 309 | 2,673 | 5.614887 | 0.33657 | 0.025937 | 0.017291 | 0.01268 | 0.138329 | 0.042651 | 0.042651 | 0.042651 | 0.042651 | 0 | 0 | 0.004778 | 0.216985 | 2,673 | 99 | 87 | 27 | 0.824176 | 0.056491 | 0 | 0.121212 | 0 | 0 | 0.072318 | 0.009241 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0.075758 | 0.121212 | 0.060606 | 0.545455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
f50379671bb04ee79c8a9513109a69b9ef7c6c35 | 3,012 | py | Python | ifcb/tests/data/fileset_info.py | GobySoft/pyifcb | f465329e720c826069cdd02b55e35d780f24a3d5 | [
"MIT"
] | 5 | 2018-08-12T02:04:44.000Z | 2021-03-19T02:21:31.000Z | ifcb/tests/data/fileset_info.py | GobySoft/pyifcb | f465329e720c826069cdd02b55e35d780f24a3d5 | [
"MIT"
] | 46 | 2016-09-14T21:12:52.000Z | 2022-02-14T20:33:49.000Z | ifcb/tests/data/fileset_info.py | GobySoft/pyifcb | f465329e720c826069cdd02b55e35d780f24a3d5 | [
"MIT"
] | 3 | 2018-10-18T16:03:08.000Z | 2021-07-28T14:45:06.000Z | import os
import sys
import numpy as np
from ifcb import DataDirectory
TEST_DATA_DIR=os.path.join('ifcb','tests','data','test_data')
WHITELIST = ['data','white']
TEST_FILES = {
'D20130526T095207_IFCB013': {
'n_rois': 19,
'n_targets': 118,
'roi_numbers': [7, 11, 13, 21, 32, 33, 47, 49, 5... | 33.098901 | 101 | 0.448207 | 354 | 3,012 | 3.663842 | 0.40113 | 0.026985 | 0.021588 | 0.034695 | 0.087124 | 0.066307 | 0.066307 | 0.066307 | 0.066307 | 0.066307 | 0 | 0.241189 | 0.397078 | 3,012 | 90 | 102 | 33.466667 | 0.473018 | 0 | 0 | 0.075 | 0 | 0 | 0.164675 | 0.033533 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.05 | 0.05 | 0.175 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
eebaa37e5ed357350d5509c1144985c77eebbf4a | 979 | py | Python | OnlineJudge/t2.py | flyinglandlord/BUAA-SAE-DataStructure-2021 | 7eb686465b18b125115e03b39e6d83e4ed7a30cb | [
"MIT"
] | 2 | 2022-03-31T01:43:24.000Z | 2022-03-31T02:05:14.000Z | OnlineJudge/t2.py | flyinglandlord/BUAA-SAE-DataStructure-2021 | 7eb686465b18b125115e03b39e6d83e4ed7a30cb | [
"MIT"
] | null | null | null | OnlineJudge/t2.py | flyinglandlord/BUAA-SAE-DataStructure-2021 | 7eb686465b18b125115e03b39e6d83e4ed7a30cb | [
"MIT"
] | null | null | null | class Node():
def __init__(self, data=None, left=None, right=None):
self.data = data
self.left = left
self.right = right
def tree_in(node_list):
list_in = input().split()
l = len(list_in)
node_list.append(Node(list_in[0]))
for i in range(1, l):
if list_in[i] == "Non... | 24.475 | 57 | 0.466803 | 136 | 979 | 3.169118 | 0.242647 | 0.241299 | 0.092807 | 0.064965 | 0.139211 | 0.139211 | 0.139211 | 0.139211 | 0.139211 | 0.139211 | 0 | 0.018676 | 0.398366 | 979 | 40 | 58 | 24.475 | 0.713073 | 0 | 0 | 0.25 | 0 | 0 | 0.004082 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0.055556 | 0 | 0 | 0.083333 | 0.027778 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
eecdd6c3e3dd238b4b3b00bc6671ef0c38fefab9 | 331 | py | Python | roasttron/apps/roast/views.py | chrisvans/roasttron | c6bc2259419f5cfc1f60c84769b209b01798b040 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | roasttron/apps/roast/views.py | chrisvans/roasttron | c6bc2259419f5cfc1f60c84769b209b01798b040 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | roasttron/apps/roast/views.py | chrisvans/roasttron | c6bc2259419f5cfc1f60c84769b209b01798b040 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | import models
import serializers
# Third Party
from rest_framework import viewsets
class RoastViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows roastss to be viewed or edited.
"""
filter_fields = ['coffee', ]
queryset = models.Roast.objects.all()
serializer_class = serializers.Roas... | 23.642857 | 60 | 0.73716 | 37 | 331 | 6.513514 | 0.837838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.18429 | 331 | 14 | 61 | 23.642857 | 0.892593 | 0.208459 | 0 | 0 | 0 | 0 | 0.024292 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
eed0f91b37aeced886d9d4e13972054768b2074d | 403 | py | Python | vendors/models.py | jeffshek/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 98 | 2017-07-29T14:26:36.000Z | 2022-02-28T04:10:15.000Z | vendors/models.py | jeffshek/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 1,483 | 2017-05-30T00:05:56.000Z | 2022-03-31T12:37:06.000Z | vendors/models.py | lawrendran/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 13 | 2017-11-08T00:02:35.000Z | 2022-02-28T04:10:32.000Z | from django.db import models
from betterself.base_models import BaseModelWithUserGeneratedContent
class Vendor(BaseModelWithUserGeneratedContent):
RESOURCE_NAME = 'vendors'
name = models.CharField(max_length=200)
email = models.EmailField(max_length=254, null=True, blank=True)
url = models.URLField(... | 26.866667 | 68 | 0.746898 | 46 | 403 | 6.434783 | 0.630435 | 0.060811 | 0.087838 | 0.114865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017699 | 0.158809 | 403 | 14 | 69 | 28.785714 | 0.855457 | 0 | 0 | 0 | 1 | 0 | 0.037221 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.222222 | 0 | 0.888889 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
eed3d0c219432d297ec3678d33cb055903fd203a | 727 | py | Python | cmsplugin_blog/utils.py | Troyhy/cmsplugin-blog | 0354d7ade3f9c1987f08806f4c9bcfb11d7576c3 | [
"BSD-3-Clause"
] | null | null | null | cmsplugin_blog/utils.py | Troyhy/cmsplugin-blog | 0354d7ade3f9c1987f08806f4c9bcfb11d7576c3 | [
"BSD-3-Clause"
] | null | null | null | cmsplugin_blog/utils.py | Troyhy/cmsplugin-blog | 0354d7ade3f9c1987f08806f4c9bcfb11d7576c3 | [
"BSD-3-Clause"
] | null | null | null | from django.utils.translation import get_language, ugettext_lazy as _
from django.conf import settings
def module_exists(str):
try:
__import__(str)
except ImportError:
return False
return True
def is_multilingual():
return 'cmsplugin_blog.middleware.MultilingualBlogEntries... | 30.291667 | 104 | 0.715268 | 89 | 727 | 5.561798 | 0.516854 | 0.040404 | 0.10101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.209078 | 727 | 23 | 105 | 31.608696 | 0.86087 | 0 | 0 | 0 | 0 | 0 | 0.12642 | 0.122159 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.277778 | 0.111111 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
eee85802e52dc9ee47e14e55880c91331e6aa297 | 270 | py | Python | src/farrow_and_ball/__init__.py | vork/farrowandball | 9cd264310f9f09b2a29c0796c892800fb96386f9 | [
"MIT"
] | 1 | 2022-03-23T15:01:26.000Z | 2022-03-23T15:01:26.000Z | src/farrow_and_ball/__init__.py | vork/farrowandball | 9cd264310f9f09b2a29c0796c892800fb96386f9 | [
"MIT"
] | null | null | null | src/farrow_and_ball/__init__.py | vork/farrowandball | 9cd264310f9f09b2a29c0796c892800fb96386f9 | [
"MIT"
] | null | null | null | from farrow_and_ball.palettes import (
BaseColorPalette,
DivergentPalette,
MiscPalette,
PaletteNotFoundError,
PaletteTypeNotImplementedError,
SpectralPalette,
all_palettes,
build_colormap,
get_palette,
get_interpolated_palette,
)
| 20.769231 | 38 | 0.748148 | 21 | 270 | 9.285714 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.203704 | 270 | 12 | 39 | 22.5 | 0.906977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.083333 | 0 | 0.083333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
eeedd3f4ee012834b5e244692a5856ea9b3358d1 | 384 | py | Python | src/nl_rendering/utils.py | MeteoSwiss-APN/nl_rendering | ec7872b0ddbaa691e7591993d1523e1c94dcf1f8 | [
"MIT"
] | null | null | null | src/nl_rendering/utils.py | MeteoSwiss-APN/nl_rendering | ec7872b0ddbaa691e7591993d1523e1c94dcf1f8 | [
"MIT"
] | 2 | 2022-01-12T16:42:13.000Z | 2022-01-13T10:44:36.000Z | src/pytrajplot/utils.py | MeteoSwiss-APN/pytrajplot | aca49d89140b3568ff90c812e6b6ffce07cbdcaa | [
"MIT"
] | null | null | null | """Utils for the command line tool."""
# Standard library
import logging
def count_to_log_level(count: int) -> int:
"""Map occurrence of the command line option verbose to the log level."""
if count == 0:
return logging.ERROR
elif count == 1:
return logging.WARNING
elif count == 2:
... | 24 | 77 | 0.640625 | 52 | 384 | 4.673077 | 0.615385 | 0.213992 | 0.115226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010676 | 0.268229 | 384 | 15 | 78 | 25.6 | 0.854093 | 0.307292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.1 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
eef61a0f4beda7bc826861f9b490fde79a50cffb | 3,208 | py | Python | src/devlprd/filtering.py | FANTM/devlprd | 476383266c87b99870821279ae5a1502f290292f | [
"MIT"
] | 1 | 2022-01-07T17:53:21.000Z | 2022-01-07T17:53:21.000Z | src/devlprd/filtering.py | FANTM/devlprd | 476383266c87b99870821279ae5a1502f290292f | [
"MIT"
] | 1 | 2021-09-28T20:32:20.000Z | 2021-09-28T21:09:47.000Z | src/devlprd/filtering.py | FANTM/devlprd | 476383266c87b99870821279ae5a1502f290292f | [
"MIT"
] | null | null | null | import numpy as np
# NOTE: these all assume a sample rate of 1000Hz and 0-centered(ish)
BUTTER2_45_55_NOTCH = [[0.95654323, -1.82035157, 0.95654323, 1., -1.84458768, 0.9536256 ],
[1. , -1.90305207, 1. , 1., -1.87701816, 0.95947072]]
BUTTER4_45_55_NOTCH = [[0.92117099, -1.75303637, ... | 71.288889 | 95 | 0.435162 | 400 | 3,208 | 3.4225 | 0.295 | 0.105186 | 0.04821 | 0.088386 | 0.242513 | 0.192841 | 0 | 0 | 0 | 0 | 0 | 0.488991 | 0.391209 | 3,208 | 45 | 96 | 71.288889 | 0.211982 | 0.033666 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04878 | false | 0 | 0.02439 | 0 | 0.121951 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
eef7e700c93ea6ce87c91a15840cd37e161ee3c3 | 4,069 | py | Python | lib/vdlib/torrent/torrentplayer.py | vadyur/script.module.vd-common | c88cde1d2838e5d33d1e446f3bcc9518b20f2fc0 | [
"MIT"
] | null | null | null | lib/vdlib/torrent/torrentplayer.py | vadyur/script.module.vd-common | c88cde1d2838e5d33d1e446f3bcc9518b20f2fc0 | [
"MIT"
] | null | null | null | lib/vdlib/torrent/torrentplayer.py | vadyur/script.module.vd-common | c88cde1d2838e5d33d1e446f3bcc9518b20f2fc0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os, sys
from ..util.log import debug, print_tb
from ..util import filesystem
from ..util.string import decode_string
if sys.version_info < (3, 0):
from .bencode import BTFailure as BTError
from .bencode import bdecode, bencode
else:
from .bencodepy import BencodeDecodeError as BTErr... | 21.415789 | 115 | 0.653232 | 506 | 4,069 | 5.144269 | 0.286561 | 0.029581 | 0.02305 | 0.009988 | 0.072993 | 0.050711 | 0.050711 | 0.050711 | 0.050711 | 0 | 0 | 0.0175 | 0.213566 | 4,069 | 190 | 116 | 21.415789 | 0.795625 | 0.061686 | 0 | 0.316901 | 0 | 0 | 0.100683 | 0.009201 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.077465 | 0.070423 | null | null | 0.021127 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
e110a367030e87143db1bb8e6cb4efd92f25d661 | 1,012 | py | Python | tests/misc/aes.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | 1 | 2020-07-11T15:32:52.000Z | 2020-07-11T15:32:52.000Z | tests/misc/aes.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | tests/misc/aes.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import base64
import hashlib
from Crypto import Random, Cipher
class AES(object):
def __init__(self, key):
self.bs = 32
self.key = hashlib.sha256... | 30.666667 | 92 | 0.636364 | 148 | 1,012 | 4.263514 | 0.405405 | 0.099842 | 0.066561 | 0.085578 | 0.301109 | 0.263074 | 0.212361 | 0.212361 | 0.212361 | 0.212361 | 0 | 0.021519 | 0.219368 | 1,012 | 32 | 93 | 31.625 | 0.777215 | 0.143281 | 0 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.227273 | false | 0 | 0.136364 | 0.090909 | 0.590909 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
e11a41ff2514277c8475086153b08f6c0239f43e | 154 | py | Python | _aulas/aula007d.py | CarlosJunn/Aprendendo_Python | cddb29b5ee2058c3fb612574eb4af414770b7422 | [
"MIT"
] | null | null | null | _aulas/aula007d.py | CarlosJunn/Aprendendo_Python | cddb29b5ee2058c3fb612574eb4af414770b7422 | [
"MIT"
] | null | null | null | _aulas/aula007d.py | CarlosJunn/Aprendendo_Python | cddb29b5ee2058c3fb612574eb4af414770b7422 | [
"MIT"
] | null | null | null | m = float(input('Digite um valor em metros:'))
cm = m * 100
mm = m * 1000
print('Valor em centímetros: {:.2f}\nValor em milímetros: {:.2f}'.format(cm,mm)) | 38.5 | 80 | 0.649351 | 26 | 154 | 3.846154 | 0.692308 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.068702 | 0.149351 | 154 | 4 | 80 | 38.5 | 0.694656 | 0 | 0 | 0 | 0 | 0 | 0.535484 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
e122c0699fc3f41018c4055fde3e8bff4997246c | 10,814 | py | Python | pysnmp/EICON-MIB-TRACE.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/EICON-MIB-TRACE.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/EICON-MIB-TRACE.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module EICON-MIB-TRACE (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EICON-MIB-TRACE
# Produced by pysmi-0.3.4 at Mon Apr 29 18:45:10 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 113.831579 | 1,396 | 0.75393 | 1,233 | 10,814 | 6.612328 | 0.153285 | 0.008586 | 0.012511 | 0.016681 | 0.489636 | 0.405618 | 0.319514 | 0.305532 | 0.302833 | 0.283331 | 0 | 0.079793 | 0.087942 | 10,814 | 94 | 1,397 | 115.042553 | 0.746832 | 0.029961 | 0 | 0.02439 | 0 | 0 | 0.112298 | 0.004198 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.073171 | 0 | 0.219512 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
e129f49e255f7f1763b6acf780db8c1ec73ede0e | 271 | py | Python | airflow/dags/split_into_time.py | zkan/try-airflow | d2f008ce2e19983e88e77b46534824c214ad0399 | [
"MIT"
] | 1 | 2017-01-15T13:53:01.000Z | 2017-01-15T13:53:01.000Z | airflow/dags/split_into_time.py | zkan/try-airflow | d2f008ce2e19983e88e77b46534824c214ad0399 | [
"MIT"
] | 10 | 2017-02-15T07:31:08.000Z | 2022-03-29T22:28:10.000Z | airflow/dags/split_into_time.py | zkan/try-airflow | d2f008ce2e19983e88e77b46534824c214ad0399 | [
"MIT"
] | 1 | 2017-02-15T07:03:16.000Z | 2017-02-15T07:03:16.000Z | import os
AIRFLOW_HOME = os.environ.get('AIRFLOW_HOME')
with open(f'{AIRFLOW_HOME}/dags/data.txt') as f:
time_data = f.read()
time_list = time_data.split()
with open(f'{AIRFLOW_HOME}/dags/time.txt', 'w') as split_text:
split_text.write(str(time_list[3]))
| 22.583333 | 62 | 0.697417 | 47 | 271 | 3.808511 | 0.468085 | 0.24581 | 0.100559 | 0.178771 | 0.268156 | 0.268156 | 0 | 0 | 0 | 0 | 0 | 0.004274 | 0.136531 | 271 | 11 | 63 | 24.636364 | 0.760684 | 0 | 0 | 0 | 0 | 0 | 0.254613 | 0.206642 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
01097b6d0d34b2f2c8872ca2aaa8bdfbf9ab6ff5 | 227 | py | Python | part/mm/fixed_risk/part.py | fasiondog/hikyuu_house | 0f0b609f17d94ba60da193de9c753eae54693817 | [
"MIT"
] | null | null | null | part/mm/fixed_risk/part.py | fasiondog/hikyuu_house | 0f0b609f17d94ba60da193de9c753eae54693817 | [
"MIT"
] | null | null | null | part/mm/fixed_risk/part.py | fasiondog/hikyuu_house | 0f0b609f17d94ba60da193de9c753eae54693817 | [
"MIT"
] | 1 | 2021-12-22T06:31:26.000Z | 2021-12-22T06:31:26.000Z | from hikyuu import MM_FixedRisk
# 部件作者
author = "fasiondog"
# 版本
version = '20200825'
def part(risk=1000.00):
return MM_FixedRisk(risk)
part.__doc__ = MM_FixedRisk.__doc__
if __name__ == '__main__':
print(part()) | 13.352941 | 35 | 0.704846 | 30 | 227 | 4.7 | 0.733333 | 0.234043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074866 | 0.176211 | 227 | 17 | 36 | 13.352941 | 0.679144 | 0.030837 | 0 | 0 | 0 | 0 | 0.114679 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0.125 | 0.375 | 0.125 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
012b5d48823592d325c254481e3171a418a026d7 | 353 | py | Python | ReadXMLClass.py | exponential-decay/oais-du-jour | 8e83115954bc4ac32a0739dc2078158065b1222c | [
"MIT"
] | 1 | 2016-08-17T04:02:33.000Z | 2016-08-17T04:02:33.000Z | ReadXMLClass.py | exponential-decay/oais-du-jour | 8e83115954bc4ac32a0739dc2078158065b1222c | [
"MIT"
] | null | null | null | ReadXMLClass.py | exponential-decay/oais-du-jour | 8e83115954bc4ac32a0739dc2078158065b1222c | [
"MIT"
] | null | null | null | import os
import re
import sys
import urllib2
import xml.etree.ElementTree as etree
class read_xml:
def __init__(self, loc):
self.loc = loc
def scan_xml(self):
tree = etree.ElementTree(file=urllib2.urlopen(self.loc))
root = tree.getroot()
xml_iter = iter(root)
return xml_iter
... | 18.578947 | 62 | 0.611898 | 47 | 353 | 4.446809 | 0.510638 | 0.100478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008163 | 0.305949 | 353 | 18 | 63 | 19.611111 | 0.840816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.384615 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
012b7485f33f1c0314a8922b86f328ca2e16a504 | 74 | py | Python | pynamodb/tests/integration/config.py | augustincouette/PynamoDB | e250948dd593beb878042d5b949e07a6e0478ae5 | [
"MIT"
] | 3 | 2017-06-06T07:38:48.000Z | 2021-07-21T21:38:34.000Z | pynamodb/tests/integration/config.py | augustincouette/PynamoDB | e250948dd593beb878042d5b949e07a6e0478ae5 | [
"MIT"
] | 8 | 2016-03-28T21:22:04.000Z | 2016-11-01T18:01:21.000Z | pynamodb/tests/integration/config.py | augustincouette/PynamoDB | e250948dd593beb878042d5b949e07a6e0478ae5 | [
"MIT"
] | 4 | 2019-08-17T20:02:28.000Z | 2020-12-01T01:11:25.000Z | """
Integration test settings
"""
DYNAMODB_HOST = 'http://localhost:8000' | 14.8 | 39 | 0.716216 | 8 | 74 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.060606 | 0.108108 | 74 | 5 | 39 | 14.8 | 0.727273 | 0.337838 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
01306d3a435248c9dea724a91974caeef7bea61e | 1,861 | py | Python | manipulation_main/training/env_reset_demo.py | ama29/6.843-Final-Project | cc0628f32cd695e0a76ffb0b7daa8c7350b6f0ed | [
"MIT"
] | null | null | null | manipulation_main/training/env_reset_demo.py | ama29/6.843-Final-Project | cc0628f32cd695e0a76ffb0b7daa8c7350b6f0ed | [
"MIT"
] | null | null | null | manipulation_main/training/env_reset_demo.py | ama29/6.843-Final-Project | cc0628f32cd695e0a76ffb0b7daa8c7350b6f0ed | [
"MIT"
] | null | null | null | import argparse
from manipulation_main.training.imitation_utils import get_env_expert
train_parser = argparse.ArgumentParser()
train_parser.add_argument('--config', type=str, required=True)
train_parser.add_argument('--model_dir', type=str, required=True)
train_parser.add_argument('--algo', type=str, required=True)
t... | 41.355556 | 72 | 0.785599 | 281 | 1,861 | 4.871886 | 0.252669 | 0.184806 | 0.214755 | 0.337473 | 0.653031 | 0.624543 | 0.487217 | 0.352082 | 0.204529 | 0.071585 | 0 | 0.001139 | 0.056421 | 1,861 | 44 | 73 | 42.295455 | 0.778474 | 0.026867 | 0 | 0.222222 | 0 | 0 | 0.174226 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.055556 | 0 | 0.055556 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
013342991197bb6a70fe60bdda879124625e3e6f | 1,366 | py | Python | pip_services3_commons/commands/IEventListener.py | pip-services-python/pip-services-commons-python | ecfe0aab2b1442ed3b550115dd2c2472537452de | [
"MIT"
] | null | null | null | pip_services3_commons/commands/IEventListener.py | pip-services-python/pip-services-commons-python | ecfe0aab2b1442ed3b550115dd2c2472537452de | [
"MIT"
] | null | null | null | pip_services3_commons/commands/IEventListener.py | pip-services-python/pip-services-commons-python | ecfe0aab2b1442ed3b550115dd2c2472537452de | [
"MIT"
] | 2 | 2020-03-11T21:41:13.000Z | 2020-03-14T00:26:20.000Z | # -*- coding: utf-8 -*-
"""
pip_services3_commons.commands.IEventListener
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interface for event_name listeners.
:copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
... | 29.695652 | 95 | 0.650073 | 152 | 1,366 | 5.743421 | 0.559211 | 0.061856 | 0.032073 | 0.032073 | 0.061856 | 0.061856 | 0 | 0 | 0 | 0 | 0 | 0.013346 | 0.232064 | 1,366 | 45 | 96 | 30.355556 | 0.818875 | 0.672767 | 0 | 0 | 0 | 0 | 0.102236 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.571429 | 0 | 0.857143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
0152e01f7ae429f061981780e28ac7078cacf1dd | 6,058 | py | Python | hscommon/cocoa/inter.py | hsoft/currency_server | 0fa5c9b159b93df98a399c5b0efeb61318925265 | [
"BSD-3-Clause"
] | null | null | null | hscommon/cocoa/inter.py | hsoft/currency_server | 0fa5c9b159b93df98a399c5b0efeb61318925265 | [
"BSD-3-Clause"
] | null | null | null | hscommon/cocoa/inter.py | hsoft/currency_server | 0fa5c9b159b93df98a399c5b0efeb61318925265 | [
"BSD-3-Clause"
] | null | null | null | # Created By: Virgil Dupras
# Created On: 2010-02-06
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licens... | 29.990099 | 101 | 0.625124 | 745 | 6,058 | 4.962416 | 0.326175 | 0.058426 | 0.029213 | 0.030295 | 0.217203 | 0.161212 | 0.147687 | 0.112524 | 0.09413 | 0.069786 | 0 | 0.002935 | 0.268901 | 6,058 | 201 | 102 | 30.139303 | 0.83179 | 0.174645 | 0 | 0.217054 | 0 | 0 | 0.049537 | 0 | 0 | 0 | 0 | 0 | 0.007752 | 1 | 0.317829 | false | 0 | 0.031008 | 0.085271 | 0.527132 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
017e467062f7e8a3b2f0787dc70fdcd00d69161d | 237 | py | Python | choreo/multirq/defaults.py | Mizzlr/triton | e8487b87d26640ea8826a42ef42514160decc373 | [
"MIT"
] | 3 | 2019-10-29T02:54:24.000Z | 2020-08-13T02:33:01.000Z | choreo/multirq/defaults.py | Mizzlr/choreo | e8487b87d26640ea8826a42ef42514160decc373 | [
"MIT"
] | null | null | null | choreo/multirq/defaults.py | Mizzlr/choreo | e8487b87d26640ea8826a42ef42514160decc373 | [
"MIT"
] | null | null | null | DEFAULT_JOB_CLASS = 'choreo.multirq.job.Job'
DEFAULT_QUEUE_CLASS = 'choreo.multirq.Queue'
DEFAULT_WORKER_CLASS = 'choreo.retry.RetryWorker'
DEFAULT_CONNECTION_CLASS = 'redis.StrictRedis'
DEFAULT_WORKER_TTL = 420
DEFAULT_RESULT_TTL = 500
| 33.857143 | 49 | 0.831224 | 32 | 237 | 5.78125 | 0.5 | 0.178378 | 0.194595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027397 | 0.075949 | 237 | 6 | 50 | 39.5 | 0.817352 | 0 | 0 | 0 | 0 | 0 | 0.350211 | 0.194093 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0199625b73eab36efaab3f7590a7796bba06a540 | 138 | py | Python | spath/__init__.py | dimatura/spath.py | 881a86cf1197223aefc91204d30dc83e7741b980 | [
"BSD-3-Clause"
] | null | null | null | spath/__init__.py | dimatura/spath.py | 881a86cf1197223aefc91204d30dc83e7741b980 | [
"BSD-3-Clause"
] | 1 | 2021-11-15T18:23:50.000Z | 2021-11-15T18:23:50.000Z | spath/__init__.py | dimatura/spath.py | 881a86cf1197223aefc91204d30dc83e7741b980 | [
"BSD-3-Clause"
] | 1 | 2017-07-28T11:17:02.000Z | 2017-07-28T11:17:02.000Z | # -*- coding: utf-8 -*-
__author__ = """Daniel Maturana"""
__email__ = 'dimatura@cmu.edu'
__version__ = '0.1.5'
from .spath import Path
| 17.25 | 34 | 0.652174 | 18 | 138 | 4.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034188 | 0.152174 | 138 | 7 | 35 | 19.714286 | 0.632479 | 0.152174 | 0 | 0 | 0 | 0 | 0.313043 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6d6a22de0a959e1e74006e4abf40ed21b0007afa | 1,654 | py | Python | tests/test_validators.py | life4/vaa | d934e073966cacc1810419bed0ed8e5dca83fac8 | [
"MIT"
] | 5 | 2019-10-01T14:21:04.000Z | 2021-10-19T16:21:28.000Z | tests/test_validators.py | life4/vaa | d934e073966cacc1810419bed0ed8e5dca83fac8 | [
"MIT"
] | 2 | 2019-10-03T19:44:55.000Z | 2019-10-04T09:37:28.000Z | tests/test_validators.py | life4/vaa | d934e073966cacc1810419bed0ed8e5dca83fac8 | [
"MIT"
] | null | null | null | import pytest
from .validators.pre import prevalidators
from .validators.post import postvalidators
validators = prevalidators + postvalidators
@pytest.mark.parametrize('validator', validators)
def test_valid(validator):
data = {
'name': 'Oleg',
'mail': 'test@example.ru',
'count': 20,
... | 23.295775 | 52 | 0.622128 | 201 | 1,654 | 5.029851 | 0.21393 | 0.062315 | 0.065282 | 0.148368 | 0.736894 | 0.736894 | 0.736894 | 0.557864 | 0.520277 | 0.391691 | 0 | 0.006349 | 0.23821 | 1,654 | 70 | 53 | 23.628571 | 0.796032 | 0 | 0 | 0.596491 | 0 | 0 | 0.137243 | 0 | 0 | 0 | 0 | 0 | 0.22807 | 1 | 0.087719 | false | 0 | 0.052632 | 0 | 0.140351 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6d7118dd6958a79f48d08e347784b8d163821942 | 50,247 | py | Python | pysnmp-with-texts/TERAWAVE-terasystem-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/TERAWAVE-terasystem-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/TERAWAVE-terasystem-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module TERAWAVE-terasystem-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TERAWAVE-terasystem-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:16:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | 117.399533 | 6,594 | 0.782614 | 5,120 | 50,247 | 7.680469 | 0.069727 | 0.079951 | 0.139915 | 0.01536 | 0.527032 | 0.375598 | 0.322678 | 0.280745 | 0.26063 | 0.24377 | 0 | 0.063436 | 0.071367 | 50,247 | 427 | 6,595 | 117.674473 | 0.779323 | 0.006767 | 0 | 0 | 0 | 0 | 0.098601 | 0.019279 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.014286 | 0 | 0.014286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6d7a6a28b9a4622ae582ef18e268ad020262a8b0 | 506 | py | Python | src/python/examples/decorator.py | pierfied/apollo | d0ea477ef6814a3b322487fd25c30846db5d2988 | [
"MIT"
] | 14 | 2020-06-16T12:59:18.000Z | 2022-01-31T17:40:52.000Z | src/python/examples/decorator.py | pierfied/apollo | d0ea477ef6814a3b322487fd25c30846db5d2988 | [
"MIT"
] | 9 | 2020-08-11T01:18:26.000Z | 2022-02-18T16:33:02.000Z | src/python/examples/decorator.py | pierfied/apollo | d0ea477ef6814a3b322487fd25c30846db5d2988 | [
"MIT"
] | 8 | 2020-06-16T12:59:25.000Z | 2021-06-21T20:33:04.000Z | #!/usr/bin/env python
from __future__ import print_function
def printstuff(fun):
def fun_that_prints(*args, **kwargs):
print("calling %s" % fun.__name__)
fun(*args, **kwargs)
print("done with %s." % fun.__name__)
return fun_that_prints
def myfunction():
print("MYFUNCTION")
def ... | 16.866667 | 45 | 0.640316 | 55 | 506 | 5.418182 | 0.490909 | 0.04698 | 0.087248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010256 | 0.229249 | 506 | 29 | 46 | 17.448276 | 0.753846 | 0.039526 | 0 | 0.117647 | 0 | 0 | 0.126033 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.235294 | false | 0 | 0.058824 | 0 | 0.352941 | 0.647059 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
6d899d7fdbc581791b146905752b8c79931b4c69 | 609 | py | Python | helloworld.py | joefroh/l2python | 7da298c9fed38df3605718a2fd4ffdd3640728a7 | [
"MIT"
] | null | null | null | helloworld.py | joefroh/l2python | 7da298c9fed38df3605718a2fd4ffdd3640728a7 | [
"MIT"
] | null | null | null | helloworld.py | joefroh/l2python | 7da298c9fed38df3605718a2fd4ffdd3640728a7 | [
"MIT"
] | null | null | null | print("Hello World")
# The basics
name = "joey"
age = 27
print(name + str(age))
testList = [0,1,2]
testList.append(3)
testList.append(4)
for member in testList:
print(member)
for index,member in enumerate(testList):
print("Index: " + str(index) + " item: " + str(member))
# List Combining
list1 = [1,3,5,7... | 17.4 | 59 | 0.663383 | 93 | 609 | 4.344086 | 0.462366 | 0.225248 | 0.10396 | 0.141089 | 0.173267 | 0.138614 | 0 | 0 | 0 | 0 | 0 | 0.050388 | 0.152709 | 609 | 35 | 60 | 17.4 | 0.732558 | 0.118227 | 0 | 0 | 0 | 0 | 0.107143 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.545455 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
6d8a301829e190af47578c501b784f8b9e8fdcd3 | 214 | py | Python | tests/other_models.py | BottleJia/Redis-astra | f27288c383ef4710c2a97416fc268242cdf95100 | [
"MIT"
] | 87 | 2016-03-07T08:38:56.000Z | 2021-11-12T11:42:34.000Z | tests/other_models.py | BottleJia/Redis-astra | f27288c383ef4710c2a97416fc268242cdf95100 | [
"MIT"
] | 5 | 2016-03-10T20:49:28.000Z | 2021-06-30T08:01:43.000Z | tests/other_models.py | BottleJia/Redis-astra | f27288c383ef4710c2a97416fc268242cdf95100 | [
"MIT"
] | 6 | 2016-03-17T21:28:25.000Z | 2021-07-29T05:49:59.000Z | from astra import models
import redis
db = redis.StrictRedis(host='127.0.0.1', decode_responses=True)
class SiteColorModel(models.Model):
color = models.CharField()
def get_db(self):
return db
| 16.461538 | 63 | 0.705607 | 30 | 214 | 4.966667 | 0.766667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034483 | 0.186916 | 214 | 12 | 64 | 17.833333 | 0.821839 | 0 | 0 | 0 | 0 | 0 | 0.042056 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.285714 | 0.142857 | 0.857143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
6d8c8cfc9f800371f7bee7266d3a26d2a3c52452 | 853 | py | Python | ski_trip.py | GYosifov88/Python-Basics | f4290061264aebc417bde4948948e4a64739fec9 | [
"MIT"
] | null | null | null | ski_trip.py | GYosifov88/Python-Basics | f4290061264aebc417bde4948948e4a64739fec9 | [
"MIT"
] | null | null | null | ski_trip.py | GYosifov88/Python-Basics | f4290061264aebc417bde4948948e4a64739fec9 | [
"MIT"
] | null | null | null | days = int(input())
type_of_room = input()
feedback = input()
price = 0
nights = days - 1
if type_of_room == 'room for one person':
price = 18
cost = nights * price
elif type_of_room == 'apartment':
price = 25
cost = nights * price
if days < 10:
cost = cost - (cost * 30 /100)
elif 10 <... | 24.371429 | 43 | 0.539273 | 118 | 853 | 3.830508 | 0.279661 | 0.283186 | 0.212389 | 0.123894 | 0.426991 | 0.384956 | 0.384956 | 0.274336 | 0.154867 | 0 | 0 | 0.111684 | 0.317702 | 853 | 35 | 44 | 24.371429 | 0.664948 | 0 | 0 | 0.354839 | 0 | 0 | 0.08548 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.032258 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6d94ca809a5e5c811407fc2c1493922fffdcd45f | 1,170 | py | Python | hello/home/views.py | pratikd2124/Online-Library | e93ef1f42476d9f1b4b814f0a8254fd8cfbee178 | [
"MIT"
] | null | null | null | hello/home/views.py | pratikd2124/Online-Library | e93ef1f42476d9f1b4b814f0a8254fd8cfbee178 | [
"MIT"
] | null | null | null | hello/home/views.py | pratikd2124/Online-Library | e93ef1f42476d9f1b4b814f0a8254fd8cfbee178 | [
"MIT"
] | null | null | null | from django.shortcuts import render, HttpResponse
from home.models import Contact, Library, category
from datetime import datetime
from django.contrib import messages
# Create your views here.
def index(request):
return render(request, "index.html")
#return HttpResponse("Home page")
def abou... | 30 | 89 | 0.657265 | 136 | 1,170 | 5.654412 | 0.330882 | 0.093628 | 0.148244 | 0.135241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.220513 | 1,170 | 39 | 90 | 30 | 0.843202 | 0.133333 | 0 | 0 | 0 | 0 | 0.117405 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.166667 | 0.166667 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
6daf4aaf0e392d4ab98d2ea30238144060546619 | 80 | py | Python | gpu_kmer_counter/__init__.py | AMR-Hackathon-2021/gpu_kmer_counter | 1818663ffd270f402da98f2dc1d010ee81f8e9bf | [
"Apache-2.0"
] | null | null | null | gpu_kmer_counter/__init__.py | AMR-Hackathon-2021/gpu_kmer_counter | 1818663ffd270f402da98f2dc1d010ee81f8e9bf | [
"Apache-2.0"
] | null | null | null | gpu_kmer_counter/__init__.py | AMR-Hackathon-2021/gpu_kmer_counter | 1818663ffd270f402da98f2dc1d010ee81f8e9bf | [
"Apache-2.0"
] | null | null | null | # vim: set fileencoding=<utf-8> :
'''Counting k-mers'''
__version__ = '0.1.0'
| 13.333333 | 33 | 0.6125 | 12 | 80 | 3.75 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058824 | 0.15 | 80 | 5 | 34 | 16 | 0.602941 | 0.6 | 0 | 0 | 0 | 0 | 0.192308 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6db23d75ee6bb5052f564f917e4e881078958216 | 1,213 | py | Python | simdeblur/utils/registry.py | ljzycmd/SimDeblur | dd2f60c41176b75c4eaf80d740f547c206aa8227 | [
"MIT"
] | 190 | 2021-03-22T13:59:42.000Z | 2022-03-08T21:14:41.000Z | utils/registry.py | Wang-jiahao/SimDeblur | 31d88e1fbec91d5cc9062f4a46538e4ba806ab29 | [
"MIT"
] | 9 | 2021-04-26T06:44:40.000Z | 2022-03-25T07:48:30.000Z | utils/registry.py | Wang-jiahao/SimDeblur | 31d88e1fbec91d5cc9062f4a46538e4ba806ab29 | [
"MIT"
] | 27 | 2021-03-23T03:11:00.000Z | 2022-03-19T21:26:02.000Z | # Registry Class
# CMD
# Refer this in Detectron2
class Registry:
def __init__(self, name):
self._name = name
self._obj_map = {}
def _do_register(self, name, obj):
assert (name not in self._obj_map), "The object named: {} was already registered in {} registry! ".format(name, self.... | 28.880952 | 131 | 0.567189 | 155 | 1,213 | 4.135484 | 0.316129 | 0.087363 | 0.078003 | 0.043682 | 0.156006 | 0.087363 | 0 | 0 | 0 | 0 | 0 | 0.001255 | 0.342951 | 1,213 | 42 | 132 | 28.880952 | 0.803011 | 0.133553 | 0 | 0 | 0 | 0 | 0.098328 | 0 | 0 | 0 | 0 | 0 | 0.04 | 1 | 0.28 | false | 0 | 0 | 0.08 | 0.52 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
6db2e7696dc3317f3e448a27d94f7eaacb044544 | 2,454 | py | Python | cache_fallback/cache.py | gelo-zhukov/django-cache-fallback | 6c8d3d7469f367a7fa90c0db3c37410ff012fe46 | [
"MIT"
] | 9 | 2017-04-05T20:20:32.000Z | 2020-06-23T10:28:52.000Z | cache_fallback/cache.py | gelo-zhukov/django-cache-fallback | 6c8d3d7469f367a7fa90c0db3c37410ff012fe46 | [
"MIT"
] | 2 | 2019-08-23T06:39:36.000Z | 2021-07-21T20:25:59.000Z | cache_fallback/cache.py | gelo-zhukov/django-cache-fallback | 6c8d3d7469f367a7fa90c0db3c37410ff012fe46 | [
"MIT"
] | 4 | 2018-12-24T22:41:35.000Z | 2020-07-25T10:08:26.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import django
from django.core import signals
from django.core.cache.backends.base import BaseCache
logging.basicConfig()
logger = logging.getLogger(__name__)
def get_cache(backend, **kwargs):
from django.core import cache as dj_cach... | 34.083333 | 85 | 0.674002 | 320 | 2,454 | 4.95 | 0.29375 | 0.056818 | 0.061869 | 0.056818 | 0.252525 | 0.236111 | 0.217172 | 0.111111 | 0.059343 | 0 | 0 | 0.005726 | 0.217196 | 2,454 | 71 | 86 | 34.56338 | 0.818844 | 0.095762 | 0 | 0.04 | 0 | 0 | 0.032987 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.12 | 0.14 | 0.58 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
6db7eccb741e335135250a24570eb58f17d9af90 | 395 | py | Python | UnitTests/Commands/test_remove_command.py | pinventado/Tuffix-2 | eba19ae7b48cbd05dcb26d33b76bab0ccb6ad77c | [
"MIT"
] | null | null | null | UnitTests/Commands/test_remove_command.py | pinventado/Tuffix-2 | eba19ae7b48cbd05dcb26d33b76bab0ccb6ad77c | [
"MIT"
] | 6 | 2021-07-23T23:02:33.000Z | 2022-01-27T23:04:17.000Z | UnitTests/Commands/test_remove_command.py | pinventado/Tuffix-2 | eba19ae7b48cbd05dcb26d33b76bab0ccb6ad77c | [
"MIT"
] | 1 | 2021-07-24T22:46:48.000Z | 2021-07-24T22:46:48.000Z | from Tuffix.Commands import RemoveCommand, AbstractCommand
from Tuffix.Configuration import DEFAULT_BUILD_CONFIG
import unittest
class AddCommandTest(unittest.TestCase):
# NOTE: this test has been done in Commands/test_add_remove_helper.py
def test_init(self):
try:
RemoveCommand(DEFAULT_B... | 28.214286 | 73 | 0.744304 | 46 | 395 | 6.217391 | 0.717391 | 0.06993 | 0.125874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.202532 | 395 | 13 | 74 | 30.384615 | 0.907937 | 0.16962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 1 | 0.111111 | false | 0 | 0.333333 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
6dd287dde07e38e6aa94548ac2131d592359fc33 | 416 | py | Python | dashboard/quickstart/views.py | spkuehl/rpm-dash | dc02c6d236fbfccd41ff4a67dae39abdc28f4e0f | [
"0BSD"
] | null | null | null | dashboard/quickstart/views.py | spkuehl/rpm-dash | dc02c6d236fbfccd41ff4a67dae39abdc28f4e0f | [
"0BSD"
] | null | null | null | dashboard/quickstart/views.py | spkuehl/rpm-dash | dc02c6d236fbfccd41ff4a67dae39abdc28f4e0f | [
"0BSD"
] | null | null | null | from .models import Signal
from rest_framework import viewsets
from dashboard.quickstart.serializers import SignalSerializer
from django.utils import timezone
class SignalViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows Signal to be viewed or edited.
"""
queryset = Signal.objects.filter(
... | 29.714286 | 61 | 0.771635 | 47 | 416 | 6.723404 | 0.744681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.161058 | 416 | 13 | 62 | 32 | 0.905444 | 0.132212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
6de101db61b0ea4e8a42fe66e006dde08a3c6681 | 143 | py | Python | emergency_response.py | secretbetta/Jetbot | c043020da55b425ef03e7e8b7529695015fd0faf | [
"MIT"
] | null | null | null | emergency_response.py | secretbetta/Jetbot | c043020da55b425ef03e7e8b7529695015fd0faf | [
"MIT"
] | null | null | null | emergency_response.py | secretbetta/Jetbot | c043020da55b425ef03e7e8b7529695015fd0faf | [
"MIT"
] | null | null | null | '''
Created on Feb 15, 2020
@author: andre
'''
import houndify
import sys
CLIENT_ID = sys.argv[1]
CLIENT_KEY = sys.argv[2]
| 9.533333 | 25 | 0.608392 | 21 | 143 | 4.047619 | 0.761905 | 0.164706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0.272727 | 143 | 14 | 26 | 10.214286 | 0.740385 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
6de43c1059d338560af918fa6e74dd4333889cfc | 1,922 | py | Python | hooqu/analyzers/mean.py | mfcabrera/hooqu | d0216e282186540eadfbae605ded62393a10332c | [
"Apache-2.0"
] | 17 | 2020-05-01T06:32:53.000Z | 2022-03-15T20:48:05.000Z | hooqu/analyzers/mean.py | mfcabrera/hooqu | d0216e282186540eadfbae605ded62393a10332c | [
"Apache-2.0"
] | 334 | 2020-05-01T11:32:16.000Z | 2022-03-28T23:32:36.000Z | hooqu/analyzers/mean.py | mfcabrera/hooqu | d0216e282186540eadfbae605ded62393a10332c | [
"Apache-2.0"
] | 2 | 2020-11-25T12:07:52.000Z | 2021-03-04T15:51:51.000Z | from dataclasses import dataclass
from typing import Callable, List, Optional
from hooqu.analyzers.analyzer import (AggDefinition, DoubledValuedState,
StandardScanShareableAnalyzer)
from hooqu.analyzers.preconditions import has_column, is_numeric
from hooqu.dataframe import DataFr... | 36.961538 | 83 | 0.671696 | 223 | 1,922 | 5.695067 | 0.412556 | 0.047244 | 0.028346 | 0.031496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002717 | 0.234131 | 1,922 | 51 | 84 | 37.686275 | 0.860054 | 0.197711 | 0 | 0 | 0 | 0 | 0.032595 | 0 | 0 | 0 | 0 | 0.019608 | 0 | 1 | 0.1875 | false | 0 | 0.15625 | 0.09375 | 0.65625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
6dea1bdcce930d374d25c37fab9164d545ecc602 | 171 | py | Python | learn/bb/dictionary.py | mksy61/python | 4465feaba38df4d0f96da5ae038c0a4c383f794b | [
"CC0-1.0"
] | 1 | 2020-07-27T14:00:50.000Z | 2020-07-27T14:00:50.000Z | learn/bb/dictionary.py | mksy61/python | 4465feaba38df4d0f96da5ae038c0a4c383f794b | [
"CC0-1.0"
] | null | null | null | learn/bb/dictionary.py | mksy61/python | 4465feaba38df4d0f96da5ae038c0a4c383f794b | [
"CC0-1.0"
] | null | null | null | sayilar = {"Bir": 1, "İki": 2, "Üç": 3, "Dört": 4, "Beş": 5}
sayilar["Altı"] = 6
sayilar[43] = "fds"
print(len(sayilar))
print()
for v in sayilar.values():
print(v)
| 17.1 | 60 | 0.561404 | 30 | 171 | 3.233333 | 0.766667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057143 | 0.181287 | 171 | 9 | 61 | 19 | 0.628571 | 0 | 0 | 0 | 0 | 0 | 0.128655 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.428571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
097385f369ae547721d94f5e7392c3fd26e91aa6 | 495 | py | Python | users/models.py | shacker/tangelo | 2976b370f483cfb77eab8d8f447cb768322e2f75 | [
"BSD-2-Clause"
] | null | null | null | users/models.py | shacker/tangelo | 2976b370f483cfb77eab8d8f447cb768322e2f75 | [
"BSD-2-Clause"
] | 3 | 2021-06-04T21:42:56.000Z | 2021-09-11T06:13:43.000Z | users/models.py | shacker/tangelo | 2976b370f483cfb77eab8d8f447cb768322e2f75 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.urls import reverse
from django.db import models
class User(AbstractUser):
# First Name and Last Name do not cover all name patterns
name = models.CharField(verbose_name='Name of User', blank=True, max_length=255)
class Meta:
app_la... | 26.052632 | 84 | 0.713131 | 68 | 495 | 5.058824 | 0.632353 | 0.087209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007557 | 0.19798 | 495 | 18 | 85 | 27.5 | 0.858942 | 0.111111 | 0 | 0 | 0 | 0 | 0.084475 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.272727 | 0.181818 | 0.909091 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
097abbfbf1ae99eeb3eb90ef6dd826995a2cc988 | 4,647 | py | Python | source/gameengine/PyDoc/API_intro.py | wycivil08/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 30 | 2015-01-29T14:06:05.000Z | 2022-01-10T07:47:29.000Z | source/gameengine/PyDoc/API_intro.py | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 1 | 2017-02-20T20:57:48.000Z | 2018-12-19T23:44:38.000Z | source/gameengine/PyDoc/API_intro.py | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 15 | 2015-04-23T02:38:36.000Z | 2021-03-01T20:09:39.000Z | # This is not a real module, it's simply an introductory text.
"""
The Blender Game Engine Python API Reference
============================================
See U{release notes<http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine>} for updates, changes and new functionality in the Game Engine Pyt... | 41.864865 | 227 | 0.735528 | 700 | 4,647 | 4.864286 | 0.452857 | 0.008223 | 0.017621 | 0.011747 | 0.027019 | 0.027019 | 0 | 0 | 0 | 0 | 0 | 0.00335 | 0.164838 | 4,647 | 110 | 228 | 42.245455 | 0.874002 | 1.176888 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
098137cb53c54b8a0d66172ed89f636e8fcf36aa | 576 | py | Python | orange3/Orange/regression/base_regression.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/regression/base_regression.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/regression/base_regression.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | from Orange.base import Learner, Model, SklLearner, SklModel
__all__ = [
"LearnerRegression",
"ModelRegression",
"SklModelRegression",
"SklLearnerRegression",
]
class LearnerRegression(Learner):
learner_adequacy_err_msg = "Continuous class variable expected."
def check_learner_adequacy(self,... | 20.571429 | 68 | 0.760417 | 50 | 576 | 8.46 | 0.56 | 0.070922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164931 | 576 | 27 | 69 | 21.333333 | 0.879418 | 0 | 0 | 0.117647 | 0 | 0 | 0.182292 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0.117647 | 0.058824 | 0.058824 | 0.529412 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
09853207f905c277ef4d3d8d925d8623ab4e4cec | 261 | py | Python | week1/ex8.py | zettrider/py_ans_course | f9ae41bda235868bc31526638e69cc92f1a6346d | [
"Apache-2.0"
] | null | null | null | week1/ex8.py | zettrider/py_ans_course | f9ae41bda235868bc31526638e69cc92f1a6346d | [
"Apache-2.0"
] | null | null | null | week1/ex8.py | zettrider/py_ans_course | f9ae41bda235868bc31526638e69cc92f1a6346d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from ciscoconfparse import CiscoConfParse
cisco_cfg = CiscoConfParse("cisco_ipsec.txt")
cry_map = cisco_cfg.find_objects(r"^crypto map CRYPTO")
for cr in cry_map:
print cr.text
for child in cr.children:
print child.text
| 21.75 | 55 | 0.739464 | 40 | 261 | 4.675 | 0.6 | 0.203209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172414 | 261 | 11 | 56 | 23.727273 | 0.865741 | 0.076628 | 0 | 0 | 0 | 0 | 0.1375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.142857 | null | null | 0.285714 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
098725933c61800afaf348ce06f2044fdece7999 | 5,755 | py | Python | day_22/second.py | Mizux/adventofcode | 8bca6b5db1b9f2e64b4038d32680d07766d14e2d | [
"Apache-2.0"
] | 1 | 2021-12-11T19:41:25.000Z | 2021-12-11T19:41:25.000Z | day_22/second.py | Mizux/adventofcode | 8bca6b5db1b9f2e64b4038d32680d07766d14e2d | [
"Apache-2.0"
] | null | null | null | day_22/second.py | Mizux/adventofcode | 8bca6b5db1b9f2e64b4038d32680d07766d14e2d | [
"Apache-2.0"
] | 1 | 2021-12-06T12:09:44.000Z | 2021-12-06T12:09:44.000Z | #!/usr/bin/env python3.10
from collections import defaultdict
import re
FILE = 'test.txt' # sol: 39769202357779
FILE='input.txt' # sol: 1160303042684776
pattern = re.compile('(on|off) x=([-]?\d+)..([-]?\d+),y=([-]?\d+)..([-]?\d+),z=([-]?\d+)..([-]?\d+)')
def parse_input(file):
rules = []
with open(file, 'r'... | 31.448087 | 159 | 0.288271 | 595 | 5,755 | 2.72605 | 0.144538 | 0.036991 | 0.033909 | 0.043157 | 0.354501 | 0.336621 | 0.307645 | 0.300247 | 0.274969 | 0.245993 | 0 | 0.086957 | 0.504431 | 5,755 | 182 | 160 | 31.620879 | 0.481767 | 0.065334 | 0 | 0.503145 | 0 | 0.006289 | 0.095505 | 0.012684 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018868 | false | 0 | 0.012579 | 0 | 0.050314 | 0.006289 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
098ac05e4a948bf2bc2c35f2a7e2f94ff80b9c25 | 926 | py | Python | callbackQuery/main.py | flifloo/teleexit | b0e64a571e590c2fac692703f12a2bd481a7c127 | [
"MIT"
] | 1 | 2022-01-31T19:27:05.000Z | 2022-01-31T19:27:05.000Z | callbackQuery/main.py | flifloo/teleexit | b0e64a571e590c2fac692703f12a2bd481a7c127 | [
"MIT"
] | null | null | null | callbackQuery/main.py | flifloo/teleexit | b0e64a571e590c2fac692703f12a2bd481a7c127 | [
"MIT"
] | null | null | null | from telegram import Update
from telegram.ext import CallbackContext, CallbackQueryHandler
from callbackQuery.create import create
from callbackQuery.data import data
from callbackQuery.edit import edit
from callbackQuery.new import new
from callbackQuery.reason import reason
from commands.start import start
def cal... | 33.071429 | 62 | 0.7527 | 109 | 926 | 6.284404 | 0.220183 | 0.170803 | 0.166423 | 0.20146 | 0.321168 | 0.321168 | 0.321168 | 0.145985 | 0 | 0 | 0 | 0 | 0.161987 | 926 | 27 | 63 | 34.296296 | 0.882732 | 0 | 0 | 0 | 0 | 0 | 0.031317 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.363636 | 0 | 0.409091 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
098d96a5cac44ff245fcaa2fb714ac1f20fff990 | 7,646 | py | Python | app/models/common.py | BasementCat/globalhack7 | 198f4a734d4f7a94c6d5e85c130f7679a2a8779d | [
"MIT"
] | null | null | null | app/models/common.py | BasementCat/globalhack7 | 198f4a734d4f7a94c6d5e85c130f7679a2a8779d | [
"MIT"
] | null | null | null | app/models/common.py | BasementCat/globalhack7 | 198f4a734d4f7a94c6d5e85c130f7679a2a8779d | [
"MIT"
] | 1 | 2018-10-15T15:12:37.000Z | 2018-10-15T15:12:37.000Z | import re
import sqlalchemy_utils as sau
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from flask_babel import lazy_gettext
from app.main import login_manager
from app.lib.storage import upload_file, file_url
import arrow
from app.main import db
USER_RE... | 36.759615 | 141 | 0.671201 | 889 | 7,646 | 5.584927 | 0.181102 | 0.058006 | 0.064451 | 0.048338 | 0.520645 | 0.485599 | 0.442095 | 0.352064 | 0.278348 | 0.23565 | 0 | 0.002635 | 0.205859 | 7,646 | 207 | 142 | 36.937198 | 0.815053 | 0 | 0 | 0.319277 | 1 | 0 | 0.073372 | 0.00327 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090361 | false | 0.036145 | 0.054217 | 0.018072 | 0.566265 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
098e4e8b118b552d15dacaf33659bd91d618172d | 132 | py | Python | captcha_recog/config.py | VrunArya/Hacktoberfest2021 | 5e739e52310dabf8b131abe5ecf906e13711b9d6 | [
"MIT"
] | 1 | 2021-10-02T07:12:54.000Z | 2021-10-02T07:12:54.000Z | captcha_recog/config.py | VrunArya/Hacktoberfest2021 | 5e739e52310dabf8b131abe5ecf906e13711b9d6 | [
"MIT"
] | null | null | null | captcha_recog/config.py | VrunArya/Hacktoberfest2021 | 5e739e52310dabf8b131abe5ecf906e13711b9d6 | [
"MIT"
] | 1 | 2021-10-05T09:55:35.000Z | 2021-10-05T09:55:35.000Z | DATA_DIR = "data/captcha_images_v2"
BATCH_SIZE = 8
IMAGE_WIDTH = 300
IMAGE_HEIGHT = 75
NUM_WORKERS = 8
EPOCHS = 200
DEVICE = "cuda"
| 16.5 | 35 | 0.75 | 22 | 132 | 4.181818 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.099099 | 0.159091 | 132 | 7 | 36 | 18.857143 | 0.72973 | 0 | 0 | 0 | 0 | 0 | 0.19697 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
099df04b51f1d4c4e0b8f7ba26b88785c5dad234 | 1,828 | py | Python | horizon/horizon/dashboards/syspanel/instances/views.py | citrix-openstack/horizon | 7987e68f135895728f891c2377b589f701d8106e | [
"Apache-2.0"
] | 2 | 2015-05-18T13:50:21.000Z | 2015-05-18T14:47:47.000Z | horizon/horizon/dashboards/syspanel/instances/views.py | andrewsmedina/horizon | 6892653c0573a6a55f359cce6c1796053ef65cbf | [
"Apache-2.0"
] | null | null | null | horizon/horizon/dashboards/syspanel/instances/views.py | andrewsmedina/horizon | 6892653c0573a6a55f359cce6c1796053ef65cbf | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | 32.642857 | 78 | 0.742341 | 236 | 1,828 | 5.677966 | 0.572034 | 0.044776 | 0.050746 | 0.023881 | 0.079104 | 0.079104 | 0.079104 | 0.079104 | 0 | 0 | 0 | 0.010239 | 0.198578 | 1,828 | 55 | 79 | 33.236364 | 0.904437 | 0.421225 | 0 | 0.071429 | 0 | 0 | 0.059673 | 0.027911 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035714 | false | 0 | 0.5 | 0 | 0.678571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
099ffe8299d6314f67a947a7f1cb3e9fa8801f30 | 2,241 | py | Python | 2020-11/201612226.py | Jeanca64091/CoronavirusML | 867f8e72579c60001719ede7211b86743c669fe6 | [
"Apache-2.0"
] | null | null | null | 2020-11/201612226.py | Jeanca64091/CoronavirusML | 867f8e72579c60001719ede7211b86743c669fe6 | [
"Apache-2.0"
] | null | null | null | 2020-11/201612226.py | Jeanca64091/CoronavirusML | 867f8e72579c60001719ede7211b86743c669fe6 | [
"Apache-2.0"
] | null | null | null | from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.pipeline import make_pipeline
import matplotlib.pyplot as plt
import numpy as np
import random
#=================================================... | 40.745455 | 97 | 0.688532 | 347 | 2,241 | 4.429395 | 0.726225 | 0.024723 | 0.029278 | 0.028627 | 0.051399 | 0.02147 | 0.02147 | 0 | 0 | 0 | 0 | 0.439166 | 0.079429 | 2,241 | 55 | 98 | 40.745455 | 0.305865 | 0.148148 | 0 | 0.108108 | 0 | 0 | 0.001576 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.189189 | 0 | 0.189189 | 0.027027 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
09a4ac343589822a5305a9c2acc5a501db4c1e59 | 547 | py | Python | common/utils_3dhp.py | paTRICK-swk/P-STMO | def1bff3fcc4f1e3b1dd69c8d3c2d77f412e3b75 | [
"MIT"
] | 8 | 2022-03-16T02:55:45.000Z | 2022-03-31T08:29:05.000Z | common/utils_3dhp.py | paTRICK-swk/P-STMO | def1bff3fcc4f1e3b1dd69c8d3c2d77f412e3b75 | [
"MIT"
] | 2 | 2022-03-24T23:29:23.000Z | 2022-03-31T02:59:39.000Z | common/utils_3dhp.py | paTRICK-swk/P-STMO | def1bff3fcc4f1e3b1dd69c8d3c2d77f412e3b75 | [
"MIT"
] | null | null | null |
def mpii_get_sequence_info(subject_id, sequence):
switcher = {
"1 1": [6416,25],
"1 2": [12430,50],
"2 1": [6502,25],
"2 2": [6081,25],
"3 1": [12488,50],
"3 2": [12283,50],
"4 1": [6171,25],
"4 2": [6675,25],
"5 1": [12820,50],
"5 2... | 21.88 | 49 | 0.400366 | 79 | 547 | 2.708861 | 0.443038 | 0.084112 | 0.158879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.385507 | 0.369287 | 547 | 24 | 50 | 22.791667 | 0.234783 | 0 | 0 | 0 | 0 | 0 | 0.089908 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0 | 0 | 0.1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
09c814c7aea614c441a0a6a893a470b943e5d70c | 271 | py | Python | core/src/zeit/magazin/sources.py | rickdg/vivi | 16134ac954bf8425646d4ad47bdd1f372e089355 | [
"BSD-3-Clause"
] | 5 | 2019-05-16T09:51:29.000Z | 2021-05-31T09:30:03.000Z | core/src/zeit/magazin/sources.py | rickdg/vivi | 16134ac954bf8425646d4ad47bdd1f372e089355 | [
"BSD-3-Clause"
] | 107 | 2019-05-24T12:19:02.000Z | 2022-03-23T15:05:56.000Z | core/src/zeit/magazin/sources.py | rickdg/vivi | 16134ac954bf8425646d4ad47bdd1f372e089355 | [
"BSD-3-Clause"
] | 3 | 2020-08-14T11:01:17.000Z | 2022-01-08T17:32:19.000Z | import zeit.cms.content.sources
class ArticleRelatedLayoutSource(zeit.cms.content.sources.XMLSource):
product_configuration = 'zeit.magazin'
config_url = 'article-related-layout-source'
default_filename = 'article-related-layouts.xml'
attribute = 'id'
| 27.1 | 69 | 0.763838 | 30 | 271 | 6.8 | 0.766667 | 0.068627 | 0.137255 | 0.205882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129151 | 271 | 9 | 70 | 30.111111 | 0.864407 | 0 | 0 | 0 | 0 | 0 | 0.258303 | 0.206642 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
09cdc16d65291b7b356c72e8d1d476848e4493e6 | 259 | py | Python | Table.py | JonLinC07/Poker | f21ea29acb5a9e674c665cf56033471634955e68 | [
"MIT"
] | null | null | null | Table.py | JonLinC07/Poker | f21ea29acb5a9e674c665cf56033471634955e68 | [
"MIT"
] | null | null | null | Table.py | JonLinC07/Poker | f21ea29acb5a9e674c665cf56033471634955e68 | [
"MIT"
] | null | null | null | from Dealer import Dealer
from Player import Player
from Card import Card
class Table:
def __init__(self, players, board=[], pot=0):
self.players = players
self.board = board
self.pot = pot
# def table_status(self):
| 19.923077 | 49 | 0.633205 | 34 | 259 | 4.676471 | 0.441176 | 0.138365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005405 | 0.285714 | 259 | 12 | 50 | 21.583333 | 0.854054 | 0.088803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
09d9cf43b5503d0e1289a2df3dc734e71d874729 | 161 | py | Python | teste.py | lucascz37/PySoccer | b2b5c63bf0ca42f8769487db7bf0a8441e0f8394 | [
"MIT"
] | null | null | null | teste.py | lucascz37/PySoccer | b2b5c63bf0ca42f8769487db7bf0a8441e0f8394 | [
"MIT"
] | null | null | null | teste.py | lucascz37/PySoccer | b2b5c63bf0ca42f8769487db7bf0a8441e0f8394 | [
"MIT"
] | null | null | null | from PySoccer.leagues.LeagueBase import LeagueBase
league = LeagueBase()
test = league.leaderboard('italy_serie_a')
for t in test.teams:
print(t)
| 17.888889 | 51 | 0.720497 | 21 | 161 | 5.428571 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.186335 | 161 | 8 | 52 | 20.125 | 0.870229 | 0 | 0 | 0 | 0 | 0 | 0.084967 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
09db292e9170fbc513fb4bd34e8dd9a65bdde4cd | 3,966 | py | Python | simplemooc/accounts/models.py | WesGtoX/simplemooc | efb50bc3cad54386286d46ece296b85f737ad005 | [
"MIT"
] | 3 | 2018-08-14T19:59:35.000Z | 2021-05-14T19:06:49.000Z | simplemooc/accounts/models.py | WesGtoX/simplemooc | efb50bc3cad54386286d46ece296b85f737ad005 | [
"MIT"
] | 4 | 2021-02-16T14:13:36.000Z | 2021-05-04T14:06:20.000Z | simplemooc/accounts/models.py | WesGtoX/simplemooc | efb50bc3cad54386286d46ece296b85f737ad005 | [
"MIT"
] | 2 | 2021-05-14T18:02:21.000Z | 2022-01-15T01:16:05.000Z | import re
from django.db import models
from django.core import validators
from django.conf import settings
from django.contrib.auth.models import (
AbstractBaseUser, PermissionsMixin, UserManager
)
class User(AbstractBaseUser, PermissionsMixin):
# Nome de usuário padrão, que também é único.
username = m... | 38.882353 | 114 | 0.671962 | 532 | 3,966 | 4.930451 | 0.422932 | 0.020587 | 0.019825 | 0.010675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004613 | 0.234745 | 3,966 | 101 | 115 | 39.267327 | 0.859638 | 0.452849 | 0 | 0.086957 | 0 | 0 | 0.13536 | 0 | 0 | 0 | 0 | 0.019802 | 0 | 1 | 0.086957 | false | 0.021739 | 0.108696 | 0.021739 | 0.652174 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
09dc60632198a8f60b1707b16f3290811c0d09e3 | 847 | py | Python | project/migrations/0007_auto_20210910_1326.py | RawAnimal/esm | 9a83a2580940f2efd642882cad46745a8d88c9ca | [
"MIT"
] | null | null | null | project/migrations/0007_auto_20210910_1326.py | RawAnimal/esm | 9a83a2580940f2efd642882cad46745a8d88c9ca | [
"MIT"
] | null | null | null | project/migrations/0007_auto_20210910_1326.py | RawAnimal/esm | 9a83a2580940f2efd642882cad46745a8d88c9ca | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-10 17:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project', '0006_auto_20210910_1323'),
]
operations = [
migrations.AlterField(
model_name='project',
name='project_ad... | 28.233333 | 92 | 0.596222 | 85 | 847 | 5.764706 | 0.552941 | 0.134694 | 0.153061 | 0.177551 | 0.287755 | 0.287755 | 0.287755 | 0 | 0 | 0 | 0 | 0.066335 | 0.288076 | 847 | 29 | 93 | 29.206897 | 0.746269 | 0.053129 | 0 | 0.391304 | 1 | 0 | 0.14125 | 0.02875 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.043478 | 0 | 0.173913 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
61cc9df6f156945b8303de5779f2b92212fe3b25 | 2,293 | py | Python | backtester/strategy/strategy.py | unbalancedparentheses/backtester_options | 46efd30e405f360c560f8eae8b2ee7d26f4532db | [
"MIT"
] | 91 | 2020-01-31T10:15:35.000Z | 2022-03-27T19:15:12.000Z | backtester/strategy/strategy.py | unbalancedparentheses/backtester_options | 46efd30e405f360c560f8eae8b2ee7d26f4532db | [
"MIT"
] | 38 | 2019-05-12T02:00:46.000Z | 2019-12-06T14:54:25.000Z | backtester/strategy/strategy.py | unbalancedparentheses/backtester_options | 46efd30e405f360c560f8eae8b2ee7d26f4532db | [
"MIT"
] | 20 | 2020-06-12T08:21:30.000Z | 2022-03-28T05:52:59.000Z | import math
import numpy as np
class Strategy:
"""Options strategy class.
Takes in a number of `StrategyLeg`'s (option contracts), and filters that determine
entry and exit conditions.
"""
def __init__(self, schema):
self.schema = schema
self.legs = []
self.conditions = []... | 31.847222 | 94 | 0.607501 | 289 | 2,293 | 4.653979 | 0.307958 | 0.041636 | 0.053532 | 0.023792 | 0.105576 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003688 | 0.290449 | 2,293 | 71 | 95 | 32.295775 | 0.822987 | 0.369821 | 0 | 0.181818 | 0 | 0 | 0.033128 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 1 | 0.242424 | false | 0 | 0.060606 | 0.030303 | 0.515152 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
61f2b6b55f738de90527182108f47ce238ae647d | 7,018 | py | Python | corehq/warehouse/migrations/0001_initial.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/warehouse/migrations/0001_initial.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/warehouse/migrations/0001_initial.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 1.10.7 on 2017-05-16 11:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DomainDim',
fields=[
... | 48.736111 | 125 | 0.560701 | 658 | 7,018 | 5.738602 | 0.170213 | 0.115201 | 0.138242 | 0.184322 | 0.735699 | 0.697299 | 0.58554 | 0.536282 | 0.502383 | 0.502383 | 0 | 0.02215 | 0.298803 | 7,018 | 143 | 126 | 49.076923 | 0.745174 | 0.006555 | 0 | 0.536765 | 1 | 0 | 0.149067 | 0.013486 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.014706 | 0 | 0.044118 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
61f34ea7a15548f7cd73bed1e05623774c51b0cc | 76 | py | Python | Curso_Python/laco_for.py | FranciscoCabrita1/Cabrita | af9dfb12dbc64cf6181d4e906156170c5449877e | [
"MIT"
] | 5 | 2020-08-24T23:29:58.000Z | 2022-02-07T19:58:07.000Z | Curso_Python/laco_for.py | lulavalenca/Curso-Completo-de-Python-no-Youtube | af9dfb12dbc64cf6181d4e906156170c5449877e | [
"MIT"
] | null | null | null | Curso_Python/laco_for.py | lulavalenca/Curso-Completo-de-Python-no-Youtube | af9dfb12dbc64cf6181d4e906156170c5449877e | [
"MIT"
] | 2 | 2020-08-24T23:30:06.000Z | 2021-12-23T18:23:38.000Z |
numeros = []
for n in range(1,101):
numeros.append(n)
print(numeros) | 9.5 | 22 | 0.631579 | 12 | 76 | 4 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 0.210526 | 76 | 8 | 23 | 9.5 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
110ff37f51555b75f1b11fc6d0a48e614705c489 | 540 | py | Python | tests/r/test_lost_letter.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 199 | 2017-07-24T01:34:27.000Z | 2022-01-29T00:50:55.000Z | tests/r/test_lost_letter.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 46 | 2017-09-05T19:27:20.000Z | 2019-01-07T09:47:26.000Z | tests/r/test_lost_letter.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 45 | 2017-07-26T00:10:44.000Z | 2022-03-16T20:44:59.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import shutil
import sys
import tempfile
from observations.r.lost_letter import lost_letter
def test_lost_letter():
"""Test module lost_letter.py by downloading
lost_letter.csv and testing shape of
e... | 22.5 | 50 | 0.764815 | 78 | 540 | 4.961538 | 0.538462 | 0.155039 | 0.124031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017897 | 0.172222 | 540 | 23 | 51 | 23.478261 | 0.847875 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 1 | 0.066667 | false | 0 | 0.466667 | 0 | 0.533333 | 0.066667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
1143db13c90464fbd2749970c59b6335a3621bac | 472 | py | Python | exercices/atbash-cipher/atbash_cipher.py | gkaeso/exercism-python | 00360effcc1eceadfdf6e342ff52bd6284b9bc87 | [
"MIT"
] | null | null | null | exercices/atbash-cipher/atbash_cipher.py | gkaeso/exercism-python | 00360effcc1eceadfdf6e342ff52bd6284b9bc87 | [
"MIT"
] | null | null | null | exercices/atbash-cipher/atbash_cipher.py | gkaeso/exercism-python | 00360effcc1eceadfdf6e342ff52bd6284b9bc87 | [
"MIT"
] | null | null | null | from string import ascii_lowercase
BLOCK_SIZE = 5
def _cipher(text):
translation_table = str.maketrans(ascii_lowercase, ascii_lowercase[::-1])
return ''.join([c.translate(translation_table) for c in text.replace(' ', '').lower() if c.isalnum()])
def encode(plain_text):
encoded = _cipher(plain_text)
... | 24.842105 | 106 | 0.713983 | 67 | 472 | 4.80597 | 0.522388 | 0.130435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007481 | 0.150424 | 472 | 18 | 107 | 26.222222 | 0.795511 | 0 | 0 | 0 | 0 | 0 | 0.004237 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0.1 | 0.1 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
1143fe85bb5b984ab6b64feaad277b6472d348d4 | 597 | py | Python | cifra/encoding/reverse.py | dante-signal31/cifra | 3914822ec49cd238fe31fd58424fa2b058116b9a | [
"BSD-3-Clause"
] | null | null | null | cifra/encoding/reverse.py | dante-signal31/cifra | 3914822ec49cd238fe31fd58424fa2b058116b9a | [
"BSD-3-Clause"
] | null | null | null | cifra/encoding/reverse.py | dante-signal31/cifra | 3914822ec49cd238fe31fd58424fa2b058116b9a | [
"BSD-3-Clause"
] | null | null | null | """
Reverse encoding functions.
Reverse encoding is the simplest of encoding methods. It just reverses order of
text characters.
"""
def encode(text: str) -> str:
"""
Reverse order of given text characters.
:param text: Text to reverse.
:return: Reversed text.
"""
reversed_text = "".join(cha... | 19.9 | 79 | 0.653266 | 78 | 597 | 4.974359 | 0.410256 | 0.154639 | 0.051546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004415 | 0.241206 | 597 | 29 | 80 | 20.586207 | 0.852097 | 0.592965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
115d4d0adca03af08b1918a46dc7f7acf8108326 | 726 | py | Python | mzmembership/mzmembership/doctype/membership/membership.py | nabeelnajeeb1/membership_ | c4d1746700b4feaf08748c1f44a6eef515c0c27c | [
"MIT"
] | null | null | null | mzmembership/mzmembership/doctype/membership/membership.py | nabeelnajeeb1/membership_ | c4d1746700b4feaf08748c1f44a6eef515c0c27c | [
"MIT"
] | null | null | null | mzmembership/mzmembership/doctype/membership/membership.py | nabeelnajeeb1/membership_ | c4d1746700b4feaf08748c1f44a6eef515c0c27c | [
"MIT"
] | 1 | 2022-03-16T12:34:31.000Z | 2022-03-16T12:34:31.000Z | # Copyright (c) 2021, M20Zero and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
class Membership(Document):
def on_submit(self):
self.make_invoice()
def make_invoice(self):
self.invoice_entry(self.name,self.member,self.... | 38.210526 | 180 | 0.756198 | 101 | 726 | 5.257426 | 0.485149 | 0.07533 | 0.060264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011094 | 0.130854 | 726 | 19 | 181 | 38.210526 | 0.830428 | 0.126722 | 0 | 0 | 0 | 0 | 0.022152 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.272727 | false | 0 | 0.181818 | 0 | 0.545455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
1161b5d24e93fc5eb9ff699d54bb77e5913e4c81 | 4,816 | py | Python | rtmp/Message.py | hirokikana/rtmp-client | 858da74940c7e2caae56eaf2fd74bc7ca430b99a | [
"MIT"
] | 2 | 2020-02-14T12:57:42.000Z | 2020-02-16T08:48:17.000Z | rtmp/Message.py | hirokikana/rtmp-client | 858da74940c7e2caae56eaf2fd74bc7ca430b99a | [
"MIT"
] | null | null | null | rtmp/Message.py | hirokikana/rtmp-client | 858da74940c7e2caae56eaf2fd74bc7ca430b99a | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
import random
import time
import struct
class AMF0():
def __init__(self, message_type, message):
self.type_mapping = {
'string' : 2,
'number' : 0,
'object' : 3
}
self.message_type = message_type
self.message = message
... | 33.213793 | 167 | 0.594061 | 599 | 4,816 | 4.450751 | 0.141903 | 0.055139 | 0.033008 | 0.04126 | 0.514254 | 0.465116 | 0.399475 | 0.330458 | 0.3012 | 0.274944 | 0 | 0.030822 | 0.272425 | 4,816 | 144 | 168 | 33.444444 | 0.730023 | 0.017027 | 0 | 0.294643 | 0 | 0 | 0.045032 | 0 | 0 | 0 | 0.010782 | 0.006944 | 0 | 1 | 0.196429 | false | 0 | 0.026786 | 0.107143 | 0.5625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
1164cff7b0c7f2293faa282f7854f43009c2e23c | 2,634 | py | Python | predict_main.py | kashifcap/image_captioning | 233ff629eb7424eea88bd49b4b9d701f247dc111 | [
"MIT"
] | null | null | null | predict_main.py | kashifcap/image_captioning | 233ff629eb7424eea88bd49b4b9d701f247dc111 | [
"MIT"
] | null | null | null | predict_main.py | kashifcap/image_captioning | 233ff629eb7424eea88bd49b4b9d701f247dc111 | [
"MIT"
] | null | null | null | # %%
# Importing generic python libraries
import string
import os
import math
import glob
import numpy as np
from numpy import array
import pandas as pd
import matplotlib.pyplot as plt
from time import time
# Importing libraries for image manipulation, deep-learning and pickling
from PIL import Image, ImageOps
from p... | 32.121951 | 150 | 0.779043 | 344 | 2,634 | 5.869186 | 0.450581 | 0.071322 | 0.043586 | 0.027737 | 0.037642 | 0.037642 | 0 | 0 | 0 | 0 | 0 | 0.012993 | 0.15262 | 2,634 | 82 | 151 | 32.121951 | 0.891577 | 0.257403 | 0 | 0 | 0 | 0 | 0.057762 | 0.051573 | 0 | 0 | 0 | 0 | 0 | 1 | 0.02381 | false | 0 | 0.714286 | 0 | 0.738095 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
febd2fb77dd6246269157666b39569c865df1427 | 4,132 | py | Python | accounts/tests/tests_signup.py | oratosquilla-oratoria/django-blog | a821530ecabb3ab16d770d04c32c97db9d279177 | [
"MIT"
] | null | null | null | accounts/tests/tests_signup.py | oratosquilla-oratoria/django-blog | a821530ecabb3ab16d770d04c32c97db9d279177 | [
"MIT"
] | null | null | null | accounts/tests/tests_signup.py | oratosquilla-oratoria/django-blog | a821530ecabb3ab16d770d04c32c97db9d279177 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import resolve, reverse
from ..forms import SignUpForm
from ..views import SignUpView
class SignUpFormTest(TestCase):
def test_form_has_fields(self):
"""Tests if the form contains all the necessary fields"""
... | 36.892857 | 72 | 0.651258 | 488 | 4,132 | 5.368852 | 0.247951 | 0.064886 | 0.096183 | 0.064122 | 0.439313 | 0.361832 | 0.298473 | 0.251145 | 0.200763 | 0.167176 | 0 | 0.01643 | 0.234027 | 4,132 | 111 | 73 | 37.225225 | 0.811374 | 0.167473 | 0 | 0.246575 | 0 | 0 | 0.098204 | 0 | 0 | 0 | 0 | 0 | 0.232877 | 1 | 0.219178 | false | 0.082192 | 0.068493 | 0 | 0.342466 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
fed8e8b19e0b20a7818d74d02ccd0fe62fa3956a | 972 | py | Python | story.py | jonodrew/story_generator_p | 59f287290635f7bff2f7b86ddb9d226dde5dae1e | [
"Unlicense"
] | null | null | null | story.py | jonodrew/story_generator_p | 59f287290635f7bff2f7b86ddb9d226dde5dae1e | [
"Unlicense"
] | null | null | null | story.py | jonodrew/story_generator_p | 59f287290635f7bff2f7b86ddb9d226dde5dae1e | [
"Unlicense"
] | null | null | null | from flask import Flask
from faker import Faker
from faker.providers import company, job, person, geo
app = Flask(__name__)
@app.route('/')
def story():
fake = Faker()
mystory = "<html><body><p>In a(n) " + fake.company()
mystory = mystory + " a young "
mystory = mystory + fake.language_name()
... | 30.375 | 64 | 0.627572 | 120 | 972 | 5.016667 | 0.416667 | 0.372093 | 0.209302 | 0.083056 | 0.066445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.245885 | 972 | 31 | 65 | 31.354839 | 0.821282 | 0 | 0 | 0 | 0 | 0 | 0.203913 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04 | false | 0 | 0.12 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
fedde04a6b3f2b92694812b25ef8e4885694fa8a | 5,220 | py | Python | backend/app/settings.py | sudipbhujel/election | fae1cd97e93e18d96d26e46ed57649160b0e4335 | [
"MIT"
] | 3 | 2021-04-07T08:33:39.000Z | 2021-07-29T03:28:24.000Z | backend/app/settings.py | sudipbhujel/election | fae1cd97e93e18d96d26e46ed57649160b0e4335 | [
"MIT"
] | null | null | null | backend/app/settings.py | sudipbhujel/election | fae1cd97e93e18d96d26e46ed57649160b0e4335 | [
"MIT"
] | 4 | 2021-04-11T14:07:52.000Z | 2021-07-29T03:28:26.000Z | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from datetime impo... | 26.497462 | 140 | 0.676245 | 564 | 5,220 | 6.106383 | 0.416667 | 0.05662 | 0.034843 | 0.050813 | 0.141115 | 0.122822 | 0.077526 | 0.077526 | 0.034843 | 0 | 0 | 0.006779 | 0.18046 | 5,220 | 197 | 141 | 26.497462 | 0.79827 | 0.199042 | 0 | 0.016 | 1 | 0 | 0.483886 | 0.310005 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.064 | 0.032 | 0 | 0.032 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
fedfd3c2009606f4bff03b23fc21584de132dc8e | 1,380 | py | Python | src/ayeauth/models/user.py | ayeama/ayeauth | 5d8d999a2014e1df399e97a0ae6343a7434f7e80 | [
"MIT"
] | null | null | null | src/ayeauth/models/user.py | ayeama/ayeauth | 5d8d999a2014e1df399e97a0ae6343a7434f7e80 | [
"MIT"
] | 7 | 2020-05-09T10:58:33.000Z | 2020-05-31T05:04:30.000Z | src/ayeauth/models/user.py | ayeama/ayeauth | 5d8d999a2014e1df399e97a0ae6343a7434f7e80 | [
"MIT"
] | null | null | null | from flask_login import AnonymousUserMixin
from flask_login import UserMixin as BaseUserMixin
from werkzeug.datastructures import ImmutableList
from ayeauth import db
from ayeauth.auth.password import hash_password
from ayeauth.models import BaseModel
class UserMixin(BaseUserMixin):
@property
def is_active(s... | 26.538462 | 83 | 0.687681 | 157 | 1,380 | 5.847134 | 0.356688 | 0.035948 | 0.03268 | 0.043573 | 0.111111 | 0.069717 | 0 | 0 | 0 | 0 | 0 | 0.005535 | 0.214493 | 1,380 | 51 | 84 | 27.058824 | 0.841328 | 0 | 0 | 0.052632 | 0 | 0 | 0.05942 | 0.02029 | 0 | 0 | 0 | 0 | 0 | 1 | 0.157895 | false | 0.105263 | 0.157895 | 0.078947 | 0.684211 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
fedfe519997357cc7e205716f67b06182af75e63 | 489 | py | Python | subtools/exceptions.py | huimingz/subtools | 185aff705f3730bac5e4d1725c5d24c549e8b0e4 | [
"MIT"
] | 4 | 2017-11-27T15:18:33.000Z | 2018-07-27T06:30:23.000Z | subtools/exceptions.py | Kairu-Madigan/subtools | 185aff705f3730bac5e4d1725c5d24c549e8b0e4 | [
"MIT"
] | 1 | 2021-06-01T22:06:59.000Z | 2021-06-01T22:06:59.000Z | subtools/exceptions.py | huimingz/subtools | 185aff705f3730bac5e4d1725c5d24c549e8b0e4 | [
"MIT"
] | 1 | 2017-11-27T08:37:35.000Z | 2017-11-27T08:37:35.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# author: "Kairu"
# contact:
# date: "2017/11/17"
class PySubError(Exception):
"""基本错误类型"""
pass
class SubFormatError(PySubError):
"""字幕格式错误"""
pass
class AssFilePathError(PySubError):
"""文件路径错误"""
pass
class AssParseError(P... | 15.774194 | 36 | 0.580777 | 44 | 489 | 6.454545 | 0.659091 | 0.158451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027473 | 0.255624 | 489 | 30 | 37 | 16.3 | 0.752747 | 0.278119 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
3a28966133648d4eb4cea0252a1dbeab49c15f27 | 216 | py | Python | python_agent/moveTurn.py | Idewan/KalahAI | b9012180702fcdcb53d13c4d332b8f99a0b2296a | [
"MIT"
] | null | null | null | python_agent/moveTurn.py | Idewan/KalahAI | b9012180702fcdcb53d13c4d332b8f99a0b2296a | [
"MIT"
] | null | null | null | python_agent/moveTurn.py | Idewan/KalahAI | b9012180702fcdcb53d13c4d332b8f99a0b2296a | [
"MIT"
] | null | null | null | class MoveTurn(object):
def __init__(self):
self.end = False
self.again = False
self.move = None
if __name__ == "__main__":
Print('This class has been checked and works as expected.') | 27 | 63 | 0.62963 | 28 | 216 | 4.428571 | 0.821429 | 0.145161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.268519 | 216 | 8 | 63 | 27 | 0.78481 | 0 | 0 | 0 | 0 | 0 | 0.267281 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0 | 0 | 0.285714 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a2e7a58098b267ac08371fbbd2c77db15f2c612 | 5,439 | py | Python | MDS_random_sampling.py | LCB0B/metric | 0686ce80326b60ddde77989b82c218d94a016cd2 | [
"MIT"
] | null | null | null | MDS_random_sampling.py | LCB0B/metric | 0686ce80326b60ddde77989b82c218d94a016cd2 | [
"MIT"
] | null | null | null | MDS_random_sampling.py | LCB0B/metric | 0686ce80326b60ddde77989b82c218d94a016cd2 | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from copy import deepcopy
# Import all the packages
import torch
from torch.autograd import Variable
import torch.nn as nn
import numpy as np
import torch.optim as optim
import torch.nn.functional as f# create a dummy data
import matplotlib.pyplot as plt
import networkx as nx
i... | 43.512 | 211 | 0.688178 | 776 | 5,439 | 4.640464 | 0.251289 | 0.044988 | 0.043321 | 0.018884 | 0.312969 | 0.24882 | 0.199111 | 0.154679 | 0.117745 | 0.069981 | 0 | 0.011073 | 0.202978 | 5,439 | 124 | 212 | 43.862903 | 0.819608 | 0.326898 | 0 | 0.103448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.103448 | false | 0 | 0.310345 | 0.017241 | 0.517241 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
3a483c19268ec63170cdae11c5bf074a073956dc | 489 | py | Python | mmdet/core/bbox/assigners/__init__.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | 1 | 2020-03-13T08:37:35.000Z | 2020-03-13T08:37:35.000Z | mmdet/core/bbox/assigners/__init__.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/assigners/__init__.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | null | null | null | from .approx_max_iou_assigner import ApproxMaxIoUAssigner
from .assign_result import AssignResult
from .base_assigner import BaseAssigner
from .max_iou_assigner import MaxIoUAssigner
from .point_assigner import PointAssigner
from .max_iou_assigner_coeff import MaxIoUAssigner_coeff
from .max_iou_ud_assigner import MaxIo... | 37.615385 | 77 | 0.840491 | 52 | 489 | 7.519231 | 0.365385 | 0.179028 | 0.107417 | 0.102302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09816 | 489 | 12 | 78 | 40.75 | 0.886621 | 0 | 0 | 0 | 0 | 0 | 0.218814 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.636364 | 0 | 0.636364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
3a4e5a4c8c6d533507fa2336fb73e116e3cda8cb | 1,188 | py | Python | Week2/3 - Min Stack/Solution.py | SaiLikhith7/Leetcode-30-Day-Challenge-April | a8049571ed02e890a05f1004143e8f796b94c01b | [
"MIT"
] | null | null | null | Week2/3 - Min Stack/Solution.py | SaiLikhith7/Leetcode-30-Day-Challenge-April | a8049571ed02e890a05f1004143e8f796b94c01b | [
"MIT"
] | null | null | null | Week2/3 - Min Stack/Solution.py | SaiLikhith7/Leetcode-30-Day-Challenge-April | a8049571ed02e890a05f1004143e8f796b94c01b | [
"MIT"
] | null | null | null | #
# Created on Fri Apr 10 2020
#
# Title: Leetcode - Min Stack
#
# Author: Vatsal Mistry
# Web: mistryvatsal.github.io
#
class MinStack:
def __init__(self):
# Creating 2 stacks, stack : original data; currMinimum : to hold current minimum upon each push
self.stack = list()
self.currMinimum ... | 27 | 104 | 0.5867 | 157 | 1,188 | 4.401274 | 0.401274 | 0.217077 | 0.069465 | 0.05644 | 0.188133 | 0.188133 | 0 | 0 | 0 | 0 | 0 | 0.019953 | 0.282828 | 1,188 | 44 | 105 | 27 | 0.79108 | 0.288721 | 0 | 0.190476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.238095 | false | 0 | 0 | 0 | 0.380952 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a50b5b95bc739d344a6cb77e019bdba1fc23ffd | 1,674 | py | Python | app/__main__.py | LostLuma/repo-import-test | 45273fc3543d21366ed3cc5007dc5680b1e3e546 | [
"MIT"
] | null | null | null | app/__main__.py | LostLuma/repo-import-test | 45273fc3543d21366ed3cc5007dc5680b1e3e546 | [
"MIT"
] | null | null | null | app/__main__.py | LostLuma/repo-import-test | 45273fc3543d21366ed3cc5007dc5680b1e3e546 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2018 Samuel Riches
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy... | 34.163265 | 84 | 0.795102 | 239 | 1,674 | 5.506276 | 0.556485 | 0.066869 | 0.019757 | 0.037994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027235 | 0.144564 | 1,674 | 48 | 85 | 34.875 | 0.89176 | 0.65233 | 0 | 0 | 0 | 0 | 0.137631 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4375 | 0 | 0.4375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
3a53da6e86d78573be2e3f866d87c706d51d6189 | 569 | py | Python | machlearn/naive_bayes/__init__.py | daniel-yj-yang/pyml | 2328ae1d73eab39f2774331fcfaa10e8fa2fc0de | [
"BSD-3-Clause"
] | 2 | 2020-11-18T13:25:25.000Z | 2020-11-18T13:25:27.000Z | machlearn/naive_bayes/__init__.py | daniel-yj-yang/pyml | 2328ae1d73eab39f2774331fcfaa10e8fa2fc0de | [
"BSD-3-Clause"
] | null | null | null | machlearn/naive_bayes/__init__.py | daniel-yj-yang/pyml | 2328ae1d73eab39f2774331fcfaa10e8fa2fc0de | [
"BSD-3-Clause"
] | 2 | 2020-11-18T04:46:07.000Z | 2020-11-25T16:19:39.000Z | # -*- coding: utf-8 -*-
# Author: Daniel Yang <daniel.yj.yang@gmail.com>
#
# License: BSD 3 clause
from ._naive_bayes import Bernoulli_NB_classifier, Multinomial_NB_classifier, Gaussian_NB_classifier, demo
from ._naive_bayes import Multinomial_NB_classifier_from_scratch, demo_from_scratch
# this is for "from <packag... | 33.470588 | 106 | 0.727592 | 69 | 569 | 5.507246 | 0.434783 | 0.252632 | 0.242105 | 0.105263 | 0.615789 | 0.615789 | 0.615789 | 0.615789 | 0.357895 | 0.357895 | 0 | 0.004283 | 0.179262 | 569 | 16 | 107 | 35.5625 | 0.809422 | 0.254833 | 0 | 0 | 0 | 0 | 0.308612 | 0.258373 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a58d4aee94267ef7f594d426fd936cf5f8d422b | 381 | py | Python | Insertion Sort.py | MichaelWiciak/SortingAlgorithms | f3c83a59d302ff4795ac72c93a0269ef0de113b9 | [
"MIT"
] | null | null | null | Insertion Sort.py | MichaelWiciak/SortingAlgorithms | f3c83a59d302ff4795ac72c93a0269ef0de113b9 | [
"MIT"
] | null | null | null | Insertion Sort.py | MichaelWiciak/SortingAlgorithms | f3c83a59d302ff4795ac72c93a0269ef0de113b9 | [
"MIT"
] | null | null | null | def insertionSort(aList):
first = 0
last = len(aList)-1
for CurrentPointer in range(first+1, last+1):
CurrentValue = aList[CurrentPointer]
Pointer = CurrentPointer - 1
while aList[Pointer] > CurrentValue and Pointer >= 0:
aList[Pointer+1] = aList[Pointer]
... | 31.75 | 62 | 0.593176 | 41 | 381 | 5.512195 | 0.390244 | 0.212389 | 0.115044 | 0.176991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034221 | 0.309711 | 381 | 11 | 63 | 34.636364 | 0.825095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0 | 0.1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a58ec4adf9925dd59ed003485fdc3d5bba2d64e | 717 | py | Python | Recursion_DynamicP/paint_fill.py | Randyjp/python_algorithms | 3271cf700ff1d8c38b0c32eba1f92cd8c49b27d9 | [
"MIT"
] | null | null | null | Recursion_DynamicP/paint_fill.py | Randyjp/python_algorithms | 3271cf700ff1d8c38b0c32eba1f92cd8c49b27d9 | [
"MIT"
] | null | null | null | Recursion_DynamicP/paint_fill.py | Randyjp/python_algorithms | 3271cf700ff1d8c38b0c32eba1f92cd8c49b27d9 | [
"MIT"
] | null | null | null | # 8.10) Implement a function to fill a matrix with a new color given a point and the matrix
def paint_fill(matrix, y, x, new_color):
# print(x, y)
len_x = len(matrix[0]) - 1
len_y = len(matrix[0][0]) - 1
if y < 0 or y > len_y or x < 0 or x > len_x:
return
if matrix[y][x] == new_color:
... | 26.555556 | 91 | 0.6053 | 135 | 717 | 3.088889 | 0.318519 | 0.172662 | 0.215827 | 0.191847 | 0.386091 | 0.2494 | 0.2494 | 0.2494 | 0.2494 | 0.2494 | 0 | 0.033962 | 0.260809 | 717 | 26 | 92 | 27.576923 | 0.75283 | 0.20781 | 0 | 0.125 | 0 | 0 | 0.016014 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0 | 0 | 0.1875 | 0.0625 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a5aa7a7805f0fdf246b8e16408ffa480f713c2f | 8,337 | py | Python | eylang/eylangparser.py | bxtkezhan/eylang | 899154f89359df30988a1c76caeb7d8921dbe3eb | [
"MIT"
] | 4 | 2019-04-24T20:28:00.000Z | 2019-11-02T10:14:02.000Z | eylang/eylangparser.py | bxtkezhan/Dragon | 899154f89359df30988a1c76caeb7d8921dbe3eb | [
"MIT"
] | null | null | null | eylang/eylangparser.py | bxtkezhan/Dragon | 899154f89359df30988a1c76caeb7d8921dbe3eb | [
"MIT"
] | 3 | 2019-05-23T01:56:58.000Z | 2019-06-12T14:11:57.000Z | from eylanglexer import reserved
from eylanglexer import rules as lex_rules
from eylanginterpreter import *
from rply import ParserGenerator
EYLANG_VARS = EylangVars()
pg = ParserGenerator(
list(reserved.values()) + [name for name, _ in lex_rules],
precedence=[
('left', ['AND', 'OR', 'NOT']),
... | 28.070707 | 88 | 0.634401 | 1,257 | 8,337 | 4.151154 | 0.098648 | 0.209276 | 0.039862 | 0.024147 | 0.503258 | 0.376006 | 0.267727 | 0.197585 | 0.168455 | 0.125335 | 0 | 0.020608 | 0.190956 | 8,337 | 296 | 89 | 28.165541 | 0.753002 | 0.011035 | 0 | 0.213439 | 0 | 0 | 0.284189 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.185771 | false | 0 | 0.01581 | 0.114625 | 0.407115 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
28bcaa1ac15b3db94c9394ad8bffc1fd508444f9 | 228 | py | Python | read_write_using_with_as.py | snalahi/Python-Functions-Files-and-Dictionaries | c86cb4a8e058244567c3d75491820c77ef3ce6e5 | [
"MIT"
] | 1 | 2021-06-07T14:07:05.000Z | 2021-06-07T14:07:05.000Z | read_write_using_with_as.py | snalahi/Python-Functions-Files-and-Dictionaries | c86cb4a8e058244567c3d75491820c77ef3ce6e5 | [
"MIT"
] | null | null | null | read_write_using_with_as.py | snalahi/Python-Functions-Files-and-Dictionaries | c86cb4a8e058244567c3d75491820c77ef3ce6e5 | [
"MIT"
] | null | null | null | fname = 'mydata.txt'
with open(fname, 'r') as md:
for line in md:
print(line)
# continue on with other code
fname = 'mydata2.txt'
with open(fname, 'w') as wr:
for i in range (20):
wr.write(str(i) + '\n')
| 22.8 | 31 | 0.583333 | 39 | 228 | 3.410256 | 0.641026 | 0.105263 | 0.165414 | 0.240602 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017751 | 0.258772 | 228 | 9 | 32 | 25.333333 | 0.769231 | 0.118421 | 0 | 0 | 0 | 0 | 0.125628 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
28c36ea279e104daf592ff3b0232bdb41983293e | 634 | py | Python | djangopypi2/apps/pypi_frontend/models.py | MediaMath/djangopypi2 | 5d6f203b35378f140cd3791db81115aa722e5ee2 | [
"BSD-3-Clause"
] | 12 | 2015-03-27T22:45:21.000Z | 2017-09-13T03:18:12.000Z | djangopypi2/apps/pypi_frontend/models.py | MediaMath/djangopypi2 | 5d6f203b35378f140cd3791db81115aa722e5ee2 | [
"BSD-3-Clause"
] | 4 | 2015-12-09T20:28:21.000Z | 2019-07-05T03:23:34.000Z | djangopypi2/apps/pypi_frontend/models.py | MediaMath/djangopypi2 | 5d6f203b35378f140cd3791db81115aa722e5ee2 | [
"BSD-3-Clause"
] | 14 | 2015-01-13T15:41:42.000Z | 2020-08-07T20:17:54.000Z | from django.db import models
from django.utils.translation import ugettext_lazy as _
class MirrorSite(models.Model):
enabled = models.BooleanField(default=False)
name = models.CharField(max_length=64)
url = models.CharField(max_length=255, unique=True)
def __unicode__(self):
return self.name
... | 28.818182 | 68 | 0.719243 | 79 | 634 | 5.531646 | 0.594937 | 0.102975 | 0.12357 | 0.16476 | 0.10984 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015564 | 0.189274 | 634 | 21 | 69 | 30.190476 | 0.83463 | 0 | 0 | 0.125 | 0 | 0 | 0.01735 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0.125 | 0.9375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
28c598e0020a4d2d823b498ab77301890926e5e5 | 544 | py | Python | src/pid.py | TamasSzepessy/DJITelloOpticalControl | 00b704afea1eb9e2bcb82fcde41baae83934c48e | [
"MIT"
] | 21 | 2020-01-08T04:40:48.000Z | 2022-03-28T21:16:35.000Z | pid.py | alijafari79/DJITelloOpticalControl | 50ab8883fcb3c8520cac14ee0c05e9050b9387c8 | [
"MIT"
] | null | null | null | pid.py | alijafari79/DJITelloOpticalControl | 50ab8883fcb3c8520cac14ee0c05e9050b9387c8 | [
"MIT"
] | 3 | 2021-01-17T19:11:51.000Z | 2021-10-30T03:26:05.000Z | class PID(object):
def __init__(self, kp, ki, kd):
self.kp = kp
self.ki = ki
self.kd = kd
self.error_int = 0
self.error_prev = None
def control(self, error):
self.error_int += error
if self.error_prev is None:
self.error_prev = error
e... | 28.631579 | 75 | 0.579044 | 78 | 544 | 3.833333 | 0.25641 | 0.331104 | 0.26087 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005464 | 0.327206 | 544 | 19 | 76 | 28.631579 | 0.811475 | 0 | 0 | 0.352941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.176471 | false | 0 | 0 | 0 | 0.294118 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
28d785a9a90e17a1d6a61189106140fb56ac8212 | 508 | py | Python | huoguoml/util/json.py | huoguoml/huoguoml | 749b0b2a24ddcf1ab34c36267eae7a2427b907f4 | [
"Apache-2.0"
] | 5 | 2021-08-02T16:35:29.000Z | 2022-03-28T13:07:38.000Z | huoguoml/util/json.py | huoguoml/huoguoml | 749b0b2a24ddcf1ab34c36267eae7a2427b907f4 | [
"Apache-2.0"
] | 12 | 2021-07-03T19:00:07.000Z | 2021-07-11T17:26:47.000Z | huoguoml/util/json.py | huoguoml/huoguoml | 749b0b2a24ddcf1ab34c36267eae7a2427b907f4 | [
"Apache-2.0"
] | null | null | null | """
The huoguoml.util.string module contains some utility functions for json operations.
"""
import json
from typing import Any
def read_json(json_path: str) -> Any:
"""Read a json file and return the content. Returns None if not exist
"""
with open(json_path) as json_file:
data = json.load(json_f... | 24.190476 | 84 | 0.67126 | 78 | 508 | 4.24359 | 0.5 | 0.120846 | 0.072508 | 0.090634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.228346 | 508 | 20 | 85 | 25.4 | 0.844388 | 0.366142 | 0 | 0 | 0 | 0 | 0.003289 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.222222 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
28eb714771d9076b8e0935222ef1139a2f907be1 | 153 | py | Python | mallenom/reports/urls.py | crowmurk/mallenom | c85bba2e657965879e6fac18bb762ca739ff4d98 | [
"MIT"
] | null | null | null | mallenom/reports/urls.py | crowmurk/mallenom | c85bba2e657965879e6fac18bb762ca739ff4d98 | [
"MIT"
] | 9 | 2020-02-12T01:04:30.000Z | 2022-02-10T09:22:09.000Z | mallenom/reports/urls.py | crowmurk/mallenom | c85bba2e657965879e6fac18bb762ca739ff4d98 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'reports'
urlpatterns = [
path('', views.ReportDownload.as_view(), name='report'),
]
| 13.909091 | 60 | 0.686275 | 19 | 153 | 5.421053 | 0.736842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.169935 | 153 | 10 | 61 | 15.3 | 0.811024 | 0 | 0 | 0 | 0 | 0 | 0.084967 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
e900bb00b3d9ba4b9bee5e1647de6700c99f19a7 | 722 | py | Python | eqbtest/util/data/regen.py | cryptotechguru/tesseract | 9b64c61483710c94390404c3d920c1059cbfcda7 | [
"MIT"
] | null | null | null | eqbtest/util/data/regen.py | cryptotechguru/tesseract | 9b64c61483710c94390404c3d920c1059cbfcda7 | [
"MIT"
] | 11 | 2019-04-23T20:37:03.000Z | 2021-08-11T11:03:13.000Z | eqbtest/util/data/regen.py | cryptotechguru/tesseract | 9b64c61483710c94390404c3d920c1059cbfcda7 | [
"MIT"
] | null | null | null | import os
import json
raw_data = open("bitcoin-util-test.json").read()
input_data = json.loads(raw_data)
for testObj in input_data:
inp = ""
out = ""
args = " ".join(testObj['args'])
if 'input' in testObj:
inp = testObj['input']
if 'output_cmp' in testObj:
out = testObj['output_... | 27.769231 | 93 | 0.49723 | 83 | 722 | 4.253012 | 0.361446 | 0.135977 | 0.15864 | 0.226629 | 0.402266 | 0.402266 | 0.393768 | 0 | 0 | 0 | 0 | 0 | 0.272853 | 722 | 25 | 94 | 28.88 | 0.672381 | 0.304709 | 0 | 0 | 0 | 0 | 0.180723 | 0.094378 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.058824 | 0.117647 | 0 | 0.117647 | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
e908ab79c220c70a539792113ab957b27c6fca1e | 18,748 | py | Python | dbmanage/myapp/templates/include/pagejump/bak/function.py | bopopescu/sbdb_new | 52d57f2dd6e553f60a06c97e7a8631d41f8f2ea6 | [
"Apache-2.0"
] | 3 | 2018-01-13T14:56:07.000Z | 2019-04-20T06:11:03.000Z | dbmanage/myapp/templates/include/pagejump/bak/function.py | bopopescu/sbdb_new | 52d57f2dd6e553f60a06c97e7a8631d41f8f2ea6 | [
"Apache-2.0"
] | null | null | null | dbmanage/myapp/templates/include/pagejump/bak/function.py | bopopescu/sbdb_new | 52d57f2dd6e553f60a06c97e7a8631d41f8f2ea6 | [
"Apache-2.0"
] | 1 | 2020-07-22T02:37:30.000Z | 2020-07-22T02:37:30.000Z | #!/bin/env python
#-*-coding:utf-8-*-
import MySQLdb,sys,string,time,datetime,uuid
from django.contrib.auth.models import User,Permission,ContentType,Group
from myapp.models import Db_name,Db_account,Db_instance,Oper_log,Login_log,Db_group
from dbmanage.myapp.form import LoginForm,Captcha
reload(sys)
sys.setdefaultenc... | 35.306968 | 169 | 0.62204 | 2,438 | 18,748 | 4.634126 | 0.132896 | 0.017702 | 0.018587 | 0.029209 | 0.532749 | 0.478049 | 0.431227 | 0.369623 | 0.337759 | 0.312445 | 0 | 0.005202 | 0.241306 | 18,748 | 530 | 170 | 35.373585 | 0.789089 | 0.108598 | 0 | 0.442308 | 0 | 0.021635 | 0.085706 | 0.009309 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.050481 | 0.021635 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
e90b4086e9db3f0b3a375c307757f9134b7204de | 278 | py | Python | oands/forms.py | PARAVPREET17/OCR_WEB_APP | abe827a91035abe7f532df1811f20750cb6d52ce | [
"MIT"
] | null | null | null | oands/forms.py | PARAVPREET17/OCR_WEB_APP | abe827a91035abe7f532df1811f20750cb6d52ce | [
"MIT"
] | 1 | 2021-09-13T06:23:35.000Z | 2021-09-13T06:23:35.000Z | oands/forms.py | PARAVPREET17/OCR_WEB_APP | abe827a91035abe7f532df1811f20750cb6d52ce | [
"MIT"
] | null | null | null | from django import forms
from .models import Ocr,Contact
class ImageUpload(forms.ModelForm):
class Meta:
model = Ocr
fields = ['image']
class ContactForm(forms.ModelForm):
class Meta:
model=Contact
fields=['name', 'email', 'message']
| 18.533333 | 43 | 0.640288 | 31 | 278 | 5.741935 | 0.580645 | 0.157303 | 0.213483 | 0.258427 | 0.314607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.251799 | 278 | 14 | 44 | 19.857143 | 0.855769 | 0 | 0 | 0.2 | 0 | 0 | 0.07554 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
e913f40f2dc481ee0a80008a4315bfff04d5c2c0 | 228 | py | Python | pydis_site/constants.py | hannah-m-moore/site | b2f12acc82556b8d7a8ab1f60770b8325b8f3c38 | [
"MIT"
] | 700 | 2018-11-17T15:56:51.000Z | 2022-03-30T22:53:17.000Z | pydis_site/constants.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 542 | 2018-11-17T13:39:42.000Z | 2022-03-31T11:24:00.000Z | pydis_site/constants.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 178 | 2018-11-21T09:06:56.000Z | 2022-03-31T07:43:28.000Z | import os
GIT_SHA = os.environ.get("GIT_SHA", "development")
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN")
# How long to wait for synchronous requests before timing out
TIMEOUT_PERIOD = int(os.environ.get("TIMEOUT_PERIOD", 5))
| 32.571429 | 61 | 0.767544 | 36 | 228 | 4.694444 | 0.638889 | 0.159763 | 0.213018 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004926 | 0.109649 | 228 | 6 | 62 | 38 | 0.827586 | 0.258772 | 0 | 0 | 0 | 0 | 0.263473 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
e9214355d8ab4997ce1dc691f925d65e2d634a9a | 216 | py | Python | kafka/consumers.py | anderscui/nlpy3 | f9d927ea4cf1767eb4c21f1ad9ca3b061d5d16e8 | [
"MIT"
] | null | null | null | kafka/consumers.py | anderscui/nlpy3 | f9d927ea4cf1767eb4c21f1ad9ca3b061d5d16e8 | [
"MIT"
] | null | null | null | kafka/consumers.py | anderscui/nlpy3 | f9d927ea4cf1767eb4c21f1ad9ca3b061d5d16e8 | [
"MIT"
] | null | null | null | # coding=utf-8
from kafka import KafkaConsumer
consumer = KafkaConsumer('CDC', bootstrap_servers='ec2-54-223-226-77.cn-north-1.compute.amazonaws.com.cn:9092', group_id='cdcgrp')
for msg in consumer:
print(msg)
| 27 | 130 | 0.75463 | 34 | 216 | 4.735294 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.087629 | 0.101852 | 216 | 7 | 131 | 30.857143 | 0.742268 | 0.055556 | 0 | 0 | 0 | 0.25 | 0.331683 | 0.287129 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0.25 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
e92cda2c8f63379d5b6e9edae4489d1e39a0d634 | 166 | py | Python | MITx6.00/pset1e2.py | dpanayotov/CS1314 | 8f5318c18fd2ea3aaec622eb5eb4d021065fc141 | [
"Apache-2.0"
] | null | null | null | MITx6.00/pset1e2.py | dpanayotov/CS1314 | 8f5318c18fd2ea3aaec622eb5eb4d021065fc141 | [
"Apache-2.0"
] | null | null | null | MITx6.00/pset1e2.py | dpanayotov/CS1314 | 8f5318c18fd2ea3aaec622eb5eb4d021065fc141 | [
"Apache-2.0"
] | null | null | null | s = 'azcbobobegghakl'
sub = 'bob'
count = 0
for i in range(0, len(s)):
if sub in s[i:i+3]:
count+=1
print "Number of times bob occurs is: " + str(count)
| 18.444444 | 52 | 0.590361 | 31 | 166 | 3.16129 | 0.677419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032258 | 0.253012 | 166 | 8 | 53 | 20.75 | 0.758065 | 0 | 0 | 0 | 0 | 0 | 0.295181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.142857 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
e93d752ab220da597cf6043df9542f8391127f83 | 1,387 | py | Python | myproject/boards/tests/test_templatetags.py | xiaohui100/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | null | null | null | myproject/boards/tests/test_templatetags.py | xiaohui100/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | 3 | 2020-06-05T18:11:15.000Z | 2021-06-10T20:18:28.000Z | myproject/boards/tests/test_templatetags.py | Alfonsxh/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@author: Alfons
@contact: alfons_xh@163.com
@file: test_templatetags.py
@time: 18-3-25 上午11:38
@version: v1.0
"""
from django import forms
from django.test import TestCase
from ..templatetags.form_tags import field_type, input_class
class ExampleForm(forms.Form):
name ... | 32.255814 | 92 | 0.68349 | 169 | 1,387 | 5.467456 | 0.366864 | 0.103896 | 0.082251 | 0.116883 | 0.285714 | 0.285714 | 0.214286 | 0.125541 | 0.125541 | 0.125541 | 0 | 0.018229 | 0.16943 | 1,387 | 42 | 93 | 33.02381 | 0.783854 | 0.152848 | 0 | 0.083333 | 0 | 0 | 0.146174 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.166667 | false | 0.25 | 0.125 | 0 | 0.541667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
3a5d43a45aa5c5f984d90cf4cd0fff59e0b06e9a | 78 | py | Python | login.py | changyuejia/PY04 | c1d1493988b991803d04d4a85325e4e45cf56735 | [
"MIT"
] | 1 | 2019-05-13T12:28:43.000Z | 2019-05-13T12:28:43.000Z | login.py | changyuejia/PY04 | c1d1493988b991803d04d4a85325e4e45cf56735 | [
"MIT"
] | null | null | null | login.py | changyuejia/PY04 | c1d1493988b991803d04d4a85325e4e45cf56735 | [
"MIT"
] | null | null | null | number1=10
number2=20
number4=40
number3=30
print('hello world')
print('镜湖')
| 9.75 | 20 | 0.74359 | 13 | 78 | 4.461538 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.171429 | 0.102564 | 78 | 7 | 21 | 11.142857 | 0.657143 | 0 | 0 | 0 | 0 | 0 | 0.168831 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a65e44f208a0550a7900155c9e81d64b8be3570 | 65 | py | Python | ABC181/ABC181_A.py | consommee/AtCoder | 9beccf6a1202ca48491b4fcf748aa3dba0f12fb3 | [
"MIT"
] | null | null | null | ABC181/ABC181_A.py | consommee/AtCoder | 9beccf6a1202ca48491b4fcf748aa3dba0f12fb3 | [
"MIT"
] | null | null | null | ABC181/ABC181_A.py | consommee/AtCoder | 9beccf6a1202ca48491b4fcf748aa3dba0f12fb3 | [
"MIT"
] | null | null | null | n=int(input())%2
if n==0:
print("White")
else:
print("Black") | 13 | 16 | 0.584615 | 12 | 65 | 3.166667 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035714 | 0.138462 | 65 | 5 | 17 | 13 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0.151515 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.4 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3a802e288d09056bad6109e54b5cda224d4269aa | 55 | py | Python | simplewrapmat/__init__.py | yasutow/simplewrapmat | 1f397c9a57874c2ba793b00ecc48f90ae194d82e | [
"MIT"
] | null | null | null | simplewrapmat/__init__.py | yasutow/simplewrapmat | 1f397c9a57874c2ba793b00ecc48f90ae194d82e | [
"MIT"
] | null | null | null | simplewrapmat/__init__.py | yasutow/simplewrapmat | 1f397c9a57874c2ba793b00ecc48f90ae194d82e | [
"MIT"
] | null | null | null | from .func import (
plot_X,
)
__version__='0.0.1'
| 9.166667 | 19 | 0.618182 | 9 | 55 | 3.222222 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069767 | 0.218182 | 55 | 5 | 20 | 11 | 0.604651 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3aa91b9eb5fc9c25bda50c0abf2a515e50fb4d44 | 378 | py | Python | kao_decorators/lazy_property.py | cloew/KaoDecorators | 53e591f21bd6064237198423bf72ba9474ec5a55 | [
"MIT"
] | null | null | null | kao_decorators/lazy_property.py | cloew/KaoDecorators | 53e591f21bd6064237198423bf72ba9474ec5a55 | [
"MIT"
] | null | null | null | kao_decorators/lazy_property.py | cloew/KaoDecorators | 53e591f21bd6064237198423bf72ba9474ec5a55 | [
"MIT"
] | null | null | null |
def lazy_property(fn):
""" Convert function into a property where the function is
only called the first time the property is accessed """
varName = "__{0}".format(fn.__name__)
def lazyLoad(self):
if not hasattr(self, varName):
setattr(self, varName, fn(self))
re... | 37.8 | 64 | 0.637566 | 47 | 378 | 4.978723 | 0.595745 | 0.141026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00361 | 0.267196 | 378 | 10 | 65 | 37.8 | 0.841155 | 0.283069 | 0 | 0 | 0 | 0 | 0.020325 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.