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 |
|---|---|---|---|---|---|
PP4E-Examples-1.4/Examples/PP4E/System/Processes/spawnv.py | AngelLiang/PP4E | 0 | 1616319 | """
start up 10 copies of child.py running in parallel;
use spawnv to launch a program on Windows (like fork+exec);
P_OVERLAY replaces, P_DETACH makes child stdout go nowhere;
or use portable subprocess or multiprocessing options today!
"""
import os, sys
for i in range(10):
if sys.platform[:3] == 'win':
... | [
1,
9995,
13,
2962,
701,
29871,
29896,
29900,
14591,
310,
2278,
29889,
2272,
2734,
297,
8943,
29936,
13,
1509,
29178,
29894,
304,
6826,
263,
1824,
373,
3852,
313,
4561,
27350,
29974,
4258,
416,
13,
29925,
29918,
29949,
5348,
18799,
1634,
... |
yatube/posts/migrations/0014_auto_20210712_1142.py | EugeneSal/hw05-ver2 | 0 | 169215 | # Generated by Django 2.2.6 on 2021-07-12 11:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('posts', '0013_auto_20210... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
29889,
29953,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29955,
29899,
29896,
29906,
29871,
29896,
29896,
29901,
29946,
29906,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
... |
consumer.py | sandeeppradhan92/python-kafka-avro | 71 | 150768 | <filename>consumer.py
import io
import avro.schema
import avro.io
from kafka import KafkaConsumer
# To consume messages
CONSUMER = KafkaConsumer('my-topic',
group_id='my_group',
bootstrap_servers=['localhost:9092'])
SCHEMA_PATH = "user.avsc"
SCHEMA = avro.schema.parse... | [
1,
529,
9507,
29958,
25978,
261,
29889,
2272,
13,
5215,
12013,
13,
5215,
1029,
307,
29889,
11010,
13,
5215,
1029,
307,
29889,
601,
13,
3166,
413,
20817,
1053,
476,
20817,
13696,
4680,
13,
13,
29937,
1763,
29151,
7191,
13,
6007,
25021,
... |
stock-filters/decliff.py | bennettdc/MCEdit-Unified | 237 | 177632 | """
DeCliff filter contributed by Minecraft Forums user "DrRomz"
Originally posted here:
http://www.minecraftforum.net/topic/13807-mcedit-minecraft-world-editor-compatible-with-mc-beta-18/page__st__3940__p__7648793#entry7648793
"""
from numpy import zeros, array
import itertools
from pymclevel import alphaMaterials
a... | [
1,
9995,
13,
2772,
6821,
2593,
4175,
26869,
491,
26833,
17293,
1152,
6762,
1404,
376,
25639,
29934,
290,
29920,
29908,
13,
13,
23182,
635,
8059,
1244,
29901,
13,
1124,
597,
1636,
29889,
24669,
17293,
23343,
29889,
1212,
29914,
13010,
2991... |
sbpy/spectroscopy/tests/test_spec.py | dirac-institute/sbpy | 47 | 147357 | <filename>sbpy/spectroscopy/tests/test_spec.py
import os
def data_path(filename):
data_dir = os.path.join(os.path.dirname(__file__), 'data')
return os.path.join(data_dir, filename)
class MockResponseSpec(object):
def __init__(self, filename):
self.filename = data_path(filename)
@property
... | [
1,
529,
9507,
29958,
20778,
2272,
29914,
21494,
307,
1557,
2270,
29914,
21150,
29914,
1688,
29918,
6550,
29889,
2272,
13,
5215,
2897,
13,
13,
13,
1753,
848,
29918,
2084,
29898,
9507,
1125,
13,
1678,
848,
29918,
3972,
353,
2897,
29889,
2... |
test/test_worm_api.py | Atomicology/isilon_sdk_python | 0 | 191715 | <gh_stars>0
# coding: utf-8
"""
Copyright 2016 SmartBear Software
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 ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
13,
11882,
1266,
29871,
29906,
29900,
29896,
29953,
4116,
442,
29933,
799,
18540,
13,
13,
259,
10413,
21144,
1090,
278,
133... |
recruiting/migrations/0002_adminresume_bottom_msg.py | NSYT0607/DONGKEY | 1 | 44302 | <filename>recruiting/migrations/0002_adminresume_bottom_msg.py<gh_stars>1-10
# Generated by Django 2.0.1 on 2018-02-15 22:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recruiting', '0001_initial'),
]
operations = [
migrations.AddFi... | [
1,
529,
9507,
29958,
3757,
9216,
292,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29906,
29918,
6406,
690,
2017,
29918,
8968,
29918,
7645,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
3251,
6... |
software/supervisor/views/ErrorView.py | ghsecuritylab/project-powerline | 0 | 1615868 | from PyQt5.QtWidgets import QWidget, QPushButton, QLabel
from PyQt5.QtGui import QFont
import time
class ErrorView(QWidget):
def __init__(self, parent):
super(ErrorView, self).__init__(parent)
font = QFont("Arial", 10)
font_title = QFont()
font.setBold(1)
self.error_lb = ... | [
1,
515,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
660,
8801,
29892,
660,
27031,
3125,
29892,
660,
4775,
13,
3166,
10772,
17303,
29945,
29889,
17303,
28707,
1053,
660,
9824,
13,
5215,
931,
13,
13,
13,
1990,
4829,
1043,
29898,
... |
servidor/delivery/views.py | Mendw/delivery | 0 | 72208 | <filename>servidor/delivery/views.py
# pylint: disable=no-member
from delivery.models import *
from delivery.serializers import *
from django.contrib.auth.forms import UserCreationForm
from django.utils.http import urlsafe_base64_decode
from django.utils.encoding import force_text
from django.contrib.auth import logi... | [
1,
529,
9507,
29958,
2140,
23377,
29914,
29881,
27657,
29914,
7406,
29889,
2272,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
1217,
29899,
14242,
13,
13,
3166,
28289,
29889,
9794,
1053,
334,
13,
3166,
28289,
29889,
15550,
19427,
1053,
... |
lambda_function.py | sagnikdas98/Monopoly-Master | 2 | 172848 | from monopoly_backend import *
from lambda_stuff import *
board = None
started = False
def lambda_handler(event, context):
if event['request']['type'] == "LaunchRequest":
return on_launch(event, context)
elif event['request']['type'] == "IntentRequest":
return intent_router(event, context,)
... | [
1,
515,
1601,
13242,
29891,
29918,
27852,
1053,
334,
13,
3166,
14013,
29918,
303,
3096,
1053,
334,
13,
13,
3377,
353,
6213,
13,
2962,
287,
353,
7700,
13,
13,
1753,
14013,
29918,
13789,
29898,
3696,
29892,
3030,
1125,
13,
13,
1678,
565... |
tests/test_joints.py | slaclab/pystand | 0 | 13532 | ############
# Standard #
############
import math
###############
# Third Party #
###############
import ophyd
import pytest
##########
# Module #
##########
from detrot import ConeJoint, AngledJoint, StandPoint, Point
from conftest import PseudoMotor
@pytest.fixture(scope='function')
def pseudo_cone():
angled... | [
1,
835,
7346,
29937,
13,
29937,
10117,
396,
13,
7346,
4136,
13,
5215,
5844,
13,
13,
7346,
4136,
2277,
29937,
13,
29937,
18008,
9173,
396,
13,
7346,
4136,
2277,
29937,
13,
5215,
288,
561,
2941,
13,
5215,
11451,
1688,
13,
13,
7346,
22... |
00_data_ingest/dowload_han_data.py | mjoppich/tabula-muris | 0 | 1605558 | <reponame>mjoppich/tabula-muris<filename>00_data_ingest/dowload_han_data.py
import urllib.request
import os
with open("han_data/han_metadata.csv") as fin:
for line in fin:
aline = line.strip().split(",")
gsm = aline[0]
if gsm == None or not gsm.startswith("GSM"):
continue
... | [
1,
529,
276,
1112,
420,
29958,
29885,
2212,
407,
436,
29914,
3891,
2497,
29899,
29885,
332,
275,
29966,
9507,
29958,
29900,
29900,
29918,
1272,
29918,
292,
342,
29914,
29881,
340,
1359,
29918,
5403,
29918,
1272,
29889,
2272,
13,
5215,
314... |
moshmosh/extensions/pipelines.py | Aloxaf/moshmosh | 114 | 572 | <reponame>Aloxaf/moshmosh<gh_stars>100-1000
from moshmosh.extension import Extension
from moshmosh.ast_compat import ast
class PipelineVisitor(ast.NodeTransformer):
"""
`a | f -> f(a)`, recursively
"""
def __init__(self, activation):
self.activation = activation
def visit_BinOp(self, n: a... | [
1,
529,
276,
1112,
420,
29958,
29909,
417,
29916,
2142,
29914,
7681,
7184,
10578,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
19767,
7184,
10578,
29889,
17588,
1053,
7338,
2673,
1... |
util.py | samrat2825/Skeleton-Based-Human-Action-Recognition-SGN- | 0 | 195374 | import os
import csv
import numpy as np
import matplotlib.pyplot as plt
import torch.nn as nn
import torch
import os.path as osp
def make_dir(dataset):
if dataset == 'NTU':
output_dir = os.path.join('./results/NTU/')
elif dataset == 'NTU120':
output_dir = os.path.join('./results/NTU120/')
... | [
1,
1053,
2897,
13,
5215,
11799,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
13,
13,
... |
day04.py | drax-dev/AoC | 0 | 1617986 | <filename>day04.py
class BoardField:
def __init__(self, input_value):
self.value = input_value
self.is_marked = False
class Board:
def __init__(self, size_x, size_y):
self.size_x = size_x
self.size_y = size_y
self.board = [[BoardField(0) for x in range(size_x)] for y in... | [
1,
529,
9507,
29958,
3250,
29900,
29946,
29889,
2272,
13,
1990,
12590,
3073,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1881,
29918,
1767,
1125,
13,
4706,
1583,
29889,
1767,
353,
1881,
29918,
1767,
13,
4706,
1583,
29889,
275,
... |
src/4-4.py | Zepyhrus/tf2 | 0 | 120702 | <reponame>Zepyhrus/tf2<filename>src/4-4.py
import tensorflow as tf
import tensorflow_datasets as tfds
tf.compat.v1.disable_v2_behavior()
def get_iris_data():
ds_train, *_ = tfds.load(name='iris', split=['train'])
with open('iris.csv', 'w') as f:
for i, ds in enumerate(ds_train):
features = ds['feature... | [
1,
529,
276,
1112,
420,
29958,
29999,
1022,
29891,
1092,
375,
29914,
13264,
29906,
29966,
9507,
29958,
4351,
29914,
29946,
29899,
29946,
29889,
2272,
13,
5215,
26110,
408,
15886,
13,
5215,
26110,
29918,
14538,
1691,
408,
15886,
6289,
13,
... |
scattered_cifar.py | ethanwharris/foveated-convolutions | 4 | 74650 | from torchvision.datasets import CIFAR10
from torchvision.transforms import Pad, RandomAffine
class ScatteredCIFAR10(CIFAR10):
def __init__(self, root, train=True, transform=None, target_transform=None, download=False, pad=32, translate=0.4):
super().__init__(root, train=train, target_transform=target_tra... | [
1,
515,
4842,
305,
4924,
29889,
14538,
1691,
1053,
315,
6545,
1718,
29896,
29900,
13,
3166,
4842,
305,
4924,
29889,
9067,
29879,
1053,
18011,
29892,
16968,
27867,
457,
13,
13,
13,
1990,
2522,
2620,
287,
29907,
6545,
1718,
29896,
29900,
... |
examples/datahistos.py | earlyuniverse/gutfit | 0 | 148042 | <reponame>earlyuniverse/gutfit
from gutfit.experimentalneutrinomassmatrix import ExperimentalNeutrinoMassMatrix
from gutfit.type1and2seesaw import Type1And2SeeSaw
from gutfit import parameterlist
def sample(E,PL,m1):
p=PL()
p["data_neutrino_m1"] = m1
return E(p)
#https://stackoverflow.com/questions/133770... | [
1,
529,
276,
1112,
420,
29958,
799,
368,
348,
12193,
29914,
29887,
329,
9202,
13,
3166,
22341,
9202,
29889,
735,
27910,
17821,
17056,
290,
465,
5344,
1053,
1222,
27910,
8139,
329,
29878,
1789,
29924,
465,
14609,
13,
3166,
22341,
9202,
2... |
xbbo/surrogate/gaussian_process.py | zhanglei1172/bbobenchmark | 2 | 21915 | <reponame>zhanglei1172/bbobenchmark
from typing import List
import typing
from scipy import optimize
import sklearn
# from sklearn.gaussian_process import kernels
from sklearn.gaussian_process.kernels import Kernel, KernelOperator
# import torch
# from scipy.linalg import solve_triangular, cholesky
# from scipy import ... | [
1,
529,
276,
1112,
420,
29958,
17599,
2521,
29875,
29896,
29896,
29955,
29906,
29914,
1327,
29217,
16580,
13,
3166,
19229,
1053,
2391,
13,
5215,
19229,
13,
3166,
4560,
2272,
1053,
24656,
13,
5215,
2071,
19668,
13,
29937,
515,
2071,
19668,... |
analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 3 | 17468 | <reponame>rafaelvalero/covid_forecast
'''
=============================
EM for Linear-Gaussian Models
=============================
This example shows how one may use the EM algorithm to estimate model
parameters with a Kalman Filter.
The EM algorithm is a meta-algorithm for learning parameters in probabilistic
models.... | [
1,
529,
276,
1112,
420,
29958,
1929,
4271,
791,
1489,
29914,
24542,
333,
29918,
1079,
4384,
13,
12008,
13,
9166,
4936,
2751,
29922,
13,
12665,
363,
22985,
29899,
29954,
17019,
3382,
1379,
13,
9166,
4936,
2751,
29922,
13,
4013,
1342,
369... |
lane_detector.py | arasharn/carnd-P4 | 0 | 86720 | #%% Importing dependencies
import numpy as np
from PIL import Image
import glob
import cv2
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
#%% Defining functions
#%% Camera callibration
# Load images and concvert to grayscale
ny = 6
nx = 9
imgpoints = [] # Ima... | [
1,
396,
7686,
16032,
292,
9962,
13,
5215,
12655,
408,
7442,
13,
3166,
349,
6227,
1053,
7084,
13,
5215,
13149,
13,
5215,
13850,
29906,
13,
5215,
22889,
29889,
3027,
408,
22326,
2492,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
... |
alipay/aop/api/domain/HealthServiceSku.py | antopen/alipay-sdk-python-all | 213 | 99913 | <filename>alipay/aop/api/domain/HealthServiceSku.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class HealthServiceSku(object):
def __init__(self):
self._merchant_item_sku_bar_code = None
self._sku_id = None
@property
de... | [
1,
529,
9507,
29958,
284,
666,
388,
29914,
29874,
459,
29914,
2754,
29914,
7247,
29914,
3868,
4298,
3170,
29903,
2120,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
... |
examples/relationship/many_to_many/pre_defined_models_auto.py | MihailMiller/OpenAlchemy | 40 | 187576 | <filename>examples/relationship/many_to_many/pre_defined_models_auto.py
"""Autogenerated SQLAlchemy models based on OpenAlchemy models."""
# pylint: disable=no-member,super-init-not-called,unused-argument
import typing
import sqlalchemy
from sqlalchemy import orm
from open_alchemy import models
Base = models.Base ... | [
1,
529,
9507,
29958,
19057,
29914,
2674,
800,
4034,
29914,
13011,
29918,
517,
29918,
13011,
29914,
1457,
29918,
12119,
29918,
9794,
29918,
6921,
29889,
2272,
13,
15945,
29908,
6147,
468,
759,
630,
3758,
2499,
305,
6764,
4733,
2729,
373,
4... |
hes/views.py | dwcaraway/homeschoolring | 0 | 143119 | __author__ = 'dave'
from django.shortcuts import render
def ajax(request, ajax_code):
return render(request=request, template_name="hes/ajax/%s.html" % ajax_code, context={})
def coming_soon(request):
return render(request=request, template_name="hes/coming-soon.html", context={})
| [
1,
4770,
8921,
1649,
353,
525,
29881,
1351,
29915,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
13,
1753,
9349,
29898,
3827,
29892,
9349,
29918,
401,
1125,
13,
1678,
736,
4050,
29898,
3827,
29922,
3827,
29892,
4472,
29918,
... |
moai/monads/human/pose/__init__.py | ai-in-motion/moai | 10 | 51206 | from moai.monads.human.pose.openpose import (
Split as OpenposeSplit,
JointMap as OpenposeJointMap
)
__all__ = [
'OpenposeSplit',
'OpenposeJointMap',
] | [
1,
515,
2730,
1794,
29889,
3712,
7925,
29889,
26029,
29889,
4220,
29889,
3150,
4220,
1053,
313,
13,
1678,
26178,
408,
4673,
4220,
18772,
29892,
13,
1678,
435,
2461,
3388,
408,
4673,
4220,
29967,
2461,
3388,
13,
29897,
13,
13,
1649,
497,... |
strategies/mas/experiment.py | rmassidda/reproducible-continual-learning | 0 | 63433 | import unittest
import torch
from torch.nn import CrossEntropyLoss
from torch.optim import SGD
from avalanche.evaluation.metrics import (
accuracy_metrics,
forgetting_metrics,
loss_metrics
)
from avalanche.training.plugins import EvaluationPlugin
from models import MultiHeadVGGSmall
from strategies.utils ... | [
1,
1053,
443,
27958,
13,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
15755,
1053,
11189,
5292,
14441,
29931,
2209,
13,
3166,
4842,
305,
29889,
20640,
1053,
317,
29954,
29928,
13,
13,
3166,
263,
791,
20372,
29889,
24219,
362,
29889,... |
automol/convert/graph.py | sjklipp/autochem | 1 | 64045 | <reponame>sjklipp/autochem<gh_stars>1-10
""" graph conversions
"""
import autoparse.pattern as app
import autoparse.find as apf
from automol.util import dict_
from automol.convert.inchi import standard_form
from automol.convert.inchi import object_to_hardcoded_inchi_by_key
from automol.convert import _molfile
from auto... | [
1,
529,
276,
1112,
420,
29958,
29879,
25467,
492,
407,
29914,
1300,
2878,
331,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
3983,
9678,
1080,
13,
15945,
29908,
13,
5215,
1120,
459,
7989,
29889,
1103... |
pipeline/ephys.py | Yi-61/map-ephys | 0 | 98929 |
import datajoint as dj
from . import lab, experiment, ccf
from . import get_schema_name
import numpy as np
from scipy.interpolate import CubicSpline
schema = dj.schema(get_schema_name('ephys'))
[lab, experiment, ccf] # NOQA flake8
@schema
class ProbeInsertion(dj.Manual):
definition = """
-> experiment.Se... | [
1,
29871,
13,
5215,
848,
12090,
408,
270,
29926,
13,
13,
3166,
869,
1053,
9775,
29892,
7639,
29892,
274,
6854,
13,
3166,
869,
1053,
679,
29918,
11010,
29918,
978,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
1639,
3733... |
vr_dashboard/tests/test_registration_views.py | SmartElect/SmartElect | 23 | 134993 | from datetime import timedelta
# 3rd party imports
from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.timezone import now
from libya_site.tests.factories import DEFAULT_USER_PASSWORD, UserFactory
from regi... | [
1,
515,
12865,
1053,
5335,
287,
2554,
13,
13,
29937,
29871,
29941,
5499,
6263,
24802,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
1688,
1053,
4321,
8259,
13,
3166,
9557,
29889,
1688,
29889,
13239,
1053,
5712,
29918,
... |
tool/mds.py | alexeyignatiev/minds | 5 | 164289 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
##
## mds.py
##
## Created on: Dec 3, 2017
## Author: <NAME>
## E-mail: <EMAIL>
##
# print function as in Python3
#==============================================================================
from __future__ import print_function
from minds.check import Consiste... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
29899,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
2277,
13,
2277,
286,
6289,
29889,
2272,
13,
2277,
13,
2277,
29871,
6760,
630,
373,
29901,
3826,
29871... |
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/contrib/distribute/python/input_ops.py | JustinACoder/H22-GR3-UnrealAI | 6 | 66303 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
450,
323,
6073,
17907,
13189,
943,
29889,
2178,
26863,
2538,
9841,
22993,
13,
29937,
30004,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
... |
src/rubrik_config/helpers.py | rubrikinc/rubrik-config-backup | 2 | 98149 | import importlib
import os
import re
import cli_ui
import rubrik_cdm
def config_class(module_name):
class_name = module_name.title().replace('_', '') + 'Config'
klass = getattr(importlib.import_module('rubrik_config.'+module_name), class_name)
return klass
def config_name(obj):
matches = re.findall... | [
1,
1053,
1053,
1982,
13,
5215,
2897,
13,
5215,
337,
13,
13,
5215,
9335,
29918,
1481,
13,
5215,
14051,
5357,
29918,
2252,
29885,
13,
13,
13,
1753,
2295,
29918,
1990,
29898,
5453,
29918,
978,
1125,
13,
1678,
770,
29918,
978,
353,
3883,
... |
Python/Introduction CS-P/Problem Sets/ps04,/ps4c/ps4c.py | Alonoparag/my-datascience-prep | 0 | 178694 | # Problem Set 4C
# Name: <NAME>
# Collaborators:
# Start: 27.12.2020 14:50
# End: 29.12.2020 18:15
# EncryptedSubMessage decrypt_message() returns words that are not necessarily the original, though they are valid
# To run unit tests, type pytest in the terminal
import string
from ps4a import get_permutations
### HEL... | [
1,
396,
11583,
3789,
29871,
29946,
29907,
13,
29937,
4408,
29901,
529,
5813,
29958,
13,
29937,
13435,
3717,
4097,
29901,
13,
29937,
7370,
29901,
29871,
29906,
29955,
29889,
29896,
29906,
29889,
29906,
29900,
29906,
29900,
29871,
29896,
29946,... |
Lesson3/symmetric_square.py | Hayderhasan/Computer-Science-cs101 | 4 | 137237 | <gh_stars>1-10
# A list is symmetric if the first row is the same as the first column,
# the second row is the same as the second column and so on. Write a
# procedure, symmetric, which takes a list as input, and returns the
# boolean True if the list is symmetric and False if it is not.
def symmetric(lista):
if li... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
319,
1051,
338,
18348,
565,
278,
937,
1948,
338,
278,
1021,
408,
278,
937,
1897,
29892,
13,
29937,
278,
1473,
1948,
338,
278,
1021,
408,
278,
1473,
1897,
3... |
python/cugraph/ktruss/ktruss_max.py | ogreen/cugraph | 0 | 98129 | <reponame>ogreen/cugraph<gh_stars>0
# Copyright (c) 2019, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | [
1,
529,
276,
1112,
420,
29958,
468,
2733,
29914,
29883,
688,
1140,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
29892,
405,
13044,
10764,
315,
1955,
29925,
1955,... |
xfel/ui/components/timeit.py | dperl-sol/cctbx_project | 155 | 100399 | <filename>xfel/ui/components/timeit.py
from __future__ import absolute_import, division, print_function
import time, math
def now():
return "%02d:%02d:%02d" % (time.localtime().tm_hour, time.localtime().tm_min, time.localtime().tm_sec)
def duration(t1, t2):
diff = t2 - t1
seconds = int(math.floor(diff))
frac... | [
1,
529,
9507,
29958,
29916,
13287,
29914,
1481,
29914,
14036,
29914,
2230,
277,
29889,
2272,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
13,
5215,
931,
29892,
5844,
13,
13,
1753,
... |
pkgs/controllers.py | pine/web-redirect | 5 | 154433 | <reponame>pine/web-redirect<filename>pkgs/controllers.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from datetime import datetime
from typing import List
from aiohttp import web
from aiohttp.web import (
HTTPMovedPermanently,
HTTPNotFound,
Request,
Response,
RouteDef,
)
from pkgs.repositorie... | [
1,
529,
276,
1112,
420,
29958,
26215,
29914,
2676,
29899,
17886,
29966,
9507,
29958,
20571,
3174,
29914,
1285,
11897,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
8025,
29901,
23616,
298... |
pset6/hello.py | cristiand391/cs50 | 2 | 153586 | <filename>pset6/hello.py
from cs50 import get_string
# Prompt uset for name
n = get_string("What is your name? ")
print("hello,", n)
| [
1,
529,
9507,
29958,
567,
300,
29953,
29914,
12199,
29889,
2272,
13,
3166,
5939,
29945,
29900,
1053,
679,
29918,
1807,
13,
13,
29937,
9705,
415,
502,
300,
363,
1024,
13,
29876,
353,
679,
29918,
1807,
703,
5618,
338,
596,
1024,
29973,
... |
Chapter 11/accounts.py | nescience8/starting-out-with-python-global-4th-edition | 35 | 111368 | <reponame>nescience8/starting-out-with-python-global-4th-edition
# The SavingsAccount class represents a
# savings account.
class SavingsAccount:
# The __init__ method accepts arguments for the
# account number, interest rate, and balance.
def __init__(self, account_num, int_rate, bal):
s... | [
1,
529,
276,
1112,
420,
29958,
4515,
15277,
29947,
29914,
2962,
292,
29899,
449,
29899,
2541,
29899,
4691,
29899,
10945,
29899,
29946,
386,
29899,
287,
654,
13,
29937,
450,
9583,
886,
10601,
770,
11524,
263,
13,
29937,
4048,
886,
3633,
... |
supervision/apps.py | drowolath/supervision | 1 | 118628 | <filename>supervision/apps.py
#!/usr/bin/env python
#encoding: utf-8
"""
Celery apps definitions
"""
from celery import Celery
from celery.schedules import crontab
from datetime import timedelta
from . import CAMERAS
__all__ = [
'cameras'
]
# CONFIG = ConfigParser(allow_no_value=True)
# CONFIG.read('/etc/... | [
1,
529,
9507,
29958,
9136,
4924,
29914,
13371,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
22331,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
13,
29907,
295,
708,
11446,
15848,
13,
15945,
29908,
1... |
pure_sklearn/feature_extraction/__init__.py | ashetty1-m/pure-predict | 62 | 29061 | <gh_stars>10-100
"""
The :mod:`pure_sklearn.feature_extraction` module deals with feature extraction
from raw data. It currently includes methods to extract features from text.
"""
from ._dict_vectorizer import DictVectorizerPure
from . import text
__all__ = ["DictVectorizerPure", "text"]
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
13,
1576,
584,
1545,
18078,
29886,
545,
29918,
808,
19668,
29889,
14394,
29918,
1062,
13857,
29952,
3883,
316,
1338,
411,
4682,
4805,
428,
... |
genius_scrape_gui.py | Namdrib/Genius_Scrape | 0 | 179558 | #!/usr/bin/env python3
from tkinter import Button
from tkinter import Entry
from tkinter import Label
from tkinter import OptionMenu
from tkinter import StringVar
from tkinter import Tk
from genius_scrape import enums
from genius_scrape import genius_scrape
class GeniusScrapeGui:
def __init__(self):
""... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
3166,
18883,
1639,
1053,
11025,
13,
3166,
18883,
1639,
1053,
28236,
13,
3166,
18883,
1639,
1053,
15796,
13,
3166,
18883,
1639,
1053,
10831,
6823,
13,
3166,
18883,
1639,
1053,
... |
files/targets/ios_framework/config/config.py | uilianries/ezored | 0 | 50226 | def run(params={}):
return {
'project_name': 'Core',
'bitcode': True,
'min_version': '9.0',
'enable_arc': True,
'enable_visibility': True,
'conan_profile': 'ezored_ios_framework_profile',
'archs': [
{'arch': 'armv7', 'conan_arch': 'armv7', 'platfor... | [
1,
822,
1065,
29898,
7529,
3790,
29913,
1125,
13,
1678,
736,
426,
13,
4706,
525,
4836,
29918,
978,
2396,
525,
9203,
742,
13,
4706,
525,
2966,
401,
2396,
5852,
29892,
13,
4706,
525,
1195,
29918,
3259,
2396,
525,
29929,
29889,
29900,
74... |
pyramm/config.py | nzta-captif/pyramm | 0 | 93495 | <reponame>nzta-captif/pyramm<filename>pyramm/config.py<gh_stars>0
from pathlib import Path
from configparser import ConfigParser
CONFIG_FILE = Path.home().joinpath(".pyramm.ini")
def config():
parser = ConfigParser()
parser.read(CONFIG_FILE)
return parser
| [
1,
529,
276,
1112,
420,
29958,
29876,
29920,
941,
29899,
17885,
361,
29914,
2272,
2572,
29885,
29966,
9507,
29958,
2272,
2572,
29885,
29914,
2917,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
2224,
1982,
1053,
10802,... |
test_code/testGPIO_DIN_read.py | bauchter-work/2445_git_repo | 0 | 122299 | import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P8_16",GPIO.IN)
while True:
if GPIO.input("P8_16"):
print("Pin is HIGH")
else:
print("Pin is LOW")
time.sleep(1)
| [
1,
1053,
23255,
29888,
9216,
29918,
14388,
5971,
29889,
29954,
2227,
29949,
408,
402,
2227,
29949,
13,
5215,
931,
13,
13,
29954,
2227,
29949,
29889,
14669,
703,
29925,
29947,
29918,
29896,
29953,
613,
29954,
2227,
29949,
29889,
1177,
29897,... |
setup.py | mochic/neuroglia | 0 | 138099 | import setuptools
setuptools.setup(
name="neuroglia",
version="0.1.0",
url="https://github.com/AllenInstitute/neuroglia",
author="<NAME>",
author_email="<EMAIL>",
description="scikit-learn compatible transformers for neural data science",
packages=setuptools.find_packages(),
install... | [
1,
1053,
731,
21245,
8789,
13,
13,
842,
21245,
8789,
29889,
14669,
29898,
13,
1678,
1024,
543,
484,
2192,
3820,
423,
613,
13,
1678,
1873,
543,
29900,
29889,
29896,
29889,
29900,
613,
13,
1678,
3142,
543,
991,
597,
3292,
29889,
510,
29... |
mbapi/tapi.py | btrevizan/mb_api | 5 | 114998 | """Mercado Bitcoin's Trade API implementation.
For more information about data structure, methods and stuff, go to
https://www.mercadobitcoin.com.br/trade-api
"""
import requests
import hashlib
import urllib
import hmac
import json
import time
from random import randint
from .labels import Coin, Url, Method
class... | [
1,
9995,
29924,
6269,
912,
18531,
1111,
262,
29915,
29879,
27226,
3450,
5314,
29889,
13,
13,
2831,
901,
2472,
1048,
848,
3829,
29892,
3519,
322,
6433,
29892,
748,
304,
13,
991,
597,
1636,
29889,
1050,
29883,
328,
711,
277,
1111,
262,
... |
django-rgd-imagery/rgd_imagery/rest/download.py | ResonantGeoData/ResonantGeoData | 40 | 163222 | <filename>django-rgd-imagery/rgd_imagery/rest/download.py
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from drf_yasg.utils import swagger_auto_schema
from rest_framework.decorators import api_view
from rgd.permissions import check_read_perm
from rgd_imagery import models
... | [
1,
529,
9507,
29958,
14095,
29899,
11007,
29881,
29899,
326,
351,
708,
29914,
11007,
29881,
29918,
326,
351,
708,
29914,
5060,
29914,
10382,
29889,
2272,
13,
3166,
9557,
29889,
1124,
1053,
9056,
5103,
24735,
13,
3166,
9557,
29889,
12759,
... |
src/utils.py | NicolasKiely/acc_intel_mini_proj | 0 | 67856 | """ Miscellaneous utility functions """
import logging
import os
import pandas as pd
logger = logging.getLogger(__name__)
def load_df_from_dataset(file_name: str) -> pd.DataFrame:
""" Loads cleaned dataframe from csv
Fields with extra records get logged and dropped.
"""
df = pd.read_csv(file_name)
... | [
1,
9995,
20929,
3729,
23584,
19725,
3168,
9995,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
11701,
408,
10518,
13,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1753,
2254,
29918,
2176,
29918,
3166,
... |
hackerearth/Algorithms/Costly Phone Number/test.py | HBinhCT/Q-project | 4 | 190183 | import io
import unittest
from contextlib import redirect_stdout
from unittest.mock import patch
class TestQ(unittest.TestCase):
@patch('builtins.input', side_effect=[
'3',
'3 2 2 3 2 1 1 2 3 3 ',
'3',
'171',
'3 2 3 1 1 1 1 3 1 2 ',
'2',
'16',
'3 3 3... | [
1,
1053,
12013,
13,
5215,
443,
27958,
13,
3166,
3030,
1982,
1053,
6684,
29918,
25393,
13,
3166,
443,
27958,
29889,
17640,
1053,
13261,
13,
13,
13,
1990,
4321,
29984,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
732,
5041,
877,
... |
test/boards/old_mqtt_board.py | jarzab3/smart_city_mdx | 1 | 169782 | __author__ = '<NAME>'
import time
import sys
from asip_client import AsipClient
from threading import Thread
try:
from Queue import Queue
except ImportError:
from queue import Queue
from asip_writer import AsipWriter
import paho.mqtt.client as mqtt
class SimpleMQTTBoard:
# ************ BEGIN CONSTANTS... | [
1,
4770,
8921,
1649,
353,
12801,
5813,
16299,
13,
13,
5215,
931,
13,
5215,
10876,
13,
3166,
408,
666,
29918,
4645,
1053,
1094,
666,
4032,
13,
3166,
3244,
292,
1053,
10480,
13,
2202,
29901,
13,
1678,
515,
5462,
434,
1053,
5462,
434,
... |
TestHowToUse/test_voting.py | GavrilovMike/EnsembleLearning | 0 | 66693 | <reponame>GavrilovMike/EnsembleLearning
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import RandomForestClassifier, VotingClassifier
clf1 = LogisticRegression(multi_class='multinomial', random_state=1)
clf2 = RandomForestClassifi... | [
1,
529,
276,
1112,
420,
29958,
29954,
485,
4115,
586,
29924,
9345,
29914,
29923,
1983,
6967,
29931,
799,
1076,
13,
5215,
12655,
408,
7442,
13,
3166,
2071,
19668,
29889,
10660,
29918,
4299,
1053,
4522,
4695,
4597,
23881,
13,
3166,
2071,
... |
serverPythonClient/client.py | ikekilinc/dnnSuperBinoculars | 0 | 8353 | <filename>serverPythonClient/client.py
import argparse
import cv2
import common
# from .utils.cropAtCenter import cropImageCenter
# from cropAtCenter import cropImageCenter
from gabriel_client.websocket_client import WebsocketClient
from gabriel_client.opencv_adapter import OpencvAdapter
DEFAULT_SERVER_HOST = '172.1... | [
1,
529,
9507,
29958,
2974,
11980,
4032,
29914,
4645,
29889,
2272,
13,
5215,
1852,
5510,
13,
5215,
13850,
29906,
13,
13,
5215,
3619,
13,
29937,
515,
869,
13239,
29889,
29883,
1336,
4178,
13409,
1053,
274,
1336,
2940,
13409,
13,
29937,
51... |
P25010-Guangzhou-Jiachengwu/week5/ex_random2.py | coachafei/python-25 | 1 | 91715 | # 已知仓库中有若干商品,以及相应库存,类似:
# 袜子,10
# 鞋子,20
# 拖鞋,30
# 项链,40
# 要求随机返回一种商品,要求商品被返回的概率与其库存成正比。请描述实现的思路或者直接写一个实现的函数
import random
def randpick(n):
socks = ['wz'] * 10 * n
shoes = ['xz'] * 20 * n
slippers = ['tx'] * 30 * n
necklace = ['xl'] * 40 * n
for_all = socks + shoes + slippers + necklace
count=... | [
1,
396,
29871,
31290,
31043,
231,
190,
150,
31700,
30275,
30417,
31653,
232,
188,
181,
31427,
31399,
30214,
30651,
31436,
30990,
31370,
31700,
30946,
30214,
30832,
231,
191,
191,
30383,
13,
29937,
29871,
235,
165,
159,
30319,
30214,
29896,
... |
crosscompute/macros/package.py | kashfifahim/crosscompute | 0 | 101078 | from importlib import import_module
def import_attribute(attribute_string):
module_string, attribute_name = attribute_string.rsplit('.', maxsplit=1)
return getattr(import_module(module_string), attribute_name)
| [
1,
515,
1053,
1982,
1053,
1053,
29918,
5453,
13,
13,
13,
1753,
1053,
29918,
12715,
29898,
12715,
29918,
1807,
1125,
13,
1678,
3883,
29918,
1807,
29892,
5352,
29918,
978,
353,
5352,
29918,
1807,
29889,
2288,
2830,
12839,
742,
4236,
5451,
... |
CONTENT/DS-n-Algos/ALGO/__PYTHON/celeb.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 11 | 1036 | <reponame>Web-Dev-Collaborative/DS-ALGO-OFFICIAL<gh_stars>10-100
def orangesRotting(elemnts):
if not elemnts or len(elemnts) == 0:
return 0
n = len(elemnts)
m = len(elemnts[0])
rotten = []
for i in range(n):
for j in range(m):
if elemnts[i][j] == 2:
... | [
1,
529,
276,
1112,
420,
29958,
3609,
29899,
16618,
29899,
28377,
3717,
1230,
29914,
8452,
29899,
1964,
17080,
29899,
27681,
2965,
25758,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
1753,
470,
6916,
2... |
crawler.py | wladimir-computin/LibScout-Crawler | 1 | 134737 | <reponame>wladimir-computin/LibScout-Crawler
import sqlite3
import sys
import os
import re
database = "lib_stats.db"
if os.path.exists(database):
os.remove(database)
conn = sqlite3.connect(database)
class Libset:
name = ""
category = ""
version = ""
release_date = ""
old_version = False
root_package =... | [
1,
529,
276,
1112,
420,
29958,
29893,
4528,
17216,
29899,
12097,
262,
29914,
14868,
4421,
449,
29899,
29907,
1610,
1358,
13,
5215,
21120,
29941,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
337,
13,
9803,
353,
376,
1982,
29918,
16202,
298... |
NURBSDiff/curve_eval.py | idealab-isu/NURBSDiff | 4 | 174065 | <filename>NURBSDiff/curve_eval.py
import torch
import numpy as np
from torch import nn
from torch.autograd import Function
from torch.autograd import Variable
from NURBSDiff.curve_eval_cpp import forward as cpp_forward, backward as cpp_backward, pre_compute_basis as cpp_pre_compute_basis
from NURBSDiff.curve_eval_cuda ... | [
1,
529,
9507,
29958,
29940,
4574,
29933,
7230,
2593,
29914,
2764,
345,
29918,
14513,
29889,
2272,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
1053,... |
app/libs/utils.py | zcxyun/snack-api-lin | 1 | 111005 | <gh_stars>1-10
"""
:copyright: © 2019 by the Lin team.
:license: MIT, see LICENSE for more details.
"""
import re
import time
from datetime import datetime, timedelta
from flask import current_app, jsonify, request
from lin.exception import ParameterException
def datetime_format(dt=None, fmt='%Y-%m-%d %H:%M... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
1678,
584,
8552,
1266,
29901,
29871,
30211,
29871,
29906,
29900,
29896,
29929,
491,
278,
4342,
3815,
29889,
13,
1678,
584,
506,
1947,
29901,
341,
18... |
heap_md.py | sorrento/sdopt-tearing | 0 | 30901 | # Copyright (C) 2014, 2015 University of Vienna
# All rights reserved.
# BSD license.
# Author: <NAME> <<EMAIL>>
# Heap-based minimum-degree ordering with NO lookahead.
#
# See also min_degree.py which uses lookahead, and simple_md.py which is a
# hacked version of min_degree.py that still uses repeated linear scans... | [
1,
396,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29946,
29892,
29871,
29906,
29900,
29896,
29945,
3014,
310,
25309,
13,
29937,
2178,
10462,
21676,
29889,
13,
29937,
350,
7230,
19405,
29889,
13,
29937,
13361,
29901,
529,
5... |
pytorch/examples/SRNN/helpermethods.py | krantikiran/EdgeML | 719 | 127062 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import argparse
def getSRNN2Args():
def checkIntPos(value):
ivalue = int(value)
if ivalue <= 0:
raise argparse.ArgumentTypeError(
"%s is an invalid positive int value" % value)... | [
1,
396,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19405,
29889,
13,
13,
5215,
1852,
5510,
13,
13,
1753,
679,
14098,
10262,
29906,
7883,
7295,
13,
1678,
... |
cryptocompy/price.py | ttsteiger/cryptocompy | 90 | 136691 | # price.py
from .helper_functions import (build_url, load_data, timestamp_to_date,
date_to_timestamp)
def get_current_price(fsyms, tsyms, e='all', try_conversion=True, full=False,
format='raw'):
"""Get latest trading price or full trading information i... | [
1,
396,
8666,
29889,
2272,
30004,
13,
30004,
13,
3166,
869,
20907,
29918,
12171,
1053,
313,
4282,
29918,
2271,
29892,
2254,
29918,
1272,
29892,
14334,
29918,
517,
29918,
1256,
11167,
13,
462,
1669,
2635,
29918,
517,
29918,
16394,
8443,
13... |
web/app.py | thyme4soup/pi-plant | 0 | 80569 | <gh_stars>0
#!/usr/bin/env python
from importlib import import_module
import os
import sys
import json
import datetime
import random
import string
import sqlite3 as lite
import logging
from logging.handlers import RotatingFileHandler
from flask import (
Flask, render_template, Response,
request, flash, send_fro... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
1053,
1982,
1053,
1053,
29918,
5453,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
4390,
13,
5215,
12865,
13,
5215,
4036,
13,
... |
peerpy/exceptions.py | Rubilmax/python-p2p | 2 | 186162 | class HandlerMissingException(Exception):
"""Raised when an event handler is missing a handler for a specific event."""
pass
class DataTypeError(Exception):
"""Raised when data type doesn't correspond to the connection's data type."""
pass
class HeaderSizeError(Exception):
"""Raised when the hea... | [
1,
770,
5166,
1358,
18552,
292,
2451,
29898,
2451,
1125,
13,
1678,
9995,
29934,
1759,
287,
746,
385,
1741,
7834,
338,
4567,
263,
7834,
363,
263,
2702,
1741,
1213,
15945,
13,
1678,
1209,
13,
13,
13,
1990,
3630,
1542,
2392,
29898,
2451,... |
TemporalDifference/QLearning/maze.py | onimaru/Reinforcement_Learning | 1 | 180309 | import pandas as pd
import numpy as np
class Maze:
def __init__(self,goal=[3,3],trap1=[0,3],trap2=[3,1],position=0):
pass
'''
def printTable(self,p=None):
p = random_position()
table = pd.DataFrame(np.zeros((4,4),dtype=int),columns=None)
table.iloc[3,3]='X'
... | [
1,
1053,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
13,
1990,
17326,
29872,
29901,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
28111,
11759,
29941,
29892,
29941,
1402,
29873,
2390,
29896,
11759,
29900,
29892,
29941,
14... |
cloudcafe/blockstorage/volumes_api/common/models/requests.py | rcbops-qa/cloudcafe | 0 | 167512 | from cafe.engine.models.base import AutoMarshallingModel
import json
class StatusResetRequest(AutoMarshallingModel):
def __init__(self, status=None):
super(StatusResetRequest, self).__init__()
self.status = status
def _obj_to_json(self):
data = {"os-reset_status": {"status": self.stat... | [
1,
515,
5777,
1725,
29889,
10599,
29889,
9794,
29889,
3188,
1053,
11133,
7083,
845,
27855,
3195,
13,
5215,
4390,
13,
13,
13,
1990,
16034,
27175,
3089,
29898,
12300,
7083,
845,
27855,
3195,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
2... |
polls/views.py | alejandro-medici/django_docker | 1 | 29333 | from django.shortcuts import render
from django.http import HttpResponse
from django.template.loader import get_template
from .models import Poll
from time import timezone
from datetime import date
# Create your views here.
def index(request):
myTemplate = get_template('./index.html')
print(myTemplate)
r... | [
1,
515,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
3166,
9557,
29889,
1124,
1053,
9056,
5103,
13,
3166,
9557,
29889,
6886,
29889,
12657,
1053,
679,
29918,
6886,
13,
3166,
869,
9794,
1053,
2043,
29880,
13,
3166,
931,
1053,
29431,
1... |
app/__init__.py | mamu234/pitch3 | 0 | 94759 | <gh_stars>0
from sqlite3 import dbapi2
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from os import path
DB_NAME = "database.db"
def create_up():
app = Flask(__name__)
app.config['SECRET_KEY'] = '123'
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{DB_NAME}'
db =... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
21120,
29941,
1053,
4833,
2754,
29906,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
29871,
29784,
29918,
2850,
284,
305,
6764,
1053,
3758,
2499,
305,
6764,
13,
3166,
2897,
1053,
2... |
habixbackend/api/migrations/0001_initial.py | Tiqur/habix-backend | 1 | 148863 | # Generated by Django 3.1.4 on 2021-01-03 04:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='HabixUser',
fields=[
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29946,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29900,
29941,
29871,
29900,
29946,
29901,
29906,
29941,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
python/bifrost/blocks/quantize.py | Radio-Camera-Initiative/bifrost | 0 | 67737 |
# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions a... | [
1,
29871,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
29892,
450,
350,
361,
17627,
13189,
943,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
4367,
391,
3224,
322,
671,
297,
2752,
322,
7581,
7190... |
inference/run.py | motrom/voxeljones | 2 | 173405 | <gh_stars>1-10
# -*- coding: utf-8 -*-
"""
last mod 7/16/19
much of this code is highly optimized to the point of being pretty unreadable
The algorithm has this general layout
- modify boosted tree for fast use, generate lookup table of detection overlaps
- for each detection
- transform lidar points to local grou... | [
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,
15945,
29908,
13,
4230,
878,
29871,
29955,
29914,
29896,
29953,
29914,
29896,
29929,
... |
protobuf/__main__.py | Axonny/Protobuf | 0 | 195606 | from protobuf.generate_class import main
main()
| [
1,
515,
17814,
9721,
29889,
17158,
29918,
1990,
1053,
1667,
13,
13,
3396,
580,
13,
2
] |
test/test_tokenizer.py | ArielTriana/battle-sim | 2 | 177014 | import pytest
from src.language.tokenizer import Tokenizer
def test_1():
case1 = "number a = 3.34"
tokens = Tokenizer()(case1)
assert len(tokens) == 5
assert tokens[3].lexeme == "3.34"
def test_2():
case2 = "function number fibo(number n) -> {\nif n lte 1 -> {\n return 1 \n} return fibo(n- 1)... | [
1,
1053,
11451,
1688,
13,
13,
3166,
4765,
29889,
11675,
29889,
6979,
3950,
1053,
25159,
3950,
13,
13,
13,
1753,
1243,
29918,
29896,
7295,
13,
1678,
1206,
29896,
353,
376,
4537,
263,
353,
29871,
29941,
29889,
29941,
29946,
29908,
13,
13,... |
src/utils/modelling.py | juanhuguetgarcia/ml_project_template | 0 | 61301 | <reponame>juanhuguetgarcia/ml_project_template
"""Modelling
Utils to use during modelling stage
"""
import pickle
from datetime import datetime
from pathlib import Path
PROJECT_DIR = Path(__file__).resolve().parents[2]
class ArtifactSaverLoader(object):
def __init__(self, models_filepath=PROJECT_DIR.joinpath(... | [
1,
529,
276,
1112,
420,
29958,
4900,
27731,
688,
14484,
5397,
1512,
29914,
828,
29918,
4836,
29918,
6886,
13,
15945,
29908,
2111,
7807,
13,
13,
12177,
304,
671,
2645,
878,
7807,
7408,
13,
15945,
29908,
13,
13,
5215,
5839,
280,
13,
316... |
src/losses/__init__.py | johanattia/tensorflow-saint | 3 | 70926 | <gh_stars>1-10
from .barlow_twins import BarlowTwins
from .simclr import SimCLR
from .vicreg import VICReg
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
869,
1646,
677,
29918,
7516,
1144,
1053,
2261,
677,
27418,
1144,
13,
3166,
869,
3601,
695,
29878,
1053,
3439,
6154,
29934,
13,
3166,
869,
26311,
1727,
1053,
4... |
brainframe_qt/ui/resources/alarms/alarm_bundle/alarm_card/alert_log/__init__.py | aotuai/brainframe-qt | 17 | 110878 | <reponame>aotuai/brainframe-qt
from .alert_log import AlertLog
| [
1,
529,
276,
1112,
420,
29958,
29874,
327,
29884,
1794,
29914,
2634,
262,
2557,
29899,
17915,
13,
3166,
869,
12888,
29918,
1188,
1053,
28861,
3403,
13,
2
] |
conftest.py | detrack/elasticroute-python | 2 | 1617658 | from dotenv import load_dotenv
from pathlib import Path # python3 only
import elasticroute
import os
"""
env_path = Path('tests') / '.env'
load_dotenv(dotenv_path=env_path)
elasticroute.defaults.API_KEY = os.getenv("ELASTICROUTE_API_KEY")
elasticroute.defaults.BASE_URL = os.getenv("ELASTICROUTE_PATH")
print("Defaul... | [
1,
515,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
3166,
2224,
1982,
1053,
10802,
29871,
396,
3017,
29941,
871,
13,
5215,
560,
6288,
13134,
13,
5215,
2897,
13,
13,
15945,
29908,
13,
6272,
29918,
2084,
353,
10802,
877,
21150,
1495,
... |
eleanor/visualize.py | afeinstein20/ELLIE | 6 | 72097 | <reponame>afeinstein20/ELLIE<filename>eleanor/visualize.py
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np
import warnings, os, requests
import lightkurve as lk
from bs4 import Beautiful... | [
1,
529,
276,
1112,
420,
29958,
29874,
1725,
262,
5465,
29906,
29900,
29914,
29923,
2208,
8673,
29966,
9507,
29958,
6146,
273,
272,
29914,
20119,
675,
29889,
2272,
13,
5215,
10876,
13,
5215,
22889,
408,
286,
572,
13,
5215,
22889,
29889,
... |
npd_well_decoder/__init__.py | fmell/npd-well-name-decoder | 0 | 16754 | <reponame>fmell/npd-well-name-decoder
from .npd import parse_wellbore_name
| [
1,
529,
276,
1112,
420,
29958,
24826,
514,
29914,
9302,
29881,
29899,
5872,
29899,
978,
29899,
7099,
6119,
13,
3166,
869,
9302,
29881,
1053,
6088,
29918,
5872,
29890,
487,
29918,
978,
13,
2
] |
simple/management/commands/parse_future_committee_meetings.py | navotsil/Open-Knesset | 7 | 94251 | #### encoding: cp1255 ####
from collections import namedtuple
import urllib2
import re
import logging
import csv
import datetime
from django.core.management.base import BaseCommand
from django.contrib.contenttypes.models import ContentType
from dateutil import zoneinfo
from mks.models import Member
from committees.mo... | [
1,
3191,
8025,
29901,
21447,
29896,
29906,
29945,
29945,
3191,
13,
13,
3166,
16250,
1053,
4257,
23583,
13,
5215,
3142,
1982,
29906,
13,
5215,
337,
13,
5215,
12183,
13,
5215,
11799,
13,
5215,
12865,
13,
3166,
9557,
29889,
3221,
29889,
21... |
tests/unit/__init__.py | deepakpesumalnai/Tornado_API_Python_Development_Testing | 46 | 95663 | # Copyright (c) 2020. All rights reserved.
| [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
29889,
2178,
10462,
21676,
29889,
13,
2
] |
data-science/exercicios/livro-introducao-a-programacao-com-python/capitulo-2/exercicio2-6.py | joaovictor-loureiro/data-science | 0 | 43540 | # Exercício 2.6 - Modifique o programa da listagem 2.11, de forma que ele calcule um
# aumento de 15% para um salário de R$ 750
salario = 750.00
taxa_aumento = 0.15
aumento = salario * taxa_aumento
novo_salario = salario + aumento
print('\nSálario de R$750.00 + aumento de 15' + '% = ' + 'R$%.2f\n' % (novo_salario)) | [
1,
396,
1222,
6269,
24394,
29871,
29906,
29889,
29953,
448,
3382,
22781,
288,
16914,
1146,
1051,
13904,
29871,
29906,
29889,
29896,
29896,
29892,
316,
5954,
712,
4552,
22235,
1297,
1922,
13,
29937,
19291,
29877,
316,
29871,
29896,
29945,
29... |
03.py | SnowWolf75/aoc-2020 | 0 | 5759 | #!/usr/bin/env python3
import sys, os
import unittest
from lib.common import *
filename = "inputs/2020_12_03_input.txt"
class day03:
def __init__(self):
pass
class day03part1(day03):
def solve(self, args):
pass
class day03part2(day03):
def solve(self, args):
pass
class exampl... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
10876,
29892,
2897,
13,
5215,
443,
27958,
13,
3166,
4303,
29889,
9435,
1053,
334,
13,
13,
9507,
353,
376,
2080,
29879,
29914,
29906,
29900,
29906,
29900,
29918,
29896,
... |
helpers.py | robbiemu/Greedy-Algorithms-Minimum-Spanning-Trees-and-Dynamic-Programming | 0 | 83298 | from collections import namedtuple, defaultdict
Edge = namedtuple('Edge', ['left', 'right', 'cost'])
Adjacency = namedtuple('Adjacency', ['to', 'cost'])
PrioritizedItem = namedtuple('PrioritizedItem', ['priority', 'item'])
def indices(l):
return [i for i in range(len(l))]
def process_weighted_edges(data):
v = []... | [
1,
515,
16250,
1053,
4257,
23583,
29892,
2322,
8977,
13,
13,
23894,
353,
4257,
23583,
877,
23894,
742,
6024,
1563,
742,
525,
1266,
742,
525,
18253,
11287,
13,
3253,
29926,
562,
3819,
353,
4257,
23583,
877,
3253,
29926,
562,
3819,
742,
... |
4-motokimura/code/tools/track_polys.py | remtav/SpaceNet7_Multi-Temporal_Solutions | 38 | 165136 | #!/usr/bin/env python3
import multiprocessing as mp
import os
import timeit
import pandas as pd
import _init_path
from spacenet7_model.configs import load_config
from spacenet7_model.utils import (convert_geojsons_to_csv, ensemble_subdir,
get_subdirs, interpolate_polys, map_wrapper... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
6674,
307,
985,
292,
408,
22326,
13,
5215,
2897,
13,
5215,
931,
277,
13,
13,
5215,
11701,
408,
10518,
13,
13,
5215,
903,
2344,
29918,
2084,
13,
3166,
26325,
264,
3... |
year-2021/day-19/part-1.py | sdatko/advent-of-code | 4 | 151403 | #!/usr/bin/env python3
#
# --- Day 19: Beacon Scanner ---
#
# As your probe drifted down through this area, it released an assortment
# of beacons and scanners into the water. It's difficult to navigate in the
# pitch black open waters of the ocean trench, but if you can build a map
# of the trench using data from the ... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
13,
29937,
11474,
8373,
29871,
29896,
29929,
29901,
1522,
23074,
23412,
11474,
13,
29937,
13,
29937,
1094,
596,
410,
915,
4192,
2027,
287,
1623,
1549,
445,
4038,
29892,
372... |
tests/ast/nodes/test_from_node.py | upgradvisor/vyper | 1,471 | 351 | from vyper import ast as vy_ast
def test_output_class():
old_node = vy_ast.parse_to_ast("foo = 42")
new_node = vy_ast.Int.from_node(old_node, value=666)
assert isinstance(new_node, vy_ast.Int)
def test_source():
old_node = vy_ast.parse_to_ast("foo = 42")
new_node = vy_ast.Int.from_node(old_node... | [
1,
515,
10195,
546,
1053,
8717,
408,
10195,
29918,
579,
13,
13,
13,
1753,
1243,
29918,
4905,
29918,
1990,
7295,
13,
1678,
2030,
29918,
3177,
353,
10195,
29918,
579,
29889,
5510,
29918,
517,
29918,
579,
703,
5431,
353,
29871,
29946,
2990... |
test/means/test_zero_mean.py | bdecost/gpytorch | 0 | 4465 | <gh_stars>0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
import unittest
from gpytorch.means import ZeroMean
class TestZeroMean(unittest.TestCase):
def setUp(self):
self.mean = ZeroMean()
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
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,
29918,
2220,
13,
3166,
4770,
29888,
... |
Interfaces/Simulations/p3do.py | tulasinandan/TurbAn | 0 | 94866 | #!/usr/bin/env python
###########################################################################
##
## The class to handle P3D simulation data in python. An object is created
## that has the run parameters attached with it. The basic usage of the
## class can be done in the following ways.
##
## Example 1:
## > fro... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
2277,
13,
2277,
450,
770,
304,
4386,
349,
29941,
29928,
17402,
848,
297,
3017,
29889,
530,
1203,
338,
2825,
29871,
13,
2277,
393,
756... |
tests/test_config.py | savilard/flask-ecom-api | 1 | 10746 | import os
def test_development_config(test_app):
test_app.config.from_object('flask_ecom_api.config.DevelopmentConfig')
assert not test_app.config['TESTING']
assert test_app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get('DATABASE_URL')
def test_testing_config(test_app):
test_app.config.from_ob... | [
1,
1053,
2897,
13,
13,
13,
1753,
1243,
29918,
25431,
29918,
2917,
29898,
1688,
29918,
932,
1125,
13,
1678,
1243,
29918,
932,
29889,
2917,
29889,
3166,
29918,
3318,
877,
1579,
1278,
29918,
29872,
510,
29918,
2754,
29889,
2917,
29889,
21956... |
e2e/Tests/Consensus/MeritRemoval/VerifyCompetingTest.py | rikublock/Meros | 0 | 84198 | <gh_stars>0
#Tests proper handling of a MeritRemoval created from Verifications verifying competing Transactions.
#Types.
from typing import Dict, List, IO, Any
#Transactions classes.
from e2e.Classes.Transactions.Data import Data
from e2e.Classes.Transactions.Transactions import Transactions
#Element classes.
from ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
24376,
1571,
11415,
310,
263,
4702,
277,
7301,
10611,
2825,
515,
1798,
8232,
1147,
9215,
5100,
292,
4103,
7387,
29889,
13,
13,
29937,
10562,
29889,
13,
3166,
19229,
1053,
360,
91... |
code/ard/_filter.py | ms860309/AutomatedReactionMechanismDiscovery | 1 | 103676 | import os
import sys
from openbabel import openbabel as ob
from openbabel import pybel as pb
import gen3D
import numpy as np
from statistics import mean
import props
ELEMENT_TABLE = props.ElementData()
class FILTER(object):
def __init__(self, reactant_file, cluster_bond_file = None, fixed_atoms = None... | [
1,
1053,
2897,
30004,
13,
5215,
10876,
30004,
13,
3166,
1722,
28727,
1053,
1722,
28727,
408,
704,
30004,
13,
3166,
1722,
28727,
1053,
11451,
6596,
408,
282,
29890,
30004,
13,
5215,
2531,
29941,
29928,
30004,
13,
5215,
12655,
408,
7442,
... |
pylibcontainer/image.py | joaompinto/pylibcontainer | 7 | 8939 | from __future__ import print_function
import os
import shutil
import hashlib
import requests
import click
from tempfile import NamedTemporaryFile
from hashlib import sha256
from os.path import expanduser, join, exists, basename
from .utils import HumanSize
from .tar import extract_layer
from . import trust
from . impor... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
5215,
6608,
1982,
13,
5215,
7274,
13,
5215,
2828,
13,
3166,
5694,
1445,
1053,
405,
2795,
5776,
1971,
653,
2283,
13,
3166,
6608,
1982,
... |
shared/modules/xccdf2csv_stig_module.py | gregelin/scap-security-guide | 1 | 142125 | <filename>shared/modules/xccdf2csv_stig_module.py
#!/usr/bin/python
import sys
import csv
import lxml.etree as ET
# This script creates a CSV file from an XCCDF file formatted in the
# structure of a STIG. This should enable its ingestion into VMS,
# as well as its comparison with VMS output.
xccdf_ns = "http://che... | [
1,
529,
9507,
29958,
12366,
29914,
7576,
29914,
29916,
617,
2176,
29906,
7638,
29918,
303,
335,
29918,
5453,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
13,
5215,
10876,
13,
5215,
11799,
13,
5215,
301,
3134,
29889,
... |
tests/unit_tests/utils/test_handlers/__init__.py | openjusticebaltimore/ResponseBot | 16 | 69411 | from responsebot.handlers import BaseTweetHandler, register_handler
@register_handler
class HandlerClassInInit(BaseTweetHandler):
def on_tweet(self, tweet):
print('HandlerClassInInit')
| [
1,
515,
2933,
7451,
29889,
3179,
9306,
1053,
7399,
29911,
16668,
4598,
29892,
6036,
29918,
13789,
13,
13,
13,
29992,
9573,
29918,
13789,
13,
1990,
5166,
1358,
2385,
797,
6644,
29898,
5160,
29911,
16668,
4598,
1125,
13,
1678,
822,
373,
2... |
settings/__init__.py | suuuuumod/awmepost | 1 | 129721 | import os
DEBUG="false"
# telegram
BOT_TOKEN="YOURTOKEN"
TEST_CHANNEL_ID="@CHANELID"
# reddit
REDDIT_CHANNEL_ID = TEST_CHANNEL_ID
REDDIT_USERNAME="USERNAME_REDDIT"
# imgur
IMGUR_CLIENT_ID="APP_CLIENT_ID_IMGUR"
IMGUR_CHANNEL_ID = TEST_CHANNEL_ID
# heroku
HEROKU_APP_NAME="APP_NAME_HEROKU"
PORT=8000
HOST="0.0.0.0... | [
1,
1053,
2897,
13,
13,
18525,
543,
4541,
29908,
13,
13,
13,
13,
29937,
4382,
1393,
13,
29933,
2891,
29918,
4986,
29968,
1430,
543,
29979,
22970,
4986,
29968,
1430,
29908,
13,
18267,
29918,
3210,
2190,
29940,
6670,
29918,
1367,
5213,
321... |
run_all.py | EinariTuukkanen/line-search-comparison | 0 | 20370 | import numpy as np
from example_functions import target_function_dict
from line_search_methods import line_search_dict
from main_methods import main_method_dict
from config import best_params
from helpers import generate_x0
def run_one(_theta, _main_method, _ls_method, params, ls_params):
theta = _theta()
x0... | [
1,
1053,
12655,
408,
7442,
13,
13,
3166,
1342,
29918,
12171,
1053,
3646,
29918,
2220,
29918,
8977,
13,
3166,
1196,
29918,
4478,
29918,
23515,
1053,
1196,
29918,
4478,
29918,
8977,
13,
3166,
1667,
29918,
23515,
1053,
1667,
29918,
5696,
299... |
qaHelper/fetcher/qhDataStructFactory.py | pchaos/quanttesting | 5 | 69416 | <gh_stars>1-10
# -*- coding: utf-8 -*-
"""QA_Struture工厂模式
"""
import pandas as pd
from QUANTAXIS.QAData.QADataStruct import QA_DataStruct_Index_day, QA_DataStruct_Index_min
from QUANTAXIS.QAData.QADataStruct import QA_DataStruct_Stock_day, QA_DataStruct_Stock_min
from QUANTAXIS.QAData.QADataStruct import QA_DataStruc... | [
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,
15945,
29908,
29984,
29909,
29918,
5015,
9130,
31041,
232,
145,
133,
31382,
30607,
1... |
Examples/MFP_figlet_fonts.py | Shoeboxam/Neural_Network | 3 | 171367 | <gh_stars>1-10
import numpy as np
import pyfiglet
from MFP import *
# Two learning modes:
# 1. Autoencoder for font denoising
# 2. Classifier for character identification
""" #######
# # #### # ###### #####
# # # # # # #
##### # # # ##### ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
1003,
1026,
13,
13,
3166,
341,
26353,
1053,
334,
13,
13,
29937,
7803,
6509,
18893,
29901,
13,
29937,
1678,
29896,
29889,
11... |
src/stts.py | georgsp/mdmTerminal2 | 24 | 125928 | #!/usr/bin/env python3
import hashlib
import os
import os.path
import random
import threading
import time
import wave
import pyaudio
import lib.STT as STT
import lib.TTS as TTS
import lib.sr_wrapper as sr
import logger
import utils
from languages import F
from lib.audio_utils import StreamRecognition, StreamDetector... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
6608,
1982,
13,
5215,
2897,
13,
5215,
2897,
29889,
2084,
13,
5215,
4036,
13,
5215,
3244,
292,
13,
5215,
931,
13,
5215,
10742,
13,
13,
5215,
282,
3761,
2881,
13,
13... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.