source
stringlengths
3
86
python
stringlengths
75
1.04M
account.py
# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # 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-...
dft_if_signal.py
# # Copyright (c) 2019, Manfred Constapel # This file is licensed under the terms of the MIT license. # # # DFT of IF signal plot (per frame, from memory dump of Capture Demo) # import os, sys, threading, time try: import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt ...
testcases.py
""" Subclasses of unittest.TestCase. """ from __future__ import absolute_import import os import os.path import shutil import threading import unittest from .. import config from .. import core from .. import logging from .. import utils def make_test_case(test_kind, *args, **kwargs): """ Factory function ...
callbacks_test.py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
runCtaTrading.py
# encoding: UTF-8 from __future__ import print_function import sys try: reload(sys) # Python 2 sys.setdefaultencoding('utf8') except NameError: pass # Python 3 import multiprocessing from time import sleep from datetime import datetime, time import os from vnpy.event import EventEngine2 from vnp...
multitables.py
# Copyright (C) 2016 G. H. Collin (ghcollin) # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE.txt file for details. import numpy as np import multiprocessing import threading __author__ = "G. H. Collin" __version__ = "1.1.0" class QueueClosed: """Signals t...
test_pdb.py
# A test suite for pdb; not very comprehensive at the moment. import doctest import pdb import sys import types import unittest import subprocess import textwrap from test import support # This little helper class is essential for testing pdb under doctest. from test.test_doctest import _FakeInput class PdbTestInpu...
wmvc.py
""" WMVC main class Author: Han Zhou """ import datetime import logging import threading import time from util import url_requester, utils from util.utils import get_latest_crypto_price, display_video_card_list VERSION = 0.1 # TODO: adjust the running param here # run time for the script in sec DEFAULT_RUN_TIME = 6...
BMI.py
import io import os import time import sys import struct import socket import numpy as np import torch as torch from spiketag.fpga import xike_config from torch.multiprocessing import Process, Pipe, SimpleQueue from ..utils.utils import EventEmitter, Timer from ..realtime import Binner class bmi_stream(object): ...
smart_system.py
import json import logging from oauthlib.oauth2 import LegacyApplicationClient from requests_oauthlib import OAuth2Session import websocket from threading import Thread import time import sys from gardena.location import Location from gardena.devices.device_factory import DeviceFactory class Client: def __init_...
trace_shell.py
import sys import os import signal import subprocess from subprocess import Popen, PIPE import threading from morphine.trace_formatter import TraceFormatter class TraceShell: def __init__(self): signal.signal(signal.SIGINT, self.signal_handler) self.swipl_p = None self.formatter = TraceFo...
saltmod.py
""" Control the Salt command interface ================================== This state is intended for use from the Salt Master. It provides access to sending commands down to minions as well as access to executing master-side modules. These state functions wrap Salt's :ref:`Python API <python-api>`. .. versionadde...
train_pg.py
import numpy as np import tensorflow as tf import gym import logz import scipy.signal import os import time import inspect from multiprocessing import Process # ============================================================================================# # Utilities # =================================================...
pydoc.py
#!/usr/bin/env python # -*- coding: latin-1 -*- """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: ...
AVCON.py
import sublime, sublime_plugin import os import threading SETTINGS = {} class DecodingCache(object): def __init__(self): self.max_size = -1 self.cache = [] def set_max_size(self, max_size): self.max_size = max_size def set_cache(self, new_cache): self.cache = new_cache def get_cache(self): return se...
server.py
#!/usr/bin/env/python # File name : server.py # Production : DarkPaw # Website : www.adeept.com # Author : William # Date : 2019/07/24 import socket import time import threading import SpiderG SpiderG.move_init() import os import FPV import info import LED import switch functionMode = 0 def info_s...
communication.py
import logging import time import io import pickle import multiprocessing import bagua_core as B from bagua.service import AutotuneService from . import env from .env import ( get_master_addr, get_world_size, get_rank, get_local_rank, get_node_rank, get_default_bucket_size, get_bagua_service...
sfo_agents.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/> # # Licensed under the GNU General Public License, version 3 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://jxs...
win32_file_watcher.py
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
Startup.py
import sys import os sys.path.insert(-1, os.path.expanduser("~/Documents")) sys.path.insert(-1, os.path.expanduser("~/Documents/site-packages")) import io import console import code import pyto from importlib.machinery import SourceFileLoader import importlib import threading from time import sleep from outputredirec...
tests.py
import re import threading import unittest from django.core.exceptions import ImproperlyConfigured from django.db import connection from django.db.models import Avg, StdDev, Sum, Variance from django.test import ( TestCase, TransactionTestCase, override_settings, skipUnlessDBFeature, ) from ..models import Item, ...
targethandler.py
#!/usr/bin/env python from leginon import leginondata import event import threading from pyami import ordereddict import sys target_types = ('acquisition', 'focus', 'preview', 'meter') class TargetHandler(object): ''' nodes should inherit this if they want to work with targets ''' ############# DATABASE INTERACTI...
__init__.py
import logging; _L = logging.getLogger('openaddr.ci') from .. import jobs, render, util, __version__ from .objects import ( add_job, write_job, read_job, complete_set, update_set_renders, set_run, RunState, get_completed_run, read_completed_set_runs ) from . import objects, work, queuedata from os.path ...
test.py
import urllib2 import threading from bs4 import BeautifulSoup import re import json import sys import os import django from stock_list import getlist, getLSEList from extract_stock_info import get_info, getLSEInfo from extract_stock_history import get_historical_info from extract_sector_history import get_sector_histo...
2_dance_micer.py
# This program was written under Python 2.7. Please test with Python 2.7 if Python 3 does not work well. # It will ask for 2 variables. If you just press enter, it will use default values 2 leaders, and 5 followers. __author__ = 'Xiaopei' from threading import Thread, Semaphore from time import sleep from collections...
backend_tk.py
# Two modes: # (1) interactive: Everything runs in one thread. Long-running event handlers block the update. # (2) separated: non-main thread for all non-mainloop code. """ We match the Tk hierarchy of classes onto the ACM hierarchy as follows: Each application (i.e. instance of TkBackend) has exactly one Tk root (...
watch_topy.py
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.firefox_binary import FirefoxBinary import time from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as...
minion.py
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import print_function import copy import errno import fnmatch import hashlib import logging import multiprocessing import os import re import salt import signal import sys import threading import time import traceback impo...
Hiwin_RT605_ArmCommand_Socket_20190627192902.py
#!/usr/bin/env python3 # license removed for brevity import rospy import os import socket ##多執行序 import threading import time import sys import matplotlib as plot import HiwinRA605_socket_TCPcmd as TCP import HiwinRA605_socket_Taskcmd as Taskcmd import numpy as np from std_msgs.msg import String from ROS_Socket.srv imp...
log_handler.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 us...
HiwinRA605_socket_ros_20190604112533.py
#!/usr/bin/env python3 # license removed for brevity #接收策略端命令 用Socket傳輸至控制端電腦 import socket ##多執行序 import threading import time ## import sys import os import numpy as np import rospy import matplotlib as plot from std_msgs.msg import String from ROS_Socket.srv import * from ROS_Socket.msg import * import HiwinRA605_s...
rs232_connection.py
import struct from threading import Thread from typing import List, Optional import time import serial from gbrpi.constants.uart import BAUD_RATE, DEFAULT_ALGO, DOUBLE_SIZE class UART: def __init__(self, dev_name: str, algo_list: List[str], ping_size: int, baud_rate: int = BAUD_RATE): self.conn: serial...
custom.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
sample01_simple_interact.py
import uuid import proxy import proxy from proxy import forward from proxy import utils from threading import Thread from queue import Queue import time # 有两个子线程,一个负责停的解析数据,并通过 Queue 将解析结果在线程之间传递 # 另一个子线程的目仅仅负责发送指令 # 主线程每隔一段时间检查连接状态 conn=forward.connect_to_fb_transfer(host="localhost",port=8000) sender=forward.Sender...
reload.py
from threading import Thread import sys import os import time import subprocess import logging import psutil logger = logging.getLogger('log01') def has_extension(fname_list, *extension): array = [] for fname in fname_list: result = list(map(fname.endswith, extension)) if True in result: ...
animation.py
from threading import Thread import time import pygame from pygame_widgets.exceptions.exceptions import InvalidParameter, InvalidParameterType class AnimationBase: def __init__(self, widget, timeout, allowMultiple=False, **kwargs): """Base for animations :param widget: The widget that the animat...
irc.py
import datetime import socket import ssl import threading import time import fnmatch from ...logging import get_logger from ...message import Message from ...signals import message_in, message_out, on_exception, config_changed from .. import BaseResponder from ..lib import parse_command class NoopWith(object): d...
plot_map.py
import pandas as pd import numpy as np import math import urllib import io from PIL import Image def deg2num(lat_deg, lon_deg, zoom): lat_rad = math.radians(lat_deg) n = 2.0 ** zoom xtile = int((lon_deg + 180.0) / 360.0 * n) ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / ...
select_ticket_info.py
# -*- coding=utf-8 -*- import datetime import random import os import socket import sys import threading import time import TickerConfig import wrapcache from agency.cdn_utils import CDNProxy from config import urlConf, configCommon from config.TicketEnmu import ticket from config.configCommon import seat_conf_2, seat_...
worker.py
import threading class Worker(object): def __init__(self, input_queue): self.input_queue = input_queue def start_working_in_background_thread(self): thread = threading.Thread(target=self._main) thread.daemon = True thread.start() def _main(self): while True: ...
analysis_fin.py
import couchdb import matplotlib.pyplot as plt from matplotlib.path import Path import matplotlib.patches as patches import json import matplotlib.path as mplPath import numpy as np import requests from textblob import TextBlob import Queue import time, socket, threading import re from pycorenlp import StanfordCoreNLP ...
winter.py
import socket import threading import logging import sys, traceback from time import sleep import os import inspect log = logging.getLogger(name="winter") #CONSTANTS (logical) #heder format for answer FT_HTML = 1 FT_JS = 2 FT_JPG = 3 FT_ICO = 4 FT_GIF = 5 #CONSTANTS (functional) BUFFER_DWNLOAD = 1024 # size of ht...
__init__.py
#!/usr/bin/env python3 # # Unit tests for the multiprocessing package # import unittest import queue as pyqueue import time import io import sys import os import gc import errno import signal import array import socket import random import logging import test.support import test.script_helper # Skip tests if _multi...
threads2.py
import threading import time def my_function(message): print(threading.currentThread().getName() + " starting") time.sleep(2) print(message) time.sleep(2) print(threading.currentThread().getName() + " ended") v = "hello" t = threading.Thread(target=my_function, args=(v,)) t.setDaemon(True) t.st...
test_ssl.py
import asyncio import asyncio.sslproto import contextlib import gc import logging import select import socket import tempfile import threading import time import weakref import unittest try: import ssl except ImportError: ssl = None from test import support from test.test_asyncio import utils as test_utils ...
test_s3.py
from cStringIO import StringIO import boto.exception import boto.s3.connection import boto.s3.acl import boto.s3.lifecycle import bunch import datetime import time import email.utils import isodate import nose import operator import socket import ssl import os import requests import base64 import hmac import sha import...
loader.py
from __future__ import print_function import sys import mxnet as mx import numpy as np import random import datetime import multiprocessing import cv2 from mxnet.executor_manager import _split_input_slice from rcnn.config import config from rcnn.io.image import tensor_vstack from rcnn.io.rpn import get_rpn_testbatch, ...
android_data_analyzer_id_pw.py
import os import logging from modules.andForensics.modules.utils.android_sqlite3 import SQLite3 from modules.andForensics.modules.analyzer.android_data_analyzer_utils import AnalyzerUtils from multiprocessing import Process, Queue, Lock import math logger = logging.getLogger('andForensics') #ANALYSIS_EXCEPTION_ID_PW_H...
GuiGoogle.py
from tkinter import * from tkinter import messagebox,ttk,filedialog from PIL import ImageTk, Image import threading import urllib from package import rwFiles from package import logicSearch class GoogleSearchInterface(): def __init__(self, master): self.master = master master.g...
train_sampling_multi_gpu.py
import dgl import numpy as np import torch as th import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.multiprocessing as mp from torch.utils.data import DataLoader import dgl.function as fn import dgl.nn.pytorch as dglnn import time import argparse from dgl.data import RedditDa...
ImpactMainWindow.py
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- #GUI for Impact code V 1.0 #by Zhicong Liu and Ji Qiang, 2018 import os, sys, threading, subprocess import math from shutil import copyfile if sys.version_info[0] < 3: print("Error: need python version 3.x!") exit(0) import tkinter as tk from tkint...
metrix_GenerateSkin.py
# Embedded file name: /usr/lib/enigma2/python/Plugins/Extensions/MyMetrix/metrix_GenerateSkin.py import threading from encode import multipart_encode from streaminghttp import register_openers from xml.dom.minidom import parse import cookielib from xml.dom.minidom import parseString import gettext from uuid import getn...
__main__.py
# main for Unit Tests from sys import path as sys_pth import os.path as pth import threading # GPIO.setwarnings(False) def demo(): local_directory = pth.dirname(pth.abspath(__file__)) import_list = [local_directory , pth.join(local_directory, "..","ElectronicComponents") ...
summarizer.py
# Copyright (C) The Arvados Authors. All rights reserved. # # SPDX-License-Identifier: AGPL-3.0 import arvados import collections import crunchstat_summary.dygraphs import crunchstat_summary.reader import datetime import functools import itertools import math import re import sys import threading import _strptime fro...
train.py
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
amqp_client_utils.py
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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...
herd.py
#!/usr/bin/env python import argparse import logging import os import random import re import socket import subprocess import sys import tempfile import threading import time import BitTornado.BT1.track as bttrack import BitTornado.BT1.makemetafile as makemetafile import murder_client as murder_client opts = {} log = ...
test_state.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import logging import os import shutil import sys import tempfile import textwrap import threading import time # Import Salt Testing libs from tests.support.runtests import RUNTIME_VARS from tests.support.case import Mod...
worker.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 app...
util.py
#!/usr/bin/env python # encoding: utf-8 """Common utilities.""" from contextlib import contextmanager from shutil import rmtree from six.moves.queue import Queue from tempfile import mkstemp from threading import Thread import logging as lg import os import os.path as osp _logger = lg.getLogger(__name__) class Hd...
vipfile_test.py
"""Unit test for vipfile. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import os import shutil import tempfile import threading import unittest import six # Disable W0611: Unused import import tread...
sqlite_web.py
#!/usr/bin/env python import datetime import hashlib import math import operator import optparse import os import re import sys import threading import time import webbrowser import json from collections import namedtuple, OrderedDict from functools import wraps from getpass import getpass from io import TextIOWrapper...
PI_test.py
import os import serial import time import libs.MAPS_mcu as mcu import libs.MAPS_pi as pi import libs.MAPS_temp_plugin as plugin import libs.display as oled from datetime import datetime import requests import threading import traceback #import current file's config, by getting the script name with '.py' replace by ...
review.py
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
webserve.py
import sys import os import base64 import threading import ssl import SocketServer import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler WEB_PORT=5000 class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): def log_request(self, *args, **kwargs): pass class We...
ahoge.py
''' Networking Goddess. TCP-based. A portable server+client object 'Stream' that can only connect with the same object, otherwise would cause complications. The system makes use of the 10000-byte character as a separator between each data to segregate the streams. Makes use of a pseudo-handshake system to fin...
tracker.py
import io import logging import re import sys import time import weakref from psutil import Process, cpu_percent from threading import Thread from typing import Union from weakref import WeakValueDictionary from aim.ext.resource.configs import AIM_RESOURCE_METRIC_PREFIX from aim.ext.resource.log import LogLine from a...
_old_metrichon.py
import os from os import path import gzip import argparse import logging from tqdm import tqdm import threading import multiprocessing as mp from glob import glob from minion_data.preparation import bioinf_utils from pprint import pprint import numpy as np import h5py from typing import * from minion_data import datase...
StreamRecognition.py
# Authors -- Toby Liang, Vishnu Srinivasan # Saturday Feb 23, 2019 import face_recognition import cv2 from PIL import Image import glob import time import threading #This is arrays for the locations of the faces, encodings and the names associated with the faces #This is for the the frames in the video stream to make...
example_test.py
import http.server import os import random import re import socket import ssl import struct import subprocess from threading import Thread import ttfw_idf from RangeHTTPServer import RangeRequestHandler from tiny_test_fw import DUT, Utility server_cert = '-----BEGIN CERTIFICATE-----\n' \ 'MIIDXTCCAkWgAw...
Function.py
import time import sys import glob import threading,json import ftplib import os from datetime import datetime from Serial import Serialport from Modem import ModemCommand from Serial import Serialport from GPS import GPSCommand from datetime import datetime from Log import Logger from Tkinter import * count =0 cla...
webcam.py
from pynq.overlays.base import BaseOverlay from pynq.lib.video import * from pynq import PL from PIL import Image as PIL_Image import sys, cv2, math, copy from time import time, sleep import numpy as np import datetime import imutils import threading # audio states PLAY_NOTHING = 0 PLAY_KEY_1 = 1 PLAY_KEY_2 = 2 P...
gplib.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...
TEST_Extração MagMax COVID_POOL_v4_STARLAB.py
from opentrons.types import Point import json import os import math import threading from time import sleep metadata = { 'protocolName': 'USO_v6_station_b_M300_Pool_magmax', 'author': 'Nick <ndiehl@opentrons.com', 'apiLevel': '2.3' } NUM_SAMPLES = 64 # start with 8 samples, slowly increase to 48, then 94 ...
intersection_scenario_generate.py
""" Copyright (c) College of Mechatronics and Control Engineering, Shenzhen University. All rights reserved. Description : generate two vehicle at a specefic intersection Author:Team Li """ import sys, os, glob, random, threading, time from situation_assessment import _assess_one_obj_threat_score from situation_asses...
hunter.py
# vim: sw=4:ts=4:et:cc=120 # # ACE Hunting System # # How this works: # A HunterCollector reads the config and loads all the sections that start with hunt_type_ # each of these configuration settings defines a "hunt type" (example: qradar, splunk, etc...) # each section looks like this: # [hunt_type_TYPE] # module = p...
server.py
"""RPC server implementation. Note ---- Server is TCP based with the following protocol: - Initial handshake to the peer - [RPC_MAGIC, keysize(int32), key-bytes] - The key is in format - {server|client}:device-type[:random-key] [-timeout=timeout] """ # pylint: disable=invalid-name from __future__ import absolute...
custom.py
# pylint: disable=too-many-lines # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------...
TheRageRpg.py
import pygame import random import time import threading import math stats = { "health": 1, "speed": 1, "attack": 1, "defense": 1, 'level': 1, 'xp': 0 } pygame.init() inventory = {} Dead = False Restart = True def dealtDamage(attack, defense): damageDealtSub = round(attack - math.sqrt(defense**1.5)) if damageDealtSu...
build.py
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
test_functools.py
import abc import builtins import collections import collections.abc import copy from itertools import permutations import pickle from random import choice import sys from test import support import threading import time import typing import unittest import unittest.mock import os import weakref import gc from weakref ...
custom.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
webserver.py
import linecache import socket import threading import sys from utils import logger from utils import Response from utils import ResponseHeaders class ThreadedServer(object): def __init__(self, host, port): self.host = host self.port = port self.sock = socket.socket(socket.AF_INET, socket....
get_reading_images.py
''' Just puts cards into clusters blindly mimicks what actual opperation may look like tests pick and place fucntionality and cluster configuration ''' from hiro_interface import * import sys from copy import copy from nlp_utils import NoteParser import string import threading hiro = HIRO(mute=False) temp_photo_path ...
scripts.py
# -*- coding: utf-8 -*- ''' This module contains the function calls to execute command line scripts ''' # Import python libs from __future__ import absolute_import, print_function, unicode_literals import os import sys import time import signal import logging import functools import threading import traceback import s...
wsock.py
import cameracommand from autobahn.asyncio.websocket import WebSocketClientProtocol, WebSocketClientFactory import threading import time import subprocess import datetime import config def startDump(): print("startDump") try: subprocess.call(["rtmpdump"]) except OSError as e: if e.errno ...
client.py
import re import shlex import threading import time from typing import get_type_hints, Dict, List, Optional import urllib3 from docopt import docopt from prompt_toolkit import PromptSession, HTML from prompt_toolkit.completion import Completer from prompt_toolkit.history import InMemoryHistory from prompt_toolkit.patc...
multiple clipboards.py
# pip install pywin32 import win32clipboard import time import threading counter = 0 clips = ["","","","",""] def process_input(): while True: choice = int(input()) win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardText(clips[choice], win32c...
can_logger.py
#!/usr/bin/env python3 import socket import postgres import csv import os import time import sys import collections import multiprocessing as mp from datetime import datetime from psycopg2 import OperationalError from psycopg2.extras import execute_values def write_to_csv(wr_buff, can_bus): # Write to CSV from ...
server.py
#!/usr/bin/env python3 # remote-gx-ir/server.py # # @author Leonardo Laureti <https://loltgt.ga> # @version 2020-08-12 # @license MIT License # import configparser import os import re import urllib.request, urllib.parse, urllib.error import json from io import BytesIO from http.server import SimpleHTTPRequestH...
telegramInterface.py
# PoHelper (PoHelper Telegram bot powered by Python) # Copyright (C) 2022 drlorente97.eth <drlorente97@gmail.com> # General Declarations import queue import threading import telepot import time # Import Modules import botProps class telegramInterface(): def __init__(self, log, shutdown): ''' Con...
__main__.py
import sys from PyQt5.QtWidgets import ( QMainWindow, QApplication, QAction, qApp, QFormLayout, QVBoxLayout, QHBoxLayout, QTabWidget, QWidget, QSizePolicy ) from PyQt5 import uic import matplotlib.pyplot as plt from .cellular_automaton import CellularAutomaton import numpy as np import threading class MainWi...
NetworkLHCOPNCollector.py
#!/usr/bin/env python import Queue import socket import time import threading import copy import json from datetime import datetime import stomp import siteMapping import tools topic = '/topic/netflow.lhcopn' siteMapping.reload() conns = [] class MyListener(object): def on_message(self, headers, message): ...
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 ...
publisher.py
''' * publisher * * Copyright (c) 2020-2021, Magik-Eye Inc. * author: Jigar Patel, jigar@magik-eye.com ''' import rclpy from rclpy.node import Node from sensor_msgs.msg import PointCloud2, PointField from std_msgs.msg import String import threading import time import pymkeapi import numpy as np from pymkeros2.device_i...
transport_service.py
# Copyright 2019 Wirepas Ltd licensed under Apache License, Version 2.0 # # See file LICENSE for full license details. # import logging import os import wirepas_mesh_messaging as wmm from time import time, sleep from uuid import getnode from threading import Thread from wirepas_gateway.dbus.dbus_client import BusClien...
bruter.py
# Date: 9/8/2019 # Author: Diss.Security # Description: Bruter from time import time, sleep from lib.browser import Browser from lib.display import Display from threading import Thread, RLock from lib.proxy_manager import ProxyManager from lib.password_manager import PasswordManager from lib.const import max...
Miner.py
import services.MinerService as mnr import services.LogInService as lgn import services.UserService as usr import socket import threading def startClient(packet): freeMiners = usr.checkOnlineMiners() miners = [] for i in freeMiners: miners.append([i[1],i[2]]) skt = socket.socket() for j in...
__init__.py
import sys # The unittest module got a significant overhaul # in 2.7, so if we're in 2.6 we can use the backported # version unittest2. import threading if sys.version_info[:2] == (2, 6): import unittest2 as unittest else: import unittest # the version under py3 use the different package if sys.version_info...
diff_press_logger_a.py
import diff_p_DLHR_F50D as DLHR_F50D from polling_timer import PollingTimer from move_ave import MovingAverage from collections import deque from wave_save import WavSave from buzz_pipi_r import PiPi from print_with_DP_EH600 import PrintWithDpEh600 import datetime import multiprocessing as mp SAMPLE_FREQ = 32 # Hz SAM...