hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c842c3e0b1ba6e7247b6acb8e78bef80838b7699 | 12,589 | py | Python | hannds_data.py | cemfi/hannds | 4a7e99170faf6d7cf6a9e0c705539a48fd741521 | [
"MIT"
] | 9 | 2020-02-11T02:23:29.000Z | 2021-10-05T13:51:38.000Z | hannds_data.py | cemfi/hannds | 4a7e99170faf6d7cf6a9e0c705539a48fd741521 | [
"MIT"
] | 1 | 2020-10-29T20:44:39.000Z | 2020-10-29T20:44:39.000Z | hannds_data.py | cemfi/hannds | 4a7e99170faf6d7cf6a9e0c705539a48fd741521 | [
"MIT"
] | null | null | null | """Provides training, validation and test2 data."""
import math
from collections import namedtuple
import os
import numpy as np
import pretty_midi
from torch.utils.data import Dataset, DataLoader
from torch.utils.data.sampler import Sampler
import hannds_files
def train_valid_test_data_windowed(len_train_sequence,... | 37.467262 | 120 | 0.663754 |
0616a991e50351327061186ffc52d5afabbbf6f3 | 2,978 | py | Python | setup.py | rickyHong/Tensorflow-RL-repl | 2c07ac22512a16715cc759f0072be43a5d12ae45 | [
"Apache-2.0"
] | null | null | null | setup.py | rickyHong/Tensorflow-RL-repl | 2c07ac22512a16715cc759f0072be43a5d12ae45 | [
"Apache-2.0"
] | null | null | null | setup.py | rickyHong/Tensorflow-RL-repl | 2c07ac22512a16715cc759f0072be43a5d12ae45 | [
"Apache-2.0"
] | 1 | 2019-04-14T13:58:18.000Z | 2019-04-14T13:58:18.000Z | # Copyright 2018 The trfl 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 applicable law... | 34.627907 | 78 | 0.669577 |
b1e1024a0b7fa2429686f872d954031ffd9dc57a | 10,538 | py | Python | skimage/feature/texture.py | laurent-george/scikit-image | 62343977a46eb0dcb7c488788ebf3d23f2cb6ab5 | [
"BSD-3-Clause"
] | 1 | 2019-09-08T15:01:42.000Z | 2019-09-08T15:01:42.000Z | skimage/feature/texture.py | laurent-george/scikit-image | 62343977a46eb0dcb7c488788ebf3d23f2cb6ab5 | [
"BSD-3-Clause"
] | null | null | null | skimage/feature/texture.py | laurent-george/scikit-image | 62343977a46eb0dcb7c488788ebf3d23f2cb6ab5 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T18:22:50.000Z | 2021-09-28T18:22:50.000Z | """
Methods to characterize image textures.
"""
import numpy as np
from skimage._shared.utils import assert_nD
from ._texture import _glcm_loop, _local_binary_pattern
def greycomatrix(image, distances, angles, levels=256, symmetric=False,
normed=False):
"""Calculate the grey-level co-occurrence ... | 35.843537 | 111 | 0.567375 |
f429fb6b4bf3fe99f5c83823ce7c67d8be9332d7 | 2,062 | py | Python | data/config.py | GzuPark/EXTD_Pytorch | c4a442d5dbf0452ae47218121de19a5acb844398 | [
"MIT"
] | 190 | 2019-07-29T15:31:47.000Z | 2022-01-27T04:30:06.000Z | data/config.py | lly8752/EXTD_Pytorch | e99af10f282d07054c1cf7c4b8c035084daaff78 | [
"MIT"
] | 16 | 2019-07-31T05:23:41.000Z | 2021-01-27T06:13:49.000Z | data/config.py | lly8752/EXTD_Pytorch | e99af10f282d07054c1cf7c4b8c035084daaff78 | [
"MIT"
] | 62 | 2019-07-29T15:31:01.000Z | 2022-03-28T01:34:02.000Z | #-*- coding:utf-8 -*-
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
import os
from easydict import EasyDict
import numpy as np
_C = EasyDict()
cfg = _C
# data augument config
_C.expand_prob = 0.5
_C.expand_max_ratio = 4
_C.hue_prob = 0.5... | 23.976744 | 78 | 0.682832 |
e1dce8a7f50dab0140e229f89646a16706f67aa2 | 580 | py | Python | marvin_teste_engine/prediction/prediction_preparator.py | cerliofaccojr/cancer-diagnosis-engine | 08f1e8568579d7c31ec0772f214eca8c608649d8 | [
"Apache-2.0"
] | null | null | null | marvin_teste_engine/prediction/prediction_preparator.py | cerliofaccojr/cancer-diagnosis-engine | 08f1e8568579d7c31ec0772f214eca8c608649d8 | [
"Apache-2.0"
] | null | null | null | marvin_teste_engine/prediction/prediction_preparator.py | cerliofaccojr/cancer-diagnosis-engine | 08f1e8568579d7c31ec0772f214eca8c608649d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""PredictionPreparator engine action.
Use this module to add the project main code.
"""
from .._compatibility import six
from .._logging import get_logger
from marvin_python_toolbox.engine_base import EngineBasePrediction
__all__ = ['PredictionPreparator']
logger = get_logge... | 22.307692 | 66 | 0.760345 |
3ada528162248abc5c4e4027cecc9197f75b4a20 | 1,914 | py | Python | lang/Python/24-game-1.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/24-game-1.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/24-game-1.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | '''
The 24 Game
Given any four digits in the range 1 to 9, which may have repetitions,
Using just the +, -, *, and / operators; and the possible use of
brackets, (), show how to make an answer of 24.
An answer of "q" will quit the game.
An answer of "!" will generate a new set of four digits.
Otherwise you are... | 24.857143 | 78 | 0.57419 |
3f496ecc8685ed51b6a98a4600d08f301f4e596f | 4,869 | py | Python | jc/parsers/route.py | jon-rd/jc | 1e18dd30a824b0463f0cad86e0da7094c47d34f9 | [
"MIT"
] | null | null | null | jc/parsers/route.py | jon-rd/jc | 1e18dd30a824b0463f0cad86e0da7094c47d34f9 | [
"MIT"
] | null | null | null | jc/parsers/route.py | jon-rd/jc | 1e18dd30a824b0463f0cad86e0da7094c47d34f9 | [
"MIT"
] | null | null | null | """jc - JSON CLI output utility `route` command output parser
Usage (cli):
$ route | jc --route
or
$ jc route
Usage (module):
import jc.parsers.route
result = jc.parsers.route.parse(route_command_output)
Compatibility:
'linux'
Examples:
$ route -ee | jc --route -p
[
{
... | 23.075829 | 129 | 0.456151 |
0fc3aa8e201a279bbf1f9e24eab44792d7f7668f | 1,368 | py | Python | transactions/migrations/0001_initial.py | salimsuleiman/plt | b0a4fdbb5e765518e44440f12ef306a7aa60c382 | [
"MIT"
] | 2 | 2022-03-25T09:22:54.000Z | 2022-03-30T19:57:42.000Z | transactions/migrations/0001_initial.py | salimsuleiman/plt | b0a4fdbb5e765518e44440f12ef306a7aa60c382 | [
"MIT"
] | null | null | null | transactions/migrations/0001_initial.py | salimsuleiman/plt | b0a4fdbb5e765518e44440f12ef306a7aa60c382 | [
"MIT"
] | 1 | 2022-03-30T19:58:54.000Z | 2022-03-30T19:58:54.000Z | # Generated by Django 4.0 on 2022-03-14 10:04
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Transaction',
fields=[
('id', models.BigAutoF... | 45.6 | 211 | 0.611111 |
f7047aea295f4a46ad31eccfb2a0560c06204007 | 140 | py | Python | ctpbee/context/__init__.py | yutiansut/ctpbee | 02ceb3d4456a54b1b4f8066a2662c4b8fac1027f | [
"MIT"
] | 1 | 2019-10-31T06:45:44.000Z | 2019-10-31T06:45:44.000Z | ctpbee/context/__init__.py | dengwen168/ctpbee | 466d1f804784cf2c3e7f2ed5d28bbcf1068c9215 | [
"MIT"
] | null | null | null | ctpbee/context/__init__.py | dengwen168/ctpbee | 466d1f804784cf2c3e7f2ed5d28bbcf1068c9215 | [
"MIT"
] | 3 | 2019-11-21T03:38:14.000Z | 2022-02-14T08:09:11.000Z | from .proxy import current_app, _app_context_ctx, switch_app, get_app
__all__ = [
current_app, _app_context_ctx, switch_app, get_app
]
| 23.333333 | 69 | 0.785714 |
0e37fd324150be112648ff0bf54982a0f8c2847a | 1,644 | py | Python | Python/gapped_pssms/background.py | JohnReid/biopsy | 1eeb714ba5b53f2ecf776d865d32e2078cbc0338 | [
"MIT"
] | null | null | null | Python/gapped_pssms/background.py | JohnReid/biopsy | 1eeb714ba5b53f2ecf776d865d32e2078cbc0338 | [
"MIT"
] | null | null | null | Python/gapped_pssms/background.py | JohnReid/biopsy | 1eeb714ba5b53f2ecf776d865d32e2078cbc0338 | [
"MIT"
] | null | null | null | #
# Copyright John Reid 2008
#
"""
Code to help use a background model with gapped PSSMs.
"""
import numpy
def _log_c_accumulated(c):
log_c = numpy.log(c)
log_c_accumulated = numpy.empty_like(log_c)
log_c_accumulated[0] = log_c[0]
log_c_rev_accum = numpy.empty_like(log_c)
log_c_rev_accum[-1] = l... | 34.25 | 107 | 0.687348 |
20ca40173ce5ea5d47a4cc7bb1a60e4f0cd2f0ff | 2,641 | py | Python | app/program.py | igorsilva3/calculator-python | cf4e899c812f4531a49ab5adf7d878428429ee97 | [
"MIT"
] | 4 | 2020-08-17T23:34:37.000Z | 2021-10-05T02:59:59.000Z | app/program.py | igorsilva3/calculator-python | cf4e899c812f4531a49ab5adf7d878428429ee97 | [
"MIT"
] | null | null | null | app/program.py | igorsilva3/calculator-python | cf4e899c812f4531a49ab5adf7d878428429ee97 | [
"MIT"
] | null | null | null | from PySide2 import QtGui, QtCore, QtWidgets
from app.interface import Ui_MainWindow
class Calculator(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self):
super(Calculator, self).__init__()
self.setupUi(self)
self.numbers = ""
self.btn0.clicked.connect(lambda: self.set_text_... | 45.534483 | 94 | 0.671715 |
391d1ffa3e2f85956aaa066bb4d49dba512c1efa | 35,927 | py | Python | tests/regressiontests/admin_views/tests.py | weigj/django-multidb | 0ab4582ce1dd99cac5d36685e0a2377b3340887a | [
"BSD-3-Clause"
] | 1 | 2016-05-08T20:51:15.000Z | 2016-05-08T20:51:15.000Z | tests/regressiontests/admin_views/tests.py | weigj/django-multidb | 0ab4582ce1dd99cac5d36685e0a2377b3340887a | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/admin_views/tests.py | weigj/django-multidb | 0ab4582ce1dd99cac5d36685e0a2377b3340887a | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User, Permission
from django.contrib.contenttypes.models import ContentType
from django.contrib.admin.models import LogEntry
from django.contrib.admin.sites import LOGIN_FORM_KEY
from django.contrib.admin.util import quote
from dja... | 48.681572 | 125 | 0.639408 |
61422e945c2c8386fc013a0a847f43a34bc512b5 | 972 | py | Python | analysis/codelists.py | SRW612/OpenSafely_SRW | c2dadc876b8e8ae265d4b96e5e2dbab9acbdca93 | [
"MIT"
] | null | null | null | analysis/codelists.py | SRW612/OpenSafely_SRW | c2dadc876b8e8ae265d4b96e5e2dbab9acbdca93 | [
"MIT"
] | null | null | null | analysis/codelists.py | SRW612/OpenSafely_SRW | c2dadc876b8e8ae265d4b96e5e2dbab9acbdca93 | [
"MIT"
] | null | null | null | from cohortextractor.codelistlib import codelist_from_csv
RTI_codes = codelist_from_csv(
"codelists/user-S_Walter-respiratory-tract-infections.csv", system="snomed", column="code"
)
aRTI_codes = codelist_from_csv(
"codelists/user-S_Walter-acute-respiratory-tract-infections.csv", system="snomed", column="code"... | 33.517241 | 100 | 0.772634 |
6a480e69649b3102093a937f7eb13abc387c4b98 | 7,878 | py | Python | encoder.py | mattdano/generating-reviews-discovering-sentiment | 5b6e70da9bba138cc366012cdf65451462597126 | [
"MIT"
] | 1 | 2019-10-18T06:53:28.000Z | 2019-10-18T06:53:28.000Z | encoder.py | mattdano/generating-reviews-discovering-sentiment | 5b6e70da9bba138cc366012cdf65451462597126 | [
"MIT"
] | null | null | null | encoder.py | mattdano/generating-reviews-discovering-sentiment | 5b6e70da9bba138cc366012cdf65451462597126 | [
"MIT"
] | null | null | null | import time
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from sklearn.externals import joblib
from utils import HParams, preprocess, iter_data
global nloaded
nloaded = 0
def load_params(shape, dtype, *args, **kwargs):
global nloaded
nloaded += 1
return params[nloaded - 1]
def embd... | 34.401747 | 80 | 0.52361 |
2ddf74e71af85444ce2ea53a29ad413843189c8c | 1,083 | py | Python | rlutil/envs/tabular_cy/test_mountaincar.py | alexlioralexli/diagnosing_qlearning | 20a4338a324c1bab79e6ca65937830529d941302 | [
"MIT"
] | 16 | 2019-05-10T18:10:27.000Z | 2022-02-01T09:50:01.000Z | rlutil/envs/tabular_cy/test_mountaincar.py | alexlioralexli/diagnosing_qlearning | 20a4338a324c1bab79e6ca65937830529d941302 | [
"MIT"
] | null | null | null | rlutil/envs/tabular_cy/test_mountaincar.py | alexlioralexli/diagnosing_qlearning | 20a4338a324c1bab79e6ca65937830529d941302 | [
"MIT"
] | 4 | 2019-08-11T23:20:35.000Z | 2021-04-07T07:13:40.000Z | import unittest
import parameterized
import numpy as np
from rlutil.envs.tabular_cy import q_iteration, tabular_env
from rlutil.envs.tabular_cy import q_iteration_py
class QIterationTest(unittest.TestCase):
def setUp(self):
self.env = tabular_env.MountainCar(posdisc=56, veldisc=32)
self.env_small... | 30.083333 | 72 | 0.629732 |
3e1d906a68da48c9028085b4e9600dadada40489 | 332 | py | Python | Events.py | jakehyvonen/PaintByMotors | 6ec568633e0f8bbddeb5d1731d21144a2b6a5ced | [
"MIT"
] | null | null | null | Events.py | jakehyvonen/PaintByMotors | 6ec568633e0f8bbddeb5d1731d21144a2b6a5ced | [
"MIT"
] | null | null | null | Events.py | jakehyvonen/PaintByMotors | 6ec568633e0f8bbddeb5d1731d21144a2b6a5ced | [
"MIT"
] | null | null | null | class Event:
def __init__(self):
self.listeners = []
def __iadd__(self, listener):
"""Shortcut for using += to add a listener."""
self.listeners.append(listener)
return self
def notify(self, *args, **kwargs):
for listener in self.listeners:
listener(*arg... | 27.666667 | 54 | 0.587349 |
e4bfa9e7edb97e13d120f24766665e70265bb350 | 138 | py | Python | utils/imports.py | vishalkuo/codeStats | f2dd167966cc342170f1812f424c252d1df29a54 | [
"MIT"
] | null | null | null | utils/imports.py | vishalkuo/codeStats | f2dd167966cc342170f1812f424c252d1df29a54 | [
"MIT"
] | null | null | null | utils/imports.py | vishalkuo/codeStats | f2dd167966cc342170f1812f424c252d1df29a54 | [
"MIT"
] | null | null | null | def module_exists(name):
try:
__import__(str(name))
except ImportError:
return False
else:
return True | 19.714286 | 29 | 0.594203 |
ed4d65eadde24c67ead3cc7a5f3d050a0503bcbb | 658 | py | Python | login/migrations/0036_auto_20170414_1643.py | anilkumarmeena/Bitora | c8ccfa6c2369c9da4bd273dddb783f870c09889f | [
"Apache-2.0"
] | 2 | 2018-02-12T09:54:33.000Z | 2019-03-31T14:32:32.000Z | login/migrations/0036_auto_20170414_1643.py | frknnlzts/howto | bba8b8080df480c2ee95a7f9913a7153cc02f65e | [
"Apache-2.0"
] | 8 | 2017-12-27T16:19:25.000Z | 2017-12-29T00:21:03.000Z | login/migrations/0036_auto_20170414_1643.py | frknnlzts/howto | bba8b8080df480c2ee95a7f9913a7153cc02f65e | [
"Apache-2.0"
] | 2 | 2019-02-22T08:13:29.000Z | 2019-10-08T12:11:21.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-14 11:13
from __future__ import unicode_literals
from django.db import migrations, models
import draceditor.models
class Migration(migrations.Migration):
dependencies = [
('login', '0035_auto_20170411_0238'),
]
operations = [
... | 24.37037 | 75 | 0.609422 |
c621aec374d5bb8f37ebbfef307e73977ddcc139 | 46 | py | Python | test/example/blockdmask.py | lawsn/crawlingpy | d8737fb4964bf2492fbd91557cd6a152dd80889a | [
"Apache-2.0"
] | null | null | null | test/example/blockdmask.py | lawsn/crawlingpy | d8737fb4964bf2492fbd91557cd6a152dd80889a | [
"Apache-2.0"
] | null | null | null | test/example/blockdmask.py | lawsn/crawlingpy | d8737fb4964bf2492fbd91557cd6a152dd80889a | [
"Apache-2.0"
] | null | null | null | import bs4
print("BlockDMask")
print(3 + 4)
| 7.666667 | 19 | 0.673913 |
cc7a5425ddf1cfee75c472ab1e83d46d59238068 | 11,925 | py | Python | neutron/db/quota/driver.py | dhanunjaya/neutron | 6fac4b8331a70bcf0f1c5757f2bbfcd0bcb328a0 | [
"Apache-2.0"
] | null | null | null | neutron/db/quota/driver.py | dhanunjaya/neutron | 6fac4b8331a70bcf0f1c5757f2bbfcd0bcb328a0 | [
"Apache-2.0"
] | null | null | null | neutron/db/quota/driver.py | dhanunjaya/neutron | 6fac4b8331a70bcf0f1c5757f2bbfcd0bcb328a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation.
# 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 req... | 46.22093 | 79 | 0.633543 |
8782a8f42126346eb13b2743a36dfb33da3a4094 | 377 | py | Python | tests/sample/pep572_exceptional_lambda.py | JarryShaw/walrus | cb748496974c4c8b1a68907d46eff2845db75e84 | [
"MIT"
] | 4 | 2020-06-01T17:38:15.000Z | 2022-03-26T12:01:16.000Z | tests/sample/pep572_exceptional_lambda.py | pybpc/walrus | cb748496974c4c8b1a68907d46eff2845db75e84 | [
"MIT"
] | 23 | 2020-05-31T09:24:49.000Z | 2021-02-22T19:29:23.000Z | tests/sample/pep572_exceptional_lambda.py | pybpc/walrus | cb748496974c4c8b1a68907d46eff2845db75e84 | [
"MIT"
] | 1 | 2019-11-09T00:34:37.000Z | 2019-11-09T00:34:37.000Z | import re
(lambda: ((x := 99), print(x)))() # Valid, but unlikely to be useful
print(globals().get('x'))
(lambda: ([x := i ** 2 for i in range(10)], print(x)))() # comprehension in lambda
print(globals().get('x'))
(x := lambda: 111) # Valid
print(x())
print((lambda line: (m := re.match(r'(\d+) (\d+)', line)) and m.... | 34.272727 | 94 | 0.578249 |
878a813f3eff541d85a92c62c5f0523a15f32877 | 10,859 | py | Python | docx/oxml/text/parfmt.py | fepec/python-docx | c5d007b23b32d782f6c2e753aed44e05e17b53e5 | [
"MIT"
] | null | null | null | docx/oxml/text/parfmt.py | fepec/python-docx | c5d007b23b32d782f6c2e753aed44e05e17b53e5 | [
"MIT"
] | null | null | null | docx/oxml/text/parfmt.py | fepec/python-docx | c5d007b23b32d782f6c2e753aed44e05e17b53e5 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
Custom element classes related to paragraph properties (CT_PPr).
"""
from ...enum.text import (
WD_ALIGN_PARAGRAPH, WD_LINE_SPACING, WD_TAB_ALIGNMENT, WD_TAB_LEADER
)
from ...shared import Length
from ..simpletypes import ST_SignedTwipsMeasure, ST_TwipsMeasure
from ..xmlchemy impo... | 31.114613 | 78 | 0.581729 |
80cfa4588a063677c1773f3829af83fe5a7b592f | 15,356 | py | Python | venv/Lib/site-packages/h5py/_hl/base.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | venv/Lib/site-packages/h5py/_hl/base.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/h5py/_hl/base.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
"""
Implements operations common to al... | 29.875486 | 82 | 0.604389 |
99d9ec2e61a28900ac847c8f0c4bc7d9e206fcd1 | 1,203 | py | Python | .tox/scenario/lib/python2.7/site-packages/keystoneclient/apiclient/exceptions.py | bdrich/neutron-lbaas | b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd | [
"Apache-2.0"
] | null | null | null | .tox/scenario/lib/python2.7/site-packages/keystoneclient/apiclient/exceptions.py | bdrich/neutron-lbaas | b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd | [
"Apache-2.0"
] | null | null | null | .tox/scenario/lib/python2.7/site-packages/keystoneclient/apiclient/exceptions.py | bdrich/neutron-lbaas | b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 Nebula, Inc.
# Copyright 2013 Alessio Ababilov
# Copyright 2013 OpenStack Foundation
# 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
# ... | 34.371429 | 78 | 0.707398 |
49325d07c030875d8ba28153e5493d5f78c8645a | 2,695 | py | Python | algorithmics/recur_circle_sum.py | mouradmourafiq/data-analysis | 1df2ca020a554f1fdab7cc9e53115e249cc199ac | [
"BSD-2-Clause"
] | 17 | 2015-04-01T12:11:31.000Z | 2022-03-15T16:44:01.000Z | algorithmics/recur_circle_sum.py | mouradmourafiq/data-analysis | 1df2ca020a554f1fdab7cc9e53115e249cc199ac | [
"BSD-2-Clause"
] | null | null | null | algorithmics/recur_circle_sum.py | mouradmourafiq/data-analysis | 1df2ca020a554f1fdab7cc9e53115e249cc199ac | [
"BSD-2-Clause"
] | 17 | 2015-01-14T14:59:40.000Z | 2021-07-01T05:46:14.000Z | # circle sum
import sys
sys.setrecursionlimit(15000)
def cal_sum():
T = int(raw_input())
def c_sum(a, indice, start, end, N, round, a_cache):
c = a[indice]
if round == 0: return c
if (indice, round) in a_cache:
c = a_cache[(indice, round)]
else:
i_l = ... | 42.109375 | 120 | 0.336549 |
fbac913466a97e8aaee8934e22a8a358c3d42ac6 | 1,635 | py | Python | src/pytestwww.py | ibmcuijunluke/software-automation | 9bc9ad78f1095983b6b46671482091489088cb15 | [
"Apache-2.0"
] | 2 | 2017-04-14T03:40:55.000Z | 2018-04-25T11:12:51.000Z | src/pytestwww.py | ibmcuijunluke/software-automation | 9bc9ad78f1095983b6b46671482091489088cb15 | [
"Apache-2.0"
] | null | null | null | src/pytestwww.py | ibmcuijunluke/software-automation | 9bc9ad78f1095983b6b46671482091489088cb15 | [
"Apache-2.0"
] | 1 | 2018-04-25T11:12:51.000Z | 2018-04-25T11:12:51.000Z | #!/usr/bin/python
# coding: UTF-8
import StringIO,pycurl,sys,os,time
class idctest:
def __init__(self):
self.contents = ''
def body_callback(self,buf):
self.contents = self.contents + buf
def test_gzip(input_url):
t = idctest()
#gzip_test = file("gzip_test.txt", 'w')
c = pycurl... | 37.159091 | 72 | 0.706422 |
f7260a5cf2eade315c5bf110204cd445c7e662a3 | 7,966 | py | Python | tests/components/plant/test_init.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 6 | 2020-07-18T16:33:25.000Z | 2021-09-26T09:52:04.000Z | tests/components/plant/test_init.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 38 | 2020-07-23T07:14:17.000Z | 2022-03-31T06:01:46.000Z | tests/components/plant/test_init.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Unit tests for platform/plant.py."""
from datetime import datetime, timedelta
import pytest
from homeassistant.components import recorder
import homeassistant.components.plant as plant
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
CONDUCTIVITY,
STATE_OK,
STATE_PROBLEM,
STATE_UNAVA... | 33.330544 | 88 | 0.700603 |
2ad57a53c545b7506c98c4fad7bdc91b1eb31173 | 394 | py | Python | backend/users/migrations/0002_auto_20210709_1655.py | crowdbotics-apps/test14-28665 | 182788839dd9b1149196428183ee91dfd67231a3 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/migrations/0002_auto_20210709_1655.py | crowdbotics-apps/test14-28665 | 182788839dd9b1149196428183ee91dfd67231a3 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/migrations/0002_auto_20210709_1655.py | crowdbotics-apps/test14-28665 | 182788839dd9b1149196428183ee91dfd67231a3 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | # Generated by Django 2.2.24 on 2021-07-09 16:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='name',
field=... | 20.736842 | 74 | 0.591371 |
88b699b9adfb604707c8ff034d6525ebf2945fa3 | 1,415 | py | Python | third_party/python-pinyin/pypinyin/contrib/uv.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | 1 | 2021-05-14T23:27:13.000Z | 2021-05-14T23:27:13.000Z | third_party/python-pinyin/pypinyin/contrib/uv.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | third_party/python-pinyin/pypinyin/contrib/uv.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | from typing import Any
from typing import Optional
from typing import Text
from pypinyin.constants import Style
class V2UMixin():
"""无声调相关拼音风格下的结果使用 ``ü`` 代替原来的 ``v``
使用方法::
from pypinyin import lazy_pinyin, Style
from pypinyin.contrib.uv import V2UMixin
from pypinyin.converter import... | 31.444444 | 72 | 0.547703 |
ff75453d1ac4020bef923cf33064147d17fc415f | 219 | py | Python | mayatools/sdk.py | vfxetc/mayatools | fc1a988ba8215dd28142d9ceb616b1c0888883fd | [
"BSD-3-Clause"
] | 25 | 2017-02-23T03:09:49.000Z | 2020-11-13T05:05:21.000Z | mayatools/sdk.py | vfxetc/mayatools | fc1a988ba8215dd28142d9ceb616b1c0888883fd | [
"BSD-3-Clause"
] | null | null | null | mayatools/sdk.py | vfxetc/mayatools | fc1a988ba8215dd28142d9ceb616b1c0888883fd | [
"BSD-3-Clause"
] | 4 | 2017-07-04T19:39:08.000Z | 2019-07-19T01:14:21.000Z | import maya.api.OpenMaya as om
'''
going from C++ API to python/mel API and vice versa
'''
def mobject_from_name(name):
sel_list = om.MSelectionList()
sel_list.add(name)
return sel_list.getDependNode(0)
| 16.846154 | 51 | 0.707763 |
34b910984ff5540702130c5c13c94d4c9dc12d31 | 8,809 | py | Python | docs/conf.py | xinetzone/myst-book | 571cff825e2d78d78230bf5c74443b6890ea53e2 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | xinetzone/myst-book | 571cff825e2d78d78230bf5c74443b6890ea53e2 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | xinetzone/myst-book | 571cff825e2d78d78230bf5c74443b6890ea53e2 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 31.348754 | 82 | 0.602111 |
ef89682832ef301d32c651f85b51dee60300be99 | 16,364 | py | Python | sympy/stats/frv_types.py | shivangdubey/sympy | bd3ddd4c71d439c8b623f69a02274dd8a8a82198 | [
"BSD-3-Clause"
] | 2 | 2020-07-27T16:36:27.000Z | 2020-12-29T22:28:37.000Z | sympy/stats/frv_types.py | shivangdubey/sympy | bd3ddd4c71d439c8b623f69a02274dd8a8a82198 | [
"BSD-3-Clause"
] | 2 | 2020-08-18T15:21:59.000Z | 2020-08-18T19:35:29.000Z | sympy/stats/frv_types.py | shivangdubey/sympy | bd3ddd4c71d439c8b623f69a02274dd8a8a82198 | [
"BSD-3-Clause"
] | null | null | null | """
Finite Discrete Random Variables - Prebuilt variable types
Contains
========
FiniteRV
DiscreteUniform
Die
Bernoulli
Coin
Binomial
BetaBinomial
Hypergeometric
Rademacher
"""
from __future__ import print_function, division
from sympy import (S, sympify, Rational, binomial, cacheit, Integer,
Dumm... | 25.214176 | 105 | 0.571498 |
797bfd058ead042d97f51f5217468cd59ab252f8 | 185 | py | Python | homes_agent/urls.py | Xtuden-com/django-property | 6656d469a5d06c103a34c2e68b9f1754413fb3ba | [
"MIT"
] | null | null | null | homes_agent/urls.py | Xtuden-com/django-property | 6656d469a5d06c103a34c2e68b9f1754413fb3ba | [
"MIT"
] | null | null | null | homes_agent/urls.py | Xtuden-com/django-property | 6656d469a5d06c103a34c2e68b9f1754413fb3ba | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import AgentBranchHomePageView
urlpatterns = [
url(r'^branch/(?P<slug>[-\w]+)/$', AgentBranchHomePageView.as_view(), name='branch')
]
| 23.125 | 88 | 0.713514 |
68fb570e04033bd063d0ac05f7da505755e7bdb6 | 2,595 | py | Python | list_table_sql.py | Dark-Athena/list_table_sql-py | 07f00d45d435aab217a36178d5178b25c5821f01 | [
"Apache-2.0"
] | 2 | 2021-12-13T06:15:40.000Z | 2022-01-03T09:39:24.000Z | list_table_sql.py | Dark-Athena/list_table_sql-py | 07f00d45d435aab217a36178d5178b25c5821f01 | [
"Apache-2.0"
] | null | null | null | list_table_sql.py | Dark-Athena/list_table_sql-py | 07f00d45d435aab217a36178d5178b25c5821f01 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
#功能 :获取sql中的所有表和视图名
#日期 :2021-10-15
#作者:Dark-Athena
#EMAIL:darkathena@qq.com
"""
Copyright DarkAthena(darkathena@qq.com)
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... | 34.144737 | 103 | 0.667052 |
140404f227cd5f4cfac0e131c37fee6b18f6eb38 | 4,095 | py | Python | Cartwheel/lib/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/src/autocomp/simplecomp.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/src/autocomp/simplecomp.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/src/autocomp/simplecomp.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | ###############################################################################
# Name: simplecomp.py #
# Purpose: Simple autocompletion based on buffer words (SciTE docet) #
# Author: Giuseppe "Cowo" Corbelli #
... | 33.565574 | 86 | 0.512332 |
e34b53bb881342cdb92c5ed9f3dd5845ac7708b6 | 1,832 | py | Python | src/async_spotify/api/_endpoints/personalization.py | wackazong/AsyncSpotify | 2789331bac471327738a4fec13e3d106c1da0ea1 | [
"MIT"
] | 26 | 2020-04-01T14:16:28.000Z | 2022-02-23T18:28:23.000Z | src/async_spotify/api/_endpoints/personalization.py | wackazong/AsyncSpotify | 2789331bac471327738a4fec13e3d106c1da0ea1 | [
"MIT"
] | 18 | 2020-05-11T09:55:18.000Z | 2022-03-15T15:58:51.000Z | src/async_spotify/api/_endpoints/personalization.py | wackazong/AsyncSpotify | 2789331bac471327738a4fec13e3d106c1da0ea1 | [
"MIT"
] | 10 | 2020-04-02T13:11:55.000Z | 2022-02-16T14:34:36.000Z | """
Module with the personalization endpoint
"""
# ##################################################################################################
# Copyright (c) 2020. HuiiBuh #
# This file (personalization.py) is part of AsyncSpotify which is r... | 44.682927 | 238 | 0.565502 |
c390e5434991772bf59d2f77ae1ee97772828dd9 | 6,603 | py | Python | bindings/python/ensmallen_graph/datasets/string/haemophilushaemolyticusm19501.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/haemophilushaemolyticusm19501.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/haemophilushaemolyticusm19501.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Haemophilus haemolyticus M19501.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datet... | 35.31016 | 223 | 0.703922 |
6dbdef7ca1797708a0e29d7327424c09466e0ca9 | 5,876 | py | Python | leapsandbounds.py | drgrhm/alg_conf | 7e10033366e50e0c58e6b014672fc995e69e8c46 | [
"Apache-2.0"
] | 1 | 2021-01-17T20:48:08.000Z | 2021-01-17T20:48:08.000Z | leapsandbounds.py | drgrhm/alg_config | 7e10033366e50e0c58e6b014672fc995e69e8c46 | [
"Apache-2.0"
] | null | null | null | leapsandbounds.py | drgrhm/alg_config | 7e10033366e50e0c58e6b014672fc995e69e8c46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 40.524138 | 173 | 0.632403 |
0a08237743e95e0c5c3609c9614fb67e5533c763 | 27,659 | py | Python | lte/gateway/python/magma/mobilityd/tests/rpc_servicer_tests.py | nstng/magma | dec2691450f4bdd9e25d1e2eb0a38dc893dfeb7f | [
"BSD-3-Clause"
] | 539 | 2019-02-25T05:03:10.000Z | 2020-07-24T11:13:15.000Z | lte/gateway/python/magma/mobilityd/tests/rpc_servicer_tests.py | nstng/magma | dec2691450f4bdd9e25d1e2eb0a38dc893dfeb7f | [
"BSD-3-Clause"
] | 1,729 | 2019-02-25T16:02:33.000Z | 2020-07-24T23:40:07.000Z | lte/gateway/python/magma/mobilityd/tests/rpc_servicer_tests.py | nstng/magma | dec2691450f4bdd9e25d1e2eb0a38dc893dfeb7f | [
"BSD-3-Clause"
] | 210 | 2019-02-25T13:34:53.000Z | 2020-07-23T20:16:18.000Z | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 34.104809 | 78 | 0.623811 |
e4a5bc845dcc9fde3aae7505b80ec57c0aae8da6 | 12,250 | py | Python | XYZHubConnector/xyz_qgis/iml/network/network.py | heremaps/xyz-qgis-plugin | 570402e1bb886db5dd36d2b2d2f278a25ef8ad12 | [
"MIT"
] | 19 | 2019-03-06T18:25:17.000Z | 2021-07-21T10:08:20.000Z | XYZHubConnector/xyz_qgis/iml/network/network.py | heremaps/xyz-qgis-plugin | 570402e1bb886db5dd36d2b2d2f278a25ef8ad12 | [
"MIT"
] | 28 | 2019-03-07T18:18:44.000Z | 2021-11-16T13:49:39.000Z | XYZHubConnector/xyz_qgis/iml/network/network.py | heremaps/xyz-qgis-plugin | 570402e1bb886db5dd36d2b2d2f278a25ef8ad12 | [
"MIT"
] | 8 | 2019-03-01T10:41:08.000Z | 2021-01-18T18:02:56.000Z | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2021 HERE Europe B.V.
#
# SPDX-License-Identifier: MIT
# License-Filename: LICENSE
#
###############################################################################
import time
import base64
import... | 36.786787 | 99 | 0.634857 |
17ae9698e5b1fb244cd7603e38eac1208daa1f78 | 3,502 | py | Python | yt/frontends/enzo_p/misc.py | munkm/yt | 9c92deaa53459762cb35025bdc8b9048a9faac31 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-09-15T08:17:43.000Z | 2021-09-15T08:17:43.000Z | yt/frontends/enzo_p/misc.py | munkm/yt | 9c92deaa53459762cb35025bdc8b9048a9faac31 | [
"BSD-3-Clause-Clear"
] | 2 | 2021-09-15T16:10:39.000Z | 2021-09-16T14:23:31.000Z | yt/frontends/enzo_p/misc.py | stonnes/yt | aad3cfa3b4ebab7838352ab467275a27c26ff363 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-21T07:01:51.000Z | 2021-04-21T07:01:51.000Z | import numpy as np
from more_itertools import always_iterable
def bdecode(block):
"""
Decode a block descriptor to get its left and right sides and level.
A block string consisting of (0, 1), with optionally one colon. The
number of digits after the colon is the refinemenet level. The combined
di... | 28.241935 | 87 | 0.617933 |
b3b04869931c0d5f90115247ad4cb30c2e87839a | 139,133 | py | Python | tests/unit/manage/test_views.py | vinayak-mehta/warehouse | 585c45d2b174a5f8310564d00b1572974b0dc58c | [
"Apache-2.0"
] | null | null | null | tests/unit/manage/test_views.py | vinayak-mehta/warehouse | 585c45d2b174a5f8310564d00b1572974b0dc58c | [
"Apache-2.0"
] | null | null | null | tests/unit/manage/test_views.py | vinayak-mehta/warehouse | 585c45d2b174a5f8310564d00b1572974b0dc58c | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 39.027489 | 88 | 0.603229 |
ca68ecc60e6a4e70ad8e0ac5911b16fa6b38667e | 2,541 | py | Python | syncronize/tools.py | aagusti/sp2d | 51122cdbb9f85bee91d08c3dd29fb1f7d1ae3d90 | [
"MIT"
] | null | null | null | syncronize/tools.py | aagusti/sp2d | 51122cdbb9f85bee91d08c3dd29fb1f7d1ae3d90 | [
"MIT"
] | null | null | null | syncronize/tools.py | aagusti/sp2d | 51122cdbb9f85bee91d08c3dd29fb1f7d1ae3d90 | [
"MIT"
] | null | null | null | from datetime import datetime
from urllib import unquote_plus
from urlparse import urlparse
from time import sleep
import re
import demon
import sys
import signal
def humanize_time(secs):
mins, secs = divmod(secs, 60)
hours, mins = divmod(mins, 60)
return '%02d:%02d:%02d' % (hours, mins, secs)
# Dibutuhk... | 25.158416 | 74 | 0.528532 |
fc79fee0ea5afdf79cbccd71d89fe6b9114485ba | 437 | py | Python | app/__init__.py | techx/how-to-hack-2021 | b557ebf47a2cce35df41549055293e3800d7fef6 | [
"MIT"
] | 7 | 2021-09-14T22:34:31.000Z | 2021-09-17T03:38:34.000Z | app/__init__.py | techx/how-to-hack-2021 | b557ebf47a2cce35df41549055293e3800d7fef6 | [
"MIT"
] | null | null | null | app/__init__.py | techx/how-to-hack-2021 | b557ebf47a2cce35df41549055293e3800d7fef6 | [
"MIT"
] | null | null | null | import os
from flask import Flask, session, request
app = None
def create_app():
global app, db, session
app = Flask(__name__)
# load config vars from file or environment
if os.path.exists("config.py"):
app.config.from_pyfile("./config.py")
print("Loading secret configs from file")
... | 21.85 | 49 | 0.681922 |
be50af31845f77fafcae5681ce0f8c6a8692a127 | 8,833 | py | Python | tools/gcp/stress_test/stress_test_utils.py | duanwujie/grpc-hacking | 4275e60eb686ceb202c042fe578c9cf992e590d0 | [
"BSD-3-Clause"
] | 9 | 2017-01-18T02:28:31.000Z | 2021-04-12T13:59:18.000Z | tools/gcp/stress_test/stress_test_utils.py | duanwujie/grpc-hacking | 4275e60eb686ceb202c042fe578c9cf992e590d0 | [
"BSD-3-Clause"
] | null | null | null | tools/gcp/stress_test/stress_test_utils.py | duanwujie/grpc-hacking | 4275e60eb686ceb202c042fe578c9cf992e590d0 | [
"BSD-3-Clause"
] | 3 | 2017-06-15T14:03:56.000Z | 2019-12-17T05:46:48.000Z | #!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this lis... | 40.518349 | 80 | 0.630816 |
7c2cf7ae89f46e78229a27eec315fe7c5b51d870 | 415 | py | Python | aqui_carattino/users/migrations/0002_auto_20200922_2132.py | aquilesC/aquicarattino | b6d873aea6e3ec9d1b802ea13952746e4fcc22b6 | [
"MIT"
] | null | null | null | aqui_carattino/users/migrations/0002_auto_20200922_2132.py | aquilesC/aquicarattino | b6d873aea6e3ec9d1b802ea13952746e4fcc22b6 | [
"MIT"
] | 2 | 2020-05-08T04:30:26.000Z | 2021-06-17T20:19:02.000Z | aqui_carattino/users/migrations/0002_auto_20200922_2132.py | aquilesC/aquicarattino | b6d873aea6e3ec9d1b802ea13952746e4fcc22b6 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-22 19:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='first_name',
f... | 21.842105 | 90 | 0.604819 |
f6c9b30330be32edc620c15e1c390c534f6e73f5 | 4,414 | py | Python | pywhat/filter.py | CrackerCat/pyWhat | fd14e756525c64d0e83725fb7587a729fad7776d | [
"MIT"
] | null | null | null | pywhat/filter.py | CrackerCat/pyWhat | fd14e756525c64d0e83725fb7587a729fad7776d | [
"MIT"
] | null | null | null | pywhat/filter.py | CrackerCat/pyWhat | fd14e756525c64d0e83725fb7587a729fad7776d | [
"MIT"
] | null | null | null | from collections.abc import Mapping
from typing import Optional
from pywhat.helper import AvailableTags, CaseInsensitiveSet, InvalidTag, load_regexes
class Filter(Mapping):
"""
A filter is an object containing the filtration information.
The difference from Distribution object is
that Filte... | 33.439394 | 88 | 0.573403 |
91fd1d5397d5af37d2bf4606302e425303c12762 | 2,475 | py | Python | libqtile/widget/notify.py | cjbarnes18/qtile | dd52b52fb8713b5b983c1a034a67bfc6fa269573 | [
"MIT"
] | null | null | null | libqtile/widget/notify.py | cjbarnes18/qtile | dd52b52fb8713b5b983c1a034a67bfc6fa269573 | [
"MIT"
] | null | null | null | libqtile/widget/notify.py | cjbarnes18/qtile | dd52b52fb8713b5b983c1a034a67bfc6fa269573 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from .. import bar, manager, drawer, utils
from libqtile.notify import notifier
import base
class Notify(base._TextBox):
"""
An notify widget
"""
defaults = manager.Defaults(
("font", "Arial", "Mpd widget font"),
("fontsize", None, "Mpd widget pi... | 33.90411 | 77 | 0.573333 |
a4bc55e6b9259898d1f84e7c6d200334191046e3 | 1,200 | py | Python | tests/performance/index_hashing_performance.py | mabel-dev/mabel | 4b06e9e5ce108e8a3267e44685fd61fc9802eb0a | [
"Apache-2.0"
] | null | null | null | tests/performance/index_hashing_performance.py | mabel-dev/mabel | 4b06e9e5ce108e8a3267e44685fd61fc9802eb0a | [
"Apache-2.0"
] | 287 | 2021-05-14T21:25:26.000Z | 2022-03-30T12:02:51.000Z | tests/performance/index_hashing_performance.py | mabel-dev/mabel | 4b06e9e5ce108e8a3267e44685fd61fc9802eb0a | [
"Apache-2.0"
] | null | null | null | import os, sys
sys.path.insert(1, os.path.join(sys.path[0], "../.."))
from mabel.data import Reader
from mabel.data.internals.index import IndexBuilder
from mabel.logging import get_logger
from timer import Timer
import orjson
get_logger().setLevel(100)
def _inner_file_reader(
file_name: str, chunk_size: int = ... | 29.268293 | 80 | 0.6525 |
de43a8585700a878aedb02b8289045451a2d24dd | 2,758 | py | Python | settings/models/resNeXt.py | MaximeRedstone/UnstructuredCAE-DA | b54bd53540c11aa1b70e5160751905141f463217 | [
"MIT"
] | null | null | null | settings/models/resNeXt.py | MaximeRedstone/UnstructuredCAE-DA | b54bd53540c11aa1b70e5160751905141f463217 | [
"MIT"
] | null | null | null | settings/models/resNeXt.py | MaximeRedstone/UnstructuredCAE-DA | b54bd53540c11aa1b70e5160751905141f463217 | [
"MIT"
] | null | null | null | from UnstructuredCAEDA.settings.base_block import Block
from UnstructuredCAEDA.AEs.AE_general import MODES as M
class Baseline1Block(Block):
"""Replica of Baseline1 w. Block build"""
def __init__(self, loader = None):
super(Baseline1Block, self).__init__(loader)
self.ACTIVATION = "prelu"
... | 42.430769 | 111 | 0.585932 |
9dc55c8fd4d97c8499db07da8e194573302afee4 | 20,550 | py | Python | flux_combined_high_binding/model_94.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_94.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_94.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.138889 | 798 | 0.804136 |
c513c0096571cedb4e55e45748cb299562e75b55 | 1,942 | py | Python | simps/loader/other/telnet.py | 1Dragos12/arhive | 46dd676e3f9ebb1879a12b899a335ca7f5c1b8c6 | [
"MIT"
] | null | null | null | simps/loader/other/telnet.py | 1Dragos12/arhive | 46dd676e3f9ebb1879a12b899a335ca7f5c1b8c6 | [
"MIT"
] | null | null | null | simps/loader/other/telnet.py | 1Dragos12/arhive | 46dd676e3f9ebb1879a12b899a335ca7f5c1b8c6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys, re, os, socket, time
from threading import Thread
if len(sys.argv) < 2:
sys.exit("\033[37mUsage: python "+sys.argv[0]+" [list]")
cmd="cd /tmp;rm -rf ur0a.sh;wget http://b0tz.xyz/ur0a.sh;chmod +x ur0a.sh;./ur0a.sh;sh ur0a.sh;rm -rf ur0a.sh;cd;history -c;" #command to send
info = open(st... | 25.552632 | 142 | 0.630793 |
0a27cfc3d3eab85186210fc345bcb1d7aaa76a08 | 25,721 | py | Python | source/images.py | peppy0510/PyMusicPlayer | 6ac4779a137191700506629202eb596beacce021 | [
"MIT"
] | 18 | 2019-04-22T10:42:14.000Z | 2022-02-13T14:21:18.000Z | source/images.py | peppy0510/PyMusicPlayer | 6ac4779a137191700506629202eb596beacce021 | [
"MIT"
] | null | null | null | source/images.py | peppy0510/PyMusicPlayer | 6ac4779a137191700506629202eb596beacce021 | [
"MIT"
] | 5 | 2020-01-11T19:15:40.000Z | 2021-09-27T20:11:23.000Z | # encoding: utf-8
# author: Taehong Kim
# email: peppy0510@hotmail.com
from wx.lib.embeddedimage import PyEmbeddedImage
SmallUpArrow = PyEmbeddedImage(
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAADxJ"
"REFUOI1jZGRiZqAEMFGke2gY8P/f3/9kGwDTjM8QnAaga8JlCG3CAJdt2MQxDCAUaOjyjKMp"
... | 64.95202 | 79 | 0.878737 |
abd975899c2854038c2b5487057218dc623affdd | 1,118 | py | Python | PyTrinamic/examples/modules/TMCM_1636/TMCM_1636_TMCL_rotate_openloop.py | JonaHammer/PyTrinamic | 67fe7519174e4cfa2164d9811fc0b62ce2f8aa4b | [
"MIT"
] | null | null | null | PyTrinamic/examples/modules/TMCM_1636/TMCM_1636_TMCL_rotate_openloop.py | JonaHammer/PyTrinamic | 67fe7519174e4cfa2164d9811fc0b62ce2f8aa4b | [
"MIT"
] | null | null | null | PyTrinamic/examples/modules/TMCM_1636/TMCM_1636_TMCL_rotate_openloop.py | JonaHammer/PyTrinamic | 67fe7519174e4cfa2164d9811fc0b62ce2f8aa4b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Turn a motor without feedback
Created on 28.11.2019
@author: SW
'''
import PyTrinamic
from PyTrinamic.connections.ConnectionManager import ConnectionManager
from PyTrinamic.modules.TMCM1636.TMCM_1636 import TMCM_1636
import time
PyTrinamic.showInfo()
connectionManager = ConnectionManager(... | 30.216216 | 165 | 0.79517 |
ceddcd44ed5ba1c5dd4c82e9496344b930010f38 | 7,918 | py | Python | Python Exercises/ztest.py | felipebrigo/Python-projects | a0ba1f0f84d89fc9d5125c137046c574bc99d86f | [
"MIT"
] | null | null | null | Python Exercises/ztest.py | felipebrigo/Python-projects | a0ba1f0f84d89fc9d5125c137046c574bc99d86f | [
"MIT"
] | 1 | 2021-06-10T23:53:43.000Z | 2021-06-10T23:53:43.000Z | Python Exercises/ztest.py | felipebrigo/Python-projects | a0ba1f0f84d89fc9d5125c137046c574bc99d86f | [
"MIT"
] | null | null | null | import pandas as pd
import json
import ast
newdictionary=[]
def add_file_txt():
with open("/Users/mac/Documents/Lista FCA Leandro/CNPJ empresas/Layout CNPJ e dados do governo/cnpj1.txt", "a",encoding="latin-1") as w, open("/Users/mac/Documents/Lista FCA Leandro/CNPJ empresas/Layout CNPJ e dados do governo/cnpj10.t... | 48.876543 | 488 | 0.646754 |
d13562261dda9d4829e6d30049dd0b209355759f | 20,452 | py | Python | cornac/eval_methods/base_method.py | linksboy/cornac | b3a91b99ab7e058726c29a4edca209ffc43866a6 | [
"Apache-2.0"
] | null | null | null | cornac/eval_methods/base_method.py | linksboy/cornac | b3a91b99ab7e058726c29a4edca209ffc43866a6 | [
"Apache-2.0"
] | null | null | null | cornac/eval_methods/base_method.py | linksboy/cornac | b3a91b99ab7e058726c29a4edca209ffc43866a6 | [
"Apache-2.0"
] | 1 | 2020-03-19T13:58:33.000Z | 2020-03-19T13:58:33.000Z | # Copyright 2018 The Cornac 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 applicable ... | 37.595588 | 112 | 0.606787 |
e85b407026446a74a3827cbb79eea99f1c36fab2 | 1,750 | py | Python | b5/modules/npm.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 14 | 2018-11-24T23:33:35.000Z | 2022-02-04T23:46:49.000Z | b5/modules/npm.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 3 | 2020-02-10T11:05:11.000Z | 2020-03-04T08:42:11.000Z | b5/modules/npm.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 1 | 2020-02-11T19:45:13.000Z | 2020-02-11T19:45:13.000Z | import os
import shlex
from . import BaseModule
class NpmModule(BaseModule):
'''npm module
'''
DEFAULT_CONFIG = {
'base_path': '.',
'npm_bin': 'npm',
}
def prepare_config(self) -> None:
self.config['base_path'] = os.path.realpath(os.path.join(
self.state.run_... | 26.119403 | 99 | 0.528 |
e55a88465d0b9d5f9afd2d55a4ff7035cfac86f3 | 3,793 | py | Python | mojo/devtools/common/devtoolslib/benchmark.py | zbowling/mojo | 4d2ed40dc2390ca98a6fea0580e840535878f11c | [
"BSD-3-Clause"
] | 1 | 2020-04-28T14:35:10.000Z | 2020-04-28T14:35:10.000Z | mojo/devtools/common/devtoolslib/benchmark.py | zbowling/mojo | 4d2ed40dc2390ca98a6fea0580e840535878f11c | [
"BSD-3-Clause"
] | null | null | null | mojo/devtools/common/devtoolslib/benchmark.py | zbowling/mojo | 4d2ed40dc2390ca98a6fea0580e840535878f11c | [
"BSD-3-Clause"
] | 1 | 2020-04-28T14:35:11.000Z | 2020-04-28T14:35:11.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Logic that drives runs of the benchmarking mojo app and parses its output."""
import os.path
import re
_BENCHMARK_APP = 'https://core.mojoapps.io/benchm... | 33.27193 | 80 | 0.713947 |
964e8d14b9d6d01a18963304be6b028e97744851 | 354 | py | Python | config/celery.py | cni-iisc/city-simulator-app | 1908297c74116fcdc2f28969d47a23ceff5d83d9 | [
"Apache-2.0"
] | null | null | null | config/celery.py | cni-iisc/city-simulator-app | 1908297c74116fcdc2f28969d47a23ceff5d83d9 | [
"Apache-2.0"
] | 1 | 2022-01-07T09:22:03.000Z | 2022-01-27T09:25:06.000Z | config/celery.py | cni-iisc/city-simulator-app | 1908297c74116fcdc2f28969d47a23ceff5d83d9 | [
"Apache-2.0"
] | null | null | null | """
Celery config for the citysim project
It sets up the environment for Celery to pick up tasks defined in the application
"""
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.prod')
app = Celery('config')
app.config_from_object('django.conf:settings', namespace='... | 25.285714 | 81 | 0.785311 |
02e1562307d64a65c0bfccadb33cabf7854fb905 | 2,632 | py | Python | BALSAMIC/commands/plugins/deliver.py | pericsson/BALSAMIC | ae09820cb00cb9fdea69fa3c42ab1fb6f75681ba | [
"MIT"
] | null | null | null | BALSAMIC/commands/plugins/deliver.py | pericsson/BALSAMIC | ae09820cb00cb9fdea69fa3c42ab1fb6f75681ba | [
"MIT"
] | null | null | null | BALSAMIC/commands/plugins/deliver.py | pericsson/BALSAMIC | ae09820cb00cb9fdea69fa3c42ab1fb6f75681ba | [
"MIT"
] | null | null | null | import os
import sys
import logging
import glob
import json
import yaml
import click
from BALSAMIC.utils.rule import get_result_dir
from BALSAMIC.utils.cli import recursive_default_dict
from BALSAMIC.utils.cli import convert_defaultdict_to_regular_dict
LOG = logging.getLogger(__name__)
@click.command(
"deliver"... | 34.181818 | 95 | 0.671733 |
4780a6f3daf734a1b38bbaafc4f223391b7d0151 | 1,068 | py | Python | ketabdan/urls.py | evenset/ketabdan | ea56ad18f64b35714c6c3a0d85e59a3f8514057a | [
"MIT"
] | 3 | 2018-03-20T20:51:30.000Z | 2019-11-26T01:36:43.000Z | ketabdan/urls.py | evenset/ketabdan | ea56ad18f64b35714c6c3a0d85e59a3f8514057a | [
"MIT"
] | 34 | 2018-03-20T21:15:01.000Z | 2018-10-07T16:09:20.000Z | ketabdan/urls.py | evenset/ketabdan-project | ea56ad18f64b35714c6c3a0d85e59a3f8514057a | [
"MIT"
] | null | null | null | """ketabdan URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 38.142857 | 100 | 0.70412 |
c8203c5a5748e1bd49bc7696b378eb208f93e898 | 504 | py | Python | algorithms/bit_manipulation/sum_of_two_integers.py | FatiahBalo/python-ds | 9eb88425822b6da4d7bd673a124c13fbe6f17523 | [
"MIT"
] | 1,723 | 2019-07-30T07:06:22.000Z | 2022-03-31T15:22:22.000Z | algorithms/bit_manipulation/sum_of_two_integers.py | FatiahBalo/python-ds | 9eb88425822b6da4d7bd673a124c13fbe6f17523 | [
"MIT"
] | 213 | 2019-10-06T08:07:47.000Z | 2021-10-04T15:38:36.000Z | algorithms/bit_manipulation/sum_of_two_integers.py | FatiahBalo/python-ds | 9eb88425822b6da4d7bd673a124c13fbe6f17523 | [
"MIT"
] | 628 | 2019-10-06T10:26:25.000Z | 2022-03-31T01:41:00.000Z | # Question: Calculate the sum of two integers a and b but without the
# use of the operators + and -.
#Solution
def getSum(a, b):
"""
:type a: int
:type b: int
:rtype: int
"""
mask = 0xffffffff
diff = 0
carry = 0
while b & mask:
... | 22.909091 | 69 | 0.43254 |
1f60fdd843b04dfdd92d8b5793c24dcfdbcd0c62 | 28,313 | py | Python | abtools/_compare.py | menis/abtools | bfc7c6c508b174bb3b74d8f152156242ddd2ee77 | [
"MIT"
] | null | null | null | abtools/_compare.py | menis/abtools | bfc7c6c508b174bb3b74d8f152156242ddd2ee77 | [
"MIT"
] | null | null | null | abtools/_compare.py | menis/abtools | bfc7c6c508b174bb3b74d8f152156242ddd2ee77 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# filename: _compare.py
#
# Copyright (c) 2015 Bryan Briney
# License: The MIT license (http://opensource.org/licenses/MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software... | 33.786396 | 145 | 0.598241 |
68c06c3ad163dbe839ca52ebf873aa37e71e5571 | 51,534 | py | Python | src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py | Mystic421980/azure-cli | 827f5fbc9fe8a673dd4abf7a8991dde7c726107e | [
"MIT"
] | 4 | 2022-01-25T07:33:15.000Z | 2022-03-24T05:15:13.000Z | src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py | Mystic421980/azure-cli | 827f5fbc9fe8a673dd4abf7a8991dde7c726107e | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py | Mystic421980/azure-cli | 827f5fbc9fe8a673dd4abf7a8991dde7c726107e | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.68617 | 194 | 0.630031 |
2b6d76b93727c982df925f7c9b6b88607c4f2e1d | 168 | py | Python | problem0665.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0665.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0665.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
#
# #665 Proportionate Nim - Project Euler
# https://projecteuler.net/problem=665
#
# Code by Kevin Marciniak
#
###########################
| 18.666667 | 40 | 0.482143 |
83abb29847f7f5389d5084e022f69ae8b7002bb1 | 2,060 | py | Python | asset/cloud-client/quickstart_updatefeed_test.py | summersab/python-docs-samples | 7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66 | [
"Apache-2.0"
] | 3 | 2021-01-24T23:42:57.000Z | 2021-02-17T12:02:12.000Z | asset/cloud-client/quickstart_updatefeed_test.py | summersab/python-docs-samples | 7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66 | [
"Apache-2.0"
] | 1 | 2022-01-14T23:28:27.000Z | 2022-01-14T23:28:27.000Z | asset/cloud-client/quickstart_updatefeed_test.py | summersab/python-docs-samples | 7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66 | [
"Apache-2.0"
] | 2 | 2019-11-04T18:25:20.000Z | 2019-11-05T14:35:28.000Z | #!/usr/bin/env python
# Copyright 2018 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.785714 | 74 | 0.751942 |
e29e6b85f38aa6a5ca994f8983dec0b8f77e8c13 | 8,188 | py | Python | api/tests/opentrons/hardware_control/modules/test_hc_thermocycler.py | knownmed/opentrons | d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c | [
"Apache-2.0"
] | null | null | null | api/tests/opentrons/hardware_control/modules/test_hc_thermocycler.py | knownmed/opentrons | d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c | [
"Apache-2.0"
] | null | null | null | api/tests/opentrons/hardware_control/modules/test_hc_thermocycler.py | knownmed/opentrons | d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c | [
"Apache-2.0"
] | null | null | null | import pytest
import mock
from opentrons.drivers.thermocycler import SimulatingDriver
from opentrons.hardware_control import modules, ExecutionManager
from opentrons.drivers.rpi_drivers.types import USBPort
@pytest.fixture
def usb_port() -> USBPort:
return USBPort(
name="",
sub_names=[],
... | 32.752 | 85 | 0.711651 |
e832ffe477aaaa11cbf53b510048b21c4e1b5897 | 852 | py | Python | houses/migrations/0012_invitation.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | houses/migrations/0012_invitation.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | houses/migrations/0012_invitation.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-23 15:13
import uuid
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('houses', '0011_delete_invit... | 30.428571 | 108 | 0.735915 |
46efd475604e06994d0c35efa05e27b1538d5d18 | 297 | py | Python | web-socket.py | Lana-Pa/Some-projects | e12d7945f76a74ed7c134b595aa89a96364d1845 | [
"Apache-2.0"
] | null | null | null | web-socket.py | Lana-Pa/Some-projects | e12d7945f76a74ed7c134b595aa89a96364d1845 | [
"Apache-2.0"
] | null | null | null | web-socket.py | Lana-Pa/Some-projects | e12d7945f76a74ed7c134b595aa89a96364d1845 | [
"Apache-2.0"
] | null | null | null | import socket
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysock.connect(('www.py4inf.com', 80))
mysock.send('GET /code/romeo.txt HTTP/1.0\r\nHost: www.py4inf.com\r\n\r\n')
while True:
data = mysock.recv(512)
if (len(data)<1):
break
print data
mysock.close() | 21.214286 | 75 | 0.676768 |
ddb11a78636f1a96a6bbd5c0748d43ec69203f32 | 96 | py | Python | Task-Week-2/Task-4/whats-your-name.py | Bijay555/innomatics-Apr21-internship | 69ff447b8303b9dec1242f7244f7b21e96420c1e | [
"MIT"
] | null | null | null | Task-Week-2/Task-4/whats-your-name.py | Bijay555/innomatics-Apr21-internship | 69ff447b8303b9dec1242f7244f7b21e96420c1e | [
"MIT"
] | null | null | null | Task-Week-2/Task-4/whats-your-name.py | Bijay555/innomatics-Apr21-internship | 69ff447b8303b9dec1242f7244f7b21e96420c1e | [
"MIT"
] | null | null | null | def print_full_name(a, b):
print("Hello {0} {1}! You just delved into python.".format(a,b))
| 32 | 68 | 0.65625 |
04e4178c51d64133dfbdada5b2eab89d12013277 | 12,049 | py | Python | koino/cluster/base.py | tritas/koino | 21ecc30fdb76727b9b4b3cf695a39f6e860a52d6 | [
"BSD-3-Clause"
] | null | null | null | koino/cluster/base.py | tritas/koino | 21ecc30fdb76727b9b4b3cf695a39f6e860a52d6 | [
"BSD-3-Clause"
] | null | null | null | koino/cluster/base.py | tritas/koino | 21ecc30fdb76727b9b4b3cf695a39f6e860a52d6 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
from __future__ import division
import logging
from itertools import permutations
from os.path import join
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
import numpy as np
import pandas as pd
from joblib import Memory
from koino.plot.base import h... | 30.047382 | 83 | 0.650261 |
24b8a3ccf8cee7ca12898aff1eb9834606ae6785 | 7,114 | py | Python | setup.py | appsworld/jupyter-Kqlmagic | d9e759b77f20c938fea6fed8edf791997d1a1de3 | [
"MIT"
] | null | null | null | setup.py | appsworld/jupyter-Kqlmagic | d9e759b77f20c938fea6fed8edf791997d1a1de3 | [
"MIT"
] | null | null | null | setup.py | appsworld/jupyter-Kqlmagic | d9e759b77f20c938fea6fed8edf791997d1a1de3 | [
"MIT"
] | 1 | 2020-07-30T12:38:34.000Z | 2020-07-30T12:38:34.000Z | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 32.78341 | 134 | 0.503936 |
fe84c1034c688de7c7e79b57ce6cc35d33d3d876 | 1,155 | py | Python | pypeeper/examples/basic_example.py | jon-alamo/pypeeper | 2d486a006ebcf71c309fa348e5fa57586a4c3b4c | [
"MIT"
] | null | null | null | pypeeper/examples/basic_example.py | jon-alamo/pypeeper | 2d486a006ebcf71c309fa348e5fa57586a4c3b4c | [
"MIT"
] | null | null | null | pypeeper/examples/basic_example.py | jon-alamo/pypeeper | 2d486a006ebcf71c309fa348e5fa57586a4c3b4c | [
"MIT"
] | null | null | null | from pypeeper.pypeeper import Observable, Observer
# Make whichever class wanted to be observed subclass of Observable
class AnyClass(Observable):
def __init__(self):
self.attribute_a = False
self.whatever_attr = 0
def set_attribute(self, value):
self.attribute_a = value
# Implemen... | 30.394737 | 79 | 0.764502 |
79e06695e1ed5301fbe514a6d42299c3d142c3e9 | 3,108 | py | Python | mayan/apps/testing/tests/base.py | Dave360-crypto/Mayan-EDMS-1 | 7d79e748e8f6e47381a298ad8d219c15b09dd4d3 | [
"Apache-2.0"
] | null | null | null | mayan/apps/testing/tests/base.py | Dave360-crypto/Mayan-EDMS-1 | 7d79e748e8f6e47381a298ad8d219c15b09dd4d3 | [
"Apache-2.0"
] | null | null | null | mayan/apps/testing/tests/base.py | Dave360-crypto/Mayan-EDMS-1 | 7d79e748e8f6e47381a298ad8d219c15b09dd4d3 | [
"Apache-2.0"
] | null | null | null | from django.apps import apps
from django.test import TestCase, TransactionTestCase
from django_test_migrations.contrib.unittest_case import MigratorTestCase
from mayan.apps.acls.tests.mixins import ACLTestCaseMixin
from mayan.apps.converter.tests.mixins import LayerTestCaseMixin
from mayan.apps.events.tests.mixins im... | 34.921348 | 77 | 0.793115 |
508f2ad526bc0bb31d13544d4abfc9cfe38b586a | 539 | py | Python | BlogApp/manage.py | hawwestin/MSR.DjangoByExample | b1649ccb92e9d557c09f27c15fc779de64282fcb | [
"MIT"
] | 1 | 2021-02-08T20:29:06.000Z | 2021-02-08T20:29:06.000Z | BlogApp/manage.py | hawwestin/MSR.DjangoByExample | b1649ccb92e9d557c09f27c15fc779de64282fcb | [
"MIT"
] | 13 | 2021-06-09T17:28:23.000Z | 2022-03-12T00:54:20.000Z | BlogApp/manage.py | hawwestin/MSR.DjangoByExample | b1649ccb92e9d557c09f27c15fc779de64282fcb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "BlogWit.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are ... | 33.6875 | 73 | 0.686456 |
e2eafbde318ed33464e4696814ca213593242349 | 5,361 | py | Python | background.py | hackerncoder/ChangeBackgroundAll | 9ca57656ce3538c3232048d46d5fbc87c38e5f12 | [
"MIT"
] | null | null | null | background.py | hackerncoder/ChangeBackgroundAll | 9ca57656ce3538c3232048d46d5fbc87c38e5f12 | [
"MIT"
] | null | null | null | background.py | hackerncoder/ChangeBackgroundAll | 9ca57656ce3538c3232048d46d5fbc87c38e5f12 | [
"MIT"
] | null | null | null | import os
import sys
import ctypes
import shutil
import random
import logging
import platform
import argparse
import subprocess
import requests
import json
import urllib.request
from urllib.parse import urlparse
from random import *
from sys import argv
# Much of this was taken from rmccorm4/terminal-wallpaper
# Ta... | 30.460227 | 79 | 0.71815 |
d07443bb0df32e2e3bd6e4de4460a6aed6b2628e | 1,450 | py | Python | accounts/api/views/accounts_views.py | Onlynfk/Freshdesk-CRM-Platform | 67137af09f7daf6fa2d19a9e70d573548137c9db | [
"MIT"
] | null | null | null | accounts/api/views/accounts_views.py | Onlynfk/Freshdesk-CRM-Platform | 67137af09f7daf6fa2d19a9e70d573548137c9db | [
"MIT"
] | null | null | null | accounts/api/views/accounts_views.py | Onlynfk/Freshdesk-CRM-Platform | 67137af09f7daf6fa2d19a9e70d573548137c9db | [
"MIT"
] | null | null | null | from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from accounts.api.serializers.accounts_serializers import AccountSerializer
from accounts.models import Account
class AccountAPIView(generics.ListAPIView):
'''
♻API endpoint that allows accounts to be viewed.
... | 28.431373 | 76 | 0.715862 |
3c8a5fff4a0b131797ce506e081a65774ff8da64 | 1,321 | py | Python | mango/perpopenorders.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | 1 | 2021-09-09T20:49:46.000Z | 2021-09-09T20:49:46.000Z | mango/perpopenorders.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | null | null | null | mango/perpopenorders.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | 2 | 2021-09-01T18:29:44.000Z | 2021-09-02T22:31:33.000Z | # # ⚠ Warning
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA... | 33.871795 | 104 | 0.710068 |
6cb33343560db2bd9c9a107f97eeaeddb79d53ae | 420 | py | Python | gist.py | kfr2/pelican-gist | 2e8c277a5d4054f1fd94a8806678d58d0994374c | [
"MIT"
] | 1 | 2020-07-15T11:16:27.000Z | 2020-07-15T11:16:27.000Z | gist.py | kfr2/pelican-gist | 2e8c277a5d4054f1fd94a8806678d58d0994374c | [
"MIT"
] | null | null | null | gist.py | kfr2/pelican-gist | 2e8c277a5d4054f1fd94a8806678d58d0994374c | [
"MIT"
] | null | null | null | import re
from pelican import signals
def gist(content):
"""Converts [[ gist username:ID ]] in an article into its embedded <script> equivalent."""
pattern = r'\[\[ gist (\w+):(\w+) \]\]'
replacement = r'<script src="https://gist.github.com/\1/\2.js"></script>'
content._content = re.sub(pattern, repl... | 28 | 94 | 0.669048 |
24523cb52494633e1bb3c441c154cdfbff5e1580 | 82 | py | Python | orangecontrib/wanys/widgets/__init__.py | srio/wanys | f62b8a36ee534770810cd63a9b84719dcdd617ea | [
"MIT"
] | null | null | null | orangecontrib/wanys/widgets/__init__.py | srio/wanys | f62b8a36ee534770810cd63a9b84719dcdd617ea | [
"MIT"
] | 2 | 2016-11-04T15:10:30.000Z | 2016-11-04T15:15:59.000Z | orangecontrib/wanys/widgets/__init__.py | srio/wanys | f62b8a36ee534770810cd63a9b84719dcdd617ea | [
"MIT"
] | null | null | null |
# namespace declaration.
__import__("pkg_resources").declare_namespace(__name__)
| 20.5 | 55 | 0.829268 |
66583357419a6ad48062648a1e2c6ef8242c3275 | 2,421 | py | Python | rio_alpha/alpha.py | mapbox/rio-alpha | 707c0e0a702d0321bc51e6fa85c75215cec4e417 | [
"BSD-3-Clause"
] | 9 | 2016-09-08T21:42:32.000Z | 2021-06-16T10:21:15.000Z | rio_alpha/alpha.py | mapbox/rio-alpha | 707c0e0a702d0321bc51e6fa85c75215cec4e417 | [
"BSD-3-Clause"
] | 21 | 2016-09-08T18:49:26.000Z | 2022-01-13T00:43:42.000Z | rio_alpha/alpha.py | mapbox/rio-alpha | 707c0e0a702d0321bc51e6fa85c75215cec4e417 | [
"BSD-3-Clause"
] | 5 | 2017-04-02T03:40:35.000Z | 2021-02-21T12:07:31.000Z | """Alpha masking worker and concurrent processor."""
import numpy as np
import rasterio
import riomucho
from rio_alpha.alpha_mask import mask_exact
def alpha_worker(open_file, window, ij, g_args):
"""rio mucho worker for alpha. It reads input
files and perform alpha calculations on each window.
Paramete... | 24.704082 | 82 | 0.6171 |
bddf1ed6e7e5c0073fcc33dd598d1d13d8384028 | 940 | py | Python | examples/M_sequence_and_inverse_M_sequence.py | MC9529/python-control | fe773367b9b0f6896a918b99c21bc02f86ccf58e | [
"BSD-3-Clause"
] | null | null | null | examples/M_sequence_and_inverse_M_sequence.py | MC9529/python-control | fe773367b9b0f6896a918b99c21bc02f86ccf58e | [
"BSD-3-Clause"
] | null | null | null | examples/M_sequence_and_inverse_M_sequence.py | MC9529/python-control | fe773367b9b0f6896a918b99c21bc02f86ccf58e | [
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
L = 30 # the len of sequence
x1 = 1; x2 = 1; x3 = 1; x4 = 0 # the init_valce of register
#print("the x4 :" , x4)
S = 1
U = [] # Inverse_M_sequence
M = [] # M_sequence
for i in range(1, L + 1, 1):
IM = S ^ x4
if IM == 0:
U.append(-1) # Inv... | 18.076923 | 59 | 0.607447 |
f69e1ba99acb909461afad8e50a7bc595ea041bc | 16,267 | py | Python | fire/helptext.py | who0sy/python-fire | 1b185bb181eb55a6f9b52ac20c84c4c30403da45 | [
"Apache-2.0"
] | 1 | 2019-05-27T01:38:43.000Z | 2019-05-27T01:38:43.000Z | fire/helptext.py | who0sy/python-fire | 1b185bb181eb55a6f9b52ac20c84c4c30403da45 | [
"Apache-2.0"
] | null | null | null | fire/helptext.py | who0sy/python-fire | 1b185bb181eb55a6f9b52ac20c84c4c30403da45 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Google 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, ... | 31.771484 | 87 | 0.726809 |
f19c7aba42da52c6b2aca9c756798590e12e33b3 | 18,285 | py | Python | cmdstanpy/install_cmdstan.py | grburgess/cmdstanpy | 5ed096e99927eef92ad89629d2d6d0c2c6d86446 | [
"BSD-3-Clause"
] | null | null | null | cmdstanpy/install_cmdstan.py | grburgess/cmdstanpy | 5ed096e99927eef92ad89629d2d6d0c2c6d86446 | [
"BSD-3-Clause"
] | null | null | null | cmdstanpy/install_cmdstan.py | grburgess/cmdstanpy | 5ed096e99927eef92ad89629d2d6d0c2c6d86446 | [
"BSD-3-Clause"
] | 1 | 2022-03-01T05:52:48.000Z | 2022-03-01T05:52:48.000Z | #!/usr/bin/env python
"""
Download and install a CmdStan release from GitHub.
Downloads the release tar.gz file to temporary storage.
Retries GitHub requests in order to allow for transient network outages.
Builds CmdStan executables and tests the compiler by building
example model ``bernoulli.stan``.
Optional command... | 33.306011 | 80 | 0.580804 |
00505f93497f467fe26954f7b636e65795892c3e | 796 | py | Python | ex32.py | Zinmarlwin711/python-exercises | 361cb426a8bc03760906e25b6cb6a4a458260bfc | [
"MIT"
] | null | null | null | ex32.py | Zinmarlwin711/python-exercises | 361cb426a8bc03760906e25b6cb6a4a458260bfc | [
"MIT"
] | null | null | null | ex32.py | Zinmarlwin711/python-exercises | 361cb426a8bc03760906e25b6cb6a4a458260bfc | [
"MIT"
] | null | null | null | the_count = [1, 2, 3, 4, 5]
fruits = ['apples', 'orange', 'pears', 'apricots']
change = [1, 'pennies', 2, 'dimes', 3, 'quarters']
# this first kind of for-loop through a list
for number in the_count:
print(f"This is count {number}")
#same as above
for fruit in fruits:
print(f"A fruit of type: {fruit}")
# als... | 25.677419 | 59 | 0.658291 |
a20a6add7c600166a228ebf44b792d880aed7352 | 7,404 | py | Python | node generation/main.py | icivann/ivann | 6f85aa6db759f4bc75bcab9f27432acbae731475 | [
"MIT"
] | 14 | 2020-10-12T13:12:39.000Z | 2022-01-17T21:58:27.000Z | node generation/main.py | icivann/ivann | 6f85aa6db759f4bc75bcab9f27432acbae731475 | [
"MIT"
] | 33 | 2020-10-14T19:54:26.000Z | 2021-01-11T23:09:00.000Z | node generation/main.py | icivann/ivann | 6f85aa6db759f4bc75bcab9f27432acbae731475 | [
"MIT"
] | 1 | 2021-02-16T15:35:28.000Z | 2021-02-16T15:35:28.000Z | import re
import os
ir_folder = os.path.join("..", "src", "app", "ir", "model")
ir_optimiser_folder = os.path.join("..", "src", "app", "ir", "overview", "optimizers")
baklava_folder = os.path.join("..", "src", "nodes", "model")
baklava_optimiser_folder = os.path.join("..", "src", "nodes", "overview", "optimizers")
t... | 26.729242 | 118 | 0.638033 |
377be679973fd158aacbcc07c4df70dd4203b4e4 | 21,876 | py | Python | tefingerprint/_applications/fingerprint.py | timothymillar/TEFingerprint | 3e812752f37554b791b6be74f8b8f481ab479622 | [
"MIT"
] | null | null | null | tefingerprint/_applications/fingerprint.py | timothymillar/TEFingerprint | 3e812752f37554b791b6be74f8b8f481ab479622 | [
"MIT"
] | 1 | 2020-05-20T01:53:51.000Z | 2020-05-20T01:53:51.000Z | tefingerprint/_applications/fingerprint.py | timothymillar/TEFingerprint | 3e812752f37554b791b6be74f8b8f481ab479622 | [
"MIT"
] | 2 | 2019-07-30T22:15:19.000Z | 2020-10-25T01:34:51.000Z | #! /usr/bin/env python3
import numpy as np
from itertools import product
from functools import reduce
from collections import Counter
from multiprocessing import Pool
from tefingerprint import util
from tefingerprint.util.numpy import interval
from tefingerprint._applications import fingerprintio
from tefingerprint im... | 36.766387 | 83 | 0.536204 |
8ba5b709009210d406bce0f21e9ff516eda96947 | 26,599 | py | Python | release/stubs/Grasshopper/GUI/Canvas/Interaction.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs/Grasshopper/GUI/Canvas/Interaction.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs/Grasshopper/GUI/Canvas/Interaction.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | # encoding: utf-8
# module Grasshopper.GUI.Canvas.Interaction calls itself Interaction
# from Grasshopper, Version=1.0.0.20, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803
# by generator 1.145
""" NamespaceTracker represent a CLS namespace. """
# no imports
# no functions
# classes
class GH_AbstractInte... | 34.454663 | 221 | 0.655889 |
e2eccfb6d884825b46353abcdcff82e1563878ee | 3,279 | py | Python | test_all_games.py | Crash34000/alpha-zero-general | 018f65ee1ef56b87c8a9049353d4130946d03a9a | [
"MIT"
] | 2,836 | 2017-12-18T02:11:38.000Z | 2022-03-30T09:07:15.000Z | test_all_games.py | Crash34000/alpha-zero-general | 018f65ee1ef56b87c8a9049353d4130946d03a9a | [
"MIT"
] | 212 | 2017-12-28T06:47:57.000Z | 2022-01-06T20:22:26.000Z | test_all_games.py | Crash34000/alpha-zero-general | 018f65ee1ef56b87c8a9049353d4130946d03a9a | [
"MIT"
] | 892 | 2017-12-18T08:56:45.000Z | 2022-03-29T23:00:45.000Z | """"
This is a Regression Test Suite to automatically test all combinations of games and ML frameworks. Each test
plays two quick games using an untrained neural network (randomly initialized) against a random player.
In order for the entire test suite to run successfully, all the required libraries must ... | 36.032967 | 116 | 0.73437 |
4a1b6ff2ce476b0c8d5daef0e0670d8d2c8d16dc | 128 | py | Python | sharktopoda_client/localization/Preconditions.py | kevinsbarnard/sharktopoda-client-py | 21130b19436f193bd76751613a529512d76d9e84 | [
"MIT"
] | null | null | null | sharktopoda_client/localization/Preconditions.py | kevinsbarnard/sharktopoda-client-py | 21130b19436f193bd76751613a529512d76d9e84 | [
"MIT"
] | 2 | 2021-11-19T23:25:39.000Z | 2021-11-19T23:25:42.000Z | sharktopoda_client/localization/Preconditions.py | kevinsbarnard/sharktopoda-client-py | 21130b19436f193bd76751613a529512d76d9e84 | [
"MIT"
] | null | null | null | class Preconditions:
@staticmethod
def require(ok: bool, msg: str):
if not ok:
raise ValueError(msg) | 25.6 | 36 | 0.601563 |
0dd22813361844b555610bbeb988704a9e7e1375 | 2,904 | py | Python | app/main/gpt2/gpt2_model.py | seanlaidlaw/gpt2-app | 328ed35e27c95adcca61644b4164cabc3074ffd9 | [
"MIT"
] | null | null | null | app/main/gpt2/gpt2_model.py | seanlaidlaw/gpt2-app | 328ed35e27c95adcca61644b4164cabc3074ffd9 | [
"MIT"
] | null | null | null | app/main/gpt2/gpt2_model.py | seanlaidlaw/gpt2-app | 328ed35e27c95adcca61644b4164cabc3074ffd9 | [
"MIT"
] | null | null | null | import sys
import json
import os
import numpy as np
import tensorflow as tf
from .src import model, sample, encoder
basedir = os.path.dirname(os.path.abspath(__file__))
def interact_model(
raw_text=None,
model_name='124M',
seed=None,
nsamples=1,
batch_size=1,
length=None,
temperature=1,
... | 36.3 | 89 | 0.649793 |
d8b4f7971c2aa69f1efab51e21e9f137c0418ef6 | 184 | py | Python | icekit/plugins/page_anchor/apps.py | ic-labs/django-icekit | c507ea5b1864303732c53ad7c5800571fca5fa94 | [
"MIT"
] | 52 | 2016-09-13T03:50:58.000Z | 2022-02-23T16:25:08.000Z | icekit/plugins/page_anchor/apps.py | ic-labs/django-icekit | c507ea5b1864303732c53ad7c5800571fca5fa94 | [
"MIT"
] | 304 | 2016-08-11T14:17:30.000Z | 2020-07-22T13:35:18.000Z | icekit/plugins/page_anchor/apps.py | ic-labs/django-icekit | c507ea5b1864303732c53ad7c5800571fca5fa94 | [
"MIT"
] | 12 | 2016-09-21T18:46:35.000Z | 2021-02-15T19:37:50.000Z | from django.apps import AppConfig
class AppConfig(AppConfig):
name = '.'.join(__name__.split('.')[:-1])
label = "icekit_plugins_page_anchor"
verbose_name = "Page anchor"
| 23 | 45 | 0.690217 |
83bd755b2edcb148a9e0e53a40baf94627132a56 | 3,241 | py | Python | tests/test_fuzzyfinder.py | amjith/fuzzyfinder | 43fe7676cad68e269bbace7bb2fd9b77f2e07da9 | [
"BSD-3-Clause"
] | 389 | 2015-06-22T12:51:25.000Z | 2022-03-06T13:17:15.000Z | tests/test_fuzzyfinder.py | amjith/fuzzyfinder | 43fe7676cad68e269bbace7bb2fd9b77f2e07da9 | [
"BSD-3-Clause"
] | 17 | 2015-10-07T03:40:36.000Z | 2020-11-17T11:43:43.000Z | tests/test_fuzzyfinder.py | amjith/fuzzyfinder | 43fe7676cad68e269bbace7bb2fd9b77f2e07da9 | [
"BSD-3-Clause"
] | 37 | 2015-06-22T21:08:02.000Z | 2020-11-15T11:07:04.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_fuzzyfinder
----------------------------------
Tests for `fuzzyfinder` module.
"""
import pytest
from fuzzyfinder import fuzzyfinder
@pytest.fixture
def collection():
return ['migrations.py',
'django_migrations.py',
'django_admin_log.... | 30.009259 | 92 | 0.618328 |
e496fc3c57b32b45743253076a63b970397c93dc | 704 | py | Python | setup.py | its-dirg/saml-metadata-upload | f0e7c737eab717ba54b5c18621826f25be8b18e9 | [
"Apache-2.0"
] | null | null | null | setup.py | its-dirg/saml-metadata-upload | f0e7c737eab717ba54b5c18621826f25be8b18e9 | [
"Apache-2.0"
] | null | null | null | setup.py | its-dirg/saml-metadata-upload | f0e7c737eab717ba54b5c18621826f25be8b18e9 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='saml_metadata_upload',
version='0.1',
packages=find_packages('src'),
package_dir={'': 'src'},
package_data={
'metadata_upload': [
'schema/*.xsd',
'templates/*.html'
]
},
url='https://github.com/... | 26.074074 | 64 | 0.582386 |
00a096bbb4e378df39b795eb75552009e1946689 | 2,250 | py | Python | services/WeatherClient.py | santiagofacchini/home-automation | c0008c292b0db73ea66c6759c1eb2858fa803891 | [
"MIT"
] | null | null | null | services/WeatherClient.py | santiagofacchini/home-automation | c0008c292b0db73ea66c6759c1eb2858fa803891 | [
"MIT"
] | null | null | null | services/WeatherClient.py | santiagofacchini/home-automation | c0008c292b0db73ea66c6759c1eb2858fa803891 | [
"MIT"
] | null | null | null | import requests
import json
import datetime
class Weather:
'''Weather API.
Docs available at https://docs.stormglass.io/#/
'''
def __init__(self, api_key:str, latitude:int, longitude:int):
self.api_key = api_key
self.latitude = latitude
self.longitude = longitude
def rain... | 38.135593 | 76 | 0.548 |
073c1c98762c4787af0ef3a41c205049eaa32e76 | 7,335 | py | Python | DCNN-Pytorch/nn_models/main_commandant.py | dummyaccount123457/deepracing | cd70a0252b5cbfd1c45afc13f2eb774fa0aad1fe | [
"Apache-2.0"
] | null | null | null | DCNN-Pytorch/nn_models/main_commandant.py | dummyaccount123457/deepracing | cd70a0252b5cbfd1c45afc13f2eb774fa0aad1fe | [
"Apache-2.0"
] | null | null | null | DCNN-Pytorch/nn_models/main_commandant.py | dummyaccount123457/deepracing | cd70a0252b5cbfd1c45afc13f2eb774fa0aad1fe | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import nn_models
import data_loading.image_loading as il
import nn_models.Models as models
import data_loading.data_loaders as loaders
import numpy.random
import torch, random
import torch.nn as nn
import torch.optim as optim
from tqdm import tqdm as tqdm
import pickle
from datetime impor... | 39.015957 | 237 | 0.681118 |
07c35abf0cb521fe10efae58e080974fe6c9d8ce | 4,031 | py | Python | VL53L0X_rasp/python/VL53L0X.py | dennyzz/Pathfinder-v2 | e7853c1b86d0c76ebbf7c1b68aa76fadcf37f7fc | [
"MIT"
] | 1 | 2020-08-14T01:03:47.000Z | 2020-08-14T01:03:47.000Z | showers/pi/VL53L0X.py | Playaowl/artworks | bfe2abc844851ce054e1233261364a502cd30561 | [
"MIT"
] | 31 | 2019-03-05T00:52:08.000Z | 2019-03-29T00:53:25.000Z | references/VL53L0X.py | piofthings/piwars-2019 | ac0316f8ae3e62f685509ecb41c0562106c90279 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# MIT License
#
# Copyright (c) 2017 John Bryan Moore
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | 34.161017 | 123 | 0.707021 |
abc3e138d8f5a488827bb29eed280aab6d1d4066 | 3,710 | py | Python | tensorflow_transform/tf_metadata/metadata_io_test.py | sswapnil2/transform | 54561ddb357ef752153dd569aad7cc2651b38ac2 | [
"Apache-2.0"
] | null | null | null | tensorflow_transform/tf_metadata/metadata_io_test.py | sswapnil2/transform | 54561ddb357ef752153dd569aad7cc2651b38ac2 | [
"Apache-2.0"
] | null | null | null | tensorflow_transform/tf_metadata/metadata_io_test.py | sswapnil2/transform | 54561ddb357ef752153dd569aad7cc2651b38ac2 | [
"Apache-2.0"
] | 1 | 2020-04-07T23:48:26.000Z | 2020-04-07T23:48:26.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 25.410959 | 78 | 0.636388 |
45f4d9f79ea9695fe0b6c6e700401caa33b4782b | 423 | py | Python | tests/test_example.py | rnyberg/pyfibot | ef63c538aff066230030aaf02981933b652830e4 | [
"BSD-3-Clause"
] | null | null | null | tests/test_example.py | rnyberg/pyfibot | ef63c538aff066230030aaf02981933b652830e4 | [
"BSD-3-Clause"
] | null | null | null | tests/test_example.py | rnyberg/pyfibot | ef63c538aff066230030aaf02981933b652830e4 | [
"BSD-3-Clause"
] | null | null | null | from nose.tools import eq_
import bot_mock
def test_example():
assert True
def test_botmock():
bot = bot_mock.BotMock()
eq_(('#channel', 'Foo'), bot.say("#channel", "Foo"))
def test_module_bmi():
from pyfibot.modules import module_bmi
bot = bot_mock.BotMock()
eq_(('#channel', 'your bmi is... | 22.263158 | 135 | 0.669031 |
7797aa537fa124086cb6bfd898fcd0dff04ca0b2 | 5,649 | py | Python | hospi/models.py | Vicky-Rathod/django-hospital-management | b553f1da64f10eae527b438dd28acaad56d2d774 | [
"MIT"
] | null | null | null | hospi/models.py | Vicky-Rathod/django-hospital-management | b553f1da64f10eae527b438dd28acaad56d2d774 | [
"MIT"
] | 4 | 2021-05-21T01:48:19.000Z | 2022-02-10T13:01:49.000Z | hospi/models.py | Vicky-Rathod/django-hospital-management | b553f1da64f10eae527b438dd28acaad56d2d774 | [
"MIT"
] | null | null | null | from django.db import models
import datetime
from django.utils.timezone import now
# Create your models here.
Consultant = (
('Doctor1', 'Doctor1'),
('Doctor2', 'Doctor2'),
)
Gender = (
('Male', 'Male'),
('Female', 'Female'),
)
Admission_condition = (
('Undetermined', 'Undetermined'),
('St... | 34.03012 | 140 | 0.709506 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.