hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38e1e7db725d0845318045c3b7cfdd64006eea23 | 5,681 | py | Python | qnarre/prep/feature/perceiver.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/feature/perceiver.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/feature/perceiver.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | import numpy as np
from PIL import Image
from ...feature_extraction_utils import BatchFeature, FeatureExtractionMixin
from ...image_utils import (
IMAGENET_DEFAULT_MEAN,
IMAGENET_DEFAULT_STD,
ImageFeatureExtractionMixin,
ImageInput,
is_torch_tensor,
)
from ...utils import TensorType, logging
logg... | 36.184713 | 136 | 0.600951 |
38e251d89ea61b18d17902dd08f54aaecf487061 | 19,583 | py | Python | tests/commands/test_commands.py | hongsookim/bigchaindb-sharding | b8af70ab77fb4d186cc227a8076e268a3ec8544b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | tests/commands/test_commands.py | hongsookim/bigchaindb-sharding | b8af70ab77fb4d186cc227a8076e268a3ec8544b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | tests/commands/test_commands.py | hongsookim/bigchaindb-sharding | b8af70ab77fb4d186cc227a8076e268a3ec8544b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # Copyright BigchainDB GmbH and BigchainDB contributors
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import json
import logging
from unittest.mock import Mock, patch
from argparse import Namespace
import pytest
from bigchaindb import ValidatorElection
def test_... | 37.878143 | 110 | 0.67528 |
38e25278d10c3cab55b730e0f82cd9beff703da8 | 545 | py | Python | day01/puzzle1.py | techrabbit58/AdventOfCode2020 | 9e0f4a633f50f5dd48186d38fe58ad8d40dff387 | [
"Unlicense"
] | 1 | 2020-12-15T22:27:38.000Z | 2020-12-15T22:27:38.000Z | day01/puzzle1.py | techrabbit58/AdventOfCode2020 | 9e0f4a633f50f5dd48186d38fe58ad8d40dff387 | [
"Unlicense"
] | null | null | null | day01/puzzle1.py | techrabbit58/AdventOfCode2020 | 9e0f4a633f50f5dd48186d38fe58ad8d40dff387 | [
"Unlicense"
] | null | null | null | """
Advent Of Code 2020. Day 01. Puzzle 1.
Find, from a set of numbers, the two numbers that, when added,
give 2020 as a result.
Return the production of these two numbers.
"""
input_file = 'day01.txt'
def solution(puzzle_input):
with open(puzzle_input) as f:
numbers = {int(x) for x in f.read().strip().sp... | 22.708333 | 62 | 0.618349 |
38e257d6e66854b27ab231d764e23cb00c8db52d | 5,200 | py | Python | middleman/main.py | botsarefuture/middleman | 3d774c2a9bf30ee1d33b143a3fc114b9536dd3bb | [
"Apache-2.0"
] | null | null | null | middleman/main.py | botsarefuture/middleman | 3d774c2a9bf30ee1d33b143a3fc114b9536dd3bb | [
"Apache-2.0"
] | null | null | null | middleman/main.py | botsarefuture/middleman | 3d774c2a9bf30ee1d33b143a3fc114b9536dd3bb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import logging
from time import sleep
# noinspection PyPackageRequirements
from aiohttp import ClientConnectionError, ServerDisconnectedError
# noinspection PyPackageRequirements
from nio import (
AsyncClient,
AsyncClientConfig,
ForwardedRoomKeyEvent,
InviteMemberEvent,
JoinE... | 36.879433 | 108 | 0.6225 |
38e25d5270b03a22b57d0c8775a18da30742d3c8 | 2,614 | py | Python | sdk/synapse/azure-synapse-artifacts/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/synapse/azure-synapse-artifacts/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/synapse/azure-synapse-artifacts/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.853333 | 91 | 0.608263 |
38e27bf3c4118a6bd70992638e015c708cf73279 | 1,385 | py | Python | lhotse/dataset/cut_transforms/extra_padding.py | fanlu/lhotse | 1573cd5c317e196e6945cefbc364ea9ea9de192a | [
"Apache-2.0"
] | null | null | null | lhotse/dataset/cut_transforms/extra_padding.py | fanlu/lhotse | 1573cd5c317e196e6945cefbc364ea9ea9de192a | [
"Apache-2.0"
] | null | null | null | lhotse/dataset/cut_transforms/extra_padding.py | fanlu/lhotse | 1573cd5c317e196e6945cefbc364ea9ea9de192a | [
"Apache-2.0"
] | null | null | null | from lhotse import CutSet
from lhotse.utils import LOG_EPSILON
class ExtraPadding:
"""
A transform on batch of cuts (``CutSet``) that adds a number of
extra context frames on both sides of the cut.
It is intended mainly for training frame-synchronous ASR models
with convolutional layers to avoid ... | 33.780488 | 93 | 0.648375 |
38e2a1a1246335380e24b80888a9676954a7f16d | 364 | py | Python | river/time_series/__init__.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/time_series/__init__.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/time_series/__init__.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | """Time series forecasting."""
from . import base
from .evaluate import evaluate, iter_evaluate
from .holt_winters import HoltWinters
from .metrics import ForecastingMetric, HorizonMetric
from .snarimax import SNARIMAX
__all__ = [
"base",
"evaluate",
"iter_evaluate",
"ForecastingMetric",
"HorizonMe... | 21.411765 | 53 | 0.717033 |
38e2da426931d5d14c3977a778502339c309768a | 1,538 | py | Python | glibc/nptl/test-cond-printers.py | chyidl/mirror-glibc | 3b17633afc85a9fb8cba0edc365d19403158c5a0 | [
"BSD-3-Clause"
] | null | null | null | glibc/nptl/test-cond-printers.py | chyidl/mirror-glibc | 3b17633afc85a9fb8cba0edc365d19403158c5a0 | [
"BSD-3-Clause"
] | null | null | null | glibc/nptl/test-cond-printers.py | chyidl/mirror-glibc | 3b17633afc85a9fb8cba0edc365d19403158c5a0 | [
"BSD-3-Clause"
] | null | null | null | # Common tests for the ConditionVariablePrinter class.
#
# Copyright (C) 2016-2020 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Fr... | 30.156863 | 89 | 0.73407 |
38e3060cb3817c5c0e9ae334dedcb637b1267e15 | 4,032 | py | Python | tests/test_helpers_directory.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | tests/test_helpers_directory.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | tests/test_helpers_directory.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | # pylint:disable=line-too-long
"""
The tool to check the availability or syntax of domains, IPv4, IPv6 or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ ████... | 30.315789 | 88 | 0.601935 |
38e310880a16053a056516855bbc5978db89e6ca | 522 | py | Python | asteroid/__init__.py | hushell/asteroid | 73d93c8af734b0d985c67013e9f4a8462d1a924f | [
"MIT"
] | null | null | null | asteroid/__init__.py | hushell/asteroid | 73d93c8af734b0d985c67013e9f4a8462d1a924f | [
"MIT"
] | null | null | null | asteroid/__init__.py | hushell/asteroid | 73d93c8af734b0d985c67013e9f4a8462d1a924f | [
"MIT"
] | null | null | null | import pathlib
from .utils import deprecation_utils, torch_utils # noqa
from .models import ConvTasNet, DPRNNTasNet, DPTNet, LSTMTasNet, DeMask
project_root = str(pathlib.Path(__file__).expanduser().absolute().parent.parent)
__version__ = "0.3.3"
def show_available_models():
from .utils.hub_utils import MODELS_... | 22.695652 | 80 | 0.720307 |
38e32805a14d0b0cfa8ba2d60a23fe601e7eb635 | 9,532 | py | Python | st2actions/st2actions/runners/httprunner.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | null | null | null | st2actions/st2actions/runners/httprunner.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | null | null | null | st2actions/st2actions/runners/httprunner.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 34.28777 | 95 | 0.630193 |
38e3673d6cbe661d508098d4a0751726f9b1a595 | 267 | py | Python | src/version.py | SoManyHs/amazon-ecs-intellisense-schema | eebc768e927052f222bca7bb16ffc1fe1b791f06 | [
"Apache-2.0"
] | 2 | 2020-07-31T13:34:40.000Z | 2021-06-29T22:49:22.000Z | src/version.py | SoManyHs/amazon-ecs-intellisense-schema | eebc768e927052f222bca7bb16ffc1fe1b791f06 | [
"Apache-2.0"
] | null | null | null | src/version.py | SoManyHs/amazon-ecs-intellisense-schema | eebc768e927052f222bca7bb16ffc1fe1b791f06 | [
"Apache-2.0"
] | 1 | 2020-07-28T00:41:20.000Z | 2020-07-28T00:41:20.000Z | # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
See the most recent version number for AWS SDK Go here:
https://github.com/aws/aws-sdk-go/releases
"""
schema_version = 'v1.2.0'
sdk_go_version = 'v1.33.9'
| 26.7 | 67 | 0.734082 |
38e375faf8bc926d86ac3894863f1569dafa759c | 1,964 | py | Python | pims/tests/test_process.py | tsmbland/pims | 4f51b31f6a5bac41f4c680c7db1396f00838369e | [
"BSD-3-Clause"
] | 208 | 2015-02-15T19:08:15.000Z | 2022-03-24T09:35:04.000Z | pims/tests/test_process.py | tsmbland/pims | 4f51b31f6a5bac41f4c680c7db1396f00838369e | [
"BSD-3-Clause"
] | 264 | 2015-01-07T10:54:33.000Z | 2022-03-24T12:46:07.000Z | pims/tests/test_process.py | tsmbland/pims | 4f51b31f6a5bac41f4c680c7db1396f00838369e | [
"BSD-3-Clause"
] | 60 | 2015-04-15T14:12:43.000Z | 2021-12-13T15:43:38.000Z | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import os
import unittest
import numpy as np
from numpy.testing import assert_equal
from pims import FramesSequence, Frame
from pims.process import crop
class RandomReader(FramesSequence):
def... | 30.215385 | 76 | 0.642057 |
38e3862cdc4a07e3b54c7c90d4a3e41ca2859cfc | 2,306 | py | Python | tests/integration/multi_table/test_multi_single_table.py | ZhuofanXie/SDMetrics | a89fa4177b9ff2aa1ee6dfaef0b908581109fe55 | [
"MIT"
] | 1 | 2021-03-12T06:13:11.000Z | 2021-03-12T06:13:11.000Z | tests/integration/multi_table/test_multi_single_table.py | ZhuofanXie/SDMetrics | a89fa4177b9ff2aa1ee6dfaef0b908581109fe55 | [
"MIT"
] | null | null | null | tests/integration/multi_table/test_multi_single_table.py | ZhuofanXie/SDMetrics | a89fa4177b9ff2aa1ee6dfaef0b908581109fe55 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pytest
from sdmetrics.multi_table.multi_single_table import (
CSTest, KSTest, LogisticDetection, SVCDetection)
METRICS = [CSTest, KSTest, LogisticDetection, SVCDetection]
@pytest.fixture
def ones():
data = pd.DataFrame({
'a': [1] * 100,
'b': [Tru... | 24.531915 | 61 | 0.58196 |
38e38c6d500f8ffe53e254ee9be74825e902a577 | 4,087 | py | Python | st2common/st2common/triggers.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/triggers.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2common/st2common/triggers.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 41.704082 | 96 | 0.713971 |
38e39e63a31d315370e0dd7d988d68407541d087 | 9,639 | py | Python | embiggen/edge_label_prediction/edge_label_prediction_sklearn/sklearn_edge_label_prediction_adapter.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/edge_label_prediction/edge_label_prediction_sklearn/sklearn_edge_label_prediction_adapter.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/edge_label_prediction/edge_label_prediction_sklearn/sklearn_edge_label_prediction_adapter.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Module providing adapter class making edge-label prediction possible in sklearn models."""
from sklearn.base import ClassifierMixin
from typing import Type, List, Dict, Optional, Any
import numpy as np
import copy
from ensmallen import Graph
from embiggen.utils.sklearn_utils import must_be_an_sklearn_classifier_mode... | 37.505837 | 103 | 0.62963 |
38e3e15a00022803ebffe47621f228f892879a96 | 436 | py | Python | mflix/auth_service/auth/models.py | Ziang-Lu/Intro-to-MongoDB | e8fe0241569c24d7b132863ebfd763fe6e1146f4 | [
"MIT"
] | 2 | 2020-05-12T11:51:13.000Z | 2020-05-14T19:48:11.000Z | mflix/auth_service/auth/models.py | Ziang-Lu/Intro-to-MongoDB | e8fe0241569c24d7b132863ebfd763fe6e1146f4 | [
"MIT"
] | 1 | 2020-05-14T20:04:18.000Z | 2020-05-14T20:04:18.000Z | mflix/auth_service/auth/models.py | SatYu26/Mflix-Using-MongoDB | cb69c54e8d06a4bc72622e0ec8f1c4ba881e478b | [
"MIT"
] | 4 | 2019-03-21T01:58:59.000Z | 2020-05-31T16:04:49.000Z | # -*- coding: utf-8 -*-
"""
Authentication-related models module.
"""
from marshmallow import EXCLUDE, fields
from . import ma
class UserSchema(ma.Schema):
"""
User schema.
"""
_id = fields.Str(dump_only=True)
username = fields.Str(required=True)
email = fields.Email(required=True)
pw ... | 16.148148 | 50 | 0.651376 |
38e44834244b9f92f19e277202f99b99098934c3 | 2,100 | py | Python | python/phonenumbers/data/region_DO.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_DO.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_DO.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. DO metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_DO = PhoneMetadata(id='DO', country_code=1, international_prefix='011',
general_desc=PhoneNumberDesc(national_number_pattern='[589]\\d{9}', possible_number_pattern='\\... | 100 | 485 | 0.71381 |
38e45591bdde004962855ac3162ff288ee346f4d | 8,696 | py | Python | algorithms/pointspectrum/pointspectrum.py | mpoiitis/iSpine | 333c5c6326c7052a673ce89eabadb476031c7a35 | [
"MIT"
] | 4 | 2021-02-07T01:06:03.000Z | 2021-09-07T11:55:46.000Z | algorithms/pointspectrum/pointspectrum.py | mpoiitis/iSpine | 333c5c6326c7052a673ce89eabadb476031c7a35 | [
"MIT"
] | 1 | 2021-04-13T07:29:50.000Z | 2021-04-13T09:46:13.000Z | algorithms/pointspectrum/pointspectrum.py | mpoiitis/iSpine | 333c5c6326c7052a673ce89eabadb476031c7a35 | [
"MIT"
] | 1 | 2022-03-27T01:01:18.000Z | 2022-03-27T01:01:18.000Z | import numpy as np
import scipy.sparse as sp
from torch_geometric.datasets import Planetoid
from torch_geometric.transforms import NormalizeFeatures
from torch_geometric.utils import to_dense_adj, train_test_split_edges
import torch
import pickle
import time
import random
import os
from sklearn.cluster import KMeans
fr... | 42.627451 | 296 | 0.609246 |
38e45816ee9f6dcda80b8aadd1052f2431cbcc1d | 6,336 | py | Python | forte/data/data_utils.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | forte/data/data_utils.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | forte/data/data_utils.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte 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 applicable ... | 32.492308 | 79 | 0.634628 |
38e4853ce183c8bc4793af91f50f8389cc2bc524 | 733 | py | Python | gavPrj/tiretest.py | GavinK-ai/cv | 6dd11b2100c40aca281508c3821c807ef0ee227d | [
"MIT"
] | 1 | 2021-11-15T06:16:44.000Z | 2021-11-15T06:16:44.000Z | gavPrj/tiretest.py | JKai96/cv | 6dd11b2100c40aca281508c3821c807ef0ee227d | [
"MIT"
] | null | null | null | gavPrj/tiretest.py | JKai96/cv | 6dd11b2100c40aca281508c3821c807ef0ee227d | [
"MIT"
] | null | null | null |
import dataset_core
import numpy as np
import matplotlib.pyplot as plt
fileName = 'tiredataset.npz'
if __name__ == '__main__':
# Load data from dataset
data = np.load(fileName, allow_pickle=True)
#Display image
imgList = data['images']
labelList = data['labels']
img = imgList[0]... | 13.830189 | 47 | 0.564802 |
38e492b92192fe6050cefcfdb37dfe155d2e008d | 526 | py | Python | trinity/protocol/les/validators.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | trinity/protocol/les/validators.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 2 | 2019-04-30T06:22:12.000Z | 2019-06-14T04:27:18.000Z | trinity/protocol/les/validators.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 2 | 2019-12-14T02:52:32.000Z | 2021-02-18T23:04:44.000Z | from typing import (
Any,
Dict,
)
from eth_utils import (
ValidationError,
)
from trinity.protocol.common.validators import (
BaseBlockHeadersValidator,
)
from . import constants
class GetBlockHeadersValidator(BaseBlockHeadersValidator):
protocol_max_request_size = constants.MAX_HEADERS_FETCH
... | 22.869565 | 88 | 0.743346 |
38e49b28abfdc7089f2b04de3f13661586589dd6 | 5,475 | py | Python | django_codemod/cli.py | cvanderkolk/django-codemod | 9d03ebbf98285e408bacf7553c886fbf4960b720 | [
"MIT"
] | null | null | null | django_codemod/cli.py | cvanderkolk/django-codemod | 9d03ebbf98285e408bacf7553c886fbf4960b720 | [
"MIT"
] | 2 | 2022-01-19T14:30:11.000Z | 2022-01-28T14:32:34.000Z | django_codemod/cli.py | jayvdb/django-codemod | 8626e6bb5383d9ef3b733861d6996213d90cf26d | [
"MIT"
] | null | null | null | import inspect
from collections import defaultdict
from operator import attrgetter
from typing import Callable, Dict, List, Tuple
import click
from libcst.codemod import (
CodemodContext,
ContextAwareTransformer,
gather_files,
parallel_exec_transform_with_prettyprint,
)
from django_codemod import visi... | 34.21875 | 87 | 0.6579 |
38e49e6c5bb8ac0e8ab3d4a2b8fd45d214c3afcd | 4,521 | py | Python | imagenet_training/data/hdf5_dataset.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | imagenet_training/data/hdf5_dataset.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | imagenet_training/data/hdf5_dataset.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | """HDF5 dataset class."""
from pathlib import Path
import random
from typing import Any, Callable, Generator, Union, Optional, Tuple, Sequence
import h5py
import torch
from torch.utils.data import IterableDataset, get_worker_info
class HDF5Dataset(IterableDataset):
"""HDF5 dataset class that processes data with... | 37.057377 | 108 | 0.619996 |
38e4a663027eeed0597c0ba13eccade86d9752a0 | 1,865 | py | Python | py/levels/grid.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | 2 | 2020-01-04T23:44:10.000Z | 2020-07-12T17:10:09.000Z | py/levels/grid.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | null | null | null | py/levels/grid.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | 1 | 2022-03-16T05:43:33.000Z | 2022-03-16T05:43:33.000Z | # .................................................................................................................
level_dict["grid"] = {
"scheme": "candy_scheme",
"size": (9,9,9),
"intro": "grid",
"help": ... | 44.404762 | 115 | 0.332976 |
38e4c2c20a76b2cf6a9f2ff52cc59e63d7338f12 | 2,438 | py | Python | views/config.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | views/config.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | 1 | 2022-03-12T00:57:37.000Z | 2022-03-12T00:57:37.000Z | views/config.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | from django.core.exceptions import ObjectDoesNotExist
from django.http import JsonResponse, Http404
from mighty.functions import setting
from mighty.views.template import TemplateView
from mighty.views.crud import ListView, DetailView
from mighty.apps import MightyConfig as conf
from mighty.models import ConfigClient,... | 35.333333 | 109 | 0.7137 |
38e4e171f96a7feecd90f5aea491d47f4af28f84 | 1,020 | py | Python | alipay/aop/api/response/AlipayBossFncInvmodeCreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayBossFncInvmodeCreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayBossFncInvmodeCreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayBossFncInvmodeCreateResponse(AlipayResponse):
def __init__(self):
super(AlipayBossFncInvmodeCreateResponse, self).__init__()
self._is_success = None
sel... | 28.333333 | 107 | 0.695098 |
38e4e3f4f7be16604e1783ca22af1d9cc53c16a4 | 1,791 | py | Python | presidio-analyzer/presidio_analyzer/predefined_recognizers/__init__.py | fearghal/presidio | d381d278643a79b20c4200535365610637ad2473 | [
"MIT"
] | null | null | null | presidio-analyzer/presidio_analyzer/predefined_recognizers/__init__.py | fearghal/presidio | d381d278643a79b20c4200535365610637ad2473 | [
"MIT"
] | null | null | null | presidio-analyzer/presidio_analyzer/predefined_recognizers/__init__.py | fearghal/presidio | d381d278643a79b20c4200535365610637ad2473 | [
"MIT"
] | null | null | null | """Predefined recognizers package. Holds all the default recognizers."""
from .aba_routing_recognizer import AbaRoutingRecognizer
from .credit_card_recognizer import CreditCardRecognizer
from .crypto_recognizer import CryptoRecognizer
from .date_recognizer import DateRecognizer
from .domain_recognizer import DomainRec... | 33.792453 | 72 | 0.81072 |
38e4eeeb3101d9f7242509d2e6c765b87ed43eab | 4,024 | py | Python | models/wavenet.py | speakupai/speakupai-app | 48afbe051b4bcd9f9835a97b60880955a15e7009 | [
"MIT"
] | 1 | 2021-03-11T19:40:18.000Z | 2021-03-11T19:40:18.000Z | models/wavenet.py | speakupai/speakupai-app | 48afbe051b4bcd9f9835a97b60880955a15e7009 | [
"MIT"
] | null | null | null | models/wavenet.py | speakupai/speakupai-app | 48afbe051b4bcd9f9835a97b60880955a15e7009 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from hparams import hparams as hp
class ResLayer(nn.Module):
def __init__(self, padding, dilation):
super(ResLayer, self).__init__()
self.conv_dilated = nn.Conv1d(in_channels=hp.model.wavenet.n_channels_dilated,
out_channels... | 42.357895 | 112 | 0.531312 |
38e4f038590b05166f01d1e32683af12e457c1be | 8,824 | py | Python | steemengine/rpc.py | holgern/steemengine | d43c12326074efd2951bf98636bbf9575430ced4 | [
"MIT"
] | 7 | 2019-03-07T08:23:38.000Z | 2021-09-05T07:30:21.000Z | steemengine/rpc.py | holgern/steemengine | d43c12326074efd2951bf98636bbf9575430ced4 | [
"MIT"
] | 6 | 2019-04-17T05:01:13.000Z | 2021-09-20T23:41:01.000Z | steemengine/rpc.py | holgern/steemengine | d43c12326074efd2951bf98636bbf9575430ced4 | [
"MIT"
] | 7 | 2019-03-07T15:10:13.000Z | 2020-05-25T02:06:43.000Z | """graphennewsrpc."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import next
from builtins import str
from builtins import object
import sys
import json
import logging
import re
from .ve... | 37.07563 | 136 | 0.568336 |
38e4f12c2ed3b5e9cbeba38bb0de6f4dd24b8457 | 2,372 | py | Python | zhusuan/mcmc/SGMCMC.py | thuwzy/ZhuSuan-PyTorch | 471e4d401a6edce07312b01b2b76fa2c56b15c0f | [
"MIT"
] | 12 | 2021-08-11T10:28:21.000Z | 2022-03-12T14:20:02.000Z | zhusuan/mcmc/SGMCMC.py | thuwzy/ZhuSuan-PyTorch | 471e4d401a6edce07312b01b2b76fa2c56b15c0f | [
"MIT"
] | null | null | null | zhusuan/mcmc/SGMCMC.py | thuwzy/ZhuSuan-PyTorch | 471e4d401a6edce07312b01b2b76fa2c56b15c0f | [
"MIT"
] | 2 | 2021-08-17T12:05:15.000Z | 2022-01-12T09:47:49.000Z | import torch
import torch.nn as nn
class SGMCMC(nn.Module):
"""
Base class for stochastic gradient MCMC (SGMCMC) algorithms.
SGMCMC is a class of MCMC algorithms which utilize stochastic gradients
instead of the true gradients.
The typical code for SGMCMC inference is like::
sgmcmc ... | 35.402985 | 183 | 0.602445 |
38e52c9345e2311dae7e397528768d2124cc7aa1 | 14,488 | py | Python | etl/transform/uri.py | tirkarthi/plant-brapi-etl-faidare | 717ab74e02240411ad79911139c22c676cd132b6 | [
"BSD-3-Clause"
] | 3 | 2018-06-04T09:14:55.000Z | 2018-10-25T14:32:03.000Z | etl/transform/uri.py | tirkarthi/plant-brapi-etl-faidare | 717ab74e02240411ad79911139c22c676cd132b6 | [
"BSD-3-Clause"
] | 15 | 2018-08-03T12:34:52.000Z | 2020-02-06T17:49:40.000Z | etl/transform/uri.py | tirkarthi/plant-brapi-etl-faidare | 717ab74e02240411ad79911139c22c676cd132b6 | [
"BSD-3-Clause"
] | 4 | 2019-04-18T12:53:19.000Z | 2019-11-22T08:53:19.000Z | import base64
import itertools
import json
import multiprocessing
import os
import sys
import time
import urllib.parse
from functools import partial
from multiprocessing import Process, Queue
from multiprocessing.pool import Pool
from typing import Tuple, List, Callable, Dict
import rfc3987
from unqlite import UnQLite... | 36.039801 | 116 | 0.634663 |
38e541533d01c2bac5725458754d7323a8ef1777 | 3,364 | py | Python | osarchiver/destination/file/sql.py | pcibot/osarchiver | 19f07ba7585c021f03f7928fc0b5614570db75a3 | [
"BSD-3-Clause"
] | 18 | 2019-06-06T09:37:18.000Z | 2022-01-12T12:17:10.000Z | osarchiver/destination/file/sql.py | pcibot/osarchiver | 19f07ba7585c021f03f7928fc0b5614570db75a3 | [
"BSD-3-Clause"
] | 8 | 2019-10-30T16:32:24.000Z | 2022-01-12T12:47:49.000Z | osarchiver/destination/file/sql.py | pcibot/osarchiver | 19f07ba7585c021f03f7928fc0b5614570db75a3 | [
"BSD-3-Clause"
] | 5 | 2019-06-06T12:27:07.000Z | 2022-03-08T19:04:09.000Z | # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Copyright 2019 The OSArchiver Authors. All rights reserved.
"""
Implementation of CSV writer (SQL data -> SQL file)
"""
import logging
import re
import pymysql
from osarchiver.destination.file.base import Formatter... | 39.576471 | 79 | 0.557669 |
38e5657355bdef54c5a16c600a11f164921863fb | 137 | py | Python | core/connection.py | sld/dp-agent | 02729887f8db3c99ac2c6a3e5e7be7fa6849a1ba | [
"Apache-2.0"
] | null | null | null | core/connection.py | sld/dp-agent | 02729887f8db3c99ac2c6a3e5e7be7fa6849a1ba | [
"Apache-2.0"
] | null | null | null | core/connection.py | sld/dp-agent | 02729887f8db3c99ac2c6a3e5e7be7fa6849a1ba | [
"Apache-2.0"
] | null | null | null | from mongoengine import connect
from core.config import HOST, PORT, DB_NAME
state_storage = connect(host=HOST, port=PORT, db=DB_NAME)
| 19.571429 | 57 | 0.788321 |
38e58566b785efd861a501889765a4f0d5d4654d | 473 | py | Python | examples/run_gsov1.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | examples/run_gsov1.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | examples/run_gsov1.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | # encoding=utf8
# This is temporary fix to import module from parent folder
# It will be removed when package is published on PyPI
import sys
sys.path.append('../')
# End of fix
from niapy.algorithms.basic import GlowwormSwarmOptimizationV1
from niapy.task import Task
from niapy.problems import Sphere
for i in range... | 23.65 | 62 | 0.750529 |
38e5ae7df0c3136f0bdda3dda061466ee63592d9 | 2,062 | py | Python | adsputils/tests/test_app.py | adsabs/ADSPipelineUtils | eb8cc988f57c19a256ebc8802cc2a812d5279d12 | [
"MIT"
] | null | null | null | adsputils/tests/test_app.py | adsabs/ADSPipelineUtils | eb8cc988f57c19a256ebc8802cc2a812d5279d12 | [
"MIT"
] | 36 | 2017-06-23T20:29:22.000Z | 2020-03-18T15:04:27.000Z | adsputils/tests/test_app.py | adsabs/ADSPipelineUtils | eb8cc988f57c19a256ebc8802cc2a812d5279d12 | [
"MIT"
] | 12 | 2017-06-21T18:10:57.000Z | 2021-11-01T19:13:32.000Z | # -*- coding: utf-8 -*-
from builtins import str
from builtins import range
from adsputils import ADSCelery, ADSTask
import unittest
class TestUpdateRecords(unittest.TestCase):
def test_config(self):
app = ADSCelery('test',local_config={
'FOO': ['bar', {}]
})
self.assertE... | 35.551724 | 107 | 0.531038 |
38e5cb7bbff715477b0845d52a4bff48293ec0d1 | 201 | py | Python | imagenet_training/data/__init__.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | imagenet_training/data/__init__.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | imagenet_training/data/__init__.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | """Data module for datasets and data modules."""
from .base_dataset import BaseDataset
from .base_data_module import BaseDataModule
from .cifar10 import CIFAR10
from .imagenet.imagenet import ImageNet
| 33.5 | 48 | 0.825871 |
38e5d367c4993a0723113f2c76ba2ad8e7dc411e | 1,856 | py | Python | src/nexus/commands/trees.py | shh-dlce/python-nexus | 5e5ed8d53fe394f2685b3c87253e8f498c5a6191 | [
"BSD-2-Clause"
] | 1 | 2020-05-15T20:22:49.000Z | 2020-05-15T20:22:49.000Z | src/nexus/commands/trees.py | shh-dlce/python-nexus | 5e5ed8d53fe394f2685b3c87253e8f498c5a6191 | [
"BSD-2-Clause"
] | 9 | 2020-02-19T08:35:28.000Z | 2020-05-11T11:30:13.000Z | src/nexus/commands/trees.py | shh-dlce/python-nexus | 5e5ed8d53fe394f2685b3c87253e8f498c5a6191 | [
"BSD-2-Clause"
] | null | null | null | """
Performs some functions on trees
"""
from clldutils.clilib import add_random_seed
from nexus.cli_util import add_nexus, get_reader, add_output, write_output, list_of_ranges
from nexus.tools import delete_trees, sample_trees, strip_comments_in_trees
def register(parser):
add_output(parser)
add_nexus(parser... | 29.935484 | 90 | 0.643858 |
38e60affd126225a02333fb3307ebabe1cd17696 | 13,713 | py | Python | phase1a/case3a/case3a_build_xml.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | 1 | 2020-11-24T09:56:12.000Z | 2020-11-24T09:56:12.000Z | phase1a/case3a/case3a_build_xml.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | null | null | null | phase1a/case3a/case3a_build_xml.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | null | null | null | """
This python script builds the XML files for case3a of the FHR benchmark
materials.xml, geometry.xml, settings.xml, and tallies.xml
"""
###############################################################################
# Python Package Import
######################################################... | 35.992126 | 109 | 0.580471 |
38e6109e923e9a9c4faa663254fad6166c4e3ab8 | 9,481 | py | Python | radio/models/keras/keras_3dunet.py | kmader/radio | b7897a72c6750bd848504f57bf6e31d27785dfb3 | [
"Apache-2.0"
] | null | null | null | radio/models/keras/keras_3dunet.py | kmader/radio | b7897a72c6750bd848504f57bf6e31d27785dfb3 | [
"Apache-2.0"
] | null | null | null | radio/models/keras/keras_3dunet.py | kmader/radio | b7897a72c6750bd848504f57bf6e31d27785dfb3 | [
"Apache-2.0"
] | 1 | 2018-08-24T09:40:48.000Z | 2018-08-24T09:40:48.000Z | # pylint: disable=too-many-statements
""" Contains Keras3DUNet model class. """
from functools import wraps
import tensorflow as tf
import keras
from keras.layers import (Input,
concatenate,
Conv3D,
MaxPooling3D,
Up... | 40.690987 | 114 | 0.560595 |
38e674b78702d78c16cbf84f60b63227ca50c4ad | 6,150 | py | Python | cec.py | EtzionR/My-TF-AutoEncoder | 8cc64479accf1c5c012ebfb4fda037e0cc217f58 | [
"MIT"
] | null | null | null | cec.py | EtzionR/My-TF-AutoEncoder | 8cc64479accf1c5c012ebfb4fda037e0cc217f58 | [
"MIT"
] | null | null | null | cec.py | EtzionR/My-TF-AutoEncoder | 8cc64479accf1c5c012ebfb4fda037e0cc217f58 | [
"MIT"
] | null | null | null | # Create by Etzion Harari
# https://github.com/EtzionR
# Load libraries:
from tensorflow.keras import layers, losses, Sequential, optimizers
from tensorflow.keras.models import Model, load_model
import matplotlib.pyplot as plt
import numpy as np
# Define useful functions:
adam = lambda lr: optimizers.Ad... | 34.357542 | 98 | 0.593659 |
38e6844950d7e9d28bc1c75d7a5b4a7b070be2dc | 3,341 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.42029 | 172 | 0.698593 |
38e69382be612048e5224ac72e09ba697b548ff7 | 4,554 | py | Python | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/ddlperf.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/ddlperf.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/ddlperf.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | """
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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.... | 32.76259 | 72 | 0.640316 |
38e6b08c818d1d88de36e0ec999fe4bcb2748279 | 9,134 | py | Python | climetlab/scripts/cache.py | vidurmithal/climetlab | af0c33ff2875f9747b4fa81fc17be1a73cd3ead6 | [
"Apache-2.0"
] | 182 | 2020-07-24T14:44:32.000Z | 2022-03-31T12:25:28.000Z | climetlab/scripts/cache.py | vidurmithal/climetlab | af0c33ff2875f9747b4fa81fc17be1a73cd3ead6 | [
"Apache-2.0"
] | 30 | 2020-07-22T10:29:12.000Z | 2022-03-31T13:55:04.000Z | climetlab/scripts/cache.py | vidurmithal/climetlab | af0c33ff2875f9747b4fa81fc17be1a73cd3ead6 | [
"Apache-2.0"
] | 32 | 2020-09-12T14:02:11.000Z | 2022-02-17T08:18:37.000Z | # (C) Copyright 2021 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmenta... | 30.651007 | 108 | 0.549814 |
38e6b58bdafaed2e12a7a0e86a331737f495214e | 6,546 | py | Python | archive/nexus-api-v2/Database/Business/Interfaces/Company/API.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/Business/Interfaces/Company/API.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/Business/Interfaces/Company/API.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | """
...
"""
# =============================================================================
# Local Library
# =============================================================================
from . import *
import Database.SQL
import Database.Business.Schemas
# ========================================================... | 31.023697 | 97 | 0.484571 |
38e6baad63f2c22c5d653f17dd69c4af1f63abcd | 117 | py | Python | redisgraph_bulk_loader/exceptions.py | ostapenkov10/redisgraph-bulk-loader | dfdbfeac61483af595b9817e1662eeb766fabfa2 | [
"BSD-3-Clause"
] | 35 | 2019-05-07T15:46:09.000Z | 2022-03-24T01:51:57.000Z | redisgraph_bulk_loader/exceptions.py | ostapenkov10/redisgraph-bulk-loader | dfdbfeac61483af595b9817e1662eeb766fabfa2 | [
"BSD-3-Clause"
] | 41 | 2019-09-11T15:06:35.000Z | 2022-03-28T09:35:29.000Z | redisgraph_bulk_loader/exceptions.py | ostapenkov10/redisgraph-bulk-loader | dfdbfeac61483af595b9817e1662eeb766fabfa2 | [
"BSD-3-Clause"
] | 22 | 2019-04-05T17:25:14.000Z | 2022-02-02T12:54:39.000Z | # Custom error class for invalid inputs
class CSVError(Exception):
pass
class SchemaError(Exception):
pass
| 14.625 | 39 | 0.74359 |
38e6cd94dc8f138e03ea69b1b1c8225cea06c5be | 7,600 | py | Python | oscar/lib/python2.7/site-packages/psycopg2/tests/test_with.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/psycopg2/tests/test_with.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/psycopg2/tests/test_with.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# test_ctxman.py - unit test for connection and cursor used as context manager
#
# Copyright (C) 2012 Daniele Varrazzo <daniele.varrazzo@gmail.com>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as publish... | 33.628319 | 79 | 0.597632 |
38e6d587333740d78583682159954da94ac160cc | 15,887 | py | Python | windlass/images.py | LaudateCorpus1/windlass | 721c3a8eb7e0afc5b8a152d90958a1b9e007c5c5 | [
"Apache-2.0"
] | 4 | 2018-09-11T15:57:10.000Z | 2019-06-17T08:01:51.000Z | windlass/images.py | LaudateCorpus1/windlass | 721c3a8eb7e0afc5b8a152d90958a1b9e007c5c5 | [
"Apache-2.0"
] | 8 | 2019-06-11T10:17:29.000Z | 2021-05-04T16:59:28.000Z | windlass/images.py | LaudateCorpus1/windlass | 721c3a8eb7e0afc5b8a152d90958a1b9e007c5c5 | [
"Apache-2.0"
] | 1 | 2019-05-30T15:33:42.000Z | 2019-05-30T15:33:42.000Z | #
# (c) Copyright 2017-2019 Hewlett Packard Enterprise Development LP
#
# 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 app... | 34.687773 | 79 | 0.542519 |
38e6dc8aa4a1b60a1c2409463be724f6ddee3adc | 3,422 | py | Python | contract/__init__.py | ChrisCalderon/eth-contract | 756a854619045dd630b931946453d25a2b6b88ee | [
"MIT"
] | null | null | null | contract/__init__.py | ChrisCalderon/eth-contract | 756a854619045dd630b931946453d25a2b6b88ee | [
"MIT"
] | null | null | null | contract/__init__.py | ChrisCalderon/eth-contract | 756a854619045dd630b931946453d25a2b6b88ee | [
"MIT"
] | null | null | null | """A class for using Ethereum smart contracts."""
import re
import math
from rpctools import rpc_factory
from ethereum.abi import ContractTranslator
from typing import Sequence, Mapping
__version__ = "1.0.rc1"
__author__ = "Chris Calderon"
__email__ = "pythonwiz@protonmail.com"
__license__ = "MIT"
ETH_ADDR = re.compi... | 37.195652 | 94 | 0.610754 |
38e6ebaaa6aacaad347bcf1a22bfc26cba0c3b1e | 5,823 | py | Python | network.py | elfnews/image_classifier | b5d0c46250c7793bbf0729895541078fd2626252 | [
"MIT"
] | null | null | null | network.py | elfnews/image_classifier | b5d0c46250c7793bbf0729895541078fd2626252 | [
"MIT"
] | null | null | null | network.py | elfnews/image_classifier | b5d0c46250c7793bbf0729895541078fd2626252 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import torch
from torch import nn, optim
from torchvision import models
# Network definition
class Network(nn.Module):
def __init__(self,
model_architecture,
no_model_inputs,
no_model_outputs,
layers_input_siz... | 40.72028 | 94 | 0.646059 |
38e7382f4318937fa9de6383a88c84a1036443cf | 4,565 | py | Python | response_measurer/run.py | eminaktas/response-measurer | 7c9e07c153424d4618d7d813c60898ae7d7e3e8a | [
"MIT"
] | 1 | 2022-03-07T06:47:23.000Z | 2022-03-07T06:47:23.000Z | response_measurer/run.py | eminaktas/response-measurer | 7c9e07c153424d4618d7d813c60898ae7d7e3e8a | [
"MIT"
] | null | null | null | response_measurer/run.py | eminaktas/response-measurer | 7c9e07c153424d4618d7d813c60898ae7d7e3e8a | [
"MIT"
] | null | null | null | import logging
import argparse
from response_measurer.post import Post
from response_measurer.get import Get
from response_measurer.print_out import PrintCsv, PrintTerminal
from response_measurer import version
class Run:
def __init__(self, _parameters):
self.requests_type = _parameters["request_type"]
... | 29.642857 | 96 | 0.617963 |
38e758ca928c145d56c6141c5833249371abe3b1 | 4,414 | py | Python | Lat_Gen.py | patrick-schubert/emission-line-galaxy | 996432abbe9c8be93ff2b00ef508b8d92cf17d32 | [
"MIT"
] | 1 | 2021-04-02T20:02:37.000Z | 2021-04-02T20:02:37.000Z | Lat_Gen.py | patrick-schubert/emission-line-galaxy | 996432abbe9c8be93ff2b00ef508b8d92cf17d32 | [
"MIT"
] | null | null | null | Lat_Gen.py | patrick-schubert/emission-line-galaxy | 996432abbe9c8be93ff2b00ef508b8d92cf17d32 | [
"MIT"
] | null | null | null | from Dirs import *
import Layers
import Model
from Data import *
import pandas as pd
import numpy as np
import time
def Lat_Gen():
print("Iniciando...")
start = time.time()
model_list = ["CAE","CVAE"]
#std_list = [1.0,0.5, 0.1, 1e-13]
std_list = [1.0,0.5, 0.1, 1e-13]
lat_dim_list = [2,3,4,5... | 45.040816 | 110 | 0.468056 |
38e7895a685b24c8d38eb79b3bcc37ea28efd6b1 | 51,833 | py | Python | traffic/data/adsb/opensky_impala.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | traffic/data/adsb/opensky_impala.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | traffic/data/adsb/opensky_impala.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | from __future__ import annotations
import hashlib
import logging
import re
import string
import time
from datetime import timedelta
from io import StringIO
from pathlib import Path
from tempfile import gettempdir
from typing import Any, Dict, Iterable, List, Tuple, cast
import paramiko
from tqdm.rich import tqdm
imp... | 37.834307 | 80 | 0.538923 |
38e79a321bd2223d78680660dd2c6f63add7b064 | 5,753 | py | Python | examples/demo/multistroke/main.py | hakanardo/kivy | 707b4aa35bfb79577bd87dfc23aa527f0eb03640 | [
"MIT"
] | null | null | null | examples/demo/multistroke/main.py | hakanardo/kivy | 707b4aa35bfb79577bd87dfc23aa527f0eb03640 | [
"MIT"
] | null | null | null | examples/demo/multistroke/main.py | hakanardo/kivy | 707b4aa35bfb79577bd87dfc23aa527f0eb03640 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Multistroke Recognition Database Demonstration
==============================================
This application records gestures and attempts to match them. You should
see a black drawing surface with some buttons across the bottom. As you
make a gesture on the drawing surface, the gesture wil... | 39.40411 | 79 | 0.687294 |
38e7b44ce1cdc60d1c24f638f1a91b034fcfeea4 | 4,153 | py | Python | LEGconc_recalculator.py | sylvinite/cluster_pooler | b543ed32582b886e9ce9063ad8b9b177d415d68c | [
"MIT"
] | null | null | null | LEGconc_recalculator.py | sylvinite/cluster_pooler | b543ed32582b886e9ce9063ad8b9b177d415d68c | [
"MIT"
] | null | null | null | LEGconc_recalculator.py | sylvinite/cluster_pooler | b543ed32582b886e9ce9063ad8b9b177d415d68c | [
"MIT"
] | null | null | null | import pdb
import json
import couchdb
import re
from collections import defaultdict
import unicodedata
def initial_data():
couch = couchdb.Server('http://isak:Purpleplant89@tools-dev.scilifelab.se:5984')
db = couch['x_flowcells']
view = db.view('names/project_ids_list')
#Creates a proj -> FCs structure... | 41.118812 | 139 | 0.576692 |
38e7da0bea174a337449d31f9626dc0f3340c03a | 14,701 | py | Python | dataset_prepare/prepare_detection_segmentation.py | fofore/new-4d2-8-16u2 | 4acffcc5763f77f202894ece9b39030a76a2e8ed | [
"MIT"
] | null | null | null | dataset_prepare/prepare_detection_segmentation.py | fofore/new-4d2-8-16u2 | 4acffcc5763f77f202894ece9b39030a76a2e8ed | [
"MIT"
] | null | null | null | dataset_prepare/prepare_detection_segmentation.py | fofore/new-4d2-8-16u2 | 4acffcc5763f77f202894ece9b39030a76a2e8ed | [
"MIT"
] | 1 | 2019-07-31T01:41:11.000Z | 2019-07-31T01:41:11.000Z | '''
Added by Minming Qian, for converting kiktech json data to pascal voc format
prepare the data from img and the json file
maybe no need to generate the xml file
but with xml, then it can take usage of the pascal voc
'''
import os
from glob import glob
from PIL import Image
import shutil
import json
import xml.etree.... | 33.11036 | 146 | 0.627576 |
38e7dabf03aabbc09c3100870a69daea1872236e | 2,795 | py | Python | rango/webhose_search.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | rango/webhose_search.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | rango/webhose_search.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | import json
import urllib.parse
import urllib.request
import sys
def read_webhose_key():
"""
Reads the Webhose API key from a file called 'search.key'.
Returns either None (no key found), or a string representing the key.
Remember: put search.key in your .gitignore file to avoid committing it!
"""... | 34.085366 | 86 | 0.640429 |
38e7e177b9003d7e40cea17642301c75bd5b50ed | 324 | py | Python | whispers/plugins/npmrc.py | supaflysnooka/whispers | 762fcee6173ba0016687545bb9861751af72e277 | [
"Apache-2.0"
] | null | null | null | whispers/plugins/npmrc.py | supaflysnooka/whispers | 762fcee6173ba0016687545bb9861751af72e277 | [
"Apache-2.0"
] | null | null | null | whispers/plugins/npmrc.py | supaflysnooka/whispers | 762fcee6173ba0016687545bb9861751af72e277 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
class Npmrc:
def pairs(self, filepath: Path):
for line in filepath.open("r").readlines():
if ":_authToken=" not in line:
continue
value = line.split(":_authToken=")[-1].strip()
if value:
yield "npm authToken", va... | 24.923077 | 58 | 0.537037 |
38e7fd860d7482393ef6e7b1e6716b5cc49cbce7 | 7,512 | py | Python | src/m3_graphical_accumulating.py | andrewdl1/04-TheAccumulatorPattern | 3f0537d8e3c2262c1cdcd1bd04776a98889ba360 | [
"MIT"
] | null | null | null | src/m3_graphical_accumulating.py | andrewdl1/04-TheAccumulatorPattern | 3f0537d8e3c2262c1cdcd1bd04776a98889ba360 | [
"MIT"
] | null | null | null | src/m3_graphical_accumulating.py | andrewdl1/04-TheAccumulatorPattern | 3f0537d8e3c2262c1cdcd1bd04776a98889ba360 | [
"MIT"
] | null | null | null | """
This module lets you practice one form of the ACCUMULATOR pattern,
namely, the "IN GRAPHICS" form which features:
-- DRAWING OBJECTS via ACCUMULATING positions and/or sizes,
as in: x = x + pixels
Additionally, it emphasizes that you must
** DO A CONCRETE EXAMPLE BY HAND **
before you can implement a sol... | 37.939394 | 79 | 0.495607 |
38e835a807eca8e6c16296fd1fbd8974fd27e198 | 1,620 | py | Python | ginga/toolkit.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/toolkit.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/toolkit.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #
# toolkit.py -- module for customizing Ginga GUI toolkit version
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
toolkit = 'choose'
family = None
class ToolKitError... | 23.823529 | 67 | 0.571605 |
38e856ceba2aea9595dcdf399b676181fc977f23 | 315 | py | Python | control_flujo/buclesej3.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | control_flujo/buclesej3.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | control_flujo/buclesej3.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pedir numero
numero = int(raw_input('Introduce un número: '))
# suposición inicial
es_primo = True
for n in range(2,numero):
if numero % n == 0:
es_primo = False
break # para el bucle
if es_primo:
print numero, 'es primo'
else:
print numero, 'no es primo'
| 16.578947 | 48 | 0.615873 |
38e85ddefba46a63e3b5296626bfa619b4bdad33 | 4,172 | py | Python | poe_helper/gui.py | Birjot-Bala/poe-helper | 7a03fe2fd99648bd8b2e9d7155d68fdd025bff5d | [
"MIT"
] | 1 | 2020-10-20T10:18:24.000Z | 2020-10-20T10:18:24.000Z | poe_helper/gui.py | Birjot-Bala/poe-helper | 7a03fe2fd99648bd8b2e9d7155d68fdd025bff5d | [
"MIT"
] | 2 | 2020-08-01T22:51:00.000Z | 2020-10-18T02:41:57.000Z | poe_helper/gui.py | Birjot-Bala/poe-helper | 7a03fe2fd99648bd8b2e9d7155d68fdd025bff5d | [
"MIT"
] | null | null | null | # gui.py
"""Module contains the logic for the GUI.
Classes:
Gui
"""
import traceback
import sys
import tkinter as tk
from tkinter import ttk
from poe_helper.services import (
create_search_query, search_trade_api, image_from_url
)
from poe_helper.parsers import item_parser
class Gui(ttk.Frame):
"""Base ... | 35.65812 | 79 | 0.629434 |
38e86ce445b1079326008f633b5bfb5fd0eeb281 | 4,449 | py | Python | higra/attribute/graph_attributes.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 64 | 2019-08-18T19:23:23.000Z | 2022-03-21T04:15:04.000Z | higra/attribute/graph_attributes.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 120 | 2019-08-16T09:10:35.000Z | 2022-03-17T09:42:58.000Z | higra/attribute/graph_attributes.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 12 | 2019-10-04T07:35:55.000Z | 2021-01-10T19:59:11.000Z | ############################################################################
# Copyright ESIEE Paris (2018) #
# #
# Contributor(s) : Benjamin Perret #
# ... | 40.816514 | 124 | 0.635424 |
38e88ada92b83886d9ad2f4f29fb5c09f0c29b36 | 4,121 | py | Python | lymph/patterns/serial_events.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 89 | 2015-03-01T11:39:55.000Z | 2022-01-31T22:00:15.000Z | lymph/patterns/serial_events.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 214 | 2015-01-02T23:48:49.000Z | 2020-01-14T10:47:37.000Z | lymph/patterns/serial_events.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 36 | 2015-01-13T13:44:15.000Z | 2021-09-15T17:55:41.000Z | import hashlib
import logging
import collections
import lymph
import gevent
from kazoo.handlers.gevent import SequentialGeventHandler
from lymph.core.declarations import Declaration
from lymph.core.events import Event
from lymph.core.interfaces import Component
logger = logging.getLogger(__name__)
def serial_even... | 35.834783 | 93 | 0.633584 |
38e8ad764c74a5d365103bcae4efd81595a511e9 | 3,066 | py | Python | services/tests/test_outbound_quota/test_outbound_quota.py | easydns/chapps | 3bb54e795de1f91c6cf749f9aeb16b1211584809 | [
"MIT"
] | 1 | 2022-03-23T13:36:43.000Z | 2022-03-23T13:36:43.000Z | services/tests/test_outbound_quota/test_outbound_quota.py | easydns/chapps | 3bb54e795de1f91c6cf749f9aeb16b1211584809 | [
"MIT"
] | 2 | 2022-02-25T18:12:15.000Z | 2022-03-07T22:32:13.000Z | services/tests/test_outbound_quota/test_outbound_quota.py | easydns/chapps | 3bb54e795de1f91c6cf749f9aeb16b1211584809 | [
"MIT"
] | null | null | null | """Tests for chapps_outbound_quota.py"""
import pytest
from smtplib import SMTP, SMTPRecipientsRefused
import logging
from services.tests.conftest import known_sender
def test_chapps_oqp(
caplog,
chapps_oqp_service,
known_sender,
oqp_test_recipients,
oqp_test_message_factory,
clear_redis,
):
... | 31.608247 | 80 | 0.729941 |
38e8bd52ef27b382520ab0fe2c9a6891fe63cd2e | 1,117 | py | Python | dictorm/sqlite.py | rolobio/DictORM | bf9b8b1ba164e37039a806bc94df87e18ff21377 | [
"Apache-2.0"
] | 8 | 2016-12-29T20:05:10.000Z | 2021-11-21T22:44:11.000Z | dictorm/sqlite.py | rolobio/pgpydict | bf9b8b1ba164e37039a806bc94df87e18ff21377 | [
"Apache-2.0"
] | 58 | 2017-01-04T22:35:15.000Z | 2020-08-10T23:12:02.000Z | dictorm/sqlite.py | rolobio/pgpydict | bf9b8b1ba164e37039a806bc94df87e18ff21377 | [
"Apache-2.0"
] | 6 | 2017-01-26T21:43:00.000Z | 2020-08-21T02:38:18.000Z | '''
Provide Sqlite3 support by making simple changes to dictorm.pg classes.
'''
from .pg import Column as PostgresqlColumn
from .pg import Comparison as PostgresqlComparison
from .pg import Insert as PostgresqlInsert
from .pg import Select, And
from .pg import Update as PostgresqlUpdate
__all__ = [
'And',
'Col... | 22.795918 | 79 | 0.688451 |
38e8bf578e54eabb289534fcfb0b3f3a6ed58913 | 7,212 | py | Python | src/lhpes3d/modules/parse_poses.py | IW276/IW276SS20-P7 | ed388c04eb8d5ea1d13b5ed4119e722552794a62 | [
"MIT"
] | null | null | null | src/lhpes3d/modules/parse_poses.py | IW276/IW276SS20-P7 | ed388c04eb8d5ea1d13b5ed4119e722552794a62 | [
"MIT"
] | null | null | null | src/lhpes3d/modules/parse_poses.py | IW276/IW276SS20-P7 | ed388c04eb8d5ea1d13b5ed4119e722552794a62 | [
"MIT"
] | null | null | null | import numpy as np
from lhpes3d.modules.pose import Pose, propagate_ids
try:
from lhpes3d.pose_extractor.build.pose_extractor import extract_poses
except:
print('#### Cannot load fast pose extraction, switched to legacy slow implementation. ####')
from lhpes3d.modules.legacy_pose_extractor import extract_p... | 49.39726 | 131 | 0.602329 |
38e8c48e5854a380775e0f705e68185251981aff | 6,821 | py | Python | IMLearn/learners/gaussian_estimators.py | adishimoni8/IML.HUJI | 61f0624b75123ad417722e473d0859d7622ab6b3 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | adishimoni8/IML.HUJI | 61f0624b75123ad417722e473d0859d7622ab6b3 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | adishimoni8/IML.HUJI | 61f0624b75123ad417722e473d0859d7622ab6b3 | [
"MIT"
] | null | null | null | from __future__ import annotations
import numpy as np
from numpy.linalg import inv, det, slogdet
class UnivariateGaussian:
"""
Class for univariate Gaussian Distribution Estimator
"""
def __init__(self, biased_var: bool = False) -> UnivariateGaussian:
"""
Estimator for univariate Gaus... | 32.174528 | 119 | 0.576162 |
38e8dfb0cdf42ac202a348e5ba129539515a866c | 994 | py | Python | sunpy/map/sources/tests/test_hmi_source.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-07-02T13:01:42.000Z | 2020-08-27T20:05:31.000Z | sunpy/map/sources/tests/test_hmi_source.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2019-08-13T15:29:13.000Z | 2019-08-13T15:29:13.000Z | sunpy/map/sources/tests/test_hmi_source.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 6 | 2017-03-15T07:17:05.000Z | 2020-09-30T18:36:49.000Z | """Test cases for SDO Map subclasses.
This particular test file pertains to HMIMap.
@Author: Pritish C. (VaticanCameos)
"""
import os
import glob
import sunpy.data.test
from sunpy.map import Map
from sunpy.map.sources.sdo import HMIMap
path = sunpy.data.test.rootdir
fitspath = glob.glob(os.path.join(path, "resampled... | 24.243902 | 62 | 0.724346 |
38e8e3ddb7fd1ccab37332ae13e6863b2bcb558c | 4,443 | py | Python | sourcedive/settings.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | null | null | null | sourcedive/settings.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | 16 | 2019-05-30T20:55:25.000Z | 2020-06-09T18:52:34.000Z | sourcedive/settings.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | null | null | null | """
Django settings for sourcedive project.
"""
import os
from .settings_private import *
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
# SECURITY WARNING: don'... | 28.120253 | 104 | 0.703129 |
38e902aa89f3b9b91a5c5eb4a059aa97188887d6 | 18,196 | py | Python | nottingham.py | Hamatti/NottinghamBot | 3dcd0a3acb609618e657731e8b32c775eb3c2042 | [
"Unlicense"
] | null | null | null | nottingham.py | Hamatti/NottinghamBot | 3dcd0a3acb609618e657731e8b32c775eb3c2042 | [
"Unlicense"
] | null | null | null | nottingham.py | Hamatti/NottinghamBot | 3dcd0a3acb609618e657731e8b32c775eb3c2042 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# IRCbot with few neat features
# author: Juha-Matti Santala / @hamatti
import irclib
import urllib, urllib2
import json
import mwclient, lxml
import sys, os, signal, mimetypes, types, re
import random
from bs4 import BeautifulSoup
import ConfigParser
import sqlite3 as sql
imp... | 47.139896 | 825 | 0.603155 |
38e90a0fadcb2d8dce1a84f47147faf7468d1b4e | 2,431 | py | Python | refinery/bnpy/bnpy-dev/demodata/BinaryGraphK5.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 103 | 2015-01-13T00:48:14.000Z | 2021-11-08T10:53:22.000Z | refinery/bnpy/bnpy-dev/demodata/BinaryGraphK5.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 7 | 2015-02-21T04:03:40.000Z | 2021-08-23T20:24:54.000Z | refinery/bnpy/bnpy-dev/demodata/BinaryGraphK5.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 27 | 2015-01-23T00:54:31.000Z | 2020-12-30T14:30:50.000Z | '''
BinaryGraphK5.py
Binary Toy Graph with K=5 communities.
'''
import numpy as np
import random
from bnpy.data import GraphData
SEED = 8675309
PRNG = np.random.RandomState(SEED)
# FIXED DATA GENERATION PARAMS
K = 5 # Number of communities
N = 50 # Number of nodes
beta_a = 0.1 # hyperparameter over block matrix entr... | 31.166667 | 82 | 0.617853 |
38e9117bf29c8cb0323e28463b8de813a2a8c17c | 675 | py | Python | supriya/ugens/Normalizer.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/Normalizer.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/Normalizer.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya import CalculationRate
from supriya.synthdefs import UGen
class Normalizer(UGen):
"""
A dynamics flattener.
::
>>> source = supriya.ugens.In.ar(0)
>>> normalizer = supriya.ugens.Normalizer.ar(
... duration=0.01,
... level=1,
... | 20.454545 | 60 | 0.576296 |
38e938acdb954d36bce957eaea94ebd68de305cf | 1,288 | py | Python | igibson_usage/tabletop_env_usage.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 1 | 2022-02-03T13:27:19.000Z | 2022-02-03T13:27:19.000Z | igibson_usage/tabletop_env_usage.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | igibson_usage/tabletop_env_usage.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | import pybullet as p
from gibson2.envs.igibson_env import iGibsonEnv
from time import time
import gibson2
import os
from gibson2.render.profiler import Profiler
import logging
import pickle as pkl
import numpy as np
config_filename = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "configs", "tiago_table... | 27.404255 | 80 | 0.677795 |
38e939a62a14ffa3d901f04200da418063cb9c68 | 4,071 | py | Python | profile-rest-api/profiles_api/views.py | FrankthePygod/rest_api | 10b4b356caa2d3672bd4e69ba2d322c1b9a66f06 | [
"MIT"
] | null | null | null | profile-rest-api/profiles_api/views.py | FrankthePygod/rest_api | 10b4b356caa2d3672bd4e69ba2d322c1b9a66f06 | [
"MIT"
] | null | null | null | profile-rest-api/profiles_api/views.py | FrankthePygod/rest_api | 10b4b356caa2d3672bd4e69ba2d322c1b9a66f06 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.authtoken.views import ObtainAuthToken
from res... | 34.210084 | 85 | 0.65635 |
38e982a24f895c3094953087b4632230b2057e8d | 15,175 | py | Python | src/rpyc/core/stream.py | villawang/SNAP | 3c899151e5c1f9f76c65f8eee164453ed5eef3e8 | [
"BSD-3-Clause"
] | 25 | 2015-01-19T20:09:31.000Z | 2022-03-04T12:49:05.000Z | src/rpyc/core/stream.py | villawang/SNAP | 3c899151e5c1f9f76c65f8eee164453ed5eef3e8 | [
"BSD-3-Clause"
] | 2 | 2016-01-16T00:00:24.000Z | 2019-08-17T03:38:11.000Z | src/rpyc/core/stream.py | villawang/SNAP | 3c899151e5c1f9f76c65f8eee164453ed5eef3e8 | [
"BSD-3-Clause"
] | 15 | 2015-10-22T18:18:00.000Z | 2020-07-01T08:17:21.000Z | """
An abstraction layer over OS-dependent file-like objects, that provides a
consistent view of a *duplex byte stream*.
"""
import sys
import os
import socket
import time
import errno
from rpyc.lib import safe_import
from rpyc.lib.compat import select, select_error, BYTES_LITERAL, get_exc_errno, maxint
win32file = sa... | 33.133188 | 100 | 0.561779 |
38e9cef6865918c0f277e186755770f0f4d3dd0b | 1,196 | py | Python | setup.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | 1 | 2020-04-27T13:59:10.000Z | 2020-04-27T13:59:10.000Z | setup.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | setup.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | #! /usr/bin/python3.6
import setuptools
from pycatia import __author__, __author_email, __description__, __name__, __version__, __url__
exclude_files = [
'__reference_scripts__',
'__pycache__',
]
requires = [
'atomicwrites==1.2.1',
'attrs==18.2.0',
'colorama==0.4.0',
'more-itertools==4.3.0',... | 23.45098 | 95 | 0.641304 |
38e9ddc9e99054ecce9aed794fffa227fc9e7791 | 440 | py | Python | Company-Based/roblox/construction_management.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | Company-Based/roblox/construction_management.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | Company-Based/roblox/construction_management.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | def cost(arr):
m, n = len(arr), len(arr[0])
i = 1
while i < m:
a = arr[i - 1][:]
min1 = a.index(min(a))
a[min1] = float('inf')
min2 = a.index(min(a))
a = arr[i - 1]
for j in range(n):
if j == min1:
arr[i][j] += a[min2]
e... | 24.444444 | 38 | 0.370455 |
38e9e5cf327619dba36fe10307c70966364b56b7 | 3,422 | py | Python | core/domain/fs_services.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | 3 | 2021-06-26T09:45:19.000Z | 2021-11-17T11:11:39.000Z | core/domain/fs_services.py | import-keshav/oppia | 899b9755a6b795a8991e596055ac24065a8435e0 | [
"Apache-2.0"
] | 4 | 2019-08-15T10:49:21.000Z | 2022-03-02T05:10:20.000Z | core/domain/fs_services.py | grishamjindal/oppia | 3a29329a446e30b3b70641cf0286e23fad85418f | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2017 The Oppia 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 requi... | 37.604396 | 78 | 0.71391 |
38ea0525d14639eb4a460453bec11a682ed16bb4 | 9,263 | py | Python | configs/mvxnet/actr/dv_mvx-fpn_second_dbsamp_secfpn_adamw_2x8_160e_kitti-3d-3class_actr_dpe.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | configs/mvxnet/actr/dv_mvx-fpn_second_dbsamp_secfpn_adamw_2x8_160e_kitti-3d-3class_actr_dpe.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | configs/mvxnet/actr/dv_mvx-fpn_second_dbsamp_secfpn_adamw_2x8_160e_kitti-3d-3class_actr_dpe.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../_base_/schedules/cosine.py', '../../_base_/default_runtime.py'
]
# model settings
voxel_size = [0.05, 0.05, 0.1]
point_cloud_range = [0, -40, -3, 70.4, 40, 1]
model = dict(
type='DynamicMVXFasterRCNN',
img_backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
... | 33.930403 | 193 | 0.578322 |
38ea30feb8d88561e602db5d4d0abf8c2dd8efbd | 8,365 | py | Python | accounts/models.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | 15 | 2017-11-08T10:03:26.000Z | 2021-12-21T07:02:44.000Z | accounts/models.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | 9 | 2020-01-17T15:09:22.000Z | 2022-03-25T19:02:05.000Z | accounts/models.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | null | null | null | from django.db import models # type: ignore
from django.conf import settings
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from django.db.models.signals import post_save
from django.dispatch import receiver
# from phonenumber_field.modelfields import PhoneNumberField
# from image... | 32.675781 | 128 | 0.597609 |
38ea5c1690c2fe1fc0db6c57aeb7936f809efe0c | 6,124 | py | Python | flexselect/__init__.py | twerp/django-admin-flexselect-py3 | 38563b98cb333e6edd5351f7e88d6156e7a71a34 | [
"CC0-1.0"
] | null | null | null | flexselect/__init__.py | twerp/django-admin-flexselect-py3 | 38563b98cb333e6edd5351f7e88d6156e7a71a34 | [
"CC0-1.0"
] | null | null | null | flexselect/__init__.py | twerp/django-admin-flexselect-py3 | 38563b98cb333e6edd5351f7e88d6156e7a71a34 | [
"CC0-1.0"
] | null | null | null | from itertools import chain
import hashlib
import json
from django.forms.widgets import Select
from django.utils.safestring import mark_safe
from django.conf import settings
from django.core.exceptions import ValidationError, ObjectDoesNotExist
EMPTY_CHOICE = ('', '---------')
# Update default settings.
FLEXSELECT =... | 33.102703 | 78 | 0.621979 |
38ea80ff06b6a3d8b4be13f66026bd1c131c0143 | 11,595 | py | Python | homecontrol/__main__.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | homecontrol/__main__.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | homecontrol/__main__.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | """The entrypoint for HomeControl"""
import subprocess
import shutil
from contextlib import suppress
import logging
import logging.config
import asyncio
import sys
import argparse
import os
from typing import (
List, Optional
)
import aiomonitor
import pkg_resources
import yaml
from homecontrol.core import Core... | 31.002674 | 138 | 0.601639 |
38ea9f9e5267178ca27db93d68f22672472f2223 | 3,123 | py | Python | fingerprinter/fingerprinterapp.py | martiph/Fingerprinter | f842dacb753a8309d5be8c456f32ff6a8c8fc882 | [
"MIT"
] | 2 | 2020-07-18T12:41:31.000Z | 2021-04-08T09:10:20.000Z | fingerprinter/fingerprinterapp.py | martiph/Fingerprinter | f842dacb753a8309d5be8c456f32ff6a8c8fc882 | [
"MIT"
] | 4 | 2020-07-19T18:08:14.000Z | 2020-07-19T18:22:16.000Z | fingerprinter/fingerprinterapp.py | martiph/Fingerprinter | f842dacb753a8309d5be8c456f32ff6a8c8fc882 | [
"MIT"
] | null | null | null | import packetcrafter.packet_crafter as pc
import cloudproviderdetection.cloudprovider_detection as cd
import sys
allowed_commands = ["os-fingerprinting", "cloudprovider-detection"]
def print_welcome_banner():
print("\
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\
@################################@\n\... | 35.896552 | 114 | 0.464938 |
38eaa672971e2efcb53b1c19cf91374068326d23 | 260 | py | Python | terrascript/local/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/local/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/local/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/local/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class local_file(terrascript.Resource):
pass
| 18.571429 | 79 | 0.769231 |
38eac5aac91c3f3b183268c398e8e3882792a101 | 1,503 | py | Python | catkin_ws/src/opencv_img_processing/src/opencv6_masking.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | 1 | 2021-09-19T07:51:23.000Z | 2021-09-19T07:51:23.000Z | catkin_ws/src/opencv_img_processing/src/opencv6_masking.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | catkin_ws/src/opencv_img_processing/src/opencv6_masking.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import rospy
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
import cv2
"""
Run this script/node after `roslaunch opencv_img_processing turtlebot3_and_cone.launch`.
Masking: Remove a portion of the image using spatial filtering. See https://www.tutorialspoint.com/dip/con... | 34.159091 | 144 | 0.660679 |
38ead7ca6e578d5053ac75b553921de470af55cd | 295 | py | Python | chaospy/distributions/operators/__init__.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | 1 | 2020-04-29T20:53:25.000Z | 2020-04-29T20:53:25.000Z | chaospy/distributions/operators/__init__.py | agonzs11/Polinomio-del-caos | 5a415ece07e6535488174bac69a6c0fcc2ca272d | [
"MIT"
] | null | null | null | chaospy/distributions/operators/__init__.py | agonzs11/Polinomio-del-caos | 5a415ece07e6535488174bac69a6c0fcc2ca272d | [
"MIT"
] | null | null | null | """Collection of mathematical operators."""
from .addition import Add, add
from .multiply import Mul
from .matmul import Matmul
from .negative import Neg, neg
from .power import Pow
from .joint import J, Iid
from .trunkation import Trunc, Trunk, trunk
from .logarithm import Log, Log10, Logn
| 22.692308 | 43 | 0.769492 |
38eae892899839f448fe24dd36e90f8e81ecd2c7 | 13,283 | py | Python | src/plots.py | ImpulsoGov/farolcovid | 4d2d889984f8216589d399fa7e45c2d0f0304308 | [
"MIT"
] | 28 | 2020-06-11T12:38:26.000Z | 2021-11-22T13:55:13.000Z | src/plots.py | ImpulsoGov/simulacovid | 4d2d889984f8216589d399fa7e45c2d0f0304308 | [
"MIT"
] | 62 | 2020-04-02T02:07:37.000Z | 2020-06-02T15:30:48.000Z | src/plots.py | ImpulsoGov/farolcovid | 4d2d889984f8216589d399fa7e45c2d0f0304308 | [
"MIT"
] | 18 | 2020-06-11T12:38:15.000Z | 2022-03-04T11:14:45.000Z | import sys
import os
sys.path.append("..")
sys.path.append("../src")
import utils
import loader
import model.simulator as simulator
# Plotting
import plotly
import plotly.graph_objs as go
import pandas as pd
import numpy as np
# Setting cufflinks
import textwrap
import cufflinks as cf
cf.go_offline()
cf.set_config_... | 28.382479 | 133 | 0.541519 |
38eae8b111173039d4b91c9574a4f602edfc58ed | 809 | py | Python | asking/exceptions.py | cariad/asking | 482947f70e90928314b90c2db14a86908714125a | [
"MIT"
] | null | null | null | asking/exceptions.py | cariad/asking | 482947f70e90928314b90c2db14a86908714125a | [
"MIT"
] | 4 | 2021-11-28T08:40:52.000Z | 2021-11-30T14:43:58.000Z | asking/exceptions.py | cariad/asking | 482947f70e90928314b90c2db14a86908714125a | [
"MIT"
] | null | null | null | from typing import Any
class Stop(Exception):
"""
Raised to stop script execution.
Arguments:
reason: Reason for stopping.
"""
def __init__(self, reason: Any) -> None:
self._reason = reason
super().__init__(repr(reason))
@property
def reason(self) -> Any:
... | 19.261905 | 51 | 0.605686 |
38eaf5875527cc0eeb7130586eb1ac597449c472 | 11,968 | py | Python | sdk/identity/azure-identity/tests/test_aad_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/identity/azure-identity/tests/test_aad_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/identity/azure-identity/tests/test_aad_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import functools
from unittest.mock import Mock, patch
from urllib.parse import urlparse
from azure.core.exceptions import ClientAuthenticationError, ServiceRequestErro... | 37.993651 | 118 | 0.699114 |
38eb0632d2ae542fd81f3bf2a8f4c36769ba5705 | 3,557 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/rgb_display_pillow_image.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 76 | 2017-01-15T15:23:18.000Z | 2022-02-24T10:07:06.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/rgb_display_pillow_image.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 50 | 2017-08-30T22:27:26.000Z | 2022-03-20T21:28:30.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/rgb_display_pillow_image.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 58 | 2017-08-30T22:34:03.000Z | 2022-03-16T02:47:54.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
Be sure to check the learn guides for more usage information.
This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PI... | 37.840426 | 104 | 0.704526 |
38eb0ad5e0fe45e2c7852ef3e1250299d658542e | 409 | py | Python | Element_Analytics/apps/upload/migrations/0004_auto_20180430_2344.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | 1 | 2019-12-09T09:43:30.000Z | 2019-12-09T09:43:30.000Z | Element_Analytics/apps/upload/migrations/0004_auto_20180430_2344.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | 37 | 2018-02-04T04:41:46.000Z | 2018-04-29T20:39:09.000Z | Element_Analytics/apps/upload/migrations/0004_auto_20180430_2344.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | null | null | null | # Generated by Django 2.0.2 on 2018-05-01 06:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('upload', '0003_logfile_regex'),
]
operations = [
migrations.AlterField(
model_name='logfile',
name='log_name',
... | 21.526316 | 76 | 0.606357 |
38eb2d9d5e8d9881f848d2d072d5b993696ea385 | 50 | py | Python | kg/grids/__init__.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | kg/grids/__init__.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | kg/grids/__init__.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | from .utils import * ### @import 'kg.grids.utils'
| 25 | 49 | 0.66 |
38eb443a4f36364b30766098cd62ab036b34820d | 8,451 | py | Python | docs/conf.py | vangalamaheshh/snakemake | ada02a39c91ffd489af16ae2357cc4078a7ee181 | [
"MIT"
] | 1 | 2018-09-07T02:40:46.000Z | 2018-09-07T02:40:46.000Z | docs/conf.py | vangalamaheshh/snakemake | ada02a39c91ffd489af16ae2357cc4078a7ee181 | [
"MIT"
] | null | null | null | docs/conf.py | vangalamaheshh/snakemake | ada02a39c91ffd489af16ae2357cc4078a7ee181 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Snakemake documentation build configuration file, created by
# sphinx-quickstart on Sat Feb 1 16:01:02 2014.
#
# 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
# ... | 31.651685 | 79 | 0.72169 |
38eb47884280028b23843a15ff1a5da8f658237f | 6,864 | py | Python | tests/test_cbs_xtpl_gradient.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cbs_xtpl_gradient.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cbs_xtpl_gradient.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], '..'))
from .utils import *
from .addons import *
import numpy as np
import qcdb
#! Various gradients for a strained helium dimer and water molecule
ref_scf_dz = np.array(
[[ 0.0, 0.0, 0.01233095],
[ 0.0, 0.0, -0.0... | 30.918919 | 121 | 0.641463 |
38eb4aad593d915aa9b6bf773cd3991c942683eb | 2,454 | py | Python | vmchecker/ziputil.py | calin-iorgulescu/vmchecker | 050ec96495974f76c615e827ea68e2fc6430b1e9 | [
"MIT"
] | 19 | 2015-08-31T22:53:45.000Z | 2020-07-15T12:02:13.000Z | vmchecker/ziputil.py | calin-iorgulescu/vmchecker | 050ec96495974f76c615e827ea68e2fc6430b1e9 | [
"MIT"
] | 28 | 2015-01-18T13:26:47.000Z | 2021-06-29T13:51:09.000Z | vmchecker/ziputil.py | calin-iorgulescu/vmchecker | 050ec96495974f76c615e827ea68e2fc6430b1e9 | [
"MIT"
] | 16 | 2015-04-20T06:04:22.000Z | 2017-04-15T19:39:54.000Z | """Functions for properly handling zip files"""
import os
# HACK: XXX: TODO: determine when python2.5 is old enough to ignore
# python2.5 has a limited zipfile implementation (for example there's
# no extractall() method
# instead on changing & bloating this code I'll just copy and use the
# zipfile from upstrea... | 29.926829 | 117 | 0.660147 |
38eb4b1ed04d257025770f5d0d8fc5765690bc19 | 1,940 | py | Python | utils/searchPartPaper.py | igemsoftware/HFUT-China_2015 | 5db86858963d29188ec1a8fdedaf7a98f4528cf4 | [
"Apache-2.0"
] | null | null | null | utils/searchPartPaper.py | igemsoftware/HFUT-China_2015 | 5db86858963d29188ec1a8fdedaf7a98f4528cf4 | [
"Apache-2.0"
] | 3 | 2015-09-21T21:50:45.000Z | 2015-09-22T15:42:28.000Z | utils/searchPartPaper.py | igemsoftware/HFUT-China_2015 | 5db86858963d29188ec1a8fdedaf7a98f4528cf4 | [
"Apache-2.0"
] | 2 | 2020-03-28T01:33:51.000Z | 2021-07-18T13:56:27.000Z | import os
import django
import csv
import sys
from BeautifulSoup import BeautifulSoup
import urllib2
import xml.etree.ElementTree as ET
import traceback
pro_dir = os.getcwd()
sys.path.append(pro_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "BioDesigner.settings")
from design.models import parts, part_papers, ... | 29.846154 | 99 | 0.657732 |
38eb5281c5c990500471826704ef85cd89e73d6b | 2,397 | py | Python | predico/sample/__init__.py | pauleveritt/predico | 2bbf88a7775d31907d2229a32a89490172acd988 | [
"Apache-2.0"
] | null | null | null | predico/sample/__init__.py | pauleveritt/predico | 2bbf88a7775d31907d2229a32a89490172acd988 | [
"Apache-2.0"
] | null | null | null | predico/sample/__init__.py | pauleveritt/predico | 2bbf88a7775d31907d2229a32a89490172acd988 | [
"Apache-2.0"
] | null | null | null | """
Sample used for documentation and full testing.
Contains a service manager with some views, resources, and adapters.
"""
from dataclasses import dataclass
from typing import Optional
from predico import registry
from predico.field_types import injected
from predico.servicemanager.configuration import ServiceMan... | 29.9625 | 71 | 0.73884 |
38eb9192d39e48803614b6452ce2756621c3a1f6 | 46,739 | py | Python | aiortc/rtcsctptransport.py | dsvictor94/aiortc | 081d05e4e8fab41bc787da26ef7b2c46e2e92be4 | [
"BSD-3-Clause"
] | 1 | 2021-07-23T09:44:11.000Z | 2021-07-23T09:44:11.000Z | aiortc/rtcsctptransport.py | dsvictor94/aiortc | 081d05e4e8fab41bc787da26ef7b2c46e2e92be4 | [
"BSD-3-Clause"
] | null | null | null | aiortc/rtcsctptransport.py | dsvictor94/aiortc | 081d05e4e8fab41bc787da26ef7b2c46e2e92be4 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import enum
import hmac
import logging
import math
import os
import time
from struct import pack, unpack
import attr
import crcmod.predefined
from pyee import EventEmitter
from .exceptions import InvalidStateError
from .rtcdatachannel import RTCDataChannel, RTCDataChannelParameters
from .utils import r... | 32.730392 | 100 | 0.596889 |
38eb9f10bbc37d6566b97a0b746d3e4cad708c35 | 3,663 | py | Python | AlgoritmosGeneticos/Proyecto02/Proyecto2/cartas.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | 1 | 2021-08-16T19:44:08.000Z | 2021-08-16T19:44:08.000Z | AlgoritmosGeneticos/Proyecto02/Proyecto2/cartas.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | null | null | null | AlgoritmosGeneticos/Proyecto02/Proyecto2/cartas.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 4 17:44:56 2020
Universidad Autónoma del Estado de México
Centro Universitario UAEM ZUMPANGO
Ingenieria en Computación
UA Algoritmos Geneticos 2020-A
Alumno: Axel Valenzuela Juárez
Profesor: DR. Asdrúbal López Chau
Descripcion:
Proyecto 2
El problema de las carta... | 39.387097 | 134 | 0.66694 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.