source
stringlengths
3
86
python
stringlengths
75
1.04M
test_aborttl.py
import threading import time from datetime import datetime from collections import namedtuple import pytest from epics import PV from epics.ca import CAThread from aborttl.dbhandler import DbHandler from aborttl.abortch import AbortCh from aborttl.aborttl import Aborttl Signal = namedtuple('Signal', ['abt_id', 'ts'...
clusterScaler.py
# Copyright (C) 2015-2016 Regents of the University of California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
PC_Miner.py
#!/usr/bin/env python3 ########################################## # Duino-Coin Python Miner (v1.8) # https://github.com/revoxhere/duino-coin # Distributed under MIT license # © Duino-Coin Community 2020 ########################################## import socket, statistics, threading, time, re, subprocess, hashlib...
x.py
import argparse import importlib.util import logging import signal import sys import os import traceback from multiprocessing import get_context from typing import List, Text, Optional import ruamel.yaml as yaml from rasa.cli.utils import get_validated_path, print_warning, print_error from rasa.cli.arguments import x...
Main.py
#!/usr/bin/env python3 print("Inicializando...", end=' \r') import time # from ev3dev.ev3 import * print("ev3dev.ev3", end=' \r') from ev3dev2.motor import OUTPUT_A, OUTPUT_B,OUTPUT_C, MoveTank,MoveSteering, SpeedPercent, LargeMotor print("motores importados", end=' ...
pythonexammples.py
input("Please enter the string you want to be printed out: ") #raw_input() in Python 2; input() in Python 3 #Saving the input to a variable user_says = input("Please enter the string you want to be printed out: ") #Defining a variable my_var = 10 #type integer my_var = "Hello" #type string my_var = True #...
upload_to_google_storage.py
#!/usr/bin/env python # Copyright (c) 2012 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. """Uploads files to Google Storage content addressed.""" import hashlib import optparse import os import Queue import re import st...
config.py
"""Abstractions for setting up a Galaxy instance.""" from __future__ import absolute_import from __future__ import print_function import abc import contextlib import os import random import shutil import threading from string import Template from tempfile import mkdtemp from galaxy.containers.docker_model import Dock...
gather.py
#!/usr/bin/env python __author__ = 'Tony Beltramelli www.tonybeltramelli.com - 09/07/2016' import argparse import os import urllib2 import re from threading import Thread from HTMLParser import HTMLParser DOMAIN = "songmeanings.com/" ARTIST_PATH = 'artist/view/songs/' def start_new_thread(task, arg): thread = T...
email.py
# _*_ coding: utf-8 _*_ from threading import Thread from flask import current_app, render_template from flask.ext.mail import Message from . import mail def send_email(app, msg): """ 在应用上下文中发送邮件。 """ with app.app_context(): mail.send(msg) def send_async_email(to, subject, template, **kwarg...
models.py
# -*- coding: utf-8 -*- """ Data models for the Deis API. """ from __future__ import unicode_literals import base64 from datetime import datetime import etcd import importlib import logging import re import time from threading import Thread from django.conf import settings from django.contrib.auth import get_user_mo...
test_datapipe.py
# Owner(s): ["module: dataloader"] import copy import http.server import itertools import os import os.path import pickle import random import socketserver import sys import tarfile import tempfile import threading import time import unittest import warnings import zipfile from functools import partial from typing imp...
VPython.py
#!/usr/bin/env python """ @author Micah Huth """ import importlib import threading import glob import os import platform import warnings from time import perf_counter, sleep import imageio from roboticstoolbox.backends.Connector import Connector _GraphicsCanvas3D = None _GraphicsCanvas2D = None _GraphicalRobot = None...
postproc.py
#!/usr/bin/python3 -OO # Copyright 2007-2020 The SABnzbd-Team <team@sabnzbd.org> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any late...
test_pantsd_integration.py
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import datetime import itertools import os import re import signal import threading import time import unittest from textwrap import dedent import pytest from pants.testutil.pants_run_in...
gl-pulse-chart.py
# import asyncio from collections import deque import sys import time import threading import numpy as np from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph.opengl as gl import pyqtgraph as pg from pythonosc.dispatcher import Dispatcher from pythonosc import osc_server trace = None X = np.linsp...
openbazaar_daemon.py
import argparse import tornado.web from zmq.eventloop import ioloop ioloop.install() from transport import CryptoTransportLayer from db_store import Obdb from market import Market from ws import WebSocketHandler import logging import signal from threading import Thread from twisted.internet import reactor from util im...
taskqueue_stub.py
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
kenner.py
# #88 a8P #88 ,88' #88 ,88" #88,d88' ,adPPYba, 8b,dPPYba, 8b,dPPYba, ,adPPYba, 8b,dPPYba, #8888"88, a8P_____88 ...
T1046.py
from socket import * from threading import Thread import argparse def checking_port(host, port_number): s = socket(AF_INET, SOCK_STREAM) try: s.connect((host, int(port_number))) print(f'{host}/{port} - open') except: pass arguments = argparse.ArgumentParser() arguments.add_argume...
chickenbot.py
import praw import pickle import re from prawcore.exceptions import Forbidden, PrawcoreException from praw.exceptions import ClientException, RedditAPIException from traceback import format_exc from collections import deque from random import shuffle from time import sleep from datetime import datetime, timedelta from ...
parallel.py
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/03a_parallel.ipynb (unless otherwise specified). __all__ = ['threaded', 'startthread', 'set_num_threads', 'ThreadPoolExecutor', 'ProcessPoolExecutor', 'parallel', 'run_procs', 'parallel_gen'] # Cell from .imports import * from .foundation import * from .basic...
main.py
import os os.environ['OMP_NUM_THREADS'] = '1' import argparse import torch from src.env import create_train_env from src.model import ActorCritic from src.optimizer import GlobalAdam from src.process import local_train, local_test import torch.multiprocessing as _mp import shutil parser = argparse.ArgumentParser( ...
bsl.py
#!/usr/bin/python3 # C:\Work\Python\HID_Util\src\HID_recorder.py from binascii import hexlify import sys import argparse import threading from time import perf_counter as timer import include_dll_path import hid # import os # BOARD_TYPE_MAIN = 0, # BOARD_TYPE_JOYSTICKS = 1, # BOARD_TYPE_TOOLS_MASTER = 2, # BOARD_TYPE...
BioBox.py
import sys import time import subprocess import socket import threading import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib try: from Analog import read_value except (ImportError, NotImplementedError): # Provide a dummy for testing def read_value(): yield 0 selected_channel = None cla...
utils.py
# Collection of helper functions and classes # msgEvent could probably be put in here as well, actually... import threading,time,socket # simple module to repeat any job every <delay> seconds # The scheduling library does this really well but is pretty overkill -- if you need # more functionality in the future consid...
Stream.py
from SimpleCV.base import * _jpegstreamers = {} class JpegStreamHandler(SimpleHTTPRequestHandler): """ The JpegStreamHandler handles requests to the threaded HTTP server. Once initialized, any request to this port will receive a multipart/replace jpeg. """ def do_GET(self): global _j...
main.py
import pdb import time import os import subprocess import re import random import json import numpy as np import glob from tensorboard.backend.event_processing.event_accumulator import EventAccumulator import socket import argparse import threading import _thread import signal from datetime import datetime parser = ar...
receptor.py
# Python from base64 import b64encode from collections import namedtuple import concurrent.futures from enum import Enum import logging import os import shutil import socket import sys import threading import time import yaml # Django from django.conf import settings # Runner import ansible_runner # AWX from awx.mai...
main.py
# encoding=utf-8 import detection_inference import cv2 import numpy as np import client import threading import ChannelManager from presenter_types import * import time import os import sys import re from graph import * #判断输入是否正确(通过rtsp://和.MP4后缀判断) lenofUrl = len(sys.argv) if lenofUrl <= 1: print("[ERROR] Please ...
bt_server.py
import bluetooth, threading, time, cv2 from detection_utils import extract_box, nms, handle_prediction from camera_parameters import * import datetime LBL_DATA_DELIMITER = '&&&' DATA_START_SYMBOL = '###' SIZE_START_SYMBOL = '$$$' START_DET_COMMAND = 'START' STOP_DET_COMMAND = 'STOP' SEND_TEST_IMG_COMMAND = 'TEST CAMERA...
image_process.py
from ..common.event import EventDispatcher from ..common.events import * from ..engine.vector import Vector from ..input.image_input import ImageInput from multiprocessing import Process, Pipe, Pool import copy import time import operator import numpy as np import math import time def processYImage(img): results ...
bitmex_book.py
# -*- coding: utf-8 -*- # - OrderBook Websocket Thread - # 🦏 **** quan.digital **** 🦏 # authors: canokaue & thomgabriel # date: 03/2020 # kaue.cano@quan.digital # Simplified implementation of connecting to BitMEX websocket for streaming realtime orderbook data. # Optimized for OrderBookL2 handling using Red and Bl...
generals.py
''' Generals.io Automated Client - https://github.com/harrischristiansen/generals-bot Client Adopted from @toshima Generals Python Client - https://github.com/toshima/generalsio ''' import logging import json import threading import time from websocket import create_connection, WebSocketConnectionClosedException im...
test_pool.py
import threading import time from sqlalchemy import pool, select, event import sqlalchemy as tsa from sqlalchemy import testing from sqlalchemy.testing.util import gc_collect, lazy_gc from sqlalchemy.testing import eq_, assert_raises, is_not_, is_ from sqlalchemy.testing.engines import testing_engine from sqlalchemy.te...
proc.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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...
_polling.py
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import logging import time import threading import uuid from typing import TYPE_CHECKING from azure.core.polling import PollingMethod, LROPoller, NoPolling from azure.c...
test_sb_server.py
#! /usr/bin/env python """Test the POP3 proxy is working correctly. Given no command line options, carries out a test that the POP3 proxy can be connected to, that incoming mail is classified, that pipelining is removed from the CAPA[bility] query, and that the web ui is present. The -t option runs a fake POP3 serve...
networkServer.py
import socket import threading import math import random import pickle import time #注意引用的问题 # palyers_cards = [[],[],[]] # def login(): def deal(palyers_cards): colors = ("黑桃", "草花", "红桃", "方片", "王牌") points = ("3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "2", "小王", "大王") #...
HueSync.pyw
from tkinter import messagebox from threading import Thread import cv2.cv2 as cv2 import numpy as np import pyautogui import requests import tkinter import pygubu import atexit import rgbxy import json import time import os class LinkButtonNotPressed(Exception): pass def get_bridge_ip(number=0): return requ...
__main__.py
import threading import sys import os import platform import subprocess import json import time import requests import datetime import netifaces import click from requests import ConnectionError from analysis import analyze_file from oui import oui from colors import * if os.name != 'nt': from pick import pick ...
test_processor.py
import mock import os import shutil import tempfile from threading import Thread import time import unittest from vixen.processor import Processor, Job, CommandFactory, \ PythonFunctionFactory, TaggerFactory, dump, load from vixen.tests.test_directory import make_data from vixen.project import Project, TagInfo c...
twisterlib.py
#!/usr/bin/env python3 # vim: set syntax=python ts=4 : # # Copyright (c) 2018 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import contextlib import string import mmap import sys import re import subprocess import select import shutil import shlex import signal import threading import concurrent.fu...
tf_util.py
import joblib import numpy as np import tensorflow as tf # pylint: ignore-module import copy import os import functools import collections import multiprocessing def switch(condition, then_expression, else_expression): """Switches between two operations depending on a scalar value (int or bool). Note that bot...
collection.py
# Copyright 2009-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
hedging.py
import json import os import queue import threading import asyncio from copy import copy import sys import logging import time from multiprocessing import Queue curPath = os.path.abspath(os.path.dirname(__file__)) rootPath = os.path.split(curPath)[0] rootPath = os.path.split(rootPath)[0] os.sys.path.append(rootPath) ...
main.py
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: main.py Description : 运行主函数 Author : JHao date: 2017/4/1 ------------------------------------------------- Change Activity: 2017/4/1: ----------------------------------------...
server.py
import threading import signal from concurrent import futures import queue import abc from functools import partial import grpc import click from google.protobuf import empty_pb2 as emp from pluto.interface.utils import paths, service_access from pluto.interface import directory from pluto.coms.utils import conversio...
GameLoop.py
print("""\ mmm mmmm mmm mmmm mmmm mmmm m" " #" " # # # " "# m" "m # "#mmm # "mmmm" mmm" # m # # "# # # "# "# # # "mmm" "mmm#" mm#mm "#mmm" "mmm#" #mm# """) import sys, configparser import time from SimpleGUICS2Pygame import simplegui_lib_fps from...
master_slackv2.py
#!/usr/bin/python3 import time import sys from datetime import datetime import csv import threading from multiprocessing import Process import configparser import fileinput import RPi.GPIO as GPIO import numpy as np import os import board import busio import adafruit_ads1x15.ads1015 as ADS from adafruit_ads1x15.anal...
jentu.py
# -*- encoding: utf-8 -*- from multiprocessing import Process, Queue from signal import signal, SIGINT from random import randint from settings import * import telebot import sqlite3 import json import time # import os ################# ## Threading ## ################# def signal_ctrl(signal, frame): print("You pr...
process_queue.py
################################### # File Name : process_queue.py ################################### #!/usr/bin/python3 import time import multiprocessing def set_data(q): p = multiprocessing.current_process() msg = "Hello World" q.put(msg) print ("[%s] set queue data : %s" % (p.name, msg)) def ge...
ip.py
import time import logging import socket import threading import fprime_gds.common.adapters.base import fprime_gds.common.logger LOGGER = logging.getLogger("ip_adapter") class IpAdapter(fprime_gds.common.adapters.base.BaseAdapter): """ Adapts IP traffic for use with the GDS ground system. This serves two diff...
vc_toolbox.py
import os import numpy as np from io import BytesIO import PIL.Image from IPython import display from scipy.spatial.distance import cdist import scipy.ndimage import lap # pip install lap import umap from math import floor, sqrt, ceil import copy import torch as t import torchvision as tv import torch.nn as nn from tq...
test_target_codegen_vulkan.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...
test_video.py
import cv2 import numpy as np import os import sys import random import math import skimage.io import time import matplotlib.pyplot as plt import threading import tensorflow as tf ROOT_DIR = os.path.abspath("../../") sys.path.append(ROOT_DIR) from mrcnn import utils import mrcnn.model as modellib from mrcnn.config im...
utils.py
from bitcoin.rpc import RawProxy as BitcoinProxy from btcproxy import BitcoinRpcProxy from collections import OrderedDict from decimal import Decimal from ephemeral_port_reserve import reserve from lightning import LightningRpc import json import logging import lzma import math import os import random import re import...
C10_mprocess.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- '多进程的练习' __author__ = 'Jacklee' # # 实现多进程的几种方式 # 如何创建外部进程 # 如何在进程间通讯 # # 1.使用fork()实现多进程 # 注意:仅限于Unix/Linux内核的系统 import os # os.getpid()读取当前进程的PID # print('Process (%s) start...' % os.getpid()) # 使用os.fork()复制当前进程, 该进程是当前进程的子进程 # 注意: fork()调用一次返回两次,第一次是父进程返回子进程的ID,第二次是...
github.py
from collections import defaultdict import threading from .. import BaseResponder from ..lib import MemoryCache, get_url, parse_command, catch_other from ...message import Message from ...signals import on_exception, message_out, config_changed class APIError(Exception): pass class EventParser(object): """C...
views.py
from logging import FileHandler, getLogger, INFO, Formatter from threading import Thread from flask import ( Flask, send_from_directory, request, Response, redirect, make_response, abort, ) from flask_mako import MakoTemplates, render_template from werkzeug.routing import BaseConverter fro...
launcher.py
import logging import os import signal import subprocess import threading import shlex from esrally import config, time, exceptions, client from esrally.mechanic import telemetry, cluster from esrally.utils import console, process, jvm logger = logging.getLogger("rally.launcher") def wait_for_rest_layer(es, max_att...
tracker-co.py
#!/usr/bin/env python # Tracking related import dlib, cv2 import numpy as np # Basic Modules import os, sys import argparse from threading import Thread from logIO import logCreate # HTTP related import requests # Cloud Server URL = 'http://yaolaoban.eva0.nics.cc:5000/correlate' # global varibles this_file_path = os....
NotificationConectaIT.py
#!/usr/bin/python3 import os import sys import json import psutil import subprocess pid = os.getpid() for proc in psutil.process_iter(['pid', 'name']): #jsonDecodeProc = json.loads(proc) #if(jsonDecodeProc['name'] == 'ConectaIT.exe'): inf = json.dumps(proc.info) inf2 = json.loads(inf) ...
wav_to_fbank.py
#!/usr/bin/env python3 # encoding: utf-8 # Copyright 2019 Thai-Son Nguyen # Licensed under the Apache License, Version 2.0 (the "License") import os import argparse import multiprocessing import numpy as np from scipy.io import wavfile from pynn.util import audio from pynn.io import kaldi_io def write_ark_thread(se...
multiproc.py
# Copyright 2011 Omniscale GmbH & Co. KG # # 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 ...
email.py
from threading import Thread from flask import current_app, render_template from flask_mail import Message from flask_mail import Mail from app import mail def send_async_email(app, msg): with app.app_context(): mail.send(msg) def send_email(to, subject, template, **kwargs): app = current_app._get_cu...
channel_handler.py
# ======================================================================= # # Copyright (C) 2018, Hisilicon Technologies Co., Ltd. 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 Redistrib...
iostream.py
# coding: utf-8 """Wrappers for forwarding stdout/stderr over zmq""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import atexit from binascii import b2a_hex from collections import deque try: from importlib import lock_h...
bot.py
import os import youtube_dl import telepotpro from random import randint from multiprocessing import Process from youtubesearchpython import VideosSearch from dotenv import load_dotenv from os.path import join, dirname dotenv_path = join(dirname(__file__), '.env') load_dotenv(dotenv_path) TOKEN = os.environ.get("TOKE...
model.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 ...
views.py
import json import os import time import subprocess import threading import requests from connector_api.models import Connector, ConnectorApp from django.conf import settings from django.shortcuts import render, redirect from django.http import JsonResponse from connector_api.serializers import ConnectorSerializer from...
deploy.py
__all__ = ['GeventSchedule'] import time import threading import schedule from BusinessCentralLayer.middleware.redis_io import * from BusinessCentralLayer.sentinel import noticer from BusinessLogicLayer.cluster import __task__ from config import REDIS_SECRET_KEY, SINGLE_TASK_CAP, CRAWLER_SEQUENCE, ENABLE_COROUTINE, L...
download_batch_files.py
from logging import Logger import threading from config import BaseConfig from google.cloud.storage import Client as GSClient, Blob def download_batch_into_memory(batch, bucket, inclue_metadata=True, max_threads=BaseConfig.MAX_THREADS_TO_DOWNLOAD_FILES): """Given a batch of storage filenames, download them into m...
pyminer.py
#!/usr/bin/python # # Copyright (c) 2011 The Voxels developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import ...
dx_refresh_db.py
#!/usr/bin/env python # DEPRECATED # Adam Bowen - Apr 2016 # This script refreshes a vdb # Updated by Corey Brune Oct 2016 # requirements # pip install --upgrade setuptools pip docopt delphixpy # The below doc follows the POSIX compliant standards and allows us to use # this doc to also define our arguments for the sc...
test_insert_20.py
import threading import numpy as np import pandas as pd import pytest from pymilvus import Index from base.client_base import TestcaseBase from utils.util_log import test_log as log from common import common_func as cf from common import common_type as ct from common.common_type import CaseLabel, CheckTasks prefix =...
scheduler_job.py
# -*- coding: utf-8 -*- # # 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 #...
run-tests.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 "Li...
goal_generation_node copy.py
#!/bin/python3 import time import rospy import std_msgs.msg as ros_std_msg import geometry_msgs.msg as ros_geom_msg from threading import Thread import numpy as np from datetime import datetime import tf import actionlib import move_base_msgs.msg as ros_mb_msg # -------------------- # GENERAL NOTES # - In this script...
crawl_info.py
""" Crawl info for further use """ import time import random import threading from fake_useragent import UserAgent from bs4 import BeautifulSoup import redis import urllib3 import requests urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) ua = UserAgent() db = redis.StrictRedis(host='127.0.0.1'...
main.py
# -*- coding: utf8 -*- import random import time import logging import tornado.ioloop import tornado.web from threading import Thread from tornado.options import define, options from tornado.httpserver import HTTPServer from spider import xici from check import checkProxy define("port", default=8080, type=8080, help="...
idx_server.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ idx_server.py - author: Pablo Caruana email: pablo dot caruana at gmail dot com date: 12/1/2016 """ import time import schedule import requests from flask import Flask, jsonify, request from threading import Thread import os from query_processing im...
get_urls_text.py
# -*- coding: utf-8 -*- from codecs import open import json import threading, queue import argparse import time import random import re from urllib.request import urlopen import pickle from bs4 import BeautifulSoup from nltk import word_tokenize from nltk.util import ngrams from collections import Counter from langdet...
run_loop.py
import rocketsimu.simulator as simu import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import argparse import multiprocessing import os import json import numpy as np import pandas as pd import quaternion from lib import kmlplot from lib.numpy2json import NumpyEncoder def run_simu(params, idx, fo...
jd_OpenCard.py
#!/bin/env python3 # -*- coding: utf-8 -* ''' 项目名称: JD_OpenCard Author: Curtin 功能:JD入会开卡领取京豆 CreateDate: 2021/5/4 下午1:47 UpdateTime: 2021/6/19 建议cron: 2 8,15 * * * python3 jd_OpenCard.py new Env('开卡有礼'); ''' version = 'v1.2.2' readmes = """ # JD入会领豆小程序 ![JD入会领豆小程序](https://raw.githubusercontent.com/curtinlv/JD-Script/...
main.py
#!/usr/bin/env python3 from multiprocessing import Process from time import sleep def snooze(): sleep(10) def main(): processes = [] for i in range(10000): process = Process(target=snooze) process.start() processes.append(process) for process in processes: process.jo...
review.py
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
__init__.py
""" objectstore package, abstraction for storing blobs of data for use in Galaxy. all providers ensure that data can be accessed on the filesystem for running tools """ import logging import os import random import shutil import threading import time from xml.etree import ElementTree import yaml try: from sqlalc...
executor.py
# Copyright 2019 The Meson development team # 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 ...
worker.py
import copy import os import subprocess import time from multiprocessing import Process from setproctitle import setproctitle import zmq from hayabusa import HayabusaBase from hayabusa.constants import Status from hayabusa.errors import unexpected_error from hayabusa.utils import time_str class Worker(HayabusaBase)...
_exit_scenarios.py
# Copyright 2016 gRPC 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 or agreed to in writing...
relay.py
#!/usr/bin/env python3 import hashlib import html import json import re import socketserver import sys import threading import time import configparser import requests import websocket socketserver.TCPServer.allow_reuse_address = True IRCRE = ('^(?::(\S+?)(?:!(\S+?))?(?:@(\S+?))? )?' # Nick!User@Host + '(\S+)(?: (?...
tcp_server.py
import socket import logging import threading import time from message_wrapper import * logger = logging.getLogger('tcp_server') logging.basicConfig(level=logging.INFO,format='%(asctime)s - %(message)s') class TcpServer(object): def __init__(self,port): self.port = port self.clients={} sel...
ssl_Process.py
# !/usr/bin/env python # -*- coding:utf-8 _*- # @Author: swang # @Contact: wang00sheng@gmail.com # @Project Name: SmartWalker-master # @File: ssl_loop.py # @Time: 2022/01/02/20:34 # @Software: PyCharm import os, sys code_dir = os.path.dirname(os.path.abspath(__file__)) module_dir = os.path.dirname(code_dir) project_d...
main_window.py
import re import os import sys import time import datetime import traceback from decimal import Decimal import threading import asyncio from typing import TYPE_CHECKING, Optional, Union, Callable, Sequence from electrum_mona.storage import WalletStorage, StorageReadWriteError from electrum_mona.wallet_db import Wallet...
test_partition.py
import time import random import pdb import threading import logging from multiprocessing import Pool, Process import pytest from utils.utils import * from common.constants import * from common.common_type import CaseLabel TIMEOUT = 120 class TestCreateBase: """ **********************************************...
browserTest.py
#:copyright: Copyright 2009-2010 by the Vesper team, see AUTHORS. #:license: Dual licenced under the GPL or Apache2 licences, see LICENSE. import webbrowser, unittest import multiprocessing, random, tempfile, os.path from vesper.utils import Uri from vesper.backports import json from vesper import app from vesper.web.r...
bit_server.py
""" bit_server.py - remote HTTP interface to bit-bangged FTDI port This runs as a web server, connect to port 8008 Change HTTP_PORT for different port number or supply alternate as args[1] Requires: - pylibftdi """ import sys import threading import time import webbrowser from http.server import HTTPServer, BaseHTT...
test_03_harness_app.py
"""Unit testing for the supervisor module. """ from multiprocessing import Pool, Process from os import environ from time import sleep from pytest import fixture, raises import docker CLIENT = docker.from_env() from src import controller_plugin @fixture(scope="function") def startup_brain(): old_log = environ....
node_test.py
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. 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 # # ...