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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d86df41dac46bcc1b60270ba859c753e62eaca5 | 207 | py | Python | python/sendtimeserial.py | Syralist/myletterclock | 9181b290088ad2d8d41e9e8b0c7c9ef138c3efed | [
"MIT"
] | null | null | null | python/sendtimeserial.py | Syralist/myletterclock | 9181b290088ad2d8d41e9e8b0c7c9ef138c3efed | [
"MIT"
] | 2 | 2015-11-10T09:42:16.000Z | 2015-11-10T09:44:17.000Z | python/sendtimeserial.py | Syralist/myletterclock | 9181b290088ad2d8d41e9e8b0c7c9ef138c3efed | [
"MIT"
] | null | null | null | import serial
import subprocess
ardu = serial.Serial('/dev/ttyUSB0',9600)
proc = subprocess.check_output("date +T%s", shell=True)
print "program output:", proc
# ardu.write('T1428413847\n')
ardu.write(proc)
| 25.875 | 55 | 0.748792 |
2d86e60ff34c5331711ceb66a055eb67478919dc | 3,109 | py | Python | salt/modules/pecl.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/modules/pecl.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/pecl.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
'''
Manage PHP pecl extensions.
'''
# Import python libs
import re
import logging
# Import salt libs
import salt.utils
__func_alias__ = {
'list_': 'list'
}
log = logging.getLogger(__name__)
def __virtual__():
return True if salt.utils.which('pecl') else False
def _pecl(command, d... | 22.207143 | 79 | 0.59183 |
2d86ebfca479eac24daf088b2c85b5ff6d259380 | 1,013 | py | Python | textwiser/embeddings/use.py | vishalbelsare/textwiser | da500f24c8d35d29e3ff77702b7c5ece244562cc | [
"Apache-2.0"
] | 24 | 2020-07-02T13:31:46.000Z | 2022-03-25T02:27:24.000Z | textwiser/embeddings/use.py | fmr-llc/textwiser | 2c5bdd73c26bd3fb7bd2f324f57d99233aa9c17f | [
"Apache-2.0"
] | 5 | 2020-07-23T16:43:02.000Z | 2022-02-23T17:05:38.000Z | textwiser/embeddings/use.py | fmr-llc/textwiser | 2c5bdd73c26bd3fb7bd2f324f57d99233aa9c17f | [
"Apache-2.0"
] | 6 | 2021-01-03T08:09:39.000Z | 2022-03-25T02:18:59.000Z | # Copyright 2019 FMR LLC <opensource@fidelity.com>
# SPDX-License-Identifer: Apache-2.0
from textwiser.base import BaseFeaturizer
from textwiser.utils import Constants
try:
import tensorflow as tf
import tensorflow_hub as hub
except ModuleNotFoundError:
pass
class _USEEmbeddings(BaseFeaturizer):
def... | 32.677419 | 148 | 0.694965 |
2d871faf97a26aba00b3a238c07b40c895d392c8 | 1,283 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/fona_sms.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/fona_sms.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 8 | 2020-05-06T15:29:40.000Z | 2021-09-27T16:44:23.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/fona_sms.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
# pylint: disable=unused-import
import time
import board
import busio
import digitalio
from adafruit_fona.adafruit_fona import FONA, FONA_3G_A, FONA_3G_E
from adafruit_fona.fona_3g import FONA3G
print("FONA SMS")
# Create a... | 25.66 | 66 | 0.737334 |
2d87483c3dc6df4068248938c87a1f2f4c953be9 | 5,412 | py | Python | tests/pgm/test_cmod.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | tests/pgm/test_cmod.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | tests/pgm/test_cmod.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | from __future__ import division
from builtins import object
import numpy as np
from sporco.pgm import cmod
from sporco.pgm.momentum import MomentumLinear, MomentumGenLinear
from sporco.pgm.stepsize import StepSizePolicyBB, StepSizePolicyCauchy
class TestSet01(object):
def setup_method(self, method):
n... | 27.896907 | 79 | 0.453806 |
2d874b4806c9e1449a170017440c4b5038ff93bf | 66,358 | py | Python | python/paddle/fluid/layers/tensor.py | randytli/Paddle | 75dadd586996c71cf5b088b6141b94705561773f | [
"Apache-2.0"
] | 1 | 2020-05-27T05:21:42.000Z | 2020-05-27T05:21:42.000Z | python/paddle/fluid/layers/tensor.py | randytli/Paddle | 75dadd586996c71cf5b088b6141b94705561773f | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/layers/tensor.py | randytli/Paddle | 75dadd586996c71cf5b088b6141b94705561773f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unlessf required by ap... | 38.513059 | 153 | 0.570692 |
2d8765ec3fe306691757ac7d974820f67c3ee68e | 9,468 | py | Python | pyKinectTools/scripts/Old_Experiments/PoseByPictorialStructures.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 33 | 2015-04-07T16:28:04.000Z | 2021-11-22T00:28:43.000Z | pyKinectTools/scripts/Old_Experiments/PoseByPictorialStructures.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pyKinectTools/scripts/Old_Experiments/PoseByPictorialStructures.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2015-04-07T16:28:34.000Z | 2021-04-26T08:04:36.000Z | import numpy as np
sys.path.append('/Users/colin/libs/visionTools/slic-python/')
import slic
from pyKinectTools.algs.SkeletonBeliefPropagation import *
from pyKinectTools.algs.GraphAlgs import *
# dists2Tot[dists2Tot>1000] = 1000
# im8bit = (d[objects[ind]]*mask_erode)
# im8bit = im8bit / np.ceil(im8bit.max()/256.0... | 36.137405 | 143 | 0.646388 |
2d878859777ec759a147b9985dad2525d14b073d | 1,666 | py | Python | config/wsgi.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | config/wsgi.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | config/wsgi.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | """
WSGI config for orderbook project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`... | 42.717949 | 79 | 0.803121 |
2d879e6f0739eab8863f67acea3fb83a87569c57 | 1,101 | py | Python | sdscli/func_utils.py | sdskit/sdscli | 9bb96e880c8251d1dce56b901c1289ed80f83ce7 | [
"Apache-2.0"
] | null | null | null | sdscli/func_utils.py | sdskit/sdscli | 9bb96e880c8251d1dce56b901c1289ed80f83ce7 | [
"Apache-2.0"
] | 24 | 2018-03-14T15:37:38.000Z | 2021-11-30T21:59:44.000Z | sdscli/func_utils.py | sdskit/sdscli | 9bb96e880c8251d1dce56b901c1289ed80f83ce7 | [
"Apache-2.0"
] | 13 | 2018-02-22T15:01:35.000Z | 2019-02-07T18:58:57.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from sdscli.log_utils import logger
from importlib import import_module
import logging
import argparse
import traceback
import yaml
import json
import importlib
import s... | 24.466667 | 70 | 0.707539 |
2d88618e4ae63f317ff7fdab02e914b21d3ffa61 | 940 | py | Python | tests/metaworlds/envs/test_occlusion_env.py | rlworkgroup/metaworlds | be03cfed9890a37b84283c597209b849e8a086cc | [
"MIT"
] | 5 | 2019-02-27T20:55:30.000Z | 2019-08-24T19:24:41.000Z | tests/metaworlds/envs/test_occlusion_env.py | rlworkgroup/metaworlds | be03cfed9890a37b84283c597209b849e8a086cc | [
"MIT"
] | 8 | 2019-02-28T04:07:10.000Z | 2020-01-02T10:54:10.000Z | tests/metaworlds/envs/test_occlusion_env.py | rlworkgroup/metaworlds | be03cfed9890a37b84283c597209b849e8a086cc | [
"MIT"
] | 1 | 2021-09-13T18:35:34.000Z | 2021-09-13T18:35:34.000Z | import pickle
import unittest
import numpy as np
from metaworlds.envs import PointEnv
from metaworlds.envs.occlusion_env import OcclusionEnv
from tests.helpers import step_env
class TestOcclusionEnv(unittest.TestCase):
def test_pickleable(self):
inner_env = PointEnv(goal=(1, 2))
env = OcclusionE... | 28.484848 | 66 | 0.654255 |
2d8866bd2b4c0460f9af5f88ce919bd2491859a3 | 8,341 | py | Python | VAE/model_maker.py | BensonRen/idlm_Ben | 0d83780232d6341575daf88792959542aef82132 | [
"MIT"
] | 3 | 2019-08-28T17:10:29.000Z | 2020-11-22T14:06:45.000Z | VAE/model_maker.py | BensonRen/idlm_Ben | 0d83780232d6341575daf88792959542aef82132 | [
"MIT"
] | 1 | 2019-11-03T12:02:43.000Z | 2019-11-20T02:04:36.000Z | VAE/model_maker.py | BensonRen/idlm_Ben | 0d83780232d6341575daf88792959542aef82132 | [
"MIT"
] | 2 | 2019-08-29T02:32:56.000Z | 2019-12-22T17:44:26.000Z | import tensorflow as tf
import numpy as np
from tensorflow.keras import backend as K
from tensorflow.keras.layers import Lambda, Input, Dense, concatenate
"""conv1d_tranpose function"""
def conv1d_transpose_wrap(value,
filter,
output_shape,
... | 52.459119 | 140 | 0.677856 |
2d88765d9a185b9a8b70af5926879f14415ac106 | 380 | py | Python | src/birdhouse_toolbox/library/wordpress/get_footer_html.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | src/birdhouse_toolbox/library/wordpress/get_footer_html.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | src/birdhouse_toolbox/library/wordpress/get_footer_html.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | def get_footer_html(html, opening_tag="<p>"):
opening_tag_start = html.rfind(opening_tag)
opening_tag_end = opening_tag_start + len(opening_tag)
closing_tag = opening_tag.replace("<", "</")
closing_tag_start = html.rfind(closing_tag)
closing_tag_end = closing_tag_start + len(closing_tag)
result ... | 42.222222 | 58 | 0.744737 |
2d888b5371c000094cec1fffc6d20b03363f5eb4 | 2,025 | py | Python | tests/test_downloader.py | kaggledatasets/kaggledatasets | 685d16590667443546f7ad2c31dfac8ad6be6ca2 | [
"Apache-2.0"
] | 48 | 2019-11-23T17:39:42.000Z | 2022-02-11T16:38:12.000Z | tests/test_downloader.py | kaggledatasets/kaggledatasets | 685d16590667443546f7ad2c31dfac8ad6be6ca2 | [
"Apache-2.0"
] | 5 | 2019-11-30T14:20:18.000Z | 2019-12-10T12:07:54.000Z | tests/test_downloader.py | kaggledatasets/kaggledatasets | 685d16590667443546f7ad2c31dfac8ad6be6ca2 | [
"Apache-2.0"
] | 6 | 2019-11-30T15:44:43.000Z | 2022-02-11T16:38:14.000Z | # Copyright 2019 Omkar Prabhu
#
# 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,... | 46.022727 | 94 | 0.724938 |
2d8892e4b84b5d31a52eb048f7a3b78ac6803c53 | 1,068 | py | Python | DeepLearning/DeepLearning/09_Deep_SongJW/ch4/train_neuralnet.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | 1 | 2019-06-27T04:05:59.000Z | 2019-06-27T04:05:59.000Z | DeepLearning/DeepLearning/09_Deep_SongJW/ch4/train_neuralnet.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | DeepLearning/DeepLearning/09_Deep_SongJW/ch4/train_neuralnet.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from dataset.mnist import load_mnist
from ch4.two_layer_net import TwoLayerNet
(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True)
train_loss_list = [] # loss 를 기록할 리스트
# hyper parameters
iters_num = 1000 # 미니배치 학습 반복 횟수
train_... | 30.514286 | 85 | 0.705056 |
2d88a25a8753758697a457797842e08e69084a91 | 11,733 | py | Python | improver_tests/blending/blend_across_adjacent_points/test_TriangularWeightedBlendAcrossAdjacentPoints.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/blending/blend_across_adjacent_points/test_TriangularWeightedBlendAcrossAdjacentPoints.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/blending/blend_across_adjacent_points/test_TriangularWeightedBlendAcrossAdjacentPoints.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 40.739583 | 87 | 0.668456 |
2d88cceaac3fb5e572669bfd40550c07d7f00fef | 26,722 | py | Python | python/.ipynb_checkpoints/sampling_unit-checkpoint.py | egobiernoytp/lac_decarbonization | 7b574c4c91a0b1341dfd97a203fc8477ba32a91d | [
"Apache-2.0"
] | null | null | null | python/.ipynb_checkpoints/sampling_unit-checkpoint.py | egobiernoytp/lac_decarbonization | 7b574c4c91a0b1341dfd97a203fc8477ba32a91d | [
"Apache-2.0"
] | null | null | null | python/.ipynb_checkpoints/sampling_unit-checkpoint.py | egobiernoytp/lac_decarbonization | 7b574c4c91a0b1341dfd97a203fc8477ba32a91d | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
import os, os.path
import support_functions as sf
#
# SAVING AS BACKUP
#
## class for sampling and generating experimental design
class sampling_unit:
def __init__(self, df_var_def: pd.core.frame.DataFrame, dict_baseline_ids: dict, time_period_u0: int, field_strategy_id... | 50.705882 | 254 | 0.622932 |
2d88ead097cb93d677cb8356df62da892a56bed4 | 945 | py | Python | lego/apps/followers/notifications.py | ion05/lego | 873f6898e35ed2d9a33bdfb8339eaf6c9a61470c | [
"MIT"
] | null | null | null | lego/apps/followers/notifications.py | ion05/lego | 873f6898e35ed2d9a33bdfb8339eaf6c9a61470c | [
"MIT"
] | null | null | null | lego/apps/followers/notifications.py | ion05/lego | 873f6898e35ed2d9a33bdfb8339eaf6c9a61470c | [
"MIT"
] | null | null | null | from lego.apps.notifications.constants import REGISTRATION_REMINDER
from lego.apps.notifications.notification import Notification
class RegistrationReminderNotification(Notification):
name = REGISTRATION_REMINDER
def generate_mail(self):
event = self.kwargs["event"]
return self._delay_mail(... | 29.53125 | 72 | 0.609524 |
2d88edc5aaa58b012c9e158279c4c165166650af | 1,137 | py | Python | services/traction/config.py | ianco/traction | e7c934edd52155489a842066de457fc400eb7372 | [
"Apache-2.0"
] | null | null | null | services/traction/config.py | ianco/traction | e7c934edd52155489a842066de457fc400eb7372 | [
"Apache-2.0"
] | null | null | null | services/traction/config.py | ianco/traction | e7c934edd52155489a842066de457fc400eb7372 | [
"Apache-2.0"
] | null | null | null | import os
class Config:
DEBUG = True
PSQL_HOST = os.environ.get("POSTGRESQL_HOST")
PSQL_PORT = os.environ.get("POSTGRESQL_PORT")
PSQL_USER = os.environ.get("TRACTION_DB_USER")
PSQL_PASS = os.environ.get("TRACTION_DB_USER_PWD")
PSQL_DB = os.environ.get("POSTGRESQL_DB")
PSQL_SCHEMA = os.env... | 37.9 | 129 | 0.755497 |
2d89567f243084dd982d70b5afb226e5e3c05756 | 10,343 | py | Python | src/streamlink/plugins/beattv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2021-02-21T21:09:19.000Z | 2021-02-21T21:09:19.000Z | src/streamlink/plugins/beattv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/beattv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2020-08-12T08:27:22.000Z | 2020-08-12T08:27:22.000Z | import logging
import re
from collections import namedtuple
from io import BytesIO
try:
from Crypto.Cipher import AES
CAN_DECRYPT = True
except ImportError:
CAN_DECRYPT = False
from streamlink.compat import range
from streamlink.exceptions import StreamError
from streamlink.packages.flashmedia.tag import ... | 31.824615 | 87 | 0.533984 |
2d89a5a96e04e7177dd4d190da8d75932de370c6 | 298 | py | Python | tests/test_connect2mysql.py | JagritiG/data-middleware | e51cedf173e487d270f42c993e5e7f79f85bd263 | [
"MIT"
] | null | null | null | tests/test_connect2mysql.py | JagritiG/data-middleware | e51cedf173e487d270f42c993e5e7f79f85bd263 | [
"MIT"
] | null | null | null | tests/test_connect2mysql.py | JagritiG/data-middleware | e51cedf173e487d270f42c993e5e7f79f85bd263 | [
"MIT"
] | null | null | null | from datamidware.pydm import connect2mysql
def test_connect2mysql():
try:
# Call connect2mysql()
status = connect2mysql.connect2mysql()
assert status == "Successfully connected to MySQL"
except Exception as e:
print('Error: {}'.format(str(e)))
| 15.684211 | 58 | 0.634228 |
2d89af390290a559e39ddaf17fde7c9d6544324d | 1,784 | py | Python | sandbox/apps/gateway/views.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | sandbox/apps/gateway/views.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | sandbox/apps/gateway/views.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import logging
from django.views import generic
from django.contrib.auth.models import User
from django.contrib import messages
from django.core.mail import send_mail
from django import http
from django.core.urlresolvers import reverse
from django.template.loader import get_template
from apps.gateway import... | 34.980392 | 86 | 0.663117 |
2d89b492c795ee3fbc1cf4b49a55ba12006ac5fe | 6,116 | py | Python | tools/tests/tests_categorygroups.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | tools/tests/tests_categorygroups.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | tools/tests/tests_categorygroups.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | from django.test import TestCase
from django.contrib.auth.models import User, Group
from ..models import (
ToolCategory,
CategoryGroup,
Tool,
)
class CategoryGroupModelTestCase(TestCase):
"""
Tests for CategoryGroup model. Some of it may look like testing DJ API
but I decided to add it becau... | 38.465409 | 83 | 0.633584 |
2d89e953de456fa0aec200d6425a96be640a950c | 4,843 | py | Python | test/language/explicit_parameters/python/ExplicitBlobParamTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | test/language/explicit_parameters/python/ExplicitBlobParamTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | test/language/explicit_parameters/python/ExplicitBlobParamTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import os
from testutils import getZserioApi, getApiDir
class ExplicitBlobParamTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "explicit_parameters.zs")
cls._fileName = os.path.join(getApiDir(os.path.dirname(__file__)), "explicit_blob... | 36.969466 | 109 | 0.691926 |
2d89f032a73bad733a6d5079c3fd74d0def6489f | 415 | py | Python | klepro/wsgi.py | fahrrad/klepro | 3257a30a6a20bdcaf51256f31d80126047fd1c63 | [
"Apache-2.0"
] | null | null | null | klepro/wsgi.py | fahrrad/klepro | 3257a30a6a20bdcaf51256f31d80126047fd1c63 | [
"Apache-2.0"
] | null | null | null | klepro/wsgi.py | fahrrad/klepro | 3257a30a6a20bdcaf51256f31d80126047fd1c63 | [
"Apache-2.0"
] | null | null | null | """
WSGI config for klepro project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os, dj_static
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "klepro.settings")
from djan... | 27.666667 | 78 | 0.790361 |
2d8a0056204c4057282bab63b2d706403fabd95f | 8,011 | py | Python | pytorch_wavelets/dwt/transform2d.py | voletiv/pytorch_wavelets | 0b6312e41fab742aeed61def714f7b567aa012a3 | [
"MIT"
] | 3 | 2021-07-11T14:40:23.000Z | 2022-03-26T12:41:56.000Z | pytorch_wavelets/dwt/transform2d.py | voletiv/pytorch_wavelets | 0b6312e41fab742aeed61def714f7b567aa012a3 | [
"MIT"
] | null | null | null | pytorch_wavelets/dwt/transform2d.py | voletiv/pytorch_wavelets | 0b6312e41fab742aeed61def714f7b567aa012a3 | [
"MIT"
] | 1 | 2020-07-18T08:39:36.000Z | 2020-07-18T08:39:36.000Z | import torch.nn as nn
import pywt
import pytorch_wavelets.dwt.lowlevel as lowlevel
import torch
class DWTForward(nn.Module):
""" Performs a 2d DWT Forward decomposition of an image
Args:
J (int): Number of levels of decomposition
wave (str or pywt.Wavelet): Which wavelet to use. Can be a stri... | 38.330144 | 80 | 0.554987 |
2d8a1bea6b7d5046128571cbe5096f233898c106 | 10,701 | py | Python | gym_minigrid/wrappers.py | jesbu1/gym-minigrid | fd799f90bcd88d5418dcb074140e65862d44f064 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/wrappers.py | jesbu1/gym-minigrid | fd799f90bcd88d5418dcb074140e65862d44f064 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/wrappers.py | jesbu1/gym-minigrid | fd799f90bcd88d5418dcb074140e65862d44f064 | [
"Apache-2.0"
] | null | null | null | import math
import operator
from functools import reduce
import numpy as np
import gym
from gym import error, spaces, utils
from .minigrid import OBJECT_TO_IDX, COLOR_TO_IDX, STATE_TO_IDX
class ReseedWrapper(gym.core.Wrapper):
"""
Wrapper to always regenerate an environment with the same set of seeds.
Thi... | 28.843666 | 121 | 0.587048 |
2d8a2be31a53738186f910cc8c485d3109c0c7f6 | 9,667 | py | Python | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/services/bitaps.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/services/bitaps.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/services/bitaps.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# BitcoinLib - Python Cryptocurrency Library
# BitAps client
# © 2019 August - 1200 Web Development <http://1200wd.com/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by th... | 42.213974 | 119 | 0.52974 |
2d8a3ff1955d150cda1361a7b11811f444247d41 | 9,057 | py | Python | lib/modules/pixelfly.py | learning-at-home/clip_hivemind | 4b68fefacf52e739451253800c45c486cbaf64d3 | [
"MIT"
] | 3 | 2022-02-02T06:11:11.000Z | 2022-02-02T20:55:13.000Z | lib/modules/pixelfly.py | learning-at-home/clip_hivemind | 4b68fefacf52e739451253800c45c486cbaf64d3 | [
"MIT"
] | null | null | null | lib/modules/pixelfly.py | learning-at-home/clip_hivemind | 4b68fefacf52e739451253800c45c486cbaf64d3 | [
"MIT"
] | null | null | null | import functools
import math
from typing import Optional, Tuple
import einops
import torch
import torch.nn.functional as F
@functools.lru_cache
def get_butterfly_indices(
out_features: int,
in_features: int,
block_size: int = 256,
butterfly_size: Optional[int] = None,
n_factors: Optional[int] = N... | 46.685567 | 117 | 0.701005 |
2d8a5135497c2590c7788b4ff87a8d70217f7475 | 2,747 | py | Python | eth/tools/fixtures/loading.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | eth/tools/fixtures/loading.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | eth/tools/fixtures/loading.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-29T21:09:31.000Z | 2019-01-29T21:09:31.000Z | import functools
import json
import os
from cytoolz import (
curry,
identity,
)
from eth_utils import to_tuple
from ._utils import (
recursive_find_files,
require_pytest,
)
#
# Filesystem fixture loading.
#
def find_fixture_files(fixtures_base_dir):
all_fixture_paths = recursive_find_files(fixt... | 28.614583 | 93 | 0.690572 |
2d8a7911b541dd84928dd2f36e6ba60ff62891a7 | 4,733 | py | Python | lab3/mergeAndInsertion.py | AthinkingNeal/CZ2001-Algorithms | 3812864c4be20a9f838a2db55502a410395b5a55 | [
"MIT"
] | null | null | null | lab3/mergeAndInsertion.py | AthinkingNeal/CZ2001-Algorithms | 3812864c4be20a9f838a2db55502a410395b5a55 | [
"MIT"
] | null | null | null | lab3/mergeAndInsertion.py | AthinkingNeal/CZ2001-Algorithms | 3812864c4be20a9f838a2db55502a410395b5a55 | [
"MIT"
] | null | null | null | import random, time, csv, copy
class mergeAndInsertion():
dataset = []
datasize = 0
keyCmpCounter = 0
timeTaken=0
def __init__(self, dataset):
self.dataset = dataset
self.datasize = len(dataset)
self.keyCmpCounter = 0
self.timeTaken = 0
def ... | 33.330986 | 123 | 0.52884 |
2d8a7d9d08c8d2e2af3909613110c8cde3f6aef4 | 6,703 | py | Python | isitfit/mainManager.py | CoreyMcDonald/isitfit | 9f907f89f802aaf6c1551592c5d8245391bf0625 | [
"Apache-2.0"
] | null | null | null | isitfit/mainManager.py | CoreyMcDonald/isitfit | 9f907f89f802aaf6c1551592c5d8245391bf0625 | [
"Apache-2.0"
] | null | null | null | isitfit/mainManager.py | CoreyMcDonald/isitfit | 9f907f89f802aaf6c1551592c5d8245391bf0625 | [
"Apache-2.0"
] | null | null | null | import boto3
import pandas as pd
from tqdm import tqdm
import datetime as dt
import numpy as np
import pytz
import logging
logger = logging.getLogger('isitfit')
from .utils import mergeSeriesOnTimestampRange, ec2_catalog
from .cloudtrail_ec2type import Manager as CloudtrailEc2typeManager
SECONDS_IN_ONE_DAY = 60*60... | 35.094241 | 132 | 0.633597 |
2d8aacc1f36cc68f530ba692c07eb292c950e653 | 2,843 | py | Python | soaplib/core/model/table.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | soaplib/core/model/table.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | soaplib/core/model/table.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null |
#
# soaplib - Copyright (C) Soaplib contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This l... | 34.253012 | 75 | 0.709462 |
2d8ad2bb56325e11da856805d0c4ce10beb54d69 | 48,676 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.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 ... | 39.191626 | 144 | 0.649026 |
2d8b2f091abce48e4663c821d2b55dc3b1aa3df4 | 1,263 | py | Python | venv/Scripts/rst2html5.py | diodax/commit-multi-label-classification | 30edb27e6356a66ec7fdfba4d77c2bb6147d63e3 | [
"FTL"
] | null | null | null | venv/Scripts/rst2html5.py | diodax/commit-multi-label-classification | 30edb27e6356a66ec7fdfba4d77c2bb6147d63e3 | [
"FTL"
] | null | null | null | venv/Scripts/rst2html5.py | diodax/commit-multi-label-classification | 30edb27e6356a66ec7fdfba4d77c2bb6147d63e3 | [
"FTL"
] | null | null | null | #!C:\Users\dioda\odrive\RIT - Google Drive\Spring 2019\SWEN 780 Capstone Research Project\commit-multi-label-classification\venv\Scripts\python.exe
# -*- coding: utf8 -*-
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of ... | 35.083333 | 147 | 0.730008 |
2d8b4ac1e863c97bbf4bb1099d624e732579f731 | 10,122 | py | Python | backend/config_app/config_tiers_lieux/config_app_footer.py | co-demos/apiviz-backend | 8a86b92dce728e81c1c935427b890da590edd720 | [
"MIT"
] | 1 | 2019-12-17T22:31:00.000Z | 2019-12-17T22:31:00.000Z | backend/config_app/config_tiers_lieux/config_app_footer.py | co-demos/apiviz-backend | 8a86b92dce728e81c1c935427b890da590edd720 | [
"MIT"
] | 10 | 2019-05-28T19:57:28.000Z | 2021-06-01T23:46:00.000Z | backend/config_app/config_tiers_lieux/config_app_footer.py | co-demos/apiviz-backend | 8a86b92dce728e81c1c935427b890da590edd720 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from . import version, uuid_models
default_app_footer = [
### FOOTER
### CONFIG TIERS LIEUX
{ "field" : "app_footer",
"app_version" : version,
"help" : u"The default footer for your ApiViz instance",
"template_url" : None,
"is... | 59.541176 | 309 | 0.464533 |
2d8b5e46f1458fc18ede28f8f5d57aca3da2df9e | 3,252 | py | Python | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 07/ch07_rec06_autocorrelation.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | null | null | null | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 07/ch07_rec06_autocorrelation.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | null | null | null | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 07/ch07_rec06_autocorrelation.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 2 | 2020-09-22T18:37:46.000Z | 2021-09-02T11:02:59.000Z | import matplotlib.pyplot as plt
import numpy as np
# daily search trend for keyword 'flowers' for a year
d = [
1.04, 1.04, 1.16, 1.22, 1.46, 2.34, 1.16, 1.12, 1.24, 1.30, 1.44, 1.22, 1.26,
1.34, 1.26, 1.40, 1.52, 2.56, 1.36, 1.30, 1.20, 1.12, 1.12, 1.12, 1.06, 1.06,
1.00, 1.02, 1.04, 1.02, 1.06, 1.02, 1.04, 0.98, 0... | 45.166667 | 78 | 0.564576 |
2d8b5f06cccbff93578ec2464a26afb62108019c | 2,062 | py | Python | gcp-bigtable/tests/test_getrows.py | tsungchih/learning-gcp | 30890c5042a89767ece7d0087152b87aa529130c | [
"Apache-2.0"
] | null | null | null | gcp-bigtable/tests/test_getrows.py | tsungchih/learning-gcp | 30890c5042a89767ece7d0087152b87aa529130c | [
"Apache-2.0"
] | null | null | null | gcp-bigtable/tests/test_getrows.py | tsungchih/learning-gcp | 30890c5042a89767ece7d0087152b87aa529130c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from typing import List
from getrows import get_rowkeys
from getrows import get_table_instance
from getrows import scan_rows_range
class TestGetrows(object):
@pytest.fixture(scope="class")
def rowkey(self):
return ["1:213:7654321:ou:0:pre:b... | 30.776119 | 76 | 0.611542 |
2d8b7e9221a0ef19eecc802362de7d656910f97e | 27 | py | Python | btd6_memory_info/generated/UnityEngine/UIElements/EventDispatcher/event_dispatcher.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/UIElements/EventDispatcher/event_dispatcher.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/UIElements/EventDispatcher/event_dispatcher.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class EventDispatcher: pass | 27 | 27 | 0.888889 |
2d8b9327a8e99f8be72d70bfce16ccd181732603 | 3,963 | py | Python | tpsim/tests/plot_distributions.py | tien-vo/tpsim | 8ea7153ff252774533a9567b5eb8f4c11edd5dde | [
"MIT"
] | 1 | 2021-12-30T05:49:09.000Z | 2021-12-30T05:49:09.000Z | tpsim/tests/plot_distributions.py | tien-vo/tpsim | 8ea7153ff252774533a9567b5eb8f4c11edd5dde | [
"MIT"
] | null | null | null | tpsim/tests/plot_distributions.py | tien-vo/tpsim | 8ea7153ff252774533a9567b5eb8f4c11edd5dde | [
"MIT"
] | null | null | null | from ..distribution import Distribution
from ..conversions import KE2S
from ..constants import c
from matplotlib.colors import LogNorm
import matplotlib.pyplot as plt
import astropy.units as u
import numpy as np
def test_1AU_VDF():
max_speed = KE2S(1700) / c
v_para = np.linspace(-max_speed, max_speed, 200)
... | 29.574627 | 77 | 0.608377 |
2d8bac07da71977ba48cffbdf5ba173b4810a821 | 2,334 | py | Python | make-the-country/output_schema.py | awyrough/make-the-country | 4019f66e4041062fb8f76f25b57f664a7308cf0d | [
"MIT"
] | null | null | null | make-the-country/output_schema.py | awyrough/make-the-country | 4019f66e4041062fb8f76f25b57f664a7308cf0d | [
"MIT"
] | null | null | null | make-the-country/output_schema.py | awyrough/make-the-country | 4019f66e4041062fb8f76f25b57f664a7308cf0d | [
"MIT"
] | null | null | null | population_output_schema = [
{
"name": "STATE",
"type": "STRING"
},
{
"name": "COUNTY",
"type": "STRING"
... | 40.241379 | 60 | 0.147815 |
2d8bbbc1d49ceefa5a72fb98d605583a6ef15bb6 | 2,656 | py | Python | zipline/research/utils.py | kevin-bruton/zipline-trader | b8ce54186785690b00a88362cfa58efefd2cf09c | [
"Apache-2.0"
] | null | null | null | zipline/research/utils.py | kevin-bruton/zipline-trader | b8ce54186785690b00a88362cfa58efefd2cf09c | [
"Apache-2.0"
] | null | null | null | zipline/research/utils.py | kevin-bruton/zipline-trader | b8ce54186785690b00a88362cfa58efefd2cf09c | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from zipline.data import bundles
from zipline.pipeline.loaders import USEquityPricingLoader
from zipline.data.data_portal import DataPortal
from zipline.utils.calendars import get_calendar
from zipline.pipeline.data import USEquityPricing
from zipline.pipeline.engine import SimplePipelineEngine
BU... | 39.641791 | 102 | 0.689759 |
2d8bc3d5825606b1a8a100f3d8310d1346feee09 | 3,256 | py | Python | src/pyoffers/utils.py | Stranger6667/py-offers | 73ef00e7b02ddfa5adc6df282009aea7670e465f | [
"MIT"
] | 17 | 2016-08-26T10:50:44.000Z | 2021-07-08T17:39:34.000Z | src/pyoffers/utils.py | Stranger6667/py-offers | 73ef00e7b02ddfa5adc6df282009aea7670e465f | [
"MIT"
] | 80 | 2016-08-26T08:45:20.000Z | 2020-08-31T15:47:10.000Z | src/pyoffers/utils.py | Stranger6667/py-offers | 73ef00e7b02ddfa5adc6df282009aea7670e465f | [
"MIT"
] | 7 | 2017-04-03T08:19:06.000Z | 2020-10-16T19:02:21.000Z | from functools import singledispatch
class cached_property:
def __init__(self, func):
self.func = func
def __get__(self, obj, cls):
if obj is None: # pragma: no cover
return self
value = obj.__dict__[self.func.__name__] = self.func(obj)
return value
def prepare_... | 27.133333 | 86 | 0.568182 |
2d8bcbf0c871f41353b3b3bc65de6701dbf31cc2 | 3,848 | py | Python | feincms/admin/filters.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 17 | 2015-03-11T09:57:21.000Z | 2019-09-03T11:11:45.000Z | feincms/admin/filters.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | null | null | null | feincms/admin/filters.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 3 | 2015-07-07T06:33:11.000Z | 2020-01-29T15:45:49.000Z | # encoding=utf-8
# Thanks to http://www.djangosnippets.org/snippets/1051/
#
# Authors: Marinho Brandao <marinho at gmail.com>
# Guilherme M. Gondim (semente) <semente at taurinus.org>
from __future__ import absolute_import, unicode_literals
from django.contrib.admin.filters import ChoicesFieldListFilter
from... | 32.610169 | 88 | 0.600832 |
2d8bd1777c86991ee360c604cbb9736d42c691ed | 1,556 | py | Python | net_benefit_ascvd/prediction_utils/extraction_utils/csv_to_parquet.py | som-shahlab/net_benefit_ascvd | 1259692025d90618211206105d8d23bd5a90a66c | [
"MIT"
] | null | null | null | net_benefit_ascvd/prediction_utils/extraction_utils/csv_to_parquet.py | som-shahlab/net_benefit_ascvd | 1259692025d90618211206105d8d23bd5a90a66c | [
"MIT"
] | null | null | null | net_benefit_ascvd/prediction_utils/extraction_utils/csv_to_parquet.py | som-shahlab/net_benefit_ascvd | 1259692025d90618211206105d8d23bd5a90a66c | [
"MIT"
] | null | null | null | import os
import glob
from pyarrow import csv
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"--base_path",
type=str,
default="",
)
parser.add_argument(
"--features_by_analysis_path", type=str, default="features_by_analysis"
)
parser.add_argument(
"--parquet_path", type... | 31.12 | 87 | 0.700514 |
2d8bec474cdd9482eb88d10585d5a33d512862b2 | 39,759 | py | Python | conda/_vendor/distro.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | conda/_vendor/distro.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | conda/_vendor/distro.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015,2016 Nir Cohen
#
# 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, s... | 35.883574 | 79 | 0.628638 |
2d8bfb8aea53abb6c71af94ae09a6e9e828faa60 | 1,605 | py | Python | src/PythonLib/lib/utils/weather_data/rain.py | 007sya/Project2021 | 28c6a88f6b7b84f130c1930815230cc99bdc6d10 | [
"Apache-2.0"
] | 5 | 2021-03-22T12:40:15.000Z | 2021-04-19T08:26:12.000Z | src/PythonLib/lib/utils/weather_data/rain.py | angel-langdon/Project2021 | 28c6a88f6b7b84f130c1930815230cc99bdc6d10 | [
"Apache-2.0"
] | null | null | null | src/PythonLib/lib/utils/weather_data/rain.py | angel-langdon/Project2021 | 28c6a88f6b7b84f130c1930815230cc99bdc6d10 | [
"Apache-2.0"
] | 3 | 2021-05-26T10:55:17.000Z | 2021-05-27T08:36:37.000Z | # %%
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from datetime import datetime
import calendar
import time
import pandas as pd
# %%
options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('window-size=1920x1080')
options.add_argument("disable-gpu")
# ... | 30.865385 | 160 | 0.654206 |
2d8c1bb3992d347c412716e14b68be1229b49f10 | 201 | py | Python | weibull/__init__.py | KTCrisis/weibull | 2384342c2e2fc6554d8cdf1556528c99480f2386 | [
"MIT"
] | 1 | 2020-05-20T01:02:30.000Z | 2020-05-20T01:02:30.000Z | weibull/__init__.py | KTCrisis/weibull | 2384342c2e2fc6554d8cdf1556528c99480f2386 | [
"MIT"
] | null | null | null | weibull/__init__.py | KTCrisis/weibull | 2384342c2e2fc6554d8cdf1556528c99480f2386 | [
"MIT"
] | null | null | null | from weibull.version import __version__
from weibull.weibull import Analysis, Design, Weibayes, ParameterError
__all__ = ['__version__',
'Analysis', 'Design', 'Weibayes', 'ParameterError']
| 33.5 | 70 | 0.741294 |
2d8c28fe74a651dd7771d25d21aa4c723587fc28 | 3,489 | py | Python | backend/venv/lib/python2.7/site-packages/gaepermission/facebook/commands.py | cbeloni/pychronesapp | fff744dfdbc1932968a950fda614e8ec84d162a3 | [
"MIT"
] | null | null | null | backend/venv/lib/python2.7/site-packages/gaepermission/facebook/commands.py | cbeloni/pychronesapp | fff744dfdbc1932968a950fda614e8ec84d162a3 | [
"MIT"
] | null | null | null | backend/venv/lib/python2.7/site-packages/gaepermission/facebook/commands.py | cbeloni/pychronesapp | fff744dfdbc1932968a950fda614e8ec84d162a3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from google.appengine.api import memcache
from google.appengine.ext import ndb
from gaebusiness.business import Command
from gaebusiness.gaeutil import ModelSearchCommand, UrlFetchCommand
from gaecookie import facade
from gae... | 34.544554 | 105 | 0.631126 |
2d8c3d5650d919747198b6b267ac458224755d07 | 12,028 | py | Python | lib/batch_optimizers.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | 8 | 2018-10-30T16:48:44.000Z | 2021-03-08T01:44:41.000Z | lib/batch_optimizers.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | null | null | null | lib/batch_optimizers.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | 5 | 2018-04-05T15:51:12.000Z | 2019-05-23T21:38:31.000Z | import pyNeuroChem as pyc
import hdnntools as hdt
import numpy as np
import time
import math
from ase_interface import ANIENS
from ase_interface import ensemblemolecule
# ------------------------------------------------------------------------
# Class for ANI cross validaiton computer for multiple conformers a time... | 39.69637 | 125 | 0.490273 |
2d8c45197169c1c25bc19ebca594305d5b112349 | 103,034 | py | Python | discord/guild.py | CuzImSyntax/dis.py | 2f56d546f2594e1dbb6955c8b13b3a884a04eca6 | [
"MIT"
] | 1 | 2021-09-11T13:39:44.000Z | 2021-09-11T13:39:44.000Z | discord/guild.py | CuzImSyntax/discordIO | 47cd508ed48004aa61a41a5b196d3ff003456219 | [
"MIT"
] | null | null | null | discord/guild.py | CuzImSyntax/discordIO | 47cd508ed48004aa61a41a5b196d3ff003456219 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz 2021-present CuzImSyntax
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 u... | 34.482597 | 138 | 0.599821 |
2d8c6273927d740eb84eeb9963952a698b370bc8 | 692 | py | Python | pecan/middleware/resources/__init__.py | rackerlabs/pecan | b046c1e965e2a37758c5092402a92b46217d58b4 | [
"BSD-3-Clause"
] | null | null | null | pecan/middleware/resources/__init__.py | rackerlabs/pecan | b046c1e965e2a37758c5092402a92b46217d58b4 | [
"BSD-3-Clause"
] | null | null | null | pecan/middleware/resources/__init__.py | rackerlabs/pecan | b046c1e965e2a37758c5092402a92b46217d58b4 | [
"BSD-3-Clause"
] | null | null | null | import os
from mimetypes import guess_type
from contextlib import closing
from base64 import b64encode
from pecan.compat import quote
def load_resource(filename):
with closing(open(
os.path.join(
os.path.dirname(__file__),
filename
),
'rb'
)) as f:
data... | 23.862069 | 40 | 0.643064 |
2d8c6ec7948543b5bb12a20cf461f48de9e9e313 | 1,551 | py | Python | slavdict/dictionary/migrations/0013_transitivity.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 1 | 2022-01-17T17:26:25.000Z | 2022-01-17T17:26:25.000Z | slavdict/dictionary/migrations/0013_transitivity.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 8 | 2020-02-12T13:26:05.000Z | 2022-02-10T19:28:07.000Z | slavdict/dictionary/migrations/0013_transitivity.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dictionary', '0012_is_valency'),
]
operations = [
migrations.AddField(
model_name='meaning',
name='transitivity',
field=models.... | 47 | 369 | 0.63314 |
2d8c759c67f0d34d1de16d8e5fd8ec735f4898c1 | 198 | py | Python | star_bot/__init__.py | lampholder/starbot | a58e5925b11861919871f6d2a34c8d191a981a84 | [
"Apache-2.0"
] | 1 | 2021-03-03T00:47:12.000Z | 2021-03-03T00:47:12.000Z | star_bot/__init__.py | lampholder/starbot | a58e5925b11861919871f6d2a34c8d191a981a84 | [
"Apache-2.0"
] | null | null | null | star_bot/__init__.py | lampholder/starbot | a58e5925b11861919871f6d2a34c8d191a981a84 | [
"Apache-2.0"
] | null | null | null | import sys
# Check that we're not running on an unsupported Python version.
if sys.version_info < (3, 5):
print("star_bot requires Python 3.5 or above.")
sys.exit(1)
__version__ = "0.0.1"
| 22 | 64 | 0.691919 |
2d8c7fdf62ad82009644ff5317a5c27e6e0c7fc4 | 2,729 | py | Python | tests/common/test_run/gather_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/gather_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/gather_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 42.640625 | 109 | 0.705753 |
2d8c817f3a788360474f4ae5fb654cf91bfc442f | 21,939 | py | Python | qiskit/aqua/operators/operator_base.py | MetcalfeTom/qiskit-aqua | 1718e1612dba38a3f15309c860fe7875914fe8cc | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/operators/operator_base.py | MetcalfeTom/qiskit-aqua | 1718e1612dba38a3f15309c860fe7875914fe8cc | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/operators/operator_base.py | MetcalfeTom/qiskit-aqua | 1718e1612dba38a3f15309c860fe7875914fe8cc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 40.47786 | 99 | 0.619946 |
2d8c8356992a1211ed2cdab64fdbf2d17071f0a2 | 2,770 | py | Python | miura/__init__.py | toumorokoshi/miura | f23e270a9507e5946798b1e897220c9fb1b8d5fa | [
"MIT"
] | 1 | 2017-05-18T11:34:35.000Z | 2017-05-18T11:34:35.000Z | miura/__init__.py | toumorokoshi/miura | f23e270a9507e5946798b1e897220c9fb1b8d5fa | [
"MIT"
] | null | null | null | miura/__init__.py | toumorokoshi/miura | f23e270a9507e5946798b1e897220c9fb1b8d5fa | [
"MIT"
] | null | null | null | """Miura, a jenkins job management tool
Usage:
miura docs
miura [-d --dry-run -p <print_dir>] [-f <filter>...] <script_name> [<args>...]
Options:
-h, --help Show this usage guide.
-f <filter>..., --filter <filter>... Filters
-p <print_dir>, --print <print_dir> Print the j... | 33.780488 | 107 | 0.627076 |
2d8c93a89349e534f1259f03964875dafd55128a | 12,376 | py | Python | calendarserver/tools/migrate_verify.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | calendarserver/tools/migrate_verify.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | calendarserver/tools/migrate_verify.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- test-case-name: calendarserver.tools.test.test_calverify -*-
##
# Copyright (c) 2012-2015 Apple 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 Lice... | 31.571429 | 147 | 0.565449 |
2d8c9b692edadbe2f1f2805ce57b722ee8abffb2 | 616 | py | Python | hutoolpy/re.py | twocucao/hutoolpy | 84f3de287a7a0793b169b3a83eac60b34254b26a | [
"MIT"
] | null | null | null | hutoolpy/re.py | twocucao/hutoolpy | 84f3de287a7a0793b169b3a83eac60b34254b26a | [
"MIT"
] | null | null | null | hutoolpy/re.py | twocucao/hutoolpy | 84f3de287a7a0793b169b3a83eac60b34254b26a | [
"MIT"
] | null | null | null | import re
def has_pattern(_str, pattern):
return bool(re.search(pattern, _str))
def is_pattern(_str, pattern):
return bool(re.match(pattern, _str))
def sub_pattern(_str, pattern, sub):
raise NotImplementedError()
def filter_pattern():
raise NotImplementedError()
def find_first_matched_pattern(... | 18.117647 | 46 | 0.668831 |
2d8ca5428ae46a00e37a4174c85f684497ca7570 | 1,187 | py | Python | alipay/aop/api/response/AlipayEcoTextVoiceTransferResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayEcoTextVoiceTransferResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayEcoTextVoiceTransferResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayEcoTextVoiceTransferResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoTextVoiceTransferResponse, self).__init__()
self._call_id = None
self._... | 25.804348 | 107 | 0.647852 |
2d8cded00110157d733f046b2cb64cf09956e218 | 2,407 | py | Python | file_server_box_sync/files/yml_file.py | dtrodger/file-server-box-syncer | 6296a66352df8c06ea691922a3728aeb487ab246 | [
"MIT"
] | null | null | null | file_server_box_sync/files/yml_file.py | dtrodger/file-server-box-syncer | 6296a66352df8c06ea691922a3728aeb487ab246 | [
"MIT"
] | null | null | null | file_server_box_sync/files/yml_file.py | dtrodger/file-server-box-syncer | 6296a66352df8c06ea691922a3728aeb487ab246 | [
"MIT"
] | null | null | null | """
YML file
"""
from __future__ import annotations
import logging
from typing import Dict
import yaml
from file_server_box_sync.files import sentinel_file
log = logging.getLogger(__name__)
class YMLFile(sentinel_file.SentinelFile):
__slots__ = [
"attempted_upload_to_box_on",
"box_file",
... | 25.336842 | 78 | 0.614458 |
2d8d152300df550eb6fa629059007c543b3e6316 | 3,127 | py | Python | common/_webdriver_qa_api/core/selenium_dynamic_elements.py | albalabkin/PyCats | b3fa09e116f38cebbb66faef16785e2795d80aa9 | [
"Apache-2.0"
] | null | null | null | common/_webdriver_qa_api/core/selenium_dynamic_elements.py | albalabkin/PyCats | b3fa09e116f38cebbb66faef16785e2795d80aa9 | [
"Apache-2.0"
] | null | null | null | common/_webdriver_qa_api/core/selenium_dynamic_elements.py | albalabkin/PyCats | b3fa09e116f38cebbb66faef16785e2795d80aa9 | [
"Apache-2.0"
] | null | null | null | import logging
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException
logger = logging.getLogger(__name__)
class DynamicElement:
def __init__(self, locator_type, locator, driver, name=None, parent=None):
self.__driver = driver
self.__locator_type = locator_... | 37.674699 | 119 | 0.634474 |
2d8d190939061e97aa5581b10eae97da9174eb72 | 18,493 | py | Python | lib/python2.7/site-packages/paramiko/sftp_server.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | 2 | 2015-03-27T13:42:54.000Z | 2021-12-31T13:05:06.000Z | lib/python2.7/site-packages/paramiko/sftp_server.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/paramiko/sftp_server.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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
# Software Foundation; either version 2.1 of the License, or (a... | 41.187082 | 95 | 0.602012 |
2d8d33f52b401f107ed3278450ae4d5ff2bf8095 | 3,034 | py | Python | aStar.py | AnzeMarinko/dostava | a10d3e5ab3c8084c385b9bfab7397970bae4a7a1 | [
"MIT"
] | null | null | null | aStar.py | AnzeMarinko/dostava | a10d3e5ab3c8084c385b9bfab7397970bae4a7a1 | [
"MIT"
] | null | null | null | aStar.py | AnzeMarinko/dostava | a10d3e5ab3c8084c385b9bfab7397970bae4a7a1 | [
"MIT"
] | null | null | null | from heapq import *
import podatkovne_strukture as ps
import copy
import time
class Node:
def __init__(self, poteze, stanje, hevr):
self.poteze = poteze # poteze od zacetka igre
self.stanje = stanje # plosca
self.hevr = hevr # vrednost hevristicne funkcije
# primerjanje hevristik
def __le__(self... | 32.276596 | 93 | 0.670732 |
2d8d64b64a2e7afb0fa1473a8dd5f53861701989 | 568 | py | Python | Farmacia/apps/compras/migrations/0006_cabecera_trabajador.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:05:20.000Z | 2020-05-28T23:19:23.000Z | Farmacia/apps/compras/migrations/0006_cabecera_trabajador.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | null | null | null | Farmacia/apps/compras/migrations/0006_cabecera_trabajador.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:12:17.000Z | 2019-11-21T18:34:26.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('compras', '0005_auto_20151107_0053'),
... | 24.695652 | 76 | 0.653169 |
2d8d64cccba08f604cd62639faf76f297b4f6f97 | 11,891 | py | Python | python/seldon_core/microservice.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | 1 | 2021-06-14T12:58:38.000Z | 2021-06-14T12:58:38.000Z | python/seldon_core/microservice.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | 16 | 2019-12-16T22:22:13.000Z | 2022-03-12T00:07:55.000Z | python/seldon_core/microservice.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import importlib
import json
import time
import logging
import multiprocessing as mp
import sys
import seldon_core.persistence as persistence
from distutils.util import strtobool
from seldon_core.flask_utils import ANNOTATIONS_FILE
import seldon_core.wrapper as seldon_microservice
from typing ... | 31.709333 | 91 | 0.592381 |
2d8d6781497c997d75dc9250bc4ba2059dd79213 | 19,082 | py | Python | ml-agents/mlagents/trainers/torch/networks.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | 1 | 2021-12-02T23:22:56.000Z | 2021-12-02T23:22:56.000Z | ml-agents/mlagents/trainers/torch/networks.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/torch/networks.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | null | null | null | from typing import Callable, List, Dict, Tuple, Optional, Union
import abc
from mlagents.torch_utils import torch, nn
from mlagents_envs.base_env import ActionSpec
from mlagents.trainers.torch.action_model import ActionModel
from mlagents.trainers.torch.agent_action import AgentAction
from mlagents.trainers.torch.act... | 36.909091 | 107 | 0.638927 |
2d8e33605227bf0fc2c066c833d6e84937443e5d | 2,649 | py | Python | hivwholeseq/patients/get_coverage.py | neherlab/hivwholeseq | 978ce4060362e4973f92b122ed5340a5314d7844 | [
"MIT"
] | 3 | 2016-09-13T12:15:47.000Z | 2021-07-03T01:28:56.000Z | hivwholeseq/patients/get_coverage.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | null | null | null | hivwholeseq/patients/get_coverage.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | 3 | 2016-01-17T03:43:46.000Z | 2020-03-25T07:00:11.000Z | # vim: fdm=marker
'''
author: Fabio Zanini
date: 22/05/14
content: Plot coverage across time, for a fragment or genomewide.
'''
# Modules
import argparse
import numpy as np
from matplotlib import cm
import matplotlib.pyplot as plt
from hivwholeseq.utils.generic import mkdirs
from hivwholeseq.patients.samp... | 31.915663 | 96 | 0.622877 |
2d8e37562225666b42bedd983c5c7093083f4b1d | 4,708 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/sr.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/sr.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/sr.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "sr",
"date_order": "DMY",
"january": [
"јануар",
"јан"
],
"february": [
"фебруар",
"феб"
],
"march": [
"март",
"мар"
],
"april": [
"април",
"апр"
],
"may": [
"мај... | 18.319066 | 33 | 0.25446 |
2d8e378a932c16d48360bc4b15ff4f3239c0ed1f | 1,734 | py | Python | tensorflow/contrib/kfac/python/ops/fisher_factors_lib.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/kfac/python/ops/fisher_factors_lib.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/kfac/python/ops/fisher_factors_lib.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.461538 | 80 | 0.757209 |
2d8e54fe06ab3047b2e1bf7389e80d9e2e63b891 | 2,362 | py | Python | testing/mixins.py | luismayta/python-example-elasticsearch | 4572b03c425f525094d5892ef8c625cfa991174a | [
"MIT"
] | 4 | 2019-08-04T19:23:39.000Z | 2021-04-10T08:26:44.000Z | testing/mixins.py | luismayta/python-example-elasticsearch | 4572b03c425f525094d5892ef8c625cfa991174a | [
"MIT"
] | 3 | 2019-07-08T20:08:02.000Z | 2019-07-09T19:47:25.000Z | testing/mixins.py | luismayta/python-example-elasticsearch | 4572b03c425f525094d5892ef8c625cfa991174a | [
"MIT"
] | 1 | 2019-08-05T05:15:26.000Z | 2019-08-05T05:15:26.000Z | # -*- coding: utf-8 -*-
import django
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import CommandError
from django.db import connection
class TestCaseMixin:
@classmethod
def assert_test_database(cls):
"""
Raises a CommandErro... | 31.078947 | 87 | 0.632091 |
2d8e5b3d1e9a6b47268ba7650ec7391b2f37b845 | 44,021 | py | Python | round01/30_11_dDQN_light_tweak31.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | round01/30_11_dDQN_light_tweak31.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | 1 | 2022-02-10T02:27:10.000Z | 2022-02-10T02:27:10.000Z | round01/30_11_dDQN_light_tweak31.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | ########################################
# Changes compared to 30_05_CNN_revived_dDQN_light.py
# 01. lr_optimizer = 2.5e-4 as opposed to lr_optimizer = 7.3e-4
########################################
import sys
import numpy as np
#import pandas as pd
import datetime
import json
from array import *
import os
import ma... | 37.023549 | 271 | 0.578565 |
2d8e5e8589b1a950df23f34335a7b400d4734a27 | 3,980 | py | Python | alipay/aop/api/request/AlipayOpenMiniShopRelationBindRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenMiniShopRelationBindRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenMiniShopRelationBindRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenMiniShopRelationBindModel import AlipayOpenMiniShopRelationBindModel
class AlipayOpenMiniShopRelationBindRequest(object):
... | 27.448276 | 148 | 0.645226 |
2d8e648698a03a5e8a65030813e2f15f5246b53c | 1,518 | py | Python | API/src/main/resources/Lib/robot/libdocpkg/builder.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/libdocpkg/builder.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/libdocpkg/builder.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# 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... | 33.733333 | 75 | 0.741107 |
2d8ec981fa12510daf0172960ef4a0c2076b477f | 794 | py | Python | data/django/sibur/sibur/urls.py | vladimirwest/sibur_challenge | a17696691a6c6af63de22e87898897d369f93d43 | [
"MIT"
] | null | null | null | data/django/sibur/sibur/urls.py | vladimirwest/sibur_challenge | a17696691a6c6af63de22e87898897d369f93d43 | [
"MIT"
] | null | null | null | data/django/sibur/sibur/urls.py | vladimirwest/sibur_challenge | a17696691a6c6af63de22e87898897d369f93d43 | [
"MIT"
] | null | null | null | """sibur URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based v... | 36.090909 | 77 | 0.701511 |
2d8edd660a2298b1fd0e44b3a23032ce096a05c7 | 2,004 | py | Python | examples/labs/hierarchical_rois.py | matthew-brett/nipy | 5a3f080f2504f8b2c326677ea2e3101344b3f579 | [
"BSD-3-Clause"
] | null | null | null | examples/labs/hierarchical_rois.py | matthew-brett/nipy | 5a3f080f2504f8b2c326677ea2e3101344b3f579 | [
"BSD-3-Clause"
] | 1 | 2015-09-09T07:49:57.000Z | 2015-09-25T01:50:40.000Z | examples/labs/hierarchical_rois.py | matthew-brett/nipy | 5a3f080f2504f8b2c326677ea2e3101344b3f579 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
__doc__ = \
"""
Example of a script that crates a 'hierarchical roi' structure from the blob
model of an image
Needs matplotlib
Author: Bertrand Thirion, 2008-2009
"""
print __doc__
... | 27.452055 | 78 | 0.671158 |
2d8ef91c3e94c8cd8ce23f586932ac34ee7d119e | 3,098 | py | Python | scripts/examples/Raw_and_dump.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | scripts/examples/Raw_and_dump.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | scripts/examples/Raw_and_dump.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | import numpy as np
import load
import utils.sampling as smp
import matplotlib.pyplot as plt
def gm2code(arr, info):
"""
arr originally is a reference to the object from the outside.
But later in "arr = arr / info.pboxsize + 0.5",
the arr is a new
"""
return (arr / info.pboxsize + 0.5)# * 0.99... | 28.953271 | 102 | 0.540671 |
2d8f2438a9c10113347c97588df245f37c1b397d | 8,910 | py | Python | hummingbot/strategy/cross_exchange_market_making/cross_exchange_market_making_config_map.py | RBUB-Yatirim/hummingbot | 6b278932d423110b70d723c2b11c6ddf668cb367 | [
"Apache-2.0"
] | 2 | 2021-01-18T06:31:23.000Z | 2021-03-17T12:34:15.000Z | hummingbot/strategy/cross_exchange_market_making/cross_exchange_market_making_config_map.py | RBUB-Yatirim/hummingbot | 6b278932d423110b70d723c2b11c6ddf668cb367 | [
"Apache-2.0"
] | 2 | 2021-04-24T11:47:01.000Z | 2021-06-11T18:24:25.000Z | hummingbot/strategy/cross_exchange_market_making/cross_exchange_market_making_config_map.py | RBUB-Yatirim/hummingbot | 6b278932d423110b70d723c2b11c6ddf668cb367 | [
"Apache-2.0"
] | 2 | 2021-01-19T09:42:18.000Z | 2021-05-08T08:07:43.000Z | from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
validate_decimal,
validate_bool
)
from hummingbot.client.settings import required_exchanges, EXAMPLE_PAIRS
from decimal import Decimal
from ... | 41.44186 | 114 | 0.679574 |
2d8f243cf20084fb8ac73d7e978fff5002a16ccb | 2,283 | py | Python | PyFunceble/status/syntax/__init__.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | PyFunceble/status/syntax/__init__.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | PyFunceble/status/syntax/__init__.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | """
The tool to check the availability or syntax of domains, IPv4, IPv6 or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ ... | 36.238095 | 88 | 0.577749 |
2d8f24d5a947c31cc81e94bd2b3c2f68c33d490a | 654 | py | Python | signalfx_tracing/constants.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | signalfx_tracing/constants.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | signalfx_tracing/constants.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018-2019 SignalFx. All rights reserved.
instrumented_attr = '__sfx_instrumented'
traceable_libraries = (
'celery', 'django', 'elasticsearch', 'falcon', 'flask', 'psycopg2', 'pymongo', 'pymysql', 'redis', 'requests',
'tornado', 'logging'
)
auto_instrumentable_libraries = (
'celery', 'elast... | 31.142857 | 114 | 0.665138 |
2d8f875a015aee40278ef6c1153f4e1fc9c7667b | 723 | py | Python | kg/graphs/details.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | kg/graphs/details.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | kg/graphs/details.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | from .utils import * ### @import 'kg.graphs.utils'
# TODO
# function that returns details about the graph
def tree_details(nodes, edges, *, root=None):
nodes = make_nodes(nodes)
if root is None: root = nodes[0]
if root not in nodes: raise GraphError(f"Root not in nodes")
adj = make_adj(nodes, edges)
... | 32.863636 | 77 | 0.630705 |
2d8fae705631c0496ccaf0e0f1f62cf7b49d6f42 | 1,973 | py | Python | docs/conf.py | zeenfaizpy/dj_authy | aa8e71abe32296aaeb6e163ec276286b22662eac | [
"MIT"
] | null | null | null | docs/conf.py | zeenfaizpy/dj_authy | aa8e71abe32296aaeb6e163ec276286b22662eac | [
"MIT"
] | null | null | null | docs/conf.py | zeenfaizpy/dj_authy | aa8e71abe32296aaeb6e163ec276286b22662eac | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.232143 | 79 | 0.667511 |
2d8fd8e3d3c3adf8604bfb4afa9d645df6c79a11 | 1,679 | py | Python | atom/nucleus/python/test/test_spending_control_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_spending_control_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_spending_control_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 23.985714 | 90 | 0.688505 |
2d8ffc5564461e0159179738a7aadb8b1c42f59d | 1,424 | tac | Python | docs/mail/tutorial/smtpserver/smtpserver-6.tac | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | null | null | null | docs/mail/tutorial/smtpserver/smtpserver-6.tac | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | null | null | null | docs/mail/tutorial/smtpserver/smtpserver-6.tac | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | null | null | null | import os
from zope.interface import implementer
from twisted.application import service
application = service.Application("SMTP Server Tutorial")
from twisted.application import internet
from twisted.internet import protocol, defer
smtpServerFactory = protocol.ServerFactory()
from twisted.mail import smtp
@imple... | 24.982456 | 63 | 0.70927 |
2d9018bfef9def55f1663c7740523877bf2e9ed9 | 46,275 | py | Python | pattern/db/__init__.py | WZBSocialScienceCenter/pattern | 99271c8f20afdc3ae3f05246c43100dc00604e3f | [
"BSD-3-Clause"
] | 2 | 2020-11-08T13:52:08.000Z | 2021-08-13T19:44:27.000Z | pattern/db/__init__.py | WZBSocialScienceCenter/patternlite | 99271c8f20afdc3ae3f05246c43100dc00604e3f | [
"BSD-3-Clause"
] | null | null | null | pattern/db/__init__.py | WZBSocialScienceCenter/patternlite | 99271c8f20afdc3ae3f05246c43100dc00604e3f | [
"BSD-3-Clause"
] | null | null | null | #### PATTERN | DB ##################################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
############... | 36.379717 | 121 | 0.558984 |
2d901de52f191a0b7c4e882cc1377b5f2200372a | 4,187 | py | Python | chef_validator/command/generate_image.py | ging/fi-ware-chef_validator | eaeb72801f3f2dba7f933740b033687dcb02e5c8 | [
"Apache-2.0"
] | 1 | 2015-08-27T08:49:28.000Z | 2015-08-27T08:49:28.000Z | chef_validator/command/generate_image.py | ging/fiware-chef_validator | eaeb72801f3f2dba7f933740b033687dcb02e5c8 | [
"Apache-2.0"
] | null | null | null | chef_validator/command/generate_image.py | ging/fiware-chef_validator | eaeb72801f3f2dba7f933740b033687dcb02e5c8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 a... | 29.27972 | 77 | 0.6599 |
2d90486ab8cfa4d62d3e283e179f7453520b68d3 | 11,966 | py | Python | src/plotting.py | dfioravanti/tangles | 28d263bce0cac80bd4257eda854f6ed69cefde47 | [
"MIT"
] | null | null | null | src/plotting.py | dfioravanti/tangles | 28d263bce0cac80bd4257eda854f6ed69cefde47 | [
"MIT"
] | 1 | 2020-12-23T11:33:33.000Z | 2020-12-23T11:33:33.000Z | src/plotting.py | dfioravanti/tangles | 28d263bce0cac80bd4257eda854f6ed69cefde47 | [
"MIT"
] | null | null | null | import matplotlib as mpl
import matplotlib.patches as patches
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import seaborn as sns
from src.utils import get_points_to_plot
# Standard colors for uniform plots
COLOR_SILVER = '#C0C0C0'
COLOR_SILVER_RGB = (192 / 255, 192 / 255, 192 / 255) + (0.2... | 32.340541 | 115 | 0.622263 |
2d9051c02048145c559ed010e091cb6543fad9e1 | 2,553 | py | Python | elasticsearch_adsl/search.py | 3lnc/elasticsearch-adsl | c5b33f880f9075a60704f49ee1868243e12ee2a2 | [
"MIT"
] | null | null | null | elasticsearch_adsl/search.py | 3lnc/elasticsearch-adsl | c5b33f880f9075a60704f49ee1868243e12ee2a2 | [
"MIT"
] | null | null | null | elasticsearch_adsl/search.py | 3lnc/elasticsearch-adsl | c5b33f880f9075a60704f49ee1868243e12ee2a2 | [
"MIT"
] | null | null | null | from elasticsearch_dsl import search as sync_search, AttrDict
from elasticsearch_adsl.connections import get_connection
from elasticsearch_adsl.scan import scan
class Request(sync_search.Request):
def __init__(self, using='async', *args, **kwargs):
super(Request, self).__init__(using=using, *args, **kwar... | 30.759036 | 89 | 0.596945 |
2d906ec1bdecb156bbb1b3ce982f40264a6da50b | 3,563 | py | Python | subset.py | jhintr/lxgw-fonttools | b3e0088333e86e4ca94ba507bdee00f78cebc1fc | [
"MIT"
] | null | null | null | subset.py | jhintr/lxgw-fonttools | b3e0088333e86e4ca94ba507bdee00f78cebc1fc | [
"MIT"
] | null | null | null | subset.py | jhintr/lxgw-fonttools | b3e0088333e86e4ca94ba507bdee00f78cebc1fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import json
import os
from datetime import datetime
from multiprocessing import Pool
from pathlib import Path
from fontTools.subset import main
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_UNICODE = "unicode.json"
EXTEND_CJK = "unicode_ex.json"
EXTEND_MANUAL = "unicode_ex_manua... | 25.269504 | 89 | 0.625316 |
2d90c252d97f61c8ffc7c98228c81951b90e0049 | 5,410 | py | Python | speech_reco.py | bohdaholas/Lacalut | 7ac47db40da74b16e8bfd8534defd6ff6b2e264c | [
"MIT"
] | null | null | null | speech_reco.py | bohdaholas/Lacalut | 7ac47db40da74b16e8bfd8534defd6ff6b2e264c | [
"MIT"
] | null | null | null | speech_reco.py | bohdaholas/Lacalut | 7ac47db40da74b16e8bfd8534defd6ff6b2e264c | [
"MIT"
] | null | null | null | from __future__ import division
from lacalut_gui import Lacalut
import re
import sys
from google.cloud import speech, texttospeech
from playsound import playsound
import pyaudio
from six.moves import queue
RATE = 16000
CHUNK = int(RATE / 10)
lacalut = Lacalut()
TEST_STR = 'Думи мої думи мої Лихо мені з вами Нащо... | 28.177083 | 353 | 0.611091 |
2d91200e77db519d81315032759108aeab016bab | 620 | py | Python | experiments/2013-08-28-time-series.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 151 | 2015-01-09T19:25:05.000Z | 2022-01-05T02:05:52.000Z | experiments/2013-08-28-time-series.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 1 | 2016-08-04T13:12:51.000Z | 2016-08-04T13:12:51.000Z | experiments/2013-08-28-time-series.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 59 | 2015-02-04T19:13:58.000Z | 2021-07-28T23:36:09.000Z | Experiment(description='Trying faster version',
data_dir='../data/tsdlr-250/',
max_depth=8,
random_order=True,
k=1,
debug=False,
local_computation=False,
n_rand=4,
sd=4,
max_jobs=400,
verbose=False,
... | 31 | 72 | 0.527419 |
2d915a555edeb252a9fd2523d863cfca64b212d0 | 27,538 | py | Python | msticpy/data/azure_data.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | msticpy/data/azure_data.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | msticpy/data/azure_data.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Uses th... | 36.668442 | 99 | 0.573426 |
2d916bd737be486a3851c5eaf0e58cc5583213d1 | 1,753 | py | Python | sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # The MIT License (MIT)
# Copyright (c) 2014 Microsoft Corporation
# 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... | 42.756098 | 80 | 0.775813 |
2d917e2efff40e3715391b54ac626d586bf6700d | 707 | py | Python | lemur/migrations/versions/1db4f82bc780_.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/migrations/versions/1db4f82bc780_.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/migrations/versions/1db4f82bc780_.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | """Add default rotation_policy to certs where it's missing
Revision ID: 1db4f82bc780
Revises: 3adfdd6598df
Create Date: 2018-08-03 12:56:44.565230
"""
# revision identifiers, used by Alembic.
revision = '1db4f82bc780'
down_revision = '3adfdd6598df'
import logging
from alembic import op
log = logging.getLogger(__n... | 20.794118 | 89 | 0.714286 |
2d91aaa382358d4149e7aee6f1087a114ed49d7b | 13,017 | py | Python | implementations/cpu_pathfinder_array_numba.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | null | null | null | implementations/cpu_pathfinder_array_numba.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | 4 | 2021-06-08T22:56:00.000Z | 2022-03-12T00:53:10.000Z | implementations/cpu_pathfinder_array_numba.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | null | null | null | from random import randint, seed
import cv2 as cv
import sys
import os
import math
import numpy as np
import heapq
from timeit import default_timer as timer
from numba import njit
OPEN = 1
CLOSED = 0
UNEXPLORED = 999999
# from numba import jit
# from numba.typed import List
# seed(42069)
seed(6969)
# functions fo... | 32.62406 | 95 | 0.550895 |
2d91d3308f130661173bd0f56368ecbdfd01ef57 | 5,041 | py | Python | download.py | scottblechman/youtubedl-wrapper | a21e3e8e4e319d04e701780488797dd43842cdcf | [
"Unlicense"
] | null | null | null | download.py | scottblechman/youtubedl-wrapper | a21e3e8e4e319d04e701780488797dd43842cdcf | [
"Unlicense"
] | 2 | 2020-05-06T04:52:39.000Z | 2020-05-06T05:29:49.000Z | download.py | scottblechman/youtubedl-wrapper | a21e3e8e4e319d04e701780488797dd43842cdcf | [
"Unlicense"
] | null | null | null | import datetime
import os
import youtube_dl
progress_service = None
def set_service(service):
"""Sets progress service to update on progress hook change."""
global progress_service
progress_service = service
# noinspection PyUnresolvedReferences
def __progress_hook(download):
"""Called automaticall... | 39.382813 | 112 | 0.635985 |
2d91efe32d92e7d21ca045fe197b0039c3db4a28 | 16,483 | py | Python | tests/jobs/test_local_task_job.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | tests/jobs/test_local_task_job.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | tests/jobs/test_local_task_job.py | santecapital/airflow | 7f02e56c9cb8b548624d13e9c2c2b89d753f996b | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2018-07-24T08:54:45.000Z | 2018-08-31T13:41:50.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... | 37.546697 | 105 | 0.618031 |
2d91f43b5a4db853bd525894c9200245165aabd6 | 21,307 | py | Python | gslib/commands/signurl.py | djnicolson/gsutil | 0e629ab55032b799ec728c05a71faf72cd49ff48 | [
"Apache-2.0"
] | null | null | null | gslib/commands/signurl.py | djnicolson/gsutil | 0e629ab55032b799ec728c05a71faf72cd49ff48 | [
"Apache-2.0"
] | null | null | null | gslib/commands/signurl.py | djnicolson/gsutil | 0e629ab55032b799ec728c05a71faf72cd49ff48 | [
"Apache-2.0"
] | 1 | 2020-07-03T00:59:53.000Z | 2020-07-03T00:59:53.000Z | # -*- coding: utf-8 -*-
# Copyright 2014 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 require... | 38.321942 | 83 | 0.665884 |
2d91faecab32901aba5a1f0c6a5e1abc4bb8219f | 495 | py | Python | documentation/namespaces/base.py | rjvanvoorhis/photomosaic-api | 83aeaebda87bbaa80c133cf9ceee5ae9c597e39d | [
"MIT"
] | null | null | null | documentation/namespaces/base.py | rjvanvoorhis/photomosaic-api | 83aeaebda87bbaa80c133cf9ceee5ae9c597e39d | [
"MIT"
] | null | null | null | documentation/namespaces/base.py | rjvanvoorhis/photomosaic-api | 83aeaebda87bbaa80c133cf9ceee5ae9c597e39d | [
"MIT"
] | null | null | null | from flask_restplus import Namespace
from documentation.models import (login_model, registration_model, auth_model, message_model, gallery_item, metadata,
friend_model, upload_img, user_model)
base_ns = Namespace('base', path='/', description='Base level operations')
for model in [log... | 55 | 117 | 0.735354 |
2d9255c1967ab94557c92518c2795d50d8013822 | 2,886 | py | Python | ibmsecurity/isam/base/license.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2018-04-24T19:57:09.000Z | 2018-04-24T19:57:09.000Z | ibmsecurity/isam/base/license.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/base/license.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2020-04-03T09:30:01.000Z | 2020-04-03T09:30:01.000Z | import logging
logger = logging.getLogger(__name__)
# URI for this module
uri = "/core/licenses"
requires_modules = None
requires_version = None
def install(isamAppliance, license, check_mode=False, force=False):
"""
install license in the appliance
license should be the filename of the license file
... | 33.55814 | 108 | 0.609494 |
2d9264716d5de213f0484d2e0663667846f28718 | 669 | py | Python | dapy/models/__init__.py | hassaniqbal209/data-assimilation | ec52d655395dbed547edf4b4f3df29f017633f1b | [
"MIT"
] | 11 | 2020-07-29T07:46:39.000Z | 2022-03-17T01:28:07.000Z | dapy/models/__init__.py | hassaniqbal209/data-assimilation | ec52d655395dbed547edf4b4f3df29f017633f1b | [
"MIT"
] | 1 | 2020-07-14T11:49:17.000Z | 2020-07-29T07:43:22.000Z | dapy/models/__init__.py | hassaniqbal209/data-assimilation | ec52d655395dbed547edf4b4f3df29f017633f1b | [
"MIT"
] | 10 | 2020-07-14T11:34:24.000Z | 2022-03-07T09:08:12.000Z | """Data assimilation example models."""
from dapy.models.linear_gaussian import DenseLinearGaussianModel
from dapy.models.netto_gimeno_mendes import NettoGimenoMendesModel
from dapy.models.lorenz_1963 import Lorenz1963Model
from dapy.models.lorenz_1996 import Lorenz1996Model
from dapy.models.majda_harlim import (
... | 29.086957 | 66 | 0.829596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.