source
stringlengths
3
86
python
stringlengths
75
1.04M
netgear.py
""" =============================================== vidgear library source-code is deployed under the Apache 2.0 License: Copyright (c) 2019 Abhishek Thakur(@abhiTronix) <abhi.una12@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Licen...
hc_vitaminder.py
import threading from queue import Queue from enum import Enum, auto import serial import sys from datetime import datetime, timedelta, date, time import configparser # server message definitions (ones sent out from python): # id=00: heartbeat request # req bytes: # 0 - message ID 0x00 # 1-7 - ignored # ...
basic.py
#!/usr/bin/python3 import urllib.request, urllib.error, urllib.parse, unittest, json, hashlib, threading, uuid, time from functools import wraps try: import msgpack except: msgpack = None import os host = os.getenv('WEBDIS_HOST', '127.0.0.1') port = int(os.getenv('WEBDIS_PORT', 7379)) class TestWebdis(unittest.Test...
FLIR_server_utils.py
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/92_FLIR_server_utils.ipynb (unless otherwise specified). __all__ = ['CameraThread', 'GPIOThread', 'register', 'server', 'PORT'] # Cell # from boxfish_stereo_cam.multipyspin import * import FLIR_pubsub.multi_pyspin as multi_pyspin import time import zmq import threadi...
Responder.py
import logging import zipfile import requests from google_drive_downloader import GoogleDriveDownloader as gdd import threading import torch import torch.nn.functional as F from ChatBotAI.yt_encoder import YTEncoder from transformers import GPT2Config, GPT2LMHeadModel, GPT2Tokenizer FILTER_VALUE = -float('Inf') URL_...
bgapi.py
from __future__ import print_function # for Python 2/3 compatibility try: import queue except ImportError: import Queue as queue import logging import serial import time import threading from binascii import hexlify, unhexlify from uuid import UUID from enum import Enum from collections import defaultdict f...
run_squad_ColabTCPTrans_201910161146.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
v1_station_b_S14_nukex_200ulinput.py
from opentrons.types import Point import json import os import math import threading from time import sleep metadata = { 'protocolName': 'Version 1 S13 Station B NukEx (200µl sample input)', 'author': 'Nick <ndiehl@opentrons.com', 'apiLevel': '2.3' } NUM_SAMPLES = 8 # start with 8 samples, slowly increas...
server_utils_test.py
# Copyright 2020, 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...
test_oddball.py
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Oddball cases for testing coverage.py""" import os.path import sys from flaky import flaky import pytest import coverage from coverage import env from coverag...
dataset_adapter.py
"""Author: Brandon Trabucco Utility class for serializing ImageMetadata objects into a dataset. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import random import threading import sys import os.path from da...
subprocess_server.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 us...
example_rpc_client.py
import re import os from lxml import etree import time from PyWeChatSpy.command import * from PyWeChatSpy.proto import spy_pb2 from threading import Thread from google.protobuf.descriptor import FieldDescriptor as FD from rpc_client_tools import * import logging from queue import Queue contact_list = [] chatroom_list =...
test_general.py
""" Collection of tests for unified general functions """ # global import os import math import time import einops import pytest import threading import numpy as np from numbers import Number from collections.abc import Sequence import torch.multiprocessing as multiprocessing # local import ivy import ivy.functional....
chat_client.py
#!/usr/bin/env python3 """Script chat del client utilizzato per lanciare la GUI Tkinter.""" from socket import AF_INET, socket, SOCK_STREAM from threading import Thread import tkinter as tkt ''' Funzione per far partire il client con i dati in ingresso ''' def client_func(host, port): """ Funzione che ha...
helpers.py
""" Helper functions file for OCS QE """ import base64 import datetime import hashlib import json import logging import os import re import statistics import tempfile import threading import time import inspect from concurrent.futures import ThreadPoolExecutor from subprocess import PIPE, TimeoutExpired, run from uuid ...
wallet_multiwallet.py
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a bitcoind node can load multiple wallet files """ import os import shut...
frame_handler.py
import threading import time import gc from d3dshot import D3DShot from typing import Any, Union, List, Tuple, Optional, Callable from torch import Tensor class WindowsFrameHandler(): """ Handles a d3dshot instance to return fresh frames. """ def __init__(self, d3dshot: D3DShot, frame_transfor...
plotting.py
"""Pyvista plotting module.""" import pathlib import collections.abc from functools import partial import logging import os import textwrap import time import warnings import weakref from functools import wraps from threading import Thread import imageio import numpy as np import scooby import vtk from vtk.util impor...
test_ftplib.py
"""Test script for ftplib module.""" # Modified by Giampaolo Rodola' to test FTP class, IPv6 and TLS # environment import ftplib import asyncore import asynchat import socket import io import errno import os import threading import time try: import ssl except ImportError: ssl = None from u...
controller.py
import glob import json import os import re import shutil import subprocess import tarfile import time import traceback from datetime import datetime from math import floor from pathlib import Path from threading import Thread from typing import List, Set, Type, Tuple, Dict, Iterable import requests from bauh.api.abs...
helpers.py
from workflow.WF_0_scrape_web.WF_0_scrape_web import run_script_0 from workflow.WF_0_5_extract.WF_0_5_extract import run_script_0_5 from workflow.WF_1_import_demos.WF_1_import_demos import run_script_1 from workflow.WF_2_parse_run_data.WF_2_parse_run_data import run_script_2 from workflow.WF_3_compile_fasta.WF_3_compil...
tasks.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python from collections import OrderedDict, namedtuple, deque import errno import functools import importlib import json import logging import os import shutil import stat import tempfile import time import traceback from distutils.di...
FileChecker.py
from watchdog.events import FileSystemEventHandler from watchdog.observers.polling import PollingObserver from PIL import Image from pystray import Menu, MenuItem, Icon from tkinter import filedialog from tkinter import ttk import tkinter import datetime as dt import threading import pystray import json import sys impo...
b.py
#encoding: utf-8 from flask import Flask,render_template, request, redirect, url_for, session, g import config from models import User, Question, Answer from exts import db import csv, operator,os from sqlalchemy import or_ from decorators import login_required from werkzeug.utils import secure_filename from gevent imp...
test_scheduler.py
import unittest from datetime import datetime, timedelta import os import signal import time from dateutil.relativedelta import relativedelta from threading import Thread from rq import Queue from rq.compat import as_text from rq.job import Job import warnings from rq_scheduler import Scheduler from rq_scheduler.utils...
ComputeNodeTest.py
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
ant.py
# Ant # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> # # 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, m...
test_p2p_grpform.py
#!/usr/bin/python # # P2P group formation test cases # Copyright (c) 2013, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import logging logger = logging.getLogger(__name__) import time import threading import Queue import hwsim_utils d...
runner.py
"""Run Home Assistant.""" import asyncio from concurrent.futures import ThreadPoolExecutor import dataclasses import logging import sys import threading from typing import Any, Dict, Optional from homeassistant import bootstrap from homeassistant.core import callback from homeassistant.helpers.frame import warn_use #...
executor.py
import functools import importlib import logging import multiprocessing import os import time from typing import Optional import celery import requests from openff.bespokefit.schema.fitting import BespokeOptimizationSchema from openff.utilities import temporary_cd from beflow.services import settings from beflow.serv...
tcp.py
__copyright__ = """ Copyright 2017 the original author or 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 ...
master.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...
test_qmock.py
from collections import OrderedDict import signal import sys from threading import Thread import unittest import qmock from qmock._python_compat import get_thread_id, mock # arbitrary targets for qmock.patch() tests import datetime, json, xml.etree.ElementTree DATETIME_DATE = "datetime.date" JSON_LOADS = "json.loads"...
main.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # filename: main.py # modified: 2019-09-11 import os import time from optparse import OptionParser from multiprocessing import Process, Manager, Queue from autoelective import __version__, __date__ from autoelective.config import AutoElectiveConfig from autoelective.parse...
parameter_server.py
import argparse import os import time from threading import Lock import torch import torch.distributed.autograd as dist_autograd import torch.distributed.rpc as rpc import torch.multiprocessing as mp import torch.nn as nn import torch.nn.functional as F from torch import optim from torch.distributed.optim import Distr...
eurekaclient.py
""" Eureka Client """ import json import logging import os import random import time from threading import Thread try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin import dns.resolver from .ec2metadata import get_metadata from .httpclient import HttpClientObject, Api...
alpaca_discovery.py
#!/usr/bin/env python3 """Provides the ability to find IPv4 ASCOM Alpaca servers on the local networks. Uses the netifaces library to find the broadcast IPs that can be used for sending the UDP discovery message. Note that I've chosen to omit support for IPv6 because I don't need it for testing Tiny Alpaca Server. T...
plugin.py
import asyncio import logging import locale import threading import zmq import zmq.asyncio import tempfile import argparse import sys __author__ = "tigge" plugin_argparser = argparse.ArgumentParser(description="Start a platinumshrimp plugin") plugin_argparser.add_argument( "--socket_path", type=str, defau...
regression.py
#!/usr/bin/env python3 from argparse import ArgumentParser import sys import os import subprocess import re import glob import threading import time DESCRIPTION = """Regressor is a tool to run regression tests in a CI env.""" class PrintDotsThread(object): """Prints a dot every "interval" (default is 300) secon...
client.py
from base64 import b64encode from engineio.json import JSONDecodeError import logging import queue import signal import ssl import threading import time import urllib try: import requests except ImportError: # pragma: no cover requests = None try: import websocket except ImportError: # pragma: no cover ...
Multithreading.py
import threading from threading import * import time def sqr(n): for x in n: time.sleep(1) print('Remainder after dividing by 2',x%2) def cube(n): for x in n: time.sleep(1) print('Remainder after dividing by 3',x%3) n=[1,2,3,4,5,6,7,8] start=time.time() t1=Thread(tar...
main.py
from face_detection import Detector from face_verification.OneShotFaceVerification import Verifier from data_source import CCTV import cv2 from utils import * import os from dotenv import load_dotenv from menu_pages import * import json from threading import Thread import time from multiprocessing import Process detec...
conftest.py
"""Define general test helper attributes and utilities.""" import ast import contextlib import functools import http.server import importlib import inspect import io import pkgutil import socketserver import sys import tempfile import threading import cupy as np import pytest from moviepy.video.io.VideoFileClip imp...
test_capi.py
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. import os import pickle import random import re import subprocess import sys import sysconfig import textwrap import time import unittest from test import support from te...
test_speed.py
import time import asyncio import threading import concurrent import itemdb # %% More theoretical test, without using an actual ItemDB executor = concurrent.futures.ThreadPoolExecutor( max_workers=None, thread_name_prefix="itemdb" ) async def run_in_thread(func, *args, **kwargs): loop = asyncio.get_event_...
worker.py
#!/usr/bin/python3 import time try: import queue except ImportError: import Queue as queue import multiprocessing from threading import Event from threading import Thread from os import getpid import mapnik pool = {} class TileWorker(multiprocessing.Process): def __init__(self, mmap, image, job_queue, ...
supervisor.py
# 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/LICENSE-2.0 # # Unless required by applica...
server.py
# -*- coding: utf-8 -*- """ DNS server framework - intended to simplify creation of custom resolvers. Comprises the following components: DNSServer - socketserver wrapper (in most cases you should just need to pass this an appropriate resolver instance an...
main.py
import sublime import sublime_plugin import os import threading # import datetime # import sys, xdrlib # import json # import random # from . import xlwt # from . import requests from . import util from . import codecreator from . import setting from . import xlsxwriter from .requests.exceptions import RequestExceptio...
core.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 #...
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 - ...
multiexec.py
''' redis-事务(伪) 将几个命令一起执行 ''' import time,threading import rediscommon r = rediscommon.r def erro_show(): print(r.incr('notrans:')) time.sleep(.1) r.incr('notrans:',-1) def right_show(): pipline = r.pipeline() pipline.incr("trans:") time.sleep(.1) pipline.incr("trans:", -1) print(pipl...
tulip_facebook.py
from tulip import * import facebook import tempfile import sys if sys.version_info[0] == 3: from urllib.request import urlopen import queue as Queue else: from urllib2 import urlopen import Queue import os import threading maxThreadsDl = 8 nbThreadsDl = 0 threadJobs = Queue.Queue() threadsPool = [] runThread =...
test_Future.py
"""Unit Tests for the Future class""" import sys import threading import time import pytest from ginga.misc.Future import Future, TimeoutError class _TestError(Exception): pass class TestFuture(object): def setup_class(self): self.future_thread = None def test_init(self): test_futur...
magnet.py
import shutil import tempfile import os.path as pt import sys import libtorrent as lt from time import sleep import json import requests import multiprocessing from Magnet_To_Torrent2 import magnet2torrent jobs = [] count = 0 page = 0 for i in range(0, 10000): if page == 0: url = "https://nyaa.pantsu.cat...
test_pyepics_compat.py
#!/usr/bin/env python # unit-tests for ca interface # Lifted almost exactly from pyepics # The epics python module was orignally written by # # Matthew Newville <newville@cars.uchicago.edu> # CARS, University of Chicago # # There have been several contributions from many others, notably Angus # Gratton <angus.gr...
test_advanced.py
# coding: utf-8 from concurrent.futures import ThreadPoolExecutor import json import logging import random import sys import threading import time import numpy as np import pytest import ray.cluster_utils import ray.test_utils from ray.test_utils import client_test_enabled from ray.test_utils import RayTestTimeoutEx...
decode.py
import logging import os import signal import socket import threading from collections import UserDict from datetime import datetime, timedelta, timezone from operator import itemgetter from pathlib import Path from typing import ( Any, Callable, Dict, Iterable, Iterator, List, Optional, ...
launch.py
import discord.http; discord.http.Route.BASE = "https://discordapp.com/api/v9" import os import asyncio import multiprocessing import requests import signal import logging; log = logging.getLogger(__name__) from backend import ShardedBotInstance, config class Supervisor(object): def __init__(self, loop): ...
sdk_worker.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 us...
test_cover_type_checking.py
""" The import like if TYPE_CHECKING: import bla_bla Only covered after reloading module with TYPE_CHECKING = True. """ from importlib import reload from multiprocessing.context import Process import lightweight.cli import lightweight.content.content_abc import lightweight.content.copies import lightweight.conten...
GenerateDatasetBBOX.py
import threading import cv2 as cv import numpy as np import pickle import time import os cap = cv.VideoCapture(0) pastas = sorted(os.listdir("DatasetBBOX")) pastas = pastas[::-1] dirr = pastas.pop() print(dirr) count = len(os.listdir("DatasetBBOX/"+dirr)) ready = False MODE = True #480-250, ...
client.py
#!/usr/bin/env python """ SecureChat client: communicates with server and initializes user interface. """ import socket import threading import sys import binascii import argparse from server import DEFAULT_PORT from dhke import DH, DH_MSG_SIZE, LEN_PK from cipher import Message from cli import CLI __author__ = "spec...
test_io.py
"""Unit tests dla the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO oraz StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything inaczej w the io module # * test_univnewlines...
python_ls.py
# Copyright 2017 Palantir Technologies, Inc. from functools import partial import logging import os import socketserver import threading from pyls_jsonrpc.dispatchers import MethodDispatcher from pyls_jsonrpc.endpoint import Endpoint from pyls_jsonrpc.streams import JsonRpcStreamReader, JsonRpcStreamWriter from . imp...
function_mod.py
from threading import Thread from datetime import datetime import flask import requests import feedparser import re from webapp import app, db_log_mod, db_rss_channel_mod, db_rss_item_mod def requester(url: str) -> tuple: """ Для проверки доступности URL и RSS-контента на нём. И получения некоторых парам...
detect_simple2.py
#-*- coding:utf-8 -*- from detect_simple import detect from PIL import Image import paho.mqtt.client as mqtt import cv2 import argparse import time import threading import queue q = queue.Queue() i = 0 def on_connect(client, userdata, flags, rc): if rc == 0: print("connected OK") else: print("...
webhook.py
from flask import Flask, request import sys import threading import datetime import logging class WebHook: class __WebHook: def __init__(self, port): self.app = Flask(__name__) self.port = port cli = sys.modules['flask.cli'] cli.show_server_banner = lambda *...
runtests.py
#!/usr/bin/env python from __future__ import print_function import atexit import os import sys import re import gc import heapq import locale import shutil import time import unittest import doctest import operator import subprocess import tempfile import traceback import warnings import zlib import glob from context...
main-checkpoint.py
#!/usr/bin/env python3 import argparse from collections import Counter from multiprocessing import set_start_method import pdb import re import sys import time import copy import numpy as np import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F ...
map_dataset_op_test.py
# Copyright 2017 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...
workflows_scaling.py
import functools import json import os import random import sys from threading import Thread from uuid import uuid4 galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) sys.path[1:1] = [ os.path.join( galaxy_root, "lib" ), os.path.join( galaxy_root, "test" ) ] try: ...
darknet_websocket_demo.py
from ctypes import * #from multiprocessing import Process, Queue import queue import time from threading import Lock,Thread from fastapi import FastAPI from fastapi import Request from fastapi import WebSocket, WebSocketDisconnect import uvicorn #from yolo_service import * import socket import random from typing import...
stride-ios-relay.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # stride-ios-relay.py - Stride TCP connection relay for iOS devices to Windows developer host (using usbmuxd) # # Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp) #...
enhanced_csi.py
""" Advanced CSI video services for NVIDIA Jetson products. A set of utility services that can be used for capturing and gathering statistics on a csi video streams. Services include real time fps statistics on inbound frames from the camera and fps on displaying frames for the application. Other utilies include ca...
graphql_client.py
import websocket import threading import random import string import json import time from six.moves import urllib class GraphQLClient: def __init__(self, endpoint, session=None): self.endpoint = endpoint self.session = session self.token = None self.headername = None def exe...
bridge.py
#!/usr/bin/env python3 import argparse import atexit import carla # pylint: disable=import-error import math import numpy as np import time import threading from cereal import log from typing import Any import cereal.messaging as messaging from common.params import Params from common.realtime import Ratekeeper, DT_DMO...
test_collection.py
import numpy import pandas as pd import pytest from pymilvus import DataType 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 from utils.utils import * from...
animationcontroller.py
# led-control WS2812B LED Controller Server # Copyright 2019 jackw01. Released under the MIT License (see LICENSE for details). import math import random import time import traceback import RestrictedPython import copy from threading import Event, Thread import ledcontrol.animationpatterns as patterns import ledcontr...
old_install.py
#!/usr/bin/env python # TODO: add installer support for membasez import Queue import copy import getopt import os import re import socket import sys from datetime import datetime from threading import Thread from Cb_constants import CbServer sys.path = [".", "lib", "pytests", "pysystests", "couchbase_utils", ...
rate_limited.py
""" by oPromessa, 2017 Published on https://gist.github.com/gregburek/1441055#gistcomment-2369461 Inspired by: https://gist.github.com/gregburek/1441055 Helper class and functions to rate limiting function calls with Python Decorators """ # ------------------------------------------------------------...
screen.py
import ui import numpy import matplotlib.image as im import io import Image import threading class Screen(ui.View): def __init__(self,w,h): self.width=w self.height=h self.S=numpy.zeros((w,h,3)) self.B=io.BytesIO() ui.Image.from_data(self.B.getvalue()) im.imsave(self.B,self.S,format='jpg') self.B.seek(0...
chatter.py
import re import os import sys import copy import json import time import emoji import pyDes import queue import random import signal import socket import threading import netifaces from datetime import datetime from termcolor import colored ip_dict = {} chat_dict = {} msg_formats = {} new_msg_dict = {} profile_dict =...
test_fakeredis.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from time import sleep, time from redis.exceptions import ResponseError import inspect from functools import wraps import os import sys import threading from nose.plugins.skip import SkipTest from nose.plugins.attrib import attr import redis import redis.client import fak...
trezor.py
import traceback import sys from typing import NamedTuple, Any, Optional, Dict, Union, List, Tuple, TYPE_CHECKING from electrum_ltc.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException from electrum_ltc.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path from electrum_ltc impo...
autoreload.py
# -*- coding: utf-8 -*- # # Copyright (C)2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consis...
main.py
import sys import os import ode import logging import threading from time import sleep, time from genie_python.genie_startup import * import pv_server import render from configurations import config_zoom as config from collide import collide, CollisionDetector from geometry import GeometryBox from move import move_all...
_wood.py
from __future__ import annotations from typing import Union import sys import inspect import json from threading import Thread import math import select import struct from interfaces import ASerial, AMessage, AMedium from utils import util, dbgprint, errprint from . import encoder AnsProtocol = { 'dump': '10', ...
run.py
import logging import threading,sys,os,webbrowser,time import serial,serial.tools.list_ports import SimpleHTTPServer, BaseHTTPServer, SocketServer from websocket_server import WebsocketServer from Tkinter import * import ttk,tkMessageBox class ThreadingSimpleServer(SocketServer.ThreadingMixIn,BaseHTTPServer.HTTPServer...
test_etcd_client.py
# Copyright 2020 The FedLearner 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...
unicorn_binance_websocket_api_manager.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: unicorn_binance_websocket_api/unicorn_binance_websocket_api_manager.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api # Documentation: https://oliver-zehentleitner.github.io/uni...
base.py
# Copyright 2014 ETH Zurich # # 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, sof...
freeze_frame.py
#!/usr/bin/env python # Copyright (c) 2017, Elaine Short, SIM Lab # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this...
pythonforward.py
import select import socket import threading from robot.utils import PY2, WINDOWS from .logger import logger if PY2 and WINDOWS: import win_inet_pton try: import SocketServer except ImportError: import socketserver as SocketServer def check_if_ipv6(ip): try: socket.inet_pton(socket.AF_INET6, i...
base_crash_reporter.py
# Electrum - lightweight DECENOMY Standard Wallet # # 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,...
graph.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020 Alibaba Group Holding 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...
__init__.py
#!/usr/bin/env python3 # # Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved. # # Licensed under the MIT License. See the LICENSE accompanying this file # for the specific language governing permissions and limitations under # the License. # # # Copy this script to /sbin/mount.efs and make su...
_driver.py
#! /usr/bin/env python # coding: utf-8 import serial import threading from Queue import Queue import struct class Driver: def __init__(self, port): self.port = port self.ser = None self.buzzer_state = False self.led_state = False # 定义回调函数 self.battery_callback = ...
setup_hosts.py
import argparse from common_funcs import run_cmd from common_funcs import run_cmd_single from common_funcs import sed from common_funcs import start_cmd_disown from common_funcs import start_cmd_disown_nobg from common_funcs import upload_file from common_funcs import run_script from common_funcs import fetch_file_sing...