source
stringlengths
3
86
python
stringlengths
75
1.04M
7_rms_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 from threading import Thread import paramiko import ast import time import os import getpass as gp import data hosts = {} # {hostname: ip} multicast_group = '...
context.py
#!/usr/bin/env python3 from http import HTTPStatus from socketserver import ThreadingMixIn from urllib.parse import urlparse from ruamel.yaml.comments import CommentedMap as OrderedDict # to avoid '!!omap' in yaml import threading import http.server import json import queue import socket import subprocess import time ...
check_update.py
import os from time import sleep import requests import json from threading import Thread from .package.requirements import SimpleVersion from ..version import __version__ __check_update_thread = None def start_check_update_daemon(): global __check_update_thread if __check_update_thread: return ...
http_com.py
from __future__ import print_function import base64 import copy import json import logging import os import random import ssl import sys import threading import time from builtins import object from builtins import str from flask import Flask, request, make_response, send_from_directory from werkzeug.serving import W...
raw_frame_scene.py
# from @RY-Givenchy # # Copyright: 2020 niedong # Raw frame operation scene for manim # from manimlib.scene.scene import Scene from manimlib.constants import * import threading import time class RawFrameScene(Scene): CONFIG = { "num_frames": 0, "msg_flag": True } def ...
gatos.py
""" Problema: Gatos y ratones Realizado en python """ import threading import time import random mutex = threading.Semaphore(1) mutex2 = threading.Semaphore(1) hay_platos = threading.Semaphore(0) Platos = [] animales = [] comiendo = 0 MaxEat = 1 EComiendo = threading.Semaphore(0) acabado = 0 class plato: def __...
ergserver.py
#!/usr/bin/env python # Simple console application that works with pyrow to send data retrieved from # a connected Concept 2 rowing erg to a client via websockets. # ============================================================================== # IMPORTS # =============================================================...
learner.py
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # 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 us...
process_data_fast.py
import glob from process_data import process import tqdm if __name__=="__main__": import threading THREADS = 4 queue = [] for fname in tqdm.tqdm(glob.glob("/storage/PawelLab/wwydmanski/NCBR-COVID/FTP_DATA/data/upload/pacjenci 201-250/*/*.xls")): queue.append(threading.Thread(target=process, ar...
chat_server.py
import socket from threading import * def send_msg(socket): while True: msg = input() socket.send(bytes(msg,"utf-8")) # creates the socket server = socket.socket() PORT = 1234 # bind the socket to the port. server.bind(('localhost',PORT)) # takes a tuple # at most 5 connections in the queue server.list...
rdoclient.py
""" RANDOM.ORG JSON-RPC API (Release 1) implementation. This is a Python implementation of the RANDOM.ORG JSON-RPC API (R1). It provides either serialized or unserialized access to both the signed and unsigned methods of the API through the RandomOrgClient class. It also provides a convenience class through the Rand...
rewrite_ansiblenew.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import ruamel.yaml import textwrap import argparse import copy import json import logging import os import re import six import sys import time import traceback imp...
web_to_zeromq.py
""" For this module to work, the following SSL certificate files must be placed in ../synth_accounts/: ssl.crt ssl.key Flask occasionally just stops responding to web requests (like every day or so) - no idea why. So we rely on an external service (e.g. Pingdom or UptimeRobot) to ping us regularly and then, k...
document.py
import sublime, sublime_plugin import xml.etree.ElementTree as ElementTree import os import datetime import threading import urllib from . import requests, context, util from .progress import ThreadProgress from .salesforce.lib.panel import Printer class ReloadSalesforceDocumentCommand(sublime_plugin.WindowCommand): ...
account creator.py
import requests import json import sys import random import string import os import time from colorama import init, Fore import queue import turkce_isimler import threading import base64 from requests.packages.urllib3.exceptions import InsecureRequestWarning init() requests.packages.urllib3.disable_warnings(InsecureReq...
test_decimal.py
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz (aahz at pobox.com) # and Tim Peters """ These are the test cases for the Decim...
pytrumpet.py
#!/usr/bin/python ## # trumpet.py : Play trumpet using your computer through python # # trumpet.py allows you to play a sound font by using your keyboard as valves, # and your microphone to listen to the sound produced by a mouthpiece. Using # these two features a note is played using Fluidsynth (via mingus) from a ...
easy_run.py
from __future__ import absolute_import, division, print_function import os import subprocess import sys import threading import signal from six.moves import range def _show_lines(lines, out, prefix): if (out is None): out = sys.stdout for line in lines: print(prefix+line, file=out) def macos_dyld(): ''' ...
gui.py
""" This is the main script of main GUI of the OXCART Atom Probe. @author: Mehrpad Monajem <mehrpad.monajem@fau.de> """ import sys import numpy as np import nidaqmx import time import threading import datetime import os # PyQt and PyQtgraph libraries from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import ...
woocommerce.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @File : woocommerce.py @Contact : douniwan@douniwan.com @License : (C)Copyright 2021-2031, Dou-Ni-Wan @Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2021/3/18 11:58 yqz 1.0 None...
udpSocket.py
import socket import threading def udpRecvfromData(): ip_port = ("", 10025) udpRecv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0) udpRecv.bind(ip_port) while True: print("wait revcData……") data, sourceAddr = udpRecv.recvfrom(1024) print(str(data, "utf-8")) udpRecv.c...
Server.py
import socket import struct import pickle import numpy as np import json import torch import torch.nn as nn from torch.optim import Adam, SGD from threading import Thread import time #load data from json file f = open('parameter_server.json', ) data = json.load(f) #set parameters fron json file host = data["host"] po...
monitor.py
import sys sys.path.append(r"/public1/home/sc90898/OpenFOAMWorkspace/sc90898-7/utilities/") import signal import multiprocessing as mp import time from residual_monitor import read_residuals,plot_multiple_residuals,quit log="run.log" pressure_name="p_rgh" nCorrectors=1 interval=20 sample_size=300 # m_residuals=[["h...
ur5_train.py
import numpy as np import torch import argparse import os import time import json import threading from sac_rad import SacRadAgent import utils from logger import Logger import torch.multiprocessing as mp from configs.ur5_config import config from envs.ur5_wrapper import UR5Wrapper def parse_args(): parser = argp...
test.py
import argparse import json import os from pathlib import Path from threading import Thread 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_coco91_class, check_dataset, check...
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...
rtquizzer.py
#!/usr/bin/env python3 import asyncio import re from asyncirc import irc from enum import IntEnum import json import asyncirc.plugins.addressed import threading, time, os, re import random random = random.SystemRandom() import urllib.parse import requests import sys import collections from datetime import date from bs4...
httpclient_test.py
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import base64 import binascii from contextlib import closing import functools import sys import threading from tornado.escape import utf8 from tornado.httpclient import HTTPRequest, HTTPResponse, _RequestProxy, HTT...
test_clients_gateways.py
import asyncio import copy import multiprocessing import time from typing import Dict import pytest from jina import Document, DocumentArray from jina.helper import random_port from jina.parsers import set_gateway_parser from jina.serve import networking from jina.serve.runtimes.gateway.grpc import GRPCGatewayRuntime...
test_zeromq.py
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Thomas Jackson <jacksontj.89@gmail.com>` ''' # Import python libs from __future__ import absolute_import import os import time import threading # linux_distribution deprecated in py3.7 try: from platform import linux_distribution except ImportError: from di...
zoomJob.py
#_*_ coding: utf8 _*_ import sqlite3,os import zoom from threading import Thread from functools import wraps from time import sleep __doc__=u'''' zoomJob.py 实现简单的对任务的定制 python 版本需求 2.7以上 无第三方模块需求 ''' def asy(func): u''' 修饰器,异步函数 被修饰的函数单独作为一个线程,可以异步执行 示例如下所示: >>> @asy ... def loop1(): ... while True: ...
tests.py
# -*- coding: utf-8 -*- # Unit and doctests for specific database backends. from __future__ import unicode_literals import copy import datetime import re import threading import unittest import warnings from decimal import Decimal, Rounded from django.conf import settings from django.core.exceptions import Improperly...
imageUpload.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- ################################################################################ # Argon Design Ltd. Project P8010 Spock # (c) Copyright 2018 Argon Design Ltd. All rights reserved. # # Module: Gumpifier # Author : Patrick Taylor ###############################################...
subsim_search.py
# -*- coding: utf-8 -*- from __future__ import annotations import time import multiprocessing import os import warnings from collections import defaultdict from io import BytesIO from typing import Optional, Tuple, Union import pystow import rdkit from rdkit import Chem import pandas as pd from tqdm import tqdm fro...
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...
ssh.py
from __future__ import print_function, division, absolute_import import logging import socket import os import sys import time import traceback try: from queue import Queue except ImportError: # Python 2.7 fix from Queue import Queue from threading import Thread from toolz import merge from tornado import...
test_server.py
# -*- mode: python; coding: utf-8 -*- # Copyright 2020 the .NET Foundation # Licensed under the MIT License. from __future__ import absolute_import, division, print_function from argparse import Namespace from http.server import HTTPServer import pytest import requests from threading import Thread from time import sl...
__init__.py
""" pyJsConsole wrapper. © Anime no Sekai - 2020 """ from .internal.javascript import classes as JSClass console = JSClass._Console() document = JSClass._Document() history = JSClass._History() Math = JSClass._Math() navigator = JSClass._Navigator() screen = JSClass._Screen() window = JSClass._Window() browser = JSC...
bm_2to3.py
from mpkmemalloc import * import threading import glob import os.path import sys import pyperf # if __name__ == "__main__": def functionWorker(tname, allocate_pkey): if allocate_pkey: pkey_thread_mapper(tname) runner = pyperf.Runner() runner.metadata['description'] = "Performance of the Python 2...
Multiprocessing_While.py
# _*_coding : UTF_8 _*_ # Author : Xueshan Zhang # Date : 2022/1/11 12:08 AM # File : Multiprocessing_While.py # Tool : PyCharm import datetime, time from multiprocessing import Process import logging logging.basicConfig( level=logging.INFO, format='%(asctime)s: %(levelname)s %(message)s', ...
routes.py
# ****************************************************************************** # Copyright (c) 2020 University of Stuttgart # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the "License"); # you m...
bulldog_vision_test.py
#!/usr/bin/env python #!coding=utf-8 import rospy import numpy as np import PIL.Image as pilimage import actionlib from sensor_msgs.msg import CompressedImage from sensor_msgs.msg import Image from std_msgs.msg import Float64 from cv_bridge import CvBridge, CvBridgeError import cv2 import time from yolo import YOLO fr...
test_query_node_scale.py
import threading import time import pytest from base.collection_wrapper import ApiCollectionWrapper from common.common_type import CaseLabel from customize.milvus_operator import MilvusOperator from common import common_func as cf from common import common_type as ct from scale import constants from pymilvus import I...
thermald.py
#!/usr/bin/env python3 import datetime import os import queue import threading import time from collections import OrderedDict, namedtuple from pathlib import Path from typing import Dict, Optional, Tuple import psutil from smbus2 import SMBus import cereal.messaging as messaging from cereal import log from common.di...
test_logging.py
#!/usr/bin/env python # # Copyright 2001-2004 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 n...
FMC_Initiator.py
import socket import FMC import ipaddress from multiprocessing import Process import time nic_list = [] def get_nic_ip(): addrs = socket.getaddrinfo(socket.gethostname(), None) for i in addrs: for i in i: try: nic_list.append(ipaddress.IPv4Address(i[0])) ...
dataloader_iter.py
# Copyright (c) 2020 PaddlePaddle 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 appli...
pool.py
# -*- coding: utf-8 -*- # # Module providing the `Pool` class for managing a process pool # # multiprocessing/pool.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import # # Imports # import errno import itertools import os import platform i...
utils.py
# Copyright 2012-2019 CERN for the benefit of the ATLAS collaboration. # # 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_closing.py
from fixtures import * # noqa: F401,F403 from flaky import flaky from pyln.client import RpcError from utils import ( only_one, sync_blockheight, wait_for, DEVELOPER, TIMEOUT, VALGRIND, SLOW_MACHINE, COMPAT ) import os import queue import pytest import re import threading import unittest @unittest.skipIf(no...
live_detection.py
import cv2 import time import queue import threading from detector_lowres import Detector class VideoCapture: """ bufferless VideoCapture """ def __init__(self, name, width=1920, height=1080): self.cap = cv2.VideoCapture(name) if not self.cap.isOpened(): print("Cannot op...
test_extraction.py
import json import unittest from pathlib import Path from threading import Thread from typing import Any, List, Tuple, Type import jedi import libcst as cst from jedi.api.environment import Environment from buglab.controllers.buggydatacreation import extract_bugs_from from buglab.controllers.helper.randombugselectors...
test_io.py
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
test.py
import requests from selenium import webdriver from selenium.webdriver.chrome.options import Options from threading import Thread from multiprocessing import Process import time def click_href(url, browser): x = browser.click() if not x: print(url + ' ok') else: print(url + ' error...')...
JesdWatchdog.py
#!/usr/bin/env python #----------------------------------------------------------------------------- # Title : pysmurf watchdog module - JesdWatchdog class #----------------------------------------------------------------------------- # File : pysmurf/watchdog/JesdWatchdog.py # Created : 2018-12-06 #-----...
common.py
''' This is a extended unittest module for Kivy, to make unittests based on graphics with an OpenGL context. The idea is to render a Widget tree, and after 1, 2 or more frames, a screenshot will be made and be compared to the original one. If no screenshot exists for the current test, the very first one will be used. ...
load-data.py
#!/usr/bin/env impala-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 (...
log.py
# 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 contextlib import copy import io import logging import logging.handlers import os import re import subprocess import sys import thread...
trajectory_ik.py
#!/usr/bin/env python # Copyright (c) 2013-2015, Rethink Robotics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # ...
marshal.py
# Copyright 2019 Atalaya Tech, 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 writing, ...
metadata_server_mock.py
import json import threading from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler _MDS_ADDRESS = ("localhost", 50052) def metadata_server(token): class MetadataHandler(BaseHTTPRequestHandler): def do_GET(self): data = _MDS_TOKEN = json.dumps({ "access_token": to...
main.py
#!/usr/bin/env pybricks-micropython import struct, threading from pybricks import ev3brick as brick from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor, InfraredSensor, UltrasonicSensor, GyroSensor) from pybricks.parameters import (Port, Stop, Direction, Button, Color, SoundFile, ImageFile, Align) from p...
driver.py
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
myBlockchain3.py
import hashlib import time import csv import random from http.server import BaseHTTPRequestHandler, HTTPServer from socketserver import ThreadingMixIn import json import re from urllib.parse import parse_qs from urllib.parse import urlparse import threading import cgi import uuid from tempfile import NamedTemporaryFile...
renderer.py
""" Renders the command line on the console. (Redraws parts of the input line that were changed.) """ from __future__ import unicode_literals from prompt_toolkit.eventloop import Future, From, ensure_future, get_event_loop from prompt_toolkit.filters import to_filter from prompt_toolkit.formatted_text import to_format...
client.py
from base64 import b64encode import logging try: import queue except ImportError: # pragma: no cover import Queue as queue import signal import ssl import threading import time import six from six.moves import urllib try: import requests except ImportError: # pragma: no cover requests = None try: ...
discordimpl.py
# coding: utf-8 # Simple module to send messages through a Discord WebHook # post a message to discord api via a bot # bot must be added to the server and have write access to the channel import asyncio from asyncio import Event import re import time from threading import Thread from typing import Optional, Tuple, Lis...
reviews_parallel.py
import multiprocessing import time import sys import nltk from pymongo import MongoClient from settings import Settings def load_stopwords(): stopwords = {} with open('stopwords.txt', 'rU') as f: for line in f: stopwords[line.strip()] = 1 return stopwords def worker(identifier, sk...
dataengine-service_install_libs.py
#!/usr/bin/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 A...
__init__.py
''' PyMOL Molecular Graphics System Copyright (c) Schrodinger, Inc. Supported ways to launch PyMOL: If $PYMOL_PATH is a non-default location, it must be set and exported before launching PyMOL. From a terminal: shell> python /path/to/pymol/__init__.py [args] If the 'pymol' module is in PYTHONPATH ...
dumping_callback_test.py
# Copyright 2019 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 applica...
main_dlib.py
# Requirements: # pip install tk # pip install pillow from Tkinter import * from PIL import Image from PIL import ImageTk import cv2, threading, os, time from threading import Thread from os import listdir from os.path import isfile, join import dlib from imutils import face_utils, rotate_bound import math ### Functi...
qt3.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import sys, threading, time #from PyQt5.QtCore import pyqtSlot #from PyQt5.QtWidgets import * #from PyQt5.QtGui import QFont, QIcon # electron cash modules ''' script_dir = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(script_dir, 'pa...
main.py
import numpy as np from threading import Thread, Event, Lock import socket as sock from subprocess import Popen import sys import time import cartopy.crs as ccrs from cartopy.geodesic import Geodesic import platform from geocoder import ip import pyModeS as pms from bokeh.plotting import curdoc, figure ...
start_new_threads.py
from threading import Thread def my_function(): print("printing from thread") if __name__ == "__main__": threads = [Thread(target=my_function) for _ in range(10)] for thread in threads: thread.start() for thread in threads: thread.join()
test.py
import multiprocessing import os import re import shutil import socket import subprocess import sys import time import traceback import psutil CURL = 'curl.exe -s -L -k -A "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36" -H "Accept-Language: en-US"' CURL...
tester.py
import os import os.path as osp import cv2 import numpy as np import time from tqdm import tqdm import torch import torch.nn.functional as F import torch.multiprocessing as mp from engine.logger import get_logger from utils.pyt_utils import load_model, link_file, ensure_dir from utils.img_utils import pad_image_to_sh...
monitor.py
# # Copyright Cloudlab URV 2021 # # 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...
ec2_backend.py
import threading import time from ec2_observer.event_loop import XOSObserver from ec2_observer.event_manager import EventListener from xos.logger import Logger, logging logger = Logger(level=logging.INFO) class Backend: def run(self): try: # start the openstack observer observ...
pyglove.py
import numpy as np import multiprocessing as mp import random import functools import ctypes def glove_compute_and_update_grads(coo_list, Warr, Garr, shape, cost, count, x_max, alpha, initial_learning_rate): Wall = np.frombuffer(Warr) Wall = Wall.reshape(shape) W = Wall[:,:,:-1] B = Wall[:,:,-1] ...
ela.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 31 14:19:23 2018 @author: opensource """ from __future__ import print_function from PIL import Image, ImageChops, ImageEnhance import sys, os import threading import argparse parser = argparse.ArgumentParser(description=""" Performs Error Level An...
lldb_server.py
#!/usr/bin/python from __future__ import print_function from SimpleXMLRPCServer import SimpleXMLRPCServer import sys import threading if len(sys.argv) < 2: print("Usage: {} <lldb_python_path> [port]".format(sys.argv[0])) lldb_path = '/Library/Developer/Toolchains/swift-latest.xctoolchain/System/Library/Privat...
walk_front.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import pypot.robot import time import json import math import sys import threading import time import queue from serial import Serial def dist(a,b): return math.sqrt((a*a)+(b*b)) def get_y_rotation(x,y,z): radians = math.atan2(x, dist(y,z)) r...
Prepocesser.py
import sys import socket import traceback import cv2 from imutils.video import VideoStream import imagezmq import threading import numpy as np #from time import sleep import time import videoStramSubscriber as vss import cv2 import parameters import sys from nacl.signing import VerifyKey class Preprocesser: de...
smbrelayx.py
#!/usr/bin/env python # Copyright (c) 2013-2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # SMB Relay Module # # Author: # Alberto Solino (@agsolino) # # Description: # ...
test.py
import json import os.path as p import random import socket import subprocess import threading import time import avro.schema from confluent_kafka.avro.cached_schema_registry_client import CachedSchemaRegistryClient from confluent_kafka.avro.serializer.message_serializer import MessageSerializer import kafka.errors i...
h5nuvola.py
#!/usr/bin/env python """H5 Nuvola - VUO integration versions: h5py = 2.7.1 numpy = 1.13.0 json = 2.0.9 flask = 1.0.3 werkzeug = 0.15.4 bokeh = 0.13.0 -> 1.2.0 """ import re import requests import urllib import webbrowser import multiprocessing import os import pwd import json import time import sys import hashlib i...
DouYinHotMusic.py
# -*- coding: utf-8 -*- # @Author : 王翔 # @JianShu : 清风Python # @Date : 2019/7/31 23:25 # @Software : PyCharm # @version :Python 3.7.3 # @File : DouYinMusic.py import os from bs4 import BeautifulSoup import threading import time # 系统层级的判断正则表达式的类 import re # 大名鼎鼎的网络请求库 import requests class DouYinMusic: ...
sockettester.py
#!/usr/bin/env python import subprocess import sys import threading import socket import time import os import uuid import argparse import zlib base_dir = os.path.dirname(sys.argv[0]) parser = argparse.ArgumentParser(description='Benchmark and test socket server for compression') parser.add_argument('files', metavar='N...
userInterface.py
# Authors: Cicely Motamedi, Adam Robinson # Description: This file contains the main code for the microscope user interface. # Some of the more complicated functionality is found in other files. from kivy.app import App from kivy.uix.scatter import Scatter from kivy.uix.label import Label from kivy....
__init__.py
# -*- coding: utf-8 -*- """ :copyright: (C) 2010-2013 by Contrail Consortium. """ from threading import Thread import memcache, tempfile, os, os.path, time from conpaas.services.webservers.agent import client from conpaas.services.webservers.manager.config import WebServiceNode, CodeVersion from conpaas.services...
workflow.py
# Copyright (c) 2014-2021, Dr Alex Meakins, Raysect Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # ...
pystress.py
__version__ = '0.2.1' from multiprocessing import Process, active_children, cpu_count, Pipe import os import signal import sys import time FIB_N = 100 DEFAULT_TIME = 60 try: DEFAULT_CPU = cpu_count() except NotImplementedError: DEFAULT_CPU = 1 def loop(conn): proc_info = os.getpid() conn.send(proc_...
utitls.py
import hmac import hashlib import secrets import json import datetime import traceback import re import signal, psutil import threading K_MANUAL_JSON_PATH = 'manualRestream.json' K_CONFIG_JSON_PATH = 'config.json' k_LOG_PATH = 'mainLog.log' def myLogger(logStr): resStr = str(datetime.datetime.now()) + " [MyLOGGE...
midi.py
import mido from time import sleep from scipy.signal import medfilt import random import threading C = 60 G = 55 A = 57 F = 53 NOTES = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'] def midi_number_to_note(number): octave = number // len(NOTES) - 1 note = NOTES[number % len(NOTES)] re...
traffic_util.py
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
service_connector.py
''' service_connector.py ancilla Created by Kevin Musselman (kevin@frenzylabs.com) on 01/26/20 Copyright 2019 FrenzyLabs, LLC. ''' import logging import sys import time import zmq import importlib import os import json import struct # for packing integers from zmq.eventloop.zmqstream import ZMQStream import...
MsbClient.py
# -*- coding: utf-8 -*- """ Copyright (c) 2019 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) Authors: Daniel Stock, Matthias Stoehr Licensed under the Apache License, Version 2.0 See the file "LICENSE" for the full license governing this code. """ import websocket, threading, json, jsonschem...
health_manager.py
from template_finder import TemplateFinder from ui import UiManager from ui import BeltManager from pather import Location import cv2 import time import keyboard from utils.custom_mouse import mouse from utils.misc import cut_roi, color_filter, wait from logger import Logger from screen import Screen import numpy as np...
batch_util.py
# Copyright 2017-2022 RStudio, PBC # # 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...