max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
IAFNNESTA.py | JonathanAlis/IAFNNESTA | 3 | 4124 | def help():
return '''
Isotropic-Anisotropic Filtering Norm Nesterov Algorithm
Solves the filtering norm minimization + quadratic term problem
Nesterov algorithm, with continuation:
argmin_x || iaFN(x) ||_1/2 subjected to ||b - Ax||_2^2 < delta
If no filter is provided, solves the L1.
Continuation is perf... | [
1,
822,
1371,
7295,
13,
1678,
736,
14550,
13,
3624,
28467,
293,
29899,
2744,
275,
28467,
293,
19916,
292,
5655,
405,
4156,
586,
29068,
13,
13,
13296,
1960,
278,
21166,
6056,
6260,
2133,
718,
25904,
1840,
1108,
13,
29940,
4156,
586,
56... |
src/main.py | Merk0ff/PicRandomFromImgur | 0 | 46128 | import urllib.request
import random
import time
import os
from bs4 import BeautifulSoup
chars = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3... | [
1,
1053,
3142,
1982,
29889,
3827,
13,
5215,
4036,
13,
5215,
931,
13,
5215,
2897,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
13,
305,
1503,
353,
6796,
29909,
3284,
29933,
3284,
29907,
3284,
29928,
3284,
29923,
3284,
29943,
328... |
tests/test_successful_registration.py | jg-725/IS219-FlaskAppProject | 0 | 158118 | """This test's if user successfully registered """
def test_successful_register(successful_registration):
assert successful_registration.email == '<EMAIL>'
assert successful_registration.password == 'Password'
assert successful_registration.confirm == 'Password'
response = successful_registration.get("... | [
1,
9995,
4013,
1243,
29915,
29879,
565,
1404,
8472,
15443,
9995,
13,
13,
1753,
1243,
29918,
8698,
1319,
29918,
9573,
29898,
8698,
1319,
29918,
1727,
8306,
1125,
13,
1678,
4974,
9150,
29918,
1727,
8306,
29889,
5269,
1275,
12801,
26862,
622... |
Utils/Matrix.py | valavanisleonidas/Machine_Learning_Toolkit | 0 | 10763 | <reponame>valavanisleonidas/Machine_Learning_Toolkit
import os
import platform
import numpy
class Matrix:
def __init__(self):
if platform.system() == "Windows":
self.delimiterForPath = "\\"
else:
self.delimiterForPath = "/"
self.labelsDType = numpy.int32
se... | [
1,
529,
276,
1112,
420,
29958,
791,
29080,
275,
280,
265,
8817,
29914,
29076,
29918,
29931,
799,
1076,
29918,
12229,
7354,
13,
5215,
2897,
13,
5215,
7481,
13,
5215,
12655,
13,
13,
13,
1990,
22513,
29901,
13,
1678,
822,
4770,
2344,
120... |
tests/test_wsgi.py | invenio-toaster/invenio-base | 3 | 121959 | <reponame>invenio-toaster/invenio-base
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Test wsgi application."""
from __future__ ... | [
1,
529,
276,
1112,
420,
29958,
262,
854,
601,
29899,
517,
1901,
29914,
262,
854,
601,
29899,
3188,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
910,
934,
338,
760,
310,
512,
... |
tests/test_utils.py | marianoleonardo/device-manager | 14 | 1608219 | <reponame>marianoleonardo/device-manager
import pytest
import json
import unittest
from flask import Flask
from DeviceManager.utils import format_response, get_pagination, get_allowed_service, decrypt, retrieve_auth_token
from DeviceManager.utils import HTTPRequestError
from .token_test_generator import generate_toke... | [
1,
529,
276,
1112,
420,
29958,
3034,
713,
1772,
265,
6491,
29914,
10141,
29899,
12847,
13,
5215,
11451,
1688,
13,
5215,
4390,
13,
5215,
443,
27958,
13,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
21830,
3260,
29889,
13239,
1053,
3402,
... |
tests/serve/test_metadata.py | outerbounds/tempo | 75 | 33100 | <reponame>outerbounds/tempo
import pytest
from tempo.serve.metadata import KubernetesRuntimeOptions
@pytest.mark.parametrize(
"runtime, replicas",
[
({"replicas": 2}, 2),
({}, 1),
],
)
def test_runtime_options(runtime, replicas):
r = KubernetesRuntimeOptions(**runtime)
assert r.re... | [
1,
529,
276,
1112,
420,
29958,
5561,
23687,
29914,
1356,
1129,
13,
5215,
11451,
1688,
13,
13,
3166,
11413,
29889,
16349,
29889,
19635,
1053,
476,
17547,
7944,
5856,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,... |
ubi_api/api/models.py | rzhang74/Ubi | 0 | 127996 | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
# Create your models here.
class Tag(models.Model):
tid = models.AutoField(primary_key=True)
name = models.CharField(max_length=100)
class Video(models.Model):
vid = models.AutoField(primary_key=True... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
13,
29937,
6204,
596,
4733,
1244,
29889,
13,
1990,
10522,
29898,
9794,
29889,
3195,
... |
examples/incremental_learning/helmet_detection/training/eval.py | lidongen/sedna | 1 | 1611164 | <reponame>lidongen/sedna<gh_stars>1-10
# Copyright 2021 The KubeEdge Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | [
1,
529,
276,
1112,
420,
29958,
29880,
333,
549,
264,
29914,
8485,
1056,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
450,
476,
4003,
23894,
13189,
943,
29889,
... |
changestream_insert.py | thekitp/python-mongodb-changestream | 0 | 122411 | import os
import pymongo
import time
import random
client = pymongo.MongoClient(os.environ['CHANGE_STREAM_DB'])
while True:
print(client.changestream.collection.insert_one({"temperature": random.random() * 100}).inserted_id)
time.sleep(0.050)
| [
1,
1053,
2897,
13,
5215,
282,
962,
7443,
13,
5215,
931,
13,
5215,
4036,
13,
13,
4645,
353,
282,
962,
7443,
29889,
29924,
7443,
4032,
29898,
359,
29889,
21813,
1839,
3210,
24336,
29918,
1254,
1525,
5194,
29918,
4051,
11287,
13,
8000,
5... |
config.py | Zloklun/telepot-monitor-bot | 0 | 1614614 | <filename>config.py
#!/usr/bin/python3
# -*- coding: utf-8 *-*
import asyncio as aio
from os.path import join, dirname
from telepot.aio.delegate import exception
def sync_exec(coro):
aio.ensure_future(coro)
DEBUG = True
DIR = dirname(__file__)
TOKEN_FILE = join(DIR, 'TOKEN')
WHITELIST_FILE = join(DIR, 'whitel... | [
1,
529,
9507,
29958,
2917,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
334,
29899,
29930,
13,
13,
5215,
408,
948,
3934,
408,
263,
601,
13,
13,
31... |
operations/subtraction.py | anon-cand/nexpreval | 0 | 159225 | <filename>operations/subtraction.py
from operations.operation import Operation
class Subtraction(Operation):
"""
Representing an operation to perform Subtraction
"""
TAG = 'subtraction'
__slots__ = ('minuend', 'subtrahend')
def __init__(self):
self.minuend = None
self.subtrahe... | [
1,
529,
9507,
29958,
3372,
800,
29914,
1491,
3018,
428,
29889,
2272,
13,
3166,
6931,
29889,
16453,
1053,
20462,
13,
13,
13,
1990,
3323,
3018,
428,
29898,
10925,
1125,
13,
1678,
9995,
13,
1678,
16314,
292,
385,
5858,
304,
2189,
3323,
3... |
models/TF/VAE.py | sankhaMukherjee/vae | 0 | 66456 | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
from tensorflow.keras.layers import Dense, Input
from tensorflow.keras import Model, layers
class Encoder(layers.Layer):
def __init__(self, nLatent, layers, activations, name='encoder'):
super(Encoder, self).__init__(name=name)... | [
1,
1053,
2897,
13,
359,
29889,
21813,
1839,
8969,
29918,
6271,
29925,
29918,
16173,
29918,
14480,
29918,
1307,
29963,
6670,
2033,
353,
525,
29941,
29915,
29871,
13,
5215,
26110,
408,
15886,
13,
13,
3166,
26110,
29889,
3946,
294,
29889,
29... |
src/focus/api.py | RogerRueegg/lvw-young-talents | 1 | 22514 | from . import models
from . import serializers
from rest_framework import viewsets, permissions
class CompetitionViewSet(viewsets.ModelViewSet):
"""ViewSet for the Competition class"""
queryset = models.Competition.objects.all()
serializer_class = serializers.CompetitionSerializer
permission_classes ... | [
1,
515,
869,
1053,
4733,
13,
3166,
869,
1053,
7797,
19427,
13,
3166,
1791,
29918,
4468,
1053,
1776,
7224,
29892,
11239,
13,
13,
13,
1990,
24620,
654,
1043,
2697,
29898,
1493,
7224,
29889,
3195,
1043,
2697,
1125,
13,
1678,
9995,
1043,
... |
PyPoll/main.py | laquita44/python-challenge | 0 | 102910 | import os
import csv
import collections
from collections import Counter
# variables in list
candidate_votes = []
candidate_selection = []
# set File path
file_path = os.path.join("..", "Resources", "election_data.csv")
# set path for reader
with open(file_path) as csvfile:
csv_reader = csv.reader... | [
1,
1053,
2897,
30004,
13,
5215,
11799,
30004,
13,
5215,
16250,
30004,
13,
3166,
16250,
1053,
315,
5336,
30004,
13,
30004,
13,
29937,
3651,
297,
1051,
30004,
13,
29883,
5380,
403,
29918,
29894,
4769,
353,
5159,
30004,
13,
29883,
5380,
40... |
ar_app/scripts/renamefiles.py | osetr/ar-opencv-python | 1 | 46276 | import os
from natsort import natsorted
path_to_directory = input("Enter path to directory: ") + "/"
new_name = input("Enter new name for files: ")
try:
i = 0
list_of_files = natsorted(os.listdir(path_to_directory))
for file in list_of_files:
i += 1
extension = file.split(".")[1]
o... | [
1,
1053,
2897,
13,
3166,
302,
1446,
441,
1053,
302,
1446,
18054,
13,
13,
2084,
29918,
517,
29918,
12322,
353,
1881,
703,
10399,
2224,
304,
3884,
29901,
16521,
718,
5591,
29908,
13,
1482,
29918,
978,
353,
1881,
703,
10399,
716,
1024,
3... |
mayan/apps/document_comments/search.py | wan1869/dushuhu | 1 | 53608 | from django.utils.translation import ugettext_lazy as _
from mayan.apps.documents.search import document_page_search, document_search
document_page_search.add_model_field(
field='document_version__document__comments__comment',
label=_('Comments')
)
document_search.add_model_field(
field='comments__comment... | [
1,
515,
9557,
29889,
13239,
29889,
3286,
18411,
1053,
318,
657,
726,
29918,
433,
1537,
408,
903,
13,
13,
3166,
1122,
273,
29889,
13371,
29889,
3225,
29879,
29889,
4478,
1053,
1842,
29918,
3488,
29918,
4478,
29892,
1842,
29918,
4478,
13,
... |
cachex/caches/__init__.py | malversoft/cachex | 0 | 61655 | <reponame>malversoft/cachex
# -*- coding: utf-8 -*-
"""Memoizing cache classes."""
import sys
from .Helper import Helper
# Setup module as caches pool.
this_module = sys.modules[__name__]
Helper.setup_pool(this_module)
# Expose all properties and methods a pool has.
__all__ = list(this_module.add().__dict__)
# C... | [
1,
529,
276,
1112,
420,
29958,
5156,
369,
2695,
29914,
29883,
496,
735,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
11442,
29877,
5281,
7090,
4413,
1213,
15945,
13,
13,
13,
5215,
... |
app/middlewares/apikey_auth.py | meongbego/IOT_ADRINI | 1 | 38940 | <reponame>meongbego/IOT_ADRINI<filename>app/middlewares/apikey_auth.py<gh_stars>1-10
from functools import wraps
from app.helpers.rest import *
from app import redis_store
from flask import request
from app.models import model as db
import hashlib
def apikey_required(f):
@wraps(f)
def decorated_function(*arg... | [
1,
529,
276,
1112,
420,
29958,
1004,
549,
29890,
2412,
29914,
29902,
2891,
29918,
3035,
29934,
1177,
29902,
29966,
9507,
29958,
932,
29914,
17662,
4495,
267,
29914,
2754,
1989,
29918,
5150,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958... |
cuda/bench.py | wsmoses/XSBench-Enzyme | 0 | 194483 | <filename>cuda/bench.py
import os
import subprocess
def run(OPTIMIZE, FORWARD, INLINE, NEWCACHE, AA, PHISTRUCT, TEMPLATIZE, VERIFY, runs):
comp = subprocess.run(f'OPTIMIZE={OPTIMIZE} FORWARD={FORWARD} INLINE={INLINE} NEWCACHE={NEWCACHE} AA={AA} PHISTRUCT={PHISTRUCT} TEMPLATIZE={TEMPLATIZE} VERIFY={VERIFY} make -B... | [
1,
529,
9507,
29958,
29883,
6191,
29914,
1785,
305,
29889,
2272,
13,
5215,
2897,
13,
5215,
1014,
5014,
29871,
13,
13,
1753,
1065,
29898,
14094,
7833,
29902,
10721,
29892,
15842,
29956,
17011,
29892,
2672,
18521,
29892,
29091,
29907,
2477,
... |
scripts/portal/map915020100_PT.py | Snewmy/swordie | 9 | 87766 | <filename>scripts/portal/map915020100_PT.py<gh_stars>1-10
# Ariant Treasure Vault Entrance (915020100) => Ariant Treasure Vault
if 2400 <= chr.getJob() <= 2412 and not sm.hasMobsInField():
sm.warp(915020101, 1)
elif sm.hasMobsInField():
sm.chat("Eliminate all of the intruders first.") | [
1,
529,
9507,
29958,
16713,
29914,
25089,
29914,
1958,
29929,
29896,
29945,
29900,
29906,
29900,
29896,
29900,
29900,
29918,
7982,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
25775,
424,
6479,
37... |
ops.py | taki0112/CIPS-Tensorflow | 6 | 158570 | from cuda.upfirdn_2d import *
from cuda.fused_bias_act import fused_bias_act
##################################################################################
# Layers
##################################################################################
class Conv2D(tf.keras.layers.Layer):
def __init__(self, fmaps,... | [
1,
515,
274,
6191,
29889,
786,
29888,
1823,
29876,
29918,
29906,
29881,
1053,
334,
13,
3166,
274,
6191,
29889,
29888,
3880,
29918,
29890,
3173,
29918,
627,
1053,
285,
3880,
29918,
29890,
3173,
29918,
627,
13,
13,
13383,
13383,
13383,
1338... |
pyrap/utils.py | danielnyga/pyrap | 9 | 81366 | <filename>pyrap/utils.py
'''
Created on Nov 10, 2015
@author: nyga
'''
import datetime
import email
import os
import sys
import collections
from dnutils import edict
#
# case-insensitive dict taken from requests
#
class CaseInsensitiveDict(collections.MutableMapping):
"""
A case-insensitive ``dict``-like obj... | [
1,
529,
9507,
29958,
2272,
2390,
29914,
13239,
29889,
2272,
13,
12008,
13,
20399,
373,
2864,
29871,
29896,
29900,
29892,
29871,
29906,
29900,
29896,
29945,
13,
13,
29992,
8921,
29901,
7098,
3249,
13,
12008,
13,
5215,
12865,
13,
5215,
4876... |
jet_bridge/serializers/sql.py | BradyBromley/jet-bridge | 2 | 129013 | from sqlalchemy import text
from sqlalchemy.exc import SQLAlchemyError
from jet_bridge import fields
from jet_bridge.db import Session
from jet_bridge.exceptions.sql import SqlError
from jet_bridge.exceptions.validation_error import ValidationError
from jet_bridge.fields.sql_params import SqlParamsSerializers
from jet... | [
1,
515,
4576,
284,
305,
6764,
1053,
1426,
13,
3166,
4576,
284,
305,
6764,
29889,
735,
29883,
1053,
3758,
2499,
305,
6764,
2392,
13,
13,
3166,
22588,
29918,
18419,
1053,
4235,
13,
3166,
22588,
29918,
18419,
29889,
2585,
1053,
16441,
13,
... |
res/011-json.py | leialbert/keep-learning-python | 0 | 107315 | import json
person = {'name':'John','age':28,'city':'New York','hasChildren':False}
personJson = json.dumps(person,indent=4,separators=(':','='),sort_keys=True)
print(personJson)
with open('res/person.json', 'w') as f:
json.dump(person,f,indent=4)
person = {'name':'John','age':28,'city':'New York','hasChildren'... | [
1,
1053,
4390,
13,
10532,
353,
11117,
978,
22099,
11639,
3788,
482,
2396,
29906,
29947,
5501,
12690,
22099,
4373,
3088,
3788,
5349,
19334,
2396,
8824,
29913,
13,
13,
10532,
8148,
353,
4390,
29889,
29881,
17204,
29898,
10532,
29892,
12860,
... |
tutorial/core/sockets.py | mburst/gevent-socketio-starterkit | 6 | 164424 | from socketio.namespace import BaseNamespace
from socketio.mixins import RoomsMixin, BroadcastMixin
from socketio.sdjango import namespace
from collections import defaultdict
import redis
from gevent import Greenlet
def home_redis_worker():
r = redis.StrictRedis(host='localhost', port=6379, db=0)
... | [
1,
515,
9909,
601,
29889,
22377,
1053,
7399,
23335,
30004,
13,
3166,
9909,
601,
29889,
28084,
1144,
1053,
1528,
4835,
29924,
861,
262,
29892,
25484,
29924,
861,
262,
30004,
13,
3166,
9909,
601,
29889,
4928,
5364,
1053,
7397,
30004,
13,
... |
ptxt/mur/commonmark.py | mvasilkov/scrapheap | 2 | 112865 | <filename>ptxt/mur/commonmark.py<gh_stars>1-10
from collections import namedtuple
from ctypes import CDLL, c_char_p, c_size_t, c_int
from pathlib import WindowsPath
import platform
def _libcmark():
system = platform.system()
if system == 'Darwin':
return 'libcmark.dylib'
if system == 'Windows':
... | [
1,
529,
9507,
29958,
415,
486,
29914,
29885,
332,
29914,
9435,
3502,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
16250,
1053,
4257,
23583,
13,
3166,
274,
8768,
1053,
7307,
2208,
29892,
274,
29... |
frappe/core/doctype/prepared_report/test_prepared_report.py | oryxsolutions/frappe | 0 | 194784 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies and Contributors
# License: MIT. See LICENSE
import json
import unittest
import frappe
class TestPreparedReport(unittest.TestCase):
def setUp(self):
self.report = frappe.get_doc({"doctype": "Report", "name": "Permitted Documents For User"})
self.... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
29892,
7347,
4798,
8364,
11763,
322,
2866,
1091,
29560,
13,
29937,
19245,
29901,
... |
python/client.py | JonathanSchmalhofer/SelfDrivingRLCarGodot | 10 | 188646 | #!/usr/bin/env python
import socket
import time
def DoEpisode():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(1) # 1 second
s.connect((TCP_IP, TCP_PORT))
#print(" REGISTER");
s.send("(HEAD:10)(REGISTER)".encode('utf-8'))
data = s.recv(BUFFER_SIZE)
print(" RESPONS... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
9909,
13,
5215,
931,
13,
13,
1753,
1938,
29923,
12907,
7295,
13,
1678,
269,
353,
9909,
29889,
11514,
29898,
11514,
29889,
5098,
29918,
1177,
2544,
29892,
9909,
29889,
6156,
7... |
dogpile/__init__.py | dhellmann/dogpile.cache | 0 | 30256 | __version__ = '0.9.3'
from .lock import Lock # noqa
from .lock import NeedRegenerationException # noqa
| [
1,
4770,
3259,
1649,
353,
525,
29900,
29889,
29929,
29889,
29941,
29915,
13,
13,
3166,
869,
908,
1053,
18199,
29871,
396,
694,
25621,
13,
3166,
869,
908,
1053,
20768,
4597,
759,
362,
2451,
29871,
396,
694,
25621,
13,
2
] |
raiden/transfer/channel.py | gcarq/raiden | 0 | 60259 | # -*- coding: utf-8 -*-
# pylint: disable=too-many-lines
import heapq
from binascii import hexlify
from collections import namedtuple
from raiden.encoding.signing import recover_publickey
from raiden.transfer.architecture import TransitionResult
from raiden.transfer.balance_proof import signing_data
from raiden.transf... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
517,
29877,
29899,
13011,
29899,
9012,
13,
5215,
16947,
29939,
13,
3166,
9016,
294,
18869,
1053,
15090,
29880,
... |
script_example.py | op8867555/BGmi | 0 | 20340 | import datetime
from bgmi.script import ScriptBase
from bgmi.utils import parse_episode
class Script(ScriptBase):
class Model(ScriptBase.Model):
bangumi_name = "TEST_BANGUMI"
cover = ""
update_time = "Mon"
due_date = datetime.datetime(2017, 9, 30)
def get_download_url(self):
... | [
1,
1053,
12865,
13,
13,
3166,
25989,
2460,
29889,
2154,
1053,
14415,
5160,
13,
3166,
25989,
2460,
29889,
13239,
1053,
6088,
29918,
1022,
275,
356,
13,
13,
13,
1990,
14415,
29898,
4081,
5160,
1125,
13,
1678,
770,
8125,
29898,
4081,
5160,... |
src/streamlink/plugins/clubbingtv.py | code-review-doctor/streamlink | 0 | 92117 | """
$url clubbingtv.com
$type live, vod
$account Login required
"""
import logging
import re
from streamlink.plugin import Plugin, PluginArgument, PluginArguments, pluginmatcher
from streamlink.stream.hls import HLSStream
log = logging.getLogger(__name__)
@pluginmatcher(re.compile(
r"https?://(www\.)?clubbingt... | [
1,
9995,
13,
29938,
2271,
4402,
10549,
12427,
29889,
510,
13,
29938,
1853,
5735,
29892,
325,
397,
13,
29938,
10149,
19130,
3734,
13,
15945,
29908,
13,
13,
5215,
12183,
13,
5215,
337,
13,
13,
3166,
4840,
2324,
29889,
8582,
1053,
1858,
... |
sjb/actions/deprovision.py | brenton/aos-cd-jobs | 45 | 96180 | from __future__ import absolute_import, print_function, unicode_literals
from .interface import Action
from .named_shell_task import render_task
_DEPROVISION_TITLE = "DEPROVISION CLOUD RESOURCES"
_DEPROVISION_ACTION = "oct deprovision"
class DeprovisionAction(Action):
"""
A DeprovisionAction generates a pos... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
13,
13,
3166,
869,
13248,
1053,
9123,
13,
3166,
869,
17514,
29918,
15903,
29918,
7662,
1053,
4050,
29918,
7662,
13,
13,
... |
okdata/sdk/permission/user_types.py | oslokommune/okdata-sdk-python | 2 | 109431 | # TODO: Use these simplified dataclasses once support for Python 3.6 is
# dropped. Meanwhile we'll use the "polyfill" classes defined below.
#
# from dataclasses import dataclass, field
#
# @dataclass
# class Client:
# user_id: str
# user_type: str = field(default="client", init=False)
#
#
# @dataclass
# class ... | [
1,
396,
14402,
29901,
4803,
1438,
20875,
848,
13203,
2748,
2304,
363,
5132,
29871,
29941,
29889,
29953,
338,
13,
29937,
13700,
29889,
25065,
591,
29915,
645,
671,
278,
376,
22678,
5589,
29908,
4413,
3342,
2400,
29889,
13,
29937,
13,
29937... |
scripts/kmer/get_kmer_list.py | mahajrod/MAVR | 10 | 196439 | #!/usr/bin/env python
__author__ = '<NAME>'
import os
import argparse
from Bio import SeqIO
os.environ['MPLCONFIGDIR'] = '/tmp/'
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.ioff()
from RouToolPa.GeneralRoutines.File import make_list_of_path_to_files
from RouToolPa.Tools.Kmers import J... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
1649,
8921,
1649,
353,
12801,
5813,
16299,
13,
13,
5215,
2897,
13,
5215,
1852,
5510,
13,
3166,
21184,
1053,
25981,
5971,
13,
13,
359,
29889,
21813,
1839,
3580,
29931,
25903,
9464,
2033... |
front_end/app.py | ofbennett/sentiment-analysis-app | 2 | 174590 | import dash
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import dash_html_components as html
from dash.dependencies import Input, Output
import config
import requests
from markdown import md1, md2
colors = {'background': 'lightcyan'}
app = dash.Dash(__name__,
external_sty... | [
1,
1053,
12569,
13,
5215,
12569,
29918,
3221,
29918,
14036,
408,
270,
617,
13,
5215,
12569,
29918,
8704,
29918,
14036,
408,
4833,
29883,
13,
5215,
12569,
29918,
1420,
29918,
14036,
408,
3472,
13,
3166,
12569,
29889,
22594,
1053,
10567,
29... |
jina/drivers/convert.py | shivam-raj/jina | 0 | 1616282 | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import base64
import os
import struct
import urllib.parse
import urllib.request
import zlib
import numpy as np
from . import BaseDriver
from .helper import guess_mime, array2pb, pb2array
class BaseConvertDriver(Ba... | [
1,
4770,
8552,
1266,
1649,
353,
376,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
435,
1099,
319,
29902,
28873,
29889,
2178,
10462,
21676,
1213,
13,
1649,
506,
1947,
1649,
353,
376,
17396,
1829,
29899,
29906,
29889,
... |
Chapter08/lecture02.py | ee06b056/IntoToProgramInPython | 0 | 48797 | import datetime
class Person(object):
def __init__(self, name):
self.name = name
try:
lastBlank = name.rindex(' ')
self.lastName = name[lastBlank+1:]
except:
self.lastName = name
self.birthday = None
def getName(self):
return sel... | [
1,
1053,
12865,
13,
13,
1990,
5196,
29898,
3318,
1125,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1018,
29901,
13,
9651,
1833,
10358,
804,
353,
1024,
29889,
298... |
Game.py | RHorton97/Hangman-Game | 0 | 148477 | <reponame>RHorton97/Hangman-Game
import random as rand
class Game():
"""Holds setup functions and key gameplay data such as the word being
guessed"""
def __init__(self):
self.name = input("What is your name? ")
self.guesses = 5
self.word = self.wordSelect()
self.wordLen... | [
1,
529,
276,
1112,
420,
29958,
29934,
29950,
26342,
29929,
29955,
29914,
29950,
574,
1171,
29899,
14199,
13,
5215,
4036,
408,
20088,
13,
13,
13,
1990,
8448,
7295,
13,
1678,
9995,
29950,
3361,
6230,
3168,
322,
1820,
3748,
1456,
848,
1316... |
State.py | hhojatansari/DatasetDecoder | 1 | 111179 | import datetime as dt
ClassLabel = {
"NoLabel": "0",
"Meal_Preparation": "1",
"Relax": "2",
"Eating": "3",
"Work": "4",
"Sleeping": "5",
"Wash_Dishes": "6",
"Bed_to_Toilet": "7",
"Enter_Home": "8",
"Leave_Home": "9",
"Housekeeping": "10",
"Respirate": "11"
}
class State... | [
1,
1053,
12865,
408,
11636,
13,
13,
2385,
4775,
353,
426,
13,
1678,
376,
3782,
4775,
1115,
376,
29900,
613,
13,
1678,
376,
6816,
284,
29918,
6572,
862,
362,
1115,
376,
29896,
613,
13,
1678,
376,
9662,
1165,
1115,
376,
29906,
613,
13... |
app.py | abdulrasol/loly-ocr | 0 | 137269 | <reponame>abdulrasol/loly-ocr<gh_stars>0
from flask import Flask, redirect, request, render_template, send_file, send_from_directory
from flask_session import Session
from tempfile import mkdtemp
import helpers, time, os
app = Flask(__name__)
# App Configs
app.config["TEMPLATES_AUTO_RELOAD"] = True
app.config["DEB... | [
1,
529,
276,
1112,
420,
29958,
370,
29881,
352,
3417,
324,
29914,
29880,
18333,
29899,
8415,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
29784,
1053,
2379,
1278,
29892,
6684,
29892,
2009,
29892,
4050,
29918,
6886,
29892,
3638,
... |
dxtbx/tests/model/test_detector.py | jbeilstenedmands/cctbx_project | 0 | 158090 | from __future__ import absolute_import, division, print_function
import six.moves.cPickle as pickle
from dxtbx.model import Detector, Panel
from libtbx.test_utils import approx_equal
from scitbx.array_family import flex
def tst_get_gain(detector):
detector[0].set_gain(2.0)
assert abs(detector[0].get_gain() - 2.0)... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
13,
5215,
4832,
29889,
13529,
267,
29889,
29883,
29925,
860,
280,
408,
5839,
280,
13,
3166,
270,
486,
29890,
29916,
29889,
4299,
1053,
... |
setup.py | hanase/developer | 3 | 68278 | <gh_stars>1-10
# Install setuptools if not installed.
try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='developer',
version='0.3.0',
description='UrbanSim developer model',
author='<NAME>... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
16052,
731,
21245,
8789,
565,
451,
5130,
29889,
13,
2202,
29901,
13,
1678,
1053,
731,
21245,
8789,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
20803,
29918,
... |
plotting/plotly.py | TPei/jawbone_visualizer | 0 | 37868 | <gh_stars>0
__author__ = 'TPei'
from plotting.plotly.graph_objs import *
from data.DataHandler import get_all_the_data
"""
Working with the plotly api to create more interactive diagrams
"""
def sleep():
data = get_all_the_data()
traces = []
categories = ['bed', 'sleep', 'sound', 'light', 'awake', '... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1649,
8921,
1649,
353,
525,
3557,
10096,
29915,
13,
3166,
6492,
1259,
29889,
5317,
368,
29889,
4262,
29918,
711,
1315,
1053,
334,
13,
13,
3166,
848,
29889,
1469,
4598,
1053,
679,
29918,... |
backend/backend/views.py | AurelienGasser/substra-backend | 37 | 134325 | <reponame>AurelienGasser/substra-backend
import os
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.throttling import AnonRateThrottle
from rest_framework.authtoken.models import Token
from rest_framework.response import Response
from libs.expiry_token_authentication import token_expire_... | [
1,
529,
276,
1112,
420,
29958,
29909,
545,
492,
264,
29954,
9498,
29914,
1491,
4151,
29899,
27852,
13,
5215,
2897,
13,
3166,
1791,
29918,
4468,
29889,
1300,
400,
4476,
29889,
7406,
1053,
4250,
2408,
6444,
6066,
13,
3166,
1791,
29918,
44... |
Qcover/backends/__init__.py | BAQIS-Quantum/Qcover | 38 | 22799 | from .backend import Backend
from .circuitbyqiskit import CircuitByQiskit
from .circuitbyprojectq import CircuitByProjectq
from .circuitbycirq import CircuitByCirq
from .circuitbyqulacs import CircuitByQulacs
# from .circuitbytket import CircuitByTket
from .circuitbytensor import CircuitByTensor
from .circuitbyq... | [
1,
515,
869,
27852,
1053,
7437,
355,
30004,
13,
3166,
869,
6034,
3121,
1609,
29939,
3873,
277,
1053,
12594,
3121,
2059,
29984,
3873,
277,
30004,
13,
3166,
869,
6034,
3121,
1609,
4836,
29939,
1053,
12594,
3121,
2059,
7653,
29939,
30004,
... |
fq2sam.py | IRRI-Bioinformatics/variant-calling-pipeline | 0 | 143565 | #fq2sam.py: Align fastq read pairs to reference genome.
#created by: <NAME>
#!/usr/bin/python
import sys, getopt, re, os, subprocess
def main(argv):
#define variables
bwa_threads = ''
reference = ''
read_pair1 = ''
output_dir = ''
genome_dir = ''
#get arguments
try:
opts, a... | [
1,
396,
29888,
29939,
29906,
13445,
29889,
2272,
29901,
838,
647,
5172,
29939,
1303,
11000,
304,
3407,
2531,
608,
29889,
13,
29937,
11600,
491,
29901,
529,
5813,
29958,
13,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
13,
5215,
... |
failures/mapper2_try.py | ALaks96/MapReduce_Pyspark_Large_Matrix_Multiplication | 0 | 58512 | #!/usr/bin/python
import sys
import numpy as np
# We know the dimensions of A and B!
length = int(200) + 1
width = int(200) + 1
# Initializing A_list and B_list to deal with sparsity
A = [0]*(length*width)
B = [0]*(length*width)
for line in sys.stdin:
# Retrieving elements of (key,value) pair of our map ou... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
5215,
10876,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
1334,
1073,
278,
13391,
310,
319,
322,
350,
29991,
13,
2848,
353,
938,
29898,
29906,
29900,
29900,
29897,
718,
29871,
29896,
13,
... |
dracoon/public_models.py | Quirinwierer/dracoon-python-api | 3 | 33768 | from dataclasses import dataclass
from typing import List
@dataclass
class SystemInfo:
languageDefault: str
hideLoginPinputFields: bool
s3Hosts: List[str]
s3EnforceDirectUpload: bool
useS3Storage: bool
@dataclass
class ActiveDirectoryInfoItem:
id: int
alias: str
isGlobalAvailable: bool... | [
1,
515,
848,
13203,
1053,
848,
1990,
13,
3166,
19229,
1053,
2391,
13,
13,
29992,
1272,
1990,
13,
1990,
2184,
3401,
29901,
13,
1678,
4086,
4592,
29901,
851,
13,
1678,
9563,
11049,
29925,
2080,
14256,
29901,
6120,
13,
1678,
269,
29941,
... |
4-ManipulandoTexto/des24.py | FelipeTellini/Python | 0 | 159107 | <gh_stars>0
print('\nVerificando as primeiras letras de um texto\n')
cid = str(input('Que cidade você nasceu ? ')).strip()
print(cid[:5].lower() == 'santo')
fim = input('\nCurso de Python no YouTube, canal CURSO EM VIDEO.') | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
2158,
28909,
29876,
6565,
928,
1743,
408,
6019,
20138,
454,
10678,
316,
1922,
1426,
29877,
29905,
29876,
1495,
13,
13,
25232,
353,
851,
29898,
2080,
877,
8654,
17931,
7931,
30037,
8281,
... |
server/webdriver_tests/shared.py | suhana13/website | 0 | 140877 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
5087,
365,
12182,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
... |
golpy/util.py | Zeta611/py-game-of-life | 5 | 83827 | <filename>golpy/util.py
import time
from functools import wraps
from typing import Dict
class timeit:
records: Dict[str, float] = {}
on = False
def __call__(self, func):
@wraps(func)
def wrapper(*args, **kwargs):
if not self.on:
return func(*args, **kwargs)
... | [
1,
529,
9507,
29958,
29887,
324,
2272,
29914,
4422,
29889,
2272,
13,
5215,
931,
13,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
3166,
19229,
1053,
360,
919,
13,
13,
13,
1990,
931,
277,
29901,
13,
1678,
6475,
29901,
360,
919,
29961,
... |
PyFlowPackages/PyFlowFreeCAD/Nodes/FreeCAD_Object.py | awgrover/NodeEditor | 53 | 46861 | <reponame>awgrover/NodeEditor
'''
all still not categorized nodes
'''
from PyFlow.Packages.PyFlowFreeCAD.Nodes import *
from PyFlow.Packages.PyFlowFreeCAD.Nodes.FreeCAD_Base import timer, FreeCadNodeBase, FreeCadNodeBase2
class FreeCAD_Tube(FreeCadNodeBase2):
'''
calculate the points for a parametric tube al... | [
1,
529,
276,
1112,
420,
29958,
1450,
17170,
369,
29914,
4247,
15280,
13,
12008,
13,
497,
1603,
451,
11608,
1891,
7573,
13,
12008,
13,
3166,
10772,
17907,
29889,
16638,
1179,
29889,
19737,
17907,
20475,
29907,
3035,
29889,
20284,
1053,
334... |
ephemeral/baseline_autocorrelation_parcellated.py | BorgwardtLab/fMRI_Cubical_Persistence | 10 | 156501 | #!/usr/bin/env python
#
# Baseline calculation script for NIfTI data sets. After specifying such
# a data set and an optional brain mask, converts each participant to an
# autocorrelation-based matrix representation.
#
# The goal is to summarise each participant as a voxel-by-voxel matrix.
#
# This script is specifical... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
13,
29937,
4886,
5570,
13944,
2471,
363,
405,
3644,
24301,
848,
6166,
29889,
2860,
22146,
1316,
13,
29937,
263,
848,
731,
322,
385,
13136,
17294,
11105,
29892,
29436,
1269,
5221,
... |
goofycoin.py | Shriyanshagro/goofycoins | 0 | 114853 | <reponame>Shriyanshagro/goofycoins
#implementation of goofycoins
from datetime import datetime
import hashlib
from random import randint
# privatekey of goofy
global goofykey
global initcoin
global inituser
initcoin = 100
inituser = 5
# A class to catch error and exceptions
class GoofycoinError(Exception):
def... | [
1,
529,
276,
1112,
420,
29958,
2713,
374,
29891,
550,
29882,
351,
307,
29914,
1484,
974,
29891,
1111,
1144,
13,
29937,
21382,
310,
748,
974,
29891,
1111,
1144,
13,
13,
3166,
12865,
1053,
12865,
13,
5215,
6608,
1982,
13,
3166,
4036,
10... |
SScriptCompiler/examples/caseTest.py | alklasil/SScript | 0 | 82240 | """Simple if-else / swicth-case test."""
from src.SProgram import SProgram as program
from src.conf.SStd import SStd
def get_programData():
return {
"confs": [
SStd
],
"variableNameValuePairs": [
"i"
],
"states": [
("main", [
... | [
1,
9995,
15427,
565,
29899,
2870,
847,
2381,
293,
386,
29899,
4878,
1243,
1213,
15945,
13,
3166,
4765,
29889,
29903,
9283,
1053,
317,
9283,
408,
1824,
13,
3166,
4765,
29889,
5527,
29889,
29903,
855,
29881,
1053,
317,
855,
29881,
13,
13,... |
detectTrimPoints_woh.py | cilt-uct/TrimPointDetector | 0 | 181145 | #!/usr/bin/python
''' Detects the start and end trimpoints of an audio file. '''
import sys
import numpy
import sklearn.cluster
import time
import scipy
import os
import ConfigParser
from pyAudioAnalysis import audioFeatureExtraction as aF
from pyAudioAnalysis import audioTrainTest as aT
from pyAudioAnalysis import aud... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
12008,
5953,
522,
29879,
278,
1369,
322,
1095,
17151,
9748,
310,
385,
10348,
934,
29889,
14550,
13,
5215,
10876,
13,
5215,
12655,
13,
5215,
2071,
19668,
29889,
19594,
13,
5215,
931,
13,
5215... |
demo/__main__.py | Dralan1912/HAICOR-demo | 0 | 74926 | # Copyright (c) 2020 <NAME>
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
from __future__ import annotations
import argparse
import csv
import gzip
import json
import os
import re
import sqlite3 as sqlite
from .app import database, APP_DIRECTORY
from .models.assertions im... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
529,
5813,
29958,
13,
29937,
13,
29937,
910,
7047,
338,
5492,
1090,
278,
341,
1806,
19245,
29889,
13,
29937,
2045,
597,
22156,
1167,
29889,
990,
29914,
506,
11259,... |
src/unicon/plugins/confd/csp/__init__.py | tahigash/unicon.plugins | 1 | 936 | __author__ = "<NAME> <<EMAIL>>"
from unicon.plugins.confd import ConfdServiceList, ConfdConnection, ConfdConnectionProvider
from .statemachine import CspStateMachine
from .settings import CspSettings
from . import service_implementation as csp_svc
class CspServiceList(ConfdServiceList):
def __init__(self):
... | [
1,
4770,
8921,
1649,
353,
9872,
5813,
29958,
3532,
26862,
6227,
6778,
29908,
13,
13,
13,
3166,
443,
4144,
29889,
12800,
29889,
5527,
29881,
1053,
10811,
29881,
3170,
1293,
29892,
10811,
29881,
5350,
29892,
10811,
29881,
5350,
6980,
13,
31... |
nr_oai_pmh_harvester/rules/nusl/field998.py | Narodni-repozitar/oai-pmh-harvester | 0 | 147562 | from oarepo_oai_pmh_harvester.decorators import rule
from oarepo_oai_pmh_harvester.transformer import OAITransformer
from oarepo_taxonomies.utils import get_taxonomy_json
@rule("nusl", "marcxml", "/998__/a", phase="pre")
def call_provider(el, **kwargs):
return provider(el, **kwargs) # pragma: no cover
def prov... | [
1,
515,
288,
598,
1129,
29918,
29877,
1794,
29918,
3358,
29882,
29918,
8222,
29894,
4156,
29889,
19557,
4097,
1053,
5751,
13,
3166,
288,
598,
1129,
29918,
29877,
1794,
29918,
3358,
29882,
29918,
8222,
29894,
4156,
29889,
9067,
261,
1053,
... |
server.py | drunkHatch/CMPUT404-assignment-webserver | 0 | 12656 | # coding: utf-8
import socketserver
import re
import socket
import datetime
import os
import mimetypes as MT
import sys
# Copyright 2013 <NAME>, <NAME>
#
# 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 ... | [
1,
396,
29871,
14137,
29901,
23616,
29899,
29947,
13,
5215,
9909,
2974,
13,
5215,
337,
13,
5215,
9909,
13,
5215,
12865,
13,
5215,
2897,
13,
5215,
286,
17528,
7384,
408,
341,
29911,
13,
5215,
10876,
13,
13,
29937,
14187,
1266,
29871,
2... |
pred_shots/main.py | RasmusRynell/Predicting-NHL | 1 | 127030 | <filename>pred_shots/main.py
from handler import *
import json
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
def print_help():
print("Current commands: ")
print("1. help: Shows this")
print("2. exit: Exits the process, nothing is saved")
print("3. eval: ")
print("4. und: Refreshes/Updates the ... | [
1,
529,
9507,
29958,
11965,
29918,
845,
1862,
29914,
3396,
29889,
2272,
13,
3166,
7834,
1053,
334,
13,
5215,
4390,
13,
5215,
2897,
13,
359,
29889,
21813,
1839,
8969,
29918,
6271,
29925,
29918,
16173,
29918,
14480,
29918,
1307,
29963,
6670... |
backend/project/posts/utils/PostAlbumUtil.py | winoutt/winoutt-django | 0 | 151110 | from project.posts.models import PostAlbum
def create(post, photos):
for photo in photos:
PostAlbum.objects.create(post=post, photo=photo, photo_original=photo)
def get_post_album(post):
return PostAlbum.objects.filter(post=post) | [
1,
515,
2060,
29889,
14080,
29889,
9794,
1053,
4918,
2499,
2404,
30004,
13,
30004,
13,
1753,
1653,
29898,
2490,
29892,
20612,
1125,
30004,
13,
1678,
363,
15373,
297,
20612,
29901,
30004,
13,
4706,
4918,
2499,
2404,
29889,
12650,
29889,
32... |
tests/test_disk_cache/test_disk_general.py | SHIELD616416/hello-world | 0 | 172702 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# DATE: 2022/1/19
# Author: <EMAIL>
import os
import sqlite3.dbapi2 as sqlite3
import threading
import time
from typing import NoReturn
import pytest
from cache3 import SimpleDiskCache
from cache3.disk import SessionDescriptor
# api >>> SessionDescriptor.__set__
def test__... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
20231,
29901,
29871,
29906,
29900,
29906,
29906,
29914,
29896,
29914,
29896,
29929,
13,
29937,
13361,
299... |
check_constraints/models.py | theju/django-check-constraints | 4 | 107384 | # Dummy models.py file to allow for tests to run
from django.db import models
class CCTestModel(models.Model):
name = models.CharField(max_length=10)
age = models.IntegerField()
gender = models.CharField(max_length=10)
price = models.PositiveIntegerField()
discount = models.PositiveIntegerField()
... | [
1,
396,
360,
11770,
4733,
29889,
2272,
934,
304,
2758,
363,
6987,
304,
1065,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
1990,
315,
1783,
342,
3195,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
... |
tests/test_channel.py | rwilhelm/aiormq | 176 | 3426 | import asyncio
import uuid
import pytest
from aiomisc_pytest.pytest_plugin import TCPProxy
import aiormq
async def test_simple(amqp_channel: aiormq.Channel):
await amqp_channel.basic_qos(prefetch_count=1)
assert amqp_channel.number
queue = asyncio.Queue()
deaclare_ok = await amqp_channel.queue_dec... | [
1,
1053,
408,
948,
3934,
13,
5215,
318,
5416,
13,
13,
5215,
11451,
1688,
13,
3166,
7468,
290,
10669,
29918,
2272,
1688,
29889,
2272,
1688,
29918,
8582,
1053,
19374,
14048,
13,
13,
5215,
7468,
555,
29939,
13,
13,
13,
12674,
822,
1243,
... |
sumo/tools/contributed/sumopy/agilepy/lib_wx/test_app.py | iltempe/osmosi | 0 | 1614205 | <filename>sumo/tools/contributed/sumopy/agilepy/lib_wx/test_app.py
import os
import sys
import wx
from wx.lib.wordwrap import wordwrap
if __name__ == '__main__':
try:
APPDIR = os.path.dirname(os.path.abspath(__file__))
except:
APPDIR = os.path.dirname(os.path.abspath(sys.argv[0]))
AGILEDI... | [
1,
529,
9507,
29958,
2083,
29877,
29914,
8504,
29914,
1285,
7541,
29914,
2083,
2270,
29914,
351,
488,
2272,
29914,
1982,
29918,
23310,
29914,
1688,
29918,
932,
29889,
2272,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
5215,
26437,
13,
3166,
... |
rubi/datasets/vqa2.py | abhipsabasu/rubi.bootstrap.pytorch | 83 | 16521 | <reponame>abhipsabasu/rubi.bootstrap.pytorch
import os
import csv
import copy
import json
import torch
import numpy as np
from os import path as osp
from bootstrap.lib.logger import Logger
from bootstrap.lib.options import Options
from block.datasets.vqa_utils import AbstractVQA
from copy import deepcopy
import random
... | [
1,
529,
276,
1112,
420,
29958,
370,
14587,
370,
294,
29884,
29914,
29878,
431,
29875,
29889,
8704,
29889,
2272,
7345,
305,
13,
5215,
2897,
13,
5215,
11799,
13,
5215,
3509,
13,
5215,
4390,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
744... |
riberry/policy/helpers.py | srafehi/riberry | 2 | 100818 | from .engine import Rule, AttributeContext, Policy
class ShorthandRule(Rule):
def __init__(self, func):
self.func = func
def target_clause(self, context: AttributeContext) -> bool:
return True
def condition(self, context: AttributeContext) -> bool:
return self.func(context)
cl... | [
1,
515,
869,
10599,
1053,
27308,
29892,
23833,
2677,
29892,
25219,
13,
13,
13,
1990,
1383,
2072,
392,
10740,
29898,
10740,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3653,
1125,
13,
4706,
1583,
29889,
9891,
353,
3653,
13,
... |
djapi/authtoken/models.py | Suor/djapi | 12 | 38104 | <reponame>Suor/djapi<gh_stars>10-100
import binascii
import os
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@python_2_unicode_compatible
class Token(models.Model):
"""
The de... | [
1,
529,
276,
1112,
420,
29958,
5091,
272,
29914,
19776,
2754,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
9016,
294,
18869,
13,
5215,
2897,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
... |
packages/pytest-simcore/src/pytest_simcore/minio_service.py | elisabettai/osparc-simcore | 0 | 65001 | <gh_stars>0
# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable
import logging
from distutils.util import strtobool
from typing import Dict, Iterator
import pytest
import tenacity
from _pytest.monkeypatch import MonkeyPatch
from minio import Minio
fro... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
276,
12119,
29899,
5561,
29899,
978,
30004,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
348,
3880,
29899,
23516,
30004,
13,
29937,
282,
290... |
libs/enums.py | paulirish/covid-data-model | 1 | 141237 | import enum
# Fips code chosen for all unknown fips values.
# TODO: This should maybe be unique per state.
UNKNOWN_FIPS = "99999"
class Intervention(enum.Enum):
NO_MITIGATION = 0
HIGH_MITIGATION = 1 # on the webiste, strictDistancingNow
MODERATE_MITIGATION = 3 # weak distancingNow on the website
SELEC... | [
1,
1053,
14115,
13,
13,
29937,
383,
4512,
775,
10434,
363,
599,
9815,
285,
4512,
1819,
29889,
13,
29937,
14402,
29901,
910,
881,
5505,
367,
5412,
639,
2106,
29889,
13,
3904,
29968,
6632,
16048,
29918,
3738,
7024,
353,
376,
29929,
29929,... |
pywebcopy/schedulers.py | rajatomar788/pywebcopy7 | 5 | 83078 | # Copyright 2020; <NAME>
# See license for more details
import logging
import threading
import weakref
from requests import ConnectionError
from six import PY3
from six import string_types
from six.moves.urllib.parse import urlparse
from .elements import VoidResource
from .elements import CSSResource
from .elements i... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
29936,
529,
5813,
29958,
13,
29937,
2823,
19405,
363,
901,
4902,
13,
5215,
12183,
13,
5215,
3244,
292,
13,
5215,
8062,
999,
13,
13,
3166,
7274,
1053,
15160,
2392,
13,
3166,
4832,
... |
kardioml/segmentation/teijeiro/model/interpretation.py | Seb-Good/physionet-challenge-2020 | 13 | 120358 | <gh_stars>10-100
# -*- coding: utf-8 -*-
# pylint: disable-msg=E0202, E0102, E1101, E1103, E1001
"""
Created on Fri Jan 24 09:46:28 2014
This module contains the definition of the interpretation class, which is the
basic unit of the search process which tries to solve interpretation problems.
@author: <NAME>
"""
from... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
282,
2904,
524,
29901,
11262,
29899,
7645,
29922,
29923,
29900,
... |
extensions/log.py | MerelyServices/Merely-Framework | 1 | 194403 | <gh_stars>1-10
"""
Log - User activity recording and error tracing
Features: to file, to channel, command, responses to a command, errors, misc
Recommended cogs: Error
"""
import traceback
from types import TracebackType
from typing import Union
import disnake
from disnake.ext import commands
class Log(commands... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
29871,
4522,
448,
4911,
6354,
16867,
322,
1059,
16703,
292,
13,
29871,
5169,
3698,
29901,
304,
934,
29892,
304,
8242,
29892,
1899,
29892,
20890,
304... |
0531 Binary Matrix Leftmost One.py | ansabgillani/binarysearchcomproblems | 1 | 60450 | <reponame>ansabgillani/binarysearchcomproblems<gh_stars>1-10
class Solution:
def solve(self, matrix):
return min((bisect_left(row,1) for row in matrix if row and bisect_left(row,1) < len(row) and row[bisect_left(row,1)] == 1), default=-1)
| [
1,
529,
276,
1112,
420,
29958,
550,
370,
29887,
453,
3270,
29914,
19541,
4478,
510,
17199,
29879,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1990,
24380,
29901,
13,
1678,
822,
4505,
29898,
1311,
29892,
4636,
11... |
5oop-data-type.py | syedmurad1/OOP-Python | 0 | 102950 | # Text Type: str
# Numeric Types: int, float, complex
# Sequence Types: list, tuple, range
# Mapping Type: dict
# Set Types: set, frozenset
# Boolean Type: bool
# Binary Types: bytes, bytearray, memoryview
x = float(1) # x will be 1.0
y = float(2.8) # y will be 2.8
z = float("3") # z will be 3.0
w = float("4.2... | [
1,
396,
3992,
5167,
29901,
12,
710,
13,
29937,
405,
25099,
28025,
29901,
12,
524,
29892,
5785,
29892,
4280,
13,
29937,
922,
3910,
28025,
29901,
12,
1761,
29892,
18761,
29892,
3464,
13,
29937,
341,
20304,
5167,
29901,
12,
8977,
13,
29937... |
src/gfx/map.py | MartinKondor/leap-of-time | 0 | 1604955 | """
Map class for playable and useable maps.
"""
import os
import pygame
from src.config import CONFIG
from src.gfx.tileset import Tileset
from src.gfx.map_layer import MapLayer
import lib.PAdLib.occluder as occluder
import lib.PAdLib.shadow as shadow
class Map:
def __init__(self, file_name):
self.til... | [
1,
9995,
13,
3388,
770,
363,
1708,
519,
322,
671,
519,
11053,
29889,
13,
15945,
29908,
13,
5215,
2897,
13,
13,
5215,
22028,
13,
13,
3166,
4765,
29889,
2917,
1053,
8707,
18667,
13,
3166,
4765,
29889,
29887,
11093,
29889,
1376,
267,
300... |
members/crm/migrations/0017_profile_qb_realm_id.py | ocwc/ocwc-members | 0 | 49826 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-01-20 12:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("crm", "0016_profile")]
operations = [
migrations.AddField(
model_name="prof... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29896,
29889,
29896,
29946,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29896,
29899,
299... |
tests/person_api/__init__.py | DerPate/OpenSlides | 1 | 162721 | <gh_stars>1-10
# -*- coding: utf-8 -*-
VERSION = (9999, 9999, 9999, 'alpha', 1)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
16358,
353,
313,
29929,
29929,
29929,
29929,
29892,
29871,
29929,
29929,
29929,
... |
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/PA_ATTITUDE.py | musen142/py-apple-dynamics | 1 | 31837 | <reponame>musen142/py-apple-dynamics<filename>Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/PA_ATTITUDE.py
from math import sin,cos,pi
def cal_ges(PIT,ROL,l,b,w,x,Hc):
YA=0
P=PIT*pi/180
R=ROL*pi/180
Y=YA*pi/180
#腿1
ABl_x=l/2 - x -(l*cos(P)*cos(Y))/2 + (b*cos(P)*sin(Y))/2
ABl_y=w/2 - (b*(cos(R... | [
1,
529,
276,
1112,
420,
29958,
8366,
264,
29896,
29946,
29906,
29914,
2272,
29899,
11548,
29899,
29881,
2926,
1199,
29966,
9507,
29958,
19737,
12113,
22554,
1199,
478,
29955,
29889,
29941,
317,
10363,
29914,
7228,
29899,
29928,
2926,
1199,
... |
torchtools/tensors/tensor_group.py | cjwcommuny/torch-tools | 0 | 22494 | <reponame>cjwcommuny/torch-tools
from typing import Dict, Tuple
import torch
from torch import Tensor
from torchtools.tensors.function import unsqueeze
class TensorGroup:
def __init__(self, tensors: Dict[str, Tensor], check_validity: bool=True):
self.tensors = tensors
if check_validity:
... | [
1,
529,
276,
1112,
420,
29958,
29883,
29926,
29893,
2055,
348,
29891,
29914,
7345,
305,
29899,
8504,
13,
3166,
19229,
1053,
360,
919,
29892,
12603,
552,
13,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
1053,
323,
6073,
13,
13,
3166,
4842... |
dbs/dal/Whiteport.py | xinghejd/opencanary_web | 633 | 24609 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Author: pirogue
Purpose: 白名单端口表操作
Site: http://pirogue.org
Created: 2018-08-03 17:32:54
"""
from dbs.initdb import DBSession
from dbs.models.Whiteport import Whiteport
from sqlalchemy import desc,asc
from sqlalchemy.exc import InvalidRequestError
# import s... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29871,
13361,
29901,
2930,
9102,
434,
29871,
13,
29871,
15247,
4220,
29901,
29871,
3086... |
examples/multi_client_example.py | ondewo/ondewo-csi-client-python | 0 | 32971 | <reponame>ondewo/ondewo-csi-client-python<filename>examples/multi_client_example.py
#!/usr/bin/env python
# coding: utf-8
#
# Copyright 2021 ONDEWO GmbH
#
# 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 Lic... | [
1,
529,
276,
1112,
420,
29958,
13469,
827,
29914,
13469,
827,
29899,
29883,
1039,
29899,
4645,
29899,
4691,
29966,
9507,
29958,
19057,
29914,
9910,
29918,
4645,
29918,
4773,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
301... |
audioroutines.py | jmcmellen/sameeas | 17 | 70800 | <reponame>jmcmellen/sameeas<filename>audioroutines.py
import math, struct, random, array
pi = math.pi
def getFIRrectFilterCoeff(fc, sampRate, filterLen=20):
'Calculate FIR lowpass filter weights using hamming window'
'y(n) = w0 * x(n) + w1 * x(n-1) + ...'
ft = float(fc) / sampRate
#print ft
... | [
1,
529,
276,
1112,
420,
29958,
21231,
4912,
4919,
29914,
17642,
29872,
294,
29966,
9507,
29958,
15052,
1611,
449,
1475,
29889,
2272,
13,
5215,
5844,
29892,
2281,
29892,
4036,
29892,
1409,
30004,
13,
30004,
13,
1631,
353,
5844,
29889,
1631... |
src/AoC_2021/d12_paths_through_caves_bfs_adjacency_dict_networkx/cave_navigating_graph_with_networkx_vis.py | derailed-dash/Advent-of-Code | 9 | 156494 | <filename>src/AoC_2021/d12_paths_through_caves_bfs_adjacency_dict_networkx/cave_navigating_graph_with_networkx_vis.py<gh_stars>1-10
r"""
Author: Darren
Date: 12/12/2021
Solving https://adventofcode.com/2021/day/12
We need to find all the paths through a network of caves,
and then determine the best path.
The cave map... | [
1,
529,
9507,
29958,
4351,
29914,
29909,
29877,
29907,
29918,
29906,
29900,
29906,
29896,
29914,
29881,
29896,
29906,
29918,
24772,
29918,
20678,
29918,
29883,
5989,
29918,
1635,
29879,
29918,
26859,
562,
3819,
29918,
8977,
29918,
11618,
29916,... |
dustbin/py2app/.eggs/py2app-0.12-py2.7.egg/py2app/script_py2applet.py | orangeYao/twiOpinion | 0 | 137678 | """
Create an applet from a Python script.
You can drag in packages, Info.plist files, icons, etc.
It's expected that only one Python script is dragged in.
"""
from __future__ import print_function
import os, sys
from distutils.core import setup
from plistlib import Plist
import py2app
import tempfile
import shutil
... | [
1,
9995,
13,
4391,
385,
623,
1026,
515,
263,
5132,
2471,
29889,
13,
13,
3492,
508,
8338,
297,
9741,
29892,
22140,
29889,
572,
391,
2066,
29892,
27673,
29892,
2992,
29889,
13,
13,
3112,
29915,
29879,
3806,
393,
871,
697,
5132,
2471,
33... |
tests/test_bic.py | KayJay89/schwifty | 0 | 71578 | import pytest
from schwifty import BIC
def test_bic():
bic = BIC("GENODEM1GLS")
assert bic.formatted == "GENO DE M1 GLS"
assert bic.validate()
def test_bic_allow_invalid():
bic = BIC("GENODXM1GLS", allow_invalid=True)
assert bic
assert bic.country_code == "DX"
with pytest.raises(ValueEr... | [
1,
1053,
11451,
1688,
13,
13,
3166,
25184,
361,
1017,
1053,
350,
2965,
13,
13,
13,
1753,
1243,
29918,
29890,
293,
7295,
13,
1678,
289,
293,
353,
350,
2965,
703,
24647,
29949,
2287,
29924,
29896,
7239,
29903,
1159,
13,
1678,
4974,
289,... |
tests/test_request_body.py | jaraco/aspen | 1 | 131724 | <filename>tests/test_request_body.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from pytest import raises
from aspen.http.request import Headers
import aspen.body_parsers as parsers
from aspen.exceptions import M... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
3827,
29918,
2587,
29889,
2272,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
2991... |
src/ppu.py | condector/pynes | 2 | 190342 | <filename>src/ppu.py
import threading
import multiprocessing
import time
from array import array
from renderer import RendererManager
class PPU:
class VolatileMemory:
def __init__(self, size):
self.ram = array('B', [0x00] * size)
def read(self, a=0x0):
return self.ram[a]
... | [
1,
529,
9507,
29958,
4351,
29914,
407,
29884,
29889,
2272,
13,
5215,
3244,
292,
13,
5215,
6674,
307,
985,
292,
13,
5215,
931,
13,
3166,
1409,
1053,
1409,
13,
13,
3166,
4050,
261,
1053,
26000,
261,
3260,
13,
13,
1990,
349,
7056,
2990... |
example/front_end_validator_example/views.py | johnfraney/django-front-end-validators | 18 | 1606067 | from django.views.generic import CreateView
from .forms import SampleModelForm
from .models import SampleModel
class SampleModelCreate(CreateView):
model = SampleModel
form_class = SampleModelForm
| [
1,
515,
9557,
29889,
7406,
29889,
19206,
1053,
6204,
1043,
13,
3166,
869,
9514,
1053,
21029,
3195,
2500,
13,
3166,
869,
9794,
1053,
21029,
3195,
13,
13,
13,
1990,
21029,
3195,
4391,
29898,
4391,
1043,
1125,
13,
1678,
1904,
353,
21029,
... |
src/yellowdog_client/common/server_sent_events/sse4python/chained_thread.py | yellowdog/yellowdog-sdk-python-public | 0 | 105562 | <gh_stars>0
from threading import Thread
class ChainedThread(Thread):
def __init__(self, callback, target): # NOSONAR
super(ChainedThread, self).__init__()
self.__target = target
self.__callback = callback
def run(self):
try:
res = self.__target()
finally... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
3244,
292,
1053,
10480,
13,
13,
13,
1990,
678,
7114,
4899,
29898,
4899,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6939,
29892,
3646,
1125,
259,
396,
11698,
3094,
1718,
... |
forum/migrations/0001_initial.py | michaelyou/One-piece-forum | 1 | 70801 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.auth.models
import django.utils.timezone
from django.conf import settings
import django.core.validators
import forum.models
class Migration(migrations.Migration):
dependencies = [
... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
29889,
2585,
1053,
4733,
29892,
9725,
800,
13,
5215,
9557,
29889,
215... |
edge-tool/cbor_converter.py | hckim-kornic/mbed-edge-kornic | 0 | 16902 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2018 ARM Ltd.
#
# SPDX-License-Identifier: Apache-2.0
#
# 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 ... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
9033,
29924,
19806,
29889,
13,
29937,
13,
29937,
10937,
29928,
29990,
29899,
... |
distributed/deploy/adaptive_core.py | arpit1997/distributed | 0 | 70888 | <reponame>arpit1997/distributed
import collections
import math
from tornado.ioloop import IOLoop
import toolz
from ..metrics import time
from ..utils import parse_timedelta, PeriodicCallback
class AdaptiveCore:
"""
The core logic for adaptive deployments, with none of the cluster details
This class con... | [
1,
529,
276,
1112,
420,
29958,
6834,
277,
29896,
29929,
29929,
29955,
29914,
5721,
7541,
13,
5215,
16250,
13,
5215,
5844,
13,
13,
3166,
10146,
912,
29889,
29875,
3543,
459,
1053,
10663,
18405,
13,
5215,
5780,
29920,
13,
13,
3166,
6317,
... |
data_management/data.py | School-courses/covid19-forecast | 0 | 95780 | import os
from functools import reduce
import numpy as np
import pandas as pd
from sklearn.preprocessing import minmax_scale, scale
class Data():
def __init__(self, no_hist_days, no_hist_weeks, target_label, root_dir="", begin_test_date=None, scale_data=None):
data_daily = os.path.join(root_dir, "data/sl... | [
1,
1053,
2897,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
2071,
19668,
29889,
1457,
19170,
1053,
1375,
3317,
29918,
7052,
29892,
6287,
13,
13,
13,
1990,
3630,
7295,
1... |
apps/accounts/conf.py | sotkonstantinidis/testcircle | 3 | 192258 | from django.conf import settings # noqa
from appconf import AppConf
class AccountConf(AppConf):
"""
Custom settings for the account module. Mainly settings required for
the login on the remote system.
"""
PID = 3
LOGIN_TYPE = 'login'
LOGIN_SUCCESS_URL = 'home'
# The name of the UNCCD... | [
1,
515,
9557,
29889,
5527,
1053,
6055,
29871,
396,
694,
25621,
13,
3166,
623,
5527,
1053,
2401,
16376,
13,
13,
13,
1990,
16535,
16376,
29898,
2052,
16376,
1125,
13,
1678,
9995,
13,
1678,
8701,
6055,
363,
278,
3633,
3883,
29889,
4241,
... |
libs/raw_image.py | guatek/Dual-Mag-Data | 0 | 172404 | <filename>libs/raw_image.py
# -*- coding: utf-8 -*-
import os
import cv2
import json
import struct
import datetime
import numpy as np
from tifffile import TiffWriter
from psutil import virtual_memory
from loguru import logger
__author__ = "<NAME>"
__copyright__ = "Copyright 2020 Guatek"
__credits__ = ["Guatek"]
__lice... | [
1,
529,
9507,
29958,
10254,
29914,
1610,
29918,
3027,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
5215,
13850,
29906,
13,
5215,
4390,
13,
5215,
2281,
13,
5215,
12865... |
GUI.py | wtarimo/CFCScorePredictor | 0 | 44723 | """
<NAME>
COSI 157 - Final Project: CFC Score Predictor
This module manages instances of games
11/11/2012
"""
from Game import *
def userInputBox(win):
"""Creates and diplays graphical fields for user signing and registration"""
Text(Point(55,50), "Full Name:").draw(win)
rName = Entry... | [
1,
9995,
30004,
13,
29966,
5813,
3238,
13,
3217,
5425,
29871,
29896,
29945,
29955,
448,
9550,
8010,
29901,
315,
8610,
2522,
487,
21099,
919,
272,
30004,
13,
4013,
3883,
767,
1179,
8871,
310,
8090,
30004,
13,
29896,
29896,
29914,
29896,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.