source
stringlengths
3
86
python
stringlengths
75
1.04M
__init__.py
import struct, socket, threading, json, os, pickle from essentials import tokening import essentials import copy import time from hashlib import sha1 import base64 import array print("THIS MODULE IS DEPRECATED. PLEASE USE SOCKET_OPS_V2") PYTHONIC = "python based" WEB_BASED = "web based" def SocketDownload(sock, data...
PyQt-Client.py
import array import threading import numpy as np import time import pyqtgraph as pg import socket from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QLabel from PyQt5.QtCore import Qt i = 0 bpm = 0 temp_d = 0 def tcpLink(sock, addr): print('Accept new connection from %s:%s...' % addr) ...
main.py
from quixstreaming import QuixStreamingClient from quixstreaming.app import App from in_memory_view import InMemoryView import os from dash import dcc, Input, Output, Dash, html import dash_table as dt import dash_bootstrap_components as dbc import threading client = QuixStreamingClient() input_topic = client.open_inp...
test_bz2.py
from test import support from test.support import bigmemtest, _4G import array import unittest from io import BytesIO, DEFAULT_BUFFER_SIZE import os import pickle import glob import tempfile import pathlib import random import shutil import subprocess import threading from test.support import unlink im...
test_lib_test.py
#!/usr/bin/env python import threading import time import unittest from grr.lib import rdfvalue from grr.test_lib import test_lib class FakeTimelineTest(unittest.TestCase): def testRunSingleSleep(self): log = [] def foo(): while True: log.append("foo") time.sleep(10) with test_...
2as.py
# -*- coding: utf-8 -*- import LINETCR from LINETCR.lib.curve.ttypes import * from datetime import datetime import time,random,sys,json,codecs,threading,glob,re,os,subprocess cl = LINETCR.LINE() cl.login(qr=True) cl.loginResult() ki = LINETCR.LINE() ki.login(qr=True) ki.loginResult() ki2 = LINETCR.LINE() ki2.login(...
dds.py
# -*-coding:utf-8-*- # Copyright (c) 2020 DJI. # # 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 in the file LICENSE.txt or at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
_fixtures.py
import collections import itertools import json import random from threading import Lock from threading import Thread import time from unittest import TestCase import uuid import pytest from dogpile.cache import CacheRegion from dogpile.cache import register_backend from dogpile.cache.api import CacheBackend from dog...
test_subprocess.py
import unittest from test import script_helper from test import support import subprocess import sys import signal import io import locale import os import errno import tempfile import time import re import selectors import sysconfig import warnings import select import shutil import gc import textwrap try: import...
recognition_picture.py
#-*-coding: utf-8-*- import sys import os from random import randint from collections import OrderedDict import time import multiprocessing import threading import zmq import params #from zmq.utils.monitor import recv_monitor_message #print(os.getcwd()) sys.path.append(os.getcwd()) import torch #fr...
resource.py
# -*- coding: utf-8 -*- import logging from logging import handlers import pickle from threading import Thread from bson.json_util import dumps from flask_classful import FlaskView, route from katana.shared_utils.mongoUtils import mongoUtils # Logging Parameters logger = logging.getLogger(__name__) file_handler = ha...
spawn_a_process.py
import multiprocessing, time def foo(i): print("called function in process: %s" % i) time.sleep(2) return if __name__ == "__main__": Process_jobs = [] for i in range(5): p = multiprocessing.Process(target=foo, args=(i,)) Process_jobs.append(p) p.start() print(p.pi...
threadlocal_pass.py
''' Passing parameters to connect two functions 1. create two threads 2. define a function(A) that calls two functions(1st:add ' allow';2nd:add ' pass') 3. point the threads to the functionA 4. start the threads ''' import threading def stamp(name): res=name res=check_family(res) ...
menu.py
import os import threading from oled.device import ssd1306 from oled.render import canvas from PIL import ImageFont, ImageDraw class Menu: def __init__(self, options=[]): self.options = options self.highlightOption = None self.rowCount = 6 self.oled = ssd1306(port=3, address=0x3C...
test_models.py
import fcntl from multiprocessing import Process from pathlib import Path import shutil import mock from django.core import mail from django.utils.encoding import force_bytes, force_text from django_celery_beat.models import PeriodicTask from mayan.apps.common.serialization import yaml_dump from mayan.apps.document...
enviroplus_exporter.py
#!/usr/bin/env python3 import os import random import requests import time import logging import argparse import subprocess from threading import Thread from prometheus_client import start_http_server, Gauge, Histogram from bme280 import BME280 from enviroplus import gas from pms5003 import PMS5003 from pms5003 impor...
__init__.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Implements context management so that nested/scoped contexts and threaded contexts work properly and as expected. """ import threading, collections, string, logging from ..timeout import Timeout class _defaultdict(dict): """ Dictionary which loads missing keys...
__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Han Xiao <artex.xh@gmail.com> <https://hanxiao.github.io> import sys import threading import time import uuid import warnings from collections import namedtuple from functools import wraps import numpy as np import zmq from zmq.utils import jsonapi __all__ = ['__versio...
sync.py
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
__init__.py
from fastapi import APIRouter, Response from starlette.status import * import os, json from pymongo import MongoClient from logging import debug, info, warning, error, critical, exception import time import requests import threading from component_util import post_update conf = json.loads(os.environ['CONFIG']) mongo_c...
data_io.py
########################################################## # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import numpy as np import sys from utils import compute_cw...
dataprocessor.py
import os import nltk import csv import pickle import urllib2 import numpy as np import ka from multiprocessing import Process, Lock dirs = ["data/aclImdb/test/pos", "data/aclImdb/test/neg", "data/aclImdb/train/pos", "data/aclImdb/train/neg"] url = "http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz" def...
api.py
"""GitLab Webhook receiver. The goal: receive web hook request from GtLab, run project tests, respond with comment of status (make a comment to discussion) and closing merge requests if tests failed. """ import os import os.path import re import subprocess import json import logging import logging.config import falcon...
object_detector.py
import cv2 import numpy as np import threading from .communication_utils import * from .database_wrapper import delete_progress as dbw_delete_progress from .database_wrapper import * from .serialization import * # This file represents the backend Object Detector. def detect_objects(data: dict) -> (int, dict): "...
genetic_algorithm.py
from __future__ import print_function import time import random from operator import attrgetter from gaps import image_helpers from gaps.selection import roulette_selection # from gaps.plot import Plot from gaps.progress_bar import print_progress from gaps.crowd.crossover import Crossover from gaps.crowd.indiv...
manager.py
import multiprocessing as mp import queue def myProcess(ns): # Update values within our namespace print(ns.x) ns.x = 2 def main(): manager = mp.Manager() ns = manager.Namespace() ns.x = 1 print(ns) process = mp.Process(target=myProcess, args=(ns,)) process.start() process.j...
base_test.py
# Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018-present Open Networking 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/LICEN...
doorbell_pi_start.py
#Made by Hurleyking #https://github.com/Hurleyking/AI_Smart_PI_Doorbell import requests import uuid #import cv2 from gtts import gTTS import os import subprocess from subprocess import call import json import time from gpiozero import Button from time import sleep from datetime import datetime import paho.mqtt.client ...
main.py
#!/usr/bin/env python3 # Copyright 2016-2019 Christoph Reiter # # 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, mo...
sorter.py
#!/usr/bin/env python3 """ """ import sys import os import argparse import shutil import multiprocessing as mp def main(): """ """ argc = len(sys.argv) if argc < 2: return 1 filepath = sys.argv[1] file_lines = sum(1 for line in open(filepath, 'r')) procs = [] total_procs = os.cpu_count() file = open(f...
PicDownloader.py
#!usr/bin/python # -*- coding: UTF-8 -*- #python3.x # ------ 模块 ------ from random import Random #随机数 import re #正则表达式 import urllib.request #http模块 import http.cookiejar #http-cookie模块 import socket #网络编程模块 import os #操作系统模块 import datetime, time #日期时间模块 try: import chardet # html内容分析模块 except ImportError as e: ...
patch.py
import sys import logging import threading import time import socket import os from importlib import import_module, reload from gradient_utils import metrics logger = logging.getLogger(__name__) if os.getenv("PAPERSPACE_DEBUG"): reload(logging) logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s'...
gdaltest_python3.py
# -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Python Library supporting GDAL/OGR Test Suite # Author: Even Rouault, <even dot rouault at mines dash paris dot org> # ##########################################...
joystick.py
import pyglet.input import controller import threading import player import math import time class Joystick_controller(controller.Controller): def __init__(self, game): super().__init__(game) self.init_joysticks(pyglet.input.get_joysticks()) self.camera_sensitivity = 0.007 self.joystick_deadzone = 0.25 se...
serial_io.py
#!/usr/bin/env python3 import serial import threading from threading import Thread import sys from glob import glob class SerialIO(): # methods we should call to move the robot around # should probably go in a wrapper class but that # would be too enterprise for us def forward(self, speed = 48): ...
server.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...
tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import errno import os import shutil import sys import tempfile import time import zlib from datetime import datetime, timedelta from io import BytesIO try: import threading except ImportError: import dummy_threading as threading...
agent.py
import multiprocessing # disable bundler from utils.replay_memory import Memory from utils.torch import * # enable bundler import math import time def collect_samples(pid, queue, env, policy, custom_reward, mean_action, render, running_state, min_batch_size): torch.randn(pid) log = dict() ...
window.py
import tkinter as tk from tkinter import scrolledtext from tkinter import font from tkinter import ttk import sys import threading import queue import signal WINDOW_INTERVAL = 40 # Time in ms between screen refresh of text def addToQueue(q): while True: try: line = sys.stdin.readline() ...
msq_config_sender.py
import paho.mqtt.client as mqtt import threading import json from enum import Enum class UpdateType(Enum): EMOTIONS_ONLY = 0 RAW_ONLY = 1 ALL = 2 class EnumEncoder(json.JSONEncoder): def default(self, obj): if type(obj) is UpdateType: return str(obj.value) return json.JSO...
kb_eukrepServer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
imaplib2.py
#!/usr/bin/env python """Threaded IMAP4 client. Based on RFC 3501 and original imaplib module. Public classes: IMAP4 IMAP4_SSL IMAP4_stream Public functions: Internaldate2Time ParseFlags Time2Internaldate """ __all__ = ("IMAP4", "IMAP4_SSL"...
ws.py
# pyright: reportGeneralTypeIssues=false import threading from typing import Optional import websocket # type: ignore from jacdac.transport import Transport class WebSocketTransport(Transport): def __init__(self, url: str): self.url = url self.ws: Optional[websocket.WebSocketApp] = None se...
advanced-reboot.py
# #ptf --test-dir ptftests fast-reboot --qlen=1000 --platform remote -t 'verbose=True;dut_username="admin";dut_hostname="10.0.0.243";reboot_limit_in_seconds=30;portchannel_ports_file="/tmp/portchannel_interfaces.json";vlan_ports_file="/tmp/vlan_interfaces.json";ports_file="/tmp/ports.json";dut_mac="4c:76:25:f5:48:80";d...
Enumerate.py
# READ THE DOCUMENTATION FOR ENUMLIB #from io import StringIO, BytesIO, FileIO import argparse import io from numpy import array import os from random import uniform import subprocess as sp import yaml from multiprocessing import cpu_count, Process, Manager, Queue from ase import Atoms from ase.db import connect from...
weixin.py
#!/usr/bin/env python # coding: utf-8 import qrcode import urllib import urllib2 import cookielib import requests import xml.dom.minidom import json import time import re import sys import os import random import multiprocessing import platform import logging import httplib from collections import defaultdict from urlp...
test_generator_api.py
import threading import unittest import pytest import numpy import cupy from cupy import random from cupy import testing from cupy.testing import _condition from cupy_tests.random_tests import common_distributions @pytest.mark.skipif(cupy.cuda.runtime.is_hip, reason='HIP does not support this')...
run.py
#!/usr/bin/env python """MRIQC run script.""" from .. import config def main(): """Entry point.""" import os import sys import gc from multiprocessing import Process, Manager from .parser import parse_args from ..utils.bids import write_derivative_description, write_bidsignore # Run p...
utils.py
from __future__ import print_function import sys import time import threading import platform import subprocess import os import numpy as np import matplotlib.pyplot as plt from fibre.utils import Event import odrive.enums from odrive.enums import * try: if platform.system() == 'Windows': import win32cons...
pydnsproxy.py
#!/usr/bin/env python3 import json import logging import random import re import socket import ssl import struct import urllib.request from argparse import ArgumentParser from copy import deepcopy from datetime import datetime, timedelta from enum import Enum from logging import error, info from socketserver import Bas...
pyglview.py
#!/usr/bin/env python3 import logging import os import signal import sys import threading import time import numpy as np from easydict import EasyDict as edict mouse_x = 0 mouse_y = 0 height = 720 get_input = False sample_size = (5 , 5) try: from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GL...
face5.py
import cv2 import requests,json import threading,time import numpy as np from insightface.app import FaceAnalysis video = cv2.VideoCapture(0,cv2.CAP_DSHOW) video.set(cv2.CAP_PROP_FPS,30) video.set(cv2.CAP_PROP_FRAME_WIDTH,1280) video.set(cv2.CAP_PROP_FRAME_HEIGHT,720) app=FaceAnalysis() app.prepare(ctx_id=0,det_size=...
pipeline.py
from multiprocessing import Process,Queue import multiprocessing as multiprocessing import importlib import hashlib import random import time import os import yaml from signal import signal, SIGCHLD import sys def read_pipelines(fname): absdir=os.path.dirname(os.path.abspath(fname)) with open(fname) as f: ...
test_ki.py
import outcome import pytest import sys import os import signal import threading import contextlib import time from async_generator import ( async_generator, yield_, isasyncgenfunction, asynccontextmanager ) from ... import _core from ...testing import wait_all_tasks_blocked from ..._util import signal_raise, is_...
run_local_test.py
"""run local test in starting kit""" # pylint: disable=logging-fstring-interpolation import argparse import logging import os from os.path import join, isdir import shutil from multiprocessing import Process VERBOSITY_LEVEL = 'WARNING' logging.basicConfig( level=getattr(logging, VERBOSITY_LEVEL), format='%(a...
node.py
#!./env python import xmlrpc.client import random from functools import reduce from multiprocessing import Manager, Process from timer_utils import * class AppendEntriesRequest: @classmethod def from_json(cls, json): return cls(**json) def __init__(self, term, serverid, prevLogIndex=0, prevLogT...
ms.py
""" The SocketServer module does not provide support for multicast. This module provides a subclass of SocketServer.UDPServer that can listen on multicast addresses. This only supports IPv4 """ import SocketServer import sys,socket, struct, platform, threading, signal discoveryServer = None discoveryThread = None c...
riotrunner.py
""" RIOT Runner class """ __author__ = "Bruno Chianca Ferreira" __license__ = "MIT" __version__ = "0.1" __maintainer__ = "Bruno Chianca Ferreira" __email__ = "brunobcf@gmail.com" import traceback, os, logging, time, subprocess, threading from classes.runner.runner import Runner from core.nodes.base import CoreNode ...
supl-hack.py
#!/usr/bin/python3 from binascii import a2b_hex import logging from random import randint import socket import ssl import struct import threading SUPL_HOST = "supl.google.com" SUPL_PORT = 7275 MY_IMSI = "262011234567890" logging.basicConfig(level=logging.INFO) log = logging.getLogger class closed(socket.error): ...
test_wsgi_compliance.py
#!/usr/bin/env python import os import time from multiprocessing import Process from wsgiref.validate import validator try: from http import client as httplib except ImportError: # Py 2 import httplib import bjoern @validator def _app(environ, start_response): start_response("200 OK", [("Content-Type"...
testinggamepad.py
from inputs import get_gamepad import time import threading import serial from numpy import interp #def rangeMap(num): # return int(interp(num,[-32768,32768],[0,255])) global ser #ser = serial.Serial('/dev/ttyACM0', 9600) ser = serial.Serial('COM9', 9600) def readGP(): while 1: global BT...
training.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...
gfile_cache_test.py
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
cf_contests.py
import os from threading import Thread from prettytable import PrettyTable from .cf_utils import read_data_from_file, write_data_to_file, Obj, obj_to_dict from .codeforces import CodeforcesAPI codeforces = CodeforcesAPI() cache_loc = os.path.join(os.environ['HOME'], '.cache', 'cf_submit') contests_loc = os.path.join...
PyxelChip8.py
# PyxelChip8 v0.1: A CHIP8 emulator in Pyxel/Python # Copyright (c) 2022 Kumogata Computing Laboratory. # All Rights Reserved. import pyxel import threading from System import * class PyxelChip8: # Constants width = 64 height = 32 pixel = 4 # 0: white 1: yellow 2: blue 3: green ...
reachability_parralel_bfs.py
import sys from queue import Queue import threading class MazeGraph: result = 0 s = set() lock = threading.Lock() def __init__(self, n, adj): self.adj = adj self.visited = [False] * n self.enqueued = [False] * n self.q = Queue(n) def visit(self, v): se...
panel.py
print("Loaded pi_control panel module") import os import threading import time import yaml import pi_control.__init__ import pi_control.device """ 2022-01-01 Added option to read from a config file. 2022-01-02 Added monitoring for devices without events. 2022-01-08 Separated expanders, outputs, and inputs in the con...
serial_handler.py
""" SerialHandler class for PyGPSClient application This handles all the serial i/o , threaded read process and direction to the appropriate protocol handler Created on 16 Sep 2020 :author: semuadmin :copyright: SEMU Consulting © 2020 :license: BSD 3-Clause """ import logging from io import BufferedRe...
test_signal.py
import enum import errno import inspect import os import random import signal import socket import statistics import subprocess import sys import threading import time import unittest from test import support from test.support import os_helper from test.support.script_helper import assert_python_ok, spawn_python from t...
web.py
import socket import threading import queue import time import re import json import sys import kafka from loguru import logger from rich.console import Console from kafka import KafkaProducer console = Console() config = { "handlers": [ {"sink": sys.stdout, "level": "INFO"} # , format="{time:YYYY-MM-D...
myserver.py
import socket from queue import Queue import threading import random import os import pygame import sys import select import time os.chdir("/Users/yuanzhendong/desktop/tp3") sys.path.append("/Users/yuanzhendong/desktop/tp3") from client.myclient import * class Struct(object): pass data1 = Struct() #########...
server backup.py
import tkinter as tk from tkinter import * from PIL import Image, ImageTk import ttk import tkMessageBox import socket import time import threading import activeWindows def server(port, host_username, password, room_name): def test(): return def server_thread(): server = soc...
test_redis_backend.py
from dogpile.cache.api import CachedValue, NO_VALUE from dogpile.cache.region import _backend_loader from dogpile.cache.region import value_version from ._fixtures import _GenericBackendTest, _GenericMutexTest, _GenericBackendFixture from . import eq_, assert_raises_message from threading import Thread, Lock from unit...
emulation_server.py
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
optimize_crystal_energy_stability.py
""" Optimize the volume for the conducting ions """ import argparse import logging import math import os import time import pandas as pd # Apparently there's an issue with the latest version of pandas. # Got this fix from here: # https://github.com/pandas-profiling/pandas-profiling/issues/662#issuecomment-803673639 ...
pipe_process.py
''' Date: 2021.06.01 15:07 Description : Omit LastEditors: Rustle Karl LastEditTime: 2021.06.01 15:07 ''' import multiprocessing def create_items(pipe): output_pipe, _ = pipe for item in range(10): output_pipe.send(item) output_pipe.close() def multiply_items(pipe_1, pipe_2): ...
python_lsp.py
# Copyright 2017-2020 Palantir Technologies, Inc. # Copyright 2021- Python Language Server Contributors. from functools import partial import logging import os import socketserver import threading from pylsp_jsonrpc.dispatchers import MethodDispatcher from pylsp_jsonrpc.endpoint import Endpoint from pylsp_jsonrpc.str...
process_base.py
import abc import logging import os import signal import subprocess import threading from react.observable import ReplayObservable from utils import os_utils LOGGER = logging.getLogger('script_server.process_base') class ProcessWrapper(metaclass=abc.ABCMeta): def __init__(self, command, working_directory, env_va...
language.py
# coding: utf8 from __future__ import absolute_import, unicode_literals import random import itertools from spacy.util import minibatch import weakref import functools from collections import OrderedDict from contextlib import contextmanager from copy import copy, deepcopy from thinc.neural import Model import srsly i...
kernel.py
from dizest import util from dizest.core.obj import Workflow import json import os import multiprocessing as mp import psutil import signal import traceback # kernel manager def _manager(q): q.send(str(os.getpid())) msg = json.loads(q.recv()) mode = msg['mode'] data = msg['data'] workflow = Wor...
testing.py
""" Contains testing infrastructure for QCFractal. """ import os import pkgutil import shutil import signal import socket import subprocess import sys import threading import time from collections import Mapping from contextlib import contextmanager import numpy as np import pandas as pd import pytest import qcengine...
dl_lane_following_ncs.py
#!/usr/bin/env python # Copyright (c) 2018 LG Electronics, 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 appli...
crossover_parr.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jul 31 16:39:03 2021 @author: akshat """ import numpy as np import rdkit from rdkit import Chem from rdkit.Chem import AllChem from rdkit.DataStructs.cDataStructs import TanimotoSimilarity from selfies import encoder, decoder import multiprocessing fr...
config_pfsense.py
#!/usr/bin/env python3 # scripts/config_pfsense.py # # Import/Export script for vIOS. # # @author Alain Degreffe <eczema@ecze.com> # @copyright 2016 Alain Degreffe # @license http://www.gnu.org/licenses/gpl.html # @link http://www.unetlab.com/ # @version 20160422 import getopt, multiprocessing, os, pexpect, re, sys, ...
cloudmgr.py
#!/usr/bin/python3 from io import StringIO import os,sys,subprocess,time,re,datetime,threading,random,shutil from utils.model import db, Image from master.deploy import * import json from utils.log import logger from utils import env import requests fspath = env.getenv('FS_PREFIX') class AliyunMgr(): def __init...
socks.py
#!/usr/bin/python """Minimal non-feature complete socks proxy""" import random import socket from SocketServer import StreamRequestHandler, ThreadingTCPServer from struct import pack, unpack import threading import sys def debug(s): print >>sys.stderr, 'socks.py: ', s def error(s): print >>sys.stderr, 'socks.py, ...
viewing.py
#A* ------------------------------------------------------------------- #B* This file contains source code for the PyMOL computer program #C* Copyright (c) Schrodinger, LLC. #D* ------------------------------------------------------------------- #E* It is unlawful to modify or remove this copyright notice. #F* --------...
athenad.py
#!/usr/bin/env python3 import base64 import hashlib import io import json import os import sys import queue import random import select import socket import threading import time from collections import namedtuple from functools import partial from typing import Any import requests from jsonrpc import JSONRPCResponseM...
FactAnalyzer.py
""" Home-Monitor: AI system for the detection of anomalous and possibly harmful events for people. Written by Gabriel Rojas - 2019 Copyright (c) 2019 G0 S.A.S. See LICENSE file for details Class information: Generic class that represents all the analyzers that can be loaded. """ if __name__ == "...
remotefiles.py
#!/usr/bin/env python # encoding: utf-8 from os import remove import os.path from multiprocessing import Process, Lock from Naked.toolshed.system import stderr, stdout, file_exists from doxx.commands.pull import pull_binary_file, pull_text_file from doxx.commands.unpack import unpack_run from doxx.utilities.filesyste...
server.py
from collections import OrderedDict from io import BytesIO import json import ssl from threading import Thread try: from http.server import BaseHTTPRequestHandler, HTTPServer except ImportError: # Python 2 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from . import * from .. import appstore from .....
test_thread.py
""" Copyright (c) 2008-2018, Jesus Cea Avion <jcea@jcea.es> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of...
socket.py
# Author: Max Greenwald, Pulkit Jain # 11/30/2018 # # Module to create a simple interface for persistent socket connections # package imports import asyncio import websockets import threading from .extra import Queue async def start(skt): await skt.run() class Socket(object): """Our interface to manage a p...
parameter_server.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch.multiproces...
launcher.py
import os import sys import shlex import subprocess import threading import time import json import signal import atexit import logging from runtimemngr.settings import Settings class FileType(): WA = 'WASM' PY = 'PY' EXE = 'EXE' class ModuleLaucher(): def __init__(self): self.lock = thread...
rotation.py
# -*- coding: utf-8 -*- import threading import traceback from deval.device.std.error import DevalError from deval.utils.snippet import reg_cleanup, is_exiting, on_method_ready from deval.utils.logger import get_logger from deval.component.android.utils.constant import ROTATIONWATCHER_APK, ROTATIONWATCHER_PACKAGE LOGG...
Custom_Button.py
## ¬! v 1.00 SyberProjects ## ¬! 26/09/2019 @ 20:08 GMT import tkinter as tk from tkinter import ttk from PIL import Image, ImageDraw, ImageFont, ImageTk, features import textwrap from time import sleep from queue import Queue from threading import Thread class Round_Button(tk.Label): def __init__(s...
dhcp.py
#!/usr/bin/python3 import time import threading import queue import collections import traceback import socket from random import randrange import uuid from .listener import * from piman import logger import csv """ This class contains specified attributes which will be populated, these attributes are associated with...
fuzzer.py
# Copyright (c) 2020 - present Vitor Oriel <https://github.com/VitorOriel> # # 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 ...
updating_server.py
#!/usr/bin/env python """ Pymodbus Server With Updating Thread -------------------------------------------------------------------------- This is an example of having a background thread updating the context while the server is operating. This can also be done with a python thread:: from threading import Thread th...