hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a016080560981f030b6fcc190529f68ab9946c0 | 181 | py | Python | virtual/lib/python3.6/site-packages/reviews/apps.py | Eccie-K/Awards | 05bedf7c8aba4168d25715197d5bf3ad3e712ff8 | [
"MIT"
] | null | null | null | virtual/lib/python3.6/site-packages/reviews/apps.py | Eccie-K/Awards | 05bedf7c8aba4168d25715197d5bf3ad3e712ff8 | [
"MIT"
] | 3 | 2021-03-19T03:19:31.000Z | 2021-09-08T01:17:09.000Z | virtual/lib/python3.6/site-packages/reviews/apps.py | Eccie-K/Awards | 05bedf7c8aba4168d25715197d5bf3ad3e712ff8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class ReviewsAppConfig(AppConfig):
name = 'reviews'
verbose_name = _('Reviews')
| 20.111111 | 55 | 0.762431 |
4a01621fbc3f423181efd23a7dc2dbf2eb01822b | 10,441 | py | Python | test/test_seirpp.py | uiuc-covid19-modeling/pydemic | 3c0af60c2ac7e0dbf722584f61c45f9a2f993521 | [
"MIT"
] | 6 | 2020-05-29T22:52:30.000Z | 2020-11-08T23:27:07.000Z | test/test_seirpp.py | uiuc-covid19-modeling/pydemic | 3c0af60c2ac7e0dbf722584f61c45f9a2f993521 | [
"MIT"
] | null | null | null | test/test_seirpp.py | uiuc-covid19-modeling/pydemic | 3c0af60c2ac7e0dbf722584f61c45f9a2f993521 | [
"MIT"
] | 5 | 2020-06-12T01:47:18.000Z | 2022-03-29T13:26:09.000Z | __copyright__ = """
Copyright (C) 2020 George N Wong
Copyright (C) 2020 Zachary J Weiner
"""
__license__ = """
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 withou... | 32.833333 | 82 | 0.598219 |
4a01628168cc535f23e030b2ac023cbc269adc8e | 1,488 | py | Python | tests/benchmark_incr.py | mgorny/python-diskcache | b0451e084ea403c29980f683b8f0d8c9ac2a2dea | [
"Apache-2.0"
] | null | null | null | tests/benchmark_incr.py | mgorny/python-diskcache | b0451e084ea403c29980f683b8f0d8c9ac2a2dea | [
"Apache-2.0"
] | null | null | null | tests/benchmark_incr.py | mgorny/python-diskcache | b0451e084ea403c29980f683b8f0d8c9ac2a2dea | [
"Apache-2.0"
] | null | null | null | """Benchmark cache.incr method.
"""
from __future__ import print_function
import json
import multiprocessing as mp
import shutil
import time
import diskcache as dc
from .utils import secs
COUNT = int(1e3)
PROCS = 8
def worker(num):
"Rapidly increment key and time operation."
time.sleep(0.1) # Let other... | 21.257143 | 70 | 0.599462 |
4a01632cc25b26d22914eb270190f0cc647d5b6a | 591 | py | Python | src/video/dependencies.py | nakata5321/feecc-io-gateway | a7a70c3b7239142e7ee1b846916d28961020b1a9 | [
"Apache-2.0"
] | null | null | null | src/video/dependencies.py | nakata5321/feecc-io-gateway | a7a70c3b7239142e7ee1b846916d28961020b1a9 | [
"Apache-2.0"
] | 2 | 2021-11-27T09:31:12.000Z | 2022-03-23T13:15:57.000Z | src/video/dependencies.py | nakata5321/feecc-io-gateway | a7a70c3b7239142e7ee1b846916d28961020b1a9 | [
"Apache-2.0"
] | 2 | 2021-12-09T13:50:51.000Z | 2022-03-23T12:39:38.000Z | from fastapi import HTTPException, status
from .camera import Camera, Recording, cameras, records
def get_camera_by_number(camera_number: int) -> Camera:
"""get a camera by its number"""
if camera_number in cameras:
return cameras[camera_number]
raise HTTPException(status.HTTP_404_NOT_FOUND, f"N... | 29.55 | 86 | 0.732657 |
4a01636a03762be3c905969240689bb97115bb11 | 5,132 | py | Python | arviz/plots/traceplot.py | corriebar/arviz | 95f23c97d460969b043f20253da5dc81b8f97eb3 | [
"Apache-2.0"
] | null | null | null | arviz/plots/traceplot.py | corriebar/arviz | 95f23c97d460969b043f20253da5dc81b8f97eb3 | [
"Apache-2.0"
] | null | null | null | arviz/plots/traceplot.py | corriebar/arviz | 95f23c97d460969b043f20253da5dc81b8f97eb3 | [
"Apache-2.0"
] | null | null | null | """Plot kde or histograms and values from MCMC samples."""
def plot_trace(
data,
var_names=None,
coords=None,
divergences="bottom",
figsize=None,
textsize=None,
lines=None,
compact=False,
combined=False,
legend=False,
plot_kwargs=None,
fill_kwargs=None,
rug_kwargs=N... | 32.075 | 98 | 0.620616 |
4a0164203c09d358a833d707812289e15103b367 | 6,668 | py | Python | bindings/python/ensmallen_graph/datasets/string/listeriagrayi.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/listeriagrayi.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/listeriagrayi.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Listeria grayi.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 2021-02-02 2... | 34.910995 | 223 | 0.702759 |
4a0164ec55faa55dfebe952254adfcf2805427af | 119,530 | py | Python | components/isceobj/TopsProc/runIon.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-08-18T13:00:39.000Z | 2020-08-18T13:00:39.000Z | components/isceobj/TopsProc/runIon.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | components/isceobj/TopsProc/runIon.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #
# Author: Cunren Liang
# Copyright 2018
# California Institute of Technology
#
import os
import shutil
import datetime
import numpy as np
import numpy.matlib
import isceobj
import logging
from isceobj.Constants import SPEED_OF_LIGHT
from isceobj.TopsProc.runBurstIfg import loadVirtualArray
logger = logging.getLog... | 45.003765 | 236 | 0.639923 |
4a016518aa27e44e357a0485fd23684ed2c2ecca | 3,211 | py | Python | 07-Elemental-Matrices-and-The-Properties-of-Inversion/02-Implement-Inverse-of-Matrix/playLA/Matrix.py | hcc817/Mtianyan-Play-with-Linear-Algebra | 80e95a13cee0c4a8251adb84ff21956e7553638c | [
"Apache-2.0"
] | null | null | null | 07-Elemental-Matrices-and-The-Properties-of-Inversion/02-Implement-Inverse-of-Matrix/playLA/Matrix.py | hcc817/Mtianyan-Play-with-Linear-Algebra | 80e95a13cee0c4a8251adb84ff21956e7553638c | [
"Apache-2.0"
] | null | null | null | 07-Elemental-Matrices-and-The-Properties-of-Inversion/02-Implement-Inverse-of-Matrix/playLA/Matrix.py | hcc817/Mtianyan-Play-with-Linear-Algebra | 80e95a13cee0c4a8251adb84ff21956e7553638c | [
"Apache-2.0"
] | 1 | 2019-09-04T08:46:14.000Z | 2019-09-04T08:46:14.000Z | from .Vector import Vector
class Matrix:
def __init__(self, list2d):
self._values = [row[:] for row in list2d]
@classmethod
def zero(cls, r, c):
"""返回一个r行c列的零矩阵"""
return cls([[0] * c for _ in range(r)])
@classmethod
def identity(cls, n):
"""返回一个n行n列的单位矩阵"""
... | 28.415929 | 108 | 0.530053 |
4a01667f874567443940efcb396c159e07defa8c | 380 | py | Python | spinach/contrib/spinachd/signals.py | 0xDEC0DE/spinach | 8a719cfed41183a01d834830b8b4a5bd14756ea4 | [
"BSD-2-Clause"
] | null | null | null | spinach/contrib/spinachd/signals.py | 0xDEC0DE/spinach | 8a719cfed41183a01d834830b8b4a5bd14756ea4 | [
"BSD-2-Clause"
] | null | null | null | spinach/contrib/spinachd/signals.py | 0xDEC0DE/spinach | 8a719cfed41183a01d834830b8b4a5bd14756ea4 | [
"BSD-2-Clause"
] | null | null | null | from django.db import reset_queries, close_old_connections
from spinach import signals
from .apps import spin
@signals.job_started.connect_via(spin.namespace)
def job_started(*args, job=None, **kwargs):
reset_queries()
close_old_connections()
@signals.job_finished.connect_via(spin.namespace)
def job_finis... | 22.352941 | 58 | 0.781579 |
4a01680e4425dfd5896b98730a016af1e361a87c | 6,371 | py | Python | Examples/Braced Frame - Spring Supported.py | maderero/PyNite | 20fd90c126e3eb0487d541b86bd5a057208af780 | [
"MIT"
] | null | null | null | Examples/Braced Frame - Spring Supported.py | maderero/PyNite | 20fd90c126e3eb0487d541b86bd5a057208af780 | [
"MIT"
] | null | null | null | Examples/Braced Frame - Spring Supported.py | maderero/PyNite | 20fd90c126e3eb0487d541b86bd5a057208af780 | [
"MIT"
] | null | null | null | # Example of a basic 2D tension-only braced frame with gravity and lateral
# loads. Units used for the model in this example are inches and kips.
# Import `FEModel3D` from `PyNite`
from PyNite import FEModel3D
# Create a new finite element model
braced_frame = FEModel3D()
# Add nodes (frame is 15 ft wide x 12 ft tal... | 46.845588 | 133 | 0.718098 |
4a01681835bc4ed651ca7d4416e86c79af5a562d | 5,475 | py | Python | base.py | jacksyyy/PurpurDocs | b2a4044e52233ab066985e4ac921da7cb8f31d97 | [
"BSD-2-Clause"
] | 6 | 2021-12-05T23:38:21.000Z | 2022-03-15T19:39:14.000Z | base.py | jacksyyy/PurpurDocs | b2a4044e52233ab066985e4ac921da7cb8f31d97 | [
"BSD-2-Clause"
] | 6 | 2021-12-09T11:57:38.000Z | 2022-03-16T00:37:45.000Z | base.py | jacksyyy/PurpurDocs | b2a4044e52233ab066985e4ac921da7cb8f31d97 | [
"BSD-2-Clause"
] | 14 | 2021-12-04T00:21:10.000Z | 2022-03-12T21:46:01.000Z | from os import makedirs, path
import requests
import yaml
import asyncio
import re
import sys
CONFIG_REGEX = re.compile(r'[^.]get(Boolean|Int|Double|String|List)\("(.+)",\s*(\w+)')
PERM_REGEX = re.compile(r'hasPermission\("(.+?)"\)')
LOG_DIR = './logs/'
PROJECT = {
'owner': 'PurpurMC',
'repo': 'Purpur',
... | 40.257353 | 130 | 0.610228 |
4a01684feb0d46e3d18df6df7c1008fc6fe9fb6e | 1,174 | py | Python | model-optimizer/mo/front/mxnet/extractors/broadcast_mul.py | mypopydev/dldt | 8cd639116b261adbbc8db860c09807c3be2cc2ca | [
"Apache-2.0"
] | 3 | 2019-07-08T09:03:03.000Z | 2020-09-09T10:34:17.000Z | model-optimizer/mo/front/mxnet/extractors/broadcast_mul.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 3 | 2020-11-13T18:59:18.000Z | 2022-02-10T02:14:53.000Z | model-optimizer/mo/front/mxnet/extractors/broadcast_mul.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 1 | 2018-12-14T07:56:02.000Z | 2018-12-14T07:56:02.000Z | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 30.894737 | 73 | 0.736797 |
4a016907455a10f0cb90d8e70b2491e754d2694c | 506 | py | Python | tests/python/grad_test.py | 447983454/taichi | 2bfbca88b2d8cb1a070da9a40c5422c99b23fc2f | [
"MIT"
] | 1 | 2020-06-01T14:22:19.000Z | 2020-06-01T14:22:19.000Z | tests/python/grad_test.py | 447983454/taichi | 2bfbca88b2d8cb1a070da9a40c5422c99b23fc2f | [
"MIT"
] | null | null | null | tests/python/grad_test.py | 447983454/taichi | 2bfbca88b2d8cb1a070da9a40c5422c99b23fc2f | [
"MIT"
] | null | null | null | import taichi as ti
from taichi import approx
def grad_test(tifunc, npfunc=None):
from autograd import grad
if npfunc is None:
npfunc = tifunc
x = ti.var(ti.f32)
y = ti.var(ti.f32)
ti.root.dense(ti.i, 1).place(x, x.grad, y, y.grad)
@ti.kernel
def func():
for i in x:
... | 17.448276 | 54 | 0.543478 |
4a016975957ed5eb08ff5318ba7250d82054fcf0 | 18,964 | py | Python | etcmodel/models/wikihop/run_wikihop.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | etcmodel/models/wikihop/run_wikihop.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | etcmodel/models/wikihop/run_wikihop.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 38.388664 | 80 | 0.699272 |
4a016a094721ff93e0d79ad3795737c01ebb46b0 | 1,348 | py | Python | tests/test_problems/test_zoo/test_diffeq/test_ivp_examples.py | christopheroates/probnum | 4ae63da307bd7279c3ce477ef68cbd0b8e30c73a | [
"MIT"
] | null | null | null | tests/test_problems/test_zoo/test_diffeq/test_ivp_examples.py | christopheroates/probnum | 4ae63da307bd7279c3ce477ef68cbd0b8e30c73a | [
"MIT"
] | null | null | null | tests/test_problems/test_zoo/test_diffeq/test_ivp_examples.py | christopheroates/probnum | 4ae63da307bd7279c3ce477ef68cbd0b8e30c73a | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import probnum.problems as pnpr
import probnum.problems.zoo.diffeq as diffeqzoo
ODE_LIST = [
diffeqzoo.vanderpol(),
diffeqzoo.threebody(),
diffeqzoo.rigidbody(),
diffeqzoo.lotkavolterra(),
diffeqzoo.logistic(),
diffeqzoo.seir(),
diffeqzoo.fitzhughnagumo(),
... | 24.509091 | 76 | 0.623145 |
4a016af0909efbd7f966d50e6e0e6974238ed8fa | 7,843 | py | Python | h/models/document/_document.py | BearerPipelineTest/h | 6b8b6600f5995463ca60ded9e4c82053d606f4de | [
"BSD-2-Clause"
] | 2,103 | 2015-01-07T12:47:49.000Z | 2022-03-29T02:38:25.000Z | h/models/document/_document.py | BearerPipelineTest/h | 6b8b6600f5995463ca60ded9e4c82053d606f4de | [
"BSD-2-Clause"
] | 4,322 | 2015-01-04T17:18:01.000Z | 2022-03-31T17:06:02.000Z | h/models/document/_document.py | admariner/h | 25ef1b8d94889df86ace5a084f1aa0effd9f4e25 | [
"BSD-2-Clause"
] | 389 | 2015-01-24T04:10:02.000Z | 2022-03-28T08:00:16.000Z | import logging
from datetime import datetime
from urllib.parse import urlparse
import sqlalchemy as sa
from h.db import Base, mixins
from h.models import Annotation
from h.models.document._exceptions import ConcurrentUpdateError
from h.models.document._meta import create_or_update_document_meta
from h.models.document... | 32.8159 | 99 | 0.643759 |
4a016beaa21640468ef3874988187f2c8a5969a1 | 355 | py | Python | doc/programming/parts/python-firebird-testproc-values-output-params.py | laigor/sqlrelay-non-english-fixes- | 7803f862ddbf88bca078c50d621c64c22fc0a405 | [
"PHP-3.01",
"CC-BY-3.0"
] | 16 | 2018-04-23T09:58:33.000Z | 2022-01-31T13:40:20.000Z | doc/programming/parts/python-firebird-testproc-values-output-params.py | laigor/sqlrelay-non-english-fixes- | 7803f862ddbf88bca078c50d621c64c22fc0a405 | [
"PHP-3.01",
"CC-BY-3.0"
] | null | null | null | doc/programming/parts/python-firebird-testproc-values-output-params.py | laigor/sqlrelay-non-english-fixes- | 7803f862ddbf88bca078c50d621c64c22fc0a405 | [
"PHP-3.01",
"CC-BY-3.0"
] | 4 | 2020-12-23T12:17:54.000Z | 2022-01-04T20:46:34.000Z | cur.prepareQuery("execute procedure exampleproc ?, ?, ?")
cur.inputBind("1",1)
cur.inputBind("2",1.1,2,1)
cur.inputBind("3","hello")
cur.defineOutputBindInteger("1")
cur.defineOutputBindDouble("2")
cur.defineOutputBindString("3",20)
cur.executeQuery()
out1=cur.getOutputBindInteger("1")
out2=cur.getOutputBindDouble("2")... | 29.583333 | 57 | 0.757746 |
4a016c080f06699df344bd86fb67ec9df19102d7 | 1,302 | py | Python | src/common/admin.py | kuriadn/fayvad | 7f26644b1407f7c493fff04126371a9e1ca53d58 | [
"MIT"
] | null | null | null | src/common/admin.py | kuriadn/fayvad | 7f26644b1407f7c493fff04126371a9e1ca53d58 | [
"MIT"
] | null | null | null | src/common/admin.py | kuriadn/fayvad | 7f26644b1407f7c493fff04126371a9e1ca53d58 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
class VehicleAdmin(admin.ModelAdmin):
fields = ('regno', 'dueinsurance',)
list_display = ('regno', 'dueinsurance',)
list_filter = ('regno', 'dueinsurance',)
list_per_page = 10
class DriverAdmin(admin.ModelAdmin):
fields = ('idno', 'fname', 'lname', 'ad... | 37.2 | 90 | 0.6851 |
4a016c1c5fc48559764b2c0a3d336a2ce19b745c | 14,767 | py | Python | test/functional/p2p-acceptblock.py | thomascvitale/herbsters | 451daf9bde43e5b97a32a4bb7578be16acbaca30 | [
"MIT"
] | 1 | 2020-06-28T19:49:26.000Z | 2020-06-28T19:49:26.000Z | test/functional/p2p-acceptblock.py | thomascvitale/herbsters | 451daf9bde43e5b97a32a4bb7578be16acbaca30 | [
"MIT"
] | 1 | 2020-06-27T00:10:05.000Z | 2020-06-27T08:16:21.000Z | test/functional/p2p-acceptblock.py | thomascvitale/herbsters | 451daf9bde43e5b97a32a4bb7578be16acbaca30 | [
"MIT"
] | 2 | 2020-02-05T23:43:32.000Z | 2020-06-26T15:29:15.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of unrequested blocks.
Setup: two nodes, node0+node1, not connected to each other. Nod... | 44.748485 | 113 | 0.674748 |
4a016d58199dd31f6544d1e39db366f36abb8df3 | 1,834 | py | Python | dataproc/list_clusters.py | spitfire55/python-docs-samples | b8fe0d1c5c9f7f5d27965fa3367117af7b1f0aed | [
"Apache-2.0"
] | 1 | 2019-02-07T21:26:34.000Z | 2019-02-07T21:26:34.000Z | dataproc/list_clusters.py | spitfire55/python-docs-samples | b8fe0d1c5c9f7f5d27965fa3367117af7b1f0aed | [
"Apache-2.0"
] | 16 | 2019-06-15T00:02:56.000Z | 2021-03-25T23:22:38.000Z | dataproc/list_clusters.py | spitfire55/python-docs-samples | b8fe0d1c5c9f7f5d27965fa3367117af7b1f0aed | [
"Apache-2.0"
] | 3 | 2019-02-11T16:16:11.000Z | 2019-04-19T21:34:37.000Z | #!/usr/bin/env python
# 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
# di... | 31.084746 | 75 | 0.721919 |
4a016ebe3cf7a57068b44b66692a24ee88f0bf96 | 4,031 | py | Python | tests/tasks/tasks/instr/test_apply_mag_field_task.py | Exopy/ecpy_hqc_legacy | 3e31a8865d130907a82005e6cd78d99c6da7a951 | [
"BSD-3-Clause"
] | null | null | null | tests/tasks/tasks/instr/test_apply_mag_field_task.py | Exopy/ecpy_hqc_legacy | 3e31a8865d130907a82005e6cd78d99c6da7a951 | [
"BSD-3-Clause"
] | 34 | 2015-12-14T22:06:57.000Z | 2018-02-07T08:40:47.000Z | tests/tasks/tasks/instr/test_apply_mag_field_task.py | Exopy/ecpy_hqc_legacy | 3e31a8865d130907a82005e6cd78d99c6da7a951 | [
"BSD-3-Clause"
] | 6 | 2018-04-20T14:48:54.000Z | 2021-06-23T22:25:17.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ------... | 34.75 | 84 | 0.576532 |
4a0170139270daf55a128f60c8aa17a6e85a3c17 | 3,191 | py | Python | ros/src/vision/scripts/species_recognition/shapeIdentification.py | purduerov/X12-Repo | 33574a9a07c3512d6db3a513d13a5666f60fc1f7 | [
"MIT"
] | 2 | 2020-01-13T17:28:59.000Z | 2020-02-14T01:00:14.000Z | ros/src/vision/scripts/species_recognition/shapeIdentification.py | purduerov/X12-Repo | 33574a9a07c3512d6db3a513d13a5666f60fc1f7 | [
"MIT"
] | 2 | 2019-10-23T23:16:36.000Z | 2020-10-10T17:52:27.000Z | ros/src/vision/scripts/species_recognition/shapeIdentification.py | purduerov/X12-Repo | 33574a9a07c3512d6db3a513d13a5666f60fc1f7 | [
"MIT"
] | 2 | 2020-02-15T19:00:38.000Z | 2020-02-15T19:00:40.000Z | import cv2
import numpy as np
from imutils.convenience import grab_contours
# Load in input images from the web
orig_img = cv2.imread("images/species1.jpg")
cap = cv2.VideoCapture(0)
""" Program to match shapes"""
def match_shapes(orig_img):
# Read in the images for matching
species = ["species_" + name fo... | 38.914634 | 118 | 0.662488 |
4a01702ae29eac6e10c08ecb4175fb5a1af16099 | 535 | py | Python | Pythonbot/broadcast_db.py | LEGEND-LX/PYTHONBOT.py.pkg | 897b05528990acf76fbb2a05538429cd5d178733 | [
"CC0-1.0"
] | 2 | 2021-09-09T06:50:21.000Z | 2021-10-01T16:59:30.000Z | Pythonbot/broadcast_db.py | LEGEND-LX/PYTHONBOT.py.pkg | 897b05528990acf76fbb2a05538429cd5d178733 | [
"CC0-1.0"
] | null | null | null | Pythonbot/broadcast_db.py | LEGEND-LX/PYTHONBOT.py.pkg | 897b05528990acf76fbb2a05538429cd5d178733 | [
"CC0-1.0"
] | null | null | null | from userbot.database import db_x
broadcast_db = db_x["BROADCAST_DB"]
async def add_broadcast_chat(chat_id):
await broadcast_db.insert_one({"chat_id": chat_id})
async def rmbroadcast_chat(chat_id):
await broadcast_db.delete_one({"chat_id": chat_id})
async def get_all_broadcast_chats():
lol = [la asyn... | 21.4 | 57 | 0.714019 |
4a01702af83ada3657b53340258f0d04c949bbfb | 3,032 | py | Python | mmtrack/core/bbox/transforms.py | BigBen0519/mmtracking | 61509b301ccbc2ab14f82a682b94c56f82ce09de | [
"Apache-2.0"
] | 2,226 | 2021-01-04T11:13:01.000Z | 2022-03-31T11:49:59.000Z | mmtrack/core/bbox/transforms.py | BigBen0519/mmtracking | 61509b301ccbc2ab14f82a682b94c56f82ce09de | [
"Apache-2.0"
] | 300 | 2021-01-04T11:36:59.000Z | 2022-03-31T07:48:28.000Z | mmtrack/core/bbox/transforms.py | BigBen0519/mmtracking | 61509b301ccbc2ab14f82a682b94c56f82ce09de | [
"Apache-2.0"
] | 333 | 2021-01-04T11:35:12.000Z | 2022-03-31T08:11:50.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmdet.core.bbox.transforms import bbox_xyxy_to_cxcywh
def quad2bbox(quad):
"""Convert quadrilateral to axis aligned box in [cx, cy, w, h] format.
Args:
quad (Tensor): of shape (N, 8), (8, ), (N, 4) or (4, ). The
coordinates... | 30.626263 | 76 | 0.528034 |
4a0171bd5ef87ae84f7c0fc3b03f93b5f2681e1c | 1,157 | py | Python | src/utils.py | nbip/IWAE | 3a5e38b4d6eafceb5ec47dbe59aee3b42ad576f6 | [
"MIT"
] | 5 | 2021-01-15T20:32:49.000Z | 2022-01-10T18:49:30.000Z | src/utils.py | nbip/IWAE | 3a5e38b4d6eafceb5ec47dbe59aee3b42ad576f6 | [
"MIT"
] | 7 | 2021-01-08T18:04:39.000Z | 2021-02-05T18:49:17.000Z | src/utils.py | nbip/IWAE | 3a5e38b4d6eafceb5ec47dbe59aee3b42ad576f6 | [
"MIT"
] | 3 | 2021-06-03T15:30:25.000Z | 2022-03-30T15:12:35.000Z | import tensorflow as tf
import numpy as np
from tensorflow import keras
def logmeanexp(log_w, axis):
max = tf.reduce_max(log_w, axis=axis)
return tf.math.log(tf.reduce_mean(tf.exp(log_w - max), axis=axis)) + max
def get_bias():
# ---- For initializing the bias in the final Bernoulli layer for p(x|z)
... | 25.152174 | 81 | 0.634399 |
4a0173fdfe521169efdd0f32c29305e861b4fa10 | 3,156 | py | Python | examples/pointnet++.py | DL-85/pytorch_geometric | eb12a94a667e881c4a6bff26b0453428bcb72393 | [
"MIT"
] | 2 | 2019-10-10T07:01:07.000Z | 2020-11-04T06:26:42.000Z | examples/pointnet++.py | cloudyyyyy/pytorch_geometric | 61d389b5f8ee700dda4d18cadca72f24c978fce1 | [
"MIT"
] | null | null | null | examples/pointnet++.py | cloudyyyyy/pytorch_geometric | 61d389b5f8ee700dda4d18cadca72f24c978fce1 | [
"MIT"
] | 1 | 2019-07-31T16:31:20.000Z | 2019-07-31T16:31:20.000Z | import os.path as osp
import torch
import torch.nn.functional as F
from torch.nn import Sequential as Seq, Linear as Lin, ReLU
from torch_geometric.datasets import ModelNet
import torch_geometric.transforms as T
from torch_geometric.data import DataLoader
from torch_geometric.nn import PointConv, fps, radius
path = o... | 32.875 | 77 | 0.619138 |
4a0174895f56546c92ccd87e792af476750db061 | 1,552 | py | Python | dev/fix_maxmx.py | navravi/amrclaw | 727d98d243c521267c927f6fe107ba6f1155597b | [
"BSD-3-Clause"
] | 16 | 2015-05-27T08:16:09.000Z | 2022-01-21T06:36:24.000Z | dev/fix_maxmx.py | navravi/amrclaw | 727d98d243c521267c927f6fe107ba6f1155597b | [
"BSD-3-Clause"
] | 107 | 2015-01-02T19:51:43.000Z | 2021-11-24T03:35:32.000Z | dev/fix_maxmx.py | BrisaDavis/amrclaw | c5cacdf00f1959e160ea5616cdf6ea7b6cd374f3 | [
"BSD-3-Clause"
] | 28 | 2015-01-10T00:03:56.000Z | 2022-02-11T23:52:34.000Z |
# Script used to get rid of maxmx and maxmy dependencies when converting
# from 4.x to 5.0 form. Executed in library and application directories.
#
# Fix a set of target files in directory tree rootdir by replacing
# oldpat with newpat.
#
# Now supports wildcards in list of targetfiles.
#
from __future__ import ab... | 29.846154 | 73 | 0.557345 |
4a01757afdbfad2e9ece92daadb0024f832d06c2 | 5,253 | py | Python | temboo/core/Library/Salesforce/Passwords/GetPasswordInfo.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/Salesforce/Passwords/GetPasswordInfo.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/Salesforce/Passwords/GetPasswordInfo.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | # -*- coding: utf-8 -*-
###############################################################################
#
# GetPasswordInfo
# Gets information on a user's password.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 44.516949 | 254 | 0.692747 |
4a017853ac9eb3a5d9d6118b8bdb75e0333cc2c7 | 174 | py | Python | human_services/phone_at_location/admin.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 12 | 2017-08-30T18:21:00.000Z | 2021-12-09T04:04:17.000Z | human_services/phone_at_location/admin.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 424 | 2017-08-08T18:32:14.000Z | 2022-03-30T21:42:51.000Z | human_services/phone_at_location/admin.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 7 | 2017-09-29T21:14:37.000Z | 2019-12-30T21:07:37.000Z | from django.contrib import admin
from human_services.phone_at_location import models
admin.site.register(models.PhoneNumberType)
admin.site.register(models.PhoneAtLocation)
| 29 | 51 | 0.867816 |
4a017899951f38d0d29fb6245b40c6052c0d800a | 1,670 | py | Python | agent/main.py | Danieldevop/Cryptongo | 8f3cf92563497aa49bbc3b926e8ada4eaabdc85a | [
"MIT"
] | null | null | null | agent/main.py | Danieldevop/Cryptongo | 8f3cf92563497aa49bbc3b926e8ada4eaabdc85a | [
"MIT"
] | null | null | null | agent/main.py | Danieldevop/Cryptongo | 8f3cf92563497aa49bbc3b926e8ada4eaabdc85a | [
"MIT"
] | null | null | null | import requests
import pymongo
API_URL = 'https://api.coinmarketcap.com/v1/ticker/'
def get_db_connection(uri):
client = pymongo.MongoClient(uri)
return client.cryptongo
def get_cryptocurrencies_from_api():
r = requests.get(API_URL)
if r.status_code == 200:
result = r.json()
return result
raise Ex... | 22.876712 | 66 | 0.726946 |
4a0178b5eaa1c6f07744ca28bd489a2ff8b33025 | 5,461 | py | Python | axis/param_cgi.py | Lokaltog/axis | f602ef8089ed0332317274e0433f4ede75109533 | [
"MIT"
] | null | null | null | axis/param_cgi.py | Lokaltog/axis | f602ef8089ed0332317274e0433f4ede75109533 | [
"MIT"
] | null | null | null | axis/param_cgi.py | Lokaltog/axis | f602ef8089ed0332317274e0433f4ede75109533 | [
"MIT"
] | null | null | null | """Axis Vapix parameter management.
https://www.axis.com/vapix-library/#/subjects/t10037719/section/t10036014
Lists Brand, Ports, Properties, Stream profiles.
"""
from .api import APIItem, APIItems
from .stream_profiles import StreamProfile
PROPERTY = "Properties.API.HTTP.Version=3"
URL = "/axis-cgi/param.cgi"
URL... | 28.89418 | 85 | 0.626808 |
4a0179031ae02d4606673510d7dae27a947dffca | 6,163 | py | Python | lib/modeling/matching.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | null | null | null | lib/modeling/matching.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | 1 | 2021-03-01T09:16:15.000Z | 2021-03-01T09:34:49.000Z | lib/modeling/matching.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import nn as mynn
class l1_distance_match_block(nn.Module):
def __init__(self, inplanes):
super(l1_distance_match_block, self).__init__()
self.in_channels = inplanes
self.globalAvgPool = nn.AdaptiveAvgPool2d(1)
self.... | 37.126506 | 127 | 0.583158 |
4a0179c323f4177511e9f22e88c1da56f40360d4 | 9,351 | py | Python | Main Code.py | OmarHanyOMH/Text-Editor | d786ad451e32b380682dd155f85b4d0139e6ceaf | [
"BSL-1.0"
] | 1 | 2021-04-17T13:40:47.000Z | 2021-04-17T13:40:47.000Z | Main Code.py | OmarHanyOMH/Text-Editor | d786ad451e32b380682dd155f85b4d0139e6ceaf | [
"BSL-1.0"
] | null | null | null | Main Code.py | OmarHanyOMH/Text-Editor | d786ad451e32b380682dd155f85b4d0139e6ceaf | [
"BSL-1.0"
] | null | null | null | # while True:
# out = input("enter code : ")
# while True:
# code = exec(out)
# Importing Required libraries & Modules
from tkinter import *
from tkinter import messagebox
from tkinter import filedialog
# Defining TextEditor Class
class TextEditor:
# Defining Constructor
def __init__(self,root):
... | 37.404 | 207 | 0.669768 |
4a017ba9769e53ab3239a325ddb856c5b49f2bd8 | 455 | py | Python | env/Lib/site-packages/plotly/validators/choroplethmapbox/_zmid.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/choroplethmapbox/_zmid.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/choroplethmapbox/_zmid.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class ZmidValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="zmid", parent_name="choroplethmapbox", **kwargs):
super(ZmidValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 35 | 85 | 0.663736 |
4a017c74dee3ca7a2cecac654ba8659402332a71 | 3,408 | py | Python | admin/handler/roleHandler.py | xin1195/smart | 11815b8a63f2459300e8aaad82b539cfef8a7546 | [
"Apache-2.0"
] | 1 | 2016-05-09T12:29:47.000Z | 2016-05-09T12:29:47.000Z | admin/handler/roleHandler.py | xin1195/smartSearch | 11815b8a63f2459300e8aaad82b539cfef8a7546 | [
"Apache-2.0"
] | null | null | null | admin/handler/roleHandler.py | xin1195/smartSearch | 11815b8a63f2459300e8aaad82b539cfef8a7546 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# _*_coding:utf-8_*_
import traceback
import tornado.web
from tornado import gen
from admin.handler.baseHandler import BaseHandler
from common.authLib import auth_permissions
from setting import logger
class AdminRoleHandler(BaseHandler):
@tornado.web.authenticated
@auth_permissions
... | 31.850467 | 122 | 0.588322 |
4a017e10eed34fefe3782c4bb422853ba052bc0f | 3,610 | py | Python | src/oci/core/models/shape_access_control_service_enabled_platform_options.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/core/models/shape_access_control_service_enabled_platform_options.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/core/models/shape_access_control_service_enabled_platform_options.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 35.392157 | 245 | 0.706094 |
4a017e775e89378438dabb8716a5ee057768e69d | 547 | py | Python | quiz2/quiz2_pw/app.py | damiankarol7/python101 | 1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b | [
"MIT"
] | 44 | 2015-02-11T19:10:37.000Z | 2021-11-11T09:45:43.000Z | quiz2/quiz2_pw/app.py | damiankarol7/python101 | 1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b | [
"MIT"
] | 9 | 2015-02-06T21:26:25.000Z | 2022-03-31T10:44:22.000Z | quiz2/quiz2_pw/app.py | damiankarol7/python101 | 1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b | [
"MIT"
] | 172 | 2015-06-13T07:16:24.000Z | 2022-03-30T20:41:11.000Z | # -*- coding: utf-8 -*-
# quiz_pw/app.py
from flask import Flask, g
from peewee import *
app = Flask(__name__)
# konfiguracja aplikacji, m.in. klucz do obsługi sesji HTTP wymaganej
# przez funkcję flash
app.config.update(dict(
SECRET_KEY='bardzosekretnawartosc',
TYTUL='Quiz 2 Peewee'
))
# tworzymy instancję... | 18.233333 | 69 | 0.714808 |
4a017e8ba1f780000df17970dfa142d74a1fc99c | 8,621 | py | Python | model.py | gasperverc13/Valute | 12e24b4574ed30d272283806b296f5fee5e09885 | [
"MIT"
] | null | null | null | model.py | gasperverc13/Valute | 12e24b4574ed30d272283806b296f5fee5e09885 | [
"MIT"
] | null | null | null | model.py | gasperverc13/Valute | 12e24b4574ed30d272283806b296f5fee5e09885 | [
"MIT"
] | null | null | null | import yfinance as yf
import json
import datetime as dt
import plotly.graph_objs as go
class Portfelj:
def __init__(self):
self.moje_valute = []
self.trenutna_valuta = None
def dodaj_valuto(self, valuta):
self.moje_valute.append(valuta)
if not self.trenutna_valuta:
... | 35.331967 | 117 | 0.582647 |
4a017ed7fad0136b467c4a43e5a2072b20d11ddc | 3,925 | py | Python | src/bin/shipyard_airflow/tests/unit/plugins/test_armada_test_releases_operator.py | openstack/airship-shipyard | 7dcada80f108d47524d04b9259c4321684ba555c | [
"Apache-2.0"
] | 12 | 2018-05-18T18:59:23.000Z | 2019-05-10T12:31:44.000Z | src/bin/shipyard_airflow/tests/unit/plugins/test_armada_test_releases_operator.py | airshipit/shipyard | 034b906dd6df0f9683dc6808f7ee08f68c9a527b | [
"Apache-2.0"
] | 4 | 2021-07-28T14:36:57.000Z | 2022-03-22T16:39:23.000Z | src/bin/shipyard_airflow/tests/unit/plugins/test_armada_test_releases_operator.py | openstack/airship-shipyard | 7dcada80f108d47524d04b9259c4321684ba555c | [
"Apache-2.0"
] | 9 | 2018-05-18T16:42:41.000Z | 2019-04-18T20:12:14.000Z | # Copyright 2018 AT&T Intellectual Property. All other 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... | 38.480392 | 79 | 0.670573 |
4a017edcabd13950b07bfaa6e5fdc1030e1ade6c | 11,995 | py | Python | scope2screen/server/routes/data_routes.py | labsyspharm/scope2screen | a9ae7ac67605d2e34813b6c9d06ca0aa3d3cf421 | [
"MIT"
] | 3 | 2021-10-10T23:59:46.000Z | 2022-02-17T17:02:41.000Z | scope2screen/server/routes/data_routes.py | labsyspharm/scope2screen | a9ae7ac67605d2e34813b6c9d06ca0aa3d3cf421 | [
"MIT"
] | null | null | null | scope2screen/server/routes/data_routes.py | labsyspharm/scope2screen | a9ae7ac67605d2e34813b6c9d06ca0aa3d3cf421 | [
"MIT"
] | null | null | null | from scope2screen import app
from flask import render_template, request, Response, jsonify, abort, send_file
import io
from PIL import Image
from scope2screen import data_path, get_config
from scope2screen.server.models import data_model
from scope2screen.server.analytics import comparison
from pathlib import Path
from... | 35.488166 | 117 | 0.710796 |
4a017f335a3783579b0d44a2c838028ba28d6b3f | 10,016 | py | Python | s2cnn/soft/s2_fft.py | Archer-Tatsu/s2cnn | db9f816335de695f63b462578748f69364695d2d | [
"MIT"
] | null | null | null | s2cnn/soft/s2_fft.py | Archer-Tatsu/s2cnn | db9f816335de695f63b462578748f69364695d2d | [
"MIT"
] | null | null | null | s2cnn/soft/s2_fft.py | Archer-Tatsu/s2cnn | db9f816335de695f63b462578748f69364695d2d | [
"MIT"
] | null | null | null | # pylint: disable=R,C,E1101
from functools import lru_cache
import torch
import torch.cuda
from string import Template
from s2cnn.utils.decorator import cached_dirpklgz
# inspired by https://gist.github.com/szagoruyko/89f83b6f5f4833d3c8adf81ee49f22a8
def s2_fft(x, for_grad=False, b_out=None):
'''
:param x: ... | 34.068027 | 135 | 0.547524 |
4a017f70821b44348c07886961f6f31a3a328e20 | 93,208 | py | Python | sympy/utilities/tests/test_wester.py | ricopicone/sympy | de27c97214d540247a35c8215c7920e9a46b54ed | [
"BSD-3-Clause"
] | 2 | 2019-02-05T19:20:24.000Z | 2019-04-23T13:24:38.000Z | sympy/utilities/tests/test_wester.py | ricopicone/sympy | de27c97214d540247a35c8215c7920e9a46b54ed | [
"BSD-3-Clause"
] | null | null | null | sympy/utilities/tests/test_wester.py | ricopicone/sympy | de27c97214d540247a35c8215c7920e9a46b54ed | [
"BSD-3-Clause"
] | 1 | 2019-10-15T10:55:42.000Z | 2019-10-15T10:55:42.000Z | """ Tests from Michael Wester's 1999 paper "Review of CAS mathematical
capabilities".
http://www.math.unm.edu/~wester/cas/book/Wester.pdf
See also http://math.unm.edu/~wester/cas_review.html for detailed output of
each tested system.
"""
from sympy import (Rational, symbols, Dummy, factorial, sqrt, log, exp, oo, zoo,... | 30.590089 | 297 | 0.489818 |
4a017fa04bcc5c9abad513245f006f42b088ded0 | 8,560 | py | Python | route/recent_change.py | LinuxSnapshot/openNAMU | ea7d97410da432ae65e7139fdffa6c36bfdfb3d0 | [
"BSD-3-Clause"
] | 2 | 2021-12-16T13:24:53.000Z | 2021-12-19T10:18:18.000Z | route/recent_change.py | LinuxSnapshot/openNAMU | ea7d97410da432ae65e7139fdffa6c36bfdfb3d0 | [
"BSD-3-Clause"
] | null | null | null | route/recent_change.py | LinuxSnapshot/openNAMU | ea7d97410da432ae65e7139fdffa6c36bfdfb3d0 | [
"BSD-3-Clause"
] | 1 | 2021-12-16T13:27:02.000Z | 2021-12-16T13:27:02.000Z | from .tool.func import *
def recent_change_2(conn, name, tool):
curs = conn.cursor()
if flask.request.method == 'POST':
return redirect(
'/diff' +
'/' + flask.request.form.get('b', '1') +
'/' + flask.request.form.get('a', '1') +
'/' + url_pas(name)
... | 41.756098 | 141 | 0.380491 |
4a018162b0818427c3fdfc97f2315f1d4066e69f | 4,007 | py | Python | thirdparty/gd2c/gd2c/variant.py | ppiecuch/godot | ff2098b324b814a0d1bd9d5722aa871fc5214fab | [
"MIT",
"Apache-2.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | thirdparty/gd2c/gd2c/variant.py | ppiecuch/godot | ff2098b324b814a0d1bd9d5722aa871fc5214fab | [
"MIT",
"Apache-2.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | thirdparty/gd2c/gd2c/variant.py | ppiecuch/godot | ff2098b324b814a0d1bd9d5722aa871fc5214fab | [
"MIT",
"Apache-2.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | from __future__ import annotations
from typing import Union, Dict, cast
class VariantType:
NIL: 'VariantType' = cast('VariantType', None)
BOOL: 'VariantType' = cast('VariantType', None)
INT: 'VariantType' = cast('VariantType', None)
REAL: 'VariantType' = cast('VariantType', None)
STRING: 'VariantTy... | 39.673267 | 70 | 0.698028 |
4a0181f30afe6cc52285e61fa98514ec102bb4ef | 39,942 | py | Python | mystery/game.py | ZDDM/MysteryBot | 20fe9ffe5c6942cc7eb64f684f55790d440404b5 | [
"MIT"
] | null | null | null | mystery/game.py | ZDDM/MysteryBot | 20fe9ffe5c6942cc7eb64f684f55790d440404b5 | [
"MIT"
] | null | null | null | mystery/game.py | ZDDM/MysteryBot | 20fe9ffe5c6942cc7eb64f684f55790d440404b5 | [
"MIT"
] | 1 | 2021-02-28T23:40:55.000Z | 2021-02-28T23:40:55.000Z | import discord
import asyncio
import random
from copy import deepcopy as copy
class Game():
# Game states.
STATE_PREPARE = -1
STATE_LOBBY = 0
STATE_GAME = 1
STATE_END = 2
def __init__(self, bot, server, cleanup_function=None):
self.bot = bot
self.server = server
self.... | 48.064982 | 395 | 0.618697 |
4a018305bcfeb90e16bfd668299fadf5ffb1bd34 | 11,006 | py | Python | tests/components/nest/camera_sdm_test.py | rchl/core | 974e099e2a9527d38445531c6d9bc1461ba4c36f | [
"Apache-2.0"
] | 1 | 2020-12-16T13:36:50.000Z | 2020-12-16T13:36:50.000Z | tests/components/nest/camera_sdm_test.py | rchl/core | 974e099e2a9527d38445531c6d9bc1461ba4c36f | [
"Apache-2.0"
] | 52 | 2020-10-15T06:46:28.000Z | 2022-03-31T06:02:24.000Z | tests/components/nest/camera_sdm_test.py | rchl/core | 974e099e2a9527d38445531c6d9bc1461ba4c36f | [
"Apache-2.0"
] | 2 | 2020-12-25T16:31:22.000Z | 2020-12-30T20:53:56.000Z | """
Test for Nest cameras platform for the Smart Device Management API.
These tests fake out the subscriber/devicemanager, and are not using a real
pubsub subscriber.
"""
import datetime
import aiohttp
from google_nest_sdm.device import Device
from homeassistant.components import camera
from homeassistant.component... | 34.719243 | 83 | 0.616573 |
4a0183155f1748519e690aa452e6dcbe603bda2e | 869 | py | Python | Chapter 07/combinations.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | 1 | 2021-05-14T19:53:41.000Z | 2021-05-14T19:53:41.000Z | Chapter 07/combinations.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | null | null | null | Chapter 07/combinations.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def combine(self, n: int, k: int) -> List[List[int]]:
res = []
#Nested helper function
def dfs(partial, index):
print("On entry partial=",partial,"index=",index)
if len(partial) == k:
print("Appended ",pa... | 33.423077 | 62 | 0.491369 |
4a0183b4c4f59448901841a41d784ece600ea097 | 7,413 | py | Python | main.py | JAMJU/KernelMethod | e52f5a0cfaefa87073facd88220c311709e513e8 | [
"MIT"
] | null | null | null | main.py | JAMJU/KernelMethod | e52f5a0cfaefa87073facd88220c311709e513e8 | [
"MIT"
] | null | null | null | main.py | JAMJU/KernelMethod | e52f5a0cfaefa87073facd88220c311709e513e8 | [
"MIT"
] | null | null | null | import numpy as np
from logistic_regression import logistic_kernel_regression, compute_label
from kernel_creation import convert_spectral_kernel_quad, convert_spectral_kernel_quint, convert_spectral_kernel_trig
from kernel_creation import convert_acid_kernel, convert_acid_quad, convert_mismatch_lev, convert_lect_trig, ... | 43.863905 | 167 | 0.703629 |
4a01845721bc76fb5208bce7ad30d98667c357ca | 1,560 | py | Python | superset/migrations/versions/937d04c16b64_update_datasources.py | Manikantan22/incubator-superset | ec325c871e60ae2a050aae595b430d6fc2888d1a | [
"Apache-2.0"
] | 6 | 2019-06-14T11:16:54.000Z | 2020-11-08T16:02:00.000Z | superset/migrations/versions/937d04c16b64_update_datasources.py | Manikantan22/incubator-superset | ec325c871e60ae2a050aae595b430d6fc2888d1a | [
"Apache-2.0"
] | 203 | 2019-05-31T11:13:10.000Z | 2020-03-31T02:50:54.000Z | superset/migrations/versions/937d04c16b64_update_datasources.py | Manikantan22/incubator-superset | ec325c871e60ae2a050aae595b430d6fc2888d1a | [
"Apache-2.0"
] | 14 | 2019-05-31T11:32:40.000Z | 2021-01-28T11:18:16.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.836735 | 75 | 0.742949 |
4a0184da11900426ae4ccf09e167266adf4a46f4 | 3,879 | py | Python | xl_tensorflow/models/vision/detection/body/learning_rates.py | Lannister-Xiaolin/xl_tensorflow | 99e0f458769ee1e45ebf55c789961e40f7d2eeac | [
"Apache-2.0"
] | null | null | null | xl_tensorflow/models/vision/detection/body/learning_rates.py | Lannister-Xiaolin/xl_tensorflow | 99e0f458769ee1e45ebf55c789961e40f7d2eeac | [
"Apache-2.0"
] | 1 | 2020-11-13T18:52:23.000Z | 2020-11-13T18:52:23.000Z | xl_tensorflow/models/vision/detection/body/learning_rates.py | Lannister-Xiaolin/xl_tensorflow | 99e0f458769ee1e45ebf55c789961e40f7d2eeac | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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... | 39.181818 | 93 | 0.720031 |
4a018575d0cb9a81124f4c50b800f008f6cd16e4 | 8,781 | py | Python | maskrcnn_benchmark/config/paths_catalog.py | Sreehari-S/mask-rcnn-benchmark | b4434c39fccda80575276308da86b6e944540445 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/config/paths_catalog.py | Sreehari-S/mask-rcnn-benchmark | b4434c39fccda80575276308da86b6e944540445 | [
"MIT"
] | 1 | 2020-02-18T12:25:48.000Z | 2020-02-18T12:25:48.000Z | maskrcnn_benchmark/config/paths_catalog.py | Sreehari-S/mask-rcnn-benchmark | b4434c39fccda80575276308da86b6e944540445 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""Centralized catalog of paths."""
import os
class DatasetCatalog(object):
DATA_DIR = "/home/uavws/Sreehari/DigestPath/coordinate_data"
DATASETS = {
"coco_2017_train": {
"img_dir": "coco/train2017",
"ann_... | 39.733032 | 121 | 0.594124 |
4a018655e1f031016e0ef3027ee298bf12b9ec0e | 7,386 | py | Python | MyPyQt5LearnExamples/ComplexUITest/ComplexUI.py | prayjourney/on_the_way_ing | 88d04752b7b18c6d60d74b18357f6b2c09c9748e | [
"MIT"
] | null | null | null | MyPyQt5LearnExamples/ComplexUITest/ComplexUI.py | prayjourney/on_the_way_ing | 88d04752b7b18c6d60d74b18357f6b2c09c9748e | [
"MIT"
] | null | null | null | MyPyQt5LearnExamples/ComplexUITest/ComplexUI.py | prayjourney/on_the_way_ing | 88d04752b7b18c6d60d74b18357f6b2c09c9748e | [
"MIT"
] | 1 | 2020-09-29T14:17:39.000Z | 2020-09-29T14:17:39.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ComplexUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | 55.533835 | 106 | 0.694693 |
4a01869f0f6c02d25669b76a8da9ba7ad0c7d0b4 | 2,102 | py | Python | Exercise-3/sensor_stick/scripts/capture_features.py | cielsys/RoboNDProj3_Exercises | 3cafd0e040ad6fe215493fec1d779a9e8f317b11 | [
"MIT"
] | 105 | 2017-07-05T01:39:33.000Z | 2022-01-30T20:31:46.000Z | Exercise-3/sensor_stick/scripts/capture_features.py | zhanghming/RoboND-Perception-Exercises | 2607a0e83907f086bcff4e461a394eb0a607e7a4 | [
"MIT"
] | 20 | 2017-07-03T18:22:14.000Z | 2021-05-03T10:51:24.000Z | Exercise-3/sensor_stick/scripts/capture_features.py | zhanghming/RoboND-Perception-Exercises | 2607a0e83907f086bcff4e461a394eb0a607e7a4 | [
"MIT"
] | 263 | 2017-07-06T00:10:52.000Z | 2021-12-31T20:35:08.000Z | #!/usr/bin/env python
import numpy as np
import pickle
import rospy
from sensor_stick.pcl_helper import *
from sensor_stick.training_helper import spawn_model
from sensor_stick.training_helper import delete_model
from sensor_stick.training_helper import initial_setup
from sensor_stick.training_helper import capture_sa... | 30.463768 | 87 | 0.666984 |
4a0187384e75384c081de5364e606c6c8547f720 | 6,089 | py | Python | venv/lib/python2.7/site-packages/samples/sample_kinesis_wordputter.py | bopopescu/localstackvenv | 3b1003c5fcca94fbd57ea722128d93b93119d2b5 | [
"Apache-2.0"
] | 1 | 2021-05-11T12:09:58.000Z | 2021-05-11T12:09:58.000Z | venv/lib/python2.7/site-packages/samples/sample_kinesis_wordputter.py | bopopescu/localstackvenv | 3b1003c5fcca94fbd57ea722128d93b93119d2b5 | [
"Apache-2.0"
] | null | null | null | venv/lib/python2.7/site-packages/samples/sample_kinesis_wordputter.py | bopopescu/localstackvenv | 3b1003c5fcca94fbd57ea722128d93b93119d2b5 | [
"Apache-2.0"
] | 2 | 2020-01-13T17:51:02.000Z | 2020-07-24T17:50:44.000Z | #!env python
'''
Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Amazon Software License (the "License").
You may not use this file except in compliance with the License.
A copy of the License is located at
http://aws.amazon.com/asl/
or in the "license" file accompanyi... | 40.593333 | 130 | 0.670882 |
4a0187eade5266cbbc02a8581ca27d67e2a9a680 | 4,699 | py | Python | build/x86/python/m5/internal/param_TaggedPrefetcher.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | build/x86/python/m5/internal/param_TaggedPrefetcher.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | build/x86/python/m5/internal/param_TaggedPrefetcher.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | 32.406897 | 145 | 0.708874 |
4a0188c5fe2b389d9863605bf1aafc3174e34c48 | 4,042 | py | Python | babypandas.py | lexual/babypandas | a649bac4fdae7a3c3c2159c2a85d0f82339ee325 | [
"BSD-3-Clause"
] | 6 | 2016-06-14T23:34:04.000Z | 2020-05-27T14:04:18.000Z | babypandas.py | lexual/babypandas | a649bac4fdae7a3c3c2159c2a85d0f82339ee325 | [
"BSD-3-Clause"
] | null | null | null | babypandas.py | lexual/babypandas | a649bac4fdae7a3c3c2159c2a85d0f82339ee325 | [
"BSD-3-Clause"
] | 4 | 2017-04-10T02:52:46.000Z | 2020-10-31T02:35:11.000Z | # this is very quick hacky pure python dataframe/series.
# no index support
# just useful for tabular datastructure
from operator import itemgetter
# returns Series, not a list
# mainly useful, so we can do chaining.
# e.g. s.map(foo).map(bar), etc.
def return_series(fn):
def wrapper(*args, **kwargs):
resu... | 28.464789 | 73 | 0.548243 |
4a0189069210d07d6abccad243afe3b446e73e8b | 1,134 | py | Python | tests/storage/cases/test_KT1XKBeSeSsZppNGpT8Ly7mnL2nMWQ5dkxDc.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-08-11T02:31:24.000Z | 2020-08-11T02:31:24.000Z | tests/storage/cases/test_KT1XKBeSeSsZppNGpT8Ly7mnL2nMWQ5dkxDc.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/storage/cases/test_KT1XKBeSeSsZppNGpT8Ly7mnL2nMWQ5dkxDc.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1XKBeSeSsZppNGpT8Ly7mnL2nMWQ5dkxDc(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
cls.... | 40.5 | 112 | 0.749559 |
4a018bb3396378e8b392a3db4e0446306f81019f | 10,399 | py | Python | album2embedcodes.py | arne-cl/flickr-album-embed-codes | aad4c8720442939ee7fecd911e0122be6e41c6f6 | [
"BSD-3-Clause"
] | 1 | 2015-12-27T17:47:20.000Z | 2015-12-27T17:47:20.000Z | album2embedcodes.py | arne-cl/flickr-album-embed-codes | aad4c8720442939ee7fecd911e0122be6e41c6f6 | [
"BSD-3-Clause"
] | 1 | 2015-12-29T22:58:36.000Z | 2015-12-29T22:58:36.000Z | album2embedcodes.py | arne-cl/flickr-album-embed-codes | aad4c8720442939ee7fecd911e0122be6e41c6f6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Arne Neumann <flickr.programming@arne.cl>
"""
This module contains code for retrieving HTML embed codes for all images in a
given Flickr photoset/album URL.
Unforturnately, not all photosets which are visible on the website can be
accessed via Flickr's REST API.... | 32.295031 | 81 | 0.640062 |
4a018bc8b87f196e23d08f3a350841aba016a9b6 | 2,367 | py | Python | pandas/tests/test_msgpack/test_obj.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 29 | 2015-01-08T19:20:37.000Z | 2021-04-20T08:25:56.000Z | pandas/tests/test_msgpack/test_obj.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2021-03-19T08:36:48.000Z | 2022-01-13T01:52:34.000Z | pandas/tests/test_msgpack/test_obj.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 22 | 2015-01-02T12:14:20.000Z | 2021-10-13T09:22:30.000Z | # coding: utf-8
import unittest
import nose
import datetime
from pandas.msgpack import packb, unpackb
class DecodeError(Exception):
pass
class TestObj(unittest.TestCase):
def _arr_to_str(self, arr):
return ''.join(str(c) for c in arr)
def bad_complex_decoder(self, o):
raise DecodeError... | 32.875 | 107 | 0.621462 |
4a018c17dc7c72af6daaef5bae9cd9f56b360246 | 5,920 | py | Python | pybricks/hubs/__stub/__screen.py | drewwhis/pybricks-fll | 9d6672df9aeef375d3cd0983dc710abeebf9c798 | [
"MIT"
] | 17 | 2019-08-30T12:30:34.000Z | 2021-11-02T16:06:46.000Z | pybricks/hubs/__stub/__screen.py | drewwhis/pybricks-fll | 9d6672df9aeef375d3cd0983dc710abeebf9c798 | [
"MIT"
] | 19 | 2019-10-20T04:01:20.000Z | 2021-09-03T18:47:07.000Z | pybricks/hubs/__stub/__screen.py | drewwhis/pybricks-fll | 9d6672df9aeef375d3cd0983dc710abeebf9c798 | [
"MIT"
] | 8 | 2019-09-21T03:13:21.000Z | 2020-12-23T17:16:52.000Z | from pybricks.media.ev3dev import Font, Image, ImageFile
from pybricks.parameters import Color
from typing import Union
class Screen:
"""
A stub class to represent the screen member of the EV3Brick class.
Attributes:
height (int): The height of the screen in pixels.
width (int): The width... | 38.441558 | 285 | 0.588345 |
4a018cf7f6f5db2bf96fe9f6ab9ec725f082c7aa | 16,891 | py | Python | iyzico_objects.py | uguratar/pyzico | b779d590b99392df60db7c5e2df832708df9b6a2 | [
"MIT"
] | 6 | 2015-05-03T10:48:54.000Z | 2018-03-06T12:36:02.000Z | iyzico_objects.py | uguratar/pyzico | b779d590b99392df60db7c5e2df832708df9b6a2 | [
"MIT"
] | 1 | 2021-06-01T22:06:45.000Z | 2021-06-01T22:06:45.000Z | iyzico_objects.py | uguratar/pyzico | b779d590b99392df60db7c5e2df832708df9b6a2 | [
"MIT"
] | null | null | null | # coding=utf-8
__author__ = 'Ugur Atar <ugur@kahvekap.com>'
import requests
import settings
import uuid
class IyzicoCardException(ValueError):
def __init__(self, *args, **kwargs):
super(IyzicoCardException, self).__init__(*args, **kwargs)
class IyzicoValueException(ValueError):
def __init__(self, ... | 30.544304 | 74 | 0.577763 |
4a018e00eac0ecc647da8811ea84c327e85bfe4c | 10,566 | py | Python | test/test_ucx.py | brisbane/hpc-container-maker | 29c675d62651c6dde566b699ad85f794114a94c4 | [
"Apache-2.0"
] | null | null | null | test/test_ucx.py | brisbane/hpc-container-maker | 29c675d62651c6dde566b699ad85f794114a94c4 | [
"Apache-2.0"
] | null | null | null | test/test_ucx.py | brisbane/hpc-container-maker | 29c675d62651c6dde566b699ad85f794114a94c4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, 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 appli... | 42.95122 | 313 | 0.627768 |
4a018e014a89be8f74caf24a897ae021be21673f | 24,673 | py | Python | test/functional/rpc_rawtransaction.py | CJwon-98/Pyeongtaekcoin | 45a81933a98a7487f11e57e6e9315efe740a297e | [
"MIT"
] | null | null | null | test/functional/rpc_rawtransaction.py | CJwon-98/Pyeongtaekcoin | 45a81933a98a7487f11e57e6e9315efe740a297e | [
"MIT"
] | null | null | null | test/functional/rpc_rawtransaction.py | CJwon-98/Pyeongtaekcoin | 45a81933a98a7487f11e57e6e9315efe740a297e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Pyeongtaekcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the rawtransaction RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtr... | 56.202733 | 263 | 0.652859 |
4a018ea8a51f6ead2ec41029ec9874ebdd5212d8 | 13,743 | py | Python | qiskit/quantum_info/states/statevector.py | BoschSamuel/qiskit-terra | 01bdfe88c15a93fa7548edc0db0e33b287cc8c98 | [
"Apache-2.0"
] | null | null | null | qiskit/quantum_info/states/statevector.py | BoschSamuel/qiskit-terra | 01bdfe88c15a93fa7548edc0db0e33b287cc8c98 | [
"Apache-2.0"
] | null | null | null | qiskit/quantum_info/states/statevector.py | BoschSamuel/qiskit-terra | 01bdfe88c15a93fa7548edc0db0e33b287cc8c98 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# 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... | 38.932011 | 94 | 0.600669 |
4a0192b57dd87c41dfc68d1e0527f577eb69d0e8 | 3,189 | py | Python | uploadr.py | akent/uploadr-reloaded | b94f75ab48b6062ba5212ed86ac0926113b9054b | [
"BSD-3-Clause"
] | null | null | null | uploadr.py | akent/uploadr-reloaded | b94f75ab48b6062ba5212ed86ac0926113b9054b | [
"BSD-3-Clause"
] | null | null | null | uploadr.py | akent/uploadr-reloaded | b94f75ab48b6062ba5212ed86ac0926113b9054b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# uploadr.py inspired by http://berserk.org/uploadr/
# but using http://stuvel.eu/projects/flickrapi instead
import sys, time, os, shelve, string
import exifread
import flickrapi
#
# Location to scan for new images
#
IMAGE_DIR = "/Volumes/NIKON D40"
#
# Flickr settings
#
FLICKR = {"title"... | 31.574257 | 78 | 0.534337 |
4a01930446d885e1f074bd32fcf18d5ceb3e9612 | 4,189 | py | Python | tests/unit/test_todo.py | lekshmimallika-aot/business-schemas | d95b43f1d04e29fd9bab101789c277db54123d9b | [
"Apache-2.0"
] | 2 | 2020-02-05T21:36:27.000Z | 2021-08-28T23:56:52.000Z | tests/unit/test_todo.py | lekshmimallika-aot/business-schemas | d95b43f1d04e29fd9bab101789c277db54123d9b | [
"Apache-2.0"
] | 13 | 2020-03-25T17:28:11.000Z | 2022-03-30T20:06:04.000Z | tests/unit/test_todo.py | lekshmimallika-aot/business-schemas | d95b43f1d04e29fd9bab101789c277db54123d9b | [
"Apache-2.0"
] | 19 | 2020-01-31T23:11:47.000Z | 2022-03-30T18:08:15.000Z | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 27.559211 | 86 | 0.534973 |
4a0193d94ad32c9b65a861cd1357203de27e11e3 | 18,471 | py | Python | dashboard/views.py | Kgermando/es-script | f1b10ecf2c805e8875a025e7033c724e236f6cd1 | [
"Apache-2.0"
] | null | null | null | dashboard/views.py | Kgermando/es-script | f1b10ecf2c805e8875a025e7033c724e236f6cd1 | [
"Apache-2.0"
] | null | null | null | dashboard/views.py | Kgermando/es-script | f1b10ecf2c805e8875a025e7033c724e236f6cd1 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import JsonResponse
from django.contrib.auth.models import User
from issabel.models import Cdr, Cel
from agenda.models import Note
from contacts.models import Contact
from accounts.models import Profile
fro... | 47.48329 | 101 | 0.735369 |
4a0193ff340f302682d2a53757a9e9dfee76f43d | 1,024 | py | Python | reachapp/forms.py | nityaoberoi/reach | 78444afdf49baad702ebb09f3e72379763cbc709 | [
"MIT"
] | null | null | null | reachapp/forms.py | nityaoberoi/reach | 78444afdf49baad702ebb09f3e72379763cbc709 | [
"MIT"
] | 3 | 2015-04-29T22:56:50.000Z | 2015-06-15T17:56:54.000Z | reachapp/forms.py | joedoublej/reach | 78444afdf49baad702ebb09f3e72379763cbc709 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals
from django import forms
from authtools.forms import UserCreationForm
class UserCreationForm(UserCreationForm):
"""
A UserCreationForm with optional password inputs.
"""
def __init__(self, *args, **kwargs):
super(UserCreationForm,... | 36.571429 | 73 | 0.688477 |
4a0195ee0f13af3dcdb34e743e967ddf76952870 | 3,507 | py | Python | jointbtc/settings/default.py | koalalorenzo/jointbtc | c49724fd97e10cc8ddb5ae159baf751d11da67fc | [
"MIT"
] | null | null | null | jointbtc/settings/default.py | koalalorenzo/jointbtc | c49724fd97e10cc8ddb5ae159baf751d11da67fc | [
"MIT"
] | null | null | null | jointbtc/settings/default.py | koalalorenzo/jointbtc | c49724fd97e10cc8ddb5ae159baf751d11da67fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Django settings for jointbtc project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.pa... | 26.770992 | 118 | 0.742515 |
4a0197812d75713fd139c35de7c2ed2462944d70 | 647 | py | Python | uni_ticket/migrations/0009_auto_20190415_0945.py | biotech2021/uniTicket | 8c441eac18e67a983e158326b1c4b82f00f1f1ef | [
"Apache-2.0"
] | 15 | 2019-09-06T06:47:08.000Z | 2022-01-17T06:39:54.000Z | uni_ticket/migrations/0009_auto_20190415_0945.py | biotech2021/uniTicket | 8c441eac18e67a983e158326b1c4b82f00f1f1ef | [
"Apache-2.0"
] | 69 | 2019-09-06T12:03:19.000Z | 2022-03-26T14:30:53.000Z | uni_ticket/migrations/0009_auto_20190415_0945.py | biotech2021/uniTicket | 8c441eac18e67a983e158326b1c4b82f00f1f1ef | [
"Apache-2.0"
] | 13 | 2019-09-11T10:54:20.000Z | 2021-11-23T09:09:19.000Z | # Generated by Django 2.1.7 on 2019-04-15 07:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('organizational_area', '0020_auto_20190415_0945'),
('uni_ticket', '0008_auto_20190415_0922'),
]
operations = [
migrations.AlterField(... | 26.958333 | 105 | 0.618238 |
4a0197e46620b0c12ddd7c232ebfd394d6b40fcf | 2,128 | py | Python | checksum.py | littlekign/udpoptions-tools | 6570d48a8a52bbde802cbefe7dcbded1d08121a0 | [
"BSD-2-Clause"
] | null | null | null | checksum.py | littlekign/udpoptions-tools | 6570d48a8a52bbde802cbefe7dcbded1d08121a0 | [
"BSD-2-Clause"
] | null | null | null | checksum.py | littlekign/udpoptions-tools | 6570d48a8a52bbde802cbefe7dcbded1d08121a0 | [
"BSD-2-Clause"
] | 3 | 2017-09-06T06:26:54.000Z | 2020-01-05T05:30:20.000Z | #!/usr/bin/env python
import struct
def hexdump(databytes):
total = 0
count = 0
for b in databytes:
print("{:02x} ".format(b), end='')
count = count + 1
if count % 8 == 0:
print(" ", end='')
if count % 16 == 0:
print("")
def internetchecksum(pkt):
... | 22.638298 | 68 | 0.547932 |
4a01994b044b51671a672f4ea4a94e89c89ff6d4 | 1,780 | py | Python | PatternDesign/Factory/abstract_factory.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 2 | 2019-01-24T15:06:59.000Z | 2019-01-25T07:34:45.000Z | PatternDesign/Factory/abstract_factory.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-12-23T09:45:11.000Z | 2019-12-23T09:45:11.000Z | PatternDesign/Factory/abstract_factory.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-07-18T14:21:35.000Z | 2019-07-18T14:21:35.000Z | from abc import ABCMeta, abstractmethod
class PizzaFactory(metaclass=ABCMeta):
@abstractmethod
def create_veg_pizza(self):
pass
@abstractmethod
def create_nonveg_pizza(self):
pass
class IndianPizzaFactory(PizzaFactory):
def create_veg_pizza(self):
return DeluxVeg... | 22.820513 | 90 | 0.658427 |
4a019b059a59a7983105c0398424392cb10bf0b1 | 2,133 | py | Python | tests/test_dataset.py | s-scherrer/gswp | aa059608f2e4c55d95a990cc13b58d260260e2a1 | [
"MIT"
] | null | null | null | tests/test_dataset.py | s-scherrer/gswp | aa059608f2e4c55d95a990cc13b58d260260e2a1 | [
"MIT"
] | null | null | null | tests/test_dataset.py | s-scherrer/gswp | aa059608f2e4c55d95a990cc13b58d260260e2a1 | [
"MIT"
] | 1 | 2020-12-01T13:19:52.000Z | 2020-12-01T13:19:52.000Z | from datetime import datetime
import numpy as np
from pathlib import Path
import pytest
from gswp.interface import GSWPDataset
@pytest.fixture
def filename_pattern():
here = Path(__file__).resolve().parent
return here / "test_data" / "*.nc"
def test_datetime_compatibility(filename_pattern):
"""
Tes... | 25.094118 | 77 | 0.686357 |
4a019b15ac6f525121091224e6edd8d01d9c9f63 | 32,951 | py | Python | tests/test_plugin.py | korygill/cmd2 | 81cbc40b5dfa6f615a621ed42c6ed437faabb4da | [
"MIT"
] | null | null | null | tests/test_plugin.py | korygill/cmd2 | 81cbc40b5dfa6f615a621ed42c6ed437faabb4da | [
"MIT"
] | null | null | null | tests/test_plugin.py | korygill/cmd2 | 81cbc40b5dfa6f615a621ed42c6ed437faabb4da | [
"MIT"
] | null | null | null | # coding=utf-8
# flake8: noqa E302
"""
Test plugin infrastructure and hooks.
"""
import argparse
import sys
import pytest
import cmd2
from cmd2 import (
Cmd2ArgumentParser,
exceptions,
plugin,
with_argparser,
)
# Python 3.5 had some regressions in the unitest.mock module, so use 3rd party mock if ava... | 35.091587 | 127 | 0.720069 |
4a019bd0725ee302076658bbe9ec5efdf86a789f | 4,472 | py | Python | packageship/libs/conf/__init__.py | openeuler-mirror/pkgship | 5aaa4953023fde8ff03892fe5608f0711a26a942 | [
"MulanPSL-1.0"
] | null | null | null | packageship/libs/conf/__init__.py | openeuler-mirror/pkgship | 5aaa4953023fde8ff03892fe5608f0711a26a942 | [
"MulanPSL-1.0"
] | null | null | null | packageship/libs/conf/__init__.py | openeuler-mirror/pkgship | 5aaa4953023fde8ff03892fe5608f0711a26a942 | [
"MulanPSL-1.0"
] | 1 | 2021-11-20T00:10:53.000Z | 2021-11-20T00:10:53.000Z | #!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | 34.4 | 98 | 0.595707 |
4a019cc8d7c54d187bd3fb118b7f5d72516d26f8 | 3,764 | py | Python | s.py | riceissa/ea-forum-reader | c340db63705ee2eb1dc64281fd6d2701451372b5 | [
"CC0-1.0"
] | 8 | 2018-11-10T19:52:55.000Z | 2022-01-19T20:43:15.000Z | s.py | riceissa/ea-forum-reader | c340db63705ee2eb1dc64281fd6d2701451372b5 | [
"CC0-1.0"
] | 40 | 2018-11-23T22:19:05.000Z | 2021-08-03T17:02:33.000Z | s.py | riceissa/ea-forum-reader | c340db63705ee2eb1dc64281fd6d2701451372b5 | [
"CC0-1.0"
] | 3 | 2018-11-24T06:04:28.000Z | 2020-05-23T09:28:40.000Z | #!/usr/bin/env python3
import pdb
import sys
from urllib.parse import quote
import datetime
import config
import util
import linkpath
def get_sequence(sequenceid, run_query=True):
query = ("""
{
sequence(
input: {
selector: {
_id: "%s"
}
}
) {
... | 27.676471 | 206 | 0.502125 |
4a019cd37536bf56f99f9ed18ed34a2c7c8e730e | 259 | py | Python | ddmrp/ddmrp/doctype/ddmrp_action_log/ddmrp_action_log.py | szufisher/ddmrp | 761bba5e4c78049bbdd4bb4a921531389fd42d4d | [
"MIT"
] | null | null | null | ddmrp/ddmrp/doctype/ddmrp_action_log/ddmrp_action_log.py | szufisher/ddmrp | 761bba5e4c78049bbdd4bb4a921531389fd42d4d | [
"MIT"
] | null | null | null | ddmrp/ddmrp/doctype/ddmrp_action_log/ddmrp_action_log.py | szufisher/ddmrp | 761bba5e4c78049bbdd4bb4a921531389fd42d4d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Fisher and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class DDMRPActionLog(Document):
pass
| 23.545455 | 49 | 0.776062 |
4a019ce46187621d2a90476a28441466e1645599 | 4,658 | py | Python | networks_256.py | bernardas78/BigGAN-tensorflow | 70814c044512798006c3a12f981afcba970cd0c9 | [
"MIT"
] | null | null | null | networks_256.py | bernardas78/BigGAN-tensorflow | 70814c044512798006c3a12f981afcba970cd0c9 | [
"MIT"
] | null | null | null | networks_256.py | bernardas78/BigGAN-tensorflow | 70814c044512798006c3a12f981afcba970cd0c9 | [
"MIT"
] | null | null | null | from ops import *
class Generator:
def __init__(self, name):
self.name = name
def __call__(self, inputs, train_phase, y, nums_class):
z_dim = int(inputs.shape[-1]) # = 128
nums_layer = 6
remain = z_dim % nums_layer # = 128 % 6 = 2
chunk_size = (z_dim - remain) // ... | 55.452381 | 123 | 0.625376 |
4a019eb131f56cccf92e4935c8b3fdd7ed87cbb7 | 4,841 | py | Python | airflow/contrib/auth/backends/kerberos_auth.py | jacky-nirvana/incubator-airflow | 2318cea74d4f71fba353eaca9bb3c4fd3cdb06c0 | [
"Apache-2.0"
] | 1 | 2019-09-16T06:56:31.000Z | 2019-09-16T06:56:31.000Z | airflow/contrib/auth/backends/kerberos_auth.py | jacky-nirvana/incubator-airflow | 2318cea74d4f71fba353eaca9bb3c4fd3cdb06c0 | [
"Apache-2.0"
] | 6 | 2018-02-10T20:25:16.000Z | 2019-11-20T03:01:03.000Z | airflow/contrib/auth/backends/kerberos_auth.py | jacky-nirvana/incubator-airflow | 2318cea74d4f71fba353eaca9bb3c4fd3cdb06c0 | [
"Apache-2.0"
] | 2 | 2019-09-16T06:48:41.000Z | 2019-09-16T06:56:32.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 31.032051 | 90 | 0.658955 |
4a019ebbb419db0f574ddb3376dec9833e0fb1ca | 7,245 | py | Python | contrib/PyTorch/Official/cv/image_classification/SPNASNet_100_for_PyTorch/timm/models/layers/std_conv.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | contrib/PyTorch/Official/cv/image_classification/SPNASNet_100_for_PyTorch/timm/models/layers/std_conv.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | contrib/PyTorch/Official/cv/image_classification/SPNASNet_100_for_PyTorch/timm/models/layers/std_conv.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # Copyright 2020 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 agreed to... | 45.85443 | 111 | 0.659489 |
4a019ec420e5af71a859cfb5986eb3798cf4c711 | 7,189 | py | Python | rst2pdf/tests/input/sphinx-issue162/conf.py | shakna-israel/rst2pdf | 9eb934298aeae872c652f60247bbfd9cc3da842f | [
"MIT"
] | 1 | 2019-04-15T13:50:16.000Z | 2019-04-15T13:50:16.000Z | rst2pdf/tests/input/sphinx-issue162/conf.py | shakna-israel/rst2pdf | 9eb934298aeae872c652f60247bbfd9cc3da842f | [
"MIT"
] | null | null | null | rst2pdf/tests/input/sphinx-issue162/conf.py | shakna-israel/rst2pdf | 9eb934298aeae872c652f60247bbfd9cc3da842f | [
"MIT"
] | 2 | 2020-10-22T23:22:34.000Z | 2021-01-27T13:32:13.000Z | # -*- coding: utf-8 -*-
#
# issue162 documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 18 22:54:33 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 31.393013 | 80 | 0.719989 |
4a01a000a1ba12d0939930bff3499ec024edd989 | 3,457 | py | Python | gamestonk_terminal/stocks/fundamental_analysis/market_watch_model.py | clairvoyant/GamestonkTerminal | 7b40cfe61b32782e36f5de8a08d075532a08c294 | [
"MIT"
] | 1 | 2021-09-14T14:37:29.000Z | 2021-09-14T14:37:29.000Z | gamestonk_terminal/stocks/fundamental_analysis/market_watch_model.py | clairvoyant/GamestonkTerminal | 7b40cfe61b32782e36f5de8a08d075532a08c294 | [
"MIT"
] | null | null | null | gamestonk_terminal/stocks/fundamental_analysis/market_watch_model.py | clairvoyant/GamestonkTerminal | 7b40cfe61b32782e36f5de8a08d075532a08c294 | [
"MIT"
] | null | null | null | """ Fundamental Analysis Market Watch Model """
__docformat__ = "numpy"
import requests
import pandas as pd
from bs4 import BeautifulSoup
from gamestonk_terminal.helper_funcs import (
get_user_agent,
)
def prepare_df_financials(
ticker: str, statement: str, quarter: bool = False
) -> pd.DataFrame:
"""Bu... | 29.801724 | 105 | 0.628001 |
4a01a130975459e052c1b63bd0e80d15abf336f3 | 5,481 | py | Python | example/example/settings.py | openedx/django-pyfs | 3e6880dbb91aa0f60ad993f81040b9a96d3460d4 | [
"Apache-2.0"
] | 4 | 2020-07-04T06:04:49.000Z | 2021-11-05T00:40:11.000Z | example/example/settings.py | edx/django-pyfs | 7b65802002515dd51e1d03efd2d87bf1a6dc07b8 | [
"Apache-2.0"
] | 34 | 2015-10-26T14:48:09.000Z | 2021-12-20T05:06:57.000Z | example/example/settings.py | openedx/django-pyfs | 3e6880dbb91aa0f60ad993f81040b9a96d3460d4 | [
"Apache-2.0"
] | 5 | 2016-01-04T18:48:45.000Z | 2019-07-13T05:24:26.000Z | # Django settings for example project.
# CHANGED
DJFS = {'type': 'osfs',
'directory_root': 'sample/static/djpyfs',
'url_root': '/static/djpyfs'}
# /CHANGED
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': ... | 33.420732 | 109 | 0.696406 |
4a01a28967c23b0b0b0c369d8a6d82e4fce1d21b | 438 | py | Python | tests/Validation/pollTests.py | cesclass/projetL2S3 | fb97f80cb7f2e43a0dd56914988ef52a59376128 | [
"MIT"
] | null | null | null | tests/Validation/pollTests.py | cesclass/projetL2S3 | fb97f80cb7f2e43a0dd56914988ef52a59376128 | [
"MIT"
] | null | null | null | tests/Validation/pollTests.py | cesclass/projetL2S3 | fb97f80cb7f2e43a0dd56914988ef52a59376128 | [
"MIT"
] | null | null | null | import networkx as nx
from networkx.algorithms import tournament
import numpy as np
import matplotlib.pyplot as plt
import pylab
G = nx.DiGraph()
# ajouter les arcs ici
print(tournament.is_tournament(G))
edge_labels=dict([((u,v,),d['weight'])
for u,v,d in G.edges(data=True)])
pos=nx.circular_layou... | 20.857143 | 59 | 0.742009 |
4a01a3fb333227c4638eabbf80264a7b000b7ba2 | 1,108 | py | Python | x_rebirth_station_calculator/station_data/modules/scannar_facility.py | Phipsz/XRebirthStationCalculator | ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835 | [
"MIT"
] | 1 | 2016-04-17T11:00:22.000Z | 2016-04-17T11:00:22.000Z | x_rebirth_station_calculator/station_data/modules/scannar_facility.py | Phipsz/XRebirthStationCalculator | ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835 | [
"MIT"
] | null | null | null | x_rebirth_station_calculator/station_data/modules/scannar_facility.py | Phipsz/XRebirthStationCalculator | ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835 | [
"MIT"
] | null | null | null | from x_rebirth_station_calculator.station_data.station_base import Module
from x_rebirth_station_calculator.station_data.station_base import Production
from x_rebirth_station_calculator.station_data.station_base import Consumption
from x_rebirth_station_calculator.station_data import wares
names = {'L044': 'ScannAr Fa... | 48.173913 | 78 | 0.66065 |
4a01a45a75f0efd3ac5a1b948cf71a67aa16ef02 | 5,882 | py | Python | elegantrl/demo.py | virtualpeer/NeoFinRL | c581bd73a814ee37f8727021b9e2a5dbbf7fe820 | [
"MIT"
] | 1 | 2021-09-06T05:08:55.000Z | 2021-09-06T05:08:55.000Z | elegantrl/demo.py | virtualpeer/NeoFinRL | c581bd73a814ee37f8727021b9e2a5dbbf7fe820 | [
"MIT"
] | null | null | null | elegantrl/demo.py | virtualpeer/NeoFinRL | c581bd73a814ee37f8727021b9e2a5dbbf7fe820 | [
"MIT"
] | null | null | null | '''From https://github.com/AI4Finance-Foundation/ElegantRL'''
import sys
import gym # not necessary
from elegantrl.agent import *
from elegantrl.env import PreprocessEnv
from elegantrl.run import Arguments, train_and_evaluate, train_and_evaluate_mp
gym.logger.set_level(40) # Block warning
def demo_continuous_act... | 34.197674 | 101 | 0.65998 |
4a01a57cca84ae1c399ea78d5546d2265b709469 | 2,069 | py | Python | _MOM/_DBW/_SAW/_PG/Sequence.py | Tapyr/tapyr | 4235fba6dce169fe747cce4d17d88dcf4a3f9f1d | [
"BSD-3-Clause"
] | 6 | 2016-12-10T17:51:10.000Z | 2021-10-11T07:51:48.000Z | _MOM/_DBW/_SAW/_PG/Sequence.py | Tapyr/tapyr | 4235fba6dce169fe747cce4d17d88dcf4a3f9f1d | [
"BSD-3-Clause"
] | null | null | null | _MOM/_DBW/_SAW/_PG/Sequence.py | Tapyr/tapyr | 4235fba6dce169fe747cce4d17d88dcf4a3f9f1d | [
"BSD-3-Clause"
] | 3 | 2020-03-29T07:37:03.000Z | 2021-01-21T16:08:40.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2013 Mag. Christian Tanzer All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# #*** <License> ************************************************************#
# This module is part of the package MOM.DBW.SAW.PG.
#
# This module is licensed under the ... | 29.140845 | 78 | 0.62784 |
4a01a59fc202934385f5fbb686143490295ea8aa | 554 | py | Python | main.py | harsh-98/witnet_lib | cf224db5fe4fd0ef825a1c37f8031b07a9faddb4 | [
"MIT"
] | 1 | 2020-09-19T09:45:22.000Z | 2020-09-19T09:45:22.000Z | main.py | harsh-98/witnet_lib | cf224db5fe4fd0ef825a1c37f8031b07a9faddb4 | [
"MIT"
] | null | null | null | main.py | harsh-98/witnet_lib | cf224db5fe4fd0ef825a1c37f8031b07a9faddb4 | [
"MIT"
] | null | null | null | from witnet_lib.map_nodes import MapNodes
from witnet_lib import utils
if __name__ == "__main__":
config = utils.AttrDict({
"genesis_sec": 159555600,
"magic": 3029,
"sender_addr": "127.0.0.1:21341",
"time_per_epoch": 45,
})
mapper = MapNodes(config, ["127.0.0.1:21337"])
... | 30.777778 | 61 | 0.631769 |
4a01a794dc62019897c0c75fd0c384c1dc7e037a | 135 | py | Python | data/PebbleCommand.py | JDVDev/TaskRelay | 20213d31c90c0420e62f1e75c138ca1cb89211ee | [
"Apache-2.0"
] | null | null | null | data/PebbleCommand.py | JDVDev/TaskRelay | 20213d31c90c0420e62f1e75c138ca1cb89211ee | [
"Apache-2.0"
] | null | null | null | data/PebbleCommand.py | JDVDev/TaskRelay | 20213d31c90c0420e62f1e75c138ca1cb89211ee | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class PebbleCommand(Enum):
connect = "connect"
disconnect = "disconnect"
sendMessage = "sendMessage" | 27 | 31 | 0.711111 |
4a01a7ad8137e224641801d1e4feed0f0ec80156 | 20,429 | py | Python | histomics_detect/models/lnms_loss.py | Leengit/HistomicsDetect | ae9114c6d40af299a460417fe9470764155156a9 | [
"Apache-2.0"
] | 2 | 2022-03-03T19:45:59.000Z | 2022-03-11T14:05:21.000Z | histomics_detect/models/lnms_loss.py | Leengit/HistomicsDetect | ae9114c6d40af299a460417fe9470764155156a9 | [
"Apache-2.0"
] | 2 | 2022-03-08T19:29:42.000Z | 2022-03-09T19:56:49.000Z | histomics_detect/models/lnms_loss.py | Leengit/HistomicsDetect | ae9114c6d40af299a460417fe9470764155156a9 | [
"Apache-2.0"
] | 1 | 2022-03-04T00:23:13.000Z | 2022-03-04T00:23:13.000Z | import tensorflow as tf
import tensorflow.keras.backend as kb
from typing import List, Tuple
from histomics_detect.metrics.iou import iou, greedy_iou_mapping
def normal_loss(
loss_object: tf.keras.losses.Loss,
boxes: tf.Tensor,
rpn_boxes_positive: tf.Tensor,
scores: tf.Tensor,
positive_weight: fl... | 33.600329 | 108 | 0.665084 |
4a01a805e1b76bf94f65e4dd91fd3940a90b18fa | 2,054 | py | Python | tetrahedron/vertex_effect.py | mayhem/led-tetrahedron | bed314d0db3c4fe355cd047434b04108e19265cf | [
"BSD-2-Clause"
] | null | null | null | tetrahedron/vertex_effect.py | mayhem/led-tetrahedron | bed314d0db3c4fe355cd047434b04108e19265cf | [
"BSD-2-Clause"
] | null | null | null | tetrahedron/vertex_effect.py | mayhem/led-tetrahedron | bed314d0db3c4fe355cd047434b04108e19265cf | [
"BSD-2-Clause"
] | null | null | null | import math
from random import random, randint, seed
from math import fmod, sin, pi
from time import sleep, time
from colorsys import hsv_to_rgb, rgb_to_hsv, rgb_to_hsv
import undulating_effect
import gradient
import palette
import effect
"""
Vertexes:
0 - top
1 - tree 0
2 - tree 1 (tree + 1 clockwise)
3 - tree 2 (... | 25.04878 | 65 | 0.525803 |
4a01a842e58a26263176fd45f848183212152cef | 1,082 | py | Python | raspberry-pi/ble.py | ciffelia/airpapyrus | 4e6642025d6b1e81210c63f3cae46e4e361804ea | [
"MIT"
] | null | null | null | raspberry-pi/ble.py | ciffelia/airpapyrus | 4e6642025d6b1e81210c63f3cae46e4e361804ea | [
"MIT"
] | null | null | null | raspberry-pi/ble.py | ciffelia/airpapyrus | 4e6642025d6b1e81210c63f3cae46e4e361804ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import struct
from collections import namedtuple
from bluepy.btle import Scanner
# Test company ID
myCompanyId = "ffff"
AdvertisePayload = struct.Struct("<fffHH")
MeasurementValue = namedtuple(
"MeasurementValue", "temperature humidity pressure co2 tvoc"
)
def scan(timeout):
scann... | 22.081633 | 79 | 0.672828 |
4a01a8f45ac4b8a50f423ec2b59318ce538b64b9 | 102,220 | py | Python | setup.py | askervin/cpython | 001fee14e0f2ba5f41fb733adc69d5965925a094 | [
"CNRI-Python-GPL-Compatible"
] | 2 | 2019-06-14T19:02:40.000Z | 2020-04-19T08:20:44.000Z | setup.py | askervin/cpython | 001fee14e0f2ba5f41fb733adc69d5965925a094 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | setup.py | askervin/cpython | 001fee14e0f2ba5f41fb733adc69d5965925a094 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2020-12-09T03:51:45.000Z | 2020-12-09T03:51:45.000Z | # Autodetecting setup.py script for building the Python extensions
#
import sys, os, importlib.machinery, re, argparse
from glob import glob
import importlib._bootstrap
import importlib.util
import sysconfig
from distutils import log
from distutils.errors import *
from distutils.core import Extension, setup
from dist... | 43.094435 | 119 | 0.541381 |
4a01a967a09607db3cca27aca17d8e879a1d719d | 4,742 | py | Python | sdk/python/pulumi_rancher2/cluster_sync.py | mitchellmaler/pulumi-rancher2 | e6ca44b58b5b10c12a4e628e61aa8d98330f0863 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_rancher2/cluster_sync.py | mitchellmaler/pulumi-rancher2 | e6ca44b58b5b10c12a4e628e61aa8d98330f0863 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_rancher2/cluster_sync.py | mitchellmaler/pulumi-rancher2 | e6ca44b58b5b10c12a4e628e61aa8d98330f0863 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables
class Cluster... | 45.161905 | 159 | 0.674399 |
4a01aa76dda85489cdc72ed3064f50a91139321b | 1,154 | py | Python | mastering-flask/migrations/versions/43297e7634a2_add_roles_and_roles_users.py | zhchnchn/flask-repo | 51aad8c9e80112d53a6455221bc94cc9a523e356 | [
"Apache-2.0"
] | null | null | null | mastering-flask/migrations/versions/43297e7634a2_add_roles_and_roles_users.py | zhchnchn/flask-repo | 51aad8c9e80112d53a6455221bc94cc9a523e356 | [
"Apache-2.0"
] | null | null | null | mastering-flask/migrations/versions/43297e7634a2_add_roles_and_roles_users.py | zhchnchn/flask-repo | 51aad8c9e80112d53a6455221bc94cc9a523e356 | [
"Apache-2.0"
] | null | null | null | """add roles and roles_users
Revision ID: 43297e7634a2
Revises: 17aa4630e008
Create Date: 2018-01-11 17:44:01.234594
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '43297e7634a2'
down_revision = '17aa4630e008'
branch_labels = None
depends_on = None
def upgra... | 27.47619 | 67 | 0.672444 |
4a01aade2b27280756c85a58b347a5dff3da4def | 512 | py | Python | urls.py | sideeffects/stats_core | 333c3111bef466541d754c962db9817769b260cd | [
"MIT"
] | 1 | 2021-02-09T18:09:30.000Z | 2021-02-09T18:09:30.000Z | urls.py | sideeffects/stats_core | 333c3111bef466541d754c962db9817769b260cd | [
"MIT"
] | null | null | null | urls.py | sideeffects/stats_core | 333c3111bef466541d754c962db9817769b260cd | [
"MIT"
] | 1 | 2021-08-09T03:34:06.000Z | 2021-08-09T03:34:06.000Z | try:
from django.conf.urls import patterns, include, url
except ImportError:
from django.conf.urls.defaults import patterns, include, url
# To use admin
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Enable admin documentation:
url(r'^admin/doc/', include('django.c... | 24.380952 | 66 | 0.693359 |
4a01ac03099abb7589739eaad18c62385d0f1d10 | 11,766 | py | Python | snuba/query/expressions.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | snuba/query/expressions.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | snuba/query/expressions.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass, replace
from datetime import date, datetime
from typing import (
Callable,
Generic,
Iterator,
Optional,
TypeVar,
Tuple,
Union,
)
TVisited = TypeVar("TVisited")
@dataclass(frozen=True... | 35.439759 | 99 | 0.689784 |
4a01ac2b5efc2cd4437d2d701a55553ad2157703 | 2,903 | py | Python | lib/scripts/mouse.py | pacifio/dart-autogui | 45e99958b0a21ddb93d26638cea2e348e2e14efa | [
"MIT"
] | 2 | 2021-09-11T05:43:45.000Z | 2021-09-11T07:06:21.000Z | lib/scripts/mouse.py | pacifio/dart-autogui | 45e99958b0a21ddb93d26638cea2e348e2e14efa | [
"MIT"
] | null | null | null | lib/scripts/mouse.py | pacifio/dart-autogui | 45e99958b0a21ddb93d26638cea2e348e2e14efa | [
"MIT"
] | null | null | null | import json
import sys
import pyautogui as auto
def map_tween(tween):
if tween == "linear":
return auto.linear
elif tween == "ease-in":
return auto.easeInQuad
elif tween == "ease-out":
return auto.easeOutQuad
elif tween == "ease-in-out":
return auto.easeInOutQuad
el... | 32.988636 | 138 | 0.568722 |
4a01ac63094f5e0150887f9e201a35ff24119cf3 | 1,556 | py | Python | universal/algos/rmr.py | mannmann2/universal-portfolios | 7a9b563193353d93c9713761544da8750b0b06ab | [
"MIT"
] | 1 | 2022-01-06T14:47:02.000Z | 2022-01-06T14:47:02.000Z | universal/algos/rmr.py | jmrichardson/universal-portfolios | f49455b01f74223707474047089f10fb5360da37 | [
"MIT"
] | null | null | null | universal/algos/rmr.py | jmrichardson/universal-portfolios | f49455b01f74223707474047089f10fb5360da37 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from .. import tools
from ..algo import Algo
from .olmar import OLMAR
def norm(x):
if isinstance(x, pd.Series):
axis = 0
else:
axis = 1
return np.sqrt((x ** 2).sum(axis=axis))
class RMR(OLMAR):
"""Robust Median Reversion. Strategy exploiting me... | 28.814815 | 93 | 0.602185 |
4a01ad7d8efb5e075b513c39a7131f93d2b371ad | 12,490 | py | Python | host/agent/agent.py | MSAdministrator/cuckoo-config | 85f53164087bfcde79f0392b904903b0f5d00815 | [
"MIT"
] | 4 | 2020-04-18T19:10:36.000Z | 2021-09-03T09:07:27.000Z | host/agent/agent.py | MSAdministrator/cuckoo-config | 85f53164087bfcde79f0392b904903b0f5d00815 | [
"MIT"
] | null | null | null | host/agent/agent.py | MSAdministrator/cuckoo-config | 85f53164087bfcde79f0392b904903b0f5d00815 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2015-2017 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import argparse
import cgi
import io
import json
import os
import platform
import re
import shutil
import stat
import subprocess
... | 29.738095 | 82 | 0.617374 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.