source
stringlengths
3
86
python
stringlengths
75
1.04M
__init__.py
import json import re import threading import websocket from platypush.backend import Backend from platypush.message.event.music import MusicPlayEvent, MusicPauseEvent, \ MusicStopEvent, NewPlayingTrackEvent, PlaylistChangeEvent, VolumeChangeEvent, \ PlaybackConsumeModeChangeEvent, PlaybackSingleModeChangeEve...
manager.py
#!/usr/bin/env python3 import os import time import sys import fcntl import errno import signal import shutil import subprocess import datetime import textwrap from typing import Dict, List from selfdrive.swaglog import cloudlog, add_logentries_handler from common.basedir import BASEDIR from common.hardware import HA...
singleMachine.py
# Copyright (C) 2015-2016 Regents of the University of California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
npmssg.py
#!/usr/bin/env python3 import argparse from collections import Counter import pdb import pickle import re import sys import time import numpy as np import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F import torch.multiprocessing as mp import ...
test_shared_memory.py
import pytest import numpy as np import multiprocessing as mp from multiprocessing.sharedctypes import SynchronizedArray from multiprocessing import Array, Process from collections import OrderedDict from gym.spaces import Tuple, Dict from gym.error import CustomSpaceError from gym.vector.utils.spaces import _BaseGym...
feature_shutdown.py
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The Widecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test widecoind shutdown.""" from test_framework.test_framework import WidecoinTestFramework from test...
executors.py
__author__ = "Johannes Köster" __copyright__ = "Copyright 2015-2019, Johannes Köster" __email__ = "koester@jimmy.harvard.edu" __license__ = "MIT" import os import sys import contextlib import time import datetime import json import textwrap import stat import shutil import shlex import threading import concurrent.futu...
nested_graph_test.py
from __future__ import print_function import time from absl import app from absl import flags from multiprocessing import Process try: from std_msgs.msg import Int64 except ModuleNotFoundError: # ROS not installed Int64 = int import erdos.graph from erdos.graph import Graph from sum_squares_test import ...
train.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: most husne jahan """ # keras model usinf MNIST dataset from keras.datasets import mnist import matplotlib. pyplot as plt import threading as t import tensorflow as tf # Load dataset (download if needed) (X_train, y_train), (X_test, y_test) = mnist.load_dat...
lambda_function.py
import boto3 from boto3 import client, resource, session from botocore.exceptions import ClientError import os import shutil from ipaddress import ip_network, ip_address import logging import hmac import hashlib import botocore import base64 import json import threading from pygit2 import clone_repository s3 = client(...
speedtrap.py
import logging import json import signal import argparse from localtools import LocalTools from capturevideo import CaptureVideo from recordvideo import RecordVideo from configuration import Configuration from radar import Radar from scribe import Scribe from multiprocessing import Pipe, Process, Queue from speedrecord...
test_EmbeddedR.py
import unittest import pickle import multiprocessing import rpy2 import rpy2.rinterface as rinterface import sys, os, subprocess, time, tempfile, io, signal, gc rinterface.initr() def onlyAQUAorWindows(function): def res(self): platform = rinterface.baseenv.get('.Platform') platform_gui = [e fo...
MicrosoftTeams.py
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import requests from distutils.util import strtobool from flask import Flask, request, Response from gevent.pywsgi import WSGIServer import jwt import time from threading import Thread from typing import...
task.py
# coding=utf-8 # # Copyright (c) 2020 The UESTC-Signin Authors. All rights reserved. # Use of this source code is governed by a MIT-style license that can be # found in the LICENSE file. See the AUTHORS file for names of contributors. # # Authors: ehds(ds.he@foxmail.com) from uestc_signin.logging import create_logger ...
dnsflood_py2.py
import threading import time import random, string, sys, traceback, thread, threading import dns.message, socket, select, time """ Code heavily leveraged by sample example given by Jesus Llorente. A python2 App for launching DNS flooding from a list of sources, to a set of destinations, via a particular DNS ser...
x.py
import argparse import importlib.util import logging import signal import sys import os import traceback from multiprocessing import get_context import typing from typing import List, Text, Optional import ruamel.yaml as yaml from rasa.cli.utils import get_validated_path, print_warning, print_error from rasa.cli.argu...
test_imperative_signal_handler.py
# Copyright (c) 2019 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 appli...
visual.py
from __future__ import absolute_import import abc from enum import Enum import itertools import multiprocessing as mp import numpy as np import operator import os import sys import threading import time import warnings import pyqtgraph as pg from pyqtgraph.Qt import QtCore, QtGui, QtWidgets import abstract_map_lib.sp...
process.py
import sys import time from threading import Thread from threading import RLock from threading import Semaphore import partools.utils as u from . import gl from . import log verrou = RLock() def process_query_list(): from . import merge gl.multi_th = len(gl.QUERY_LIST) > 1 and gl.MAX_DB_CNX > 1 gl.c_q...
flux.py
__copyright__ = "Copyright 2016, http://radical.rutgers.edu" __license__ = "MIT" import os import time import threading as mt import subprocess as sp import radical.utils as ru from .base import LaunchMethod # ------------------------------------------------------------------------------ # class Fl...
test_browser.py
import BaseHTTPServer, multiprocessing, os, shutil, subprocess, unittest, zlib, webbrowser, time, shlex from runner import BrowserCore, path_from_root, nonfastcomp from tools.shared import * # User can specify an environment variable EMSCRIPTEN_BROWSER to force the browser test suite to # run using another browser com...
directinputs.py
# Code by Daniel Kukiela (https://twitter.com/daniel_kukiela) import ctypes from time import time, sleep from queue import Queue # main keys class class Keys(object): common = None standalone = False # instance of worker class keys_worker = None keys_process = None # key constants direc...
MainWindow.py
""" Main application window, displays set of dock widgets, manages inter-widget processes and data sharing. Author: Alexander Shiarella """ import os import sys import shutil import sqlite3 from pathlib import Path import threading from PyQt5.QtWidgets import QApplication, QMainWindow, QDockWidget, QLabel, QMessageB...
test_lambda_wrapper_thread_safety.py
import time # import unittest import threading from datadog import lambda_metric, datadog_lambda_wrapper from datadog.threadstats.aws_lambda import _lambda_stats TOTAL_NUMBER_OF_THREADS = 1000 class MemoryReporter(object): """ A reporting class that reports to memory for testing. """ def __init__(self): ...
station_scan.py
from multiprocessing import Process class Station_Scan(): def __init__(self, fhdhr, channels): self.fhdhr = fhdhr self.channels = channels self.fhdhr.db.delete_fhdhr_value("station_scan", "scanning") def scan(self): self.fhdhr.logger.info("Channel Scan Requested by Client."...
framestream.py
from threading import Thread import sys from queue import Queue from .pcapframeparser import PcapFrameParser class FrameStream: def __init__(self, stream, queueSize=10): # initialize the file stream along with the boolean # used to indicate if the thread should be stopped or not self.stream...
app.py
from main import process import os import platform import subprocess import sys import threading import webview def worker_thread(window, inputfiles, model): print('processing started ...') count = 0 for inputfile in inputfiles: count += 1 (inputfilepath, inputfilename) = os.path.split(inputfil...
rmis_resend_range.py
import threading import simplejson as json from django.core.management import BaseCommand from django.db import connections from directions.models import Napravleniya from rmis_integration.client import Client from users.models import DoctorProfile class Command(BaseCommand): help = "Повторная выгрузка результа...
test_engine_py3k.py
import asyncio from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import delete from sqlalchemy import event from sqlalchemy import exc from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import select from sqlalchemy import String f...
newcli3.py
""" cli.py Sample CLI Clubhouse Client RTC: For voice communication """ import os import sys import threading import configparser import time import keyboard from rich.table import Table from rich.console import Console from clubhouse.clubhouse import Clubhouse # Set some global variables try: import agorartc ...
parallelization.py
import math import multiprocessing from typing import List, Callable, Dict, Any from pydantic import BaseModel from icolos.utils.enums.parallelization import ParallelizationEnum _PE = ParallelizationEnum class Subtask(BaseModel): status: _PE = _PE.STATUS_READY times_tried: int = 0 data: Any def incr...
data_generator.py
#------------------------------------------------------------------------------ # Copyright (c) 2011, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ """ A fake data generated which can generate data at various frequencies. This is not intended fo...
_sframe_loader.py
# -*- coding: utf-8 -*- # Copyright © 2017 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
vsearch4web.py
from flask import Flask, render_template, request, escape, session from flask import copy_current_request_context from vsearch import search4letters from DBcm import UseDatabase, ConnectionError, CredentialsError, SQLError from checker import check_logged_in from threading import Thread from time import sleep # pri...
slcan.py
# # Copyright (C) 2014-2016 UAVCAN Development Team <uavcan.org> # # This software is distributed under the terms of the MIT License. # # Author: Ben Dyer <ben_dyer@mac.com> # Pavel Kirienko <pavel.kirienko@zubax.com> # from __future__ import division, absolute_import, print_function, unicode_literals import...
snowboydecoder_arecord.py
#!/usr/bin/env python import collections import snowboydetect import time import wave import os import logging import subprocess import threading import sys logging.basicConfig() logger = logging.getLogger("snowboy") logger.setLevel(logging.INFO) logging.getLogger().addHandler(logging.StreamHandler(sys.stdout)) TO...
main.py
import configparser import logging from os import system, name import socket from multiprocessing import Process import urllib.request import ast progressexists = False try: from progress.bar import Bar progressexists = True except: print("Progress bar doesn't exist. Run pip install progress") pyfig = Fa...
utils.py
# -*- coding: utf-8 -*- import datetime import json import functools from Queue import Queue import six from twisted.application.service import Service from twisted.internet import defer from bouser.excs import SerializableBaseException, ExceptionWrapper from twisted.web.http import Request from bouser.web.cors import...
test.py
import threading import time import pandas as pd import numpy as np m = 3 X = pd.read_csv("mA.csv", sep=',', header=None).to_numpy() Y = pd.read_csv("mB.csv", sep=',', header=None).to_numpy() print(len(X[0])) print(len(Y)) def mult(X, Y): result = [[0]*m] for z in range(len(Y[0])): for k in range(len(...
fixeddataengine.py
# !/usr/bin/python # vim: set fileencoding=utf8 : # __author__ = 'keping.chu' import multiprocessing as mp from threading import Thread import aiohttp import easyquotation import time from easyquant import PushBaseEngine from easyquant.event_engine import Event class FixedDataEngine(PushBaseEngine): EventType ...
check_actors.py
from francis import * import py_process import gym import threading from tensorflow.python.util import nest class GymEnvironment(object): def __init__(self, name, **kwargs): self.env = gym.make(name) def initial(self): observation = self.env.reset() return np.float32(observation) ...
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 #...
kafka_to_influxdb.py
__author__ = 'ryan' import json import multiprocessing import sys import time import urllib import influxdb import kafka num_processes = 1 num_messages = 1 max_wait_time = 20 # Seconds base_message = { "metric": { "name":"monasca.emit_time_sec", "dimensions":{ "component":"monasca...
demo_3.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by Em on 2017/5/12 """ 进程间通信 """ from multiprocessing import Process, Queue import os, time, random # 写入数据进程执行的代码 def write(q): for value in ['A', 'B', 'C']: print 'Put %s to queue...' % value q.put(value) time.sleep(random.random()...
mask_img.py
import LED_display as LMD import threading from matrix import * def LED_init(): thread=threading.Thread(target=LMD.main, args=()) thread.setDaemon(True) thread.start() return def draw_matrix(m): array= m.get_array() for y in range(m.get_dy()-4): for x in range(4, m.get_dx(...
star.py
""".. Line to protect from pydocstyle D205, D400. STAR aligner ------------ Interface to running STAR. """ import os import logging import subprocess from threading import Thread from queue import Queue import iCount LOGGER = logging.getLogger(__name__) def _execute(cmd): """Iterator giving stdout and stder...
wx_send_msg.py
#!/user/bin/env python3 # -*- coding:utf-8 -*- # 作者:imbiubiubiu # 创建:2020-11-21 # 更新:2020-11-21 # 用意:微信测试测试号发送信息 # 微信测试公众号申请地址:https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index import json import requests import configparser import time import init import threading from ini...
test_baker_operations_cli_options.py
"""Simple tests to check support for the following operations-related options for baking - --ignore-node-mempool - --operations-pool [file|uri] """ import os import os.path import json import time from http.server import HTTPServer, SimpleHTTPRequestHandler from multiprocessing import Process from typing import L...
tree-height.py
# python3 #from pprint import pprint import queue import sys, threading sys.setrecursionlimit(10**7) # max depth of recursion threading.stack_size(2**27) # new thread will get stack of such size class Node: def __init__(self, index): self.index = index self.children = [] def addChild(sel...
test_server.py
# coding=utf-8 # Copyright 2018-2020 EVA # # 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 ...
paygen.py
#!/usr/bin/env python3 import encrypt_code import os import argparse import subprocess import shutil import banners import platform from essential_generators import DocumentGenerator BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033...
test_java_jmx.py
# stdlib import os import tempfile import threading import time from types import ListType import unittest # 3p from mock import patch from nose.plugins.attrib import attr import yaml # project from aggregator import MetricsAggregator from stsstatsd import Server from jmxfetch import JMXFetch from tests.checks.common...
util.py
# coding: UTF-8 import io import sys import re import csv import glob import hashlib import functools import os.path import collections import contextlib import logging import subprocess import threading import rdflib import lxml.html import requests import pdftableextract as pte from .html_table impo...
farming.py
# from omnibelt.farming import Farmer, make_ghost, Replicator, Parallelizer, replicate, Cloner # import sys, os # import torch # import numpy as np # import torch.multiprocessing as mp # import itertools # import traceback # class ExceptionWrapper(object): # r"""Wraps an exception plus traceback to communicate acro...
p_bfgs.py
# -*- coding: utf-8 -*- # Copyright 2018 IBM. # # 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 agre...
tester.py
#!/usr/bin/python # # tester.py # # This source file is part of the FoundationDB open source project # # Copyright 2013-2018 Apple Inc. and the FoundationDB project authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
trainer_controller.py
# # Unity ML-Agents Toolkit # ## ML-Agent Learning """Launches trainers for each External Brains in a Unity Environment.""" import os import threading from typing import Dict, Set, List from collections import defaultdict import numpy as np from mlagents.tf_utils import tf from mlagents_envs.logging_util import get_...
runner.py
import argparse import json import logging import os import threading import time import traceback import colors import docker import numpy import psutil from ann_benchmarks.algorithms.definitions import (Definition, instantiate_algorithm, ...
VNet.py
import caffe import numpy as np import matplotlib.pyplot as plt import matplotlib import os import DataManager as DM import utilities from os.path import splitext from multiprocessing import Process, Queue class VNet(object): params=None dataManagerTrain=None dataManagerTest=None def __init__(self,par...
__init__.py
# -*- coding: utf-8 -*- ''' Set up the Salt integration test suite ''' # Import Python libs from __future__ import absolute_import, print_function import os import re import sys import copy import time import stat import errno import signal import shutil import pprint import atexit import socket import logging import...
test.py
# -*- coding: utf8 -*- import unittest import sys import re import os import os.path import time import multiprocessing import tempfile import shutil import requests.exceptions import acme.messages from free_tls_certificates import client from free_tls_certificates.utils import get_certificate_domains ACME_SERVER = ...
test_plc_route.py
import unittest import threading import socket import struct from contextlib import closing from pyads import add_route_to_plc from pyads.utils import platform_is_linux class PLCRouteTestCase(unittest.TestCase): SENDER_AMS = "1.2.3.4.1.1" PLC_IP = "127.0.0.1" USERNAME = "user" PASSWORD = "password" ...
test_tracer.py
import time import opentracing from opentracing import ( child_of, Format, InvalidCarrierException, UnsupportedFormatException, SpanContextCorruptedException, ) import ddtrace from ddtrace.ext.priority import AUTO_KEEP from ddtrace.opentracer import Tracer, set_global_tracer from ddtrace.opentrace...
progress_bar.py
import itertools import multiprocessing as mp try: from nose.plugins.multiprocess import TimedOutException except ImportError: TimedOutException = TimeoutError import random import warnings try: from tqdm import tqdm as _tqdm try: # pragma: nocover # Check if we're in a Jupyter notebook... if ...
main.py
# coding=UTF-8 from Src.Core import OutputCustomer,Reader,Base from multiprocessing import Process from threading import Thread from webServer.start import start_web import multiprocessing,os,click def runReader(log_files_conf,config_name): r = Reader(log_file_conf=log_files_conf ,config_name=config_name) ...
example_failed.py
from logging_server import LoggingServer, SocketLogger import logging, sys def process(process_name:str) -> None: logger = logging.getLogger(process_name) logger.info(f"Start {process_name}") # ... some process ... if __name__ == "__main__": import multiprocessing as mp logger = logging.getLo...
dense_update_ops_no_tsan_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...
tests.py
""" These are mostly tests taken verbatim from the JSON RPC v2 Spec document: http://groups.google.com/group/json-rpc/web/json-rpc-2-0 JSON-RPC v1 tests will be coming soon, as will tests for library "features" like class translation, etc. """ from jsonrpctcp import connect, config, history from jsonrpctcp.server imp...
__init__.py
import atexit import re import threading import time from subprocess import check_output, CalledProcessError from sys import exit try: import serial import serial.tools.list_ports except ImportError: exit("This library requires the serial module\nInstall with: sudo pip install pyserial") from .module impo...
utils.py
from functools import wraps import logging from pathlib import Path from datalad.utils import optional_args from datalad.tests.utils import ( SkipTest, attr, ) lgr = logging.getLogger("datalad.tests.utils") class WebDAVPath(object): """Serve the content of a path via an HTTP WebDAV URL. This class ...
metronome_clocktower.py
import time import socket import json import threading import argparse from prometheus_client import start_http_server from prometheus_client.core import GaugeMetricFamily, CounterMetricFamily, REGISTRY parser = argparse.ArgumentParser(description='metronome clocktower') parser.add_argument('-b', '--bind-address', re...
test_token_providers.py
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License import os import unittest from threading import Thread from asgiref.sync import async_to_sync from azure.kusto.data._cloud_settings import CloudInfo from azure.kusto.data._token_providers import * KUSTO_URI = "https://sdkse2etest.east...
web.py
from threading import Thread from flask import Flask from main import BotClient import os app = Flask("") @app.route("/") def main(): return "Your bot is running!" def run(): app.run(host="0.0.0.0", port=8080) def keep_alive(): server = Thread(target=run) server.start() # run webapp keep_aliv...
events.py
import threading class _GS: val = None def set(self, val): self.val = val def get(self): return self.val class Events: def __init__(self): self.handlers = {} def on(self, event): func_gs = _GS() def wrapper(func): func_gs.set(func) return func ...
main.py
from flask import Flask, render_template import pickle import time import multiprocessing import cv2 import matplotlib.pyplot as plt import datetime import fastai from fastai.vision import * import os from gaze_tracking import GazeTracking import seaborn as sns app = Flask(__name__) def ValuePredictor(img_to_che...
arvf.py
""" Asynchronously Reading Video Frames """ from typing import Union from threading import Lock, Thread from cv2 import VideoCapture, imshow, waitKey, destroyAllWindows class VideoCaptureAsync(object): """ Capturing Video frames Asynchronously """ def __init__(self, src: Union[int, str] = 0): se...
PluginHost.py
import time import sys import os import threading try: import ConfigParser as ConfigParsers except ImportError: import configparser as ConfigParsers from common import CommonVariables from pwd import getpwuid from stat import * import traceback # [pre_post] # "timeout" : (in seconds), # # .......
mySubproc_vec_env.py
import multiprocessing from collections import OrderedDict from typing import Sequence import gym import numpy as np from stable_baselines.common.vec_env.base_vec_env import VecEnv, CloudpickleWrapper def _worker(remote, parent_remote, env_fn_wrapper): parent_remote.close() env = env_fn_wrapper.var() wh...
DisplayUtils.py
if not __name__ == "__main__": print("Started <Pycraft_DisplayUtils>") class DisplayUtils: def __init__(self): pass def UpdateDisplay(self): # Run tests to make sure windows not too small self.Data_aFPS = [] self.Data...
main.py
from hotkeys import start_listener from tray import run_icon_tray from threading import Thread if __name__ == "__main__": Thread(target=start_listener).start() Thread(target=run_icon_tray).start()
termination_criterion.py
import threading from abc import ABC, abstractmethod from jmetal.core.observer import Observer from jmetal.core.quality_indicator import QualityIndicator """ .. module:: termination_criterion :platform: Unix, Windows :synopsis: Implementation of stopping conditions. .. moduleauthor:: Antonio Benítez-Hidalgo <a...
dashboard.py
import threading from flask import Flask, render_template from lib.network import ClientSet from lib.routes import all_routes from train.server.handlers import unprocessed_routes import train.server.config as config app = Flask(__name__) clients: ClientSet = ClientSet() @app.route('/') def get_status(): """ ...
tcp_client.py
#! python3 # -*- coding: utf-8 -*- import socket import log import protocol.message import threading class TcpClient: def __init__(self, derive): self.derive = derive self.name = "" self.sock = None self.thread_recv_data = None self.thread_recv_data_flag = "...
locker.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright © 2014 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this d...
test_threading.py
# Very rudimentary test of threading module import test.test_support from test.test_support import verbose import random import re import sys import threading import thread import time import unittest import weakref import lock_tests # A trivial mutable counter. class Counter(object): def __init__(self): ...
ib_api.py
import logging import traceback from ktrade.config import is_configured, configuration_for from time import sleep from ktrade.queues import inbound_queue, outbound_queue from ktrade.queue_messages.watch_message import WatchMessage from ibapi.client import EClient, TickAttribLast, TickAttrib, Order, ExecutionFilter from...
main.py
import constants import pygame import time import random from threading import Thread import os print(""" _ _ ____ ___ ____ ___ _ _ _____ ___ _ ___ | | / \ | __ )_ _| _ \|_ _| \ | |_ _/ _ \ __ _/ | / _ \ | | / _ \ | _ \| || |_) || || \| | | || | | | \ \ / / || | | | | |___...
main.py
import threading from book_book.actions import rent_a_book def run_example() -> None: threading.Thread(target=rent_a_book, args=("Aleksandra", "Nauka - o kosmosie")).start() threading.Thread(target=rent_a_book, args=("Aleksandra", "Nauka - o kosmosie")).start() threading.Thread(target=rent_a_book, args=(...
on_error_test.py
#!/usr/bin/env python # Copyright 2014 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import BaseHTTPServer import atexit import cgi import getpass import json import logging import os import platform import re...
boston_demo.py
#!/usr/bin/env python from __future__ import (print_function, unicode_literals, division, absolute_import) import argparse import contextlib import os import re import shlex import subprocess import sys import threading import time import uuid from openstack import connection from dfs_sdk im...
chatbot.py
################################################### import threading, time import websocket from queue import Queue import json import requests from obscureridge import lichess from obscureridge.urllibutils import geturljson from traceback import print_exc as pe from os import environ ##########################...
__init__.py
from pathlib import Path from datetime import datetime import threading import itertools import re from flask import current_app import librosa from .. import db from .. import speech_api def run_inventory(): basepath = current_app.config["DOWNLOAD_FOLDER"] print("Inventorying base path: " + basepath) a...
client_server_dynamic_discovery.py
# Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima) # # 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 ...
simple_http_server.py
import os import urlparse import datetime import threading import mimetools import socket import errno import xlog import sys import select import time logging = xlog.Logger() class HttpServerHandler(): default_request_version = "HTTP/1.1" MessageClass = mimetools.Message rbufsize = -1 wbufsize = 0 ...
pydevd.py
''' Entry point module (keep at root): This module starts the debugger. ''' import sys # @NoMove if sys.version_info[:2] < (3, 6): raise RuntimeError('The PyDev.Debugger requires Python 3.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.') import os ...
conditional_accumulator_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...
ray.py
#! /usr/bin/env python # Copyright (c) 2019 Uber Technologies, 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 a...
test.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' MIT License Copyright (c) [2016] [POLYGON Team Ltd.] 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...
test_gc.py
import unittest from test.support import (verbose, refcount_test, run_unittest, strip_python_stderr, cpython_only, start_threads, temp_dir, requires_type_collecting,reap_threads) from test.support.script_helper import assert_python_ok, make_script import sys import t...
main.py
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...