hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08fb860d2e9e761e9112c63f3e410424340adf91 | 19,561 | py | Python | reco_utils/recommender/sar/sar_singlenode.py | myknotruby/recommenders | d4a41de4e10cf0fa4db7f4e5c4d6bccc6629e201 | [
"MIT"
] | 3 | 2021-06-22T02:12:38.000Z | 2021-11-25T02:39:52.000Z | reco_utils/recommender/sar/sar_singlenode.py | myknotruby/recommenders | d4a41de4e10cf0fa4db7f4e5c4d6bccc6629e201 | [
"MIT"
] | null | null | null | reco_utils/recommender/sar/sar_singlenode.py | myknotruby/recommenders | d4a41de4e10cf0fa4db7f4e5c4d6bccc6629e201 | [
"MIT"
] | 2 | 2021-11-14T13:36:48.000Z | 2022-03-02T18:09:20.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import numpy as np
import pandas as pd
import logging
from scipy import sparse
from reco_utils.common.python_utils import (
jaccard,
lift,
exponential_decay,
get_top_k_scored_items,
rescale,
)
from reco_... | 37.047348 | 119 | 0.614437 |
import numpy as np
import pandas as pd
import logging
from scipy import sparse
from reco_utils.common.python_utils import (
jaccard,
lift,
exponential_decay,
get_top_k_scored_items,
rescale,
)
from reco_utils.common import constants
COOCCUR = "cooccurrence"
JACCARD = "jaccard"
LIFT = "lift"
lo... | true | true |
08fb8617192b3da98fa0775016cb26e0d18b049e | 2,774 | py | Python | src/you_get/extractor/acfun.py | wz520/you-get | 8a6b79ade0034bfbe033329df9f698307378fd03 | [
"MIT"
] | 1 | 2017-05-17T13:09:39.000Z | 2017-05-17T13:09:39.000Z | src/you_get/extractor/acfun.py | akkari/you-get | 6a4700a4eae7f6b1ade276df61eb65d99163dcb2 | [
"MIT"
] | null | null | null | src/you_get/extractor/acfun.py | akkari/you-get | 6a4700a4eae7f6b1ade276df61eb65d99163dcb2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__all__ = ['acfun_download']
from ..common import *
from .qq import qq_download_by_id
from .sina import sina_download_by_vid
from .tudou import tudou_download_by_iid
from .youku import youku_download_by_id
import json, re
def get_srt_json(id):
url = 'http://comment.acfun.com/%s.json' % id... | 37.486486 | 106 | 0.641673 |
__all__ = ['acfun_download']
from ..common import *
from .qq import qq_download_by_id
from .sina import sina_download_by_vid
from .tudou import tudou_download_by_iid
from .youku import youku_download_by_id
import json, re
def get_srt_json(id):
url = 'http://comment.acfun.com/%s.json' % id
return get_html(u... | true | true |
08fb872a38405165d7ac61a5c560b50d755b96cc | 423 | py | Python | beers/migrations/0016_beer_stem_and_stein_pk.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | beers/migrations/0016_beer_stem_and_stein_pk.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | beers/migrations/0016_beer_stem_and_stein_pk.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | # Generated by Django 2.1.7 on 2019-02-23 03:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("beers", "0015_auto_20190221_2323"),
]
operations = [
migrations.AddField(
model_name="beer",
name="stem_and_stein_pk... | 22.263158 | 82 | 0.619385 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("beers", "0015_auto_20190221_2323"),
]
operations = [
migrations.AddField(
model_name="beer",
name="stem_and_stein_pk",
field=models.PositiveIntegerField... | true | true |
08fb88aeb95558a587c16f5006079ddc0b2a87ff | 11,536 | py | Python | multislice/prop_utils.py | sajid-ali-nu/multislice | 1e36e067ff53809f4cc6286562b221c4bddbcb60 | [
"MIT"
] | 1 | 2019-01-12T22:41:21.000Z | 2019-01-12T22:41:21.000Z | multislice/prop_utils.py | sajid-ali-nu/multislice | 1e36e067ff53809f4cc6286562b221c4bddbcb60 | [
"MIT"
] | null | null | null | multislice/prop_utils.py | sajid-ali-nu/multislice | 1e36e067ff53809f4cc6286562b221c4bddbcb60 | [
"MIT"
] | null | null | null | import numpy as np
from multislice import prop
from .fft_utils import FFT_2d_Obj
import matplotlib.pyplot as plt
from tqdm import tqdm
import time
import numexpr as ne
from skimage.restoration import unwrap_phase
__all__ = ['modify',
'modify_two_materials_case_1',
'modify_two_materials_case_2',
... | 35.495385 | 327 | 0.619279 | import numpy as np
from multislice import prop
from .fft_utils import FFT_2d_Obj
import matplotlib.pyplot as plt
from tqdm import tqdm
import time
import numexpr as ne
from skimage.restoration import unwrap_phase
__all__ = ['modify',
'modify_two_materials_case_1',
'modify_two_materials_case_2',
... | true | true |
08fb88f76f2883942cfa3e4f16b787db614b4b40 | 9,048 | py | Python | t_system/motion/locking_system/collimator.py | sevgiun/T_System | 2664e38843c36578bfb6c61e2642b56bd537352a | [
"MIT"
] | 7 | 2019-11-06T10:00:39.000Z | 2021-06-29T20:31:54.000Z | t_system/motion/locking_system/collimator.py | sevgiun/T_System | 2664e38843c36578bfb6c61e2642b56bd537352a | [
"MIT"
] | 741 | 2019-11-01T11:23:33.000Z | 2022-03-31T13:49:17.000Z | t_system/motion/locking_system/collimator.py | sevgiun/T_System | 2664e38843c36578bfb6c61e2642b56bd537352a | [
"MIT"
] | 6 | 2019-11-01T11:49:27.000Z | 2022-03-18T03:04:16.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
.. module:: collimator
:platform: Unix
:synopsis: the top-level submodule of T_System that contains the classes related to collimator of T_System's Target Locking System.
.. moduleauthor:: Cem Baybars GÜÇLÜ <cem.baybars@gmail.com>
"""
import threading
from math ... | 39.510917 | 174 | 0.641689 |
import threading
from math import pi
from multipledispatch import dispatch
from t_system.motion.motor import ServoMotor, ExtServoMotor
from t_system.motion import degree_to_radian
from t_system import log_manager
logger = log_manager.get_logger(__name__, "DEBUG")
class Collimator:
def __init__(self, out_num... | true | true |
08fb8a10f3378688b494e2017b5dac109c0cbe39 | 327 | py | Python | django/tabletop/apps/worlds/apps.py | whutch/tabletop | ff8fc3c8f2e12d6344a0aac6cd95c8790c972976 | [
"MIT"
] | null | null | null | django/tabletop/apps/worlds/apps.py | whutch/tabletop | ff8fc3c8f2e12d6344a0aac6cd95c8790c972976 | [
"MIT"
] | null | null | null | django/tabletop/apps/worlds/apps.py | whutch/tabletop | ff8fc3c8f2e12d6344a0aac6cd95c8790c972976 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""App configuration for the worlds app."""
# Part of Tabletop (https://github.com/whutch/tabletop)
# :copyright: (c) 2018 Will Hutcheson
# :license: MIT (https://github.com/whutch/tabletop/blob/master/LICENSE.txt)
from django.apps import AppConfig
class WorldsConfig(AppConfig):
name = 'w... | 27.25 | 76 | 0.712538 |
from django.apps import AppConfig
class WorldsConfig(AppConfig):
name = 'worlds'
| true | true |
08fb8a425bcadeee9526298de1d3af798ef2de8e | 1,834 | py | Python | hw1/model.py | LeonardoEmili/Word-in-Context | b0bee917239847aaa514f8c252f1e1eb8b53c65e | [
"MIT"
] | 4 | 2022-01-24T19:04:03.000Z | 2022-01-27T16:55:49.000Z | hw1/model.py | LeonardoEmili/Word-in-Context | b0bee917239847aaa514f8c252f1e1eb8b53c65e | [
"MIT"
] | null | null | null | hw1/model.py | LeonardoEmili/Word-in-Context | b0bee917239847aaa514f8c252f1e1eb8b53c65e | [
"MIT"
] | null | null | null | from typing import List, Dict
class Model:
def predict(self, sentence_pairs: List[Dict]) -> List[str]:
"""
A simple wrapper for your model
Args:
sentence_pairs: list of dicts of strings. The outer list represents the samples, the inner one a dictionary with sentence pairs and ... | 47.025641 | 236 | 0.422574 | from typing import List, Dict
class Model:
def predict(self, sentence_pairs: List[Dict]) -> List[str]:
raise NotImplementedError
| true | true |
08fb8a968e2691f5cd90550641e33e06ff08f3fa | 16,323 | py | Python | ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py | nexr/ambari | 8452f207d7b9343a162698f2a2b79bf2c512e9d3 | [
"Apache-2.0"
] | 1 | 2015-05-04T12:19:05.000Z | 2015-05-04T12:19:05.000Z | ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py | nexr/ambari | 8452f207d7b9343a162698f2a2b79bf2c512e9d3 | [
"Apache-2.0"
] | null | null | null | ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py | nexr/ambari | 8452f207d7b9343a162698f2a2b79bf2c512e9d3 | [
"Apache-2.0"
] | 1 | 2021-01-07T08:55:01.000Z | 2021-01-07T08:55:01.000Z | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 32.975758 | 140 | 0.690988 |
import logging
import re
import time
from collections import namedtuple
logger = logging.getLogger()
AlertUri = namedtuple('AlertUri', 'uri is_ssl_enabled')
class BaseAlert(object):
RESULT_OK = "OK"
RESULT_WARNING = "WARNING"
RESULT_CRITICAL = "CRITICAL"
RESULT_UNKNOWN = "UNKNOWN"
RESULT_SKIPPED = "SKIPP... | true | true |
08fb8aef30b38618428125c942b572a989c06e8b | 10,819 | py | Python | src/pytypes/onefuzztypes/enums.py | tonybaloney/onefuzz | e0f2e9ed5aae006e0054387de7a0ff8c83c8f722 | [
"MIT"
] | 2,692 | 2020-09-15T17:54:21.000Z | 2022-03-31T11:58:57.000Z | src/pytypes/onefuzztypes/enums.py | tonybaloney/onefuzz | e0f2e9ed5aae006e0054387de7a0ff8c83c8f722 | [
"MIT"
] | 980 | 2020-09-18T18:23:01.000Z | 2022-03-30T22:20:43.000Z | src/pytypes/onefuzztypes/enums.py | nharper285/onefuzz | 1de2cc841d6fc885f8bcb6d032bf5b96ddb52493 | [
"MIT"
] | 177 | 2020-09-16T00:10:56.000Z | 2022-03-30T21:18:10.000Z | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from enum import Enum
from typing import List
class OS(Enum):
windows = "windows"
linux = "linux"
class DashboardEvent(Enum):
heartbeat = "heartbeat"
new_file = "new_file"
repro_state = "repro_state... | 26.13285 | 125 | 0.654774 |
from enum import Enum
from typing import List
class OS(Enum):
windows = "windows"
linux = "linux"
class DashboardEvent(Enum):
heartbeat = "heartbeat"
new_file = "new_file"
repro_state = "repro_state"
task_state = "task_state"
job_state = "job_state"
proxy_state = "proxy_state"
p... | true | true |
08fb8bed88bf7f994e43debf1a2b49b7dbe8f8b2 | 106 | py | Python | account_settings/apps.py | Vikku14/Dictionary | 68be8e7a683c35181e4f5d09360e8f4070e9692b | [
"BSD-3-Clause"
] | null | null | null | account_settings/apps.py | Vikku14/Dictionary | 68be8e7a683c35181e4f5d09360e8f4070e9692b | [
"BSD-3-Clause"
] | null | null | null | account_settings/apps.py | Vikku14/Dictionary | 68be8e7a683c35181e4f5d09360e8f4070e9692b | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class AccountSettingsConfig(AppConfig):
name = 'account_settings'
| 17.666667 | 39 | 0.792453 | from django.apps import AppConfig
class AccountSettingsConfig(AppConfig):
name = 'account_settings'
| true | true |
08fb8bee0c751182bcf6b4bb9408adbd9a9b520f | 2,331 | py | Python | examples/pfm_transform_deriv.py | CHEN-Zhaohui/geoist | 06a00db3e0ed3d92abf3e45b7b3bfbef6a858a5b | [
"MIT"
] | 53 | 2018-11-17T03:29:55.000Z | 2022-03-18T02:36:25.000Z | examples/pfm_transform_deriv.py | CHEN-Zhaohui/geoist | 06a00db3e0ed3d92abf3e45b7b3bfbef6a858a5b | [
"MIT"
] | 3 | 2018-11-28T11:37:51.000Z | 2019-01-30T01:52:45.000Z | examples/pfm_transform_deriv.py | CHEN-Zhaohui/geoist | 06a00db3e0ed3d92abf3e45b7b3bfbef6a858a5b | [
"MIT"
] | 35 | 2018-11-17T03:29:57.000Z | 2022-03-23T17:57:06.000Z | """
GravMag: Calculating the derivatives of the gravity anomaly using FFT
"""
import matplotlib.pyplot as plt
from geoist import gridder
from geoist.inversion import geometry
from geoist.pfm import prism, pftrans, giutils
from geoist.vis import giplt
model = [geometry.Prism(-1000, 1000, -1000, 1000, 0, 2000, {'density... | 31.08 | 78 | 0.706564 | import matplotlib.pyplot as plt
from geoist import gridder
from geoist.inversion import geometry
from geoist.pfm import prism, pftrans, giutils
from geoist.vis import giplt
model = [geometry.Prism(-1000, 1000, -1000, 1000, 0, 2000, {'density': 100})]
area = (-5000, 5000, -5000, 5000)
shape = (51, 51)
z0 = -500
xp, yp,... | true | true |
08fb8c3fbcf98450ef5b17af8169b3f05c00cdf7 | 4,045 | py | Python | nn_interpretability/interpretation/lrp/lrp_eps.py | miquelmn/nn_interpretability | 2b5d2b4102016189743e09f1f3a56f2ecddfde98 | [
"MIT"
] | 41 | 2020-10-13T18:46:32.000Z | 2022-02-21T15:52:50.000Z | nn_interpretability/interpretation/lrp/lrp_eps.py | miquelmn/nn_interpretability | 2b5d2b4102016189743e09f1f3a56f2ecddfde98 | [
"MIT"
] | 4 | 2021-07-11T12:38:03.000Z | 2022-03-08T14:47:38.000Z | nn_interpretability/interpretation/lrp/lrp_eps.py | miquelmn/nn_interpretability | 2b5d2b4102016189743e09f1f3a56f2ecddfde98 | [
"MIT"
] | 7 | 2020-10-21T13:03:16.000Z | 2022-03-07T11:45:00.000Z | import torch
import copy
import torch.nn as nn
import numpy as np
from torch.nn import Module
from torchvision.transforms import transforms
from nn_interpretability.interpretation.lrp.lrp_base import LRPBase
class LRPEpsilon(LRPBase):
"""
Implements the decision-based interpretability method "LRP-epsilon"
... | 44.450549 | 115 | 0.580964 | import torch
import copy
import torch.nn as nn
import numpy as np
from torch.nn import Module
from torchvision.transforms import transforms
from nn_interpretability.interpretation.lrp.lrp_base import LRPBase
class LRPEpsilon(LRPBase):
def __init__(self, model: Module, classes: [str], preprocess: transforms.Compo... | true | true |
08fb8c9b666dd796f9711a94a693f4ffb347cf68 | 8,210 | py | Python | doc/scripts/genrest/genrest.py | GilBenkoe/zephyr | ac661a077947b941e3ae94a03172c3d2643ecf41 | [
"Apache-2.0"
] | 1 | 2018-04-05T09:00:08.000Z | 2018-04-05T09:00:08.000Z | doc/scripts/genrest/genrest.py | GilBenkoe/zephyr | ac661a077947b941e3ae94a03172c3d2643ecf41 | [
"Apache-2.0"
] | 1 | 2019-06-18T20:12:22.000Z | 2019-06-18T20:12:22.000Z | doc/scripts/genrest/genrest.py | GilBenkoe/zephyr | ac661a077947b941e3ae94a03172c3d2643ecf41 | [
"Apache-2.0"
] | null | null | null | # Generates a Kconfig symbol reference in RST format, with a separate
# CONFIG_FOO.rst file for each symbol, and an alphabetical index with links in
# index.rst.
import kconfiglib
import os
import sys
import textwrap
# "Extend" the standard kconfiglib.expr_str() to turn references to defined
# Kconfig symbols into RS... | 39.471154 | 106 | 0.564312 |
import kconfiglib
import os
import sys
import textwrap
def expr_str_rst(expr):
if isinstance(expr, kconfiglib.Symbol) and expr.nodes:
return r"\ :option:`{0} <CONFIG_{0}>`".format(expr.name)
# calls for subexpressions
return expr_str_orig(expr)
expr_str_orig = kconfiglib... | true | true |
08fb8d8e08bd375bc19b1e7d966780401906c744 | 13,819 | py | Python | runner.py | primus115/mobi | d9f8edb82476b6732dcd8788b6cf83033adda4cd | [
"MIT"
] | null | null | null | runner.py | primus115/mobi | d9f8edb82476b6732dcd8788b6cf83033adda4cd | [
"MIT"
] | null | null | null | runner.py | primus115/mobi | d9f8edb82476b6732dcd8788b6cf83033adda4cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2009-2018 German Aerospace Center (DLR) and others.
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution... | 38.386111 | 142 | 0.613793 |
from __future__ import absolute_import
from __future__ import print_function
import os
import sys
import optparse
import random
import paho.mqtt.client as mqtt
import time
import json
from threading import Thread
from web3 import Web3, HTTPProvider
from getpass import getpass
RINKEBY = "https://rinkeby.infura.i... | true | true |
08fb8e2ce0737bb21b97aff37ebaadcce14c9b92 | 18,916 | py | Python | misc/acrn-config/library/launch_cfg_lib.py | yfliuu/acrn-hypervisor | 6289124e7c894323e2a5342bf201856d76512a60 | [
"BSD-3-Clause"
] | null | null | null | misc/acrn-config/library/launch_cfg_lib.py | yfliuu/acrn-hypervisor | 6289124e7c894323e2a5342bf201856d76512a60 | [
"BSD-3-Clause"
] | null | null | null | misc/acrn-config/library/launch_cfg_lib.py | yfliuu/acrn-hypervisor | 6289124e7c894323e2a5342bf201856d76512a60 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2019 Intel Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
import os
import getopt
import common
SOURCE_ROOT_DIR = common.SOURCE_PATH
BOARD_INFO_FILE = "board_info.txt"
SCENARIO_INFO_FILE = ""
LAUNCH_INFO_FILE = ""
ERR_LIST = {}
BOOT_TYPE = ['no', 'vsbl', 'ovmf']
RTOS_TY... | 31.317881 | 158 | 0.63782 |
import os
import getopt
import common
SOURCE_ROOT_DIR = common.SOURCE_PATH
BOARD_INFO_FILE = "board_info.txt"
SCENARIO_INFO_FILE = ""
LAUNCH_INFO_FILE = ""
ERR_LIST = {}
BOOT_TYPE = ['no', 'vsbl', 'ovmf']
RTOS_TYPE = ['no', 'Soft RT', 'Hard RT']
DM_VUART0 = ['Disable', 'Enable']
UOS_TYPES = ['CLEARLINUX', 'ANDROID',... | true | true |
08fb8e363d6103e5b4ac79fe643d81e062bf3d21 | 166 | py | Python | t2.py | wisecsj/wisecsj.github.io | 76335af6bdfab2a986e17aeac34d05da2ea25cdc | [
"Apache-2.0"
] | 1 | 2021-02-22T09:03:38.000Z | 2021-02-22T09:03:38.000Z | t2.py | wisecsj/wisecsj.github.io | 76335af6bdfab2a986e17aeac34d05da2ea25cdc | [
"Apache-2.0"
] | 26 | 2018-10-26T10:17:17.000Z | 2021-09-16T11:03:01.000Z | t2.py | wisecsj/wisecsj.github.io | 76335af6bdfab2a986e17aeac34d05da2ea25cdc | [
"Apache-2.0"
] | null | null | null | f_name = 'a.txt'
i = 0;
f = open(f_name);
w = open('b.txt','w')
for line in f:
line = line.split(' ')
line = line[0]+line[1]+line[4]
w.write(line+'\n')
| 15.090909 | 34 | 0.518072 | f_name = 'a.txt'
i = 0;
f = open(f_name);
w = open('b.txt','w')
for line in f:
line = line.split(' ')
line = line[0]+line[1]+line[4]
w.write(line+'\n')
| true | true |
08fb8e3876bf962d720b4f5cc58c458c35db8ca5 | 407 | py | Python | onyx/models/NotificationsModel.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-14T21:16:07.000Z | 2020-07-09T07:30:44.000Z | onyx/models/NotificationsModel.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-01T12:33:36.000Z | 2020-04-01T12:33:49.000Z | onyx/models/NotificationsModel.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | null | null | null | from onyx.extensions import db
class Notifications(db.Model):
__tablename__ = 'notifications'
id = db.Column(db.Integer, primary_key=True)
seen = db.Column(db.Boolean(), nullable=False)
user = db.Column(db.String(), nullable=False)
title = db.Column(db.String(), nullable=False)
content = db.Co... | 31.307692 | 50 | 0.678133 | from onyx.extensions import db
class Notifications(db.Model):
__tablename__ = 'notifications'
id = db.Column(db.Integer, primary_key=True)
seen = db.Column(db.Boolean(), nullable=False)
user = db.Column(db.String(), nullable=False)
title = db.Column(db.String(), nullable=False)
content = db.Co... | true | true |
08fb8e87883b570c4303c0aaf7937ffdc917294d | 2,539 | py | Python | tests/test_merge.py | uniomni/PyRate | f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf | [
"Apache-2.0"
] | 1 | 2020-09-12T00:01:33.000Z | 2020-09-12T00:01:33.000Z | tests/test_merge.py | uniomni/PyRate | f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf | [
"Apache-2.0"
] | null | null | null | tests/test_merge.py | uniomni/PyRate | f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# This Python module is part of the PyRate software package.
#
# Copyright 2020 Geoscience Australia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:/... | 38.469697 | 115 | 0.749508 | import os
from subprocess import check_call
import itertools
import pytest
from pathlib import Path
from pyrate.merge import _create_png_from_tif
from pyrate.core import config as cf
from pyrate.merge import _merge_stack
from pyrate.configuration import Configuration
from tests.common import manipulate_test_conf
@pyt... | true | true |
08fb90737d9036117b87794e6582b05573bc9d9b | 3,121 | py | Python | src/python/pants/util/collections_test.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | 1 | 2021-02-22T18:11:26.000Z | 2021-02-22T18:11:26.000Z | src/python/pants/util/collections_test.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | 13 | 2022-02-18T22:52:57.000Z | 2022-03-30T10:11:29.000Z | src/python/pants/util/collections_test.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | 4 | 2021-06-18T09:11:27.000Z | 2021-09-30T08:38:43.000Z | # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import unittest
from functools import partial
from typing import List
import pytest
from pants.util.collections import (
assert_single_element,
ensure_list,
ensure_str_list,
... | 36.717647 | 100 | 0.620955 |
import unittest
from functools import partial
from typing import List
import pytest
from pants.util.collections import (
assert_single_element,
ensure_list,
ensure_str_list,
recursively_update,
)
class TestCollections(unittest.TestCase):
def test_recursively_update(self) -> None:
d1 = {... | true | true |
08fb9079da3eeb5cca1197b0eca1ef8a2b13a4ea | 27,035 | py | Python | imagenet/timm/models/simplenet_impl/utils.py | dumpmemory/NonDeepNetworks | 5513bf588f4e64c99583440507232675c2e21e34 | [
"BSD-3-Clause"
] | 307 | 2021-10-18T01:36:00.000Z | 2022-03-29T07:14:20.000Z | imagenet/timm/models/simplenet_impl/utils.py | chVORLESER/NonDeepNetworks | 5513bf588f4e64c99583440507232675c2e21e34 | [
"BSD-3-Clause"
] | 13 | 2021-10-20T03:57:07.000Z | 2022-01-14T15:44:22.000Z | imagenet/timm/models/simplenet_impl/utils.py | chVORLESER/NonDeepNetworks | 5513bf588f4e64c99583440507232675c2e21e34 | [
"BSD-3-Clause"
] | 24 | 2021-10-19T10:04:20.000Z | 2022-03-15T01:09:37.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import tqdm
import time as tm
from timm.models.layers.drop import drop_path, drop_block_fast_2d
def round(f):
return math.ceil(f / 2.) * 2
def num_param(net):
return sum(p.numel() for p in net.parameters() if p.requires_grad)
def ... | 36.983584 | 185 | 0.582097 | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import tqdm
import time as tm
from timm.models.layers.drop import drop_path, drop_block_fast_2d
def round(f):
return math.ceil(f / 2.) * 2
def num_param(net):
return sum(p.numel() for p in net.parameters() if p.requires_grad)
def ... | true | true |
08fb91798a6aa26013accfd7fb8943bcba38b489 | 2,978 | py | Python | Lib/plat-irix6/SV.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 5 | 2022-03-26T21:53:36.000Z | 2022-03-30T21:47:20.000Z | Lib/plat-irix6/SV.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 6 | 2020-11-18T15:48:14.000Z | 2021-05-03T21:20:50.000Z | Lib/plat-irix6/SV.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 2 | 2015-07-16T08:14:13.000Z | 2022-03-27T01:55:17.000Z | NTSC_XMAX = 640
NTSC_YMAX = 480
PAL_XMAX = 768
PAL_YMAX = 576
BLANKING_BUFFER_SIZE = 2
MAX_SOURCES = 2
# mode parameter for Bind calls
IN_OFF = 0 # No Video
IN_OVER = 1 # Video over graphics
IN_UNDER = 2 # Video under graphics
IN_REPLACE = 3 # Video replaces entire win
# mode parameters for LoadMap calls... | 24.61157 | 74 | 0.721289 | NTSC_XMAX = 640
NTSC_YMAX = 480
PAL_XMAX = 768
PAL_YMAX = 576
BLANKING_BUFFER_SIZE = 2
MAX_SOURCES = 2
IN_OFF = 0 IN_OVER = 1 IN_UNDER = 2 IN_REPLACE = 3
INPUT_COLORMAP = 0 CHROMA_KEY_MAP = 1 COLOR_SPACE_MAP = 2 GAMMA_MAP = 3
INPUT = 0
OUTPUT = 1
IN_OUT = 2
RGB8_FRAMES = 0 RGB32_FRAMES = 1 ... | true | true |
08fb9241a85a14f35e57b50567ebe121d2b26a18 | 7,759 | py | Python | rtamt/evaluator/stl/dense_time/offline/python/offline_dense_time_python_monitor.py | quinn-thibeault/rtamt | 7258bd64176a113bd28dc749ccbeb204ca818370 | [
"BSD-3-Clause"
] | null | null | null | rtamt/evaluator/stl/dense_time/offline/python/offline_dense_time_python_monitor.py | quinn-thibeault/rtamt | 7258bd64176a113bd28dc749ccbeb204ca818370 | [
"BSD-3-Clause"
] | null | null | null | rtamt/evaluator/stl/dense_time/offline/python/offline_dense_time_python_monitor.py | quinn-thibeault/rtamt | 7258bd64176a113bd28dc749ccbeb204ca818370 | [
"BSD-3-Clause"
] | null | null | null | from rtamt.spec.stl.discrete_time.visitor import STLVisitor
from rtamt.exception.stl.exception import STLNotImplementedException
from rtamt.operation.stl.dense_time.offline.predicate_operation import PredicateOperation
from rtamt.operation.arithmetic.dense_time.offline.addition_operation import AdditionOperation
from r... | 39.385787 | 114 | 0.72548 | from rtamt.spec.stl.discrete_time.visitor import STLVisitor
from rtamt.exception.stl.exception import STLNotImplementedException
from rtamt.operation.stl.dense_time.offline.predicate_operation import PredicateOperation
from rtamt.operation.arithmetic.dense_time.offline.addition_operation import AdditionOperation
from r... | true | true |
08fb9272f2a560cdfc0c5a9fd9b028320fb6da9a | 7,754 | py | Python | nuitka/PythonVersions.py | danielmorgan0x1/Nuitka | 8a0886a5c3c767458308f6ae2fc71845290b32cf | [
"Apache-2.0"
] | 1 | 2021-08-19T17:09:18.000Z | 2021-08-19T17:09:18.000Z | nuitka/PythonVersions.py | danielmorgan0x1/Nuitka | 8a0886a5c3c767458308f6ae2fc71845290b32cf | [
"Apache-2.0"
] | null | null | null | nuitka/PythonVersions.py | danielmorgan0x1/Nuitka | 8a0886a5c3c767458308f6ae2fc71845290b32cf | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 28.196364 | 85 | 0.662239 |
import os
import re
import sys
def getSupportedPythonVersions():
return ("2.6", "2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8")
def getPartiallySupportedPythonVersions():
return ()
def getSupportedPythonVersionStr():
supported_python_versions = getSupportedPythonVersions()
supported_python_ve... | true | true |
08fb94885318d2d205e306be3a66330131cf0d5a | 1,300 | py | Python | updaters/test-doubles.py | abezpalov/tenders | 6cbc8b50e2d592bbed15d766d87a48f52be37b3c | [
"MIT"
] | 1 | 2015-06-22T17:37:15.000Z | 2015-06-22T17:37:15.000Z | updaters/test-doubles.py | abezpalov/tenders | 6cbc8b50e2d592bbed15d766d87a48f52be37b3c | [
"MIT"
] | 10 | 2015-08-06T12:00:20.000Z | 2017-02-12T20:47:29.000Z | updaters/test-doubles.py | abezpalov/tenders | 6cbc8b50e2d592bbed15d766d87a48f52be37b3c | [
"MIT"
] | null | null | null | import gc
from tenders.models import *
from project.models import Log
from django.utils import timezone
class Runner:
name = 'Проверка дублей'
alias = 'test-doubles'
def __init__(self):
# Загрузчик
self.updater = Updater.objects.take(
alias = self.alias,
name = self.name)
def run(self):
start ... | 20 | 99 | 0.669231 | import gc
from tenders.models import *
from project.models import Log
from django.utils import timezone
class Runner:
name = 'Проверка дублей'
alias = 'test-doubles'
def __init__(self):
self.updater = Updater.objects.take(
alias = self.alias,
name = self.name)
def run(self):
start = timezone.n... | true | true |
08fb94cd1221ee6415e2a9e98f2d57dae47ea1ab | 363 | py | Python | app/extensions.py | DigitME2/oee_server | 450df961ad6eaae3b20e043629089988b5f9e438 | [
"Apache-2.0"
] | 2 | 2020-07-14T12:45:04.000Z | 2022-03-21T05:44:09.000Z | app/extensions.py | DigitME2/oee_server | 450df961ad6eaae3b20e043629089988b5f9e438 | [
"Apache-2.0"
] | 5 | 2022-01-25T00:37:38.000Z | 2022-03-17T17:18:06.000Z | app/extensions.py | DigitME2/oee_server | 450df961ad6eaae3b20e043629089988b5f9e438 | [
"Apache-2.0"
] | 2 | 2020-07-14T12:45:16.000Z | 2020-12-27T00:44:10.000Z | from celery import Celery
from flask_login import LoginManager
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from config import Config
db = SQLAlchemy()
migrate = Migrate()
login_manager = LoginManager()
login_manager.login_view = 'login.login'
celery_app = Celery('tasks', broker=Config.RE... | 27.923077 | 87 | 0.823691 | from celery import Celery
from flask_login import LoginManager
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from config import Config
db = SQLAlchemy()
migrate = Migrate()
login_manager = LoginManager()
login_manager.login_view = 'login.login'
celery_app = Celery('tasks', broker=Config.RE... | true | true |
08fb94d05c5789617b9a72458be290f8785b64ed | 282 | py | Python | cricket/django/__main__.py | Daniel-Christian-CardinalPeak/cricket-pt | 7a07300f176c3c6132a0c69f9e055c191ed8d8de | [
"BSD-3-Clause"
] | 1 | 2022-02-18T01:09:51.000Z | 2022-02-18T01:09:51.000Z | cricket/django/__main__.py | robodan/cricket-pt | 7a07300f176c3c6132a0c69f9e055c191ed8d8de | [
"BSD-3-Clause"
] | null | null | null | cricket/django/__main__.py | robodan/cricket-pt | 7a07300f176c3c6132a0c69f9e055c191ed8d8de | [
"BSD-3-Clause"
] | 1 | 2022-02-18T01:08:27.000Z | 2022-02-18T01:08:27.000Z | '''
This is the main entry point for running Django test suites.
'''
from cricket.main import main as cricket_main
from cricket.django.model import DjangoTestSuite
def main():
return cricket_main(DjangoTestSuite)
def run():
main()
if __name__ == "__main__":
run()
| 15.666667 | 60 | 0.716312 | from cricket.main import main as cricket_main
from cricket.django.model import DjangoTestSuite
def main():
return cricket_main(DjangoTestSuite)
def run():
main()
if __name__ == "__main__":
run()
| true | true |
08fb9638714fbb61821d0d0c2cec1d316e90e6d6 | 3,006 | py | Python | tests/gis_tests/geoapp/test_expressions.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/gis_tests/geoapp/test_expressions.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/gis_tests/geoapp/test_expressions.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from unittest import skipUnless
from django.contrib.gis.db.models import F, GeometryField, Value, functions
from django.contrib.gis.geos import Point, Polygon
from django.db import connection
from django.db.models import Count, Min
from django.test import TestCase, skipUnlessDBFeature
from ..utils import post... | 43.565217 | 117 | 0.646041 | from unittest import skipUnless
from django.contrib.gis.db.models import F, GeometryField, Value, functions
from django.contrib.gis.geos import Point, Polygon
from django.db import connection
from django.db.models import Count, Min
from django.test import TestCase, skipUnlessDBFeature
from ..utils import post... | true | true |
08fb96618c44c03feb75dfe586101585cfb9d5fd | 1,159 | py | Python | tests/forms_tests/tests/test_validators.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 1 | 2015-06-14T07:55:29.000Z | 2015-06-14T07:55:29.000Z | tests/forms_tests/tests/test_validators.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | null | null | null | tests/forms_tests/tests/test_validators.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from unittest import TestCase
from django import forms
from django.core import validators
from django.core.exceptions import ValidationError
class UserForm(forms.Form):
full_name = forms.CharField(
max_length = 50,
validators = [
validators.val... | 28.268293 | 94 | 0.622088 | from __future__ import unicode_literals
from unittest import TestCase
from django import forms
from django.core import validators
from django.core.exceptions import ValidationError
class UserForm(forms.Form):
full_name = forms.CharField(
max_length = 50,
validators = [
validators.val... | true | true |
08fb97dd059b2c14167be9d95b644bf166ac9b8d | 8,794 | py | Python | plugins/callbacks.py | Jimicreator/zkKk | bf5b3760b7b8271b29d8d89ef35982da0b055909 | [
"MIT"
] | null | null | null | plugins/callbacks.py | Jimicreator/zkKk | bf5b3760b7b8271b29d8d89ef35982da0b055909 | [
"MIT"
] | null | null | null | plugins/callbacks.py | Jimicreator/zkKk | bf5b3760b7b8271b29d8d89ef35982da0b055909 | [
"MIT"
] | null | null | null | import os
import ast
from pyrogram import Client as trojanz
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
from config import Config
from script import Script
from database.filters_mdb import del_all, fin... | 30.964789 | 104 | 0.517967 | import os
import ast
from pyrogram import Client as trojanz
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
from config import Config
from script import Script
from database.filters_mdb import del_all, fin... | true | true |
08fb9909e1d9ba94f920a31fd6aa207ca46b9a4e | 3,354 | py | Python | Calculator.py | brba97/PyCalculator | cc27ccf7b5979f6b20acf74d596b11f4fce4effa | [
"MIT"
] | null | null | null | Calculator.py | brba97/PyCalculator | cc27ccf7b5979f6b20acf74d596b11f4fce4effa | [
"MIT"
] | 1 | 2018-09-22T06:29:29.000Z | 2018-09-22T08:13:45.000Z | Calculator.py | brba97/PyCalculator | cc27ccf7b5979f6b20acf74d596b11f4fce4effa | [
"MIT"
] | null | null | null | from tkinter import *
from math import *
calc = Tk()
calc.title("CALCULATOR")
calc.resizable(0, 0)
display = Entry(calc, width=64) # white display
display.grid(row=0, column=0, columnspan=12, pady=20)
def buttons(val): # insert value of buttons into display
display.insert(END, val)
#... | 38.551724 | 146 | 0.625224 | from tkinter import *
from math import *
calc = Tk()
calc.title("CALCULATOR")
calc.resizable(0, 0)
display = Entry(calc, width=64) display.grid(row=0, column=0, columnspan=12, pady=20)
def buttons(val): display.insert(END, val)
n1 = Button(calc, width=8, height=4, text=' 1 ', comma... | true | true |
08fb99a0b3637da2586a088664297e85d19927cc | 5,663 | py | Python | othello/car.py | JungChaeMoon/room_escape | 1417caf6b9cc6228b2f1faf533d73c986cc04704 | [
"MIT"
] | null | null | null | othello/car.py | JungChaeMoon/room_escape | 1417caf6b9cc6228b2f1faf533d73c986cc04704 | [
"MIT"
] | null | null | null | othello/car.py | JungChaeMoon/room_escape | 1417caf6b9cc6228b2f1faf533d73c986cc04704 | [
"MIT"
] | null | null | null | from bangtal import *
from enum import Enum
setGameOption(GameOption.INVENTORY_BUTTON, False)
setGameOption(GameOption.MESSAGE_BOX_BUTTON, False)
setGameOption(GameOption.ROOM_TITLE, False)
scene = Scene('Othello', "images/background.png")
class State(Enum):
BLANK = 0
POSSIBLE = 1
BLACK = 2... | 26.217593 | 98 | 0.527282 | from bangtal import *
from enum import Enum
setGameOption(GameOption.INVENTORY_BUTTON, False)
setGameOption(GameOption.MESSAGE_BOX_BUTTON, False)
setGameOption(GameOption.ROOM_TITLE, False)
scene = Scene('Othello', "images/background.png")
class State(Enum):
BLANK = 0
POSSIBLE = 1
BLACK = 2... | true | true |
08fb9a0f5bd5f50f0a09f07fc0a20eeed6785d0c | 721 | py | Python | tests/test_core/__init__.py | aberki1234/cogent3 | af98b248a999bfeefd4cfed6bd59b4f30442e2d4 | [
"BSD-3-Clause"
] | null | null | null | tests/test_core/__init__.py | aberki1234/cogent3 | af98b248a999bfeefd4cfed6bd59b4f30442e2d4 | [
"BSD-3-Clause"
] | null | null | null | tests/test_core/__init__.py | aberki1234/cogent3 | af98b248a999bfeefd4cfed6bd59b4f30442e2d4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
__all__ = [
"test_alignment",
"test_alphabet",
"test_annotation",
"test_core_standalone",
"test_features",
"test_genetic_code",
"test_info",
"test_location",
"test_maps",
"test_moltype",
"test_profile",
"test_sequence",
"test_tree",
]
__author_... | 20.027778 | 57 | 0.646325 |
__all__ = [
"test_alignment",
"test_alphabet",
"test_annotation",
"test_core_standalone",
"test_features",
"test_genetic_code",
"test_info",
"test_location",
"test_maps",
"test_moltype",
"test_profile",
"test_sequence",
"test_tree",
]
__author__ = ""
__copyright__ =... | true | true |
08fb9a4e89397a733f0dde763908d7cd2cf2f0e9 | 12,416 | py | Python | dodge/ui.py | MoyTW/7DRL2016_Rewrite | 99e092dcb8797a25caa3c8a989a574efae19e4d4 | [
"MIT"
] | 2 | 2020-05-10T02:16:28.000Z | 2021-04-05T21:54:10.000Z | dodge/ui.py | MoyTW/7DRL2016_Rewrite | 99e092dcb8797a25caa3c8a989a574efae19e4d4 | [
"MIT"
] | null | null | null | dodge/ui.py | MoyTW/7DRL2016_Rewrite | 99e092dcb8797a25caa3c8a989a574efae19e4d4 | [
"MIT"
] | null | null | null | import tcod as libtcod
from dodge.constants import ComponentType, InputCommands
from dodge.game.state import GameStatus
import dodge.utils as utils
class InputHandler(object):
def __init__(self):
self.key = libtcod.Key()
# TODO: Change from silly if/else to a map
def get_keyboard_input(self, game... | 44.501792 | 119 | 0.60269 | import tcod as libtcod
from dodge.constants import ComponentType, InputCommands
from dodge.game.state import GameStatus
import dodge.utils as utils
class InputHandler(object):
def __init__(self):
self.key = libtcod.Key()
def get_keyboard_input(self, game_status: GameStatus):
while... | true | true |
08fb9a6725cc4fa2f3187610743ba9ad64c3281d | 7,161 | py | Python | tests/test_translate_from_rdslike_vanilla_with_owl.py | PrediktorAS/quarry | 80f14781506dcb2e85dbda8057ad184f93140ce5 | [
"Apache-2.0"
] | 2 | 2021-04-13T11:08:40.000Z | 2021-12-02T06:30:42.000Z | tests/test_translate_from_rdslike_vanilla_with_owl.py | PrediktorAS/quarry | 80f14781506dcb2e85dbda8057ad184f93140ce5 | [
"Apache-2.0"
] | null | null | null | tests/test_translate_from_rdslike_vanilla_with_owl.py | PrediktorAS/quarry | 80f14781506dcb2e85dbda8057ad184f93140ce5 | [
"Apache-2.0"
] | 1 | 2022-03-08T10:41:44.000Z | 2022-03-08T10:41:44.000Z | # Copyright 2021 Prediktor AS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 43.138554 | 133 | 0.714286 |
import os
import pandas as pd
import pytest
from owlrl import DeductiveClosure, OWLRL_Semantics
from rdflib import Graph
import swt_translator as swtt
PATH_HERE = os.path.dirname(__file__)
@pytest.fixture(scope='session')
def create_ttl():
namespaces = ['http://opcfoundation.org/UA/', 'http://pre... | true | true |
08fb9aa67bb9795805a773871233faadf8517245 | 990 | py | Python | data/train/python/08fb9aa67bb9795805a773871233faadf8517245main.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/08fb9aa67bb9795805a773871233faadf8517245main.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/08fb9aa67bb9795805a773871233faadf8517245main.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from repository.filmRepository.filmRepository import FilmRepository
from ui.ui import Ui
from domain.film.filmValidator import FilmValidator
from repository.clientRepository.clientRepository import ClientRepository
from domain.client.clientValidator import ClientValidator
from controller.filmController import FilmContr... | 43.043478 | 73 | 0.861616 | from repository.filmRepository.filmRepository import FilmRepository
from ui.ui import Ui
from domain.film.filmValidator import FilmValidator
from repository.clientRepository.clientRepository import ClientRepository
from domain.client.clientValidator import ClientValidator
from controller.filmController import FilmContr... | true | true |
08fb9b319fc498e290275a0856f9ab2562ca0db9 | 33,953 | py | Python | old/scripts/Q-v5.1.py | zendegani/scripts | 9f3e352cad2a8929436b5437f17724d7645ea7d8 | [
"BSD-3-Clause"
] | null | null | null | old/scripts/Q-v5.1.py | zendegani/scripts | 9f3e352cad2a8929436b5437f17724d7645ea7d8 | [
"BSD-3-Clause"
] | null | null | null | old/scripts/Q-v5.1.py | zendegani/scripts | 9f3e352cad2a8929436b5437f17724d7645ea7d8 | [
"BSD-3-Clause"
] | null | null | null | __author__ = 'Ali'
# rev 5.1 (2015-10-08 13:43)
''' some ideas adopted from ZenGen project'''
import numpy as np
import itertools as itr
import subprocess
import os
import pprint as pp
import sys
import fileinput
import matplotlib.pyplot as plt
from scipy.interpolate import UnivariateSpline
from scipy.optimize import ... | 38.53916 | 187 | 0.542308 | __author__ = 'Ali'
''' some ideas adopted from ZenGen project'''
import numpy as np
import itertools as itr
import subprocess
import os
import pprint as pp
import sys
import fileinput
import matplotlib.pyplot as plt
from scipy.interpolate import UnivariateSpline
from scipy.optimize import curve_fit
""" unsolved issu... | false | true |
08fb9c64000c5854fc90c82c507048578dd76825 | 4,647 | py | Python | tensorflow/python/keras/combinations.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/keras/combinations.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 88 | 2020-11-24T08:18:10.000Z | 2022-03-25T20:28:30.000Z | tensorflow/python/keras/combinations.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.169118 | 80 | 0.741123 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
from tensorflow.python import tf2
from tensorflow.python.framework import combinations
from tensorflow.python.framework import test_combinations
from tensorflow.python.keras import testing_ut... | true | true |
08fb9e4079b15ef69566b398a16dd8018b3ab475 | 9,777 | py | Python | tests/sort_spec.py | NicolasBehra/python-sort-algo | c4386378994f256717d5e436ffd3b096b1c0b850 | [
"MIT"
] | null | null | null | tests/sort_spec.py | NicolasBehra/python-sort-algo | c4386378994f256717d5e436ffd3b096b1c0b850 | [
"MIT"
] | null | null | null | tests/sort_spec.py | NicolasBehra/python-sort-algo | c4386378994f256717d5e436ffd3b096b1c0b850 | [
"MIT"
] | null | null | null | # -*-coding:Latin-1 -*
import unittest
import array
from sort.mysort import MySort as MySortClass
from sort.mysort import IntArray
class TestMySort(unittest.TestCase):
def setUp(self):
self.my_sort = MySortClass()
# is_sorted
def test_is_sorted_1_empty_array_true(self):
my_tab = IntArr... | 41.961373 | 86 | 0.699499 |
import unittest
import array
from sort.mysort import MySort as MySortClass
from sort.mysort import IntArray
class TestMySort(unittest.TestCase):
def setUp(self):
self.my_sort = MySortClass()
def test_is_sorted_1_empty_array_true(self):
my_tab = IntArray
self.assertEqual(self.my... | true | true |
08fb9eb41bf486a8ef1b726e1890555ff7510558 | 12,677 | py | Python | ingestion/src/metadata/ingestion/source/database/sqlalchemy_source.py | OnkarVO7/OpenMetadata | 474ef0826a64f9692b32a6f709985a56ec065fb4 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/database/sqlalchemy_source.py | OnkarVO7/OpenMetadata | 474ef0826a64f9692b32a6f709985a56ec065fb4 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/database/sqlalchemy_source.py | OnkarVO7/OpenMetadata | 474ef0826a64f9692b32a6f709985a56ec065fb4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 36.428161 | 88 | 0.607951 | import traceback
import uuid
from abc import ABC, abstractmethod
from typing import Iterable, List, Optional, Tuple, Union
from sqlalchemy.engine.reflection import Inspector
from metadata.generated.schema.entity.data.database import Database
from metadata.generated.schema.entity.data.databaseSchema import DatabaseSch... | true | true |
08fb9ecb98a1944002c37621f78b113a3f2d73f5 | 740 | py | Python | docs/conf.py | hat-open/hat-event | 30dffe67a565ff4ff9871d5666e363f97194d2c8 | [
"Apache-2.0"
] | 1 | 2022-02-01T13:43:02.000Z | 2022-02-01T13:43:02.000Z | docs/conf.py | hat-open/hat-event | 30dffe67a565ff4ff9871d5666e363f97194d2c8 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | hat-open/hat-event | 30dffe67a565ff4ff9871d5666e363f97194d2c8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
root_path = Path(__file__).parent.parent.resolve()
extensions = [
'sphinx.ext.todo',
'sphinx.ext.graphviz',
'sphinxcontrib.plantuml',
'sphinxcontrib.programoutput',
]
version = (root_path / 'VERSION').read_text().strip()
project = 'hat-event'
copyright = '2020-2021, Hat Open... | 24.666667 | 53 | 0.654054 | from pathlib import Path
root_path = Path(__file__).parent.parent.resolve()
extensions = [
'sphinx.ext.todo',
'sphinx.ext.graphviz',
'sphinxcontrib.plantuml',
'sphinxcontrib.programoutput',
]
version = (root_path / 'VERSION').read_text().strip()
project = 'hat-event'
copyright = '2020-2021, Hat Open... | true | true |
08fb9fa4d7fcc6b53062a99003c3847b11665d94 | 4,648 | py | Python | spp.py | Vishal-V/Tiny-ImageNet-Challenge | 14cbfc0785ee3026871ac39c3e9a677168fb8b1b | [
"Apache-2.0"
] | 1 | 2020-09-16T21:01:34.000Z | 2020-09-16T21:01:34.000Z | spp.py | Vishal-V/Tiny-ImageNet-Challenge | 14cbfc0785ee3026871ac39c3e9a677168fb8b1b | [
"Apache-2.0"
] | null | null | null | spp.py | Vishal-V/Tiny-ImageNet-Challenge | 14cbfc0785ee3026871ac39c3e9a677168fb8b1b | [
"Apache-2.0"
] | null | null | null | from tensorflow.keras import Layer
import tensorflow.keras as K
class SpatialPyramidPooling(Layer):
"""Spatial pyramid pooling layer for 2D inputs.
See Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition,
K. He, X. Zhang, S. Ren, J. Sun
# Arguments
pool_list: list of ... | 41.5 | 102 | 0.536145 | from tensorflow.keras import Layer
import tensorflow.keras as K
class SpatialPyramidPooling(Layer):
def __init__(self, pool_list, **kwargs):
self.dim_ordering = K.image_dim_ordering()
assert self.dim_ordering in {'tf', 'th'}, 'dim_ordering must be in {tf, th}'
self.pool_list = pool_list... | true | true |
08fba0652da39bf25441c9305fac0438198adfd9 | 2,203 | py | Python | example/rest/account_rest_example.py | bitcom-exchange/bitcom-python-api | 1491481f376ba7e7d4a7d2edb2f4400b8e4d7ec3 | [
"MIT"
] | 4 | 2021-03-04T00:10:24.000Z | 2021-12-15T01:49:39.000Z | example/rest/account_rest_example.py | bitcom-exchange/bitcom-python-api | 1491481f376ba7e7d4a7d2edb2f4400b8e4d7ec3 | [
"MIT"
] | null | null | null | example/rest/account_rest_example.py | bitcom-exchange/bitcom-python-api | 1491481f376ba7e7d4a7d2edb2f4400b8e4d7ec3 | [
"MIT"
] | null | null | null | from bitcom.client.account_client import AccountClient
from bitcom.utils import *
from bitcom.constant import *
account_client = AccountClient(url=USER1_HOST, access_key=USER1_ACCESS_KEY, secret_key=USER1_SECRET_KEY)
param_map = {
'currency': 'BTC'
}
accounts_response = account_client.get_accounts(param_map)
LogI... | 27.197531 | 104 | 0.740808 | from bitcom.client.account_client import AccountClient
from bitcom.utils import *
from bitcom.constant import *
account_client = AccountClient(url=USER1_HOST, access_key=USER1_ACCESS_KEY, secret_key=USER1_SECRET_KEY)
param_map = {
'currency': 'BTC'
}
accounts_response = account_client.get_accounts(param_map)
LogI... | true | true |
08fba066360b312f202350c5133b3a605aee1456 | 604 | py | Python | uwhvz/urls.py | marcusosso/uwhvz | c20303c117e8b2fcd04f5901326054296d3f3caf | [
"MIT"
] | 9 | 2018-09-08T06:59:02.000Z | 2022-03-23T08:12:02.000Z | uwhvz/urls.py | marcusosso/uwhvz | c20303c117e8b2fcd04f5901326054296d3f3caf | [
"MIT"
] | 37 | 2020-01-22T02:36:32.000Z | 2020-10-06T15:05:37.000Z | uwhvz/urls.py | marcusosso/uwhvz | c20303c117e8b2fcd04f5901326054296d3f3caf | [
"MIT"
] | 6 | 2019-03-07T02:55:27.000Z | 2019-11-10T23:26:44.000Z | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
urlpatterns = [
... | 31.789474 | 76 | 0.763245 | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
urlpatterns = [
... | true | true |
08fba069449b5df70e7d1a5bdca6bc95863b0424 | 1,255 | py | Python | options/val_options.py | xyp8023/pytorch-CycleGAN-and-pix2pix | dce720d985a951a3cfed470ef4c2ef206c0e0817 | [
"BSD-3-Clause"
] | null | null | null | options/val_options.py | xyp8023/pytorch-CycleGAN-and-pix2pix | dce720d985a951a3cfed470ef4c2ef206c0e0817 | [
"BSD-3-Clause"
] | null | null | null | options/val_options.py | xyp8023/pytorch-CycleGAN-and-pix2pix | dce720d985a951a3cfed470ef4c2ef206c0e0817 | [
"BSD-3-Clause"
] | null | null | null | from .base_options import BaseOptions
class ValOptions(BaseOptions):
"""This class includes val options.
It also includes shared options defined in BaseOptions.
"""
def initialize(self, parser):
parser = BaseOptions.initialize(self, parser) # define shared options
parser.add_argumen... | 50.2 | 108 | 0.684462 | from .base_options import BaseOptions
class ValOptions(BaseOptions):
def initialize(self, parser):
parser = BaseOptions.initialize(self, parser) parser.add_argument('--ntest', type=int, default=float("inf"), help='# of test examples.')
parser.add_argument('--results_dir', type=str, defau... | true | true |
08fba0f97175fa23a8a1622ed19c252867bbbfb1 | 2,412 | py | Python | src/snovault/tests/postgresql_fixture.py | Lattice-Data/snovault | 384f4a3bf3afcc4b825f98c80d18a5852d46ef5c | [
"MIT"
] | 30 | 2015-09-23T20:38:57.000Z | 2021-03-10T03:12:46.000Z | src/snovault/tests/postgresql_fixture.py | Lattice-Data/snovault | 384f4a3bf3afcc4b825f98c80d18a5852d46ef5c | [
"MIT"
] | 2,132 | 2015-06-08T21:50:35.000Z | 2022-02-15T22:44:18.000Z | src/snovault/tests/postgresql_fixture.py | Lattice-Data/snovault | 384f4a3bf3afcc4b825f98c80d18a5852d46ef5c | [
"MIT"
] | 24 | 2016-04-21T08:27:46.000Z | 2022-01-11T19:00:28.000Z | from urllib.parse import quote
import os.path
import sys
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
def initdb(datadir, prefix='', echo=False):
init_args = [
os.path.join(prefix, 'initdb'),
'-D', datadir,
'-U', 'postgres',
'--auth=trust',
... | 23.647059 | 87 | 0.559701 | from urllib.parse import quote
import os.path
import sys
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
def initdb(datadir, prefix='', echo=False):
init_args = [
os.path.join(prefix, 'initdb'),
'-D', datadir,
'-U', 'postgres',
'--auth=trust',
... | true | true |
08fba12959577c15748816b93cd5df114bdbd105 | 3,711 | py | Python | python/adminui/table.py | yaimready/python-adminui | 9ad525b0738686fad89ae2dd615f39d4ba7fc5d5 | [
"MIT"
] | null | null | null | python/adminui/table.py | yaimready/python-adminui | 9ad525b0738686fad89ae2dd615f39d4ba7fc5d5 | [
"MIT"
] | null | null | null | python/adminui/table.py | yaimready/python-adminui | 9ad525b0738686fad89ae2dd615f39d4ba7fc5d5 | [
"MIT"
] | null | null | null | from .element import Element
from .app import callbackRegistry
class TableResult(Element):
"""Table data used in the "data" column of DataTable, or returned when table pages are requested
Args:
data: a list of dictionary serves as table data. e.g.:
[ {id: 1, name: 'Alice', '_actions': ... | 52.267606 | 134 | 0.642684 | from .element import Element
from .app import callbackRegistry
class TableResult(Element):
def __init__(self, data=[], total=None, current_page=1, page_size=10):
if total == None:
total = len(data)
page_size = total
super().__init__('TableResult', data=data, current_page=cur... | true | true |
08fba18099dcc1660103b7b822e218cd78275aee | 3,771 | py | Python | contrib/macdeploy/custom_dsstore.py | axelnetwork/AXEL | 5fd6cc3c1295bdcda0713b5ee9d928874fe2697d | [
"MIT"
] | 12 | 2019-10-25T11:02:22.000Z | 2021-09-10T16:33:41.000Z | contrib/macdeploy/custom_dsstore.py | vitali2y/AXEL-1 | 409d16e2e0b6e8e8a7b64bc6b6d4dcf31279e07c | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | vitali2y/AXEL-1 | 409d16e2e0b6e8e8a7b64bc6b6d4dcf31279e07c | [
"MIT"
] | 4 | 2019-07-18T19:41:57.000Z | 2021-11-28T12:34:29.000Z | #!/usr/bin/env python
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore... | 61.819672 | 1,817 | 0.727128 | from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore
from mac_alias import Alias
import sys
output_file = sys.argv[1]
package_name_ns = sys.argv[2]
ds = DSStore.open(output_file, 'w+')
ds['.']['bwsp'] = {
'ShowStatusBar': False,
'WindowBounds': b'{{300, 2... | true | true |
08fba1f852164d0eefdc0ec549fbe56f1b3e96cd | 9,451 | py | Python | tests/test_runtime/test_typecheck_schema.py | zekna/py-types | ec39da1277986f0ea44830dfb0da9d906deb13e1 | [
"MIT"
] | 5 | 2015-06-18T20:04:56.000Z | 2016-03-15T15:32:44.000Z | tests/test_runtime/test_typecheck_schema.py | sarlianna/py-types | ec39da1277986f0ea44830dfb0da9d906deb13e1 | [
"MIT"
] | 1 | 2016-01-19T01:39:54.000Z | 2016-01-27T19:17:31.000Z | tests/test_runtime/test_typecheck_schema.py | zekna/py-types | ec39da1277986f0ea44830dfb0da9d906deb13e1 | [
"MIT"
] | null | null | null | from py_types.runtime import (
typecheck,
)
from py_types.runtime.schema import (
schema,
SchemaOr,
SchemaError
)
import unittest
from copy import deepcopy
#----------------------
# Test fodder
#----------------------
# asserts.py
@typecheck
def type_checked(best: int, slot: str) -> str:
return... | 35.003704 | 105 | 0.608719 | from py_types.runtime import (
typecheck,
)
from py_types.runtime.schema import (
schema,
SchemaOr,
SchemaError
)
import unittest
from copy import deepcopy
@typecheck
def type_checked(best: int, slot: str) -> str:
return slot * best
@typecheck
def type_checked_bad_return(a: int) -> int:
r... | true | true |
08fba20e328c5b57f20e764a3515adc2a1eaa63a | 582 | py | Python | server/risyuuW12_ex.py | stuayu/team6 | e843b5f50e873e36d0a38a4fb2b74e6b00f8c4ad | [
"MIT"
] | 2 | 2021-06-22T02:12:44.000Z | 2021-07-26T16:01:11.000Z | server/risyuuW12_ex.py | stuayu/team6 | e843b5f50e873e36d0a38a4fb2b74e6b00f8c4ad | [
"MIT"
] | null | null | null | server/risyuuW12_ex.py | stuayu/team6 | e843b5f50e873e36d0a38a4fb2b74e6b00f8c4ad | [
"MIT"
] | 4 | 2021-06-11T05:20:21.000Z | 2021-07-26T15:56:04.000Z | # -*- coding: utf-8 -*-
import csv
import MySQLdb
def fsync():
connection = MySQLdb.connect(host="localhost",db="team6",user="root",passwd="",charset="utf8")
cursor=connection.cursor()
cursor.execute("DELETE FROM w12")
#path変更忘れずに
f = open(".\\MainProject\\data\\履修者-W12_.csv", "r", encoding="utf-8")
r... | 22.384615 | 96 | 0.640893 |
import csv
import MySQLdb
def fsync():
connection = MySQLdb.connect(host="localhost",db="team6",user="root",passwd="",charset="utf8")
cursor=connection.cursor()
cursor.execute("DELETE FROM w12")
f = open(".\\MainProject\\data\\履修者-W12_.csv", "r", encoding="utf-8")
reader = csv.reader(f)
header = nex... | true | true |
08fba319dd5367b8af361f4b66c683bfe1810ebe | 54,766 | py | Python | pylogix/lgx_device.py | pendantautomation/pylogix | 32b5bcf4c883073d2956d10f0deae95008a756aa | [
"Apache-2.0"
] | 1 | 2020-12-21T16:28:14.000Z | 2020-12-21T16:28:14.000Z | pylogix/lgx_device.py | pendantautomation/pylogix | 32b5bcf4c883073d2956d10f0deae95008a756aa | [
"Apache-2.0"
] | null | null | null | pylogix/lgx_device.py | pendantautomation/pylogix | 32b5bcf4c883073d2956d10f0deae95008a756aa | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 Dustin Roeder (dmroeder@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 39.65677 | 85 | 0.513439 |
import socket
from struct import pack, unpack_from
class Device():
def __init__(self):
self.Length=None
self.EncapsulationVersion=None
self.IPAddress=None
self.VendorID=None
self.Vendor=None
self.DeviceID=None
self.DeviceType=None
self.P... | true | true |
08fba3ba7a34778b6e9d28d504db99f374d74fce | 3,456 | py | Python | bokeh/server/tests/multiuser_auth_test.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | null | null | null | bokeh/server/tests/multiuser_auth_test.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | null | null | null | bokeh/server/tests/multiuser_auth_test.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2015, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#----------------------------------------... | 37.978022 | 84 | 0.579572 | from __future__ import absolute_import
import tempfile
from bokeh.session import TestSession
from . import test_utils
from ..app import bokeh_app, app
from ..models import user
class TestMultiUserAuth(test_utils.FlaskClientTestCase):
options = {'multi_user' : True}
def test_register(self):
sess = Te... | true | true |
08fba4c405172aa7ac5714e6a3a2289c5eab2c1d | 7,913 | py | Python | tree_util.py | xiaohan2012/lst | 793944d1dd8235adbe2f651270ab12e46ff8f6f7 | [
"MIT"
] | 1 | 2016-07-05T13:10:27.000Z | 2016-07-05T13:10:27.000Z | tree_util.py | xiaohan2012/lst | 793944d1dd8235adbe2f651270ab12e46ff8f6f7 | [
"MIT"
] | null | null | null | tree_util.py | xiaohan2012/lst | 793944d1dd8235adbe2f651270ab12e46ff8f6f7 | [
"MIT"
] | null | null | null | import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import networkx as nx
from subprocess import check_output
from dag_util import get_roots
from test_util import make_path
def to_bracket_notation(tree):
def aux(node):
nbrs = sorted(tree.neighbors(node))
i... | 34.70614 | 265 | 0.550234 | import matplotlib
matplotlib.use('Agg')
import networkx as nx
from subprocess import check_output
from dag_util import get_roots
from test_util import make_path
def to_bracket_notation(tree):
def aux(node):
nbrs = sorted(tree.neighbors(node))
if len(nbrs) == 0:
return '{%s}' % node
... | true | true |
08fba7588a2f966517c85104b6195628fff6640f | 1,064 | py | Python | pythonlearn/user_class.py | kuljotbiring/Python | 743c93b91c5e4a4bf5066cf50e72e5a51d98d1ad | [
"MIT"
] | null | null | null | pythonlearn/user_class.py | kuljotbiring/Python | 743c93b91c5e4a4bf5066cf50e72e5a51d98d1ad | [
"MIT"
] | null | null | null | pythonlearn/user_class.py | kuljotbiring/Python | 743c93b91c5e4a4bf5066cf50e72e5a51d98d1ad | [
"MIT"
] | null | null | null | # Make a class called User. Create two attributes called first_name
# and last_name, and then create several other attributes that are typically stored
# in a user profile. Make a method called describe_user() that prints a summary
# of the user’s information. Make another method called greet_user() that prints
# a per... | 28 | 106 | 0.707707 |
class User:
def __init__(self, name, id_num, location):
self.name = name
self.id_num = id_num
self.location = location
def describe_user(self):
print(f"User Name: {self.name.title()} \nID: {self.id_num} \nLocation: {self.location.title()}\n")
def greet_user(self):
... | true | true |
08fba7cea01fc6709ee024d1ab7f39a5d067daa8 | 54,616 | py | Python | python/pyspark/sql/tests/test_pandas_udf_scalar.py | wangyeweikuer/spark | 731aa2cdf8a78835621fbf3de2d3492b27711d1a | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2022-02-10T11:30:07.000Z | 2022-02-14T18:26:30.000Z | python/pyspark/sql/tests/test_pandas_udf_scalar.py | nyingping/spark | ca7200b0008dc6101a252020e6c34ef7b72d81d6 | [
"Apache-2.0"
] | 6 | 2018-06-14T11:15:27.000Z | 2019-01-27T12:11:23.000Z | python/pyspark/sql/tests/test_pandas_udf_scalar.py | nyingping/spark | ca7200b0008dc6101a252020e6c34ef7b72d81d6 | [
"Apache-2.0"
] | 6 | 2022-01-24T20:07:59.000Z | 2022-01-25T16:11:34.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 41.313162 | 100 | 0.567288 | import os
import random
import shutil
import tempfile
import time
import unittest
from datetime import date, datetime
from decimal import Decimal
from distutils.version import LooseVersion
from typing import cast
from pyspark import TaskContext
from pyspark.rdd import PythonEvalType
from pyspark.sql import Column
from... | true | true |
08fba8ae619e6a43de875282dd7fdd24dc215954 | 1,126 | py | Python | tests/test__nn.py | smnmnkr/geneticNLP | f053cde54f90a3c213e355dc0c4038b0f7583bd0 | [
"MIT"
] | 1 | 2021-02-19T09:12:27.000Z | 2021-02-19T09:12:27.000Z | tests/test__nn.py | smnmnkr/beyondGD | f053cde54f90a3c213e355dc0c4038b0f7583bd0 | [
"MIT"
] | 1 | 2020-11-19T10:45:03.000Z | 2021-01-03T14:15:22.000Z | tests/test__nn.py | smnmnkr/geneticNLP | f053cde54f90a3c213e355dc0c4038b0f7583bd0 | [
"MIT"
] | null | null | null | import torch
from beyondGD.nn import MLP, BILSTM
# config
in_size: int = 16
hid_size: int = 8
sent_len: int = 32
batch_len: int = 48
# inputs
x_vec: torch.Tensor = torch.randn(in_size)
x_mat: torch.Tensor = torch.randn(sent_len, in_size)
x_bat: list = [
torch.randn(sent_len, in_size) for _ in range(batch_len)
]... | 21.653846 | 60 | 0.64032 | import torch
from beyondGD.nn import MLP, BILSTM
in_size: int = 16
hid_size: int = 8
sent_len: int = 32
batch_len: int = 48
x_vec: torch.Tensor = torch.randn(in_size)
x_mat: torch.Tensor = torch.randn(sent_len, in_size)
x_bat: list = [
torch.randn(sent_len, in_size) for _ in range(batch_len)
]
def test_BILSTM... | true | true |
08fbaa81b60d566e4d487f48286033893780b0bd | 27,682 | py | Python | tutorials/raw/plot_10_raw_overview.py | mehrdad-shokri/mne-python | 4c44bd6ae90dd4d5c6c2e925d93f1b2fbf7bda6a | [
"BSD-3-Clause"
] | 3 | 2021-01-04T08:45:56.000Z | 2021-05-19T12:25:59.000Z | tutorials/raw/plot_10_raw_overview.py | mehrdad-shokri/mne-python | 4c44bd6ae90dd4d5c6c2e925d93f1b2fbf7bda6a | [
"BSD-3-Clause"
] | 28 | 2020-05-07T00:58:34.000Z | 2020-08-29T23:02:17.000Z | tutorials/raw/plot_10_raw_overview.py | mehrdad-shokri/mne-python | 4c44bd6ae90dd4d5c6c2e925d93f1b2fbf7bda6a | [
"BSD-3-Clause"
] | 2 | 2021-04-28T11:52:52.000Z | 2021-05-05T02:36:32.000Z | # -*- coding: utf-8 -*-
"""
.. _tut-raw-class:
The Raw data structure: continuous data
=======================================
This tutorial covers the basics of working with raw EEG/MEG data in Python. It
introduces the :class:`~mne.io.Raw` data structure in detail, including how to
load, query, subselect, export, a... | 48.821869 | 79 | 0.616791 |
import os
import numpy as np
import matplotlib.pyplot as plt
import mne
# use the function :func:`mne.io.read_raw_fif` to load the raw data; there are
# reader functions for :ref:`a wide variety of other data formats
# <data-formats>` as well.
#
# There are also :ref:`several other example datasets
# <datasets>` that... | true | true |
08fbaa86be200994a492ea16f3640789282a9da3 | 1,095 | py | Python | bin/mailtest.py | countable-web/satchel | 3f7f99ce2c72de5b67ab560ec89c3b2799313ed2 | [
"MIT"
] | 3 | 2018-08-17T21:06:57.000Z | 2020-08-17T17:08:55.000Z | bin/mailtest.py | countable-web/satchel | 3f7f99ce2c72de5b67ab560ec89c3b2799313ed2 | [
"MIT"
] | 1 | 2020-09-22T16:46:44.000Z | 2020-09-22T16:46:44.000Z | bin/mailtest.py | countable-web/satchel | 3f7f99ce2c72de5b67ab560ec89c3b2799313ed2 | [
"MIT"
] | 1 | 2018-02-20T18:26:29.000Z | 2018-02-20T18:26:29.000Z | import sys
def send_email(TO, SUBJECT, TEXT):
import smtplib
if len(sys.argv) > 1:
user = sys.argv[1]
pwd = sys.argv[2]
if len(sys.argv) > 3:
server_name = sys.argv[3]
else:
server_name = 'sendgrid'
else:
server_name='smtp'
FROM = "no-... | 30.416667 | 81 | 0.585388 | import sys
def send_email(TO, SUBJECT, TEXT):
import smtplib
if len(sys.argv) > 1:
user = sys.argv[1]
pwd = sys.argv[2]
if len(sys.argv) > 3:
server_name = sys.argv[3]
else:
server_name = 'sendgrid'
else:
server_name='smtp'
FROM = "no-... | true | true |
08fbaac10a4b123afc442d5a291a276548fb9b48 | 580 | py | Python | cupy/random/__init__.py | ytoyama/yans_chainer_hackathon | 744e7a5a67da8dec2869879f0adfae2d43eaf75c | [
"MIT"
] | null | null | null | cupy/random/__init__.py | ytoyama/yans_chainer_hackathon | 744e7a5a67da8dec2869879f0adfae2d43eaf75c | [
"MIT"
] | null | null | null | cupy/random/__init__.py | ytoyama/yans_chainer_hackathon | 744e7a5a67da8dec2869879f0adfae2d43eaf75c | [
"MIT"
] | 1 | 2018-11-18T00:36:51.000Z | 2018-11-18T00:36:51.000Z | import numpy
from cupy.random import distributions
from cupy.random import generator
from cupy.random import sample
rand = sample.rand
randn = sample.randn
random_sample = sample.random_sample
random = random_sample
ranf = random_sample
sample = random_sample
bytes = numpy.random.bytes
lognormal = distributions.log... | 23.2 | 47 | 0.836207 | import numpy
from cupy.random import distributions
from cupy.random import generator
from cupy.random import sample
rand = sample.rand
randn = sample.randn
random_sample = sample.random_sample
random = random_sample
ranf = random_sample
sample = random_sample
bytes = numpy.random.bytes
lognormal = distributions.log... | true | true |
08fbaadc8cc4b85cf2cf3bf350ee552fab5cca16 | 25,968 | py | Python | src/toil_vg/vg_toil.py | joye1503/toil-vg | dea60c550c2187c5ae32514789fe9e9ceda1d2f5 | [
"Apache-2.0"
] | 6 | 2019-08-04T17:15:53.000Z | 2022-01-19T03:54:57.000Z | src/toil_vg/vg_toil.py | joye1503/toil-vg | dea60c550c2187c5ae32514789fe9e9ceda1d2f5 | [
"Apache-2.0"
] | 245 | 2017-07-19T16:41:13.000Z | 2021-06-12T05:06:46.000Z | src/toil_vg/vg_toil.py | joye1503/toil-vg | dea60c550c2187c5ae32514789fe9e9ceda1d2f5 | [
"Apache-2.0"
] | 11 | 2017-08-03T05:42:28.000Z | 2021-04-06T08:06:58.000Z | #!/usr/bin/env python
"""
vg_toil.py: Run the mapping and variant calling on all the servers in
parallel using the vg framework.
old docker vg tool=1.4.0--4cbd3aa6d2c0449730975517fc542775f74910f3
new docker vg tool=latest
chr_length_list obtained from Mike Lin's vg dnanexus pipeline configuration
chr_label_list =... | 43.207987 | 255 | 0.620225 | import argparse, sys, os, os.path, errno, random, subprocess, shutil, itertools, glob, tarfile
import doctest, re, json, collections, time, timeit
import logging, logging.handlers, struct, socket, threading
import string
import getpass
import logging
import pkg_resources
from math import ceil
from subprocess import Po... | true | true |
08fbabd90125d3ef9dc255e429b02fbd9877e4c8 | 702 | py | Python | grpc/src/python/grpcio_health_checking/grpc_version.py | DonSchenck/grpc-vs-rest | 09462d40c54103b45f471c4bdbf2a205e759423c | [
"Apache-2.0"
] | 1 | 2018-05-20T01:42:54.000Z | 2018-05-20T01:42:54.000Z | grpc/src/python/grpcio_health_checking/grpc_version.py | DonSchenck/grpc-vs-rest | 09462d40c54103b45f471c4bdbf2a205e759423c | [
"Apache-2.0"
] | null | null | null | grpc/src/python/grpcio_health_checking/grpc_version.py | DonSchenck/grpc-vs-rest | 09462d40c54103b45f471c4bdbf2a205e759423c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 39 | 106 | 0.766382 |
VERSION='1.8.7'
| true | true |
08fbac8160a6f9a0222187db1d39aabc0ced5b40 | 183 | py | Python | tests/web_platform/CSS2/linebox/test_line_height_normal_recommendation.py | fletchgraham/colosseum | 77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f | [
"BSD-3-Clause"
] | null | null | null | tests/web_platform/CSS2/linebox/test_line_height_normal_recommendation.py | fletchgraham/colosseum | 77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f | [
"BSD-3-Clause"
] | null | null | null | tests/web_platform/CSS2/linebox/test_line_height_normal_recommendation.py | fletchgraham/colosseum | 77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f | [
"BSD-3-Clause"
] | 1 | 2020-01-16T01:56:41.000Z | 2020-01-16T01:56:41.000Z | from tests.utils import W3CTestCase
class TestLineHeightNormalRecommendation(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'line-height-normal-recommendation-'))
| 30.5 | 89 | 0.819672 | from tests.utils import W3CTestCase
class TestLineHeightNormalRecommendation(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'line-height-normal-recommendation-'))
| true | true |
08fbada25a5402556d0d09afe5d472e1c65129a3 | 1,008 | py | Python | polling_stations/apps/data_collection/management/commands/import_pembrokeshire.py | alexsdutton/UK-Polling-Stations | 01ec234fd4a832694870d5ed9de069a228397f53 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_collection/management/commands/import_pembrokeshire.py | alexsdutton/UK-Polling-Stations | 01ec234fd4a832694870d5ed9de069a228397f53 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_collection/management/commands/import_pembrokeshire.py | alexsdutton/UK-Polling-Stations | 01ec234fd4a832694870d5ed9de069a228397f53 | [
"BSD-3-Clause"
] | null | null | null | from data_collection.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
srid = 4326
districts_srid = 4326
council_id = "W06000009"
elections = ["parl.2019-12-12"]
scraper_name = "wdiv-scrapers/DC-PollingStations-Pembrokeshire"
geom_type = "geojson"
def district_... | 31.5 | 88 | 0.613095 | from data_collection.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
srid = 4326
districts_srid = 4326
council_id = "W06000009"
elections = ["parl.2019-12-12"]
scraper_name = "wdiv-scrapers/DC-PollingStations-Pembrokeshire"
geom_type = "geojson"
def district_... | true | true |
08fbadba4397bc671e02c11ef04171b5062c7cde | 872 | py | Python | core.py | AbduazizZiyodov/google-it | 04ead41ebf99991a53816d3a3436bc18200534d9 | [
"MIT"
] | 5 | 2021-07-20T05:53:19.000Z | 2022-01-08T16:39:36.000Z | core.py | AbduazizZiyodov/google-it | 04ead41ebf99991a53816d3a3436bc18200534d9 | [
"MIT"
] | null | null | null | core.py | AbduazizZiyodov/google-it | 04ead41ebf99991a53816d3a3436bc18200534d9 | [
"MIT"
] | null | null | null | from googleapiclient.discovery import build
from settings import CSE_ID
from settings import GOOGLE_API_KEY
key, cse = GOOGLE_API_KEY, CSE_ID
service = build("customsearch", "v1", developerKey=key)
def search(search_term: str,
cse_id: str, **kwargs) -> list:
"""
- api_key : https://developers.... | 22.947368 | 79 | 0.62844 | from googleapiclient.discovery import build
from settings import CSE_ID
from settings import GOOGLE_API_KEY
key, cse = GOOGLE_API_KEY, CSE_ID
service = build("customsearch", "v1", developerKey=key)
def search(search_term: str,
cse_id: str, **kwargs) -> list:
response = service.cse().list(q=search... | true | true |
08fbae3ffc5131a02d20502deea0c6a7194df79b | 1,835 | py | Python | TemplateData.py | nicolasgover/DocumentScan | 85eb81e9140c27636749bb5b298d9cbb95e90ec3 | [
"Python-2.0",
"OLDAP-2.7"
] | 5 | 2019-08-23T17:15:33.000Z | 2019-09-17T13:17:12.000Z | TemplateData.py | sunxingxingtf/DocumentScan | 85eb81e9140c27636749bb5b298d9cbb95e90ec3 | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | TemplateData.py | sunxingxingtf/DocumentScan | 85eb81e9140c27636749bb5b298d9cbb95e90ec3 | [
"Python-2.0",
"OLDAP-2.7"
] | 3 | 2020-08-11T22:06:04.000Z | 2022-03-19T03:35:32.000Z | # This class stores the vertices of the text boxes in which the data field
# is expected to be AFTER the image has been aligned with its proper template.
#
# key::
# x1,y1 ------
# | | field = ((x1, y1), (x2, y2))
# | |
# | |
# --------x2,y2
#
# Name of the class is formatted ST_O, wher... | 28.671875 | 84 | 0.617439 | # document or driver's license (V or H)
class SSN_H:
orientation = "HORIZONTAL"
ssn = ((630, 490), (1395, 580))
name = ((270, 670), (1736, 781))
nameFormat = 1
class TX_V:
state = "TEXAS"
orientation = "VERTICAL"
dob = ((1320, 1565), (2200, 1725))
name = ((169, 2310), (2095, 2552))
address = ((171, 2... | false | true |
08fbae6b26e7d50dd14811f220ed5f59d0a0e3db | 7,171 | py | Python | tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | null | null | null | tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | null | null | null | tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | 38.972826 | 123 | 0.640218 |
import os
import shutil
from pathlib import Path
from random import uniform
import pytest
from aea.test_tools.test_cases import AEATestCaseMany
from tests.conftest import (
COSMOS,
COSMOS_PRIVATE_KEY_FILE,
COSMOS_PRIVATE_KEY_FILE_CONNECTION,
CUR_PATH,
MAX_FLAKY_RERUNS_INTEGRATION,
NON_FUNDE... | true | true |
08fbaecdf84b0c8e5d4a005ff819b0dbdd06fb97 | 13,614 | py | Python | test/functional/feature_dbcrash.py | arock121/pocketnet.core | bc08bf9dc565c60d7e7d53e3cc615408b76f9bde | [
"ECL-2.0",
"Apache-2.0"
] | 72 | 2019-06-23T07:48:03.000Z | 2022-03-31T03:47:04.000Z | test/functional/feature_dbcrash.py | arock121/pocketnet.core | bc08bf9dc565c60d7e7d53e3cc615408b76f9bde | [
"ECL-2.0",
"Apache-2.0"
] | 153 | 2021-01-20T08:10:23.000Z | 2022-03-31T23:30:50.000Z | test/functional/feature_dbcrash.py | arock121/pocketnet.core | bc08bf9dc565c60d7e7d53e3cc615408b76f9bde | [
"ECL-2.0",
"Apache-2.0"
] | 20 | 2019-10-10T22:18:25.000Z | 2022-02-12T01:08:29.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Pocketcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test recovery from a crash during chainstate writing.
- 4 nodes
* node0, node1, and node2 will ha... | 47.601399 | 120 | 0.642133 |
import errno
import http.client
import random
import sys
import time
from test_framework.messages import COIN, COutPoint, CTransaction, CTxIn, CTxOut, ToHex
from test_framework.test_framework import PocketcoinTestFramework
from test_framework.util import assert_equal, create_confirmed_utxos, hex_str_to_bytes
HTTP_DI... | true | true |
08fbaee5f047102fc72ba8448887419aa4b62802 | 24,292 | py | Python | airflow/serialization/serialized_objects.py | molei20021/airflow-1-10-9-mod | 0888472c8fc9e7c67ea25616d875685ff460a0f0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/serialization/serialized_objects.py | molei20021/airflow-1-10-9-mod | 0888472c8fc9e7c67ea25616d875685ff460a0f0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/serialization/serialized_objects.py | molei20021/airflow-1-10-9-mod | 0888472c8fc9e7c67ea25616d875685ff460a0f0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-05-28T17:16:38.000Z | 2020-05-28T17:16:38.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 40.690117 | 106 | 0.638276 |
import datetime
import enum
import logging
import six
from typing import TYPE_CHECKING, Optional, Union, Dict
import cattr
import pendulum
from dateutil import relativedelta
from airflow import DAG, AirflowException, LoggingMixin
from airflow.models.baseoperator import BaseOperator, BaseOperatorLink
from airflow.mo... | true | true |
08fbb1963083af4b43cbdf5ed1a31699f523c9c2 | 604 | py | Python | plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='family',
parent_name='scattergeo.marker.colorbar.tickfont',
**kwargs
):
super(FamilyValidator, self).__init__(
plotly_n... | 28.761905 | 68 | 0.604305 | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='family',
parent_name='scattergeo.marker.colorbar.tickfont',
**kwargs
):
super(FamilyValidator, self).__init__(
plotly_n... | true | true |
08fbb28b25e795c9e70803dbef8ed6852155137c | 295 | py | Python | uwsgiconf/contrib/django/uwsgify/admin/__init__.py | graceshaw/uwsgiconf | 205289bb279dfbcc1d9bfd599dd8ca5d6c527077 | [
"BSD-3-Clause"
] | null | null | null | uwsgiconf/contrib/django/uwsgify/admin/__init__.py | graceshaw/uwsgiconf | 205289bb279dfbcc1d9bfd599dd8ca5d6c527077 | [
"BSD-3-Clause"
] | null | null | null | uwsgiconf/contrib/django/uwsgify/admin/__init__.py | graceshaw/uwsgiconf | 205289bb279dfbcc1d9bfd599dd8ca5d6c527077 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from .models import Summary, Configuration, Workers
from .realms import SummaryAdmin, ConfigurationAdmin, WorkersAdmin
admin.site.register(Summary, SummaryAdmin)
admin.site.register(Configuration, ConfigurationAdmin)
admin.site.register(Workers, WorkersAdmin)
| 32.777778 | 66 | 0.844068 | from django.contrib import admin
from .models import Summary, Configuration, Workers
from .realms import SummaryAdmin, ConfigurationAdmin, WorkersAdmin
admin.site.register(Summary, SummaryAdmin)
admin.site.register(Configuration, ConfigurationAdmin)
admin.site.register(Workers, WorkersAdmin)
| true | true |
08fbb2913164117a008a19ff5c43ccd276e9fa80 | 6,703 | py | Python | fpga/lib/axi/tb/axil_ram/test_axil_ram.py | totuwei/corundum | e983ad519fb4523d0ffca32f5e436195bcfc945c | [
"BSD-2-Clause-FreeBSD"
] | 603 | 2018-07-30T05:31:48.000Z | 2022-03-31T02:53:20.000Z | fpga/lib/axi/tb/axil_ram/test_axil_ram.py | totuwei/corundum | e983ad519fb4523d0ffca32f5e436195bcfc945c | [
"BSD-2-Clause-FreeBSD"
] | 31 | 2019-06-26T15:47:41.000Z | 2022-03-22T14:03:01.000Z | fpga/lib/axi/tb/axil_ram/test_axil_ram.py | totuwei/corundum | e983ad519fb4523d0ffca32f5e436195bcfc945c | [
"BSD-2-Clause-FreeBSD"
] | 200 | 2018-08-24T14:11:21.000Z | 2022-03-30T14:40:48.000Z | """
Copyright (c) 2020 Alex Forencich
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, modify, merge, publish, distribute... | 30.330317 | 97 | 0.68626 |
import itertools
import logging
import os
import random
import cocotb_test.simulator
import pytest
import cocotb
from cocotb.clock import Clock
from cocotb.triggers import RisingEdge, Timer
from cocotb.regression import TestFactory
from cocotbext.axi import AxiLiteBus, AxiLiteMaster
class TB(object):
def __in... | true | true |
08fbb29c28272e221b750cbc14299c4063848aa7 | 11,576 | py | Python | sphinxdoc/source/conf.py | j0r1/ErrUt | 5123a368c141750728f12f56950ef959fe635ff2 | [
"MIT"
] | null | null | null | sphinxdoc/source/conf.py | j0r1/ErrUt | 5123a368c141750728f12f56950ef959fe635ff2 | [
"MIT"
] | null | null | null | sphinxdoc/source/conf.py | j0r1/ErrUt | 5123a368c141750728f12f56950ef959fe635ff2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ErrUt documentation build configuration file, created by
# sphinx-quickstart on Fri May 13 17:36:32 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... | 31.286486 | 125 | 0.690221 |
import sys
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'test'
project = 'ErrUt'
copyright = '2018-now'
author = 'Jori Liesenborgs'
# |version| and |release|, also used in various other places throughout the... | true | true |
08fbb2a155e19bf8484678f4bbbd129b7eb12e0d | 327 | py | Python | NAS/AngleNAS/ProxylessNAS/training/config.py | naviocean/SimpleCVReproduction | 61b43e3583977f42e6f91ef176ec5e1701e98d33 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | NAS/AngleNAS/ProxylessNAS/training/config.py | Twenty3hree/SimpleCVReproduction | 9939f8340c54dbd69b0017cecad875dccf428f26 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | NAS/AngleNAS/ProxylessNAS/training/config.py | Twenty3hree/SimpleCVReproduction | 9939f8340c54dbd69b0017cecad875dccf428f26 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | import os
class config:
blocks_keys = [
'mobilenet_3x3_ratio_3',
'mobilenet_3x3_ratio_6',
'mobilenet_5x5_ratio_3',
'mobilenet_5x5_ratio_6',
'mobilenet_7x7_ratio_3',
'mobilenet_7x7_ratio_6'
]
flops_lookup_table = '../../op_flops_dict_gpu.pkl'
model_input_size_imagenet = (1, 3, 22... | 25.153846 | 54 | 0.69419 | import os
class config:
blocks_keys = [
'mobilenet_3x3_ratio_3',
'mobilenet_3x3_ratio_6',
'mobilenet_5x5_ratio_3',
'mobilenet_5x5_ratio_6',
'mobilenet_7x7_ratio_3',
'mobilenet_7x7_ratio_6'
]
flops_lookup_table = '../../op_flops_dict_gpu.pkl'
model_input_size_imagenet = (1, 3, 22... | true | true |
08fbb2d2860bb7f1ee46b6ea51f2beada2b802bc | 385 | py | Python | mindstorms/operator/__init__.py | joniumGit/mindstorms-skeleton | 0921fa7e439532e26b7ccaddaf86abb90437feb4 | [
"MIT"
] | null | null | null | mindstorms/operator/__init__.py | joniumGit/mindstorms-skeleton | 0921fa7e439532e26b7ccaddaf86abb90437feb4 | [
"MIT"
] | null | null | null | mindstorms/operator/__init__.py | joniumGit/mindstorms-skeleton | 0921fa7e439532e26b7ccaddaf86abb90437feb4 | [
"MIT"
] | null | null | null | from typing import TypeVar
_T = TypeVar('_T')
def greater_than(a: _T, b: _T, /) -> bool:
pass
def greater_than_or_equal_to(a: _T, b: _T, /) -> bool:
pass
def less_than(a: _T, b: _T, /) -> bool:
pass
def less_than_or_equal_to(a: _T, b: _T, /) -> bool:
pass
def equal_to(a: _T, b: _T, /) -> bool... | 13.75 | 54 | 0.576623 | from typing import TypeVar
_T = TypeVar('_T')
def greater_than(a: _T, b: _T, /) -> bool:
pass
def greater_than_or_equal_to(a: _T, b: _T, /) -> bool:
pass
def less_than(a: _T, b: _T, /) -> bool:
pass
def less_than_or_equal_to(a: _T, b: _T, /) -> bool:
pass
def equal_to(a: _T, b: _T, /) -> bool... | true | true |
08fbb4003a566052d9204dc219186634827b5d0e | 378 | py | Python | reservation_management/migrations/0015_alter_classroom_options.py | mattiolato98/reservation-ninja | 0e50b218dd9d90f134868bade2ec2934283c12b5 | [
"MIT"
] | 1 | 2022-03-10T11:34:14.000Z | 2022-03-10T11:34:14.000Z | reservation_management/migrations/0015_alter_classroom_options.py | mattiolato98/reservation-ninja | 0e50b218dd9d90f134868bade2ec2934283c12b5 | [
"MIT"
] | null | null | null | reservation_management/migrations/0015_alter_classroom_options.py | mattiolato98/reservation-ninja | 0e50b218dd9d90f134868bade2ec2934283c12b5 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-10-18 14:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('reservation_management', '0014_alter_classroom_options'),
]
operations = [
migrations.AlterModelOptions(
name='classroom',
o... | 21 | 67 | 0.624339 |
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('reservation_management', '0014_alter_classroom_options'),
]
operations = [
migrations.AlterModelOptions(
name='classroom',
options={'ordering': ['building__name']},
... | true | true |
08fbb61da9d517abad4f4522ce12d09c89e121a6 | 2,694 | py | Python | platon_utils/__init__.py | shinnng/platon-utils | 50f2b95279ab12bf295b430b83827d9db440da74 | [
"MIT"
] | null | null | null | platon_utils/__init__.py | shinnng/platon-utils | 50f2b95279ab12bf295b430b83827d9db440da74 | [
"MIT"
] | null | null | null | platon_utils/__init__.py | shinnng/platon-utils | 50f2b95279ab12bf295b430b83827d9db440da74 | [
"MIT"
] | null | null | null | import sys
import warnings
import pkg_resources
from .abi import ( # noqa: F401
event_abi_to_log_topic,
event_signature_to_log_topic,
function_abi_to_4byte_selector,
function_signature_to_4byte_selector,
)
from .address import ( # noqa: F401
is_address,
is_binary_address,
is_canonical_ad... | 23.426087 | 95 | 0.718634 | import sys
import warnings
import pkg_resources
from .abi import ( event_abi_to_log_topic,
event_signature_to_log_topic,
function_abi_to_4byte_selector,
function_signature_to_4byte_selector,
)
from .address import ( is_address,
is_binary_address,
is_canonical_address,
is_checksum_add... | true | true |
08fbb6475eebf46160c7a4a629f3be579fb5ef26 | 5,263 | py | Python | cvpro/PoseEstimationModule.py | Mohak-CODING-HEAVEN/CVPRO | 09a2cb4a428738c9e77f17b71469d55eff5e3699 | [
"MIT"
] | 5 | 2021-07-24T18:20:11.000Z | 2022-03-23T09:58:27.000Z | cvpro/PoseEstimationModule.py | Mohak-CODING-HEAVEN/cvpro | 09a2cb4a428738c9e77f17b71469d55eff5e3699 | [
"MIT"
] | null | null | null | cvpro/PoseEstimationModule.py | Mohak-CODING-HEAVEN/cvpro | 09a2cb4a428738c9e77f17b71469d55eff5e3699 | [
"MIT"
] | null | null | null | """
Pose Estimation Module - CVPRO
BY: MOHAK BAJAJ
CODING HEAVEN
"""
import cv2
import mediapipe as mp
import math
class PoseDetector:
"""
Estimates Pose points of a human body using the mediapipe library.
"""
def __init__(self, mode=False, smooth=True,
detectionCon... | 37.863309 | 81 | 0.506175 |
import cv2
import mediapipe as mp
import math
class PoseDetector:
def __init__(self, mode=False, smooth=True,
detectionCon=0.5 , trackCon=0.5):
self.mode = mode
self.smooth = smooth
self.detectionCon = detectionCon
self.trackCon = trackCon
... | true | true |
08fbb701571c5d75669a969370a8d92184ff05c6 | 10,398 | py | Python | python/istio_api/networking/v1beta1/service_entry_pb2.py | timonwong/istio-api | 9e2d15c4e3d3c613775c5967ef7b9c46fc4b31aa | [
"Apache-2.0"
] | 390 | 2016-12-16T21:47:51.000Z | 2022-03-31T17:51:45.000Z | python/istio_api/networking/v1beta1/service_entry_pb2.py | timonwong/istio-api | 9e2d15c4e3d3c613775c5967ef7b9c46fc4b31aa | [
"Apache-2.0"
] | 1,724 | 2016-12-16T19:57:40.000Z | 2022-03-29T22:16:38.000Z | python/istio_api/networking/v1beta1/service_entry_pb2.py | timonwong/istio-api | 9e2d15c4e3d3c613775c5967ef7b9c46fc4b31aa | [
"Apache-2.0"
] | 492 | 2016-12-16T18:43:29.000Z | 2022-03-26T23:55:02.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: networking/v1beta1/service_entry.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _refle... | 50.721951 | 1,323 | 0.783901 | from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db = _symbol_database.Default()
from google.api import field_behavior_pb2 as google_dot_api_... | true | true |
08fbba495ecda91c0aefb1ae6f7eae30ff92d3e4 | 1,350 | py | Python | experiments/__init__.py | vedenev/receptive_field_research | 0811daeef16f47ead99be56e6e497261d822c242 | [
"MIT"
] | null | null | null | experiments/__init__.py | vedenev/receptive_field_research | 0811daeef16f47ead99be56e6e497261d822c242 | [
"MIT"
] | null | null | null | experiments/__init__.py | vedenev/receptive_field_research | 0811daeef16f47ead99be56e6e497261d822c242 | [
"MIT"
] | null | null | null | from .experiment_field_size_vs_depth import experiment_field_size_vs_depth
from .experiment_field_size_vs_depth_res import \
experiment_field_size_vs_depth_res
from .experiment_field_size_vs_depth_thiner import \
experiment_field_size_vs_depth_thiner
from .experiment_field_size_by_forward_pass import \
expe... | 51.923077 | 74 | 0.902222 | from .experiment_field_size_vs_depth import experiment_field_size_vs_depth
from .experiment_field_size_vs_depth_res import \
experiment_field_size_vs_depth_res
from .experiment_field_size_vs_depth_thiner import \
experiment_field_size_vs_depth_thiner
from .experiment_field_size_by_forward_pass import \
expe... | true | true |
08fbbbbdd29b5fb231dcc37f6b501582a4f3bed3 | 2,605 | py | Python | neural-network/train_and_evaluate.py | luizperes/training-grammar-guru | 62bd0112a41c2833ae1b14c4b39d50c2c0778c25 | [
"Apache-2.0"
] | 1 | 2018-12-05T05:20:08.000Z | 2018-12-05T05:20:08.000Z | neural-network/train_and_evaluate.py | luizperes/training-grammar-guru | 62bd0112a41c2833ae1b14c4b39d50c2c0778c25 | [
"Apache-2.0"
] | 1 | 2018-12-08T19:20:32.000Z | 2018-12-08T20:37:16.000Z | neural-network/train_and_evaluate.py | luizperes/training-grammar-guru | 62bd0112a41c2833ae1b14c4b39d50c2c0778c25 | [
"Apache-2.0"
] | 1 | 2018-12-06T06:50:58.000Z | 2018-12-06T06:50:58.000Z | # Based on https://csil-git1.cs.surrey.sfu.ca/lperesde/nlpclass-1777-pixel/blob/master/evaluator/tmosharr/deep_learning.py
import numpy as np
import pandas as pd
from keras.models import Sequential
from keras.layers import Dense
from keras.wrappers.scikit_learn import KerasClassifier
from keras.utils import np_utils
fr... | 29.602273 | 122 | 0.717466 | import numpy as np
import pandas as pd
from keras.models import Sequential
from keras.layers import Dense
from keras.wrappers.scikit_learn import KerasClassifier
from keras.utils import np_utils
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold
from sklearn.preprocessing impo... | true | true |
08fbbd43c6b21bf983f5cefe8c13c89991b0aed4 | 4,385 | py | Python | pfioh/tests/test_c_snode.py | rschneid1/pfioh | b9bdbdbcd9f4db2c5e843072853efe945332931d | [
"MIT"
] | 1 | 2017-06-22T13:54:46.000Z | 2017-06-22T13:54:46.000Z | pfioh/tests/test_c_snode.py | rschneid1/pfioh | b9bdbdbcd9f4db2c5e843072853efe945332931d | [
"MIT"
] | 34 | 2017-06-13T18:38:02.000Z | 2021-06-02T03:57:20.000Z | pfioh/tests/test_c_snode.py | rschneid1/pfioh | b9bdbdbcd9f4db2c5e843072853efe945332931d | [
"MIT"
] | 20 | 2017-04-13T15:08:56.000Z | 2020-07-17T14:28:02.000Z | from unittest import TestCase
from pfmisc.C_snode import C_stree
import pudb
class TestCSnode(TestCase):
def test_csnode_constructor(self):
aTree = C_stree()
bTree = C_stree()
ATree = C_stree()
aTree.cd('/')
aTree.mkcd('a')
aTree.mknode(['b', 'c'])
aTree.... | 31.775362 | 78 | 0.467047 | from unittest import TestCase
from pfmisc.C_snode import C_stree
import pudb
class TestCSnode(TestCase):
def test_csnode_constructor(self):
aTree = C_stree()
bTree = C_stree()
ATree = C_stree()
aTree.cd('/')
aTree.mkcd('a')
aTree.mknode(['b', 'c'])
aTree.... | true | true |
08fbbdc3aa189e7b7f7100940971957b88e96849 | 14,891 | py | Python | shared/tools/logging.py | DougMahoney/metatools | 112340102962ff0c3e323564357cc4e848939cf7 | [
"Apache-2.0"
] | null | null | null | shared/tools/logging.py | DougMahoney/metatools | 112340102962ff0c3e323564357cc4e848939cf7 | [
"Apache-2.0"
] | null | null | null | shared/tools/logging.py | DougMahoney/metatools | 112340102962ff0c3e323564357cc4e848939cf7 | [
"Apache-2.0"
] | null | null | null | """
Make logging easier!
"""
try:
from com.inductiveautomation.factorypmi.application import FPMIWindow
from com.inductiveautomation.factorypmi.application.components.template import TemplateHolder
except ImportError:
pass # only needed for when the logger's running on a Vision client; gateway won't have this in ... | 35.370546 | 144 | 0.711235 | """
Make logging easier!
"""
try:
from com.inductiveautomation.factorypmi.application import FPMIWindow
from com.inductiveautomation.factorypmi.application.components.template import TemplateHolder
except ImportError:
pass
import sys, re
from shared.tools.meta import currentStackDepth, getObjectByName, GLOBAL_ME... | false | true |
08fbbf4095ca35840fd6fa13a40b9d924baf7e98 | 855 | py | Python | pytorch_lightning/cluster_environments/cluster_environment.py | Palzer/pytorch-lightning | 886702a1af442f33625693a9ba33c669f9fe9535 | [
"Apache-2.0"
] | 2 | 2021-06-24T11:46:53.000Z | 2021-06-24T13:29:50.000Z | pytorch_lightning/cluster_environments/cluster_environment.py | Palzer/pytorch-lightning | 886702a1af442f33625693a9ba33c669f9fe9535 | [
"Apache-2.0"
] | 1 | 2020-11-09T21:07:07.000Z | 2020-11-09T21:07:07.000Z | pytorch_lightning/cluster_environments/cluster_environment.py | zippeurfou/pytorch-lightning | 4018237c309b7d9d6978da73132003615341e04a | [
"Apache-2.0"
] | 1 | 2022-03-21T18:37:54.000Z | 2022-03-21T18:37:54.000Z | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 26.71875 | 74 | 0.71462 |
class ClusterEnvironment:
def __init__(self):
self._world_size = None
def master_address(self):
pass
def master_port(self):
pass
def world_size(self):
return self._world_size
def local_rank(self):
pass
| true | true |
08fbc1843573bfc5a6faa7759bb4da2ff4eb137a | 893 | py | Python | tests/test_wikipedia.py | SteveRutledge/get_wp | 3d4d6ffc4537b062b143dad477e4f53d04194e51 | [
"MIT"
] | null | null | null | tests/test_wikipedia.py | SteveRutledge/get_wp | 3d4d6ffc4537b062b143dad477e4f53d04194e51 | [
"MIT"
] | null | null | null | tests/test_wikipedia.py | SteveRutledge/get_wp | 3d4d6ffc4537b062b143dad477e4f53d04194e51 | [
"MIT"
] | null | null | null | """Test cases for the wikipedia modue."""
from unittest.mock import Mock
import click
import pytest
from get_wp import wikipedia
def test_random_page_uses_given_language(mock_requests_get: Mock) -> None:
"""It selects the specified Wikipedia language edition."""
wikipedia.random_page(language="de")
args... | 31.892857 | 82 | 0.758119 | from unittest.mock import Mock
import click
import pytest
from get_wp import wikipedia
def test_random_page_uses_given_language(mock_requests_get: Mock) -> None:
wikipedia.random_page(language="de")
args, _ = mock_requests_get.call_args
assert "de.wikipedia.org" in args[0]
def test_random_page_returns... | true | true |
08fbc2455bc6dcc5edf59e5f5adf9178dd5e17b8 | 568 | py | Python | mineapy/optim/variables.py | vpandey-om/mineapy | a533196244d17aa69a5846eb6e197bd4899797b0 | [
"Apache-2.0"
] | null | null | null | mineapy/optim/variables.py | vpandey-om/mineapy | a533196244d17aa69a5846eb6e197bd4899797b0 | [
"Apache-2.0"
] | null | null | null | mineapy/optim/variables.py | vpandey-om/mineapy | a533196244d17aa69a5846eb6e197bd4899797b0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
.. module::
:platform: Unix, Windows
:synopsis: flux balance models accounting for expression, thermodynamics, and resource allocation constraints
.. moduleauthor::
Variables declarations
"""
from pytfa.optim.variables import GenericVariable, BinaryVariable, \
ReactionVariable,... | 22.72 | 112 | 0.728873 |
from pytfa.optim.variables import GenericVariable, BinaryVariable, \
ReactionVariable, ModelVariable, GeneVariable, get_binary_type, \
ForwardUseVariable,BackwardUseVariable
class FluxSumVar(ModelVariable):
prefix = 'FSV_'
| true | true |
08fbc2c10bd4440273fa5bc35eff137e906ba9a5 | 14,209 | py | Python | elasticsearch_dsl/field.py | LasseGravesen/elasticsearch-dsl-py | e2030b603899d013a783e6265ebe24210f207294 | [
"Apache-2.0"
] | null | null | null | elasticsearch_dsl/field.py | LasseGravesen/elasticsearch-dsl-py | e2030b603899d013a783e6265ebe24210f207294 | [
"Apache-2.0"
] | null | null | null | elasticsearch_dsl/field.py | LasseGravesen/elasticsearch-dsl-py | e2030b603899d013a783e6265ebe24210f207294 | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 26.558879 | 97 | 0.616581 |
import base64
import copy
import ipaddress
try:
import collections.abc as collections_abc except ImportError:
import collections as collections_abc
from datetime import date, datetime
from dateutil import parser, tz
from six import integer_types, iteritems, string_types
from six.moves import map
from .exc... | true | true |
08fbc431e5a74a321fb6310293287814206291e6 | 4,056 | py | Python | vanilla/patches/purchase_order/barcode_field_in_purchase_order.py | tundebabzy/vanilla | f0c4a9dc30d25144ae1e5ecfa71a40acfd8111e7 | [
"FSFAP"
] | null | null | null | vanilla/patches/purchase_order/barcode_field_in_purchase_order.py | tundebabzy/vanilla | f0c4a9dc30d25144ae1e5ecfa71a40acfd8111e7 | [
"FSFAP"
] | null | null | null | vanilla/patches/purchase_order/barcode_field_in_purchase_order.py | tundebabzy/vanilla | f0c4a9dc30d25144ae1e5ecfa71a40acfd8111e7 | [
"FSFAP"
] | null | null | null | import frappe
def execute():
frappe.reload_doc('buying', 'doctype', 'purchase_order')
# Frappe names custom scripts as `[dt-Client]`. As long as this behavior
# does not change, we are safe
if not frappe.db.exists('Custom Script', 'Purchase Order-Client'):
custom_script = frappe.new_doc('Cu... | 38.264151 | 115 | 0.500986 | import frappe
def execute():
frappe.reload_doc('buying', 'doctype', 'purchase_order')
if not frappe.db.exists('Custom Script', 'Purchase Order-Client'):
custom_script = frappe.new_doc('Custom Script')
custom_script.dt = 'Purchase Order'
custom_script.script = """
let go_ahea... | true | true |
08fbc4a4e722680f01cb2e7472f76e2d7c62a3d9 | 2,608 | py | Python | selfdrive/car/jeepkl/carcontroller.py | barureddy/openpilot | adfb9ac8cd4c67cac4134f9cf2f5f5823056f543 | [
"MIT"
] | null | null | null | selfdrive/car/jeepkl/carcontroller.py | barureddy/openpilot | adfb9ac8cd4c67cac4134f9cf2f5f5823056f543 | [
"MIT"
] | null | null | null | selfdrive/car/jeepkl/carcontroller.py | barureddy/openpilot | adfb9ac8cd4c67cac4134f9cf2f5f5823056f543 | [
"MIT"
] | null | null | null | from selfdrive.car import apply_toyota_steer_torque_limits
from selfdrive.car.jeepkl.jeepklcan import create_lkas_hud, create_lkas_command, \
create_wheel_buttons
from selfdrive.car.jeepkl.values import CAR, CarControllerParams
from opendbc.can.packer import CANPacker
cla... | 37.797101 | 103 | 0.691334 | from selfdrive.car import apply_toyota_steer_torque_limits
from selfdrive.car.jeepkl.jeepklcan import create_lkas_hud, create_lkas_command, \
create_wheel_buttons
from selfdrive.car.jeepkl.values import CAR, CarControllerParams
from opendbc.can.packer import CANPacker
cla... | true | true |
08fbc4c1d86e46788f2de410f94472bcd70bed06 | 391 | py | Python | src/pytest_pyppeteer/hooks.py | datadavev/pytest-pyppeteer | dce25f8960a102818c14b0c158146c3368d6d66a | [
"MIT"
] | 13 | 2020-08-26T03:03:47.000Z | 2022-03-31T07:46:31.000Z | src/pytest_pyppeteer/hooks.py | datadavev/pytest-pyppeteer | dce25f8960a102818c14b0c158146c3368d6d66a | [
"MIT"
] | 20 | 2020-08-19T08:11:02.000Z | 2022-03-31T07:39:30.000Z | src/pytest_pyppeteer/hooks.py | datadavev/pytest-pyppeteer | dce25f8960a102818c14b0c158146c3368d6d66a | [
"MIT"
] | 2 | 2020-09-09T05:26:23.000Z | 2021-02-20T09:24:45.000Z | from typing import TYPE_CHECKING
if TYPE_CHECKING:
from _pytest.nodes import Item
async def pytest_pyppeteer_runtest_makereport_call_debug(item: "Item") -> None:
"""Called to add debug information when each of the call(not
setup/teardown) runtest phases of a test failed item. e.g.
save screenshot.
... | 26.066667 | 79 | 0.726343 | from typing import TYPE_CHECKING
if TYPE_CHECKING:
from _pytest.nodes import Item
async def pytest_pyppeteer_runtest_makereport_call_debug(item: "Item") -> None:
| true | true |
08fbc5d85388901751f2d7a3e509f5c7c34fea08 | 345 | py | Python | carver/swf/setup.py | maydewd/stoq-plugins-public | 8b2877b5091ae731437ef35a95d4debdbf0a19f3 | [
"Apache-2.0"
] | null | null | null | carver/swf/setup.py | maydewd/stoq-plugins-public | 8b2877b5091ae731437ef35a95d4debdbf0a19f3 | [
"Apache-2.0"
] | null | null | null | carver/swf/setup.py | maydewd/stoq-plugins-public | 8b2877b5091ae731437ef35a95d4debdbf0a19f3 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="swf",
version="0.10",
author="Marcus LaFerrera (@mlaferrera)",
url="https://github.com/PUNCH-Cyber/stoq-plugins-public",
license="Apache License 2.0",
description="Carve and decompress SWF payloads",
packages=find_packages(),
incl... | 26.538462 | 61 | 0.701449 | from setuptools import setup, find_packages
setup(
name="swf",
version="0.10",
author="Marcus LaFerrera (@mlaferrera)",
url="https://github.com/PUNCH-Cyber/stoq-plugins-public",
license="Apache License 2.0",
description="Carve and decompress SWF payloads",
packages=find_packages(),
incl... | true | true |
08fbc6c01e716e9a195a14601b680f804be81f3b | 7,997 | py | Python | app.py | Miura55/liffpay-bot | b2a72995e8e16c325b65c76e5f59e0c867d2c1a7 | [
"MIT"
] | null | null | null | app.py | Miura55/liffpay-bot | b2a72995e8e16c325b65c76e5f59e0c867d2c1a7 | [
"MIT"
] | null | null | null | app.py | Miura55/liffpay-bot | b2a72995e8e16c325b65c76e5f59e0c867d2c1a7 | [
"MIT"
] | null | null | null | import os
from flask import Flask, request, abort, render_template, redirect
import requests
from flask_bootstrap import Bootstrap
from flask_cors import CORS
import urllib.parse
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.models import (
MessageEvent,
TextMessage,
TextSendMessage,
... | 34.921397 | 185 | 0.607603 | import os
from flask import Flask, request, abort, render_template, redirect
import requests
from flask_bootstrap import Bootstrap
from flask_cors import CORS
import urllib.parse
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.models import (
MessageEvent,
TextMessage,
TextSendMessage,
... | true | true |
08fbc81703ac8e1730045ad79642e4134020b63b | 2,983 | py | Python | other/game_of_life/game_o_life.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | other/game_of_life/game_o_life.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | other/game_of_life/game_o_life.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | '''Conway's Game Of Life, Author Anurag Kumar(mailto:anuragkumarak95@gmail.com)
Requirements:
- numpy
- random
- time
- matplotlib
Python:
- 3.5
Usage:
- $python3 game_o_life <canvas_size:int>
Game-Of-Life Rules:
1.
Any live cell with fewer than two live neighbours
dies, as if caused by under-popu... | 22.946154 | 123 | 0.610795 | import numpy as np
import random
import time
import sys
from matplotlib import pyplot as plt
import matplotlib.animation as animation
from matplotlib.colors import ListedColormap
usage_doc = 'Usage of script: script_nama <size_of_canvas:int>'
choice = [0]*100 + [1]*10
random.shuffle(choice)
def create_canvas(size):... | true | true |
08fbc855aa5cc3798fa8c6bf0f2f5b72ddd4a0d3 | 1,369 | py | Python | setup.py | dineshj1/tensorboard-pytorch | f799385f6023c86933c501a030a4c03605e597f4 | [
"MIT"
] | 5 | 2018-07-03T18:40:49.000Z | 2019-04-11T13:58:30.000Z | setup.py | dineshj1/tensorboard-pytorch | f799385f6023c86933c501a030a4c03605e597f4 | [
"MIT"
] | null | null | null | setup.py | dineshj1/tensorboard-pytorch | f799385f6023c86933c501a030a4c03605e597f4 | [
"MIT"
] | 3 | 2018-07-27T01:14:45.000Z | 2019-04-11T13:58:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'numpy',
'protobuf >= 0.3.2',
'six',
]
test_requirements = [
'pytest',
]
setup(
name='tensorboardX',
versio... | 26.843137 | 78 | 0.632579 |
from setuptools import setup, find_packages
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'numpy',
'protobuf >= 0.3.2',
'six',
]
test_requirements = [
'pytest',
]
setup(
name='tensorboardX',
version='1.2',
description='TensorBoardX lets yo... | true | true |
08fbc877c3983db8853444590882bfec521e9638 | 231 | py | Python | OOP/Exams/Exam_10_april_2021/01. Structure_Skeleton (2)/exam_skeleton/project/fish/saltwater_fish.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | 2 | 2022-03-05T13:17:12.000Z | 2022-03-05T13:17:16.000Z | OOP/Exams/Exam_10_april_2021/01. Structure_Skeleton (2)/exam_skeleton/project/fish/saltwater_fish.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | null | null | null | OOP/Exams/Exam_10_april_2021/01. Structure_Skeleton (2)/exam_skeleton/project/fish/saltwater_fish.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | null | null | null | from project.fish.base_fish import BaseFish
class SaltwaterFish(BaseFish):
def __init__(self, name: str, species: str, price: float):
super().__init__(name, species, 5, price)
def eat(self):
self.size+=2 | 23.1 | 62 | 0.670996 | from project.fish.base_fish import BaseFish
class SaltwaterFish(BaseFish):
def __init__(self, name: str, species: str, price: float):
super().__init__(name, species, 5, price)
def eat(self):
self.size+=2 | true | true |
08fbc905f51a78a1d9df07c8a4b5887fd3be59e7 | 1,605 | py | Python | dosync/models.py | NSpehler/dosync | 2cbafb6db261d7f7e01c2847b2a2896b04d18abf | [
"MIT"
] | null | null | null | dosync/models.py | NSpehler/dosync | 2cbafb6db261d7f7e01c2847b2a2896b04d18abf | [
"MIT"
] | null | null | null | dosync/models.py | NSpehler/dosync | 2cbafb6db261d7f7e01c2847b2a2896b04d18abf | [
"MIT"
] | null | null | null | from mongoengine import *
from datetime import datetime
class Keyword(EmbeddedDocument):
id = IntField(required=True)
AdsetId = IntField(required=True)
name = StringField(required=True)
text = StringField(required=True)
createdAt = DateTimeField(default=datetime.utcnow)
class Ad(EmbeddedDocument... | 30.865385 | 56 | 0.732087 | from mongoengine import *
from datetime import datetime
class Keyword(EmbeddedDocument):
id = IntField(required=True)
AdsetId = IntField(required=True)
name = StringField(required=True)
text = StringField(required=True)
createdAt = DateTimeField(default=datetime.utcnow)
class Ad(EmbeddedDocument... | true | true |
08fbc9740226f2da76a5c3fa7b079be379d241de | 6,029 | py | Python | main.py | MrFasolo97/yt2ipfs | 584fb163f835159565426e7619cccc6a45968411 | [
"MIT"
] | null | null | null | main.py | MrFasolo97/yt2ipfs | 584fb163f835159565426e7619cccc6a45968411 | [
"MIT"
] | null | null | null | main.py | MrFasolo97/yt2ipfs | 584fb163f835159565426e7619cccc6a45968411 | [
"MIT"
] | null | null | null | #!/usr/bin/python37
import requests
import json
import flask
from flask import request
from flask_restful import Api
import ipfshttpclient
import asyncio
import subprocess
import os
import shutil
from waitress import serve
import inspect
IPFS_NODE_ADDR = ""
PORT = -1
API_PATH = ""
try:
config_file = open("./confi... | 31.731579 | 116 | 0.63659 | import requests
import json
import flask
from flask import request
from flask_restful import Api
import ipfshttpclient
import asyncio
import subprocess
import os
import shutil
from waitress import serve
import inspect
IPFS_NODE_ADDR = ""
PORT = -1
API_PATH = ""
try:
config_file = open("./config.json")
config ... | true | true |
08fbca585731163367943ee82af61d788d870a7c | 5,161 | py | Python | pyannote/core/time.py | gw17/pyannote-core | ccbb3c07d1c1c577391d05a296858287cd9e0dfb | [
"MIT"
] | null | null | null | pyannote/core/time.py | gw17/pyannote-core | ccbb3c07d1c1c577391d05a296858287cd9e0dfb | [
"MIT"
] | null | null | null | pyannote/core/time.py | gw17/pyannote-core | ccbb3c07d1c1c577391d05a296858287cd9e0dfb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2014 CNRS
# 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 ... | 26.331633 | 81 | 0.58477 |
from __future__ import unicode_literals
import itertools
class _TAnchored(float):
def __new__(cls, t):
return float.__new__(cls, t)
@property
def anchored(self):
return True
@property
def drifting(self):
return False
def __str__(self):
if float(sel... | true | true |
08fbca9863d4f217fb726359fcc980f5335d7468 | 8,928 | py | Python | tests/core/test_events.py | cianclarke/rasa | c866e14bca14787169139b8fed8e6388136b139c | [
"Apache-2.0"
] | 4 | 2019-12-06T22:21:15.000Z | 2021-04-23T21:54:39.000Z | tests/core/test_events.py | botfront/rasa | 6e7ced4d56165a0c6f018afe9d08700331b731b1 | [
"Apache-2.0"
] | 3 | 2020-09-26T01:29:46.000Z | 2021-05-21T16:46:15.000Z | tests/core/test_events.py | botfront/rasa | 6e7ced4d56165a0c6f018afe9d08700331b731b1 | [
"Apache-2.0"
] | null | null | null | import time
from typing import Type
import pytz
from datetime import datetime
import copy
import pytest
from dateutil import parser
from rasa.core import utils
from rasa.core.events import (
Event,
UserUttered,
SlotSet,
Restarted,
ActionExecuted,
AllSlotsReset,
ReminderScheduled,
Conve... | 28.8 | 84 | 0.62332 | import time
from typing import Type
import pytz
from datetime import datetime
import copy
import pytest
from dateutil import parser
from rasa.core import utils
from rasa.core.events import (
Event,
UserUttered,
SlotSet,
Restarted,
ActionExecuted,
AllSlotsReset,
ReminderScheduled,
Conve... | true | true |
08fbcc7385275a4e1ca61e8fb7d46a9f7c918eef | 7,956 | py | Python | docs/conf.py | speedplane/djangoappengine | 6f9f5144bbf66e2bc0a5e8e3c6b96b1a0f8e2350 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | speedplane/djangoappengine | 6f9f5144bbf66e2bc0a5e8e3c6b96b1a0f8e2350 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | speedplane/djangoappengine | 6f9f5144bbf66e2bc0a5e8e3c6b96b1a0f8e2350 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Django App Engine documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 20 20:01:39 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | 32.740741 | 110 | 0.718451 |
import sys, os
extensions = []
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Django App Engine'
copyright = u'2011, AllButtonsPressed, Potato London, Wilfred Hughes'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# Th... | true | true |
08fbccacdb14dc42e673af42b1596c89e5830d42 | 597 | py | Python | ariadne_jwt/shortcuts.py | abaumg/ariadne-jwt | edb9d63b27cf072da4f9940ed81db9d21d95307a | [
"MIT"
] | 24 | 2020-09-05T17:34:16.000Z | 2022-03-17T11:45:55.000Z | ariadne_jwt/shortcuts.py | abaumg/ariadne-jwt | edb9d63b27cf072da4f9940ed81db9d21d95307a | [
"MIT"
] | 16 | 2020-09-05T16:55:49.000Z | 2022-03-20T16:44:25.000Z | ariadne_jwt/shortcuts.py | abaumg/ariadne-jwt | edb9d63b27cf072da4f9940ed81db9d21d95307a | [
"MIT"
] | 12 | 2020-09-15T21:53:48.000Z | 2022-03-20T15:07:43.000Z | from .settings import jwt_settings
from .utils import get_payload, get_user_by_payload
from .refresh_token.shortcuts import create_refresh_token, get_refresh_token
__all__ = [
'get_token',
'get_user_by_token',
'get_refresh_token',
'create_refresh_token',
]
def get_token(user, context=None, **extra):
... | 27.136364 | 76 | 0.772194 | from .settings import jwt_settings
from .utils import get_payload, get_user_by_payload
from .refresh_token.shortcuts import create_refresh_token, get_refresh_token
__all__ = [
'get_token',
'get_user_by_token',
'get_refresh_token',
'create_refresh_token',
]
def get_token(user, context=None, **extra):
... | true | true |
08fbce1d0e2d517915debae152a6f0059a60ddbe | 2,557 | py | Python | programs/needlemanwunsch.py | aditi-goyal-523/learning_python | 809a489f8d21f27dd6516080630774121827b1ab | [
"MIT"
] | null | null | null | programs/needlemanwunsch.py | aditi-goyal-523/learning_python | 809a489f8d21f27dd6516080630774121827b1ab | [
"MIT"
] | null | null | null | programs/needlemanwunsch.py | aditi-goyal-523/learning_python | 809a489f8d21f27dd6516080630774121827b1ab | [
"MIT"
] | null | null | null | import sys
import argparse
import seqlib
parser=argparse.ArgumentParser(description="Global alignment using NW alg")
parser.add_argument("--s1", required=True, type=str, metavar='<path>')
parser.add_argument("--s2", required=True, type=str, metavar='<path>')
parser.add_argument("--match", required=True, type=int)
pars... | 19.669231 | 75 | 0.645679 | import sys
import argparse
import seqlib
parser=argparse.ArgumentParser(description="Global alignment using NW alg")
parser.add_argument("--s1", required=True, type=str, metavar='<path>')
parser.add_argument("--s2", required=True, type=str, metavar='<path>')
parser.add_argument("--match", required=True, type=int)
pars... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.