source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
__init__.py | #!/usr/bin/env python3
# Copyright 2018-2020, Wayfair GmbH
#
# 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... |
test.py | import threading
from win10toast import ToastNotifier
import time
lol=5
time_=int(lol)
def no(lo):
to=ToastNotifier()
time.sleep(10)
to.show_toast("helo",duration=lo)
b = threading.Thread(target=no,args=[time_])
b.start()
print("task done")
|
ft5406.py | #https://github.com/pimoroni/python-multitouch/blob/master/library/ft5406.py
import glob
import io
import os
import errno
import struct
from collections import namedtuple
import threading
import time
import select
import Queue as queue
TOUCH_X = 0
TOUCH_Y = 1
TouchEvent = namedtuple('TouchEvent', ('timestamp', 'type... |
test_security.py | """Test libzmq security (libzmq >= 3.3.0)"""
# -*- coding: utf8 -*-
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import os
from threading import Thread
import zmq
from zmq.tests import (
BaseZMQTestCase, SkipTest, PYPY
)
from zmq.utils import z85
USER = b"admin"
P... |
control_http_server.py | import http.server
import json
import threading
from .shared_state import shared_state, shared_state_lock, regenerate_data
PORT = 8080
# Binds to all network interfaces by default
# from https://gist.github.com/mdonkers/63e115cc0c79b4f6b8b3a6b797e485c7
# POST to '/' to set parameters:
# {
# "cpu_pause_ms": 100,
# ... |
cli.py | """Console script for threaded_file_downloader."""
import sys
import threading
import requests
import click
import os
def download(url: str, outdir):
bytes_: bytes = requests.get(url).content
filename = url.rsplit("/", 1)[1]
outfile = os.path.join(outdir, filename)
with open(outfile, 'wb') as f... |
TiltControlOnlineDecoderNoLoadCells.py | import definitions
from definitions import *
import threading
from threading import Thread
from multiprocessing import *
import numpy as np
import xlwt
import csv
import TestRunwLoadCells
from TestRunwLoadCells import *
import MAPOnlineDecoder
### TO TEST: HOW PAUSE WORKS, CHECK PRINT STATEMENTS ARE CORRE... |
process.py | import subprocess as sp
from os import listdir, linesep
from os.path import isfile, join
from multiprocessing import Queue, Process
import argparse
import string
import collections
import cPickle as pickle
def process(queue, tmp_dir, years):
years_lookup = set(map(str, years))
while not queue.empty():
file = q... |
client_executor.py | # Copyright (c) 2021, NVIDIA 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... |
__init__.py | from os.path import dirname
from ipfsApi import Client as IPFSClient
from base58 import b58decode, b58encode
from easysolc import Solc
import logging
def signWithPassword(keyFilePath, password):
import web3
account = web3.eth.Account()
with open(keyFilePath) as keyfile:
encrypted_key = keyfile.rea... |
p2p_stress.py | import testUtils
import p2p_test_peers
import random
import time
import copy
import threading
from core_symbol import CORE_SYMBOL
class StressNetwork:
speeds=[1,5,10,30,60,100,500]
sec=10
maxthreads=100
trList=[]
def maxIndex(self):
return len(self.speeds)
def randAcctName(self):
... |
scheduler.py | """Contains RAPO scheduler interface."""
import argparse
import datetime as dt
import getpass
import json
import os
import platform
import re
import signal
import subprocess as sp
import sys
import threading as th
import time
import queue
import psutil
from ..database import db
from ..logger import logger
from ..rea... |
custom.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
sifter.py | #!/usr/bin/python
# instruction injector frontend
#
# github.com/xoreaxeaxeax/sandsifter // domas // @xoreaxeaxeax
#
# run as sudo for best results
import signal
import sys
import subprocess
import os
from struct import *
from capstone import *
from collections import namedtuple
from collections import deque
import... |
server.py | import errno
import http.server
import os
import socket
from socketserver import ThreadingMixIn
import ssl
import sys
import threading
import time
import traceback
import uuid
from collections import OrderedDict
from queue import Empty, Queue
from h2.config import H2Configuration
from h2.connection import H2Connection... |
00_compute_features.py | import numpy as np
import os
from config import conf
from featureExtraction import gaze_analysis as ga
import threading
import getopt
import sys
from config import names as gs
def compute_sliding_window_features(participant, ws, gazeAnalysis_instance):
"""
calls the gazeAnalysis instance it was given, calls it to ge... |
iot_mode.py | # -*- coding: utf-8 -*-
u"""IoT Mode for SecureTea.
Project:
╔═╗┌─┐┌─┐┬ ┬┬─┐┌─┐╔╦╗┌─┐┌─┐
╚═╗├┤ │ │ │├┬┘├┤ ║ ├┤ ├─┤
╚═╝└─┘└─┘└─┘┴└─└─┘ ╩ └─┘┴ ┴
Author: Abhishek Sharma <abhishek_official@hotmail.com> , Jul 31 2019
Version: 1.5.1
Module: SecureTea
"""
# Import all the modules necessary for Io... |
barrier.py | #studi kasus tentang perlombaan cerdas cermat
from random import randrange
from threading import Barrier, Thread
from time import ctime, sleep
num_cerdascermat = 5
hasilakhir = Barrier(num_cerdascermat)
peserta = ['nisa', 'rama', 'titin', 'nur', 'ayu']
def siswa():
name = peserta.pop()
sleep(randrange(2, 7)) ... |
test_dispatcher.py | from __future__ import print_function, division, absolute_import
import errno
import multiprocessing
import os
import shutil
import subprocess
import sys
import threading
import warnings
import inspect
import numpy as np
from numba import unittest_support as unittest
from numba import utils, jit, generated_jit, type... |
dbt_integration_test.py | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import json
import os
import random
import re
import socket
import string
import subprocess
import sys
import threading
import time
from copy import copy
from typing import Any, Dict, List
from normalization.destination_type import DestinationType
from nor... |
results_2_11_code.py | import tensorflow as tf
from tensorflow.keras.layers import Dense, Conv2D, MaxPooling2D, Dropout, Flatten, BatchNormalization
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.callbacks import Callback
from os.path import join
from os... |
configuration_manager.py | """Centralized configuration manager."""
import os
import logging
import threading
import yaml
from inotify_simple import INotify, flags
from ambianic.config_mgm.config_diff import Config
from ambianic.config_mgm import fileutils
log = logging.getLogger(__name__)
class ConfigurationManager:
"""Configuration man... |
Rerequester.py | # Written by Bram Cohen
# modified for multitracker operation by John Hoffman
# see LICENSE.txt for license information
from herd.BitTornado.zurllib import urlopen, quote
from urlparse import urlparse, urlunparse
from socket import gethostbyname
from btformats import check_peers
from herd.BitTornado.bencode import bde... |
test_operator_gpu.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 u... |
bridge.py | #!/usr/bin/env python
#
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
#
"""
Rosbridge class:
Class that handle communication between CARLA and ROS
"""
try:
import queue
except ImportError:
impor... |
core.py | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... |
concurrency_limiter.py | import json
import logging
import threading
import consul
import os
from time import sleep, time
from contextlib import contextmanager
__author__ = 'quatrix'
@contextmanager
def ConcurrencyLimiterContext(name, limit, ttl=30, blocking=True, timeout=None):
c = ConcurrencyLimiter(name, limit, ttl)
try:
... |
__init__.py | import os
import re
import sys
import inspect
import warnings
import functools
import threading
from http import HTTPStatus
from timeit import default_timer
from flask import request, make_response, current_app
from flask import Flask, Response
from flask.views import MethodViewType
from werkzeug.serving import is_run... |
__init__.py | import copy
import os
import threading
import time
import json
import operator
import pkg_resources
# anchore modules
import anchore_engine.clients.localanchore_standalone
import anchore_engine.common.helpers
from anchore_engine.clients.services import internal_client_for
from anchore_engine.clients.services.simpleque... |
visdom_logger.py | from typing import Dict, List, Union
from collections import Counter
import logging
import queue
import threading
import time
from alchemy.logger import Logger
import visdom
from catalyst.core.callback import (
Callback,
CallbackNode,
CallbackOrder,
CallbackScope,
)
from catalyst.core.runner import IR... |
materialize_with_ddl.py | import time
import pymysql.cursors
import pytest
from helpers.network import PartitionManager
import logging
from helpers.client import QueryRuntimeException
from helpers.cluster import get_docker_compose_path, run_and_check
import random
import threading
from multiprocessing.dummy import Pool
from helpers.test_tools... |
bgperf.py | #!/usr/bin/env python3
#
# Copyright (C) 2015, 2016 Nippon Telegraph and Telephone 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... |
idom.py | import sys
import asyncio
from functools import partial
from threading import Thread
from queue import Queue as SyncQueue
from packaging.version import Version
from ..io.notebook import push_on_root
from ..io.resources import DIST_DIR, LOCAL_DIST
from ..io.state import state
from ..models import IDOM as _BkIDOM
from ... |
IOMaster_GUI_CommandSend.py | import tkinter as TK
import usb.core
import usb.util
import serial
import time
import threading
import serial.tools.list_ports
#from tkinter import *
from tkinter import ttk
from tkinter import messagebox
window = TK.Tk()
window.title("IO Master Setup")
window.geometry("400x500")
tabControl = ttk.Notebook(window)
sen... |
main.py | from flask import Flask, render_template, request, redirect, Markup
import os
import sys
import time
import h5py
import traceback
import numpy as np
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.embed import file_html
from bokeh.models import Title, HoverTool, ColumnDataSource, FreehandDr... |
bpytop.py | #!/usr/bin/env python3
# pylint: disable=not-callable, no-member, unsubscriptable-object
# indent = tab
# tab-size = 4
# Copyright 2020 Aristocratos (jakob@qvantnet.com)
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ... |
test_coroutine_sink.py | import asyncio
import logging
import multiprocessing
import re
import sys
import threading
import loguru
import pytest
from loguru import logger
async def async_writer(msg):
await asyncio.sleep(0.01)
print(msg, end="")
class AsyncWriter:
async def __call__(self, msg):
await asyncio.sleep(0.01)
... |
GenGifs.py | import os
import subprocess
import multiprocessing
import numpy as np
import itertools
from PIL import Image
from PIL import ImageDraw
TestTriangle = (
( 5, 5),
(95,40),
(30,95)
)
# Barycentric method
def PointInTriangle( Point, Triangle ):
V0 = tuple(np.subtract(Triangle[2], Triangle[0]))
V1 = tuple(np.subtract... |
websocket.py |
# -*- coding:utf-8 -*-
import socket
# from multiprocessing import Process
from datetime import datetime
from websocket_server import WebsocketServer
from gsiot.v3 import *
from gsiot.v3.net.server import *
class webSockServer(gsIO):
def __init__(self,port,ip="0.0.0.0"):
gsIO.__init__(self,(ip,port))
... |
botany.py | #!/usr/bin/env python3
import time
import pickle
import json
import os
import random
import getpass
import threading
import errno
import uuid
import sqlite3
from menu_screen import *
# TODO:
# - Switch from personal data file to table in DB
class Plant(object):
# This is your plant!
stage_list = [
's... |
server.py | #!/usr/bin/env python3
#
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP.
# Licensed under the Apache v2.0 license.
#
import re
import os
import sys
import json
import glob
import copy
import importlib
from log import Log
from threading import Thread
from http.server import HTTPServer
from http.server ... |
browse.py | import wx
import sys
import time
import webbrowser
from threading import Thread
from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin
from .util import get_bitmap
from ..util import get_releases, get_picture
THUMB_SIZE = 100
LOOK_AHEAD = 30
class BrowseFrame(wx.Frame):
def __init__(self, parent):
wx... |
_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... |
mrfish.py | import requests
import os
import random
import string
import json
import threading
from requests.exceptions import SSLError
from datetime import datetime
def generate_random_name():
event = random.randint(0, 4)
if event == 0:
return str(random.choice(names)).lower()
elif event in [1, 2]:
se... |
ctfd.py | import os
import re
import threading
import yaml
import json
# Initialize ctfcli with the CTFD_TOKEN and CTFD_URL.
def init():
CTFD_TOKEN = os.getenv("CTFD_TOKEN", default=None)
CTFD_URL = os.getenv("CTFD_URL", default=None)
if not CTFD_TOKEN or not CTFD_URL:
exit(1)
os.system(f"echo '{CTFD_U... |
dask.py | # pylint: disable=too-many-arguments, too-many-locals
"""Dask extensions for distributed training. See
https://xgboost.readthedocs.io/en/latest/tutorials/dask.html for simple
tutorial. Also xgboost/demo/dask for some examples.
There are two sets of APIs in this module, one is the functional API including
``train`` an... |
main.py | from tetris import *
from random import *
import threading
def LED_init():
thread=threading.Thread(target=LMD.main, args=())
thread.setDaemon(True)
thread.start()
return
def rotate(m_array):
size = len(m_array)
r_array = [[0] * size for _ in range(size)]
for y in range(size):
for ... |
Hiwin_RT605_ArmCommand_Socket_20190627181108.py | #!/usr/bin/env python3
# license removed for brevity
import rospy
import os
import socket
##多執行序
import threading
import time
import sys
import matplotlib as plot
import HiwinRA605_socket_TCPcmd as TCP
import HiwinRA605_socket_Taskcmd as Taskcmd
import numpy as np
from std_msgs.msg import String
from ROS_Socket.srv imp... |
RTSPServer.py | # !/usr/bin/python3
__author__ = 'Simon Blandford'
import time
# Based on https://github.com/TibbersDriveMustang/Video-Streaming-Server-and-Client
from Log import log
try:
import config
except ImportError:
import config_dist as config
import socket
import threading
import RTSPServerSession
ended = False
t... |
happyeyeballs.py | #!/usr/bin/python3
# Python implementation of RFC 6555 / Happy Eyeballs: find the quickest IPv4/IPv6 connection
# See https://tools.ietf.org/html/rfc6555
# Method: Start parallel sessions using threads, and only wait for the quickest succesful socket connect
# If the HOST has an IPv6 address, IPv6 is given a head start... |
Selfbot.py | # -*- coding: utf-8 -*-
import LINETCR
#import wikipedia
from LINETCR.lib.curve.ttypes import *
#from ASUL.lib.curve.ttypes import *
from datetime import datetime
# https://kaijento.github.io/2017/05/19/web-scraping-youtube.com/
from bs4 import BeautifulSoup
from threading import Thread
from googletrans import Transla... |
music.py | import os, time
import pygame
from pygame.locals import *
import ffmpeg
import threading
import datetime
import math
import wave
import mutagen
class MusicCache:
def __init__(self, endevent=None):
self.cache = {}
self.endevent = endevent
def get(self, filename):
if isinstance(f... |
train_mdl.py | #!/usr/bin/env python
"""Example code of learning a RGB-D dataset by Multimodal Deep Learning model.
Prerequisite: To run this example, crop the center of ILSVRC2012 training and
validation images and scale them to 256x256, and make two lists of space-
separated CSV whose first column is full path to image and second ... |
authority.py | import copy
import json
from pprint import pprint
import time
from datetime import datetime
from multiprocessing import Process, Manager
from sys import getsizeof
from typing import List, Optional, Set, Tuple
import requests
import utils.constants as consts
from core import Block, BlockHeader, Chain, Transaction, Utxo... |
__init__.py | from ....actuators.gyems import GyemsDRC
from ....sensors.can_sensors import CANSensors
from time import perf_counter, sleep
from math import pi
from multiprocessing import Process, Value, Event
from os import nice
class Pendulum:
""" This class provide interface to the Gyems BLDC motor driver over CAN socket"""... |
main.py | #!/usr/bin/python3
import animeworld as aw
import requests
import os, re, json
from copy import deepcopy
import schedule
import time
import threading
import shutil
import logging.config
from app import app, ReadSettings
SETTINGS = ReadSettings()
SONARR_URL = os.getenv('SONARR_URL') # Indirizzo ip + porta di sonarr
A... |
app.py | # encoding: utf-8
'''
A REST API for Salt
===================
.. versionadded:: 2014.7.0
.. py:currentmodule:: salt.netapi.rest_cherrypy.app
:depends: - CherryPy Python module
- salt-api package
:optdepends: - ws4py Python module for websockets support.
:configuration: All authentication is done thr... |
test_state.py | # -*- coding: utf-8 -*-
'''
Tests for the state runner
'''
# Import Python Libs
from __future__ import absolute_import, print_function, unicode_literals
import errno
import os
import shutil
import signal
import tempfile
import textwrap
import threading
from salt.ext.six.moves import queue
# Import Salt Testing Libs
f... |
worker.py | import multiprocessing
import os
import pickle
import socket
import sys
import threading
import time
import traceback
from uuid import uuid4
import Pyro4
from autoflow.utils.logging_ import get_logger
from autoflow.utils.sys_ import get_trance_back_msg
class Worker(object):
"""
The worker is responsible for... |
util.py | import hashlib
import http.server
import json
import logging
import os
import platform
import re
import shutil
import socketserver
import stat
import tarfile
import tempfile
from contextlib import contextmanager, ExitStack
from itertools import chain
from multiprocessing import Process
from shutil import rmtree
from ty... |
gmail_sub.py | import calendar
import os
import threading
import time
from datetime import datetime, timezone
import apiclient
import httplib2
import oauth2client
credential_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "../token.json")
def credentials():
store = oauth2client.file.Storage(credential_path)
... |
main_window.py | import re
import os
import sys
import time
import datetime
import traceback
from decimal import Decimal
import threading
import asyncio
from typing import TYPE_CHECKING, Optional, Union, Callable, Sequence
from electrum_mars.storage import WalletStorage, StorageReadWriteError
from electrum_mars.wallet_db import Wallet... |
__init__.py | from threading import Thread
from typing import List
import tensorflow as tf
from queue import Queue
import numpy as np
from nboost.model.bert_model import modeling, tokenization
from nboost.model.base import BaseModel
class BertModel(BaseModel):
def __init__(self, verbose=False, **kwargs):
super().__ini... |
attach_server.py | # Python Tools for Visual Studio
# Copyright(c) Microsoft 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
#
# THIS ... |
__init__.py | from threading import Thread
import os
import logging
from flask import Flask, request, redirect
from flask_socketio import SocketIO, emit
from pokemongo_bot import logger
from pokemongo_bot.event_manager import manager
from plugins.socket import myjson
from plugins.socket import botevents
from plugins.socket import ... |
pygeotag.py | # coding=utf8
import sys
isPython3 = sys.version_info >= (3,0,0)
import cgi
import json
import os
import threading
import time
import webbrowser
if isPython3:
import http.server as BaseHTTPServer
else:
import BaseHTTPServer
if isPython3:
import queue as Queue
else:
import Queue
if isPython3:
... |
scriptinfo.py | import os
import sys
from tempfile import mkstemp
import attr
import collections
import logging
import json
from furl import furl
from pathlib2 import Path
from threading import Thread, Event
from .util import get_command_output
from ....backend_api import Session
from ....debugging import get_logger
from .detectors ... |
rmi_server.py | #fastjson rce检测之python版rmi服务器搭建
'''
fastjson检测rce时候,常常使用rmi协议。
如果目标通外网,payload可以使用rmi://randomstr.test.yourdomain.com:9999/path,通过dnslog来检测。
但是目标是内网,我们在内网也可以部署rmi server,通过查看日志看是否有主机的请求来检测。
Java 写一个Java的rmi服务挺简单的,但是如果你正在python开发某个项目,而又不想用调用java软件,此文章获取能帮助你。
POST data
{
"a":{
"@type":"java.lang.Class",
"val":"com.... |
__init__.py | #
# Copyright (C) 2017 Kenneth A. Giusti
#
# 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.
#
# Licensed under the Apache License, Version... |
wifi_scanner.py | from scapy.all import *
from threading import Thread
import pandas
import time
import os
import sys
# initialize the networks dataframe that will contain all access points nearby
networks = pandas.DataFrame(columns=["BSSID", "SSID", "dBm_Signal", "Channel", "Crypto"])
# set the index BSSID (MAC address of the AP)
net... |
main.py | import vk_api
from vk_api import bot_longpoll
import assets.View.MainView as mainView
import threading
import json
token = open('./assets/token.cred').readline().replace('\n', '')
views = []
userIds = []
apiViews = []
apiIDs = []
def parseStuff(userId, event):
print(json.dumps(event['object']))
if event['o... |
executorwebdriver.py | import json
import os
import socket
import threading
import time
import traceback
import urlparse
import uuid
from .base import (CallbackHandler,
RefTestExecutor,
RefTestImplementation,
TestharnessExecutor,
extra_timeout,
st... |
HVAC2.py | """
Run a large number of simulations for the HVAC model.
Results from these simulations are reported in:
C. Campaigne, M. Balandat and L. Ratliff: Welfare Effects
of Dynamic Electricity Pricing. In preparation.
@author: Maximilian Balandat
@date Sep 23, 2017
"""
# import packages and set up things
import os
import m... |
client.py | from . import log
logger = log.get(__name__)
from .utils import delay
import websocket
import json
import threading
from . import environment
class Client():
def __init__(self, handler):
logger.info('Constructing.')
self._handler = handler
self.ws = None
self.isClosed = False
... |
collector.py |
import socket
import threading
from threading import Thread
import time
import os
import sys
import stomp
import traceback
from elasticsearch import Elasticsearch, exceptions as es_exceptions
from elasticsearch import helpers
from datetime import datetime
import urllib3.exceptions
import hashlib
try:
import queu... |
EC-Update-LZ.py | #!/usr/bin/python
import sys, getopt
import subprocess, pkg_resources
import os
import subprocess
import shlex
import logging
import time
import boto3
import json
import zipfile
import threading
import cursor
import yaml
from cfn_tools import load_yaml, dump_yaml
from zipfile import ZipFile
from datetime import datet... |
run.py | import multiprocessing as mp
from random import choice
from threading import Thread
from time import strftime, sleep
from instabot import Bot
class Start():
def __init__(self, username, password):
self.user_name = username
self.pass_word = password
self.max_follows_per_day = 750
s... |
installwizard.py |
from functools import partial
import threading
import os
from kivy.app import App
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.properties import ObjectProperty, StringProperty, OptionProperty
from kivy.core.window import Window
from kivy.uix.button import Button
from kivy.uix.togglebutton impo... |
athenad.py | #!/usr/bin/env python3
import base64
import hashlib
import io
import json
import os
import queue
import random
import select
import socket
import subprocess
import sys
import tempfile
import threading
import time
from collections import namedtuple
from datetime import datetime
from functools import partial
from typing ... |
vfs_test.py | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests for API client and VFS-related API calls."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import io
import threading
import time
import zipfile
from grr_response_core.lib import fl... |
build.py | # Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
utils.py | import asyncio
from concurrent.futures import Future
import functools
import threading
import typing as tp
from pypeln import utils as pypeln_utils
def Namespace(**kwargs) -> tp.Any:
return pypeln_utils.Namespace(**kwargs)
def get_running_loop() -> asyncio.AbstractEventLoop:
try:
loop = asyncio.ge... |
fgbase.py | import threading
import socket
import time
import math
import typing
import numpy as np
import pymap3d as pm
from abc import ABC
from scipy.spatial.transform import Rotation
import csaf.core.trace
class Dubins2DConverter():
"""
Originally from John McCarroll, modified by Michal Podhradsky
Converts orie... |
VoiceEngineServer.py | import zmq
import time
from threading import *
import speech_recognition as sr
broadcastMSG = "None"
def Listener():
global broadcastMSG
while(1):
# obtain audio from the microphone
r = sr.Recognizer()
with sr.Microphone() as source:
print("Say something!")
audi... |
fake_cloud.py | # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. Crate licenses
# this file to you under the Apache License, Version 2.0 (the "License");
# you may not use this f... |
BotAmino.py | import requests
import json
from time import sleep as slp
from sys import exit
from json import dumps
from pathlib import Path
from threading import Thread
# from concurrent.futures import ThreadPoolExecutor
from contextlib import suppress
from uuid import uuid4
from .local_amino import Client
from .commands import *... |
rman_render.py | import time
import os
import rman
import bpy
import sys
from .rman_constants import RFB_VIEWPORT_MAX_BUCKETS, RMAN_RENDERMAN_BLUE
from .rman_scene import RmanScene
from .rman_scene_sync import RmanSceneSync
from. import rman_spool
from. import chatserver
from .rfb_logger import rfb_log
import socketserver
import thread... |
esi_processor.py | # esi_processor.py
import threading
from PySide2 import QtCore
from .esi.esi import ESI
class ESIProcessor(QtCore.QObject):
"""
ESI Middleware
"""
login_response = QtCore.Signal(str)
logout_response = QtCore.Signal()
location_response = QtCore.Signal(str)
destination_response = QtCore.Signal(bool)
... |
midiedit.py |
from abc import abstractmethod, ABC
from enum import Enum
import os
from queue import Queue
import select
import time
from alsa_midi import SND_SEQ_OPEN_OUTPUT, SND_SEQ_OPEN_INPUT
from amidi import PortInfo, Sequencer
from midi import AllSoundOff, ControlChange, Event as MIDIEvent, NoteOn, \
NoteOff, Piece, Pitch... |
itmsFFLAP.py | import numpy as np
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import six.moves.urllib as urllib
import sys
from goto import with_goto
import threading
from threading import Thread
from multiprocessing import Process,Lock
import tarfile
#import RPi.GPIO as GPIO
#GPIO.setwarnings(False)
import time
from prettyta... |
iiscan.py | #!/usr/bin/env python
# encoding:utf-8
# An IIS short_name scanner my[at]lijiejie.com http://www.lijiejie.com
import sys
import httplib
import urlparse
import threading
import Queue
import time
class Scanner():
def __init__(self, target):
self.target = target.lower()
if not self.target.st... |
experiment_queue.py | #####################################################################
# #
# /experiment_queue.py #
# #
# Copyright 2013, Monash Univ... |
test_threading.py | """
Tests for the threading module.
"""
import test.support
from test.support import verbose, strip_python_stderr, import_module, cpython_only
from test.script_helper import assert_python_ok, assert_python_failure
import random
import re
import sys
_thread = import_module('_thread')
threading = import_module('threadi... |
_updates.py | from settings import settings
import os
import threading
def update_collection_check(self):
if self.sav_dir_check():
collection = self.update_collection()
else:
self.sav_dir_warning()
def update_collection(self):
self.dbManager.create_connection()
self.sav_dir = settings.read_settings... |
_server_test.py | # -*- coding: utf-8 -
#
# Copyright (c) 2008 (c) Benoit Chesneau <benoitc@e-engura.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE ... |
driver.py | from redis import Redis
from threading import Thread
from bltouch import config as cfg
from bltouch import command_getter, data_producer
from bltouch import sensor
def main():
print(cfg.REDIS_HOST, cfg.REDIS_PORT, cfg.REDIS_PASSWORD)
redis_instance = Redis(cfg.REDIS_HOST, cfg.REDIS_PORT, cfg.REDIS_PASSWORD... |
restful_template.py | from bitfeeds.socket.restful import RESTfulApiSocket
from bitfeeds.exchange import ExchangeGateway
from bitfeeds.market_data import L2Depth, Trade
from bitfeeds.util import Logger
from bitfeeds.instrument import Instrument
from bitfeeds.sql_storage_template import SqlStorageTemplate
from functools import partial
from d... |
bridge.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from abc import ABCMeta, abstractmethod
import inject
import paho.mqtt.client as mqtt
import rospy
from .util import lookup_object, extract_values, populate_instance
from threading import Condition
from queue import Queue
from uuid import uuid4
from th... |
pscan.py | from argparse import ArgumentParser
from math import ceil, log
from re import match
from random import shuffle
from shutil import get_terminal_size
from socket import socket
from socket import AF_INET, SOCK_STREAM
from socket import error
from sys import argv, exit
from threading import Thread
from time import sleep, t... |
test_linsolve.py | import sys
import threading
import numpy as np
from numpy import array, finfo, arange, eye, all, unique, ones, dot
import numpy.random as random
from numpy.testing import (
assert_array_almost_equal, assert_almost_equal,
assert_equal, assert_array_equal, assert_, assert_allclose,
assert_warns, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.