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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfd7a9144a8f14bba80673d9aa02999583a7a780 | 2,774 | py | Python | oldtest/4tf.py | han20192019/contextmbo | d188f0fd0043cdfd37d9660f37682eef053044fd | [
"MIT"
] | null | null | null | oldtest/4tf.py | han20192019/contextmbo | d188f0fd0043cdfd37d9660f37682eef053044fd | [
"MIT"
] | null | null | null | oldtest/4tf.py | han20192019/contextmbo | d188f0fd0043cdfd37d9660f37682eef053044fd | [
"MIT"
] | null | null | null | from design_baselines.cbas import cbas
from design_baselines.rep import rep
from design_baselines.rep_coms_cleaned import coms_cleaned
seed = [1]
mmd_param = [100, 500, 1000] #[0.1, 0, 10, 100, 500, 1000]
dim = 32 #16,32,64,128,256
for s in seed:
for m in mmd_param:
coms_cleaned(logging_dir = "/nfs/kun2/use... | 55.48 | 162 | 0.425018 |
c6491a4494950ee46f39d64d0518cb83e710b624 | 1,121 | py | Python | solutions/server/server-15-crud-collaborator/server/database/upload.py | FroeMic/CDTM-Backend-Workshop | de3ef16dc89dfd1217565ab2dd4aec753e59cda0 | [
"MIT"
] | null | null | null | solutions/server/server-15-crud-collaborator/server/database/upload.py | FroeMic/CDTM-Backend-Workshop | de3ef16dc89dfd1217565ab2dd4aec753e59cda0 | [
"MIT"
] | null | null | null | solutions/server/server-15-crud-collaborator/server/database/upload.py | FroeMic/CDTM-Backend-Workshop | de3ef16dc89dfd1217565ab2dd4aec753e59cda0 | [
"MIT"
] | null | null | null | from utils import *
from server import app
def db_get_filenames_for_task(task_id):
''' Returns a list of all files for a tasks from the database '''
query = '''
SELECT filename
FROM Uploads
WHERE task = ?;
'''
with app.app_context():
db = get_db()
cur = db.c... | 23.851064 | 69 | 0.55397 |
2fb37d0fd9a66d6f510127eff0d509763c773055 | 364 | py | Python | train/learningrate/ExponentialLR.py | Beautyya/BenchENA | 5f5491614fc2f00ca26dc29f35f44c334db4718c | [
"MIT"
] | 1 | 2022-01-21T07:56:13.000Z | 2022-01-21T07:56:13.000Z | train/learningrate/ExponentialLR.py | Beautyya/BenchENA | 5f5491614fc2f00ca26dc29f35f44c334db4718c | [
"MIT"
] | 1 | 2022-02-24T06:07:27.000Z | 2022-02-24T06:07:27.000Z | BenchENAS_python_package/train/learningrate/ExponentialLR.py | benchenas/BenchENAS | 776cd1dd035d73c4af369d0106d010b932f64782 | [
"MIT"
] | 1 | 2022-01-20T07:36:37.000Z | 2022-01-20T07:36:37.000Z | # coding=utf-8
from train.learningrate.learningrate import BaseLearningRate
import torch
class ExponentialLR(BaseLearningRate):
"""ExponentialLR
"""
def __init__(self, **kwargs):
super(ExponentialLR, self).__init__(**kwargs)
def get_learning_rate(self):
return torch.optim.lr_schedule... | 22.75 | 80 | 0.728022 |
beef756529228c025c6f9f8eed23fe270af48270 | 100 | py | Python | jayson/__main__.py | pyrustic/jayson | 31338a6739dc13f574e6fe5df7a2520c973c89d8 | [
"MIT"
] | null | null | null | jayson/__main__.py | pyrustic/jayson | 31338a6739dc13f574e6fe5df7a2520c973c89d8 | [
"MIT"
] | null | null | null | jayson/__main__.py | pyrustic/jayson | 31338a6739dc13f574e6fe5df7a2520c973c89d8 | [
"MIT"
] | null | null | null | def main():
print("https://github.com/pyrustic/jayson")
if __name__ == "__main__":
main()
| 14.285714 | 47 | 0.62 |
fadc699c176bd3c53841ed83e4c8c08cb4054e84 | 690 | py | Python | chap8/mxnet/score_model.py | wang420349864/dlcv_for_beginners | 080c7d3bbb4a68e4fb79e33231ccc666ada16dcc | [
"BSD-3-Clause"
] | 1,424 | 2017-01-04T12:08:01.000Z | 2022-03-31T02:57:24.000Z | chap8/mxnet/score_model.py | wang420349864/dlcv_for_beginners | 080c7d3bbb4a68e4fb79e33231ccc666ada16dcc | [
"BSD-3-Clause"
] | 39 | 2017-03-16T08:48:28.000Z | 2021-03-03T11:30:23.000Z | chap8/mxnet/score_model.py | wang420349864/dlcv_for_beginners | 080c7d3bbb4a68e4fb79e33231ccc666ada16dcc | [
"BSD-3-Clause"
] | 703 | 2017-02-22T19:35:45.000Z | 2022-03-21T01:31:27.000Z | import mxnet as mx
test_dataiter = mx.io.ImageRecordIter(
path_imgrec="../data/test.rec",
data_shape=(1, 28, 28),
batch_size=100,
mean_r=128,
scale=0.00390625,
)
mod = mx.mod.Module.load('mnist_lenet', 35, context=mx.gpu(2))
mod.bind(
data_shapes=test_dataiter.provide_data,
label_shapes=t... | 23 | 62 | 0.675362 |
125b524698618e946f499b8040dce7a651124379 | 33,233 | py | Python | python/kserve/kserve/models/v1beta1_paddle_server_spec.py | Suresh-Nakkeran/kserve | d3910e0fc6af4bf73156a53bd912d6e4acc87533 | [
"Apache-2.0"
] | null | null | null | python/kserve/kserve/models/v1beta1_paddle_server_spec.py | Suresh-Nakkeran/kserve | d3910e0fc6af4bf73156a53bd912d6e4acc87533 | [
"Apache-2.0"
] | null | null | null | python/kserve/kserve/models/v1beta1_paddle_server_spec.py | Suresh-Nakkeran/kserve | d3910e0fc6af4bf73156a53bd912d6e4acc87533 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 kubeflow.org.
#
# 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,... | 41.697616 | 616 | 0.678362 |
bb4c22f167797e4d81f6bce0bc00b0b63457c675 | 28 | py | Python | vis/__init__.py | JessikaSmith/OptimizationAlgorithms | bf0f871f4d6150e1e7533360cfc6f70eb616c870 | [
"MIT"
] | 15 | 2018-11-16T04:42:44.000Z | 2020-03-20T16:00:47.000Z | vis/__init__.py | JessikaSmith/OptimizationAlgorithms | bf0f871f4d6150e1e7533360cfc6f70eb616c870 | [
"MIT"
] | null | null | null | vis/__init__.py | JessikaSmith/OptimizationAlgorithms | bf0f871f4d6150e1e7533360cfc6f70eb616c870 | [
"MIT"
] | 3 | 2019-01-17T13:18:56.000Z | 2019-12-17T22:22:48.000Z | from vis.tsp_tools import *
| 14 | 27 | 0.785714 |
8089357fd39fffef32ac991adb7c98ca9d05a2b5 | 5,227 | py | Python | samples/feather_damage/video_detection2.py | clmpng/Mask_RCNN | 0a90ce2710284aef29c8198b5e1a0ea5d440f1cd | [
"MIT"
] | null | null | null | samples/feather_damage/video_detection2.py | clmpng/Mask_RCNN | 0a90ce2710284aef29c8198b5e1a0ea5d440f1cd | [
"MIT"
] | null | null | null | samples/feather_damage/video_detection2.py | clmpng/Mask_RCNN | 0a90ce2710284aef29c8198b5e1a0ea5d440f1cd | [
"MIT"
] | null | null | null |
import os
import sys
import numpy as np
np.random.seed(0)
import matplotlib.pyplot as plt
import cv2
import argparse
# Root directory of the project
ROOT_DIR = '../../'
assert os.path.exists(ROOT_DIR), 'ROOT_DIR does not exist. Did you forget to read the instructions above? ;)'
# Import mrcnn libraries
sys.path.appe... | 35.80137 | 170 | 0.652956 |
32b7e517851b835c9a99f97b5238e43225a1af4f | 2,905 | py | Python | httpie/legacy/v3_1_0_session_cookie_format.py | 10088/httpie | dc5274e491b48d8294d530eb12186df28bf9d1b7 | [
"BSD-3-Clause"
] | 2 | 2022-01-31T18:18:58.000Z | 2022-01-31T18:26:35.000Z | httpie/legacy/v3_1_0_session_cookie_format.py | 10088/httpie | dc5274e491b48d8294d530eb12186df28bf9d1b7 | [
"BSD-3-Clause"
] | 2 | 2022-03-09T06:26:07.000Z | 2022-03-09T06:26:17.000Z | httpie/legacy/v3_1_0_session_cookie_format.py | 10088/httpie | dc5274e491b48d8294d530eb12186df28bf9d1b7 | [
"BSD-3-Clause"
] | null | null | null | import argparse
from typing import Any, Type, List, Dict, TYPE_CHECKING
if TYPE_CHECKING:
from httpie.sessions import Session
INSECURE_COOKIE_JAR_WARNING = '''\
Outdated layout detected for the current session. Please consider updating it,
in order to not get affected by potential security problems.
For fixing ... | 28.762376 | 112 | 0.651635 |
0e5650009acd217e47d867080aac660f80a0f314 | 1,441 | py | Python | Lektion_002_Werte_einlesen.py | f-vdb/Python3-Kurs | 10c01d481452165bf802bd1dba4a0e01ff666fb2 | [
"CC0-1.0"
] | null | null | null | Lektion_002_Werte_einlesen.py | f-vdb/Python3-Kurs | 10c01d481452165bf802bd1dba4a0e01ff666fb2 | [
"CC0-1.0"
] | null | null | null | Lektion_002_Werte_einlesen.py | f-vdb/Python3-Kurs | 10c01d481452165bf802bd1dba4a0e01ff666fb2 | [
"CC0-1.0"
] | null | null | null |
zahlA = input("Bitte gib eine ganze Zahl ein: ")
zahlB = input("Bitte gib eine zweite ganze Zahl ein: ")
summe = zahlA + zahlB
print(summe) # Ausgabe: "2342"
# Das ist nicht das was ich wollte. Ich wollte doch die Summe der beiden Zahlen ausrechnen.
# Eine Idee, was hier schief geht?
# Passen vlt. die Datentype... | 27.711538 | 91 | 0.675226 |
4a9b53ff2a90e1116b242bb35866d5e3c38e7fb2 | 3,266 | py | Python | nwb_conversion_tools/datainterfaces/__init__.py | Saksham20/nwb-conversion-tools | db9e06e584c5bdde89317bfb3146d7b154667036 | [
"BSD-3-Clause"
] | 19 | 2020-05-04T18:40:36.000Z | 2022-01-24T08:53:14.000Z | nwb_conversion_tools/datainterfaces/__init__.py | Saksham20/nwb-conversion-tools | db9e06e584c5bdde89317bfb3146d7b154667036 | [
"BSD-3-Clause"
] | 369 | 2020-04-06T14:20:08.000Z | 2022-03-31T16:05:48.000Z | nwb_conversion_tools/datainterfaces/__init__.py | Saksham20/nwb-conversion-tools | db9e06e584c5bdde89317bfb3146d7b154667036 | [
"BSD-3-Clause"
] | 10 | 2020-03-31T20:06:00.000Z | 2022-03-26T08:25:49.000Z | from .ecephys.tutorial.recordingtutorialdatainterface import RecordingTutorialInterface
from .ecephys.tutorial.sortingtutorialdatainterface import SortingTutorialInterface
from .ecephys.neuroscope.neuroscopedatainterface import (
NeuroscopeRecordingInterface,
NeuroscopeLFPInterface,
NeuroscopeMultiRecording... | 39.349398 | 100 | 0.855481 |
5db1871ba399619979cc87e2fbc3413f1081e231 | 3,479 | py | Python | apps/dash-pileup-demo/layout_helper.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 1 | 2021-06-04T10:04:55.000Z | 2021-06-04T10:04:55.000Z | apps/dash-pileup-demo/layout_helper.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | null | null | null | apps/dash-pileup-demo/layout_helper.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 1 | 2021-07-27T11:22:35.000Z | 2021-07-27T11:22:35.000Z | import base64
import os
import dash
import dash_core_components as dcc
import dash_html_components as html
def run_standalone_app(layout, callbacks, header_colors, filename):
"""Run demo app (tests/dashbio_demos/*/app.py) as standalone app."""
app = dash.Dash(__name__)
app.scripts.config.serve_locally = ... | 33.451923 | 85 | 0.415349 |
cf27aee502253124ee0922c62b9e6f6a04acf0e9 | 2,807 | py | Python | BS-AP-locatioon/apLoc.py | darcy-shimmer/AG-LayCast | 818f03e3149086b0766500c177e80af6777a307d | [
"Apache-2.0"
] | 1 | 2019-08-20T01:23:05.000Z | 2019-08-20T01:23:05.000Z | BS-AP-locatioon/apLoc.py | darcy-shimmer/AG-LayCast | 818f03e3149086b0766500c177e80af6777a307d | [
"Apache-2.0"
] | null | null | null | BS-AP-locatioon/apLoc.py | darcy-shimmer/AG-LayCast | 818f03e3149086b0766500c177e80af6777a307d | [
"Apache-2.0"
] | null | null | null | import linecache
import urllib.request
import json
import time
import re
#according to queue of lat&lon, find wifi's mac
def registerUrl(Index,outIndex):
#try:
url ="http://api.cellocation.com:81/rewifi/?lat="+str(Index)+"&lon="+str(outIndex)+"&n=10"
#print(url)
data = urllib.request.urlopen(url).read(... | 30.51087 | 94 | 0.505166 |
36cb307ecdead7d0ddf19450df211f3b1346aca1 | 873 | py | Python | docs/jnpr_healthbot_swagger/test/test_tsdb_error.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 10 | 2019-10-23T12:54:37.000Z | 2022-02-07T19:24:30.000Z | docs/jnpr_healthbot_swagger/test/test_tsdb_error.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 5 | 2019-09-30T04:29:25.000Z | 2022-02-16T12:21:06.000Z | docs/jnpr_healthbot_swagger/test/test_tsdb_error.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 4 | 2019-09-30T01:17:48.000Z | 2020-08-25T07:27:54.000Z | # coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 3.1.0
Contact: healthbot-feedback@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagg... | 21.292683 | 79 | 0.697595 |
dcb2a4787deb7fccbb1c7d4e01ee1cc94ce4c852 | 474 | py | Python | plugins/hydra_gridengine_launcher/example/my_app.py | ethanluoyc/submitit_gridengine | c7da16038c9aa8a3b2f296b94365a5787ea49d37 | [
"MIT"
] | 4 | 2020-10-21T13:33:02.000Z | 2021-03-12T21:17:19.000Z | plugins/hydra_gridengine_launcher/example/my_app.py | ethanluoyc/submitit_gridengine | c7da16038c9aa8a3b2f296b94365a5787ea49d37 | [
"MIT"
] | null | null | null | plugins/hydra_gridengine_launcher/example/my_app.py | ethanluoyc/submitit_gridengine | c7da16038c9aa8a3b2f296b94365a5787ea49d37 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import logging
import os
import time
import hydra
import submitit
from omegaconf import DictConfig
log = logging.getLogger(__name__)
@hydra.main(config_name="config")
def my_app(cfg: DictConfig) -> None:
# env = submitit.JobEnvironment()
... | 20.608696 | 81 | 0.71097 |
655bfdf9a317ee6fc20f7ee515233592597f1f2f | 1,656 | py | Python | lib/datasets/factory.py | tianzhi0549/py-faster-rcnn-resnet-imagenet | 1d358cd341fa092a7c2f271a09e5d0385c8d3b74 | [
"BSD-2-Clause"
] | 27 | 2017-07-31T03:01:23.000Z | 2021-07-12T03:46:16.000Z | lib/datasets/factory.py | PranjaliSaini/py-faster-rcnn-resnet-imagenet | 1d358cd341fa092a7c2f271a09e5d0385c8d3b74 | [
"BSD-2-Clause"
] | 2 | 2017-09-17T19:21:20.000Z | 2019-02-26T11:49:51.000Z | lib/datasets/factory.py | PranjaliSaini/py-faster-rcnn-resnet-imagenet | 1d358cd341fa092a7c2f271a09e5d0385c8d3b74 | [
"BSD-2-Clause"
] | 26 | 2017-08-08T09:26:33.000Z | 2021-12-15T03:42:24.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Factory method for easily getting imdbs by name."""
__sets = {}
fr... | 33.795918 | 79 | 0.601449 |
2377c9fd8ea3f99732527760313323b7a3627584 | 1,347 | py | Python | libvcs/exc.py | tony/libvcs | 05db3a77b53326502cbb5bc76e8a6985cd271182 | [
"MIT"
] | 35 | 2016-07-16T21:39:10.000Z | 2017-11-24T02:52:13.000Z | libvcs/exc.py | tony/libvcs | 05db3a77b53326502cbb5bc76e8a6985cd271182 | [
"MIT"
] | 70 | 2016-06-20T06:45:12.000Z | 2018-03-06T14:57:35.000Z | libvcs/exc.py | tony/libvcs | 05db3a77b53326502cbb5bc76e8a6985cd271182 | [
"MIT"
] | 2 | 2016-06-21T13:59:00.000Z | 2017-05-12T17:49:45.000Z | """Exceptions for libvcs.
If you see this, we're publishing to S3 automatically
"""
class LibVCSException(Exception):
"""Standard exception raised by libvcs."""
class CommandError(LibVCSException):
"""This exception is raised on non-zero return codes."""
def __init__(self, output, returncode=None, cm... | 24.944444 | 79 | 0.628062 |
13f484acd312456206e6b7494a25280bd5d8a873 | 342 | py | Python | bot/exts/__init__.py | sam-heller/sir-lancebot | a3bd208580ff223cd0120d0c4b5a1bf3c28d03e5 | [
"MIT"
] | 1 | 2021-11-07T04:04:13.000Z | 2021-11-07T04:04:13.000Z | bot/exts/__init__.py | sam-heller/sir-lancebot | a3bd208580ff223cd0120d0c4b5a1bf3c28d03e5 | [
"MIT"
] | 3 | 2021-08-21T07:26:51.000Z | 2022-03-12T01:05:58.000Z | bot/exts/__init__.py | sam-heller/sir-lancebot | a3bd208580ff223cd0120d0c4b5a1bf3c28d03e5 | [
"MIT"
] | 1 | 2021-02-11T23:44:40.000Z | 2021-02-11T23:44:40.000Z | import logging
import pkgutil
from typing import Iterator
__all__ = ("get_package_names",)
log = logging.getLogger(__name__)
def get_package_names() -> Iterator[str]:
"""Iterate names of all packages located in /bot/exts/."""
for package in pkgutil.iter_modules(__path__):
if package.ispkg:
... | 22.8 | 62 | 0.707602 |
57e64b0ec499522d2b09b760e8c5d737360d0d5b | 7,500 | py | Python | finnhub/models/upgrade_downgrade.py | gavinjay/finnhub-python | b5c409dafeda390d14a2b0618ae6f25ab8d76c5b | [
"Apache-2.0"
] | null | null | null | finnhub/models/upgrade_downgrade.py | gavinjay/finnhub-python | b5c409dafeda390d14a2b0618ae6f25ab8d76c5b | [
"Apache-2.0"
] | null | null | null | finnhub/models/upgrade_downgrade.py | gavinjay/finnhub-python | b5c409dafeda390d14a2b0618ae6f25ab8d76c5b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Finnhub API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fro... | 28.51711 | 159 | 0.587333 |
f1a53bfda0cf9b28e2d076ae3fe98190f7d2b9b3 | 25,664 | py | Python | experiments/moscow_exp_nodule/data_loader.py | ivanwilliammd/I3DR-Net | 356d9a3d821d22c375b0bcc42ae488fe6e520e21 | [
"Apache-2.0"
] | 12 | 2020-04-10T07:25:46.000Z | 2021-09-28T07:04:53.000Z | experiments/moscow_exp_nodule/data_loader.py | ivanwilliammd/I3DR-Net | 356d9a3d821d22c375b0bcc42ae488fe6e520e21 | [
"Apache-2.0"
] | null | null | null | experiments/moscow_exp_nodule/data_loader.py | ivanwilliammd/I3DR-Net | 356d9a3d821d22c375b0bcc42ae488fe6e520e21 | [
"Apache-2.0"
] | 2 | 2020-04-15T12:52:01.000Z | 2020-07-19T08:47:39.000Z | #!/usr/bin/env python
# Official implementation code for "Lung Nodule Detection and Classification from Thorax CT-Scan Using RetinaNet with Transfer Learning" and "Lung Nodule Texture Detection and Classification Using 3D CNN."
# Adapted from of [medicaldetectiontoolkit](https://github.com/pfjaeger/medicaldetectiontool... | 53.578288 | 205 | 0.643041 |
e7d2540bcb0bf79650e57e6833a3b305868e168f | 285 | py | Python | Basic_ML/q_lstsq.py | tjwei/taishin20190827 | b9191f24d84b214b08c3482a04796c1c379a9039 | [
"Apache-2.0"
] | 3 | 2019-02-16T05:57:09.000Z | 2019-09-16T07:07:18.000Z | Basic_ML/q_lstsq.py | tjwei/taishin20190827 | b9191f24d84b214b08c3482a04796c1c379a9039 | [
"Apache-2.0"
] | null | null | null | Basic_ML/q_lstsq.py | tjwei/taishin20190827 | b9191f24d84b214b08c3482a04796c1c379a9039 | [
"Apache-2.0"
] | 8 | 2019-02-14T02:51:26.000Z | 2019-10-07T07:44:24.000Z | # 常數項
# 產生隨機數據
X = np.random.normal(0, 3, size=(50,1))
one = np.ones_like(X)
X = np.concatenate([X, one], axis=1)
Y = X @ [3, 15] + np.random.normal(0, size=50)
# 用 numpy 的 lstsq
a = np.linalg.lstsq(X, Y)[0]
print("a=", a)
# 畫出來
plt.plot(X[:, 0], Y, 'o')
plt.plot(X[:, 0], X @ a, 'o'); | 23.75 | 46 | 0.557895 |
d974acb00650054b4f1f00abad54b0334dcaf298 | 7,712 | py | Python | rplugin/python3/denite/source/gitstatus.py | thecontinium/denite-git | aa2622315ad5ed45c4bb40a95a2182c6a5478540 | [
"MIT"
] | null | null | null | rplugin/python3/denite/source/gitstatus.py | thecontinium/denite-git | aa2622315ad5ed45c4bb40a95a2182c6a5478540 | [
"MIT"
] | null | null | null | rplugin/python3/denite/source/gitstatus.py | thecontinium/denite-git | aa2622315ad5ed45c4bb40a95a2182c6a5478540 | [
"MIT"
] | null | null | null | # ============================================================================
# FILE: gitstatus.py
# AUTHOR: Qiming Zhao <chemzqm@gmail.com>
# License: MIT license
# ============================================================================
# pylint: disable=E0401,C0411
import os
import re
import subprocess
import s... | 36.037383 | 92 | 0.548107 |
5aa641f85a5e9cdbf555e256b1a3ebf272e8dc52 | 10,697 | py | Python | amfeti/parallelization_managers/mpi_manager.py | AppliedMechanics/AMfe | be209dffe4d170aca735f1e912fd5cb448502119 | [
"BSD-3-Clause"
] | 21 | 2017-06-01T15:55:33.000Z | 2022-03-13T08:43:31.000Z | amfeti/parallelization_managers/mpi_manager.py | AppliedMechanics/AMfeti | be209dffe4d170aca735f1e912fd5cb448502119 | [
"BSD-3-Clause"
] | 1 | 2022-01-08T07:20:15.000Z | 2022-01-13T23:56:33.000Z | amfeti/parallelization_managers/mpi_manager.py | AppliedMechanics/AMfeti | be209dffe4d170aca735f1e912fd5cb448502119 | [
"BSD-3-Clause"
] | 10 | 2018-01-11T23:48:55.000Z | 2022-01-12T15:58:54.000Z | #
# Copyright (c) 2020 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#
"""
MPI-manager module for parallelization
""... | 37.932624 | 189 | 0.585398 |
cd581c7b810ea9af469cc077af7cd095e82b1115 | 1,012 | py | Python | stubs.min/System/Windows/Forms/__init___parts/ArrangeDirection.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Forms/__init___parts/ArrangeDirection.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Forms/__init___parts/ArrangeDirection.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class ArrangeDirection(Enum,IComparable,IFormattable,IConvertible):
"""
Specifies the direction in which the system arranges minimized windows.
enum (flags) ArrangeDirection,values: Down (4),Left (0),Right (0),Up (4)
"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y)... | 28.111111 | 215 | 0.663043 |
b7e9059dc0e3849a525cf0f88fe9e59541db1fda | 962 | py | Python | Lib/site-packages/notebook/services/nbconvert/tests/test_nbconvert_api.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/services/nbconvert/tests/test_nbconvert_api.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/services/nbconvert/tests/test_nbconvert_api.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | from notebook.utils import url_path_join
from notebook.tests.launchnotebook import NotebookTestBase
class NbconvertAPI:
"""Wrapper for nbconvert API calls."""
def __init__(self, request):
self.request = request
def _req(self, verb, path, body=None, params=None):
response = self.request(ver... | 33.172414 | 79 | 0.658004 |
1620db6ddb7f6e79c7e7b799b4be98ebad01e215 | 1,354 | py | Python | util.py | 226wyj/You-Draw-I-Guess | ed36d75540b595e2cd7ad2454a10fa94b58acb47 | [
"MIT"
] | null | null | null | util.py | 226wyj/You-Draw-I-Guess | ed36d75540b595e2cd7ad2454a10fa94b58acb47 | [
"MIT"
] | null | null | null | util.py | 226wyj/You-Draw-I-Guess | ed36d75540b595e2cd7ad2454a10fa94b58acb47 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*
import sys
sys.path.append(".")
import os
import random
import logging
import torch as t
import numpy as np
def init_logger():
"""将日志信息输出到控制台
Params:
asctime: 打印日志的时间
levelname: 打印日志级别
name: 打印日志名字
message: 打印日志信息
"""
logging.basicConfig(
... | 25.54717 | 88 | 0.627031 |
79aa1fd7427b2d266cb41a74f9dca3ba11baa5e7 | 69,344 | py | Python | runtests.py | larsmans/cython | 4b29260d24af8fe7924efd2291a931e8bdf938f1 | [
"Apache-2.0"
] | null | null | null | runtests.py | larsmans/cython | 4b29260d24af8fe7924efd2291a931e8bdf938f1 | [
"Apache-2.0"
] | null | null | null | runtests.py | larsmans/cython | 4b29260d24af8fe7924efd2291a931e8bdf938f1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import sys
import re
import gc
import locale
import shutil
import time
import unittest
import doctest
import operator
import subprocess
import tempfile
import traceback
import warnings
try:
import platform
IS_PYPY = platform.python_implementation() == 'PyPy'
IS_CPYTHON = platfo... | 39.489749 | 116 | 0.57907 |
beb8b9d7ed87096fcc11c55a1895f8aade8469b2 | 11,311 | py | Python | laske_export/document/invoice_sales_order_adapter.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 1 | 2021-01-12T08:14:10.000Z | 2021-01-12T08:14:10.000Z | laske_export/document/invoice_sales_order_adapter.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 249 | 2017-04-18T14:00:13.000Z | 2022-03-30T12:18:03.000Z | laske_export/document/invoice_sales_order_adapter.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 7 | 2017-04-18T08:43:54.000Z | 2021-07-28T07:29:30.000Z | from decimal import ROUND_HALF_UP, Decimal
from dateutil.relativedelta import relativedelta
from django.conf import settings
from leasing.enums import InvoiceType, RentCycle
from leasing.models.utils import get_next_business_day, is_business_day
from .sales_order import BillingParty1, LineItem, OrderParty
class In... | 39.41115 | 113 | 0.626116 |
38d9522252f22b68a0281224ce44c802e540c71a | 26,957 | py | Python | fastai/learner.py | maxpark/fastai | 7dd70d4fd9ff1091557e09c9f00c8894b818544e | [
"Apache-2.0"
] | 1 | 2022-03-13T00:09:58.000Z | 2022-03-13T00:09:58.000Z | fastai/learner.py | maxpark/fastai | 7dd70d4fd9ff1091557e09c9f00c8894b818544e | [
"Apache-2.0"
] | null | null | null | fastai/learner.py | maxpark/fastai | 7dd70d4fd9ff1091557e09c9f00c8894b818544e | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/13a_learner.ipynb (unless otherwise specified).
from __future__ import annotations
__all__ = ['replacing_yield', 'mk_metric', 'save_model', 'load_model', 'SkipToEpoch', 'Learner', 'before_batch_cb',
'load_learner', 'Metric', 'AvgMetric', 'AvgLoss', 'AvgSmoo... | 42.186228 | 204 | 0.666061 |
0491c8fb1ade03ff79099d9b70c2a8b65ee15c7a | 3,259 | py | Python | online_store/store/migrations/0001_initial.py | PhiVaLo/final_project2 | 3d61404f2fe4b9e4503087e523ea16d6c411f57f | [
"Apache-2.0"
] | null | null | null | online_store/store/migrations/0001_initial.py | PhiVaLo/final_project2 | 3d61404f2fe4b9e4503087e523ea16d6c411f57f | [
"Apache-2.0"
] | 14 | 2020-12-06T13:31:34.000Z | 2020-12-12T12:55:06.000Z | online_store/store/migrations/0001_initial.py | PhiVaLo/final_project2 | 3d61404f2fe4b9e4503087e523ea16d6c411f57f | [
"Apache-2.0"
] | 1 | 2020-12-17T14:33:19.000Z | 2020-12-17T14:33:19.000Z | # Generated by Django 3.1.3 on 2020-11-25 09:59
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 48.641791 | 144 | 0.602946 |
8775a1857c7a9d1bf283838c09d3673e36d7a2ab | 1,572 | py | Python | Websocket/server_client_dualway2/client.py | likethe265/PythonCommonExample | 788e74058dc8fb10cd9cce4e64d8dd721ee66c14 | [
"Unlicense"
] | null | null | null | Websocket/server_client_dualway2/client.py | likethe265/PythonCommonExample | 788e74058dc8fb10cd9cce4e64d8dd721ee66c14 | [
"Unlicense"
] | null | null | null | Websocket/server_client_dualway2/client.py | likethe265/PythonCommonExample | 788e74058dc8fb10cd9cce4e64d8dd721ee66c14 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import asyncio
import random
import websockets
class WebsocketClient:
def __init__(self):
self.clientID = random.randint(0, 100)
self.event = asyncio.Event()
async def eventGenerator(self):
while True:
await asyncio.sleep(1.5)
self.event.... | 29.660377 | 111 | 0.591603 |
523d9e1b021cdcbfc921e79c29e3b7254ef8e208 | 628 | py | Python | tests/settings.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8
from __future__ import unicode_literals, absolute_import
import django
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
DATABASES = {
"default": {
"ENGINE": "django.db.backe... | 18.470588 | 66 | 0.595541 |
4a64068d2a55b6574f1cc9634a6c22ccd1ff7959 | 1,807 | py | Python | viper/modules/triage.py | Mario-Kart-Felix/mal-scrap | bc396a15ea5b144eb1c0f05759d1f9419d6671df | [
"BSD-3-Clause"
] | 2 | 2015-12-17T20:25:09.000Z | 2017-10-08T19:14:57.000Z | viper/modules/triage.py | Mario-Kart-Felix/mal-scrap | bc396a15ea5b144eb1c0f05759d1f9419d6671df | [
"BSD-3-Clause"
] | 1 | 2015-01-05T18:07:13.000Z | 2015-01-07T21:43:57.000Z | viper/modules/triage.py | Mario-Kart-Felix/mal-scrap | bc396a15ea5b144eb1c0f05759d1f9419d6671df | [
"BSD-3-Clause"
] | 3 | 2017-10-18T00:56:53.000Z | 2020-05-24T09:38:54.000Z | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
from viper.common.abstracts import Module
from viper.core.database import Database
from viper.core.session import __sessions__
class Triage(Module):
cmd = 'triage'
... | 31.701754 | 93 | 0.585501 |
983b896074c3807ee215c5b7f28c01dc4b27940e | 233 | py | Python | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Ariston/exc0003.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | 1 | 2020-07-03T13:54:18.000Z | 2020-07-03T13:54:18.000Z | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Ariston/exc0003.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Ariston/exc0003.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | # Programa que ler 2 numeros e mostra a soma deles
numero01=input('digite o primeiro número: ')
numero02=input('digite o segundo número: ')
print('\n A soma de {} com {} é {}'.format(numero01,numero02,(int(numero01)+int(numero02))))
| 46.6 | 92 | 0.716738 |
8852a38751796f4474e8f5616d1c38dadeb2167e | 5,852 | py | Python | src/globus_sdk/exc.py | mh-globus/globus-sdk-python | c740ebd85640d5c5fe92fd22e99ec05b1a280f6d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/globus_sdk/exc.py | mh-globus/globus-sdk-python | c740ebd85640d5c5fe92fd22e99ec05b1a280f6d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/globus_sdk/exc.py | mh-globus/globus-sdk-python | c740ebd85640d5c5fe92fd22e99ec05b1a280f6d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import logging
import requests
log = logging.getLogger(__name__)
class GlobusError(Exception):
"""
Root of the Globus Exception hierarchy.
Stub class.
"""
class GlobusSDKUsageError(GlobusError, ValueError):
"""
A ``GlobusSDKUsageError`` may be thrown in cases in which the SDK
detects t... | 32.692737 | 82 | 0.585954 |
031887e25bb5c8d7beb9ce3d258b4ce5768d9392 | 5,418 | py | Python | azure_functions_devops_build/repository/repository_manager.py | coolgeeck/delwar1 | 5d3b2b5dc4933974ff26b0f0a869061129259046 | [
"MIT"
] | 16 | 2019-02-17T22:01:32.000Z | 2022-03-31T22:59:46.000Z | azure_functions_devops_build/repository/repository_manager.py | coolgeeck/delwar1 | 5d3b2b5dc4933974ff26b0f0a869061129259046 | [
"MIT"
] | 19 | 2019-02-11T23:31:51.000Z | 2021-06-01T23:20:35.000Z | azure_functions_devops_build/repository/repository_manager.py | coolgeeck/delwar1 | 5d3b2b5dc4933974ff26b0f0a869061129259046 | [
"MIT"
] | 21 | 2019-01-28T21:01:12.000Z | 2022-03-07T16:18:29.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 42 | 118 | 0.706534 |
1df32817a54a7e37568bf44cf7f49207e1b74eaf | 1,638 | py | Python | sandbox/seg_inference.py | njanirudh/coding_task_make-a-model | 12fa64ff6d7846c74624cc9856921f2aaba5c275 | [
"MIT"
] | null | null | null | sandbox/seg_inference.py | njanirudh/coding_task_make-a-model | 12fa64ff6d7846c74624cc9856921f2aaba5c275 | [
"MIT"
] | null | null | null | sandbox/seg_inference.py | njanirudh/coding_task_make-a-model | 12fa64ff6d7846c74624cc9856921f2aaba5c275 | [
"MIT"
] | null | null | null | import cv2
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import torch
from src.utils.custom_config import custom_parser_config
from seg_trainer import SegmentationModule
matplotlib.use('TKAgg', warn=False, force=True)
if __name__ == "__main__":
input_img = cv2.imread(
"/home/anirud... | 38.093023 | 122 | 0.651404 |
698d5e312fb963f43e5d79f1a83246464d43bb70 | 832 | py | Python | micone/conversion/network_converter.py | dileep-kishore/MiCoNE | 10536113c5b28df06e522ba9967f7dc01baebae5 | [
"MIT"
] | 1 | 2019-07-23T13:54:17.000Z | 2019-07-23T13:54:17.000Z | micone/conversion/network_converter.py | dileep-kishore/MiCoNE | 10536113c5b28df06e522ba9967f7dc01baebae5 | [
"MIT"
] | 1 | 2020-06-01T15:45:12.000Z | 2020-06-01T15:45:12.000Z | micone/conversion/network_converter.py | dileep-kishore/MiCoNE | 10536113c5b28df06e522ba9967f7dc01baebae5 | [
"MIT"
] | 1 | 2019-08-03T21:19:35.000Z | 2019-08-03T21:19:35.000Z | """
Module containing methods that convert networks into various formats
"""
import pathlib
import pandas as pd
from ..main import Network
def json_to_elist(in_file: pathlib.Path, out_file: pathlib.Path) -> None:
"""
Convert Network file from json to elist format
Note that only the edge attributes ... | 24.470588 | 73 | 0.673077 |
db0ee653ba7b99bf137c744cb303c3c6f4d9112f | 15,864 | py | Python | tests/test_training.py | ireneb612/Voice-Cloning-App | 41be23e29eae666e59a750270b43eda31506e1d7 | [
"BSD-3-Clause"
] | 556 | 2021-03-10T19:09:47.000Z | 2022-03-30T13:45:13.000Z | tests/test_training.py | ireneb612/Voice-Cloning-App | 41be23e29eae666e59a750270b43eda31506e1d7 | [
"BSD-3-Clause"
] | 100 | 2021-03-14T12:35:46.000Z | 2022-03-26T07:57:42.000Z | tests/test_training.py | ireneb612/Voice-Cloning-App | 41be23e29eae666e59a750270b43eda31506e1d7 | [
"BSD-3-Clause"
] | 84 | 2021-03-16T21:44:06.000Z | 2022-03-30T21:58:28.000Z | import os
import random
from string import ascii_lowercase
from unittest import mock
import torch
import shutil
import logging
from dataset import CHARACTER_ENCODING
from training.clean_text import clean_text
from training.checkpoint import (
load_checkpoint,
save_checkpoint,
checkpoint_cleanup,
warm_s... | 29.932075 | 119 | 0.697869 |
eb9474aac8a1303c4b3554881c55efd8ffd8a460 | 24,953 | py | Python | CTFd/models/__init__.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | null | null | null | CTFd/models/__init__.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | null | null | null | CTFd/models/__init__.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | 1 | 2021-12-23T14:11:15.000Z | 2021-12-23T14:11:15.000Z | from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
from sqlalchemy.sql.expression import union_all
from sqlalchemy.orm import validates, column_property
from sqlalchemy.ext.hybrid import hybrid_property
from CTFd.utils.crypto import hash_password
from CTFd.cache import cache
import dateti... | 32.78975 | 120 | 0.62257 |
5dbec600880facd14277c574d044846e9e379924 | 32,082 | py | Python | eqsig/functions.py | eng-tools/eqsig | c6b5eccea3d37a2debe084ad663d58af84306c86 | [
"MIT"
] | 15 | 2018-10-08T19:18:06.000Z | 2022-02-05T16:03:31.000Z | eqsig/functions.py | eng-tools/eqsig | c6b5eccea3d37a2debe084ad663d58af84306c86 | [
"MIT"
] | 2 | 2019-11-06T05:07:45.000Z | 2021-04-19T09:59:25.000Z | eqsig/functions.py | eng-tools/eqsig | c6b5eccea3d37a2debe084ad663d58af84306c86 | [
"MIT"
] | 8 | 2018-10-08T19:18:09.000Z | 2022-02-03T12:08:33.000Z | import numpy as np
import eqsig
from eqsig import exceptions
def time_series_from_motion(motion, dt):
npts = len(motion)
return np.linspace(0, dt * (npts + 1), npts)
def determine_indices_of_peaks_for_cleaned(values):
"""DEPRECATED: Use determine_indices_of_peaks_for_cleaned_array()"""
return determ... | 29.678076 | 116 | 0.628109 |
bbfab51ced21a16282ca8153189b3c749bcf1c3f | 948 | py | Python | scripts/numpytest.py | cscorley/triage | b7a2de8c5955418acf2b9bd93953a83327052257 | [
"MIT"
] | 3 | 2019-01-13T13:03:53.000Z | 2020-05-03T21:34:43.000Z | scripts/numpytest.py | cscorley/triage | b7a2de8c5955418acf2b9bd93953a83327052257 | [
"MIT"
] | null | null | null | scripts/numpytest.py | cscorley/triage | b7a2de8c5955418acf2b9bd93953a83327052257 | [
"MIT"
] | 1 | 2018-09-30T13:42:10.000Z | 2018-09-30T13:42:10.000Z | import numpy as np
import numpy.random as npr
import time
# modified from
# https://hunseblog.wordpress.com/2014/09/15/installing-numpy-and-openblas/
np.show_config()
# --- Test 1
N = 1
n = 1000
A = npr.randn(n,n)
B = npr.randn(n,n)
t = time.time()
for i in range(N):
C = np.dot(A, B)
td = time.time() - t
print... | 17.555556 | 75 | 0.583333 |
323eccad61557f1ed069af7dc0d1541ccef7f374 | 3,185 | py | Python | testCases/client/clients_list/mobile/TC_209_101_mobile_create_private_list_test.py | harry-100/qa-automation-framework | 5fbe03e930820537e53f2d26b1c2b2bd2b222bf5 | [
"MIT"
] | null | null | null | testCases/client/clients_list/mobile/TC_209_101_mobile_create_private_list_test.py | harry-100/qa-automation-framework | 5fbe03e930820537e53f2d26b1c2b2bd2b222bf5 | [
"MIT"
] | null | null | null | testCases/client/clients_list/mobile/TC_209_101_mobile_create_private_list_test.py | harry-100/qa-automation-framework | 5fbe03e930820537e53f2d26b1c2b2bd2b222bf5 | [
"MIT"
] | null | null | null | import pytest
from time import sleep
from utilities import XLUtility
from pageObjects.common_functions.common_methods import CommonMethods
@pytest.mark.usefixtures("one_time_setup")
class Test_TC209_001_MobileCreatePrivateList:
@pytest.fixture(autouse=True)
def class_setup(self, one_time_setup):
self.driver.set_... | 36.609195 | 87 | 0.807221 |
7f3f7f578f1a6252210f5331e0457b43b0fab8b9 | 8,234 | py | Python | dejavu/database_handler/clickhouse_database.py | Saoqq/dejavu | 8d76350bb754ed5246ab735e72680d4b8e00d507 | [
"MIT"
] | 1 | 2021-08-17T18:22:18.000Z | 2021-08-17T18:22:18.000Z | dejavu/database_handler/clickhouse_database.py | Saoqq/dejavu | 8d76350bb754ed5246ab735e72680d4b8e00d507 | [
"MIT"
] | null | null | null | dejavu/database_handler/clickhouse_database.py | Saoqq/dejavu | 8d76350bb754ed5246ab735e72680d4b8e00d507 | [
"MIT"
] | null | null | null | import queue
import uuid
from typing import List, Tuple, Dict
from clickhouse_driver import connect
from dejavu.base_classes.common_database import CommonDatabase
from dejavu.config.settings import (FIELD_FILE_SHA1, FIELD_FINGERPRINTED,
FIELD_HASH, FIELD_OFFSET, FIELD_SONG_ID,
... | 31.914729 | 106 | 0.585742 |
c130335d45f056052863c454ca7b73a3a54b7527 | 1,509 | py | Python | calibration-tools/wiringpi_test_linear.py | mrwunderbar666/rpi-vumonitor-python | 47e80b2811e513b9011b9ba8d0f1b1ab2c87c915 | [
"MIT"
] | 2 | 2017-10-15T23:21:48.000Z | 2020-02-17T07:09:37.000Z | calibration-tools/wiringpi_test_linear.py | mrwunderbar666/rpi-vumonitor-python | 47e80b2811e513b9011b9ba8d0f1b1ab2c87c915 | [
"MIT"
] | null | null | null | calibration-tools/wiringpi_test_linear.py | mrwunderbar666/rpi-vumonitor-python | 47e80b2811e513b9011b9ba8d0f1b1ab2c87c915 | [
"MIT"
] | 2 | 2020-02-17T07:09:40.000Z | 2021-05-17T19:32:07.000Z | #!/usr/bin/python
"""
== VU Meter Calibration Toolkit ==
==== Pulse Width Modulation and WiringPi GPIO Library ====
Hardware PWM
Loop trough the min and max value
uses linear function
Requires:
- Wiring Pi
MIT License
"""
from __future__ import division
import wiringpi
import time
import math
# PWM Maximum... | 20.12 | 71 | 0.636846 |
130938f0b22b0908b0935b0bf7c92aa4b7a8e4e5 | 4,951 | py | Python | core/src/autogluon/core/searcher/local_searcher.py | daobook/autogluon | 7309118f2ab1c9519f25acf61a283a95af95842b | [
"Apache-2.0"
] | 1 | 2020-09-02T01:10:25.000Z | 2020-09-02T01:10:25.000Z | core/src/autogluon/core/searcher/local_searcher.py | daobook/autogluon | 7309118f2ab1c9519f25acf61a283a95af95842b | [
"Apache-2.0"
] | 3 | 2021-12-30T20:28:01.000Z | 2022-02-09T20:19:21.000Z | core/src/autogluon/core/searcher/local_searcher.py | engsarah365/autogluon | bdbaac2d13d14d075b7aa751561f0bbd39927789 | [
"Apache-2.0"
] | null | null | null | import logging
import pickle
from collections import OrderedDict
from ..space import Categorical, Space
__all__ = ['LocalSearcher']
logger = logging.getLogger(__name__)
class LocalSearcher(object):
"""Local Searcher (virtual class to inherit from if you are creating a custom Searcher).
Parameters
----... | 36.404412 | 131 | 0.647142 |
6bca191e6311ab97e50dc2fa57c9bbc1bff84809 | 4,743 | py | Python | nix_update/__init__.py | jonringer/nix-update | 4d35310c51739407c9831ba5ffb8c3de5871ed65 | [
"MIT"
] | null | null | null | nix_update/__init__.py | jonringer/nix-update | 4d35310c51739407c9831ba5ffb8c3de5871ed65 | [
"MIT"
] | null | null | null | nix_update/__init__.py | jonringer/nix-update | 4d35310c51739407c9831ba5ffb8c3de5871ed65 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
import tempfile
from typing import NoReturn, Optional
from .eval import Package
from .options import Options
from .update import update
from .utils import run, is_nix_flakes
def die(msg: str) -> NoReturn:
print(msg, file=sys.stderr)
sys.exit(1)
def parse_args() -> Optio... | 29.64375 | 98 | 0.608897 |
75e868eb23df6378e98d42ac9ce39571627b83f4 | 5,181 | py | Python | auralib/welldb.py | whamlyn/auralib | 01d64e25018fa249b3f901700428e9cb211d803c | [
"Apache-2.0"
] | 20 | 2016-09-12T23:10:39.000Z | 2021-05-06T01:29:45.000Z | auralib/welldb.py | kwinkunks/auralib | 8300bb0c4d20156b9539df6d6c5e380f52572c4c | [
"Apache-2.0"
] | 6 | 2016-12-02T01:56:49.000Z | 2020-10-27T23:55:58.000Z | auralib/welldb.py | kwinkunks/auralib | 8300bb0c4d20156b9539df6d6c5e380f52572c4c | [
"Apache-2.0"
] | 8 | 2017-11-09T20:30:06.000Z | 2021-03-26T23:45:43.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 4 14:46:29 2020
@author: wesha
"""
#%%
import numpy as np
import matplotlib.pyplot as plt
import auralib as aura
import os
import shutil
def create_well(welldb, wellid, overwrite=False):
"""
Function to create a new well
"""
curwellpath = os.path.join... | 31.210843 | 83 | 0.541787 |
86b21f2b039009597a9a5987faf0c36b69e628e0 | 1,210 | py | Python | tests/test_utils.py | do-py-together/mocking-utils | b962391a5e2b768afc2e0b6fbb67cbe382de7ae4 | [
"MIT"
] | 1 | 2020-12-03T06:16:25.000Z | 2020-12-03T06:16:25.000Z | tests/test_utils.py | timdaviss/mocking-utils | b962391a5e2b768afc2e0b6fbb67cbe382de7ae4 | [
"MIT"
] | 3 | 2020-12-15T13:24:53.000Z | 2021-09-09T22:47:08.000Z | tests/test_utils.py | do-py-together/mocking-utils | b962391a5e2b768afc2e0b6fbb67cbe382de7ae4 | [
"MIT"
] | null | null | null | """
:date_created: 2020-12-06
"""
import pytest
from mocking_utils.utils import powerset, powerset_concat
@pytest.mark.parametrize('iterable, empty_is_valid, expected_output', [
([1, 2, 3], True, [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]),
([1, 2, 3], False, [(1,), (2,), (3,), (1, 2), (1, 3),... | 35.588235 | 92 | 0.601653 |
b2dae2511ec87ae3e7e3860b05d41621b82b13de | 16,900 | py | Python | bigquery/google/cloud/bigquery/magics.py | beittatt/cloud-python | cdb4cc4f3c568ff32acf35c34910d23f2d3800a0 | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | bigquery/google/cloud/bigquery/magics.py | beittatt/cloud-python | cdb4cc4f3c568ff32acf35c34910d23f2d3800a0 | [
"Apache-2.0"
] | null | null | null | bigquery/google/cloud/bigquery/magics.py | beittatt/cloud-python | cdb4cc4f3c568ff32acf35c34910d23f2d3800a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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, s... | 34.141414 | 90 | 0.63716 |
98b0311d450e6355d2d66f737c2e8a10f6038e4f | 313 | py | Python | ezflow/data/dataset/__init__.py | NeelayS/ezflow | b93a48c4adf5021f7eacbfc43220c7efa5ae55cd | [
"MIT"
] | 94 | 2021-11-18T18:31:18.000Z | 2022-03-04T02:30:13.000Z | ezflow/data/dataset/__init__.py | NeelayS/ezflow | b93a48c4adf5021f7eacbfc43220c7efa5ae55cd | [
"MIT"
] | 72 | 2021-11-19T16:59:10.000Z | 2022-03-02T14:39:10.000Z | ezflow/data/dataset/__init__.py | neu-vig/ezflow | 1eb6f675e72b1de6db7b35d61ca4ef0082bae890 | [
"MIT"
] | 5 | 2021-11-18T18:42:38.000Z | 2022-03-03T11:35:26.000Z | from .autoflow import AutoFlow
from .base_dataset import BaseDataset
from .driving import Driving
from .flying_chairs import FlyingChairs
from .flying_things3d import FlyingThings3D, FlyingThings3DSubset
from .hd1k import HD1K
from .kitti import Kitti
from .monkaa import Monkaa
from .mpi_sintel import MPISintel
| 31.3 | 65 | 0.84984 |
e1d459d48ee615fc0d22fb08f8b69ce431c3f966 | 5,569 | py | Python | predict.py | Spencerfar/djin-aging | f6513226e879e6061996d819b4de0e2873860fbc | [
"MIT"
] | 3 | 2021-08-24T08:33:45.000Z | 2022-01-18T23:50:33.000Z | predict.py | Spencerfar/djin-aging | f6513226e879e6061996d819b4de0e2873860fbc | [
"MIT"
] | null | null | null | predict.py | Spencerfar/djin-aging | f6513226e879e6061996d819b4de0e2873860fbc | [
"MIT"
] | 1 | 2021-08-24T08:34:30.000Z | 2021-08-24T08:34:30.000Z | import argparse
import torch
from torch.nn import functional as F
import numpy as np
from scipy.stats import sem
from pandas import read_csv
from torch.utils import data
from Model.model import Model
from Utils.record import record
from DataLoader.dataset import Dataset
from DataLoader.collate import custom_collate
... | 45.276423 | 263 | 0.659544 |
a48d6beb11518df9a085486a5f73193f6c3ab418 | 2,379 | py | Python | openingangle/123.py | DingdingLuan/PycharmProjects | 055944cd4bf66637e40d81d8ccf05216006dc0a3 | [
"Apache-2.0"
] | null | null | null | openingangle/123.py | DingdingLuan/PycharmProjects | 055944cd4bf66637e40d81d8ccf05216006dc0a3 | [
"Apache-2.0"
] | null | null | null | openingangle/123.py | DingdingLuan/PycharmProjects | 055944cd4bf66637e40d81d8ccf05216006dc0a3 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from Calculatefunction import*
import matplotlib.pyplot as plt
df=pd.read_excel("/Users/dingding/Desktop/calculate/3333.xlsx")
grbname=df['grb']
z = df['z']
alpha=df['alpha']
beta=df['beta']
ep=df['ep']
s=df['s']
# print(type(s))
# print(type(df['s']))
i=0
grbname1=[]
z1=[]
alpha... | 27.662791 | 110 | 0.69567 |
5bac61dfa67f5c621a240a47a5eaeda3be3ecaf4 | 37,966 | py | Python | Web/main.py | apratimshukla6/PharmaCat | 1755155220cceb85febd9a142f12387ff522c604 | [
"Apache-2.0"
] | 15 | 2019-12-19T09:57:09.000Z | 2022-02-25T09:13:17.000Z | Web/main.py | PharmaCat/Application | e050cf5812f0ea860c6359868bb532d49d3236cc | [
"Apache-2.0"
] | 6 | 2020-03-24T17:45:14.000Z | 2022-03-12T00:02:07.000Z | Web/main.py | Codebotics/PharmaCat | e050cf5812f0ea860c6359868bb532d49d3236cc | [
"Apache-2.0"
] | 6 | 2020-06-02T03:12:30.000Z | 2022-03-09T08:35:52.000Z | """
This script handles the execution of the Flask Web Server(Web Application + JSON API)
"""
from flask import Flask, render_template, request, redirect, url_for, session, jsonify, flash
from flaskext.mysql import MySQL
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import... | 39.838405 | 230 | 0.553179 |
db144d06380b4543c24214daec54d9b6c3a6900b | 3,594 | py | Python | home/migrations/0002_guess_logs_search_history_singup.py | licface-django/licshop | ad15782fd32a970b6c0818b91f652197422a8c2a | [
"Apache-2.0"
] | null | null | null | home/migrations/0002_guess_logs_search_history_singup.py | licface-django/licshop | ad15782fd32a970b6c0818b91f652197422a8c2a | [
"Apache-2.0"
] | null | null | null | home/migrations/0002_guess_logs_search_history_singup.py | licface-django/licshop | ad15782fd32a970b6c0818b91f652197422a8c2a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-27 03:44
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | 43.829268 | 132 | 0.565109 |
94c57c098b2d523504224a21da202a73c7e4d9fc | 5,513 | py | Python | contrib/seeds/makeseeds.py | larrycameron80/1UP | c60cf6a01cb73a7e27a78264681f0794f470d06c | [
"MIT"
] | 6 | 2018-02-02T13:57:06.000Z | 2018-03-14T08:51:19.000Z | contrib/seeds/makeseeds.py | ezaruba/1UP | c60cf6a01cb73a7e27a78264681f0794f470d06c | [
"MIT"
] | 1 | 2018-01-09T17:02:21.000Z | 2018-01-09T17:02:21.000Z | contrib/seeds/makeseeds.py | ezaruba/1UP | c60cf6a01cb73a7e27a78264681f0794f470d06c | [
"MIT"
] | 14 | 2017-12-29T00:50:51.000Z | 2022-03-11T21:17:27.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.052326 | 186 | 0.566842 |
c2596f5e5e4477e11b4fc144e0249d5ea6aed3ff | 1,000 | py | Python | setup.py | oksumoron/locust | fddfefe7ef1082bc5284cd2dd8477221484dfb0c | [
"MIT"
] | 2 | 2021-02-14T22:33:59.000Z | 2021-02-14T23:36:18.000Z | setup.py | oksumoron/locust | fddfefe7ef1082bc5284cd2dd8477221484dfb0c | [
"MIT"
] | 1 | 2021-03-01T13:47:36.000Z | 2021-03-01T13:47:36.000Z | setup.py | oksumoron/locust | fddfefe7ef1082bc5284cd2dd8477221484dfb0c | [
"MIT"
] | 1 | 2020-07-21T10:49:05.000Z | 2020-07-21T10:49:05.000Z | # -*- coding: utf-8 -*-
import ast
import os
import re
import sys
from setuptools import find_packages, setup
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
# parse version from locust/__init__.py
_version_re = re.compile(r"__version__\s+=\s+(.*)")
_init_file = os.path.join(ROOT_PATH, "locust", "__init__.py"... | 23.809524 | 90 | 0.581 |
2f6c42d47942e4bac3f9eb2a2627df6605e22aac | 3,160 | py | Python | pretrainer.py | yishayahu/covid19_weak_supervision | 9f2b2b5f13ac0fd69ad2f54304954f8039315760 | [
"Apache-2.0"
] | null | null | null | pretrainer.py | yishayahu/covid19_weak_supervision | 9f2b2b5f13ac0fd69ad2f54304954f8039315760 | [
"Apache-2.0"
] | null | null | null | pretrainer.py | yishayahu/covid19_weak_supervision | 9f2b2b5f13ac0fd69ad2f54304954f8039315760 | [
"Apache-2.0"
] | null | null | null | import libauc
import segmentation_models_pytorch
from libauc.datasets import CheXpert
from libauc.models import DenseNet121
import torch
from PIL import Image
import numpy as np
import torchvision.transforms as transforms
from torch import nn
from libauc.losses import AUCM_MultiLabel, CrossEntropyLoss
from torch.optim ... | 35.505618 | 155 | 0.679114 |
0bf3ed3fbc178e1fd5a5349e04b723b9ef7fe3c7 | 1,876 | py | Python | kaolin/metrics/voxelgrid.py | mcx/kaolin | abe006921b5d522ecd0f7c5e30abe760a4459dc7 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-09T12:18:41.000Z | 2022-03-09T12:18:41.000Z | kaolin/metrics/voxelgrid.py | mcx/kaolin | abe006921b5d522ecd0f7c5e30abe760a4459dc7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/metrics/voxelgrid.py | mcx/kaolin | abe006921b5d522ecd0f7c5e30abe760a4459dc7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019,20 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 36.784314 | 99 | 0.592751 |
4b60bdfb2468eba863b282e9bf26951034ead395 | 2,724 | py | Python | salt/grains/esxi.py | jeremysnyder/salt | b95213ec903402f25c1e0aeb3990fe8452ab63ce | [
"Apache-2.0"
] | 1 | 2020-07-06T01:33:23.000Z | 2020-07-06T01:33:23.000Z | salt/grains/esxi.py | jeremysnyder/salt | b95213ec903402f25c1e0aeb3990fe8452ab63ce | [
"Apache-2.0"
] | null | null | null | salt/grains/esxi.py | jeremysnyder/salt | b95213ec903402f25c1e0aeb3990fe8452ab63ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Generate baseline proxy minion grains for ESXi hosts.
.. versionadded:: 2015.8.4
"""
# Import Python Libs
from __future__ import absolute_import, print_function, unicode_literals
import logging
# Import Salt Libs
import salt.utils.platform
from salt.exceptions import SaltSystemExit
if ... | 24.540541 | 87 | 0.608664 |
209f45a9894f176f23d4c3223d3b78297dd5e612 | 994 | py | Python | isi_sdk_8_0_1/test/test_file_filter_settings_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/test/test_file_filter_settings_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/test/test_file_filter_settings_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0_1
from i... | 24.243902 | 111 | 0.732394 |
316df7ae05c7793abab993e1f943268ba9daac3e | 8,957 | py | Python | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/biz/ns_heal.py | lremember/VFC | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | 4 | 2018-08-29T02:51:38.000Z | 2021-11-16T11:36:11.000Z | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/biz/ns_heal.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/biz/ns_heal.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | 1 | 2019-05-12T08:21:19.000Z | 2019-05-12T08:21:19.000Z | # Copyright 2017 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 i... | 43.0625 | 107 | 0.621413 |
85da8e7ae7746f53e78ea46a85a8dd127f77c50e | 16,936 | py | Python | server.py | matanhaller/Pype | fd39944a9cc25020c55c42f6205bb10e4e0fce4b | [
"MIT"
] | 1 | 2018-01-03T08:55:38.000Z | 2018-01-03T08:55:38.000Z | server.py | matanhaller/Pype | fd39944a9cc25020c55c42f6205bb10e4e0fce4b | [
"MIT"
] | 2 | 2018-01-03T08:51:46.000Z | 2018-01-03T08:54:43.000Z | server.py | matanhaller/Pype | fd39944a9cc25020c55c42f6205bb10e4e0fce4b | [
"MIT"
] | 1 | 2018-01-03T08:50:32.000Z | 2018-01-03T08:50:32.000Z | """Central server of app.
"""
# Imports
import logging
import socket
import select
import json
from task import Task
from user import User
from call import Call
class PypeServer(object):
"""App server class.
Attributes:
ADDR (tuple): Address to which the server is bound.
call_dct (dict): D... | 40.420048 | 108 | 0.447449 |
ee9e64defe6d9ee945a6537355e52804316761a7 | 935 | py | Python | okaeri_sdk/aicensor/aicensor.py | OkaeriPoland/okaeri-sdk-python | 6ecf04477f61587599ad4570bc27eee555be0817 | [
"MIT"
] | null | null | null | okaeri_sdk/aicensor/aicensor.py | OkaeriPoland/okaeri-sdk-python | 6ecf04477f61587599ad4570bc27eee555be0817 | [
"MIT"
] | null | null | null | okaeri_sdk/aicensor/aicensor.py | OkaeriPoland/okaeri-sdk-python | 6ecf04477f61587599ad4570bc27eee555be0817 | [
"MIT"
] | null | null | null | from .model import AiCensorPredictionInfo
from ..client import OkaeriClient, tostring, resolve_token, resolve_timeout, resolve_base_url
@tostring
class AiCensorError(BaseException):
type: str
message: str
class AiCensor:
def __init__(self, token: str, timeout: int = None, base_url: str = None):
... | 40.652174 | 126 | 0.737968 |
6f25996bec25ab39e2ac75e1047c888cd30e0b6b | 8,123 | py | Python | sdk/python/pulumi_azure_nextgen/solutions/v20200821preview/get_jit_request.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/solutions/v20200821preview/get_jit_request.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/solutions/v20200821preview/get_jit_request.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 38.866029 | 275 | 0.674997 |
dc8a7748b334210478a58677b45df1a3bc404ade | 13,492 | py | Python | ncc/tasks/translation/plbart_translation.py | iwangyuezhang/naturalcc | e9d9b4a296b61199fc35779b062db2205935a608 | [
"MIT"
] | 1 | 2022-03-30T14:45:42.000Z | 2022-03-30T14:45:42.000Z | ncc/tasks/translation/plbart_translation.py | hrshy0629/naturalcc | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | [
"MIT"
] | null | null | null | ncc/tasks/translation/plbart_translation.py | hrshy0629/naturalcc | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
from functools import lru_cache
import numpy as np
import torch
import itertools
from ncc import (
tokenizers,
LOGGER,
)
from ncc.data import (
indexed_dataset,
)
from ncc.data.dictionary import Dictionary
from ncc.data.ncc_dataset import NccDataset
from ncc.... | 40.516517 | 117 | 0.596946 |
8f5e9208f2982e993596473bdb6f9944605c44ef | 2,153 | py | Python | setup.py | dbaelipro/CHAID | 2f84e94c5bc1ed672ae0730e6e3477cb877acd2c | [
"Apache-2.0"
] | null | null | null | setup.py | dbaelipro/CHAID | 2f84e94c5bc1ed672ae0730e6e3477cb877acd2c | [
"Apache-2.0"
] | null | null | null | setup.py | dbaelipro/CHAID | 2f84e94c5bc1ed672ae0730e6e3477cb877acd2c | [
"Apache-2.0"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/Rambatino/CHAID
"""
import re
from os import path
from setuptools import setup, find_packages
def get_version():
"""
Read version from __init__.py
"""
version_regex = re.compile(
... | 30.757143 | 140 | 0.616349 |
5be99fc66edf4ba45427e8dcbaf3fc1e79196d25 | 2,706 | py | Python | tensortrade/base/exceptions.py | cihilt/tensortrade | 47b8f2f043d3cc430838aac02a915ab42dcc7b64 | [
"Apache-2.0"
] | 7 | 2020-09-28T23:36:40.000Z | 2022-02-22T02:00:32.000Z | tensortrade/base/exceptions.py | cihilt/tensortrade | 47b8f2f043d3cc430838aac02a915ab42dcc7b64 | [
"Apache-2.0"
] | 4 | 2020-11-13T18:48:52.000Z | 2022-02-10T01:29:47.000Z | tensortrade/base/exceptions.py | cihilt/tensortrade | 47b8f2f043d3cc430838aac02a915ab42dcc7b64 | [
"Apache-2.0"
] | 3 | 2020-11-23T17:31:59.000Z | 2021-04-08T10:55:03.000Z |
# =============================================================================
# Quantity Exceptions
# =============================================================================
class InvalidNegativeQuantity(Exception):
def __init__(self, size, *args):
super().__init__(
"Invalid Quantity:... | 30.75 | 106 | 0.423503 |
5c814666f74c7f50b5e62662d2bb00032cebb340 | 1,819 | py | Python | src/objects.py | pylaligand/league_predictions | 68b0b9534344a319a24088a4ffce1fd8ec053e8a | [
"Apache-2.0"
] | null | null | null | src/objects.py | pylaligand/league_predictions | 68b0b9534344a319a24088a4ffce1fd8ec053e8a | [
"Apache-2.0"
] | null | null | null | src/objects.py | pylaligand/league_predictions | 68b0b9534344a319a24088a4ffce1fd8ec053e8a | [
"Apache-2.0"
] | null | null | null | class Team(object):
def __init__(self, name):
self.name = name
def __str__(self):
return self.name
def __eq__(self, other):
return self.name == other.name
def __hash__(self):
return hash((self.name))
class Game(object):
def __init__(self, team_1, score_1, team_2,... | 23.623377 | 79 | 0.572842 |
b2e8b99688ee6925e623b5afa5e42d748889c648 | 1,692 | py | Python | bgx/telebot/setup.py | DGT-Network/DGT-Kawartha-1.0 | dfe177f1a10d260949075f96422df34620d0bd54 | [
"Apache-2.0"
] | null | null | null | bgx/telebot/setup.py | DGT-Network/DGT-Kawartha-1.0 | dfe177f1a10d260949075f96422df34620d0bd54 | [
"Apache-2.0"
] | null | null | null | bgx/telebot/setup.py | DGT-Network/DGT-Kawartha-1.0 | dfe177f1a10d260949075f96422df34620d0bd54 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DGT NETWORK INC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 31.333333 | 80 | 0.6513 |
0ec8808e393e49adfdad8c19546a904621eaf3fb | 86 | py | Python | misc/parameters.py | krsnvss/beetstock | 689d52c3e4dfa6533c59e5c4bf9e9f6f60cb688c | [
"MIT"
] | null | null | null | misc/parameters.py | krsnvss/beetstock | 689d52c3e4dfa6533c59e5c4bf9e9f6f60cb688c | [
"MIT"
] | null | null | null | misc/parameters.py | krsnvss/beetstock | 689d52c3e4dfa6533c59e5c4bf9e9f6f60cb688c | [
"MIT"
] | null | null | null | # Различные задержки и таймеры
# Интервал обновления таблиц (ms)
table_update = 5000
| 17.2 | 33 | 0.77907 |
d68fc8e2cd05d5458aec6a15754e2fb42978f87c | 20 | py | Python | __init__.py | dpk/ikwi | 14073d935eb012594576d3715af27a796868cda6 | [
"CC0-1.0"
] | 4 | 2015-05-03T17:26:28.000Z | 2015-05-28T18:19:07.000Z | __init__.py | dpk/ikwi | 14073d935eb012594576d3715af27a796868cda6 | [
"CC0-1.0"
] | null | null | null | __init__.py | dpk/ikwi | 14073d935eb012594576d3715af27a796868cda6 | [
"CC0-1.0"
] | null | null | null | from .ikwi import *
| 10 | 19 | 0.7 |
d7f1c1fc71d0bf49a46049413342747cb94b64c0 | 1,947 | py | Python | tools/misc/print_config.py | Justice-Eternal/mmrotate | c5bf348562fd84cc17906c2cf370d1a49fcd3035 | [
"Apache-2.0"
] | 449 | 2022-02-18T08:26:58.000Z | 2022-03-31T11:58:32.000Z | tools/misc/print_config.py | GamblerZSY/mmrotate | 6519a3654e17b707c15d4aa2c5db1257587ea4c0 | [
"Apache-2.0"
] | 162 | 2022-02-18T09:54:46.000Z | 2022-03-31T15:40:46.000Z | tools/misc/print_config.py | GamblerZSY/mmrotate | 6519a3654e17b707c15d4aa2c5db1257587ea4c0 | [
"Apache-2.0"
] | 98 | 2022-02-18T08:28:48.000Z | 2022-03-31T08:52:11.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import argparse
import warnings
from mmcv import Config, DictAction
def parse_args():
"""Parse arguments."""
parser = argparse.ArgumentParser(description='Print the whole config')
parser.add_argument('config', help='config file path')
parser.add_argumen... | 33.568966 | 78 | 0.645609 |
edec14de2fc0dd239a9fb47cf70cd8d625177c07 | 8,620 | py | Python | graph_objs/scatter3d/marker/colorbar/title/_font.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | graph_objs/scatter3d/marker/colorbar/title/_font.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | graph_objs/scatter3d/marker/colorbar/title/_font.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter3d.marker.colorbar.title"
_path_str = "scatter3d.marker.colorbar.title.font"
_valid_pro... | 37.641921 | 85 | 0.569142 |
e19985ea4f8c1788461eef36fa808f13858029e2 | 1,647 | py | Python | startup/ckpt.py | videoturingtest/vtt_qa_pipeline | 83efc672fad0ca2356caede6f0a3875f054037fc | [
"MIT"
] | 1 | 2019-09-19T07:49:21.000Z | 2019-09-19T07:49:21.000Z | startup/ckpt.py | videoturingtest/vtt_qa_pipeline | 83efc672fad0ca2356caede6f0a3875f054037fc | [
"MIT"
] | null | null | null | startup/ckpt.py | videoturingtest/vtt_qa_pipeline | 83efc672fad0ca2356caede6f0a3875f054037fc | [
"MIT"
] | null | null | null | import os
import torch
from torch import nn
import torch.nn.functional as F
from dataset import get_iterator
from model import get_model
from utils import get_dirname_from_args
def get_ckpt_path(args, epoch, loss):
ckpt_name = get_dirname_from_args(args)
ckpt_path = args.ckpt_path / ckpt_name
args.ckpt_... | 28.396552 | 94 | 0.656952 |
fb84a528f1a6c308974cbcb55a9595203bb47da2 | 54,019 | py | Python | vspk/v6/nugateway.py | axxyhtrx/vspk-python | 4495882c6bcbb1ef51b14b9f4dc7efe46476ff50 | [
"BSD-3-Clause"
] | null | null | null | vspk/v6/nugateway.py | axxyhtrx/vspk-python | 4495882c6bcbb1ef51b14b9f4dc7efe46476ff50 | [
"BSD-3-Clause"
] | null | null | null | vspk/v6/nugateway.py | axxyhtrx/vspk-python | 4495882c6bcbb1ef51b14b9f4dc7efe46476ff50 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | 31.116935 | 378 | 0.61371 |
28a37318fb527662ca68fb5cc180c419a7475ec3 | 1,971 | py | Python | aliyun-python-sdk-dataworks-public/aliyunsdkdataworks_public/request/v20200518/CreateQualityFollowerRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-dataworks-public/aliyunsdkdataworks_public/request/v20200518/CreateQualityFollowerRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-dataworks-public/aliyunsdkdataworks_public/request/v20200518/CreateQualityFollowerRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | # 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... | 35.196429 | 94 | 0.764079 |
af216334466d77866a11b64441a9793963fb1cf6 | 191 | py | Python | Python/Day4_Geometric_Distribution_I.py | nikhilbhatewara/HackerRank | 87a59429cc672a34ea5841235dc9a706195d18a4 | [
"MIT"
] | null | null | null | Python/Day4_Geometric_Distribution_I.py | nikhilbhatewara/HackerRank | 87a59429cc672a34ea5841235dc9a706195d18a4 | [
"MIT"
] | null | null | null | Python/Day4_Geometric_Distribution_I.py | nikhilbhatewara/HackerRank | 87a59429cc672a34ea5841235dc9a706195d18a4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#p defective is 1/3
#during 5th inspection => n=5
def g(n, p):
return (((1-p)** (n-1)) * p)
n=5
p=1/3
output=g(n,p)
print (round(output,3))
| 12.733333 | 32 | 0.549738 |
3f839882840af11d8cc2750c3165904c3a58b850 | 2,750 | py | Python | examples/ad_manager/v201802/reconciliation_line_item_report_service/update_reconciliation_line_item_reports.py | khanhnhk/googleads-python-lib | 1e882141b8eb663b55dd582ce0f4fbf3cd2f672d | [
"Apache-2.0"
] | 1 | 2021-12-30T15:21:42.000Z | 2021-12-30T15:21:42.000Z | examples/ad_manager/v201802/reconciliation_line_item_report_service/update_reconciliation_line_item_reports.py | benlistyg/googleads-python-lib | 1e882141b8eb663b55dd582ce0f4fbf3cd2f672d | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201802/reconciliation_line_item_report_service/update_reconciliation_line_item_reports.py | benlistyg/googleads-python-lib | 1e882141b8eb663b55dd582ce0f4fbf3cd2f672d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2017 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 requir... | 40.441176 | 80 | 0.710182 |
e1a8c5b344c3347d758d36dd516214a39f2adbbc | 1,228 | py | Python | setup.py | kemalcanbora/linkedin-api | c3ea7677314972a79f6344028c0371613ee5907e | [
"MIT"
] | 1 | 2020-10-03T11:23:44.000Z | 2020-10-03T11:23:44.000Z | setup.py | kemalcanbora/linkedin-api | c3ea7677314972a79f6344028c0371613ee5907e | [
"MIT"
] | null | null | null | setup.py | kemalcanbora/linkedin-api | c3ea7677314972a79f6344028c0371613ee5907e | [
"MIT"
] | null | null | null | import setuptools
import ast
import re
from pathlib import Path
CURRENT_DIR = Path(__file__).parent
def get_long_description() -> str:
readme_md = CURRENT_DIR / "README.md"
with open(readme_md, encoding="utf8") as ld_file:
return ld_file.read()
def get_version() -> str:
black_py = CURRENT_DIR /... | 29.95122 | 78 | 0.674267 |
8e2b83f900468bcb76049f65beb3534079e043be | 644 | py | Python | server.py | dvtate/single-file-programs | 1c54833ebee5fa20d04b1d36c59fb553de985812 | [
"MIT"
] | 2 | 2017-09-04T05:11:53.000Z | 2020-01-18T22:31:25.000Z | server.py | dvtate/single-file-programs | 1c54833ebee5fa20d04b1d36c59fb553de985812 | [
"MIT"
] | null | null | null | server.py | dvtate/single-file-programs | 1c54833ebee5fa20d04b1d36c59fb553de985812 | [
"MIT"
] | null | null | null | import socket;
import sys;
host = "127.0.0.1";
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM);
server_address = (host, 10000); #localhost + port 10000
print ("The server is starting :D");
# start working
try:
sock.bind(server_address);
except:
print("ERROR: port in use.");
new_port = raw_input("New por... | 18.4 | 57 | 0.659938 |
20a4452959e375202a8c22c13cb92d32d73588ac | 18,458 | py | Python | src/lib/nets/volumetric/hrnet/seg_hrnet3d.py | charzharr/Hierarchical-Contrastive-Pretraining | 3c7ad022a90fe7137ed3a22655d48ae1ba27510c | [
"MIT"
] | null | null | null | src/lib/nets/volumetric/hrnet/seg_hrnet3d.py | charzharr/Hierarchical-Contrastive-Pretraining | 3c7ad022a90fe7137ed3a22655d48ae1ba27510c | [
"MIT"
] | null | null | null | src/lib/nets/volumetric/hrnet/seg_hrnet3d.py | charzharr/Hierarchical-Contrastive-Pretraining | 3c7ad022a90fe7137ed3a22655d48ae1ba27510c | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Adapted by Charley Zhang (Dec 2021) from:
# https://github.com/HRNet/HRNet-Semantic-Segmentation/blob/pytorch-v1.1/lib/models/seg_hrnet.py
# ------------------------------------------------------------------------------
# Copyright (c) M... | 38.215321 | 96 | 0.545021 |
d52168378699f96e11ce0c868dbbbe3c04e75d60 | 135 | py | Python | codility_python_tests/05_max_gaps_binary.py | sreedhar-venkatesan/codility-python-tests | b9536eb1bced90ba9a5a192d3cc424be4367b406 | [
"MIT"
] | null | null | null | codility_python_tests/05_max_gaps_binary.py | sreedhar-venkatesan/codility-python-tests | b9536eb1bced90ba9a5a192d3cc424be4367b406 | [
"MIT"
] | null | null | null | codility_python_tests/05_max_gaps_binary.py | sreedhar-venkatesan/codility-python-tests | b9536eb1bced90ba9a5a192d3cc424be4367b406 | [
"MIT"
] | null | null | null | def solution(N):
return len(max(format(N,'b').strip('0').split('1')))
if __name__ =="__main__":
X= solution(20)
print (X)
| 19.285714 | 56 | 0.585185 |
43efe74f8c73549c9ddcdabc2ea331f04dae63ff | 1,954 | py | Python | client.py | AricHasting/senior-software | 0424cd9aa94533ef8ba58a2f70e279761028f96e | [
"MIT"
] | null | null | null | client.py | AricHasting/senior-software | 0424cd9aa94533ef8ba58a2f70e279761028f96e | [
"MIT"
] | 7 | 2018-09-02T23:42:43.000Z | 2018-11-08T22:14:28.000Z | client.py | AricHasting/senior-software | 0424cd9aa94533ef8ba58a2f70e279761028f96e | [
"MIT"
] | 4 | 2018-08-30T01:12:11.000Z | 2018-09-11T17:44:57.000Z | #!/usr/bin/env python3
# Credit: https://medium.com/swlh/lets-write-a-chat-app-in-python-f6783a9ac170
"""Script for Tkinter GUI chat client."""
from socket import AF_INET, socket, SOCK_STREAM
from threading import Thread
from collections import deque
import re
import select
# This will be the list of received messages... | 28.735294 | 78 | 0.663255 |
cd97183d361f561198349a724fb7a039e7f811d2 | 2,049 | py | Python | tests/test_database/test_subroutines.py | ajstewart/tkp | 2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f | [
"BSD-2-Clause"
] | 9 | 2015-04-30T22:10:14.000Z | 2020-06-09T01:24:20.000Z | tests/test_database/test_subroutines.py | ajstewart/tkp | 2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f | [
"BSD-2-Clause"
] | 218 | 2015-01-08T11:10:57.000Z | 2021-11-25T05:52:42.000Z | tests/test_database/test_subroutines.py | ajstewart/tkp | 2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f | [
"BSD-2-Clause"
] | 14 | 2015-03-11T11:21:58.000Z | 2020-06-16T09:15:57.000Z | import math
import unittest
import tkp.db
from tkp.testutil.decorators import requires_database
from tkp.testutil.db_queries import convert_to_cartesian as db_cartesian
from tkp.utility.coordinates import eq_to_cart as py_cartesian
"""Test miscellaneous minor database functions"""
@requires_database()
class TestCa... | 34.15 | 74 | 0.545144 |
d06ed512aa4d2bcbf49f89cf296b71172c46fc5f | 7,297 | py | Python | script/grafana.py | NovatecConsulting/grafana-ldap-sync-script | 71e6b9f5c16de14bf35177b9f036986c2205753e | [
"Apache-2.0"
] | 9 | 2020-07-17T06:36:23.000Z | 2022-03-27T19:35:50.000Z | script/grafana.py | NovatecConsulting/grafana-ldap-sync-script | 71e6b9f5c16de14bf35177b9f036986c2205753e | [
"Apache-2.0"
] | 2 | 2021-08-19T13:25:32.000Z | 2022-02-03T16:06:55.000Z | script/grafana.py | NovatecConsulting/grafana-ldap-sync-script | 71e6b9f5c16de14bf35177b9f036986c2205753e | [
"Apache-2.0"
] | 6 | 2021-01-05T18:46:36.000Z | 2022-03-28T11:35:46.000Z | from grafana_api.grafana_api import GrafanaClientError, GrafanaBadInputError
from grafana_api.grafana_face import GrafanaFace
from .config import *
from .helpers import *
import logging
grafana_api = ""
configuration = ""
logger = logging.getLogger()
logger_mut = logging.getLogger("mutate")
def setup_grafana(config_... | 33.626728 | 133 | 0.670138 |
eb895e030d257898202d3fbafed4088ca2da7504 | 2,228 | py | Python | tensorlayer/third_party/roi_pooling/test_roi_layer.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | tensorlayer/third_party/roi_pooling/test_roi_layer.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | tensorlayer/third_party/roi_pooling/test_roi_layer.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | from tensorlayer.layers import *
from tensorlayer.third_party.roi_pooling.roi_pooling.roi_pooling_ops import \
roi_pooling
# from roi_pooling.roi_pooling_ops import roi_pooling
# input feature map going into the RoI pooling
input_value = [[[[1], [2], [4], [4]], [[3], [4], [1], [2]], [[6], [2], [1], [7.0]], [[1], ... | 40.509091 | 117 | 0.708707 |
e828cbfd535905e6a0b545013d4d15a73f7a9da2 | 18,827 | py | Python | tools/SDKTool/libs/WrappedDeviceAPI/demo/demo.py | BernhardRiemann/GameAISDK | da24c600e1cdc890739ee274032a17fb9ce75c5c | [
"Apache-2.0"
] | 3 | 2021-03-15T13:53:37.000Z | 2021-11-17T10:34:29.000Z | tools/SDKTool/libs/WrappedDeviceAPI/demo/demo.py | VenmoTools/GameAISDK | 208320760440400d369aa8ab2f2439494195e6bd | [
"Apache-2.0"
] | null | null | null | tools/SDKTool/libs/WrappedDeviceAPI/demo/demo.py | VenmoTools/GameAISDK | 208320760440400d369aa8ab2f2439494195e6bd | [
"Apache-2.0"
] | 1 | 2021-02-19T12:04:05.000Z | 2021-02-19T12:04:05.000Z | # -*- coding: utf-8 -*-
"""
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
"""
import time
impo... | 35.792776 | 138 | 0.581293 |
5524fc0dc97256ccf31fb1155e3a925dafa5cac5 | 3,014 | py | Python | DeepLearningExamples/CUDA-Optimized/FastSpeech/fastspeech/utils/tensorboard.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/CUDA-Optimized/FastSpeech/fastspeech/utils/tensorboard.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/CUDA-Optimized/FastSpeech/fastspeech/utils/tensorboard.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditio... | 35.458824 | 81 | 0.677837 |
00762ba4db8cca9f903390c5b28d9a7a73df1107 | 157 | py | Python | scripts_for_analysis/clade_specific_ogs.py | jls943/sponge_evol_dynamics | 54a1dbdca096f0a30e01d55ad840764d5ba2a350 | [
"CC0-1.0"
] | null | null | null | scripts_for_analysis/clade_specific_ogs.py | jls943/sponge_evol_dynamics | 54a1dbdca096f0a30e01d55ad840764d5ba2a350 | [
"CC0-1.0"
] | null | null | null | scripts_for_analysis/clade_specific_ogs.py | jls943/sponge_evol_dynamics | 54a1dbdca096f0a30e01d55ad840764d5ba2a350 | [
"CC0-1.0"
] | null | null | null | #! /usr/bin/env python3
#function to identify all of the orthogroups that contain only those species from a specific clade,
#provided as a list of species.
| 31.4 | 99 | 0.77707 |
127d66bcdd30edba166b156134f3f76c93503971 | 1,693 | py | Python | perfkitbenchmarker/linux_packages/iperf.py | robfrut135/PerfKitBenchmarker | ccaf81b47ed5e3f27065e8f8d9fc42d071bfc22c | [
"Apache-2.0"
] | 2 | 2019-04-09T11:15:13.000Z | 2019-09-10T11:28:49.000Z | perfkitbenchmarker/linux_packages/iperf.py | robfrut135/PerfKitBenchmarker | ccaf81b47ed5e3f27065e8f8d9fc42d071bfc22c | [
"Apache-2.0"
] | 1 | 2021-03-26T00:41:05.000Z | 2021-03-26T00:41:05.000Z | perfkitbenchmarker/linux_packages/iperf.py | robfrut135/PerfKitBenchmarker | ccaf81b47ed5e3f27065e8f8d9fc42d071bfc22c | [
"Apache-2.0"
] | 1 | 2021-12-07T13:29:48.000Z | 2021-12-07T13:29:48.000Z | # Copyright 2014 PerfKitBenchmarker 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 appli... | 31.351852 | 75 | 0.707029 |
e8b8bc83de272edd5da21c39f360336d9ff383bc | 3,531 | py | Python | tests/components/sharkiq/test_config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | tests/components/sharkiq/test_config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | tests/components/sharkiq/test_config_flow.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Test the Shark IQ config flow."""
from unittest.mock import patch
import aiohttp
import pytest
from sharkiqpy import AylaApi, SharkIqAuthError
from openpeerpower import config_entries, setup
from openpeerpower.components.sharkiq.const import DOMAIN
from openpeerpower.core import OpenPeerPower
from .const import C... | 30.973684 | 86 | 0.658737 |
3d7bf904e5854b6e1813556d06c94afeccbcb731 | 2,283 | py | Python | amime/modules/anime/TV-SHOW/SEASON/Musim/2022 ANIME/KTGR MUSIM/GUGUR/01 FALL.py | Myudi422/ccgnime_req | a0f7596ba101204539b4120dffa08912b6560efe | [
"MIT"
] | null | null | null | amime/modules/anime/TV-SHOW/SEASON/Musim/2022 ANIME/KTGR MUSIM/GUGUR/01 FALL.py | Myudi422/ccgnime_req | a0f7596ba101204539b4120dffa08912b6560efe | [
"MIT"
] | null | null | null | amime/modules/anime/TV-SHOW/SEASON/Musim/2022 ANIME/KTGR MUSIM/GUGUR/01 FALL.py | Myudi422/ccgnime_req | a0f7596ba101204539b4120dffa08912b6560efe | [
"MIT"
] | null | null | null | import httpx
from anilist.types import Anime
from pyrogram import filters
from pyrogram.types import CallbackQuery
from pyromod.helpers import ikb
from pyromod.nav import Pagination
from amime.amime import Amime
@Amime.on_callback_query(filters.regex(r"^fall_2022 anime (?P<page>\d+)"))
async def anime_suggestions(bo... | 31.273973 | 109 | 0.476128 |
748af053d3e3556ccef43d34a66cb27502407b8f | 28,521 | py | Python | model_search/phoenix.py | dywsjtu/model_search | 116c4f9016d8b89cf06d057dda020dae3371f211 | [
"Apache-2.0"
] | 3,315 | 2021-01-20T15:21:37.000Z | 2022-03-30T18:21:29.000Z | model_search/phoenix.py | dywsjtu/model_search | 116c4f9016d8b89cf06d057dda020dae3371f211 | [
"Apache-2.0"
] | 57 | 2021-01-19T20:51:03.000Z | 2022-03-24T11:04:07.000Z | model_search/phoenix.py | dywsjtu/model_search | 116c4f9016d8b89cf06d057dda020dae3371f211 | [
"Apache-2.0"
] | 380 | 2021-02-20T01:31:35.000Z | 2022-03-31T16:48:58.000Z | # 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 agreed to in writing, ... | 40.919656 | 113 | 0.684548 |
442508f6fa39a1d461c998f964692ea8d6cbcd28 | 10,631 | py | Python | mne/tests/test_report.py | mvdoc/mne-python | bac50dd08361b10d0a65c614ea2de06308750411 | [
"BSD-3-Clause"
] | null | null | null | mne/tests/test_report.py | mvdoc/mne-python | bac50dd08361b10d0a65c614ea2de06308750411 | [
"BSD-3-Clause"
] | 2 | 2019-08-14T06:21:15.000Z | 2020-10-29T19:54:56.000Z | mne/tests/test_report.py | mvdoc/mne-python | bac50dd08361b10d0a65c614ea2de06308750411 | [
"BSD-3-Clause"
] | 1 | 2020-03-05T16:14:37.000Z | 2020-03-05T16:14:37.000Z | # Authors: Mainak Jas <mainak@neuro.hut.fi>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import glob
import os
import os.path as op
import shutil
import sys
import warnings
from nose.tools import assert_true, assert_equal, assert_raises
from nose.plugins.skip import SkipTest
from mne im... | 38.941392 | 79 | 0.670586 |
a7002343686c714728edfcdfea87f66985b0d715 | 10,214 | py | Python | sphinx/transforms/post_transforms/images.py | ravwojdyla/sphinx | a7e10c1d36007650b5e3948021d4aa90d78127d4 | [
"BSD-2-Clause"
] | 1 | 2021-11-16T19:06:56.000Z | 2021-11-16T19:06:56.000Z | sphinx/transforms/post_transforms/images.py | ravwojdyla/sphinx | a7e10c1d36007650b5e3948021d4aa90d78127d4 | [
"BSD-2-Clause"
] | null | null | null | sphinx/transforms/post_transforms/images.py | ravwojdyla/sphinx | a7e10c1d36007650b5e3948021d4aa90d78127d4 | [
"BSD-2-Clause"
] | 1 | 2021-11-16T19:06:53.000Z | 2021-11-16T19:06:53.000Z | """
sphinx.transforms.post_transforms.images
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Docutils transforms used by Sphinx.
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import re
from math import ceil
from typing import Any, ... | 36.741007 | 92 | 0.593303 |
480e4170c2453e9e85839eeb95dd19fa18f0bc22 | 10,802 | py | Python | utils/gta3sc/config.py | AndroidModLoader/gta3sc | 07504a7334eb67cfac14e1f788331d1ba2b9343a | [
"MIT"
] | 54 | 2016-06-22T22:26:58.000Z | 2022-02-23T09:25:59.000Z | utils/gta3sc/config.py | GTAResources/gta3sc | a4f3f16574c4e0461ff3c14f8a2839cf3040d952 | [
"MIT"
] | 112 | 2016-06-21T22:52:17.000Z | 2022-02-08T14:15:13.000Z | utils/gta3sc/config.py | thelink2012/gta3sc | 07504a7334eb67cfac14e1f788331d1ba2b9343a | [
"MIT"
] | 9 | 2016-06-24T22:27:55.000Z | 2021-01-11T16:37:36.000Z | # -*- Python -*-
from lxml import etree
import os
import re
__all__ = ["Alternator", "Enum", "Command", "Argument", "Config", "read_config"]
class Alternator:
def __init__(self):
self.name = ""
self.alters = []
def __iter__(self):
return iter(self.alters)
@staticmethod
def fr... | 34.957929 | 108 | 0.563692 |
d8f3ce54d97ffeb779f533a7e4fa6898abd123d7 | 19,305 | py | Python | test/functional/feature_backwards_compatibility.py | bitcoinil/bitcoinil | c546f96205806e1c969419cb83c107961cf143cc | [
"MIT"
] | 1 | 2021-04-01T17:28:54.000Z | 2021-04-01T17:28:54.000Z | test/functional/feature_backwards_compatibility.py | bitcoinil/bitcoinil | c546f96205806e1c969419cb83c107961cf143cc | [
"MIT"
] | 1 | 2021-10-22T02:52:33.000Z | 2021-10-22T02:52:33.000Z | test/functional/feature_backwards_compatibility.py | bitcoinil/bitcoinil | c546f96205806e1c969419cb83c107961cf143cc | [
"MIT"
] | 1 | 2021-08-19T01:50:12.000Z | 2021-08-19T01:50:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-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.
"""Backwards compatibility functional test
Test various backwards compatibility scenarios. Download the p... | 45.210773 | 223 | 0.643667 |
3f9be415b587f7c2011665800204f1538bc90355 | 2,810 | py | Python | ydb/_utilities.py | yandex-cloud/ydb-python-sdk | 0df2dce2d77fc41ad3020072740f51dd91630177 | [
"Apache-2.0"
] | 19 | 2019-07-01T08:25:29.000Z | 2022-01-26T14:46:51.000Z | ydb/_utilities.py | yandex-cloud/ydb-python-sdk | 0df2dce2d77fc41ad3020072740f51dd91630177 | [
"Apache-2.0"
] | 5 | 2019-07-02T13:36:42.000Z | 2021-09-14T06:46:48.000Z | ydb/_utilities.py | yandex-cloud/ydb-python-sdk | 0df2dce2d77fc41ad3020072740f51dd91630177 | [
"Apache-2.0"
] | 10 | 2019-06-07T10:36:19.000Z | 2021-10-15T08:58:11.000Z | # -*- coding: utf-8 -*-
import six
import codecs
from concurrent import futures
import functools
import hashlib
import collections
from . import ydb_version
try:
from . import interceptor
except ImportError:
interceptor = None
def wrap_result_in_future(result):
f = futures.Future()
f.set_result(resul... | 21.782946 | 91 | 0.638078 |
12cd5c0fd69d39007caa5279f4f5c4b92100a7f6 | 1,136 | py | Python | edgelm/fairseq/pdb.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | 1 | 2021-11-07T00:30:05.000Z | 2021-11-07T00:30:05.000Z | edgelm/fairseq/pdb.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | null | null | null | edgelm/fairseq/pdb.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import multiprocessing
import os
import pdb
import sys
__all__ = ["set_trace"]
_stdin = [None]
_stdin_lock = multiprocessin... | 23.666667 | 66 | 0.589789 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.