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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ac140361500ab225e92279dba2f6401a3ff6ff63 | 849 | py | Python | generators/cli/templates/cli_module.py | mastersign/generator-mastersign-python | 5d0eaa98c8efbd8b42e5958ff36b2ae978af2eaa | [
"BSD-3-Clause"
] | null | null | null | generators/cli/templates/cli_module.py | mastersign/generator-mastersign-python | 5d0eaa98c8efbd8b42e5958ff36b2ae978af2eaa | [
"BSD-3-Clause"
] | null | null | null | generators/cli/templates/cli_module.py | mastersign/generator-mastersign-python | 5d0eaa98c8efbd8b42e5958ff36b2ae978af2eaa | [
"BSD-3-Clause"
] | null | null | null | # _*_ coding: utf-8 _*_
"""
This module provides the command line interface for the tool.
"""
import click
from <%= rootPackage %>.<%= mainModule %> import example
@click.command(help='<%= description %>')
@click.option('-a', '--first', type=int, prompt='First value', default=0,
help='Operand A')
@cli... | 28.3 | 83 | 0.621908 |
ac1438a8e30fad08bf5013ada96e6604a0c2fc52 | 3,686 | py | Python | More/E00_Publications/TypeSpecimens/AlliumBanner-2.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | More/E00_Publications/TypeSpecimens/AlliumBanner-2.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | More/E00_Publications/TypeSpecimens/AlliumBanner-2.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | # -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# Copyright (c) 2017 Thom Janssen <https://github.com/thomgb>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.or... | 38 | 101 | 0.645415 |
ac1462d41ceef03dcbfe6c93129d559106713dc3 | 1,336 | py | Python | documentation/sphinx/examples/explicit_euler.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 54 | 2015-03-05T13:38:08.000Z | 2021-11-29T11:54:48.000Z | documentation/sphinx/examples/explicit_euler.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 7 | 2016-04-06T11:25:00.000Z | 2020-11-09T13:53:20.000Z | documentation/sphinx/examples/explicit_euler.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 13 | 2015-01-17T17:05:56.000Z | 2021-08-05T01:13:16.000Z | import numpy; from numpy import sin,cos; from algopy import UTPM, zeros
D,P = 4,1
x = UTPM(numpy.zeros((D,P,2)))
x.data[0,:,0] = 1
p = UTPM(numpy.zeros((D,P)))
p.data[0,:] = 3; p.data[1,:] = 1
def f(x):
retval = x.zeros_like()
retval[0] = x[1]
retval[1] = -p* x[0]
return retval
# compute AD solution
t... | 28.425532 | 94 | 0.61003 |
ac14656b8436030145fe8688a0cd1a1619372a1a | 159 | py | Python | corazon/__init__.py | pllim/corazon | 437675093e0549773013f73e82b4df9277016f1a | [
"BSD-3-Clause"
] | 1 | 2021-01-11T19:46:07.000Z | 2021-01-11T19:46:07.000Z | corazon/__init__.py | pllim/corazon | 437675093e0549773013f73e82b4df9277016f1a | [
"BSD-3-Clause"
] | 7 | 2021-01-11T19:44:30.000Z | 2021-03-30T12:48:50.000Z | corazon/__init__.py | pllim/corazon | 437675093e0549773013f73e82b4df9277016f1a | [
"BSD-3-Clause"
] | 2 | 2021-01-11T19:45:41.000Z | 2021-01-23T01:45:22.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
try:
from .version import version as __version__
except ImportError:
__version__ = ''
| 22.714286 | 63 | 0.735849 |
ac146b1dff2937c16bf9980611cc3f9366f391d1 | 8,811 | py | Python | nicos/devices/taco/temperature.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos/devices/taco/temperature.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 4 | 2019-11-08T10:18:16.000Z | 2021-01-13T13:07:29.000Z | nicos/devices/taco/temperature.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 38.986726 | 80 | 0.598116 |
ac1475e55c30d08f1244aca801c956ddfd73d89a | 4,120 | py | Python | vbclient/tests/osc/v2/test_backup.py | huaweicloudsdk/osc_vbs | 98834c9425af3e8bff6e2db4602c3f7bd72829bd | [
"Apache-2.0"
] | 3 | 2017-01-23T03:36:00.000Z | 2021-01-30T14:00:34.000Z | vbclient/tests/osc/v2/test_backup.py | huaweicloudsdk/osc_vbs | 98834c9425af3e8bff6e2db4602c3f7bd72829bd | [
"Apache-2.0"
] | 3 | 2017-02-23T01:52:02.000Z | 2017-02-25T07:55:27.000Z | vbclient/tests/osc/v2/test_backup.py | huaweicloudsdk/osc_vbs | 98834c9425af3e8bff6e2db4602c3f7bd72829bd | [
"Apache-2.0"
] | 1 | 2017-09-18T22:04:54.000Z | 2017-09-18T22:04:54.000Z | # Copyright 2016 Huawei, Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.333333 | 77 | 0.623058 |
ac149b96a7c47411b708b0df354613b0db787048 | 3,448 | py | Python | tests/dygraph/test_unstructured_prune.py | 1375207619/PaddleSlim | 1a9376a8b68e2219db3e95dea900ef4003e72c36 | [
"Apache-2.0"
] | 1 | 2021-12-30T08:23:21.000Z | 2021-12-30T08:23:21.000Z | tests/dygraph/test_unstructured_prune.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | null | null | null | tests/dygraph/test_unstructured_prune.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("../../")
import unittest
import paddle
import numpy as np
from paddleslim import UnstructuredPruner
from paddle.vision.models import mobilenet_v1
class TestUnstructuredPruner(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(TestUnstructuredPruner, self).__init__(*... | 39.181818 | 80 | 0.649072 |
ac14bea19942577a8558f519c1495b56cab627ee | 1,995 | py | Python | lab2/text_recognizer/util.py | wook3024/fsdl-text-recognizer-2021-labs | 06ccc875eaa22971a9c3e78785566739ec75702a | [
"MIT"
] | null | null | null | lab2/text_recognizer/util.py | wook3024/fsdl-text-recognizer-2021-labs | 06ccc875eaa22971a9c3e78785566739ec75702a | [
"MIT"
] | null | null | null | lab2/text_recognizer/util.py | wook3024/fsdl-text-recognizer-2021-labs | 06ccc875eaa22971a9c3e78785566739ec75702a | [
"MIT"
] | null | null | null | """Utility functions for text_recognizer module."""
from io import BytesIO
from pathlib import Path
from typing import Union
from urllib.request import urlretrieve
import base64
import hashlib
from PIL import Image
from tqdm import tqdm
import numpy as np
import smart_open
def to_categorical(y, num_classes):
"""... | 31.666667 | 81 | 0.661153 |
ac14df0232cfaedb5f0dcb2d9a763edac22f8dcc | 2,670 | py | Python | setup.py | martinfleis/pysal | d2e0667d825d403efe7182ecda210dc152ec206d | [
"BSD-3-Clause"
] | 941 | 2015-01-12T22:25:55.000Z | 2022-03-27T15:41:29.000Z | setup.py | anekekarina99/pysal | bd8c954d34b4694416830a852e26fe40d64424f2 | [
"BSD-3-Clause"
] | 589 | 2015-01-09T03:58:03.000Z | 2022-02-26T02:17:15.000Z | setup.py | anekekarina99/pysal | bd8c954d34b4694416830a852e26fe40d64424f2 | [
"BSD-3-Clause"
] | 303 | 2015-01-10T02:59:04.000Z | 2022-03-05T04:21:55.000Z | # coding: utf-8
import codecs
import os.path
import os
import versioneer
from setuptools import setup, find_packages
from distutils.command.build_py import build_py
with open('README.md') as file:
long_description = file.read()
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with co... | 31.785714 | 74 | 0.64382 |
ac1500bd0648dd6d69ca8f03b2805b8f8fb7075c | 3,175 | py | Python | B 2018-2019/week5.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | 65 | 2017-01-19T08:03:38.000Z | 2021-04-02T17:41:43.000Z | B 2018-2019/week5.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | null | null | null | B 2018-2019/week5.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | 110 | 2017-01-19T08:04:14.000Z | 2020-07-23T13:44:52.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 18 07:31:52 2018
@author: behzad
"""
import numpy as np
#' The main use of numpy is defining arrays ---These are vectors !!
A1 = np.array([1,4,5,11]) # An array of integers
A2 = np.array([1.2,5.0,9.3,5])
A1.dtype
A2.dtype
# All of the elements of an array should have th... | 24.804688 | 163 | 0.704252 |
ac1505fce78fbcd5dd3324f31c671ac8fbc0f998 | 6,696 | py | Python | wrap.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | wrap.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | wrap.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to ... | 37.407821 | 125 | 0.563023 |
ac150c929a4fb3bf60b8d144e6d9a0668905c975 | 211 | py | Python | 25dflipper/setup.py | STAR-Center/flipperplanning3DTerrain | fcbe076446bbc6cb10da67b81c9a6349b4c51b66 | [
"MIT"
] | null | null | null | 25dflipper/setup.py | STAR-Center/flipperplanning3DTerrain | fcbe076446bbc6cb10da67b81c9a6349b4c51b66 | [
"MIT"
] | null | null | null | 25dflipper/setup.py | STAR-Center/flipperplanning3DTerrain | fcbe076446bbc6cb10da67b81c9a6349b4c51b66 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name='flipper25d',
version='0.1dev',
install_requires=[],
packages=['flipper25d',],
license='MIT',
#long_description=open('README.txt').read(),
)
| 19.181818 | 48 | 0.64455 |
ac151bc3c9c50f6319e9595cb935376c8b4920a9 | 3,340 | py | Python | predict.py | tonib/tokens-rnn-tensorflow | 9da815d3f9f4d215dd4d7041e5638eeb3ac51a0a | [
"MIT"
] | null | null | null | predict.py | tonib/tokens-rnn-tensorflow | 9da815d3f9f4d215dd4d7041e5638eeb3ac51a0a | [
"MIT"
] | null | null | null | predict.py | tonib/tokens-rnn-tensorflow | 9da815d3f9f4d215dd4d7041e5638eeb3ac51a0a | [
"MIT"
] | null | null | null | import argparse
from input_data import InputData
from model import Model
import os
import tensorflow as tf
from tensorflow.contrib.predictor.predictor import Predictor
from cmdline import parse_command_line
def create_choose_random_char_tensor() -> tf.Tensor:
""" Define Tensorflow ops to choose random character wi... | 35.913978 | 121 | 0.694311 |
ac1529fef53b706dee1f180488e190ba773aa53e | 1,055 | py | Python | myapp/migrations/0014_raw.py | rizkybram27/magangUMN | 8ace710670b8117dd39018a4cd1eee051091a3e7 | [
"MIT"
] | 4 | 2019-03-18T12:12:50.000Z | 2020-07-10T19:40:44.000Z | myapp/migrations/0014_raw.py | rizkybram27/magangUMN | 8ace710670b8117dd39018a4cd1eee051091a3e7 | [
"MIT"
] | null | null | null | myapp/migrations/0014_raw.py | rizkybram27/magangUMN | 8ace710670b8117dd39018a4cd1eee051091a3e7 | [
"MIT"
] | 7 | 2019-08-01T12:37:54.000Z | 2021-05-12T14:40:06.000Z | # Generated by Django 2.0.13 on 2019-03-03 01:07
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('myapp', '0013_product_product_status'),
]
operations = [
migrations.CreateModel(
name='Raw',
... | 40.576923 | 176 | 0.588626 |
ac153f7bfd025c9a4028cb9e9c5640d89ae762bd | 679 | py | Python | src/timeshap/utils/__init__.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 49 | 2022-03-25T14:35:52.000Z | 2022-03-31T18:05:51.000Z | src/timeshap/utils/__init__.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 1 | 2022-03-31T12:15:55.000Z | 2022-03-31T14:59:06.000Z | src/timeshap/utils/__init__.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 2 | 2022-03-28T04:32:35.000Z | 2022-03-28T06:39:24.000Z | # Copyright 2022 Feedzai
#
# 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 writi... | 39.941176 | 75 | 0.762887 |
ac156189ffa0fd9e6f3a839d78a367106cee12d4 | 1,715 | py | Python | fractal_generators/fractal-penrose.py | shyamvalsan/codeart | bd04723136ea78b83faa1357e0a5a47f7c3dd316 | [
"MIT"
] | 1 | 2022-03-12T02:44:16.000Z | 2022-03-12T02:44:16.000Z | fractal_generators/fractal-penrose.py | shyamvalsan/codeart | bd04723136ea78b83faa1357e0a5a47f7c3dd316 | [
"MIT"
] | null | null | null | fractal_generators/fractal-penrose.py | shyamvalsan/codeart | bd04723136ea78b83faa1357e0a5a47f7c3dd316 | [
"MIT"
] | null | null | null | from functools import reduce
_ =\
"""if!
1:"e,V=150
0,(0j-1)**-.2;
v,S=.5/ V.real,
[(0,0,4 *e,4*e*
V)];w=1 ... | 51.969697 | 70 | 0.24723 |
ac157b15f17e188a03b3a2e3eeaf728b9775b339 | 2,282 | py | Python | nova/tests/functional/api_sample_tests/test_admin_actions.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api_sample_tests/test_admin_actions.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api_sample_tests/test_admin_actions.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-03-01T17:04:57.000Z | 2020-03-01T17:04:57.000Z | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | 40.035088 | 78 | 0.676599 |
ac158b9705f761f322c9d6e5ebae260734c03fce | 2,483 | py | Python | signalfx_tracing/libraries/pymysql_/instrument.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | signalfx_tracing/libraries/pymysql_/instrument.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | signalfx_tracing/libraries/pymysql_/instrument.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018-2019 SignalFx. All rights reserved.
import logging
from wrapt import wrap_function_wrapper
from opentracing.ext import tags
from six import ensure_str
import opentracing
from signalfx_tracing import utils
log = logging.getLogger(__name__)
# Configures PyMySQL tracing as described by
# https://g... | 34.013699 | 105 | 0.683447 |
ac15900b1876e99a861294cc40a3a3538c51ca82 | 9,418 | py | Python | data/preprocess.py | egordon/haptic_il | 75584982cd962fb7ed5cb775661705a2fa31d942 | [
"MIT"
] | null | null | null | data/preprocess.py | egordon/haptic_il | 75584982cd962fb7ed5cb775661705a2fa31d942 | [
"MIT"
] | null | null | null | data/preprocess.py | egordon/haptic_il | 75584982cd962fb7ed5cb775661705a2fa31d942 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import matplotlib.pyplot as plt
import numpy as np
from scipy.signal import savgol_filter
import sys
import os
import yaml
import errno
# Get current script directory
script_dir = sys.path[0]
# Make folder if not exist
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:... | 31.710438 | 144 | 0.572733 |
ac15ea92cb2743abad1504165ec5a2359f618f46 | 2,306 | py | Python | app/recipe/tests/test_ingredients_api.py | shenyiting2018/recipe-app-api | edd9bb28343e0d0ae2c13f8240e355ed13651b7d | [
"MIT"
] | null | null | null | app/recipe/tests/test_ingredients_api.py | shenyiting2018/recipe-app-api | edd9bb28343e0d0ae2c13f8240e355ed13651b7d | [
"MIT"
] | null | null | null | app/recipe/tests/test_ingredients_api.py | shenyiting2018/recipe-app-api | edd9bb28343e0d0ae2c13f8240e355ed13651b7d | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Ingredient
from recipe.serializers import IngredientSerializer
INGREDIENTS_URL = reverse("recipe:ingred... | 31.589041 | 87 | 0.703382 |
ac164c17566c5cecbbf1e4e241cadb03d7e28404 | 5,748 | py | Python | docs/source/conf.py | encryptedcommerce/etsy-shop-top-terms | 4a67b68d35f353a6e6ab4cddc9b7f02bd5a9d5eb | [
"MIT"
] | 2 | 2019-04-30T00:08:05.000Z | 2022-01-23T22:21:47.000Z | docs/source/conf.py | encryptedcommerce/etsy-shop-top-terms | 4a67b68d35f353a6e6ab4cddc9b7f02bd5a9d5eb | [
"MIT"
] | null | null | null | docs/source/conf.py | encryptedcommerce/etsy-shop-top-terms | 4a67b68d35f353a6e6ab4cddc9b7f02bd5a9d5eb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.252632 | 99 | 0.648225 |
ac1675aff56818cb1248e4251cb53fff9dc41e90 | 3,871 | py | Python | asyncpraw/models/reddit/mixins/inboxable.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 72 | 2020-07-14T02:02:21.000Z | 2022-03-15T13:10:02.000Z | asyncpraw/models/reddit/mixins/inboxable.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 68 | 2020-07-16T05:29:43.000Z | 2022-03-14T12:04:56.000Z | asyncpraw/models/reddit/mixins/inboxable.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 19 | 2020-07-22T15:34:30.000Z | 2022-03-27T20:28:46.000Z | """Provide the InboxableMixin class."""
from ....const import API_PATH
class InboxableMixin:
"""Interface for RedditBase classes that originate from the inbox."""
async def block(self):
"""Block the user who sent the item.
.. note::
This method pertains only to objects which we... | 24.345912 | 84 | 0.54172 |
ac1683a4ddacb3374703e81a5c8b7a02f173c005 | 10,277 | py | Python | tests/test_music_service_data_structures.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 1 | 2019-02-07T19:57:30.000Z | 2019-02-07T19:57:30.000Z | tests/test_music_service_data_structures.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | null | null | null | tests/test_music_service_data_structures.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test for music_services/data_structures"""
from __future__ import unicode_literals, print_function
from collections import OrderedDict
import pytest
from mock import PropertyMock, Mock, patch
from soco.music_services import data_structures
from soco.data_structures import DidlResource
# D... | 37.783088 | 101 | 0.607278 |
ac16a03e89bdb0335e91177f4ea2bfa4f349dcce | 13,901 | py | Python | gymfc/examples/controllers/run_pid_optimized.py | prokhn/onti-2019-bigdata | b9296141958f544177388be94072efce7bdc7814 | [
"MIT"
] | null | null | null | gymfc/examples/controllers/run_pid_optimized.py | prokhn/onti-2019-bigdata | b9296141958f544177388be94072efce7bdc7814 | [
"MIT"
] | null | null | null | gymfc/examples/controllers/run_pid_optimized.py | prokhn/onti-2019-bigdata | b9296141958f544177388be94072efce7bdc7814 | [
"MIT"
] | null | null | null | import os
import gym
import math
import time
import tqdm
import gymfc
import argparse
import numpy as np
from mpi4py import MPI
import matplotlib.pyplot as plt
class Policy(object):
def action(self, state, sim_time=0, desired=np.zeros(3), actual=np.zeros(3)):
pass
def reset(self):
pass
clas... | 33.822384 | 118 | 0.587871 |
ac16a6bf13b6d4710079ac3161824638f83f074c | 18,786 | py | Python | python/tvm/relay/frontend/caffe2.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 15 | 2019-05-02T00:06:28.000Z | 2022-03-25T03:11:14.000Z | python/tvm/relay/frontend/caffe2.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 5 | 2019-05-13T20:44:51.000Z | 2019-09-25T19:56:29.000Z | python/tvm/relay/frontend/caffe2.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 11 | 2019-07-01T05:21:36.000Z | 2022-01-04T18:38:27.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.614583 | 113 | 0.594432 |
ac16a82079045b2b1863000d2018247241adc890 | 16,048 | py | Python | bingmaps/apiservices/trafficincidents.py | bharadwajyarlagadda/docMaker | 6bb3cdadfb121aaff96704509cedff2710a62b6d | [
"MIT"
] | 13 | 2016-03-09T05:50:53.000Z | 2022-01-01T09:20:45.000Z | bingmaps/apiservices/trafficincidents.py | bharadwajyarlagadda/docMaker | 6bb3cdadfb121aaff96704509cedff2710a62b6d | [
"MIT"
] | 8 | 2016-03-24T21:56:58.000Z | 2016-03-25T05:28:43.000Z | bingmaps/apiservices/trafficincidents.py | bharadwajyarlagadda/docMaker | 6bb3cdadfb121aaff96704509cedff2710a62b6d | [
"MIT"
] | 9 | 2016-10-11T03:56:53.000Z | 2020-05-13T03:05:13.000Z | from bingmaps.urls import TrafficIncidentsUrl, TrafficIncidentsSchema
from collections import namedtuple
import requests
import json
import xmltodict
class TrafficIncidentsApi(object):
"""Traffic Incidents API class
This class is used to retrieve the output from the given data from the
user.
- Firs... | 37.583138 | 79 | 0.572719 |
ac16cb6a4024345af9ef7449664b357eef7b1e1f | 4,096 | py | Python | goatools/gosubdag/godag_rcnt_init.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | 1 | 2020-03-12T13:53:11.000Z | 2020-03-12T13:53:11.000Z | goatools/gosubdag/godag_rcnt_init.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | null | null | null | goatools/gosubdag/godag_rcnt_init.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | 1 | 2022-03-17T03:14:32.000Z | 2022-03-17T03:14:32.000Z | """Get descendant/parent counts for all GO terms in a GODag and broad L0 and L1 terms."""
from __future__ import print_function
__copyright__ = "Copyright (C) 2016-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
import collections as cx
from itertools import chain
from goatools.go... | 47.627907 | 99 | 0.659668 |
ac16cefdfcbd6d1588c67ce31205e5bee301ce35 | 10,606 | py | Python | leetcode_python/Binary_Search/minimum-space-wasted-from-packaging.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Binary_Search/minimum-space-wasted-from-packaging.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Binary_Search/minimum-space-wasted-from-packaging.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
1889. Minimum Space Wasted From Packaging
Hard
You have n packages that you are trying to place in boxes, one package in each box. There are m suppliers that each produce boxes of different sizes (with infinite supply). A package can be placed in a box if the size of the package is less than or equal to the size ... | 38.288809 | 285 | 0.604186 |
ac16f52597800236d0524a06d646bf1e072b651c | 1,637 | py | Python | day13/day13.py | mpirnat/adventofcode | f63ce466b91d5be2687be95fd4ab0b442f1ea5c8 | [
"MIT"
] | 12 | 2015-12-02T05:56:36.000Z | 2017-11-29T18:58:47.000Z | day13/day13.py | mpirnat/adventofcode | f63ce466b91d5be2687be95fd4ab0b442f1ea5c8 | [
"MIT"
] | 1 | 2015-12-06T03:36:18.000Z | 2015-12-06T20:52:29.000Z | day13/day13.py | mpirnat/adventofcode | f63ce466b91d5be2687be95fd4ab0b442f1ea5c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Solve day 13 of Advent of Code.
http://adventofcode.com/day/13
"""
import re
from collections import defaultdict
from itertools import permutations
def parse_input(data):
guests = defaultdict(dict)
for line in data:
match = re.search(
r'^(\w+) would (\w+) ... | 26.836066 | 62 | 0.611484 |
ac1700dca98b2f034299920e08800b76dfa0c725 | 726 | py | Python | sjtwo-c/site_scons/site_tools/codegen/site_packages/can/interfaces/ixxat/exceptions.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | sjtwo-c/site_scons/site_tools/codegen/site_packages/can/interfaces/ixxat/exceptions.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/site_scons/site_tools/codegen/site_packages/can/interfaces/ixxat/exceptions.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Ctypes wrapper module for IXXAT Virtual CAN Interface V3 on win32 systems
Copyright (C) 2016 Giuseppe Corbelli <giuseppe.corbelli@weightpack.com>
"""
from can import CanError
__all__ = ['VCITimeout', 'VCIError', 'VCIRxQueueEmptyError', 'VCIDeviceNotFoundError']
class VCITimeout(CanError):
... | 22.6875 | 86 | 0.72865 |
ac173f153a93f5f5237e7af3674e8c15e46223bb | 13,174 | py | Python | test/test_read.py | simleo/ro-crate-py | 99ebd922a072b49f91c26ff63f2d3aa2df6fe8e1 | [
"Apache-2.0"
] | null | null | null | test/test_read.py | simleo/ro-crate-py | 99ebd922a072b49f91c26ff63f2d3aa2df6fe8e1 | [
"Apache-2.0"
] | null | null | null | test/test_read.py | simleo/ro-crate-py | 99ebd922a072b49f91c26ff63f2d3aa2df6fe8e1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2021 The University of Manchester, UK
# Copyright 2020-2021 Vlaams Instituut voor Biotechnologie (VIB), BE
# Copyright 2020-2021 Barcelona Supercomputing Center (BSC), ES
# Copyright 2020-2021 Center for Advanced Studies, Research and Development in Sardinia (CRS4), IT
#
# Licensed under the Apache Lic... | 35.509434 | 116 | 0.664415 |
ac17573907a9d832b96eb90c07445e2001e13ed4 | 80 | py | Python | e3nn/io/__init__.py | SuperXiang/e3nn | b97b2b9e83f896c6b8b21b2fe20dc356a2c18e0c | [
"MIT"
] | 1 | 2021-02-09T10:34:09.000Z | 2021-02-09T10:34:09.000Z | e3nn/io/__init__.py | SuperXiang/e3nn | b97b2b9e83f896c6b8b21b2fe20dc356a2c18e0c | [
"MIT"
] | null | null | null | e3nn/io/__init__.py | SuperXiang/e3nn | b97b2b9e83f896c6b8b21b2fe20dc356a2c18e0c | [
"MIT"
] | null | null | null | from .spherical_tensor import * # noqa
from .cartesian_tensor import * # noqa
| 26.666667 | 39 | 0.75 |
ac17baaf7189b379ba1ad44e22736ce25f7f0492 | 25,261 | py | Python | pytorch/test/run_test.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/run_test.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/run_test.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import argparse
from datetime import datetime
import modulefinder
import os
import shutil
import signal
import subprocess
import sys
import tempfile
import torch
import torch._six
from torch.utils import cpp_extension
from torch.testing._internal.common_uti... | 35.23152 | 116 | 0.633665 |
ac17c3a42265d96a1d37673f1db7ccc5f6227c23 | 9,781 | py | Python | mitmproxy/contrib/urwid/escape_patches.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/contrib/urwid/escape_patches.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/contrib/urwid/escape_patches.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | # monkeypatch https://github.com/urwid/urwid/commit/e2423b5069f51d318ea1ac0f355a0efe5448f7eb into the urwid sources.
import urwid.escape
if urwid.__version__ in ("2.1.1", "2.1.2"):
# fmt: off
urwid.escape.input_sequences = [
('[A','up'),('[B','down'),('[C','right'),('[D','left'),
('[E','5'),('[... | 38.356863 | 116 | 0.453737 |
ac17c4ae577a7ce9fdab1f047ff2c91bf86dee19 | 32,385 | py | Python | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_packet_core_data_planes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_packet_core_data_planes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_packet_core_data_planes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 47.765487 | 268 | 0.698472 |
ac17db7b495be93f43d8f85073e974d94e27515a | 2,052 | py | Python | python/v2.6/get_floodlight_activity_groups.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 103 | 2015-01-11T12:23:46.000Z | 2022-03-31T02:06:12.000Z | python/v2.6/get_floodlight_activity_groups.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 32 | 2015-03-03T13:39:35.000Z | 2021-07-16T01:31:06.000Z | python/v2.6/get_floodlight_activity_groups.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 194 | 2015-01-05T22:02:16.000Z | 2022-03-01T17:01:39.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. 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 b... | 30.626866 | 78 | 0.739766 |
ac17e9059c82a6137121696ad4f57130260b11b4 | 22,777 | py | Python | sdk/python/pulumi_aws_quickstart_vpc/vpc.py | pulumi/pulumi-aws-quickstart-vpc | a57ff546bafce2984a73e8fead1be06ed2dac01f | [
"Apache-2.0"
] | 1 | 2022-03-04T19:25:42.000Z | 2022-03-04T19:25:42.000Z | sdk/python/pulumi_aws_quickstart_vpc/vpc.py | pulumi/pulumi-aws-quickstart-vpc | a57ff546bafce2984a73e8fead1be06ed2dac01f | [
"Apache-2.0"
] | 1 | 2021-12-23T18:25:02.000Z | 2021-12-23T18:25:02.000Z | sdk/python/pulumi_aws_quickstart_vpc/vpc.py | pulumi/pulumi-aws-quickstart-vpc | a57ff546bafce2984a73e8fead1be06ed2dac01f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by 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
from ._in... | 53.21729 | 203 | 0.674979 |
ac17f1d21a0d9f95166743b1314c1c3e92c3da16 | 5,128 | py | Python | meterpi/writer.py | lcarnevale/meterpi | f49af129fa18b7445a19cb9b85c556f13bce955d | [
"MIT"
] | null | null | null | meterpi/writer.py | lcarnevale/meterpi | f49af129fa18b7445a19cb9b85c556f13bce955d | [
"MIT"
] | null | null | null | meterpi/writer.py | lcarnevale/meterpi | f49af129fa18b7445a19cb9b85c556f13bce955d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
"""Writer class.
This implementation does its best to follow the Robert Martin's Clean code guidelines.
The comments follows the Google Python Style Guide:
https://github.com/google/styleguide/blob/gh-pages/pyguide.md
"""
__copyright__ = 'Copyright 2021, FCRLab at Uni... | 33.960265 | 105 | 0.550702 |
ac17fbe274093b87a0cf8b73fd8209b3ab104eac | 7,427 | py | Python | tests/test_connector.py | 52North/pygeoapi-odc-provider | 81d6b6aa35836a4b6efa634153557b6db667a099 | [
"Apache-2.0"
] | 5 | 2021-11-09T13:36:41.000Z | 2022-02-11T15:54:27.000Z | tests/test_connector.py | MartinPontius/pygeoapi-odc-provider | 81d6b6aa35836a4b6efa634153557b6db667a099 | [
"Apache-2.0"
] | 5 | 2021-07-07T15:45:04.000Z | 2021-09-08T13:04:05.000Z | tests/test_connector.py | 52North/pygeoapi-odc-provider | 81d6b6aa35836a4b6efa634153557b6db667a099 | [
"Apache-2.0"
] | 1 | 2021-07-21T22:23:09.000Z | 2021-07-21T22:23:09.000Z | # =================================================================
# Copyright (C) 2021-2021 52°North Spatial Information Research GmbH
#
# 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
# h... | 33.759091 | 116 | 0.699475 |
ac1800dadafd97aa7c461a148e71247b35fbff75 | 1,075 | py | Python | autoleagueplay/bubble_sort_overlay.py | RLBot/AutoLeaguePlay | eaff05532eab179d1fa8635541dad17cd0a9b82c | [
"MIT"
] | 1 | 2019-08-17T18:18:54.000Z | 2019-08-17T18:18:54.000Z | autoleagueplay/bubble_sort_overlay.py | RLBot/AutoLeaguePlay | eaff05532eab179d1fa8635541dad17cd0a9b82c | [
"MIT"
] | 11 | 2019-08-22T07:44:12.000Z | 2019-10-30T18:16:09.000Z | autoleagueplay/bubble_sort_overlay.py | RLBot/AutoLeaguePlay | eaff05532eab179d1fa8635541dad17cd0a9b82c | [
"MIT"
] | 4 | 2019-08-17T19:43:12.000Z | 2020-12-10T18:53:53.000Z | import json
from os.path import relpath
from pathlib import Path
from typing import List
class BubbleSortOverlayData:
def __init__(self, ladder: List[str], versioned_map, sort_index: int, needs_match: bool, root_dir, winner: str=None,
sort_complete: bool=False):
self.ladder = ladder
... | 33.59375 | 120 | 0.608372 |
ac18293271fd766e78362ffccf923e8ae8ad10c5 | 7,452 | py | Python | validator/tests/unit/test_message_packet.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | 1 | 2019-03-18T13:31:11.000Z | 2019-03-18T13:31:11.000Z | validator/tests/unit/test_message_packet.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | validator/tests/unit/test_message_packet.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# 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 wri... | 41.4 | 80 | 0.630569 |
ac1842cfda286d2516aa844d7ec6ca62e7f16909 | 2,286 | py | Python | tests/aws_lambda_fsm/__init__.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 21 | 2017-01-26T21:23:57.000Z | 2021-08-07T02:56:49.000Z | tests/aws_lambda_fsm/__init__.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 151 | 2016-11-29T05:09:33.000Z | 2021-05-19T22:47:58.000Z | tests/aws_lambda_fsm/__init__.py | shawn-rusaw/aws-lambda-fsm-workflows | 9fcf5af14bf0f4500d4a7e7b3e0eda00423c1d42 | [
"Apache-2.0"
] | 17 | 2016-11-29T05:07:58.000Z | 2021-05-04T21:22:29.000Z | # Copyright 2016-2020 Workiva 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 wri... | 33.130435 | 88 | 0.706474 |
ac187668b11b5a83154ec218198ccac386a5b896 | 609 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/i18n/log.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/i18n/log.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/i18n/log.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 43.5 | 78 | 0.72578 |
ac18822c838a70a789cadb4556d87d7ab3a6ff4c | 852 | py | Python | codes/projects/test_continuous_parameter/data_generator/forward_functions.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_continuous_parameter/data_generator/forward_functions.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_continuous_parameter/data_generator/forward_functions.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | import numpy as np
import pdb #Equivalent of keyboard in MATLAB, just add "pdb.set_trace()"
def discrete_polynomial(parameter, forward_matrix, parameter_dimensions):
#=== Output ===#
state = np.matmul(forward_matrix, parameter)
#=== Jacobian ===#
Jac_forward = forward_matrix
return state, Jac_fo... | 29.37931 | 73 | 0.68662 |
ac18e30df5a0b1e79a9fdad267dc914c5fd1bcb9 | 685 | py | Python | jumpscale/packages/vdc_dashboard/services/transaction_from_prepaid_to_provision_wallet.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/packages/vdc_dashboard/services/transaction_from_prepaid_to_provision_wallet.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/packages/vdc_dashboard/services/transaction_from_prepaid_to_provision_wallet.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from jumpscale.loader import j
from jumpscale.packages.vdc.billing import transfer_prepaid_to_provision_wallet
from jumpscale.tools.servicemanager.servicemanager import BackgroundService
class TransferPrepaidToProvisionWallet(BackgroundService):
def __init__(self, interval=60 * 60, *args, **kwargs):
"""Pr... | 36.052632 | 79 | 0.756204 |
ac18f30aee54cd0106dca6c106991fabf929fdb8 | 1,499 | py | Python | pandaharvester/harvestercore/command_spec.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvestercore/command_spec.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvestercore/command_spec.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | """
Command spec class: a panda poller will retrieve commands from panda server and store cache them internally
"""
from .spec_base import SpecBase
class CommandSpec(SpecBase):
# attributes
attributesWithTypes = ('command_id:integer primary key',
'command:text',
... | 31.229167 | 107 | 0.58439 |
ac1910c0faa98f5af77a97256be74c749f17725a | 279 | py | Python | DeepRTS/__init__.py | cair/deep-rts | 7aa5dde0c5df10ae3a3d057e7b89641aec58e115 | [
"MIT"
] | 144 | 2018-07-13T07:47:50.000Z | 2022-03-31T06:29:50.000Z | DeepRTS/__init__.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 18 | 2019-03-29T10:37:01.000Z | 2022-03-02T12:47:34.000Z | DeepRTS/__init__.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 23 | 2018-11-02T18:12:51.000Z | 2022-02-15T20:32:18.000Z | try:
from DeepRTS import Engine
except ImportError:
import Engine
try:
from DeepRTS.Engine import Map, UnitManager, Constants, Player
from DeepRTS.Engine import Constants
except ImportError:
from Engine import Map, UnitManager, Constants, Player, Constants
| 23.25 | 69 | 0.763441 |
ac1911410b221650871b090770859db1a7398a9c | 288 | py | Python | mapa_streamlit/__init__.py | fgebhart/mapa-streamlit | 8a6af8658d1824fcf25def66caed441ceb13db61 | [
"MIT"
] | 3 | 2022-03-21T15:24:26.000Z | 2022-03-28T17:48:58.000Z | mapa_streamlit/__init__.py | fgebhart/mapa-streamlit | 8a6af8658d1824fcf25def66caed441ceb13db61 | [
"MIT"
] | 1 | 2022-03-17T22:35:02.000Z | 2022-03-18T18:51:37.000Z | mapa_streamlit/__init__.py | fgebhart/mapa-streamlit | 8a6af8658d1824fcf25def66caed441ceb13db61 | [
"MIT"
] | null | null | null | from pathlib import Path
import tomli
def _get_version_from_project_toml():
with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as f:
toml_dict = tomli.load(f)
return toml_dict["tool"]["poetry"]["version"]
__version__ = _get_version_from_project_toml()
| 20.571429 | 74 | 0.71875 |
ac19165b357d187d392ad7fb59f3f014c7ba3535 | 234,887 | py | Python | cpplint.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | cpplint.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | cpplint.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | 38.550304 | 97 | 0.652731 |
ac1959a427b1e38175f4b11ea2765e6b558f5a93 | 1,760 | py | Python | tools/test/test_mo_mapping.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | tools/test/test_mo_mapping.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | tools/test/test_mo_mapping.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import unittest
import numpy
import scipy.linalg
from pyscf import gto
from pyscf.tools import mo_mapping
class KnowValues(unittest.TestCase):
def test_mo_map(self):
mol1 = gto.M(atom = '''O 0 0 0; O 0 0 1''', basis='6-31g')
mol2 = gto.M(atom = '''O 0 0 0; O 0 0 1''', basis='... | 36.666667 | 77 | 0.577841 |
ac197100c8720d361aed74923f2bc2b305cda413 | 1,283 | py | Python | Method/TestMethod/TestFunctions.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | Method/TestMethod/TestFunctions.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | Method/TestMethod/TestFunctions.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null |
import numpy as np
"""
@definition:
Multivariable polynomial test function that returns a * x^3 + b * x * y^2 + c * x * y + d * x + e,
where a, b, c, d and e are 512x512 sized random arrays which are multidimensional polynomial coefficients
propagated from dataset to here.
@param "coeffs": 5 length array of 512x51... | 33.763158 | 106 | 0.659392 |
ac1974a807d5adb90712c072a52f827b28166e69 | 6,241 | py | Python | docs/source/conf.py | iGamesInc/nozama-cloudsearch | 2f3637a98d4ef594cec0273a9c9c4cd8a8aac375 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | iGamesInc/nozama-cloudsearch | 2f3637a98d4ef594cec0273a9c9c4cd8a8aac375 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | iGamesInc/nozama-cloudsearch | 2f3637a98d4ef594cec0273a9c9c4cd8a8aac375 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# a-b documentation build configuration file.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented ... | 32.005128 | 80 | 0.723442 |
ac1985113a85452124683370529b4f2a277a04f8 | 3,712 | py | Python | filmcli.py | johnhw/filmcli | 222c3816a7892ab26b14788a8962cf33866ad319 | [
"MIT"
] | null | null | null | filmcli.py | johnhw/filmcli | 222c3816a7892ab26b14788a8962cf33866ad319 | [
"MIT"
] | null | null | null | filmcli.py | johnhw/filmcli | 222c3816a7892ab26b14788a8962cf33866ad319 | [
"MIT"
] | null | null | null | import omdb
import textwrap
import colorama
def stars(x,y,nstars=10):
"""Generate a color-coded star rating from an x/y rating.
Uses trailing characters to represent fractional ratings:
Ratings are _ ~ - ^ ': 0.2, 0.4, 0.6, 0.8
"""
try:
x = float(x)
except ValueError:
return... | 34.691589 | 264 | 0.564655 |
ac19a1a763945ba25296f3463a7bedd7a9dfa4a8 | 4,409 | py | Python | homeassistant/components/switch/__init__.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/switch/__init__.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/switch/__init__.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | """
Component to interface with various switches that can be controlled remotely.
For more details about this component, please refer to the documentation
at https://home-assistant.io/components/switch/
"""
from datetime import timedelta
import logging
import os
from homeassistant.config import load_yaml_config_file
... | 30.618056 | 77 | 0.696983 |
ac19a41a8f59891236b89cf07173ffb067d391ba | 12,922 | py | Python | synthesizer/models/tacotron_tweaked/preprocess.py | neonsecret/Real-Time-Voice-Cloning | 07442ca1e73957440b3c8c55b50b124fb813db55 | [
"MIT"
] | null | null | null | synthesizer/models/tacotron_tweaked/preprocess.py | neonsecret/Real-Time-Voice-Cloning | 07442ca1e73957440b3c8c55b50b124fb813db55 | [
"MIT"
] | null | null | null | synthesizer/models/tacotron_tweaked/preprocess.py | neonsecret/Real-Time-Voice-Cloning | 07442ca1e73957440b3c8c55b50b124fb813db55 | [
"MIT"
] | null | null | null | from multiprocessing.pool import Pool
from synthesizer.models.tacotron import audio
from functools import partial
from itertools import chain
from encoder import inference as encoder
from pathlib import Path
from utils import logmmse
from tqdm import tqdm
import numpy as np
import librosa
def preprocess_dataset(datas... | 46.989091 | 110 | 0.627689 |
ac19a44e58da43da6ba14b7bd5e3be8172273efc | 1,037 | py | Python | tests/test_emulator/test_emulator.py | aspuru-guzik-group/gemini | 441d0f6c8842d15d4f917423ab440c5d78433199 | [
"MIT"
] | 8 | 2021-04-04T15:23:05.000Z | 2022-02-20T06:33:57.000Z | tests/test_emulator/test_emulator.py | aspuru-guzik-group/gemini | 441d0f6c8842d15d4f917423ab440c5d78433199 | [
"MIT"
] | null | null | null | tests/test_emulator/test_emulator.py | aspuru-guzik-group/gemini | 441d0f6c8842d15d4f917423ab440c5d78433199 | [
"MIT"
] | 5 | 2021-04-04T15:23:27.000Z | 2022-01-25T07:55:43.000Z | # #!/usr/bin/env python
#
# import pytest
#
# import numpy as np
#
# from gemini import __datasets__
# from gemini.datasets import Dataset
# from gemini.emulators import Emulator
#
# #===============================================================================
#
# def train_emulator(dataset_name = 'photobleaching'):... | 24.116279 | 87 | 0.620058 |
ac19b415b5342f6b3e71eafd15ccc2276efa5862 | 207 | py | Python | tests/models/test_random_nas_model.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | 1 | 2022-01-17T00:34:14.000Z | 2022-01-17T00:34:14.000Z | tests/models/test_random_nas_model.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | tests/models/test_random_nas_model.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | import hydra
from omegaconf import OmegaConf
if __name__ == '__main__':
cfg = OmegaConf.load('../../configs/model/random_model.yaml')
nas_net = hydra.utils.instantiate(cfg, _recursive_=False)
| 29.571429 | 66 | 0.714976 |
ac19e48678c44ed9421faa45f227a3fe32106342 | 4,904 | py | Python | production/pygsl-0.9.5/tests/integrate_test.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/tests/integrate_test.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/tests/integrate_test.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2018-10-02T06:18:07.000Z | 2018-10-02T06:18:07.000Z | #!/usr/bin/env python
# Author : Pierre Schnizer
import unittest
import pygsl._numobj as Numeric
import pygsl
from pygsl import integrate
class IntegrateTest(unittest.TestCase):
def setUp(self):
self.w = integrate.workspace(1000000)
def test_1_qags(self):
expected = -4.0
def... | 33.135135 | 99 | 0.567088 |
ac19fa2e177792593fb978e99d8b79b6044c41b7 | 8,441 | py | Python | recipes/thesis_experiments_fsn/leakage_removal/fullsubnet_aec/trainer.py | wimmerb/SpeechEnhancers | 6b4bb708eb25901056615880d4e95d5fc5add48b | [
"MIT"
] | null | null | null | recipes/thesis_experiments_fsn/leakage_removal/fullsubnet_aec/trainer.py | wimmerb/SpeechEnhancers | 6b4bb708eb25901056615880d4e95d5fc5add48b | [
"MIT"
] | null | null | null | recipes/thesis_experiments_fsn/leakage_removal/fullsubnet_aec/trainer.py | wimmerb/SpeechEnhancers | 6b4bb708eb25901056615880d4e95d5fc5add48b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import torch
from torch.cuda.amp import autocast
from tqdm import tqdm
import numpy as np
from audio_zen.acoustics.feature import mag_phase, drop_band
from audio_zen.acoustics.mask import build_complex_ideal_ratio_mask, decompress_cIRM
from audio_zen.trainer.base_trainer import BaseTrai... | 38.368182 | 152 | 0.582277 |
ac1a0c79aaa8f16044d47dca586de0673ec8f855 | 2,197 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/privacy_value_allow_users.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/privacy_value_allow_users.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/privacy_value_allow_users.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram 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 Free... | 31.84058 | 103 | 0.625853 |
ac1a86271033e79e2bc909f522a6233b6032e22f | 2,151 | py | Python | src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/commands.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/commands.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/commands.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2017-12-28T04:51:44.000Z | 2017-12-28T04:51:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 65.181818 | 98 | 0.700604 |
ac1a8b323b9d2d5ad893ec52e4ad080fd6a31aef | 11,508 | py | Python | fedml_experiments/distributed/fedgkt/main_fedgkt.py | Little0o0/FedML | 720015c90fcfec88d465a81b1e8fb45676dce9fb | [
"Apache-2.0"
] | 1 | 2022-03-23T06:35:31.000Z | 2022-03-23T06:35:31.000Z | fedml_experiments/distributed/fedgkt/main_fedgkt.py | Little0o0/FedML | 720015c90fcfec88d465a81b1e8fb45676dce9fb | [
"Apache-2.0"
] | null | null | null | fedml_experiments/distributed/fedgkt/main_fedgkt.py | Little0o0/FedML | 720015c90fcfec88d465a81b1e8fb45676dce9fb | [
"Apache-2.0"
] | 1 | 2021-12-16T12:01:28.000Z | 2021-12-16T12:01:28.000Z | import argparse
import logging
import os
import socket
import sys
import numpy as np
import psutil
import setproctitle
import torch
import wandb
from mpi4py import MPI
# add the FedML root directory to the python path
sys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), "../../../")))
from fedml_api.data_pre... | 44.261538 | 120 | 0.67553 |
ac1ab91ce2d4d423e6575f67973872abe18b40b0 | 8,014 | py | Python | glance_store/tests/unit/test_connection_manager.py | cloudify-ro/glance_store | 032b57a6afb34152636eb33991abf6f811a5cf18 | [
"Apache-2.0"
] | 49 | 2015-01-01T17:49:15.000Z | 2021-01-12T07:08:58.000Z | glance_store/tests/unit/test_connection_manager.py | cloudify-ro/glance_store | 032b57a6afb34152636eb33991abf6f811a5cf18 | [
"Apache-2.0"
] | 1 | 2021-05-09T06:13:17.000Z | 2021-05-09T06:13:18.000Z | glance_store/tests/unit/test_connection_manager.py | cloudify-ro/glance_store | 032b57a6afb34152636eb33991abf6f811a5cf18 | [
"Apache-2.0"
] | 50 | 2015-01-23T18:21:06.000Z | 2021-11-23T04:42:25.000Z | # Copyright 2014 OpenStack Foundation
# 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 requ... | 43.79235 | 79 | 0.65448 |
ac1abfbacc2348fd3d9d998c74ada40d778d780f | 603 | py | Python | ssdp_scan.py | jgstroud/ssdp_proxy | 9cbee1520dbe05ea7f0029b7f569d0e71d68b0de | [
"MIT"
] | null | null | null | ssdp_scan.py | jgstroud/ssdp_proxy | 9cbee1520dbe05ea7f0029b7f569d0e71d68b0de | [
"MIT"
] | null | null | null | ssdp_scan.py | jgstroud/ssdp_proxy | 9cbee1520dbe05ea7f0029b7f569d0e71d68b0de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import socket
msg = \
'M-SEARCH * HTTP/1.1\r\n' \
'HOST:239.255.255.250:1900\r\n' \
'ST:upnp:rootdevice\r\n' \
'MX:2\r\n' \
'MAN:"ssdp:discover"\r\n' \
'\r\n'
# Set up UDP socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
s.setsockopt(socket.... | 23.192308 | 72 | 0.625207 |
ac1ac2cce777d72228d920b7d4b95fbfeb443ea0 | 752 | py | Python | db/rmq_utils.py | zhvnibek/atty | a1e7f0a3c13d0a03913cf2da6056e5dacd94a44f | [
"MIT"
] | null | null | null | db/rmq_utils.py | zhvnibek/atty | a1e7f0a3c13d0a03913cf2da6056e5dacd94a44f | [
"MIT"
] | 7 | 2019-12-16T22:18:36.000Z | 2022-02-10T00:33:02.000Z | db/rmq_utils.py | zhvnibek/atty | a1e7f0a3c13d0a03913cf2da6056e5dacd94a44f | [
"MIT"
] | null | null | null | import pika
from conf import RMQ_HOST, RMQ_PORT, RMQ_USER, RMQ_PASSWORD
from conf import get_logger
logger = get_logger("rmq_utils")
params = pika.ConnectionParameters(
host=RMQ_HOST,
port=int(RMQ_PORT),
credentials=pika.credentials.PlainCredentials(RMQ_USER, RMQ_PASSWORD),
# heartbeat_interval=int(rm... | 30.08 | 100 | 0.761968 |
ac1acee051ba9c5cfbb7e0cec5a335b4978484a5 | 1,258 | py | Python | wizard_builder/migrations/0039_dropdown_proxy.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 16 | 2016-06-21T04:05:24.000Z | 2017-09-26T15:40:24.000Z | wizard_builder/migrations/0039_dropdown_proxy.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 141 | 2016-06-21T20:46:46.000Z | 2017-09-28T00:20:49.000Z | wizard_builder/migrations/0039_dropdown_proxy.py | project-callisto/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 7 | 2017-10-04T22:52:18.000Z | 2018-05-31T17:14:39.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-28 06:13
from __future__ import unicode_literals
import wizard_builder.model_helpers
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wizard_builder', '0038_checkbox_radiobutton'),
]
... | 26.765957 | 59 | 0.460254 |
ac1b07cfacfbd6ee427d762b7a662e6c3040d7c5 | 2,329 | py | Python | c_grid_motivation/plot_domain.py | OceanParcels/parcels_cgrid_interpolation_schemes | 1a699001e4eebf2ba7de39592081ec829358a876 | [
"MIT"
] | null | null | null | c_grid_motivation/plot_domain.py | OceanParcels/parcels_cgrid_interpolation_schemes | 1a699001e4eebf2ba7de39592081ec829358a876 | [
"MIT"
] | null | null | null | c_grid_motivation/plot_domain.py | OceanParcels/parcels_cgrid_interpolation_schemes | 1a699001e4eebf2ba7de39592081ec829358a876 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
def plot_domain(fset_type, only_axes=False):
fig = plt.figure(figsize=(5, 5), dpi=300, facecolor='w', edgecolor='k')
# axes
ax1 = plt.axes(frameon=False)
ax1.axes.get_yaxis().set_visible(False)
ax1.axes.get_xaxis().set_visible(False)
plt.plot([-1.05, 1.05], [0... | 43.943396 | 122 | 0.470159 |
ac1b2a14168b23c7bf51cf14020f6e4ceee2312c | 19,594 | py | Python | collections/ansible_collections/community/general/plugins/modules/net_tools/dnsimple.py | escalate/my-smart-home | a9579c845761b980515ff34d2a95568c6e7c2b6c | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | ansible_collections/community/general/plugins/modules/net_tools/dnsimple.py | zenmerlin/ansible-workstation-configs | a44f7816344a3d82e94050ff7c3a8edb9c054b37 | [
"MIT"
] | 1 | 2022-03-12T02:25:26.000Z | 2022-03-12T02:25:26.000Z | ansible_collections/community/general/plugins/modules/net_tools/dnsimple.py | zenmerlin/ansible-workstation-configs | a44f7816344a3d82e94050ff7c3a8edb9c054b37 | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: Ansible Project
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: dnsimple
short_description: Int... | 37.89942 | 144 | 0.601051 |
ac1b35d420bed5b14239d499d16df2c1363982c4 | 7,213 | py | Python | usaspending_api/etl/management/commands/load_budget_authority.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | usaspending_api/etl/management/commands/load_budget_authority.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | 1 | 2021-11-15T17:54:12.000Z | 2021-11-15T17:54:12.000Z | usaspending_api/etl/management/commands/load_budget_authority.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | null | null | null | import csv
import glob
import logging
import os.path
from argparse import ArgumentTypeError
from collections import defaultdict
from datetime import date
from django.core.management.base import BaseCommand
from xlrd import open_workbook
from usaspending_api.accounts.models import BudgetAuthority
from usaspending_api.... | 39.850829 | 155 | 0.629696 |
ac1b4e89d7da63e49245726264abf6c917023d5c | 305 | py | Python | tests/test_entry_points.py | ambv/retype | 53ea14012ec8a7190cb2aa335e855a79f51e71b6 | [
"MIT"
] | 127 | 2017-03-13T19:27:02.000Z | 2022-03-26T01:28:23.000Z | tests/test_entry_points.py | gaborbernat/retype | 53ea14012ec8a7190cb2aa335e855a79f51e71b6 | [
"MIT"
] | 23 | 2017-06-07T14:59:54.000Z | 2021-12-03T02:14:01.000Z | tests/test_entry_points.py | ambv/retype | 53ea14012ec8a7190cb2aa335e855a79f51e71b6 | [
"MIT"
] | 20 | 2017-06-08T11:46:22.000Z | 2021-10-04T09:14:38.000Z | from __future__ import annotations
import subprocess
import sys
from pathlib import Path
def test_has_module_access():
subprocess.check_call([sys.executable, "-m", "retype", "--help"])
def test_has_script_call():
subprocess.check_call([str(Path(sys.executable).parent / "retype"), "--help"])
| 21.785714 | 82 | 0.737705 |
ac1b614e2c738a95d21c24792b9588784bfb8424 | 699 | py | Python | supriya/ugens/QuadL.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/QuadL.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/QuadL.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya import CalculationRate
from supriya.synthdefs import UGen
class QuadL(UGen):
"""
A linear-interpolating general quadratic map chaotic generator.
::
>>> quad_l = supriya.ugens.QuadL.ar(
... a=1,
... b=-1,
... c=-0.75,
..... | 20.558824 | 76 | 0.530758 |
ac1b97232600bfd5bee9fb88d53b98cb7516d2b4 | 4,695 | py | Python | tbonlineproject/post/templatetags/posttags.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | null | null | null | tbonlineproject/post/templatetags/posttags.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | 3 | 2021-06-08T23:57:13.000Z | 2022-01-13T03:42:01.000Z | tbonlineproject/post/templatetags/posttags.py | nathangeffen/tbonline-2 | 0d5869197e66a0057fa07cb99f21dde7f5b47c30 | [
"MIT"
] | null | null | null | import re
import tagging.utils
from django import template
from django.contrib.contenttypes.models import ContentType
from django.contrib.comments.models import Comment
from tagging.models import Tag
from post.models import BasicPost, EditorChoice, PostWithImage, PostWithSimpleImage, PostWithSlideshow, PostWithEmbedd... | 30.096154 | 126 | 0.68754 |
ac1bbbf46c5165735b09ab1e9ad059feb085e6a6 | 1,161 | py | Python | pandaharvester/harvestercore/diag_spec.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 11 | 2017-06-01T10:16:58.000Z | 2019-11-22T08:41:36.000Z | pandaharvester/harvestercore/diag_spec.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 34 | 2016-10-25T19:15:24.000Z | 2021-03-05T12:59:04.000Z | pandaharvester/harvestercore/diag_spec.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 17 | 2016-10-24T13:29:45.000Z | 2021-03-23T17:35:27.000Z | """
dialog class
"""
import datetime
from .spec_base import SpecBase
class DiagSpec(SpecBase):
# attributes
attributesWithTypes = ('diagID:integer primary key autoincrement',
'moduleName:text / index',
'identifier:text',
'creat... | 29.025 | 70 | 0.461671 |
ac1bbdd66de88ae599ae00746d46325709de58c1 | 10,045 | py | Python | cloudpassage/server.py | joshuaguite/cloudpassage-halo-python-sdk | ab8775377c9e99ed89d335ee44a92553fce49eb7 | [
"BSD-3-Clause"
] | null | null | null | cloudpassage/server.py | joshuaguite/cloudpassage-halo-python-sdk | ab8775377c9e99ed89d335ee44a92553fce49eb7 | [
"BSD-3-Clause"
] | null | null | null | cloudpassage/server.py | joshuaguite/cloudpassage-halo-python-sdk | ab8775377c9e99ed89d335ee44a92553fce49eb7 | [
"BSD-3-Clause"
] | null | null | null | """Server class"""
import re
import cloudpassage.sanity as sanity
from .utility import Utility as utility
from .http_helper import HttpHelper
class Server(object):
"""Initializing the Server class:
Args:
session (:class:`cloudpassage.HaloSession`): This will define how you
interact with ... | 30.256024 | 79 | 0.574017 |
ac1bc9bf26a7b1ea6793bc48e195935658465650 | 3,486 | py | Python | src/ui.py | ryanbender2/a-gamers-script | 5cf5b537afe35189a183ea84cef765faded96d90 | [
"MIT"
] | null | null | null | src/ui.py | ryanbender2/a-gamers-script | 5cf5b537afe35189a183ea84cef765faded96d90 | [
"MIT"
] | 1 | 2022-02-04T03:32:15.000Z | 2022-02-04T18:53:03.000Z | src/ui.py | ryanbender2/a-gamers-script | 5cf5b537afe35189a183ea84cef765faded96d90 | [
"MIT"
] | null | null | null | import tkinter as tk
from PIL.ImageTk import PhotoImage
from PIL import Image
import os
class AGamersScriptUI(tk.Frame):
"""A super awesome GUI for AGamersScript!"""
def __init__(self) -> None:
self.root = tk.Tk()
super().__init__(self.root)
self.pack()
self.app_width ... | 36.3125 | 142 | 0.626793 |
ac1bceeaf4677aa83d9155c0365b89c04fd71639 | 3,092 | py | Python | devito/tools/validators.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 11 | 2019-07-18T11:15:12.000Z | 2021-09-14T02:20:52.000Z | devito/tools/validators.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 1 | 2019-11-06T18:01:25.000Z | 2019-11-06T18:01:25.000Z | devito/tools/validators.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 3 | 2020-02-15T14:23:29.000Z | 2021-02-04T01:51:02.000Z | from decorator import decorator
__all__ = ['validate_type']
class validate_base(object):
"""
Decorator to validate arguments.
Formal parameters that don't exist in the definition of the function
being decorated as well as actual arguments not being present when
the validation is called are sile... | 34.355556 | 78 | 0.594114 |
ac1c2b671736489a06d77368b8a27abc14e2e0d3 | 25,000 | py | Python | molpy/group.py | Roy-Kid/molpy | 08e7985b21fabaf78e9064a25ed80759eb373465 | [
"BSD-3-Clause"
] | 6 | 2021-11-04T12:28:44.000Z | 2021-12-22T13:49:52.000Z | molpy/group.py | Roy-Kid/molpy | 08e7985b21fabaf78e9064a25ed80759eb373465 | [
"BSD-3-Clause"
] | 2 | 2021-11-26T12:06:24.000Z | 2021-11-28T11:03:11.000Z | molpy/group.py | Roy-Kid/molpy | 08e7985b21fabaf78e9064a25ed80759eb373465 | [
"BSD-3-Clause"
] | 4 | 2021-11-04T10:36:51.000Z | 2021-12-17T11:58:47.000Z | # author: Roy Kid
# contact: lijichen365@126.com
# date: 2021-10-17
# version: 0.0.1
from typing import Literal, Iterable
from molpy.angle import Angle
from molpy.base import Graph
from molpy.atom import Atom
from molpy.bond import Bond
import numpy as np
from itertools import dropwhile, combinations
from molpy.dihed... | 32.938076 | 286 | 0.51488 |
ac1c430a209e669f4003863d671093196207491c | 3,283 | py | Python | ufora/FORA/Axioms/TupleMatchStructureAxiom_test.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/FORA/Axioms/TupleMatchStructureAxiom_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/FORA/Axioms/TupleMatchStructureAxiom_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora 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... | 39.554217 | 143 | 0.678343 |
ac1c5abe7f6a1e170a802aed99295931c3efa0ff | 2,203 | py | Python | test/test_es_health.py | City-of-Helsinki/unified-search | 726d53f28106579dbaec61ad76b03e2d12737a0f | [
"MIT"
] | null | null | null | test/test_es_health.py | City-of-Helsinki/unified-search | 726d53f28106579dbaec61ad76b03e2d12737a0f | [
"MIT"
] | 31 | 2021-06-08T21:57:02.000Z | 2022-03-23T10:45:36.000Z | test/test_es_health.py | City-of-Helsinki/unified-search | 726d53f28106579dbaec61ad76b03e2d12737a0f | [
"MIT"
] | null | null | null | import logging
import requests
import json
import time
from elasticsearch import exceptions
from elasticsearch import Elasticsearch
""" Running:
pytest
or with full log output:
pytest --log-cli-level=debug
"""
logging.basicConfig(
filename="test_es_health.log",
format="%(filename)s: %(... | 25.321839 | 86 | 0.582388 |
ac1c6b4194c1ba1f104f46e99713553aa208daa4 | 4,423 | py | Python | usecase-3/kms_key_creation-Step-1.py | simonsays881/data-protection | 390551984f7da2f7ec8aed65578b79c7059e476b | [
"MIT-0"
] | null | null | null | usecase-3/kms_key_creation-Step-1.py | simonsays881/data-protection | 390551984f7da2f7ec8aed65578b79c7059e476b | [
"MIT-0"
] | null | null | null | usecase-3/kms_key_creation-Step-1.py | simonsays881/data-protection | 390551984f7da2f7ec8aed65578b79c7059e476b | [
"MIT-0"
] | null | null | null | """
##########################################################
# Create KMS key with alias kms_key_cse_usecase_3 #
##########################################################
"""
import subprocess
import sys
import json
import boto3
def main():
"""
########################################################... | 30.715278 | 123 | 0.414651 |
ac1c8e5a41a6726d260106feaa2238309934a504 | 1,079 | py | Python | finder.py | benihime91/leaf-disease-classification-kaggle | e1c8b1c6b88fe199a09e9d956db7b9baa3fb9dcc | [
"MIT"
] | null | null | null | finder.py | benihime91/leaf-disease-classification-kaggle | e1c8b1c6b88fe199a09e9d956db7b9baa3fb9dcc | [
"MIT"
] | null | null | null | finder.py | benihime91/leaf-disease-classification-kaggle | e1c8b1c6b88fe199a09e9d956db7b9baa3fb9dcc | [
"MIT"
] | 3 | 2020-12-14T04:22:31.000Z | 2021-04-22T19:40:34.000Z | import logging
import os
import warnings
import hydra
from hydra.utils import instantiate
from omegaconf import DictConfig, OmegaConf
from src import _logger as logger
from src.core import seed_everything
from src.models import Task
warnings.filterwarnings("ignore")
OmegaConf.register_resolver("eval", lambda x: eval... | 25.690476 | 69 | 0.728452 |
ac1cae9d96b1f9e124cd5b0e49bbf0b123eac4ac | 4,585 | py | Python | tests/examples/ex_multi_page.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/examples/ex_multi_page.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/examples/ex_multi_page.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | """Example Multi Page Applet."""
import dash_bootstrap_components as dbc
import plotly.express as px
from dash import dcc, html
from implements import implements
from dash_charts.utils_app import AppBase, AppInterface
from dash_charts.utils_app_with_navigation import AppMultiPage
from dash_charts.utils_fig import min... | 28.302469 | 120 | 0.569902 |
ac1cc1ea648cb537e07c5bf2c84c90dd0d433c66 | 4,366 | py | Python | performance/driver/core/fsm.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 2 | 2018-02-27T18:21:21.000Z | 2018-03-16T12:12:12.000Z | performance/driver/core/fsm.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2018-06-25T07:14:41.000Z | 2018-06-25T07:14:41.000Z | performance/driver/core/fsm.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2020-06-25T10:37:21.000Z | 2020-06-25T10:37:21.000Z | import inspect
import logging
import time
from threading import Condition, Lock
from queue import Queue, Empty
class State:
"""
A Finite State Machine state handler
"""
def __init__(self, fsm):
self._fsm = fsm
def onEnter(self):
"""
Placehodler function if the user has no enter event handler
... | 25.383721 | 74 | 0.648878 |
ac1cc4441f42c2918057b1ca429c108a5c61dd28 | 2,437 | py | Python | venv/Lib/site-packages/pyrogram/types/input_media/input_media_photo.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/types/input_media/input_media_photo.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/types/input_media/input_media_photo.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram 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 Free... | 41.305085 | 112 | 0.684448 |
ac1ccf2feb44bdb958736833f13b9f2fefc31858 | 27,332 | py | Python | tensorflow/lstm/rnn_cell.py | DL-Benchmarks/DL-Benchmarks | 86db33854f64245b0dd55b92e9a8eed6403f6c58 | [
"MIT",
"BSD-3-Clause"
] | 82 | 2016-05-04T04:20:22.000Z | 2021-06-09T11:47:18.000Z | tensorflow/lstm/rnn_cell.py | lukas-schott/DL-Benchmarks | 86db33854f64245b0dd55b92e9a8eed6403f6c58 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | tensorflow/lstm/rnn_cell.py | lukas-schott/DL-Benchmarks | 86db33854f64245b0dd55b92e9a8eed6403f6c58 | [
"MIT",
"BSD-3-Clause"
] | 31 | 2016-04-29T06:00:09.000Z | 2021-01-30T15:52:19.000Z | # This source code is from TensorFlow project
# https://github.com/tensorflow/tensorflow
# Copyright (c) 2015 Google Inc. All Rights Reserved.
# This source code is licensed under the Apache-2.0 license found in the
# 3rd-party-licenses.txt file in the root directory of this source tree.
# The original code was modi... | 35.634941 | 80 | 0.678106 |
ac1cf19b5e2ed8e6a53c47518d2218b84ae08e8a | 211 | py | Python | src/Application/PythonScriptModule/pymodules_old/circuits/drivers/__init__.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2018-04-02T15:38:10.000Z | 2018-04-02T15:38:10.000Z | src/Application/PythonScriptModule/pymodules_old/circuits/drivers/__init__.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/circuits/drivers/__init__.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z | # Package: drivers
# Date: 1st February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Drivers
This package contains drivers for other sources of events and foreign systems.
"""
| 23.444444 | 78 | 0.734597 |
ac1d5d051784893dd49712139856b9febe9bcf91 | 6,724 | py | Python | nova/tests/unit/virt/hyperv/test_livemigrationops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/hyperv/test_livemigrationops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/hyperv/test_livemigrationops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright 2014 Cloudbase Solutions Srl
# 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 r... | 48.028571 | 78 | 0.663147 |
ac1d8062e21783ab80b475f809aa4d006974dfc5 | 13,558 | py | Python | fit/datamodules/tomo_rec/TRecDataModule.py | ashesh-0/FourierImageTransformer | 2b75263cacbc1581d27fefa0ac7167f5791df99d | [
"BSD-3-Clause"
] | null | null | null | fit/datamodules/tomo_rec/TRecDataModule.py | ashesh-0/FourierImageTransformer | 2b75263cacbc1581d27fefa0ac7167f5791df99d | [
"BSD-3-Clause"
] | null | null | null | fit/datamodules/tomo_rec/TRecDataModule.py | ashesh-0/FourierImageTransformer | 2b75263cacbc1581d27fefa0ac7167f5791df99d | [
"BSD-3-Clause"
] | null | null | null | from os.path import exists, join
from typing import List, Optional, Union
import dival
import numpy as np
import torch
import wget
from fit.datamodules.GroundTruthDatasetFactory import GroundTruthDatasetFactory
from fit.datamodules.tomo_rec.TRecFCDataset import \
TRecFourierCoefficientDataset
from fit.utils.utils ... | 45.043189 | 120 | 0.596622 |
ac1db4b46cbf8264ee4a72a1cd2df9e7ba7c8dfa | 1,433 | py | Python | scielomanager/scielomanager/celery.py | patymori/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 8 | 2015-07-07T03:09:16.000Z | 2019-03-16T04:46:32.000Z | scielomanager/scielomanager/celery.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 245 | 2015-01-14T13:29:58.000Z | 2022-01-13T00:48:44.000Z | scielomanager/scielomanager/celery.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 5 | 2016-02-19T15:47:08.000Z | 2019-03-16T04:46:20.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'scielomanager.settings')
app = Celery('scielomanager', broker='djan... | 28.66 | 89 | 0.705513 |
ac1dc48757d19ce07f7f5cd0c0498bc1755a8451 | 8,061 | py | Python | tests/test_forint.py | fscm/multicurrency | 5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91 | [
"MIT"
] | 2 | 2021-03-26T18:19:57.000Z | 2021-07-27T01:15:50.000Z | tests/test_forint.py | fscm/multicurrency | 5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91 | [
"MIT"
] | null | null | null | tests/test_forint.py | fscm/multicurrency | 5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
#
# copyright: 2020-2022, Frederico Martins
# author: Frederico Martins <http://github.com/fscm>
# license: SPDX-License-Identifier: MIT
"""Tests for the Forint currency representation(s)."""
from decimal import Context
from pytest import raises
from multicurrency import Currency
from multicur... | 35.200873 | 79 | 0.539015 |
ac1e114b71734be5de145a37aa671efd7ed385d8 | 1,305 | py | Python | flask_swagger_generator/specifiers/swagger_version.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 2 | 2021-09-02T09:54:58.000Z | 2022-02-10T01:23:20.000Z | flask_swagger_generator/specifiers/swagger_version.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 3 | 2020-12-28T18:57:37.000Z | 2021-07-25T11:14:32.000Z | flask_swagger_generator/specifiers/swagger_version.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 2 | 2021-09-02T09:55:04.000Z | 2021-09-29T12:19:17.000Z | from enum import Enum
from flask_swagger_generator.exceptions import SwaggerGeneratorException
class SwaggerVersion(Enum):
"""
Class SwaggerVersion: Enum for types of swagger version
"""
VERSION_THREE = 'VERSION_THREE'
VERSION_TWO = 'VERSION_TWO'
@staticmethod
def from_string(value: str)... | 28.369565 | 77 | 0.56705 |
ac1e1dbf708a355212f585003372f9ff283f4447 | 3,579 | py | Python | leetcode_python/Greedy/gas-station.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Greedy/gas-station.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Greedy/gas-station.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# IDEA : GREEDY
class Solution:
def canCompleteCircuit(self, gas, cost):
start, sum_ = 0, 0
for i in range(len(gas)):
sum_ += gas[i] - cost[i]
if sum_ < 0:
start, sum_ = i+1, 0
return start if sum(gas) - sum(cost) >= 0 else -1
# V0'
class Sol... | 31.955357 | 85 | 0.533948 |
ac1e3e62333348df44511b58c6e7d2663ae71f6c | 1,046 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_NL.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_NL.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_NL.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. NL metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_NL = PhoneMetadata(id='NL', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[1349]\\d{2,5}', possible_length=(3... | 87.166667 | 215 | 0.728489 |
ac1e72535eaf7db3b22efa8159785db13b037597 | 1,591 | py | Python | wheelchair/api/database/update.py | vd2org/wheelchair | 94f833a0f977a94547d1783d57ca7ed61db870b6 | [
"MIT"
] | 3 | 2020-06-17T07:59:08.000Z | 2020-07-05T08:59:11.000Z | wheelchair/api/database/update.py | vd2org/wheelchair | 94f833a0f977a94547d1783d57ca7ed61db870b6 | [
"MIT"
] | null | null | null | wheelchair/api/database/update.py | vd2org/wheelchair | 94f833a0f977a94547d1783d57ca7ed61db870b6 | [
"MIT"
] | null | null | null | # Copyright (C) 2019-2021 by Vd.
# This file is part of Wheelchair, the async CouchDB connector.
# Wheelchair is released under the MIT License (see LICENSE).
from typing import Any, Optional
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .design import Design
class UpdateProxy:
def __init__(self,... | 30.018868 | 103 | 0.649277 |
ac1e85e7aedb1c5ea08e766ca8eba2362db1c7fb | 3,281 | py | Python | filterdesigner/IIRDesign/_ellipord.py | Yuki-F-HCU/filterdesigner | bb735d507da0338b2925f84e54df091ce1c32f95 | [
"BSD-3-Clause"
] | null | null | null | filterdesigner/IIRDesign/_ellipord.py | Yuki-F-HCU/filterdesigner | bb735d507da0338b2925f84e54df091ce1c32f95 | [
"BSD-3-Clause"
] | null | null | null | filterdesigner/IIRDesign/_ellipord.py | Yuki-F-HCU/filterdesigner | bb735d507da0338b2925f84e54df091ce1c32f95 | [
"BSD-3-Clause"
] | null | null | null | import scipy.signal as signal
from typing import List, Tuple
import numpy as np
def ellipord(Wp, Ws, Rp:float, Rs:float, zs='z')->Tuple:
"""
Elliptic (Cauer) filter order selection.
Return the order of the lowest order digital or analog elliptic filter that
loses no more than Rp dB in t... | 34.904255 | 81 | 0.558366 |
ac1e86f23066a026942f5403246abaf21282ce97 | 3,271 | py | Python | pipeline/metadata/test_ip_metadata.py | Jigsaw-Code/censoredplanet-analysis | 72a500c770bd1f72c33ac9e47197754b9ef16f87 | [
"Apache-2.0"
] | 6 | 2021-01-20T00:48:40.000Z | 2021-11-24T03:24:53.000Z | pipeline/metadata/test_ip_metadata.py | Jigsaw-Code/censoredplanet-analysis | 72a500c770bd1f72c33ac9e47197754b9ef16f87 | [
"Apache-2.0"
] | 3 | 2021-02-19T22:18:08.000Z | 2021-03-08T21:40:19.000Z | pipeline/metadata/test_ip_metadata.py | Jigsaw-Code/censoredplanet-analysis | 72a500c770bd1f72c33ac9e47197754b9ef16f87 | [
"Apache-2.0"
] | 5 | 2020-12-08T19:40:50.000Z | 2021-07-29T06:56:36.000Z | # Copyright 2020 Jigsaw Operations 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 to i... | 35.554348 | 86 | 0.672883 |
ac1e9752664b2e49d14a9f0f73e4a059fc6b1343 | 4,599 | py | Python | modelscript/interfaces/modelc/execution.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/interfaces/modelc/execution.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2015-12-18T10:30:02.000Z | 2015-12-18T10:36:28.000Z | modelscript/interfaces/modelc/execution.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
""""""
__all__ = (
'ExecutionContext'
)
import os
from typing import List, Any, Dict, Optional, ClassVar
from collections import OrderedDict
import argparse
# initialize the megamodel with metamodels and scripts
from modelscript.base.files import filesInTree
from modelscript.interfaces.modelc.opt... | 32.387324 | 75 | 0.589693 |
ac1ebebe5be29e24321f70d0d58605fa675be541 | 4,256 | py | Python | Python/LPFEncoder.py | rice-bioe/Iris | 38bf5f717bc4de3c62c8a1af955de2de755a6791 | [
"BSD-3-Clause"
] | null | null | null | Python/LPFEncoder.py | rice-bioe/Iris | 38bf5f717bc4de3c62c8a1af955de2de755a6791 | [
"BSD-3-Clause"
] | null | null | null | Python/LPFEncoder.py | rice-bioe/Iris | 38bf5f717bc4de3c62c8a1af955de2de755a6791 | [
"BSD-3-Clause"
] | null | null | null | class LPFEncoder():
'''Represents the overall device, containing all device metadata (rows,
cols, etc.), and an intensity matrix corresponding to each well and
channel for each time point.
REQUIRES: Numpy
Input parameters:
gsVals [Required]: Numpy array of intensities for each timestep in each
channel,... | 41.320388 | 94 | 0.709821 |
ac1ed3acc7f3770ea6dc6db67fc9e1d5f6873f1b | 1,293 | py | Python | amatino/tests/derived/ledger.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 2 | 2018-07-20T20:00:33.000Z | 2020-10-08T15:49:06.000Z | amatino/tests/derived/ledger.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 1 | 2020-05-21T02:49:29.000Z | 2020-05-21T02:49:29.000Z | amatino/tests/derived/ledger.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 3 | 2018-09-03T09:31:31.000Z | 2020-05-21T05:30:00.000Z | """
Amatino API Python Bindings
Ledger Test Module
Author: hugh@amatino.io
"""
from amatino.tests.primary.transaction import TransactionTest
from amatino import Ledger
from decimal import Decimal
from amatino import LedgerRow
NAME = 'Retrieve a Ledger'
class LedgerTest(TransactionTest):
"""Test the Ledger object... | 25.352941 | 68 | 0.627997 |
ac1f35b6077c262a5aebd45f71f8a4a76633fec2 | 1,416 | py | Python | setup.py | fabaff/past-time | 5b0e8db377f2d51e8a1d1eb83298ac5e07d07f46 | [
"MIT"
] | 1 | 2021-04-02T17:21:29.000Z | 2021-04-02T17:21:29.000Z | setup.py | fabaff/past-time | 5b0e8db377f2d51e8a1d1eb83298ac5e07d07f46 | [
"MIT"
] | null | null | null | setup.py | fabaff/past-time | 5b0e8db377f2d51e8a1d1eb83298ac5e07d07f46 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Set up past time."""
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
set... | 30.782609 | 77 | 0.637006 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.