source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
runners.py | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
ForceNap.py | #!/usr/bin/python
from __future__ import print_function
import time
import sys
import subprocess
import os
import signal
import logging
import rumps
from threading import Thread
try:
from AppKit import NSWorkspace
except ImportError:
print("Can't import AppKit -- maybe you're running python from brew?")
print("... |
context_test.py |
from caffe2.python import context, test_util
from threading import Thread
class MyContext(context.Managed):
pass
class DefaultMyContext(context.DefaultManaged):
pass
class ChildMyContext(MyContext):
pass
class TestContext(test_util.TestCase):
def use_my_context(self):
... |
cli.py | """
This module contains the command line interface for snakeviz.
"""
from __future__ import print_function
import argparse
import os
import random
import socket
import sys
import threading
import webbrowser
from pstats import Stats
try:
from urllib.parse import quote_plus
except ImportError:
from urllib imp... |
__init__.py | # -*- coding: UTF-8 -*-
#virtualBuffers/__init__.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2007-2017 NV Access Limited, Peter Vágner
import time
import threading
import ctypes
import collection... |
test_dbapi.py | # pysqlite2/test/dbapi.py: tests for DB-API compliance
#
# Copyright (C) 2004-2010 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of t... |
env_stock_papertrading_erl.py | import datetime
import threading
import time
import alpaca_trade_api as tradeapi
import gym
import numpy as np
import pandas as pd
import torch
from finrl_meta.data_processors.alpaca import AlpacaProcessor
class AlpacaPaperTrading_erl():
def __init__(self, ticker_list, time_interval, agent, cwd,... |
monitor.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-
# Do not change the previous lines. See PEP 8, PEP 263.
#
import datetime
import queue
import threading
from io import BytesIO
import watchdog
from watchdog.events import LoggingEventHandler
from watchdog.obser... |
test.py | #coding=utf8
import threading
import time
num = 0
def sum_num(i):
lock.acquire()
global num
time.sleep(1)
num +=i
print(num)
lock.release()
print('%s thread start!'%(time.ctime()))
try:
lock = threading.Lock()
list = []
for i in range(6):
t = threading.Thread(target=sum_n... |
functional_tests.py | #!/usr/bin/env python
from __future__ import absolute_import
import httplib
import logging
import os
import random
import shutil
import socket
import string
import sys
import tempfile
import threading
import time
import urllib
galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.pa... |
douban_spider.py | #!/usr/bin/env/py35
# coding=utf-8
import requests
import os
import time
import threading
from bs4 import BeautifulSoup
from urllib.request import urlretrieve
from entity_commonFun_jin import multiThread,get_logger
log_file = os.path.join("log","movie.log")
logger = get_logger(log_file)
url = "https://movie.douban... |
subcommands.py | import functools
import logging
import os
import sys
from os import makedirs
from threading import Thread
from typing import Any, Dict, List, TYPE_CHECKING
from . import global_vars
from .process_parallel import process_parallel
from .process_students import process_students
from .save_recordings import save_recording... |
caching_test.py | # Copyright 2018-2020 Streamlit 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 wr... |
test_threading.py | """
Tests for the threading module.
"""
import test.support
from test.support import (verbose, import_module, cpython_only,
requires_type_collecting)
from test.support.script_helper import assert_python_ok, assert_python_failure
import random
import re
import sys
_thread = import_module('_th... |
camera.py | from datetime import datetime
from picamera import PiCamera
from pathlib import Path
from PyQt5.QtCore import pyqtSignal, QObject
from threading import Lock, Thread
from src.cameratimerbackend import RepeatedTimer
class FileNameHelper():
def __init__(self):
# set default save directory, make folder if d... |
deepracer_memory.py | from threading import Thread
import pickle
import time
import queue
import redis
import logging
from rl_coach.memories.backend.memory import MemoryBackend
from rl_coach.core_types import Episode
from markov.utils import Logger, json_format_logger, build_system_error_dict
from markov.utils import SIMAPP_MEMORY_BACKEND... |
test_query_cancelling.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved.
#
import logging
import time
from logging import getLogger
from threading import Lock, Thread
import pytest
from snowflake.connector import errors
logger = getLogger(__name__)
logging.basicConfig(l... |
pexpect2.py | import os
import subprocess
import select
import time
import threading
import Queue
def enqueue_output(out, queue):
c = out.read(1)
while 0 < len(c):
queue.put(c)
c = out.read(1)
class pexpect:
def __init__(self):
commandLine = ["java",
"-cp",
... |
KmdRunScript.py | # Copyright (c) 2017, NVIDIA CORPORATION. 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 list of conditions a... |
mock_web_api_server.py | import asyncio
import json
import logging
import sys
import threading
import time
from http import HTTPStatus
from http.server import HTTPServer, SimpleHTTPRequestHandler
from typing import Type
from unittest import TestCase
from urllib.parse import urlparse, parse_qs
from multiprocessing import Process
from urllib.re... |
LSRadio.py | import threading as thread
import json
import socket
import sys
from .Radio import Radio
# Unused for now
# import zmq
# import os
# import logging
# import time
class LSRadio(Radio):
def __init__(self, DEBUG=0, hostname='127.0.0.1', port = 5000):
"""
DEBUG 0 is for communication between two comp... |
execution.py | import copy
import datetime
import glob
import json
import logging
import os
import shutil
import threading
import time
import traceback
import uuid
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Optional, Tuple, Union
from ludwig.api import LudwigModel
from ludwig.backend import initi... |
run.py | # -*-: coding utf-8 -*-
"""The run command."""
# pylint: disable=too-few-public-methods,import-error,wrong-import-position,wrong-import-order,wildcard-import,wrong-import-position,wrong-import-order
import os
import subprocess
import time
import threading
from sys import path
from .base import Base
from ..utils.snip... |
ovh.py | #python3/tcpflood
#code by XalbadorX
import random
import socket
import threading
import os,sys
os.system("clear")
ip_bos = str(input("Ip Target : "))
port_bos = int(input("Port Target : "))
paket_bos = int(input("Pakets : "))
threads_bos = int(input("Threads : "))
os.system("clear")
def bos():
bos... |
threaded.py | """
raven.transport.threaded
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import atexit
import time
import threading
import os
from Queue import Queue
from raven.transport.base import HTTPTransport
DEFAULT_TIMEO... |
test_stats_collector.py | import os
import sys
import logging
import requests
import time
import traceback
import random
import pytest
import ray
import redis
import threading
import ray.new_dashboard.modules.stats_collector.stats_collector_consts \
as stats_collector_consts
import ray.new_dashboard.utils as dashboard_utils
import ray.ray_c... |
keep_alive.py | from flask import Flask, render_template
from threading import Thread
app = Flask(__name__)
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
@app.route('/')
def home():
return render_template('home.html')
def run():
app.run(host='0.0.0.0',port=8000)
def keep_alive():
t = Thread(target=run)
t.start() |
main.py | import kivy
from kivy import platform
# kivy widgets
from kivy.uix.screenmanager import ScreenManager, ScreenManagerException
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.modalview import ModalView
from kivy.uix.recycleview import RecycleView
from kivy.clock import Clock, mainthread
from kivy.lang import Bu... |
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... |
Sparta.py | #!/usr/bin/python
##Joseph Greenfield
##jsgreenfield@my.uri.edu
##
import argparse
import hashlib
import time
import datetime
# for multi-threaded
from Queue import Queue
from threading import Thread
#for CASE/UCO Output
import case
#To add the INDXParse library
import sys
sys.path.insert(0, "/home/joe/INDXParse")... |
app.py | '''
Raspberry Pi GPIO Status and Control
'''
#import RPi.GPIO as GPIO
import flask
from flask import Flask, render_template, request
from greenhouse import Greenhouse
import asyncio
import threading
app = Flask(__name__)
g = Greenhouse()
# define actuators GPIOs
state=0 #0 automatic / 1 manual
led = 22
fan = 24
pu... |
echoReply.py | #!/usr/bin/python
import time
import socket
import struct
import sys
import array
import threading
# The linux kernel is setup to conduct an automatic echo reply. How to disable it on linux is below...
# To disable kernel ping replies, we added the following line to the /etc/sysctl.conf file: net.ipv4.icmp_ec... |
Podrum.py | """
* ____ _
* | _ \ ___ __| |_ __ _ _ _ __ ___
* | |_) / _ \ / _` | '__| | | | '_ ` _ \
* | __/ (_) | (_| | | | |_| | | | | | |
* |_| \___/ \__,_|_| \__,_|_| |_| |_|
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with th... |
cricket.py | from tkinter import *
import tkinter.messagebox
import threading
from pycricbuzz import *
import json
import threading
class Cricket():
def __init__(self,root):
self.root=root
self.root.title("Cricket Matches")
self.root.geometry("500x350")
self.root.iconbitmap("logo561.ico")
... |
app.py | import os
from flask import send_file
import re
import urllib.request
from flask import Flask, flash, request, redirect, render_template,url_for,send_from_directory
from werkzeug.utils import secure_filename
from pdfminer.pdfinterp import PDFResourceManager#, PDFPage.get_pages()
from pdfminer.converter import Te... |
test_updater.py | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2018
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... |
mbase.py | """
mbase module
This module contains the base model class from which
all of the other models inherit from.
"""
from __future__ import print_function
import abc
import sys
import os
import shutil
import threading
import warnings
import queue as Queue
from datetime import datetime
from shutil import which
from su... |
scholix_report.py | import requests, pandas, time, threading, sys, itertools
from pandas import ExcelWriter
endpoint = 'http://api.scholexplorer.openaire.eu/v1'
count = itertools.count()
count_data = itertools.count()
count_no_data = itertools.count()
count_error = itertools.count()
show_progress = True
def display_progress(value, endv... |
mock_service.py | from avista_portal.server import PortalServer
from multiprocessing import Process
class MockService(PortalServer):
def __init__(self):
""" instantiate the app """
super().__init__()
def start(self):
super().start()
self._proc = Process(target=self._app.run, kwargs={'host': se... |
gtest_parallel_tests.py | #!/usr/bin/env python
# Copyright 2017 Google Inc. 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 ... |
idf_monitor.py | #!/usr/bin/env python
#
# esp-idf serial output monitor tool. Does some helpful things:
# - Looks up hex addresses in ELF file with addr2line
# - Reset ESP32 via serial RTS line (Ctrl-T Ctrl-R)
# - Run "make flash" (Ctrl-T Ctrl-F)
# - Run "make app-flash" (Ctrl-T Ctrl-A)
# - If gdbstub output is detected, gdb is automa... |
PyPotter.py | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHET... |
wgen.py | import os
import signal
import time
from multiprocessing import Event, Lock, Process, Value
from threading import Timer
from typing import Callable, List, Tuple, Union
import twisted
from decorator import decorator
from numpy import random
from psutil import cpu_count
from twisted.internet import reactor
from logger ... |
client.py | import socket
import threading
nickname = input("Choose a nickname: ")
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(('127.0.0.1',55555))
def receive():
while True:
try:
message = client.recv(1024).decode('ascii')
if message == 'NICK':
... |
uploader.py | #!/usr/bin/env python
import os
import re
import time
import stat
import json
import random
import ctypes
import inspect
import requests
import traceback
import threading
import subprocess
from collections import Counter
from selfdrive.swaglog import cloudlog
from selfdrive.loggerd.config import ROOT
from common.para... |
okcoinGateway.py | # encoding: UTF-8
'''
vn.okcoin的gateway接入
注意:
1. 前仅支持USD和CNY的现货交易,USD的期货合约交易暂不支持
'''
import os
import json
from datetime import datetime
from time import sleep
from copy import copy
from threading import Condition
from Queue import Queue
from threading import Thread
from time import sleep
from vnpy.api.okcoin impo... |
main.py | # Blackjack testing parallel program. Well test 4 AIs playing different strageties over a large number of iterations and track which does best
import cards
import neatnn as nn
import multiprocessing as mp
import time
# adds card rank with Black Jack logic resolving Ace as 11 if possible
def add_cards(hand):
x = 0
... |
powercouples-mp.py | import os
import sys
import argparse
import csv
import itertools
import pew.pew as pw
import multiprocessing as mp
def pow(x):
return x[0]**x[1]
def pewT(x):
return pw.pew(x[0],x[1])
def find_powerCouple(numbers):
tuples = itertools.permutations(numbers,2)
return max(tuples, key=pewT)
def worker(in... |
rpc_parameter_server.py | import argparse
import os
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 DistributedOptimi... |
diameterProxy.py | #
# Copyright (c) 2019, Infosys Ltd.
#
# 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 ... |
bot_telegram_monitor.py | """
Bot to reply to Telegram messages.
First, a few handler functions are defined. Then, those functions are passed to
the Dispatcher and registered at their respective places.
Then, the bot is started and runs until we press Ctrl-C on the command line.
Usage:
Basic Echobot example, repeats messages.
Press Ctrl-C on ... |
mqtt_s3_comm_manager.py | # -*-coding:utf-8-*-
import json
import logging
import time
import traceback
import uuid
from typing import List
import paho.mqtt.client as mqtt
import yaml
from fedml_core.distributed.communication.base_com_manager import BaseCommunicationManager
from fedml_core.distributed.communication.message import Message
from ... |
runner.py | #!/usr/bin/env python2
"""Simple test runner.
"""
# This Python file uses the following encoding: utf-8
# XXX Use EM_ALL_ENGINES=1 in the env to test all engines!
from __future__ import print_function
from subprocess import Popen, PIPE, STDOUT
import atexit
import difflib
import fnmatch
import functools
import glob
i... |
test_discovery_and_monitoring.py | # Copyright 2014-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
generals.py | '''
Generals.io Automated Client - https://github.com/harrischristiansen/generals-bot
Client Adopted from @toshima Generals Python Client - https://github.com/toshima/generalsio
'''
import os, errno
import random
import sys
import traceback
import logging
import json
import threading
import time
from websocket im... |
manager.py | import logging
import multiprocessing
import signal
import sys
import time
from types import FrameType
from typing import Dict
from src.health_checker.starters import (start_heartbeat_handler,
start_ping_publisher)
from src.utils.constants.names import (HEARTBEAT_HANDLER_NAME,
... |
gstreamer.py | import time
import numpy
import threading
import gi
gi.require_version('Gst', '1.0')
gi.require_version("GstApp", "1.0")
gi.require_version('GstVideo', '1.0')
from gi.repository import Gst, GstApp, GLib, GObject, GstVideo
class GStreamer:
_inited = False
# _main_loop = None
# _main_thread = None
@clas... |
OrangePiCinemaServer.py | #!/usr/bin/python
import threading
import socketserver
import socket
import os
import time
import serial # install pySerial
from pathlib import Path
# Install GPIO lib: https://github.com/duxingkei33/orangepi_PC_gpio_pyH3
from pyA20.gpio import gpio # OrangePI
from pyA20.gpio import port # OrangePI
# import RPi.GPI... |
LogstashPlugin.py | # (C) Copyright NuoDB, Inc. 2017-2020
#
# This source code is licensed under the MIT license found in the LICENSE
# file in the root directory of this source tree.
import hashlib
import json
import logging
import os
import re
import socket
import subprocess
import threading
import time
from datetime import datetime
f... |
search.py | import simplejson
import util
from copy import copy
import urllib2,urllib,sys,pprint,cgi,time
from datetime import datetime,timedelta
from collections import defaultdict
#import socket
import socket
# socket.setdefaulttimeout(1) # http://www.voidspace.org.uk/python/articles/urllib2.shtml
import timeout_urllib2; timeou... |
notification.py | # -*- coding: utf-8 -*-
"""
@author : Wang Meng
@github : https://github.com/tianpangji
@software : PyCharm
@file : notification.py
@create : 2020/11/17 22:11
"""
import threading
import time
from django.conf import settings
from redis import StrictRedis
from monitor.models import OnlineUsers
def onlin... |
low_level_runner.py | # Copyright 2018 Google. 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 law or agree... |
tpu_estimator.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... |
file_copy3.py | #!/usr/bin/env python
import sys
from multiprocessing import Process
sys.path.append("../")
from laspy import file as File
inFile = File.File(sys.argv[1],mode= "r")
outFile = File.File(sys.argv[2],mode= "w", header = inFile.header)
outFile.writer.pad_file_for_point_recs(len(inFile))
outFile.close(ignore_header_changes... |
MeterSummary.py | #!/usr/bin/env python
#
# Example meter service receiver, designed to work with the December 2021 version of the aos-metering-app to demonstrate
# bidirectional, end-to-end communications.
#
# Pre-requisites:
#
# # apt install python-is-python3 python3-pip python3-virtualenv
# # pip3 install aiohttp==3.7.4.post0 py... |
UpdateButton.py | import os
import sys
from PyQt5.QtWidgets import QLabel
import logging
from Parents import Button
import pkg_resources
import json
import sys
from urllib import request
from pkg_resources import parse_version
import threading
class UpdateButton(Button):
def __init__(self, parent):
super(UpdateButton, self).... |
noolitemqtt.py | #!/usr/bin/env python
import time
import homie
import logging
import os
import re
import noolite
import queue
import threading
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
config = {
"HOST": os.environ.get('MQTT_SERVER', 'mosquitto'),
"PORT": os.environ.get('MQTT_PORT', 1883),
... |
acs_client.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
pentestlib.py | # -*- coding: utf-8 -*-
import numpy as np
import sqlite3
import mss
from pynput.keyboard import Key, Listener, Controller
import requests
import urllib2
from Crypto.Cipher import AES
import mechanize
from itertools import product
import sendkeys
from pygame import mixer
import SocketServer
import base64
... |
ccbench.py | # This file should be kept compatible with both Python 2.6 and Python >= 3.0.
from __future__ import division
from __future__ import print_function
"""
ccbench, a Python concurrency benchmark.
"""
import time
import os
import sys
import itertools
import threading
import subprocess
import socket
from optparse import ... |
process.py | from .logging import debug, exception_log, server_log
import subprocess
import os
import shutil
import threading
try:
from typing import Any, List, Dict, Tuple, Callable, Optional, Union
assert Any and List and Dict and Tuple and Callable and Optional and Union
except ImportError:
pass
def add_extension_... |
server.py | import threading
import socket
import time
def getIP():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
ip = s.getsockname()[0]
s.close()
return ip
class ServerPublisher():
def __init__(self, ip, port, game_name, room, key):
self.server = socket.socket(s... |
node_d.py | from definitions import *
import os
import utility as util
import socket
import threading
from packet import *
from known_hosts import *
from struct import *
import math
routing_table_update_progress = False
class ThreadedNode:
def __init__(self, port=None, host=None):
if host is None:
self.h... |
thread_determine.py | import threading
import time
def function_a():
print(threading.currentThread().getName() + str('--> starting \n'))
time.sleep(2)
print(threading.currentThread().getName() + str('--> exiting \n'))
return
def function_b():
print(threading.currentThread().getName() + str('--> starting \n'))
tim... |
core.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
OONI Fastpath
See README.adoc
"""
# Compatible with Python3.6 and 3.7 - linted with Black
# debdeps: python3-setuptools
from argparse import ArgumentParser, Namespace
from base64 import b64decode
from configparser import ConfigParser
from datetime import datetime
... |
alexa-chromecast-yt.py | #!/usr/bin/env python3
# cert generation: openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# debugging: curl https://localhost -X POST -k
# -H "Content-Type: application/json" --data '{"username":"xyz","password":"xyz"}'
import pychromecast
from cgi import parse_header, parse_multipart
from ... |
dir-brute.py | import urllib
import urllib2
import threading
import Queue
threads = 50 # Be aware that a large number of threads can cause a denial of service!!!
target_url = "http://www.example.com"
wordlist_file = "directory-list.txt"
user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/201... |
test_streaming.py | import time
import os
import asyncio
import copy
import multiprocessing
import pytest
from typing import Dict
from datetime import datetime
from functools import partial
from jina.parsers import set_gateway_parser
from jina import Document, DocumentArray
from jina.serve.runtimes.gateway.grpc import GRPCGatewayRuntime... |
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... |
fuse.py | from __future__ import print_function
import os
import stat
from errno import ENOENT, EIO
from fuse import Operations, FuseOSError
import threading
import time
from fuse import FUSE
class FUSEr(Operations):
def __init__(self, fs, path):
self.fs = fs
self.cache = {}
self.root = path.rstrip(... |
build_remote.py | #!/usr/bin/env python3
import argparse
import glob
import datetime
from multiprocessing import Pool, Process, Manager, Event
import re
import subprocess
import sys
import tempfile
from os.path import join, realpath, dirname, basename, exists
CERTBOT_DIR = dirname(dirname(dirname(realpath(__file__))))
PLUGINS = [basen... |
android_data_analyzer_file_history.py | import os
import logging
from modules.andForensics.modules.utils.android_sqlite3 import SQLite3
from modules.andForensics.modules.analyzer.android_data_analyzer_utils import AnalyzerUtils
from multiprocessing import Process, Queue, Lock
import math
logger = logging.getLogger('andForensics')
#ANALYSIS_EXCEPTION_CALL_HI... |
interface_rpc.py | #!/usr/bin/env python3
# Copyright (c) 2018-2020 The Fujicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests some generic aspects of the RPC interface."""
import os
from test_framework.authproxy import JS... |
thread_tcp_server.py | import logging
import socket
from threading import Thread
logger = logging.getLogger(__name__)
class TcpServer(object):
def __init__(self, host, port, handle_func):
self.host = host
self.port = port
self.handle_func = handle_func
self.sock = None
def run(self, *args, **kwargs... |
test_aws_quantum_task.py | # Copyright 2019-2019 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... |
bluenet.py | #!/usr/bin/python3
import click
import dbus
import dbus.mainloop.glib
import logging
import time
from threading import Thread
from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler
import NetworkManager
try:
from gi.repository import GObject
except ImportError:
impor... |
tflow.py | from . import _file_exists, _env, get_read_fn, get_write_fn, Timer, _io_type
import tensorflow as tf
from threading import Thread
import tempfile
import math
import os
if _env['tqdm']:
from tqdm.auto import tqdm, trange
import random
from .logger import get_logger
logger = get_logger()
AUTO = tf.data.experimental.... |
utils.py | #================================================================
#
# File name : utils.py
# Author : PyLessons
# Created date: 2020-09-27
# Website : https://pylessons.com/
# GitHub : https://github.com/pythonlessons/TensorFlow-2.x-YOLOv3
# Description : additional yolov3 and yolov4 functio... |
perf_stress_runner.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
mtou.py | #!/usr/bin/env python2
"""UDP Forwarding Helper.
"""
from __future__ import print_function
import os
import sys
import struct
import argparse
import time
import random
import threading
import traceback
import socket
import ipaddress
class Udp(object):
addr = ("0.0.0.0", 0)
dest = None
sock = None
def ... |
cli.py | import copy
import inspect
import os
import re
import subprocess
from argparse import SUPPRESS
from collections import defaultdict, ChainMap
from importlib import import_module
from multiprocessing import Process, Pipe
from string import Template
from subprocess import Popen, PIPE
import sys
import yaml
from polidoro... |
qr_recognizer.py | from threading import Thread
import cv2
import numpy as np
from pyzbar.pyzbar import decode
from typing import List, Any, Union
from security.database.firestore import Firestore
from security.user.user import User
from security.tts.messages import Messages
from security.tts.text_to_speech import TTS
from .util import ... |
commands.py | import random
from time import sleep
from proto.spaceteam_pb2 import SpaceteamPacket
from threading import Thread
TOGGLE = 0
NUMERIC = 1
CHOICE = 2
BINARY = 3
NO_COMMAND = 4
class types:
NO_COMMAND = "NO_COMMAND"
CALCIUM_RAZOR = 0
SALTY_CANNISTER = 1
WAVEFORM_COLLIDER = 2
PROTOLUBE_OPTIMIZER = 3
QUASIPAD... |
IVMain.py |
"""Class :py:class:`IVMain` is a QWidget for main window of Image Viewer
========================================================================
Usage ::
# Run test: python lcls2/psana/psana/graphqt/IVMain.py
from psana.graphqt.IVMain import IVMain
See method:
Created on 2021-06-14 by Mikhail Dubrovin
""... |
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... |
thread_client.py | #!/usr/bin/env python
from __future__ import print_function
import argparse
import threading
import time
import capnp
import thread_capnp
capnp.remove_event_loop()
capnp.create_event_loop(threaded=True)
def parse_args():
parser = argparse.ArgumentParser(usage='Connects to the Example thread server \
at the give... |
app.py | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import logging
import json
import os
import pathlib
import pprint
import subprocess
import threading
import time
import boto3
import srt
from flask import Flask, jsonify, Response
from flask_cors import CORS
# -- E... |
Run.py | #!/usr/bin/env python3
import os
import sys
import time
import glob
import socket
import argparse
import threading
import traceback
import _pickle as pickle
from prettytable import PrettyTable
from pimdm import Main
from pimdm.tree import pim_globals
from pimdm.daemon.Daemon import Daemon
VERSION = "1.3.5"
def cli... |
main.py | import serial, codecs, threading, sys, requests, time, json
from flask import Flask, jsonify, request, Response, make_response, render_template
import numpy as np
from datetime import datetime
# ---------------{ CONFIGURATION }---------------
server_name = 'WX Telemetry Server'
com_port = "COM1"
host = "192.168.1.20... |
publisher.py | import sys
import threading
import time
import datetime as dt
import json
from pubsubClient import PubSubClient
from chord_node import *
from stats import *
from repeating_timer import RepeatingTimer
from zk_helpers import get_zookeeper_hosts, makeHostsString
class Publisher():
def __init__(self, myID: str, topi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.