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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b06fcc027595b3ca0ea05bdc95f427644c95ad56 | 18,424 | pyde | Python | Boardgame/Boardgame.pyde | DylanKoala/five_in_a_row | f842ecf1f54b42f9f3f8b04ff302dee4926a9478 | [
"MIT"
] | null | null | null | Boardgame/Boardgame.pyde | DylanKoala/five_in_a_row | f842ecf1f54b42f9f3f8b04ff302dee4926a9478 | [
"MIT"
] | null | null | null | Boardgame/Boardgame.pyde | DylanKoala/five_in_a_row | f842ecf1f54b42f9f3f8b04ff302dee4926a9478 | [
"MIT"
] | null | null | null |
back = 0
page = 1
grid = 0
firstcircle = 0
secondcircle = 1
turn = 0
win = 0
board = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0... | 35.636364 | 186 | 0.42564 |
b444558c12726c21c705f47b86dc7f110c1a9ce7 | 1,848 | py | Python | kmod/util.py | wittawatj/kernel-mod | 147a05888855a15d72b28a734752a91d93018604 | [
"MIT"
] | 20 | 2018-10-26T16:18:56.000Z | 2020-11-10T01:08:56.000Z | kmod/util.py | wittawatj/kernel-mod | 147a05888855a15d72b28a734752a91d93018604 | [
"MIT"
] | null | null | null | kmod/util.py | wittawatj/kernel-mod | 147a05888855a15d72b28a734752a91d93018604 | [
"MIT"
] | 2 | 2019-12-08T21:08:53.000Z | 2020-11-10T01:08:57.000Z | # all utility functions in kgof.util are visible.
from kgof.util import *
import autograd.numpy as np
def multi_way_split(arr, sizes):
"""
Split rows of numpy array arr into len(sizes) partitions,
where partition i contains sizes[i] rows.
"""
if not sizes or sum(sizes)==0 or len(sizes)==0:
... | 31.322034 | 121 | 0.626082 |
610f121ce4a6f19ecb5687501de57d8ea735bade | 338 | py | Python | src/chapter7/exercise3.py | group1BSE1/BSE-2021 | 43abaac6b6abd681e45ea56e3926eae211eef2b3 | [
"MIT"
] | null | null | null | src/chapter7/exercise3.py | group1BSE1/BSE-2021 | 43abaac6b6abd681e45ea56e3926eae211eef2b3 | [
"MIT"
] | null | null | null | src/chapter7/exercise3.py | group1BSE1/BSE-2021 | 43abaac6b6abd681e45ea56e3926eae211eef2b3 | [
"MIT"
] | null | null | null | file = input('Enter the file name: ')
try:
fhandle = open(file,'r')
count = 0
for line in fhandle:
count = count + 1
print('There were',count,'lines in',file)
except:
if file == 'na na boo boo':
print('NA NA BOO BOO TO YOU -You have been punk\'d!')
else:
print('file canno... | 28.166667 | 61 | 0.579882 |
e331fee1e85853343456eabfdaa4bf0934fdd995 | 452 | py | Python | app/core/migrations/0005_order_image.py | mayk93/rest-api-example-1 | 0be94c4a98783bc90550d81dc230a7656aa2a705 | [
"MIT"
] | null | null | null | app/core/migrations/0005_order_image.py | mayk93/rest-api-example-1 | 0be94c4a98783bc90550d81dc230a7656aa2a705 | [
"MIT"
] | null | null | null | app/core/migrations/0005_order_image.py | mayk93/rest-api-example-1 | 0be94c4a98783bc90550d81dc230a7656aa2a705 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-07-13 16:32
import core.models.order_model
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0004_order'),
]
operations = [
migrations.AddField(
model_name='order',
name... | 22.6 | 104 | 0.634956 |
2bd13146b7de2e2bad99738729e98a93e9bf4502 | 826 | py | Python | scripts/import_diseases.py | ecohealthalliance/sicki_web | a6c60250975d6b3593ced144b900d50f8cc6a385 | [
"Apache-2.0"
] | null | null | null | scripts/import_diseases.py | ecohealthalliance/sicki_web | a6c60250975d6b3593ced144b900d50f8cc6a385 | [
"Apache-2.0"
] | null | null | null | scripts/import_diseases.py | ecohealthalliance/sicki_web | a6c60250975d6b3593ced144b900d50f8cc6a385 | [
"Apache-2.0"
] | null | null | null | import contextlib
from urllib import urlopen
def import_diseases(db):
diseases = db.diseases
CKAN_URL = "https://ckan-datastore.s3.amazonaws.com/2013-11-12T18:22:32.991Z/google-define-disease-definitions.csv"
with contextlib.closing(urlopen(CKAN_URL)) as raw_csv:
for line in raw_csv.read().split(... | 41.3 | 119 | 0.507264 |
60bfc83c19ba3eb4e7c79c30ce8c080155ec563a | 4,353 | py | Python | settings.py | DavidWeiMin/Heuristics-Algorithms | a888d8072a45baf3881ae6e5ae2ce8a4b6140b18 | [
"MIT"
] | 1 | 2021-01-21T05:54:08.000Z | 2021-01-21T05:54:08.000Z | settings.py | DavidWeiMin/Heuristics-Algorithms | a888d8072a45baf3881ae6e5ae2ce8a4b6140b18 | [
"MIT"
] | null | null | null | settings.py | DavidWeiMin/Heuristics-Algorithms | a888d8072a45baf3881ae6e5ae2ce8a4b6140b18 | [
"MIT"
] | null | null | null | import numpy as np
import random
import test_function # 导入目标函数
import math
import matplotlib.pyplot as plt
class Settings():
"""设置类,用于表示基本设置
"""
def __init__(self):
self.numCity = 30 # 城市个数
self.funTol = 1e-12 # 目标函数的误差容忍度
self.mode = 'real' # 生成距离矩阵的方式
self.generate_data()
... | 43.53 | 136 | 0.557776 |
44113d035cd66f71a0927c4f3841cda5da0ff6e6 | 3,027 | py | Python | aws_audit/local_helpers/codedeploy_helper.py | awsdit/awsdit | 3d4c8dd408eeba714f644367bb81381dc40ba4ab | [
"MIT"
] | 29 | 2015-11-29T22:31:39.000Z | 2020-05-10T21:44:54.000Z | aws_audit/local_helpers/codedeploy_helper.py | eshleebien/awsdit | 3d4c8dd408eeba714f644367bb81381dc40ba4ab | [
"MIT"
] | null | null | null | aws_audit/local_helpers/codedeploy_helper.py | eshleebien/awsdit | 3d4c8dd408eeba714f644367bb81381dc40ba4ab | [
"MIT"
] | 14 | 2015-07-15T14:41:58.000Z | 2021-07-08T08:09:25.000Z | """
code_deploy helper calls
"""
import boto3
import datetime
import dateutil.parser
import re
from local_helpers import misc
def list_apps_header():
"""generate output header"""
return misc.format_line((
"Account",
"Region",
"AppName",
"linkedToGitHub",
... | 36.914634 | 96 | 0.518996 |
b17ab640e09ea6837510580278ebeff9d2dff3b9 | 568 | py | Python | tests/assets/jupyterhub_config.py | consideRatio/jhub-client | a6a7369da5156fd2e52087defdc91def6389816a | [
"BSD-3-Clause"
] | 4 | 2021-02-05T11:21:23.000Z | 2021-06-25T09:39:10.000Z | tests/assets/jupyterhub_config.py | consideRatio/jhub-client | a6a7369da5156fd2e52087defdc91def6389816a | [
"BSD-3-Clause"
] | 5 | 2020-11-19T00:59:05.000Z | 2021-02-04T14:39:33.000Z | tests/assets/jupyterhub_config.py | consideRatio/jhub-client | a6a7369da5156fd2e52087defdc91def6389816a | [
"BSD-3-Clause"
] | 4 | 2021-02-05T12:04:28.000Z | 2021-05-26T14:12:04.000Z | from jupyterhub.auth import DummyAuthenticator
from jupyterhub.spawner import SimpleLocalProcessSpawner
c.JupyterHub.authenticator_class = DummyAuthenticator
c.DummyAuthenticator.password = 'test'
c.JupyterHub.spawner_class = SimpleLocalProcessSpawner
c.JupyterHub.users = ['user1']
c.JupyterHub.admin_users = ['user1'... | 28.4 | 88 | 0.758803 |
271074d0ee406d89572da3236a7c0a90ecf7191c | 6,947 | py | Python | tools/ci/test3.py | lxylxy123456/uberxmhf | a8610d2f9e69263c014b5e48270e42690b73b85d | [
"BSD-2-Clause-NetBSD"
] | null | null | null | tools/ci/test3.py | lxylxy123456/uberxmhf | a8610d2f9e69263c014b5e48270e42690b73b85d | [
"BSD-2-Clause-NetBSD"
] | 1 | 2022-03-12T20:57:57.000Z | 2022-03-12T20:57:57.000Z | tools/ci/test3.py | lxylxy123456/uberxmhf | a8610d2f9e69263c014b5e48270e42690b73b85d | [
"BSD-2-Clause-NetBSD"
] | 1 | 2022-03-04T20:49:51.000Z | 2022-03-04T20:49:51.000Z | '''
Test XMHF using QEMU
'''
from subprocess import Popen, check_call
import argparse, subprocess, time, os, random, socket, threading
SSH_CONNECTING = 0
SSH_RUNNING = 1
SSH_COMPLETED = 2
SSH_TIMEOUT = 2
HALT_TIMEOUT = 10
println_lock = threading.Lock()
def parse_args():
parser = argparse.ArgumentParser()
parse... | 29.436441 | 77 | 0.660285 |
66e76eb4afcd170576b75dcd12e3d254d8235fc2 | 28,680 | py | Python | inlinestyler/cssselect.py | KeepSafe/inlinestyler | 0b5c2ec65bf7fd3428f80cde1f0278957ffdd8d0 | [
"BSD-3-Clause"
] | 51 | 2015-02-05T16:44:04.000Z | 2021-08-06T11:44:50.000Z | inlinestyler/cssselect.py | KeepSafe/inlinestyler | 0b5c2ec65bf7fd3428f80cde1f0278957ffdd8d0 | [
"BSD-3-Clause"
] | 19 | 2015-02-10T16:04:45.000Z | 2022-01-31T17:09:08.000Z | inlinestyler/cssselect.py | KeepSafe/inlinestyler | 0b5c2ec65bf7fd3428f80cde1f0278957ffdd8d0 | [
"BSD-3-Clause"
] | 13 | 2015-03-31T05:26:07.000Z | 2022-01-31T16:39:57.000Z | """CSS Selectors based on XPath.
This module supports selecting XML/HTML tags based on CSS selectors.
See the `CSSSelector` class for details.
"""
import re
from lxml import etree
__all__ = ['SelectorSyntaxError', 'ExpressionError',
'CSSSelector']
try:
_basestring = basestring
except NameError:
_... | 30.221286 | 123 | 0.527162 |
ef4ec17d0926cfc45aef42113cc15bacfea3cd0c | 5,623 | py | Python | backend/createDatabase.py | weatosd/weat | d22065591b6dfebf8cf5474654beab38c4fda427 | [
"Apache-2.0"
] | null | null | null | backend/createDatabase.py | weatosd/weat | d22065591b6dfebf8cf5474654beab38c4fda427 | [
"Apache-2.0"
] | 12 | 2020-11-10T01:09:11.000Z | 2020-12-22T02:12:33.000Z | backend/createDatabase.py | weatosd/weat | d22065591b6dfebf8cf5474654beab38c4fda427 | [
"Apache-2.0"
] | null | null | null | import json
import faker
from uuid import uuid4
import json
import time
import random
def createDatabase():
fake = faker.Faker()
ids = []
# create customer list of dicts
customers = []
for i in range(random.randint(5, 20)):
newCustomer = {}
newId = uuid4().int
ids.append(ne... | 28.256281 | 113 | 0.482483 |
f8a2429503112d315ca4915f1c3e2aa324212e22 | 790 | py | Python | load_model.py | sitonlotus/handwritten-digit-recognition | 23beb79bb1ded1d4ad2133e23b3db0b1652c1e65 | [
"MIT"
] | 6 | 2019-09-14T03:39:06.000Z | 2020-12-10T05:09:15.000Z | load_model.py | sitonlotus/handwritten-digit-recognition | 23beb79bb1ded1d4ad2133e23b3db0b1652c1e65 | [
"MIT"
] | 2 | 2021-08-25T16:11:09.000Z | 2022-02-10T02:21:58.000Z | load_model.py | sitonlotus/handwritten-digit-recognition | 23beb79bb1ded1d4ad2133e23b3db0b1652c1e65 | [
"MIT"
] | 6 | 2019-09-14T03:39:12.000Z | 2022-02-12T13:46:12.000Z | import cv2
import sys
import numpy as np
from tensorflow.keras import models
MODEL_PATH = "tf-cnn-model.h5"
def predict_digit(image_path):
# load model
model = models.load_model(MODEL_PATH)
print("[INFO] Loaded model from disk.")
image = cv2.imread(image_path, 0)
image1 = cv2.resize(im... | 25.483871 | 87 | 0.660759 |
9232f715a8b8caf32ade0112615d24dca77b508c | 2,124 | py | Python | tests/common/test_run/ascend/mod_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/mod_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/mod_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 46.173913 | 119 | 0.693032 |
83cf02f3d2c7854cdd296b804997af3d3968a5f1 | 4,395 | py | Python | unused/tf2_wide_deep/python/pred.py | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | 6c3031487cd1447b7f5362483c14b108177387bb | [
"MIT"
] | 4 | 2020-03-03T12:51:05.000Z | 2021-06-19T17:34:45.000Z | unused/tf2_wide_deep/python/pred.py | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | 6c3031487cd1447b7f5362483c14b108177387bb | [
"MIT"
] | null | null | null | unused/tf2_wide_deep/python/pred.py | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | 6c3031487cd1447b7f5362483c14b108177387bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: lapis-hong
# @Date : 2018/2/2
"""Wide and Deep Model Prediction
Not support for custom classifier, cause use different variable name scope, key not found in checkpoint"""
from __future__ import absolute_import
from __future__ import division
from __future__ impo... | 38.893805 | 122 | 0.684869 |
bc9239468995198766409f0790efbbe6f6ceaa16 | 104 | py | Python | newcomers_guide/apps.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 12 | 2017-08-30T18:21:00.000Z | 2021-12-09T04:04:17.000Z | newcomers_guide/apps.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 424 | 2017-08-08T18:32:14.000Z | 2022-03-30T21:42:51.000Z | newcomers_guide/apps.py | DarwishMenna/pathways-backend | e9825e0373c586ce8f07ee8b70aecc7de679fb41 | [
"BSD-3-Clause"
] | 7 | 2017-09-29T21:14:37.000Z | 2019-12-30T21:07:37.000Z | from django.apps import AppConfig
class NewcomersGuideConfig(AppConfig):
name = 'newcomers_guide'
| 17.333333 | 38 | 0.788462 |
abdbae27744c167e502b27d33e0ce591a28309b5 | 25,847 | py | Python | src/oscar/apps/customer/views.py | abirafdirp/revania | 70272b842316e8df57b0bc8a0dc669c3af4ec8f9 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/customer/views.py | abirafdirp/revania | 70272b842316e8df57b0bc8a0dc669c3af4ec8f9 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/customer/views.py | abirafdirp/revania | 70272b842316e8df57b0bc8a0dc669c3af4ec8f9 | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import get_object_or_404, redirect
from django.views import generic
from django.core.urlresolvers import reverse, reverse_lazy
from django.core.exceptions import ObjectDoesNotExist
from django import http
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
f... | 36.20028 | 79 | 0.642318 |
aaac80a7d1433c059850e7c59d94122eb8303d3a | 15,489 | py | Python | tests/sentry/utils/test_data_scrubber.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | tests/sentry/utils/test_data_scrubber.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/utils/test_data_scrubber.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from sentry.constants import FILTER_MASK
from unittest import TestCase
from sentry.utils.data_scrubber import SensitiveDataFilter
VARS = {
"foo": "bar",
"password": "hello",
"the_secret": "hello",
"a_password_here": "hello",
"api_key"... | 34.885135 | 126 | 0.607334 |
dc4436de869ee098705cf042470c64df70379582 | 3,793 | py | Python | v0.5.0/google/cloud_v100x8/code/resnet/benchmarks/scripts/tf_cnn_benchmarks/models/densenet_model.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 67 | 2020-09-07T11:50:03.000Z | 2022-03-31T04:09:08.000Z | v0.5.0/google/cloud_v100x8/code/resnet/benchmarks/scripts/tf_cnn_benchmarks/models/densenet_model.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | v0.5.0/google/cloud_v100x8/code/resnet/benchmarks/scripts/tf_cnn_benchmarks/models/densenet_model.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.554455 | 80 | 0.697864 |
b514bbb1dca8c0da449df6bc60d9a9be71d61be2 | 596 | py | Python | project/tests/test_collector.py | eduzen/django-silk | 8f8d159a4209f4c294aba16bce3b1ca5789dc2d2 | [
"MIT"
] | 2,027 | 2018-01-10T16:48:35.000Z | 2022-03-31T17:11:44.000Z | project/tests/test_collector.py | eduzen/django-silk | 8f8d159a4209f4c294aba16bce3b1ca5789dc2d2 | [
"MIT"
] | 270 | 2018-01-10T10:24:53.000Z | 2022-03-24T11:12:23.000Z | project/tests/test_collector.py | eduzen/django-silk | 8f8d159a4209f4c294aba16bce3b1ca5789dc2d2 | [
"MIT"
] | 210 | 2018-01-10T14:03:28.000Z | 2022-03-08T06:20:55.000Z | from django.test import TestCase
from silk.collector import DataCollector
class TestCollector(TestCase):
def test_singleton(self):
a = DataCollector()
b = DataCollector()
c = DataCollector()
self.assertTrue(a == b == c)
def test_query_registration(self):
mock_query = ... | 27.090909 | 73 | 0.66443 |
41964bb3f476f320653b73f85189211f905f9266 | 23,016 | py | Python | models/official/amoeba_net/amoeba_net_model.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 65 | 2017-07-28T03:47:42.000Z | 2018-02-04T20:54:18.000Z | models/official/amoeba_net/amoeba_net_model.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 10 | 2017-08-11T22:55:40.000Z | 2018-02-07T01:11:28.000Z | models/official/amoeba_net/amoeba_net_model.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 28 | 2017-07-28T08:20:06.000Z | 2018-01-28T16:28:12.000Z | # 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... | 37.303079 | 85 | 0.650591 |
d25d2e23823c9cf23a022ab84b1423425a077029 | 60,713 | py | Python | wavefront_api_client/api/user_api.py | PowerOlive/python-client | eebda67381fcf893914c309103878236b609a70b | [
"Apache-2.0"
] | 11 | 2016-05-30T17:16:45.000Z | 2021-06-11T19:32:59.000Z | wavefront_api_client/api/user_api.py | PowerOlive/python-client | eebda67381fcf893914c309103878236b609a70b | [
"Apache-2.0"
] | 25 | 2016-05-02T23:05:19.000Z | 2020-11-18T22:43:20.000Z | wavefront_api_client/api/user_api.py | PowerOlive/python-client | eebda67381fcf893914c309103878236b609a70b | [
"Apache-2.0"
] | 30 | 2016-04-29T17:17:11.000Z | 2022-02-11T04:58:37.000Z | # coding: utf-8
"""
Wavefront REST API
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ... | 40.154101 | 409 | 0.599196 |
f35abcd71cd9d0a2b9048f3f1cf9e9766118da5e | 84,278 | py | Python | graph_objs/carpet/_baxis.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | graph_objs/carpet/_baxis.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | graph_objs/carpet/_baxis.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Baxis(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet"
_path_str = "carpet.baxis"
_valid_props = {
"arraydtick",
"arraytick0... | 34.912179 | 93 | 0.565628 |
5146067b6cf4ec005c78c02a9c2e1515cd0eb157 | 201,848 | py | Python | lhotse/cut.py | aarora8/lhotse | 6e68d970862a87b05bda2effd9e3dd5a0c5acc81 | [
"Apache-2.0"
] | null | null | null | lhotse/cut.py | aarora8/lhotse | 6e68d970862a87b05bda2effd9e3dd5a0c5acc81 | [
"Apache-2.0"
] | null | null | null | lhotse/cut.py | aarora8/lhotse | 6e68d970862a87b05bda2effd9e3dd5a0c5acc81 | [
"Apache-2.0"
] | null | null | null | import itertools
import logging
import random
import warnings
from concurrent.futures import Executor, ProcessPoolExecutor
from dataclasses import dataclass, field
from functools import partial, reduce
from itertools import chain, islice
from math import ceil, floor
from pathlib import Path
from typing import (
Any... | 42.655959 | 144 | 0.604113 |
adea359b42137f61da3c383895c015af29bbda40 | 6,723 | py | Python | model/tensorflow/Wrapper.py | k920049/brunch-hgru | f832de2d7d8e1e74a58e1a4851f57dfa6751e717 | [
"MIT"
] | 2 | 2020-06-17T08:49:06.000Z | 2022-01-18T08:57:50.000Z | model/tensorflow/Wrapper.py | k920049/brunch-hgru | f832de2d7d8e1e74a58e1a4851f57dfa6751e717 | [
"MIT"
] | null | null | null | model/tensorflow/Wrapper.py | k920049/brunch-hgru | f832de2d7d8e1e74a58e1a4851f57dfa6751e717 | [
"MIT"
] | null | null | null | import tensorflow as tf
from model.tensorflow.Helper import _generate_zero_filled_state_for_cell, _is_multiple_state
from tensorflow.python.keras.layers import deserialize as deserialize_layer
from tensorflow.python.keras.layers.recurrent import *
class HierarchicalRNNCell(Layer):
def __init__(self,
... | 43.096154 | 115 | 0.619813 |
6d941cf3e33ed36a743e821c02f0b1572580d6d9 | 4,058 | py | Python | PyCAD/geom/Point3D.py | danheeks/HeeksCAM | eb54f5c402effd74aa97fee4041ab303bafd1a7e | [
"BSD-2-Clause"
] | 5 | 2015-12-07T15:27:43.000Z | 2021-03-03T15:51:52.000Z | PyCAD/geom/Point3D.py | danheeks/HeeksCAM | eb54f5c402effd74aa97fee4041ab303bafd1a7e | [
"BSD-2-Clause"
] | null | null | null | PyCAD/geom/Point3D.py | danheeks/HeeksCAM | eb54f5c402effd74aa97fee4041ab303bafd1a7e | [
"BSD-2-Clause"
] | 4 | 2017-02-12T10:30:28.000Z | 2020-06-15T12:18:21.000Z | import geom
import copy
import sys
import math
class Point3D:
def __init__(self, x, y, z = None):
""" make a 3D point ( or vector ) from x, y, z coordinates or as a vector between two points """
if isinstance(x, self.__class__) and isinstance(y, self.__class__):
p0 = x
p1 = ... | 34.10084 | 133 | 0.506161 |
d0a83139face552a672a9c45333b5e528fd250f1 | 897 | py | Python | dlu/random/states.py | elias-ramzi/learning-utils | 7d0c48433bee1fe133c4e5b9095ee0c1fe343591 | [
"MIT"
] | null | null | null | dlu/random/states.py | elias-ramzi/learning-utils | 7d0c48433bee1fe133c4e5b9095ee0c1fe343591 | [
"MIT"
] | null | null | null | dlu/random/states.py | elias-ramzi/learning-utils | 7d0c48433bee1fe133c4e5b9095ee0c1fe343591 | [
"MIT"
] | null | null | null | import random
from functools import wraps
import numpy as np
import torch
def get_random_state():
RANDOM_STATE = {}
RANDOM_STATE["RANDOM_STATE"] = random.getstate()
RANDOM_STATE["NP_STATE"] = np.random.get_state()
RANDOM_STATE["TORCH_STATE"] = torch.random.get_rng_state()
RANDOM_STATE["TORCH_CUDA... | 28.03125 | 69 | 0.725753 |
1280f5fdfb5e0757467834ce9925e1031e3b8ea0 | 46,307 | py | Python | nipyapi/registry/apis/tenants_api.py | iMajna/nipyapi | 5480af8fe8c6b470249837835cb1a067abb6678e | [
"Apache-2.0"
] | null | null | null | nipyapi/registry/apis/tenants_api.py | iMajna/nipyapi | 5480af8fe8c6b470249837835cb1a067abb6678e | [
"Apache-2.0"
] | 1 | 2020-03-16T10:02:46.000Z | 2020-03-16T13:37:42.000Z | nipyapi/registry/apis/tenants_api.py | iMajna/nipyapi | 5480af8fe8c6b470249837835cb1a067abb6678e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Apache NiFi Registry REST API
The REST API provides an interface to a registry with operations for saving, versioning, reading NiFi flows and components.
OpenAPI spec version: 0.7.0
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"... | 41.493728 | 164 | 0.559008 |
6aa02d8267a0c7388750bec2f1d2e1d558a02484 | 829 | py | Python | test/test_modify_group.py | shtepkaa/SoftwareTesting | d3da30238d35cde84701bfdfa43c2db659404684 | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | shtepkaa/SoftwareTesting | d3da30238d35cde84701bfdfa43c2db659404684 | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | shtepkaa/SoftwareTesting | d3da30238d35cde84701bfdfa43c2db659404684 | [
"Apache-2.0"
] | 1 | 2021-08-10T14:36:00.000Z | 2021-08-10T14:36:00.000Z | from model.group import Group
import random
def check_empty_filling(app, db):
if len(db.get_group_list()) == 0:
app.group.create(Group(name="test"))
def test_modify_some_group(app, db, check_ui):
check_empty_filling(app, db)
old_contacts = db.get_contact_list()
index = random.randrange(len(o... | 37.681818 | 98 | 0.66345 |
4be67ef958ae4c9d179d9038134700f17e1494b2 | 385 | py | Python | loja/wsgi.py | Felipe-007/Ecommerce | f3003b3130709b12ae87b45867a8364f00fef2f1 | [
"MIT"
] | null | null | null | loja/wsgi.py | Felipe-007/Ecommerce | f3003b3130709b12ae87b45867a8364f00fef2f1 | [
"MIT"
] | null | null | null | loja/wsgi.py | Felipe-007/Ecommerce | f3003b3130709b12ae87b45867a8364f00fef2f1 | [
"MIT"
] | null | null | null | """
WSGI config for loja project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS... | 22.647059 | 78 | 0.781818 |
5613a2f7a58afe43585b96e529dade0a673889da | 1,708 | py | Python | Portfolio_Strategies/portfolio_functions.py | vhn0912/Finance | 39cf49d4d778d322537531cee4ce3981cc9951f9 | [
"MIT"
] | 441 | 2020-04-22T02:21:19.000Z | 2022-03-29T15:00:24.000Z | Portfolio_Strategies/portfolio_functions.py | happydasch/Finance | 4f6c5ea8f60fb0dc3b965ffb9628df83c2ecef35 | [
"MIT"
] | 5 | 2020-07-06T15:19:58.000Z | 2021-07-23T18:32:29.000Z | Portfolio_Strategies/portfolio_functions.py | happydasch/Finance | 4f6c5ea8f60fb0dc3b965ffb9628df83c2ecef35 | [
"MIT"
] | 111 | 2020-04-21T11:40:39.000Z | 2022-03-20T07:26:17.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import math
import warnings
warnings.filterwarnings("ignore")
import yfinance as yf
yf.pdr_override()
import datetime as dt
from dateutil import relativedelta
def get_historical_price(ticker, start_date, end_date):
df = yf... | 28.949153 | 76 | 0.733607 |
3c159372bcc7a4efacbe44b1036419d1cb975f5b | 1,882 | py | Python | Day3.py | RaulVan/JustPythonCode | 8ca855f4f41aa8e10b778df97a82284398b5e9bf | [
"MIT"
] | null | null | null | Day3.py | RaulVan/JustPythonCode | 8ca855f4f41aa8e10b778df97a82284398b5e9bf | [
"MIT"
] | null | null | null | Day3.py | RaulVan/JustPythonCode | 8ca855f4f41aa8e10b778df97a82284398b5e9bf | [
"MIT"
] | null | null | null | __author__ = 'Eleven'
#
# encoding:UTF-8
# import urllib.request
#
# url = "http://www.baidu.com"
# data = urllib.request.urlopen(url).read()
# data = data.decode('UTF-8')
# print(data)
# print ("ddd")
#-*- encoding: utf-8 -*-
import urllib
import urllib.request
import http.cookiejar
import os
from bs4 import Beautif... | 22.404762 | 131 | 0.631775 |
fe4ce47ee470d16afa4e7f21281cc37e55b81df5 | 2,057 | py | Python | conans/test/functional/generators/premake_test.py | Manu343726/conan | fe322a672307d29f99d2e7bc1c02c45c835028d7 | [
"MIT"
] | null | null | null | conans/test/functional/generators/premake_test.py | Manu343726/conan | fe322a672307d29f99d2e7bc1c02c45c835028d7 | [
"MIT"
] | 1 | 2020-04-18T10:13:37.000Z | 2020-04-18T10:16:37.000Z | conans/test/functional/generators/premake_test.py | alacasta/conan | 643a9c84fe6dc0cb2f9fcbfc9dc5bd2e789c690e | [
"MIT"
] | 1 | 2018-09-03T05:04:23.000Z | 2018-09-03T05:04:23.000Z | import os
import textwrap
import unittest
from nose.plugins.attrib import attr
from conans import load
from conans.client.tools import chdir, which
from conans.test.utils.tools import TestClient
@attr("premake")
@unittest.skipIf(which("premake5") is None, "Needs premake5")
class PremakeGeneratorTest(unittest.TestCa... | 33.721311 | 89 | 0.627613 |
19ba70c5860fd59a8188afc84bfad4865d02dd50 | 20,985 | py | Python | eufy_robovac/tuya.py | koying/eufy_robovac | 34cfd6041964b3c25426c09d7bbbe2f0b5711bd6 | [
"Apache-2.0"
] | null | null | null | eufy_robovac/tuya.py | koying/eufy_robovac | 34cfd6041964b3c25426c09d7bbbe2f0b5711bd6 | [
"Apache-2.0"
] | null | null | null | eufy_robovac/tuya.py | koying/eufy_robovac | 34cfd6041964b3c25426c09d7bbbe2f0b5711bd6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Richard Mitchell
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 36.118761 | 136 | 0.64041 |
26c0a813fc35c8c393179f38425fdcfb3cb73cb6 | 113 | py | Python | blender/2.79/scripts/addons/io_blend_utils/blender_bam-unpacked.whl/bam/__init__.py | uzairakbar/bpy2.79 | 3a3e0004ac6783c4e4b89d939e4432de99026a85 | [
"MIT"
] | 3 | 2019-09-16T10:29:19.000Z | 2022-02-11T14:43:18.000Z | engine/2.80/scripts/addons/io_blend_utils/blender_bam-unpacked.whl/bam/__init__.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons/io_blend_utils/blender_bam-unpacked.whl/bam/__init__.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | 4 | 2020-02-19T20:02:26.000Z | 2022-02-11T18:47:56.000Z | # -*- coding: utf-8 -*-
__version__ = '1.1.8'
if __name__ == '__main__':
from .cli import main
main()
| 12.555556 | 26 | 0.557522 |
d19236808c11e02246ee7dfd145cc24b3e48a50f | 3,777 | py | Python | src/fhir_types/FHIR_PlanDefinition_Target.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | 2 | 2022-02-03T00:51:30.000Z | 2022-02-03T18:42:43.000Z | src/fhir_types/FHIR_PlanDefinition_Target.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | null | null | null | src/fhir_types/FHIR_PlanDefinition_Target.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | null | null | null | from typing import Any, List, Literal, TypedDict
from .FHIR_CodeableConcept import FHIR_CodeableConcept
from .FHIR_Duration import FHIR_Duration
from .FHIR_Quantity import FHIR_Quantity
from .FHIR_Range import FHIR_Range
from .FHIR_string import FHIR_string
# This resource allows for the definition of various types o... | 118.03125 | 836 | 0.769658 |
933097eaccd77e83f2d72e12ff9dc21866535cfd | 1,171 | py | Python | grouper/entities/user.py | bonniech3n/merou | 47d9de906686fd5b930a49299d3ffbcc0673ae8a | [
"Apache-2.0"
] | null | null | null | grouper/entities/user.py | bonniech3n/merou | 47d9de906686fd5b930a49299d3ffbcc0673ae8a | [
"Apache-2.0"
] | null | null | null | grouper/entities/user.py | bonniech3n/merou | 47d9de906686fd5b930a49299d3ffbcc0673ae8a | [
"Apache-2.0"
] | null | null | null | class UserNotFoundException(Exception):
"""Attempt to operate on a user not found in the storage layer."""
def __init__(self, name):
# type: (str) -> None
msg = "User {} not found".format(name)
super(UserNotFoundException, self).__init__(msg)
class UserIsEnabledException(Exception):
... | 33.457143 | 70 | 0.664389 |
ce1de3f30d78c2cdc34ddcdc0a9bd1525b78e08d | 7,294 | py | Python | setuptools/__init__.py | c-jo/setuptools | dfc820fddf157842b3e19a77b78c6f046ba0929a | [
"MIT"
] | null | null | null | setuptools/__init__.py | c-jo/setuptools | dfc820fddf157842b3e19a77b78c6f046ba0929a | [
"MIT"
] | null | null | null | setuptools/__init__.py | c-jo/setuptools | dfc820fddf157842b3e19a77b78c6f046ba0929a | [
"MIT"
] | null | null | null | """Extensions to the 'distutils' for large or complex distributions"""
import os
import sys
import functools
import distutils.core
import distutils.filelist
import re
from distutils.errors import DistutilsOptionError
from distutils.util import convert_path
from fnmatch import fnmatchcase
from ._deprecation_warning im... | 31.991228 | 79 | 0.639978 |
009d229cdb834c1c35b5640d369a0e051e34e223 | 2,924 | py | Python | test/test_charts.py | shashankv02/helm-image-mirror | 4ec7e714a59c8d713f4db1423b0a5d96e91c3c6b | [
"Apache-2.0"
] | 10 | 2020-12-11T12:17:37.000Z | 2022-02-23T19:13:54.000Z | test/test_charts.py | shashankv02/helm-image-mirror | 4ec7e714a59c8d713f4db1423b0a5d96e91c3c6b | [
"Apache-2.0"
] | null | null | null | test/test_charts.py | shashankv02/helm-image-mirror | 4ec7e714a59c8d713f4db1423b0a5d96e91c3c6b | [
"Apache-2.0"
] | 3 | 2021-09-07T20:23:13.000Z | 2022-03-16T05:24:38.000Z | #!/usr/bin/python3
import os
import re
import sys
import pytest
import yaml
base_path = re.search("^(.*)/test/", os.path.abspath(__file__))
sys.path.append(os.path.join(base_path.group(1), "src"))
from helm_image_mirror import Chart, get_charts
config = """
charts:
# chart specific true
- fetch: true
repo:... | 27.074074 | 119 | 0.55814 |
5117daeca2c43ace4b0f324babd3f554537b383f | 1,799 | py | Python | src/graph_transpiler/webdnn/backend/webassembly/kernels/reshape.py | steerapi/webdnn | 1df51cc094e5a528cfd3452c264905708eadb491 | [
"MIT"
] | 1 | 2021-04-09T15:55:35.000Z | 2021-04-09T15:55:35.000Z | src/graph_transpiler/webdnn/backend/webassembly/kernels/reshape.py | steerapi/webdnn | 1df51cc094e5a528cfd3452c264905708eadb491 | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/backend/webassembly/kernels/reshape.py | steerapi/webdnn | 1df51cc094e5a528cfd3452c264905708eadb491 | [
"MIT"
] | null | null | null | from typing import List
from webdnn.backend.code_generator.allocator import MemoryLayout
from webdnn.backend.code_generator.injectors.buffer_injector import BufferInjector
from webdnn.backend.code_generator.injectors.kernel_name_injector import KernelNameInjector
from webdnn.backend.webassembly.generator import Webass... | 29.491803 | 91 | 0.703168 |
d283115492e9995beacfa67427140a6b1eb15042 | 410 | py | Python | mpcontribs-utils/mpcontribs/config.py | josuav1/MPContribs | 3cbf0e83ba6cd749dd4fc988c9f6ad076b05f935 | [
"MIT"
] | 1 | 2019-07-03T04:38:58.000Z | 2019-07-03T04:38:58.000Z | mpcontribs-utils/mpcontribs/config.py | josuav1/MPContribs | 3cbf0e83ba6cd749dd4fc988c9f6ad076b05f935 | [
"MIT"
] | null | null | null | mpcontribs-utils/mpcontribs/config.py | josuav1/MPContribs | 3cbf0e83ba6cd749dd4fc988c9f6ad076b05f935 | [
"MIT"
] | 1 | 2019-07-03T04:39:04.000Z | 2019-07-03T04:39:04.000Z | import os, re
from tempfile import gettempdir
mp_level01_titles = [ '_hdata', 'tables', 'graphs', 'structures' ]
csv_comment_char = '#'
mp_id_pattern = re.compile('^(mp|por|mvc)-\d+(?:--\d+)?$', re.IGNORECASE)
object_id_pattern = re.compile('^[a-f\d]{24}$')
default_mpfile_path = os.path.join(gettempdir(), 'mpfile.txt'... | 37.272727 | 73 | 0.602439 |
34ad498984c219c27e334949d37a86cbf7ceaced | 3,590 | py | Python | test/mnist-pytorch/client/validate.py | morganekmefjord/fedn | 5649183ef2cc76bb47c67640d2e44b1ced65231f | [
"Apache-2.0"
] | null | null | null | test/mnist-pytorch/client/validate.py | morganekmefjord/fedn | 5649183ef2cc76bb47c67640d2e44b1ced65231f | [
"Apache-2.0"
] | null | null | null | test/mnist-pytorch/client/validate.py | morganekmefjord/fedn | 5649183ef2cc76bb47c67640d2e44b1ced65231f | [
"Apache-2.0"
] | 2 | 2021-02-26T09:16:19.000Z | 2021-03-13T12:07:06.000Z | import sys
from data.read_data import read_data
import json
import yaml
import torch
import os
import collections
import pickle
def np_to_weights(weights_np):
weights = collections.OrderedDict()
for w in weights_np:
weights[w] = torch.tensor(weights_np[w])
return weights
def validate(model, settin... | 34.190476 | 116 | 0.616992 |
5f3d4fdfdbf89351189b9acedb5365342c393e67 | 6,025 | py | Python | src/events/tests/renderers/test_render_row.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 47 | 2015-12-19T10:23:11.000Z | 2018-06-13T08:07:33.000Z | src/events/tests/renderers/test_render_row.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 473 | 2018-12-01T13:01:48.000Z | 2022-03-30T07:10:42.000Z | src/events/tests/renderers/test_render_row.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 91 | 2018-07-26T02:38:59.000Z | 2022-01-16T02:38:31.000Z | import pytest
from django.utils.timezone import make_naive
from events import renderers
@pytest.fixture
def simple_renderer(mocker):
def _simple_block_renderer(
event, time_map, events, extra_classes=None, *,
min_height=0, max_height=None):
if extra_classes:
fmt = '|... | 32.567568 | 77 | 0.62971 |
6c5e2ca5e3026a2991284c182dec3ca70a6d1fa3 | 2,516 | py | Python | lm_eval/tasks/arc.py | techthiyanes/lm-evaluation-harness | 6caa0afd96a7a7efb2ec4c1f24ad1756e48f3aa7 | [
"MIT"
] | null | null | null | lm_eval/tasks/arc.py | techthiyanes/lm-evaluation-harness | 6caa0afd96a7a7efb2ec4c1f24ad1756e48f3aa7 | [
"MIT"
] | null | null | null | lm_eval/tasks/arc.py | techthiyanes/lm-evaluation-harness | 6caa0afd96a7a7efb2ec4c1f24ad1756e48f3aa7 | [
"MIT"
] | null | null | null | """
Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
https://arxiv.org/pdf/1803.05457.pdf
The ARC dataset consists of 7,787 science exam questions drawn from a variety
of sources, including science questions provided under license by a research
partner affiliated with AI2. These are text-... | 34 | 135 | 0.668124 |
b23498257705f913e2951794b7275169b187cfab | 11,413 | py | Python | gluoncv/model_zoo/action_recognition/actionrec_inceptionv3.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 5,447 | 2018-04-25T18:02:51.000Z | 2022-03-31T00:59:49.000Z | gluoncv/model_zoo/action_recognition/actionrec_inceptionv3.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 1,566 | 2018-04-25T21:14:04.000Z | 2022-03-31T06:42:42.000Z | gluoncv/model_zoo/action_recognition/actionrec_inceptionv3.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 1,345 | 2018-04-25T18:44:13.000Z | 2022-03-30T19:32:53.000Z | # pylint: disable=line-too-long,too-many-lines,missing-docstring,arguments-differ,unused-argument
import mxnet as mx
from mxnet import init
from mxnet.gluon import nn
from mxnet.gluon.nn import HybridBlock
from ..inception import inception_v3
__all__ = ['inceptionv3_ucf101', 'inceptionv3_hmdb51', 'inceptionv3_kinetics... | 46.206478 | 110 | 0.632962 |
7639f732720e34a56804826e1e8844e5955223e6 | 428 | py | Python | nlp_server/nlp/test/test_text_segmentation.py | asevans48/NLPServer | 6feb1d89748165f9efea40d0777d355044c48176 | [
"Apache-2.0"
] | null | null | null | nlp_server/nlp/test/test_text_segmentation.py | asevans48/NLPServer | 6feb1d89748165f9efea40d0777d355044c48176 | [
"Apache-2.0"
] | null | null | null | nlp_server/nlp/test/test_text_segmentation.py | asevans48/NLPServer | 6feb1d89748165f9efea40d0777d355044c48176 | [
"Apache-2.0"
] | null | null | null | """
Test text segmentation
@author aevans
"""
import os
from nlp_server.nlp.text_segmentation import TopicTokenizer
def test_text_segmentation():
tiler = TopicTokenizer()
current_dir = os.path.curdir
fpath = os.path.sep.join([current_dir, 'data', 'speech.txt'])
with open(fpath) as fp:
txt =... | 20.380952 | 65 | 0.67757 |
ecf58d2c6a3b09656cddd7f2f69572ca36c590cf | 9,820 | py | Python | oscar/test/newfactories.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | oscar/test/newfactories.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | oscar/test/newfactories.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""
Factories using factory boy.
Using a silly module name as I don't want to mix the old and new
implementations of factories, but I do want to allow importing both from the
same place.
In 2020, when all tests use the new factory-boy factories, we can rename this
module to factories.py and drop the ol... | 30.030581 | 78 | 0.697454 |
c621cce360019658a051e018ba77a721c29b1397 | 1,064 | py | Python | DirParser.py | mhaeusser/CDParser | 47c190730e4ecae1097e7fe435a7978c113f2329 | [
"MIT"
] | null | null | null | DirParser.py | mhaeusser/CDParser | 47c190730e4ecae1097e7fe435a7978c113f2329 | [
"MIT"
] | null | null | null | DirParser.py | mhaeusser/CDParser | 47c190730e4ecae1097e7fe435a7978c113f2329 | [
"MIT"
] | null | null | null | import os
# Traverses artist and album directories.
class DirParser:
def __init__(self):
pass
def traverse(self, root_dir, dirs_to_ignore):
"""
traverses root_dir, considers all contained folders as artist folders
writes results into file
"""
print('Starting.')
dict = {} # maps artis... | 25.95122 | 73 | 0.62782 |
c24fb5540c30cfb1a2fe6e657a05feeb7ee58207 | 166,187 | py | Python | scipy/stats/tests/test_distributions.py | daniel-dr-rojas/scipy | 8e418e38fe6c88105eeae8eeb53248d19a8286fb | [
"BSD-3-Clause"
] | 1 | 2020-04-09T06:22:21.000Z | 2020-04-09T06:22:21.000Z | scipy/stats/tests/test_distributions.py | daniel-dr-rojas/scipy | 8e418e38fe6c88105eeae8eeb53248d19a8286fb | [
"BSD-3-Clause"
] | null | null | null | scipy/stats/tests/test_distributions.py | daniel-dr-rojas/scipy | 8e418e38fe6c88105eeae8eeb53248d19a8286fb | [
"BSD-3-Clause"
] | null | null | null | """ Test functions for stats module
"""
import warnings
import re
import sys
import pickle
import os
from numpy.testing import (assert_equal, assert_array_equal,
assert_almost_equal, assert_array_almost_equal,
assert_allclose, assert_, assert_warns,
... | 38.666124 | 159 | 0.575665 |
910065db35780e925504af19f41ac52671dae2b0 | 1,855 | py | Python | useModel.py | tnursultan/nwhacks2022 | 6a6a6e1256ae354198281d55bd1aae38e1830672 | [
"MIT"
] | null | null | null | useModel.py | tnursultan/nwhacks2022 | 6a6a6e1256ae354198281d55bd1aae38e1830672 | [
"MIT"
] | null | null | null | useModel.py | tnursultan/nwhacks2022 | 6a6a6e1256ae354198281d55bd1aae38e1830672 | [
"MIT"
] | null | null | null | import os, sys
import tensorflow as tf
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import glob
config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.compat.v1.InteractiveSession(config=config)
IMAGE_SIZE = (100, 100)
IMAGE_SHAPE = (100, 100, 3... | 30.916667 | 107 | 0.63558 |
095ab52cf2d0843a5e50293a16476a8ef01ef25a | 6,496 | py | Python | tests/test_commands.py | marxide/django-tagulous | 80c057c5dd2dce85f4bb531b25d3b4982bd03e8f | [
"Apache-2.0"
] | null | null | null | tests/test_commands.py | marxide/django-tagulous | 80c057c5dd2dce85f4bb531b25d3b4982bd03e8f | [
"Apache-2.0"
] | null | null | null | tests/test_commands.py | marxide/django-tagulous | 80c057c5dd2dce85f4bb531b25d3b4982bd03e8f | [
"Apache-2.0"
] | null | null | null | """
Tagulous test: manage.py commands
Modules tested:
tagulous.management.commands.initial_tags
"""
from __future__ import absolute_import, print_function, unicode_literals
from django.core.management import call_command
from django.test import TestCase
from tests.lib import Capturing, TagTestManager
from tests.... | 39.13253 | 88 | 0.671182 |
dbf1f99c3cf3601a8c67c7a1e6ebd603cf3b1e25 | 276 | py | Python | aspectRatio.py | santarini/python | 8f1d576d59b7c9ca23c3d80058fa2d14833c54ae | [
"MIT"
] | 3 | 2017-12-22T09:33:18.000Z | 2020-07-06T04:53:00.000Z | aspectRatio.py | santarini/python | 8f1d576d59b7c9ca23c3d80058fa2d14833c54ae | [
"MIT"
] | null | null | null | aspectRatio.py | santarini/python | 8f1d576d59b7c9ca23c3d80058fa2d14833c54ae | [
"MIT"
] | null | null | null | from fractions import Fraction
width = 1920
height = 1080
print("Your aspect ratio:\n" + str(Fraction(width/height)).replace("/",":"))
print("\nExamples of your aspect ratio:")
for i in range(0, 3 * width , 100)[1:]:
print(str(i) + " x " + str(int(i/(width/height))))
| 23 | 76 | 0.641304 |
de65d346dee1761ff286513dbdec8c0bb605ab91 | 9,325 | py | Python | tests/conftest.py | dr-strangecode/signalfx-agent | e4bfc33bb22f848501311e7e99c188346a4075bc | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | dr-strangecode/signalfx-agent | e4bfc33bb22f848501311e7e99c188346a4075bc | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | dr-strangecode/signalfx-agent | e4bfc33bb22f848501311e7e99c188346a4075bc | [
"Apache-2.0"
] | null | null | null | import os
import random
import string
import subprocess
import time
from functools import partial as p
import pytest
from tests import paths
from tests.helpers.kubernetes.minikube import Minikube, has_docker_image
from tests.helpers.util import get_docker_client, run_container, wait_for
K8S_DEFAULT_VERSION = "1.14.0... | 40.899123 | 223 | 0.661769 |
4c746a6fe83e36ce5599e88bc1f315197cb35d98 | 2,249 | py | Python | Pyautogui_tutorial/mouseclicktarget.py | xfzlun/WinUIAutomation | 0f94388671cf0aacbc8499293b7dd31ddfa205fa | [
"MIT"
] | null | null | null | Pyautogui_tutorial/mouseclicktarget.py | xfzlun/WinUIAutomation | 0f94388671cf0aacbc8499293b7dd31ddfa205fa | [
"MIT"
] | null | null | null | Pyautogui_tutorial/mouseclicktarget.py | xfzlun/WinUIAutomation | 0f94388671cf0aacbc8499293b7dd31ddfa205fa | [
"MIT"
] | null | null | null | import pyautogui
import random
import pyperclip
#左键点击脚本
def left_click(path): #定义一个函数实现左键点击的功能
left_click1 = pyautogui.locateOnScreen(path) #把目标图片当作参数传递给path
print('left_click1::', left_click1)
if left_click1:
url_x, url_y = pyautogui.center(left_click1)
pyautogui.leftClick(url_x,... | 35.698413 | 67 | 0.580703 |
db4e6c161e1ef67b8f7320fe489afdbfb7177107 | 1,454 | py | Python | codegen/tests/test_program.py | ytn86/SMI | adf2c1137d3b7fa66ad3a75712905fac52f37de9 | [
"BSD-3-Clause"
] | 17 | 2019-07-23T12:00:12.000Z | 2022-02-22T07:19:31.000Z | codegen/tests/test_program.py | ytn86/SMI | adf2c1137d3b7fa66ad3a75712905fac52f37de9 | [
"BSD-3-Clause"
] | 6 | 2019-12-10T12:57:50.000Z | 2022-02-14T08:54:54.000Z | codegen/tests/test_program.py | ytn86/SMI | adf2c1137d3b7fa66ad3a75712905fac52f37de9 | [
"BSD-3-Clause"
] | 10 | 2019-11-07T14:46:49.000Z | 2021-11-17T08:00:04.000Z | import pytest
from ops import Push, Pop, Broadcast, KEY_CKS_DATA, KEY_CKS_CONTROL, KEY_CKR_DATA, KEY_BROADCAST
from program import Program, FailedAllocation
def test_allocation_fail():
with pytest.raises(FailedAllocation):
Program([
Push(0),
Broadcast(0)
])
def test_allo... | 25.068966 | 96 | 0.594223 |
01e6b568e0ab94b19830e3169b3a401c448e25c0 | 185,340 | py | Python | tests/queryset/test_queryset.py | wsidl/mongoengine | f0fad6df19bee4917fb01fa98924baa6ffeb5031 | [
"MIT"
] | null | null | null | tests/queryset/test_queryset.py | wsidl/mongoengine | f0fad6df19bee4917fb01fa98924baa6ffeb5031 | [
"MIT"
] | null | null | null | tests/queryset/test_queryset.py | wsidl/mongoengine | f0fad6df19bee4917fb01fa98924baa6ffeb5031 | [
"MIT"
] | null | null | null | import datetime
import unittest
import uuid
from decimal import Decimal
from bson import DBRef, ObjectId
import pymongo
from pymongo.read_preferences import ReadPreference
from pymongo.results import UpdateResult
import pytest
from mongoengine import *
from mongoengine.connection import get_db
from mongoengine.contex... | 32.492987 | 113 | 0.585427 |
aa336de01aa5b38701b25997b6fdcb4506633e90 | 505 | py | Python | parsl/dataflow/states.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/dataflow/states.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/dataflow/states.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | from enum import IntEnum
class States(IntEnum):
"""Map states for tasks to an int."""
unsched = -1
pending = 0
runnable = 1
running = 2
done = 3
failed = 4
dep_fail = 5
retry = 6
launched = 7
# states from which we will never move to another state
FINAL_STATES = [States.done,... | 21.956522 | 64 | 0.681188 |
d89d01375883f369991d17ebaca25a380a870c65 | 3,389 | py | Python | kubernetes/test/test_policy_v1beta1_api.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_policy_v1beta1_api.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_policy_v1beta1_api.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.5.0-beta.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "Lice... | 23.534722 | 105 | 0.668339 |
629875487a9a2b3845b11ea1c2f3e0ad3d2d786c | 7,689 | py | Python | tensorflow/python/kernel_tests/bias_op_test.py | 285219011/hello-world | dfb71ea206eb9f61e5d97c9727caa1a6449e39cb | [
"Apache-2.0"
] | 6 | 2017-04-25T01:30:41.000Z | 2019-12-11T15:08:46.000Z | tensorflow/python/kernel_tests/bias_op_test.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/bias_op_test.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | 4 | 2017-04-14T07:31:18.000Z | 2021-08-30T11:06:24.000Z | # Copyright 2015 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... | 41.788043 | 80 | 0.647809 |
db4185f8664b616d2e0c1f29420b16a76b8dc539 | 8,578 | py | Python | utils/data_utilities.py | ladanuzhna/fbGAN-CS496 | 0cc48b124f130d1e4ac1ea74455e6e284a1371c7 | [
"MIT"
] | null | null | null | utils/data_utilities.py | ladanuzhna/fbGAN-CS496 | 0cc48b124f130d1e4ac1ea74455e6e284a1371c7 | [
"MIT"
] | null | null | null | utils/data_utilities.py | ladanuzhna/fbGAN-CS496 | 0cc48b124f130d1e4ac1ea74455e6e284a1371c7 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import keras
import matplotlib.pyplot as plt
from keras.preprocessing import text, sequence
from keras.preprocessing.text import Tokenizer
from keras.metrics import categorical_accuracy
from keras.utils import to_categorical
from sklearn.preprocessing import MultiLabelBinarizer
fr... | 39.16895 | 116 | 0.677197 |
753caf73aa7503e7fec3bebb2285d54d4d535bfd | 4,547 | py | Python | pythonProject1/layout-proj.py | Arghadeep2021/Codes | 367a6f8bde6aa68d58476b6fcc9a473c52ceaae3 | [
"MIT"
] | null | null | null | pythonProject1/layout-proj.py | Arghadeep2021/Codes | 367a6f8bde6aa68d58476b6fcc9a473c52ceaae3 | [
"MIT"
] | null | null | null | pythonProject1/layout-proj.py | Arghadeep2021/Codes | 367a6f8bde6aa68d58476b6fcc9a473c52ceaae3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'project.ui'
#
# Created by: PyQt5 UI code generator 5.15.3
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import Qt... | 40.598214 | 81 | 0.659336 |
65d004ae48a43590c85d4059e618858dde7d8ea1 | 297 | py | Python | ca_on_greater_sudbury/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 19 | 2015-05-26T03:18:50.000Z | 2022-01-31T03:27:41.000Z | ca_on_greater_sudbury/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 119 | 2015-01-09T06:09:35.000Z | 2022-01-20T23:05:05.000Z | ca_on_greater_sudbury/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 17 | 2015-11-23T05:00:10.000Z | 2021-09-15T16:03:33.000Z | from utils import CanadianJurisdiction
class GreaterSudbury(CanadianJurisdiction):
classification = 'legislature'
division_id = 'ocd-division/country:ca/csd:3553005'
division_name = 'Greater Sudbury'
name = 'Greater Sudbury City Council'
url = 'http://www.greatersudbury.ca'
| 29.7 | 55 | 0.747475 |
0b503453b51f433b164c95efd5f1d279c82dfe1d | 85,996 | py | Python | nova/network/neutronv2/api.py | mmnelemane/nova_stable_juno | e049553c7312480080091ad2481dcaf49113d571 | [
"Apache-2.0"
] | null | null | null | nova/network/neutronv2/api.py | mmnelemane/nova_stable_juno | e049553c7312480080091ad2481dcaf49113d571 | [
"Apache-2.0"
] | null | null | null | nova/network/neutronv2/api.py | mmnelemane/nova_stable_juno | e049553c7312480080091ad2481dcaf49113d571 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# All Rights Reserved
# Copyright (c) 2012 NEC 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/lic... | 47.172792 | 79 | 0.593062 |
895aa16cc4e9a9c9db7b2adc96ca4c8c77df91bb | 11,771 | py | Python | __init__.py | akarelin/home-assistant-remote | 92038c103c91895bd897a5bc3643b684fe174e63 | [
"Apache-2.0"
] | 1 | 2019-10-13T05:55:36.000Z | 2019-10-13T05:55:36.000Z | __init__.py | akarelin/home-assistant-remote | 92038c103c91895bd897a5bc3643b684fe174e63 | [
"Apache-2.0"
] | null | null | null | __init__.py | akarelin/home-assistant-remote | 92038c103c91895bd897a5bc3643b684fe174e63 | [
"Apache-2.0"
] | null | null | null | """
Connect two Home Assistant instances via the Websocket API.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/remote_homeassistant/
"""
import logging
import copy
import asyncio
import aiohttp
import voluptuous as vol
from homeassistant.core import ... | 35.669697 | 94 | 0.595616 |
4354b935388556ee5db76c2f2520a6085ad96359 | 5,619 | py | Python | intropyproject-classify-pet-images/classify_images.py | atkatchev/intropyproject-classify-pet-images | 4c8b9e5f10680298b65046d9bb14e8a4f76379e0 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/classify_images.py | atkatchev/intropyproject-classify-pet-images | 4c8b9e5f10680298b65046d9bb14e8a4f76379e0 | [
"MIT"
] | 5 | 2021-03-19T09:12:55.000Z | 2022-03-12T00:08:34.000Z | intropyproject-classify-pet-images/classify_images.py | atkatchev/intropyproject-classify-pet-images | 4c8b9e5f10680298b65046d9bb14e8a4f76379e0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/classify_images.py
#
# PROGRAMMER: Alex Tkatchev
# DATE CREATED: 9/4/19
# REVISED DATE: 9/4/19
# PURPOSE: Cre... | 55.633663 | 103 | 0.657412 |
faa774cd0537883dd504b8a7644e0b7d476ee0b5 | 386 | py | Python | peppercornenumerator/__init__.py | DNA-and-Natural-Algorithms-Group/peppercornenumerator | f166eef0dbf14eb34d3ad4baeacff2b80bea0c9d | [
"MIT"
] | 10 | 2019-02-07T11:28:51.000Z | 2022-02-25T13:50:18.000Z | peppercornenumerator/__init__.py | DNA-and-Natural-Algorithms-Group/peppercornenumerator | f166eef0dbf14eb34d3ad4baeacff2b80bea0c9d | [
"MIT"
] | 2 | 2020-03-26T03:32:36.000Z | 2021-01-08T12:34:47.000Z | peppercornenumerator/__init__.py | DNA-and-Natural-Algorithms-Group/peppercornenumerator | f166eef0dbf14eb34d3ad4baeacff2b80bea0c9d | [
"MIT"
] | 3 | 2017-08-21T03:32:52.000Z | 2022-03-23T22:12:36.000Z | #
# __init__.py
# EnumeratorProject
#
__version__ = "v1.1"
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
from .enumerator import (enumerate_pil,
enumerate_ssw,
Enumerator,
PolymerizationError)
from .utils imp... | 22.705882 | 61 | 0.650259 |
4e3a11be851eb959d82d4552d70c98b406a1d452 | 1,037 | py | Python | tests/integration/blueprints/common/style_guide/test_style_guide.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/blueprints/common/style_guide/test_style_guide.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/blueprints/common/style_guide/test_style_guide.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from tests.helpers import http_client
URL_PATH = '/style_guide/'
# `admin_app` fixture is required because it sets up the database.
def test_admin_style_guide_when_enabled(admin_app, make_admin_... | 25.292683 | 67 | 0.800386 |
99978347a66a4b03729f23e614271950b950210a | 7,843 | py | Python | ACDC/preprocess2.py | lars76/segmentation_activations | e0a52e3d5309dc9aec396ff16afc5b565fd25c2f | [
"MIT"
] | null | null | null | ACDC/preprocess2.py | lars76/segmentation_activations | e0a52e3d5309dc9aec396ff16afc5b565fd25c2f | [
"MIT"
] | null | null | null | ACDC/preprocess2.py | lars76/segmentation_activations | e0a52e3d5309dc9aec396ff16afc5b565fd25c2f | [
"MIT"
] | null | null | null | """
Credits: https://github.com/liut969/Automated-Cardiac-Segmentation-and-Diagnosis/blob/master/data_preprocess.py
changed __main__
"""
import nibabel as nib
import cv2
import numpy as np
import os
import re
import csv
from PIL import Image
class DataPreprocess(object):
def __init__(self, roi_x, roi_y, result_z):... | 53.353741 | 167 | 0.531302 |
1f5f269f7fb4c13ae00a217ef13152fa84e8b4cf | 31 | py | Python | test/__init__.py | MOJNICK/shadow | 7113c724741d2022451dc8f59d1d1a8a5905d5ee | [
"MIT"
] | null | null | null | test/__init__.py | MOJNICK/shadow | 7113c724741d2022451dc8f59d1d1a8a5905d5ee | [
"MIT"
] | null | null | null | test/__init__.py | MOJNICK/shadow | 7113c724741d2022451dc8f59d1d1a8a5905d5ee | [
"MIT"
] | null | null | null | from test import testClustering | 31 | 31 | 0.903226 |
0b1946e5885d3dcb0e13e98fa2ad579576d7a778 | 11,553 | py | Python | addons/io_scene_gltf2/blender/exp/gltf2_blender_get.py | gabdube/glTF-Blender-IO | 0f35b51ca30cee5cbecd87ee5b2986f4c9e5100e | [
"Apache-2.0"
] | null | null | null | addons/io_scene_gltf2/blender/exp/gltf2_blender_get.py | gabdube/glTF-Blender-IO | 0f35b51ca30cee5cbecd87ee5b2986f4c9e5100e | [
"Apache-2.0"
] | null | null | null | addons/io_scene_gltf2/blender/exp/gltf2_blender_get.py | gabdube/glTF-Blender-IO | 0f35b51ca30cee5cbecd87ee5b2986f4c9e5100e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 The glTF-Blender-IO 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 applicable law or ... | 38.128713 | 134 | 0.65048 |
d745c84942fabb638cd208f7ac2984b8256332f2 | 1,047 | py | Python | tests/unit/lms/models/h_user_test.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 38 | 2017-12-30T23:49:53.000Z | 2022-02-15T21:07:49.000Z | tests/unit/lms/models/h_user_test.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 1,733 | 2017-11-09T18:46:05.000Z | 2022-03-31T11:05:50.000Z | tests/unit/lms/models/h_user_test.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 10 | 2018-07-11T17:12:46.000Z | 2022-01-07T20:00:23.000Z | import pytest
from lms.models import HUser
from tests import factories
class TestHUser:
def test_userid(self):
h_user = factories.HUser(username="test_username")
assert h_user.userid("test_authority") == "acct:test_username@test_authority"
def test_from_lti_user(self, hashed_id):
lt... | 29.083333 | 85 | 0.679083 |
49eb26dd0526651464d073aca7e733e6e817989b | 3,006 | py | Python | spikeinterface/core/tests/test_numpy_extractors.py | marcbue/spikeinterface | d3462eeabcb9f0b9816004dd47355e40f4de1ac5 | [
"MIT"
] | null | null | null | spikeinterface/core/tests/test_numpy_extractors.py | marcbue/spikeinterface | d3462eeabcb9f0b9816004dd47355e40f4de1ac5 | [
"MIT"
] | null | null | null | spikeinterface/core/tests/test_numpy_extractors.py | marcbue/spikeinterface | d3462eeabcb9f0b9816004dd47355e40f4de1ac5 | [
"MIT"
] | null | null | null | import shutil
from pathlib import Path
import pytest
import numpy as np
from spikeinterface.core import NumpyRecording, NumpySorting, NumpyEvent
from spikeinterface.core.tests.testing_tools import create_sorting_npz
from spikeinterface.core import NpzSortingExtractor
cache_folder = Path('./my_cache_folder')
def _c... | 26.13913 | 109 | 0.664671 |
6e4efd3ea37a75817a5a54d32b59d2dc75cb22bf | 2,837 | py | Python | import_export_package.py | chkp-maxcalderon/ExportImportPolicyPackage | e3df3b7918ddbbfabf249a6e10f2278d0889cfd3 | [
"Apache-2.0"
] | null | null | null | import_export_package.py | chkp-maxcalderon/ExportImportPolicyPackage | e3df3b7918ddbbfabf249a6e10f2278d0889cfd3 | [
"Apache-2.0"
] | null | null | null | import_export_package.py | chkp-maxcalderon/ExportImportPolicyPackage | e3df3b7918ddbbfabf249a6e10f2278d0889cfd3 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import argparse
from cpapi import APIClient, APIClientArgs
from exporting.export_package import export_package
from importing.import_package import import_package
from utils import process_arguments, extract_sid_from_session_file, handle_login_fail
debug = None
log_fil... | 45.758065 | 113 | 0.633768 |
08660d2bb6360c4e3952a1d8765fac6ff5e7f984 | 16,843 | py | Python | functions_py3/read_complexes.py | marcottelab/super.complex | aa5f6463a66042fee254ed4fe2e46073304485aa | [
"MIT"
] | null | null | null | functions_py3/read_complexes.py | marcottelab/super.complex | aa5f6463a66042fee254ed4fe2e46073304485aa | [
"MIT"
] | null | null | null | functions_py3/read_complexes.py | marcottelab/super.complex | aa5f6463a66042fee254ed4fe2e46073304485aa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 10 16:25:40 2020
@author: Meg_94
"""
from math import pi
from matplotlib.pyplot import figure as plt_figure, savefig as plt_savefig, close as plt_close
from seaborn import distplot as sns_distplot
from jaccard_coeff import jaccard_coeff
from numpy import mean as np_mean, ... | 37.849438 | 146 | 0.650122 |
ec7d21dfa65a53601f87e960a8d5eac691e349cb | 736 | py | Python | ML/website-scraping-w-python-master/Chapter 6/scrapinghub/scrapinghub/sainsburys/sainsburys/settings.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | ML/website-scraping-w-python-master/Chapter 6/scrapinghub/scrapinghub/sainsburys/sainsburys/settings.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | ML/website-scraping-w-python-master/Chapter 6/scrapinghub/scrapinghub/sainsburys/sainsburys/settings.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
BOT_NAME = 'sainsburys'
SPIDER_MODULES = ['sainsburys.spiders']
NEWSPIDER_MODULE = 'sainsburys.spiders'
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' \
' (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36'
ROBOTSTXT_OBEY = True
LOG_LEVEL = 'INFO... | 22.30303 | 77 | 0.730978 |
8db072c61a946c56781e144d9ac0ab54ccba8514 | 5,713 | py | Python | main.py | jakebrehm/ezpz-decimator | 36ab2b29108e03fecc3eeee927a904037ecbb5d9 | [
"MIT"
] | null | null | null | main.py | jakebrehm/ezpz-decimator | 36ab2b29108e03fecc3eeee927a904037ecbb5d9 | [
"MIT"
] | null | null | null | main.py | jakebrehm/ezpz-decimator | 36ab2b29108e03fecc3eeee927a904037ecbb5d9 | [
"MIT"
] | null | null | null | import csv
import tkinter as tk
from tkinter import messagebox as msg
from tkinter import ttk
import lemons.gui as gui
class Main(gui.Application):
def __init__(self, *args, **kwargs):
# Initialize the application
gui.Application.__init__(self, *args, **kwargs)
self.configure(
title='EZPZ ... | 27.868293 | 70 | 0.658673 |
bc37e98a53fd206ea838533cec0613661d8dbebe | 18,458 | py | Python | pymilvus_orm/partition.py | XuanYang-cn/pymilvus-orm | 7d16e25bb0c654b21d654ed5f1779848d53f440b | [
"Apache-2.0"
] | 17 | 2021-06-03T08:54:27.000Z | 2021-08-05T01:36:27.000Z | pymilvus_orm/partition.py | XuanYang-cn/pymilvus-orm | 7d16e25bb0c654b21d654ed5f1779848d53f440b | [
"Apache-2.0"
] | 158 | 2021-04-25T08:49:29.000Z | 2021-08-31T13:17:33.000Z | pymilvus_orm/partition.py | XuanYang-cn/pymilvus-orm | 7d16e25bb0c654b21d654ed5f1779848d53f440b | [
"Apache-2.0"
] | 33 | 2021-04-23T08:10:00.000Z | 2021-08-17T01:42:32.000Z | # Copyright (C) 2019-2021 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 44.800971 | 116 | 0.592534 |
a33d95343149407ba3621a4abb677bbaed57b405 | 10,694 | py | Python | instapy/instapy.py | contentvia/viagram | 84226201af9ec7a21ab5a5193f8c3e3650639227 | [
"MIT"
] | null | null | null | instapy/instapy.py | contentvia/viagram | 84226201af9ec7a21ab5a5193f8c3e3650639227 | [
"MIT"
] | null | null | null | instapy/instapy.py | contentvia/viagram | 84226201af9ec7a21ab5a5193f8c3e3650639227 | [
"MIT"
] | null | null | null | """OS Modules environ method to get the setup vars from the Environment"""
from datetime import datetime
from os import environ
from random import randint
from time import sleep
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from seleniu... | 30.907514 | 91 | 0.624556 |
a5181217c0a387b036502aa03d094f218d0321c3 | 2,178 | py | Python | backend/src/api/v1/user.py | uesleicarvalhoo/ProjectStore | 9b7518eab6b0c21bf7b908cdd9a1b063485c5943 | [
"MIT"
] | 1 | 2021-10-10T13:26:44.000Z | 2021-10-10T13:26:44.000Z | backend/src/api/v1/user.py | uesleicarvalhoo/Store | 9b7518eab6b0c21bf7b908cdd9a1b063485c5943 | [
"MIT"
] | null | null | null | backend/src/api/v1/user.py | uesleicarvalhoo/Store | 9b7518eab6b0c21bf7b908cdd9a1b063485c5943 | [
"MIT"
] | null | null | null | from typing import List
from uuid import UUID
from fastapi import APIRouter
from fastapi.param_functions import Depends
from sqlmodel import Session
from starlette.status import HTTP_201_CREATED
from src.core.controller import user
from src.core.helpers.database import make_session
from src.core.models import Context... | 34.03125 | 115 | 0.759871 |
b835260b3c5373030f90b7acdf3a5db5ecc976d8 | 717 | py | Python | math/0x05-advanced_linear_algebra/5-main.py | kyeeh/holbertonschool-machine_learning | 8e4894c2b036ec7f4750de5bf99b95aee5b94449 | [
"MIT"
] | null | null | null | math/0x05-advanced_linear_algebra/5-main.py | kyeeh/holbertonschool-machine_learning | 8e4894c2b036ec7f4750de5bf99b95aee5b94449 | [
"MIT"
] | null | null | null | math/0x05-advanced_linear_algebra/5-main.py | kyeeh/holbertonschool-machine_learning | 8e4894c2b036ec7f4750de5bf99b95aee5b94449 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
definiteness = __import__('5-definiteness').definiteness
import numpy as np
mat1 = np.array([[5, 1], [1, 1]])
mat2 = np.array([[2, 4], [4, 8]])
mat3 = np.array([[-1, 1], [1, -1]])
mat4 = np.array([[-2, 4], [4, -9]])
mat5 = np.array([[1, 2],... | 26.555556 | 60 | 0.553696 |
35434739c15c70dbd23a7416a40eb5a4c14d0dff | 64,203 | py | Python | nova/virt/driver.py | mriedem/nova | 5e252d1c66c205d395b27e28cda0e6739876762c | [
"Apache-2.0"
] | null | null | null | nova/virt/driver.py | mriedem/nova | 5e252d1c66c205d395b27e28cda0e6739876762c | [
"Apache-2.0"
] | null | null | null | nova/virt/driver.py | mriedem/nova | 5e252d1c66c205d395b27e28cda0e6739876762c | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 39.340074 | 79 | 0.651309 |
1307c44d272526625f461c4b5cae19d417467bc5 | 1,315 | py | Python | savu/test/travis/plugin_tests/loader_tests/nx_xrd_loader_test.py | dtasev/Savu | acb2578c85472e76cb292c4242c1ed2f2332f3e3 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/test/travis/plugin_tests/loader_tests/nx_xrd_loader_test.py | dtasev/Savu | acb2578c85472e76cb292c4242c1ed2f2332f3e3 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/test/travis/plugin_tests/loader_tests/nx_xrd_loader_test.py | DTasev/Savu | acb2578c85472e76cb292c4242c1ed2f2332f3e3 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source 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 t... | 31.309524 | 76 | 0.747529 |
9cbcfb7e93cdc81dae9934c60cdc781ed773fb3b | 19,961 | py | Python | superset/db_engine_specs/hive.py | amitmiran137/incubator-superset | 8593a13f00754973117beb0a95e7aca7fec4b00e | [
"Apache-2.0"
] | 1 | 2021-02-01T00:18:23.000Z | 2021-02-01T00:18:23.000Z | superset/db_engine_specs/hive.py | amitmiran137/incubator-superset | 8593a13f00754973117beb0a95e7aca7fec4b00e | [
"Apache-2.0"
] | 4 | 2021-03-02T01:53:30.000Z | 2021-10-06T22:56:01.000Z | superset/db_engine_specs/hive.py | amitmiran137/incubator-superset | 8593a13f00754973117beb0a95e7aca7fec4b00e | [
"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... | 38.534749 | 140 | 0.600371 |
88beaddd8925319ee518a719042efe08c70864af | 13,679 | py | Python | examples/turbulence/turbulencekepspreprocessor.py | j-templeton/tbnn | 701d57e402f268da047435b0a842e18689f74e14 | [
"BSD-3-Clause"
] | 27 | 2017-09-05T20:36:46.000Z | 2021-11-25T09:08:59.000Z | examples/turbulence/turbulencekepspreprocessor.py | j-templeton/tbnn | 701d57e402f268da047435b0a842e18689f74e14 | [
"BSD-3-Clause"
] | 2 | 2017-12-24T09:39:11.000Z | 2020-08-08T10:26:01.000Z | examples/turbulence/turbulencekepspreprocessor.py | j-templeton/tbnn | 701d57e402f268da047435b0a842e18689f74e14 | [
"BSD-3-Clause"
] | 32 | 2017-12-24T07:22:24.000Z | 2021-12-06T20:49:33.000Z | import numpy as np
from tbnn import DataProcessor
"""
Copyright 2017 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000,
there is a non-exclusive license for use of this work by or on behalf of the U.S. Government.
This software is distributed under the BSD-3-Clause license.
"""
class TurbulenceKEpsD... | 48.679715 | 119 | 0.505373 |
bac50d369687cc9b706b8e4be40b65590f130e75 | 1,647 | py | Python | models/saucer/SmallSaucer.py | juanfdg/CES22_game | 3d5784e68582eeb85dc6fd9b29463a81ca7e566d | [
"MIT"
] | 2 | 2018-03-06T16:35:14.000Z | 2018-03-09T23:05:15.000Z | models/saucer/SmallSaucer.py | juanfdg/CES22_game | 3d5784e68582eeb85dc6fd9b29463a81ca7e566d | [
"MIT"
] | null | null | null | models/saucer/SmallSaucer.py | juanfdg/CES22_game | 3d5784e68582eeb85dc6fd9b29463a81ca7e566d | [
"MIT"
] | 1 | 2018-03-09T22:57:44.000Z | 2018-03-09T22:57:44.000Z | from math import atan, degrees, pi, sqrt
from random import randint
from models.saucer.Saucer import Saucer
from models.Bullet import Bullet
from assets.sfx.Sounds import Sounds
class SmallSaucer(Saucer):
MAX_SHOOTING_ANGLE = 10
ANGLE_RANGE = 10
def __init__(self, screen, round, player, x=None, y=None, ... | 31.075472 | 87 | 0.618094 |
6ef6d5ef65f2afb12975607bba1f162d8ae258b6 | 1,369 | py | Python | var/spack/repos/builtin/packages/partitionfinder/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-11-16T02:42:57.000Z | 2019-06-06T19:18:50.000Z | var/spack/repos/builtin/packages/partitionfinder/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | var/spack/repos/builtin/packages/partitionfinder/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-04-07T18:27:09.000Z | 2022-03-31T22:52:38.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Partitionfinder(Package):
"""PartitionFinder is free open source software to select best-f... | 40.264706 | 95 | 0.690285 |
e4f033d1c103549fcc6db455e1432f8b608e0e4b | 2,756 | py | Python | setup.py | dob9601/disnake | 20be6dc85f2442b756e93b2443e149dc90692adf | [
"MIT"
] | null | null | null | setup.py | dob9601/disnake | 20be6dc85f2442b756e93b2443e149dc90692adf | [
"MIT"
] | null | null | null | setup.py | dob9601/disnake | 20be6dc85f2442b756e93b2443e149dc90692adf | [
"MIT"
] | null | null | null | from setuptools import setup
import re
requirements = []
with open("requirements.txt") as f:
requirements = f.read().splitlines()
version = ""
with open("disnake/__init__.py") as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1) # type: ignore
if not version:... | 28.122449 | 115 | 0.58164 |
7617b65494ff75cec1355592809bdd8baae76801 | 67,795 | py | Python | reviewboard/webapi/tests/test_review_request.py | bcskda/reviewboard | 280069e31a306fae11aba1a616d52904c49c5299 | [
"MIT"
] | 1 | 2017-01-16T09:39:15.000Z | 2017-01-16T09:39:15.000Z | reviewboard/webapi/tests/test_review_request.py | bcskda/reviewboard | 280069e31a306fae11aba1a616d52904c49c5299 | [
"MIT"
] | null | null | null | reviewboard/webapi/tests/test_review_request.py | bcskda/reviewboard | 280069e31a306fae11aba1a616d52904c49c5299 | [
"MIT"
] | 1 | 2018-01-15T19:13:49.000Z | 2018-01-15T19:13:49.000Z | from __future__ import unicode_literals
from django.contrib import auth
from django.contrib.auth.models import User, Permission
from django.db.models import Q
from django.utils import six
from djblets.db.query import get_object_or_none
from djblets.testing.decorators import add_fixtures
from djblets.webapi.errors impo... | 40.644484 | 79 | 0.635888 |
d9ffb87861d16e4cce84adc6fbffd69c82e440bb | 2,781 | py | Python | rllib/algorithms/marwil/tests/test_bc.py | kennethlien/ray | 2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45 | [
"Apache-2.0"
] | null | null | null | rllib/algorithms/marwil/tests/test_bc.py | kennethlien/ray | 2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45 | [
"Apache-2.0"
] | null | null | null | rllib/algorithms/marwil/tests/test_bc.py | kennethlien/ray | 2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45 | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
import unittest
import ray
import ray.rllib.algorithms.marwil as marwil
from ray.rllib.utils.framework import try_import_tf
from ray.rllib.utils.test_utils import (
check_compute_single_action,
check_train_results,
framework_iterator,
)
tf1, tf, tfv = try_import_tf()
c... | 32.717647 | 88 | 0.607695 |
40a576d8361c4f9a80a55d31cf79dd4a9ed7d15d | 19,936 | py | Python | antlir/tests/test_package_image.py | vmagro/antlir | f42653d9e80e66c375aa828045be84e4ce9e597c | [
"MIT"
] | null | null | null | antlir/tests/test_package_image.py | vmagro/antlir | f42653d9e80e66c375aa828045be84e4ce9e597c | [
"MIT"
] | null | null | null | antlir/tests/test_package_image.py | vmagro/antlir | f42653d9e80e66c375aa828045be84e4ce9e597c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# 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 os
import pwd
import stat
import subprocess
import tempfile
from contextlib import contextmanager
from typing im... | 35.920721 | 110 | 0.527337 |
08cd177560017eafcf519002dffcb14900667c34 | 47,654 | py | Python | skimage/color/colorconv.py | siraferradans/scikit-image-temp | db3b97aec1824d8f49116b8918ff95639af441d4 | [
"BSD-3-Clause"
] | 2 | 2021-02-24T02:13:03.000Z | 2021-05-06T13:43:35.000Z | skimage/color/colorconv.py | siraferradans/scikit-image-temp | db3b97aec1824d8f49116b8918ff95639af441d4 | [
"BSD-3-Clause"
] | null | null | null | skimage/color/colorconv.py | siraferradans/scikit-image-temp | db3b97aec1824d8f49116b8918ff95639af441d4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Functions for converting between color spaces.
The "central" color space in this module is RGB, more specifically the linear
sRGB color space using D65 as a white-point [1]_. This represents a
standard monitor (w/o gamma correction). For a good FAQ on color spaces see... | 28.247777 | 81 | 0.557309 |
fb998e740995a60a125a95fcbe814e136d0710eb | 13,672 | py | Python | python/ray/serve/http_proxy.py | newmanwang/ray | 16c73c682d1f7429ca6e1a3e5c9b06098253ba50 | [
"Apache-2.0"
] | 1 | 2021-12-15T22:05:59.000Z | 2021-12-15T22:05:59.000Z | python/ray/serve/http_proxy.py | newmanwang/ray | 16c73c682d1f7429ca6e1a3e5c9b06098253ba50 | [
"Apache-2.0"
] | 107 | 2021-01-13T20:05:03.000Z | 2022-03-29T00:24:17.000Z | python/ray/serve/http_proxy.py | newmanwang/ray | 16c73c682d1f7429ca6e1a3e5c9b06098253ba50 | [
"Apache-2.0"
] | null | null | null | import asyncio
import socket
import time
import pickle
from typing import Callable, List, Dict, Optional, Tuple
import uvicorn
import starlette.responses
import starlette.routing
import ray
from ray import serve
from ray.exceptions import RayActorError, RayTaskError
from ray.serve.common import EndpointInfo, Endpoint... | 39.976608 | 85 | 0.618051 |
b0dbfd1ed87d39bb2f75db5297c972fab1bc9de2 | 2,416 | py | Python | interview/traxn/chef_ingredients.py | rjsnh1522/geeks-4-geeks-python | 9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4 | [
"MIT"
] | null | null | null | interview/traxn/chef_ingredients.py | rjsnh1522/geeks-4-geeks-python | 9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4 | [
"MIT"
] | 5 | 2021-03-10T11:49:39.000Z | 2022-02-27T01:35:59.000Z | interview/traxn/chef_ingredients.py | rjsnh1522/geeks-4-geeks-python | 9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4 | [
"MIT"
] | null | null | null | # number_of_days = int(input())
ingredients_cat = {
'fat': [],
'fiber': [],
'carb': []
}
# number_of_days = int(input())
arra = ["CARBBeetroot", "FIBERCarrot", "FATOlive", "CARBCorn",
"CARBPotato", "FIBERBroccoli", "FATEgg", "FIBERBeans", "FATCheese",
"CARBRice", "FIBERSpinach", "FATOil"]
#... | 31.376623 | 123 | 0.501242 |
6f278be7f353ace297cee3c1b812d9400820bedf | 22,483 | py | Python | main.py | mazy7c8/MEDpress | d998aca7cff525c421bd198d4a484630c6bc1bf9 | [
"MIT"
] | null | null | null | main.py | mazy7c8/MEDpress | d998aca7cff525c421bd198d4a484630c6bc1bf9 | [
"MIT"
] | null | null | null | main.py | mazy7c8/MEDpress | d998aca7cff525c421bd198d4a484630c6bc1bf9 | [
"MIT"
] | null | null | null | from subprocess import CalledProcessError
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.font as tf
from tkinter import Canvas, Event, Frame, INSERT, END, PhotoImage, filedialog
from jinja2.loaders import BaseLoader
from createtmp import template_window
from item import ListItem, readFolder, readTemplat... | 32.443001 | 130 | 0.551394 |
4a1c6a7365fa145bbf8863a74d9b5c3dab5e75bc | 58,766 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_node.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_node.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_node.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2021 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | 34.875964 | 153 | 0.283497 |
cf1a4dd247989b28d8f179f6e3bc3c48bd4e945d | 33,926 | py | Python | yt/visualization/tests/test_callbacks.py | gnwong/yt | 3b8a36cb0271956adbd6d5bb7e503ae14412a2fa | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/tests/test_callbacks.py | gnwong/yt | 3b8a36cb0271956adbd6d5bb7e503ae14412a2fa | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/tests/test_callbacks.py | gnwong/yt | 3b8a36cb0271956adbd6d5bb7e503ae14412a2fa | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-21T07:01:51.000Z | 2021-04-21T07:01:51.000Z | import contextlib
import shutil
import tempfile
from numpy.testing import assert_array_equal, assert_raises
import yt.units as u
from yt.config import ytcfg
from yt.loaders import load
from yt.testing import (
assert_fname,
fake_amr_ds,
fake_hexahedral_ds,
fake_random_ds,
fake_tetrahedral_ds,
... | 36.284492 | 87 | 0.566792 |
e9e44fefb8e425c11ea8cefee002719bd63560a3 | 464 | py | Python | 448. Find All Numbers Disappeared in an Array/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | 2 | 2019-10-05T09:48:20.000Z | 2019-10-05T15:40:01.000Z | 448. Find All Numbers Disappeared in an Array/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | null | null | null | 448. Find All Numbers Disappeared in an Array/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | null | null | null | class Solution:
def findDisappearedNumbers(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
for i in range(len(nums)):
if nums[i]!='#':
j=nums[i]-1
while nums[j]!='#':
n=nums[j]-1
... | 24.421053 | 62 | 0.349138 |
b1b9dec2df519aff2a13c452be213a583a07f747 | 3,160 | py | Python | Recursion/sudukosolver.py | EricCharnesky/CIS2001-Winter2022 | 9c74433ade96e4c7bf9029543285f1ded1fe91e5 | [
"MIT"
] | 3 | 2022-01-20T21:55:17.000Z | 2022-02-02T23:10:45.000Z | Recursion/sudukosolver.py | EricCharnesky/CIS2001-Winter2022 | 9c74433ade96e4c7bf9029543285f1ded1fe91e5 | [
"MIT"
] | null | null | null | Recursion/sudukosolver.py | EricCharnesky/CIS2001-Winter2022 | 9c74433ade96e4c7bf9029543285f1ded1fe91e5 | [
"MIT"
] | 2 | 2022-02-06T02:59:32.000Z | 2022-02-23T02:34:13.000Z | class SudokoSolver:
def __init__(self, board):
self.board = board
self.row_index = 0
self.column_index = 0
def __str__(self):
# result = ""
# for row in self.board:
# result += str(row) + "\n"
# return result
return "\n".join(str(row) for row... | 34.725275 | 82 | 0.480696 |
332616b17e19d4a4c36efbaef698b25cd0b505b7 | 2,524 | py | Python | tools/nntool/quantization/quantizers/split_mixin.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 118 | 2018-05-22T08:45:59.000Z | 2022-03-30T07:00:45.000Z | tools/nntool/quantization/quantizers/split_mixin.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 213 | 2018-07-25T02:37:32.000Z | 2022-03-30T18:04:01.000Z | tools/nntool/quantization/quantizers/split_mixin.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 76 | 2018-07-04T08:19:27.000Z | 2022-03-24T09:58:05.000Z | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | 42.779661 | 92 | 0.690967 |
f80a088f8a506d846b65091b31fc9bee40162607 | 1,858 | py | Python | python/simple-cipher/simple_cipher.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | python/simple-cipher/simple_cipher.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | python/simple-cipher/simple_cipher.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | # I completely don't understand what they are talking about. What am I supposed to implement. I am confused. What is key???
# <http://pi.math.cornell.edu/~mec/2003-2004/cryptography/polyalpha/polyalpha.html>
# has the best explanation of this cipher
import string
import secrets
class Cipher:
letters = string.asci... | 35.056604 | 123 | 0.56028 |
141ce9060f354d79d5d093edb89bd6f0638bbe2b | 631 | py | Python | manage.py | velxundussa/Storyteller | e3c4cc211959bc48efced0c99a1a32e6d003a16d | [
"MIT"
] | 3 | 2017-02-27T05:41:39.000Z | 2017-02-28T01:25:30.000Z | manage.py | velxundussa/Storyteller | e3c4cc211959bc48efced0c99a1a32e6d003a16d | [
"MIT"
] | 4 | 2021-06-04T22:43:46.000Z | 2022-02-10T10:51:24.000Z | manage.py | velxundussa/Storyteller | e3c4cc211959bc48efced0c99a1a32e6d003a16d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'storyteller.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | 28.681818 | 75 | 0.684628 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.