source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
Extreme-AIO-v1.py | import requests, threading, re, time, sys, os, random, webbrowser, ctypes, json, hashlib, subprocess, pypresence, tkinter
from colorama import Fore, init
from re import search
from tkinter import filedialog, messagebox
from time import gmtime, strftime
from pypresence import Presence
lista_mesaje = ["Coded by Ext... |
func.py | """
้ขๅ็จๆท็ๅฝๆฐ ,ๆไพๆๅ
ถไพฟๆท็ไฝ้ช
"""
import logging
import os
import platform
from datetime import time, datetime, timedelta
from inspect import isfunction
from multiprocessing import Process
from time import sleep
from typing import Text, Any, List
from ctpbee.constant import \
(OrderRequest, CancelRequest, Direction, Ex... |
main_window.py | import re
import os
import sys
import time
import datetime
import traceback
from decimal import Decimal
import threading
import electrum_vtc
from electrum_vtc.bitcoin import TYPE_ADDRESS
from electrum_vtc import WalletStorage, Wallet
from electrum_vtc_gui.kivy.i18n import _
from electrum_vtc.paymentrequest import Invo... |
MQTT_Broker.py | import socket
import sys
from threading import Thread
import MQTT_decoder
import MQTT_database
from MQTT_packet_handler import packet_router
import time
from MQTT_control_packets import PUBLISH
import MQTT_packet_handler
HOST = "127.0.0.1"
PORT = 1883
connected_clients = []
def main():
# Initialize database
... |
yudi[1].py | # -*- coding: utf-8 -*-
import PRANKBOTS
from PRANKBOTS.lib.ttypes import *
from datetime import datetime
import io,os,re,ast,six,sys,glob,json,time,timeit,codecs,random,shutil,urllib,urllib2,urllib3,goslate,html5lib,requests,threading,wikipedia,subprocess,googletrans
from gtts import gTTS
from random import r... |
settings.py | import logging
import threading
import time
import yaml
from expvar.stats import stats
class Settings(object):
def __init__(self, initial_settings):
self.settings = initial_settings
self.lock = threading.Lock()
self.logger = logging.getLogger(__name__)
self._loading_thread_started ... |
LicensePlateRecognitionSystem.py | import argparse
import threading
import time
from typing import List
import numpy as np
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction, QMessageBox, QInputDialog, QFileDialog, \
QAbstractItemView, QHeaderView, QTableWidgetItem
import cv2
import sys
from PyQ... |
main.py | import os
import tkinter as tk
from tkinter import ttk
import cv2
from PIL import ImageGrab
import PIL.Image
import PIL.ImageTk
from PIL import Image
import numpy as np
from healthBarCalculator import calculate
import serial
import serial.tools.list_ports
import pytesseract
import threading
from tkinter import filedial... |
batch.py | # Copyright 2021 Cortex Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
buildserver.py | #!/usr/bin/python3
import argparse
import ctypes
import functools
import os.path
import shutil
import subprocess
import sys
import tempfile
import threading
import traceback
sys.path.insert(0, os.path.dirname(os.path.dirname((os.path.abspath(__file__)))))
from nextdl.compat import (compat_http_server, compat_input, c... |
GUI.py | # -*- coding: utf-8 -*-
from datetime import datetime
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
import subprocess
import os
from Spreadsheet_Energy_System_Model_Generator import sesmg_main
def create_elements(sheet, elements, texts, values, first_row):
""" Creates a block of tk... |
walking_trees.py | import threading
import time
from enum import Enum
from prompt_toolkit.application.current import get_app
from prompt_toolkit.layout import HSplit
from prompt_toolkit.layout.containers import Window
from prompt_toolkit.layout.controls import FormattedTextControl
from ..pubsub import Messages
from .base import BaseScr... |
stolen_token.py | # Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you 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/LICE... |
system_profiler.py | # Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0
"""Profiler to record system level metrics."""
from __future__ import annotations
import threading
import time
from typing import TYPE_CHECKING, Dict, cast
import psutil
from composer.core.callback import Callback
if TYPE_CHECKING:
... |
filewatcher.py | #####################################################################
# #
# filewatcher.py #
# #
# Copyright 2013, Monash University ... |
ui_utils.py | # -*- coding: utf-8 -*-
import os
import platform
import re
import subprocess
import sys
import textwrap
import threading
import time
import tkinter as tk
import tkinter.font
import traceback
from logging import getLogger
from tkinter import filedialog, messagebox, ttk
from typing import Callable, List, Optional, Tuple... |
official_mosaic.py | # -*- coding:utf-8 -*-
# author:ๅนณๆๅๆขจๅฅii
# e-mail:1353593259@qq.com
# datetime:1993/12/01
# filename:mosaic.py
# software: PyCharm
# Dataset utils and dataloaders
import glob
import math
import os
import random
import shutil
import time
from itertools import repeat
from multiprocessing.pool import Th... |
main.py | import os
import query
import telebot
import time
import threading
from keep_alive import keep_alive
print("start")
keep_alive()
# bot = telebot.TeleBot("1657139126:AAFSFRVGofn0Zb3MlEtvU28yCq2QQqIiUdg")
# @bot.message_handler(commands=['start', 'help'])
# def send_welcome(message):
# bot.reply_to(message, "Howdy, how... |
wallet_multiwallet.py | #!/usr/bin/env python3
# Copyright (c) 2017-2020 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... |
osc_receiver.py | # This file is part of the pyBinSim project.
#
# Copyright (c) 2017 A. Neidhardt, F. Klein, N. Knoop, T. Kรถllmer
#
# 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, includi... |
test_ssl.py | # Test the support for SSL and sockets
import sys
import unittest
from test import test_support
import asyncore
import socket
import select
import time
import gc
import os
import errno
import pprint
import urllib, urlparse
import traceback
import weakref
from BaseHTTPServer import HTTPServer
from Si... |
template_main.py | #!/usr/bin/python
import os
import time
import sys
import json
import argparse
import csv
import DTIAtlasBuilder_Preprocess
import DTIAtlasBuilder_AtlasBuilding
import DTIAtlasBuilder_Utilities
import shutil
import threading
import traceback
from copy import deepcopy
### load configutation json
def ... |
node.py | import socket
from threading import Thread
import time
import os as os
import hashlib
import sys
succ= 0
pred= 0
topology= []
filesList= []
def initialize(port):
s= socket.socket()
print ("Socket successfully created")
s.bind(('', port))
return s
def listen(socket):
global succ
global pred
global filesList
m... |
textClust.py | from textClustPy.cluster.microcluster import microcluster
from textClustPy.cluster.distances import distances
#from textClustPy.util.inkrementalskip import inkrementalskip
# we use sklearn for traditional clustering
from sklearn.cluster import AgglomerativeClustering
from sklearn.cluster import SpectralClustering
imp... |
wsdump.py | #!/Users/javbaek/Documents/Projects/StarterBot/starterbot/bin/python
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():
encoding = getat... |
onos_websocket.py |
import signal
import websocket
import json
from threading import Thread
import modules.sdnpwn_common as sdnpwn
import tabulate
updatePrefsReq = '{"event":"updatePrefReq","payload":{"key":"topo_prefs","value":{"insts":1,"summary":1,"detail":1,"hosts":0,"offdev":1,"dlbls":0,"porthl":1,"bg":0,"spr":0,"ovid":"traffic","t... |
test_spark.py | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import json
import threading
import ssl
import time
import mock
import pytest
import requests
import urllib3
from six import iteritems
from six.moves import BaseHTTPServer
from six.moves.urllib.parse i... |
flaskwebgui.py | __version__ = "0.3.3"
import os
import sys
import time
from datetime import datetime
import logging
import tempfile
import socketserver
import subprocess as sps
from inspect import isfunction
from threading import Lock, Thread
logging.basicConfig(level=logging.INFO, format='flaskwebgui - [%(levelname... |
Acquisition.py | """Data acquisition module"""
import threading
import random
from datetime import datetime
import logging
import serial
class Acquisition(object):
"""Data acquisition class"""
def __init__(self, path):
"""Launch the acquisition thread"""
self.callback = None
# open serial port
... |
gamestate_integration.py | import itertools
import json
import os
import socket
import subprocess
import threading
import tempfile
import re
import requests
from flask import Flask, request # ImportError? Try "pip install flask".
app = Flask(__name__)
handler = object() # Dict key cookie
composite_file = os.path.dirname(os.readlink(__file__)) ... |
VidUtils.py | # Importing all the necessities
from collections import deque
from threading import Thread
from queue import Queue
import time
import os
import cv2
class KeyClipWriter:
def __init__(self, bufSize=64, timeout=1.0):
# Maximum number of frames to be kept in memory
self.bufSize = bufSize
# Sle... |
lock_example.py | import threading
import logging
import time
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s [%(threadName)s] %(message)s')
def worker(lock):
with lock:
logging.debug("ha ha ha ")
if __name__ == '__main__':
lock = threading.Lock()
t1 = threading.Thread(target=worker, na... |
queue_adapter.py | """
This module contains contracts for defining adapters to various queueing systems, e.g. PBS/SLURM/SGE.
"""
import abc
import collections
import os
import shlex
import string
import subprocess
import threading
import traceback
import warnings
from fireworks.utilities.fw_serializers import FWSerializable, serialize_... |
Confirm.py | from base64 import urlsafe_b64decode, urlsafe_b64encode
from binascii import Error as b64Error
from django.conf import settings
from django.contrib.auth import get_user_model, login, logout
from django.contrib.auth.tokens import default_token_generator
from django.template.loader import render_to_string
from django.url... |
test_c10d_nccl.py | import copy
import math
import os
import random
import signal
import sys
import tempfile
import threading
import time
from contextlib import contextmanager
from datetime import timedelta
from itertools import product
from unittest import mock
import torch
import torch.distributed as c10d
if not c10d.is_available():
... |
load.py | # -*- coding: utf-8 -*-
#
# Display the "habitable-zone" (i.e. the range of distances in which you might find an Earth-Like World)
#
from __future__ import print_function
from collections import defaultdict
import requests
import sys
import threading
try:
# Python 2
from urllib2 import quote
import Tkinte... |
run.py | '''From https://github.com/AI4Finance-Foundation/ElegantRL'''
import os
import time
import torch
import numpy as np
import numpy.random as rd
import multiprocessing as mp
from copy import deepcopy
from elegantrl.env import build_env
from elegantrl.replay import ReplayBuffer, ReplayBufferMP
from elegantrl.evaluator im... |
useprocess.py | from multiprocessing import Process
import os
import time
from crawnews import craw_huanqiu
if __name__=='__main__':
print('ๅฝๅๆฏ่ฟ็จ: {}'.format(os.getpid()))
start = time.time()
p1 = Process(target=craw_huanqiu, args=('mil', 50))
p2 = Process(target=craw_huanqiu, args=('world', 50))
print('็ญๅพ
ๆๆๅญ่ฟ... |
voc_text.py | import tensorflow as tf
import argparse
import xml.etree.ElementTree as ET
import os
import threading
import glob
from io import StringIO
import shutil
os.environ["CUDA_VISIBLE_DEVICES"] = ""
if hasattr(tf, 'enable_eager_execution'):
tf.enable_eager_execution()
parser=argparse.ArgumentParser(argument_default=argpa... |
http_server.py | # Copyright (c) 2020 PaddlePaddle 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 app... |
wasm-run-torture-tests.py | #!/usr/bin/env python2
#===- subzero/wasm-run-torture-tests.py - Subzero WASM Torture Test Driver ===//
#
# The Subzero Code Generator
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===-----------------------------------------... |
server.py | import datetime
import os
from threading import Thread
from pathlib import Path
from flask import (
Flask,
render_template,
request,
redirect,
make_response,
send_from_directory)
from gevent.pywsgi import WSGIServer
import src.config as cfg
import src.database as db
from src.parser import crea... |
sync_vk_app.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Ivan Senin
import Queue
import datetime as dt
import logging
import requests
import threading
import time
import vk_requests
import vk_requests.exceptions
from vk_requests.auth import VKSession
from synchrobot import db_ops
from synchrobot.chat_user import User
... |
oculus.py | # oculus.py
#
# This program collects head orientation data from an Oculus Rift and streams
# it over virtual COM port.
#
# The ovr libraries used are from github.com/cmbruns/pyovr and this project
# builts on top of the example code there for interfacing with the Oculus.
# Libraries
import sys
import time
import seri... |
_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... |
clients.py | import socket
import sys
import threading
# function send_message() to send message to the server
def send_message(clientSock):
# input client's username as identity
username = input("Input username: ")
# input message and send it to the server
while True:
message = input()
message_sen... |
motion_arbiter.py | #!/usr/bin/env python
# -*- encoding: utf8 -*-
import json
import operator
import Queue
import re
import os
import signal
from threading import Thread
from matplotlib import pyplot as plt
import matplotlib
import actionlib
import rospy
from std_msgs.msg import Bool, Empty, String
from mind_msgs.msg import (LogItem, ... |
__init__.py | """
This module defines a base-object for building proton apps using html/css and javascript.
"""
from cefpython3 import cefpython as cef
# from werkzeug.serving import run_simple
from werkzeug.wsgi import SharedDataMiddleware
from wsgiref.simple_server import make_server
from jinja2 import Environment, BaseLoader
fr... |
dsgrep.py | ############################################################################
# #
# Copyright (c) 2017 eBay Inc. #
# Modifications copyright (c) 2019 Carl Drougge #
# ... |
bm_2to3.py | from mpkmemalloc import *
import multiprocessing as mp
import threading
import glob
import os.path
import sys
import pyperf
# if __name__ == "__main__":
def functionWorker(tname, allocate_pkey):
if allocate_pkey:
pkey_thread_mapper(tname)
runner = pyperf.Runner()
runner.metadata['description'] =... |
session_test.py | # Copyright 2015 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... |
__init__.py | """Easy to use python subprocess interface."""
from easyprocess.unicodeutil import split_command, unidecode, uniencode
import logging
import os.path
import platform
import signal
import subprocess
import tempfile
import threading
import time
from easyprocess.about import __version__
log = logging.getLogger(__name__)... |
receiver.py | #!/usr/bin/python
# Standard Library
import json
import time
import logging
import socket
from threading import Thread, Lock
# Third Party
# Local
# set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class EventBroadcastReceiver:
def __init__(self, host='localhost',... |
mem.py | " Memory profiling callbacks "
import tracemalloc, threading, torch, time
from ..utils.mem import *
from ..basic_train import *
from ..torch_core import *
from ..utils.pynvml_gate import *
if use_gpu: pynvml = load_pynvml_env()
class PeakMemMetric(LearnerCallback):
"Callback that measures used and peaked general... |
distributed.py | import time
import sys
import logging
from multiprocessing import Process
import zmq
import traceback
import collections
import logging
import daiquiri
daiquiri.setup(level=logging.INFO)
# logging.basicConfig()
import explogger
from explogger import zmq_log
import random
def log_remote(name):
logger = zmq_lo... |
threaded.py | import time
import threading
from .downloader import Downloader
SLEEP_TIME = 1
def threaded_crawler(seed_url, delay=5, cache=None, scrape_callback=None, user_agent='wswp', proxies=None,
num_retries=1, max_threads=10, timeout=60):
# ๅๅงๅ้้ไปปๅก้ๅใๅป้้ๅๅ็ฌ่ซๅฏน่ฑก
crawl_queue = [seed_url]
seen = ... |
test_dbapi.py | # pysqlite2/test/dbapi.py: tests for DB-API compliance
#
# Copyright (C) 2004-2010 Gerhard Hรคring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of t... |
paralleldiagnostics.py | # Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
#
# or in the "license" f... |
notebook_utils.py | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
import os
import shutil
import socket
import threading
import time
import urllib
import urllib.parse
import urllib.request
from os import PathLike
from pathlib import Path
from typing import Callable, List, NamedTuple, Optional, Tuple
import cv2
import matplotlib
impor... |
sim.py | import copy
import inspect
import itertools
from functools import partial
import numpy as np
import os
import random
import threading
import time as ttime
import uuid
import weakref
import warnings
from collections import deque, OrderedDict
from tempfile import mkdtemp
from .signal import Signal, EpicsSignal, EpicsS... |
xmlrpc_interface.py | __author__ = 'Martin'
from xmlrpc.server import SimpleXMLRPCServer
import json
import eval
import method_params
import os
import sys
import multiprocessing
import time
stop_server = False
def eval_dags(inputs: multiprocessing.Queue, outputs: multiprocessing.Queue):
while True:
try:
ind_id, i... |
x_test_flood.py | import socket, threading, time, random
__THREAD_NUMBER__ = 1000
user_agent = [
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3'
'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari... |
live_radio.py | import pypboy
import settings
import pygame
import os
import imp
import glob
import time
import game
from collections import deque
import mutagen
import random
import configparser
import sys
import threading
import numpy as np
from pypboy.modules.data import entities
import pypboy.data
song = None
start_pos = 0
wavef... |
minibot.py | from blockly_python_process import BlocklyPythonProcess
from bs_repr import BS_Repr
from collections import deque
from select import select
from socket import socket, timeout, AF_INET, SOCK_STREAM, SOCK_DGRAM
from socket import SOL_SOCKET, SO_REUSEADDR, SO_BROADCAST
from threading import Thread
from typing import List,... |
camera.py | from threading import Thread
import logging
import cv2
import time
sleep_rate = 0.15
logging.basicConfig(level=logging.DEBUG,
format='[%(levelname)s] (%(threadName)-10s) %(message)s',
)
class Camera:
def __init__(self, src=0):
self.stopped = False
self.fresh... |
sublimegdb.py | """
Copyright (c) 2012 Fredrik Ehnbom
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, ... |
subprocess_env_manager.py | from multiprocessing import Process, Pipe, connection, get_context, Array
from collections import namedtuple
import enum
import logging
import platform
import time
import math
import copy
import traceback
import threading
import numpy as np
import torch
import ctypes
import pickle
import cloudpickle
from functools impo... |
process_replay.py | #!/usr/bin/env python3
import capnp
import os
import sys
import threading
import importlib
import time
if "CI" in os.environ:
def tqdm(x):
return x
else:
from tqdm import tqdm # type: ignore
from cereal import car, log
from selfdrive.car.car_helpers import get_car
import selfdrive.manager as manager
import ... |
test_app.py | import threading
import cio
from cio import get_version
from cio.conf import settings, default_settings
from cio.pipeline import pipeline
from tests import BaseTest
class AppTest(BaseTest):
def test_version(self):
self.assertEqual(get_version((1, 2, 3, 'alpha', 1)), '1.2.3a1')
self.assertEqual(ge... |
MesoNHCachedProbe.py | import threading
import time
from nephelae_simulation.mesonh_interface import DimensionBounds
class MesoNHCachedProbe:
"""MesoNHCachedProbe
This is a class to handle quick successive reads in a MesoNH array.
Original goal was to make a virtual UAV fly in real time in a
MesoNH dataset while reading... |
safe_t.py | from binascii import hexlify, unhexlify
import traceback
import sys
from electrum.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException
from electrum.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT
from electrum.bip32 import deserialize_xpub
from electrum import constants
from electrum.i18n import _
from el... |
geoprocessing.py | """A collection of GDAL dataset and raster utilities."""
import threading
import Queue
import logging
import os
import tempfile
import shutil
import atexit
import functools
import csv
import math
import errno
import collections
import exceptions
import heapq
import time
from types import StringType
from osgeo import g... |
wallet.py | # 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 limitation the rights t... |
views.py | from django.shortcuts import render,redirect,reverse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from .models import Word
from django.contrib.auth.models import User
from django.http import HttpResponse
from random import randint
from multiproces... |
mavros_sendpose.py | #!/usr/bin/env python2
from __future__ import division
PKG = 'swam'
import rospy
import math
import numpy as np
from geometry_msgs.msg import PoseStamped, Quaternion
from mavros_test_common import MavrosCommon
from pymavlink import mavutil
from std_msgs.msg import Header
from threading import Thread
from tf.transfor... |
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 ... |
old.py | #!/usr/bin/python3
# TQ (Task Queue), Command Line Batch Job Manager
# COPYRIGHT (C) 2016-2018 Mo Zhou <cdluminate@gmail.com>
# MIT License
'''
Description:
TQ (Task Queue) is a simple Command Line Job Manager. In principle TQ is
a very flexible and smart atd(8), which could arrange a series of jobs in
an e... |
app_char_generator.py | '''
Avatar Loop Server w/ Firebase
-------------------------------------
Server to read updates on a loop signal and loop through created avatars
-------------------------------------
Author: Vl-Wouter
Modified: 31-10-2019
'''
import requests
import threading
import time
from flask import Flask
import fir... |
multithread.py | from threading import Thread
import os
import time
def square_numbers():
for i in range(100):
i * i
time.sleep(0.1)
def main():
threads = []
num_threads = 10
# create processes
for i in range(num_threads):
t = Thread(target=square_numbers)
threads.append(t)
# ... |
main.py | # -*- coding: utf-8 -*-
import logging
import inspect
import imp
import os
import operator
import re
import sys
import time
import traceback
from clint.textui import colored, puts, indent
from os.path import abspath, dirname
from multiprocessing import Process, Queue
import bottle
from listener import WillXMPPClient... |
login.py | # coding=utf-8
import multiprocessing as mp
from time import time
from tabulate import tabulate
from parser.client import CLIENT_CLASSES
def run(client_class, queue):
queue.put(client_class())
def init(clientsSet=None):
client_classes = clientsSet or CLIENT_CLASSES
clients = list()
start_time = t... |
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.toggle... |
server.py | #!/usr/bin/python3
import socket
import os
from threading import Thread
from prettytable import PrettyTable
from colorama import Fore, Style
import time
import sys
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
if len(sys.argv) != 3:
print... |
utils.py | #!/usr/bin/env python
import sys
import array
import numpy as np
import time
from skimage.color import rgb2gray
from skimage.transform import resize
from skimage.io import imread
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from inputs import get_gamepad
from PIL import Image
import math
impor... |
histogram.py | #!/usr/bin/python3
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
import subprocess
import threading
import sys
import optparse
##### Arugment Parsing #####
parser = optparse.OptionParser()
parser.add_option('--input', action="store", dest="input_path", help="The path to th... |
lego.py | #!/usr/bin/env python
from app import webhook
from mutagen.mp3 import MP3
import app.spotify as spotify
import app.tags as nfctags
import binascii
import logging
import os
import threading
import time
import random
import usb.core
import usb.util
import app.mp3player as mp3player
import glob
logger = logging.getLogge... |
command.py | #!/usr/bin/python
# Ben Jones bjones99@gatech.edu
# Georgia Tech Fall 2014
#
# command.py: code to manage external programs with subprocess
import os
import signal
import subprocess
import threading
import time
class Command():
"""Class to handle the interface between Python scripts and executables"""
def _... |
connection.py | # Copyright (c) 2020 DeNA Co., Ltd.
# Licensed under The MIT License [see LICENSE for details]
import io
import time
import struct
import socket
import pickle
import threading
import queue
import select
import multiprocessing as mp
def send_recv(conn, sdata):
conn.send(sdata)
rdata = conn.recv()
return r... |
gps_sync_updated.py | import argparse
import pickle as pickle
import socket
from ctypes import c_char_p
from multiprocessing import Process, Queue, Manager
import util_gps
import util
import tensorflow as tf
import util_tf_v2_migrated
from tensorflow.python.keras import models
from tensorflow.python.keras import layers
from t... |
_env_runner.py | import copy
import logging
import os
import time
from multiprocessing import Process, Manager
from multiprocessing import get_start_method, set_start_method
from typing import Any
import numpy as np
import torch
from yarr.agents.agent import Agent
from yarr.envs.env import Env
from yarr.utils.rollout_generator import ... |
ushop_gui.py | #!/usr/bin/env python3
import wiiu_cdndownload
import sys
import threading
import keygen
from PyQt5 import QtWidgets
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QApplication, QMainWindow, QVBoxLayout,
QPushButton, QLabel, QLineEdit, QMessageBox,
QWi... |
tracker.py | from socket import *
from threading import Thread
import json
import random
import time
tracker_ip = '192.168.0.46'
tracker_port = 20000
class Tracker:
def __init__(self):
self.membersList = []
def myReadLine(self, connection):
readval = b""
flag = True
while flag:
byte = connection.recv(1)
if byte... |
base_consumer.py | # -*- coding: utf-8 -*-
# @Author : ydf
# @Time : 2019/8/8 0008 13:11
"""
ๆๆไธญ้ดไปถ็ฑปๅๆถ่ดน่
็ๆฝ่ฑกๅบ็ฑปใไฝฟๅฎ็ฐไธๅไธญ้ดไปถ็ๆถ่ดน่
ๅฐฝๅฏ่ฝไปฃ็ ๅฐใ
้้ขๅพๅค่ฐ็จsys.stdoutๆฏ็ฑไบprint่ขซๅ
จๅฑๆไบ็ดๅญ่กฅไธๅๆๅฏ่ทณ่ฝฌใๅฝ่ฏๅซๅฐไธคไธชๅฏ่ทณ่ฝฌ้พๆฅๆถๅ๏ผ็ฌฌไบไธชไธ่ฝ่ขซ่ฏๅซ๏ผๆไปฅไธไบๅฐๆน็ดๆฅ่ฐ็จไบsys.stdoutใ
"""
import abc
import copy
# from multiprocessing import Process
import datetime
import json
import sys
import socket
imp... |
generate_test_result_parallel.py | # Copyright (c) 2022 International Business Machines
# All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Authors: Hengxuan Ying (hengxuanying@gmail.com)
#
from skopt.learning import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import Matern, WhiteKernel
from sklearn.metrics import... |
bruter.py | # Date: 05/05/2018
# Author: Pure-L0G1C
# Description: Bruter
from .queue import Queue
from .spyder import Spyder
from .session import Session
from time import time, sleep
from threading import Thread, Lock
from os import system, remove, path
from platform import system as platform
from .const import max... |
crypto_util_test.py | """Tests for acme.crypto_util."""
import itertools
import socket
import threading
import time
import unittest
import six
from six.moves import socketserver #type: ignore # pylint: disable=import-error
import josepy as jose
import OpenSSL
from acme import errors
from acme import test_util
class SSLSocketAndProbeS... |
keep_alive.py | from flask import Flask
from threading import Thread
import os, logging
import data.constants as tt
import data.commands as cmd
# ========================
app = Flask('')
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
logging.getLogger('werkzeug').disabled = True
os.environ['WERKZEUG_RUN_MAIN'] = '... |
example_tklog.py | import tkinter as tk
from tklog import tklog
import time
import threading
def _poster(log):
while True:
log.title('test sync log', sync=True)
log.log(time.strftime('%Y-%m-%d %H:%M:%S %A'))
log.debug('test autoscrolling option')
time.sleep(2)
log.error('test sync log', sync=... |
threads.py | #!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import difflib
import random
import threading
import time
import traceback
from lib.core.data import conf
from lib.core.data import kb
from lib.core.data import logger
from l... |
monitoring_plots.py | #!/usr/bin/env python
# coding=utf-8
# vim: ts=4 sw=4 et
from __future__ import division
from datetime import datetime
from collections import deque, defaultdict
from functools import partial
import math
import os
import shutil
import time
import threading
import matplotlib.pyplot as plt
import matplotlib.ticker as t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.