source
stringlengths
3
86
python
stringlengths
75
1.04M
test_flight.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...
scheduler_job.py
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
op_callbacks_test.py
# 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 required by applica...
tests.py
# -*- coding: utf-8 -*- # Unit and doctests for specific database backends. from __future__ import unicode_literals import datetime from decimal import Decimal import re import threading import unittest from django.conf import settings from django.core.management.color import no_style from django.db import (connectio...
base.py
import json import copy import threading import array import struct import time from datetime import datetime import csv import os from influxdb import InfluxDBClient from influxdb.client import InfluxDBClientError try: from sources.buffers import CircularBufferQueue, CircularResultsBufferQueue except: from bu...
keepkey.py
from binascii import hexlify, unhexlify import traceback import sys from oregano.util import bfh, bh2u, UserCancelled from oregano.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT, deserialize_xpub from oregano import networks from oregano.i18n import _ from oregano.transaction import deserialize, Transaction from oregano.key...
overdrive.py
import struct import threading #import Queue as queue # Uncomment if using Python 2.7 import queue import logging import bluepy.btle as btle class Overdrive: def __init__(self, addr): """Initiate an Anki Overdrive connection object, and call connect() function. Parameters: addr -- ...
tests.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...
bot.py
# coding=utf-8 # Copyright 2008, Sean B. Palmer, inamidst.com # Copyright © 2012, Elad Alfassa <elad@fedoraproject.org> # Copyright 2012-2015, Elsie Powell, http://embolalia.com # Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com> # # Licensed under the Eiffel Forum License 2. from __future__ import uni...
__init__.py
"""Helper operations and classes for general model building. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import collections import pickle import os import time import warnings import numpy as np import pandas as pd import tensorflow as tf import tem...
serve.py
import multiprocessing import socket from datetime import datetime from typing import Tuple import flags_and_teams import random class Calc2Task: def __init__(self): while True: try: n1 = random.randint(-10, 10) n2 = random.randint(-10, 10) n3 = ...
GraphComponentTest.py
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
brain.py
# https://github.com/ZhiqingXiao/rl-book/blob/master/chapter06_approx/MountainCar-v0_tf.ipynb # https://mofanpy.com/tutorials/machine-learning/reinforcement-learning/DQN3 import threading import os import numpy as np np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning) import pandas as pd impor...
add_ipinfo.py
""" 需要离线添加一些ip的信息 by swm 2020/04/24 """ import queue import threading import json import time import uuid from pathlib import Path import maxminddb class AddInfo(object): def __init__(self): # 需要读取的文件夹 self.input_file_path = Path('./hkdata') if not self.input_file_path.exists(): ...
helpers.py
import multiprocessing import time import socket from contextlib import contextmanager from data.database import LogEntryKind, LogEntry3 class assert_action_logged(object): """ Specialized assertion for ensuring that a log entry of a particular kind was added under the context of this call. """ def ...
test_rqg_asterix.py
import sys import paramiko import re from basetestcase import BaseTestCase import json import os import zipfile import pprint import Queue import json from membase.helper.cluster_helper import ClusterOperationHelper import mc_bin_client import threading from memcached.helper.data_helper import VBucketAwareMemcached fr...
local.py
import pygame from pygame import mixer, event import threading from .backend import Backend TRACK_COMPLETE = event.custom_type() TRACK_STOPPED = event.custom_type() class Local(Backend): def __init__(self, logger, library, event_loop): Backend.__init__(self, logger, library) self.event_loop = event_loop self....
makefile.py
# -*- coding: UTF-8 -*- #——————————————————————————————————————————————————————————————————————————————————————————————————— # Releases #——————————————————————————————————————————————————————————————————————————————————————————————————— # 1.0: march 18th, 2015 # first release # 2.0: october 2th, 2015 # ...
pyminer.py
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
y_cable_helper.py
""" y_cable_helper.py helper utlities configuring y_cable for xcvrd daemon """ import threading import time from sonic_py_common import daemon_base, logger from sonic_py_common import multi_asic from sonic_y_cable import y_cable from swsscommon import swsscommon SELECT_TIMEOUT = 1000 y_cable_platform_sfput...
DataFileUtilServer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\ JSONRPCError, Inva...
input_getter.py
import curses from threading import Thread from typing import NoReturn, Optional class InputGetter: """A class that uses curses.getch() to get input""" def __init__(self, screen: curses.window): """Initialize the InputGetter""" self.screen = screen self.char_index_list = [] se...
userevent.py
import json import threading import logging import redis logger = logging.getLogger(__name__) class CannotReadUserEventsException(Exception): """ Exception raised if user events cannot be read. """ class UserEventBuilder(object): """ Defines a helper class for constructing UserEvent and UserEv...
websocket.py
#!/usr/bin/env python3 """websocket client, used to retrieve the game state from the remote server at each time step""" import asyncio from threading import Thread # import sys import aiohttp from aiohttp import ClientConnectorError from queue import Empty def start_client(loop, url, queue): while True: ...
test_basic_3.py
# coding: utf-8 import gc import logging import os import sys import time import subprocess import numpy as np import pytest import ray.cluster_utils from ray._private.test_utils import ( dicts_equal, wait_for_pid_to_exit, wait_for_condition, ) from ray.autoscaler._private.constants import RAY_PROCESSES f...
dante.py
#!/usr/bin/env python3 import sys, argparse, nmap, glob, os from socket import error as WrongIpException from socket import inet_aton as check_ip from lib.dr_buster import start_scan as dir_scan from lib.exploit_db_wrapper import search, print_exploits from threading import Thread from time import sleep from jinja2 im...
app.py
# coding:utf-8 import os import sys from inspect import ismethod from threading import Thread from time import sleep from typing import Text from werkzeug.datastructures import ImmutableDict from ctpbee import __version__ from ctpbee.center import Center from ctpbee.config import Config from ctpbee.constant import Ex...
gdb_test.py
# pyOCD debugger # Copyright (c) 2015-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
test_ftplib.py
# expected: fail """Test script for ftplib module.""" # Modified by Giampaolo Rodola' to test FTP class, IPv6 and TLS # environment import ftplib import asyncore import asynchat import socket import StringIO import errno import os try: import ssl except ImportError: ssl = None from unittest import TestCase, ...
pyagent.py
# -*- coding: utf-8 -*- """Agent - Agent object. Manage wandb agent. """ from __future__ import print_function import ctypes import logging import os import socket import threading import time from six.moves import queue import wandb from wandb import util from wandb import wandb_sdk from wandb.apis import Interna...
tracing_backend.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import re import socket import threading import weakref from telemetry.core.backends.chrome import tracing_timeline_data from tel...
test_iteration.py
"""Main module for testing the iterator iteration loop and base core functionnalities that it uses """ import multiprocessing import queue import threading from collections import OrderedDict import pandas import timeit QUERY = [ {'id': 1, 'name': 'Kendall'}, {'id': 2, 'name': 'Kylie'}, {'id': 3, 'nam...
main.py
# Software for creating a video server # for home video surveillance. # # version: 1.0.0 # author: iRTEX Creative from flask import Flask, render_template, Response from imutils.object_detection import non_max_suppression from libs.hooks import hooks from libs.log import log from libs.data import data from libs.reques...
update_splits.py
import os import sys from multiprocessing import Process, Value sys.path.append('hyperdrive') from DataSource import IEXCloud, Polygon # noqa autopep8 from Constants import PathFinder # noqa autopep8 import Constants as C # noqa autopep8 counter = Value('i', 0) iex = IEXCloud() poly = Polygon() symbols =...
spinner.py
''' logger/spinner.py: Simple spinner for logger Copyright (c) 2017 Vanessa Sochat 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...
console_screener.py
import os import time import threading import logging import data as d from screener.screener import Screener, Result, INIT_NAME from data import store as store from utils import ui _logger = ui.get_logger(logging.WARNING, logfile='') BASEPATH = os.getcwd()+'/screener/screens/' SCREEN_SUFFIX = 'screen' class Inter...
test_pizco.py
# -*- coding: utf-8 -*- import time import operator import threading from threading import Thread from concurrent.futures import ThreadPoolExecutor import zmq from pizco.compat import Queue, Empty from pizco.tornadoagentmanager import TornadoAgentManager def set_zmq_context_to_none(): if hasattr(zmq.Context, '...
other_utils.py
from uuid import uuid1 from functools import wraps from threading import Thread from flask_login import current_user from coco.errors import PERMISSION_FORBIDDEN from coco.utils.json_util import gen_error_json def async_task(func): @wraps(func) def decorator(*args, **kwargs): Thread(target=func, arg...
daemon.py
import threading import time def work_for_t1(): print('Starting of thread :', threading.current_thread().name) for i in range(0,11): print("Printing Number : ",i," \n") time.sleep(2) print('Finishing of thread :', threading.current_thread().name," \n") t1 = threading.Th...
singleton.py
#! /usr/bin/env python """ Copyright (c) 2017 Andrew Azarov 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, modify, merge,...
signals.py
# from django.db.models.signals import post_save, pre_delete # from django.dispatch import receiver # from .models import OrbitRun, BspJplFile # import os # import logging # from orbit.refine_orbit import RefineOrbit # import shutil # from datetime import datetime # import threading # from orbit.bsp_jpl import BSPJPL ...
loader.py
import datetime import functools import importlib import io import json import os import shutil import sys import tempfile import types from threading import Thread import requests import yaml from bs4 import BeautifulSoup from httprunner import HttpRunner, logger from requests.cookies import RequestsCookieJar from re...
cli.py
# -*- coding: utf-8 -*- """ flask.cli ~~~~~~~~~ A simple command line application to run flask apps. :copyright: © 2010 by the Pallets team. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import ast import inspect import os import platform import re import...
splunk_http_event_collector.py
"""splunk_http_event_collector.py Splunk HTTP event submission class Remember: Friends don't let friends send in non Common Information Model data: http://docs.splunk.com/Documentation/CIM/latest/User/Overview Please use CIM friendly field names when sending in data. """ import requests from requests....
monitored_session_test.py
# pylint: disable=g-bad-file-header # 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/LICENS...
dmlc_local.py
#!/usr/bin/env python """ DMLC submission script, local machine version """ import argparse import sys import os import subprocess from threading import Thread import tracker import signal import logging keepalive = """ nrep=0 rc=254 while [ $rc -eq 254 ]; do export DMLC_NUM_ATTEMPT=$nrep %s rc=$?; nr...
discoverygui.py
import threading import time import tkinter from pymongo import MongoClient from rmpdiscovery.discovery import discoveryconst as const LABEL_COLUMN = 0 LABEL_ROW = 0 LABEL_COLUMN_SPAN = 3 LIST_COLUMN = 0 LIST_ROW = 1 LIST_COLUMN_SPAN = 3 BTN_STOP_COLUMN = 1 BTN_STOP_ROW = 2 class simpleapp_tk(tkinter.Tk): def ...
test_multiprocessing.py
# - This test hangs and the tester fails to clean it up. # # Unit tests for the multiprocessing package # import unittest import Queue import time import sys import os import gc import signal import array import socket import random import logging import errno import test.script_helper from test import test_support fr...
test_ocr.py
from threading import Thread import cv2 as cv import time import config as C from operators import tesseract_ocr from .base import * def tesseract_run(path, thd_number): time_start = time.time() image = cv.imread(path) img_gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY) img_bin = cv.adaptiveThreshold(i...
test_cuda.py
# Owner(s): ["module: cuda"] from itertools import repeat, chain, product from typing import NamedTuple import collections import contextlib import ctypes import gc import io import pickle import queue import sys import tempfile import threading import unittest import torch import torch.cuda import torch.cuda.comm as...
one_client_one_thread.py
# Copyright 2015 Jared Rodriguez (jared.rodriguez@rackspace.com) # 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/LICENS...
kernel.py
import re import os import sys import threading import logging # Note: IPython uses zmq.eventloop.zmqstream.ZMQStream, see IPythonKernel. # ZMQStream wants a Tornado IOLoop, not a asyncio loop. from tornado import ioloop from ipykernel.ipkernel import IPythonKernel, ZMQInteractiveShell from ipykernel.iostream import O...
test_expose.py
""" fs.tests.test_expose: testcases for fs.expose and associated FS classes """ import unittest import sys import os, os.path import socket import threading import time from fs.tests import FSTestCases, ThreadingTestCases from fs.tempfs import TempFS from fs.osfs import OSFS from fs.memoryfs import MemoryFS from...
pipeline.py
import os import types import math from inspect import signature import multiprocessing as mp from multiprocessing import queues POISON_PILL = 'POISON_PILL' class PoisonPillException(Exception): pass def Pipe(maxsize=0): return queues.Queue(maxsize, ctx=mp.get_context()) def pass_through(val): retur...
framework.py
from functions import * import time import math import threading import random class Game: def __init__(self, radius=2000): self.entities = set() self.running_time = 0.01 self.radius = radius self.last_time = time.time() self.mapped_entities = dict() def update(self): ...
feature_shutdown.py
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The F44RedCoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test f44redcoind shutdown.""" from test_framework.test_framework import F44RedCoinTestFramework fro...
cook.py
import time import consts import logging import requests import threading logger = logging.getLogger(__name__) class Cook: def __init__(self, kitchen, id_, name, rank, proficiency, catch_phrase): self.kitchen = kitchen self.id_ = id_ self.name = name self.rank = rank self....
main3.py
#!/usr/bin/python """ @AUTHOR : KRYPTON-BYTE @RECODER: FAZIL VK @DATE : TUE OCT 13, 2020 " O believers, why do you say something you don't do? There is so much hatred in the sight of Allah that you say what you do not want to do." (Surah Asg-Shaff: 2-3) """ import difflib from openwa.helper import convert_to_bas...
Chainext_Usdt_Usd_Spider.py
import json import requests from SunMongo import SunMongodb from pymongo import MongoClient from threading import Thread def async_call(fn): def wrapper(*args, **kwargs): Thread(target=fn, args=args, kwargs=kwargs).start() return wrapper class Zb_Usdt_Qc_spider(object): def __init__(self, start...
viewer.py
"""A pyglet-based interactive 3D scene viewer. """ import copy import os import sys from threading import Thread, RLock import time import imageio import numpy as np import OpenGL import trimesh try: from Tkinter import Tk, tkFileDialog as filedialog except Exception: try: from tkinter import Tk, file...
exampleApp4.py
import time import threading from pyhtmlgui import PyHtmlGui, PyHtmlView, Observable class App(Observable): def __init__(self): super().__init__() self.value = 0 self.paused = False self.worker_thread = threading.Thread(target=self._worker_thread, daemon=True) self.worker_th...
NavigationSystemModelSimulation.py
__author__ = 'EdwardAshenbert' from NavigationSystem.AStar_5 import * from NavigationSystem.PVector import PVector from NavigationSystem.UtilitiesFunction import * from NavigationSystem.UtilitiesMacroAndConstant import * import NavigationSystem.NavigationSystemShareMemory as navigation_system_share_memory from Navigat...
corscheck.py
import gevent.monkey gevent.monkey.patch_all() import requests, json, os, inspect, tldextract from future.utils import iteritems try: from urllib.parse import urlparse except Exception as e: from urlparse import urlparse import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) from...
monobeast.py
# Copyright (c) Facebook, Inc. and its affiliates. # # 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...
trezor.py
import traceback import sys import base64 from typing import NamedTuple, Any from electrum_scribe import bitcoin from electrum_scribe.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException from electrum_scribe.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT, msg_magic from electrum_scribe.bip32 import BIP32...
learnUltimo.py
#!/usr/bin/python3 import io import csv import json import warnings import pickle import operator import time import logging import math import functools import numpy from sklearn.preprocessing import MinMaxScaler from threading import Thread from random import shuffle from sklearn.neural_network import MLPClassifier ...
test_transactions.py
import threading from peewee import _atomic from peewee import SqliteDatabase from peewee import transaction from playhouse.tests.base import database_class from playhouse.tests.base import mock from playhouse.tests.base import ModelTestCase from playhouse.tests.base import skip_if from playhouse.tests.base import tes...
intra.py
import zmq import multiprocessing.dummy as thread def _print(*args): print(">netconnn>",*args) class ConnectorNetwork: def __init__(self,netconf,appid,name): self.netconf = netconf self.appid = appid self.name = name self.myaddr = self.netconf.get_address(name) mux_ad...
word2vec.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Warnings -------- .. deprecated:: 3.3.0 Use :mod:`gensim.models.word2vec` instead. Produce word vectors with deep learning via wo...
PrimateAI_v0.2.py
# Copyright 2018 Illumina Inc, San Diego, CA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This p...
BotSchedule.py
# !/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2020 anqi.huang@outlook.com # # 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/LI...
common.py
# Copyright 2021 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. from enum import Enum from functools import wraps from pathlib import...
webui.py
import os import time import hashlib import subprocess from threading import Timer, Thread import cherrypy from cherrypy.process.plugins import Daemonizer from werkzeug import datastructures from ws4py.websocket import WebSocket from wsgiref.simple_server import make_server from ws4py.server.cherrypyserver import WebS...
dobotGym.py
import math import gym from gym import spaces import numpy as np import coordinateOperation import fileOperation import threading import os class dobotGym(gym.Env): def __init__(self, plot = False, save= True, emulateOculus = True, episodeLength = 15, visualize = True, teachingFilesPath = None, dobotDisconnected ...
__init__.py
# -*- coding: utf-8 -*- """ keyboard ======== Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more. ## Features - **Global event hook** on all keyboards (captures keys regardless of focus). - **Listen** and **send** keyboard event...
main.py
from flask import Flask, render_template, request, redirect from flask_mail import Mail, Message from threading import Thread app = Flask(__name__, template_folder='template') mail = Mail(app) app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 465 app.config['MAIL_USERNAME'] = 'genicandogenerico@g...
Hiwin_RT605_Socket_v3_20190628112557.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_v3 as TCP import HiwinRA605_socket_Taskcmd_v3 as Taskcmd import numpy as np from std_msgs.msg import String from ROS_Socket.s...
dynamic_batcher_test.py
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
stream.py
# stream.py/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). # This copyright was auto-generated on Wed, Sep 1, 2021 5:05:46 PM """Entrypoint for taking a picture.""" import time import logging import argparse import threading from pathlib import Path from typing import Tuple, Op...
main.py
#!/bin/sh /cvmfs/icecube.opensciencegrid.org/py2-v1/icetray-start #METAPROJECT: offline-software/trunk ####!/usr/bin/env python import os import logging import time from threading import Thread, Timer from functools import partial from contextlib import contextmanager from multiprocessing.pool import ThreadPool from ...
multi_inf_parallel_files.py
#!/usr/bin/env python3 import os import inf_common as IC import hyperparams as HP import torch torch.set_num_threads(1) torch.set_num_interop_threads(1) from torch import Tensor import time from typing import Dict, List, Tuple, Optional from collections import defaultdict from collections import ChainMap impor...
runner.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import io import json import os import sys import re import time import tempfile import itertools import datetime import ...
monitored_session_test.py
# pylint: disable=g-bad-file-header # 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/LICENS...
camera.py
import threading from actfw_core.capture import Frame from actfw_core.task import Producer from actfw_jetson.logger import DEFAULT_LOGGER from PIL import Image class NVArgusCameraCapture(Producer): # type: ignore """Camera using nvarguscamerasrc plugin. Outputs :class:`~actfw_core.capture.Frame` whose cont...
webSvc.py
#! /usr/bin/env python3 # # -*- coding: UTF-8 -*- import os, logging, threading, time, errno, json, cgi, re from enum import Enum from mimetypes import MimeTypes from collections import namedtuple from urllib.request import pathname2url from http import HTTPStatus from urllib import request from urllib.parse import ur...
test_kafka.py
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import threading import time from types import ListType import unittest import os import mock # 3p from nose.plugins.attrib import attr # project from aggregator import MetricsAggregator import logging ...
plugin_service.py
import asyncio import threading import atexit import json import os import shutil import time import traceback import uuid from collections import namedtuple from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor from os import environ import yaml from apscheduler.schedulers.background import Backgroun...
retrieve_regmod_values.py
#!/usr/bin/env python # #The MIT License (MIT) # # Copyright (c) 2015 Bit9 + Carbon Black # # 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 t...
progress_reporter.py
import collections import sys import threading import fs.filesize from datetime import datetime from abc import ABC, abstractmethod class GroupStats(object): def __init__(self, desc, total_count): self.desc = desc self.total_count = total_count self.completed = 0 self.completed_by...
main.py
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
__init__.py
#!/usr/bin/python -OO # Copyright 2007-2019 The SABnzbd-Team <team@sabnzbd.org> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later...
main.py
import json from threading import Thread from flask import render_template from flask_socketio import emit from app import app, socketio from utils import get_all_votes_stat, listen_to_pg pubsub_thread = None @socketio.on("connect") def handle_connect(): global pubsub_thread if pubsub_thread is None: ...
_optimize.py
from concurrent.futures import FIRST_COMPLETED from concurrent.futures import Future from concurrent.futures import ThreadPoolExecutor from concurrent.futures import wait import copy import datetime import gc import itertools import math import os import sys from threading import Event from threading import Thread impo...
test_builtin.py
import logging import socket import time import unittest from threading import Thread from slack_sdk import WebClient from slack_sdk.socket_mode import SocketModeClient from slack_sdk.socket_mode.builtin.connection import Connection, ConnectionState from slack_sdk.socket_mode.builtin.frame_header import FrameHeader fr...
Bybop_NetworkAL.py
import socket import struct import threading class DataType: ACK = 1 DATA = 2 DATA_LOW_LATENCY = 3 DATA_WITH_ACK = 4 class NetworkAL(object): """ Alternate implementation of the ARNetworkAL protocol, for Wifi devices. This implementations is fully compliant with the protocol, and has no...
host_callback_test.py
# Copyright 2020 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, ...
controller.py
import logging #from robotcontroller.logsetup import logcfg from datetime import timedelta from thespian.actors import * from robotcontroller.ik import IkSolver, RobotForwardKinematics from robotcontroller.kinematics import RobotTopology, RobotState from robotcom.robot import RobotCommunication from robotcom.robot_simu...
world_model.py
#!/usr/bin/env python # coding:utf-8 import rospy from world.referee import Referee from world.objects import Objects from strategy_calcurator import strategy from strategy_calcurator.strategy_calcurator import StrategyCalcuratorBase from strategy_calcurator.normal_start_strategy_calcurator import NormalStartStrateg...
qarkMain.py
#!/usr/bin/env python from __future__ import absolute_import '''Copyright 2015 LinkedIn Corp. 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 requ...
client.py
import argparse, tempfile, requests, subprocess, atexit, shutil, threading, socket, os, sys, json, urllib.parse, atexit, signal, getpass, socket, time from . import common, simplepty DEFAULT_SCAN_DIRS = ['/usr', '/bin', '/lib', '/lib64', '/etc', '/var'] CONFIG_PATH = os.path.expanduser('~/.config/cloudrun') def manua...