source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
hongmeng.py | # coding=utf-8
"""
每天定时给多个女友发给微信暖心话
核心代码。
"""
import os
import time
import threading
from apscheduler.schedulers.blocking import BlockingScheduler
import itchat
from itchat.content import TEXT
from main.common import (
get_yaml
)
from main.utils import (
get_bot_info,
get_weather_info,
get_dictum_info,... |
multiProcess.py | # coding=utf-8
import multiprocessing
import tulingRobot
import faceRecog
import snowBoy
import time
def face_chat():
# when face over, chat will over
event = multiprocessing.Event()
tuling_chat = multiprocessing.Process(target=tulingRobot.chat, args=(event,))
tuling_chat.daemon = True
tuling_chat... |
bot.py | import win32gui
import pyautogui
import pydirectinput
import random
import time
from pynput import keyboard
from threading import Thread
#Focus on Minecraft Window
def windowEnumerationHandler(hwnd, top_windows):
top_windows.append((hwnd, win32gui.GetWindowText(hwnd)))
if __name__ == "__main__":
results ... |
switchID_eval.py | #!/usr/bin/env python
#Author: Robert Kroesche
#Email: rkroesche@sec.t-labs.tu-berlin.de
#This script is intented to test a SDN covert channel using
#switch identification technique
import paramiko
import os
import sys
from subprocess import call
import time
import string
import randomString
import multiprocessing as... |
test_manager.py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
web.py | # Electrum ABC - lightweight eCash client
# Copyright (C) 2020 The Electrum ABC developers
# Copyright (C) 2011 Thomas Voegtlin
#
# 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 restr... |
lambda_stubber.py | from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import json
import threading
lock = threading.Lock()
DEFAULT_RESPONSE = {}
def read_chunked_transfer(rfile):
data_so_far = bytearray()
data = bytearray()
while byte := rfile.read(1):
if byte == b'\r':
# print('found en... |
transaction.py | #!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 Thomas Voegtlin
#
# 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 withou... |
test.py | # -*- coding: utf-8 -*-
import sys
import os
import time
import datetime
import platform
import threading
import locale
import unittest
try:
import greenlet
greenlet_installed = True
except ImportError:
greenlet_installed = False
BASEDIR = os.path.abspath(
os.path.join(os.path.dirname(os.path.abspath(... |
__init__.py | # -*- coding: utf-8 -*-
"""
The top level interface used to translate configuration data back to the
correct cloud modules
"""
# Import python libs
from __future__ import absolute_import, generators, print_function, unicode_literals
import copy
import glob
import logging
import multiprocessing
import os
import signal... |
ubertooth.py | from scapy.all import *
import struct
from mirage.libs.bt_utils.ubertooth import *
from mirage.libs.ble_utils.constants import *
from mirage.libs.ble_utils import helpers
from mirage.libs import utils,io,wireless
class BLEUbertoothDevice(BtUbertoothDevice):
'''
This device allows to communicate with an Ubertooth De... |
test_html.py | from functools import partial
from importlib import reload
from io import BytesIO, StringIO
import os
import re
import threading
from urllib.error import URLError
import numpy as np
from numpy.random import rand
import pytest
from pandas.compat import is_platform_windows
from pandas.errors import ParserError
import p... |
demo.py | #!/usr/bin/env python
# coding=utf-8
import tensorflow as tf
import bottle
from bottle import route, run
import threading
from params import Params
from process import *
from time import sleep
app = bottle.Bottle()
query = []
response = ""
@app.get("/")
def home():
with open('demo.html', 'r') as fl:
htm... |
toast.py | # -*- mode: python; coding: utf-8 -*-
# Copyright 2013-2021 Chris Beaumont and the AAS WorldWide Telescope project
# Licensed under the MIT License.
"""Computations for the TOAST projection scheme and tile pyramid format.
For all TOAST maps, the north pole is in the dead center of the virtual image
square, the south ... |
smartcontrol.py | """Perform smart energy control based on TP Link Smart Plug"""
import asyncio
import time
import asyncclick as click
from kasa import SmartPlug, SmartDeviceException
from datetime import datetime
import requests
import json
from flask import Flask, render_template, request
import threading
import atexit
click.anyio_ba... |
api2db.py | # -*- coding: utf-8 -*-
"""
Contains the Api2Db class
=========================
"""
from ..ingest.api2pandas import Api2Pandas
from .log import get_logger
from ..ingest.collector import Collector
from ..ingest.api_form import ApiForm
from ..store.store import Store
import schedule
from schedule import CancelJob
from mu... |
serve.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import abc
import argparse
import json
import os
import re
import socket
import sys
import threading
import time
import traceback
import urllib2
import uuid
from collections import defaultdict, OrderedDict
from multiprocessing import Process, Event
from .... |
train_sampling_unsupervised.py | import dgl
import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import dgl.multiprocessing as mp
import dgl.function as fn
import dgl.nn.pytorch as dglnn
import time
import argparse
from dgl.data import RedditDataset
from torch.nn.parallel import Distri... |
DarkFB.py | # -*- coding: utf-8 -*-
import os, sys, time, datetime, random, hashlib, re, threading, json, getpass, urllib, requests, mechanize
from multiprocessing.pool import ThreadPool
try:
import mechanize
except ImportError:
os.system('pip2 install mechanize')
else:
try:
import requests
except ImportEr... |
tests.py | # Unit tests for cache framework
# Uses whatever cache backend is set in the test settings file.
import copy
import io
import os
import pickle
import re
import shutil
import tempfile
import threading
import time
import unittest
from pathlib import Path
from unittest import mock
from django.conf import settings
from dj... |
LpmsB.py | import time
import serial
import threading
import struct
import sys
from datetime import datetime, timedelta
from LpmsConfig import *
from lputils import *
from LpmsConfigurationSettings import LpmsConfigurationSettings
#TODO:
# check serial port opened before executing commands
# add wait for ack routine
class LpmsB... |
pytorch.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import atexit
import logging
import os
import socket
import time
from dataclasses import dataclass
from pathlib import Path
from subprocess import Popen
from threading import Thread
from typing import Any, List, Optional, Union
import colorama
i... |
server.py | # @license
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
t_pararel.py | from simulation import Simulation
import random
from time import sleep
from multiprocessing import Process, Pipe
import logging
#logging.basicConfig(level=logging.DEBUG)
#logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
STEP_REPEAT ... |
MetaParser.py | from __future__ import division
from datetime import date
import datetime
import dateutil.parser
import json
import sys
import os
import logging
from multiprocessing import Queue, Process
from queue import Empty
from .multiprocessingHelp import mp_stats, running_processes
import time
defaultDate = datetime.datetime(d... |
binja_gef.py | """
This script is the server-side of the XML-RPC defined for gef for
BinaryNinja.
It will spawn a threaded XMLRPC server from your current BN session
making it possible for gef to interact with Binary Ninja.
To install this script as a plugin:
$ ln -sf /path/to/gef/binja_gef.py ~/.binaryninja/plugins/binaryninja_gef.... |
menulcd.py | import os
from subprocess import call
from xml.dom import minidom
import webcolors as wc
from PIL import ImageFont, Image, ImageDraw
import LCD_1in3
import LCD_1in44
import LCD_Config
from lib.functions import *
import RPi.GPIO as GPIO
class MenuLCD:
def __init__(self, xml_file_name, args, usersettings, ledse... |
pretty_mpd_db.py | #!/usr/bin/env python3
# coding: utf-8
"""
read the mpd music directory to get albums, paths, albumartist, genre, year and create a json file
* Only supports AAC / ALAC / FLAC / MP3
* pip(3) install mutagen
"""
import os
import sys
import argparse
import multiprocessing
import threading
import queue
import json
from ... |
run-clang-tidy-on-compile-commands.py | #!/usr/bin/env python
#
# Runs clang-tidy on files based on a `compile_commands.json` file
#
"""
Run clang-tidy in parallel on compile databases.
Example run:
# This prepares the build. NOTE this is `build` not `gen` because the build
# step generates required header files (this can be simplified if needed
# to invo... |
Copipeditor.py | import tkinter as tk
import tkinter.ttk as ttk
import tkinter.font as font
from tkinter import messagebox as mbox
import os
import sys
from tkinter import filedialog
from typing import Text
import datetime
import threading
from logging import getLogger, StreamHandler, FileHandler, basicConfig, DEBUG, INFO
import ctype... |
scan.py | #!/usr/bin/env python
# encoding=utf-8
#codeby 道长且阻
#email ydhcui@suliu.net/QQ664284092
#https://github.com/ydhcui/Scanver
import socket
import re
import os
import sys
import traceback
import time
import json
import urllib
import threading
import datetime
import copy
import queue
from lib import requests
from... |
run_agents.py | from multiprocessing import Process, JoinableQueue
import sys
from glob import glob
from os import path
from src.run import main
import json
agent_configs = sys.argv[1]
q = JoinableQueue()
NUM_THREADS = 8
print(agent_configs)
def run_single_config(queue):
while True:
conf_path = queue.get()
params... |
bitcoin.py | """
Bitcoin
Usage:
bitcoin.py serve
bitcoin.py ping [--node <node>]
bitcoin.py tx <from> <to> <amount> [--node <node>]
bitcoin.py balance <name> [--node <node>]
Options:
-h --help Show this screen.
--node=<node> Hostname of node [default: node0]
"""
import uuid, socketserver, socket, sys, argparse,... |
account.py | #!/usr/bin/python3
import json
import os
import threading
from getpass import getpass
from pathlib import Path
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
import eth_keys
from eth_hash.auto import keccak
from hexbytes import HexBytes
from brownie._config import CONFIG
from brownie._singleton... |
firebase.py | import functools
import firebase_admin
from threading import Thread
from firebase_admin.db import ApiCallError
from firebase_admin import credentials, db, storage
class FirebaseAdapter:
def __init__(self, database, bucket, cred):
cred = credentials.Certificate(cred)
# Initialize the app with a ... |
EzServer.py | import re
import json
import hashlib
import random
import base64
import time
import redis
import _thread
import threading
import pymysql
#from www import GlobalVar
mysql_ip = '127.0.0.1'
mysql_port = 3306
mysql_user = 'root'
mysql_password = 'huoji120'
mysql_database = 'test'
redis_ip = '127.0.0.1'
redis_port = 6379
... |
test.py | # /*******************************************************************************
# Copyright (C) 2021 Xilinx, 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://... |
sqliteq.py | import logging
import weakref
from threading import local as thread_local
from threading import Event
from threading import Thread
try:
from Queue import Queue
except ImportError:
from queue import Queue
try:
import gevent
from gevent import Greenlet as GThread
from gevent.event import Event as GEv... |
XChat-DeaDBeeF.py | # -*- coding: utf-8 -*-
#
# XChat-DeaDBeeF - XChat/HexChat script for DeaDBeeF integration
# Python 3 version
#
# Unless indicated otherwise, files from the XChat-DeaDBeeF project
# are licensed under the WTFPL version 2. Full license information
# for the WTFPL version 2 can be found in the LICENSE.txt file.
#
... |
ws.py | # vim: set filetype=python tabstop=4 shiftwidth=4 expandtab:
import threading
import websocket
from excepthook import excepthook
import chat
def start_event_loop():
socket = websocket.WebSocketApp("ws://qa.sockets.stackexchange.com", on_open=init_ws, on_message=lambda *x: None,
... |
launcher.py | """
Simple experiment implementation
"""
from hops.experiment_impl.util import experiment_utils
from hops import devices, tensorboard, hdfs
import threading
import time
import json
import os
import six
def _run(sc, map_fun, run_id, args_dict=None, local_logdir=False, name="no-name"):
"""
Args:
sc:
... |
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... |
actor_worker.py | import random
import signal
import time
from collections import OrderedDict
from queue import Empty
import numpy as np
import psutil
import torch
from gym.spaces import Discrete, Tuple
from torch.multiprocessing import Process as TorchProcess
from algorithms.appo.appo_utils import TaskType, make_env_func, set_gpus_fo... |
eps.py | import re
import time
import serial
import threading
class EPS():
'''
'''
def __init__(self, port, baud_rate,
steering_rate, telemetry_period,
max_angle, max_steer, middle_steer):
'''
'''
self.__port = port
self.__baud_rate = baud_rate
... |
application.py | # GUI Application automation and testing library
# Copyright (C) 2006 Mark Mc Mahon
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at you... |
burgerbot.py | import time
import os
import json
import threading
import logging
import sys
from dataclasses import dataclass
from typing import List
from datetime import datetime
import requests
from bs4 import BeautifulSoup
from telegram import ParseMode
from telegram.ext import CommandHandler, Updater
from telegram.ext.callbackc... |
commander_expend.py | #!/usr/bin/env python
import rospy
from mavros_msgs.msg import GlobalPositionTarget, State
from mavros_msgs.srv import CommandBool, CommandTOL, SetMode
from geometry_msgs.msg import PoseStamped, Twist
from sensor_msgs.msg import Imu, NavSatFix
from std_msgs.msg import Float32, String, Bool
from pyquaternion import Quat... |
WaitingRoomScene.py | from Systems.Engine.Scene import Scene
from Systems.Engine.Window import Window
from Systems.Network.PyPongClient import PyPongClient
from Systems.Network.Messages.IndexAssignmentProc import IndexAssignmentProc
from Systems.Scenes.Gameplay.GameplayScene import GameplayScene
import threading
import pygame
class Waitin... |
MobileConnect.py | import bluetooth
import critical
import clientEmergency
import threading
import time
screenPi = 'b8:27:eb:3d:ee:57'
goodPi = 'b8:27:eb:c8:66:03'
def sendEmergency():
print("Threaded Emergency!")
#screePi emergency signal
#t1 = threading.Thread(target = clientEmergency.black_swan, name = 'screenPi', args ... |
test_subprocess.py | import unittest
from test import script_helper
from test import support
import subprocess
import sys
import signal
import io
import locale
import os
import errno
import tempfile
import time
import re
import selectors
import sysconfig
import warnings
import select
import shutil
import gc
import textwrap
try:
import... |
sensi-file.py | import threading
import lib.common
import lib.urlentity
MODULE_NAME = 'sensi-file'
def init():
lib.common.PUBLIC_STORAGE[MODULE_NAME] = []
def check(url_obj):
url_obj.make_get_request()
if url_obj.get_response() is not None:
resp = url_obj.get_response()
if resp.status_code != 404:
... |
main.py | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import re
import subprocess
import sys
import threading
import tornado.web
# Install the pyzmq ioloop. This has to be done before anything else from
# tornado is imported.
from zmq.eventloop import ioloop
ioloop.i... |
app.py | import os
import signal
from multiprocessing import Process
import face_recognition
import prediction_knn
import prediction_svm
import settings
from flask import Flask, jsonify, redirect, render_template, request
from werkzeug.utils import secure_filename
import socket
print(socket.gethostname())
ALLOWED_EXTENSIONS ... |
worker_utils.py | from abc import abstractmethod
from logging import getLogger
from threading import Thread
from typing import Any, Optional
from typing_extensions import Self # type:ignore
log = getLogger(__name__)
class BaseWorker:
"""
A simple base class for a worker that should be launched in a thread and run some contin... |
bridge.py | #!/usr/bin/env python3
# type: ignore
import carla # pylint: disable=import-error
import time
import math
import atexit
import numpy as np
import threading
import cereal.messaging as messaging
import argparse
from common.params import Params
from common.realtime import Ratekeeper, DT_DMON
from lib.can import can_functi... |
harvis.py | import requests
import time
from colors import bcolors
import threading
import random
import json
import os
import subprocess
import sys
from os import chmod
from Crypto.PublicKey import RSA
import logging
import paramiko
import config
from threading import Thread
from namecheap import Api
import redirect_setup
import ... |
ManoSerial.py | # -*- coding: utf-8 -*-
import struct
from struct import *
import serial
from array import array
from threading import Lock, Thread
from collections import namedtuple
from io import BytesIO
# control comands
from variables import *
import time as t
class ManoSerial(object):
def __init__(self... |
tread.py | from threading import Thread
import time, os
# código da thread
def corredor(nome, pausa, distancia):
percorrido = 0
print(nome, "iniciou!")
while percorrido <= distancia:
print(nome, ":", percorrido, "/", distancia)
percorrido += 1
time.sleep(pausa)
print(nome, "terminou.")
... |
ShellModuleSession.py | # Copyright (c) 2021, 2022, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# ... |
noveldownload.py | import urllib3
from lxml import etree
import os
from pathlib import Path
from settings import settings
import shutil
import queue
import threading
import time
downloadSetting = {}
def initNovelSource(source='shuquge'):
global downloadSetting,novelSource
downloadSetting = settings.settings[source]
def get_url... |
PC_Miner.py | #!/usr/bin/env python3
##########################################
# Duino-Coin Python Miner (v1.9)
# https://github.com/revoxhere/duino-coin
# Distributed under MIT license
# © Duino-Coin Community 2021
##########################################
import socket, statistics, threading, time, re, subprocess, hashlib... |
layer3.py | import argparse
import datetime
import logging
import math
import sys
from time import sleep
from numpy.lib.function_base import rot90
from airsim.types import DrivetrainType, Pose, YawMode
from airsim.utils import to_quaternion
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits imp... |
wsdump.py | #!c:\users\lgale\pycharmprojects\test\venv\scripts\python.exe
import argparse
import code
import sys
import threading
import time
import ssl
import gzip
import zlib
import six
from six.moves.urllib.parse import urlparse
import websocket
try:
import readline
except ImportError:
pass
def get_encoding():
... |
tribrid_v2_threaded.py | import time, copy, datetime, pickle, cv2, dlib, sys, threading
import face_recognition
from firebase import firebase
from datetime import date
import numpy as np
from imutils.video import FPS, WebcamVideoStream
import concurrent.futures
room = sys.argv[1]
# initialize firebase url
firebase = firebase.FirebaseApplicati... |
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... |
qt.py | #!/usr/bin/env python
#
# Electrum - Lightweight Bitcoin Client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... |
add_code_to_python_process.py | r'''
Copyright: Brainwy Software Ltda.
License: EPL.
=============
Works for Windows by using an executable that'll inject a dll to a process and call a function.
Note: https://github.com/fabioz/winappdbg is used just to determine if the target process is 32 or 64 bits.
Works for Linux relying on gdb.
... |
_logger.py | """
.. References and links rendered by Sphinx are kept here as "module documentation" so that they can
be used in the ``Logger`` docstrings but do not pollute ``help(logger)`` output.
.. |Logger| replace:: :class:`~Logger`
.. |add| replace:: :meth:`~Logger.add()`
.. |remove| replace:: :meth:`~Logger.remove()`
.. |... |
wallet_multiwallet.py | #!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test multiwallet.
Verify that a bitcoind node can load multiple wallet files
"""
from decimal import D... |
pathFindSimulatorViewer.py | import copy
import os
from threading import Thread
import time
import tkFileDialog
from engine import interface
from engine.interface import generator
from engine.interface.pathFindParams import PathFindParams
from engine.interface.vehicle import DEFAULT_VEHICLE
from gui.simulator.pilot import Pilot
from gui.simulator... |
generator.py | import queue
import threading
def prefetch_generator(generator, to_fetch=10):
q = queue.Queue(maxsize=to_fetch)
def thread_worker(queue, gen):
for val in gen:
queue.put(val)
queue.put(None)
t = threading.Thread(target=thread_worker, args=(q, generator))
some_exception = N... |
visualization.py | """Klamp't world visualization routines. See demos/vistemplate.py for an
example of how to run this module.
Due to weird OpenGL behavior when opening/closing windows, you should only
run visualizations using the methods in this module, or manually running
glprogram / qtprogram code, but NOT BOTH. Since the editors i... |
ScannerApiController.py | from flask import Flask, request, jsonify
from flask_pymongo import PyMongo
import json
from TemperatureScanner.Services.ArduinoService import ArduinoService
from TemperatureScanner.Integration.Adruino.SerialHandler import SerialHandler
from Common.Configuration.ConfigurationService import ConfigurationService
from Tem... |
eye-contact.py | #!/usr/bin/env python3
"""Main script for gaze direction inference from webcam feed."""
import argparse
import os
import queue
import threading
import time
import coloredlogs
import cv2 as cv
#for linux compatible video
import skvideo.io as skv
import numpy as np
import tensorflow as tf
from datasources import Vide... |
rond.py | import threading
import time
import random
resultados = []
procesos = []
ronda = []
mutexActivo = threading.Semaphore(1)
mutexActivo2 = threading.Semaphore(1)
def ejecucion(idProceso,quantum):
tiempo = 0
while(len(ronda)>0):
tiempo += 1
mutexActivo.acquire()
aux = ronda[0]
rond... |
miniterm.py | #!c:\users\conno\documents\ui_practice\scripts\python.exe
#
# Very simple serial terminal
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C)2002-2015 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
import codecs
import os
import sys
import threading
import seri... |
Chap10_Example10.10.py | from threading import *
def displaymsg():
print("Child Thread")
myt1 = Thread(target = displaymsg)
myt1.start()
print(f"{current_thread().getName()} unique id is: {current_thread().ident}" )
print(f"{myt1.getName()} unique id is: {myt1.ident}" )
|
test_logging.py | # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... |
app.py | #!/usr/bin/env python
import os
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import datetime
import paho.mqtt.client as mqtt
import subprocess
import threading
import json
import logging
import traceback
import websocket
import socket
import time
import ari
import re
import requests
from asterisk.ami import A... |
conftest.py | import logging
import os
import tempfile
import pytest
import threading
from datetime import datetime
import random
from math import floor
from ocs_ci.utility.utils import TimeoutSampler, get_rook_repo
from ocs_ci.ocs.exceptions import TimeoutExpiredError, CephHealthException
from ocs_ci.utility.spreadsheet.spreadshe... |
ethereumticker.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys, traceback
import threading
import time
import simplejson as json
import urllib2
from PyQt4 import QtGui,QtCore
from boardlet import Boardlet
from modellet import Modellet
class EthereumTicker(Boardlet):
def __init__(self, parent, ethusd):
super(E... |
task.py | """ Backend task management support """
import itertools
import json
import logging
import os
import re
import sys
import warnings
from copy import copy
from datetime import datetime
from enum import Enum
from multiprocessing import RLock
from operator import itemgetter
from tempfile import gettempdir
from threading im... |
test_comms.py | import pytest
import time as ttime
import json
import multiprocessing
import threading
import asyncio
import zmq
from bluesky_queueserver.manager.comms import (
PipeJsonRpcReceive,
PipeJsonRpcSendAsync,
CommTimeoutError,
CommJsonRpcError,
ZMQCommSendThreads,
ZMQCommSendAsync,
)
from bluesky_que... |
runner.py | #!/usr/bin/env python3
# Copyright 2010 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
"""This is the Emscripten test runner. To run ... |
test_local_task_job.py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
AVR_Miner.py | #!/usr/bin/env python3
"""
Duino-Coin Official AVR Miner 3.1 © MIT licensed
https://duinocoin.com
https://github.com/revoxhere/duino-coin
Duino-Coin Team & Community 2019-2021
"""
from os import _exit, mkdir
from os import name as osname
from os import path
from os import system as ossystem
from platform import machin... |
main.py | """
This module is used to handle communication to irma server.
"""
import time
from enum import Enum
from urllib.parse import urljoin
import requests
import threading
IRMA_DISCLOSE_CONTEXT = "https://irma.app/ld/request/disclosure/v2"
IRMA_SIGNATURE_CONTEXT = "https://irma.app/ld/request/signature/v2"
IRMA_ISSUANCE... |
threads_exceptions_and_throttling.py | """
"An example of a threaded application" section example
showing how throttling / rate limiting can be implemented
in multithreaded application
"""
import random
import time
from queue import Queue, Empty
from threading import Thread, Lock
import requests
SYMBOLS = ('USD', 'EUR', 'PLN', 'NOK', 'CZK')
BASES = ('US... |
app.py | from IPython.display import display, HTML,Image,Javascript,FileLink
from ipywidgets import widgets, interact, interact_manual, interactive, AppLayout, Button, Layout, GridspecLayout
import os, threading, urllib, math
from queue import Queue
from ..notebook import get_notebook_outputs, get_notebook_inputs
from .widget_... |
satellite_simulator.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2020, Myriota Pty Ltd, All Rights Reserved
# SPDX-License-Identifier: BSD-3-Clause-Attribution
#
# This file is licensed under the BSD with attribution (the "License"); you
# may not use these files except in compliance with the License.
#
# You may ob... |
put.py | # Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import division
from future.utils import listitems, listvalues
from builtins import str
from builtins import object
import argparse
import arvados
import arvados.collection
import base64
import copy
import... |
realtimeLogger.py | # Copyright (C) 2015-2018 Regents of the University of California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
PerThreadDict.py | """Per-thread dictionary."""
import thread
class PerThreadDict(object):
"""Per-thread dictionary.
PerThreadDict behaves like a normal dict, but changes to it are kept
track of on a per-thread basis. So if thread A adds a key/value pair
to the dict, only thread A sees that item. There are a few non... |
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... |
MainForm.py | import sys
import time
import curses
from threading import Thread, Lock
from spotui.src.util import debounce
from spotui.src.Logging import logging
from spotui.src.spotifyApi import SpotifyApi
from spotui.src.TracksMenu import TracksMenu
from spotui.src.LibraryMenu import LibraryMenu
from spotui.src.PlaylistMenu import... |
main.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2018/5/23 下午1:19
# @Author : Yang Yuchi
import argparse
import threading
import multiprocessing as mp
import tensorflow as tf
import gym
from network import ActorCriticNet, Agent
from utils import Counter
from test import test
# Hyper parameters
parser = ar... |
quickData.py | # Copyright 2017 Tate M. Walker
# 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... |
main.py | #Server dependencies
#from gevent.pywsgi import WSGIServer
from threading import Thread
from flask import Flask, request, send_from_directory
from flask_mobility import Mobility
import os
#Apis used
from assistant import sendToAssistant
#File management
#from bs4 import BeautifulSoup
import codecs
#import re
import j... |
tello-stream.py | #!/usr/bin/python3
import threading
import socket
import cv2
""" Welcome note """
print("\nTello Video Stream Program\n")
class Tello:
def __init__(self):
self._running = True
self.video = cv2.VideoCapture("udp://@0.0.0.0:11111")
def terminate(self):
self._running = False
se... |
custom.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.