source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
test_subprocess.py | import unittest
from unittest import mock
from test import support
import subprocess
import sys
import signal
import io
import itertools
import os
import errno
import tempfile
import time
import traceback
import selectors
import sysconfig
import select
import shutil
import threading
import gc
import textwrap
from test.... |
server.py | from base64 import decode
import socket
import select
import threading
import sys
from datetime import datetime
from requests import get
import os
# Connection Data
ip = get('https://api.ipify.org').content.decode('utf8')
print('My public IP address is: {}'.format(ip))
host = socket.gethostbyname(ip)
port = 1131
# S... |
data_source_implements.py | # Copyright (c) 2017 Sony Corporation. 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 applicabl... |
rpc.py | """ an XML-RPC server to allow remote control of PyMol
Author: Greg Landrum (glandrum@users.sourceforge.net)
Created: January 2002
$LastChangedDate$
License: This file is part of the RDKit. The contents are covered by the terms of
the BSD license which is included in the file license.txt, f... |
utils_test.py | import asyncio
import collections
import copy
import functools
import gc
import inspect
import io
import itertools
import logging
import logging.config
import os
import queue
import re
import shutil
import signal
import socket
import subprocess
import sys
import tempfile
import threading
import uuid
import warnings
imp... |
func.py | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 30 20:15:06 2020
@author: Administrator
"""
import pandas as pd
import numpy as np
from queue import Queue
from scipy import interpolate
import statsmodels.formula.api as smf
import math
import logging
import threading
import re
EXIT = False # 线程退出信号
class Quantile_G... |
test_mlt_base.py | # -*- coding:utf-8 -*-
# Author: Xue Yang <yangxue-2019-sjtu@sjtu.edu.cn>, <yangxue0827@126.com>
# License: Apache-2.0 license
# Copyright (c) SJTU. ALL rights reserved.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import math
import os
f... |
process_pool.py | import time
from multiprocessing import Process, Queue
class ProcessPool(object):
def __init__(self, func, process_count=5):
self.func = func
self.process_count = process_count
self.queue = Queue()
self._create_processes()
def _create_processes(self):
for i in ... |
ContextTest.py | ##########################################################################
#
# Copyright (c) 2012, John Haddon. 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... |
test_quota.py | import random
import time
import threading
from tests import unittest
from botocore.retries import quota
class TestRetryQuota(unittest.TestCase):
def setUp(self):
self.max_capacity = 50
self.retry_quota = quota.RetryQuota(self.max_capacity)
self.shutdown_threads = False
self.seen_... |
monitored_session_test.py | # pylint: disable=g-bad-file-header
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENS... |
network.py |
# Electrum - Lightweight Bitcoin Client
# Copyright (c) 2011-2016 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 limitation the ri... |
coordinator.py | import sys
import queue
import threading
import json
import collections
import time
from spirecomm.spire.game import Game
from spirecomm.spire.screen import ScreenType
from spirecomm.communication.action import Action, StartGameAction
def read_stdin(input_queue):
"""Read lines from stdin and write them to a queue
... |
__init__.py | #!/usr/bin/env python
'''
.+"+.+"+.+"+.+"+.
( )
) rediscache.py (
( )
"+.+"+.+"+.+"+.+"
rediscache is a function decorator that will cache its result in a Redis database.
Parameters:
- refresh: the number of seconds after which the cached data will be refreshed using the decorated f... |
test_enum.py | import enum
import inspect
import pydoc
import unittest
from collections import OrderedDict
from enum import Enum, IntEnum, EnumMeta, Flag, IntFlag, unique, auto
from io import StringIO
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
from test import support
try:
import threading
except ImportError... |
Meridian_console_without_ros_220506a.py | # #!/usr/bin/python3
# coding: UTF-8
# もしくは #!/usr/bin/env python など環境に合わせて
# Izumi Ninagawa & Meridian project
# 2022.02.05 UDP通信動作は安定。
# 2022.02.05 COMMAND WINDOWのPOWERチェックボックスでサーボ電源ON
# 2022.02.05 上記サーボ電源ON中にスライドバー操作でサーボ動作(ただしスライドバーが小さいため大まかな動作確認のみに利用可)
# 2022.04.05 コードを少し整理整頓
# 2022.04.14 各経路でのエラーの検知と表示の機能を搭載
# 20... |
repair_mesh.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import optparse
import os
import re
import sys
import vtk
from multiprocessing import Process
import parse_imx
RADIUS = 3 # For Open and Gauss
SCALE = 50.0 # For Rasterization
class RepairMeshParser(optparse.OptionParser):
def __init__(self):
... |
core.py | # Copyright 2021 DeepMind Technologies Limited
#
# 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 agr... |
run_unittests.py | #!/usr/bin/env python3
# Copyright 2016-2017 The Meson development team
# 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 ... |
eventmaster.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import threading
import queue
# TODO: Переписать основной модуль под этот.
class EventError(Exception):
""" исключение события """
pass
class Event:
""" Класс представляющий событие """
def __init__(self, name=None, foo=None):
self._name = name... |
util.py |
from os.path import abspath, join, dirname, basename, split
from datetime import datetime
from threading import Thread
import json
import sys
# Import correct Queue
if (sys.version_info[0] == 3):
from queue import Queue
else: # Python 2
from multiprocessing import Queue
# Debugging this adapter
debug = Tru... |
mqtt-data-logger.py | #!python3
###demo code provided by Steve Cope at www.steves-internet-guide.com
##email steve@steves-internet-guide.com
###Free to use for any purpose
"""
This will log messages to file.Los time,message and topic as JSON data
"""
mqttclient_log=False #MQTT client logs showing messages
Log_worker_flag=True
import paho.mq... |
cmd_helper.py | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A wrapper for subprocess to make calling shell commands easier."""
import logging
import os
import pipes
import select
import signal
import string
im... |
__init__.py | '''
PyMOL Molecular Graphics System
Copyright (c) Schrodinger, Inc.
Supported ways to launch PyMOL:
If $PYMOL_PATH is a non-default location, it must be set and exported
before launching PyMOL.
From a terminal:
shell> python /path/to/pymol/__init__.py [args]
From a python main thread:
>>> # with G... |
test_failure.py | import json
import logging
import os
import signal
import sys
import tempfile
import threading
import time
import numpy as np
import pytest
import redis
import ray
from ray.experimental.internal_kv import _internal_kv_get
from ray.autoscaler._private.util import DEBUG_AUTOSCALING_ERROR
import ray._private.utils
from ... |
base.py | """Worker pool executor base classes."""
import os
import numbers
import threading
import time
import datetime
import pprint
import traceback
import queue
from schema import Or, And
from testplan.common.config import ConfigOption
from testplan.common import entity
from testplan.common.remote.remote_resource import Re... |
ruleset.py | from krules_core import RuleConst as Const
from krules_core.base_functions import *
from krules_core.event_types import SUBJECT_PROPERTY_CHANGED
import websockets
import asyncio
import threading
rulename = Const.RULENAME
subscribe_to = Const.SUBSCRIBE_TO
ruledata = Const.RULEDATA
filters = Const.FILTERS
processing = ... |
serve.py | # -*- coding: utf-8 -*-
import argparse
import json
import os
import signal
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 .. import localpaths
import sslutils
from wptse... |
dark_dec.py | # Decompiled At : Fri Mar 27 14:21:48 2020
# pythom bytecode 2.7
import os, sys, time, datetime, random, hashlib, re, threading, json, getpass, urllib, cookielib, requests, mechanize
from multiprocessing.pool import ThreadPool
from requests.exceptions import ConnectionError
from mechanize import Browser
reload(sys)
sy... |
op_test_types.py | # coding=utf-8
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
from builtins import *
# Import the SPL decorators
from streamsx.spl import spl
import sys
#------------------------------------------------------------------
# Test passing in SPL types functions
#---------------------------------------... |
Client.py | import socket, time, threading
import pyaudio
from io import BytesIO
import numpy as np
from PIL import Image
import cv2
from protocols.RTSP import RTSP
from protocols.RTP import RTP
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
TIME = 0.023219954648526078
CHUNK = 1024
class Client:
DEFAULT_CHUNK_SIZE = 4... |
browser.py | # -*- coding: utf-8 -*-
#
# This file is part of urlwatch (https://thp.io/2008/urlwatch/).
# Copyright (c) 2008-2021 Thomas Perl <m@thp.io>
# 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.... |
webrelaypoker.py | #!/usr/bin/env python3
#
# I waive copyright and related rights in the this work worldwide
# through the CC0 1.0 Universal public domain dedication.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
#
# Author(s):
# Tom Parker <tparker@usgs.gov>
""" Poke web relays to initial camera upload."""
from strin... |
__init__.py | from __future__ import print_function
import base64
import contextlib
import copy
import email.utils
import functools
import gzip
import hashlib
import httplib2
import os
import random
import re
import shutil
import six
import socket
import ssl
import struct
import sys
import threading
import time
import traceback
imp... |
parallel_prime_test.py | __author__ = 'jyoung'
"""
Determine how many primes are less than a given natural number (in parallel)
"""
import math
import multiprocessing as mp
import numpy
import time
def is_prime(vec, output):
"""determine how many primes in vector"""
numPrime = 0
for n in vec:
isPrime = True
for ... |
engagement.py | """
This class engages with the huuuumans.
When face_detect.py detects new new_faces, the thread this class creates responds
in several ways.
If a single unidentified face is in the new_faces data, start the process of gathering
their name and images of them to be used to retrain the ML model.
Unless the above info... |
systray.py | import os
from MainProgramFunctionAndParser import MainProgram
from win32_adapter import *
import threading
import uuid
PyAV = MainProgram()
class SysTrayIcon(object):
"""
menu_options: tuple of tuples (menu text, menu icon path or None, function name)
menu text and tray hover text should be Unic... |
fileserver.py | from SimpleHTTPServer import SimpleHTTPRequestHandler
from logging import getLogger
import BaseHTTPServer
import logging
import os
import posixpath
import sys
import threading
import time
import urllib
LOG = getLogger(__name__)
class BetterHTTPRequestHandler(SimpleHTTPRequestHandler):
working_dir = None
def... |
dockerTest.py | import logging
import signal
import time
import uuid
from threading import Thread
from subprocess import CalledProcessError
import os
from pwd import getpwuid
from bd2k.util.files import mkdir_p
from toil.job import Job
from toil.leader import FailedJobsException
from toil.lib.docker import dockerCall, dockerCheckOutp... |
test_generator.py | import functools
import os
import threading
import unittest
import numpy
import pytest
import cupy
from cupy import cuda
from cupy.cuda import runtime
from cupy.random import _generator
from cupy import testing
from cupy.testing import _attr
from cupy.testing import _condition
from cupy.testing import _hypothesis
fr... |
robotremoteserver.py | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
# Copyright 2020->future! Mikko Korpela
#
# 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:/... |
__init__.py | """Support for functionality to download files."""
from http import HTTPStatus
import enum
import logging
import os
import re
import threading
import requests
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.util i... |
gnupg.py | """ A wrapper for the 'gpg' command::
Portions of this module are derived from A.M. Kuchling's well-designed
GPG.py, using Richard Jones' updated version 1.3, which can be found
in the pycrypto CVS repository on Sourceforge:
http://pycrypto.cvs.sourceforge.net/viewvc/pycrypto/gpg/GPG.py
This module is *not* forward-... |
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... |
guestsnapshotter.py | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2014 Microsoft 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
#
# U... |
test_hybrid_flnn.py | #!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu" at 14:47, 16/07/2021 %
# ... |
tool.py |
import ast
import ConfigParser
import csv
import datetime
import json
import multiprocessing
import os
import shutil
import subprocess
import sys
import time
from shutil import copyfile
import re
import ntpath
import spats_shape_seq
from spats_shape_seq import Spats
from spats_shape_seq.parse import abif_parse, fastq... |
test_core.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import print_function
from mock import Mock
from mock import patch
from mock import ANY
import os
import sys
from threading import Event
from threading import Thread
import logging
from voluptuous import Schema
from voluptuous import Required
from voluptuou... |
gui.py | import json
import os
import sys
import threading
import time
import webbrowser
import mailpile.auth
import mailpile.util
from mailpile.commands import Quit
from mailpile.i18n import gettext as _
from mailpile.safe_popen import Popen, PIPE, MakePopenSafe, MakePopenUnsafe
from mailpile.ui import Session
from mailpile.u... |
iad.py | import os
import time
import hashlib
import sys
import copy
import threading
import datetime
import logging
from logging import config
from queue import Queue
from internetarchive import ArchiveSession, File
from hurry.filesize import size
import yaml
import requests
LOGGER = logging.getLogger(__name__)
class Inter... |
wsdump.py | #!/Users/alexandermcclead/PycharmProjects/Enterprise_Data_Science_Final/venv-old/bin/python3
import argparse
import code
import sys
import threading
import time
import ssl
import six
from six.moves.urllib.parse import urlparse
import websocket
try:
import readline
except ImportError:
pass
def get_encoding... |
confmeasure.py | #!/usr/bin/env python3
import contextlib
import os
import subprocess
import sys
import threading
from datetime import datetime
from pathlib import Path
from queue import Queue
from shlex import quote
from typing import Any, List, Type, Union, Callable, Optional
import pytest
from qemu import QemuVm, VmImage, spawn_qe... |
watcher.py | import inspect
import pathlib
import os
import logging
import click
import asyncio
import traceback
import threading
from watchgod import awatch
from .core.core_events import core_event_bus, CoreEvents
from .core.globs import request_hooks
DIRTY_APPS = set() # apps that need to be reloaded (lazy watching)
APP_WAT... |
__init__.py | """
This package holds communication aspects
"""
import binascii
import json
import logging
import socket
import traceback
from abc import abstractmethod
from binascii import unhexlify
from threading import Thread
from pylgbst.messages import MsgHubAction
from pylgbst.utilities import str2hex
log = logging.getLogger(... |
serial_connection.py | import serial
from thonny.plugins.micropython.connection import MicroPythonConnection, ConnectionFailedException
import threading
import time
from serial.serialutil import SerialException
import logging
import platform
from textwrap import dedent
class SerialConnection(MicroPythonConnection):
def __init__(self, p... |
twitch_chat_notifcations.py | from threading import Thread
from queue import Queue, Empty
from twitchbot import Mod, Message, CONFIG_FOLDER, Config
try:
from win10toast import ToastNotifier
except (ImportError, ModuleNotFoundError):
print(
'cannot find windows 10 toast notification library\nplease install it via pip:\n\tpip instal... |
worker.py | from web.rest.base import Connection
from web.wamp.base import WampBase
from config import Config
import multiprocessing as mp
import numpy as np
import time
import queue
from copy import deepcopy
import sys
from threading import Thread
import pipes
import asyncio
import os
import json
class UnixProtocol(asyncio.Prot... |
anndata_adaptor.py | import warnings
import anndata
import numpy as np
from packaging import version
import pandas as pd
import scipy as sp
import traceback
from scipy import sparse
from sklearn.preprocessing import StandardScaler
import igraph as ig
import leidenalg
import time
from sklearn.decomposition import PCA
import os
import gc
fro... |
ssl_loop_multiThreading.py | # !/usr/bin/env python
# -*- coding:utf-8 _*-
# @Author: swang
# @Contact: wang00sheng@gmail.com
# @Project Name: SmartWalker-master
# @File: ssl_loop.py
# @Time: 2022/01/02/20:34
# @Software: PyCharm
import os, sys
module_dir = os.path.dirname(os.path.abspath(__file__))
project_dir = os.path.dirname(module_dir)
sys.... |
sensor.py | '''
Created on 14 apr. 2018
@author: Mike
'''
import os, time, socket, threading, random, sys
import RPi.GPIO as GPIO
### Global Variables ###
## Connectivity ##
SKT = None # Socket anchor
IP_SRC = "10.34.0.1" # Local IP
IP_TRG = "10.35.0.1" # IP to actuator
U... |
CamOperation_class.py | # -- coding: utf-8 --
import sys
import threading
import msvcrt
import _tkinter
import tkinter.messagebox
from tkinter import *
from tkinter.messagebox import *
import tkinter as tk
import numpy as np
import cv2
import time
import sys, os
import datetime
import inspect
import ctypes
import random
from PIL import Image... |
notebookapp.py | # coding: utf-8
"""A tornado based IPython notebook server.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, ... |
proxy.py | # This file defines a proxy server as the entry point of the entire system
# Assumption: proxy server never goes down.
# Some Thoughts: In production environments, 'proxy server' can be a cluster.
import logging
from threading import Thread
import time
import os
import rpyc
from rpyc.utils.server import ThreadedServer
... |
multithread_template.py | from Queue import Queue
from threading import Thread
def function2Call(inputQueue, outputQueue):
print('threadwork')
def main():
### define queues for threadsave processing (atomic)
q_in = Queue(maxsize = 0)
q_out = Queue(maxsize = 0)
### block for threading (progressbar + 98 threads that do the work)
thre... |
test_jwt_token_manager.py | # pylint: disable=missing-docstring,protected-access
import time
import threading
import jwt
import pytest
from ibm_cloud_sdk_core import JWTTokenManager
class JWTTokenManagerMockImpl(JWTTokenManager):
def __init__(self, url=None, access_token=None):
self.url = url
self.access_token = access_token... |
_test_multiprocessing.py | #
# Unit tests for the multiprocessing package
#
import unittest
import unittest.mock
import queue as pyqueue
import time
import io
import itertools
import sys
import os
import gc
import errno
import signal
import array
import socket
import random
import logging
import subprocess
import struct
import operator
import p... |
pre-game_check.py | #!/usr/bin/env python3
# Idea stolen from http://pastebin.com/Zx0paABU
import re, requests, json, queue, threading
from functools import reduce
key = open('steam_key', 'r').read() # Edit This
data = json.loads(open('data.json').read())
path_to_server_log = "" # Edit This
get_mat... |
dashboard.py | # -*- coding: utf-8 -*-
import numpy as np
import time
from functools import partial
from threading import Thread
from explorepy.tools import HeartRateEstimator
from bokeh.layouts import widgetbox, row, column
from bokeh.models import ColumnDataSource, ResetTool, PrintfTickFormatter, Panel, Tabs
from bokeh.plotting im... |
file_video_capture.py | import cv2
import time
from threading import Thread
from queue import Queue
class FileVideoCapture:
"""Video file capturing class utilizing threading and the queue to obtain FPS speedup.
Credits: https://www.pyimagesearch.com/2017/02/06/faster-video-file-fps-with-cv2-videocapture-and-opencv/
"""
de... |
simple_pipes.py | # coding: utf-8
# Test two way communication
import multiprocessing
import time
def foo(conn):
conn.send([42, None, 'hello'])
print(conn.recv())
conn.close()
if __name__ == '__main__':
parent_conn, child_conn = multiprocessing.Pipe()
p = multiprocessing.Process(target=foo, args=(child_conn,))... |
main_controls.py | # -*- coding: utf-8 -*-
# ==============================================================================
# SBEMimage, ver. 2.0
# Acquisition control software for serial block-face electron microscopy
# (c) 2018-2019 Friedrich Miescher Institute for Biomedical Research, Basel.
# This software is licensed under ... |
access.py | import json
import urlparse, urllib
import argparse
import requests
import threading
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
REQUEST_TOKEN_URL = "https://www.strava.com/oauth/authorize"
ACCESS_TOKEN_URL = "https://www.strava.com/oauth/token"
client_id = None
client_secret_key = None
class Reque... |
racerThrottleMap3.py | """
Script to drive a keras TF model with the Virtual Race Environment.
Usage:
racer.py (--model=<model>) (--host=<ip_address>) (--name=<car_name>)
Options:
-h --help Show this screen.
"""
import os
import numpy as np
import json
import time
from io import BytesIO
import base64
import re
import so... |
ChartController.py | import re
import sys
import json
import threading
import time
from tkinter import W
from PyQt5 import QtCore, QtWidgets
from views.MainView import MainView
from repository.Connection import Connection
from PyQt5.QtGui import QPainter, QPen, QPixmap
from repository.ChartRepository import ChartRepository
from chartilo... |
ioloop_test.py | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
import contextlib
import datetime
import functools
import socket
import sys
import threading
import time
from tornado.ioloop import IOLoop
from tornado.stack_context import ExceptionStackContext, StackContext, wrap... |
utilcore.py | from threading import Timer, Thread
from functools import wraps
from multiprocessing import Process
from functionality_core import FCore
def safelog(func):
"""Version of prism.log that has prism as an optional dependency.
This prevents the sql database, which may not be available, from becoming a strict depend... |
pystats.py | #!/usr/bin/env python3
#Needs PIP3 install pandas numpy
from slickrpc import Proxy
import time
import sys
import datetime
import os
from subprocess import check_output, CalledProcessError
import json
import re
import platform
import calendar
import pandas as pd
import numpy as np
from threading import Thread
utxoamt... |
argparser.py | #-*- coding: utf-8 -*-
""" VoicePlay argument parser module """
from __future__ import print_function
import argparse
import multiprocessing
import subprocess
import sys
from functools import cmp_to_key
from voiceplay import __version__, __title__
from voiceplay.recognition.vicki import Vicki
from voiceplay.recogni... |
asynch.py | # -*- coding: utf-8 -*-
import threading
def setInterval(interval):
""" threaded decorator
>>> @setInterval(10)
... def tick():
... print("Tick")
>>> event = tick() # print 'Tick' every 10 sec
>>> type(event)
<class 'threading.Event'>
>>> event.set() # stop printing 'Tick' every 10 sec
"""... |
app.py | from anuvaad_auditor.loghandler import log_info
from anuvaad_auditor.loghandler import log_error
from flask import Flask
from flask.blueprints import Blueprint
from flask_cors import CORS
from src import routes
import config
import threading
import time
from src.utilities.app_context import LOG_WITHOUT_CONTEXT
import... |
test_sessions.py | import unittest
from http.server import HTTPServer
from threading import Thread
import aio.testing
import aiohttp
from aiovk import ImplicitSession, TokenSession, AuthorizationCodeSession
from aiovk.drivers import CustomClientResponse
from aiovk.exceptions import VkAuthError, VkTwoFactorCodeNeeded, VkCaptchaNeeded
fr... |
main_frame.py | import wx
from mouse import get_position
from time import sleep
from threading import Thread
from pandas import DataFrame
from scan import Scan
from items import Items
class MainFrame(wx.Frame):
def __init__(self, hash_lang, fps):
"""
Init of MainFrame that show item price when mouse is pointing o... |
l7mu.py | from queue import Queue
from optparse import OptionParser
import time,sys,socket,threading,logging,urllib.request,random
def sedot_parameters():
global ip,host,port,thr,item,referer,uri,path,method,isbot
ip = "118.98.73.214"
host = "www.google.com"
port = 55901
thr = 500
path = "/"
uri = "/" # lokasi... |
classAlert.py | import time
import smtplib
import requests
import datetime
import threading
import json
import cleanUp
import onionIp
import os
print "Start"
term = ''
isSpring = None
termCount = 0
deleteQueue = []
with open("jsonLayout.json", "r") as r:
jsonData = json.load(r)
def checkTerm():
print "Check Term called"
global te... |
blocks.py | from graphics import *
import common as var
import random as rand
import lives as l
from sound import *
import threading
def addBlock(win, pos1, pos2, gameVariables):
gameVariables[var.blocks].append(Rectangle(pos1, pos2))
gameVariables[var.blockColors].append(randomColor())
drawBlock(win, -1, gameVariable... |
multi-processing.py | # -*- coding: utf-8 -*-
# @Author: Administrator
# @Date: 2018-05-17 14:47:36
# @Last Modified by: Administrator
# @Last Modified time: 2018-05-17 16:18:50
import os, time, random
import subprocess
from multiprocessing import Process, Pool
# 子进程要执行的代码
def run_proc(name):
print('Run child process %s (%s)...' % (n... |
__init__.py | """
homeassistant
~~~~~~~~~~~~~
Module to control the lights based on devices at home and the state of the sun.
"""
import time
import logging
import threading
from collections import defaultdict, namedtuple
from datetime import datetime
logging.basicConfig(level=logging.INFO)
ALL_EVENTS = '*'
EVENT_HOMEASSISTANT_... |
eater.py | import json
import logging
import os
import threading
import time
from datetime import datetime
import requests
from sql_db import DBSession, get_twitter_message, init_db
from transfer_api import get_transfer
from tweater import TwEater, TwOrder, TwChef
# from pymongo import MongoClient
logging.basicConfig(level=log... |
xbox.py | from inputs import get_gamepad
import math
import threading
import time
from KobukiDriver import *
class XboxController(object):
MAX_TRIG_VAL = math.pow(2, 8)
MAX_JOY_VAL = math.pow(2, 15)
def __init__(self):
self.LeftJoystickY = 0
self.LeftJoystickX = 0
self.RightJoystickY = 0
... |
qtexampleselector.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 daniel (daniel.kappler@gmail.com)
#
# This program 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 3 of the License, or
... |
websocket.py | import asyncio
import json
import logging
import os
from threading import (
Thread,
)
from types import (
TracebackType,
)
from typing import (
Any,
Optional,
Type,
Union,
)
from eth_typing import (
URI,
)
from websockets.client import (
connect,
)
from websockets.legacy.client import (... |
run.py | import sys
import logging
from os import path
from os import remove
import requests
import deviceRegistration.registrationProcess
import API.authentication as auth
import deviceControl.operationsWatcher
import API.identity
import time
import threading
import utils
import utils.threadCommunication as communication
impor... |
Keylogger.py | from pynput.keyboard import Key,Listener
import SendMail
import win32gui
import datetime
import requests
import threading
import sys
from bs4 import BeautifulSoup
import time
count = 0
keys = []
tempWindow=""
globalX=""
def on_press(key):
global keys, count,tempWindow,globalX
# Get the window name while typing ... |
scalene_sigqueue.py | import queue
import threading
from typing import Any, Generic, Optional, TypeVar
T = TypeVar("T")
class ScaleneSigQueue(Generic[T]):
def __init__(self, process: Any) -> None:
self.queue: queue.SimpleQueue[Optional[T]] = queue.SimpleQueue()
self.process = process
self.thread: Optional[thre... |
core_test.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
eegscopetest.py | # eegScope.py
#
# Receives analog data over serial port and plots the data
# in real time along with a real time FFT
# Author: Ronan Byrne
# Last Updated: 09/05/2018
#
from pyqtgraph.Qt import QtCore, QtWidgets
import pyqtgraph as pg
import numpy as np
import threading
import sys
class Scope(object):
def __init... |
sioServ.py | #!/usr/bin/python2
import socketio
#import eventlet
#import eventlet.wsgi
from flask import Flask
import threading
import Queue
from tennis_show import TennisShow
import current_bridge
###############################################################################
'''SocketIO based server for 15-Love
Handles events... |
Receiver.py | # Base-station Code
from mysql.connector import Error
import mysql.connector # connect python dengan mysql
import time
import serial # akses serial port
import datetime # waktu
import concurrent.futures # threads
import threading
# variabel
appRunning = True
menuShow = True
sensing = True
counter = 15
insertDataPa... |
test_base_events.py | """Tests for base_events.py"""
import concurrent.futures
import errno
import math
import os
import socket
import sys
import threading
import time
import unittest
from unittest import mock
import asyncio
from asyncio import base_events
from asyncio import constants
from test.test_asyncio import utils as test_utils
fro... |
eslab_pi.py | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
'ESLAB_IOT Module For RaspberryPi'
__author__ = 'Kid Wu'
import time
import threading
import wiringpi
import websocket
import json
import urllib.parse
import urllib.request
class DHT11(object):
def __init__(self,owpin):
"""
Test DEMO
:param o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.