source
stringlengths
3
86
python
stringlengths
75
1.04M
mainwindow.py
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Spyder, the Scientific Python Development Environment ===================================================== Developped and maintained by the Spyder Pro...
test_flight.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...
ddpg_train_2.py
""" Copyright (c) College of Mechatronics and Control Engineering, Shenzhen University. All rights reserved. Description : this script would teach the vehicle how to keep lane Author:Team Li """ import sys, os, glob, threading, math, time import tensorflow as tf import cv2 import keep_lane.basic_net.ddpg_utils as d...
test_queue.py
# Some simple queue module tests, plus some failure conditions # to ensure the Queue locks remain stable. import queue import time import unittest from test import support threading = support.import_module('threading') QUEUE_SIZE = 5 def qfull(q): return q.maxsize > 0 and q.qsize() == q.maxsize # A thread to run...
plugin.py
import sys import re import time try: import completion.jsonrpc as jsonrpc except: import jsonrpc import sublime import sublime_plugin import subprocess import threading import os import os.path import signal def log(a): settings = sublime.load_settings("completion.sublime-settings") if settings.get("d...
scraper_oo.py
#!/usr/bin/env python3 from bs4 import BeautifulSoup import os import subprocess import sys import json import multiprocessing as mp import datetime as dt import time import traceback import signal from chat_downloader import ChatDownloader from chat_downloader.sites import YouTubeChatDownloader from utils import extr...
client_test.py
#!/usr/bin/env python import sys import time import rospy import threading from pcu_common_utils.AcquireRessource import AcquireRessource from pcu_sl_interface.srv import SetState from pcu_sl_interface.msg import ControllerState, JointsVector class Node: def __init__(self): self.sema = threadi...
deployer.py
from __future__ import absolute_import import subprocess import inspect import threading from time import sleep from fortrace.application.application import ApplicationVmmSide from fortrace.application.application import ApplicationVmmSideCommands from fortrace.application.application import ApplicationGuestSide from ...
output.py
import datetime import glob import logging import math import multiprocessing as mp import queue import signal import subprocess as sp import threading from multiprocessing import shared_memory from wsgiref.simple_server import make_server import cv2 import numpy as np from setproctitle import setproctitle from ws4py....
server_launcher.py
#!/usr/bin/python import os import shutil import time from conans import SERVER_CAPABILITIES from conans.paths import SimplePaths from conans.server.conf import get_server_store from conans.server.crypto.jwt.jwt_credentials_manager import JWTCredentialsManager from conans.server.crypto.jwt.jwt_updown_manager import JW...
test_logging.py
# Copyright 2001-2017 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
__init__.py
import os import sys def _get_run_args(print_args: bool = True): from jina.helper import get_rich_console from jina.parsers import get_main_parser console = get_rich_console() silent_print = {'help', 'hub'} parser = get_main_parser() if len(sys.argv) > 1: from argparse import _Store...
log_server.py
import socket import sys import math import lib.ProtocolUtils as protocolUtils import threading as thread def message_handler(conn, addr): data = protocolUtils.MessageHandler(conn.recv(1024)).message_loads() print("New operation in queue ", data[0], " ", data[2]) try: val1 = float(data[0]) ...
HiwinRA605_socket_ros_test_20190626100830.py
#!/usr/bin/env python3 # license removed for brevity #接收策略端命令 用Socket傳輸至控制端電腦 import socket ##多執行序 import threading import time ## import sys import os import numpy as np import rospy import matplotlib as plot from std_msgs.msg import String from ROS_Socket.srv import * from ROS_Socket.msg import * import HiwinRA605_s...
kb_cobrapyServer.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...
grpc_asyncio.py
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import asyncio import functools import inspect import threading from concurrent import futures from grpc import _server def _loop_mgr(loop: asyncio.AbstractEventLoop): asyncio.set_event_loop(loop) if not lo...
bot.py
# coding=utf-8 # Copyright 2008, Sean B. Palmer, inamidst.com # Copyright © 2012, Elad Alfassa <elad@fedoraproject.org> # Copyright 2012-2015, Elsie Powell, http://embolalia.com # Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com> # # Licensed under the Eiffel Forum License 2. from __future__ import uni...
miner.py
import gettext import time import multiprocessing from Tkinter import Tk from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor, threads import sys from miner_ui import cumulative_logger from miner_ui.main_window_app import MainWindowApp from handlers.senz_handler import * from c...
Simple PSv3.py
from win10toast import ToastNotifier import PySimpleGUIQt as sg import os from datetime import datetime import threading import pyautogui as p # ------------------------------MS imports for admin privileges start--------------------------------------------------- import ctypes import enum import sys # -----------------...
run.py
# 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 # distrib...
views.py
import json import logging import traceback from datetime import datetime from pathlib import Path from threading import Thread from time import sleep from typing import get_type_hints from uuid import uuid4 import birdseye.server import requests from birdseye import eye from django.conf import settings from django.co...
asa_server.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time import socket import logging import threading from io import BytesIO from xml.etree import ElementTree from http.server import HTTPServer from socketserver import ThreadingMixIn from http.server import SimpleHTTPRequestHandler import ike_server import...
create_and_receive_packets.py
# Copyright: (c) 2021, Edwin G. W. Peters import sys import threading import time sys.path.append('../zmq_listeners') from zmq_send_tx_to_sdr import send_to_sdr from zmq_recv_sdr_UHF_data import Rx_uhf_from_sdr from zmq_recv_sdr_SBAND_data import Rx_sband_from_sdr NUM_PACKETS = 10 TIME_BETWEEN_PACKETS_MS = 1000 # m...
cps_back.py
"""Intermediate process for communicating with the remote Python via SSH""" import ast import os.path import sys import threading from logging import getLogger from threading import Thread import thonny from thonny.backend import ( BaseBackend, RemoteProcess, SshMixin, ensure_posix_directory, inte...
FD_BS_m_circles.py
import cv2 from tkinter import Tk from tkinter.filedialog import askopenfilename import numpy as np import imutils import math import threading def main(): cap = cv2.VideoCapture(vid_path) status1, previous_frame = cap.read() total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) ...
server.py
import rclpy from rclpy.node import Node import threading from threading import Lock import uuid import camera.overlay_lib as overlay_lib # import board from std_msgs.msg import String from std_msgs.msg import Int32MultiArray, Int16 from sensor_msgs.msg import Joy, Imu, FluidPressure, Temperature import argparse i...
device_io.py
#!/usr/bin/env python3 import sys import os import threading import atexit import time from datetime import datetime import itertools from logging import debug,info,warn,error #Input/Output server library from caproto.server import pvproperty, PVGroup, ioc_arg_parser, run from ubcs_auxiliary.threading import new_threa...
HSRPFlooder.py
#!/usr/bin/python # # Proof-of-concept HSRP Active router Flooder triggering outbound gateway Denial of Service. Not fully tested, not working stabily at the moment. # # Python requirements: # - scapy # # Mariusz Banach / mgeeky, '18, <mb@binary-offensive.com> # import sys import struct import string import random ...
util_run_multi.py
from time import sleep, time from decorator import FunctionMaker from logging.handlers import QueueHandler, QueueListener from typing import List, Tuple, Dict, Any from machin.parallel.distributed import World, get_world as gw from machin.parallel.process import Process, ProcessException import sys import dill import p...
app.py
import threading from random import randint, uniform from playsound import playsound from turtle import Screen, Turtle, screensize from utils.alerts import show_alert from utils.score import update_scoreboard from intro import start_intro screen = Screen() screen.bgcolor('#000000') screen.bgpic('./assets/background.gi...
run_package.py
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Contains a helper function for deploying and executing a packaged executable on a Target.""" from __future__ import print_function import common import ...
__init__.py
""" Create ssh executor system """ import base64 import binascii import copy import datetime import getpass import hashlib import logging import multiprocessing import os import queue import re import subprocess import sys import tarfile import tempfile import time import uuid import salt.client.ssh.shell import salt...
test_mp.py
from multiprocessing import Process, cpu_count from multiprocessing import JoinableQueue as Queue from ZermeloSim.ZermeloSim import worker if __name__ == '__main__': n = 100 p = cpu_count()-1 jobs = Queue() results = Queue() pool = [Process(target=worker, args=(jobs, results)).start() for _ in ran...
que.py
#!/usr/bin/python3 # Name: que.py # Version: R3.1 # Author: jvalentinpastrana at gmail # Date: January 2020 # Function: Includes threading with queue # import requests from threading import Thread import queue DIRNAME = "output/" TIMEOUT = 5 concurrent = 4 # Threading functions def doWork(): while True: u...
file_detector.py
from itertools import count from threading import Thread from queue import Queue import json import cv2 import numpy as np import torch import torch.multiprocessing as mp from alphapose.utils.presets import SimpleTransform class FileDetectionLoader(): def __init__(self, input_source, cfg, opt, queueSize=128): ...
connector.py
from __future__ import absolute_import, division, print_function """ Author : Lyubimov, A.Y. Created : 03/31/2020 Last Changed: 05/15/2020 Description : Streaming stills processor for live data analysis """ import os import time import zmq from threading import Thread from interceptor import packagefinder,...
trainer.py
# Copyright (c) 2020 Sarthak Mittal # # 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, dist...
session.py
# Copyright 2015 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...
test_threading.py
""" Tests for the threading module. """ import test.support from test.support import (verbose, import_module, cpython_only, requires_type_collecting) from test.support.script_helper import assert_python_ok, assert_python_failure import random import sys _thread = import_module('_thread') thr...
main.py
from __future__ import print_function import argparse import os import torch import torch.multiprocessing as mp import my_optim from envs import create_atari_env from model import ActorCritic from test import test from train import train # Based on # https://github.com/pytorch/examples/tree/master/mnist_hogwild # T...
PythonExecutor.py
#!/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 copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
installwizard.py
from functools import partial import threading import os from kivy.app import App from kivy.clock import Clock from kivy.lang import Builder from kivy.properties import ObjectProperty, StringProperty, OptionProperty from kivy.core.window import Window from kivy.uix.button import Button from kivy.uix.togglebutton impo...
ssh_create.py
import os import re import time import json import requests import threading from .app import * from bs4 import BeautifulSoup try: from queue import Queue except ImportError: from Queue import Queue class ssh_create(object): def __init__(self, verbose=False): super(ssh_create,...
neatrader.py
import neat import pandas as pd from glob import glob import neatrader.visualize as vis from neatrader.model import Portfolio, Security from neatrader.trading import Simulator from neatrader.daterange import DateRangeFactory from neatrader.utils import from_small_date from neatrader.reporter import TradeReporter from p...
vnc-hopper.py
#!/usr/bin/env python3 import subprocess import random import re import sys import os from threading import Thread # settings # jumpserver aliases: servers = [ 'koios1-limba', 'koios2-limba', ] start_vnc_timeout = 10 # classes: class VncClientRunner(): def run_vnc_client(self, vnc_server_host, displa...
serialization.py
# Copyright 2020 Huawei Technologies Co., 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 applicable law or agreed to...
Preprocess_NCS.py
# %% [markdown] # # Imports # %% import os import shutil import time import datetime import json import jsonlines import pickle import sys import gc import numpy as np import pandas as pd import random import math # %% import multiprocessing NUM_CORES = 6 # %% ERROR_STRING = "__ERROR__" # %% [markdown] # # Outpu...
run.py
# Copyright (c) 2020 Institution of Parallel and Distributed System, Shanghai Jiao Tong University # ServerlessBench is licensed under the Mulan PSL v1. # You can use this software according to the terms and conditions of the Mulan PSL v1. # You may obtain a copy of Mulan PSL v1 at: # http://license.coscl.org.cn/M...
__init__.py
# -*- coding: utf-8 -*- ''' Set up the Salt integration test suite ''' # Import Python libs from __future__ import absolute_import, print_function import os import re import sys import copy import time import stat import errno import signal import shutil import pprint import atexit import socket import logging import...
SMTPListener.py
import logging import sys import os import threading import socketserver import ssl import socket from . import * class SMTPListener(object): def taste(self, data, dport): # Once the TCP connection has been established, the server initiates # the conversation with '220' mes...
13_exercise_26.py
# -*- coding: utf-8 -*- import threading # 创建全局ThreadLocal对象: local_school = threading.local() def process_student(): # 获取当前线程关联的student: std = local_school.student print('Hello, %s (in %s)' % (std, threading.current_thread().name)) def process_thread(name): # 绑定ThreadLocal的student: local_schoo...
PT_test.py
import cmd, sys, time import datetime from BDM import * from threading import Thread, Event, RLock, Condition # https://medium.com/greedygame-engineering/an-elegant-way-to-run-periodic-tasks-in-python-61b7c477b679 class PT(Thread): def __init__(self, dt, hFunction, lock): Thread.__init__(self) sel...
qscores.py
# Copyright (c) 2020 Greg Pintilie - gregp@slac.stanford.edu # 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, mo...
custom.py
# pylint: disable=too-many-lines # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------...
bandwidth-report.py
import time import threading from datetime import datetime import psutil import json # Feel free to update these values to suit your needs monitor_interface = 'eth0' monitor_duration_seconds = 10 class Stats(object): def __init__(self): # Bandwidth report file. self.bw_report_file = 'bandwidth-re...
test_distributed.py
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
test_merchant.py
import pytest import grpc import threading from stub.test_pb2 import EchoRequest, Empty from merchant_stub.data_pb2 import UpdateSupplierReq @pytest.fixture(scope='module') def grpc_add_to_server(): from merchant_stub.merchant_service_pb2_grpc import add_MerchantServiceServicer_to_server return add_MerchantS...
minion.py
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import absolute_import, print_function import os import re import sys import copy import time import types import signal import fnmatch import logging import threading import traceback import multiprocessing from random imp...
views.py
from flask import request from flask_cors import CORS, cross_origin from datetime import datetime, timezone from functools import wraps import threading, json, time from googletrans import Translator from AuthModule.azuread import authProvider from SearchModule import app from SearchModule.TextSearchModule import load...
control.py
from queue import PriorityQueue from threading import Thread, Event from peoples_advisor.event.event import ExitEvent, BaseEvent from peoples_advisor.price.price import pricing_gen_factory #from peoples_advisor.portfolio.portfolio import Portfolio from peoples_advisor.signal.signal import SignalStrategy from peoples_a...
test_program_for_EmailAndSMS_ReubenPython2and3Class_Generic.py
''' Reuben Brewer, Ph.D. reuben.brewer@gmail.com www.reubotics.com Apache 2 License Software Revision C, 09/05/2021 Verified working on: Python 2.7 and 3 for Windows 8.1 64-bit and Raspberry Pi Buster (no Mac testing yet). ''' __author__ = 'reuben.brewer' from EmailAndSMS_ReubenPython2and3Class import ...
Discordinvite.py
import requests, os, colorama, random, string, threading, json from os import system from colorama import Fore, Style colorama.init() def logo(): msg = Fore.LIGHTBLUE_EX +""" .___ .__ __ __________ | | _______ _|__|/ |_ ____ \____ / | |/ \ \/ / \ __\/ __ \ / ...
file_stream.py
import base64 import binascii import collections import logging import threading import requests import time import wandb import itertools from six.moves import queue from wandb import util from wandb import env MAX_LINE_SIZE = 4*1024*1024 - 100*1024 # imposed by back end logger = logging.getLogger(__name__) Chunk ...
tests.py
import os import shutil import sys import tempfile import threading import time import unittest from datetime import datetime, timedelta from io import StringIO from pathlib import Path from urllib.request import urlopen from django.core.cache import cache from django.core.exceptions import SuspiciousFileOperation fro...
http1_tests.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...
duckdb.py
import json import datetime, time import itertools import duckdb import decimal import os import multiprocessing from multiprocessing import Queue import util import queue from queue import Empty import threading from threading import Thread import logging logger = logging.getLogger("ssb") class SSBDriver: def ini...
manager.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import vim import os import sys import json import time import operator import itertools import threading import multiprocessing from functools import partial from functools import wraps from .instance import LfInstance from .cli import LfCli from .utils import * from .fuz...
vid2img_sthv2.py
# -*- coding: utf-8 -*- # @Author: KunchangLi # @Date: 2020-02-26 13:10:59 # @LastEditor: KunchangLi # @LastEditTime: 2020-02-26 13:11:00 # Code for "TSM: Temporal Shift Module for Efficient Video Understanding" # arXiv:1811.08383 # Ji Lin*, Chuang Gan, Song Han # {jilin, songhan}@mit.edu, ganchuang@csail.mit.edu ...
flow.py
from typing import List from logging import Logger from multiprocessing import Process from pipert2.core.base.routine import Routine from pipert2.core.handlers import EventHandler from pipert2.core.managers.event_board import EventBoard from pipert2.utils.method_data import Method from pipert2.utils.annotations import ...
main.py
#!/usr/bin/python3 # Copyright 2014 ETH Zurich # Copyright 2018 ETH Zurich, Anapaya Systems # # 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 # ...
housekeeper.py
#SPDX-License-Identifier: MIT """ Keeps data up to date """ import coloredlogs from copy import deepcopy import logging, os, time, requests import logging.config from multiprocessing import Process, get_start_method from sqlalchemy.ext.automap import automap_base import sqlalchemy as s import pandas as pd from sqlalche...
WindowManagement.py
import numpy as np import colorama from time import sleep from .Components import EmptyPage import signal from ..utils.colors import color_map, color_map_vectorized, cursor_goto, clear_screen from ..utils.genComponentID import calculate_least_value_nin_array from ..utils.inputHandler import getchar from time import tim...
build_electrs.py
#!/usr/bin/env python3 import argparse import logging import os import sys import shutil PROJECT_NAME = "ElectrsCash" GIT_REPO = "https://github.com/BitcoinUnlimited/{}.git".format(PROJECT_NAME) # When released put a tag here 'v2.0.0' # When in development, put 'master' here. GIT_BRANCH = "v3.0.0" # When released put a...
main.py
from threading import Thread import datetime import speedtest import urllib.request import time import sqlite3 import re import dropbox from dropbox.files import WriteMode from dropbox.exceptions import ApiError # backing up the database to dropbox def backup(): localfile = './speedloggerdb.db' destination = ...
network_scan.py
#!/usr/bin/env python ##############################################Network Scanner############################################ ##############################################Author- Jagmohan Singh(B11062)############################################ ####################################################- Rishabh Sahu(B110...
alternative.py
import threading as th th_even = th.Event() th_odd = th.Event() def even_foo(): global num global limit while num <= limit: th_even.wait() # true print('偶数:' + str(num)) num += 1 th_odd.set() # true th_even.clear() # false def odd_foo(): global num global ...
queuetest-gui-class.py
"Recoding with classes and bound methods" # GUI that displays data produced and queued by worker threads (class-based) import threading, queue, time from tkinter.scrolledtext import ScrolledText class ThreadGui(ScrolledText): threadsPerClick = 4 def __init__(self, parent=None): ScrolledText.__init__...
pexpect.py
import os import subprocess import select import time import threading import Queue def enqueue_output(out, queue): c = out.read(1) while 0 < len(c): queue.put(c) c = out.read(1) class pexpect: def __init__(self): commandLine = ["java", "-cp", ...
_v5_proc_playvoice.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # COPYRIGHT (C) 2014-2020 Mitsuo KONDOU. # This software is released under the MIT License. # https://github.com/konsan1101 # Thank you for keeping the rules. import sys import os import time import datetime import codecs import glob import queue import threading impor...
application.py
import json import logging import multiprocessing import os import socket import sys import bokeh import distributed.bokeh from ..utils import ignoring dirname = os.path.dirname(distributed.__file__) paths = [os.path.join(dirname, 'bokeh', name) for name in ['status', 'tasks', 'workers']] binname = 'bokeh....
s3op.py
from __future__ import print_function import json import time import math import sys import os import traceback from hashlib import sha1 from tempfile import NamedTemporaryFile from multiprocessing import Process, Queue from itertools import starmap, chain, islice from boto3.s3.transfer import TransferConfig try: ...
async.py
""" sentry.client.async ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from queue import Queue from sentry.client.base import SentryClient from threading import Thread, Lock import atexit from sentry.client.models import get_...
buzzer.py
# 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...
server.py
# A dead-simple keyserver implementation in python. from http.server import BaseHTTPRequestHandler, HTTPServer from typing import * from Crypto.Cipher import AES from Crypto.Util import Counter from enum import Enum import secrets import operator import urllib.parse import threading import random import shutil import ...
getsniffer.py
from scapy.all import * import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) import re from base64 import b64decode from threading import Thread from time import sleep from random import randint import time import utils def packet_callback(packet): global BUFFER ...
servers.py
import ssl import socket import threading try: import socketserver except ImportError: import SocketServer as socketserver try: from queue import Queue except ImportError: from Queue import Queue socketserver.TCPServer.allow_reuse_address = True TIME_OUT = 30 POOL_SIZE = 50 class ThreadPoolMixIn(so...
manager.py
import logging from multiprocessing import Value, Process, Manager import time import pantilthat as pth import signal import sys import numpy as np from rpi_deep_pantilt.detect.camera import PiCameraStream from rpi_deep_pantilt.detect.ssd_mobilenet_v3_coco import SSDMobileNet_V3_Small_Coco_PostProcessed, SSDMobileNet...
vez-attack.py
import time as v import socket import threading print "\n"*1000 v.sleep(2) print """ \033[1;36;50m __ __ _____ _____ _ _____ _____ _ ____ _ __ \ \ / / | ____| |__ / / \ |_ _| |_ _| / \ / ___| | |/ / \ \ / / | _| / / / _ ...
main.py
import sublime import sublime_plugin import webbrowser import urllib import re import os import sys import shutil import zipfile import json import pprint import time import xml import urllib.request from . import requests from . import processor from . import context from . import util from .salesforce.lib import xm...
EmotivDeviceReader.py
# encoding: utf-8 ''' Created on Dec 18, 2018 @author: Yongrui Huang ''' import time from array import * from ctypes import * from sys import exit from multiprocessing import Process from multiprocessing import Queue import numpy as np class EmotivDeviceReader(object): ''' classdocs This class is used t...
http.py
import logging import base64 import random import os import ssl import time import copy import sys from pydispatch import dispatcher from flask import Flask, request, make_response # Empire imports from lib.common import helpers from lib.common import agents from lib.common import encryption from lib.common import pack...
run.py
import os import sys import time import torch import numpy as np import numpy.random as rd import multiprocessing as mp from elegantrl.env import build_env, build_eval_env from elegantrl.replay import ReplayBuffer, ReplayBufferMP from elegantrl.evaluator import Evaluator """[ElegantRL.2021.10.21](https://github.com/...
RDR.py
from maskrcnn_benchmark.config import cfg from demo.predictor import COCODemo from RDRSeg import RDRSeg from sptam.dynaseg import DynaSegt,DynaSeg from sptam.msptam import SPTAM, stereoCamera from sptam.components import Camera from sptam.components import StereoFrame from sptam.feature import ImageFeature from sptam....
api.py
# app.py from os import name import threading from flask import Flask, render_template, send_file, Response, abort, jsonify, request, url_for, redirect, logging from sqlalchemy.sql import text # Para o upload de arquivos from werkzeug.utils import secure_filename # Para a autenticação from flask_httpauth import HTTPBas...
raft_server.py
import argparse import logging import random import threading import zlib from threading import Thread from time import sleep from helper import helper from persistence import synchronized_log from rpc.messages import ClientData, ClientDataResponse from rpc.rpc_handler import RPCHandler from rpc.serializer import Raft...
Utility.py
from threading import Thread def threaded(fn): def wrapper(*args, **kwargs): thread = Thread(target=fn, args=args, kwargs=kwargs) thread.start() return thread return wrapper
websocket.py
import asyncio import json import logging import os from threading import ( Thread, ) from types import ( TracebackType, ) from typing import ( Any, Type, ) from eth_typing import ( URI, ) import websockets from web3.exceptions import ( ValidationError, ) from web3.providers.base import ( ...
__init__.py
# # Unit tests for the multiprocessing package # import unittest import queue as pyqueue import time import io import itertools import sys import os import gc import errno import signal import array import socket import random import logging import struct import operator import test.support import test.support.script_...
online_extend.py
#!/usr/bin/python """ (C) Copyright 2020-2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ import time import threading from test_utils_pool import TestPool from write_host_file import write_host_file from daos_racer_utils import DaosRacerCommand from dmg_utils import check_system_query_sta...
test_performance.py
""" Test cclash speed """ import sys import os import pytest import subprocess import threading import test_performance_openssl as tpo THISDIR = os.path.dirname(os.path.abspath(__file__)) CCLASH_BIN = os.path.join(os.path.dirname(THISDIR), "cclash", "bin", "debug") CCLASH_EXE = os.path.join(CCLASH_BIN, "cl.exe") if no...