hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
60d5a18193bcbacc1e10d31b266efef9ce286b0f | 9,808 | py | Python | hw9/source/pf_slam.py | Intelligent-Robot-Course/Homework | a90e626ce80de125935b09052747b562271838e1 | [
"MIT"
] | 11 | 2022-02-23T08:55:44.000Z | 2022-03-13T09:36:25.000Z | hw9/source/pf_slam.py | Intelligent-Robot-Course/Homework | a90e626ce80de125935b09052747b562271838e1 | [
"MIT"
] | null | null | null | hw9/source/pf_slam.py | Intelligent-Robot-Course/Homework | a90e626ce80de125935b09052747b562271838e1 | [
"MIT"
] | 6 | 2022-02-26T14:52:07.000Z | 2022-03-19T01:00:22.000Z | """
refer to Atsushi Sakai (@Atsushi_twi)
"""
import numpy as np
import math
import matplotlib.pyplot as plt
# Fast SLAM covariance
Q = np.diag([3.0, math.radians(10.0)])**2
R = np.diag([1.0, math.radians(20.0)])**2
# Simulation parameter
Qsim = np.diag([0.3, math.radians(2.0)])**2
Rsim = np.diag([0.5, math.rad... | 24.217284 | 85 | 0.516415 |
288489a2d770bd974db24ae723769b924250bfe5 | 8,085 | py | Python | kaolin/ops/conversions/pointcloud.py | orperel/kaolin | fb89bda65d5bd6e7922e53000b869d7e2457d34f | [
"ECL-2.0",
"Apache-2.0"
] | 3,747 | 2019-11-13T02:18:16.000Z | 2022-03-31T21:12:31.000Z | kaolin/ops/conversions/pointcloud.py | orperel/kaolin | fb89bda65d5bd6e7922e53000b869d7e2457d34f | [
"ECL-2.0",
"Apache-2.0"
] | 371 | 2019-11-13T14:50:59.000Z | 2022-03-22T19:40:06.000Z | kaolin/ops/conversions/pointcloud.py | orperel/kaolin | fb89bda65d5bd6e7922e53000b869d7e2457d34f | [
"ECL-2.0",
"Apache-2.0"
] | 482 | 2019-11-13T05:04:38.000Z | 2022-03-31T10:20:26.000Z | # Copyright (c) 2019-2020, NVIDIA CORPORATION. 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 a... | 41.891192 | 123 | 0.637477 |
cf4b0533b595af54e93651e632745beb4da78380 | 131 | py | Python | colors.py | sfhemstreet/TraderBot | f05248a65335e8a2eabdfe2ee954ed50a421ae0a | [
"MIT"
] | 3 | 2019-11-22T03:43:22.000Z | 2020-07-23T17:58:56.000Z | colors.py | sfhemstreet/TraderBot | f05248a65335e8a2eabdfe2ee954ed50a421ae0a | [
"MIT"
] | null | null | null | colors.py | sfhemstreet/TraderBot | f05248a65335e8a2eabdfe2ee954ed50a421ae0a | [
"MIT"
] | 3 | 2019-11-05T17:13:05.000Z | 2019-12-10T17:23:45.000Z | # color output :P
c = (
"\033[0m", # End of color
"\033[36m", # Cyan
"\033[91m", # Red
"\033[35m", # Magenta
) | 18.714286 | 31 | 0.458015 |
10f1045cc84ef1f58c7c8430e0518cb2308b7d4c | 373 | py | Python | Ar_Script/ar_280_进阶_类练习.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | null | null | null | Ar_Script/ar_280_进阶_类练习.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | 1 | 2020-01-19T01:19:57.000Z | 2020-01-19T01:19:57.000Z | Ar_Script/ar_280_进阶_类练习.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | null | null | null | class A:
def __init__(self):
print('A class call ')
class B(A):
def __init__(self):
print('B class call')
A.__init__(self)
class C(A):
def __init__(self):
print('C class call')
A.__init__(self)
class D(B,C):
def __init__(self):
print('D class call')
... | 17.761905 | 30 | 0.541555 |
1d5a71192e0800d7dd5e80cbeff06c773c40e9fa | 336 | py | Python | setup.py | TheWolfA2/cppstyle | cafa96e11a03da63c0dd34f6f9a6c5810d503285 | [
"MIT"
] | 1 | 2019-10-19T09:20:54.000Z | 2019-10-19T09:20:54.000Z | setup.py | TheWolfA2/cppstyle | cafa96e11a03da63c0dd34f6f9a6c5810d503285 | [
"MIT"
] | null | null | null | setup.py | TheWolfA2/cppstyle | cafa96e11a03da63c0dd34f6f9a6c5810d503285 | [
"MIT"
] | 1 | 2017-08-06T22:30:44.000Z | 2017-08-06T22:30:44.000Z | from setuptools import setup
setup(
name="183style",
description="University of Michigan EECS 183 style grader.",
install_requires=open("requirements.txt", "r").readlines(),
packages=["eecs183style"],
package_data={"eecs183style": ["rubric.ini"]},
scripts=["bin/183style"],
test_suite="eecs1... | 28 | 64 | 0.693452 |
ffd61e7ed05cf2b2f7015e669b18d2a5bedee6de | 8,523 | py | Python | train_scripts/train_stickBreaking_VAE.py | bvy007/vae | 4940ba32b359e9c827b6c492b671ac17a1135780 | [
"MIT"
] | 92 | 2016-05-20T15:07:25.000Z | 2021-11-09T00:17:25.000Z | train_scripts/train_stickBreaking_VAE.py | bvy007/vae | 4940ba32b359e9c827b6c492b671ac17a1135780 | [
"MIT"
] | 3 | 2018-04-15T10:36:36.000Z | 2020-12-23T11:53:24.000Z | train_scripts/train_stickBreaking_VAE.py | bvy007/vae | 4940ba32b359e9c827b6c492b671ac17a1135780 | [
"MIT"
] | 26 | 2016-08-08T01:39:08.000Z | 2021-05-29T17:06:09.000Z | import numpy as np
import cPickle
import os
import sys
import time
from os.path import join as pjoin
import theano
import theano.tensor as T
from models.StickBreaking_VAE import StickBreaking_VAE
from models.neural_net.activation_fns import Sigmoid, Identity, Softmax
from models.neural_net.loss_fns import *
from util... | 40.975962 | 165 | 0.661152 |
d02e58fede3ac39bdfbc0804fa24782d1c8994e8 | 3,767 | py | Python | stellar_sdk/xdr/stellar_value.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | null | null | null | stellar_sdk/xdr/stellar_value.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 27 | 2022-01-12T10:55:38.000Z | 2022-03-28T01:38:24.000Z | stellar_sdk/xdr/stellar_value.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 2 | 2021-12-02T12:42:03.000Z | 2021-12-07T20:53:10.000Z | # This is an automatically generated file.
# DO NOT EDIT or your changes may be overwritten
import base64
from typing import List
from xdrlib import Packer, Unpacker
from ..type_checked import type_checked
from .hash import Hash
from .stellar_value_ext import StellarValueExt
from .time_point import TimePoint
from .upg... | 30.877049 | 89 | 0.600478 |
a0b6ad07f6d07504d7b2d5dd3781b76fcf9c4180 | 1,706 | py | Python | utils/tree.py | snowflying/algorithm-in-python | d92e211119b8a786807942c2765058e522e37769 | [
"WTFPL"
] | 1 | 2020-05-14T06:15:29.000Z | 2020-05-14T06:15:29.000Z | utils/tree.py | snowflying/algorithm-in-python | d92e211119b8a786807942c2765058e522e37769 | [
"WTFPL"
] | null | null | null | utils/tree.py | snowflying/algorithm-in-python | d92e211119b8a786807942c2765058e522e37769 | [
"WTFPL"
] | 1 | 2022-03-22T00:32:56.000Z | 2022-03-22T00:32:56.000Z | ''' mbinary
#########################################################################
# File : tree.py
# Author: mbinary
# Mail: zhuheqin1@gmail.com
# Blog: https://mbinary.xyz
# Github: https://github.com/mbinary
# Created Time: 2018-12-11 15:56
# Description:
#########################################################... | 31.018182 | 112 | 0.575029 |
4cfb4fda2780b8183be9697bbcf6bd598e11dc76 | 2,523 | py | Python | homeassistant/components/camera/img_util.py | kauzu/core | 6eadc0c3033473381cb70babf9f7c813e183d2df | [
"Apache-2.0"
] | 2 | 2021-01-29T02:52:01.000Z | 2021-05-15T04:23:18.000Z | homeassistant/components/camera/img_util.py | kauzu/core | 6eadc0c3033473381cb70babf9f7c813e183d2df | [
"Apache-2.0"
] | 61 | 2020-10-16T17:36:17.000Z | 2022-03-31T06:03:36.000Z | homeassistant/components/camera/img_util.py | kauzu/core | 6eadc0c3033473381cb70babf9f7c813e183d2df | [
"Apache-2.0"
] | 7 | 2021-03-20T12:34:01.000Z | 2021-12-02T10:13:52.000Z | """Image processing for cameras."""
import logging
from typing import TYPE_CHECKING, cast
SUPPORTED_SCALING_FACTORS = [(7, 8), (3, 4), (5, 8), (1, 2), (3, 8), (1, 4), (1, 8)]
_LOGGER = logging.getLogger(__name__)
JPEG_QUALITY = 75
if TYPE_CHECKING:
from turbojpeg import TurboJPEG
from . import Image
def... | 29 | 92 | 0.640111 |
4c233cc840b32d8139464134635b7c46695a5efe | 972 | py | Python | setup.py | yueyedeai/simpletransformers | 61581575e663599f88519e4ff61a5176a8aa40c0 | [
"Apache-2.0"
] | null | null | null | setup.py | yueyedeai/simpletransformers | 61581575e663599f88519e4ff61a5176a8aa40c0 | [
"Apache-2.0"
] | null | null | null | setup.py | yueyedeai/simpletransformers | 61581575e663599f88519e4ff61a5176a8aa40c0 | [
"Apache-2.0"
] | 1 | 2019-11-18T11:39:41.000Z | 2019-11-18T11:39:41.000Z | from setuptools import find_packages, setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="simpletransformers",
version="0.7.8",
author="Thilina Rajapakse",
author_email="chaturangarajapakshe@gmail.com",
description="An easy-to-use wrapper library for the Transfo... | 28.588235 | 79 | 0.622428 |
679df2176efa3b853c925fb4ab0e7f9779012de1 | 16,036 | py | Python | applications/Fitters/models/menu.py | ozrite/web2py | 09851eb29c39cafa5bfe352cf3984f3d708f66b3 | [
"BSD-3-Clause"
] | null | null | null | applications/Fitters/models/menu.py | ozrite/web2py | 09851eb29c39cafa5bfe352cf3984f3d708f66b3 | [
"BSD-3-Clause"
] | null | null | null | applications/Fitters/models/menu.py | ozrite/web2py | 09851eb29c39cafa5bfe352cf3984f3d708f66b3 | [
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
# ----------------------------------------------------------------------------------------------------------------------
# Customize your APP title, subtitle and menus here
# --------------------------------------... | 48.011976 | 161 | 0.394612 |
c082ebba9d928ca05f759f0dbdb0cf90d2abbf66 | 166 | py | Python | testblog/users/urls.py | yanrenjie/TestBlog | 6e52b875b9f5738b14f5ee024bf7b575f02a1445 | [
"MIT"
] | null | null | null | testblog/users/urls.py | yanrenjie/TestBlog | 6e52b875b9f5738b14f5ee024bf7b575f02a1445 | [
"MIT"
] | null | null | null | testblog/users/urls.py | yanrenjie/TestBlog | 6e52b875b9f5738b14f5ee024bf7b575f02a1445 | [
"MIT"
] | null | null | null | # 进行Users子应用的视图路由
from django.urls import path
from users.views import RegisterView
urlpatterns = [
path('register/', RegisterView.as_view(), name='register')
] | 20.75 | 62 | 0.753012 |
44973894214841eb5ab0a680c834b04a5bada54a | 1,982 | py | Python | model/NeuMF.py | changhyeonnam/NCF | 2c7dc411d969a009881d34b1ab90bc1f8bc67d44 | [
"MIT"
] | 2 | 2022-02-17T04:38:34.000Z | 2022-02-17T04:38:37.000Z | model/NeuMF.py | changhyeonnam/NCF | 2c7dc411d969a009881d34b1ab90bc1f8bc67d44 | [
"MIT"
] | null | null | null | model/NeuMF.py | changhyeonnam/NCF | 2c7dc411d969a009881d34b1ab90bc1f8bc67d44 | [
"MIT"
] | 1 | 2022-03-22T16:53:20.000Z | 2022-03-22T16:53:20.000Z | import torch.nn as nn
import torch
from model.GMF import GMF
from model.MLP import MLP
class NeuMF(nn.Module):
def __init__(self,
num_users: int,
num_items: int,
num_factor: int = 8,
use_pretrain: bool = False,
layer=None, # layer... | 36.036364 | 106 | 0.617558 |
da2988bb667314909d1d5b312dcfffb3d0b5052a | 904 | py | Python | nn/functions.py | koonn/deep-learning-from-scratch | c2b5ad88fd6738fcfe0239e8259827b6f99f66ec | [
"MIT"
] | null | null | null | nn/functions.py | koonn/deep-learning-from-scratch | c2b5ad88fd6738fcfe0239e8259827b6f99f66ec | [
"MIT"
] | null | null | null | nn/functions.py | koonn/deep-learning-from-scratch | c2b5ad88fd6738fcfe0239e8259827b6f99f66ec | [
"MIT"
] | null | null | null | """活性化関数
"""
import numpy as np
def step(x):
"""
ステップ関数
Args:
x(np.array): 入力値
Returns: 活性化関数によって変換した出力値
"""
# xの要素が0より大ならTrue/そうでなければFalseに変換
y = x > 0
# Trueを1, Falseを0のフラグに変換
return y.astype(np.int)
def sigmoid(x):
"""
シグモイド関数
Args:
x(np.array... | 11.160494 | 42 | 0.516593 |
7080cc2f84e468f10bc3f3553412fc7d2db90b3d | 12,023 | py | Python | Collections-a-installer/community-general-2.4.0/plugins/modules/cloud/rackspace/rax_files.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 1 | 2020-12-23T13:27:39.000Z | 2020-12-23T13:27:39.000Z | Collections-a-installer/community-general-2.4.0/plugins/modules/cloud/rackspace/rax_files.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | null | null | null | Collections-a-installer/community-general-2.4.0/plugins/modules/cloud/rackspace/rax_files.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# (c) 2013, Paul Durivage <paul.durivage@rackspace.com>
# 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: rax_files
short_description: Ma... | 30.592875 | 133 | 0.61582 |
45e7b2bcadf8baea6c6ee19643e929023d0fa4f5 | 94 | py | Python | runestone_poetry_project/__init__.py | Kandongwe/RunestoneServer | f555868521b3717beec0ec42dbcbcb443c64686c | [
"MIT"
] | null | null | null | runestone_poetry_project/__init__.py | Kandongwe/RunestoneServer | f555868521b3717beec0ec42dbcbcb443c64686c | [
"MIT"
] | null | null | null | runestone_poetry_project/__init__.py | Kandongwe/RunestoneServer | f555868521b3717beec0ec42dbcbcb443c64686c | [
"MIT"
] | null | null | null | # *********
# |docname|
# *********
# This is required by Poetry in order to install scripts.
| 18.8 | 57 | 0.553191 |
80f1ee4c18f21fe35dda0485891f20988704de1e | 340 | py | Python | fdk_client/platform/models/CategoryMappingValues.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/CategoryMappingValues.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/CategoryMappingValues.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Platform Models."""
from marshmallow import fields, Schema
from marshmallow.validate import OneOf
from ..enums import *
from ..models.BaseSchema import BaseSchema
class CategoryMappingValues(BaseSchema):
# Catalog swagger.json
name = fields.Str(required=False)
catalog_id = fields.Int(re... | 15.454545 | 43 | 0.717647 |
0343c35001121a86c843efc687d550cadf749c60 | 2,091 | py | Python | theory/fractional_calculus/code/irrational_pi_e.py | lsiemens/lsiemens.github.io | d93bf32c8e849b6514aea0f8eb582c42543a53d6 | [
"BSD-3-Clause"
] | 1 | 2021-08-16T18:16:07.000Z | 2021-08-16T18:16:07.000Z | theory/fractional_calculus/code/irrational_pi_e.py | lsiemens/lsiemens.github.io | d93bf32c8e849b6514aea0f8eb582c42543a53d6 | [
"BSD-3-Clause"
] | 1 | 2015-03-08T23:16:36.000Z | 2015-12-29T02:17:16.000Z | theory/fractional_calculus/code/irrational_pi_e.py | lsiemens/lsiemens.github.io | d93bf32c8e849b6514aea0f8eb582c42543a53d6 | [
"BSD-3-Clause"
] | 1 | 2021-08-16T18:16:10.000Z | 2021-08-16T18:16:10.000Z | from matplotlib import pyplot
import numpy
x_max = 20
x = numpy.linspace(-x_max, x_max, 1024)
def f(z, theta=0.0):
return numpy.exp(numpy.e*z) + numpy.exp(numpy.pi*z) + numpy.exp(theta*1.0j)
def f_prime(z, theta=0.0):
return numpy.e*numpy.exp(numpy.e*z) + numpy.pi*numpy.exp(numpy.pi*z)
def G(u, v):
retu... | 29.041667 | 184 | 0.644668 |
f7dedf6598ee68cfa721353605323d791a12ebea | 22,534 | py | Python | tests/test_txtrader.py | rstms/txTrader | 3120eb47f10979e90c48cb66543378084bae624a | [
"MIT"
] | 43 | 2015-03-30T15:20:00.000Z | 2022-02-15T18:25:54.000Z | tests/test_txtrader.py | rstms/txTrader | 3120eb47f10979e90c48cb66543378084bae624a | [
"MIT"
] | 12 | 2015-08-05T17:36:28.000Z | 2020-05-03T23:23:42.000Z | tests/test_txtrader.py | rstms/txTrader | 3120eb47f10979e90c48cb66543378084bae624a | [
"MIT"
] | 25 | 2015-11-04T03:08:57.000Z | 2021-08-07T09:47:37.000Z | # -*- coding: utf-8 -*-
"""
test-txtrader.py
--------------
TxTrader unit/regression test script
Copyright (c) 2016 Reliance Systems Inc. <mkrueger@rstms.net>
Licensed under the MIT license. See LICENSE for details.
"""
from txtrader_client import API
import subprocess
import os
import signal
import time
... | 28.1675 | 493 | 0.594036 |
875133876f23855b12e23f76a160800fdd020742 | 2,266 | py | Python | salt/modules/mdadm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2015-10-06T22:25:22.000Z | 2015-10-06T22:25:22.000Z | salt/modules/mdadm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/modules/mdadm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | '''
Salt module to manage RAID arrays with mdadm
'''
# Import python libs
import os
import logging
# Import salt libs
import salt.utils
from salt.exceptions import CommandExecutionError
# Set up logger
log = logging.getLogger(__name__)
def __virtual__():
'''
mdadm provides raid functions for Linux
'''
... | 24.630435 | 61 | 0.508385 |
7d506cd425950761f837846db9bf8ad23dc80db9 | 2,999 | py | Python | tests/config/test_regex.py | Morrolan/cfripper | 4ed32c7fce919e3873317d213595976e60e285f7 | [
"Apache-2.0"
] | null | null | null | tests/config/test_regex.py | Morrolan/cfripper | 4ed32c7fce919e3873317d213595976e60e285f7 | [
"Apache-2.0"
] | null | null | null | tests/config/test_regex.py | Morrolan/cfripper | 4ed32c7fce919e3873317d213595976e60e285f7 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018-2019 Skyscanner 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 agreed to in writing, softwar... | 42.842857 | 81 | 0.678893 |
af1a571a7c090e92c76800b3dba6194e77d72595 | 2,139 | py | Python | PDF.co Web API/DOC To PDF API/Python/Convert DOC To PDF From URL/ConvertDocToPdfFromUrl.py | bytescout/ByteScout-SDK-SourceCode | 5ee8d4310e08d7b848d116aa65ab2c9c07b5f89e | [
"Apache-2.0"
] | 24 | 2017-01-13T13:43:21.000Z | 2021-12-23T07:57:19.000Z | PDF.co Web API/DOC To PDF API/Python/Convert DOC To PDF From URL/ConvertDocToPdfFromUrl.py | bytescout/ByteScout-SDK-SourceCode | 5ee8d4310e08d7b848d116aa65ab2c9c07b5f89e | [
"Apache-2.0"
] | 1 | 2017-03-29T08:22:18.000Z | 2017-05-13T12:27:02.000Z | PDF.co Web API/DOC To PDF API/Python/Convert DOC To PDF From URL/ConvertDocToPdfFromUrl.py | bytescout/ByteScout-SDK-SourceCode | 5ee8d4310e08d7b848d116aa65ab2c9c07b5f89e | [
"Apache-2.0"
] | 35 | 2016-08-03T19:15:44.000Z | 2022-03-27T16:38:58.000Z | import os
import requests # pip install requests
# The authentication key (API Key).
# Get your own by registering at https://app.pdf.co
API_KEY = "******************************************"
# Base URL for PDF.co Web API requests
BASE_URL = "https://api.pdf.co/v1"
# Direct URL of source DOC file.
# You can also upl... | 36.87931 | 192 | 0.625058 |
4a2fa24752ef99b817e027753649f755b4d95042 | 3,277 | py | Python | chrome/test/functional/media_stream_infobar.py | robclark/chromium | f097b6ea775c27e5352c94ddddd264dd2af21479 | [
"BSD-3-Clause"
] | 1 | 2019-07-22T23:03:26.000Z | 2019-07-22T23:03:26.000Z | chrome/test/functional/media_stream_infobar.py | robclark/chromium | f097b6ea775c27e5352c94ddddd264dd2af21479 | [
"BSD-3-Clause"
] | null | null | null | chrome/test/functional/media_stream_infobar.py | robclark/chromium | f097b6ea775c27e5352c94ddddd264dd2af21479 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import pyauto_functional
import pyauto
class MediaStreamInfobarTest(pyauto.PyUITest):
"""Performs basic tests on the media stre... | 40.45679 | 80 | 0.702777 |
33d52d7bdfb87a16b6e18b6f29d3d82d70e0fb10 | 4,325 | py | Python | kernel/components/boosting/vertfastsecureboost/vert_fast_secureboost_plan.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 39 | 2021-10-12T01:43:27.000Z | 2022-03-28T04:46:35.000Z | kernel/components/boosting/vertfastsecureboost/vert_fast_secureboost_plan.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 6 | 2021-10-14T02:11:47.000Z | 2022-03-23T02:41:50.000Z | kernel/components/boosting/vertfastsecureboost/vert_fast_secureboost_plan.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 10 | 2021-10-14T09:36:03.000Z | 2022-02-10T11:05:12.000Z | # Copyright 2021 Tianmian Tech. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 36.041667 | 103 | 0.708671 |
420ef1c5e8529868ddf0c4075e0a02c24ee58cbc | 1,925 | py | Python | crawler/everyday_crawler.py | littlePING-221/bilibili-data-visualization | 7e2d2b523371884e5ed03f0c25dc63448100a14d | [
"MIT"
] | 3 | 2022-03-03T08:10:31.000Z | 2022-03-19T17:23:48.000Z | crawler/everyday_crawler.py | littlePING-221/bilibili-data-visualization | 7e2d2b523371884e5ed03f0c25dc63448100a14d | [
"MIT"
] | null | null | null | crawler/everyday_crawler.py | littlePING-221/bilibili-data-visualization | 7e2d2b523371884e5ed03f0c25dc63448100a14d | [
"MIT"
] | null | null | null | import requests as rq
from pandas import DataFrame
import os
from os import path
import datetime as dt
import json
import time, random
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 QIHU 360SE'}
rank_api = 'https://api.bilibili.com/... | 34.375 | 146 | 0.637403 |
8333fa6c66040f562341ad706efe3c8f156dcb52 | 1,293 | py | Python | manage.py | smevirtual/aperte | cc63e2fbaaca4e1d38db911b496fe5cf32070886 | [
"Apache-2.0"
] | null | null | null | manage.py | smevirtual/aperte | cc63e2fbaaca4e1d38db911b496fe5cf32070886 | [
"Apache-2.0"
] | 12 | 2018-11-02T23:59:34.000Z | 2019-04-10T12:24:03.000Z | manage.py | smevirtual/aperte | cc63e2fbaaca4e1d38db911b496fe5cf32070886 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 SME Virtual Network Contributors. 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.... | 33.153846 | 80 | 0.668987 |
661582a6771cb213d1a0fa576d6df29f324bafcf | 3,008 | py | Python | reconcile/test/test_utils_ocm.py | mjlshen/qontract-reconcile | 9f2cae54af8a7087dfd6350b79c99f8a98d9b470 | [
"Apache-2.0"
] | null | null | null | reconcile/test/test_utils_ocm.py | mjlshen/qontract-reconcile | 9f2cae54af8a7087dfd6350b79c99f8a98d9b470 | [
"Apache-2.0"
] | null | null | null | reconcile/test/test_utils_ocm.py | mjlshen/qontract-reconcile | 9f2cae54af8a7087dfd6350b79c99f8a98d9b470 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from unittest.mock import patch
import pytest
from reconcile.utils.ocm import OCM
class TestVersionBlocked(TestCase):
@patch.object(OCM, "_init_access_token")
@patch.object(OCM, "_init_request_headers")
@patch.object(OCM, "_init_clusters")
# pylint: disable=arguments-di... | 34.181818 | 88 | 0.689827 |
401c56a7b0da912eefede7ea9b3922597c3c4d6c | 10,566 | py | Python | virtual/lib/python3.8/site-packages/adafruit_platformdetect/constants/boards.py | joaoferreira7991/gateway_pi | 023334f0794b747727bd8d29e1e5391f313df14c | [
"MIT"
] | 1 | 2020-09-03T16:21:59.000Z | 2020-09-03T16:21:59.000Z | virtual/lib/python3.8/site-packages/adafruit_platformdetect/constants/boards.py | joaoferreira7991/gateway_pi | 023334f0794b747727bd8d29e1e5391f313df14c | [
"MIT"
] | null | null | null | virtual/lib/python3.8/site-packages/adafruit_platformdetect/constants/boards.py | joaoferreira7991/gateway_pi | 023334f0794b747727bd8d29e1e5391f313df14c | [
"MIT"
] | null | null | null | """Definition of boards and/or ids"""
# Allow for aligned constant definitions:
BEAGLEBONE = "BEAGLEBONE"
BEAGLEBONE_BLACK = "BEAGLEBONE_BLACK"
BEAGLEBONE_BLUE = "BEAGLEBONE_BLUE"
BEAGLEBONE_BLACK_WIRELESS = "BEAGLEBONE_BLACK_WIRELESS"
BEAGLEBONE_POCKETBEAGLE = "BEAGLEBONE_POCKETBEAGLE"
BEAGLEBONE_GREEN = "BEAGLEBONE_G... | 25.833741 | 91 | 0.642627 |
547e4b283a2a069f75e0895eeaa561f180ff8db3 | 917 | py | Python | parsers/parse-certificates.py | sahil0/discover | c0fcb8ceff4a9e2911dc7a3920f2bb4df2ba41af | [
"MIT"
] | 7 | 2021-11-18T18:19:20.000Z | 2022-01-18T21:40:50.000Z | parsers/parse-certificates.py | sahil0/discover | c0fcb8ceff4a9e2911dc7a3920f2bb4df2ba41af | [
"MIT"
] | null | null | null | parsers/parse-certificates.py | sahil0/discover | c0fcb8ceff4a9e2911dc7a3920f2bb4df2ba41af | [
"MIT"
] | 1 | 2019-06-14T15:46:20.000Z | 2019-06-14T15:46:20.000Z | #!/usr/bin/env python
# This script works under py3 as well
import sys
import requests
from lxml import html
from texttable import Texttable
url = 'https://crt.sh/?q={0}&dir=v&sort=4&group=none'.format(sys.argv[1])
page = requests.get(url)
tree = html.fromstring(page.content)
# Gather data from HTML table rows via XP... | 24.783784 | 73 | 0.665213 |
82f2aa02266c2357ddafd0d374bb5a0989f6e7a6 | 4,287 | py | Python | tools/run_benchmark.py | stdjs/libtorrent | 50e118ac6f884e051a2bbca6a52be06cfdb5d9d9 | [
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | tools/run_benchmark.py | stdjs/libtorrent | 50e118ac6f884e051a2bbca6a52be06cfdb5d9d9 | [
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | tools/run_benchmark.py | stdjs/libtorrent | 50e118ac6f884e051a2bbca6a52be06cfdb5d9d9 | [
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
import argparse
import os
import time
import shutil
import subprocess
import sys
import platform
from linux_vmstat import capture_sample
from linux_vmstat import plot_output
from linux_vmstat import print_output_to_file
def main():
arg... | 30.621429 | 121 | 0.64404 |
980bcd0897099ed7fd9abee4c0ba1d081eaa905e | 1,803 | py | Python | VascGraph/GraphIO/ReadGraphFromXLSX.py | Damseh/VascularGraph | 9843c2ce1ef1e3d707061c4b14032bd060d7295a | [
"MIT"
] | 9 | 2020-05-23T01:22:40.000Z | 2022-03-01T07:01:49.000Z | build/lib/VascGraph/GraphIO/ReadGraphFromXLSX.py | Damseh/VascularGraph | 9843c2ce1ef1e3d707061c4b14032bd060d7295a | [
"MIT"
] | 4 | 2020-02-17T08:47:15.000Z | 2022-03-01T07:01:33.000Z | build/lib/VascGraph/GraphIO/ReadGraphFromXLSX.py | Damseh/VascularGraph | 9843c2ce1ef1e3d707061c4b14032bd060d7295a | [
"MIT"
] | 2 | 2020-03-08T10:41:44.000Z | 2021-05-02T14:13:03.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue May 7 11:24:41 2019
@author: rdamseh
"""
from VascGraph.GeomGraph import Graph
import numpy as np
class ReadGraphFromXLSX:
def __init__(self, filename, graph=None):
try:
import pandas as pn
except:
... | 22.822785 | 73 | 0.459789 |
71d54fb1c9b5daa7d5f8d9f5f5efff7237d98c72 | 2,203 | py | Python | tests/test_filter.py | dhellmann/spelling | f04252b8f66b321bc7b3af44c9d4f0aef23eec71 | [
"BSD-2-Clause"
] | null | null | null | tests/test_filter.py | dhellmann/spelling | f04252b8f66b321bc7b3af44c9d4f0aef23eec71 | [
"BSD-2-Clause"
] | null | null | null | tests/test_filter.py | dhellmann/spelling | f04252b8f66b321bc7b3af44c9d4f0aef23eec71 | [
"BSD-2-Clause"
] | 1 | 2021-12-24T21:05:53.000Z | 2021-12-24T21:05:53.000Z | #
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Tests for filters.
"""
import os
from pathlib import Path
import pytest
from enchant.tokenize import get_tokenizer
from sphinxcontrib.spelling import filters
def test_builtin_unicode():
f = filters.PythonBuiltinsFilter(None)
assert not f._ski... | 22.03 | 87 | 0.590558 |
427e8bb3d9cd61ff8c1a88a6cf0c4fc4f28f15d6 | 48,922 | py | Python | deepstream_ignition_IP_File_yolo.py | valdivj/Deepstream-IGN-Maker-YOLO | f38ece731e9797a525da932c3da2de77e48f45af | [
"Unlicense"
] | 18 | 2021-02-09T11:07:57.000Z | 2022-03-16T12:35:34.000Z | deepstream_ignition_IP_File_yolo.py | valdivj/Deepstream-IGN-Maker-YOLO | f38ece731e9797a525da932c3da2de77e48f45af | [
"Unlicense"
] | null | null | null | deepstream_ignition_IP_File_yolo.py | valdivj/Deepstream-IGN-Maker-YOLO | f38ece731e9797a525da932c3da2de77e48f45af | [
"Unlicense"
] | 3 | 2021-02-11T00:23:56.000Z | 2021-11-16T02:15:37.000Z |
#!/usr/bin/env python3
################################################################################
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software")... | 45.34013 | 849 | 0.652569 |
e51d67ae8b0477d692b60232473b69ae9abac9d6 | 677 | py | Python | database.py | SavvStudio/RHardstyleSpotify | 513b8589ba4ca49f2b7e9cb66cf9b0949c8f58ad | [
"MIT"
] | null | null | null | database.py | SavvStudio/RHardstyleSpotify | 513b8589ba4ca49f2b7e9cb66cf9b0949c8f58ad | [
"MIT"
] | null | null | null | database.py | SavvStudio/RHardstyleSpotify | 513b8589ba4ca49f2b7e9cb66cf9b0949c8f58ad | [
"MIT"
] | null | null | null | import sqlite3
import datetime
def log_run():
database = sqlite3.connect("rhard.db")
cursor = database.cursor()
today = datetime.datetime.today()
cursor.execute("INSERT INTO runs (date) VALUES (?)", (today,))
database.commit()
database.close()
def get_latest_run():
database = sqlite3.conne... | 30.772727 | 88 | 0.677991 |
dfa68dd12618a1938ca15ad9160d66f4ef7412c0 | 324 | py | Python | ds_format/__init__.py | peterkuma/ds-format | bb52ad47b1c43a397949fbef98c7d81ede5e3286 | [
"MIT"
] | null | null | null | ds_format/__init__.py | peterkuma/ds-format | bb52ad47b1c43a397949fbef98c7d81ede5e3286 | [
"MIT"
] | null | null | null | ds_format/__init__.py | peterkuma/ds-format | bb52ad47b1c43a397949fbef98c7d81ede5e3286 | [
"MIT"
] | null | null | null | from .drivers.netcdf import from_netcdf, to_netcdf
from .op import \
copy, \
get_attrs, \
get_dims, \
get_meta, \
get_var, \
get_vars, \
group_by, \
merge, \
rename, \
rename_dim, \
select, \
time_dt
from .io import read, readdir, index, write
from .validate import validate
from . import cmd
from . import m... | 17.052632 | 50 | 0.700617 |
f4767d4dee8fd0af8390745dba36b30b05f330a2 | 2,167 | py | Python | azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 2 | 2020-07-29T14:22:17.000Z | 2020-11-06T18:47:40.000Z | azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2016-08-01T07:37:04.000Z | 2016-08-01T07:37:04.000Z | azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 32.833333 | 80 | 0.571297 |
c774e6934e67018dcde8c4155ac38f658a7f2b26 | 1,209 | py | Python | tests/test_cap.py | dcdanko/MetaSUB_CAP | db5672b0206afb3ffe3204b0577a4a5f84b9bcd4 | [
"MIT"
] | 20 | 2017-11-02T13:36:16.000Z | 2021-07-23T12:44:28.000Z | tests/test_cap.py | dcdanko/MetaSUB_CAP | db5672b0206afb3ffe3204b0577a4a5f84b9bcd4 | [
"MIT"
] | 30 | 2018-02-22T18:25:02.000Z | 2019-11-06T15:03:34.000Z | tests/test_cap.py | dcdanko/MetaSUB_CAP | db5672b0206afb3ffe3204b0577a4a5f84b9bcd4 | [
"MIT"
] | 9 | 2018-04-26T22:12:08.000Z | 2020-08-06T01:04:54.000Z | """Test suite for metasub cap."""
from unittest import TestCase
from os import chdir
from subprocess import check_call
from functools import wraps
from tempfile import mkdtemp
from os.path import dirname
TEST_DIR = dirname(__file__)
def my_call(cmd):
cmd = f'/bin/bash -c "source activate cap && {cmd}"'
chec... | 26.866667 | 59 | 0.653433 |
3cfc1e13537bec92e0a94715928d2d0025da4ef9 | 2,749 | py | Python | framework/SupervisedLearning/KerasConvNetClassifier.py | sonatsen/raven | 30764491e7ecaa16de2a4e0ddab3bc9e169e5f95 | [
"Apache-2.0"
] | 2 | 2019-10-11T15:59:10.000Z | 2021-04-08T18:23:57.000Z | framework/SupervisedLearning/KerasConvNetClassifier.py | sonatsen/raven | 30764491e7ecaa16de2a4e0ddab3bc9e169e5f95 | [
"Apache-2.0"
] | 1 | 2018-03-27T13:06:00.000Z | 2018-03-27T13:06:00.000Z | framework/SupervisedLearning/KerasConvNetClassifier.py | sonatsen/raven | 30764491e7ecaa16de2a4e0ddab3bc9e169e5f95 | [
"Apache-2.0"
] | 1 | 2017-08-29T16:09:13.000Z | 2017-08-29T16:09:13.000Z | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 45.065574 | 135 | 0.640597 |
94e9b6a4d8f572b8418703f0f5dbc9256621b328 | 9,883 | py | Python | data/evaluation.py | dafrie/fin-disclosures-nlp | aa89013a1b3c621df261d70cad16aeef15c34d25 | [
"MIT"
] | 2 | 2020-06-08T17:07:17.000Z | 2020-06-25T16:04:38.000Z | data/evaluation.py | dafrie/fin-disclosures-nlp | aa89013a1b3c621df261d70cad16aeef15c34d25 | [
"MIT"
] | 2 | 2020-05-11T17:37:59.000Z | 2020-05-11T17:41:12.000Z | data/evaluation.py | dafrie/fin-disclosures-nlp | aa89013a1b3c621df261d70cad16aeef15c34d25 | [
"MIT"
] | null | null | null | import os
import json
import math
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.metrics import confusion_matrix, roc_auc_score, average_precision_score, roc_curve, precision_recall_curve, classification_report, multilabel_confusion_matrix
from .constants im... | 33.501695 | 171 | 0.631084 |
e408450fd809c8382f6f39d174f9c71bf13d2588 | 61 | py | Python | modules/ckanext-ytp_drupal/ckanext/ytp_drupal/celery_import.py | eetumans/opendata | 061f58550bcb820016a764cca4763ed0a5f627fe | [
"MIT"
] | 16 | 2018-07-12T14:26:02.000Z | 2022-02-24T12:10:00.000Z | modules/ckanext-ytp_drupal/ckanext/ytp_drupal/celery_import.py | eetumans/opendata | 061f58550bcb820016a764cca4763ed0a5f627fe | [
"MIT"
] | 751 | 2017-09-28T07:47:50.000Z | 2022-03-31T12:08:25.000Z | modules/ckanext-ytp_drupal/ckanext/ytp_drupal/celery_import.py | vrk-kpa/opendata-ckan | 8936e2d9e700b9e5534fe2a51eedc2d1ede8c10b | [
"MIT"
] | 6 | 2017-10-31T07:47:07.000Z | 2021-10-06T07:09:07.000Z |
def task_imports():
return ['ckanext.ytp_drupal.tasks']
| 15.25 | 39 | 0.704918 |
c421ce49de0d9147dda4590d63c5896f34211ca8 | 2,063 | py | Python | lib/surface/components/remove.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | lib/surface/components/remove.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | null | null | null | lib/surface/components/remove.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | 2 | 2020-11-04T03:08:21.000Z | 2020-11-05T08:14:41.000Z | # Copyright 2013 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 by applicable law or ag... | 31.738462 | 78 | 0.68444 |
0e35c95ec8c4bf2ba54539a492181cebaac0e7bb | 11,609 | py | Python | py/test/event_log_unittest.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | 3 | 2022-01-06T16:52:52.000Z | 2022-03-07T11:30:47.000Z | py/test/event_log_unittest.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | null | null | null | py/test/event_log_unittest.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | 1 | 2021-10-24T01:47:22.000Z | 2021-10-24T01:47:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittest for event_log.py."""
import collections
import logging
import os
import re
import shutil
i... | 31.546196 | 77 | 0.640538 |
36ab54af5b2d68bb1555916ae571797ed79a1d06 | 18,322 | py | Python | FtpWriteFile.py | esitarski/CrossMgr | de33b5ed662556ec659e6e2910f5fd0f88f25fa0 | [
"MIT"
] | 25 | 2015-02-26T01:26:10.000Z | 2022-03-25T15:46:55.000Z | FtpWriteFile.py | esitarski/CrossMgr | de33b5ed662556ec659e6e2910f5fd0f88f25fa0 | [
"MIT"
] | 76 | 2015-12-09T04:24:30.000Z | 2022-02-18T16:39:28.000Z | FtpWriteFile.py | esitarski/CrossMgr | de33b5ed662556ec659e6e2910f5fd0f88f25fa0 | [
"MIT"
] | 17 | 2015-04-23T07:37:13.000Z | 2020-01-22T17:47:16.000Z | import wx
import wx.lib.intctrl
import io
import os
import sys
import webbrowser
import ftputil
from urllib.parse import quote
import datetime
import threading
import Utils
import Model
import HelpSearch
from ExportGrid import getHeaderBitmap, drawQRCode
from WebServer import WriteHtmlIndexPage
import inspect
def line... | 33.742173 | 179 | 0.676837 |
f459b102e62ca17cde179b3203d490640edc3a14 | 5,348 | py | Python | selfdrive/car/__init__.py | kans-ky/openpilot | f65aca0e4ed42380d8f9618406beedce1861f0ff | [
"MIT"
] | null | null | null | selfdrive/car/__init__.py | kans-ky/openpilot | f65aca0e4ed42380d8f9618406beedce1861f0ff | [
"MIT"
] | null | null | null | selfdrive/car/__init__.py | kans-ky/openpilot | f65aca0e4ed42380d8f9618406beedce1861f0ff | [
"MIT"
] | 2 | 2022-02-06T03:36:51.000Z | 2022-02-19T08:13:01.000Z | # functions common among cars
from cereal import car
from common.numpy_fast import clip
# kg of standard extra cargo to count for drive, gas, etc...
STD_CARGO_KG = 136.
def gen_empty_fingerprint():
return {i: {} for i in range(0, 4)}
# FIXME: hardcoding honda civic 2016 touring params so they can be used to
# sc... | 37.929078 | 152 | 0.731675 |
eccced5af1119a21ab0750090f323a2d6b0ce874 | 6,892 | py | Python | usage-events.py | bookofheavymetal/dash-cytoscape | 72dcf940d4d3652b8cc8adf9176e9bd9ef42faf8 | [
"MIT"
] | null | null | null | usage-events.py | bookofheavymetal/dash-cytoscape | 72dcf940d4d3652b8cc8adf9176e9bd9ef42faf8 | [
"MIT"
] | null | null | null | usage-events.py | bookofheavymetal/dash-cytoscape | 72dcf940d4d3652b8cc8adf9176e9bd9ef42faf8 | [
"MIT"
] | null | null | null | import json
import dash
from dash.dependencies import Input, Output
from dash import dcc
from dash import html
import dash_cytoscape as cyto
app = dash.Dash(__name__)
server = app.server
# Object declaration
basic_elements = [
{
'data': {'id': 'one', 'label': 'Node 1'},
'renderedPosition': {'x':... | 28.01626 | 68 | 0.446605 |
5fd0f47745b6690e57b9f294b9e766cad9e85db6 | 3,844 | py | Python | pandas_ta/overlap/supertrend.py | codesutras/pandas-ta | 78598df9cfd2f165553262e85ae4c0392598d48c | [
"MIT"
] | 1 | 2021-11-07T19:09:01.000Z | 2021-11-07T19:09:01.000Z | pandas_ta/overlap/supertrend.py | codesutras/pandas-ta | 78598df9cfd2f165553262e85ae4c0392598d48c | [
"MIT"
] | null | null | null | pandas_ta/overlap/supertrend.py | codesutras/pandas-ta | 78598df9cfd2f165553262e85ae4c0392598d48c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import NaN as npNaN
from pandas import DataFrame
from pandas_ta.overlap import hl2
from pandas_ta.volatility import atr
from pandas_ta.utils import get_offset, verify_series
def supertrend(high, low, close, length=None, multiplier=None, offset=None, **kwargs):
"""Indicator: Supe... | 30.752 | 95 | 0.627732 |
0be96144215e3c2a66e1fb3c6a4741b56f45cf14 | 9,891 | py | Python | test/fuzz/test_runner.py | joynicoferna/carpinchocoin | 987284642d94e26c2b3b884c14846068d124a24a | [
"MIT"
] | null | null | null | test/fuzz/test_runner.py | joynicoferna/carpinchocoin | 987284642d94e26c2b3b884c14846068d124a24a | [
"MIT"
] | null | null | null | test/fuzz/test_runner.py | joynicoferna/carpinchocoin | 987284642d94e26c2b3b884c14846068d124a24a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run fuzz test targets.
"""
from concurrent.futures import ThreadPoolExecutor, as_completed
import argp... | 35.074468 | 180 | 0.600445 |
081c3378d118dfd418599914524adcd3041efaa6 | 799 | py | Python | projects/urls.py | enock24/Awaards | 61d5ca39758d19153b92fd056af84559c7f411dc | [
"MIT"
] | null | null | null | projects/urls.py | enock24/Awaards | 61d5ca39758d19153b92fd056af84559c7f411dc | [
"MIT"
] | null | null | null | projects/urls.py | enock24/Awaards | 61d5ca39758d19153b92fd056af84559c7f411dc | [
"MIT"
] | null | null | null | from django.urls import path,re_path,include
from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns =[
path('', views.index, name = 'index'),
re_path('project/(\d+)', views.get_project_by_id, name='project_results'),
path... | 42.052632 | 81 | 0.725907 |
333a04c26b0b01368e93c62d0975995a7b18a2c3 | 2,671 | py | Python | tests/models/validators/v3_0_0/jsd_a1e6c05d05e67906b3b59bbe6d274.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 36 | 2021-05-18T16:24:19.000Z | 2022-03-05T13:44:41.000Z | tests/models/validators/v3_1_0/jsd_a1e6c05d05e67906b3b59bbe6d274.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 15 | 2021-06-08T19:03:37.000Z | 2022-02-25T14:47:33.000Z | tests/models/validators/v3_0_0/jsd_a1e6c05d05e67906b3b59bbe6d274.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 6 | 2021-06-10T09:32:01.000Z | 2022-01-12T08:34:39.000Z | # -*- coding: utf-8 -*-
"""Identity Services Engine cloneMatrixCell data model.
Copyright (c) 2021 Cisco and/or its affiliates.
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... | 33.810127 | 80 | 0.613253 |
2b550c643e1ce1c055131d8a876cff70c5075c23 | 1,524 | py | Python | utils/fdfs/storage.py | lixiang30/dailyfresh | 0bfb893449a8d2e5012a7f7bf829e0631afa3c46 | [
"Apache-2.0"
] | null | null | null | utils/fdfs/storage.py | lixiang30/dailyfresh | 0bfb893449a8d2e5012a7f7bf829e0631afa3c46 | [
"Apache-2.0"
] | null | null | null | utils/fdfs/storage.py | lixiang30/dailyfresh | 0bfb893449a8d2e5012a7f7bf829e0631afa3c46 | [
"Apache-2.0"
] | null | null | null | from django.core.files.storage import Storage
from django.conf import settings
from fdfs_client.client import Fdfs_client
class FDFSStorage(Storage):
'''fast dfs文件存储类'''
def __init__(self, client_conf=None, base_url=None):
'''初始化'''
if client_conf is None:
client_conf = settings.FD... | 24.983607 | 56 | 0.566273 |
088f54312b1050702bb43af5d9bf8f25bc5bcbde | 23 | py | Python | examples/blueprints/blueprints/foo/__init__.py | CoRfr/flask-simpleldap | 6f112dc39a6a2f040824b1ae447db60a4498cec6 | [
"MIT"
] | 149 | 2015-02-20T19:38:25.000Z | 2020-06-07T16:18:06.000Z | examples/blueprints/blueprints/foo/__init__.py | CoRfr/flask-simpleldap | 6f112dc39a6a2f040824b1ae447db60a4498cec6 | [
"MIT"
] | 55 | 2015-01-06T13:47:10.000Z | 2020-05-27T01:49:21.000Z | examples/blueprints/blueprints/foo/__init__.py | CoRfr/flask-simpleldap | 6f112dc39a6a2f040824b1ae447db60a4498cec6 | [
"MIT"
] | 63 | 2015-01-06T10:02:47.000Z | 2020-04-10T11:59:04.000Z | from .views import foo
| 11.5 | 22 | 0.782609 |
f79535f26bfcfca24f5e69e06d58939802892b36 | 1,202 | py | Python | src/main.py | yebra06/RPNv1 | 8cd35daa91e5bfc6e5a0f3f01f28351089ed4dc4 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | yebra06/RPNv1 | 8cd35daa91e5bfc6e5a0f3f01f28351089ed4dc4 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | yebra06/RPNv1 | 8cd35daa91e5bfc6e5a0f3f01f28351089ed4dc4 | [
"BSD-3-Clause"
] | null | null | null | #Programmer: Alfredo Yebra Jr.
#Date: September 11, 2015
#Description: This program simulates an RPN (Reverse Polish Notation) Calculator. It implements a stack of
# integers and reads a file and determines if the data is an operation or an number value. It then evaluates
# an expression and calculate... | 36.424242 | 115 | 0.643095 |
2a4ff52aafaa5d622416a692667f10c792ae9025 | 15,625 | py | Python | yellowbrick/text/tsne.py | AndriyMulyar/yellowbrick | 29931a83e5d000769e5ae83ddec6f36a05a8a3ba | [
"Apache-2.0"
] | null | null | null | yellowbrick/text/tsne.py | AndriyMulyar/yellowbrick | 29931a83e5d000769e5ae83ddec6f36a05a8a3ba | [
"Apache-2.0"
] | null | null | null | yellowbrick/text/tsne.py | AndriyMulyar/yellowbrick | 29931a83e5d000769e5ae83ddec6f36a05a8a3ba | [
"Apache-2.0"
] | null | null | null | # yellowbrick.text.tsne
# Implements TSNE visualizations of documents in 2D space.
#
# Author: Benjamin Bengfort
# Author: Rebecca Bilbro
# Created: Mon Feb 20 06:33:29 2017 -0500
#
# Copyright (C) 2016 The scikit-yb developers
# For license information, see LICENSE.txt
#
# ID: tsne.py [6aa9198] benjamin@bengfort.... | 36.002304 | 96 | 0.620288 |
f5f3c983211d150ece1064ce0476203abcb92b2d | 8,343 | py | Python | src/atm/hash.py | hivesolutions/automium | a0579a8a9caa55031e5570fb520a721b2ab5cb22 | [
"Apache-1.1"
] | 2 | 2018-04-13T17:55:35.000Z | 2020-10-22T17:59:08.000Z | src/atm/hash.py | hivesolutions/automium | a0579a8a9caa55031e5570fb520a721b2ab5cb22 | [
"Apache-1.1"
] | null | null | null | src/atm/hash.py | hivesolutions/automium | a0579a8a9caa55031e5570fb520a721b2ab5cb22 | [
"Apache-1.1"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Automium System
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Automium System.
#
# Hive Automium System is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apache
... | 35.806867 | 79 | 0.617644 |
e7b16fb5edb1debfcdc925e5117cbd253e1c19c2 | 10,818 | py | Python | applications/popart/bert/tests/unit/data_test.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 260 | 2019-11-18T01:50:00.000Z | 2022-03-28T23:08:53.000Z | applications/popart/bert/tests/unit/data_test.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 27 | 2020-01-28T23:07:50.000Z | 2022-02-14T15:37:06.000Z | applications/popart/bert/tests/unit/data_test.py | payoto/graphcore_examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | [
"MIT"
] | 56 | 2019-11-18T02:13:12.000Z | 2022-02-28T14:36:09.000Z | # Copyright (c) 2019 Graphcore Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 34.452229 | 128 | 0.628305 |
2ca03e56b825ac56871ac308a94037b5282dd361 | 797 | py | Python | tests/test_api_v1_firewall_states.py | jaredhendrickson13/pfsense-api | 72d85801673eaba66bdc4a698fbed561c61130d6 | [
"Apache-2.0"
] | 311 | 2020-04-13T16:38:56.000Z | 2022-03-28T12:56:12.000Z | tests/test_api_v1_firewall_states.py | jaredhendrickson13/pfsense-api | 72d85801673eaba66bdc4a698fbed561c61130d6 | [
"Apache-2.0"
] | 171 | 2020-04-23T21:41:06.000Z | 2022-03-31T19:55:12.000Z | tests/test_api_v1_firewall_states.py | jaredhendrickson13/pfsense-api | 72d85801673eaba66bdc4a698fbed561c61130d6 | [
"Apache-2.0"
] | 48 | 2020-07-19T22:43:42.000Z | 2022-03-25T16:20:17.000Z | # Copyright 2022 Jared Hendrickson
#
# 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... | 36.227273 | 74 | 0.76788 |
3d7fd00364163185dfe8845e766cc696cbd10833 | 3,265 | py | Python | src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py | robszewczyk/openweave-core | f452cc55859daea83b3ce7af158c8e78b05cc3bc | [
"Apache-2.0"
] | 249 | 2017-09-18T17:48:34.000Z | 2022-02-02T06:46:21.000Z | src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py | robszewczyk/openweave-core | f452cc55859daea83b3ce7af158c8e78b05cc3bc | [
"Apache-2.0"
] | 501 | 2017-11-10T11:25:32.000Z | 2022-02-01T10:43:13.000Z | src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py | robszewczyk/openweave-core | f452cc55859daea83b3ce7af158c8e78b05cc3bc | [
"Apache-2.0"
] | 116 | 2017-09-20T07:06:55.000Z | 2022-01-08T13:41:15.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lic... | 44.121622 | 153 | 0.679326 |
0deddebf9eabd0e841fd9391d8a0e1de3cdfc83f | 3,937 | py | Python | cif_processing.py | rasin-tsukuba/CIF_Json_Parser | 495a8faf8c6909b1eb08da06e7462ec9e8d289b5 | [
"MIT"
] | 2 | 2020-09-23T09:01:13.000Z | 2021-02-20T03:39:16.000Z | cif_processing.py | rasin-tsukuba/CIF_Json_Parser | 495a8faf8c6909b1eb08da06e7462ec9e8d289b5 | [
"MIT"
] | null | null | null | cif_processing.py | rasin-tsukuba/CIF_Json_Parser | 495a8faf8c6909b1eb08da06e7462ec9e8d289b5 | [
"MIT"
] | 1 | 2020-09-23T09:00:51.000Z | 2020-09-23T09:00:51.000Z | import json
from glob import glob
def cif_parser(cif_dir, json_dir):
path = sorted(glob(cif_dir))
for i in path:
data = {}
name = i.split('/')[-1].split('\\')[-1].split('.')[0]
print(name)
data['name'] = name
data['info'] = {}
data['cell'] = {}
... | 41.010417 | 103 | 0.424181 |
a6761b5193d79b32589f89763a46e08fa5ac60cd | 1,737 | py | Python | tests/conftest.py | proteanhq/protean-sqlalchemy | d3dac46a6f0396521064ee3092c653c30942a077 | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | proteanhq/protean-sqlalchemy | d3dac46a6f0396521064ee3092c653c30942a077 | [
"BSD-3-Clause"
] | 6 | 2018-11-21T09:53:32.000Z | 2019-04-24T14:34:23.000Z | tests/conftest.py | proteanhq/protean-sqlalchemy | d3dac46a6f0396521064ee3092c653c30942a077 | [
"BSD-3-Clause"
] | null | null | null | """Module to setup Factories and other required artifacts for tests"""
import os
import pytest
os.environ['PROTEAN_CONFIG'] = 'tests.support.sample_config'
@pytest.fixture(scope="session", autouse=True)
def register_models():
"""Register Test Models with Dict Repo
Run only once for the entire test suite... | 31.017857 | 83 | 0.744387 |
6696b6f74eb8c997d0156c874dda13a6d8d9dac7 | 3,716 | py | Python | htdocs/plotting/auto/scripts/p5.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts/p5.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts/p5.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | """daily ranges"""
import calendar
from collections import OrderedDict
from pandas.io.sql import read_sql
import numpy as np
from pyiem import network
from pyiem.plot.use_agg import plt
from pyiem.util import get_autoplot_context, get_dbconn
PDICT = OrderedDict(
[('min_range', 'Minimum Daily High to Low Temperatu... | 32.884956 | 80 | 0.574812 |
129fced7667f302c4f76cd4168f73e6d927af8fe | 1,937 | py | Python | dlrn/migrations/versions/638f980c9169_add_tables_required_by_dlrn_api.py | morucci/DLRN | fe92c891d8d3a191371babfa98b6465dbd318877 | [
"Apache-2.0"
] | 9 | 2017-05-11T23:54:42.000Z | 2022-02-23T20:22:08.000Z | dlrn/migrations/versions/638f980c9169_add_tables_required_by_dlrn_api.py | morucci/DLRN | fe92c891d8d3a191371babfa98b6465dbd318877 | [
"Apache-2.0"
] | 18 | 2017-06-02T11:02:20.000Z | 2022-03-25T14:34:30.000Z | dlrn/migrations/versions/638f980c9169_add_tables_required_by_dlrn_api.py | morucci/DLRN | fe92c891d8d3a191371babfa98b6465dbd318877 | [
"Apache-2.0"
] | 7 | 2017-06-01T15:54:24.000Z | 2022-02-23T20:22:09.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.218182 | 77 | 0.623645 |
9fa1e3f3d409147106eb95de40b6f02c9edc0a16 | 1,233 | py | Python | bindings/python/setup.py | kant/data-broker | 0a1efd3cf1fac2c5eb17c12279609c444fb34228 | [
"Apache-2.0"
] | null | null | null | bindings/python/setup.py | kant/data-broker | 0a1efd3cf1fac2c5eb17c12279609c444fb34228 | [
"Apache-2.0"
] | null | null | null | bindings/python/setup.py | kant/data-broker | 0a1efd3cf1fac2c5eb17c12279609c444fb34228 | [
"Apache-2.0"
] | null | null | null | #
# Copyright © 2018 IBM 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 agree... | 36.264706 | 101 | 0.676399 |
6fb11dab318132b7d48ae7da289d2f449a654d8a | 638 | py | Python | mediagenerator/generators/bundles/provider.py | ostrovok-team/django-mediagenerator | 2d45d0154b12b9f17bc7047133b5b1b3bd7121e1 | [
"BSD-3-Clause"
] | 1 | 2020-11-13T12:57:46.000Z | 2020-11-13T12:57:46.000Z | mediagenerator/generators/bundles/provider.py | ostrovok-team/django-mediagenerator | 2d45d0154b12b9f17bc7047133b5b1b3bd7121e1 | [
"BSD-3-Clause"
] | 1 | 2021-12-17T09:22:09.000Z | 2021-12-17T09:23:35.000Z | mediagenerator/generators/bundles/provider.py | ostrovok-team/django-mediagenerator | 2d45d0154b12b9f17bc7047133b5b1b3bd7121e1 | [
"BSD-3-Clause"
] | null | null | null | from .settings import MEDIA_BUNDLES
class Provider(object):
def __init__(self, default_data=None):
self.default = default_data
self.p = {}
self.iterkey = -1
def set_data(self, data):
self.p = {}
self.update(data)
def update(self, bundles):
for bundle in bund... | 22 | 46 | 0.570533 |
94ae52649fbfa72606ed445e13b76549024e7c88 | 6,661 | py | Python | get_all_tickers/get_tickers.py | sunziming001/StockCrawler | c4103cfb0771b0d5f94acde375f385bb930947af | [
"MIT"
] | 1 | 2020-04-15T12:11:05.000Z | 2020-04-15T12:11:05.000Z | get_all_tickers/get_tickers.py | sunziming001/StockCrawler | c4103cfb0771b0d5f94acde375f385bb930947af | [
"MIT"
] | null | null | null | get_all_tickers/get_tickers.py | sunziming001/StockCrawler | c4103cfb0771b0d5f94acde375f385bb930947af | [
"MIT"
] | null | null | null | import pandas
from enum import Enum
# urls of CSV, from which the tickers will be extracted
_NYSE_URL = 'https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=nyse&render=download'
_NASDAQ_URL = 'https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=nasdaq&render=download'
... | 35.811828 | 117 | 0.656958 |
b01e06d302b4459eabdba453b98b19ba0aade7f6 | 2,250 | py | Python | examples/word-count/tests/test_word_count.py | c410-f3r/pyo3 | 5a927088355a275cad054c0505b8407d75fad2cc | [
"Apache-2.0"
] | 1 | 2022-02-11T02:58:37.000Z | 2022-02-11T02:58:37.000Z | examples/word-count/tests/test_word_count.py | c410-f3r/pyo3 | 5a927088355a275cad054c0505b8407d75fad2cc | [
"Apache-2.0"
] | 4 | 2021-03-15T06:24:10.000Z | 2022-01-24T21:03:09.000Z | examples/word-count/tests/test_word_count.py | c410-f3r/pyo3 | 5a927088355a275cad054c0505b8407d75fad2cc | [
"Apache-2.0"
] | 1 | 2021-09-13T19:48:16.000Z | 2021-09-13T19:48:16.000Z | import os
from concurrent.futures import ThreadPoolExecutor
import pytest
import word_count
current_dir = os.path.abspath(os.path.dirname(__file__))
path = os.path.join(current_dir, "zen-of-python.txt")
@pytest.fixture(scope="session")
def contents() -> str:
text = """
The Zen of Python, by Tim Peters
Beautif... | 30.821918 | 76 | 0.760889 |
a4403f37a9ebc48206acb3f99e52df4488810b37 | 1,896 | py | Python | api/metaschemas/views.py | chennan47/osf.io | 270608592b39a94941a3e329c0dc16d295a82472 | [
"Apache-2.0"
] | null | null | null | api/metaschemas/views.py | chennan47/osf.io | 270608592b39a94941a3e329c0dc16d295a82472 | [
"Apache-2.0"
] | null | null | null | api/metaschemas/views.py | chennan47/osf.io | 270608592b39a94941a3e329c0dc16d295a82472 | [
"Apache-2.0"
] | null | null | null | from rest_framework import generics, permissions as drf_permissions
from framework.auth.oauth_scopes import CoreScopes
from website.project.metadata.schemas import LATEST_SCHEMA_VERSION
from api.base import permissions as base_permissions
from api.base.views import JSONAPIBaseView
from api.base.utils import get_objec... | 33.263158 | 117 | 0.771624 |
2f40f73d9b0ee58301a3b4faf0c079fa812a40ce | 581 | py | Python | arcsign/assets.py | marielb/arcsign | 50a943f2abaaba325b0d06c3b3f85b2b25783c1a | [
"MIT"
] | null | null | null | arcsign/assets.py | marielb/arcsign | 50a943f2abaaba325b0d06c3b3f85b2b25783c1a | [
"MIT"
] | null | null | null | arcsign/assets.py | marielb/arcsign | 50a943f2abaaba325b0d06c3b3f85b2b25783c1a | [
"MIT"
] | null | null | null | from flask_assets import Bundle
common_css = Bundle(
'css/vendor/bootstrap.min.css',
'css/vendor/helper.css',
'css/main.css',
filters='cssmin',
output='public/css/common.css'
)
common_js = Bundle(
'js/vendor/underscore-min.js',
'js/vendor/jquery.min.js',
'js/vendor/bootstrap.min.js',
... | 22.346154 | 41 | 0.611015 |
ed3b54d4363d2aad5e1b1c69b7795934008b38e1 | 6,313 | py | Python | scripts/highlight.py | salewski/apitrace | f411d55bed84806369fc71029e5729090ed6d313 | [
"MIT"
] | 2 | 2015-01-22T07:15:44.000Z | 2016-03-01T08:12:55.000Z | scripts/highlight.py | gregory38/apitrace | 0627790166dccd8dd370fa7d9f434ed9fc027fb4 | [
"MIT"
] | null | null | null | scripts/highlight.py | gregory38/apitrace | 0627790166dccd8dd370fa7d9f434ed9fc027fb4 | [
"MIT"
] | 1 | 2018-10-05T03:09:13.000Z | 2018-10-05T03:09:13.000Z | #########################################################################
#
# Copyright 2011-2012 Jose Fonseca
# Copyright 2008-2009 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software")... | 27.211207 | 79 | 0.628861 |
1f3f6680dc77394f3f5df81356d3ce2d1387ad52 | 27,091 | py | Python | sklearn/manifold/_locally_linear.py | talahajeer/scikit-learn | d66b42708a5912039740cd08f747229433e579b5 | [
"BSD-3-Clause"
] | 1 | 2021-02-09T18:15:01.000Z | 2021-02-09T18:15:01.000Z | sklearn/manifold/_locally_linear.py | talahajeer/scikit-learn | d66b42708a5912039740cd08f747229433e579b5 | [
"BSD-3-Clause"
] | 1 | 2021-07-22T18:24:41.000Z | 2021-07-22T18:24:41.000Z | sklearn/manifold/_locally_linear.py | talahajeer/scikit-learn | d66b42708a5912039740cd08f747229433e579b5 | [
"BSD-3-Clause"
] | 2 | 2017-01-16T17:53:31.000Z | 2017-04-22T06:13:07.000Z | """Locally Linear Embedding"""
# Author: Fabian Pedregosa -- <fabian.pedregosa@inria.fr>
# Jake Vanderplas -- <vanderplas@astro.washington.edu>
# License: BSD 3 clause (C) INRIA 2011
import numpy as np
from scipy.linalg import eigh, svd, qr, solve
from scipy.sparse import eye, csr_matrix
from scipy.sparse.li... | 34.732051 | 88 | 0.58835 |
a489f07271bc923644900c268c28cb25acf5540a | 1,800 | py | Python | apps/habilidades_blandas/migrations/0001_initial.py | osw4l/villas-de-san-pablo | 89f00dfbbfbfee5111bd9852ddfbdb8727d10ed2 | [
"MIT"
] | null | null | null | apps/habilidades_blandas/migrations/0001_initial.py | osw4l/villas-de-san-pablo | 89f00dfbbfbfee5111bd9852ddfbdb8727d10ed2 | [
"MIT"
] | null | null | null | apps/habilidades_blandas/migrations/0001_initial.py | osw4l/villas-de-san-pablo | 89f00dfbbfbfee5111bd9852ddfbdb8727d10ed2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-21 18:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('personas', '0001_initial'),
]
... | 42.857143 | 168 | 0.603333 |
e160131aee8d34cddaab8357b8cd0969aea788d8 | 10,757 | py | Python | doppel/bin/analyze.py | bburns632/doppel-cli | e0c708f565db0f558bca6f2fbe28a41d45121344 | [
"BSD-3-Clause"
] | null | null | null | doppel/bin/analyze.py | bburns632/doppel-cli | e0c708f565db0f558bca6f2fbe28a41d45121344 | [
"BSD-3-Clause"
] | null | null | null | doppel/bin/analyze.py | bburns632/doppel-cli | e0c708f565db0f558bca6f2fbe28a41d45121344 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import inspect
import json
import os
import sys
import types
import re
def parse_args(args):
parser = argparse.ArgumentParser()
parser.add_argument(
"--pkg",
type=str,
help="Name of the python package to test"
)
parser.add_argument(
... | 39.259124 | 139 | 0.505996 |
ee29e0f2d9bb1ac687659fbbf9961d927ac4593d | 1,979 | py | Python | src/plugins/plugin_math.py | cdqwertz/bot | d7fa0b474509841a3bda6876b561a592fe31b84e | [
"MIT"
] | null | null | null | src/plugins/plugin_math.py | cdqwertz/bot | d7fa0b474509841a3bda6876b561a592fe31b84e | [
"MIT"
] | null | null | null | src/plugins/plugin_math.py | cdqwertz/bot | d7fa0b474509841a3bda6876b561a592fe31b84e | [
"MIT"
] | null | null | null | from message import *
import compare, random, datetime
class plugin_math():
def __init__(self):
pass
def is_number(self, string):
if string.startswith("-") and string[1:].isdigit():
return True
elif string.isdigit():
return True
elif "." in string:
a = string.split(".")
if len(a) == 2:
retur... | 23.559524 | 70 | 0.57807 |
808e376e88d650f409481f0ec94a1c6742afd962 | 4,108 | py | Python | backend/ui-fulfillment/fulfillment_service/assets/models.py | m0ps/gcp-fsi-design-pattern-ipre | 391fc03c70bd7e2fb38605980d25e32ede6c7d27 | [
"Apache-2.0"
] | 7 | 2021-06-23T08:09:42.000Z | 2022-01-16T05:17:07.000Z | backend/ui-fulfillment/fulfillment_service/assets/models.py | skylinepro/gcp-fsi-design-pattern-ipre | 7a933e742b29a4b1b9acde2c2a03ff29bf61e600 | [
"Apache-2.0"
] | null | null | null | backend/ui-fulfillment/fulfillment_service/assets/models.py | skylinepro/gcp-fsi-design-pattern-ipre | 7a933e742b29a4b1b9acde2c2a03ff29bf61e600 | [
"Apache-2.0"
] | 3 | 2021-06-29T12:53:09.000Z | 2021-12-14T01:34:50.000Z | import logging
from decimal import Decimal
from django.conf import settings
from django.db import models
from fulfillment_service.assets.exceptions import MLServiceError
from fulfillment_service.utils.fields import BigDecimalField, PositiveBigDecimalField
from fulfillment_service.wallets.models import Transaction
lo... | 35.111111 | 105 | 0.678432 |
d47c1c002503989a72f02329db1de4d5b9eb39f7 | 361 | py | Python | src/dicom_parser/data_elements/short_text.py | GalBenZvi/dicom_parser | fc3e892ebf99c4e5d62cb5e7de7df341baf445fe | [
"MIT"
] | 11 | 2020-08-08T21:41:54.000Z | 2021-07-27T12:48:31.000Z | src/dicom_parser/data_elements/short_text.py | GalBenZvi/dicom_parser | fc3e892ebf99c4e5d62cb5e7de7df341baf445fe | [
"MIT"
] | 45 | 2020-03-03T14:32:16.000Z | 2021-07-30T16:42:17.000Z | src/dicom_parser/data_elements/short_text.py | GalBenZvi/dicom_parser | fc3e892ebf99c4e5d62cb5e7de7df341baf445fe | [
"MIT"
] | 6 | 2021-10-19T09:19:22.000Z | 2022-03-13T19:26:10.000Z | """
Definition of the :class:`ShortText` class, representing a single "ST" data
element.
"""
from dicom_parser.data_element import DataElement
from dicom_parser.utils.value_representation import ValueRepresentation
class ShortText(DataElement):
#: The VR value of data elements represented by this class.
VALUE... | 30.083333 | 75 | 0.800554 |
d6519796fc1302de4cbb5c3eeb617c272dfd55fc | 7,519 | py | Python | digits/config/caffe.py | ojmakhura/DIGITS | f34e62c245054b51ea51fcb8949d2ca777f162d1 | [
"BSD-3-Clause"
] | null | null | null | digits/config/caffe.py | ojmakhura/DIGITS | f34e62c245054b51ea51fcb8949d2ca777f162d1 | [
"BSD-3-Clause"
] | null | null | null | digits/config/caffe.py | ojmakhura/DIGITS | f34e62c245054b51ea51fcb8949d2ca777f162d1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
import imp
import os
import platform
import re
import subprocess
import sys
from . import option_list
from digits import device_query
from digits.utils import parse_version
def load_from_envvar(envvar):
"""
Load information from an instal... | 31.460251 | 88 | 0.642639 |
c22f22edf6543150668ee86ed03ac91cae8fcd7e | 2,890 | py | Python | clouddq/classes/metadata_registry_defaults.py | GoogleCloudPlatform/cloud-data-quality | c8a3e95c5150e2ee0fb9cabc8e34ef861e4bf349 | [
"Apache-2.0"
] | 94 | 2021-03-19T17:35:19.000Z | 2022-03-30T02:03:31.000Z | clouddq/classes/metadata_registry_defaults.py | GoogleCloudPlatform/cloud-data-quality | c8a3e95c5150e2ee0fb9cabc8e34ef861e4bf349 | [
"Apache-2.0"
] | 50 | 2021-04-03T10:06:09.000Z | 2022-03-16T08:37:53.000Z | clouddq/classes/metadata_registry_defaults.py | GoogleCloudPlatform/cloud-data-quality | c8a3e95c5150e2ee0fb9cabc8e34ef861e4bf349 | [
"Apache-2.0"
] | 16 | 2021-04-09T15:34:39.000Z | 2022-03-16T16:51:01.000Z | # Copyright 2021 Google 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 in writing, ... | 35.243902 | 91 | 0.663668 |
2148043d197b3e322d9017afb91ea8b26054deee | 24,521 | py | Python | data_generators/base_go_problem.py | yesArjan/Playing-Go-with-RNNs | f2676a6888028adef13170e7632711565f805c1a | [
"Apache-2.0"
] | null | null | null | data_generators/base_go_problem.py | yesArjan/Playing-Go-with-RNNs | f2676a6888028adef13170e7632711565f805c1a | [
"Apache-2.0"
] | null | null | null | data_generators/base_go_problem.py | yesArjan/Playing-Go-with-RNNs | f2676a6888028adef13170e7632711565f805c1a | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import zipfile
import tarfile
import random
import math
import os
import re
from tensor2tensor.data_generators import generator_utils
from tensor2tensor.data_generators import problem
from tensor2tensor.utils import data_reader
from hparams.go_hparams_cnn import base_go_hparams_cnn
from utils ... | 38.615748 | 115 | 0.628971 |
9e988d3129e7cfc6c69d3d688b8c45a81c343538 | 931 | py | Python | tools/webdriver/webdriver/__init__.py | mtrzos/wpt | 6e559a60ecfa38ad6cc434911dd0995a63900db6 | [
"BSD-3-Clause"
] | null | null | null | tools/webdriver/webdriver/__init__.py | mtrzos/wpt | 6e559a60ecfa38ad6cc434911dd0995a63900db6 | [
"BSD-3-Clause"
] | null | null | null | tools/webdriver/webdriver/__init__.py | mtrzos/wpt | 6e559a60ecfa38ad6cc434911dd0995a63900db6 | [
"BSD-3-Clause"
] | null | null | null | # flake8: noqa (not ideal, but nicer than adding noqa: F401 to every line!)
from client import Cookies, Element, Find, Session, Timeouts, Window
from error import (
ElementNotSelectableException,
ElementNotVisibleException,
InvalidArgumentException,
InvalidCookieDomainException,
InvalidElementCoordi... | 32.103448 | 75 | 0.795918 |
c5dd0414a25f73b143fdf2b4e0cc89bd6a8f99ab | 1,388 | py | Python | runSims.py | mabergst/SOCS-8iC | 265b312d48625800627f048de32883b537fbbe99 | [
"MIT"
] | null | null | null | runSims.py | mabergst/SOCS-8iC | 265b312d48625800627f048de32883b537fbbe99 | [
"MIT"
] | null | null | null | runSims.py | mabergst/SOCS-8iC | 265b312d48625800627f048de32883b537fbbe99 | [
"MIT"
] | null | null | null | import numpy as np
from numpy.lib.twodim_base import tri
import plotly
import plotly.graph_objects as go
from IPython.core.display import HTML
import matplotlib
import matplotlib.cm
import GenerateHeightMap as genMap
import Erode
import InteractingErode
def matplotlib_to_plotly(cmap, pl_entries):
h = 1.0/(pl_entr... | 25.703704 | 90 | 0.732709 |
0a9c7174909889c81634caf3e7aa35930e662dfb | 1,613 | py | Python | run/filesystem/main_test.py | InstantDomain/python-docs-samples | f8e293c722998b269da38b7fe11b98aae8932b8f | [
"Apache-2.0"
] | 5,938 | 2015-05-18T05:04:37.000Z | 2022-03-31T20:16:39.000Z | run/filesystem/main_test.py | InstantDomain/python-docs-samples | f8e293c722998b269da38b7fe11b98aae8932b8f | [
"Apache-2.0"
] | 4,730 | 2015-05-07T19:00:38.000Z | 2022-03-31T21:59:41.000Z | run/filesystem/main_test.py | FFHixio/python-docs-samples | b39441b3ca0a7b27e9c141e9b43e78e729105573 | [
"Apache-2.0"
] | 6,734 | 2015-05-05T17:06:20.000Z | 2022-03-31T12:02:51.000Z | # Copyright 2021 Google 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 in writing, so... | 24.439394 | 74 | 0.713577 |
8a7e9962dac984727d2d89a3bb3aea78dbb665be | 1,317 | py | Python | tests/test_revision_data.py | nlocascio/pytest-alembic | 1b9bbae9ab424c238c25ed69e3bb19242ba40fbd | [
"MIT"
] | null | null | null | tests/test_revision_data.py | nlocascio/pytest-alembic | 1b9bbae9ab424c238c25ed69e3bb19242ba40fbd | [
"MIT"
] | null | null | null | tests/test_revision_data.py | nlocascio/pytest-alembic | 1b9bbae9ab424c238c25ed69e3bb19242ba40fbd | [
"MIT"
] | null | null | null | from pytest_alembic.revision_data import RevisionData, RevisionSpec
def test_from_config_empty():
RevisionData.from_config({})
RevisionData.from_config({"before_revision_data": {}, "at_revision_data": {}})
def test_revision_spec_input():
RevisionData.from_config(
{"before_revision_data": Revisio... | 29.266667 | 91 | 0.683371 |
6f126eb66d0044381ce9b9fc83a637c895ea67d4 | 225 | py | Python | django_feedback_api/urls.py | k0st1an/django-feedback-api | 6a7764e5b11695dc4a15d5969c24a11e0496f4f4 | [
"Apache-2.0"
] | 1 | 2017-12-13T01:47:35.000Z | 2017-12-13T01:47:35.000Z | django_feedback_api/urls.py | k0st1an/django-feedback-api | 6a7764e5b11695dc4a15d5969c24a11e0496f4f4 | [
"Apache-2.0"
] | null | null | null | django_feedback_api/urls.py | k0st1an/django-feedback-api | 6a7764e5b11695dc4a15d5969c24a11e0496f4f4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from rest_framework import routers
from django_feedback_api.views import FeedBackCreateViewSet
router = routers.SimpleRouter()
router.register(r'feedback', FeedBackCreateViewSet)
urlpatterns = router.urls
| 20.454545 | 59 | 0.826667 |
3722a92e0da776a3179bc6437a604762d721ade2 | 17,498 | py | Python | twilio/rest/preview/marketplace/installed_add_on/__init__.py | scotta/twilio-python | 93cf463f914f55c4c4bd1c259b834953dd81609d | [
"MIT"
] | 1 | 2021-02-24T04:59:03.000Z | 2021-02-24T04:59:03.000Z | twilio/rest/preview/marketplace/installed_add_on/__init__.py | scotta/twilio-python | 93cf463f914f55c4c4bd1c259b834953dd81609d | [
"MIT"
] | null | null | null | twilio/rest/preview/marketplace/installed_add_on/__init__.py | scotta/twilio-python | 93cf463f914f55c4c4bd1c259b834953dd81609d | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import ... | 35.637475 | 121 | 0.655961 |
f45e40f7c5db0c1a7c6a28c87ad1b2ac86da31df | 31,182 | py | Python | varsomscripts/matrix.py | NVE/varsomdata | 9de2757b66c157feb731827dfa14f7b58d3d4ccd | [
"MIT"
] | 1 | 2020-03-19T13:48:31.000Z | 2020-03-19T13:48:31.000Z | varsomscripts/matrix.py | NVE/varsomdata | 9de2757b66c157feb731827dfa14f7b58d3d4ccd | [
"MIT"
] | 12 | 2020-10-05T16:05:36.000Z | 2021-06-28T11:11:41.000Z | varsomscripts/matrix.py | NVE/varsomdata | 9de2757b66c157feb731827dfa14f7b58d3d4ccd | [
"MIT"
] | 1 | 2020-06-16T10:58:23.000Z | 2020-06-16T10:58:23.000Z | # -*- coding: utf-8 -*-
__author__ = 'raek'
from varsomdata import getforecastapi as gfa
from varsomdata import makepickle as mp
import matplotlib as mpl
import pylab as plb
import setenvironment as thisenv
import setcoreenvironment as env
import numpy as np
from utilities import readfile as rf
from varsomdata import ... | 42.194858 | 159 | 0.622699 |
ccb78cc2160a73d24ff92aa199dafce86e11e8ce | 7,283 | py | Python | pypy/module/_csv/interp_csv.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | pypy/module/_csv/interp_csv.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | pypy/module/_csv/interp_csv.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.typedef import TypeDef, interp_attrproperty
from pypy.interpreter.typedef import GetSetProperty
from pypy.interpreter.gateway import interp2app
QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QU... | 38.331579 | 88 | 0.630784 |
489e4fd6764688614d301432d6240969fafa9faf | 15,585 | py | Python | napari/_qt/widgets/qt_highlight_preview.py | wadhikar/napari | 954fc69a5c6939c473021994d41ff14a384399f4 | [
"BSD-3-Clause"
] | 1 | 2021-04-24T10:10:54.000Z | 2021-04-24T10:10:54.000Z | napari/_qt/widgets/qt_highlight_preview.py | wadhikar/napari | 954fc69a5c6939c473021994d41ff14a384399f4 | [
"BSD-3-Clause"
] | 2 | 2021-05-17T02:15:08.000Z | 2022-03-12T21:19:52.000Z | napari/_qt/widgets/qt_highlight_preview.py | wadhikar/napari | 954fc69a5c6939c473021994d41ff14a384399f4 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from qtpy.QtCore import QSize, Qt, Signal
from qtpy.QtGui import QColor, QIntValidator, QPainter, QPainterPath, QPen
from qtpy.QtWidgets import (
QDialog,
QFrame,
QHBoxLayout,
QLabel,
QLineEdit,
QSlider,
QVBoxLayout,
QWidget,
)
from ...utils.translations import transl... | 26.87069 | 91 | 0.564645 |
814beb79183f967d29ae91c29c952aaa81f60983 | 216 | py | Python | tests/endtoend/dependency_functions/.python_packages/lib/site-packages/google/protobuf/__init__.py | anandagopal6/azure-functions-python-worker | e4adb351e5454c093fcefbf0fb84f200af32f386 | [
"MIT"
] | 277 | 2018-01-25T23:13:03.000Z | 2022-02-22T06:12:04.000Z | tests/endtoend/dependency_functions/.python_packages/lib/site-packages/google/protobuf/__init__.py | anandagopal6/azure-functions-python-worker | e4adb351e5454c093fcefbf0fb84f200af32f386 | [
"MIT"
] | 731 | 2018-01-18T18:54:38.000Z | 2022-03-29T00:01:46.000Z | tests/endtoend/dependency_isolation_functions/.python_packages_grpc_protobuf/lib/site-packages/google/protobuf/__init__.py | YunchuWang/azure-functions-python-worker | 1f23e038a506c6412e4efbf07eb471a6afab0c2a | [
"MIT"
] | 109 | 2018-01-18T02:22:57.000Z | 2022-02-15T18:59:54.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# This is a dummy protobuf==3.9.0 package used for E2E
# testing in Azure Functions Python Worker
__version__ = '3.9.0'
| 27 | 59 | 0.75 |
facfc0e6ada30693047e51735e4692cbfd6fa5b5 | 1,068 | py | Python | scripts/generate_sample_pcs.py | jderam/hyperborea3 | c9a7aced16793f501f9befae15a47b07a8451edc | [
"MIT"
] | 2 | 2022-01-07T22:53:19.000Z | 2022-02-01T07:46:13.000Z | scripts/generate_sample_pcs.py | jderam/hyperborea-tools | c9a7aced16793f501f9befae15a47b07a8451edc | [
"MIT"
] | 60 | 2021-12-29T04:57:27.000Z | 2022-02-12T09:50:55.000Z | scripts/generate_sample_pcs.py | jderam/hyperborea-tools | c9a7aced16793f501f9befae15a47b07a8451edc | [
"MIT"
] | null | null | null | from pathlib import Path
import json
from hyperborea3.chargen import get_level, get_xp_to_next
from hyperborea3.player_character import PlayerCharacter
from hyperborea3.valid_data import VALID_CLASS_ID_MAP
def generate_sample_pcs():
root_dir = f"{Path(__file__).parent.parent}/hyperborea3/sample_data/PlayerCharact... | 35.6 | 88 | 0.656367 |
333b538336d7cdc98efa799ceed9dbb65fe482b9 | 2,167 | py | Python | girder_annotation/setup.py | naglepuff/large_image | 4e928166f228fe894c38e4b01af5370e72f7229c | [
"Apache-2.0"
] | null | null | null | girder_annotation/setup.py | naglepuff/large_image | 4e928166f228fe894c38e4b01af5370e72f7229c | [
"Apache-2.0"
] | null | null | null | girder_annotation/setup.py | naglepuff/large_image | 4e928166f228fe894c38e4b01af5370e72f7229c | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import find_packages, setup
def prerelease_local_scheme(version):
"""
Return local scheme version unless building on master in CircleCI.
This function returns the local scheme version number
(e.g. 0.0.0.dev<N>+g<HASH>) unless building on CircleCI for a
pre-release in wh... | 33.859375 | 95 | 0.646977 |
d22b859cac1bd51d4959aafaa6c3f18c47698c25 | 1,737 | py | Python | ccal/_normalize_nd_array.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | 9 | 2017-10-09T16:54:58.000Z | 2018-12-14T19:49:03.000Z | ccal/_normalize_nd_array.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | 8 | 2017-03-11T04:43:04.000Z | 2018-12-10T09:47:14.000Z | ccal/_normalize_nd_array.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | 4 | 2017-03-10T19:12:28.000Z | 2022-01-02T21:11:40.000Z | from numpy import full, nan
from scipy.stats import rankdata
from .check_nd_array_for_bad import check_nd_array_for_bad
def _normalize_nd_array(_nd_array, method, rank_method, raise_for_bad):
is_good = ~check_nd_array_for_bad(_nd_array, raise_for_bad=raise_for_bad)
nd_array_normalized = full(_nd_array.shap... | 24.814286 | 86 | 0.594128 |
e62b8ec5b66646ad1439cbf10083a02771e8fb7b | 7,851 | py | Python | test/test_diag_messages.py | i3thuan5/pymodbus | 5124afcb65181e5f800a05f42a932da15800189f | [
"W3C"
] | 1 | 2019-03-29T10:41:23.000Z | 2019-03-29T10:41:23.000Z | test/test_diag_messages.py | i3thuan5/pymodbus | 5124afcb65181e5f800a05f42a932da15800189f | [
"W3C"
] | null | null | null | test/test_diag_messages.py | i3thuan5/pymodbus | 5124afcb65181e5f800a05f42a932da15800189f | [
"W3C"
] | 1 | 2022-01-12T12:24:01.000Z | 2022-01-12T12:24:01.000Z | #!/usr/bin/env python
import unittest
from pymodbus.exceptions import *
from pymodbus.constants import ModbusPlusOperation
from pymodbus.diag_message import *
from pymodbus.diag_message import DiagnosticStatusRequest
from pymodbus.diag_message import DiagnosticStatusResponse
from pymodbus.diag_message import Diagnostic... | 53.773973 | 113 | 0.60349 |
9f2d3dc58dff1a46a59877b86537e6298b935f5c | 2,125 | py | Python | jesse/indicators/gauss.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 1 | 2021-03-25T09:25:49.000Z | 2021-03-25T09:25:49.000Z | jesse/indicators/gauss.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | null | null | null | jesse/indicators/gauss.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 1 | 2021-09-28T16:23:40.000Z | 2021-09-28T16:23:40.000Z | from typing import Union
import numpy as np
from numba import njit
from jesse.helpers import get_candle_source, slice_candles
def gauss(candles: np.ndarray, period: int = 14, poles: int = 4, source_type: str = "close",
sequential: bool = False) -> Union[float, np.ndarray]:
"""
Gaussian Filter
... | 31.25 | 119 | 0.554353 |
05348f74e3d97c9ce07309c5f063e1ec7c6fe716 | 1,686 | py | Python | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/sparse/csgraph/tests/test_traversal.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2021-02-05T13:19:58.000Z | 2021-02-05T13:19:58.000Z | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/sparse/csgraph/tests/test_traversal.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2018-04-15T22:59:15.000Z | 2018-04-15T22:59:15.000Z | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/sparse/csgraph/tests/test_traversal.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | null | null | null | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_array_almost_equal
from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree,\
csgraph_to_dense, csgraph_from_dense
def test_graph_breadth_first():
csgraph = np.array([[ 0, 1, 2, 0... | 35.87234 | 71 | 0.447805 |
0f98b110cef617f97575b7234ae599f361527478 | 4,134 | py | Python | page_get/basic.py | vfhky/WeiboSpider | 00e6e3f2fe0470be15482dc37ae65e9860137435 | [
"MIT"
] | 5 | 2019-09-21T05:19:24.000Z | 2021-08-05T07:47:18.000Z | page_get/basic.py | msak222/WeiboSpider | e330338c9565da6ba6c426cca4168df9f89faa63 | [
"MIT"
] | null | null | null | page_get/basic.py | msak222/WeiboSpider | e330338c9565da6ba6c426cca4168df9f89faa63 | [
"MIT"
] | 2 | 2019-05-08T04:14:21.000Z | 2020-05-24T10:30:03.000Z | # coding:utf-8
import os
import sys
import time
import requests
from tasks import login
from headers import headers
from logger.log import crawler
from db.redis_db import Urls
from db.redis_db import Cookies
from db.login_info import freeze_account, get_login_info
from page_parse.basic import is_403, is_404, is_complet... | 34.45 | 114 | 0.588534 |
d7d6be0fb3c43b5a3d677f9508fdbce02274c8dc | 55,996 | py | Python | google/cloud/automl_v1beta1/types/io.py | renovate-bot/python-automl | 5c1a9a383680bc5b89f514aa9a3aef47af9feac2 | [
"Apache-2.0"
] | null | null | null | google/cloud/automl_v1beta1/types/io.py | renovate-bot/python-automl | 5c1a9a383680bc5b89f514aa9a3aef47af9feac2 | [
"Apache-2.0"
] | null | null | null | google/cloud/automl_v1beta1/types/io.py | renovate-bot/python-automl | 5c1a9a383680bc5b89f514aa9a3aef47af9feac2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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... | 49.774222 | 266 | 0.682692 |
107765f3025d8000c80821b19c1a68ecaca3b58a | 2,526 | py | Python | evaluate/typo_model.py | tizz98/JamSpell | 0dbc4733e403524e30be16f32ff65fbbaedeb736 | [
"MIT"
] | 499 | 2018-01-24T12:59:18.000Z | 2022-03-31T22:45:34.000Z | evaluate/typo_model.py | tizz98/JamSpell | 0dbc4733e403524e30be16f32ff65fbbaedeb736 | [
"MIT"
] | 101 | 2018-01-25T06:18:52.000Z | 2022-03-16T09:58:19.000Z | evaluate/typo_model.py | tizz98/JamSpell | 0dbc4733e403524e30be16f32ff65fbbaedeb736 | [
"MIT"
] | 93 | 2018-01-25T08:15:44.000Z | 2022-03-31T22:45:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
import bisect
from scipy.stats import binom
import utils
# todo: calculate correct typo probabilities
TYPO_PROB = 0.03 # chance of making typo for a single letter
SECOND_TYPO_CF = 0.2 # chance of making two typos, relative to TYPO_PROB
REPLACE_PROB = 0.7
... | 24.288462 | 85 | 0.64806 |
de09e28464e3195773c12b384228be60523202b7 | 16,366 | py | Python | FigureS2.py | haesemeyer/GradientPrediction | 679b48768ad74dccd58f8c2f434ad60036fc5cb7 | [
"MIT"
] | 3 | 2019-08-01T19:30:48.000Z | 2022-03-22T16:32:56.000Z | FigureS2.py | haesemeyer/GradientPrediction | 679b48768ad74dccd58f8c2f434ad60036fc5cb7 | [
"MIT"
] | null | null | null | FigureS2.py | haesemeyer/GradientPrediction | 679b48768ad74dccd58f8c2f434ad60036fc5cb7 | [
"MIT"
] | 1 | 2020-12-02T07:42:56.000Z | 2020-12-02T07:42:56.000Z | # Copyright 2018 Martin Haesemeyer. All rights reserved.
#
# Licensed under the MIT license
"""
Script for panels of Figure S2 (Zebrafish network characterization)
"""
import os
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as pl
import seaborn as sns
from mo_types import MoTypes
import core ... | 44.961538 | 120 | 0.649701 |
6477631914c24898abc0e5540506d28e5d607b37 | 1,066 | py | Python | 2021/day-07/solution.py | laco/advent-of-code | 4cd07e583e0c05d26a30081f89f9920628341cd2 | [
"MIT"
] | null | null | null | 2021/day-07/solution.py | laco/advent-of-code | 4cd07e583e0c05d26a30081f89f9920628341cd2 | [
"MIT"
] | null | null | null | 2021/day-07/solution.py | laco/advent-of-code | 4cd07e583e0c05d26a30081f89f9920628341cd2 | [
"MIT"
] | null | null | null | # DAY-07
from statistics import median
def read_input():
with open("./input.txt", "r", encoding="utf-8") as f:
return [int(i) for i in f.read().split(",")]
def distance(positions, target):
return [abs(p - target) for p in positions]
input_data = read_input()
print("Solution - Part 1")
print(
... | 23.688889 | 77 | 0.678236 |
44ecdb266ce8b95a0e5c9142ded9e43ac2e0235a | 12,917 | py | Python | Lib/stringprep.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 52,316 | 2015-01-01T15:56:25.000Z | 2022-03-31T23:19:01.000Z | Lib/stringprep.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 25,286 | 2015-03-03T23:18:02.000Z | 2022-03-31T23:17:27.000Z | Lib/stringprep.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 31,623 | 2015-01-01T13:29:37.000Z | 2022-03-31T19:55:06.000Z | # This file is generated by mkstringprep.py. DO NOT EDIT.
"""Library that exposes various tables found in the StringPrep RFC 3454.
There are two kinds of tables: sets, for which a member test is provided,
and mappings, for which a mapping function is provided.
"""
from unicodedata import ucd_3_2_0 as unicodedata
ass... | 47.315018 | 175 | 0.652009 |
de6285347134b7c314a495deb98c4ca6aacb5342 | 683 | py | Python | tests/test_validate_ogc_urn.py | LandRegistry/datatypes-alpha | b7ec20c9aec84697aa49aaf6bff52fac3770a942 | [
"MIT"
] | null | null | null | tests/test_validate_ogc_urn.py | LandRegistry/datatypes-alpha | b7ec20c9aec84697aa49aaf6bff52fac3770a942 | [
"MIT"
] | null | null | null | tests/test_validate_ogc_urn.py | LandRegistry/datatypes-alpha | b7ec20c9aec84697aa49aaf6bff52fac3770a942 | [
"MIT"
] | 1 | 2021-04-11T06:07:21.000Z | 2021-04-11T06:07:21.000Z | import unittest
from datatypes import ogc_urn_validator
from datatypes.exceptions import DataDoesNotMatchSchemaException
class ValidatorsTestCase(unittest.TestCase):
def test_validate_ogc_urn(self):
try:
ogc_urn_validator.validate('urn:ogc:def:crs:EPSG::27700')
ogc_urn_validator.v... | 40.176471 | 115 | 0.749634 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.