hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
7421884814b3b919809b74cd2c2fe44096e0ac3c
2,354
py
Python
Main Task_MSI-H classification/config.py
ChangHeeHAN/PAIP2020
e42731ed2824f9f4a2e4a30f029dfea0f9efd25c
[ "MIT" ]
1
2021-11-08T03:36:50.000Z
2021-11-08T03:36:50.000Z
Main Task_MSI-H classification/config.py
chhan95/PAIP2020
e42731ed2824f9f4a2e4a30f029dfea0f9efd25c
[ "MIT" ]
1
2021-01-26T18:37:11.000Z
2021-01-27T07:35:11.000Z
Main Task_MSI-H classification/config.py
chhan95/PAIP2020
e42731ed2824f9f4a2e4a30f029dfea0f9efd25c
[ "MIT" ]
null
null
null
import imgaug # https://github.com/aleju/imgaug from imgaug import augmenters as iaa #### class Config(object): def __init__(self): self.seed = 5 self.init_lr = 1.0e-4 self.lr_steps = 30 # decrease at every n-th epoch self.train_batch_size = 12 self.infer_batch_size = 30 ...
31.810811
91
0.540782
7421b86f508d872da98e4610b04fedfffab12850
577
py
Python
tests/sample_django_app/resources.py
PyUnchained/kdr_server
7485d6a549b0458438c5c9aa882de87084c43c76
[ "MIT" ]
null
null
null
tests/sample_django_app/resources.py
PyUnchained/kdr_server
7485d6a549b0458438c5c9aa882de87084c43c76
[ "MIT" ]
null
null
null
tests/sample_django_app/resources.py
PyUnchained/kdr_server
7485d6a549b0458438c5c9aa882de87084c43c76
[ "MIT" ]
null
null
null
from tastypie.resources import ModelResource from kivy_django_restful.resources import KDRResourceMixin from .models import TestModel class TestModelResource(KDRResourceMixin, ModelResource): api_name = "test_api" class Meta(): queryset = TestModel.objects.all() resource_name = 'test_model' ...
32.055556
58
0.672444
7421bca55982e9bbf2c234f1448da62e460e1ff2
3,239
py
Python
train.py
paul-chelarescu/poker-agent-kit
6ecb6baafde234ae3925cff91ed619fc54dfd4ab
[ "MIT" ]
null
null
null
train.py
paul-chelarescu/poker-agent-kit
6ecb6baafde234ae3925cff91ed619fc54dfd4ab
[ "MIT" ]
null
null
null
train.py
paul-chelarescu/poker-agent-kit
6ecb6baafde234ae3925cff91ed619fc54dfd4ab
[ "MIT" ]
null
null
null
import sys import acpc_python_client as acpc try: from tqdm import tqdm except ImportError: print('!!! Install tqdm library for better progress information !!!\n') from cfr.cfr import Cfr from cfr.game_tree import HoleCardsNode, ActionNode, BoardCardsNode """Trains strategy for poker agent using CFR algorit...
32.717172
108
0.681074
7421be86bd6ceeccd5902b122e1dc6c25647b4f0
1,650
py
Python
tests/testutils/repo/bzr.py
doraskayo/buildstream
1c72d4342ae7df360808de22c5e49f55dbb6bec6
[ "Apache-2.0" ]
null
null
null
tests/testutils/repo/bzr.py
doraskayo/buildstream
1c72d4342ae7df360808de22c5e49f55dbb6bec6
[ "Apache-2.0" ]
null
null
null
tests/testutils/repo/bzr.py
doraskayo/buildstream
1c72d4342ae7df360808de22c5e49f55dbb6bec6
[ "Apache-2.0" ]
null
null
null
import os import subprocess import pytest from buildstream.testing import Repo from buildstream.testing._utils.site import BZR, BZR_ENV, HAVE_BZR class Bzr(Repo): def __init__(self, directory, subdir="repo"): if not HAVE_BZR: pytest.skip("bzr is not available") super().__init__(direct...
34.375
107
0.627273
7421d250cd2e5861cfa11956d2513689fc712c0b
4,080
py
Python
dipper/sources/Reactome.py
sgml/dipper
cff0d01299e982183a5345b8a7eb00094ed05257
[ "BSD-3-Clause" ]
null
null
null
dipper/sources/Reactome.py
sgml/dipper
cff0d01299e982183a5345b8a7eb00094ed05257
[ "BSD-3-Clause" ]
null
null
null
dipper/sources/Reactome.py
sgml/dipper
cff0d01299e982183a5345b8a7eb00094ed05257
[ "BSD-3-Clause" ]
null
null
null
import logging import csv from dipper.sources.Source import Source from dipper.models.assoc.Association import Assoc from dipper.models.Pathway import Pathway LOG = logging.getLogger(__name__) class Reactome(Source): """ Reactome is a free, open-source, curated and peer reviewed pathway database. (http:...
34.285714
85
0.610784
7421e8cd4e675ba5607acc8b183a2277221f8ef1
46,596
py
Python
src/olympia/devhub/tests/test_tasks.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
1
2021-11-27T15:47:47.000Z
2021-11-27T15:47:47.000Z
src/olympia/devhub/tests/test_tasks.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
1,398
2020-10-08T06:32:26.000Z
2022-03-31T12:06:24.000Z
src/olympia/devhub/tests/test_tasks.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
1
2021-11-24T07:29:55.000Z
2021-11-24T07:29:55.000Z
# -*- coding: utf-8 -*- import json import os import shutil import tempfile from contextlib import contextmanager from datetime import datetime, timedelta from decimal import Decimal from django.conf import settings from django.core import mail from django.core.files.storage import default_storage as storage from un...
41.162544
79
0.66201
74223636f762b6785dad93750b9bc87680006422
4,871
py
Python
Data-Pipeline/aspipeline/eigenvector.py
steamclock/internetmap
13bf01e8e1fde8db64ce8fd417a1c907783100ee
[ "MIT" ]
22
2017-07-11T20:31:16.000Z
2021-04-04T16:00:10.000Z
Data-Pipeline/aspipeline/eigenvector.py
steamclock/internetmap
13bf01e8e1fde8db64ce8fd417a1c907783100ee
[ "MIT" ]
197
2017-07-06T16:53:59.000Z
2019-05-31T17:57:51.000Z
Data-Pipeline/aspipeline/eigenvector.py
steamclock/internetmap
13bf01e8e1fde8db64ce8fd417a1c907783100ee
[ "MIT" ]
10
2017-12-08T21:58:58.000Z
2021-03-20T07:16:47.000Z
""" Eigenvector centrality. """ # Copyright (C) 2004-2010 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. __author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)', 'Pieter Swart (sw...
29.167665
79
0.617122
7422379f25032ae169d7535e8aa9538cf4658831
14,299
py
Python
salt/utils/aws.py
jbq/pkg-salt
b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3
[ "Apache-2.0" ]
1
2020-09-16T21:31:02.000Z
2020-09-16T21:31:02.000Z
salt/utils/aws.py
jbq/pkg-salt
b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3
[ "Apache-2.0" ]
null
null
null
salt/utils/aws.py
jbq/pkg-salt
b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Connection library for AWS .. versionadded:: 2015.5.0 This is a base library used by a number of AWS services. :depends: requests ''' from __future__ import absolute_import # Import Python libs import sys import time import binascii import datetime import hashlib import hmac import loggi...
32.132584
106
0.61277
74228e9395bc453856b712054058520ab24d5574
418
py
Python
examples/greetingInGreek.py
klahnakoski/mo-parsing
885bf3fd61430d5fa15164168b975b18988fcf9e
[ "MIT" ]
1
2021-10-30T21:18:29.000Z
2021-10-30T21:18:29.000Z
examples/greetingInGreek.py
klahnakoski/mo-parsing
885bf3fd61430d5fa15164168b975b18988fcf9e
[ "MIT" ]
22
2020-04-15T14:49:30.000Z
2021-12-22T02:49:52.000Z
examples/greetingInGreek.py
klahnakoski/mo-parsing
885bf3fd61430d5fa15164168b975b18988fcf9e
[ "MIT" ]
null
null
null
# # greetingInGreek.py # # Demonstration of the parsing module, on the prototypical "Hello, World!" example # # Copyright 2004-2016, by Paul McGuire # from mo_parsing.helpers import * from mo_parsing.utils import parsing_unicode # define grammar alphas = parsing_unicode.Greek.alphas greet = Word(alphas) + ...
20.9
83
0.703349
7422c615da06220de7b00a50361560b80c20298d
53,886
py
Python
gradio/inputs.py
hank-ai/gradio
00af5ec1abbaa3160ec45f58a22909f6453f7182
[ "Apache-2.0" ]
null
null
null
gradio/inputs.py
hank-ai/gradio
00af5ec1abbaa3160ec45f58a22909f6453f7182
[ "Apache-2.0" ]
null
null
null
gradio/inputs.py
hank-ai/gradio
00af5ec1abbaa3160ec45f58a22909f6453f7182
[ "Apache-2.0" ]
1
2021-04-30T04:31:13.000Z
2021-04-30T04:31:13.000Z
""" This module defines various classes that can serve as the `input` to an interface. Each class must inherit from `InputComponent`, and each class must define a path to its template. All of the subclasses of `InputComponent` are automatically added to a registry, which allows them to be easily referenced in other par...
45.320437
8,130
0.608674
7422e24a161fdb0b2706700dcb047dbe71ba81d0
3,598
py
Python
aops-manager/aops_manager/deploy_manager/ansible_runner/vault_handler.py
seandong37tt4qu/jeszhengq
32b3737ab45e89e8c5b71cdce871cefd2c938fa8
[ "MulanPSL-1.0" ]
null
null
null
aops-manager/aops_manager/deploy_manager/ansible_runner/vault_handler.py
seandong37tt4qu/jeszhengq
32b3737ab45e89e8c5b71cdce871cefd2c938fa8
[ "MulanPSL-1.0" ]
null
null
null
aops-manager/aops_manager/deploy_manager/ansible_runner/vault_handler.py
seandong37tt4qu/jeszhengq
32b3737ab45e89e8c5b71cdce871cefd2c938fa8
[ "MulanPSL-1.0" ]
null
null
null
# coding: utf-8 # !/usr/bin/python3 # Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved. # licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a copy of Mulan PSL v2 at: # http://license.coscl.org.cn/MulanP...
33.626168
98
0.602001
742309c6288f0bd38dcd2f4977ff33a055457da1
1,866
py
Python
app/resources/v1/healthchecks.py
smartlab-br/datahub-api
193e71172bb4891a5bbffc902da07ef57df9ab07
[ "MIT" ]
1
2019-07-25T21:15:05.000Z
2019-07-25T21:15:05.000Z
app/resources/v1/healthchecks.py
smartlab-br/datahub-api
193e71172bb4891a5bbffc902da07ef57df9ab07
[ "MIT" ]
44
2019-08-05T15:24:00.000Z
2022-01-31T23:11:31.000Z
app/resources/v1/healthchecks.py
smartlab-br/datahub-api
193e71172bb4891a5bbffc902da07ef57df9ab07
[ "MIT" ]
1
2021-05-11T07:49:51.000Z
2021-05-11T07:49:51.000Z
""" Classes de health check """ from flask_restful import Resource import requests from flask import current_app from kafka import KafkaProducer from datasources import get_impala_connection, get_redis_pool class HCAlive(Resource): """ Liveness probe class """ @classmethod def get(cls): """ Livene...
28.707692
99
0.551983
74231d47a0280ea598564d07e1bcd1e9c54fd9a0
3,819
py
Python
bsp_tool/__init__.py
snake-biscuits/bsp_tool
f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773
[ "MIT" ]
44
2018-07-06T04:44:02.000Z
2022-03-27T02:18:37.000Z
bsp_tool/__init__.py
snake-biscuits/bsp_tool
f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773
[ "MIT" ]
18
2018-07-25T23:19:17.000Z
2022-03-16T23:59:36.000Z
bsp_tool/__init__.py
snake-biscuits/bsp_tool
f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773
[ "MIT" ]
12
2019-09-13T21:52:51.000Z
2022-03-22T18:04:21.000Z
"""A library for .bsp file analysis & modification""" __all__ = ["base", "branches", "load_bsp", "lumps", "tools", "ArkaneBsp", "GoldSrcBsp", "IdTechBsp", "InfinityWardBsp", "QuakeBsp", "RavenBsp", "RespawnBsp", "RitualBsp", "ValveBsp"] import os from types import ModuleType from . import base ...
46.012048
101
0.646504
74232f3ca79905825c399e3888c6c19f97fab93c
10,178
py
Python
nilearn/plotting/cm.py
fabianp/nilearn
367516822f538965368b936704a5346199331457
[ "BSD-2-Clause" ]
null
null
null
nilearn/plotting/cm.py
fabianp/nilearn
367516822f538965368b936704a5346199331457
[ "BSD-2-Clause" ]
null
null
null
nilearn/plotting/cm.py
fabianp/nilearn
367516822f538965368b936704a5346199331457
[ "BSD-2-Clause" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Matplotlib colormaps useful for neuroimaging. """ import numpy as _np from .._utils.testing import skip_if_running_nose try: from matplotlib import cm as _cm from matplotlib import colors as _...
37.282051
86
0.513559
74234384e109c319512c01e9a432b4c94fb40d37
401
py
Python
FinalProject/wsgi.py
Irshak10/FinalProject
dee85ee55cec0f9d75b22ae13b94aa4f8f591908
[ "MIT" ]
null
null
null
FinalProject/wsgi.py
Irshak10/FinalProject
dee85ee55cec0f9d75b22ae13b94aa4f8f591908
[ "MIT" ]
null
null
null
FinalProject/wsgi.py
Irshak10/FinalProject
dee85ee55cec0f9d75b22ae13b94aa4f8f591908
[ "MIT" ]
null
null
null
""" WSGI config for FinalProject 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.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
74236da979043b89ac8b839a838d8e68d9ed9a10
1,218
py
Python
Keras_tensorflow/source/tensorflow/contrib/learn/python/learn/utils/__init__.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
65
2016-09-26T01:30:40.000Z
2021-08-11T17:00:41.000Z
Keras_tensorflow/source/tensorflow/contrib/learn/python/learn/utils/__init__.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
5
2017-02-21T08:37:52.000Z
2017-03-29T05:46:05.000Z
Keras_tensorflow/source/tensorflow/contrib/learn/python/learn/utils/__init__.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
11
2017-09-10T16:22:21.000Z
2021-08-09T09:24:50.000Z
# Copyright 2016 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...
45.111111
101
0.762726
7423f43cae9b2fd00a10a85f1a88ed645e525802
8,362
py
Python
scripts/prepare_doc_publication.py
EmperorYP7/iree
fffa1f3e33bc1031c790583166ce82c91dd8b3e7
[ "Apache-2.0" ]
null
null
null
scripts/prepare_doc_publication.py
EmperorYP7/iree
fffa1f3e33bc1031c790583166ce82c91dd8b3e7
[ "Apache-2.0" ]
null
null
null
scripts/prepare_doc_publication.py
EmperorYP7/iree
fffa1f3e33bc1031c790583166ce82c91dd8b3e7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
37.164444
80
0.708802
74241b34d8925c4384bf58368e5587c238952558
4,155
py
Python
acoustic/WAVE.py
sailist/ASRFrame
2fd022c3c00af1d5178dee4b367b2269241bc73c
[ "Apache-2.0" ]
223
2019-07-13T06:31:18.000Z
2022-03-11T08:23:01.000Z
acoustic/WAVE.py
mayite/ASRFrame
484cf1ee5beec4c39439de683c5b4c1f1ea3a94a
[ "Apache-2.0" ]
7
2019-12-27T08:48:42.000Z
2021-09-01T09:45:13.000Z
acoustic/WAVE.py
mayite/ASRFrame
484cf1ee5beec4c39439de683c5b4c1f1ea3a94a
[ "Apache-2.0" ]
71
2019-07-14T13:14:13.000Z
2022-03-18T06:58:54.000Z
# wavenet 用于语音识别的keras实现,参考https://github.com/Deeperjia/tensorflow-wavenet/ from util.reader import VoiceLoader,VoiceDatasetList from util.mapmap import PinyinMapper from feature.mel_feature import MelFeature5 import os from core.base_model import AcousticModel from core.ctc_function import CTC_Batch_Cost from keras.l...
41.55
113
0.630325
74242f9c066844f7c22ff401c633fb28c9c409b3
2,092
py
Python
setup.py
Silvrash/firestorm
f87ef82c7a9b3c346047f8eff8989652794c2442
[ "Apache-2.0" ]
5
2020-01-18T11:44:27.000Z
2021-07-15T18:54:34.000Z
setup.py
Silvrash/firestorm
f87ef82c7a9b3c346047f8eff8989652794c2442
[ "Apache-2.0" ]
null
null
null
setup.py
Silvrash/firestorm
f87ef82c7a9b3c346047f8eff8989652794c2442
[ "Apache-2.0" ]
2
2019-11-07T10:02:13.000Z
2020-03-05T04:31:35.000Z
from distutils.core import setup version = '0.0.2' # read the contents of your README file from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md')) as f: long_description = f.read() setup( name='firestore_orm', # How you named your package ...
51.02439
119
0.678776
74244d6b723221f207c15ecd7bd3099a0bf998a6
1,830
py
Python
heartFEM/lcleeHeart/vtk_py/addSystolicStrains.py
WeiXuanChan/heartFEM
7f26c71434919c3141fac600f08685e5383e7137
[ "MIT" ]
3
2021-04-13T07:05:20.000Z
2021-10-02T13:41:09.000Z
heartFEM/lcleeHeart/vtk_py/addSystolicStrains.py
WeiXuanChan/heartFEM
7f26c71434919c3141fac600f08685e5383e7137
[ "MIT" ]
null
null
null
heartFEM/lcleeHeart/vtk_py/addSystolicStrains.py
WeiXuanChan/heartFEM
7f26c71434919c3141fac600f08685e5383e7137
[ "MIT" ]
2
2021-09-06T13:13:41.000Z
2022-03-11T18:59:02.000Z
######################################################################## import numpy import vtk from heartFEM.lcleeHeart.vtk_py.mat_vec_tools import * from heartFEM.lcleeHeart.vtk_py.createFloatArray import * ######################################################################## def addSystolicStrains(mesh, v...
35.882353
80
0.618033
74245ab56716ae23bbf9b96d7a56f29ec7cee63d
7,141
py
Python
services/tests/factories.py
theirc/IRC-Services-Legacy
818ffd13fecb8a7f1c29c341d427d0a339809f8b
[ "BSD-3-Clause" ]
2
2020-10-05T14:43:24.000Z
2020-10-14T12:46:56.000Z
services/tests/factories.py
pg-irc/IRC-Services-Legacy
818ffd13fecb8a7f1c29c341d427d0a339809f8b
[ "BSD-3-Clause" ]
3
2019-02-26T18:21:01.000Z
2020-06-18T14:56:16.000Z
services/tests/factories.py
pg-irc/IRC-Services-Legacy
818ffd13fecb8a7f1c29c341d427d0a339809f8b
[ "BSD-3-Clause" ]
null
null
null
import random import string import factory import factory.fuzzy from django.contrib.gis.geos import fromstr from slugify import slugify from api.utils import generate_translated_fields from cms.models import Page\ # , Section from email_user.tests.factories import EmailUserFactory from regions.models import Geogr...
32.459091
95
0.735191
7424630a9a1a3c22285f81968f109ef7ca80b261
4,522
py
Python
Examples/Event Analysis/Half-Yearly End/Half_Year_End_Analysis.py
grahesh/Stock-Market-Event-Analysis
57dc06e087c29b9c134df8886c97377b3d99f05b
[ "BSD-3-Clause" ]
1
2015-12-04T14:40:33.000Z
2015-12-04T14:40:33.000Z
Examples/Event Analysis/Half-Yearly End/Half_Year_End_Analysis.py
grahesh/Stock-Market-Event-Analysis
57dc06e087c29b9c134df8886c97377b3d99f05b
[ "BSD-3-Clause" ]
null
null
null
Examples/Event Analysis/Half-Yearly End/Half_Year_End_Analysis.py
grahesh/Stock-Market-Event-Analysis
57dc06e087c29b9c134df8886c97377b3d99f05b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jan 03 10:16:39 2013 @author: Grahesh """ import pandas from qstkutil import DataAccess as da import numpy as np import math import copy import qstkutil.qsdateutil as du import datetime as dt import qstkutil.DataAccess as da import qstkutil.tsutil as tsu imp...
33.496296
207
0.585139
7424927ff73a8b4acd70a5e39c8ee11598fab63b
1,012
py
Python
solutions/challenge_one.py
lrakai/python-newcomer-problems
aceea48a52b04231ef25ffba646e2d1381f72870
[ "MIT" ]
1
2022-02-11T05:58:01.000Z
2022-02-11T05:58:01.000Z
solutions/challenge_one.py
lrakai/python-newcomer-problems
aceea48a52b04231ef25ffba646e2d1381f72870
[ "MIT" ]
null
null
null
solutions/challenge_one.py
lrakai/python-newcomer-problems
aceea48a52b04231ef25ffba646e2d1381f72870
[ "MIT" ]
null
null
null
def string_fun(string): ''' Return a tuple with three elements. The first element is True if the string contains only alphabet characters, otherwise False. The second element is True if the string ends with an exclamation mark ('!'), otherwise False. The third element is the string with all spaces (...
36.142857
98
0.62747
7424b7678634884f1637a9c0b40af961341806c3
227
py
Python
api/admin.py
Ponsen/spleeter-web
ad0394c2ba97859864903693773008ab2bc82168
[ "MIT" ]
4
2020-10-07T19:25:41.000Z
2021-08-13T10:23:29.000Z
api/admin.py
Ponsen/spleeter-web
ad0394c2ba97859864903693773008ab2bc82168
[ "MIT" ]
null
null
null
api/admin.py
Ponsen/spleeter-web
ad0394c2ba97859864903693773008ab2bc82168
[ "MIT" ]
1
2020-06-22T16:21:51.000Z
2020-06-22T16:21:51.000Z
from django.contrib import admin from .models import * # Register your models here. admin.site.register(SourceFile) admin.site.register(SourceTrack) admin.site.register(ProcessedTrack) admin.site.register(YTAudioDownloadTask)
25.222222
40
0.828194
7424cf9c9d4bd28535984dd09f696243ae1339f3
794
py
Python
va_explorer/va_logs/logging_utils.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
null
null
null
va_explorer/va_logs/logging_utils.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
125
2020-10-07T12:00:15.000Z
2022-03-31T21:29:21.000Z
va_explorer/va_logs/logging_utils.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
2
2020-10-29T16:08:42.000Z
2020-12-08T19:03:41.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 6 14:01:55 2021 @author: babraham """ import logging from config.settings.base import LOGGING, LOG_DIR def write_va_log(logger, msg, request=None, logtype="info", session_key=None): log_fns = {"info": logger.info,"debug": logger.debug} if ...
31.76
102
0.653652
7425377f5c8c8d94c1bbdd412c3f14489ba246be
2,336
py
Python
src/zsl_jwt/auth/controller.py
AtteqCom/zsl_jwt
e1a81b756805b8d4d1ce371a562bc4c003d88df9
[ "BSD-2-Clause" ]
null
null
null
src/zsl_jwt/auth/controller.py
AtteqCom/zsl_jwt
e1a81b756805b8d4d1ce371a562bc4c003d88df9
[ "BSD-2-Clause" ]
null
null
null
src/zsl_jwt/auth/controller.py
AtteqCom/zsl_jwt
e1a81b756805b8d4d1ce371a562bc4c003d88df9
[ "BSD-2-Clause" ]
null
null
null
""" :mod:`zsl_jwt.controller` ------------------------- Contains the login function. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import http from builtins import * # NOQA from typing import Any # NOQA from ...
35.938462
91
0.792808
742548b9fbb8460d91d6b0e6a0e05d510f7a1e65
5,677
py
Python
vpype_cli/debug.py
PPAC37/vpype
3aee1e4f769866e1a90456e0caa09010fc543fae
[ "MIT", "BSD-3-Clause" ]
null
null
null
vpype_cli/debug.py
PPAC37/vpype
3aee1e4f769866e1a90456e0caa09010fc543fae
[ "MIT", "BSD-3-Clause" ]
null
null
null
vpype_cli/debug.py
PPAC37/vpype
3aee1e4f769866e1a90456e0caa09010fc543fae
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" Hidden debug commands to help testing. """ import json from typing import Any, Dict, Iterable, List, Sequence import numpy as np import vpype as vp from .cli import cli from .decorators import global_processor debug_data: List[Dict[str, Any]] = [] __all__ = ("dbsample", "dbdump", "stat", "DebugData") @cli.co...
31.715084
91
0.59239
742552e0369d8319c79f5463d149a231ef7a628f
153
py
Python
__init__.py
KamilGos/bilateration-mobile-robot-localization
2da8b6e51057e0d06b1dd4740d87254f9da3466d
[ "MIT" ]
null
null
null
__init__.py
KamilGos/bilateration-mobile-robot-localization
2da8b6e51057e0d06b1dd4740d87254f9da3466d
[ "MIT" ]
null
null
null
__init__.py
KamilGos/bilateration-mobile-robot-localization
2da8b6e51057e0d06b1dd4740d87254f9da3466d
[ "MIT" ]
null
null
null
# bilateration-mobile-robot-localization # Mobile robot localization using simple bi-lateration method # Author: Kamil Goś: https://github.com/KamilGos/
38.25
61
0.803922
74256636cccbfbb4ede3905b1f8eacebfa750403
2,786
py
Python
exercises_algorithms_data_structures_big_o/exercises_coding/top_k_elements_in_data/tests/test_top_k_elements.py
JMarcan/robot_motion_planning_maze
945799f604e57c604a3f5c2c124b70a05ad02b68
[ "MIT" ]
null
null
null
exercises_algorithms_data_structures_big_o/exercises_coding/top_k_elements_in_data/tests/test_top_k_elements.py
JMarcan/robot_motion_planning_maze
945799f604e57c604a3f5c2c124b70a05ad02b68
[ "MIT" ]
1
2020-08-31T07:09:13.000Z
2020-08-31T16:38:59.000Z
exercises_algorithms_data_structures_big_o/exercises_coding/top_k_elements_in_data/tests/test_top_k_elements.py
JMarcan/robot_motion_planning_maze
945799f604e57c604a3f5c2c124b70a05ad02b68
[ "MIT" ]
null
null
null
''' To run unit tests for the top_k_elements module, execute from the main project directory python -m unittest ''' import unittest from top_k_elements.top_k_elements import TopElements class Test_Top_k_elements(unittest.TestCase): ''' P.S. assertCountEqual is used here to comply with requirements. ...
36.657895
135
0.667624
74256f593a13b5899908a6dd9d392fa3bbcd0a0c
2,456
py
Python
setup.py
cu-swe4s-fall-2019/final-project-swe4s_mc_params_optimization
e5d6410c286689b05108652c61afc430919d4dfc
[ "BSD-3-Clause" ]
null
null
null
setup.py
cu-swe4s-fall-2019/final-project-swe4s_mc_params_optimization
e5d6410c286689b05108652c61afc430919d4dfc
[ "BSD-3-Clause" ]
15
2019-12-03T06:20:41.000Z
2019-12-13T05:39:11.000Z
setup.py
cu-swe4s-fall-2019/final-project-swe4s_mc_params_optimization
e5d6410c286689b05108652c61afc430919d4dfc
[ "BSD-3-Clause" ]
null
null
null
""" ParamBayes Bayesian MCMC parameterization for CSCI 7000 (swe4s) class project """ import sys from setuptools import setup, find_packages import versioneer short_description = __doc__.split("\n") # from https://github.com/pytest-dev/pytest-runner#conditional-requirement needs_pytest = {'pytest', 'test', 'ptr'}.int...
35.594203
118
0.69259
74258d6c20f7fb6aebc5392b08f56ec7ad81eb1b
7,151
py
Python
python/pyxir/contrib/target/components/DPUCAHX8L/op_support.py
Xilinx/pyxir
bef661d6d77adcdbd2cf4163f2cf3a1d31d40406
[ "Apache-2.0" ]
25
2020-06-17T22:41:13.000Z
2022-03-22T16:28:22.000Z
python/pyxir/contrib/target/components/DPUCAHX8L/op_support.py
Xilinx/pyxir
bef661d6d77adcdbd2cf4163f2cf3a1d31d40406
[ "Apache-2.0" ]
25
2021-03-16T06:26:44.000Z
2022-03-18T11:28:33.000Z
python/pyxir/contrib/target/components/DPUCAHX8L/op_support.py
Xilinx/pyxir
bef661d6d77adcdbd2cf4163f2cf3a1d31d40406
[ "Apache-2.0" ]
19
2020-07-30T10:03:02.000Z
2021-06-29T01:18:16.000Z
# Copyright 2021 Xilinx 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 writing, ...
35.755
87
0.705496
74258dcdc38bd4130275cab19c3e8d0833046f5b
817
py
Python
tests/python/test_kernel_template_mapper.py
ericjang/taichi
0dec0bac6d9c16b7b62ba528f9e0d4268d1d05d2
[ "MIT" ]
null
null
null
tests/python/test_kernel_template_mapper.py
ericjang/taichi
0dec0bac6d9c16b7b62ba528f9e0d4268d1d05d2
[ "MIT" ]
1
2020-07-21T05:51:19.000Z
2020-10-08T01:31:15.000Z
tests/python/test_kernel_template_mapper.py
hoojaoh/taichi
641c4b83bcf98e7354b135964cd23759b0110c6b
[ "MIT" ]
null
null
null
import taichi as ti @ti.program_test def test_kernel_template_mapper(): x = ti.var(ti.i32) y = ti.var(ti.f32) @ti.layout def layout(): ti.root.place(x, y) mapper = ti.KernelTemplateMapper(3, (0, 1, 2)) assert mapper.lookup((0, 0, 0)) == 0 assert mapper.lookup((0, 1, 0)) == 1 assert mapper.lookup(...
26.354839
48
0.598531
7425a0ad64eeb23d8a5c6943910f835075d0b03d
3,489
py
Python
src/ggplib/propnet/getpropnet.py
richemslie/ggplib
8388678f311db4a9906d8a3aff71d3f0037b623b
[ "MIT" ]
11
2019-03-02T13:49:07.000Z
2021-12-21T17:03:05.000Z
src/ggplib/propnet/getpropnet.py
ggplib/ggplib
8388678f311db4a9906d8a3aff71d3f0037b623b
[ "MIT" ]
2
2019-05-15T18:23:50.000Z
2019-05-19T08:13:19.000Z
src/ggplib/propnet/getpropnet.py
ggplib/ggplib
8388678f311db4a9906d8a3aff71d3f0037b623b
[ "MIT" ]
1
2020-04-02T17:35:35.000Z
2020-04-02T17:35:35.000Z
import os import glob import uuid import importlib from ggplib.util import log, symbols from ggplib.util.runcmd import run from ggplib.util.util import path_back from ggplib.propnet.factory import Propnet, create_component rulesheet_dir = os.path.join(path_back(__file__, 3), "data", "rulesheets") props_dir = os.path...
31.432432
120
0.638865
7425cbc0becb0e0e42f6278b8f734ae54c1bd177
5,938
py
Python
sdk/storage/azure-storage-blob/tests/test_blob_storage_account.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/storage/azure-storage-blob/tests/test_blob_storage_account.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-blob/tests/test_blob_storage_account.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
41.524476
111
0.650051
7425d6e26f8f8e3c9d706895284477d5c27ac46e
255
py
Python
(2)Data Structures/enum_intenum.py
mass9/Python
66499164e36a4fe9630029d34b292ab06f849b2f
[ "MIT" ]
null
null
null
(2)Data Structures/enum_intenum.py
mass9/Python
66499164e36a4fe9630029d34b292ab06f849b2f
[ "MIT" ]
null
null
null
(2)Data Structures/enum_intenum.py
mass9/Python
66499164e36a4fe9630029d34b292ab06f849b2f
[ "MIT" ]
null
null
null
import enum class BugStatus(enum.IntEnum): new = 7 incomplete = 6 invalid = 5 wont_fix = 4 in_progress = 3 fix_committed = 2 fix_released = 1 for status in BugStatus: print('{:24} = {}'.format(status.name, status.value))
18.214286
57
0.627451
7425da9ce6086a9bfff9c0ddeeda4510bcf5c612
699
py
Python
supriya/ugens/Free.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/Free.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/Free.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import collections from supriya import CalculationRate from supriya.synthdefs import UGen class Free(UGen): """ Frees the node at `node_id` when triggered by `trigger`. :: >>> node_id = 1000 >>> trigger = supriya.ugens.Impulse.kr(frequency=1.0) >>> free = supriya.ugens.Free.kr( ...
21.181818
61
0.589413
74261aa547990467f5086c9ead0fdc3de72d5ca4
2,287
py
Python
cloud_snitch/snitchers/configfile.py
bunchc/FleetDeploymentReporting
a93af06573f2715e14b4d18b7a394c26fc19a32d
[ "Apache-2.0" ]
1
2018-07-11T20:20:21.000Z
2018-07-11T20:20:21.000Z
cloud_snitch/snitchers/configfile.py
bunchc/FleetDeploymentReporting
a93af06573f2715e14b4d18b7a394c26fc19a32d
[ "Apache-2.0" ]
46
2018-08-08T19:46:15.000Z
2019-02-22T20:33:49.000Z
cloud_snitch/snitchers/configfile.py
dani4571/FleetDeploymentReporting
8b132a20fa3e9c4e4215feade79f689be6e4b364
[ "Apache-2.0" ]
7
2018-06-26T15:27:55.000Z
2018-12-05T19:41:25.000Z
import logging import os from .base import BaseSnitcher from cloud_snitch.models import ConfigfileEntity from cloud_snitch.models import EnvironmentEntity from cloud_snitch.models import HostEntity logger = logging.getLogger(__name__) class ConfigfileSnitcher(BaseSnitcher): """Models path host -> configfile""" ...
34.651515
76
0.64014
742640aa99ed87c07b5d2b60d57ab2e194b9838f
4,222
py
Python
flexget/plugins/search/btn.py
sillygreen89/Flexget
60f24ab0dda7b94c87ba43451921c50c3cef391f
[ "MIT" ]
1
2018-05-02T21:14:50.000Z
2018-05-02T21:14:50.000Z
flexget/plugins/search/btn.py
sillygreen89/Flexget
60f24ab0dda7b94c87ba43451921c50c3cef391f
[ "MIT" ]
null
null
null
flexget/plugins/search/btn.py
sillygreen89/Flexget
60f24ab0dda7b94c87ba43451921c50c3cef391f
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests, json from flexget.utils...
45.891304
114
0.55424
742692683092f8f84ffd8705da60c8ae029ba14f
1,830
py
Python
preprocessing/detect_original_faces.py
CryptoSalamander/DeepFake-Detection
f3b1c95ce1955a4c203a9f3d1279c5fbade66684
[ "MIT" ]
null
null
null
preprocessing/detect_original_faces.py
CryptoSalamander/DeepFake-Detection
f3b1c95ce1955a4c203a9f3d1279c5fbade66684
[ "MIT" ]
null
null
null
preprocessing/detect_original_faces.py
CryptoSalamander/DeepFake-Detection
f3b1c95ce1955a4c203a9f3d1279c5fbade66684
[ "MIT" ]
null
null
null
import argparse import json import os from os import cpu_count from typing import Type from torch.utils.data.dataloader import DataLoader from tqdm import tqdm from preprocessing import face_detector, VideoDataset from preprocessing.face_detector import VideoFaceDetector from preprocessing.utils import get_original_vid...
46.923077
123
0.706557
7426c8503b4122026f7d697e6ef33a17e8983245
1,445
py
Python
rally/plugins/openstack/context/quotas/cinder_quotas.py
LorenzoBianconi/rally
2bbd7ee590cca048fb4ad6a8eefc484989979ff8
[ "Apache-2.0" ]
1
2021-09-29T02:16:09.000Z
2021-09-29T02:16:09.000Z
rally/plugins/openstack/context/quotas/cinder_quotas.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-14T11:29:31.000Z
2020-07-14T11:29:31.000Z
rally/plugins/openstack/context/quotas/cinder_quotas.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-02T01:33:48.000Z
2020-07-02T01:33:48.000Z
# 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 agreed to in...
28.333333
78
0.586159
7426fb78ed8f3920afc00fd71f227778c63210a7
11,388
py
Python
obsolete/reports/pipeline_capseq/trackers/macs_parameter_correlation.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
11
2018-09-07T11:33:23.000Z
2022-01-07T12:16:11.000Z
obsolete/reports/pipeline_capseq/trackers/macs_parameter_correlation.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
102
2018-03-22T15:35:26.000Z
2022-03-23T17:46:16.000Z
obsolete/reports/pipeline_capseq/trackers/macs_parameter_correlation.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
7
2018-06-11T15:01:41.000Z
2020-03-31T09:29:33.000Z
import os import sys import re import types import itertools import matplotlib.pyplot as plt import numpy import scipy.stats import numpy.ma import Stats import Histogram from cgatReport.Tracker import * from cpgReport import * ########################################################################## class Interva...
34.095808
159
0.530032
7426fd3bdf3882f7a91c042ae6aa7c30dbc56b95
931
py
Python
examples/pipelined_line_counter.py
sobolevn/action-hero
75ff10dc8b01ee8d00367c63e8eccbbee9cc7d42
[ "MIT" ]
91
2019-09-26T20:55:55.000Z
2021-10-19T22:27:21.000Z
examples/pipelined_line_counter.py
kadimisetty/action-heroes
f203e2e130dce970db803d6447bf7518c5e54285
[ "MIT" ]
1
2020-02-07T02:51:40.000Z
2020-02-07T02:51:40.000Z
examples/pipelined_line_counter.py
kadimisetty/action-heroes
f203e2e130dce970db803d6447bf7518c5e54285
[ "MIT" ]
5
2020-02-02T03:40:47.000Z
2020-11-05T10:53:11.000Z
import argparse from action_hero import ( DebugAction, FileHasExtensionAction, FileIsReadableAction, PipelineAction, ) if __name__ == "__main__": # Create parser parser = argparse.ArgumentParser() # Add user argument "file" # parser.add_argument("--file", action=FileIsReadableAction)...
24.5
74
0.602578
742713858de61abf9e085855d4f7143c8d3159f4
701
py
Python
tests/unit/chroma_core/lib/storage_plugin/loadable_plugin.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
1
2021-02-08T16:59:14.000Z
2021-02-08T16:59:14.000Z
tests/unit/chroma_core/lib/storage_plugin/loadable_plugin.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
null
null
null
tests/unit/chroma_core/lib/storage_plugin/loadable_plugin.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
null
null
null
from chroma_core.lib.storage_plugin.api import attributes, statistics from chroma_core.lib.storage_plugin.api.identifiers import GlobalId from chroma_core.lib.storage_plugin.base_resource import BaseStorageResource, BaseScannableResource from chroma_core.lib.storage_plugin.base_plugin import BaseStoragePlugin version ...
26.961538
99
0.7903
742722d216b06e406c5b4aa65de37230d6e701f2
31,049
py
Python
API/src/main/resources/Lib/xlrd/xlsx.py
TagExpress/SikuliX1
de9da11794dd94b3821eddc5c01b534d3f2fe828
[ "MIT" ]
null
null
null
API/src/main/resources/Lib/xlrd/xlsx.py
TagExpress/SikuliX1
de9da11794dd94b3821eddc5c01b534d3f2fe828
[ "MIT" ]
null
null
null
API/src/main/resources/Lib/xlrd/xlsx.py
TagExpress/SikuliX1
de9da11794dd94b3821eddc5c01b534d3f2fe828
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license ## ## from __future__ import print_function, unicode_literals DEBUG = 0 import sys import re from .timemachine import * from .book import Book, Name from .biffh import error_text_from_code, XLRDError, XL_CELL_BLANK, XL_CELL_TEXT, XL_CELL_BOOLEAN, XL_...
38.42698
126
0.541531
74272a7fe1e9f313d6253fc51ff385ac70aa1bd8
31,233
py
Python
stateRepresentation.py
xc-liu/pacman-rl-agent
5372f8c479b1a1f25132602978f9eb908fce774e
[ "Unlicense" ]
null
null
null
stateRepresentation.py
xc-liu/pacman-rl-agent
5372f8c479b1a1f25132602978f9eb908fce774e
[ "Unlicense" ]
null
null
null
stateRepresentation.py
xc-liu/pacman-rl-agent
5372f8c479b1a1f25132602978f9eb908fce774e
[ "Unlicense" ]
null
null
null
import math import time import numpy as np from score_keeper import get_timesteps symmetric = True def kalman(v, r, q): """ v - array to filter t - time steps, usually just range(len(v)) r - how much we trust our path def=0.1 q - decreasing it makes it smoother def=0.01 """ p = 12...
45.59562
162
0.554862
742739fd051894231d420593aceaad19eefed4d5
7,055
py
Python
influxdb_client/domain/organization.py
kelseiv/influxdb-client-python
9a0d2d659157cca96f6a04818fdeb215d699bdd7
[ "MIT" ]
1
2021-06-06T10:39:47.000Z
2021-06-06T10:39:47.000Z
influxdb_client/domain/organization.py
kelseiv/influxdb-client-python
9a0d2d659157cca96f6a04818fdeb215d699bdd7
[ "MIT" ]
null
null
null
influxdb_client/domain/organization.py
kelseiv/influxdb-client-python
9a0d2d659157cca96f6a04818fdeb215d699bdd7
[ "MIT" ]
null
null
null
# coding: utf-8 """ Influx API Service No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class Orga...
25.9375
138
0.564706
742743d6cddcbff4bf52576a2a590becd90b3c4f
76
py
Python
tuna/commands/ping/tests/index.py
russellnakamura/thetuna
0e445baf780fb65e1d92fe1344ebdf21bf81573c
[ "MIT" ]
null
null
null
tuna/commands/ping/tests/index.py
russellnakamura/thetuna
0e445baf780fb65e1d92fe1344ebdf21bf81573c
[ "MIT" ]
null
null
null
tuna/commands/ping/tests/index.py
russellnakamura/thetuna
0e445baf780fb65e1d92fe1344ebdf21bf81573c
[ "MIT" ]
null
null
null
# this package from cameraobscura import create_toctree create_toctree()
10.857143
40
0.815789
74274589cafa742f6f240b8e72652928d29b0446
382
py
Python
tools/amr-evaluation-tool-enhanced/unlabel.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
9
2021-07-12T22:05:47.000Z
2022-02-22T03:10:14.000Z
tools/amr-evaluation-tool-enhanced/unlabel.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
4
2021-08-31T08:28:37.000Z
2022-03-28T05:52:14.000Z
tools/amr-evaluation-tool-enhanced/unlabel.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
null
null
null
import re match_of = re.compile(":[0-9a-zA-Z]*-of") match_no_of = re.compile(":[0-9a-zA-Z]*(?!-of)") def readFile(filepath): with open(filepath, 'r') as content_file: content = content_file.read() amr_t = content amr_t = re.sub(match_no_of,":label",amr_t) amr_t = re.sub(match_of,":label-o...
22.470588
48
0.633508
74275ba89225e42951a0e7222baf55e536810183
2,934
py
Python
resources/algorithms/dijkstra/dijkstra.py
pBouillon/Telecom_PPII
dd4a1451c716c22162bd618554509b6618e27f57
[ "MIT" ]
1
2019-12-10T19:05:14.000Z
2019-12-10T19:05:14.000Z
resources/algorithms/dijkstra/dijkstra.py
pBouillon/Telecom_PPII
dd4a1451c716c22162bd618554509b6618e27f57
[ "MIT" ]
null
null
null
resources/algorithms/dijkstra/dijkstra.py
pBouillon/Telecom_PPII
dd4a1451c716c22162bd618554509b6618e27f57
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ dijkstra -------- Dijkstra shortest path implementation. :authors: Bouillon Pierre, Cesari Alexandre. :licence: MIT, see LICENSE for more details. """ from typing import List from resources.algorithms.dijkstra.graph import Graph def get_default_graph() -> Graph: ...
27.420561
79
0.600545
742764b2e3c850e8ee51f0aa0f8755f2d8dea837
4,928
py
Python
openrl/algorithms/dyna_q/models.py
natetsang/open-rl
426723d0d6759672ce77e02afeb55cbeb68fcfb0
[ "MIT" ]
2
2021-09-10T18:52:35.000Z
2022-01-03T19:48:06.000Z
openrl/algorithms/dyna_q/models.py
natetsang/open-rl
426723d0d6759672ce77e02afeb55cbeb68fcfb0
[ "MIT" ]
1
2021-12-28T17:42:23.000Z
2021-12-28T17:42:23.000Z
openrl/algorithms/dyna_q/models.py
natetsang/open-rl
426723d0d6759672ce77e02afeb55cbeb68fcfb0
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow.keras import layers def fc_reward_network(state_dims: int, action_dims: int, num_hidden_layers: int, hidden_size: int) -> tf.keras.Model: """ Input both normalized state and normalized action. Output ...
41.066667
96
0.677151
7427bd17a0fb1161c7d42e7cc1d585ef2b8b5b72
4,141
py
Python
neural_sp/models/seq2seq/frontends/spec_augment.py
Cescfangs/neural_sp
2c12d25d2078d3dacdb80c5c367c2e90feba7b6c
[ "Apache-2.0" ]
null
null
null
neural_sp/models/seq2seq/frontends/spec_augment.py
Cescfangs/neural_sp
2c12d25d2078d3dacdb80c5c367c2e90feba7b6c
[ "Apache-2.0" ]
null
null
null
neural_sp/models/seq2seq/frontends/spec_augment.py
Cescfangs/neural_sp
2c12d25d2078d3dacdb80c5c367c2e90feba7b6c
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2019 Kyoto University (Hirofumi Inaguma) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """SpecAugment data augmentation.""" import logging import numpy as np logger = logging.getLogger(__name__) class SpecAugment(object): """SpecAugment...
28.756944
83
0.572567
7427c37161f95eb16fc0a1620cb12a3f95e66f8c
11,756
py
Python
utils.py
zacbaum/ALOCC-CVPR2018
512f83693f6d75ab6eb15a6155c0fe74289b9608
[ "MIT" ]
null
null
null
utils.py
zacbaum/ALOCC-CVPR2018
512f83693f6d75ab6eb15a6155c0fe74289b9608
[ "MIT" ]
null
null
null
utils.py
zacbaum/ALOCC-CVPR2018
512f83693f6d75ab6eb15a6155c0fe74289b9608
[ "MIT" ]
null
null
null
""" Some code used from from https://github.com/Newmu/dcgan_code + utilities used in the Kadenze Academy Course on Deep Learning w/ Tensorflow """ from __future__ import division import math import json import random import pprint import scipy.misc import numpy as np from time import gmtime, strftime from six.moves imp...
35.841463
138
0.607179
7427ca85cfb96664f7023fddf7548904135f4a40
11,473
py
Python
detectron/roi_data/loader.py
singhnarotam1997/Detectron
ecc6b25fc8869486126f1384b4e6e042a718bd5b
[ "Apache-2.0" ]
null
null
null
detectron/roi_data/loader.py
singhnarotam1997/Detectron
ecc6b25fc8869486126f1384b4e6e042a718bd5b
[ "Apache-2.0" ]
null
null
null
detectron/roi_data/loader.py
singhnarotam1997/Detectron
ecc6b25fc8869486126f1384b4e6e042a718bd5b
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. ############################################################################## """Detectron data loader. The design is gene...
40.397887
80
0.608734
7427cf1e519102d4d47d89cb53898fc36ea3be31
3,643
py
Python
src/efficient_det/utils/config_parser.py
zeynep68/object-detection-efficientdet
4d4b194bf1641cbb705e7659b66539752986c218
[ "Apache-2.0" ]
null
null
null
src/efficient_det/utils/config_parser.py
zeynep68/object-detection-efficientdet
4d4b194bf1641cbb705e7659b66539752986c218
[ "Apache-2.0" ]
null
null
null
src/efficient_det/utils/config_parser.py
zeynep68/object-detection-efficientdet
4d4b194bf1641cbb705e7659b66539752986c218
[ "Apache-2.0" ]
null
null
null
import os import warnings import tensorflow as tf from wandb.keras import WandbCallback from efficient_det.utils.logs import initialize_logging from efficient_det.layers.activation_layer import Swish, ReLU6 from efficient_det.callbacks.eval import Evaluate from efficient_det.losses import smooth_l1, focal_loss from ef...
28.685039
80
0.651935
7427d33fdb19213674748e0c7260355e70a4b6d6
9,887
py
Python
models/dump_helper.py
zaiweizhang/H3DNet
e69f2855634807b37ae12e6db5963c924e64d3e7
[ "MIT" ]
212
2020-06-11T01:03:36.000Z
2022-03-17T17:29:21.000Z
models/dump_helper.py
zaiweizhang/H3DNet
e69f2855634807b37ae12e6db5963c924e64d3e7
[ "MIT" ]
25
2020-06-15T13:35:13.000Z
2022-03-10T05:44:05.000Z
models/dump_helper.py
zaiweizhang/H3DNet
e69f2855634807b37ae12e6db5963c924e64d3e7
[ "MIT" ]
24
2020-06-11T01:17:24.000Z
2022-03-30T13:34:45.000Z
# 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 numpy as np import torch import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(BASE_DI...
51.227979
390
0.64782
7427ec5179962ec84aa9e10311488472eb8fa3e0
495
py
Python
register/migrations/0003_location_registrant.py
cds-snc/covid-alert-portal
e7d56fa9fa4a2ad2d60f056eae063713661bd260
[ "MIT" ]
43
2020-07-31T14:38:06.000Z
2022-03-07T11:28:28.000Z
register/migrations/0003_location_registrant.py
cds-snc/covid-alert-portal
e7d56fa9fa4a2ad2d60f056eae063713661bd260
[ "MIT" ]
322
2020-07-23T19:38:26.000Z
2022-03-31T19:15:45.000Z
register/migrations/0003_location_registrant.py
cds-snc/covid-alert-portal
e7d56fa9fa4a2ad2d60f056eae063713661bd260
[ "MIT" ]
6
2020-11-28T19:30:20.000Z
2021-07-29T18:06:55.000Z
# Generated by Django 3.2 on 2021-04-06 15:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('register', '0002_remove_registrant_name'), ] operations = [ migrations.AddField( model_name='loca...
24.75
119
0.652525
74282d058e7996ab50f19b98db43c714e6e3f9b8
884
py
Python
packages/lr_policy/fixed.py
JinkaiZheng/TraND
a8babc34073ee126789969bd97e149bae4015953
[ "MIT" ]
33
2021-05-13T08:37:10.000Z
2022-03-15T11:51:35.000Z
packages/lr_policy/fixed.py
JinkaiZheng/TraND
a8babc34073ee126789969bd97e149bae4015953
[ "MIT" ]
null
null
null
packages/lr_policy/fixed.py
JinkaiZheng/TraND
a8babc34073ee126789969bd97e149bae4015953
[ "MIT" ]
1
2021-07-24T07:30:30.000Z
2021-07-24T07:30:30.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2019-01-26 20:15:47 # @Author : Raymond Wong (jiabo.huang@qmul.ac.uk) # @Link : github.com/Raymond-sci from logger import log from configs import parser_argument cfg = parser_argument() class FixedPolicy: def __init__(self, *args, **kwargs): ...
27.625
77
0.640271
74285e69079119d76fad57e1d542b7c0a2c7ba15
2,316
py
Python
utils/seg_utils.py
chiutaiyin/Iterative-feature-transformation-for-style-transfer
9eab3e2b8b33a000db09906bac6a8659ec9a628b
[ "MIT" ]
5
2020-08-24T10:17:09.000Z
2021-01-14T02:25:24.000Z
utils/seg_utils.py
chiutaiyin/Iterative-feature-transformation-for-style-transfer
9eab3e2b8b33a000db09906bac6a8659ec9a628b
[ "MIT" ]
1
2020-10-12T05:43:45.000Z
2020-10-12T05:43:45.000Z
utils/seg_utils.py
chiutaiyin/Iterative-feature-transformation-for-style-transfer
9eab3e2b8b33a000db09906bac6a8659ec9a628b
[ "MIT" ]
2
2020-12-07T09:17:46.000Z
2021-01-10T09:14:06.000Z
import numpy as np from PIL import Image import cv2 def change_seg(arr_seg): color_dict = { (0, 0, 255): 3, # blue (0, 255, 0): 2, # green (0, 0, 0): 0, # black (255, 255, 255): 1, # white (255, 0, 0): 4, # red (255, 255, 0): 5, # yellow (128, 128, 128)...
36.761905
114
0.549655
7428793b3ba98585dafba5321c55c034f20e400f
7,490
py
Python
datalad/ui/tests/test_dialog.py
soichih/datalad
797dde3ab7497be170e2c4ea8824f33a4b38e5d8
[ "MIT" ]
null
null
null
datalad/ui/tests/test_dialog.py
soichih/datalad
797dde3ab7497be170e2c4ea8824f33a4b38e5d8
[ "MIT" ]
null
null
null
datalad/ui/tests/test_dialog.py
soichih/datalad
797dde3ab7497be170e2c4ea8824f33a4b38e5d8
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 et: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ### ...
35.49763
97
0.592924
742880c164a2c0900bc7b951d2a6024eea1c7433
269
py
Python
va_explorer/users/migrations/0004_merge_20210127_1700.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
null
null
null
va_explorer/users/migrations/0004_merge_20210127_1700.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
125
2020-10-07T12:00:15.000Z
2022-03-31T21:29:21.000Z
va_explorer/users/migrations/0004_merge_20210127_1700.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
2
2020-10-29T16:08:42.000Z
2020-12-08T19:03:41.000Z
# Generated by Django 3.1.5 on 2021-01-27 17:00 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20210122_1422'), ('users', '0003_auto_20210119_1624'), ] operations = [ ]
17.933333
47
0.643123
7428a137b8c1f97ca10189d875c172bfabb63aeb
1,320
py
Python
src/apex/aprs/__init__.py
Syncleus/apex
99ab661f0993fcee8064578b6a6020f5b742d75f
[ "Apache-2.0" ]
13
2016-03-23T09:35:13.000Z
2019-09-23T09:39:37.000Z
src/apex/aprs/__init__.py
freemo/apex
99ab661f0993fcee8064578b6a6020f5b742d75f
[ "Apache-2.0" ]
31
2016-09-21T10:29:36.000Z
2016-09-30T12:11:28.000Z
src/apex/aprs/__init__.py
freemo/apex
99ab661f0993fcee8064578b6a6020f5b742d75f
[ "Apache-2.0" ]
5
2016-03-27T21:32:09.000Z
2022-01-13T17:04:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # APRS Python Module. """ APRS Python Module. ~~~~ :author: Jeffrey Phillips Freeman WI2ARD <freemo@gmail.com> :copyright: Copyright 2016 Syncleus, Inc. and contributors :license: Apache License, Version 2.0 :source: <https://github.com/syncleus/apex> """ # These impo...
28.085106
79
0.732576
7428bbe08b284cd119a0d7db4da299beb936a4e4
2,064
py
Python
src/cloudant/adapters.py
ssshah5/clone-python-cloudant
1939f6ffe1b36fd87e94e984fe300e4e109d2171
[ "Apache-2.0" ]
1
2017-01-22T21:42:20.000Z
2017-01-22T21:42:20.000Z
venv/lib/python3.5/site-packages/cloudant/adapters.py
remkohdev/python-flask-d3js-newssentiment
006e1083b6a307fda55b176eadb810aa08bd8b63
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.5/site-packages/cloudant/adapters.py
remkohdev/python-flask-d3js-newssentiment
006e1083b6a307fda55b176eadb810aa08bd8b63
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 2016 IBM Corp. 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-...
42.122449
87
0.694283
742903c881019806ca545d96d3c6871d4cb6cd95
11,494
py
Python
aiida_siesta/workflows/base.py
albgar/legacy_aiida_plugin
a375d357c88b30209bee9b341064f84a8ef244d6
[ "MIT" ]
null
null
null
aiida_siesta/workflows/base.py
albgar/legacy_aiida_plugin
a375d357c88b30209bee9b341064f84a8ef244d6
[ "MIT" ]
null
null
null
aiida_siesta/workflows/base.py
albgar/legacy_aiida_plugin
a375d357c88b30209bee9b341064f84a8ef244d6
[ "MIT" ]
null
null
null
from aiida import orm from aiida.engine import BaseRestartWorkChain, ProcessHandlerReport, process_handler, while_ from aiida_siesta.data.common import get_pseudos_from_structure from aiida_siesta.calculations.siesta import SiestaCalculation def prepare_pseudo_inputs(structure, pseudos, pseudo_family): if pseudo...
46.160643
119
0.673221
74291189086989ffc6a79528b245c5f794e4e18b
209
py
Python
lang/python/gevent/testgevent.py
liuyang1/test
a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417
[ "MIT" ]
8
2015-06-07T13:25:48.000Z
2022-03-22T23:14:50.000Z
lang/python/gevent/testgevent.py
liuyang1/test
a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417
[ "MIT" ]
30
2016-01-29T01:36:41.000Z
2018-09-19T07:01:22.000Z
lang/python/gevent/testgevent.py
liuyang1/test
a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417
[ "MIT" ]
null
null
null
import gevent from gevent import socket urls=["www.google.com","bbs.ustc.edu.cn"] jobs=[gevent.spawn(socket.gethostbyname,url) for url in urls] gevent.joinall(jobs,timeout=2) print [job.value for job in jobs]
29.857143
61
0.770335
74291268be311747f3597adc150e6e2a205b5c64
1,297
py
Python
End2EndLearning/adv_diffaug_train.py
azshue/SAAP
c1214f3919d2df213a125d780175afc1553ddeb2
[ "MIT" ]
null
null
null
End2EndLearning/adv_diffaug_train.py
azshue/SAAP
c1214f3919d2df213a125d780175afc1553ddeb2
[ "MIT" ]
null
null
null
End2EndLearning/adv_diffaug_train.py
azshue/SAAP
c1214f3919d2df213a125d780175afc1553ddeb2
[ "MIT" ]
null
null
null
import sys import os import time import argparse import shutil import numpy as np import tensorflow as tf ROOT_DIR = os.path.abspath("../") print('PLATFORM_ROOT_DIR ', ROOT_DIR) sys.path.insert(0, './library/') def parse_args(): parser = argparse.ArgumentParser(description='Adv Diff Aug') parser.add_argumen...
34.131579
75
0.647648
74292f4d8015297cfa8165b94fafd4a657272d0d
4,247
py
Python
lib/kb_cmash/kb_cmashImpl.py
kbaseapps/kb_cmash
91296efad39265cea7404798885d17383f699e6e
[ "MIT" ]
1
2020-01-13T19:33:45.000Z
2020-01-13T19:33:45.000Z
lib/kb_cmash/kb_cmashImpl.py
kbaseapps/kb_cmash
91296efad39265cea7404798885d17383f699e6e
[ "MIT" ]
null
null
null
lib/kb_cmash/kb_cmashImpl.py
kbaseapps/kb_cmash
91296efad39265cea7404798885d17383f699e6e
[ "MIT" ]
1
2019-05-16T19:27:17.000Z
2019-05-16T19:27:17.000Z
# -*- coding: utf-8 -*- #BEGIN_HEADER import os import subprocess import collections from installed_clients.KBaseReportClient import KBaseReport from .utils.CMashUtils import CMashUtils from .utils.misc_utils import load_fastas #END_HEADER cmash_scripts = '/opt/CMash/CMash/scripts/' class kb_cmash: ''' Module...
36.930435
169
0.598305
74293a50e5e728324a6dff180af873b2555e3ece
2,239
py
Python
LoadBatches.py
VladPerish/keras_segmentation
851771ff2b8d02879574f37e86a3acba12a4d299
[ "MIT" ]
1
2020-09-09T12:42:39.000Z
2020-09-09T12:42:39.000Z
LoadBatches.py
nayemabs/keras_segmentation
851771ff2b8d02879574f37e86a3acba12a4d299
[ "MIT" ]
null
null
null
LoadBatches.py
nayemabs/keras_segmentation
851771ff2b8d02879574f37e86a3acba12a4d299
[ "MIT" ]
null
null
null
import numpy as np import cv2 import glob import itertools import matplotlib.pyplot as plt import random def getImageArr(im): img = im.astype(np.float32) img[:, :, 0] -= 103.939 img[:, :, 1] -= 116.779 img[:, :, 2] -= 123.68 return img def getSegmentationArr(seg, nClasses, input_height, input...
28.341772
128
0.560518
742947c0b4884aee25a95bd9d3945b49c024e992
1,875
py
Python
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_postgre_sql_sync_task_input_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_postgre_sql_sync_task_input_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_postgre_sql_sync_task_input_py3.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.666667
102
0.6912
742949a38bfda457469beb721d53fc8918a9a187
1,773
py
Python
StreamPy/TestExamplesListToStreams/OLD_EXAMPLES/example_many_to_many_stateless.py
AnomalyInc/StreamPy
94abca276b2857de48259f4f42ef95efbdf5f6d1
[ "Apache-2.0" ]
2
2017-04-27T11:04:27.000Z
2019-02-07T21:03:32.000Z
StreamPy/TestExamplesListToStreams/OLD_EXAMPLES/example_many_to_many_stateless.py
StreamPy/StreamPy
94abca276b2857de48259f4f42ef95efbdf5f6d1
[ "Apache-2.0" ]
null
null
null
StreamPy/TestExamplesListToStreams/OLD_EXAMPLES/example_many_to_many_stateless.py
StreamPy/StreamPy
94abca276b2857de48259f4f42ef95efbdf5f6d1
[ "Apache-2.0" ]
null
null
null
"""This module contains examples of the stateless single stream source """ if __name__ == '__main__': if __package__ is None: import sys from os import path sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) from Agent import * from ListOperators import stream_func #...
30.050847
81
0.677383
7429551cd96479609b1cb77764826ad27ed9eb67
1,503
py
Python
median-cut-algorithm/helper_fnc.py
code-blooded/Image-Compression
d47cc8447161dc960805eef98526b3b5bd199420
[ "MIT" ]
2
2020-01-19T04:59:22.000Z
2020-11-10T08:20:55.000Z
median-cut-algorithm/helper_fnc.py
code-blooded/Image-Compression
d47cc8447161dc960805eef98526b3b5bd199420
[ "MIT" ]
null
null
null
median-cut-algorithm/helper_fnc.py
code-blooded/Image-Compression
d47cc8447161dc960805eef98526b3b5bd199420
[ "MIT" ]
5
2018-02-02T21:15:28.000Z
2020-12-17T05:17:11.000Z
import cv2 import numpy as np path = "code_blooded.bmp" def binarySearch(encode,l,h,x): " ceil binary search returns index and -1 if not present " if l>h: return -1 if x>=(encode[h]): return h mid = int((l+h)/2) if encode[mid]==x: return mid if mid>0 and (...
29.470588
70
0.57485
7429771bad14abde394cc92c465bce9ea27621ab
147
py
Python
Python/sets.py
fangyiyu/CS50_web_programming
8d6f304772ae8bd8cd373f17545d507c6e55768e
[ "MIT" ]
2
2021-04-05T15:29:08.000Z
2022-03-08T11:07:21.000Z
Lecture 2 : Python/src2/sets.py
Sumanth-Talluri/CS50-Web-Programming-with-Python-and-JavaScript
8d5f83f4354f1f27138a2a9c40317d358f3b2f9a
[ "MIT" ]
null
null
null
Lecture 2 : Python/src2/sets.py
Sumanth-Talluri/CS50-Web-Programming-with-Python-and-JavaScript
8d5f83f4354f1f27138a2a9c40317d358f3b2f9a
[ "MIT" ]
null
null
null
# Create an empty set s = set() # Add elements to set s.add(1) s.add(3) s.add(5) s.add(3) print(s) # Remove elemnt from set s.remove(5) print(s)
10.5
24
0.646259
7429d56006d139ff4408cc64200decd847f86652
1,770
py
Python
ctic/1.5.py
shubhamoli/practice
5a24fdeb6e5f43b821ef0510fe3b343ddda18f22
[ "MIT" ]
1
2020-02-25T10:32:27.000Z
2020-02-25T10:32:27.000Z
ctic/1.5.py
shubhamoli/practice
5a24fdeb6e5f43b821ef0510fe3b343ddda18f22
[ "MIT" ]
null
null
null
ctic/1.5.py
shubhamoli/practice
5a24fdeb6e5f43b821ef0510fe3b343ddda18f22
[ "MIT" ]
null
null
null
""" 1.5 - Write a function to check if two strings are one edit (or zero edit) away edit == insert, delete or replace a character """ # Using brute force approach def checkEditDistance(s1: str, s2: str) -> bool: # return False for more than 1 edit if abs(len(s1) - len(s2)) > 1: return F...
27.65625
83
0.534463
742a00389cab8ab9f451917f10c9311ca150e328
7,837
py
Python
examples/task_sequence_labeling_ner_lstm_crf.py
deepframwork/TorchBlocks
35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
[ "MIT" ]
1
2021-04-26T08:01:25.000Z
2021-04-26T08:01:25.000Z
examples/task_sequence_labeling_ner_lstm_crf.py
deepframwork/TorchBlocks
35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
[ "MIT" ]
null
null
null
examples/task_sequence_labeling_ner_lstm_crf.py
deepframwork/TorchBlocks
35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
[ "MIT" ]
null
null
null
import os import json from torchblocks.metrics import NERScore from torchblocks.trainer import SequenceLabelingTrainer from torchblocks.callback import TrainLogger from torchblocks.processor import SequenceLabelingProcessor, InputExample from torchblocks.utils import seed_everything, dict_to_text, build_argparse ...
47.210843
118
0.614138
742a2a6a7fc0b436e8f63c34f71231ad793030af
5,297
py
Python
venv/lib/python3.6/site-packages/kubernetes/client/models/v1alpha1_volume_attachment_spec.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/kubernetes/client/models/v1alpha1_volume_attachment_spec.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/kubernetes/client/models/v1alpha1_volume_attachment_spec.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: release-1.15 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1alp...
30.796512
147
0.605248
742a2f653693a714e56a766ed8a2d609fbcca513
848
py
Python
nova/api/openstack/compute/schemas/availability_zone.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
5
2016-04-28T16:20:38.000Z
2021-04-25T11:19:03.000Z
nova/api/openstack/compute/schemas/availability_zone.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
11
2017-06-19T01:28:55.000Z
2017-06-23T02:01:47.000Z
nova/api/openstack/compute/schemas/availability_zone.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
7
2015-01-20T10:30:08.000Z
2020-02-05T10:29:05.000Z
# Copyright 2014 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
35.333333
78
0.746462
742a32ff5f09b5963cb29489beaf4f329902937e
6,849
py
Python
Middleware/gRPC-homework/src/main/java/xenoteo/com/github/client/municipal_office_pb2.py
xenoteo/Distributed-Systems
86157328921e0b444f3597cb7f6b413ea8acfd51
[ "MIT" ]
null
null
null
Middleware/gRPC-homework/src/main/java/xenoteo/com/github/client/municipal_office_pb2.py
xenoteo/Distributed-Systems
86157328921e0b444f3597cb7f6b413ea8acfd51
[ "MIT" ]
null
null
null
Middleware/gRPC-homework/src/main/java/xenoteo/com/github/client/municipal_office_pb2.py
xenoteo/Distributed-Systems
86157328921e0b444f3597cb7f6b413ea8acfd51
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: municipal_office.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goog...
33.905941
546
0.767995
742a593437c91f339cadc7ba986a7799645bc447
494
py
Python
tolqc-api/app/main/encoder.py
sanger-tol/tolqc
6ef535a0eb0028c5d9270ff18d95d38c6656cbdd
[ "MIT" ]
null
null
null
tolqc-api/app/main/encoder.py
sanger-tol/tolqc
6ef535a0eb0028c5d9270ff18d95d38c6656cbdd
[ "MIT" ]
null
null
null
tolqc-api/app/main/encoder.py
sanger-tol/tolqc
6ef535a0eb0028c5d9270ff18d95d38c6656cbdd
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2021 Genome Research Ltd. # # SPDX-License-Identifier: MIT from datetime import datetime from flask.json import JSONEncoder as FlaskJSONEncoder from main.model import Base class JSONEncoder(FlaskJSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Bas...
24.7
54
0.682186
742a6a9626f9e038639016e385df897a004e9ca6
1,644
py
Python
workalendar/america/__init__.py
vanadium23/workalendar
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
[ "MIT" ]
null
null
null
workalendar/america/__init__.py
vanadium23/workalendar
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
[ "MIT" ]
null
null
null
workalendar/america/__init__.py
vanadium23/workalendar
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from .brazil import ( Brazil, BrazilAcre, BrazilAlagoas, BrazilAmapa, BrazilAmazonas, BrazilBahia, BrazilCeara, BrazilDistritoFederal, BrazilEspiritoSanto, BrazilGoias, Brazi...
26.95082
76
0.75
742a80deff2d8e4c515952f8ff40cdcd15934157
5,919
py
Python
tests/jstests/9_blockstake_output_get.py
xmonader/pytfchain
ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c
[ "Apache-2.0" ]
null
null
null
tests/jstests/9_blockstake_output_get.py
xmonader/pytfchain
ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c
[ "Apache-2.0" ]
null
null
null
tests/jstests/9_blockstake_output_get.py
xmonader/pytfchain
ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c
[ "Apache-2.0" ]
null
null
null
from Jumpscale import j from Jumpscale.clients.blockchain.tfchain.stub.ExplorerClientStub import TFChainExplorerGetClientStub def main(self): """ to run: js_shell 'j.clients.tfchain.test(name="blockstake_output_get")' """ # create a tfchain client for devnet c = j.clients.tfchain.new("mytest...
147.975
4,004
0.821591
742a830758d87c3bdba00c8a174ec008acfa145f
888
py
Python
recyclus_gateway/__init__.py
yarden-livnat/cyclus_gateway
211410817a7d0c7cff98dc678624640fd54f92cd
[ "BSD-3-Clause" ]
null
null
null
recyclus_gateway/__init__.py
yarden-livnat/cyclus_gateway
211410817a7d0c7cff98dc678624640fd54f92cd
[ "BSD-3-Clause" ]
null
null
null
recyclus_gateway/__init__.py
yarden-livnat/cyclus_gateway
211410817a7d0c7cff98dc678624640fd54f92cd
[ "BSD-3-Clause" ]
null
null
null
import os from flask import Flask from werkzeug.contrib.fixers import ProxyFix from .config import config_by_name from .db import db from .security import jwt, bcrypt from .api import blueprint as api_blueprint from .public import blueprint as public_blueprint def create_app(config_name='development'): print('cr...
26.909091
60
0.756757
742a89839821d344aec79bdbc1151e93c919abc8
579
py
Python
onadata/apps/viewer/migrations/0003_auto_20171123_1521.py
amks1/kobocat
0f36c75cc55345716558e8bece2ef48567896997
[ "BSD-2-Clause" ]
87
2015-02-10T23:36:28.000Z
2022-01-31T00:51:10.000Z
onadata/apps/viewer/migrations/0003_auto_20171123_1521.py
amks1/kobocat
0f36c75cc55345716558e8bece2ef48567896997
[ "BSD-2-Clause" ]
443
2015-04-28T18:50:25.000Z
2022-03-31T03:29:43.000Z
onadata/apps/viewer/migrations/0003_auto_20171123_1521.py
amks1/kobocat
0f36c75cc55345716558e8bece2ef48567896997
[ "BSD-2-Clause" ]
122
2015-01-13T16:27:44.000Z
2022-01-24T09:35:56.000Z
# coding: utf-8 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('viewer', '0002_auto_20160205_1915'), ] operations = [ migrations.AlterField( model_name='export', name='export_type', field=models.CharFi...
32.166667
272
0.557858
742ad69cbdc0ca44afcec67781e169eaf93c2daa
2,298
py
Python
ndn_hydra/client/functions/delete.py
UCLA-IRL/ndn-hydra
e01829253876ff6dbfd6dfaa92142eca08cd6705
[ "Apache-2.0" ]
2
2021-04-14T04:12:14.000Z
2021-04-23T02:28:49.000Z
ndn_hydra/client/functions/delete.py
ZixuanZhong/hydra
e01829253876ff6dbfd6dfaa92142eca08cd6705
[ "Apache-2.0" ]
10
2021-07-03T18:29:26.000Z
2022-02-01T04:11:20.000Z
ndn_hydra/client/functions/delete.py
ZixuanZhong/ndn-distributed-repo
e01829253876ff6dbfd6dfaa92142eca08cd6705
[ "Apache-2.0" ]
null
null
null
# ---------------------------------------------------------- # NDN Hydra Delete Client # ---------------------------------------------------------- # @Project: NDN Hydra # @Date: 2021-01-25 # @Authors: Please check AUTHORS.rst # @Source-Code: https://github.com/UCLA-IRL/ndn-hydra # @Documentation: https://n...
40.315789
97
0.613577
742adc8597d02018961ab9921be72f23e8c51f68
35,056
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.430925
261
0.677288
742ae8afc8b4ac6ea2ea997ee3948596e7e3ef80
513
py
Python
mission_planner/test_mp.py
nnz1024/apointer
5c7304fb1942279421311d6b85d80c96b2b0620a
[ "WTFPL" ]
null
null
null
mission_planner/test_mp.py
nnz1024/apointer
5c7304fb1942279421311d6b85d80c96b2b0620a
[ "WTFPL" ]
null
null
null
mission_planner/test_mp.py
nnz1024/apointer
5c7304fb1942279421311d6b85d80c96b2b0620a
[ "WTFPL" ]
1
2020-12-12T19:38:54.000Z
2020-12-12T19:38:54.000Z
# -*- coding: cp1251 -*- print "Starting..." print "Waiting for GPS..." while (cs.lat == 0): Script.Sleep(1000) print "Got GPS!" fi = open(u"C:\mps_test.txt", "w") for it in range(1, 201): fi.write("cnt={0:3d}; lat={1:10.6f}; lng={2:10.6f}; alt={3:8.1f}\r\n". format(it, cs.lat, cs.lng...
30.176471
79
0.506823
742b0d8e153f04a16eb81effbd4a09be46d934fc
2,051
py
Python
AsteroidsEquipe2/ufo.py
LUDUSLab/stem-games
347afa8b1511d76f8070fa69f27a49b57e551376
[ "MIT" ]
2
2021-01-24T01:04:34.000Z
2021-05-06T16:25:53.000Z
AsteroidsEquipe2/ufo.py
LUDUSLab/stem-games
347afa8b1511d76f8070fa69f27a49b57e551376
[ "MIT" ]
null
null
null
AsteroidsEquipe2/ufo.py
LUDUSLab/stem-games
347afa8b1511d76f8070fa69f27a49b57e551376
[ "MIT" ]
3
2021-01-26T21:35:43.000Z
2021-05-06T16:06:47.000Z
import pygame from math import atan2, pi, cos, sin, radians import config import projectile import gameobject from random import uniform, randrange class UFO(gameobject.GameObject): PROJECTILE_SPEED = 8 def __init__(self, position, size, projectile_callback, ufo_in_menu=False): self.size = size ...
41.857143
115
0.648952
742b1901a1f6f837a29cd32a8568f7cf009a07b0
1,126
py
Python
scripts/rotate.py
PatricioIribarneCatella/3D-rotation
f5455b5d26c1867e264e7c29ba9d99e54b29e0bb
[ "MIT" ]
1
2021-05-13T19:27:38.000Z
2021-05-13T19:27:38.000Z
scripts/rotate.py
PatricioIribarneCatella/3D-rotation
f5455b5d26c1867e264e7c29ba9d99e54b29e0bb
[ "MIT" ]
null
null
null
scripts/rotate.py
PatricioIribarneCatella/3D-rotation
f5455b5d26c1867e264e7c29ba9d99e54b29e0bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from numpy import sqrt, power, sin, cos, deg2rad def rotate(x, y, angle): _x = x * cos(angle) - y * sin(angle) _y = x * sin(angle) + y * cos(angle) return _x, _y def vector_length(x, y, z): return sqrt(power(x, 2) + power(y, 2) + power(z, 2)) def main(x, y, z, al...
22.979592
63
0.577265
742b24439fcf0342dd924dbe27233371130f3ce6
2,385
py
Python
.leetcode/338.counting-bits.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/338.counting-bits.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/338.counting-bits.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
# @lc app=leetcode id=338 lang=python3 # # [338] Counting Bits # # https://leetcode.com/problems/counting-bits/description/ # # algorithms # Easy (71.29%) # Likes: 4498 # Dislikes: 231 # Total Accepted: 392K # Total Submissions: 549.6K # Testcase Example: '2' # # Given an integer n, return an array ans of length...
17.408759
78
0.52914
742b3b05115bd50f8e7d8c4ead5323ff9464cc79
1,238
py
Python
setup.py
mixman/mockldap
fdf6a20d0c5d15213f99cdadfbcc0677128ab49e
[ "BSD-2-Clause" ]
null
null
null
setup.py
mixman/mockldap
fdf6a20d0c5d15213f99cdadfbcc0677128ab49e
[ "BSD-2-Clause" ]
null
null
null
setup.py
mixman/mockldap
fdf6a20d0c5d15213f99cdadfbcc0677128ab49e
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import setup setup( name='mockldap-fork', version='0.1.6', description=u"Mockldap fork, A simple mock implementation of python-ldap.", long_description=open('README').read(), url='http://bitbucket.org/psagers/mockldap/', author='Peter Sagerson', author...
30.195122
88
0.596931
742b3d80ed9bdb252a329f55cefaa68e7343b715
1,690
py
Python
compute_metrics.py
yzhouas/TransFill-Reference-Inpainting
a397862dd6837e4eb38ec650fe015f8754c8fb9e
[ "MIT" ]
63
2021-04-11T19:37:24.000Z
2022-03-11T08:36:51.000Z
compute_metrics.py
yzhouas/TransFill-Reference-Inpainting
a397862dd6837e4eb38ec650fe015f8754c8fb9e
[ "MIT" ]
2
2021-06-01T21:17:56.000Z
2022-01-24T14:31:44.000Z
compute_metrics.py
yzhouas/TransFill-Reference-Inpainting
a397862dd6837e4eb38ec650fe015f8754c8fb9e
[ "MIT" ]
3
2021-08-23T22:35:00.000Z
2021-12-14T06:22:40.000Z
import numpy as np from skimage.metrics import structural_similarity as comp_ssim import lpips import glob import os import imageio import torch import math def calc_ssim( hr, sr, align=False): sr = np.transpose(sr[0].cpu().numpy(), (1,2,0)) hr = np.transpose(hr[0].cpu().numpy(), (1,2,0)) return comp_ssim(...
29.649123
94
0.636095
742b4ce648f3f8e5474448e4cc855f465f47b6c5
1,000
py
Python
sqltester/tests/test_create_sqltester_object.py
andreashuebner/sqltester
518c5e9336d2dae348ec09ae32436e7f03c70278
[ "MIT" ]
2
2020-10-08T11:43:49.000Z
2020-10-11T15:51:03.000Z
sqltester/tests/test_create_sqltester_object.py
andreashuebner/sqltester
518c5e9336d2dae348ec09ae32436e7f03c70278
[ "MIT" ]
null
null
null
sqltester/tests/test_create_sqltester_object.py
andreashuebner/sqltester
518c5e9336d2dae348ec09ae32436e7f03c70278
[ "MIT" ]
null
null
null
import unittest import sys import os.path sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) from sqltester_driver import SqlTester from sqltester_driver import MissingCommandLineArgumentsError class TestCreateSqlTesterObject(unittest.TestCase): def test_input_parameter_empty_st...
47.619048
97
0.778
742b5246be64f9761939aefc4d01a265a26d2551
437
py
Python
solowpy/__init__.py
davidrpugh/solowPy
91577e04481cec80679ae571ec2bdaa5788151b4
[ "MIT" ]
31
2016-02-29T00:20:53.000Z
2022-01-26T17:40:38.000Z
solowpy/__init__.py
rfonsek/solowPy
91577e04481cec80679ae571ec2bdaa5788151b4
[ "MIT" ]
11
2015-04-04T20:01:35.000Z
2017-02-20T05:42:49.000Z
solowpy/__init__.py
rfonsek/solowPy
91577e04481cec80679ae571ec2bdaa5788151b4
[ "MIT" ]
20
2015-08-23T23:42:09.000Z
2022-02-23T08:00:53.000Z
""" models directory imports objects imported here will live in the `solowpy` namespace """ __all__ = ['model', 'Model', 'CobbDouglasModel', 'CESModel'] from . model import Model from . import model from . cobb_douglas import CobbDouglasModel from . import cobb_douglas from . ces import CESModel from . import ces #...
21.85
60
0.775744
742b59c804982a15d3bf318537e5616140d1a378
2,147
py
Python
dask_kubernetes/experimental/tests/test_kubecluster.py
ddelange/dask-kubernetes
42bcf9817ea963bf048f9dd06caec1622656302a
[ "BSD-3-Clause" ]
1
2022-01-20T12:38:27.000Z
2022-01-20T12:38:27.000Z
dask_kubernetes/experimental/tests/test_kubecluster.py
ddelange/dask-kubernetes
42bcf9817ea963bf048f9dd06caec1622656302a
[ "BSD-3-Clause" ]
null
null
null
dask_kubernetes/experimental/tests/test_kubecluster.py
ddelange/dask-kubernetes
42bcf9817ea963bf048f9dd06caec1622656302a
[ "BSD-3-Clause" ]
null
null
null
import pytest from dask.distributed import Client from dask_kubernetes.experimental import KubeCluster @pytest.fixture def cluster(kopf_runner, docker_image): with kopf_runner: with KubeCluster(name="foo", image=docker_image) as cluster: yield cluster def test_kubecluster(cluster): wit...
36.389831
83
0.658593
742b718c1bb0bb641c8d145a579b182db5398d91
353
py
Python
setup.py
KIodine/pygraph
68f0975cfc130fe6bfd8a36dd347efc57acc0799
[ "MIT" ]
null
null
null
setup.py
KIodine/pygraph
68f0975cfc130fe6bfd8a36dd347efc57acc0799
[ "MIT" ]
1
2021-03-30T04:03:33.000Z
2021-03-30T08:19:29.000Z
setup.py
KIodine/pygraph
68f0975cfc130fe6bfd8a36dd347efc57acc0799
[ "MIT" ]
1
2021-03-30T04:15:08.000Z
2021-03-30T04:15:08.000Z
import setuptools attrs = { "name": "pygraph", "version": "0.0.1a", "description": "Graph related algorithms and data structures in Python.", "author": "KIodine", "packages": setuptools.find_packages(), "python_requires": ">=3.7", } # Use `pip install -e .` for develope install. ...
22.0625
78
0.606232
742b916096eabf781b0bd702d5b344af557e68ac
1,214
py
Python
tests/test_bug/test_issue_004.py
Eastwu5788/pre-request
6e51076ef9260d5fcf56dc513ad0240f04ce4938
[ "MIT" ]
86
2017-08-17T12:41:52.000Z
2022-02-24T12:17:47.000Z
tests/test_bug/test_issue_004.py
Eastwu5788/pre-request
6e51076ef9260d5fcf56dc513ad0240f04ce4938
[ "MIT" ]
10
2020-03-30T03:24:46.000Z
2022-02-23T01:34:53.000Z
tests/test_bug/test_issue_004.py
Eastwu5788/pre-request
6e51076ef9260d5fcf56dc513ad0240f04ce4938
[ "MIT" ]
7
2017-08-18T03:40:35.000Z
2020-05-19T04:09:10.000Z
# !/usr/local/python/bin/python # -*- coding: utf-8 -*- # (C) Wu Dong, 2020 # All rights reserved # @Author: 'Wu Dong <wudong@eastwu.cn>' # @Time: '2020-12-21 13:07' import json from flask import make_response, Flask from pre_request import pre, Rule app = Flask(__name__) app.config["TESTING"] = True client = app.tes...
22.481481
64
0.587315
742bbdcf0fbe48d4014a518fd0db986829f759e0
14,222
py
Python
tests/dbobject/test_textsearch.py
andreypopp/Pyrseas
5fadc91bfd1e3e430e8f53d434df18b9abea3cb0
[ "BSD-3-Clause" ]
1
2015-03-16T09:10:47.000Z
2015-03-16T09:10:47.000Z
tests/dbobject/test_textsearch.py
andreypopp/Pyrseas
5fadc91bfd1e3e430e8f53d434df18b9abea3cb0
[ "BSD-3-Clause" ]
null
null
null
tests/dbobject/test_textsearch.py
andreypopp/Pyrseas
5fadc91bfd1e3e430e8f53d434df18b9abea3cb0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Test text search objects""" import unittest from pyrseas.testutils import DatabaseToMapTestCase from pyrseas.testutils import InputMapToSqlTestCase, fix_indent CREATE_TSC_STMT = "CREATE TEXT SEARCH CONFIGURATION tsc1 (PARSER = tsp1)" CREATE_TSD_STMT = "CREATE TEXT SEARCH DICTIONARY tsd1 (T...
43.227964
79
0.642526
742bc3513b152afd116bc18efa903e15dd95521c
1,855
py
Python
backup/KaggleWord2VecUtility.py
ddboline/kaggle_imdb_sentiment_model
bd422254695000d2278d1cd1896611611272e7b9
[ "MIT" ]
1
2015-11-29T20:24:56.000Z
2015-11-29T20:24:56.000Z
backup/KaggleWord2VecUtility.py
ddboline/kaggle_imdb_sentiment_model
bd422254695000d2278d1cd1896611611272e7b9
[ "MIT" ]
null
null
null
backup/KaggleWord2VecUtility.py
ddboline/kaggle_imdb_sentiment_model
bd422254695000d2278d1cd1896611611272e7b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python #KaggleWord2VecUtility is a utility class for processing raw HTML text into segments for further learning import re import nltk import pandas as pd import numpy as np from bs4 import BeautifulSoup from nltk.corpus import stopwords def review_to_wordlist(review, remove_stopwords=False): # ...
33.727273
105
0.689488
742bf1764ad176b0fb040ccfbd1c77db5718e48b
18,120
py
Python
src/olympia/zadmin/views.py
hiikezoe/addons-server
1574d92fae097796b40b54579e3c7eeb876d6e32
[ "BSD-3-Clause" ]
null
null
null
src/olympia/zadmin/views.py
hiikezoe/addons-server
1574d92fae097796b40b54579e3c7eeb876d6e32
[ "BSD-3-Clause" ]
null
null
null
src/olympia/zadmin/views.py
hiikezoe/addons-server
1574d92fae097796b40b54579e3c7eeb876d6e32
[ "BSD-3-Clause" ]
null
null
null
import csv from django import http from django.apps import apps from django.conf import settings from django.contrib import admin from django.core.cache import cache from django.core.exceptions import PermissionDenied from django.core.files.storage import default_storage as storage from django.shortcuts import get_obj...
36.023857
79
0.648951
742c14434c10d8b6f8ee85028326c7c848a29d73
1,983
py
Python
dali_tf_plugin/nvidia/dali_tf_plugin/dali_tf_plugin.py
ancientmooner/DALI
355e8db8130cee0d20e9ae3d698f195278544995
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali_tf_plugin/nvidia/dali_tf_plugin/dali_tf_plugin.py
ancientmooner/DALI
355e8db8130cee0d20e9ae3d698f195278544995
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali_tf_plugin/nvidia/dali_tf_plugin/dali_tf_plugin.py
ancientmooner/DALI
355e8db8130cee0d20e9ae3d698f195278544995
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-26T14:59:51.000Z
2020-04-26T14:59:51.000Z
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
39.66
119
0.727181
742c1c9fb606b2fdffb1f19813f8a033b2a6b1d9
570
py
Python
05_communication_thread/lifoQueues.py
837477/Python_Parallel
7590ff38e6a2b1dbec139e9571b6564b5bbf276f
[ "MIT" ]
67
2017-08-27T18:00:46.000Z
2022-03-01T11:54:16.000Z
05_communication_thread/lifoQueues.py
837477/python_parallel_programming_study
2294f4a3de9e9f5b16b6772a3a8d96c37eb63c0f
[ "MIT" ]
8
2018-10-18T17:15:45.000Z
2021-12-24T01:58:05.000Z
05_communication_thread/lifoQueues.py
837477/python_parallel_programming_study
2294f4a3de9e9f5b16b6772a3a8d96c37eb63c0f
[ "MIT" ]
49
2017-08-18T12:53:30.000Z
2022-02-06T09:40:50.000Z
import threading import queue import random import time def mySubscriber(queue): while not queue.empty(): item = queue.get() if item is None: break print("{} removed {} from the queue".format(threading.current_thread(), item)) queue.task_done() myQueue = queue.LifoQueue() for i in range(10):...
17.8125
82
0.691228
742c379a1044569778a6f49d9d0e0f98d644ad54
701
py
Python
setup.py
prevac/QuaternionsRepo
ec04c836d0881e41c052a96593e7683b31adf642
[ "MIT" ]
null
null
null
setup.py
prevac/QuaternionsRepo
ec04c836d0881e41c052a96593e7683b31adf642
[ "MIT" ]
null
null
null
setup.py
prevac/QuaternionsRepo
ec04c836d0881e41c052a96593e7683b31adf642
[ "MIT" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name='quaterion', version='1.0', description='A simple and efficient library for computations with quaternions.', long_description=long_description, long_description_content_type="text/markdo...
33.380952
86
0.633381