source
stringlengths
3
86
python
stringlengths
75
1.04M
trezor.py
import traceback import sys from typing import NamedTuple, Any from electrum_mue.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException from electrum_mue.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT from electrum_mue.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path from electrum_...
__init__.py
from flask import Flask from config import DevConfig, ProdConfig import threading app = Flask(__name__) app.config.from_object(DevConfig) from app import routes, control, mock # Start the control thread if it isn't running if "ControlThread" not in [thread.name for thread in threading.enumerate()]: co...
inc_dcm2bids.py
#! usr/bin/env python # ## PIPELINE: inc_dcm2bids.py # ## USAGE: python3 inc_dcm2bids --template=<templatefile> --trange=<days> [OPTIONS] # * requires python3, freesurfer, FSL (calls FSL via python subprocess) # # ## Author(s) # # * Amy K. Hegarty, Intermountain Neuroimaging Consortium, University of Colorado Bould...
io.py
import datetime import json import logging import threading import time import os import requests from .util import FrozenDict log = logging.getLogger(__name__) class PeriodicalOperation: def __init__(self, interval, clock=time.time): self.clock = clock self.interval = interval self.loc...
tf_util.py
import copy import os import functools import collections import multiprocessing import numpy as np import tensorflow as tf from tensorflow.python.client import device_lib from stable_baselines import logger def is_image(tensor): """ Check if a tensor has the shape of a valid image for tensorboard loggi...
Singleton.py
import threading class Singleton(object): _instance_lock = threading.Lock() def __new__(cls, *args, **kwargs): if not hasattr(Singleton, "_instance"): with Singleton._instance_lock: if not hasattr(Singleton, "_instance"): Singleton._instance = object.__n...
speculos.py
import os.path import threading import socket import atexit import logging import docker from . import dongle CommException = dongle.CommException logger = logging.getLogger('speculos') class SpeculosContainer: """ `SpeculosContainer` handles running the Bolos App under test within the `speculos` Dock...
dbserver.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2016-2018 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
trezor.py
import threading from binascii import hexlify, unhexlify from electrum.util import bfh, bh2u, versiontuple from electrum.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, TYPE_ADDRESS, TYPE_SCRIPT) from electrum import constants from electrum.i18n import _ from electrum.plugins i...
test_request.py
import asyncio import threading from urllib import request import aiohttp_jinja2 import pytest from ddtrace import config from ddtrace.contrib.aiohttp.middlewares import trace_app from ddtrace.contrib.aiohttp.patch import patch from ddtrace.contrib.aiohttp.patch import unpatch from ddtrace.pin import Pin from tests.u...
trainer_adv.py
# Copyright 2019 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
__init__.py
import time import importlib import traceback from threading import Thread import task.services.task as task from task.services.TaskLog import * from config import * def monitor_infinite(): print("Starting Task Runner ...") while True: monitor_once() time.sleep(5) # loop every 5s # Monitor T...
cli.py
import os import sys import tempfile import threading from contextlib import contextmanager import click import six from dagster import check from dagster.cli.workspace import Workspace, get_workspace_from_kwargs, workspace_target_argument from dagster.cli.workspace.cli_target import WORKSPACE_TARGET_WARNING from dags...
samplepacketprocessor.py
import grpc import EventNotificationProto_pb2 import ServicesProto_pb2_grpc import threading from ryu.lib.packet import packet import array # A Simple packet processor. def packetprocessor(): channel = grpc.insecure_channel('localhost:50051') eventNotificationStub = ServicesProto_pb2_grpc.EventNotificationS...
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....
test_async_cached_property.py
# -*- coding: utf-8 -*- import asyncio import time import unittest from threading import Lock, Thread from freezegun import freeze_time import cached_property def unittest_run_loop(f): def wrapper(*args, **kwargs): coro = asyncio.coroutine(f) future = coro(*args, **kwargs) loop = asyncio.g...
gui.py
import os import threading from pathlib import Path from zipfile import ZipFile import cv2 import tensorflow as tf from moviepy.audio.io.AudioFileClip import AudioFileClip from moviepy.video.io.VideoFileClip import VideoFileClip from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QRect, QSize, Qt, QUrl...
utilities.py
"""Utility functions for PyNLPIR unit tests.""" import functools from threading import Thread def timeout(timeout): """Executes a function call or times out after *timeout* seconds. Inspired by: http://stackoverflow.com/a/21861599. Example: func = timeout(timeout=1)(open) try: func('tes...
subproc_vec_env.py
import numpy as np from multiprocessing import Process, Pipe from src.common.vec_env import VecEnv def worker(remote, env_fn_wrapper): env = env_fn_wrapper.x() while True: cmd, data = remote.recv() if cmd == 'step': ob, reward, done, info = env.step(data) if done: ...
server.py
import os import yaml import json import time import base64 import random import hashlib import asyncio import requests import markdown import threading import subprocess import tornado.web import tornado.ioloop import tornado.options import tornado.httpserver from tools import make_json, solr_tools from robot import c...
email_.py
from threading import Thread from flask import current_app, render_template from flask_mail import Message from . 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_current_object() m...
ioloop_test.py
from concurrent.futures import ThreadPoolExecutor from concurrent import futures from collections.abc import Generator import contextlib import datetime import functools import socket import subprocess import sys import threading import time import types from unittest import mock import unittest from tornado.escape im...
onedrive.py
import base64 import random import os import re import time from datetime import datetime import copy import traceback import sys import json from pydispatch import dispatcher from requests import Request, Session #Empire imports from lib.common import helpers from lib.common import agents from lib.common import encry...
main.py
import sys from threading import Thread from connection import TcpConnection from proto.tcp_packet_pb2 import TcpPacket class Chat(): def __init__(self): self.connection = TcpConnection() self.packet = TcpPacket() def createLobby(self, maxPlayers, *args): payload = self.packet.CreateLobbyPacket() ...
plugin.py
""" Plugin is the definition of the plugin interface class as well as extensible utility interfaces that can be used to create Plugins quickly and easily. Plugin is designed to be similar to Command and Reaction interface classes while being more versatile. @author: NGnius """ import asyncio, time, traceback from mu...
example.py
import tensorflow as tf from multiprocessing import Process, Queue from time import sleep import model import numpy as np def generate_noised_data(size=1000): t = np.arange(start=0.0, stop=2*np.pi, step=size) noise = np.random.random(size=size) * 0.1 x = np.sin(t) y = x + noise x = np.expand_dims...
thread.py
# curio/thread.py # # Not your parent's threading __all__ = [ 'AWAIT', 'async_thread', 'async_context', 'async_iter', 'AsyncThread', 'is_async_thread' ] # -- Standard Library import threading from concurrent.futures import Future from functools import wraps from inspect import iscoroutine # -- Curio from . import ...
run_flood.py
# Plutus Bitcoin Brute Forcer # Made by Isaac Delly # https://github.com/Isaacdelly/Plutus import os import multiprocessing import plutus import newKeyGen import hashIterator def main(database): print('Working...') baseHash = os.urandom(32) incrementing = bytearray(baseHash) decrementing = bytearray(baseHash)...
record_tape.py
import os, csv, threading, time class RecordTape(object): def __init__(self, real_exit, save_dir, region, image_box, map_box): self.real_exit = real_exit self.save_dir = save_dir self.region = region ...
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...
common.py
import socket import zeroconf # DO: pip3 install zeroconf import threading import sched, time def get_ip(): with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s: s.connect(("1.2.3.4", 1)) # dummy connect return s.getsockname()[0] class ServerSocket: MSGLEN = 512 def __init__(sel...
Triathlon-Analyzer.py
#!/usr/bin/python # Howto, Code license, Credits, etc: http://code.google.com/B/BCI-Project-Triathlon/ noGL = False # Set noGL to True for disabling the use of OpenGL (to gain speed, or to avoid python-wx-opengl problems) import numpy import wx import math import threading import random import sys import os import...
util.py
#!/usr/bin/env pythen """ShutIt utility functions. """ #The MIT License (MIT) # #Copyright (C) 2014 OpenBet Limited # #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, inclu...
sparkJobProgressMonitor.py
# ------------------------------------------------------------------------------- # Copyright IBM Corp. 2017 # # 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...
MEGAHITServer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\ JSONRPCError, Inva...
chat.py
import socket import os from _thread import * import threading import time import sys #CONFIGS PORT=5000 messages = {} HOST='' USERNAME='' def clear(): os.system('clear') #GETS USERNAME def get_username(): clear() global USERNAME print("Welcome to Python Chat!\n\n") USERNAME = input("To contin...
depcheck.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2016,2017 Christoph Reiter # # 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...
GraphGadgetTest.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...
server.py
import socket, threading hostname = socket.gethostname() # STUFF workers = [] Job_key = "THIS IS A JOB TASK" server_private_key = "8d6fsdfh39ur893uruf86we7f58734y uihuhUYGIUDHS*&AD9d8 3yuh78y(*iu(d*&D" expression_key = "This is an expresiion" Query_Key = "This is a Query" # Global variable that mantain client's conne...
dataframe_viewer.py
import sys import threading import os from typing import Union import numpy as np import pandas as pd from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt from typing_extensions import Literal from pandasgui.store import PandasGuiDataFrameStore import pandasgui import logging from pandasgui.widgets...
selenium_utils.py
from chromedriver_py import binary_path as driver_path from selenium.webdriver import DesiredCapabilities from selenium.webdriver import Chrome, ChromeOptions # TODO: Combine these two dependencies. Leaving it for now since it touches too many sites atm. from selenium.webdriver.chrome.options import Options from seleni...
__main__.py
import threading from HomeTuner import setup_logging, scan, init_assets, create_app, control setup_logging() init_assets() scanner = threading.Thread(target=scan.main, args=[]) scanner.start() app = create_app() app.run(host='0.0.0.0', threaded=True)
example1.py
# ch13/ch01_ex01.py import threading def writer(): global text while True: with resource: print(f'Writing being done by {threading.current_thread().name}.') text += f'Writing was done by {threading.current_thread().name}. ' def reader(): global rcount while True: ...
email.py
from threading import Thread from flask import current_app from flask_mail import Message from myapp import mail def send_async_email(app, msg): with app.app_context(): mail.send(msg) def send_email(subject, sender, recipients, text_body, html_body, attachments=None, sync=False): msg = Message(subje...
inference.py
import matplotlib.pyplot as plt from PIL import Image,ImageDraw import math import glob import os import datetime import numpy as np from chainer import serializers from chainercv.datasets import voc_bbox_label_names from chainercv.links import FasterRCNNVGG16 from chainercv.links import SSD512 from chainerc...
TCPSender.py
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Jonathan Cheseaux" __copyright__ = "Copyright 2014" __credits__ = ["Jonathan Cheseaux", "Stefano Rosati", "Karol Kruzelecki"] __license__ = "MIT" __email__ = "cheseauxjonathan@gmail.com" import socket import time from threading import Thread import threading c...
CourseSniper.py
import sys, time, mechanize, getpass, multiprocessing, os, urllib2, base64 # Program name - CourseSniper.py # Written by - Mohammed Madhi Davoodi (mdavoodi@vt.edu) # Date and version No: 24/04/2012 Ver 1.2 # CourseSniper is a script written using mechanize which automates the process of # checking for and adding cla...
test_valgrind_replay.py
import os import threading import time import unittest import subprocess import signal if "CI" in os.environ: def tqdm(x): return x else: from tqdm import tqdm # type: ignore import cereal.messaging as messaging from collections import namedtuple from tools.lib.logreader import LogReader from selfdrive.test...
marshal.py
# Copyright 2019 Atalaya Tech, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
soakclient.py
#!/usr/bin/env python # # Copyright 2018 Confluent 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...
arduino_worker.py
import time import json import threading import random import socket from nanpy import (SerialManager, ArduinoApi) from nanpy.serialmanager import SerialManagerError from nanpy.sockconnection import (SocketManager, SocketManagerError) from workers.arduino.arduino_control_worker import ArduinoControlWorker from workers....
OptimizeRasters.py
# ------------------------------------------------------------------------------ # Copyright 2021 Esri # 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/LICEN...
15_shapes.py
import sys, os #get path of script _script_path = os.path.realpath(__file__) _script_dir = os.path.dirname(_script_path) pyWolfPath = _script_dir if sys.platform == "linux" or sys.platform == "linux2": print "Linux not tested yet" elif sys.platform == "darwin": print "OS X not tested yet" elif sys.platform ==...
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 #...
tn-cli.py
#!/usr/bin/env python # coding=utf-8 """Python implementation of Tinode command line client using gRPC.""" # To make print() compatible between p2 and p3 from __future__ import print_function import argparse import base64 import grpc import json from PIL import Image try: from io import BytesIO as memory_io exce...
test_protocol_cybinary.py
# -*- coding: utf-8 -*- import collections import multiprocessing import os import time import pytest from thriftpy._compat import u from thriftpy.thrift import TType, TPayload, TDecodeException from thriftpy.transport import TSocket, TServerSocket from thriftpy.utils import hexlify from thriftpy._compat import PYP...
main.py
from helpers import setup_logger menu_name = "Wireless" i = None o = None from time import sleep from threading import Thread from traceback import format_exc from ui import Menu, Printer, MenuExitException, UniversalInput, Refresher, DialogBox, ellipsize import wpa_cli logger = setup_logger(__name__, "warning") ...
SukiPyRansom.py
from tkinter import * from tkinter.ttk import * import os, time, threading, base64, sys, random from cryptography.fernet import Fernet from os import listdir from os.path import isfile, join, isdir paths = ["//Documents", "//Desktop", "//Downloads"] script_dir = os.path.abspath(sys.argv[0]).split("\\") script...
installwizard.py
import os import sys import threading import traceback from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from electrum import Wallet, WalletStorage from electrum.util import UserCancelled, InvalidPassword from electrum.base_wizard import BaseWizard, HWD_SETUP_DECRYPT_WALLET, GoBack f...
servers_test.py
# Copyright 2019 The Oppia 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 applicable ...
vxi_11.py
"The basic infrastructure for maintaining a vxi-11 protocol connection to a remote device" _rcsid="vxi_11.py,v 1.6 2003/05/30 13:29:23 mendenhall Release-20050805" import rpc from rpc import TCPClient, RawTCPClient import exceptions import struct import traceback import time import weakref import sys import select tr...
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_univnew...
test_sensor.py
from test_data.test_sensor_1 import SensorDummy1 from threading import Thread import json import time from flask import Flask, request cloud_gateway_ip = 'localhost' cloud_gateway_port = 5000 class TestSensor: @staticmethod def _get_dummy_sensor(): sensor = SensorDummy1() sensor.set_module_i...
MachinekitInstance.py
# MachinekitInstance # # The classes in this file deal with service discovery and keep track of all discovered Machinekit # instances and their associated endpoints. import MachinekitPreferences import copy import itertools import json import threading import time import urllib.request import zeroconf class ServiceEn...
mutex.py
import threading counter_buffer = 0 counter_lock = threading.Lock() COUNTER_MAX = 100 THREAD_COUNT = 5 def consumer1_counter(): global counter_buffer for i in range(COUNTER_MAX): #counter_lock.acquire() counter_buffer +=1 #counter_lock.release() def consumer2_counter(): global co...
main.py
# _*_coding:utf-8_*_ # @Time : 2020/5/2 下午1:38 # @Author : Arics # @Email : 739386753@qq.com # @File : main.py # @Software : PyCharm # @IDE : PyCharm import quequ_list import spiderModule import selectModule from threading import Thread import time import log_record import monitor ###### ## 又拍云账号信息 ...
test_jobs.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 #...
server.py
#!/usr/bin/env python from __future__ import absolute_import, print_function import argparse import ConfigParser as configparser import io import logging import os import sys import time from ConfigParser import SafeConfigParser as ConfigParser from logging import debug, info import uuid import requests import torna...
gceProvisioner.py
# Copyright (C) 2015 UCSC Computational Genomics Lab # # 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...
main_window.py
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
netview.py
#!/usr/bin/env python # SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved. # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: # beto (@agsolino) # # Description: # The ...
vdbench_qos.py
import vdbench import initiator import json import lib import target from datetime import datetime from time import sleep import asyncio import threading import pos # TEST_0#_0#=["Test name", # [limit_type(reset, bw, iops), limit_how(rate, value), limit_value(%, per volume value)], # [ ... ]] TE...
nn_saver.py
''' Get the top k nearest neighbors for a set of embeddings and save to a file ''' import multiprocessing as mp import tensorflow as tf import numpy as np import codecs import os from nearest_neighbors import NearestNeighbors import pyemblib from hedgepig_logger import log class _SIGNALS: HALT = -1 COMPUTE = ...
robot.py
#!/usr/bin/env pybricks-micropython from pybricks.hubs import EV3Brick from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor, InfraredSensor, UltrasonicSensor, GyroSensor) from pybricks.parameters import Port, Stop, Direction, Button, Color from pybricks.tools import wait, St...
button_listener.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import json import math import rospy import socket import threading import fcntl import struct import uuid import geometry_msgs.msg import diagnostic_msgs.msg from task_manager.msg import ButtonState from task_manager.srv import TaskNewRequest from task_man...
main_window.py
import re import os import sys import time import datetime import traceback from decimal import Decimal import threading import qtum_electrum from qtum_electrum.bitcoin import TYPE_ADDRESS from qtum_electrum import WalletStorage, Wallet from qtum_electrum.gui.kivy.i18n import _ from qtum_electrum.paymentrequest import...
process.py
""" Both method redirects stdout to IDA Pro's console. """ from __future__ import print_function import sys import threading import time from subprocess import Popen as _Popen, PIPE, STDOUT from PyQt5.QtCore import QCoreApplication if sys.version_info.major == 3: import queue as Queue else: import Queue cl...
maingui.py
import sys, threading, time import tkinter as tk from PIL import Image, ImageTk from androidcom import AndroidCOM """ GUI for AndroidCOM with tkinter """ class MainGUI(tk.Frame): def __init__(self, master=None): super().__init__(master) self.root = master self.ac = AndroidCOM() self.to...
pump.py
import serial import logging import re import threading from time import sleep def remove_crud(string): """Return string without useless information. Return string with trailing zeros after a decimal place, trailing decimal points, and leading and trailing spaces removed. """ if "." i...
scrapeops_logger.py
import logging import threading import time from scrapeops_python_logger.core.controllers import SDKControllers from scrapeops_python_logger.core.error_logger import TailLogger from scrapeops_python_logger.stats.logger import StatsLogger from scrapeops_python_logger.normalizer.request_response import SOPSResponse from ...
trezor.py
import traceback import sys from typing import NamedTuple, Any, Optional, Dict, Union, List, Tuple, TYPE_CHECKING from electrum.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path from electrum import constants...
installer.py
# Copyright (c) 2018 TechNexion,Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
test_controller.py
from pySOT.experimental_design import SymmetricLatinHypercube from pySOT.strategy import DYCORSStrategy from pySOT.surrogate import RBFInterpolant, CubicKernel, LinearTail from pySOT.optimization_problems import Ackley from pySOT.controller import CheckpointController from poap.controller import SerialController impor...
RQSS_Framework_Runner.py
import csv import os import sys from argparse import ArgumentParser from datetime import datetime from multiprocessing.context import Process from pathlib import Path from typing import List, NamedTuple, Optional, Union import pandas as pd from Accuracy.LiteralSyntaxChecking import WikibaseRefLiteralSyntaxChecker fro...
zerodeploy.py
""" .. versionadded:: 3.3 Requires [plumbum](http://plumbum.readthedocs.org/) """ from __future__ import with_statement import sys import rpyc import socket from rpyc.lib.compat import BYTES_LITERAL from rpyc.core.service import VoidService from rpyc.core.stream import SocketStream try: from plumbum import local, ...
Drupal.py
# uncompyle6 version 2.11.5 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.18 (default, Apr 20 2020, 20:30:41) # [GCC 9.3.0] # Embedded file name: BruteForce\Drupal.py import requests import re import threading import time from Exploits import printModule r = '\x1b[31m' g = '\x1b[32m' y = '\x1b[33m' b = '...
api_tests.py
import os import subprocess as sp from urllib.parse import urljoin import requests from multiprocessing import Process from time import sleep from datetime import timedelta,datetime import random import argparse # Parser configs ...
connector.py
import socket import logging import sys import threading import time import src.util as util # Drive Computer Remote Telop Client # Connector # # Part of the GSSM Autonomous Golf Cart # Written by: # Benjamin Chauhan, class of 2022 # Joseph Telaak, class of 2022 class Teleop_Connector: def __init__(self, ip...
worker_manager.py
""" A manager for multiple workers. -- kandasamy@cs.cmu.edu """ # pylint: disable=abstract-class-little-used # pylint: disable=invalid-name # pylint: disable=no-member from __future__ import print_function from argparse import Namespace from multiprocessing import Process import numpy as np import os import sys if...
testrunner.py
#!/usr/bin/env python # coding: utf-8 from datetime import datetime startTime = datetime.now() import itertools import json import multiprocessing as mp import os import sys import time try: import pandas as pd import papermill from tabulate import tabulate except ImportError: sys.exit( """So...
dark.py
#!/usr/bin/python # coding=utf-8 #jangan di recode ngentot #recode jomblo seumur hidup # (MANG ENGKUR) PEMBUAT #SUBSCRIBE CHANNEL mang engkur smd-ices #FOLLOW INSTAGRAM @T&D #Import module import os,sys,time,datetime,random,hashlib,re,threading,json,getpass,urllib,cookielib from multiprocessing.pool import ThreadPool ...
webserver.py
#!/usr/bin/env python # Copyright 2015 Metaswitch Networks # # 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 applicabl...
multiple_tpus_test.py
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
gui_thread.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: mcxiaoke # @Date: 2015-08-11 12:00:11 from __future__ import print_function import thread import threading import time import Queue as queue dataQueue = queue.Queue() def producer(id): for i in range(5): print('put') time.sleep(0.1) ...
conftest.py
import requests_mock import os from click.testing import CliRunner import pytest from wandb.history import History from tests.api_mocks import * import wandb from wandb import wandb_run from wandb.apis import InternalApi import six import json import sys import threading import logging from multiprocessing import Proce...
tweet.py
#!/usr/bin/env python3 # Tweet at the users found in the user id text file (specified in setup.py) # Not to be run simultaneously as the find_users.py script # Also have a streamer that replies to replies # OK, so what's the plan? # I want to send people tweets at times when they tend to send their offensive tweets....
widget.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 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) The widget is called from web2py. """ import datetime import sys import cStringIO import time import threa...
test_execute.py
# coding: utf-8 from __future__ import print_function import json import os.path import platform import subprocess import sys import tempfile import threading import time import psutil import pytest from simpleflow import execute from simpleflow.exceptions import ExecutionError, ExecutionTimeoutError @execute.prog...
voicemail.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # messenger.py # # Copyright 2018 <pi@rhombus1> # # 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 ...
test_dota.py
# -*- coding:utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import division import os import sys import tensorflow as tf import cv2 import numpy as np import math from tqdm import tqdm import argparse from multiprocessing import Queue, Process sys.path.append("....