source
stringlengths
3
86
python
stringlengths
75
1.04M
gui.py
# -*- coding: utf-8 -*- """ Created on Fri Oct 11 09:47:49 2019 @author: JOANRR """ import datetime import dash import dash_core_components as dcc import dash_html_components as html import dash_daq as daq from dash.dependencies import Input, Output, State from pyInstruments.pid import TemperatureController from threa...
test_fcntl.py
"""Test program for the fcntl C module. """ import platform import os import struct import sys import unittest from multiprocessing import Process from test.support import (verbose, TESTFN, unlink, import_module, cpython_only) # Skip test if no fcntl module. fcntl = import_module('fcntl') ...
lxc_executor.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import logging from vmchecker.generic_executor import Host,VM _logger = logging.getLogger('vm_executor') from threading import Thread import time class LXCHost(Host): def getVM(self, bundle_dir, sb_cfg): return LXCVM(self, bundle_dir, sb_cfg) class L...
deepdist.py
import copy import cPickle as pickle from multiprocessing import Process from rwlock import RWLock import socket import sys from threading import Thread import urllib2 import urlparse """Lightning-Fast Deep Learning on Spark """ class DeepDist: def __init__(self, model, master='127.0.0.1:5000', min_updates=0, max_...
app_utils.py
# From http://www.pyimagesearch.com/2015/12/21/increasing-webcam-fps-with-python-and-opencv/ import struct import six import collections import cv2 import datetime from threading import Thread from matplotlib import colors class FPS: def __init__(self): # store the start time, end time, and total number ...
v5.py
#C1949699 # from asyncio.windows_events import NULL import numpy as np import argparse import random import time import cv2 from cv2 import imshow from cv2 import waitKey import os from multiprocessing import Process confsThr = 0.4 boxThr = 0.45 #Loading in rcnn mask model net = cv2.dnn.readNetFromTensorflow("dnn\\fro...
rnodeconf.py
#!python3 # MIT License # # Copyright (c) 2018 Mark Qvist - unsigned.io/rnode # # 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 #...
_intermediate_output.py
# Copyright 2018 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" file acc...
test_errcodes.py
#!/usr/bin/env python # test_errcodes.py - unit test for psycopg2.errcodes module # # Copyright (C) 2015 Daniele Varrazzo <daniele.varrazzo@gmail.com> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software ...
test_ipc.py
import abc import itertools import multiprocessing import sys import textwrap import threading import time import traceback from typing import Any, Callable, List, Optional, cast import pytest import determined as det from determined import ipc class Subproc(multiprocessing.Process): """ Subproc executes an...
main.py
from multiprocessing import Process from requests_oauthlib import OAuth1Session from urllib.parse import parse_qsl import webbrowser, argparse ,web_server, pprint CK = "" CS = "" def gen_auth_url(consumer_key, consumer_secret, oauth_callback): print("Generating the URL for authentication...") CK = consumer_...
adbclient.py
# -*- coding: UTF-8 -*- # # Tencent is pleased to support the open source community by making QTA available. # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may...
unused_aws_resources.py
""" SYNOPSIS -------- Get the details of unused resources present across regions in the AWS account DESCRIPTION ----------- This script provides a detailed overview of the number of unused resources present in the AWS account. It provides service-wise details of unused resources lying around in all t...
test_client.py
import asyncio import concurrent.futures import copy import datetime import functools import os import re import threading import warnings from base64 import b64decode, b64encode from queue import Empty from unittest.mock import MagicMock, Mock import nbformat import pytest import xmltodict from jupyter_client import ...
raspi_ir_relay.py
#!/usr/bin/python # Copyright (c) 2016, <name of copyright holder> # Author: Tygart, Adam <mozestygart@gmail.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of sourc...
flask_platform.py
from flask import Flask, request import http.client import json import threading from PythonBridge import bridge_globals, json_encoder, bridge_utils import sys import logging import requests class FlaskMsgService: def __init__(self, port, pharo_port, feed_callback): self.serializer = json_encoder.JsonSeri...
dem_coregistration.py
#!/usr/bin/env python # Filename: dem_coregistration """ introduction: dem co-registration using demcoreg, install it and its dependencies: git clone https://github.com/dshean/imview.git pip install -e imview git clone https://github.com/dshean/pygeotools.git pip install -e pygeotools git clone ht...
wp_killer.py
from bhp3_class.web import get_words from collections import deque from io import BytesIO from lxml import etree import requests import sys import threading import time EXTENSIONS = ['.php', '.bak', '.orig', '.inc'] SUCCESS = 'Welcome to WordPress!' WORDLIST = '/mydownloads/cain.txt' def get_params(content): par...
main.py
import os import sys # os.system('set DEBUG=1') # print("setting debugger to true for auto reload") from kivy.storage.jsonstore import JsonStore from kivy.uix.button import Button from kivy.uix.image import AsyncImage from kivy.uix.scrollview import ScrollView from kivymd.list import MDList, OneLineAvatarIconListItem...
utility.py
import os import json import re import http.client import logging from flask import render_template from json2html import * from threading import Thread from flask import current_app from flask_mail import Message from . import mail from . import watson_conversion,cloudant_nosql_db from automation import requestsloader...
TServer.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...
__init__.py
""" Yay! It's NOT IDA!!!1!!1!one! """ import os import re import sys import time import string import hashlib import logging import binascii import itertools import traceback import threading import contextlib import collections try: import Queue except ModuleNotFoundError: import queue as Queue # The en...
app.py
from flask import Flask from flask import request, abort # from flask import render_template import helpers.mqtt as mqtt import helpers.secret_parser as secret import helpers.logging as logging import db.db_helper as db from threading import Thread from time import sleep # import sys import json # --end imports #...
concurrent_schema_changes_test.py
import time, os, pprint, glob, re from threading import Thread from dtest import debug, Tester from ccmlib.node import Node def wait(delay=2): """ An abstraction so that the sleep delays can easily be modified. """ time.sleep(delay) class TestConcurrentSchemaChanges(Tester): def __init__(self, *...
wspbus.py
r"""An implementation of the Web Site Process Bus. This module is completely standalone, depending only on the stdlib. Web Site Process Bus -------------------- A Bus object is used to contain and manage site-wide behavior: daemonization, HTTP server start/stop, process reload, signal handling, drop privileges, PID ...
pod.py
""" Pod related functionalities and context info Each pod in the openshift cluster will have a corresponding pod object """ import logging import os import re import yaml import tempfile import time import calendar from threading import Thread import base64 from semantic_version import Version from ocs_ci.ocs.bucket_...
test_signal.py
import os import signal import time import threading import unittest from common import platform_skip, TestCase import pyuv @platform_skip(["win32"]) class SignalTest(TestCase): def signal_cb(self, handle, signum): self.assertEqual(signum, signal.SIGUSR1) self.signal_cb_called += 1 self...
utils.py
# encoding: utf-8 # # Copyright (C) 2011-2019 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
terminal.py
# -*- coding: utf-8 -*- # # Copyright 2011 Liftoff Software Corporation # # Meta __version__ = '1.1' __version_info__ = (1, 1) __license__ = "AGPLv3 or Proprietary (see LICENSE.txt)" __author__ = 'Dan McDougall <daniel.mcdougall@liftoffsoftware.com>' __doc__ = """\ About This Module ================= This crux ...
oandav20store.py
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function, unicode_literals) import collections import json import threading import copy import time as _time from datetime import datetime, timedelta import v20 import backtrader as bt from backtrader.metabase impo...
test_rollbar.py
import base64 import copy import json import socket import threading import uuid import sys try: from StringIO import StringIO except ImportError: from io import StringIO try: from unittest import mock except ImportError: import mock import unittest import rollbar from rollbar.lib import python_majo...
federated_learning_keras_PS_threads_CIFAR100.py
from DataSets import CIFARData from DataSets_task import CIFARData_task from consensus.consensus_v2 import CFA_process from consensus.parameter_server import Parameter_Server # best use with PS active # from ReplayMemory import ReplayMemory import numpy as np import os import tensorflow as tf from tensorflow import ker...
Management.py
# MIT License # Copyright (c) 2019 Fernando Perez import numpy as np import time import cv2 try: from PIL import Image except ModuleNotFoundError as e: pass try: # It is usefull if you want to detect scene changes import imagehash except ModuleNotFoundError as e: pass try: #...
doc.py
# # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of cond...
worker.py
import Queue import threading import websocket import json import time from django.utils import timezone from datetime import timedelta def _run_worker(): while True: _, fn, args = _work_queue.get() try: fn(*args) except: pass _work_queue = Queue.PriorityQueue() _wo...
Alert_Area2.py
# -*- coding: utf-8 -*- from PyQt5 import QtCore, QtGui, QtWidgets import pygame import pymysql from PyQt5.QtCore import QTimer import time import smtplib import os from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication import multiprocess...
utils.py
import os import subprocess from pathlib import Path from queue import Queue from subprocess import PIPE, Popen from threading import Thread from typing import Any, Dict, Iterable, List, Optional, Tuple, Union import pydantic from python_on_whales.exceptions import DockerException, NoSuchImage, NoSuchService PROJECT...
test_driver.py
from copy import deepcopy from threading import Thread from unittest.mock import Mock import pytest from time import sleep from numpy import isclose from opentrons.trackers import pose_tracker from tests.opentrons.conftest import fuzzy_assert from opentrons.config.robot_configs import ( DEFAULT_GANTRY_STEPS_PER_M...
misc.py
# Helpers that don't have dependancies on our other modules. import asyncio, concurrent, os, io, struct, os, threading, time, traceback, sys, queue from contextlib import contextmanager from PIL import Image, ExifTags from pprint import pprint from ..util.tiff import get_tiff_metadata from .video_metadata import mp4, ...
tests.py
# -*- coding: utf-8 -*- # Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. from __future__ import unicode_literals import os import re import shutil import tempfile import threading import time import unittest import warnings from django.conf import settings from django....
cycle.py
import datetime import re import subprocess import sys import threading import time from argparse import ArgumentParser from shutil import which import pexpect import psutil as psutil from art import text2art from loguru import logger from dateutils import pretty_time_delta wash_regex = r'^((?:[A-Z0-9]{2}:){5}[A-Z0-...
coverage_test_reverse_proxy.py
# -*- coding: utf-8 -*- from queue import Queue import random import socket import threading import unittest from coapclient import HelperClient from coapreverseproxy import CoAPReverseProxy from coapserver import CoAPServer from coapthon import defines from coapthon.messages.option import Option from coapthon.messag...
collaborative.py
from __future__ import annotations import logging from dataclasses import dataclass from threading import Thread, Lock, Event from typing import Dict, Optional, Iterator import numpy as np import torch from pydantic import BaseModel, StrictBool, StrictFloat, confloat, conint from hivemind.client.averaging.training i...
local_service_handler.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 appli...
social_media_poster.py
# # Daemon to post all queued up notifications and social media posts # from django.core.management.base import BaseCommand from django.db import connection from django.utils import autoreload import sys import threading import select from postgresqleu.util.messaging.sender import send_pending_messages, send_pending...
test_websocket.py
from uvicorn.protocols.http.h11_impl import H11Protocol from uvicorn.protocols.websockets.websockets_impl import WebSocketProtocol from uvicorn.protocols.websockets.wsproto_impl import WSProtocol import asyncio import functools import time import threading import requests import pytest import websockets from contextlib...
compare_Walltoall_adam_1layers.py
import qiskit import numpy as np import sys sys.path.insert(1, '../') import qtm.base, qtm.constant, qtm.nqubit, qtm.fubini_study, qtm.encoding import importlib import multiprocessing importlib.reload(qtm.base) importlib.reload(qtm.constant) importlib.reload(qtm.onequbit) importlib.reload(qtm.nqubit) importlib.reload(q...
server.py
"""Small example OSC server This program listens to several addresses, and prints some information about received packets. """ import argparse import math import threading from pythonosc import dispatcher from pythonosc import osc_server import sys # insert at 1, 0 is the script path (or '' in REPL) ...
client.py
import time import requests import random import threading from multiprocessing import Pool s = requests.session() def post_result(mid): start = time.time() data = { "total_pay": 0, "level": 2, "mid": mid, "machine": "FuFuRiches", "avatar_url": "", "vip_level":...
run_it.py
# -*- coding: utf-8 -*- # @Time : 2021/3/6 # @Author : Lart Pang # @GitHub : https://github.com/lartpang import argparse import subprocess import time from enum import Enum from multiprocessing import Process import pynvml pynvml.nvmlInit() # SOME CONSTANT class STATUS(Enum): NORMAL = 0 CMD_INVALID = ...
run_refresh.py
#!/usr/bin/env python import argparse, psycopg2, sys from multiprocessing import Process mimeo_version = "1.3.0" parser = argparse.ArgumentParser(description="Script to manage running mimeo table replication with a period set in their configuration. By default, refreshes are run sequentially in ascending order of t...
main.py
# coding=utf-8 from multiprocessing import Queue, Process from scrapy.utils.project import get_project_settings from twisted.internet import reactor from scrapy.crawler import CrawlerProcess from shop.spiders.markethot_spider import MarkethotSpider from shop.spiders.megadrop24_spider import Megadrop24Spider from sho...
visualizer.py
import numpy as np import pinocchio from pinocchio.utils import * from pinocchio.rpy import matrixToRpy, rpyToMatrix, rotate from robot_properties_solo.config import SoloConfig from loader import loadRobot import subprocess import threading import time class VisualModel(): def __init__(self,display=False): ...
multi_echo_server.py
#!/usr/bin/env python3 import socket import time from multiprocessing import Process HOST = "" PORT = 8001 BUFFER_SIZE = 1024 def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((HOST, PORT)) s.listen(2) ...
announcements.py
import threading import base64 from nacl.signing import VerifyKey from src.components.server.processing.client_requests import ClientRequestsProcessing from src.core.election.election import Election from src.protocol.consensus.suspect import GroupViewSuspect from src.core.signatures.signatures import Signatures from ...
main.py
#!/usr/bin/env python import sys, argparse from threading import Thread from DocuTrace.Analysis.ComputeData import ComputeData from DocuTrace.Analysis.DataCollector import DataCollector from DocuTrace.Utils.Logging import logger from DocuTrace.Utils.Validation import str2bool, validate_path, validate_task from DocuTrac...
tweets.py
import csv # To read & write Comma Seperated Value files import json # To encode python objects to json import os import re # For regular expressions import sys import time # To manipulate time values import warnings from datetime import datetime # To parse datetime types from multiprocessing import Process, Queue...
frontend.py
#!/usr/bin/env python """ Another AlphaGriffin Project. """ __author__ = "Eric Petersen @Ruckusist" __copyright__ = "Copyright 2022, The Alpha Griffin Project" __credits__ = ["Eric Petersen", "Shawn Wilson", "@alphagriffin"] __license__ = "***" __version__ = "0.0.6" __maintainer__ = "Eric Petersen" __email__ ...
analysis_submission.py
##################################################################### # # # /analysis_submission.py # # # # Copyright 2013, Monash University ...
utils.py
import json import sys import re import os import stat import fcntl import shutil import hashlib import tempfile import subprocess import base64 import threading import pipes import uuid try: from collections.abc import Iterable, Mapping except ImportError: from collections import Iterable, Mapping from io im...
repair_test.py
import os import os.path import threading import time import re import pytest import logging from collections import namedtuple from threading import Thread from cassandra import ConsistencyLevel from cassandra.query import SimpleStatement from ccmlib.node import ToolError from dtest import FlakyRetryPolicy, Tester,...
main.py
import argparse import threading import time from pathlib import Path from pose import getKeypoints, getValidPairs, getPersonwiseKeypoints import cv2 import depthai as dai import numpy as np from imutils.video import FPS parser = argparse.ArgumentParser() parser.add_argument('-nd', '--no-debug', action="store_true", h...
cli.py
import os import sys import threading import click import six from gevent import pywsgi from geventwebsocket.handler import WebSocketHandler from dagster import ExecutionTargetHandle, check, seven from dagster.cli.load_handle import handle_for_repo_cli_args from dagster.cli.pipeline import repository_target_argument ...
train_pg_f18.py
""" Original code from John Schulman for CS294 Deep Reinforcement Learning Spring 2017 Adapted for CS294-112 Fall 2017 by Abhishek Gupta and Joshua Achiam Adapted for CS294-112 Fall 2018 by Michael Chang and Soroush Nasiriany """ import numpy as np import tensorflow as tf import gym import logz import os import time im...
rnode.py
import functools import re import os import queue import shlex import string import time import shutil import logging from logging import (Logger) import threading from threading import Event import contextlib from multiprocessing import Queue, Process from typing import ( Dict, List, Tuple, Optional, ...
daemon.py
# TODO: docstring # TODO: rename to shared? import functools import tempfile import os from typing import Optional, Dict, Any, List import subprocess import atexit import sys import threading import grpc # type: ignore from google.rpc import status_pb2, error_details_pb2 # type: ignore from .servicepb.replicate_pb...
main.py
#! /usr/bin/env python import importlib import os import logging import tempfile import signal import shutil import time import sys import threading import json import optparse import email import subprocess from future.builtins import bytes import yaml import requests import coloredlogs import alexapi.config import...
road_speed_limiter.py
import json import select import threading import time import socket import fcntl import struct from threading import Thread from cereal import messaging from common.params import Params from common.numpy_fast import interp CAMERA_SPEED_FACTOR = 1.05 class Port: BROADCAST_PORT = 2899 RECEIVE_PORT = 843 LOCATIO...
util.py
# Copyright 2020 Determined AI. 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 o...
LR2.py
""" Licensed under the Unlicense License; you may not use this file except in compliance with the License. You may obtain a copy of the License at https://unlicense.org Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BAS...
PiVideoStream.py
# import the necessary packages from picamera.array import PiRGBArray from picamera import PiCamera from threading import Thread class PiVideoStream: def __init__(self, resolution=(1296, 976), framerate=32): # initialize the camera and stream self.camera = PiCamera() self.camera.resolution...
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...
chat_client_gui.py
#!/usr/bin/env python3 """Script for Tkinter GUI chat client.""" import os from socket import AF_INET, socket, SOCK_STREAM from threading import Thread import tkinter def receive(): """Handles receiving of messages.""" while True: try: msg = client_socket.recv(BUFSIZ).decode("utf8") ...
launch.py
"""Launching tool for DGL distributed training""" import os import stat import sys import subprocess import argparse import signal import logging import time import json import multiprocessing import re from functools import partial from threading import Thread from typing import Optional DEFAULT_PORT = 30050 def cle...
sip_functions.py
# -*- coding: utf-8 -*- """ Created on Fri Mar 27 11:35:45 2020 @author: nigo0024 """ from ast import literal_eval from copy import deepcopy import fnmatch import itertools as it import math import numpy as np import os import geopandas as gpd import pandas as pd import pathlib import sys import time from hs_process ...
PygameDisplay.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 26 12:14:08 2022 @author: nuria Ideas #todo - Add either a disgusting image, or a cute image, to make u be not nearby screen """ from __future__ import print_function from WebcamVideoStream import WebcamVideoStream from threading import Thread import pygame...
webserver.py
import threading import asyncio import json import base64 try: import tornado.web import tornado.websocket from tornado.log import access_log except ImportError: raise ImportError('To use SDTmonitor, you need to install tornado: \n' '\n > pip install tornado') from srttools....
main.py
import pdb import time import os import subprocess import re import random import json import numpy as np import glob from tensorboard.backend.event_processing.event_accumulator import EventAccumulator import socket import argparse import threading import _thread import signal from datetime import datetime import csv f...
serial_talk.py
#!/usr/bin/env python3 import serial import struct from threading import Thread import sys import time import keyboard import crc8 from random import random msg = [0, 0, 0] count = 0 corrupted = 0 wrong_len = 0 # baudrate - msg/sec - isOk # 9600 63 True # 14400 98 True # 19200 129 T...
execute.py
import time import threading import math from utils.client import auth_from_order from trades.models import OrderTask from exchanges.views import EXCHANGE_APIS from exchanges.abstract import Order from main.models import BotTrade def execute_trade(order): # ISSUE: this is messing with the nonces when there ...
__init__.py
#!/bin/python3 # The MIT License (MIT) # Copyright © 2021 Yuma Rao # 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 to use, copy, ...
executors.py
__author__ = "Johannes Köster" __contributors__ = ["David Alexander"] __copyright__ = "Copyright 2015, 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 impor...
test_threaded_import.py
# This is a variant of the very old (early 90's) file # Demo/threads/bug.py. It simply provokes a number of threads into # trying to import the same module "at the same time". # There are no pleasant failure modes -- most likely is that Python # complains several times about module random having no attribute # ra...
minion.py
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import absolute_import, print_function import os import re import sys import copy import time import types import signal import fnmatch import logging import threading import traceback import multiprocessing from random imp...
core.py
# :copyright: (c) 2021 by Pavlo Dmytrenko. # :license: MIT, see LICENSE for more details. """ yaspin.yaspin ~~~~~~~~~~~~~ A lightweight terminal spinner. """ import contextlib import datetime import functools import itertools import signal import sys import threading import time from typing import List, Set, Union ...
cli.py
""" Project: python_assessment_3 Author: Diego C. <20026893@tafe.wa.edu.au> Created at: 10/11/2020 9:52 pm File: cli.py """ import sys import threading import time import task_b.server.server as server import task_b.client.client as client HOST = '127.0.0.1' PORT = 5555 def get_user_input(): """Gets user input."...
StreamDeck.py
# Python Stream Deck Library # Released under the MIT license # # dean [at] fourwalledcubicle [dot] com # www.fourwalledcubicle.com # import threading import time from abc import ABC, abstractmethod from ..Transport.Transport import TransportError class StreamDeck(ABC): """ Represents...
root_diff.py
"""Calculates the difference between two ROOT (https://root.cern.ch/) files. If a difference is present, the command will create plots for the distributions that differ. TODO: separate functionality: plotting, recursive reading of ROOT files, diff calculation TODO: allow for injection of user-defined high-level varia...
My_Listener.py
#!/usr/bin/python3 # C:\Work\Python\HID_Util\src\My_Listener.py from binascii import hexlify import sys import argparse import threading from time import perf_counter as timer import include_dll_path import hid import os from string_date_time import get_date_time from string_date_time import get_time # BOARD_TYPE_MA...
xingmeng.py
# Author: HeliantHuS # IDE: VIM # System Env: Kali Linux import requests import re import threading # submit flag address flagServer = "" # Flag Server Token token = "" # Attack Main attack function def Attack(target: str, payload: dict): try: data = payload response = requests.post(target, data...
test_pdb.py
# -*- coding: utf-8 -*- from __future__ import print_function import bdb import inspect import os.path import re import sys import traceback from io import BytesIO import py import pytest try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest # Make sure...
main.py
from game import Snake from agent import Agent from settings import * from enum import Enum import multiprocessing as mp from multiprocessing import Pool, Process import os import json import random class Windows(Enum): """ Windows enums W_i = (m, n, s, k) where m is number of row tiles n is ...
mbase.py
""" mbase module This module contains the base model class from which all of the other models inherit from. """ from __future__ import print_function import abc import sys import os import subprocess as sp import shutil import threading import warnings if sys.version_info > (3, 0): import qu...
readers.py
"""File handle readers and related tools.""" import ctypes import io import os import queue import sys import threading import time import xonsh.lazyimps as xli from xonsh.built_ins import XSH class QueueReader: """Provides a file-like interface to reading from a queue.""" def __init__(self, fd, timeout=Non...
common.py
"""Test the helper method for writing tests.""" import asyncio import collections from collections import OrderedDict from contextlib import contextmanager from datetime import timedelta import functools as ft from io import StringIO import json import logging import os import sys import threading import time import uu...
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...
main.py
#!/usr/bin/env python2 # Asynchronous RPC server over STDIO from __future__ import print_function import sys import time import pyjsonrpc import threading import Queue import signal import json import base64 # --- Lua help text --- # Help for the functions that are made available to Lua luahelp = """ add3(number, n...
runner.py
"""Run Home Assistant.""" import asyncio from concurrent.futures import ThreadPoolExecutor import dataclasses import logging import sys import threading from typing import Any, Dict, Optional from homeassistant import bootstrap from homeassistant.core import callback from homeassistant.helpers.frame import warn_use #...
undertaker.py
# -*- coding: utf-8 -*- # Copyright 2013-2020 CERN # # 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 a...
engine.py
# Copyright 2013: Mirantis Inc. # 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 b...