source
stringlengths
3
86
python
stringlengths
75
1.04M
submission.py
"""Submission module""" #pylint: disable=too-few-public-methods import os import sys import json import datetime import threading import falcon import jsend import sentry_sdk from .dispatch_email import Email from .dispatch_bluebeam import DispatchBluebeam from .hooks import validate_access from ..modules.util import t...
train-cnn.py
import sys import numpy as np import pprint import time import os import argparse as argparse import json import hvutils as hv import threading import queue from tqdm import tqdm from random import shuffle from keras import layers from keras.models import Model, Sequential from keras.layers import Inp...
utils.py
# %BANNER_BEGIN% # --------------------------------------------------------------------- # %COPYRIGHT_BEGIN% # # Magic Leap, Inc. ("COMPANY") CONFIDENTIAL # # Unpublished Copyright (c) 2020 # Magic Leap, Inc., All Rights Reserved. # # NOTICE: All information contained herein is, and remains the property # of COMPAN...
run_Bot.py
#===== description =====# """ DiscordJinroGame Copyright (c) 2018 brave99 This software is released under the MIT License. http://opensource.org/licenses/mit-license.php This script is a discord bot that can be a GM of OneNightJinro game. Required libraly is only "discord.py" Have fun with your BOT!! Engli...
_plugin.py
from . import _PluginInstance from nanome._internal import _network as Network from nanome._internal._process import _ProcessManager, _LogsManager from nanome._internal._network._serialization._serializer import Serializer from nanome._internal._util._serializers import _TypeSerializer from nanome.util.logs import Logs...
redirect.py
import logging import threading import pydivert class Redirect: def __init__(self, server_host, server_port, proxy_host, proxy_port): self.client_host = None self.client_port = 0 self.server_host = server_host self.server_port = server_port self.proxy_host = proxy_host ...
lapse.py
#!/usr/bin/python # Lapse-Pi timelapse controller for Raspberry Pi # This must run as root (sudo python lapse.py) due to framebuffer, etc. # # http://www.adafruit.com/products/998 (Raspberry Pi Model B) # http://www.adafruit.com/products/1601 (PiTFT Mini Kit) # # Prerequisite tutorials: aside from the basic Raspbian s...
panels.py
# -*- coding: utf-8 -*- """ ######################################################################### Author: Shalin Shah Project: DNA Cloud Graduate Mentor: Dixita Limbachya Mentor: Prof. Manish K Gupta Date: 5 November 2013 Website: www.guptalab.org/dnacloud This module contains both the panels for encoding and decod...
load_test.py
# coding:utf-8 import time import urllib2 import threading from Queue import Queue from time import sleep import sys # 性能测试页面 #PERF_TEST_URL = "http://10.2.66.38/?yyid=-1&suv=1309231700203264&callback=xxxxx" URLS = [line for line in open("urls", "r")] # 配置:压力测试 THREAD_NUM = 10 # 并发线程总数 ONE_WORKER_NUM = 500...
__main__.py
import time import threading import traceback import argparse import logging from . import appserver, controlserver parser = argparse.ArgumentParser(description="Run a Vibrance relay server " "(command server and client WebSocket " "servers).") parser...
Motor.py
####################################################### # LOVE_DEATH_ROBOTS # ####################################################### import RPi.GPIO as GPIO import time import threading import roslibpy # Haversine gives the GPS coords of the base station from Haversine import setTargetHeadin...
game.py
import engine_revised from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtMultimedia import * import sys from client import Client from threading import Thread import protobuffer_pb2 as game from time import sleep selectedColor ...
test_ca.py
# for standalone-test import sys sys.path.append(".") import unittest import time import threading try: # Python27 import Queue as queue except ImportError: # Python35 import queue import j1939 class TestCA(unittest.TestCase): # TODO: should we change the async_can_feeder to ...
build.py
## @file # build a platform or a module # # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR> # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR> # # This program and the accompanying materials # are...
rtt_worker.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Dusan Klinec, ph4r05, 2018 # pip install shellescape sarge import logging import signal import threading import time import sys import os import random import socket import typing import shutil import tempfile import paramiko import sshtunnel from shlex import qu...
local.py
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
test.py
#!/usr/bin/env python # # Copyright 2008 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # noti...
hpd.py
#!/usr/bin/env python3 # # Modified from: # https://gist.github.com/anonymouss/5293c2421b4236fc1a38705fefd4f2e7 # # Http Live Streaming -- fetcher/downloader # A simple script to download segments/m3u8 files from given url, including # variants and alternative renditions. # # TODO # * BYTERANGE (multiple segments p...
HiwinRA605_socket_ros_test_20190625184828.py
#!/usr/bin/env python3 # license removed for brevity #接收策略端命令 用Socket傳輸至控制端電腦 import socket ##多執行序 import threading import time ## import sys import os import numpy as np import rospy import matplotlib as plot from std_msgs.msg import String from ROS_Socket.srv import * from ROS_Socket.msg import * import HiwinRA605_s...
test_b2_command_line.py
#!/usr/bin/env python2 ###################################################################### # # File: test_b2_command_line.py # # Copyright 2018 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from _...
Dapars2_Multi_Sample.py
import numpy as np import os import sys import datetime import threading import scipy as sp import scipy.stats from multiprocessing import Pool from bisect import bisect import math import time import multiprocessing def time_now():#return time curr_time = datetime.datetime.now() return curr_time.strftime("...
run-tests.py
#!/usr/bin/env python # # 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 "Li...
multi-badq.py
### these both fail: can't put bound method on Pipe or Queue! class Spam: def action(self): print(99) from multiprocessing import Process, Pipe def sender(pipe): pipe.send(Spam().action) pipe.close() if __name__ == '__main__': (parentEnd, childEnd) = Pipe() Process(target=se...
OSC3.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ March 2015: Python 3 version tested in Blender and simpleOSC with twisted This module contains an OpenSoundControl implementation (in Pure Python), based (somewhat) on the good old 'SimpleOSC' implementation by Daniel Holth & Clinton McChesney. This implementation i...
singlesimcontroller.py
from threading import Thread, Lock from time import sleep from domain.evaluation import Evaluation from view.singlesimview import SingleSimView class SingleSimController: """Controller class for controlling the simulation of a single game for a single snake.""" def __init__(self, snake, uithread): s...
kifwu.py
'''Kirale firmware update functions''' from __future__ import print_function import itertools import os import platform import struct import sys import time from threading import Thread, RLock import colorama from tqdm import tqdm import usb.backend.libusb1 as libusb1 import usb.core import usb.util from kitools impo...
scanner.py
#!/usr/bin/env python3.6 import argparse import socket import threading screen_lock = threading.Semaphore(value=1) def conn_scan(target_host, target_port): try: conn_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn_socket.connect((target_host, target_port)) conn_socket.se...
utils.py
""" Distributed under the terms of the BSD 3-Clause License. The full license is in the file LICENSE, distributed with this software. Author: Jun Zhu <jun.zhu@xfel.eu> Copyright (C) European X-Ray Free-Electron Laser Facility GmbH. All rights reserved. """ import os import psutil import socket import multiprocessing ...
test_main.py
from threading import Thread from time import sleep from unittest import mock from kivy.app import App from kivy.clock import Clock from kivy_garden.xcamera.main import CameraApp, main from tests.test_main import camera_release_workaround, patch_core_camera def patch_picture_taken(): return mock.patch('kivy_gar...
tflite_run.py
# Copyright (c) 2019, Bosch Engineering Center Cluj and BFMC organizers # 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, ...
bbox_regression.py
""" This file has functions about generating bounding box regression targets """ from ..pycocotools.mask import encode import numpy as np from bbox_transform import bbox_overlaps, nonlinear_transform from rcnn.config import config import math import cv2 import PIL.Image as Image import threading import Queue bbox_tra...
appdaemon.py
import sys import importlib import traceback import os import os.path from queue import Queue import datetime import uuid import astral import pytz import math import asyncio import yaml import concurrent.futures import threading import random import re from copy import deepcopy, copy import subprocess import functools...
test_core.py
"""Test to verify that Home Assistant core works.""" # pylint: disable=protected-access,too-many-public-methods # pylint: disable=too-few-public-methods import os import signal import unittest from unittest.mock import patch import time import threading from datetime import datetime, timedelta import pytz import home...
utils.py
#!/usr/bin/env python """ General Utilities (part of web.py) """ __all__ = [ "Storage", "storage", "storify", "Counter", "counter", "iters", "rstrips", "lstrips", "strips", "safeunicode", "safestr", "utf8", "TimeoutError", "timelimit", "Memoize", "memoize", "re_compile", "re_subm", "group", "uniq"...
hyperopt.py
# Copyright 2019 IBM 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 agreed to in writing, ...
turnstile_demo.py
#!/usr/bin/python try: import mosquitto except ImportError: import paho.mqtt.client as mosquitto import logging import time import serial import threading import re logging.getLogger('').setLevel(logging.DEBUG) class WbMqttHandler(object): def _on_mqtt_message(self, mosq, obj, msg): logging.debug(...
main_multi_processing2_zc.py
#encoding: utf-8 from multiprocessing import Pool, Process from multiprocessing.managers import BaseManager import os, time, random import HKIPcamera import cv2 import copy import math from loadconfig import * import rospy from sensor_msgs.msg import CompressedImage from cv_bridge import CvBridge, CvBridgeError fro...
glprogram.py
"""This module defines convenient classes for building 3D GUI programs. - GLProgram takes care of basic user input. - GLNavigationProgram allows 3D navigation with the mouse. - GLRealtimeProgram calls a subclass-defined idle() function roughly on a constant time step. """ from OpenGL.GL import * from OpenGL.GLU imp...
method.py
from time import time, sleep from threading import Thread from colorama import Fore from humanfriendly import format_timespan, Spinner from tools.crash import CriticalError from tools.ipTools import GetTargetAddress, InternetConnectionCheck """ Find & import ddos method """ def GetMethodByName(method): if method ...
operations.py
import requests import logging import json import API.authentication as auth import deviceControl.operationsHandler import threading logger = logging.getLogger('Operations API') logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger.info('Logger for operations w...
pubsub.py
# Copyright (c) 2020. Lena "Teekeks" During <info@teawork.de> """ PubSub client ------------- This is a full implementation of the PubSub API of twitch. PubSub enables you to subscribe to a topic, for updates (e.g., when a user cheers in a channel). Read more about it on `the Twitch API Documentation <https://dev.tw...
queue_adapter.py
# coding: utf-8 from __future__ import unicode_literals """ This module contains contracts for defining adapters to various queueing systems, e.g. PBS/SLURM/SGE. """ import os import shlex import string import subprocess import threading import traceback import abc import collections import six from fireworks.utili...
tuq_cluster_ops.py
import time import threading import json from security.auditmain import audit from tuqquery.tuq_join import JoinTests from remote.remote_util import RemoteMachineShellConnection from membase.api.rest_client import RestConnection from membase.helper.cluster_helper import ClusterOperationHelper from backuptests import Ba...
test.py
import os import sys import subprocess import shutil import queue import hashlib as hl import threading from threading import Thread def md5_chksum(fname): """ Calculates the md5 checksum of the given file at location. """ md5 = hl.md5() # open file and read in blocks with open(fname, 'rb') as...
locators.py
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except Impo...
ingester.py
import sys import json import os import multiprocessing from queue import Empty from tqdm import tqdm from globus_sdk import GlobusAPIError from mdf_forge.toolbox import format_gmeta, confidential_login from mdf_refinery.config import PATH_FEEDSTOCK, PATH_CREDENTIALS NUM_SUBMITTERS = 5 def ingest(mdf_source_names,...
main.py
""" mlperf inference benchmarking tool """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import array import collections import json import logging import os import sys import threading import time from queue import Queue import mlperf_l...
server.py
import socket import threading def fib(n): if n <= 2: return 1 return fib(n - 1) + fib(n - 2) def fib_server(address): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind(address) sock.listen(5) while True:...
resource_monitoring.py
# -*- coding: utf-8 -*- # @Author : ydf # @Time : 2019/9/18 0018 10:29 import datetime import json import socket import sys import threading import time import psutil from function_scheduling_distributed_framework.utils import LoggerLevelSetterMixin, LoggerMixin, decorators from function_scheduling_distributed_fram...
search.py
# -*- coding: utf-8 -*- def __auth_service(core, service_name, request): service = core.services[service_name] response = core.request.execute(core, request) if response.status_code == 200 and response.text: service.parse_auth_response(core, service_name, response.text) def __query_service(core, s...
upnp.py
import logging import threading from queue import Queue from typing import Optional try: import miniupnpc except ImportError: pass log = logging.getLogger(__name__) class UPnP: thread: Optional[threading.Thread] = None queue: Queue = Queue() def __init__(self): def run(): t...
vowel-analysis.py
# source: https://github.com/joshuamorton/Machine-Learning/blob/master/P3/analysis.py # source: https://github.com/iRapha/CS4641/blob/master/P3/analysis.py import argparse from pprint import pprint from StringIO import StringIO import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as pl...
athenad.py
#!/usr/bin/env python3.7 import json import os import hashlib import io import random import select import socket import time import threading import base64 import requests import queue from collections import namedtuple from functools import partial from jsonrpc import JSONRPCResponseManager, dispatcher from websocket...
batch.py
# -*- coding:utf8 -*- # File : batch.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 2/23/17 # # This file is part of TensorArtist. from .base import SimpleDataFlowBase from ...core.logger import get_logger from ...core.utils.concurrent import MTBooleanEvent from ...core.utils.meta import iter_...
mavlink.py
from __future__ import print_function import time import socket import errno import sys import os import platform import re import copy import dronekit from dronekit import APIException from dronekit.util import errprinter from pymavlink import mavutil, mavwp from queue import Queue, Empty from threading import Thread ...
conftest.py
try: from http.server import HTTPServer, SimpleHTTPRequestHandler except ImportError: from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler import ssl import threading import pytest from requests.compat import urljoin def prepare_url(value): # Issue #1483: Make...
__init__.py
import tkinter as tk from tkinter import filedialog, messagebox from os import path from utils import MyMouseKeyboard import time import threading from functools import partial import pyautogui as pygui import subprocess # subprocess.Popen is non-blocking # subprocess.call is blocking class Application(tk.Frame): ...
run_3.py
#!/usr/bin/env python from multiprocessing import Process, Queue import time def bad_ass_function(**kwargs): n = int(kwargs["n"]) q = kwargs["queue"] t = time.time u = t() + n while t() < u: pass return_str = "finished {}s of badass-ery".format(n) q.put(return_str) def dump_q...
test_ftplib.py
"""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 io import errno import os import threading import time import unittest try: import ssl except ImportError: ssl = None from unit...
bots.py
import requests import time import abc import random import string from multiprocessing import Process, Pipe # functions to generate random json data for API requests def GSIgen(): return {} def accgen(): return {'x': random.randrange(-5,5), 'y':random.randrange(-5,5)} def scangen(): return {'width':ran...
test_server.py
#!/usr/bin/env python3 # pylint: disable=protected-access # pylint: disable=no-self-use # pylint: disable=missing-docstring # pylint: disable=too-many-public-methods import time import threading import unittest import apocrypha.client from apocrypha.exceptions import DatabaseError from apocrypha.server import Server...
tasks.py
#!/usr/local/bin/python3 # coding: utf-8 # ytdlbot - tasks.py # 12/29/21 14:57 # __author__ = "Benny <benny.think@gmail.com>" import logging import os import pathlib import re import subprocess import tempfile import threading import time from urllib.parse import quote_plus import psutil import requests from apsche...
ipc_pipe_half_duplex.py
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ 使用多进程中的管道,它是半双工的,读写方向不固定 - 只允许具有亲缘关系的两个进程通信 """ import time from multiprocessing import Pipe, Process def func(conn1, conn2): conn2.close() # 子进程只需使用connection1,故关闭connection2 while True: try: msg = conn1.recv() ...
parity_check_helper.py
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # This s...
test_runner.py
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file acc...
misc_test.py
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import numpy as np import pytest import cntk from cntk.device import * import sys fr...
entitytest.py
#!/bin/env python3 from psydewalk.entity import * from psydewalk.geo import Coordinate from datetime import datetime from threading import Thread def wörkwörk(entity, dest): start = datetime.now() print('Start: ' + str(start)) entity.moveTo(dest) end = datetime.now() print('End: ' + str(end)) print('Durat...
client.py
"""Script for Tkinter GUI chat client.""" from socket import AF_INET, socket, SOCK_STREAM from threading import Thread import tkinter def receive(): """Handles receiving of messages.""" while True: try: msg = client_socket.recv(BUFSIZ).decode("utf8") msg_list.ins...
dataloader.py
import os import torch from torch.autograd import Variable import torch.utils.data as data import torchvision.transforms as transforms from PIL import Image, ImageDraw from SPPE.src.utils.img import load_image, cropBox, im_to_torch from opt import opt from yolo.preprocess import prep_image, prep_frame, inp_to_i...
yagami.py
#!/usr/bin/env python3 print("[YAGAMI] importing libraries") import sys import os import json import requests from typing import List from cleantext import clean import spacy import threading import queue from flask import Flask, request, json print("[YAGAMI] defining constants") # URL to submit processed strings URL_...
build_pretraining_dataset.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # 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 applicab...
import_thread.py
from collections import defaultdict import threading import traceback import redis import ray from ray import ray_constants from ray import cloudpickle as pickle from ray import profiling from ray import utils import logging logger = logging.getLogger(__name__) class ImportThread: """A thread used to import e...
bridge_customized.py
#!/usr/bin/env python3 # fuzzing parameter # motorcycle leading # not clear lane # other vehicles block the views of the lanes # other vehicle cut in lane # start at high speed (npc at high speed) # leading car stop/continue at traffic light (same lane and different lane) # radar input? moving pedestrian # ego ...
originServer2.py
# 4 main components # Serve edge servers # Send heartbeat to backup # Receive data from Content providers # Replicate data to backup from _thread import * import socket import sys import time import sched from threading import Timer, Thread import selectors import os from enum import Enum import pickle from threadin...
web_socket.py
from channels.generic.websocket import WebsocketConsumer from asgiref.sync import async_to_sync from django.http import HttpResponse from django.shortcuts import render, redirect from django.views.decorators.csrf import csrf_exempt import gevent import platform import django import re import json import hashlib import ...
dispatch.py
#!/usr/bin/env python import logging import os import psutil import riak import signal import socket import threading import time from collections import namedtuple from copy import deepcopy from pprint import pformat from assemblyline.common import net from assemblyline.common.exceptions import get_stacktrace_info ...
amqp.py
# --coding:utf-8-- # Copyright (c) 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 l...
downloader.py
""" Fancy parallel downloader for a pre- retrieved YoutubeDL() info_dict JSON. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣠⣤⣤⣄⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠖⠊⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠲⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⡤⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢢⠀⠀⠀⠀⠀⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣸⠁⠀⠀⠀⠀⠀⠀⠀⠱⡀⠀⠀⠀⠀⠀⠀⠀⡀⠈⠀⡀⠀⠀⠀⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⡏⠀⠀⠀⠀⠀⠀⠀⠀⡰⠁⠀⠀⠀⠀⠀⠀⠀⠘⡆⡜⠁⠀⠀⠀⠀⢧⡀⠀⠀⠀...
app.py
import warnings import dash import dash_core_components as dcc import dash_html_components as html warnings.filterwarnings('ignore') from dash.dependencies import Input, Output from multiprocessing import Process, Queue from utils import read_mongo, json_pandas from main import get_keywords from utils_app import get_...
arp_poison.py
''' Made By Sai Harsha Kottapalli Tested on python3 About : ARP poisoning Use : convince target and gateway to pass traffic through this. Note : need to notify localhost to forward packets (across gateway ip address and Target ip address) Kali: $echo 1 > /proc/sys/net/ipv4/ip_forward mac : $sudo sysctl ...
ssd_main_eval_fix.py
# Copyright 2018 Google. 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 agree...
sensor.py
#!/usr/bin/env python """ Copyright (c) 2014-2017 Miroslav Stampar (@stamparm) See the file 'LICENSE' for copying permission """ from __future__ import print_function # Requires: Python >= 2.6 import sys sys.dont_write_bytecode = True import core.versioncheck import inspect import math import mmap import optpars...
server_multiclient_test.py
import os import sys from queue import Queue from threading import Thread from helper.pytest import DoltConnection # Utility functions def print_err(e): print(e, file=sys.stderr) def query(dc, query_str): return dc.query(query_str, False) def query_with_expected_error(dc, non_error_msg , query_str): ...
sekiro_stream_monitor_healthbars.py
import os import subprocess import shutil from threading import Thread, Event from listeners import create_mouse_listener, create_keyboard_listener # from collect_episodes import * from handlers import audiohandler, videohandler if __name__ == "__main__": # if os.path.exists('episodes'): # shutil.rmtree('...
framework.py
#!/usr/bin/env python3 from __future__ import print_function import gc import logging import sys import os import select import signal import subprocess import unittest import tempfile import time import faulthandler import random import copy import psutil import platform from collections import deque from threading i...
kpi_analyzer.py
#!/usr/bin/python # Filename: kpi_analyzer.py """ kpi_analyzer.py An abstraction for KPI analyzer Author: Yuanjie Li """ is_android = False try: from jnius import autoclass # For Android try: from service import mi2app_utils PythonService = autoclass('org.kivy.android.PythonService') ...
ue_mac.py
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
utils.py
#================================================================ # # File name : utils.py # Author : PyLessons # Created date: 2020-09-27 # Website : https://pylessons.com/ # GitHub : https://github.com/pythonlessons/TensorFlow-2.x-YOLOv3 # Description : additional yolov3 and yolov4 functio...
routes_frontend.py
import json import os import requests import sys import uuid from flask import render_template, request, redirect from threading import Thread from time import sleep from . import main from .recipe_parser import PicoBrewRecipe, PicoBrewRecipeImport, ZymaticRecipe, ZymaticRecipeImport, ZSeriesRecipe from .se...
localshell.py
from subprocess import Popen, PIPE from .abstractshell import AbstractShell from .shellresult import ShellResult from .streamreader import StandardStreamReader from .queue import Queue from threading import Thread from shutil import copyfile from os import chmod, stat, environ from logging import CRITICAL class Local...
sublimecp.py
import sublime import sublime_plugin import subprocess import os import threading from stat import * sublime_version = 2 if not sublime.version() or int(sublime.version()) > 3000: sublime_version = 3 if sublime.platform() == 'windows': import ctypes from ctypes import c_int32, c_uint32, c_void_p, c_wcha...
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...
client.py
# Copyright 2016 Pavle Jonoski # # 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 agreed to in writing...
itcproxy.py
#!/usr/bin/env python # # Copyright 2017 Michal Belica <https://beli.sk> # # 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
from threading import Thread from collections import defaultdict, deque import socket import socketserver from ..constants import PORT, Headers, Roles import json class Request: def __init__(self, message, address): message = json.loads(message) self.header = message['header'] self...
data_plane.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...
common_utils.py
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
HTTPServer.py
from BaseHTTPServer import HTTPServer as GrandparentServer, BaseHTTPRequestHandler as GrandparentHandler import socket from time import sleep from Settings import PORT from utils import * from rorn.HTTPServer import HTTPServer as ParentServer from rorn.Lock import getLock, getCounter class ServerError(Exception): pa...
dataset_generator.py
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # 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 la...
common.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 law ...