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
psychic/nodes/filter.py
breuderink/psychic
3
124185
import numpy as np from scipy import signal from golem import DataSet from golem.nodes import BaseNode from psychic.utils import get_samplerate class Filter(BaseNode): def __init__(self, filt_design_func): ''' Forward-backward filtering node. filt_design_func is a function that takes the sample rate as a...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 4560, 2272, 1053, 7182, 13, 3166, 748, 2409, 1053, 3630, 2697, 13, 3166, 748, 2409, 29889, 18010, 1053, 7399, 4247, 13, 3166, 11643, 293, 29889, 13239, 1053, 679, 29918, 13445, 20069, 403, 13, 13, ...
src/tesk_core/helm_client.py
PlatformedTasks/PLAS-tesk-core
0
102097
<filename>src/tesk_core/helm_client.py import subprocess repo_name = "taskmaster-repo" def helm_add_repo(repo_url): try: print(f"Adding '{repo_url}' as '{repo_name}'") repo_add = subprocess.run(['helm', 'repo', 'add', repo_name, repo_url, '--force-update'], capture_output=True, text=True, check=Tr...
[ 1, 529, 9507, 29958, 4351, 29914, 2167, 29895, 29918, 3221, 29914, 9421, 29918, 4645, 29889, 2272, 13, 5215, 1014, 5014, 13, 13, 20095, 29918, 978, 353, 376, 7662, 6207, 29899, 20095, 29908, 13, 13, 1753, 1081, 29885, 29918, 1202, 29918, ...
src/treca/data.py
evanfyang/terminus-2
0
108331
#!/usr/bin/python import os import re import platform from Bio import AlignIO from Bio.Seq import Seq from Bio.Align import AlignInfo from Bio.Align.Applications import MuscleCommandline # define constants HEADER = 1 SEQUENCE = 2 FORWARD = 1 REVERSE = 2 FA_LINES_PER_READ = 2 FQ_LINES_PER_READ = 4 class SequenceDat...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 2897, 13, 5215, 337, 13, 5215, 7481, 13, 13, 3166, 21184, 1053, 838, 647, 5971, 13, 3166, 21184, 29889, 23718, 1053, 25981, 13, 3166, 21184, 29889, 2499, 647, 1053, 838, 647, 340...
zadanie/primer/prim 2.py
Adrenaline1a/demo-2.13
0
76345
<filename>zadanie/primer/prim 2.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import math, datetime if __name__ == '__main__': math.cos(math.pi / 4) datetime.date(2017, 3, 21)
[ 1, 529, 9507, 29958, 29920, 328, 6067, 29914, 558, 4193, 29914, 9469, 29871, 29906, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 298...
domoticz/plugin.py
lz129/ioplus-rpi
5
169161
<reponame>lz129/ioplus-rpi<filename>domoticz/plugin.py # IOplus # # Author: <NAME>, 2020 # # """ <plugin key="IOplus" name="Raspberry IOplus" author="<NAME>" version="0.1" externallink=""> <description> IOplus 8 relay board on raspberry </description> <params> <param field="Mode1" label="board n...
[ 1, 529, 276, 1112, 420, 29958, 29880, 29920, 29896, 29906, 29929, 29914, 29875, 17201, 29899, 29878, 1631, 29966, 9507, 29958, 3129, 327, 5175, 29914, 8582, 29889, 2272, 13, 29937, 10663, 11242, 13, 29937, 13, 29937, 13361, 29901, 529, 5813...
scripts/makeSwappHist.py
Miedema/MCNetwork
0
133399
#!/usr/bin/python3 from tools import * from sys import argv from os.path import join import h5py import matplotlib.pylab as plt from matplotlib.patches import Wedge import numpy as np if len(argv) > 1: pathToSimFolder = argv[1] else: pathToSimFolder = "../data/" parameters, electrodes = readParameters(pathT...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 3166, 8492, 1053, 334, 13, 3166, 10876, 1053, 1852, 29894, 13, 3166, 2897, 29889, 2084, 1053, 5988, 13, 13, 5215, 298, 29945, 2272, 13, 5215, 22889, 29889, 2272, 8205, 408, 14770, 13,...
sandbox/apps/app.py
django-oscar/django-oscar-gocardless
3
101285
<filename>sandbox/apps/app.py from oscar.app import Shop from apps.checkout.app import application as checkout_app class GoCardlessShop(Shop): checkout_app = checkout_app shop = GoCardlessShop()
[ 1, 529, 9507, 29958, 29879, 26738, 29914, 13371, 29914, 932, 29889, 2272, 13, 3166, 288, 14494, 29889, 932, 1053, 1383, 459, 13, 3166, 11446, 29889, 3198, 449, 29889, 932, 1053, 2280, 29871, 408, 24808, 29918, 932, 13, 13, 13, 1990, 292...
src/sources/webnovelindonesia.py
Epicpkmn11/lightnovel-crawler
1
75666
<gh_stars>1-10 # -*- coding: utf-8 -*- import logging import re from concurrent import futures from ..utils.crawler import Crawler logger = logging.getLogger('WEBNOVEL_INDONESIA') chapter_list_url = 'https://webnovelindonesia.com/wp-json/writerist/v1/chapters?category=%s&perpage=100&order=ASC&paged=%s' class Webnov...
[ 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, 5215, 12183, 13, 5215, 337, 13, 3166, 21984, 1053, 3105, 1973, 13, 3166, 6317, 132...
base/server.py
memy85/2022_Federated-Learning-Base
0
58426
<reponame>memy85/2022_Federated-Learning-Base from typing import List, Dict import tensorflow as tf import tensorflow.keras as keras from tensorflow.keras import models, layers, optimizers, initializers, losses, metrics from base.networks import * from base.client import * from base.federated import * class Server(ob...
[ 1, 529, 276, 1112, 420, 29958, 29885, 6764, 29947, 29945, 29914, 29906, 29900, 29906, 29906, 29918, 29943, 2447, 630, 29899, 29931, 799, 1076, 29899, 5160, 13, 3166, 19229, 1053, 2391, 29892, 360, 919, 13, 5215, 26110, 408, 15886, 13, 521...
video_capture/plotting.py
FrostyDesigner/Python_Scripts
1
46919
<reponame>FrostyDesigner/Python_Scripts from motion_capture import df from bokeh.plotting import figure, show, output_file from bokeh.models import HoverTool, ColumnDataSource #convert start and end columns to strings for easy reading df["Start_string"]=df["Start"].dt.strftime("%Y-%m-%d %H:%M:%S") df["End_string"]=df[...
[ 1, 529, 276, 1112, 420, 29958, 29943, 17627, 29891, 4002, 21216, 29914, 11980, 29918, 4081, 29879, 13, 3166, 10884, 29918, 17885, 545, 1053, 4489, 13, 3166, 1045, 446, 29882, 29889, 5317, 1259, 1053, 4377, 29892, 1510, 29892, 1962, 29918, ...
src/lib/request/__init__.py
arnulfojr/simple-pos
1
60639
from src import is_json
[ 1, 29871, 13, 3166, 4765, 1053, 338, 29918, 3126, 13, 13, 2 ]
var/spack/repos/builtin/packages/r-pkgload/package.py
kkauder/spack
2,360
199910
<filename>var/spack/repos/builtin/packages/r-pkgload/package.py # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RPkgload(RPackage): """Sim...
[ 1, 529, 9507, 29958, 1707, 29914, 1028, 547, 29914, 276, 1066, 29914, 16145, 262, 29914, 8318, 29914, 29878, 29899, 15865, 1359, 29914, 5113, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 29899, 29906, 29900, 29906, ...
ibmsecurity/isam/web/runtime/object.py
zone-zero/ibmsecurity
46
184941
<reponame>zone-zero/ibmsecurity import logging logger = logging.getLogger(__name__) # *** WORK IN PROGRESS - module not done yet def get_all(isamAppliance, isamUser, object='/', admin_domain='Default'): """ Retrieve a list of objects """ ret_obj = isamAppliance.invoke_post("Retrieve a list of object...
[ 1, 529, 276, 1112, 420, 29958, 8028, 29899, 9171, 29914, 29690, 8926, 13, 5215, 12183, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 29937, 18610, 399, 1955, 29968, 2672, 13756, 29954, 26785, 448, 38...
cnn_training/vgg2_2_tfrecords_loose.py
bioidiap/bob.bio.face
4
57384
<filename>cnn_training/vgg2_2_tfrecords_loose.py #!/usr/bin/env python # coding: utf-8 """ Crop VGG2 with loose crop based on bounding box Usage: vgg2_2_tfrecords.py <vgg-path> <output-path> [--factor=<kn>] vgg2_2_tfrecords.py -h | --help Options: -h --help Show this screen. --factor=<kn> ...
[ 1, 529, 9507, 29958, 29883, 15755, 29918, 26495, 29914, 29894, 1505, 29906, 29918, 29906, 29918, 13264, 3757, 4339, 29918, 417, 852, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, ...
450/Nagendra/greedy/Swap and Maximize .py
Nagendracse1/Competitive-Programming
3
14701
#code https://practice.geeksforgeeks.org/problems/swap-and-maximize/0 for _ in range(int(input())): n = int(input()) arr = list(map(int, input().split())) arr.sort() max = 0 for i in range(n//2): max -= 2*arr[i] max += 2*arr[n-i-1] print(max)
[ 1, 396, 401, 2045, 597, 29886, 1461, 625, 29889, 479, 14541, 20324, 14541, 29889, 990, 29914, 17199, 29879, 29914, 26276, 29899, 392, 29899, 27525, 675, 29914, 29900, 13, 13, 1454, 903, 297, 3464, 29898, 524, 29898, 2080, 22130, 29901, 13...
its.py
rohan2546/TechArmy
1
122045
import pymongo import datetime import json from flask import Flask, render_template, request, url_for, redirect, abort, jsonify, make_response from flask_cors import CORS, cross_origin from bson import json_util from bson.json_util import dumps,ObjectId import random app=Flask(__name__) @app.route('/addP...
[ 1, 1053, 282, 962, 7443, 30004, 13, 5215, 12865, 30004, 13, 5215, 4390, 30004, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 29892, 2009, 29892, 3142, 29918, 1454, 29892, 6684, 29892, 27450, 29892, 4390, 1598, 29892, 1207, ...
warp.py
RezaFirouzii/fum-delta-vision
0
6451
import math import imageio import cv2 as cv import numpy as np import transformer def fix_rotation(img): img_copy = img.copy() img = cv.cvtColor(img, cv.COLOR_BGR2GRAY) rows, cols = img.shape img = cv.adaptiveThreshold(img, 255, cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY_INV, 15, 9) kernel = cv.g...
[ 1, 1053, 5844, 13, 5215, 1967, 601, 13, 5215, 13850, 29906, 408, 13850, 13, 5215, 12655, 408, 7442, 13, 5215, 4327, 261, 13, 13, 1753, 2329, 29918, 5450, 362, 29898, 2492, 1125, 13, 1678, 10153, 29918, 8552, 353, 10153, 29889, 8552, 5...
RSA.py
SamuelBuhan/chiffrement_python
0
145890
<gh_stars>0 from Crypto.PublicKey import RSA from Crypto.Random import get_random_bytes from Crypto.Cipher import AES, PKCS1_OAEP """encrypt data """ data = "I met aliens in UFO. Here is the map.".encode("utf-8") file_out = open("encrypted_data.bin", "wb") recipient_key = RSA.import_key(open("receiver.pem...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 315, 17929, 29889, 19858, 2558, 1053, 390, 8132, 30004, 13, 3166, 315, 17929, 29889, 17875, 1053, 679, 29918, 8172, 29918, 13193, 30004, 13, 3166, 315, 17929, 29889, 29907, 29875, 8...
esp_sdk/extensions/base_object.py
zimmermanc/esp-sdk-python
6
123073
class BaseObject(object): """ A base class to provide common features to all models. """
[ 1, 770, 7399, 2061, 29898, 3318, 1125, 13, 1678, 9995, 13, 1678, 319, 2967, 770, 304, 3867, 3619, 5680, 304, 599, 4733, 29889, 13, 1678, 9995, 13, 2 ]
scripts/lint.py
OwenDeng1993/Husky
117
149915
#!/usr/bin/env python import getopt import os import subprocess import sys CPPLINT_PY = os.path.dirname(os.path.abspath(__file__)) + '/cpplint.py' CPPLINT_EXTENSIONS = ['cpp', 'hpp', 'tpp'] CPPLINT_FILTERS = ['-whitespace/indent', '-runtime/references', '+build/include_alpha', '-build/c++11', '-legal/copyright', '-r...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 679, 3670, 13, 5215, 2897, 13, 5215, 1014, 5014, 13, 5215, 10876, 13, 13, 13, 6271, 7390, 10192, 29918, 20055, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, ...
sdk/python/pulumi_azure_native/authorization/v20180101preview/role_definition.py
sebtelko/pulumi-azure-native
0
194432
<filename>sdk/python/pulumi_azure_native/authorization/v20180101preview/role_definition.py<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runti...
[ 1, 529, 9507, 29958, 15348, 29914, 4691, 29914, 29886, 352, 15547, 29918, 17688, 29918, 11487, 29914, 8921, 2133, 29914, 29894, 29906, 29900, 29896, 29947, 29900, 29896, 29900, 29896, 25347, 29914, 12154, 29918, 16553, 29889, 2272, 29966, 12443...
modeloMarkowitz.py
HubertRonald/ModeloMarkowitz
1
125109
import numpy as np import pandas as pd import cvxopt as opt from cvxopt import solvers #, blas from matplotlib import pyplot as plt plt.style.use('seaborn') np.random.seed(9062020) # Cargar y limpiar datos df = pd.read_csv("stocks.csv", sep=",", engine="python") #���Field 1 la columna tiene caracteres extranios df....
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 13, 5215, 13850, 29916, 3670, 408, 3523, 13, 3166, 13850, 29916, 3670, 1053, 899, 874, 396, 29892, 1999, 294, 13, 13, 3166, 22889, 1053, 11451, 5317, 408, 14770, 13, 572, 298...
pyproteome/motifs/icelogo.py
white-lab/pyproteome
8
1602378
<reponame>white-lab/pyproteome from __future__ import division # Built-ins import logging import requests try: from IPython.display import Image except ImportError: Image = None from . import motif LOGGER = logging.getLogger('pyproteome.icelogo') ICELOGO_BASE = 'http://iomics.ugent.be/icelogoserver' def ...
[ 1, 529, 276, 1112, 420, 29958, 10921, 29899, 8205, 29914, 2272, 14676, 608, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 13, 29937, 5373, 2782, 29899, 1144, 13, 5215, 12183, 13, 5215, 7274, 13, 13, 2202, 29901, 13, 1678, 515, 56...
exceptions_and_logging/logging_settings.py
Agamiru/exceptions_and_logging
1
175362
<reponame>Agamiru/exceptions_and_logging import logging import os EXTRA_KWARGS = ["err_type"] DEFAULT_LOGGER_NAME = "default_logger" MSG_FORMAT = '%(asctime)s - APPLICATION ERROR - %(levelname)s\n' \ 'Error Type: %(err_type)s\n' \ 'Error Message: %(message)s\n' module_dir = os.path.dirname(_...
[ 1, 529, 276, 1112, 420, 29958, 14769, 314, 381, 29884, 29914, 11739, 29879, 29918, 392, 29918, 21027, 13, 5215, 12183, 13, 5215, 2897, 13, 13, 12194, 4717, 29918, 29968, 29956, 1718, 10749, 353, 6796, 3127, 29918, 1853, 3108, 13, 23397, ...
core/management_utils.py
crydotsnake/djangogirls
446
28144
import djclick as click from django.conf import settings from django.utils.translation import gettext_lazy as _ from .forms import AddOrganizerForm from .slack_client import slack # "Get organizers info" functions used in 'new_event' and 'copy_event' management commands. def get_main_organizer(): """ We're ...
[ 1, 1053, 270, 29926, 3808, 408, 2828, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 13239, 29889, 3286, 18411, 1053, 679, 726, 29918, 433, 1537, 408, 903, 13, 13, 3166, 869, 9514, 1053, 3462, 27356, 3950, 2500, 13, 3...
es_sink/es_sink/__init__.py
avmi/community
305
192747
__all__ = ['descriptor', 'es_transport', 'flushing_buffer', 'line_buffer', 'sqs_transport', 'transport_exceptions', 'transport_result', 'transport_utils']
[ 1, 4770, 497, 1649, 353, 6024, 2783, 11709, 742, 13, 965, 525, 267, 29918, 27882, 742, 13, 965, 525, 1579, 21616, 29918, 9040, 742, 13, 965, 525, 1220, 29918, 9040, 742, 13, 965, 525, 3044, 29879, 29918, 27882, 742, 13, 965, 525, 27...
one_off/extractor.py
snspam/sn_spam
0
162076
import re import pandas as pd import util as ut import argparse def extract(df, target_col='text', info_type='link', out_dir=''): ut.makedirs(out_dir) df = df[['com_id', target_col]] ut.out('target column: %s, info type: %s' % (target_col, info_type)) if info_type == 'text': ut.out('writing ...
[ 1, 1053, 337, 13, 5215, 11701, 408, 10518, 13, 5215, 3667, 408, 3477, 13, 5215, 1852, 5510, 13, 13, 13, 1753, 6597, 29898, 2176, 29892, 3646, 29918, 1054, 2433, 726, 742, 5235, 29918, 1853, 2433, 2324, 742, 714, 29918, 3972, 2433, 293...
openconnect-cli.py
tcpipuk/OpenConnect-FE
0
26741
#!/usr/bin/env python3 import argparse, pexpect from getpass import getpass from time import sleep # Set up argument parser parser = argparse.ArgumentParser(prog='openconnect-cli', description='Automate logins to the OpenConnect SSL VPN client') # Type of VPN to initiate parser_type = parser.add_mutually_exclusive_g...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 1852, 5510, 29892, 282, 17854, 13, 3166, 679, 3364, 1053, 679, 3364, 13, 3166, 931, 1053, 8709, 13, 13, 29937, 3789, 701, 2980, 13812, 13, 16680, 353, 1852, 5510, 29...
ansible_collections/arista/cvp/plugins/module_utils/facts_tools.py
mtache/ansible-cvp
0
168348
#!/usr/bin/env python # coding: utf-8 -*- # # GNU General Public License v3.0+ # # Copyright 2022 Arista Networks AS-EMEA # # 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.ap...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 15143, 4593, 5236, 19245, 325, 29941, 29889, 29900, 29974, 13, 29937, 13, 29937, 14187, 1266, 29871, 2990...
sparclur/parsers/_pdfcpu.py
levelupresearch/sparclur
0
166182
<reponame>levelupresearch/sparclur import shutil from typing import List, Dict, Any, Union import os import re import locale import shlex import tempfile import subprocess from subprocess import DEVNULL, TimeoutExpired import yaml from sparclur._tracer import Tracer from sparclur._parser import VALID, VALID_WARNINGS,...
[ 1, 529, 276, 1112, 420, 29958, 5563, 29884, 4569, 2842, 29914, 29879, 862, 695, 332, 13, 5215, 528, 4422, 13, 3166, 19229, 1053, 2391, 29892, 360, 919, 29892, 3139, 29892, 7761, 13, 5215, 2897, 13, 5215, 337, 13, 5215, 15068, 13, 5215...
rsvis/tools/canvas/imgcv.py
Tom-Hirschberger/DataVisualization
0
48003
# =========================================================================== # imgcv.py ---------------------------------------------------------------- # =========================================================================== # import ------------------------------------------------------------------ # -----...
[ 1, 396, 1275, 9166, 9166, 9166, 9166, 4936, 29922, 13, 29937, 259, 10153, 11023, 29889, 2272, 448, 2683, 2683, 2683, 9072, 5634, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 29922, 13, 13, 29937, 259, 1053, 448, 2683, 2683, 2683, 2683...
setup.py
understood/ytreporty
1
108733
<reponame>understood/ytreporty<gh_stars>1-10 # -*- coding: utf-8; mode: Python; -*- # # 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 # # Unle...
[ 1, 529, 276, 1112, 420, 29958, 5062, 9337, 29914, 29891, 2484, 637, 29891, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 29936, 4464, 29901, 5132, 29936, ...
program/condition/and_cond.py
probing-lab/polar
2
87229
from .condition import Condition from .true_cond import TrueCond class And(Condition): cond1: Condition cond2: Condition def __init__(self, cond1, cond2): self.cond1 = cond1 self.cond2 = cond2 def simplify(self): self.cond1 = self.cond1.simplify() self.cond2 = self.co...
[ 1, 515, 869, 16122, 1053, 11790, 654, 13, 3166, 869, 3009, 29918, 1116, 1053, 5852, 10983, 13, 13, 13, 1990, 1126, 29898, 25255, 1125, 13, 1678, 2148, 29896, 29901, 11790, 654, 13, 1678, 2148, 29906, 29901, 11790, 654, 13, 13, 1678, 8...
config/__init__.py
kave/boilerplate-repo
0
104147
<reponame>kave/boilerplate-repo<gh_stars>0 import os from distutils.util import strtobool from os.path import dirname, join from dotenv import load_dotenv dotenv_path = join(dirname(__file__), '.env') load_dotenv(dotenv_path, verbose=True) # Server HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('...
[ 1, 529, 276, 1112, 420, 29958, 1335, 345, 29914, 833, 3955, 2341, 29899, 20095, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 3166, 1320, 13239, 29889, 4422, 1053, 851, 517, 11227, 13, 3166, 2897, 29889, 2084, 1053, ...
CompetitiveProgramming/CodeChef/P20_MARCHA1.py
Sahil2rick/School-PythonProject
0
161847
# In the mysterious country of Byteland, everything is quite different from what you'd normally expect. In most places, if # you were approached by two mobsters in a dark alley, they would probably tell you to give them all the money that you # have. If you refused, or didn't have any - they might even beat you up. # #...
[ 1, 396, 512, 278, 22277, 2738, 4234, 310, 2648, 29873, 14045, 29892, 4129, 338, 3755, 1422, 515, 825, 366, 29915, 29881, 12891, 2149, 29889, 512, 1556, 7600, 29892, 565, 13, 29937, 366, 892, 26733, 491, 1023, 22458, 23080, 297, 263, 650...
src/pymodaq_plugins_moke/mokemacro.py
CEMES-CNRS/pymodaq_plugins_moke
0
161123
import sys from qtpy import QtWidgets from pymodaq.daq_utils.gui_utils import DockArea from pymodaq.daq_viewer.daq_viewer_main import DAQ_Viewer def main(): app = QtWidgets.QApplication(sys.argv) win = QtWidgets.QMainWindow() area = DockArea() win.setCentralWidget(area) win.resize(1000, 500) wi...
[ 1, 1053, 10876, 13, 3166, 3855, 29873, 2272, 1053, 14705, 8801, 29879, 13, 3166, 282, 962, 8887, 29939, 29889, 1388, 29939, 29918, 13239, 29889, 23569, 29918, 13239, 1053, 360, 1698, 13799, 13, 3166, 282, 962, 8887, 29939, 29889, 1388, 29...
projects/api/components.py
Matheus158257/projects
0
122955
# -*- coding: utf-8 -*- """Components blueprint.""" from flask import jsonify, request from flask_smorest import Blueprint from ..controllers.components import create_component, get_component, update_component, \ delete_component, pagination_components, total_rows_components from ..utils import to_snake_case bp...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 25503, 7254, 2158, 1213, 15945, 13, 13, 3166, 29784, 1053, 4390, 1598, 29892, 2009, 13, 3166, 29784, 29918, 3844, 272, 342, 1053, 10924, 21...
8KYU/first_non_consecutive.py
yaznasivasai/python_codewars
4
41484
def first_non_consecutive(arr: list) -> int: ''' This function returns the first element of an array that is not consecutive. ''' if len(arr) < 2: return None non_consecutive = [] for i in range(len(arr) - 1): if arr[i+1] - arr[i] != 1: non_consecutive.append(arr[i+1]) if...
[ 1, 822, 937, 29918, 5464, 29918, 535, 3471, 11067, 29898, 2749, 29901, 1051, 29897, 1599, 938, 29901, 13, 1678, 14550, 910, 740, 3639, 278, 937, 1543, 310, 385, 1409, 393, 338, 451, 18942, 29889, 14550, 13, 1678, 565, 7431, 29898, 2749,...
commands/interactive.py
Aprelius/tplink-smart-devices
0
1616428
from tplink.discover import LoadDevices commands = { 'toggle': 'Disable the devices', 'help': 'Display this help menu', 'quit': 'Exit this interactive prompt', 'list': 'List available devices', 'use': 'Target a specific device ID or name for commands' } def IsNumber(value): try: int(va...
[ 1, 515, 260, 572, 682, 29889, 2218, 11911, 1053, 16012, 16618, 1575, 13, 13, 26381, 353, 426, 13, 1678, 525, 13270, 2396, 525, 4205, 519, 278, 9224, 742, 13, 1678, 525, 8477, 2396, 525, 9323, 445, 1371, 6143, 742, 13, 1678, 525, 283...
isoimage.py
nuk380y/piedpiper-pakman-faas
0
159656
import yaml import sys import os import pathlib import zipfile import shutil import tarfile import errno # Read YAML file def main(argv): command_name = 'mkisofs' target_directory = 'target' if sys.version_info[0] != 3 or sys.version_info[1] < 6: print("This script requires Python version 3.6+") ...
[ 1, 1053, 343, 8807, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 2224, 1982, 13, 5215, 14319, 1445, 13, 5215, 528, 4422, 13, 5215, 9913, 1445, 13, 5215, 4589, 1217, 13, 13, 13, 29937, 7523, 612, 23956, 934, 13, 1753, 1667, 29898, 1921...
test.py
dharshini-raman/SeniorYear
0
160824
<reponame>dharshini-raman/SeniorYear<gh_stars>0 # Importing libraries import pandas as pd import numpy as np import math import operator import matplotlib.pyplot as plt from sklearn import datasets, neighbors from mlxtend.plotting import plot_decision_regions #### Start of STEP 1 # Importing data data = ...
[ 1, 529, 276, 1112, 420, 29958, 29881, 8222, 845, 2172, 29899, 2572, 273, 29914, 29903, 264, 1611, 12883, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 30004, 13, 29937, 16032, 292, 9562, 30004, 13, 5215, 11701, 408, 10518, 30004, 13, ...
linkedList/143 reorder list.py
windowssocket/py_leetcode
3
86874
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def reorderList(self, head): """ :type head: ListNode :rtype: void Do not return anything, modify head in-place instead. ...
[ 1, 396, 21940, 363, 1809, 368, 29899, 2324, 287, 1051, 29889, 13, 29937, 770, 2391, 4247, 29898, 3318, 1125, 13, 29937, 268, 822, 4770, 2344, 12035, 1311, 29892, 921, 1125, 13, 29937, 308, 1583, 29889, 791, 353, 921, 13, 29937, 308, 1...
tests/google/conftest.py
UUUM/backup-google-drive
6
1617352
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import pytest import gdsync from gdsync.google.drive import Drive TEST_FOLDER_NAME = 'gdsync-test' @pytest.fixture() def delete_db_file(request, sqlite_file): def fin(): if os.path.isfile(sqlite_file): os.unlink(sqli...
[ 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, 5215, 2897, 13, 13, 5215, 11451, 1688, 13, 13, 5215, 330, 6289, 2720, 13, 3166,...
uzbplaces/urls.py
heykarimoff/uzbplaces
2
188414
from django.conf.urls import url from apps.address import views urlpatterns = [ url(r'^provinces/$', views.ProvinceList.as_view(), name='provinces'), url(r'^regions/(?P<province>[0-9]+)/$', views.RegionList.as_view(), name='province_regions'), url(r'^regions/(?P<province>[0-9]+)/(?P<code>[0-9]+)/$', views...
[ 1, 515, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 13, 3166, 11446, 29889, 7328, 1053, 8386, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 3142, 29898, 29878, 29915, 29985, 771, 3845, 778, 13346, 742, 8386, 29889, 1184, 29894, 1...
old_stuff/serial_game/mb_control.py
jrmhaig/microbit_playground
1
69512
<gh_stars>1-10 import microbit key_delay = 100 acc = microbit.accelerometer a = microbit.button_a b = microbit.button_b img = microbit.display.image while True: microbit.display.clear() x = acc.get_x() y = acc.get_y() if x > 300: print('r') img.set_pixel_value(4, 2, 1) elif x < -30...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 9200, 2966, 13, 13, 1989, 29918, 18829, 353, 29871, 29896, 29900, 29900, 13, 5753, 353, 9200, 2966, 29889, 562, 2242, 261, 8328, 13, 29874, 353, 9200, 2966, 2...
_singleActions-AsScripts/02_LoadPhotosInNewChunk.py
campbell-ja/MetashapePythonScripts
4
118196
<reponame>campbell-ja/MetashapePythonScripts # This script created by <NAME> - 03/2021 """ Set up Working Environment """ # import Metashape library module import Metashape # create a reference to the current project via Document Class doc = Metashape.app.document """ Prompt User to Select Images """ # creat...
[ 1, 529, 276, 1112, 420, 29958, 24821, 12562, 29899, 1764, 29914, 10095, 1161, 4085, 11980, 4081, 29879, 13, 29937, 910, 2471, 2825, 491, 529, 5813, 29958, 448, 29871, 29900, 29941, 29914, 29906, 29900, 29906, 29896, 30004, 13, 30004, 13, ...
r-net.py
gypleon/SQuAD
0
53558
import tensorflow as tf import numpy as np from word_embedding import WORD_EMBEDDING as WE class R_NET(object): ''' refer to R-NET: Machine Reading Comprehension with Self-matching Networks Natural Language Computing Group, Microsoft Research Asia https://www.microsoft.com/en-us/research/publication/mrc/ ...
[ 1, 1053, 26110, 408, 15886, 13, 5215, 12655, 408, 7442, 13, 3166, 1734, 29918, 17987, 8497, 1053, 399, 25593, 29918, 29923, 9486, 3352, 29928, 4214, 408, 399, 29923, 13, 13, 1990, 390, 29918, 6006, 29898, 3318, 1125, 13, 29871, 14550, 1...
tests/io/test_processing.py
syuoni/eznlp
9
111696
<gh_stars>1-10 # -*- coding: utf-8 -*- import pytest from eznlp.io import PostIO @pytest.mark.parametrize("absorb_attr_types", [[], ['Analyzed'], ['Analyzed', 'Denied'], ['U...
[ 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, 5215, 11451, 1688, 13, 13, 3166, 321, 3749, 22833, 29889, 601, 1053, 4918, 5971, 1...
annex_counts_app/admin.py
birkin/annex_counts_project
0
165196
# -*- coding: utf-8 -*- from .models import Counter from django.contrib import admin class CounterAdmin(admin.ModelAdmin): list_display = [ 'create_datetime', 'date_key', 'hay_accessions', 'hay_refiles', 'non_hay_accessions', 'non_hay_refiles', 'notes' ] list_filter = [ 'create_datetime', 'd...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 3166, 869, 9794, 1053, 315, 5336, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 13, 13, 1990, 315, 5336, 12754, 29898, 6406, 29889, 3195, 12754, 11...
torch/jit/_fuser.py
ljhOfGithub/pytorch
1
11885
<reponame>ljhOfGithub/pytorch import contextlib import torch from typing import List, Tuple @contextlib.contextmanager def optimized_execution(should_optimize): """ A context manager that controls whether the JIT's executor will run optimizations before executing a function. """ stored_flag = torc...
[ 1, 529, 276, 1112, 420, 29958, 14042, 29882, 2776, 29954, 2985, 29914, 2272, 7345, 305, 13, 5215, 3030, 1982, 13, 13, 5215, 4842, 305, 13, 3166, 19229, 1053, 2391, 29892, 12603, 552, 13, 13, 29992, 4703, 1982, 29889, 4703, 12847, 13, ...
estimate.py
rxm562/SeismoPi
0
173639
""" This file to define Estimate various parameters """ import numpy as np import pandas as pd from scipy.spatial import distance import matplotlib.pyplot as plt import networkx as nx from pyproj import Proj from pyproj import Proj, transform # trasforming latlong into mercetor coordinates def tran(data): ut...
[ 1, 9995, 13, 4013, 934, 304, 4529, 2661, 6490, 5164, 4128, 13, 15945, 29908, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 3166, 4560, 2272, 29889, 1028, 15238, 1053, 5418, 13, 5215, 22889, 29889, 2272, 5317, 408, 1...
tests/algorithms/test_rigid_body.py
UCL/scikit-surgeryarucotracker
0
161996
<reponame>UCL/scikit-surgeryarucotracker<filename>tests/algorithms/test_rigid_body.py # -*- coding: utf-8 -*- """Tests for the rigid body classes""" import pytest import numpy as np from cv2 import aruco import sksurgeryarucotracker.algorithms.rigid_bodies as rgbd # pylint: disable=no-member def test_rigid_body_init...
[ 1, 529, 276, 1112, 420, 29958, 29965, 6154, 29914, 26167, 7354, 29899, 29879, 2007, 708, 279, 1682, 327, 336, 4937, 29966, 9507, 29958, 21150, 29914, 9564, 12404, 29914, 1688, 29918, 8966, 333, 29918, 2587, 29889, 2272, 13, 29937, 29871, ...
ClientePY.py
G2000G/webService-java
0
95167
<filename>ClientePY.py from suds.client import Client url = "http://localhost:13000/conversor?wsdl" client = Client(url) tipo = int(input("Bem-vindo ao Conversor de Temperaturas, digite: \n1 para converter de Celsius para Kelvin: \n2 para converter de Kelvin para Celsius:\n>>> ")) temp = int(input("Digite a tempe...
[ 1, 529, 9507, 29958, 4032, 29872, 20055, 29889, 2272, 13, 3166, 5053, 29879, 29889, 4645, 1053, 12477, 30004, 13, 30004, 13, 2271, 353, 376, 1124, 597, 7640, 29901, 29896, 29941, 29900, 29900, 29900, 29914, 535, 874, 272, 29973, 29893, 29...
src/mlb_statsapi/model/api/config.py
power-edge/mlb_statsapi_etl
0
153604
<gh_stars>0 """ created by nikos at 4/26/21 """ import os.path from ..base import MLBStatsAPIEndpointModel from mlb_statsapi.utils.stats_api_object import configure_api class ConfigModel(MLBStatsAPIEndpointModel): @configure_api def awards(self, **kwargs): return self.get_api_file_object(**kwargs) ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 11600, 491, 302, 638, 359, 472, 29871, 29946, 29914, 29906, 29953, 29914, 29906, 29896, 13, 15945, 29908, 13, 5215, 2897, 29889, 2084, 13, 13, 3166, 6317, 3188, 1053, ...
snoop/management/commands/doctor.py
hoover/snoop
5
92399
<filename>snoop/management/commands/doctor.py from pathlib import Path import subprocess import re import sys import urllib.request import urllib.error import json from django.core.management.base import BaseCommand from django.conf import settings from django.db import connections from django.db.utils import Operation...
[ 1, 529, 9507, 29958, 29879, 1217, 459, 29914, 21895, 29914, 26381, 29914, 1867, 2801, 29889, 2272, 13, 3166, 2224, 1982, 1053, 10802, 13, 5215, 1014, 5014, 13, 5215, 337, 13, 5215, 10876, 13, 5215, 3142, 1982, 29889, 3827, 13, 5215, 314...
tests/integration/test_security.py
Rogdham/bigxml
4
105719
<reponame>Rogdham/bigxml from defusedxml import EntitiesForbidden import pytest from bigxml import Parser def handler_get_text(node): yield node.text @pytest.mark.parametrize( "xml", ( pytest.param( ( b"<!DOCTYPE foobar [\n" b' <!ENTITY a "bigbigbi...
[ 1, 529, 276, 1112, 420, 29958, 29934, 468, 29881, 3391, 29914, 3752, 3134, 13, 3166, 822, 3880, 3134, 1053, 4284, 1907, 2831, 29890, 4215, 13, 5215, 11451, 1688, 13, 13, 3166, 4802, 3134, 1053, 1459, 643, 13, 13, 13, 1753, 7834, 29918...
task_scripts/merge_seginfo.py
ZettaAI/Synaptor
7
49289
""" Segment Info Merging Wrapper Script - Takes an id mapping across segments as input - Merges the segment info dataframes into one for the entire dataset """ import synaptor as s import argparse parser = argparse.ArgumentParser() # Inputs & Outputs parser.add_argument("storagestr") parser.add_argument("hashval", ...
[ 1, 9995, 13, 17669, 358, 22140, 4702, 3460, 399, 6794, 14415, 13, 13, 29899, 323, 6926, 385, 1178, 10417, 4822, 24611, 408, 1881, 13, 29899, 4702, 2710, 278, 10768, 5235, 848, 19935, 964, 697, 363, 278, 4152, 8783, 13, 15945, 29908, 1...
tests/connect_tests.py
adyekjaer/VersionOne.SDK.Python
2
42117
<filename>tests/connect_tests.py from testtools import TestCase from testtools.assertions import assert_that from testtools.matchers import Equals from testtools.content import text_content import sys if sys.version_info >= (3,0): from urllib.error import HTTPError else: from urllib2 import HTTPError # try the...
[ 1, 529, 9507, 29958, 21150, 29914, 6915, 29918, 21150, 29889, 2272, 13, 3166, 1243, 8504, 1053, 4321, 8259, 13, 3166, 1243, 8504, 29889, 9294, 1080, 1053, 4974, 29918, 5747, 13, 3166, 1243, 8504, 29889, 4352, 414, 1053, 11243, 1338, 13, ...
src/bratdb/scripts/build.py
kpwhri/bratdb
0
155368
from bratdb.reader import build_brat_dump from bratdb.logger import initialize_logging def main(): import argparse parser = argparse.ArgumentParser(fromfile_prefix_chars='@!') parser.add_argument('anndir', help='Path to directory containing brat annotation files') parser.add_a...
[ 1, 515, 1506, 271, 2585, 29889, 16950, 1053, 2048, 29918, 1182, 271, 29918, 15070, 13, 3166, 1506, 271, 2585, 29889, 21707, 1053, 11905, 29918, 21027, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 1053, 1852, 5510, 13, 13, 1678, 13812, 353, ...
{{cookiecutter.directory_name}}/config/settings/development.py
ragnarok22/cookiecutter-django
2
28724
<reponame>ragnarok22/cookiecutter-django """ This is the settings file that you use when you're working on the project locally. Local development-specific include DEBUG mode, log level, and activation of developer tools like django-debug-toolsbar """ from .base import * # SECURITY WARNING: don't run with debug turned...
[ 1, 529, 276, 1112, 420, 29958, 1431, 24156, 554, 29906, 29906, 29914, 15108, 21199, 6463, 29899, 14095, 13, 15945, 29908, 13, 4013, 338, 278, 6055, 934, 393, 366, 671, 746, 366, 29915, 276, 1985, 373, 278, 2060, 12430, 29889, 13, 7717, ...
git_verkefni_forritun.py
JonasFreyrB/Forritun
0
14176
#<NAME> #25.01.2017 #Forritun #Liður 1 #Byð notanda um tölu 1 tala1=int(input("Sláðu inn tölu 1 ")) #Byð notanda um tölu 2 tala2=int(input("Sláðu inn tölu 2 ")) #Birti tölu 1 og 2 lagðar saman print("Tölurnar lagðar saman ",tala1+tala2) #Birti tölu 1 og 2 margfaldaðar saman print("Tölurnar margfaldaðar saman ",tala1*...
[ 1, 396, 29966, 5813, 29958, 13, 29937, 29906, 29945, 29889, 29900, 29896, 29889, 29906, 29900, 29896, 29955, 13, 29937, 2831, 768, 348, 13, 13, 29937, 23410, 30189, 332, 29871, 29896, 13, 13, 29937, 2059, 30189, 451, 5863, 1922, 260, 5873...
application/core/factory/account_factory.py
yntonfon/dashboard-plus
0
41551
from application.core.entity.account import Account from application.core.port.create_account_port import CreateAccountPort class AccountFactory(CreateAccountPort): def create_account(self, payload: dict) -> Account: return Account(**payload)
[ 1, 515, 2280, 29889, 3221, 29889, 10041, 29889, 10149, 1053, 16535, 13, 3166, 2280, 29889, 3221, 29889, 637, 29889, 3258, 29918, 10149, 29918, 637, 1053, 6204, 10601, 2290, 13, 13, 13, 1990, 16535, 5126, 29898, 4391, 10601, 2290, 1125, 13...
nls/_speech_transcriber.py
aliyun/alibabacloud-nls-python-sdk
15
177968
""" _speech_transcriber.py Copyright 1999-present Alibaba Group Holding Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
[ 1, 9995, 13, 29918, 5965, 5309, 29918, 3286, 699, 495, 29889, 2272, 13, 13, 11882, 1266, 29871, 29896, 29929, 29929, 29929, 29899, 6338, 319, 1982, 5363, 6431, 21771, 292, 19806, 29889, 13, 13, 29931, 293, 21144, 1090, 278, 13380, 19245, ...
hic_covid_repository/versions/002_Virology.py
LCBRU/hic_covid
0
38136
<filename>hic_covid_repository/versions/002_Virology.py from sqlalchemy import ( MetaData, Table, Column, Integer, NVARCHAR, DateTime, Date, Boolean, ) meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine t = Table( "virology", meta, ...
[ 1, 529, 9507, 29958, 29882, 293, 29918, 24542, 333, 29918, 19033, 29914, 26100, 29914, 29900, 29900, 29906, 29918, 29963, 3350, 1188, 29891, 29889, 2272, 13, 3166, 4576, 284, 305, 6764, 1053, 313, 13, 1678, 20553, 1469, 29892, 13, 1678, 6...
hdp-ambari-mpack-3.1.4.0/stacks/HDP/3.0/services/OOZIE/package/scripts/oozie_client.py
dropoftruth/dfhz_hdp_mpack
3
197302
<filename>hdp-ambari-mpack-3.1.4.0/stacks/HDP/3.0/services/OOZIE/package/scripts/oozie_client.py<gh_stars>1-10 #!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding...
[ 1, 529, 9507, 29958, 29882, 6099, 29899, 1117, 1306, 29899, 1526, 547, 29899, 29941, 29889, 29896, 29889, 29946, 29889, 29900, 29914, 1429, 29879, 29914, 29950, 11191, 29914, 29941, 29889, 29900, 29914, 9916, 29914, 29949, 29949, 29999, 8673, ...
tensorflow-example/tensor_placeholder.py
dinkar1708/machine-learning-examples
0
44922
<reponame>dinkar1708/machine-learning-examples import numpy as np import tensorflow as tf # placeholder - Inserts a placeholder for a tensor that will be always fed. # Example1- a = tf.placeholder(tf.float32) b = tf.placeholder(tf.float32) adder_node = a + b sess = tf.Session() print(sess.run(adder_node, {a: [1, 2],...
[ 1, 529, 276, 1112, 420, 29958, 29881, 682, 279, 29896, 29955, 29900, 29947, 29914, 23523, 29899, 21891, 29899, 19057, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 13, 29937, 12983, 448, 512, 643, 1372, 263, 12983, 363, 2...
baekjoon/not-classified/1630/1630.py
honux77/algorithm
2
113811
n = input() def gcd(m, n): while True: m %= n if m == 0: return n n %= m if n == 0: return m def lcm(m, n): g = gcd(m ,n) return m * n / g def omin(n): r = n for i in range(2, n): if r % i != 0: r = lcm(r,...
[ 1, 302, 353, 1881, 580, 13, 13, 1753, 330, 2252, 29898, 29885, 29892, 302, 1125, 13, 1678, 1550, 5852, 29901, 13, 4706, 286, 1273, 29922, 302, 13, 4706, 565, 286, 1275, 29871, 29900, 29901, 13, 9651, 736, 302, 13, 4706, 302, 1273, 2...
code/pgms/merge-sort.py
souradeepta/PythonPractice
0
144110
from typing import List def merge_sort(input: List): length = len(input) for step in range(1, length): key = input[step] j = step - 1 while j >= 0 and key < input[j]: input[j+1] = input[j] j = j - 1 input[j+1] = key ...
[ 1, 515, 19229, 1053, 2391, 13, 13, 1753, 10366, 29918, 6605, 29898, 2080, 29901, 2391, 1125, 13, 1678, 3309, 353, 7431, 29898, 2080, 29897, 13, 268, 13, 1678, 363, 4331, 297, 3464, 29898, 29896, 29892, 3309, 1125, 13, 4706, 1820, 353, ...
codes/globo_videos_cuts/core/tests/models/processed_video_model_test_case.py
lariodiniz/teste_meta
0
135947
# coding: utf-8 __author__ = "<NAME>" from django.test import TestCase from model_mommy import mommy from core.models import ProcessedVideo class ProcessedVideoModelTestCase(TestCase): """Class Testing Model processed """ def setUp(self): """ Initial Test Settings """ s...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 1649, 8921, 1649, 353, 9872, 5813, 11903, 13, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 3166, 1904, 29918, 29885, 290, 1357, 1053, 16823, 1357, 13, 13, 3166, 7136, 29889, 9794, 105...
migrations/metadata.py
gntzh/fastapi-tmpl
0
169429
<filename>migrations/metadata.py from src.domain import Item, User # noqa: F401 from src.domain.mapper import mapper_registry __all__ = ["metadata"] metadata = mapper_registry.metadata
[ 1, 529, 9507, 29958, 26983, 800, 29914, 19635, 29889, 2272, 13, 3166, 4765, 29889, 7247, 1053, 10976, 29892, 4911, 29871, 396, 694, 25621, 29901, 383, 29946, 29900, 29896, 13, 3166, 4765, 29889, 7247, 29889, 655, 2496, 1053, 611, 2496, 29...
setup.py
colincsl/StructuredModels
1
118754
''' Configure: python setup.py build StructuredModels <NAME> 2013 ''' from distutils.core import setup # from setuptools import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy as np # ext_modules = [ # Extension("pyKinectTools_algs_Dijkstras", ["pyKinectTools/...
[ 1, 29871, 13, 12008, 13, 3991, 545, 29901, 13, 4691, 6230, 29889, 2272, 2048, 13, 13, 19560, 2955, 23785, 13, 29966, 5813, 29958, 13, 29906, 29900, 29896, 29941, 13, 12008, 13, 13, 3166, 1320, 13239, 29889, 3221, 1053, 6230, 13, 29937, ...
locr/constants.py
thatandromeda/locr
1
179617
TIMEOUT = 2
[ 1, 323, 8890, 12015, 353, 29871, 29906, 13, 2 ]
HW6/YuliiaKutsyk/3_ unfinished_loop_bug_fixing.py
kolyasalubov/Lv-677.PythonCore
0
2018
def create_array(n): res=[] i=1 while i<=n: res.append(i) i += 1 return res
[ 1, 822, 1653, 29918, 2378, 29898, 29876, 1125, 13, 1678, 620, 29922, 2636, 13, 1678, 474, 29922, 29896, 13, 1678, 1550, 474, 14065, 29876, 29901, 13, 4706, 620, 29889, 4397, 29898, 29875, 29897, 13, 4706, 474, 4619, 29871, 29896, 13, 16...
glc/cli/subs/c_mr.py
evinoca/MyCli
1
80482
<filename>glc/cli/subs/c_mr.py from __future__ import absolute_import from __future__ import unicode_literals import click @click.group() @click.pass_obj def cli(config): """ Merge Requests. """ click.echo("calling sub cmd repo") @cli.command("ls", short_help="List MR") def ls(): click.echo("re...
[ 1, 529, 9507, 29958, 3820, 29883, 29914, 11303, 29914, 1491, 29879, 29914, 29883, 29918, 29885, 29878, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 13...
Bots/Python/Consumers/CodeFirst/WaterfallHostBot/dialogs/sso/sso_signin_dialog.py
gabog/BotFramework-FunctionalTests
28
49495
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.dialogs import ( ComponentDialog, WaterfallDialog, WaterfallStepContext, OAuthPrompt, OAuthPromptSettings, ) class SsoSignInDialog(ComponentDialog): def __init__(self, connection_name...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 2178, 10462, 21676, 29889, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19245, 29889, 13, 13, 3166, 9225, 16409, 29889, 15901, 29879, 1053, 313, 13, 1678, 15924, 7647, 29892, 1...
Independent Component Analysis.py
Queen-s-Cerebral-Language-Innovation/EEG-Preprocesing
0
1600824
<filename>Independent Component Analysis.py import csv from mne.preprocessing import (ICA) from mne import Epochs, pick_types from mne.channels import make_standard_montage from mne.io import concatenate_raws, read_raw_edf from mne.datasets import eegbci import numpy as np allICAs = [] subject = [] chosen = ...
[ 1, 529, 9507, 29958, 2568, 1022, 3906, 15924, 24352, 29889, 2272, 13, 5215, 11799, 30004, 13, 3166, 286, 484, 29889, 1457, 19170, 1053, 313, 2965, 29909, 8443, 13, 3166, 286, 484, 1053, 382, 1129, 12168, 29892, 5839, 29918, 8768, 30004, ...
kokon/utils/functions.py
KoalicjaOtwartyKrakow/backend
0
99188
import functools import json from typing import Optional from flask import Response, Request as FlaskRequest from marshmallow import ValidationError import sentry_sdk from kokon.orm import User from kokon.serializers import UUIDEncoder from .auth import upsert_user_from_jwt from .db import DB from .errors import AppE...
[ 1, 1053, 2090, 312, 8789, 13, 5215, 4390, 13, 3166, 19229, 1053, 28379, 13, 13, 3166, 29784, 1053, 13291, 29892, 10729, 408, 2379, 1278, 3089, 13, 3166, 1766, 845, 29885, 9536, 1053, 15758, 362, 2392, 13, 5215, 2665, 719, 29918, 15348, ...
stylegan2_torch/discriminator/blocks.py
ppeetteerrs/stylegan2-torch
0
97712
<filename>stylegan2_torch/discriminator/blocks.py import math from typing import List from stylegan2_torch.equalized_lr import Blur, EqualConv2d from stylegan2_torch.op.fused_act import FusedLeakyReLU from stylegan2_torch.utils import proxy from torch import nn from torch.functional import Tensor class ConvBlock(nn....
[ 1, 529, 9507, 29958, 22062, 1397, 273, 29906, 29918, 7345, 305, 29914, 2218, 29883, 20386, 1061, 29914, 1271, 29879, 29889, 2272, 13, 5215, 5844, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 15877, 1397, 273, 29906, 29918, 7345, 305, 29889,...
mir/sre/__init__.py
darkfeline/mir.sre
2
99182
<filename>mir/sre/__init__.py # Copyright (C) 2017 <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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 1, 529, 9507, 29958, 11038, 29914, 29879, 276, 29914, 1649, 2344, 26914, 2272, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29955, 529, 5813, 29958, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 2989...
openstack/telemetry/v2/alarm_change.py
sivel/python-openstacksdk
1
66602
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ 1, 396, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 1...
uwsgiconf/options/subscriptions.py
graceshaw/uwsgiconf
0
41669
from ..base import OptionsGroup from ..exceptions import ConfigurationError from ..utils import KeyValue, filter_locals from .subscriptions_algos import * class Subscriptions(OptionsGroup): """ This allows some uWSGI instances to announce their presence to subscriptions managing server, which in its turn ...
[ 1, 515, 6317, 3188, 1053, 25186, 4782, 13, 3166, 6317, 11739, 29879, 1053, 20999, 2392, 13, 3166, 6317, 13239, 1053, 7670, 1917, 29892, 4175, 29918, 2997, 29879, 13, 3166, 869, 1491, 7588, 1980, 29918, 9564, 359, 1053, 334, 13, 13, 13, ...
testsuite/cases/cv2.py
jcupitt/pillow-perf
0
36770
# coding: utf-8 from __future__ import print_function, unicode_literals, absolute_import import cv2 from .base import BaseTestCase, root try: cv2.setNumThreads(1) except AttributeError: print('!!! You are using OpenCV which does not allow you to set ' 'the number of threads') class Cv2TestCase(...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 29892, 29104, 29918, 20889, 1338, 29892, 8380, 29918, 5215, 13, 13, 5215, 13850, 29906, 13, 13, 3166, 869, 3188, 1053, 7399, 3057, ...
config.py
PsychoBots/Kylie-Music
0
142035
<reponame>PsychoBots/Kylie-Music<filename>config.py import os import re from youtube_dl import YoutubeDL class Config: APP_ID = int(os.environ.get("APP_ID", "")) API_HASH = os.environ.get("API_HASH", "") BOT_TOKEN = os.environ.get("BOT_TOKEN", "") START_MSG = os.environ.get("START_MSG", "<b>Hi {},\nI a...
[ 1, 529, 276, 1112, 420, 29958, 29925, 29879, 29891, 1859, 29933, 1862, 29914, 29968, 2904, 347, 29899, 21238, 29966, 9507, 29958, 2917, 29889, 2272, 13, 5215, 2897, 13, 5215, 337, 13, 3166, 366, 29873, 4003, 29918, 11671, 1053, 612, 15907...
contrib/cirrus/podbot.py
juhp/libpod
2
10472
#!/usr/bin/env python3 # Simple and dumb script to send a message to the #podman IRC channel on frenode # Based on example from: https://pythonspot.com/building-an-irc-bot/ import os import time import random import errno import socket import sys class IRC: response_timeout = 10 # seconds irc = socket.sock...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 12545, 322, 270, 3774, 2471, 304, 3638, 263, 2643, 304, 278, 396, 15334, 1171, 306, 10363, 8242, 373, 285, 1267, 356, 13, 29937, 16564, 373, 1342, 515, 29901, 2045, ...
request.py
codeofdusk/Amanda
0
127903
<gh_stars>0 """Contains the Request class. Copyright 2018 - <NAME> <<EMAIL>>. Licensed under MIT.""" import random import components import config import utils class request(object): "Contains attributes for handling user requests and returning responses. Instantiate this class to make a request." def __init...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 21409, 278, 10729, 770, 29889, 13, 11882, 1266, 29871, 29906, 29900, 29896, 29947, 448, 529, 5813, 29958, 3532, 26862, 6227, 6778, 29889, 10413, 21144, 1090, 341, 1806, 1213, ...
nzmath/poly/univar.py
turkeydonkey/nzmath3
1
65984
<reponame>turkeydonkey/nzmath3 """ Univariate Polynomials The polynomials are immutable data types, under the public API. If one tries to manipulate its underlying data attributes, immutability will be able to be broken. """ import warnings import nzmath.ring as _ring import nzmath.poly.formalsum as formalsum cla...
[ 1, 529, 276, 1112, 420, 29958, 29873, 332, 1989, 9176, 1989, 29914, 29876, 29920, 755, 29941, 13, 15945, 29908, 13, 2525, 27432, 403, 2043, 9222, 29879, 13, 13, 1576, 24655, 526, 5198, 9246, 848, 4072, 29892, 1090, 278, 970, 3450, 29889...
mayan/apps/document_states/migrations/0020_auto_20200311_1714.py
sophiawa/Mayan-EDMS
0
1603560
# Generated by Django 2.2.10 on 2020-03-11 17:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('document_states', '0019_workflowtransition_condition'), ] operations = [ migrations.AddField( model_name='workflowstateaction',...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29896, 29900, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 29941, 29899, 29896, 29896, 29871, 29896, 29955, 29901, 29896, 29946, 13, 13, 3166, 9557, 29889, 2585, 1053,...
tests/test_discord_pretty_help.py
zaanposni/discord-pretty-help
0
193704
import discord from discord.ext import commands from pretty_help import Navigation, PrettyHelp, __version__ def test_version(): assert __version__ == "1.2.0" # replace with your token TOKEN = "TOKEN" # ":discord:743511195197374563" is a custom discord emoji format. Adjust to match your own custom e...
[ 1, 1053, 2313, 536, 30004, 13, 3166, 2313, 536, 29889, 1062, 1053, 8260, 30004, 13, 3166, 5051, 29918, 8477, 1053, 23001, 29892, 4721, 4349, 29648, 29892, 4770, 3259, 1649, 30004, 13, 30004, 13, 30004, 13, 1753, 1243, 29918, 3259, 7295, ...
xos/synchronizer/steps/sync_iperfserverinstance.py
cewuandy/iperfserver
0
141658
<filename>xos/synchronizer/steps/sync_iperfserverinstance.py # Copyright 2017-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
[ 1, 529, 9507, 29958, 29916, 359, 29914, 29879, 9524, 3950, 29914, 24530, 29914, 16593, 29918, 29875, 546, 29888, 2974, 8758, 29889, 2272, 13, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29955, 29899, 6338, 4673, 8527, 292, 10606, 13...
leetcode/medium/1396-Design_underground.py
shubhamoli/practice
1
49664
<filename>leetcode/medium/1396-Design_underground.py """ Leetcode #1396 """ from collections import defaultdict class UndergroundSystem: def __init__(self): self.transit = defaultdict(list) self.dest = defaultdict(list) def checkIn(self, id: int, stationName: str, t: int) -> None: ...
[ 1, 529, 9507, 29958, 280, 300, 401, 29914, 27891, 29914, 29896, 29941, 29929, 29953, 29899, 4002, 647, 29918, 5062, 2057, 29889, 2272, 13, 15945, 29908, 13, 1678, 951, 300, 401, 396, 29896, 29941, 29929, 29953, 13, 15945, 29908, 13, 13, ...
test/tf/param/test_auto_save.py
jihuacao/Putil
1
1616320
# coding=utf-8 from optparse import OptionParser import Putil.loger as plog from colorama import Fore import functools import Putil.test.test_helper as th parser = OptionParser(usage='usage %prog [options] arg1 arg2') level_default = 'Debug' parser.add_option( '--level', action='store', dest='Level', ty...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 3166, 3523, 5510, 1053, 10831, 11726, 13, 5215, 349, 4422, 29889, 417, 914, 408, 282, 1188, 13, 3166, 2927, 3304, 1053, 28297, 13, 5215, 2090, 312, 8789, 13, 5215, 349, 4422, 29889, 1688, ...
setup.py
adjs/qclib
1
64856
""" pypi setup """ import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="qclib", version="0.0.8", author="<NAME>", author_email="<EMAIL>", description="A quantum computing library using qiskit", long_description=long_description, lon...
[ 1, 9995, 13, 29886, 1478, 29875, 6230, 13, 15945, 29908, 13, 13, 5215, 731, 21245, 8789, 13, 13, 2541, 1722, 703, 16310, 2303, 29889, 3487, 613, 376, 29878, 1159, 408, 285, 29882, 29901, 13, 1678, 1472, 29918, 8216, 353, 285, 29882, 2...
core/dbt/flags.py
tskleonard/dbt-core
0
12290
import os import multiprocessing if os.name != "nt": # https://bugs.python.org/issue41567 import multiprocessing.popen_spawn_posix # type: ignore from pathlib import Path from typing import Optional # PROFILES_DIR must be set before the other flags # It also gets set in main.py and in set_from_args because t...
[ 1, 1053, 2897, 13, 5215, 6674, 307, 985, 292, 13, 13, 361, 2897, 29889, 978, 2804, 376, 593, 1115, 13, 1678, 396, 2045, 597, 6152, 29879, 29889, 4691, 29889, 990, 29914, 15118, 29946, 29896, 29945, 29953, 29955, 13, 1678, 1053, 6674, ...
Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_WebKit
0
1612228
<gh_stars>0 # Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditio...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29896, 5087, 9266, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 4367, 391, 3224, 322, 671, 297, 2752, 322, 75...
models/gaze_rnn77.py
yj-yu/Recurrent_Gaze_Prediction
9
34304
<reponame>yj-yu/Recurrent_Gaze_Prediction #-*- coding: utf-8 -*- """ gaze_rnn7.py Implement a simple recurrent gaze prediction model based on RNN(GRU). In this version, the gaze DIM is REDUCED to 7x7 dimension. """ # TODO separate pupil from gazemaps, AWFUL design import numpy as np import os import sys import time...
[ 1, 529, 276, 1112, 420, 29958, 17472, 29899, 29891, 29884, 29914, 4789, 1264, 29918, 29954, 28334, 29918, 23084, 2463, 13, 29937, 29899, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 13, 29887, 28...
bspump/unittest/__init__.py
thatch/BitSwanPump
17
197200
from .pipeline import UnitTestPipeline from .sink import UnitTestSink from .source import UnitTestSource from .unit_test_case import ProcessorTestCase from .unit_test_case import TestCase __all__ = ( 'UnitTestPipeline', 'UnitTestSink', 'UnitTestSource', 'ProcessorTestCase', 'TestCase', )
[ 1, 515, 869, 13096, 5570, 1053, 13223, 3057, 29925, 23828, 13, 3166, 869, 29879, 682, 1053, 13223, 3057, 29903, 682, 13, 3166, 869, 4993, 1053, 13223, 3057, 4435, 13, 3166, 869, 5441, 29918, 1688, 29918, 4878, 1053, 10554, 272, 3057, 82...
process_image_withTensorFlow.py
DimasVeliz/yolov4-deepsort
0
104743
<reponame>DimasVeliz/yolov4-deepsort import os import tensorflow as tf physical_devices = tf.config.experimental.list_physical_devices('GPU') if len(physical_devices) > 0: tf.config.experimental.set_memory_growth(physical_devices[0], True) from absl import app, flags, logging from absl.flags import FLAGS, Flag impo...
[ 1, 529, 276, 1112, 420, 29958, 16142, 294, 29963, 295, 466, 29914, 29891, 324, 586, 29946, 29899, 311, 8961, 441, 13, 5215, 2897, 13, 5215, 26110, 408, 15886, 13, 14017, 936, 29918, 3359, 1575, 353, 15886, 29889, 2917, 29889, 735, 27910...
dataset.py
donghankim/comma_ai_speed_challenge
0
19007
import os import pandas as pd import numpy as np import torch from torchvision import transforms from torch.utils.data import Dataset import matplotlib.pyplot as plt from skimage import io import pdb class FrameDataset(Dataset): def __init__(self, csv_file, train_dir): self.labels = pd.read_csv(csv_file) ...
[ 1, 1053, 2897, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 4924, 1053, 4327, 29879, 13, 3166, 4842, 305, 29889, 13239, 29889, 1272, 1053, 13373, 24541, 13, 5215, 22889, 29889, 2272,...
Python3.01.06.py
MrMontag/python_test
0
178067
<gh_stars>0 import os print("Hallo, ich habe 5 Fragen an Sie. Sie können zwischen den Fragen wählen.") punkte=0 while True: print("Geben Sie die Nummer der gewünschten Frage ein.") print("Geben Sie STOP ein, wenn Sie das Programm verlassen möchten.") nummer=input() if nummer.upper()=="STOP": pr...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 13, 2158, 703, 29950, 26177, 29892, 7975, 19221, 29871, 29945, 383, 12702, 385, 4073, 29889, 4073, 12238, 7831, 972, 383, 12702, 281, 7538, 2435, 23157, 13, 29886, 2960, ...
bootstrap/p1.5.0/src/common/const.py
apurwaj2/df-on-k8s
0
5526
class Constants(object): LOGGER_CONF = "common/mapr_conf/logger.yml" USERNAME = "mapr" GROUPNAME = "mapr" USERID = 5000 GROUPID = 5000 ADMIN_USERNAME = "custadmin" ADMIN_GROUPNAME = "custadmin" ADMIN_USERID = 7000 ADMIN_GROUPID = 7000 ADMIN_PASS = "<PASSWORD>" MYSQL_USER = "...
[ 1, 29871, 13, 1990, 5798, 1934, 29898, 3318, 1125, 13, 1678, 25401, 17070, 29918, 6007, 29943, 353, 376, 9435, 29914, 1958, 29878, 29918, 5527, 29914, 21707, 29889, 21053, 29908, 13, 1678, 3148, 1001, 5813, 353, 376, 1958, 29878, 29908, 1...