source
stringlengths
3
86
python
stringlengths
75
1.04M
multi.py
import socket import os from threading import * Server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = "localhost" port = 12345 seprator_token = "<NEP>" disconectMessage ="!DISCONNECT" threadCount = 0 clientSockets = set() nameaccess={} Server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: ...
web.py
#Dashboard under testing , Solve unauthorized for discord api error from http import server from threading import Thread from shutil import ExecError from django.shortcuts import render from flask import * import flask from oauth import Oauth from dotenv import load_dotenv import os import pymongo from pymongo import ...
logout.py
""" Quit a shell. """ import argparse _stash = globals()["_stash"] def logout(n): """ Quit StaSh :param n: exitcode for the shell (not implemented) :type n: int """ import threading t = threading.Thread(target=_stash.close, name="close thread") t.daemon = True t.start() if...
microframework.py
#!/usr/bin/env python3 import time import threading import json class PereodicTask: """Repeat procedure/function in background (thread) with interval Args: task (obj): procedure/function to repeat interval (int): interval in seconds (default 1) """ def __init__(self, task, interva...
realtime.py
import mne import time import threading from .._handlers import properties from abc import ABC, abstractmethod class RealtimeError(Exception): pass class Realtime(ABC): """Realtime abstract class """ def __init__(self, options): self.channels = options["channels"] self.fs = options[...
main_window_controller.py
import os import os.path import threading import time #imports the DAO from music_wave.data_manager import DataManager #imports the miner from music_wave.miner import Miner #imports the compiler for searchs inside the program from music_wave.search_compiler import SearchCompiler #imports rola class from music_wave.rol...
train_fr_dist_randomseed.py
# coding: utf-8 import argparse import time import math import os, sys import itertools import numpy as np import torch import torch.nn as nn import torch.optim as optim from data_utils import get_lm_corpus from mem_transformer_fr_randomseed import MemTransformerLM_fr from utils.exp_utils import create_exp_dir from ...
example3.py
import multiprocessing as mp import random import string random.seed(123) # define a example function def rand_string(length, output): """ Generates a random string of numbers, lower- and uppercase chars. """ rand_str = ''.join(random.choice( string.ascii_lowercase ...
main.py
import socket import threading import time import struct import rlp from secp256k1 import PrivateKey from ipaddress import ip_address import hashlib import _pysha3 # from _pysha3 import keccak_256 import math def keccak256(s): k = _pysha3.keccak_256() k.update(s) return k.digest() class EndPoint(object): ...
sample_bot.py
from flask import Flask, request, Response from viberbot import Api from viberbot.api.bot_configuration import BotConfiguration from viberbot.api.messages.text_message import TextMessage from viberbot.api.viber_requests import ViberConversationStartedRequest from viberbot.api.viber_requests import ViberFailedRequest fr...
mousemover.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "luk6xff" __date__ = "01.02.2022" # Mouse and Keyboard controlers from pynput.mouse import Controller as MouseController from pynput.keyboard import Listener as KeyboardListener # Sleep wait from time import sleep import threading import random...
server.py
# -*- coding: utf-8 -*- """ livereload.server ~~~~~~~~~~~~~~~~~ WSGI app server for livereload. :copyright: (c) 2013 - 2015 by Hsiaoming Yang :license: BSD, see LICENSE for more details. """ import os import time import shlex import logging import threading import webbrowser from subprocess impor...
scheduler.py
import time import threading import logging import importlib import schedule log = logging.getLogger(__name__) log.setLevel("DEBUG") class Scheduler: """Create thread for scheduler to run""" def __init__(self, sequencer, config) -> None: self.sequencer = sequencer self.schedules = {} ...
executorservodriver.py
import json import os import socket import threading import time import traceback from .base import (Protocol, BaseProtocolPart, RefTestExecutor, RefTestImplementation, TestharnessExecutor, strip_server) from ..testrunner im...
MotifFinderSamplerServer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
browser.py
''' Copyright (c) 2019 Vanessa Sochat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
scraper.py
import subprocess import os import glob from multiprocessing import Process import logging import time from datetime import datetime import twint as tw print('Initialising twint config') #tc.Output = f'tw-{datetime.now().strftime("%Y%m%d-%H%M%S")}-newsoutlets.csv' # Set filename to include current date/time NEWSOUTLE...
dashboard.py
# Copyright (c) 2019 Microsoft Corporation # Distributed under the MIT software license from IPython import display import re import requests import threading import os from . import udash from gevent.pywsgi import WSGIServer from flask import Flask import socket import random from string import Template import log...
agent.py
#!/usr/bin/env python # # AzureMonitoringLinuxAgent Extension # # Copyright 2019 Microsoft 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/L...
module_rss.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Parse RSS feeds and display new entries on channel @author Henri 'fgeek' Salo <henri@nerv.fi>, Tomi 'dmc' Nykänen, Riku 'Shrike' Lindblad @copyright Copyright (c) 2010-2013 pyfibot developers @licence BSD Possible output syntax: 0 == feed_title: title - url 1...
audio_detection_main.py
from voice_activity_detector import VoiceActivityDetector import os import datetime import subprocess import random import re import threading import cleanup import ffmpeg_calls import logging logging.basicConfig(filename='./logs/example.log',level=logging.DEBUG) #Log format #logging.debug('This message should go to ...
test_auto_scheduler_measure.py
# 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 copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
GPIO.py
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # ## ############################################################# # GPIO.py # # Author: Mauricio Matamoros # Licence: MIT # Date: # # ## ############################################################# # Future imports (Python 2.7 compatibility) from __future__ import abso...
testengine.py
#!/usr/bin/env python # Copyright (c) 2006-2010 Tampere University of Technology # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rig...
voice_client.py
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
tieraServerManager.py
import commands import threading import socket import time import sys import json import select sys.path.append('./gen-py') from WieraTieraServerIface import * from WieraTieraServerIface.ttypes import * from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryPr...
client_manager.py
from LURKconfig import game_settings from client import Client, Q from LURKp import LURKprot from models import Session, Player, Character, Room, Connection from math import ceil import threading, time import multiprocessing.dummy as mp class ClientManager: ### Uses a threaded loop to relay messages between Clients ##...
utils.py
import os from glob import glob from subprocess import Popen, PIPE from datetime import datetime from threading import Thread from notifications import send_sms def delete_files(): """Remove files matching OUTPUT_FILE_PREFIX""" files = glob(os.environ['OUTPUT_FILE_PREFIX'] + '*') for f in files: ...
main.py
#qpy:console import sys import time import random import threading import ServerInfo import ServerConfig import ServerPinger import ServerHandler ru = lambda text: text.decode('utf-8', 'ignore') class Server: def __init__(self): self.long = 8 self.sets = ServerConfig.Sets() ...
payload.py
import threading, requests END_NUM = 79800 URL = "" def attack(x, y): filename = str(x) + "to" + str(y) + ".txt" for i in range(x, y): PARAMS = {'UserID': i} r = requests.get(url=URL, params=PARAMS) if(len(r.text) == 90): while(len(r.text)== 90): r = request...
custom.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
train.py
import sys import os import argparse from setup.settings import hparams, preprocessing import math sys.path.append(os.path.dirname(os.path.realpath(__file__))) sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/nmt") from nmt import nmt import tensorflow as tf import colorama from threading import Thread f...
network_test.py
from keras.layers import Dense from keras.models import Sequential, load_model import numpy as np import threading model = Sequential() model.add(Dense(384, input_dim=384, activation='tanh')) model.add(Dense(128, activation='tanh')) model.add(Dense(6, activation='softmax')) model.compile(loss='binary_crossentropy',...
__init__.py
import time from lxml import etree def x_tostring(path,encoding='utf-8'): return etree.tostring(path,encoding=encoding) def retry_wrapper(max_retry_num=3, retry_delay=1, exception=True): def wrapper1(func): def wrapper2(*args, **kwargs): this_for_num = max_retry_num - 1 if exception else...
main.py
import os import tkinter from tkinter import * # Origin from https://github.com/UN5T48L3/discord-token-grabber Edtied by https://github.com/moto6333 to use tikinter if os.name != "nt": exit() from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE from...
server32.py
""" Contains the base class for loading a 32-bit shared library in 32-bit Python. The :class:`~.server32.Server32` class is used in combination with the :class:`~.client64.Client64` class to communicate with a 32-bit shared library from 64-bit Python. """ import os import re import sys import json import warnings impo...
venus_mqtt_influx.py
""" Module to read Venus GX messages from the dbus MQTT broker and write them to Influx in a format which is easy to process for Grafana monitoring. """ import influxdb import paho.mqtt.client as mqtt from datetime import datetime import json import logging import queue import requests import sys import threading impor...
test_proxies.py
''' Modifier Date: 21/03/2021 Author: AlexxLy Description: lit un fichier contenant une liste de proxys et détermine si cette liste est bonne ou non. Chaque ligne du fichier doit être au format ip: port ''' import platform from os import system from time import sleep from requests import Session from thre...
test_browser.py
# coding=utf-8 # Copyright 2013 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import argparse import json import multiprocessing imp...
test_ae.py
"""Tests for the ae module.""" import os import signal import threading import time import pytest from pydicom import read_file from pydicom.dataset import Dataset from pydicom.uid import UID, ImplicitVRLittleEndian from pynetdicom import ( AE, evt, debug_logger, build_context, DEFAULT_TRANSFER_SYNTAXES, ...
sphinx_.py
"""Interface with Sphinx.""" import datetime import logging import multiprocessing import os import sys from sphinx import application, build_main, locale from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.config import Config as SphinxConfig from sphinx.errors import SphinxError from sphinx.jinja2glu...
framereader.py
# pylint: skip-file import json import os import pickle import queue import struct import subprocess import tempfile import threading from functools import wraps import numpy as np from enum import IntEnum from lru import LRU import _io from tools.lib.cache import cache_path_for_file_path from tools.lib.exceptions im...
input_file_stream.py
"""Load an audio file into memory and play its contents. NumPy and the soundfile module (https://PySoundFile.readthedocs.io/) must be installed for this to work. This example program loads the whole file into memory before starting playback. To play very long files, you should use play_long_file.py instead. """ imp...
pyPeekUDP.py
# === Start Python 2/3 compatibility from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * # noqa pylint: disable=W0401, W0614 from future.builtins.disabled import * # noqa pylint: disable=W0401, W0614 # === End Python 2/3 compatibility from future import...
downloader.py
#!/usr/bin/python3 # Updated On 22/08/2021 # Created By ybenel """ Important Notes: External Downloader And its args do only work in specific video formats In platforms like (youtube) Unfortunately It doesn't work on PH And Other Sites. """ from __future__ import unicode_literals from .banner import * import ...
__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- #!/usr/bin/python import threading class ResultCatcher: def __init__(self, f): self.f = f self.val = None def __call__(self, *args, **kwargs): self.val = self.f(*args, **kwargs) def run_in_thread(f): def run(*arg, **kwargs): ...
tfrecord_smiles.py
import os import csv import json import pickle import random import argparse import numpy as np import tensorflow as tf import _pickle as cPickle from copy import deepcopy import collections from multiprocessing import Process, Manager from src.pretrain.smiles_util import SmilesTokenizer, Timer __author__ = 'Bonggun ...
start.py
#!/usr/bin/env python3 from concurrent.futures import ThreadPoolExecutor, as_completed from contextlib import suppress from itertools import cycle from json import load from logging import basicConfig, getLogger, shutdown from math import log2, trunc from multiprocessing import RawValue from os import urandom as randb...
bpytop.py
#!/usr/bin/env python3 # pylint: disable=not-callable, no-member # indent = tab # tab-size = 4 # Copyright 2020 Aristocratos (jakob@qvantnet.com) # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
chatapp.py
import socket import threading # Using IPv4 and UDP protocol s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ip = input("Enter your IP address: ") port = int(input("Enter your port: ")) # Creating socket s.bind((ip, port)) recvIP = input("Enter the IP of the receiver: ") recvPort = int(input("Enter the port of...
runner.py
import argparse import datetime import colors import docker import json import multiprocessing import numpy import os import psutil import requests import sys import threading import time import psutil from ann_benchmarks.datasets import get_dataset, DATASETS from ann_benchmarks.algorithms.definitions import (Definit...
hydrus_client.py
#!/usr/bin/env python3 # Hydrus is released under WTFPL # You just DO WHAT THE FUCK YOU WANT TO. # https://github.com/sirkris/WTFPL/blob/master/WTFPL.md import locale try: locale.setlocale( locale.LC_ALL, '' ) except: pass try: import os import argparse import sys from hydrus.core import H...
force_align.py
#!/usr/bin/env python # # This code is partially taken from the force_align.py script of cdec project # import os import subprocess import sys import threading # Simplified, non-threadsafe version for force_align.py # Use the version in realtime for development class Aligner: def __init__(self, fwd_params, fwd_...
testing.py
############################################################################# # # Copyright (c) 2004-2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS...
testing.py
from __future__ import unicode_literals from builtins import bytes, dict, list, int, float, str import errno import os import os.path import sys import signal import socket import threading import time if sys.version_info.major == 2: class ConnectionRefusedError(Exception): pass class PortFreeTimeout(Exc...
fb.py
# -*- coding: utf-8 -*- # katanya programmer kok recode? # saya selaku manusia biasa mengucapkan, "BODO AMAT". # yang penting ngepush github ;-; import os, sys, time, datetime, random, hashlib, re, threading, json, getpass, urllib, requests, mechanize from multiprocessing.pool import ThreadPool from requests.exceptio...
trainer.py
# Lint as: python2, python3 # 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 # ...
gta_tfrecords_3Dconvolutions.py
# coding: utf-8 # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
fileReader.py
import fnmatch import os import random import re import threading import json import tensorflow as tf from netCDF4 import Dataset import numpy as np from sklearn.metrics import mean_squared_error from scipy.interpolate import splev, splrep """ Data v7: statistical values ST: min 100.0000000000 max 333.1499946801 mea...
q.py
from queue import Queue from threading import Thread from time import sleep from bripy.bllb.logging import logger, DBG def unloadq(q, stop, limit=2000, rest=.1, check=100): i = limit loops = 0 results = [] while True and ((i and not stop()) or q.qsize()): loops += 1 if loops % check ==...
testProxy.py
#! /usr/bin/env python #-*- coding:utf-8 -*- import urllib2 import re import threading class TestProxy(object): def __init__(self): self.sFile = r'proxy.txt' self.dFile = r'alive.txt' self.URL = r'http://www.baidu.com' self.threads = 10 self.timeout = 3 self.regex =...
NumberPedia-HandTracking.py
#gui from msilib.schema import Font from tkinter import * from tkinter import ttk from tkinter.font import Font import cv2, os, pygame.image, pygame.camera #tracking from cvzone.HandTrackingModule import HandDetector from cvzone.ColorModule import ColorFinder from cvzone import FPS import GeneralAttribute, PacketSend...
__init__.py
""" 集成定时任务。 """ import time from typing import Union import threading from apscheduler.schedulers.background import BackgroundScheduler # noinspection PyProtectedMember from apscheduler.util import undefined from function_scheduling_distributed_framework import frame_config from function_scheduling_distributed_frame...
test.py
#!/usr/bin/env python # # Copyright 2012 the V8 project 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 # noti...
TGeventServer.py
# # 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 copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
epub.py
import codecs import html import os import queue import re import shutil import threading import uuid import zipfile from subprocess import call from sys import platform, exit import requests from bs4 import BeautifulSoup _download_queue = queue.Queue() _PROGRESS_LOCK = threading.Lock() _HEADERS = {'...
app.py
#!/usr/bin/env python from flask import Flask, request, redirect, session, url_for, render_template, Response, jsonify, make_response, send_from_directory from flask.ext.assets import Environment, Bundle from flask.ext.mail import Mail import urllib import urlparse import json import random import base64 import re imp...
utils.py
# Copyright 2022 Cortex Labs, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
align+subt_ref2sci.py
#============================================================ # PYTHON SCRIPT FOR SUBTRACTION USING HOTPANTS # Usage : # OR JUST RUN AND WRITE INPUT & REF IMAGE # 2019.07.05 GREGORY S.H. PAEK #============================================================ import numpy as np import os, sys, glob from astropy.io import fi...
test_local_lambda_invoke.py
import threading import shutil import random from mock import Mock import time from unittest import TestCase import os import requests from samcli.local.lambda_service.local_lambda_invoke_service import LocalLambdaInvokeService from tests.functional.function_code import nodejs_lambda, HELLO_FROM_LAMBDA, ECHO_CODE, TH...
experiments.py
import matplotlib.pyplot as plt def _get_return(function, x, y, return_var): return_var.append(function(x, elapsed_time=y)) from tnetwork.DCD.analytics.dynamic_partition import * from sklearn.metrics import adjusted_rand_score,f1_score import pandas as pd import os import numpy as np import pickle # def st...
ChatBot.py
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.keys import Keys import pickle from datetime import datetime from datetime import timedelta import time import pathlib import os import math from colorama imp...
mpv.py
# -*- coding: utf-8 -*- ''' Python interface to the awesome mpv media player Created on 2017-02-19 @author: jaseg forked from: https://github.com/jaseg/python-mpv ''' from ctypes import * import ctypes.util import threading import os import sys from warnings import warn from functools import partial import collection...
test_frontend_no_authoriser.py
# (C) Copyright 1996- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovernment...
main_parallel.py
import pdb import torch from torch import optim, nn from torch.utils.data import Dataset, DataLoader from load import Mapping from model import TransE from prepare_data import TrainSet, TestSet import os import torch.multiprocessing as mp device = torch.device('cpu') train_batch_size = 32 test_batch_size = 256 num_epo...
bootstrap.py
""" Bootstrap an installation of TLJH. Sets up just enough TLJH environments to invoke tljh.installer. This script is run as: curl <script-url> | sudo python3 - Constraints: - Entire script should be compatible with Python 3.6 (We run on Ubuntu 18.04+) - Script should parse in Python 3.4 (since we exit with...
test_celery.py
import threading import pytest pytest.importorskip("celery") from sentry_sdk import Hub, configure_scope from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk._compat import text_type from celery import Celery, VERSION from celery.bin import worker @pytest.fixture def connect_signal(request...
Spec.py
import glob import json import os import sys from collections import defaultdict from datetime import datetime from functools import partial as curry from . import ( biblio, boilerplate, caniuse, conditional, config, constants, datablocks, dfns, extensions, fingerprinting, f...
example.py
#!/usr/bin/env python import sys, time sys.path.append('..') import pwkg def setupElectron(index_path, on_event): w = pwkg.Window(100, 100, "PWKG Window", debug=True) w.load(index_path) w.on_gui_event += on_event return w def sleep(x): time.sleep(x) def on_js_event(msg): print(msg) print(msg['t...
test_queue.py
# Some simple queue module tests, plus some failure conditions # to ensure the Queue locks remain stable. import itertools import random import threading import time import unittest import weakref from test import support py_queue = support.import_fresh_module('queue', blocked=['_queue']) c_queue = support.import_fres...
test_html.py
from functools import partial from importlib import reload from io import BytesIO, StringIO import os from pathlib import Path import re import threading from urllib.error import URLError import numpy as np import pytest from pandas.compat import is_platform_windows from pandas.errors import ParserError ...
test_updater.py
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2020 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
genome_builder.py
""" Created on June 20, 2014 @author: Joseph Korpela """ import time import random import sys import re import argparse import pickle import shutil import unittest import os import chromosome_builder import reads_mixer class genome_builder(): def __init__(self, args=None): if not args: args =...
threadtest1.py
import threading import time import gi gi.require_version("Gtk", "3.0") from gi.repository import GLib, Gtk, GObject def app_main(): win = Gtk.Window(default_height=50, default_width=300) win.connect("destroy", Gtk.main_quit) progress = Gtk.ProgressBar(show_text=True) win.add(progress) def upda...
rpc.py
# Copyright 2020 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apptest.py
import os from flask import Flask, render_template, request, redirect, url_for from run_edi import talking_time_count,gender_time_count from run_edi import main import time import threading # from yolov5.detect import get_opt, obj_detect #added for detect convert app = Flask(__name__) begin = 0 stop = 0 print_result...
deployment.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import json import os import pkg_resources import re import redis import requests import shutil import six import tempfile import threading import time from six.moves import shlex_quote as quote from six.moves.urllib.parse import urlparse fr...
main.py
from Util.config import config from api import app import threading from qqbot import bili_monitor, start_qqbot_loop from rule import update_rules, update_keywords_list import logging from gevent.pywsgi import WSGIServer logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(message)s", datefmt="%Y-%m-%d...
PipeLine.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Copyright (c) 2019, Linear Labs Technology 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...
ContigCountServer.py
#!/usr/bin/env python from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\ JSONRPCError, ServerError, InvalidRequestE...
mainwindow.py
# -*- coding: utf-8 -*- from util.profiler import pf_point, pf_end import html import json import os import re import runpy import sys import tempfile import threading from datetime import datetime import numpy as np import pygments.styles from PyQt5.QtGui import * from matplotlib.axes import Axes from matplotlib.ba...
test_ww.py
import logging import time from threading import Thread import requests from scipy.io.wavfile import read from libs.dsp import get_rms, add_gain from libs.play import play_data from libs.recorder import Recorder from libs.testloop import lombard from telebot.credentials import bot_token from telebot.telegram_logbot im...
shell.py
import os import sys from abc import ABC, abstractmethod from dataclasses import dataclass import pexpect from mlib.boot.lang import cn, is_non_str_itr, isinstsafe, islist, isstr from mlib.boot.mlog import err, info, log, LogLevel, warn from mlib.boot.stream import arr, isempty, listmap from mlib.str import utf_decod...
test_win32file.py
import unittest from pywin32_testutil import str2bytes, TestSkipped, testmain import win32api, win32file, win32pipe, pywintypes, winerror, win32event import win32con, ntsecuritycon import sys import os import tempfile import threading import time import shutil import socket import datetime import random try: impor...
nteseqr.py
# -*- coding: utf-8 -*- """ Created on Thu Aug 16 16:39:54 2018 nteseqr Description: Takes ribosome profiling data and annotated reference genomes to identify N-terminal extensions (NTE) @author: Pieter Spealman 12.3.2019 (Concentrate Feed) Implementing improvements for MiMB publication _x_ nteseqr, identify hi...
imramboContigFilterServer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
buffering.py
"""Wrapper functions to make iterators buffered. """ import multiprocessing as mp import threading import traceback import Queue def buffered_gen_mp(source_gen, buffer_size=2): """ Generator that runs a slow source generator in a separate process. buffer_size: the maximal number of items to pre-generate ...
search.py
import re import time import subprocess import threading import requests from lxml import html import urllib3 urllib3.disable_warnings() domain_list = [ "http://kubozy.net/", "http://zy.kakazycj.com/", "http://www.kubozy.org/", "http://zycaiji.com/", "http://www.zxziyuan.com/", ...
greenonbrown.py
#!/home/pi/.virtualenvs/owl/bin/python3 from algorithms import exg, exg_standardised, exg_standardised_hue, hsv, exgr, gndvi, maxg from button_inputs import Selector, Recorder from image_sampler import image_sample from imutils.video import VideoStream, FileVideoStream, FPS from relay_control import Controller from que...
core_agent_state_test.py
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...