source
stringlengths
3
86
python
stringlengths
75
1.04M
calc_cvgv_gru-cyclevae_gauss.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 Patrick Lumban Tobing (Nagoya University) # based on PyTorch implementation for WaveNet vocoder by Tomoki Hayashi (Nagoya University) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from __future__ import division import argparse from distuti...
multiprocessing_env.py
# This code is from openai baseline # https://github.com/openai/baselines/tree/master/baselines/common/vec_env import numpy as np from multiprocessing import Process, Pipe # TODO >> I should probably simplify this script to be as simple as we need # Review Grokking Deep RL code too. def worker(remote, parent_remo...
client.py
""" SDClient A base class for interacting with the sdsim simulator as server. The server will create on vehicle per client connection. The client will then interact by createing json message to send to the server. The server will reply with telemetry and other status messages in an asynchronous manner. Autho...
joint_input.py
# This module takes in raw input devices and produces the raw angles from multiprocessing import Process, Queue from realsteel.keypoints import Pose import time class JOINT_INPUT: def __init__(self, *args, **kwargs): pass class CAMERA(JOINT_INPUT): """ Sets up the camera-only pipeline """ ...
local_handler.py
import os import io import sys import json import pkgutil import logging import uuid import time import queue import multiprocessing as mp from pathlib import Path from threading import Thread from types import SimpleNamespace from contextlib import redirect_stdout, redirect_stderr from lithops.utils import version_st...
readFQ.py
from __future__ import print_function import sys import csv import screed import argparse import textwrap import os import string import time import numpy as np from ngs_plumbing import dna ## DNA to 2bit from bitstring import * ##glombe integer from itertools import islice import concurrent.futures from khmer import...
textract_app.py
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to create a Tkinter application that displays input images and Amazon Textract output. Lets you explore how the detection output relates to the input image. """ from io import BytesIO impo...
test_websocket.py
import asyncio import functools import threading import time from contextlib import contextmanager import pytest import requests from uvicorn.config import Config from uvicorn.main import ServerState from uvicorn.protocols.http.h11_impl import H11Protocol from uvicorn.protocols.websockets.wsproto_impl import WSProtoc...
test.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...
mturk_manager.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import math import os import pickle import threading import time import uuid import errno import requests...
utils.py
#!/usr/bin/env python3 ############################################################################### # Módulos Importados ############################################################################### import logging import re import time import threading import signal import functools import inspect #############...
keepAlive.py
from flask import * from threading import Thread from myLib import * app = Flask('name') marketLow = '' FRR = '' credits = [] offers = [] @app.route('/') def alive(): index = request.args.get("index") print('index',index) if not index: return "add index parameter to get your data" index = int(index) i...
scene.py
"""Examples for designing levels.""" import json import logging import os import time from copy import copy from random import randrange from threading import Thread from typing import Callable, Dict, List, Union import blessed from blessed.keyboard import Keystroke from maze_gitb.core.maze import AIR, Box, Maze from...
__init__.py
from multiprocessing import Process, Pipe from .utils import callable_module class Message(): pass class Request(Message): def __init__(self, *args, **kwargs): self.name = None self.call = False self.args = args self.kwargs = kwargs class Response(Message): def __ini...
fifo_readout.py
import logging from time import sleep, time from itertools import izip from threading import Thread, Event, Lock, Condition from collections import deque, Iterable import sys import numpy as np from basil.HL import sitcp_fifo from pybar.utils.utils import get_float_time from pybar.daq.readout_utils import ...
3.py
from multiprocessing import Process, Lock def f(l): # ... do something using "l" ... pass if __name__ == '__main__': lock = Lock() for i in range(10): Process(target=f, args=(lock,)).start()
__init__.py
import random import string import threading import time from typing import Dict, List, Callable, Tuple import requests semester_api = "http://saasta.byu.edu/noauth/classSchedule/ajax/getYeartermData.php" classes_api = "http://saasta.byu.edu/noauth/classSchedule/ajax/getClasses.php" sections_api = "http://saasta.byu....
crypto_util_test.py
"""Tests for acme.crypto_util.""" import itertools import socket import threading import time import unittest import six from six.moves import socketserver #type: ignore # pylint: disable=import-error import OpenSSL from acme import errors from acme import jose from acme import test_util class SSLSocketAndProbeS...
p3.py
from multiprocessing import Process, Pipe def pipefunction(conn): conn.send(['Python pipe send']) conn.close() if __name__ == '__main__': parent, child = Pipe() p = Process(target=pipefunction, args=(child,)) p.start() print ( 'received: ',parent.recv() ) p.join() pri...
Hiwin_RT605_ArmCommand_Socket_20190627164136.py
#!/usr/bin/env python3 # license removed for brevity import rospy import os import numpy as np from std_msgs.msg import String from ROS_Socket.srv import * from ROS_Socket.msg import * from std_msgs.msg import Int32MultiArray import math import enum pos_feedback_times = 0 mode_feedback_times = 0 msg_feedback = 1 #接收策略端...
base.py
import argparse import base64 import copy import itertools import json import multiprocessing import os import re import sys import threading import time import uuid from collections import OrderedDict from contextlib import ExitStack from typing import ( Optional, Union, Tuple, List, Set, Dict,...
collaborative.py
import http import ipaddress import logging import os import platform import re import threading import time import warnings from http.server import BaseHTTPRequestHandler from typing import Any, Callable, Dict, List, Optional, Union import requests import torch import pytorch_lightning as pl from pytorch_lightning.s...
nndownload.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Download videos and process other links from Niconico (nicovideo.jp).""" import aiohttp from aiohttp_socks import ProxyType, ProxyConnector, ChainProxyConnector from bs4 import BeautifulSoup from mutagen.mp4 import MP4, MP4StreamInfoError from requests.adapters import H...
socketserver_echo.py
import logging import sys import socketserver logging.basicConfig(level=logging.DEBUG, format='%(name)s: %(message)s', ) class EchoRequestHandler(socketserver.BaseRequestHandler): def __init__(self, request, client_address, server): self.logger = logging.getLogger...
decorators.py
import atexit import Queue import re import time import threading from django.conf import settings from django.core.cache import cache from django.http import HttpResponseForbidden, HttpResponseRedirect from django.utils.functional import wraps from djutils.cache import key_from_args class EmptyObject(object): ...
monitored_session_test.py
# pylint: disable=g-bad-file-header # Copyright 2016 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/LICENS...
exposition.py
#!/usr/bin/python from __future__ import unicode_literals import base64 from contextlib import closing import os import socket import sys import threading from wsgiref.simple_server import make_server, WSGIRequestHandler from prometheus_client import core from prometheus_client.openmetrics import exposition as openm...
testZEO.py
############################################################################## # # Copyright (c) 2001, 2002 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. # TH...
__init__.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its own dedicated window. Works on Windows, OS X and Linux and compatible with Python 2 and 3. (C) 2014-2018 Roman Sirokov and contributors Licensed under B...
threading_daemon.py
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """Daemon vs. non-daemon threads. """ #end_pymotw_header import threading import time import logging def daemon(): logging.debug('Starting') time.sleep(0.2) logging.debug('Exiting') def non_daemon(): ...
test_filters.py
''' Some tests for filters ''' from __future__ import division, print_function, absolute_import import sys import numpy as np from numpy.testing import (assert_equal, assert_raises, assert_allclose, assert_array_equal, TestCase, run_module_suite) import scipy.ndimage as sndi def test_tic...
coco.py
import json import logging import os import threading from time import sleep from typing import Callable import paho.mqtt.client as mqtt from .coco_device_class import CoCoDeviceClass from .coco_fan import CoCoFan from .coco_light import CoCoLight from .coco_shutter import CoCoShutter from .coco_switch import CoCoSwi...
test.py
import argparse import json import os from pathlib import Path from threading import Thread from torchsummary import summary import numpy as np import torch import yaml from tqdm import tqdm from models.experimental import attempt_load from utils.datasets import create_dataloader from utils.general import coco80_to_co...
job_worker.py
########################################################################### # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
utils.py
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
flyStarter.py
#MIT License #Copyright (c) 2020 Renaud Bastien #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...
test.py
# a = 10 ** 5 # print(type(a)) import os # import time # a = time.time() # for i in range(10000): # print(1) # b = time.time() # # print(b - a) # class VideoStream: # """mjpeg/mjpg格式用的stream""" # def __init__(self, filename): # self.filename = filename # self.size = os.path.getsize(filena...
bot.py
from mirai import Mirai, WebSocketAdapter from mirai import FriendMessage, GroupMessage, TempMessage from mirai import Plain, At, AtAll, Face from mirai.adapters import websocket from mirai.models.message import FlashImage from mirai.models.events import MemberJoinEvent, NewFriendRequestEvent, BotLeaveEventKick, \ ...
pb_feeder.py
from collections import OrderedDict import os import io import json import requests import threading import time from feeder import Feeder import pb_stream from pb_stream import contacts from pb_stream import config from pkg_resources import resource_string class PBFeeder(Feeder): """ whatsapp chat feed using pus...
kv.py
from __future__ import (absolute_import as _, print_function as _, division as _) import textwrap as _textwrap import threading as _threading import weakref as _weakref from collections import (namedtuple as _namedtuple, deque as _deque, ...
test_extending.py
import math import operator import sys import pickle import multiprocessing import ctypes import warnings from distutils.version import LooseVersion import numpy as np from numba import njit, jit, vectorize, guvectorize, objmode from numba.core import types, errors, typing, compiler, cgutils from numba.core.typed_pas...
server.py
# Copyright 2020 Unity Technologies # # 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...
graphicsCrawlerDisplay.py
# graphicsCrawlerDisplay.py # ------------------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link t...
laikago_physx_cpu.py
import pybullet as p import pybullet_data as pd import time, psutil, os import numpy as np from uuid import uuid1 import rocksdb, json from multiprocessing import Process import copy useMaximalCoordinates = True needLog = False # db = rocksdb.DB("fyp.db", rocksdb.Options(create_if_missing=True)) logid = 0 class Lai...
main.py
#!/usr/bin/env python import time import multiprocessing as mp import json from argparse import ArgumentParser import psycopg2 import db_initializer from replay import ReplayMemory from actor import Actor from learner import Learner arg_parser = ArgumentParser(prog="main.py") arg_parser.add_argument( "--params-fi...
ctaEngine.py
# encoding: UTF-8 ''' 本文件中实现了CTA策略引擎,针对CTA类型的策略,抽象简化了部分底层接口的功能。 关于平今和平昨规则: 1. 普通的平仓OFFSET_CLOSET等于平昨OFFSET_CLOSEYESTERDAY 2. 只有上期所的品种需要考虑平今和平昨的区别 3. 当上期所的期货有今仓时,调用Sell和Cover会使用OFFSET_CLOSETODAY,否则 会使用OFFSET_CLOSE 4. 以上设计意味着如果Sell和Cover的数量超过今日持仓量时,会导致出错(即用户 希望通过一个指令同时平今和平昨) 5. 采用以上设计的原因是考虑到vn.trader的用户主要是对TB、MC和...
_threading.py
import threading from abc import ABCMeta, abstractmethod from loguru import logger """ A threading pattern we commonly use, inc. a few little helpers. """ class Threadable(metaclass=ABCMeta): def __init__(self): self._thread = None self._thread_finished = threading.Event() ...
models.py
# -*- coding: utf-8 -*- from . import data_processor as dp from . import data_simulator as ds from . import train, evaluate, optimize, fcnet, hpmodel, nodeframe, utils import torch from torch.autograd import Variable import torch.multiprocessing as mp import numpy as np #%% multilayer perceptron (MLP) class MLP(trai...
ssh_utils.py
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # # This file contains ssh Session class and support functions/classes. import cmd import os import sys import socket import threading from gppylib.commands.base import WorkerPool, REMOTE from gppylib.commands.unix import Hostname, Echo f...
recorder.py
# coding: utf8 import copy import heapq import os import shutil import socket import threading import time import json import traceback import datetime from . import config, utils, constant from .replay_file import ReplayFile from .translation import Translation from .packet_processor import PacketProcessor from .log...
standalone.py
# # Copyright Cloudlab URV 2020 # # 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 writin...
task.py
import atexit import os import signal import sys import threading import time from argparse import ArgumentParser from collections import OrderedDict, Callable import psutil import six from .backend_api.services import tasks, projects from .backend_interface import TaskStatusEnum from .backend_interface.model import ...
test_multi_map_publisher.py
import logging from rabbitmq.RBPoolPublisher import * from rabbitmq.RBMapPoolPublisher import * from concurrent.futures import * import threading from threading import Thread LOG_FORMAT = '%(levelname) -10s %(asctime)s %(name) -30s %(funcName) -35s %(lineno) -5d: %(message)s' logger = logging.getLogger(__name__) def...
bftool_pool.py
import asyncio import collections import concurrent.futures import multiprocessing import multiprocessing.pool import queue import sys import threading import time import types from .arguments import Arguments __all__ = ["Pool"] class Queue(object): def __init__(self, values): self.__reference = values ...
cluster.py
import os import subprocess import socket import argparse import threading import IPython import numpy as np parser = argparse.ArgumentParser(description="Parse information about the cluster.") parser.add_argument("--nodes", type=str, required=True, help="Test file with node IP addresses, one line per address.") parse...
fb_image_scraper.py
from bs4 import BeautifulSoup,Comment import urlparse from urllib2 import urlopen import urllib2 from urllib import urlretrieve import os import sys import json from threading import Thread import httplib import requests import re # start the thread for downloading images in parellel def download_parelle...
manager.py
# -*- coding: utf-8 -*- """ :copyright: (C) 2010-2013 by Contrail Consortium. """ from threading import Thread from conpaas.core.expose import expose from conpaas.core.manager import BaseManager from conpaas.core.https.server import HttpJsonResponse, HttpErrorResponse from conpaas.services.htcondor.agent impor...
stresstest_increment.py
#!/usr/bin/env python # Copyright (c) 2009-2010 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
main.py
#!/usr/sbin/env python import click import ipaddress import json import netaddr import netifaces import os import re import subprocess import sys import threading import time from socket import AF_INET, AF_INET6 from minigraph import parse_device_desc_xml from portconfig import get_child_ports from sonic_py_common im...
mycobot_topics_jsnn.py
#!/usr/bin/env python2 import time import os import sys import signal import threading import rospy from mycobot_communication.msg import ( MycobotAngles, MycobotCoords, MycobotSetAngles, MycobotSetCoords, MycobotGripperStatus, MycobotPumpStatus, ) # from pymycobot import MyCobot from pymyc...
data_processing.py
import numpy as np import sys import os sys.path.append('utils/') from config import * from utils import * sys.path.append(pycaffe_dir) import time import pdb import random import pickle as pkl import caffe from multiprocessing import Pool from threading import Thread import random import h5py import itertools import m...
AzureBot_Test.py
from threading import Thread import serial import controls import gui class Comms: def __init__(self, port: int, baud_rate: int): self.port = port self.baud_rate = baud_rate ser = serial.Serial(self.port, self,baud_rate) self.ser.close() self.ser.open() def send_value(s...
data.py
from __future__ import print_function import threading import time from phi.physics.field.staggered_grid import StaggeredGrid from .stream import DerivedStream class Interleave(DerivedStream): def __init__(self, fields): DerivedStream.__init__(self, fields) self.field_count = len(fields) d...
test_misc.py
import os from hashlib import md5 from twisted.internet import defer, reactor from twisted.trial import unittest from lbrynet import conf from lbrynet.core.server.BlobAvailabilityHandler import BlobAvailabilityHandlerFactory from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.core.StreamDe...
conftest.py
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Anshuman Bhaduri # Copyright (c) 2014 Sean Vig # Copyright (c) 2014-2015 Tycho Andersen # # 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 Soft...
sublimecoq.py
import re, os.path import itertools import subprocess, threading import queue import xml.sax.saxutils import sublime, sublime_plugin # Event listener CKEY = 'coq' RKEY = 'QQkey' class RegInfo(object): def __init__(self, a, b, h): self.a = a self.b = b self.hash = h self.state_id =...
wsdump.py
#!/Users/quaiwentt/Desktop/Ada/capstone/qually/qually_env2/bin/python import argparse import code import sys import threading import time import six from six.moves.urllib.parse import urlparse import websocket try: import readline except ImportError: pass def get_encoding(): encoding = getattr(sys.std...
util.py
#!/usr/bin/env python2 # coding=utf-8 """ Utility belt """ from __future__ import unicode_literals from __future__ import absolute_import from functools import wraps __author__ = "Manuel Ebert" __copyright__ = "Copyright 2015, summer.ai" __date__ = "2015-11-09" __email__ = "manuel@summer.ai" import hashlib import re ...
ask.py
import re import threading import requests from bs4 import BeautifulSoup as soup class ASK: COOKIES = None SERVICE = "Ask" LOCK = threading.Semaphore(value=1) URL = "https://www.ask.com/web?q=site:%s" REGEXP = "([a-z0-9]+[.])+%s" TIMEOUT = 10 RESPONSE = "" SUBDOMAINS = [] AGENT = "Mozilla/5.0 (Windows NT 10....
dht.py
import json import sys import time import threading import logging import board import adafruit_dht class DHT: def __init__(self): self.version = "0.9.2" self.state = {} self.settings = { "notify_url": "fhtp://broadcast/{DEVICE}/app/{APP}/script/{SCRIPT}", "pin": 4, ...
TaskManager.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------- # Copyright (c) 2010-2021 Denis Machard # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
coordinator_example.py
import tensorflow as tf import numpy as np import threading import time def MyLoop(coord, worker_id): # 判断当前线程是否要停止 while not coord.should_stop(): if np.random.rand() < 0.1: print("Stoping from id: %d\n" % worker_id) # 通知其他线程停止 coord.request_stop() else: ...
__init__.py
import atexit import time from threading import Thread try: import RPi.GPIO as GPIO except ImportError: raise ImportError("This library requires the RPi.GPIO module\nInstall with: sudo pip install RPi.GPIO") __version__ = '0.1.1' DAT = 23 CLK = 24 NUM_PIXELS = 16 CHANNEL_PIXELS = 8 BRIGHTNESS = 7 BTN_FASTF...
exercise7.py
#!/usr/bin/env python # Exercise 6 :Use threads and Netmiko to execute 'show version' on each device in the database. # Calculate the amount of time required to do this. # What is the difference in time between executing 'show version' sequentially versus using threads? # Exercise 7. Repeat exercise #6 except use proc...
scdlbot.py
# -*- coding: utf-8 -*- """Main module.""" import gc import pathlib import random import shelve import shutil from datetime import datetime from multiprocessing import Process, Queue from queue import Empty from subprocess import PIPE, TimeoutExpired # skipcq: BAN-B404 from urllib.parse import urljoin, urlparse from...
mapping.py
def parse_output(output): # by convention, the last output is the result of the operation last_output = None outputs = {} pattern = re.compile('EXPECTED_OUTPUT_(\w+)=(.*)') for line in output.splitlines(): match = pattern.match(line) if match is None: last_output = line ...
util.py
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved. import os import json import lzma import multiprocessing as mp from speakeasy import Speakeasy def get_test_bin_path(bin_name): fp = os.path.join(os.path.dirname(__file__), "bins", bin_name) return fp def get_test_bin_data(bin_name): fp = get_tes...
downloader.py
#! python3 import os, bs4, requests, re, time, threading from selenium.webdriver.chrome.options import Options from selenium import webdriver def scroll_down(driver, times): print('Loading',end='') for i in range(times): print('.',end='') driver.execute_script("window.scrollTo(0, document.body...
multi-processing.py
from multiprocessing import Process import time import random import timeit #Funcao que verifica se o numero passado por parametro eh primo def isprimo(numero): if numero >=2: for i in range(2, numero): if numero % i == 0: return False else: return False return T...
connection_manager_4edge.py
import socket import threading import pickle import codecs from concurrent.futures import ThreadPoolExecutor from .core_node_list import CoreNodeList from .message_manager import ( MessageManager, MSG_CORE_LIST, MSG_PING, MSG_ADD_AS_EDGE, ERR_PROTOCOL_UNMATCH, ERR_VERSION_UNMATCH, OK_WITH_P...
testWeightAccess.py
from __future__ import division, print_function import os, sys import ROOT from PhysicsTools.NanoAODTools.postprocessing.framework.postprocessor import PostProcessor from PhysicsTools.NanoAODTools.postprocessing.framework.datamodel import Collection, Object from PhysicsTools.NanoAODTools.postprocessing.framework.event...
monitor_ztplot.py
#!/usr/bin/env python # vim: ts=4 sw=4 et from datetime import datetime import os from queue import Queue, Empty import shutil import threading import matplotlib # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') # noqa import matplotlib.pyplot as plt import matplotlib.ticker as ticker impor...
scdlbot.py
# -*- coding: utf-8 -*- """Main module.""" import gc import pathlib import random import shelve import shutil from datetime import datetime from multiprocessing import Process, Queue from queue import Empty from subprocess import PIPE, TimeoutExpired # skipcq: BAN-B404 from urllib.parse import urljoin, urlparse from...
example_monitoring.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: example_monitoring.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api # Documentation: https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api # PyPI: https://pypi.o...
DrawableMesh.py
import pythreejs as three import numpy as np from time import time, sleep from .Colors import colors from ..utils import Observer, ColorMap import threading import copy import math import re class DrawableMesh (Observer): def __init__(self, geometry, mesh_color = None, reactive = False): super(DrawableM...
LCMNode.py
from __future__ import print_function import forseti2 import configurator import json import lcm import threading import time import random import os import settings import util lc_lock = threading.Lock() class Node(object): def start_thread(self): self.thread = threading.Thread(target=self._loop) ...
UCAS_course_grad.py
import json import requests import tkinter.messagebox import tkinter import threading import time from PIL import Image, ImageTk import re import random def post_data(url, data=None, time_out=3, retry=5): for _ in range(retry): try: page = sess.post(url, data=data, timeout=time_o...
serial_interface.py
from serial import Serial, SerialException from struct import Struct from threading import Lock, Thread from typing import Any, Dict, List, Optional, Tuple from ..util.checksum import crc16 from ..util.watchdog import SimpleWatchdog from .model import Roboclaw, RoboclawChain, RoboclawChainApi def param_struct(struct_...
main.py
from scan.lib import GetTarget from scan import generic_scan from scan.lib import database import threading from time import sleep if __name__ == "__main__": g = GetTarget.GetTarget() g.gen_target() threads = [] def execute(): control = True while control: d = database.Da...
bomber.py
import sys import time from random import randint import smtplib import threading from essential_generators import DocumentGenerator #ACCOUNTS.TXT FILE MUST CONTAIN GMAIL ACCOUNTS THAT HAVE NFA AND ACCESS TO LESS SECURE APPS ENABLED class Bomber: '''This is the bomber class that contains email-bombing functions ...
13_edf_wound_wait_NS.py
from functools import reduce from sys import * import numpy as np import random as r import ping_code as pc import socket import struct import subprocess as sp import threading from threading import Thread import ast import time import datetime as dt import os import psutil import getpass as gp from netifaces import in...
test_smtplib.py
import asyncore import base64 import email.mime.text from email.message import EmailMessage from email.base64mime import body_encode as encode_base64 import email.utils import hmac import socket import smtpd import smtplib import io import re import sys import time import select import errno import textwrap import thre...
script.py
import psp2d import pspos import pspnet import pspmp3 import pspogg from time import time, localtime import datetime import sys import stackless import os import threading import urlparse pspos.setclocks(333, 166) print "Localtime: ", localtime() print "Datetime: ", datetime.datetime.now() screen = psp2d.Screen() sc...
loader.py
# Copyright (c) 2017-present, Facebook, 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...
runblast.py
#!/usr/bin/env python # -*- coding: utf-8 -*- #Author raony #PBS -N blastnr #PBS -e blast.err #PBS -o blast.log #PBS -q fila64 #PBS -l select=1:ncpus=64 from threading import Thread, Event import time # import threading import psutil import datetime import os import subprocess from subprocess import PIPE,Popen # com...
client02d.py
import copy import logging import asyncio import threading import time from collections import deque from typing import Dict import zmq from zmq.asyncio import Context, Socket import arcade from pymunk.vec2d import Vec2d from demos.movement import KeysPressed, MOVE_MAP, apply_movement from .lib02 import PlayerEvent, P...
minion.py
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import absolute_import, print_function, with_statement, unicode_literals import os import re import sys import copy import time import types import signal import random import fnmatch import logging import threading import ...
manager.py
"""Entry point for client creation. ``build_client_manager`` in particular is the abstraction that should be used to create a ``ClientManager``, that in return can create Pulsar clients for specific actions. """ import functools import threading from logging import getLogger from os import getenv try: from Queue...
tracing_test.py
# Copyright 2019, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
vsearch4web.py
from flask import Flask, render_template, request, escape, session from flask import copy_current_request_context from vsearch import search4letters from DBcm import UseDatabase, ConnectionError, CredentialsError, SQLError from checker import check_logged_in from threading import Thread from time import sleep app = ...