source
stringlengths
3
86
python
stringlengths
75
1.04M
main.py
import os from tkinter import * from tkinter import ttk import PIL from PIL import ImageTk, Image from tkinter import filedialog import time import pandas as pd from selenium import webdriver from selenium.webdriver.common.keys import Keys import threading from tkinter import messagebox # CLASSE PARA ENVIO DE MENSAGEN...
example_subscribe.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: example_subscribe.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api # Documentation: https://lucit-systems-and-development.github.io/unicorn-binance-websocket-api # PyP...
__main__.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from pathlib import Path import sys import warnings import time from dataclasses import astuple import argparse...
JoystickHandler.py
#!/usr/bin/python3 import LogHandler import os import time import threading import sys mylogger = LogHandler.LogHandler("joystick_handler") myfolder = os.path.dirname(os.path.abspath(__file__)) # IMPORT IMPORTING GPIO LIB try: import RPi.GPIO as GPIO except RuntimeError: mylogger.logger.error("Error importing ...
tornado_decorator.py
# Copyright (c) 2016-2018 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import logging import threading from inspect import isclass, isro...
scene.py
import numpy as np from ..points import transform_points from ..grouping import group_rows from ..util import is_sequence, is_instance_named from ..transformations import rotation_matrix from .transforms import TransformForest from collections import deque class Scene: ''' A ...
PlayerGUI.py
from tkinter import * from tkinter import ttk import random ###############NETWORK################ import socket import threading def SendMessage(data): #data = input('Send: ') server_ip = '192.168.1.150' port = 8000 server = socket.socket() server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,1) ...
iclickerpoll.py
#!/usr/bin/env python from __future__ import print_function import logging import sys import threading import time from array import array from collections import Counter, defaultdict import usb.core import usb.util from usb import USBError log = logging.getLogger(__name__) class Command(object): def __init__(...
test__threading_vs_settrace.py
from __future__ import print_function import sys import subprocess import unittest from gevent.thread import allocate_lock import gevent.testing as greentest script = """ from gevent import monkey monkey.patch_all() import sys, os, threading, time # A deadlock-killer, to prevent the # testsuite to hang forever def k...
test.py
import threading import sys is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as queue def isScalar(x): return not isinstance(x, (list, tuple)) def isList(x): return isinstance(x, (list)) def asString(x): return str(x) def makeDict(): return {'a': 1.0, 'c': 3.0, 'b': ...
notificationicon.py
# Pure ctypes windows taskbar notification icon # via https://gist.github.com/jasonbot/5759510 # Modified for ZeroNet import ctypes import ctypes.wintypes import os import uuid import time import gevent __all__ = ['NotificationIcon'] # Create popup menu CreatePopupMenu = ctypes.windll.user32.CreatePopupMenu CreateP...
wifijam.py
#!/usr/bin/env python # -*- UTF-8 -*- import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * conf.verb = 0 import os import sys import time from threading import Thread, Lock from subprocess import Popen, PIPE from signal import SIGINT, signal import argparse import socket ...
param_generator.py
#!/usr/bin/env python __author__ = 'Florian Hase' #======================================================================== import copy import numpy as np from threading import Thread from DatabaseManager.database import Database from Utilities.misc import Printer #===============================================...
db.py
""" Database API from web.py """ __all__ = [ "UnknownParamstyle", "UnknownDB", "TransactionError", "sqllist", "sqlors", "reparam", "sqlquote", "SQLQuery", "SQLParam", "sqlparam", "SQLLiteral", "sqlliteral", "database", 'DB', ] import time import os import urllib import itertools i...
recorder.py
import matplotlib matplotlib.use('TkAgg') # <-- THIS MAKES IT FAST! import numpy import scipy import struct import pyaudio import threading import pylab import struct class SwhRecorder: """Simple, cross-platform class to record from the microphone.""" def __init__(self): """minimal...
dut_cocotb.py
import cocotb import test_sw from cocotb.clock import Clock from cocotb.triggers import RisingEdge, FallingEdge from queue import Queue, Empty import tester import threading class CocoTBBFM(): def __init__(self, dut): self.dut = dut self.queue = Queue(maxsize=1) print(f"made queue {self.q...
test_insert.py
import copy import logging import threading import pytest from pymilvus import DataType, ParamError, BaseException from utils import utils as ut from common.constants import default_entity, default_entities, default_binary_entity, default_binary_entities, \ default_fields from common.common_type import CaseLabel ...
test_app.py
from path import Path import os, sys, asyncio if sys.platform == 'win32': asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) from multiprocessing import Process import pytest import pytestqt import cadquery as cq from PyQt5.QtCore import Qt, QSettings from PyQt5.QtWidgets import QFileDialog...
scheduler_job.py
# pylint: disable=no-name-in-module # # 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, Versio...
main.py
import os import threading import time import pygame import tkinter.messagebox from tkinter import * from tkinter import filedialog from tkinter import ttk from pygame import mixer import mutagen from mutagen.mp3 import MP3 from mutagen.flac import FLAC from mutagen.id3 import ID3 # creating new window root = T...
background_process.py
# -*- mode: python; python-indent: 4 -*- """A micro-framework for running background processes in Cisco NSO Python VM. Running any kind of background workers in Cisco NSO can be rather tricky. This will help you out! Just define a function that does what you want and create a Process instance to run it! We react to: ...
Client.py
from tkinter import * import tkinter import socket from threading import Thread from time import sleep def enter(self): global message_sent message = my_message.get() my_message.set("") s.send(bytes(message, "utf8")) message_sent = True if message == "#quit": s.close() window.q...
threadpool.py
import threading import queue from concurrent.futures import thread import atexit __author__ = 'zz' # shutdown program immediately atexit.unregister(thread._python_exit) thread_pool = thread.ThreadPoolExecutor(4) # class ThreadPoll: # def __init__(self, max_workers=4): # self.max_workers = max_workers # ...
client_server_test.py
import threading import os import functools import sys import tempfile import pytest import numpy as np import gym import gym.spaces from .client import Client from .server import Server class ImageEnv: """ Image based environment """ def __init__(self): self.observatio...
test_failure.py
import json import logging import os import signal import sys import tempfile import threading import time import numpy as np import pytest import redis import ray import ray.utils import ray.ray_constants as ray_constants from ray.exceptions import RayTaskError from ray.cluster_utils import Cluster from ray.test_uti...
jenkins_agent.py
# Copyright 2017 Arie Bregman # # 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 agree...
web.py
# Electrum - lightweight Bitcoin client # Copyright (C) 2011 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights t...
test_streams.py
"""Tests for streams.py.""" import gc import os import queue import pickle import socket import sys import threading import unittest from unittest import mock from test import support try: import ssl except ImportError: ssl = None import asyncio from test.test_asyncio import utils as test_utils def tearDown...
interfaz.py
# -*- coding: utf-8 -*- import curses from time import sleep import proyecto as pyt import config as c from threading import Semaphore, Thread def menu(): #Se inicia pantalla, se obtienen dimensiones de la consola scr = curses.initscr() curses.noecho() dims = scr.getmaxyx() hilosCorriendo = False q = -1 whi...
cryptoAnalyzer.py
#************************************************************** # Created by: Adam Musciano # Description: Monitors balances of different cryptocurrencies # # #************************************************************* # mysql find balance and time for crypto > select amount_usd, insertedTime from balances where c...
coap.py
import logging import random import socket import struct import threading from coapthon import defines from coapthon.layers.blocklayer import BlockLayer from coapthon.layers.cachelayer import CacheLayer from coapthon.layers.forwardLayer import ForwardLayer from coapthon.layers.messagelayer import MessageLayer from coa...
test_executors.py
# pylint: disable=missing-docstring import os import subprocess import threading import unittest from contextlib import suppress from pathlib import Path from time import sleep from unittest import mock from asgiref.sync import async_to_sync from django.conf import settings from django.test import override_settings ...
main.py
from __future__ import print_function import argparse import os import torch import torch.multiprocessing as mp import gym import my_optim from model import ActorCritic from test import test from train import train # Based on # https://github.com/pytorch/examples/tree/master/mnist_hogwild # Training settings parser...
AVR_Miner.py
#!/usr/bin/env python3 ########################################## # Duino-Coin Python AVR Miner (v2.5.1) # https://github.com/revoxhere/duino-coin # Distributed under MIT license # © Duino-Coin Community 2019-2021 ########################################## # Import libraries import sys from configparser import ConfigPa...
multiprocess_logger.py
import logging import logging.handlers import traceback from typing import Callable, Tuple import multiprocessing as mp class MultiProcessLoggerListener: """ Using a independent process to write logger, suitable for multiprocess logging. One can use queue handler to write log from other process, e.g. ...
standalone_test.py
"""Tests for acme.standalone.""" import os import shutil import threading import tempfile import time import unittest from six.moves import http_client # pylint: disable=import-error from six.moves import socketserver # pylint: disable=import-error import requests from acme import challenges from acme import crypt...
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 parser = ar...
mainui_ctrl.py
""" mainui_ctrl.py - controller for mainui Chris R. Coughlin (TRI/Austin, Inc.) """ __author__ = 'Chris R. Coughlin' from models import mainmodel from models import dataio from models import workerthread import views.plotwindow as plotwindow import views.preview_window as preview_window import views.dialogs as dlg f...
main.py
import copy from multiprocessing.managers import BaseManager import gym import numpy as np import torch.multiprocessing as mp from impala.actor import actor from impala.learner import learner from impala.model import Network from impala.parameter_server import ParameterServer NUM_ACTORS = 4 ACTOR_TIMEOUT = 500000 i...
aem_hacker.py
import concurrent.futures import itertools import json import datetime import traceback import sys import argparse import base64 import time from collections import namedtuple from http.server import BaseHTTPRequestHandler, HTTPServer from random import choice, randint from string import ascii_letters from threading im...
ice.py
#!/usr/bin/env python ################################################################################ import sys import errno import socket import struct import time from copy import copy import functools import m3_logging logger = m3_logging.get_logger(__name__) logger.debug('Got ice.py logger') try: import t...
proposal_generator.py
#!/usr/bin/env python import argparse import sys import socket import random import struct import threading import time import thread import json from scapy.all import sendp, send, get_if_list, get_if_hwaddr from scapy.all import Packet from scapy.all import Ether, IP, UDP, TCP from proposalHeader import GvtProtocol ...
main.py
import kivy from kivy.app import App from kivy.uix.button import Button from kivy.uix.gridlayout import GridLayout from kivy.uix.boxlayout import BoxLayout from kivy.uix.widget import Widget from kivy.uix.image import Image, AsyncImage from kivy.uix.label import Label from kivy.app import App from kivy.uix.s...
process.py
import atexit import logging import os import shlex import subprocess import threading import time import yaml from future.standard_library import install_aliases from pyngrok import conf from pyngrok.exception import PyngrokNgrokError, PyngrokSecurityError from pyngrok.installer import validate_config install_alias...
test_lock.py
""" Adapted from https://github.com/harlowja/fasteners/ """ import itertools import os import random import tempfile import time from multiprocessing import Process from pathlib import Path import more_itertools import pytest from diskcache import Cache from diskcache import Deque # noinspection PyProtectedMember from...
server.py
import logging import time import ssl import threading from msgpack import packb, unpackb from gevent.server import StreamServer from prometheus_client import Summary, Counter import arrpc.metrics as m from arrpc.error import AuthException, RpcException from arrpc.utils import recvall, verify_msg from arrpc import lo...
root.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Root for webserver. Specifies frontpage, errorpage (default), and pages for restarting and shutting down server. """ import os import sys import cherrypy import htpc import logging from threading import Thread from cherrypy.lib.auth2 import * def do_r...
_RunControl.py
#----------------------------------------------------------------------------- # Title : PyRogue base module - Run Control Device Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICE...
past_video_image.py
import multiprocessing # Copyright 2020 Wearless Tech 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 re...
crashreporter.py
# # This file is: # Copyright (C) 2018 Calin Culianu <calin.culianu@gmail.com> # # MIT License from . import utils from . import gui from electroncash.i18n import _ from .uikit_bindings import * from .custom_objc import * import json, traceback, requests, sys from electroncash import PACKAGE_VERSION issue_templ...
netattack2.py
#!/usr/bin/env python import os import sys import socket import logging from threading import Thread import socket from time import sleep from subprocess import Popen, PIPE # COLORS B, R, Y, G, N = '\33[94m', '\033[91m', '\33[93m', '\033[1;32m', '\033[0m' # making scapy quite logging.getLogger('scapy.runtime').setL...
client.py
from data import functions import socket import threading import sys import json from subprocess import Popen, PIPE from time import sleep def parsecommand(json_command): command = "java -jar -Dfile.encoding=UTF-8 data/qubo.jar -nooutput" if json_command["range"] is not None: charther = ...
graph_digest_benchmark.py
#!/usr/bin/env python ''' This benchmark will produce graph digests for all of the downloadable ontologies available in Bioportal. ''' from rdflib import * from rdflib.compare import to_isomorphic import sys, csv from urllib import * from io import StringIO from collections import defaultdict from urllib2 import urlo...
backend_info.py
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gil.py
import time import threading def profile(func): def wrapper(*args, **kw): import time start = time.time() func(*args, *kw) end = time.time() print('Cost:{}'.format(end-start)) return return wrapper def fib(n): if n <= 2: return n return fib(n-1)...
__init__.py
# Threaded function snippet import threading from functools import wraps def threaded(fn): """To use as decorator to make a function call threaded. Needs import from threading import Thread""" @wraps(fn) # Not sure if this is necessary..... def wrapper(*args, **kwargs): thread = threading....
multicast_test.py
import threading import time import typing as ty from collections import defaultdict from xoto3.utils.multicast import LazyMulticast def test_lazy_multicast(): class Recvr(ty.NamedTuple): nums: ty.List[int] CONSUMER_COUNT = 10 NUM_NUMS = 30 sem = threading.Semaphore(0) def start_numbers...
ui_utils.py
# -*- coding: utf-8 -*- import collections import logging import os import platform import re import signal import subprocess import sys import textwrap import threading import time import tkinter as tk import tkinter.font import traceback from tkinter import filedialog, messagebox, ttk from typing import Callable, Lis...
custom.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
generate_trajs.py
import os import sys import time import multiprocessing as mp import json import random import shutil import argparse import numpy as np import pandas as pd from collections import OrderedDict from datetime import datetime from sacred import Ingredient, Experiment from alfred.env.thor_env import ThorEnv from alfred.g...
can.py
# -*- coding: utf-8 -*- ''' Tool for running a session with the can interface. Example: .. code-block:: python import pykarbon.can as pkc from time import sleep with pkc.Session() as dev: dev.write(0x123, 0x11223344) # Send a message sleep(5) # Your code here! ...
monitor.py
import sys sys.path.append(r"/home/anoldfriend/OpenFOAM/anoldfriend-7/utilities/") import signal import multiprocessing as mp import time from residual_monitor import read_residuals,plot_multiple_residuals,quit log="run.log" pressure_name="p_rgh" nCorrectors=1 interval=5 sample_size=300 # m_residuals=[["h"],["Ux",...
toast.py
# -*- mode: python; coding: utf-8 -*- # Copyright 2013-2021 Chris Beaumont and the AAS WorldWide Telescope project # Licensed under the MIT License. """Computations for the TOAST projection scheme and tile pyramid format. For all TOAST maps, the north pole is in the dead center of the virtual image square, the south ...
java_gateway.py
# -*- coding: UTF-8 -*- """Module to interact with objects in a Java Virtual Machine from a Python Virtual Machine. Variables that might clash with the JVM start with an underscore (Java Naming Convention do not recommend to start with an underscore so clashes become unlikely). Created on Dec 3, 2009 :author: Barthe...
atividade-01.py
import time from datetime import datetime import threading def fun(id, data, status): mensagem = " | hello, world" dados = "ID: " + str(id) + mensagem + " | Data: " + str(data) + " | Status: " + str(status) print(dados) time.sleep(2) status = "Finalizada" data = datetime.today().strftime("%Hh%...
copy_data_fast.py
""" Script to copy data fast using multiprocessing and shutil Usage: python copy_data_fast.py <source_dir> <target_dir> <start_episode_num> <end_episode_num> """ import os import sys import numpy as np import shutil import time import multiprocessing source_dir = sys.argv[1] target_dir = sys.argv[2] def copy_episod...
test_flow_controller.py
# Copyright 2020, Google LLC 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 or a...
xkb_input.py
r""" Switch inputs. Configuration parameters: button_next: mouse button to cycle next layout (default 4) button_prev: mouse button to cycle previous layout (default 5) cache_timeout: refresh interval for this module; xkb-switch and swaymsg will listen for new updates instead (default 10) format...
__init__.py
# Adapted from https://github.com/MoshiBin/ssdpy and https://github.com/ZeWaren/python-upnp-ssdp-example import socket import struct import threading class SSDPServer(): """ fHDHR SSDP server. """ def __init__(self, fhdhr): self.fhdhr = fhdhr self.ssdp_handling = {} self.meth...
etcd_client_test.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...
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...
daq.py
""" This module defines a control interface for the LCLS1 DAQ. """ import enum import functools import logging import os import time import threading from importlib import import_module from ophyd.status import Status, wait as status_wait from . import ext_scripts from .ami import set_pyami_filter, set_monitor_det l...
main_window.py
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
BellBoardExporter.py
import tkinter as tk from tkinter import DISABLED, NORMAL, END from tkinter import filedialog from tkinter import ttk import os from platform import system import sys import threading from threading import Thread import queue import requests from PyPDF2 import PdfFileReader, PdfFileMerger import io class Text(): ...
accumulators.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...
__init__.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 import codecs import atexit import signal from distutils.spawn import find_executable from ansible_runner.exceptions import Config...
visualizer.py
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
encode_png_benchmark.py
# Copyright 2017 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...
camera_inference.py
from camera_parameters import * import torch import numpy as np import cv2, os, time, datetime import random import detectron2 from bt_server import BTServer from predictor import MTSDPredictor from detection_utils import * from detectron2.config import get_cfg import threading import statistics def gstreamer_pipel...
BotMonitor.py
#!/usr/bin/env python """ Created on Apr 23, 2012 @author: moloch --------- websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published...
pjit_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, ...
shiva.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import threading import requests import proxify import random import argparse import sys requests.packages.urllib3.disable_warnings() # Just some colors and shit white = '\x1b[1;97m' green = '\x1b[1;32m' red = '\x1b[1;31m' red = '\x1b[31m' yellow = '\x1b[1;33m' end = '\x1b...
getlaser.py
#http://doc.aldebaran.com/2-5/naoqi/core/almemory-api.html #http://doc.aldebaran.com/2-5/family/pepper_technical/pepper_dcm/actuator_sensor_names.html#ju-lasers import qi import argparse import sys import time import threading import os laserValueList = [ # RIGHT LASER "Device/SubDeviceList/Platform/LaserSensor/R...
connection.py
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Jordan Borean (@jborean93) <jborean93@gmail.com> # MIT License (see LICENSE or https://opensource.org/licenses/MIT) from __future__ import division global g_count g_count = 0 import binascii import hashlib import hmac import logging import math import os import struct i...
logger.py
from pynput.keyboard import Key, Listener from datetime import date import json import requests import threading DISTRIBUTION_FILE = 'distribution.json' TIME_FILE = 'time.json' CONVERT_FILE = 'convert.json' REQUEST_URL = 'http://127.0.0.1:5000/new-data' SAVE_COUNTER = 10 current_date = '' time = {} dist = {} ignore =...
AmpelPlot.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: Ampel-plot/ampel-plot-app/AmpelPlot.py # License: BSD-3-Clause # Author: valery brinnel <firstname.lastname@gmail.com> # Date: 16.11.2021 # Last Modified Date: 19.11.2021 # Last Modified By: valery brinnel <...
autonomous_v5.py
import car import cv2 import numpy as np import os import serial import socket import threading import time from imutils.object_detection import non_max_suppression from keras.layers import Dense, Activation from keras.models import Sequential import keras.models SIGMA = 0.33 stop_classifier = cv2.CascadeClassifier(...
common3.py
# Copyright (c) 2011 - 2017, Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
multi_process_runner.py
# Lint as: python3 # Copyright 2019 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 ...
network.py
import threading import subprocess import socket import time from . import base class NetworkInput(base.Object): def __init__(self, name, port, buf=100, bind="0.0.0.0"): self.name = name self.port = port self.buf = buf self.bind = bind self.out_ports = [] self.out_p...
main_solo12_replay.py
# coding: utf8 import os import sys sys.path.insert(0, './mpctsid') from utils.logger import Logger import argparse import numpy as np from utils.viewerClient import viewerClient, NonBlockingViewerFromRobot import threading SIMULATION = False LOGGING = True if SIMULATION: from mpctsid.utils_mpc import PyBulletS...
client.py
import socket import struct import time import thread import sys from collections import deque import random import math import threading sys.path.append('../include') from constants import * from headers import * from db import kv path_query = "query.txt" num_query = 1000000 zipf = 0.99 len_key = 16 len_val = 128 ...
dx_users.py
#!/usr/bin/env python # Adam Bowen - Aug 2017 # Description: # This script will allow you to easily manage users in Delphix # This script currently only supports Native authentication # # Requirements # pip install docopt delphixpy.v1_8_0 # The below doc follows the POSIX compliant standards and allows us to use # thi...
_threading_local.py
"""Thread-local objects. (Note that this module provides a Python version of the threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the `local` class from `threading`.) Thread-local objects support the management of thread-local d...
utils.py
from __future__ import print_function, division, absolute_import import atexit from collections import deque from contextlib import contextmanager from datetime import timedelta import functools from hashlib import md5 import inspect import json import logging import multiprocessing from numbers import Number import o...
test_ceate_listener.py
# -*- coding: utf-8 -*- """ Web Console Api Client """ # from django.test import TestCase # from api_tests.test_api_request import RequestClient # from BareMetalControllerBackend.conf.env import env_config from baremetal_service import handler # from common.lark_common.model.common_model import ResponseObj # from rest...
main.py
from thermostat import thermostat import RPi.GPIO as GPIO import threading import time import paho.mqtt.client as mqtt import argparse import os def thread2(): global thermostat_obj while True: if thermostat_obj.valid_list(): l = thermostat_obj.get_list() for a, b in l: ...
class_ros_sensor.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ PHM Ros Sensor Class """ import rospy from threading import Thread import roslib.message import roslib.names class ROSSensor: """ Ros Sensor Class """ def __init__(self, topic): self.name = topic self.error = None se...
locations.py
from taters import lazy_file, pipe, read_all, read_all_to, tee import errno import ftplib import furl import os import paramiko import tarfile import urllib import sh import socket import stat import threading def _parse_url( url ): return furl.furl( url ) def _decode_furl_path( path ): '''decodes furl.Path t...
poc.py
# note: this needs stem to run. you can # install it in a fresh virtualenv on Debian (after "apt-get install # python-virtualenv") like so: # # virtualenv venv # source venv/bin/activate # pip install --upgrade pip # pip install stem # # Then you can run this: # python3 poc.py # # ...and then visit any .onion address, ...