hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fcaf742a9bc077abb182556e6e68989c473b3011 | 4,951 | py | Python | tests/library/utils.py | arenadata/adcm | a499caa30adc2a53e7b3f46c96a865f9e4079e4e | [
"Apache-2.0"
] | 16 | 2019-11-28T18:05:21.000Z | 2021-12-08T18:09:18.000Z | tests/library/utils.py | arenadata/adcm | a499caa30adc2a53e7b3f46c96a865f9e4079e4e | [
"Apache-2.0"
] | 1,127 | 2019-11-29T08:57:25.000Z | 2022-03-31T20:21:32.000Z | tests/library/utils.py | arenadata/adcm | a499caa30adc2a53e7b3f46c96a865f9e4079e4e | [
"Apache-2.0"
] | 10 | 2019-11-28T18:05:06.000Z | 2022-01-13T06:16:40.000Z | # 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
# distributed under t... | 26.475936 | 108 | 0.66633 |
0efad5e64d3fd0903b86eb2baedb60a7755a2ad4 | 3,335 | py | Python | 04_pages/bookstore_project/settings.py | tlanc007/DjangoForProfessionals_exercises | e110e50d7f7e69bee7235f660622b435dae9011a | [
"MIT"
] | null | null | null | 04_pages/bookstore_project/settings.py | tlanc007/DjangoForProfessionals_exercises | e110e50d7f7e69bee7235f660622b435dae9011a | [
"MIT"
] | 13 | 2020-06-05T22:39:44.000Z | 2022-02-10T13:05:24.000Z | 04_pages/bookstore_project/settings.py | tlanc007/DjangoForProfessionals_exercises | e110e50d7f7e69bee7235f660622b435dae9011a | [
"MIT"
] | 1 | 2020-12-17T09:53:09.000Z | 2020-12-17T09:53:09.000Z | """
Django settings for bookstore_project project.
Generated by 'django-admin startproject' using Django 2.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
im... | 25.653846 | 91 | 0.689655 |
d94cffde872df39bb2e73232008c19d3ca620709 | 738 | py | Python | src/wai/common/meta/typing/_typing.py | waikato-datamining/wai-common | bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34 | [
"MIT"
] | null | null | null | src/wai/common/meta/typing/_typing.py | waikato-datamining/wai-common | bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34 | [
"MIT"
] | 8 | 2020-07-01T02:11:31.000Z | 2020-12-17T01:57:17.000Z | src/wai/common/meta/typing/_typing.py | waikato-datamining/wai-common | bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34 | [
"MIT"
] | null | null | null | from typing import Tuple, Any, Dict, Callable, TypeVar
# The type of a standard *args parameter
POSITIONAL_ARGS_TYPE = Tuple[Any, ...]
# The type of a standard **kwargs parameter
KEYWORD_ARGS_TYPE = Dict[str, Any]
# The type of *args, **kwargs combined
VAR_ARGS_TYPE = Tuple[POSITIONAL_ARGS_TYPE, KEYWORD_ARGS_TYPE]
... | 28.384615 | 63 | 0.765583 |
b7cf49cb8ef94c62898a0de4ad2b8f61e1ec923f | 1,486 | py | Python | setup.py | gilsonbp/django-baton | ec137e13c5639885b58ead3c2d19e851fd259ad7 | [
"MIT"
] | null | null | null | setup.py | gilsonbp/django-baton | ec137e13c5639885b58ead3c2d19e851fd259ad7 | [
"MIT"
] | null | null | null | setup.py | gilsonbp/django-baton | ec137e13c5639885b58ead3c2d19e851fd259ad7 | [
"MIT"
] | null | null | null | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-baton',
version='1.1.2',
... | 34.55814 | 78 | 0.631225 |
9613e6fae2e0bb978bcc5d1156682300e2547ca4 | 8,971 | py | Python | compiler/modules/replica_column.py | marwaneltoukhy/OpenRAM | ed9d32c7bc105db2a438d36d4b2d852152a79e3b | [
"BSD-3-Clause"
] | 1 | 2020-11-21T05:37:53.000Z | 2020-11-21T05:37:53.000Z | compiler/modules/replica_column.py | marwaneltoukhy/OpenRAM | ed9d32c7bc105db2a438d36d4b2d852152a79e3b | [
"BSD-3-Clause"
] | null | null | null | compiler/modules/replica_column.py | marwaneltoukhy/OpenRAM | ed9d32c7bc105db2a438d36d4b2d852152a79e3b | [
"BSD-3-Clause"
] | null | null | null | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2019 Regents of the University of California
# All rights reserved.
#
import debug
import design
from tech import cell_properties
from sram_factory import factory
from vector import vector
from globals import OPTS
class replica_column(design.design):
... | 39.004348 | 102 | 0.578085 |
587618974c383405fd4c0fc2607f752cde2859ec | 460 | py | Python | smot/util.py | arendsee/sap | c2dd2788c584d0d0924a5b21052c4e9042c2e94e | [
"MIT"
] | 4 | 2021-12-09T17:14:08.000Z | 2022-02-16T19:09:53.000Z | smot/util.py | arendsee/sap | c2dd2788c584d0d0924a5b21052c4e9042c2e94e | [
"MIT"
] | 2 | 2022-02-15T14:09:59.000Z | 2022-02-21T20:07:45.000Z | smot/util.py | arendsee/sap | c2dd2788c584d0d0924a5b21052c4e9042c2e94e | [
"MIT"
] | 3 | 2022-01-24T12:23:31.000Z | 2022-02-16T18:40:55.000Z | from __future__ import annotations
from typing import List, TypeVar, Optional
import sys
A = TypeVar("A")
def log(msg: str) -> None:
print(msg, file=sys.stderr)
def die(msg: str) -> None:
print(msg, file=sys.stderr)
sys.exit(1)
def concat(xss: List[List[A]]) -> List[A]:
ys: List[A]
ys = []
... | 16.428571 | 45 | 0.606522 |
7d194bbab73ddee762569cdb2ae7dc7d55c62df1 | 50,456 | py | Python | test/functional/test_framework/test_framework.py | fivebalanceID/Fivebalance_V3 | 353986eb40326fe0c66d9172ea2b0a925b31c734 | [
"MIT"
] | 7 | 2019-06-01T01:36:35.000Z | 2020-11-12T11:15:57.000Z | test/functional/test_framework/test_framework.py | fivebalanceID/Fivebalance_V3 | 353986eb40326fe0c66d9172ea2b0a925b31c734 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | fivebalanceID/Fivebalance_V3 | 353986eb40326fe0c66d9172ea2b0a925b31c734 | [
"MIT"
] | 1 | 2021-05-20T05:38:23.000Z | 2021-05-20T05:38:23.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
from enum import Enum
from io import BytesIO
import logging
import optp... | 44.533098 | 310 | 0.594756 |
fdcb6411e0b3644ceb5d8907af86983ac1dc1e60 | 666 | py | Python | manage.py | yashpatel7025/django-email-service-AUS | 1a584c6e3c4df4264b18c05060553f9a80ea9b96 | [
"MIT"
] | null | null | null | manage.py | yashpatel7025/django-email-service-AUS | 1a584c6e3c4df4264b18c05060553f9a80ea9b96 | [
"MIT"
] | null | null | null | manage.py | yashpatel7025/django-email-service-AUS | 1a584c6e3c4df4264b18c05060553f9a80ea9b96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_AUS.settings')
try:
from django.core.management import execute_from_command_line
except I... | 28.956522 | 74 | 0.68018 |
de8bbcecc8ab616db10291fe5e0d6316229b8416 | 4,905 | py | Python | tests/test_infer.py | lnielsen/pyhf | 3d98dc445c384d2919a77b9af0a202e12343a707 | [
"Apache-2.0"
] | null | null | null | tests/test_infer.py | lnielsen/pyhf | 3d98dc445c384d2919a77b9af0a202e12343a707 | [
"Apache-2.0"
] | null | null | null | tests/test_infer.py | lnielsen/pyhf | 3d98dc445c384d2919a77b9af0a202e12343a707 | [
"Apache-2.0"
] | null | null | null | import pytest
import pyhf
import numpy as np
@pytest.fixture(scope='module')
def hypotest_args():
pdf = pyhf.simplemodels.hepdata_like(
signal_data=[12.0, 11.0], bkg_data=[50.0, 52.0], bkg_uncerts=[3.0, 7.0]
)
mu_test = 1.0
data = [51, 48] + pdf.config.auxdata
return mu_test, data, pdf
d... | 32.483444 | 83 | 0.64261 |
bb7931d25f521ef63125a2bacbb2c8f1c6918658 | 716 | py | Python | wildlifecompliance/migrations/0426_auto_20200212_1624.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 1 | 2020-12-07T17:12:40.000Z | 2020-12-07T17:12:40.000Z | wildlifecompliance/migrations/0426_auto_20200212_1624.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 14 | 2020-01-08T08:08:26.000Z | 2021-03-19T22:59:46.000Z | wildlifecompliance/migrations/0426_auto_20200212_1624.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 15 | 2020-01-08T08:02:28.000Z | 2021-11-03T06:48:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2020-02-12 08:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wildlifecompliance', '0425_merge_20200210_1630'),
]
operations = [
migratio... | 27.538462 | 83 | 0.638268 |
3d48f4feb380168ee32b2541a207483248233814 | 1,816 | py | Python | tests/eigenstepsbuilder_test_with_plot.py | AyoubBelhadji/FrameBuilder | 537094ca2de904a61d4babb2c7a4f7bbc3e312fd | [
"MIT"
] | null | null | null | tests/eigenstepsbuilder_test_with_plot.py | AyoubBelhadji/FrameBuilder | 537094ca2de904a61d4babb2c7a4f7bbc3e312fd | [
"MIT"
] | null | null | null | tests/eigenstepsbuilder_test_with_plot.py | AyoubBelhadji/FrameBuilder | 537094ca2de904a61d4babb2c7a4f7bbc3e312fd | [
"MIT"
] | null | null | null | import sys
#sys.path.append('../')
sys.path.insert(0, '..')
from FrameBuilder.eigenstepsbuilder import *
import numpy as np
import matplotlib.pyplot as plt
N = 10
d = 2
Q = np.zeros((N,d))
for _ in range(0,d):
Q[_,_] = 1
lv_scores_vector = d/N*np.ones(N)
lv_scores_vector = np.linspace(1, 1000, num=N)
lv_scores_ve... | 27.938462 | 94 | 0.692181 |
beaa96e2d1611b131a91008677266f88954e70e4 | 4,178 | py | Python | hpimdm/tree/tree_if_root_originator.py | pedrofran12/hpim_dm | fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c | [
"MIT"
] | 1 | 2020-02-04T20:59:03.000Z | 2020-02-04T20:59:03.000Z | hpimdm/tree/tree_if_root_originator.py | pedrofran12/hpim_dm | fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c | [
"MIT"
] | 3 | 2020-06-09T16:37:01.000Z | 2021-08-30T00:31:12.000Z | hpimdm/tree/tree_if_root_originator.py | pedrofran12/hpim_dm | fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c | [
"MIT"
] | 1 | 2020-11-23T06:47:46.000Z | 2020-11-23T06:47:46.000Z | import logging
import traceback
from threading import Timer
from threading import Thread
from . import data_packets_socket
from .hpim_globals import SOURCE_LIFETIME
from .tree_interface import TreeInterface
class TreeInterfaceRootOriginator(TreeInterface):
LOGGER = logging.getLogger('hpim.KernelEntry.RootInterfa... | 33.15873 | 107 | 0.578267 |
892930d333201a7442a04c9c230c53b879477dad | 22,296 | py | Python | crosslingual_NER/model/ner_model.py | baozuyi/MLMA | a9a8be912da1655936399dd6c51302bcb08a5dbd | [
"Apache-2.0"
] | 6 | 2019-11-05T07:41:15.000Z | 2021-11-12T04:25:55.000Z | crosslingual_NER/model/ner_model.py | baozuyi/MLMA | a9a8be912da1655936399dd6c51302bcb08a5dbd | [
"Apache-2.0"
] | 3 | 2020-01-28T22:19:11.000Z | 2020-11-13T17:37:40.000Z | crosslingual_NER/model/ner_model.py | baozuyi/MLMA | a9a8be912da1655936399dd6c51302bcb08a5dbd | [
"Apache-2.0"
] | 1 | 2019-10-28T04:58:43.000Z | 2019-10-28T04:58:43.000Z | import numpy as np
import os
import tensorflow as tf
import tensorflow_hub as hub
from .data_utils import minibatches, pad_sequences, get_chunks, pad_sequences_trans, _pad_sequences
from .general_utils import Progbar
from .base_model import BaseModel
def shape_list(x):
ps = x.get_shape().as_list()
ts = tf.s... | 42.876923 | 168 | 0.577054 |
05ab2ddb22dd745b695098958433e63534040656 | 739 | py | Python | lepmlutils/xgbutils/test_partition.py | Lewington-pitsos/mlutils | c92322a8a2fc0b5342d44b0d92051a93c6eede44 | [
"MIT"
] | null | null | null | lepmlutils/xgbutils/test_partition.py | Lewington-pitsos/mlutils | c92322a8a2fc0b5342d44b0d92051a93c6eede44 | [
"MIT"
] | null | null | null | lepmlutils/xgbutils/test_partition.py | Lewington-pitsos/mlutils | c92322a8a2fc0b5342d44b0d92051a93c6eede44 | [
"MIT"
] | null | null | null | import unittest
import os
import pandas as pd
from .gridsearcher import GridSearcher
from .partition import Partition
class TestPartition(unittest.TestCase):
def setUp(self):
pass
def test_partitions_correctly(self):
dirname = os.path.dirname(__file__)
dataset = pd.read_csv(dirname + "... | 26.392857 | 63 | 0.614344 |
29c401794a332f18d9d82febdd0d2088f2c9e4e3 | 16,503 | py | Python | reagent/test/preprocessing/test_preprocessing.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | null | null | null | reagent/test/preprocessing/test_preprocessing.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | null | null | null | reagent/test/preprocessing/test_preprocessing.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import unittest
import numpy as np
import numpy.testing as npt
import six
import torch
from reagent.preprocessing import identify_types, normalization, transforms
from reagent.preprocessing.identify_types import BOXCOX, CON... | 40.349633 | 88 | 0.571714 |
10540a0d4d53dee16420cba902e7e954b2a67507 | 10,171 | py | Python | magenta/models/drums_rnn/drums_rnn_generate.py | cristianmtr/magenta | ac2d8ae455fdd07f4b46dec82aedab22fcb6bbbd | [
"Apache-2.0"
] | 1 | 2019-01-24T07:22:48.000Z | 2019-01-24T07:22:48.000Z | magenta/models/drums_rnn/drums_rnn_generate.py | dkun7944/magenta | 8f930263b7cfd67f27eb12cd871b4e5fa87d382e | [
"Apache-2.0"
] | null | null | null | magenta/models/drums_rnn/drums_rnn_generate.py | dkun7944/magenta | 8f930263b7cfd67f27eb12cd871b4e5fa87d382e | [
"Apache-2.0"
] | 1 | 2019-11-26T06:30:52.000Z | 2019-11-26T06:30:52.000Z | # Copyright 2018 The Magenta 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 ... | 38.673004 | 80 | 0.737784 |
12af7493069d5c510deae0126430e7122645a872 | 1,751 | py | Python | py/hash/test_hash_files.py | lakshmi2005/buck | 012a59d5d2e5a45b483e85fb190d2b67ea0c56ab | [
"Apache-2.0"
] | 1 | 2018-02-28T06:26:56.000Z | 2018-02-28T06:26:56.000Z | py/hash/test_hash_files.py | lakshmi2005/buck | 012a59d5d2e5a45b483e85fb190d2b67ea0c56ab | [
"Apache-2.0"
] | 1 | 2018-12-10T15:54:22.000Z | 2018-12-10T19:30:37.000Z | py/hash/test_hash_files.py | lakshmi2005/buck | 012a59d5d2e5a45b483e85fb190d2b67ea0c56ab | [
"Apache-2.0"
] | null | null | null | # Copyright 2015-present Facebook, Inc.
#
# 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... | 33.673077 | 82 | 0.698458 |
5ef4ca0dd05d1ceeda4c92325042af78fb11acab | 4,146 | py | Python | compiler-rt/test/profile/lit.cfg.py | ornata/llvm-project | 494913b8b4e4bce0b3525e5569d8e486e82b9a52 | [
"Apache-2.0"
] | null | null | null | compiler-rt/test/profile/lit.cfg.py | ornata/llvm-project | 494913b8b4e4bce0b3525e5569d8e486e82b9a52 | [
"Apache-2.0"
] | null | null | null | compiler-rt/test/profile/lit.cfg.py | ornata/llvm-project | 494913b8b4e4bce0b3525e5569d8e486e82b9a52 | [
"Apache-2.0"
] | null | null | null | # -*- Python -*-
import os
def get_required_attr(config, attr_name):
attr_value = getattr(config, attr_name, None)
if attr_value == None:
lit_config.fatal(
"No attribute %r in test configuration! You may need to run "
"tests from your build directory or add this attribute "
"to lit.site.cfg.... | 41.878788 | 123 | 0.723589 |
26b525667720996a220256c15ce2aa77c31aac1c | 149 | py | Python | src/mathlib1/dot.py | PartehDev/mathlib1 | 65047d1d5c4ecddee4c889786552592be1d1ea94 | [
"MIT"
] | null | null | null | src/mathlib1/dot.py | PartehDev/mathlib1 | 65047d1d5c4ecddee4c889786552592be1d1ea94 | [
"MIT"
] | null | null | null | src/mathlib1/dot.py | PartehDev/mathlib1 | 65047d1d5c4ecddee4c889786552592be1d1ea94 | [
"MIT"
] | null | null | null | def dotproduct(vec1, vec2):
dotproduct=0
for vec1,vec2 in zip(vec1,vec2):
dotproduct = dotproduct+vec1*vec2
return dotproduct | 29.8 | 42 | 0.671141 |
81b3eb453e61f542ed2c28ad75d17ed40834c915 | 2,759 | py | Python | yumipy/yumi_state.py | allenyh/yumipy | 9914fa8d501c683b6ad5bd6976cfc522234cfd18 | [
"Apache-2.0"
] | 58 | 2017-04-06T16:39:15.000Z | 2022-03-04T01:19:06.000Z | yumipy/yumi_state.py | allenyh/yumipy | 9914fa8d501c683b6ad5bd6976cfc522234cfd18 | [
"Apache-2.0"
] | 31 | 2017-05-11T04:01:36.000Z | 2021-12-02T12:11:14.000Z | yumipy/yumi_state.py | allenyh/yumipy | 9914fa8d501c683b6ad5bd6976cfc522234cfd18 | [
"Apache-2.0"
] | 41 | 2017-04-06T16:39:18.000Z | 2021-12-19T00:18:42.000Z | '''
State Encapsulation for YuMi robot
Author: Jacky
'''
import numpy as np
class YuMiState:
""" Object that encapsulates a yumi arm joint angle configuration.
"""
NUM_JOINTS = 7
NAME = "YuMi"
def __init__(self, vals = [0] * NUM_JOINTS):
for i, val in enumerate(vals):
setattr(... | 21.223077 | 93 | 0.58137 |
05346a1b1b094bef468464684d33a90ecdeac9cc | 758 | py | Python | text/symbols.py | riderjensen/tacotron2 | 6d0116fc6c234e72e485c7f81bb6fc5525661ca8 | [
"BSD-3-Clause"
] | 5 | 2020-08-07T21:41:13.000Z | 2020-12-24T02:11:34.000Z | text/symbols.py | riderjensen/tacotron2 | 6d0116fc6c234e72e485c7f81bb6fc5525661ca8 | [
"BSD-3-Clause"
] | null | null | null | text/symbols.py | riderjensen/tacotron2 | 6d0116fc6c234e72e485c7f81bb6fc5525661ca8 | [
"BSD-3-Clause"
] | 2 | 2020-07-29T14:56:53.000Z | 2021-12-02T05:54:23.000Z |
""" from https://github.com/keithito/tacotron """
'''
Defines the set of symbols used in text input to the model.
The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details. '''
from t... | 37.9 | 195 | 0.737467 |
f363f8f3f40fa78911c34d3ba2fd35d050991d57 | 253,507 | py | Python | release/scripts/startup/bl_ui/space_view3d.py | ACFX/Blender | 79aa29ce663fbd552062fae520dcc3539be67bab | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/space_view3d.py | ACFX/Blender | 79aa29ce663fbd552062fae520dcc3539be67bab | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/space_view3d.py | ACFX/Blender | 79aa29ce663fbd552062fae520dcc3539be67bab | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 33.15117 | 118 | 0.635 |
dbef753177448138a946ecf3abec9919e7cffbe2 | 6,157 | py | Python | tests/pytests/unit/client/ssh/test_ssh.py | lkubb/salt | 48f8cc9dfe30b90b31050a2646bccd4b5a1b7927 | [
"Apache-2.0"
] | null | null | null | tests/pytests/unit/client/ssh/test_ssh.py | lkubb/salt | 48f8cc9dfe30b90b31050a2646bccd4b5a1b7927 | [
"Apache-2.0"
] | null | null | null | tests/pytests/unit/client/ssh/test_ssh.py | lkubb/salt | 48f8cc9dfe30b90b31050a2646bccd4b5a1b7927 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
import salt.client.ssh.client
import salt.utils.msgpack
from salt.client import ssh
from tests.support.mock import MagicMock, patch
from tests.support.runtests import RUNTIME_VARS
pytestmark = [
pytest.mark.skip_if_binaries_missing("ssh", "ssh-keygen", check_all=True),
]
@pytest.fixture
... | 31.253807 | 87 | 0.583076 |
b4c9ac52358d5a150a83ad197482692fce77e459 | 390 | py | Python | app/email.py | MelvinOmega/pitch-app | 865aeef96433eb372f86ad8b78428b060fdc0856 | [
"MIT"
] | null | null | null | app/email.py | MelvinOmega/pitch-app | 865aeef96433eb372f86ad8b78428b060fdc0856 | [
"MIT"
] | null | null | null | app/email.py | MelvinOmega/pitch-app | 865aeef96433eb372f86ad8b78428b060fdc0856 | [
"MIT"
] | null | null | null | from flask_mail import Message
from flask import render_template
from . import mail
def mail_message(subject,template,to,**kwargs):
sender_email = 'melvinomega151@gmail.com'
email = Message(subject, sender = sender_email, recipients=[to])
email.body= render_template(template + ".txt",**kwargs)
email.ht... | 39 | 68 | 0.738462 |
0c3b463f05ed28abc79e1f400dbf2d7edcb47386 | 1,101 | py | Python | iroko/records/webpack.py | tocororo/iroko | e1cf08bbd565178c2d60244719aad6d288b48363 | [
"MIT"
] | null | null | null | iroko/records/webpack.py | tocororo/iroko | e1cf08bbd565178c2d60244719aad6d288b48363 | [
"MIT"
] | 14 | 2021-02-02T22:47:27.000Z | 2021-12-22T18:39:46.000Z | iroko/records/webpack.py | tocororo/iroko | e1cf08bbd565178c2d60244719aad6d288b48363 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021. Universidad de Pinar del Rio
# This file is part of SCEIBA (sceiba.cu).
# SCEIBA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
#
#
# iroko is free software; you can redistribute it... | 28.973684 | 73 | 0.564941 |
3e9fe8cb3ae049462e45c998eba8dbfe17e24310 | 1,940 | py | Python | tasks/search.py | mackenbaron/WeiboSpider | 571ac8ce0cc2fe7548820c543f30a88c702962a6 | [
"MIT"
] | 5 | 2019-09-21T05:19:24.000Z | 2021-08-05T07:47:18.000Z | tasks/search.py | msak222/WeiboSpider | e330338c9565da6ba6c426cca4168df9f89faa63 | [
"MIT"
] | null | null | null | tasks/search.py | msak222/WeiboSpider | e330338c9565da6ba6c426cca4168df9f89faa63 | [
"MIT"
] | 2 | 2019-05-08T04:14:21.000Z | 2020-05-24T10:30:03.000Z | # coding:utf-8
from urllib import parse as url_parse
from logger.log import crawler
from tasks.workers import app
from page_get.basic import get_page
from config.conf import get_max_search_page
from page_parse import search as parse_search
from db.search_words import get_search_keywords
from db.wb_data import insert_we... | 35.272727 | 105 | 0.665464 |
610b32bd2ab9aca51992ad29cb3ad7b88ac56436 | 3,633 | py | Python | test/python/test_la.py | solomonik/ctf | b79428ca8e7a5fa6ef22197ff5129d1aace3134b | [
"BSD-2-Clause"
] | 56 | 2015-02-28T08:19:58.000Z | 2021-11-04T16:46:17.000Z | test/python/test_la.py | solomonik/ctf | b79428ca8e7a5fa6ef22197ff5129d1aace3134b | [
"BSD-2-Clause"
] | 40 | 2015-04-08T14:58:42.000Z | 2017-11-17T20:57:26.000Z | test/python/test_la.py | solomonik/ctf | b79428ca8e7a5fa6ef22197ff5129d1aace3134b | [
"BSD-2-Clause"
] | 17 | 2015-04-03T00:57:43.000Z | 2018-03-30T20:46:14.000Z | #!/usr/bin/env python
import unittest
import numpy
import ctf
import os
import sys
from ctf import random
import numpy.linalg as la
def allclose(a, b):
if abs(ctf.to_nparray(a) - ctf.to_nparray(b)).sum() > 1e-4:
print(ctf.to_nparray(a))
print(ctf.to_nparray(b))
return abs(ctf.to_nparray(a) - ... | 33.638889 | 153 | 0.586843 |
e721d6007373976b4d867fb2ffa95f5a63010061 | 356 | py | Python | src/doom/parameters.py | phillikus/doom-ai | ee0d49ae46321960adacc054d041377622877b10 | [
"MIT"
] | 2 | 2019-02-15T05:53:24.000Z | 2020-08-27T09:25:08.000Z | src/doom/parameters.py | philipp007/doom-ai | ee0d49ae46321960adacc054d041377622877b10 | [
"MIT"
] | null | null | null | src/doom/parameters.py | philipp007/doom-ai | ee0d49ae46321960adacc054d041377622877b10 | [
"MIT"
] | 1 | 2020-07-15T12:21:27.000Z | 2020-07-15T12:21:27.000Z | class Parameters():
def __init__(self):
self.scenario = 'Basic'
self.lr = 0.0001
self.gamma = 0.99
self.tau = 1.
self.seed = 1
self.num_processes = 4
self.num_steps = 20
self.max_episode_length = 10000
self.num_actions = 3
self.model = ... | 27.384615 | 39 | 0.542135 |
e7e9dde9693fa33c0b9f7ee1971f53f984c6728d | 1,047 | py | Python | Stack/BinaryTreeInOrderTraversal.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | 2 | 2021-01-31T03:42:01.000Z | 2021-01-31T03:43:08.000Z | Stack/BinaryTreeInOrderTraversal.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | null | null | null | Stack/BinaryTreeInOrderTraversal.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | 1 | 2021-01-31T03:42:02.000Z | 2021-01-31T03:42:02.000Z | class Solution:
def inorderTraversal(self, root):
result = []
stack = []
current = root
# while current is not none or stack is not empty
while current != None or len(stack) > 0:
# push all the left nodes onto stack
while current:
sta... | 26.846154 | 59 | 0.557784 |
3c9f5ef29ec7551a6753dfff161963900a3daa49 | 65 | py | Python | Configuration.py | VincentMelia/PythonCartoons | 835d48a99d9f7bdaa8098fc85ae0d8148f1c0a5e | [
"MIT"
] | null | null | null | Configuration.py | VincentMelia/PythonCartoons | 835d48a99d9f7bdaa8098fc85ae0d8148f1c0a5e | [
"MIT"
] | null | null | null | Configuration.py | VincentMelia/PythonCartoons | 835d48a99d9f7bdaa8098fc85ae0d8148f1c0a5e | [
"MIT"
] | null | null | null | import os
Root_URL = 'https://' + os.getenv('cartoon_root_url')
| 16.25 | 53 | 0.692308 |
6c9323e18acf8e431568ad3239236f383f7abd84 | 212 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extractLorCromwell.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractLorCromwell.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractLorCromwell.py | rrosajp/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z | def extractLorCromwell(item):
"""
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol or frag) or 'preview' in item['title'].lower():
return None
return False
| 23.555556 | 74 | 0.698113 |
642e39b6d407736869f6c79415e58d4d2bc8e422 | 3,437 | py | Python | students/K33402/Dubina Sergey/practical_works/prac_2/django_project_dubina/django_project_dubina/settings.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33402/Dubina Sergey/practical_works/prac_2/django_project_dubina/django_project_dubina/settings.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33402/Dubina Sergey/practical_works/prac_2/django_project_dubina/django_project_dubina/settings.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | """
Django settings for django_project_dubina project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/sett... | 27.717742 | 92 | 0.680244 |
94b209d9880ce721e9d1ccfadf0036f93936d3ab | 3,403 | py | Python | test/test_motor_bulk.py | myfreecomm/motor | bf1382c906045d9d9ad14106486a02f6b8721ada | [
"Apache-2.0"
] | null | null | null | test/test_motor_bulk.py | myfreecomm/motor | bf1382c906045d9d9ad14106486a02f6b8721ada | [
"Apache-2.0"
] | null | null | null | test/test_motor_bulk.py | myfreecomm/motor | bf1382c906045d9d9ad14106486a02f6b8721ada | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 MongoDB, Inc.
#
# 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, so... | 35.082474 | 78 | 0.597414 |
440b0ca82cedc39f507ee3fb34d0d6ae8f990978 | 16,207 | py | Python | app/models.py | lcfyi/ubcgrades | a00ee195eab320a9b976222e9c6d457c81d7872c | [
"MIT"
] | null | null | null | app/models.py | lcfyi/ubcgrades | a00ee195eab320a9b976222e9c6d457c81d7872c | [
"MIT"
] | null | null | null | app/models.py | lcfyi/ubcgrades | a00ee195eab320a9b976222e9c6d457c81d7872c | [
"MIT"
] | null | null | null | from app import db
import enum
class CampusEnum(enum.Enum):
UBCV = 0
UBCO = 1
class SessionEnum(enum.Enum):
W = 0
S = 1
class PAIRReportsGrade(db.Model):
__tablename__ = "PAIRReportsGrade"
campus = db.Column(db.Enum(CampusEnum), primary_key=True) # UBCV or UBCO
year = db.Column(db.Str... | 38.496437 | 121 | 0.590424 |
7370192ddd843201844af5eed98443bf9077be68 | 1,617 | py | Python | services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/errors.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | null | null | null | services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/errors.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | 1 | 2021-11-29T13:38:09.000Z | 2021-11-29T13:38:09.000Z | services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/errors.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | null | null | null | from typing import Optional
from aiodocker.exceptions import DockerError
from httpx import Response
from models_library.projects_nodes import NodeID
from ...core.errors import DirectorException
class DynamicSidecarError(DirectorException):
pass
class GenericDockerError(DynamicSidecarError):
"""Generic doc... | 29.4 | 83 | 0.724799 |
dcff8c20ff16500c29b8afeb9247ab8865b88245 | 694 | bzl | Python | third_party/pybind11/BUILD.bzl | howl-anderson/text | 3eb4cdfbda1c4e2154b7055a75b036b22c1ae573 | [
"Apache-2.0"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | third_party/pybind11/BUILD.bzl | howl-anderson/text | 3eb4cdfbda1c4e2154b7055a75b036b22c1ae573 | [
"Apache-2.0"
] | 276 | 2019-06-07T23:12:52.000Z | 2022-03-31T17:38:05.000Z | third_party/pybind11/BUILD.bzl | howl-anderson/text | 3eb4cdfbda1c4e2154b7055a75b036b22c1ae573 | [
"Apache-2.0"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | """
BUILD file for pybind11 package, since the github version does not have one.
"""
package(default_visibility = ["//visibility:public"])
cc_library(
name = "pybind11",
hdrs = glob(
include = [
"include/pybind11/*.h",
"include/pybind11/detail/*.h",
],
exclude =... | 23.133333 | 76 | 0.54755 |
bed726c5e04d02862bea38b3ca8afcb1444d486e | 1,643 | py | Python | scripts/utils_pandas.py | xR86/ml-stuff | 2a1b79408897171b78032ff2531ab6f8b18be6c4 | [
"MIT"
] | 3 | 2018-12-11T03:03:15.000Z | 2020-02-11T19:38:07.000Z | scripts/utils_pandas.py | xR86/ml-stuff | 2a1b79408897171b78032ff2531ab6f8b18be6c4 | [
"MIT"
] | 6 | 2017-05-31T20:58:32.000Z | 2021-02-16T23:13:15.000Z | scripts/utils_pandas.py | xR86/ml-stuff | 2a1b79408897171b78032ff2531ab6f8b18be6c4 | [
"MIT"
] | null | null | null | import pandas as pd
# Ideally, selected features should be enumerated in markdown
# ___________
# |_md_______|
# | feature1 |
# | `id` |
# | feature2 |
# | `...` |
# |__________|
keep_this = """
Feature 1
Feature 2
"""
def feature_lst(lst=keep_this):
return list(map(lambda x: x.strip(), filter(None, lst.... | 22.506849 | 75 | 0.649422 |
07910697d21fc30c1fbebc4a924e132fa34204b5 | 8,932 | py | Python | homeassistant/components/mqtt/sensor.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 2 | 2020-03-02T19:17:52.000Z | 2020-03-02T19:17:53.000Z | homeassistant/components/mqtt/sensor.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:05:36.000Z | 2022-03-12T00:54:00.000Z | homeassistant/components/mqtt/sensor.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 1 | 2020-03-07T10:43:50.000Z | 2020-03-07T10:43:50.000Z | """Support for MQTT sensors."""
from datetime import timedelta
import json
import logging
from typing import Optional
import voluptuous as vol
from homeassistant.components import mqtt, sensor
from homeassistant.components.sensor import DEVICE_CLASSES_SCHEMA
from homeassistant.const import (
CONF_DEVICE,
CONF... | 33.961977 | 88 | 0.65215 |
a3cc16dac95532cb156a11ef6b3e3e71d6ca4d85 | 12,290 | py | Python | chess_engine.py | Rakshasl/pythondemo | e00d51edc7ff4b1b7e82b5cbd533852a4bd09796 | [
"MIT"
] | null | null | null | chess_engine.py | Rakshasl/pythondemo | e00d51edc7ff4b1b7e82b5cbd533852a4bd09796 | [
"MIT"
] | 1 | 2021-11-15T17:48:39.000Z | 2021-11-15T17:48:39.000Z | chess_engine.py | Rakshasl/ChessOnline | a55535e7565f06b272ab1f8d9b5a79dfdfe4c993 | [
"MIT"
] | null | null | null | import chess
import random
import signal
import time
import cProfile
class Engine:
def __init__(self, fen):
self.board = chess.Board()
self.MAX_DEPTH = 60
self.piece_values = {
# pawn
1:100,
# bishop
2:310,
# knight
3:... | 35.2149 | 125 | 0.507404 |
70d58285adadea482658737d1b93f6846db6923c | 1,213 | py | Python | snippets/02_analize_shape_data.py | madewithbytes/heathmap_mappa | 3c302151ec6dcd268b00c8c95e016daa1e618e7b | [
"MIT"
] | null | null | null | snippets/02_analize_shape_data.py | madewithbytes/heathmap_mappa | 3c302151ec6dcd268b00c8c95e016daa1e618e7b | [
"MIT"
] | null | null | null | snippets/02_analize_shape_data.py | madewithbytes/heathmap_mappa | 3c302151ec6dcd268b00c8c95e016daa1e618e7b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pandas as pd
import shapefile as shp
def read_shape_file(*, file_path, encoding="ISO-8859-1"):
"""Reads the shape file and specifies shp file encoding."""
return shp.Reader(file_path, encoding=encoding)
def prepare_data_frame(*, shape_file):
"""Transforms the shapefile into... | 32.783784 | 80 | 0.73042 |
9a26b95bb822f1ffd83a6cb1c7c39209d3324e28 | 19,111 | py | Python | pyani/download.py | b-brankovics/pyani | d203f764e6e40dfcf1462c127c12ad0d71fd8357 | [
"MIT"
] | null | null | null | pyani/download.py | b-brankovics/pyani | d203f764e6e40dfcf1462c127c12ad0d71fd8357 | [
"MIT"
] | null | null | null | pyani/download.py | b-brankovics/pyani | d203f764e6e40dfcf1462c127c12ad0d71fd8357 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) The James Hutton Institute 2016-2019
# (c) University of Strathclyde 2019-2020
# Author: Leighton Pritchard
#
# Contact:
# leighton.pritchard@strath.ac.uk
#
# Leighton Pritchard,
# Strathclyde Institute for Pharmacy and Biomedical Sciences,
# Cathedral Street,
# Glasgow,
# G1 1XQ
# Scotlan... | 31.904841 | 88 | 0.676888 |
24c996ca99bf9a2641c8b9ae0f52217e415c9f6f | 3,497 | py | Python | python-codes/0-k-means/simpleKMeans.py | bakhshiali/python-AIscratch | c7a9d14a8d0a7624379c436816905a64b8ee0dc9 | [
"BSD-3-Clause"
] | null | null | null | python-codes/0-k-means/simpleKMeans.py | bakhshiali/python-AIscratch | c7a9d14a8d0a7624379c436816905a64b8ee0dc9 | [
"BSD-3-Clause"
] | null | null | null | python-codes/0-k-means/simpleKMeans.py | bakhshiali/python-AIscratch | c7a9d14a8d0a7624379c436816905a64b8ee0dc9 | [
"BSD-3-Clause"
] | null | null | null | #simple k-means
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
style.use('fivethirtyeight')
plt.rcParams['axes.facecolor']='w'
from matplotlib.lines import Line2D
class KMeans:
'''
k = number of groups / clusters / ... (group)
tolerance = acceptable level of variat... | 47.256757 | 111 | 0.5662 |
296b31c7dff619238bad6e8de523961de6ce548c | 2,365 | py | Python | pipreq/cli.py | jessamynsmith/pipreq | ddafbaba06ff19ae1c02a385d3463f6896d338f6 | [
"MIT"
] | 6 | 2015-02-27T03:52:51.000Z | 2020-07-13T10:14:38.000Z | pipreq/cli.py | jessamynsmith/requirements-manager | ddafbaba06ff19ae1c02a385d3463f6896d338f6 | [
"MIT"
] | 5 | 2015-03-31T16:27:44.000Z | 2015-04-16T19:16:29.000Z | pipreq/cli.py | jessamynsmith/requirements-manager | ddafbaba06ff19ae1c02a385d3463f6896d338f6 | [
"MIT"
] | 2 | 2015-02-27T14:02:49.000Z | 2015-03-31T00:54:54.000Z | import argparse
import pkg_resources
import sys
from pipreq.command import Command
def create_parser():
parser = argparse.ArgumentParser(
description='Manage Python package requirements across multiple environments using '
'per-environment requirements files.')
parser.add_argumen... | 38.145161 | 99 | 0.630444 |
fb3e64ea7297afe54e7d5a6dc03d25765f07ae20 | 1,475 | py | Python | tools/linux/PRESUBMIT.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/linux/PRESUBMIT.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | tools/linux/PRESUBMIT.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for linux.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API b... | 29.5 | 79 | 0.672542 |
a4419c50143411206fe624d174d9ceac696b2611 | 438 | py | Python | BIZa/2014/DubsAlexandra/task_5_47.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BIZa/2014/DubsAlexandra/task_5_47.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BIZa/2014/DubsAlexandra/task_5_47.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 47
# Напишите программу, которая бы при запуске случайным образом отображала название одного из четырех океанов Земли.
# Dubs A. E.
# 14.04.2016
import random
print ("Программа случайным образом отображала название одного из четырех океанов Земли")
oceans = ('Тихий океан','Северный Ледовитый ок... | 27.375 | 115 | 0.76484 |
571229d6295f819133f1966522a23f5897445965 | 4,952 | py | Python | src/lightcontrol/lib.py | greyltc/lightcontrol | d80c92d0c9aad7eed69ff0f072f200aecb1b7218 | [
"MIT"
] | null | null | null | src/lightcontrol/lib.py | greyltc/lightcontrol | d80c92d0c9aad7eed69ff0f072f200aecb1b7218 | [
"MIT"
] | null | null | null | src/lightcontrol/lib.py | greyltc/lightcontrol | d80c92d0c9aad7eed69ff0f072f200aecb1b7218 | [
"MIT"
] | null | null | null | import random
import socket
import threading
import struct
import time
class Datagetter(object):
"""
gets one data point at a time
"""
_dtype = None # "random" or "thermal"
_zone = None
_entered = None
temp_file_name = None
temp_file_object = None
_last_val = None
delay = 0.0... | 28.959064 | 109 | 0.567246 |
18c78dc38b7a098bffee80c7ab1e3efa63965ac5 | 1,559 | py | Python | src/Python/Tutorial/Advanced/non_blocking_visualization.py | felixfrank/Open3D | c45cb73c33e2a3917ff692747d3e692a2ffcb4d4 | [
"MIT"
] | 1 | 2019-01-26T05:41:10.000Z | 2019-01-26T05:41:10.000Z | src/Python/Tutorial/Advanced/non_blocking_visualization.py | fate3439/open3D | 2698eac71993ad135acc17b5115d700735517197 | [
"MIT"
] | null | null | null | src/Python/Tutorial/Advanced/non_blocking_visualization.py | fate3439/open3D | 2698eac71993ad135acc17b5115d700735517197 | [
"MIT"
] | 1 | 2019-09-18T02:09:23.000Z | 2019-09-18T02:09:23.000Z | # Open3D: www.open3d.org
# The MIT License (MIT)
# See license file or visit www.open3d.org for details
from open3d import *
import numpy as np
import copy
if __name__ == "__main__":
set_verbosity_level(VerbosityLevel.Debug)
source_raw = read_point_cloud("../../TestData/ICP/cloud_bin_0.pcd")
target_raw = ... | 32.479167 | 71 | 0.621552 |
3af32e5568a83e7d2d11cfb1ac22e020ca043ea9 | 3,019 | py | Python | torchelie/models/vgg.py | Vermeille/Torchelie | 43957d83238372ae6436aac90127865c2040b76c | [
"MIT"
] | 117 | 2019-07-14T20:39:48.000Z | 2021-10-17T19:16:48.000Z | torchelie/models/vgg.py | Vermeille/Torchelie | 43957d83238372ae6436aac90127865c2040b76c | [
"MIT"
] | 41 | 2019-12-06T23:56:44.000Z | 2021-08-02T09:13:30.000Z | torchelie/models/vgg.py | Vermeille/Torchelie | 43957d83238372ae6436aac90127865c2040b76c | [
"MIT"
] | 13 | 2019-09-22T00:46:54.000Z | 2021-04-09T15:53:15.000Z | import torch
import torch.nn as nn
import torchelie.nn as tnn
from torchelie.utils import kaiming
from typing import cast
from .classifier import ClassificationHead
from .registry import register
class VGG(tnn.CondSeq):
"""
Construct a VGG-like model. The architecture is composed of either the
number of c... | 26.955357 | 80 | 0.582312 |
38fa2b6c6697bc0c1b0fede00f6888e7fa10fe85 | 653 | py | Python | Python/Mundo03/Exercicios/ex101.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | Python/Mundo03/Exercicios/ex101.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | Python/Mundo03/Exercicios/ex101.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | '''Crie um programa que tenha uma função chamada voto() que vai receber como parâmetro o ano de nascimento de uma pessoa, retornando um valor literal indicando se uma pessoa tem voto NEGADO, OPCIONAL e OBRIGATÓRIO nas eleições.'''
def voto(pes):
from datetime import date
pes = date.today().year - nasc
if ... | 32.65 | 230 | 0.640123 |
803160750f086aa3ec0d8f6183c553ca1362376d | 172 | py | Python | fantastik/urls.py | mirceachira/fantastick-bot | ef1f059f5ac863013829ef78830c06c4a7fa4ea4 | [
"MIT"
] | null | null | null | fantastik/urls.py | mirceachira/fantastick-bot | ef1f059f5ac863013829ef78830c06c4a7fa4ea4 | [
"MIT"
] | null | null | null | fantastik/urls.py | mirceachira/fantastick-bot | ef1f059f5ac863013829ef78830c06c4a7fa4ea4 | [
"MIT"
] | 1 | 2018-11-24T12:02:31.000Z | 2018-11-24T12:02:31.000Z | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('messenger_bot.urls'))
]
| 19.111111 | 43 | 0.697674 |
3e8289b843e6088d42a2743ce14b11cb09000ad9 | 106 | py | Python | grizli/aws/__init__.py | york-stsci/grizli | 86333320817bf626f70c91681782e7d5bb2585de | [
"MIT"
] | null | null | null | grizli/aws/__init__.py | york-stsci/grizli | 86333320817bf626f70c91681782e7d5bb2585de | [
"MIT"
] | null | null | null | grizli/aws/__init__.py | york-stsci/grizli | 86333320817bf626f70c91681782e7d5bb2585de | [
"MIT"
] | null | null | null | from . import aws_drizzler
from . import db
from . import fit_redshift_lambda
from . import lambda_handler | 26.5 | 33 | 0.820755 |
7f77a929753b76b8eb3f06f290289d1c90d607c5 | 8,719 | py | Python | lite_content/lite_internal_frontend/strings.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 1 | 2021-10-16T16:36:58.000Z | 2021-10-16T16:36:58.000Z | lite_content/lite_internal_frontend/strings.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 45 | 2020-08-11T14:37:46.000Z | 2022-03-29T17:03:02.000Z | lite_content/lite_internal_frontend/strings.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 3 | 2021-02-01T06:26:19.000Z | 2022-02-21T23:02:46.000Z | from lite_content.lite_internal_frontend import ( # noqa
advice, # noqa
cases, # noqa
letter_templates, # noqa
open_general_licences, # noqa
roles, # noqa
flags, # noqa
organisations, # noqa
generic, # noqa
goods, # noqa
users, # noqa
teams, # noqa
queues, # ... | 32.655431 | 115 | 0.632527 |
ba359f06b0f3704efcdfd0409f85222d8e598b89 | 13,293 | py | Python | thriftpy2/thrift.py | aiudirog/thriftpy2 | 7f82b6fbc08bf38233316fd7ec5c294068d69f38 | [
"MIT"
] | null | null | null | thriftpy2/thrift.py | aiudirog/thriftpy2 | 7f82b6fbc08bf38233316fd7ec5c294068d69f38 | [
"MIT"
] | null | null | null | thriftpy2/thrift.py | aiudirog/thriftpy2 | 7f82b6fbc08bf38233316fd7ec5c294068d69f38 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
thriftpy2.thrift
~~~~~~~~~~~~~~~~~~
Thrift simplified.
"""
from __future__ import absolute_import
import functools
import linecache
import types
from ._compat import with_metaclass, PY3
if PY3:
from itertools import zip_longest
else:
from itertools import izip_longes... | 29.215385 | 104 | 0.601595 |
92561a5b6c465621c3e2f89b74e93c18181bf171 | 9,102 | py | Python | Lib/site-packages/pip/_vendor/rich/tree.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | 1 | 2022-02-25T13:46:54.000Z | 2022-02-25T13:46:54.000Z | Lib/site-packages/pip/_vendor/rich/tree.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | 1 | 2022-01-27T19:09:25.000Z | 2022-01-27T19:09:25.000Z | Lib/site-packages/pip/_vendor/rich/tree.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | 1 | 2021-09-27T11:14:58.000Z | 2021-09-27T11:14:58.000Z | from typing import Iterator, List, Optional, Tuple
from ._loop import loop_first, loop_last
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style, StyleStack, StyleType
from .st... | 36.119048 | 99 | 0.566359 |
fc54fc8c1b0e81df03082c1af6e54c1f0a07d7cd | 4,894 | py | Python | magnum/tests/unit/common/x509/test_validator.py | ISCAS-VDI/magnum-base | 5bb88e12b3e5d665ae1b345b62023d1016217e08 | [
"Apache-2.0"
] | null | null | null | magnum/tests/unit/common/x509/test_validator.py | ISCAS-VDI/magnum-base | 5bb88e12b3e5d665ae1b345b62023d1016217e08 | [
"Apache-2.0"
] | null | null | null | magnum/tests/unit/common/x509/test_validator.py | ISCAS-VDI/magnum-base | 5bb88e12b3e5d665ae1b345b62023d1016217e08 | [
"Apache-2.0"
] | 1 | 2020-09-09T14:35:08.000Z | 2020-09-09T14:35:08.000Z | # 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
# distributed under t... | 39.467742 | 78 | 0.670821 |
abbdbca507ae45c8c4a39fc90e96715fcb6bfe0f | 767 | py | Python | tests/framework/Samplers/SparseGrid/scgpc/polynomial.py | rinelson456/raven | 1114246136a2f72969e75b5e99a11b35500d4eef | [
"Apache-2.0"
] | 159 | 2017-03-24T21:07:06.000Z | 2022-03-20T13:44:40.000Z | tests/framework/Samplers/SparseGrid/scgpc/polynomial.py | rinelson456/raven | 1114246136a2f72969e75b5e99a11b35500d4eef | [
"Apache-2.0"
] | 1,667 | 2017-03-27T14:41:22.000Z | 2022-03-31T19:50:06.000Z | tests/framework/Samplers/SparseGrid/scgpc/polynomial.py | rinelson456/raven | 1114246136a2f72969e75b5e99a11b35500d4eef | [
"Apache-2.0"
] | 95 | 2017-03-24T21:05:03.000Z | 2022-03-08T17:30:22.000Z | # Copyright 2017 Battelle Energy Alliance, LLC
#
# 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 t... | 34.863636 | 74 | 0.743155 |
2982ee11a75bb9f15346bc6802ccc7f0c12c7a66 | 12,838 | py | Python | userbot/modules/afk.py | realityizzlie/OpenUserBot | 5a8c1ee1ac59b6c73baa7d5b030a9e99e2ed3515 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/afk.py | realityizzlie/OpenUserBot | 5a8c1ee1ac59b6c73baa7d5b030a9e99e2ed3515 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/afk.py | realityizzlie/OpenUserBot | 5a8c1ee1ac59b6c73baa7d5b030a9e99e2ed3515 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
# All Credits to https://t.me/azrim89 for timestamp.
# All Credits to https://t.me/Devp73 for Offline stamps..
#
""" Use... | 43.965753 | 275 | 0.573687 |
9a05c459b4f951bccfcaada7bbfaa39260b14eb0 | 600 | py | Python | Section 3 - Strings/Str Ops - construction.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 10 | 2020-02-14T14:28:15.000Z | 2022-02-02T18:44:11.000Z | Section 3 - Strings/Str Ops - construction.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | null | null | null | Section 3 - Strings/Str Ops - construction.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 8 | 2020-03-25T09:27:42.000Z | 2021-11-03T15:24:38.000Z | # Event: LCCS Python Fundamental Skills Workshop
# Date: May 2018
# Author: Joe English, PDST
# eMail: computerscience@pdst.ie
# Purpose: A program to demonstrate string construction
# Initialise the output string
outStr = "The quick "
# Ask the user for a colour
colour = input("Please enter a colour: ")
... | 25 | 56 | 0.698333 |
ca2c42b982d7182410ac9b3bef8818bce5499f9a | 14,710 | py | Python | test/benchmark/utils_final.py | jjjjohnson/InsightFace_TF | 2aa73fba06a145e1602ea9cba89ea4e0adc9c85a | [
"MIT"
] | 721 | 2018-03-07T10:13:14.000Z | 2022-03-05T12:05:32.000Z | test/benchmark/utils_final.py | jjjjohnson/InsightFace_TF | 2aa73fba06a145e1602ea9cba89ea4e0adc9c85a | [
"MIT"
] | 107 | 2018-03-14T07:36:33.000Z | 2021-12-23T12:46:43.000Z | test/benchmark/utils_final.py | jjjjohnson/InsightFace_TF | 2aa73fba06a145e1602ea9cba89ea4e0adc9c85a | [
"MIT"
] | 283 | 2018-03-06T02:55:04.000Z | 2022-02-24T06:51:16.000Z | from math import exp
from mxnet import gluon
from mxnet import autograd
from mxnet import nd
from mxnet import image
from mxnet.gluon import nn
import mxnet as mx
import numpy as np
from time import time
import matplotlib.pyplot as plt
import random
class DataLoader(object):
"""similiar to gluon.data.DataLoader, ... | 38.207792 | 96 | 0.584908 |
0eb4b0913659bdf35a80909206c5b0ffef803e3e | 242 | py | Python | {{cookiecutter.project_slug}}/backend/app/app/core/celery_app.py | sam-mosleh/full-stack-fastapi-postgresql | d2274eb6da91ecee2c54bb128251b804c5ba6a1d | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/backend/app/app/core/celery_app.py | sam-mosleh/full-stack-fastapi-postgresql | d2274eb6da91ecee2c54bb128251b804c5ba6a1d | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/backend/app/app/core/celery_app.py | sam-mosleh/full-stack-fastapi-postgresql | d2274eb6da91ecee2c54bb128251b804c5ba6a1d | [
"MIT"
] | null | null | null | from celery import Celery
from app.core.config import settings
celery_app = Celery(
"worker", broker=settings.CELERY_REDIS_DSN, backend=settings.CELERY_REDIS_DSN
)
celery_app.conf.task_routes = {"app.worker.test_celery": "main-queue"}
| 24.2 | 81 | 0.785124 |
afc3fa21e5ead07a8ed3ecb7eb5bbf5a04acec5f | 20 | py | Python | BLSeg/blseg/model/fcn/__init__.py | ForrestPi/semanticSegmentation | 1e5519279e2a9574f09eaf91439138b74b0f860c | [
"MIT"
] | 7 | 2020-04-06T10:25:30.000Z | 2021-02-24T14:51:22.000Z | BLSeg/blseg/model/fcn/__init__.py | ForrestPi/semanticSegmentation | 1e5519279e2a9574f09eaf91439138b74b0f860c | [
"MIT"
] | null | null | null | BLSeg/blseg/model/fcn/__init__.py | ForrestPi/semanticSegmentation | 1e5519279e2a9574f09eaf91439138b74b0f860c | [
"MIT"
] | 2 | 2020-04-08T14:43:21.000Z | 2020-12-11T03:03:37.000Z | from .fcn import FCN | 20 | 20 | 0.8 |
a2926304c9e1f4ed56c86494fb0cf6f64d13105a | 16,797 | py | Python | src/compas_rhino/artists/meshartist.py | ioanna21/compas | a8ab31b84744c74efb59249cd9a78d1a08bc4856 | [
"MIT"
] | null | null | null | src/compas_rhino/artists/meshartist.py | ioanna21/compas | a8ab31b84744c74efb59249cd9a78d1a08bc4856 | [
"MIT"
] | null | null | null | src/compas_rhino/artists/meshartist.py | ioanna21/compas | a8ab31b84744c74efb59249cd9a78d1a08bc4856 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from functools import partial
import compas_rhino
from compas_rhino.artists._artist import BaseArtist
from compas.utilities import color_to_colordict
from compas.utilities import pairwise
from compas.geometry... | 35.66242 | 120 | 0.549146 |
56f12778945c2c01fec8aa352125d3bba26b3e5d | 4,493 | py | Python | tools/run_net.py | XXSSOTA/SlowFast | c5f5ff68d18fc01289a3777f91e102d680367c4c | [
"Apache-2.0"
] | null | null | null | tools/run_net.py | XXSSOTA/SlowFast | c5f5ff68d18fc01289a3777f91e102d680367c4c | [
"Apache-2.0"
] | null | null | null | tools/run_net.py | XXSSOTA/SlowFast | c5f5ff68d18fc01289a3777f91e102d680367c4c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""Wrapper to train and test a video classification model."""
import argparse
import sys
import torch
import slowfast.utils.checkpoint as cu
import slowfast.utils.multiprocessing as mpu
from slowfast.config.defaults import... | 29.366013 | 80 | 0.57623 |
d6e9cf8b71eaa9fce8af2eed0448a1a3a6652d3b | 253 | py | Python | HackerRank/TwoArrays.py | kokuraxc/play-ground | 48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd | [
"MIT"
] | null | null | null | HackerRank/TwoArrays.py | kokuraxc/play-ground | 48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd | [
"MIT"
] | null | null | null | HackerRank/TwoArrays.py | kokuraxc/play-ground | 48b5291f3cca117e0cd0a17bf9255ec4dc1a5cdd | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/two-arrays/
# Complete the twoArrays function below.
def twoArrays(k, A, B):
A.sort()
B.sort(reverse=True)
C = zip(A, B)
for c in C:
if sum(c) < k:
return 'NO'
return 'YES'
| 23 | 51 | 0.577075 |
948ac478296bf87ed917abeb3eb6c8e641df4a67 | 10,636 | py | Python | sdk/python/pulumi_azure_native/devtestlab/v20180915/get_virtual_machine_schedule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devtestlab/v20180915/get_virtual_machine_schedule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devtestlab/v20180915/get_virtual_machine_schedule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 39.247232 | 324 | 0.655604 |
958c976c02fd791e5db62bcb010be01a3f1a255d | 3,143 | py | Python | clictest/cmd/api.py | arulkumarkandasamy/clictest | 3e62a11eee8e0ef4e0c3ac1090e52b0bfccce59e | [
"Apache-2.0"
] | null | null | null | clictest/cmd/api.py | arulkumarkandasamy/clictest | 3e62a11eee8e0ef4e0c3ac1090e52b0bfccce59e | [
"Apache-2.0"
] | null | null | null | clictest/cmd/api.py | arulkumarkandasamy/clictest | 3e62a11eee8e0ef4e0c3ac1090e52b0bfccce59e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file ... | 32.739583 | 78 | 0.650016 |
8faaa838139be229462d68986b7d873344540044 | 538 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/maximum-sum-circular-subarray.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/maximum-sum-circular-subarray.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/maximum-sum-circular-subarray.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(n)
# Space: O(1)
class Solution(object):
def maxSubarraySumCircular(self, A):
"""
:type A: List[int]
:rtype: int
"""
total, max_sum, cur_max, min_sum, cur_min = 0, -float("inf"), 0, float("inf"), 0
for a in A:
cur_max = max(cur_max+a, a)
... | 28.315789 | 88 | 0.524164 |
65da8eb744102af0e0788356fc81cf42c270588b | 210 | py | Python | Boilermake2018/Lib/site-packages/chatterbot/corpus.py | TejPatel98/voice_your_professional_email | 9cc48f7bcd6576a6962711755e5d5d485832128c | [
"CC0-1.0"
] | 9 | 2017-11-14T07:13:19.000Z | 2021-05-24T12:11:58.000Z | Boilermake2018/Lib/site-packages/chatterbot/corpus.py | TejPatel98/voice_your_professional_email | 9cc48f7bcd6576a6962711755e5d5d485832128c | [
"CC0-1.0"
] | 2 | 2017-12-06T07:40:08.000Z | 2017-12-06T07:42:43.000Z | Boilermake2018/Lib/site-packages/chatterbot/corpus.py | TejPatel98/voice_your_professional_email | 9cc48f7bcd6576a6962711755e5d5d485832128c | [
"CC0-1.0"
] | 7 | 2017-11-15T11:11:33.000Z | 2017-12-14T10:26:37.000Z | """
Seamlessly import the external chatterbot corpus module.
View the corpus on GitHub at https://github.com/gunthercox/chatterbot-corpus
"""
from chatterbot_corpus import Corpus
__all__ = (
'Corpus',
)
| 17.5 | 76 | 0.752381 |
35c87d709fcc8816f3124e09c776fd3c93cce646 | 1,203 | py | Python | HuberyBlog/apps/blog/migrations/0010_auto_20190626_1034.py | SomnambulistOfChina/ChineseSomnambulist | dc6efcb4ea1bc02f8999cd78bebfd648253631a6 | [
"Apache-2.0"
] | 5 | 2019-05-21T08:26:18.000Z | 2021-07-20T11:32:49.000Z | HuberyBlog/apps/blog/migrations/0010_auto_20190626_1034.py | SomnambulistOfChina/ChineseSomnambulist | dc6efcb4ea1bc02f8999cd78bebfd648253631a6 | [
"Apache-2.0"
] | null | null | null | HuberyBlog/apps/blog/migrations/0010_auto_20190626_1034.py | SomnambulistOfChina/ChineseSomnambulist | dc6efcb4ea1bc02f8999cd78bebfd648253631a6 | [
"Apache-2.0"
] | 2 | 2019-07-20T08:35:04.000Z | 2020-02-29T07:34:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2019-06-26 10:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0009_visitview_ip_address'),
]
operations = [
migrations.AlterField... | 29.341463 | 107 | 0.57606 |
fca4d734de9f902a51130729235354819fdd74c2 | 32,996 | py | Python | src/ismn/interface.py | wpreimes/ismn | 379c53a85e9e47b7eeceb31e84670c5c5290546a | [
"MIT"
] | null | null | null | src/ismn/interface.py | wpreimes/ismn | 379c53a85e9e47b7eeceb31e84670c5c5290546a | [
"MIT"
] | 4 | 2020-12-20T13:22:18.000Z | 2021-02-19T13:38:08.000Z | src/ismn/interface.py | wpreimes/ismn | 379c53a85e9e47b7eeceb31e84670c5c5290546a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2021 TU Wien
#
# 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
#... | 36.419426 | 122 | 0.586798 |
d80dcc141b8fcdff5446bf25eab6ed4d8aeaa148 | 471 | py | Python | 1_Image_Classification/general_utilities.py | mabdulkareem/lav_volume_with_qc | 762d4d26c49d4ae3626ef4ac7ff2c9836beace2f | [
"MIT"
] | null | null | null | 1_Image_Classification/general_utilities.py | mabdulkareem/lav_volume_with_qc | 762d4d26c49d4ae3626ef4ac7ff2c9836beace2f | [
"MIT"
] | null | null | null | 1_Image_Classification/general_utilities.py | mabdulkareem/lav_volume_with_qc | 762d4d26c49d4ae3626ef4ac7ff2c9836beace2f | [
"MIT"
] | null | null | null |
import os
# A function to create directory
def create_dir(path_of_dir):
try:
os.makedirs(path_of_dir) # For one directory containing inner/sub directory(ies)
except FileExistsError:
#print("Directory %s already exists" % path_of_dir)
pass
except OSError:
print ("Cr... | 26.166667 | 92 | 0.647558 |
2d29b37bc9a1a26790ee88b5902951afe4fc4560 | 524 | py | Python | sympy/liealgebras/cartan_matrix.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/liealgebras/cartan_matrix.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/liealgebras/cartan_matrix.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | from .cartan_type import CartanType
def CartanMatrix(ct):
"""Access the Cartan matrix of a specific Lie algebra
Examples
========
>>> from sympy.liealgebras.cartan_matrix import CartanMatrix
>>> CartanMatrix("A2")
Matrix([
[ 2, -1],
[-1, 2]])
>>> CartanMatrix(['C', 3])
Matri... | 20.153846 | 64 | 0.578244 |
b1b29696f408a828c04e2638e332d7a09a832fed | 12,053 | py | Python | airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py | globalprofessionalsearch/airbyte | 9c76b8af5363e9bfcf2b532b5418440d713c1c6a | [
"MIT"
] | null | null | null | airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py | globalprofessionalsearch/airbyte | 9c76b8af5363e9bfcf2b532b5418440d713c1c6a | [
"MIT"
] | 1 | 2021-08-17T06:12:26.000Z | 2021-08-17T06:12:26.000Z | airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py | globalprofessionalsearch/airbyte | 9c76b8af5363e9bfcf2b532b5418440d713c1c6a | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2020 Airbyte
#
# 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, pu... | 48.212 | 142 | 0.701817 |
cb7dc36ada218a31a914ec1f6af20a7fe3c4678d | 5,512 | py | Python | grr/gui/plugins/artifact_view_test.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | 1 | 2020-12-18T00:47:19.000Z | 2020-12-18T00:47:19.000Z | grr/gui/plugins/artifact_view_test.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | null | null | null | grr/gui/plugins/artifact_view_test.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Test the artifact rendering interface."""
import os
from grr import config
from grr.gui import gui_test_lib
from grr.gui import runtests_test
from grr.lib import artifact
from grr.lib import artifact_registry
from grr.lib import flags
from grr.lib impo... | 37.243243 | 80 | 0.708999 |
99d3df1883d3ee9552db979d803c14e254a0c554 | 668 | py | Python | website/urls.py | HASSANFARYAD/Django-simpleusers | 5070eb7cbad0412eb94d8c83c822e7939dd44644 | [
"MIT"
] | null | null | null | website/urls.py | HASSANFARYAD/Django-simpleusers | 5070eb7cbad0412eb94d8c83c822e7939dd44644 | [
"MIT"
] | null | null | null | website/urls.py | HASSANFARYAD/Django-simpleusers | 5070eb7cbad0412eb94d8c83c822e7939dd44644 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
# path('', views.home, name='home'),
path('',views.HomePageView.as_view(), name='home'),
path('detail/<int:id>/', views.detail, name='detail'),
# path('detail/<int:pk>/', views.DetailPageView.as_view, name='detal')
path('search/', vie... | 44.533333 | 87 | 0.669162 |
76fffa0ffa6f60dcfd4fad205dbcbdad18295a75 | 2,748 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20200301/get_virtual_network_gateway_vpnclient_connection_health.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20200301/get_virtual_network_gateway_vpnclient_connection_health.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20200301/get_virtual_network_gateway_vpnclient_connection_health.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 41.636364 | 208 | 0.725619 |
9bc948e95d8f9f889423d879138c7a9201fe095b | 17,878 | py | Python | mod.py | Gejfish/MOnika | eecc54783187ccc224ba02d0c6d5624efa241146 | [
"MIT"
] | null | null | null | mod.py | Gejfish/MOnika | eecc54783187ccc224ba02d0c6d5624efa241146 | [
"MIT"
] | null | null | null | mod.py | Gejfish/MOnika | eecc54783187ccc224ba02d0c6d5624efa241146 | [
"MIT"
] | null | null | null | from discord import channel
from discord.ext import commands
import discord
import cogs
import random
import asyncio
import requests
from discord import File
import json
import os
import traceback
from discord import User
from discord.ext.commands import Bot
class ModCog(commands.Cog):
def __init__(... | 46.801047 | 224 | 0.595648 |
949d16efd3c645268e3385b286265125d19ceb56 | 4,066 | py | Python | examples/joystick_uart/python/JoystickUART.py | gdsports/xac_joystick_tinyusb | 5d2d520adaa0ba21fafdd92468f79154d7753707 | [
"MIT"
] | 1 | 2021-07-14T10:40:16.000Z | 2021-07-14T10:40:16.000Z | examples/joystick_uart/python/JoystickUART.py | gdsports/xac_joystick_tinyusb | 5d2d520adaa0ba21fafdd92468f79154d7753707 | [
"MIT"
] | null | null | null | examples/joystick_uart/python/JoystickUART.py | gdsports/xac_joystick_tinyusb | 5d2d520adaa0ba21fafdd92468f79154d7753707 | [
"MIT"
] | 1 | 2021-02-13T03:42:20.000Z | 2021-02-13T03:42:20.000Z | #!/usr/bin/python3
"""
Interface to XAC joystick (joystick_uart.ino) via serial UART port.
MIT License
Copyright (c) 2021 gdsports625@gmail.com
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 wi... | 29.251799 | 78 | 0.614855 |
66be06c047b34b4b0977b55355eaf4ccfc9e4372 | 4,167 | py | Python | app/models.py | tahoe/janitor | b6ce73bddc13c70079bdc7ba4c7a9b3ee0cad0bd | [
"Apache-2.0"
] | 52 | 2019-08-14T10:48:26.000Z | 2022-03-30T18:09:08.000Z | app/models.py | tahoe/janitor | b6ce73bddc13c70079bdc7ba4c7a9b3ee0cad0bd | [
"Apache-2.0"
] | 18 | 2019-08-20T04:13:37.000Z | 2022-01-31T12:40:12.000Z | app/models.py | tahoe/janitor | b6ce73bddc13c70079bdc7ba4c7a9b3ee0cad0bd | [
"Apache-2.0"
] | 12 | 2019-08-14T10:49:11.000Z | 2020-09-02T18:56:34.000Z | from datetime import datetime
from flask import current_app
from app import db, ma
from sqlalchemy import Enum
from marshmallow import fields
PROVIDER_TYPES = Enum('transit', 'backbone', 'transport', 'peering', 'facility',
'multi', name='ProviderType')
class Provider(db.Model):
id = db.Co... | 31.097015 | 80 | 0.680106 |
d1925ae362138c79bd7a7a9f0778870b84429742 | 5,961 | py | Python | code/test_ntt.py | elimsc/stark-anatomy | 5e316e685a1f87cef1d26590bf1584f6523dc603 | [
"Apache-2.0"
] | null | null | null | code/test_ntt.py | elimsc/stark-anatomy | 5e316e685a1f87cef1d26590bf1584f6523dc603 | [
"Apache-2.0"
] | null | null | null | code/test_ntt.py | elimsc/stark-anatomy | 5e316e685a1f87cef1d26590bf1584f6523dc603 | [
"Apache-2.0"
] | null | null | null | from pyspark import SparkConf, SparkContext
from base.algebra import *
from rdd.rdd_poly import poly_degree
from base.univariate import *
from base.ntt import *
import os
from rdd.rdd_poly import (
ntt1,
rdd_fast_coset_divide,
rdd_fast_coset_evaluate,
rdd_fast_multiply,
rdd_intt,
rdd_ntt,
)
con... | 31.707447 | 87 | 0.651904 |
8fc7c6785eda64e5a4118b81690eaea44c65b255 | 2,210 | py | Python | scattertext/termscoring/CohensD.py | mastafaMicrosoft/scattertext | 6a9b6b85525bc25dec75c4767668881224dd5612 | [
"Apache-2.0"
] | 1,823 | 2016-07-28T00:25:56.000Z | 2022-03-30T12:33:57.000Z | scattertext/termscoring/CohensD.py | mastafaMicrosoft/scattertext | 6a9b6b85525bc25dec75c4767668881224dd5612 | [
"Apache-2.0"
] | 92 | 2016-07-28T23:13:20.000Z | 2022-01-24T03:53:38.000Z | scattertext/termscoring/CohensD.py | mastafaMicrosoft/scattertext | 6a9b6b85525bc25dec75c4767668881224dd5612 | [
"Apache-2.0"
] | 271 | 2016-12-26T12:56:08.000Z | 2022-03-24T19:35:13.000Z | import numpy as np
from scattertext.termscoring.CohensDCalculator import CohensDCalculator
from scattertext.termscoring.CorpusBasedTermScorer import CorpusBasedTermScorer
class CohensD(CorpusBasedTermScorer, CohensDCalculator):
'''
Cohen's d scores
term_scorer = (CohensD(corpus).set_categories('Positive... | 32.985075 | 111 | 0.661086 |
95c52b544e90d4b008be7a901ba97ac70bfa7256 | 3,110 | py | Python | MODULES/Collection_ArchiveCollectedData_ArchiveViaCustomMethod.py | FunnyWolf/viperpython | ba794ee74079285be32191e898daa3e56305c8be | [
"BSD-3-Clause"
] | 42 | 2021-01-20T15:30:33.000Z | 2022-03-31T07:51:11.000Z | MODULES/Collection_ArchiveCollectedData_ArchiveViaCustomMethod.py | FunnyWolf/viperpython | ba794ee74079285be32191e898daa3e56305c8be | [
"BSD-3-Clause"
] | 2 | 2021-08-17T00:16:33.000Z | 2022-02-21T11:37:45.000Z | MODULES/Collection_ArchiveCollectedData_ArchiveViaCustomMethod.py | FunnyWolf/viperpython | ba794ee74079285be32191e898daa3e56305c8be | [
"BSD-3-Clause"
] | 28 | 2021-01-22T05:06:39.000Z | 2022-03-31T03:27:42.000Z | # -*- coding: utf-8 -*-
# @File : SimpleRewMsfModule.py
# @Date : 2019/1/11
# @Desc :
from Lib.ModuleAPI import *
class PostModule(PostMSFRawModule):
NAME_ZH = "打包压缩目录并回传"
DESC_ZH = "zip压缩目标指定目录,并将压缩后的文件回传到Viper."
NAME_EN = "Zip directory and send back"
DESC_EN = "Zip compresses the target speci... | 38.875 | 118 | 0.623794 |
624bc9e1173c9a4f6dc9a5ad6229af27fa4974d5 | 821 | py | Python | django_application/TODO/nugget/migrations/0003_auto_20171203_1835.py | mcculloughsco/Nugget | 23516fcd2538c9f4fe907334dda334c706686649 | [
"Apache-2.0"
] | 1 | 2017-11-05T23:26:29.000Z | 2017-11-05T23:26:29.000Z | django_application/TODO/nugget/migrations/0003_auto_20171203_1835.py | mcculloughsco/CompSci326TermProject | 03623a37fdb0e2235fdf07e23ed764ed5a0d64af | [
"Apache-2.0"
] | 3 | 2020-02-12T00:24:15.000Z | 2021-06-10T20:03:37.000Z | django_application/TODO/nugget/migrations/0003_auto_20171203_1835.py | mcculloughsco/Nugget | 23516fcd2538c9f4fe907334dda334c706686649 | [
"Apache-2.0"
] | 2 | 2017-12-18T17:52:57.000Z | 2018-03-08T06:42:43.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-03 23:35
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('nugget', '0002_auto_20171203_1624'),
]
operations ... | 30.407407 | 160 | 0.646772 |
1eae0b40c129f68e80f21ccb5c971ad2e4411952 | 6,580 | py | Python | cotyledon/_utils.py | y-gupta/cotyledon | 319faa2673a986733d9a7622bee29e187f2e7391 | [
"Apache-2.0"
] | 71 | 2016-11-14T15:02:41.000Z | 2022-02-20T06:41:59.000Z | cotyledon/_utils.py | y-gupta/cotyledon | 319faa2673a986733d9a7622bee29e187f2e7391 | [
"Apache-2.0"
] | 26 | 2016-07-14T13:42:15.000Z | 2022-03-18T07:03:39.000Z | cotyledon/_utils.py | y-gupta/cotyledon | 319faa2673a986733d9a7622bee29e187f2e7391 | [
"Apache-2.0"
] | 17 | 2016-05-02T15:48:42.000Z | 2021-11-24T15:26:08.000Z | # 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
# distributed under t... | 32.254902 | 78 | 0.61155 |
f059463dbe53f795df6517266a09a69fb7006548 | 3,164 | py | Python | settings.py | Manojkumar-Siva/serversideprocessing | 1efc8ae9d979cbce3937482e87e9248adec6390d | [
"BSD-3-Clause"
] | null | null | null | settings.py | Manojkumar-Siva/serversideprocessing | 1efc8ae9d979cbce3937482e87e9248adec6390d | [
"BSD-3-Clause"
] | null | null | null | settings.py | Manojkumar-Siva/serversideprocessing | 1efc8ae9d979cbce3937482e87e9248adec6390d | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for calculations project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pa... | 25.111111 | 91 | 0.696271 |
5aed3bebc0a26782312adde7c4788ded9973d6ee | 1,693 | py | Python | setup.py | jvanasco/sqlalchemy-access | a2778f3b973e0db4de78a3d7eb6341a29c92786e | [
"MIT"
] | null | null | null | setup.py | jvanasco/sqlalchemy-access | a2778f3b973e0db4de78a3d7eb6341a29c92786e | [
"MIT"
] | 1 | 2020-01-21T15:42:15.000Z | 2020-01-21T15:42:15.000Z | setup.py | jvanasco/sqlalchemy-access | a2778f3b973e0db4de78a3d7eb6341a29c92786e | [
"MIT"
] | null | null | null | import os
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'sqlalchemy_access', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(name='... | 36.021277 | 85 | 0.631424 |
045bf66b8b1b795ac06409ef91522b5dec867e67 | 212 | py | Python | dingshi_start.py | andyrenpanlong/soubu_app | abe56cbb3f21062ec3a8ef256131513484400c27 | [
"MIT"
] | null | null | null | dingshi_start.py | andyrenpanlong/soubu_app | abe56cbb3f21062ec3a8ef256131513484400c27 | [
"MIT"
] | null | null | null | dingshi_start.py | andyrenpanlong/soubu_app | abe56cbb3f21062ec3a8ef256131513484400c27 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from scrapy import cmdline
import time
import os
def start_process():
os.system('python dianpu.py')
time.sleep(60*3600) # 每隔一小时重新执行命令,防止进程中断
start_process()
start_process()
| 16.307692 | 44 | 0.693396 |
575b390d9c6c299e3138c652ddc530f162bd7101 | 4,070 | py | Python | bigquery/schema_builder.py | unravelin/BigQuery-Python | a0986fd60f0c2cc84a0fe49af8b4807125e1707d | [
"Apache-2.0"
] | 1 | 2021-01-07T23:12:53.000Z | 2021-01-07T23:12:53.000Z | bigquery/schema_builder.py | unravelin/BigQuery-Python | a0986fd60f0c2cc84a0fe49af8b4807125e1707d | [
"Apache-2.0"
] | null | null | null | bigquery/schema_builder.py | unravelin/BigQuery-Python | a0986fd60f0c2cc84a0fe49af8b4807125e1707d | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
__author__ = 'Aneil Mallavarapu (http://github.com/aneilbaboo)'
from datetime import datetime
import six
import dateutil.parser
from .errors import InvalidTypeException
def default_timestamp_parser(s):
try:
if dateutil.parser.parse(s):
return True
... | 27.876712 | 79 | 0.616708 |
345363793e139b6a1edc6171353b3c2dd6be0a42 | 929 | py | Python | tests/settings.py | PeterRistCMS/django-flexisettings | 235c8d4fe391ee6bacd65ed2814f4f54599fd6b9 | [
"BSD-3-Clause"
] | 8 | 2015-05-23T20:15:49.000Z | 2019-12-19T22:14:42.000Z | tests/settings.py | PeterRistCMS/django-flexisettings | 235c8d4fe391ee6bacd65ed2814f4f54599fd6b9 | [
"BSD-3-Clause"
] | 5 | 2015-03-10T10:57:31.000Z | 2019-11-19T03:53:36.000Z | tests/settings.py | PeterRistCMS/django-flexisettings | 235c8d4fe391ee6bacd65ed2814f4f54599fd6b9 | [
"BSD-3-Clause"
] | 3 | 2015-08-26T17:08:03.000Z | 2022-01-14T16:45:12.000Z | import unittest2 as unittest
from tests.base import BaseTestCase
import os
class SettingsTestCase(BaseTestCase):
def setUp(self):
super(SettingsTestCase, self).setUp()
os.environ.setdefault(self.envvar,
"%s.settings" % self.test_project)
def test_run_env(self):
"""Test run... | 32.034483 | 76 | 0.706136 |
e1b78fc155613bef230c76f182cbd13959bef3bd | 5,386 | py | Python | jamf/models/computer_content_caching_data_migration_error.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | 1 | 2021-04-20T15:28:57.000Z | 2021-04-20T15:28:57.000Z | jamf/models/computer_content_caching_data_migration_error.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | null | null | null | jamf/models/computer_content_caching_data_migration_error.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
Jamf Pro API
## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and sh... | 31.132948 | 342 | 0.624025 |
358a100138e4e5b19db3e52b16f1a77cf21ce492 | 2,752 | py | Python | example/blog_cache.py | bearword/bearword_blog | 4d2a8de1e8658d70b9eb0aba60d2859a7f2399dd | [
"MIT"
] | 2 | 2018-04-13T05:51:23.000Z | 2018-04-13T06:02:23.000Z | example/blog_cache.py | lnkdel/Flask-Blogging | 55e95f4f2d7d48b0b370e1decdefb4b5b2552cab | [
"MIT"
] | null | null | null | example/blog_cache.py | lnkdel/Flask-Blogging | 55e95f4f2d7d48b0b370e1decdefb4b5b2552cab | [
"MIT"
] | null | null | null | """
This example demonstrates the use of caches
"""
from flask import Flask, render_template_string, redirect, current_app
from sqlalchemy import create_engine, MetaData
from flask_login import UserMixin, LoginManager, login_user, logout_user, current_user
from flask_blogging import SQLAStorage, BloggingEngine
from fla... | 28.371134 | 93 | 0.69186 |
1fa2c2b052c18d20f856b07940aaf7697b502fc7 | 845 | py | Python | ubxlib/ubx_mon_ver.py | albard00/ubxlib | cfad25461e680bbb527e4ce74e6b699da6065bea | [
"MIT"
] | null | null | null | ubxlib/ubx_mon_ver.py | albard00/ubxlib | cfad25461e680bbb527e4ce74e6b699da6065bea | [
"MIT"
] | null | null | null | ubxlib/ubx_mon_ver.py | albard00/ubxlib | cfad25461e680bbb527e4ce74e6b699da6065bea | [
"MIT"
] | null | null | null | from ubxlib.cid import UbxCID
from ubxlib.frame import UbxFrame
from ubxlib.types import Fields, CH
class UbxMonVer_(UbxFrame):
CID = UbxCID(UbxCID.CLASS_MON, 0x04)
NAME = 'UBX-MON-VER'
class UbxMonVerPoll(UbxMonVer_):
NAME = UbxMonVer_.NAME + '-POLL'
def __init__(self):
super().__init__()
... | 23.472222 | 58 | 0.627219 |
2c208efc5d75ccc7d6f040189a61c6fc5bc39c1e | 718 | py | Python | redcmd/autocomp/completer/google_suggest.py | amol9/redcmd | 34086eb42ec6acc16dbd2b3ea530898a6a287639 | [
"MIT"
] | 1 | 2015-10-26T19:38:28.000Z | 2015-10-26T19:38:28.000Z | redcmd/autocomp/completer/google_suggest.py | amol9/redcmd | 34086eb42ec6acc16dbd2b3ea530898a6a287639 | [
"MIT"
] | null | null | null | redcmd/autocomp/completer/google_suggest.py | amol9/redcmd | 34086eb42ec6acc16dbd2b3ea530898a6a287639 | [
"MIT"
] | null | null | null | import json
from six.moves.urllib.parse import urlencode
from redlib.api.http import HttpRequest, RequestOptions, GlobalOptions
from .base import Completer
from ... import const
class GoogleSuggest(Completer):
def __init__(self):
self._g_opt = GlobalOptions(cache_dir=const.autocomp_cache_dir, timeout=3... | 27.615385 | 104 | 0.681058 |
62193ae5987296cca001b6056497412a5b923dc9 | 2,848 | py | Python | matlab_ext/external/spfpm_py3/demo.py | zaqwes8811/coordinator-tasks | 7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a | [
"MIT"
] | null | null | null | matlab_ext/external/spfpm_py3/demo.py | zaqwes8811/coordinator-tasks | 7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a | [
"MIT"
] | 15 | 2015-03-07T12:46:41.000Z | 2015-04-11T09:08:36.000Z | matlab_ext/external/spfpm_py3/demo.py | zaqwes8811/micro-apps | 7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Demonstration of Simple Python Fixed-Point Module
# (C)Copyright 2006-2014, RW Penney
import time
try:
import matplotlib, numpy
matplotlib.use('qt4agg')
import matplotlib.pyplot as plt
HAVE_MATPLOTLIB = True
except ImportError:
HAVE_MATPLOTLIB = False
import FixedPoint
def b... | 28.48 | 107 | 0.569171 |
07fda1d7129991d1cbc865d4288324c2d7740e2c | 815 | py | Python | 213. House Robber II.py | MapleLove2014/leetcode | 135c79ebe98815d0e38280edfadaba90e677aff5 | [
"Apache-2.0"
] | 1 | 2020-12-04T07:38:16.000Z | 2020-12-04T07:38:16.000Z | 213. House Robber II.py | MapleLove2014/leetcode | 135c79ebe98815d0e38280edfadaba90e677aff5 | [
"Apache-2.0"
] | null | null | null | 213. House Robber II.py | MapleLove2014/leetcode | 135c79ebe98815d0e38280edfadaba90e677aff5 | [
"Apache-2.0"
] | null | null | null | class Solution:
def rob(self, nums):
if len(nums) == 1:
return nums[0]
return self.doRob(nums)
def doRob(self, nums):
return max(self.robbing(0, nums, True, 0, 0), self.robbing(0, nums, False, 0, 0))
def robbing(self, i, nums, robFirst, value1, value2):
if i == ... | 38.809524 | 117 | 0.568098 |
e4050adfe51197549ad92444896d3f681a8a6ad8 | 6,398 | py | Python | deepbiosphere/scripts/maxent_inference.py | moiexpositoalonsolab/deepbiosphere | a12e59c40d2c29b5428e4969ef8c3a0cb457e387 | [
"MIT"
] | null | null | null | deepbiosphere/scripts/maxent_inference.py | moiexpositoalonsolab/deepbiosphere | a12e59c40d2c29b5428e4969ef8c3a0cb457e387 | [
"MIT"
] | null | null | null | deepbiosphere/scripts/maxent_inference.py | moiexpositoalonsolab/deepbiosphere | a12e59c40d2c29b5428e4969ef8c3a0cb457e387 | [
"MIT"
] | null | null | null | import time
import glob
import rasterio
import numpy as np
import rpy2.robjects as robjects
from rpy2.robjects.packages import importr
import deepbiosphere.scripts.GEOCLEF_Run as run
import deepbiosphere.scripts.GEOCLEF_Utils as utils
import deepbiosphere.scripts.GEOCLEF_Dataset as dataset
from deepbiosphere.scripts im... | 46.362319 | 242 | 0.672398 |
2092176a80ef75a89c50c0ea3ade65082dee8c81 | 7,818 | py | Python | pyupdater/vendor/PyInstaller/depend/dylib.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | pyupdater/vendor/PyInstaller/depend/dylib.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | pyupdater/vendor/PyInstaller/depend/dylib.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2013, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this softwa... | 30.779528 | 100 | 0.619468 |
a592a7e232617a9cb7891f617f1c18ea018e5e11 | 1,439 | py | Python | vespene/config/workers.py | Conan-Kudo/vespene | 9e9977523f45586e1326ccd77d8cc0cb10591a07 | [
"Apache-2.0"
] | 680 | 2018-10-29T12:12:10.000Z | 2019-04-27T09:52:58.000Z | vespene/config/workers.py | Conan-Kudo/vespene | 9e9977523f45586e1326ccd77d8cc0cb10591a07 | [
"Apache-2.0"
] | 110 | 2018-10-29T12:33:34.000Z | 2019-02-14T02:31:43.000Z | vespene/config/workers.py | Conan-Kudo/vespene | 9e9977523f45586e1326ccd77d8cc0cb10591a07 | [
"Apache-2.0"
] | 92 | 2018-10-29T12:21:12.000Z | 2019-06-08T11:08:08.000Z | # Copyright 2018, Michael DeHaan LLC
# License: Apache License Version 2.0
# ---------------------------------------------------------------------------
# workers.py - configuration related to worker setup. This file *CAN* be
# different per worker.
# -----------------------------------------------------------------... | 41.114286 | 86 | 0.642113 |
d87230ccc90f10393a6490ed64c3efc261608dbe | 934 | py | Python | tetris/blockmesh/geometry.py | gabrielbdsantos/tetris | 78a173bd31079a932e061e5b8fdb49541cb96ae0 | [
"MIT"
] | null | null | null | tetris/blockmesh/geometry.py | gabrielbdsantos/tetris | 78a173bd31079a932e061e5b8fdb49541cb96ae0 | [
"MIT"
] | null | null | null | tetris/blockmesh/geometry.py | gabrielbdsantos/tetris | 78a173bd31079a932e061e5b8fdb49541cb96ae0 | [
"MIT"
] | null | null | null | # coding: utf-8
"""Provide common geometry types."""
from __future__ import annotations
from abc import abstractproperty
from tetris.typing import BlockMeshElement
class Geometry(BlockMeshElement):
"""Base class for geometry objects."""
def __init__(self, name: str) -> None:
self.name = name
... | 23.35 | 73 | 0.625268 |
8de6cb96ff6963c9bf1b20f02fea027aeaa7122c | 6,096 | py | Python | skabase/tests/test_utils.py | adityadangeska/lmc-base-classes | a3dada19b27fcc889546d754ef94986c55da5acc | [
"BSD-3-Clause"
] | 1 | 2019-05-31T09:47:31.000Z | 2019-05-31T09:47:31.000Z | skabase/tests/test_utils.py | adityadangeska/lmc-base-classes | a3dada19b27fcc889546d754ef94986c55da5acc | [
"BSD-3-Clause"
] | null | null | null | skabase/tests/test_utils.py | adityadangeska/lmc-base-classes | a3dada19b27fcc889546d754ef94986c55da5acc | [
"BSD-3-Clause"
] | null | null | null | """Tests for skabase.utils."""
import json
import pytest
from skabase.utils import get_groups_from_json
from skabase.utils import GroupDefinitionsError
TEST_GROUPS = {
# Valid groups
'basic_no_subgroups': {
'group_name': 'g1',
'devices': ['my/dev/1'],
},
'basic_empty_subgroups': {
... | 29.736585 | 81 | 0.607612 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.