source
stringlengths
3
86
python
stringlengths
75
1.04M
base_events.py
"""Base implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a c...
netcdf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test NetCDF driver support. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################...
server.py
import threading from flask import Flask from werkzeug.serving import make_server class Server: def __init__(self, app: Flask, host: str, port: int): self.server = make_server(host, port, app) self.context = app.app_context() self.context.push() def run(self): self.server.ser...
run.py
import os import threading import time import sys, getopt def client(i,results,loopTimes): print("client %d start" %i) command = "./single-cold_warm.sh -R -t " + str(loopTimes) r = os.popen(command) text = r.read() results[i] = text print("client %d finished" %i) def warmup(i,warmupTimes,a...
cli.py
# -*- coding: utf-8 -*- """ flask.cli ~~~~~~~~~ A simple command line application to run flask apps. :copyright: © 2010 by the Pallets team. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import ast import inspect import os import re import ssl import sys ...
main.py
import os from multiprocessing import Process, shared_memory from time import sleep from loguru import logger from initialization_system.rabbitmq import START_RABBITMQ from initialization_system.tarantool import START_TARANTOOL from configuration_manager.configuration_manager import CONFIGURATION_MANAGER from system.o...
power_monitoring.py
import random import threading import time from statistics import mean from cereal import log from common.params import Params, put_nonblocking from common.realtime import sec_since_boot from selfdrive.hardware import HARDWARE from selfdrive.swaglog import cloudlog CAR_VOLTAGE_LOW_PASS_K = 0.091 # LPF gain for 5s tau...
support.py
""" Assorted utilities for use in tests. """ from __future__ import print_function import cmath import contextlib import enum import errno import gc import math import os import shutil import subprocess import sys import tempfile import time import io import ctypes import multiprocessing as mp import numpy as np fro...
common_func.py
#!/usr/bin/env python # coding=utf-8 from __future__ import print_function, unicode_literals, division, absolute_import import sys import time import binascii import struct import collections import logging import socket import select import threading import traceback import functools try: # for pycharm type hinti...
processes.py
""" process.py Created by Thomas Mangin on 2011-05-02. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ import os import errno import time import subprocess import select import fcntl from exabgp.util import str_ascii from exabgp.util import bytes_ascii f...
test_subprocess.py
import unittest from unittest import mock from test import support import subprocess import sys import platform import signal import io import itertools import os import errno import tempfile import time import selectors import sysconfig import select import shutil import threading import gc import t...
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 #...
main.py
from tkinter import scrolledtext, ttk from functions.global_settings import possible_units from functions.event_logger import EventLogger from functions.coordinate_mover import CoordinateMover from functions.serial_reader import SerialReader, get_available_com_ports from functions.serial_handlers.all_handlers import en...
index.py
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import logging import os import shutil import subprocess import tempfile try: from threading import Thread except ImportErr...
runqueue.py
""" BitBake 'RunQueue' implementation Handles preparation and execution of a queue of tasks """ # Copyright (C) 2006-2007 Richard Purdie # # SPDX-License-Identifier: GPL-2.0-only # import copy import os import sys import stat import errno import logging import re import bb from bb import msg, event from bb import m...
main.py
#/* # * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more # * contributor license agreements. See the NOTICE file distributed with # * this work for additional information regarding copyright ownership. # * The OpenAirInterface Software Alliance licenses this file to You under # * the OAI Publ...
webcrawl.py
""" Plugins to analyze websites """ from concurrent.futures import ThreadPoolExecutor from dataclasses import dataclass from datetime import date from functools import lru_cache from html.parser import HTMLParser from http.client import HTTPResponse from logging import getLogger from urllib.error import URLError from u...
hive_demo.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/5/12 12:12 # @Author : ysy # @Site : # @File : hive_demo.py # @Software: PyCharm from hivepool.hive_pool import get_hive_pool, HivePool import threading import time import uuid import random host = "cdh070" port = 10000 database = "guotie" def ...
pyminer.py
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin 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...
utils.py
import concurrent.futures from collections.abc import Iterable import copy from distutils.version import LooseVersion import functools import hashlib import inspect import multiprocessing import queue import subprocess import threading import typing import uuid import warnings from audeer.core import tqdm __doctest_...
mikiedit.py
import os from multiprocessing import Process from PyQt4.QtCore import Qt, QDir, QFile, QFileInfo, QMimeData, QIODevice, QTextStream, QUrl from PyQt4.QtGui import QAction, QCursor, QFileDialog, QFont, QTextCursor, QTextEdit, QMessageBox from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest import markdown ...
main.py
import json from listener import Listener from reproducer import reproduce from unidecode import unidecode from register_commands import get_current_manager from commands import * from Gui import Gui from speech_recognition import UnknownValueError import Twitter import threading listener = Listener() manager = get_cu...
socketClient.py
from tornado import escape from tornado import gen from tornado import httpclient from tornado import httputil from tornado import ioloop from tornado import websocket from collections import deque import threading import json APPLICATION_JSON = 'application/json' DEFAULT_CONNECT_TIMEOUT = 60 DEF...
test_autograd.py
import contextlib import gc import sys import io import math import random import tempfile import time import threading import unittest import warnings from copy import deepcopy from collections import OrderedDict from itertools import product, permutations from operator import mul from functools import reduce, partial...
fakeAP.py
#!/usr/bin/env python import os from subprocess import Popen, PIPE import time import sys import re import signal import argparse import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * conf.verb = 0 from threading import Thread, Lock import socket import struct import fcntl ...
run.py
import sys import signal import threading import asyncio import aiohttp import conf_loader import notifier import bili_sched import printer import bili_statistics from console_cmd import ConsoleCmd from tasks.login import LoginTask from tasks.live_daily_job import ( HeartBeatTask, OpenSilverBoxTask, RecvD...
make-nixos-image.py
#!/usr/bin/env python3 import argparse import datetime import logging import os import pathlib import queue import re import threading import time import paramiko import scaleway.apis import tenacity logger = logging.getLogger(__name__) def get_minimal_ubuntu(all_images, region, instance_type)...
datasets.py
# Dataset utils and dataloaders import glob import logging import math import os import random import shutil import time from itertools import repeat from multiprocessing.pool import ThreadPool from pathlib import Path from threading import Thread import cv2 import numpy as np import torch import torch.nn.functional ...
fast_subdomain_scanner.py
import requests from threading import Thread, Lock from queue import Queue q = Queue() list_lock = Lock() discovered_domains = [] def scan_subdomains(domain): global q while True: # get the subdomain from the queue subdomain = q.get() # scan the subdomain url = f"http://{subdom...
xid_test.py
import unittest from xid import Xid TestXids = [ # taken from https://github.com/rs/xid/blob/master/id_test.go { 'xid': Xid([0x4d, 0x88, 0xe1, 0x5b, 0x60, 0xf4, 0x86, 0xe4, 0x28, 0x41, 0x2d, 0xc9]), 'ts': 1300816219, 'machine': ''.join(map(chr, [0x60, 0xf4, 0x86])), 'pid': 0xe4...
app.py
# ------------------------------------------------------------------------------ # Copyright IBM Corp. 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/licens...
_threadedselect.py
# -*- test-case-name: twisted.test.test_internet -*- # $Id: default.py,v 1.90 2004/01/06 22:35:22 warner Exp $ # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import generators """Threaded select reactor API Stability: unstable Maintainer: U{Bob Ippolito<mailto:bo...
ui_detection.py
# Copyright 2021 Variscite LTD # SPDX-License-Identifier: BSD-3-Clause import cv2 import numpy as np import threading import gi gi.require_versions({'GdkPixbuf': "2.0", 'Gtk': "3.0"}) from gi.repository.GdkPixbuf import Colorspace, Pixbuf from gi.repository import GLib, Gtk from pyvar.ml.engines.tflite import TFLite...
test.py
import argparse import glob 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_da...
plugin.py
""" Created by Manuel Peuster <manuel@peuster.de> Base class to simplify the implementation of new MANO plugins. """ import logging import json import time import threading from sonmanobase import messaging logging.basicConfig(level=logging.INFO) LOG = logging.getLogger("son-mano-base:plugin") LOG.setLevel(logging....
base_crash_reporter.py
# Electrum - lightweight Bitcoin client # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish...
estGPUSize.py
#Parts of code in this file have been taken (copied) from https://github.com/ml-jku/lsc #Copyright (C) 2018 Andreas Mayr from __future__ import print_function from __future__ import division import numpy as np import scipy import scipy.sparse import pandas as pd import itertools import pickle #import imp import os impo...
client.py
import socket import threading import sys import rsa import pickle import hashlib import json #Wait for incoming data from server #.decode is used to turn the message in bytes to a string challange = '' pubkey = '' privkey = '' email = '' host = "localhost" port = 1818 ''' connect(pubkey,privkey,email,challange) send...
BinaryOptionAlgo.py
from iqoptionapi.stable_api import IQ_Option import time, logging, configparser from datetime import datetime, date, timedelta from multiprocessing import Process import os import numpy as np logging.disable(level=logging.DEBUG) def get_balance(iqoapi): return iqoapi.get_balance() def get_payout(iqoapi, active...
player.py
# -*- coding: utf-8 -*- import subprocess import threading import os import logging from os.path import expanduser from sys import platform, version_info from sys import exit from time import sleep import json import socket logger = logging.getLogger(__name__) class Player(object): """ Media player class. Playing...
kilg.py
import time, os from multiprocessing import Process # This is a OS-specific call, it looks confusing but: # 1. "os.name" is a variable that determines the type of OS # that Python is currently operating inside of. "nt" = "windows", # else means another platform, e.g. MAC + LINUX. # 2. We use the "clear" or "cls"...
grapl_provision.py
import json import os import logging import sys import threading import time from hashlib import sha256, pbkdf2_hmac from typing import List from uuid import uuid4 import boto3 import botocore import pydgraph from grapl_analyzerlib.grapl_client import MasterGraphClient, GraphClient from grapl_analyzerlib.node_types im...
CoinManager.py
#!/usr/bin/python # -*- coding: utf-8 -*- import time import threading import logging import RPi.GPIO as GPIO class CoinManager(object): def __init__(self, pin): logging.info('Create CoinCounter instance') self.cash = 0 self.last_pulse = None self.pulses = 0 s...
_frame_instrument.py
# Pull in Python 3 string object on Python 2. import sys import logging import time import threading import zmq from collections import deque from queue import Queue, Empty from . import _instrument from . import _get_autocommit from . import _input_instrument from . import UncommittedSettings from . import NotDeploy...
scanner.py
from bhp3_class.packets import IP, ICMP import ipaddress import socket import sys import threading import time SUBNET = '192.168.1.0/24' MESSAGE = 'PYTHONRULES!' def udp_sender(): with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sender: for ip in ipaddress.ip_network(SUBNET).hosts(): s...
SmartParkingAPI.py
# USAGE # import the necessary packages import cameraSensor import carmotion from imutils.video import VideoStream from flask import Response from flask import Flask from flask import render_template import time import cv2 from livereload import Server from gpiozero import MotionSensor from gpiozero import LED import...
upload_api-v2.py
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import os, json, time, sys, thread, base64 import argparse import unicodedata import shutil import subprocess import threading # import dlib import math import time import os.path import Queue fr...
mnist.py
import argparse import tensorflow as tf from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets from tfmesos import cluster from threading import Thread, RLock parser = argparse.ArgumentParser() parser.add_argument('-w', '--nworker', type=int, default=1) parser.add_argument('-s', '--nserver', t...
databases_cache_mgr.py
from pickle_helper import reading_pkl from sets import Set import numpy as np import threading import time import os from relational_network_utilities import print_debug from relational_network_utilities import time_string class DatabasesCacheMgr(object): instance = None @classmethod def get_instanc...
part3.py
import threading import time total = 4 def creates_item(): global total for i in range(10): time.sleep(2) print(f'iteration {i}') total += 1 print('iterations done') def create_items_2(): global total for i in range(7): time.sleep(1) print(f'iteration...
Agent.py
import sys import os import Labyrinth import time import threading class Agent: num = 0 x = 0 y = 0 labyrinth = None callback = None def __init__(self, x, y, labyrinth, callback): self.num = time.time()*1000 self.x = x self.y = y self.labyrinth = labyrinth ...
javaapiplugin.py
import dlvhex from dlvhex import ID import hexlite import atexit import logging import os import re import sys import threading import time # this requires jpype to be installed and it requires a working Java runtime environment import jpype from jpype import java from jpype.types import * logging.info("starting JVM...
test.py
import threading import collections import sys is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as queue def isScalar(x): return not isinstance(x, (list, tuple)) def isList(x): return isinstance(x, (list)) def asString(x): return str(x) def makeDict(): return {'a': 1...
cukonchain2.py
# Importing the libraries import datetime import hashlib import base64 import json from flask import Flask, jsonify, request import requests from uuid import uuid4 from urllib.parse import urlparse from timeit import default_timer as timer import threading import random from numpy import random from RSA_everything im...
env.py
""" jupylet/env.py Copyright (c) 2020, Nir Aides - nir@winpdb.org 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, this li...
main.py
# -*- coding: utf-8 -*- import argparse import os import csv # import platform import gym import torch from torch import multiprocessing as mp from model import ActorCritic from optim import SharedRMSprop from train import train from test import test from utils import Counter parser = argparse.ArgumentParser(descrip...
lfi_stager.py
from src.platform.coldfusion.interfaces import CINTERFACES from src.module.deploy_utils import parse_war_path, _serve, waitServe, killServe from threading import Thread from base64 import b64encode from os.path import abspath from urllib import quote_plus from requests import get from src.core.log import LOG import sta...
scheduler.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set ts=4 sw=4 et ai: """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Background processes made simple --------------------------------- """ fr...
websocket_client.py
#!/usr/bin/python # -*- coding: utf-8 -*- # bittrex_websocket/websocket_client.py # Stanislav Lazarov import logging from ._logger import add_stream_logger, remove_stream_logger from threading import Thread from ._queue_events import * from .constants import EventTypes, BittrexParameters, BittrexMethods, ErrorMessage...
utils.py
import binascii import html import json as js import math import os import re import threading import unicodedata import xml.etree.cElementTree as Etree from collections import defaultdict from collections import namedtuple from io import BytesIO from queue import Queue import urllib3 from PIL import Image from PIL im...
ps2_alert_bot.py
import discord, json, math, schedule, time, sys, os from dotenv import load_dotenv from datetime import datetime import urllib.request as urlreq import threading import asyncio checking_enabled = False def getEventInfo(serverNumber): try: with urlreq.urlopen( f"https://census.daybreakgames...
onenote_auth.py
from oauthlib.oauth2 import TokenExpiredError from requests_oauthlib import OAuth2Session import datetime import json import logging import webbrowser from contextlib import suppress from http.server import HTTPServer, BaseHTTPRequestHandler from pathlib import Path from queue import Queue from threading import Thread ...
client3.py
import socket import sys from threading import Thread def send_message(name): while True: text = input() sock.sendall((name + '__' + text).encode()) if text == "exit": sock.close() sys.exit() def receive_message(): while True: data = sock.recv(1024) username = data.decode().split('__')[0] message...
EchoServerPlusHead.py
#!/usr/bin/env python3 # See https://docs.python.org/3.2/library/socket.html # for a description of python socket and its parameters # # Copyright 2018, Shaden Smith, Koorosh Vaziri, # Niranjan Tulajapure, Ambuj Nayab, Akash Kulkarni, and Daniel J. Challou # for use by students enrolled in Csci 4131 at the Universit...
joystick_creator.py
import sys import os import argparse import json import time import math from robopilot.utils import * from robopilot.parts.controller import JoystickCreatorController try: from prettytable import PrettyTable except: print("need: pip install PrettyTable") class CreateJoystick(object): def __init__(self)...
test_http_client.py
from mock_decorators import setup, teardown from flask import Flask, request from threading import Thread import urllib2 import os import ssl import time @setup('HTTP GET & POST requests') def setup_http_get(e): app = Flask(__name__) def shutdown_server(): func = request.environ.get('werkzeug.server.sh...
portscanner_clean.py
# ! Requires python 3.6 and up from socket import * #Imports everything from socket library from threading import * #Imports everything from threading library import argparse as argp #Import argparse as argp for arguement parsing from termcolor import colored as clrd #Import color text to the output, not neccessary b...
lisp-etr.py
#----------------------------------------------------------------------------- # # Copyright 2013-2019 lispers.net - Dino Farinacci <farinacci@gmail.com> # # 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 ...
processor_master.py
#!usr/bin/env python3 import os import logging import socket import threading from textwrap import dedent import ast import yaml import multiprocessing as mp import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import Time, TimeDelta import numpy as np from darc import DARCBase from da...
mongo.py
# from typing import List from datetime import datetime from queue import Queue import pymongo, threading class Mongo(object): def __init__(self, mongoConfig:dict, queue:Queue): self.__set_vars(mongoConfig) self.queue: Queue = queue self.client: pymongo.MongoClient = None self.datab...
tello.py
import socket import threading import time import numpy as np import libh264decoder class Tello: """Wrapper class to interact with the Tello drone.""" def __init__(self, local_ip, local_port, imperial=False, command_timeout=.3, tello_ip='192.168.10.1', tello_port=8889): """ Bi...
socketio_handlers.py
"""Flask-SocketIO handlers and utility functions""" import random, time, subprocess from flask import request from flask_socketio import send, emit#, join_room, leave_room from dominos.Engine import Engine from dominos import socketio """Settings""" parsed_args = {} keep_client_order = True class RoomTracker: def...
lisp.py
# ----------------------------------------------------------------------------- # # Copyright 2013-2019 lispers.net - Dino Farinacci <farinacci@gmail.com> # # 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...
abs_task.py
from abc import ABC from abc import abstractmethod import argparse from contextlib import contextmanager from distutils.version import LooseVersion import functools import logging import os from pathlib import Path import sys from typing import Any from typing import Callable from typing import Dict from typing import ...
SaveLoad.py
# Saving and Loading Functions # === IMPORT MODULES ============================================= import random, copy, threading, shutil import cPickle as pickle from collections import OrderedDict # Custom imports import GlobalConstants as GC import configuration as cf import TileObject, ItemMethods, UnitObject, Stat...
test_framework.py
from __future__ import print_function class AssertException(Exception): pass def format_message(message): return message.replace("\n", "<:LF:>") def display(type, message, label="", mode=""): print("\n<{0}:{1}:{2}>{3}".format( type.upper(), mode.upper(), label, format_message(message)) ...
framereader.py
import os import sys import glob import json import time import struct import tempfile import threading import xml.etree.ElementTree as ET import numpy as np if sys.version_info >= (3,0): import queue import pickle from io import BytesIO as StringIO else: import Queue as queue import cPickle as pickle from ...
test_leaks.py
""" Testing scenarios that may have leaked. """ from __future__ import print_function, absolute_import, division import sys import gc import time import weakref import threading import greenlet from . import TestCase from .leakcheck import fails_leakcheck try: from sys import intern except ImportError: # Py...
client.py
import socket import threading class Client: def __init__(self): self.create_connection() def create_connection(self): self.s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) while 1: try: print('ITS VILLADA ##### Sala de chat de 7mo B...
GUI.py
import ipywidgets as widgets import pythreejs as three from ..utils import ColorMap, Observer, utilities from ..visualization import colors from IPython.display import display as ipydisplay import threading from time import sleep import numpy as np class GUI(Observer): def __init__(self, drawable_mesh): ...
main.py
import time import asyncio import threading import click import sys import os # Python imports will be the end of us all sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) from raccoon_src.utils.coloring import COLOR, COLORED_COMBOS from raccoon_src.utils.exceptions import RaccoonExc...
TestSuite.py
import logging from .server import server from threading import Thread import time _Tests = [] def test(func): """register function to test suite""" _Tests.append(_Test(func)) def rerun(): global _Tests _Tests = [_Test(t.function) for t in _Tests] runTests() def runTests(): for t in _Tests...
app2.py
import logging import time import json from threading import Timer, Thread from requests import Session from signalr import Connection import breezy_robot_handler logging.basicConfig(level=logging.DEBUG) RHANDLER = breezy_robot_handler.RobotHandler() def signal_r_setup(): with Session() as session: ...
chat-app.py
import socket import sys import argparse import threading # set default values address = "127.0.0.1" port = 4444 username = "Me" othername = "Received" def recv_data_thread(socketObj): while True: try: data=socketObj.recv(1024) print(f"\n{othername}: {data.decode()}\...
runner.py
import time, subprocess, os.path, re, multiprocessing, threading from . import manifest from enum import Enum, auto from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions a...
file_helpers.py
import sys import codecs import re from functools import wraps from contextlib import contextmanager from collections import OrderedDict, defaultdict import json import multiprocessing as mp import threading import warnings import os try: basestring except NameError: basestring = (str, bytes) try: import ...
rewind.py
import logging import os import shlex import six import subprocess from threading import Lock, Thread from .connection import get_connection_cursor from .misc import format_lsn, parse_history, parse_lsn from ..async_executor import CriticalTask from ..dcs import Leader logger = logging.getLogger(__name__) REWIND_ST...
ssh.py
import logging from io import StringIO import select import xmlrpc.client from socketserver import BaseRequestHandler, ThreadingTCPServer from threading import Thread from time import sleep import paramiko from finorch.config.config import api_config_manager from finorch.transport.abstract_transport import AbstractT...
dpp-nfc.py
#!/usr/bin/python3 # # Example nfcpy to wpa_supplicant wrapper for DPP NFC operations # Copyright (c) 2012-2013, Jouni Malinen <j@w1.fi> # Copyright (c) 2019-2020, The Linux Foundation # # This software may be distributed under the terms of the BSD license. # See README for more details. import os import sys import ti...
test_DialogueServer.py
############################################################################### # PyDial: Multi-domain Statistical Spoken Dialogue System Software ############################################################################### # # Copyright 2015 - 2017 # Cambridge University Engineering Department Dialogue Systems Grou...
aiohttp_.py
""" This module defines an :py:class:`aiohttp.ClientSession` adapter that returns awaitable responses. """ # Standard library imports import atexit import asyncio import collections import threading from concurrent import futures from functools import partial # Third party imports try: import aiohttp except Impor...
http.py
import logging import base64 import random import os import ssl import time import copy from pydispatch import dispatcher from flask import Flask, request, make_response # Empire imports from lib.common import helpers from lib.common import agents from lib.common import encryption from lib.common import packets from li...
virtualcenter.py
# coding: utf-8 """Backend management system classes Used to communicate with providers without using CFME facilities """ from __future__ import absolute_import import atexit import operator import re import ssl import threading import time from datetime import datetime from distutils.version import LooseVersion from...
client.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys import time import json import random import logging import requests import threading import qrcode from lxml import etree logging.basicConfig() SPECIAL_USERS = ['newsapp', 'fmessage', 'filehelper', 'weibo', 'qqmail', 'tmessage', ...
test_decimal.py
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # oraz Facundo Batista <facundo at taniquetil.com.ar> # oraz Raymond Hettinger <python at rcn.com> # oraz Aahz (aahz at pobox.com) # oraz Tim Peters """ These are the test cases dla the D...
26'sHiSpam.py
import sys from g_python.gextension import Extension from g_python.hmessage import Direction from time import sleep import threading extension_info = { "title": "26'sHiSpam", "description": "hic: on&off&cho&pla ", "version": "0.2", "author": "funkydemir66" } ext = Extension(extension_in...
test_concurrency_py3k.py
import threading from sqlalchemy import exc from sqlalchemy import testing from sqlalchemy.testing import async_test from sqlalchemy.testing import eq_ from sqlalchemy.testing import expect_raises from sqlalchemy.testing import expect_raises_message from sqlalchemy.testing import fixtures from sqlalchemy.testing impor...
deepdriver_navigation_node.py
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
datasetbase.py
import redis import itertools import hashlib import cloudpickle import logging import threading import msgpack import lithops from lithopsext import utils from .core import _task_worker logger = logging.getLogger('lithops') DEBUG = True class DatasetBase: def __init__(self): self._partitions = [] ...
watcher.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright (c) 2013 Qin Xuye <qin@qinxuye.me> 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...