source
stringlengths
3
86
python
stringlengths
75
1.04M
subprocess_server_test.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...
application.py
import asyncio import os import re import signal import sys import threading import time from asyncio import ( AbstractEventLoop, CancelledError, Future, Task, ensure_future, new_event_loop, set_event_loop, sleep, ) from contextlib import contextmanager from subprocess import Popen from ...
lookout.py
#!/usr/bin/env python3 PORT = 9890 import flask, os, sys, time, psutil, json, socket from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from multiprocessing import Process, Manager if getattr(sys, 'frozen', None): static = os.path.join(sys._MEIPASS, 's...
derpbox_agent.py
#!/usr/bin/env python """derpbox_agent.py: module containing DerpBoxAgent and other related classes""" import argparse import json import threading from time import sleep, time as get_time import requests from watchdog.observers import Observer from derpbox_synchronizer import DerpboxSynchronizer from eventhandlers i...
test_params.py
import os import threading import time import tempfile import shutil import stat import unittest from common.params import Params, UnknownKeyName, put_nonblocking class TestParams(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp() print("using", self.tmpdir) self.params = Params(self....
start_all_test.py
import os import time import json5 import argparse from threading import Thread from job_manage import JobManager class Config(object): def __init__(self, rest_server_url, hdfs_url, webhdfs_url, PAI_username, PAI_password, jobs): self.rest_server_url = rest_server_url self.hdfs_url = hdfs_url ...
clsv_server.py
import logging import socket import threading from logging.config import fileConfig from crdt.clock_id import ClockID from crdt.ops import RemoteOp from crdt.vector_clock import VectorClock from network.network_client import NetworkClient, pack_and_send, recvall from tools.connected_peers import ConnectedPeers from to...
RotaryEncoder.py
import threading import time from RPi import GPIO # # GPIO pins (BCM) # GPIO_PIN_CLK = 17 GPIO_PIN_DT = 18 GPIO_PIN_BUTTON = 14 class RotaryEncoder(): __last_value = 0 def __init__(self): GPIO.setmode(GPIO.BCM) GPIO.setup(GPIO_PIN_CLK, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setu...
_a4c_create.py
from cloudify import ctx from cloudify import utils from cloudify.exceptions import NonRecoverableError from StringIO import StringIO import base64 import os import platform import re import subprocess import sys import time import threading import platform import json def convert_env_value_to_string(envDict): ...
train.py
import argparse import json import os import shutil import time import torch.optim as optim from torch.utils.data import DataLoader from tqdm import tqdm from config import * import dataset from model import SCNN from model_ENET_SAD import ENet_SAD from model_SEENET_SAD import #from utils.tensorboard import TensorBoa...
dockerTest.py
# Copyright (C) 2015-2021 Regents of the University of California # # 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...
run.py
import os import threading import subprocess as sp RESULT_DRECTORY = 'results' class Runner: def __init__(self, cmd): self.cmd = cmd def run_it(self): os.system(self.cmd) def run_vendor(vendor_dir, vendor): print "Running vendor: " + vendor p = sp.Popen("find {} -name 'squashfs-root...
tests.py
from __future__ import unicode_literals import threading import warnings from datetime import datetime, timedelta from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, DatabaseError, connections from django.db.models.fields import Field from django.db.m...
surface_stats_collector.py
# Copyright (c) 2012 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 Queue import datetime import logging import re import threading from pylib import perf_tests_helper # Log marker containing SurfaceTexture time...
bucket.py
################################################################################ # The Pyretic Project # # frenetic-lang.org/pyretic # # author: Srinivas Narayana (narayana@cs.princeton.edu) ...
perform_test_run.py
#!/usr/bin/env python # # Pavel Kirienko <pavel.kirienko@gmail.com> # # ESC testing utility # from __future__ import print_function import sys, time, threading, logging from functools import partial from drivers.ardubenchmark import Ardubenchmark # Safety feature TODO: command line option for that HALF_DUTY_CYCLE = F...
iter8-trend.py
#!/usr/local/Cellar/python/3.7.6_1/bin/python3.7 ##!/usr/bin/python from __future__ import print_function from kubernetes import client, config from dateutil.parser import parse from datetime import datetime, timezone, timedelta from string import Template from prometheus_client import start_http_server from prometheu...
hp_elm.py
# -*- coding: utf-8 -*- """ Created on Mon Oct 27 17:48:33 2014 @author: akusok """ import numpy as np import multiprocessing as mp from six.moves import xrange from six import string_types from time import time from .modules import make_hdf5, _ireader, _iwriter, _prepare_fHH, _write_fHH from tables import open_file ...
main.py
import json,fortniteAPI,functions,MultipleClients,os,UpdateCheck from functools import partial from Events import ready,friends,party,message from threading import Thread try: import fortnitepy,asyncio,aiofiles from termcolor import colored from flask import Flask except: os.system("pip3 inst...
test_proxy2.py
import threading import websocket import json def on_open(ws): print("opened") auth_data = { "action": "authenticate", "data": {"key_id": "INSERT_KEY", "secret_key": "INSERT_KEY"} } ws.send(json.dumps(auth_data)) listen_message = {"action": "listen", "data": {"streams": ["T.TSLA"...
video_get.py
from threading import Thread import cv2 from queue import Queue from time import sleep class VideoGet: """ Class that continuously gets frames from a VideoCapture object with a dedicated thread, which actually speeds up the video reading 2 times faster than working in the main UI Thread. """ ...
base.py
# Copyright (c) 2008-2010 Aldo Cortesi # Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Kenji_Takahashi # Copyright (c) 2011 Paul Colomiets # Copyright (c) 2012 roger # Copyright (c) 2012 Craig Barnes # Copyright (c) 2012-2015 Tycho Andersen # Copyright (c) 2013 dequis # Copyright (c) 2013 David R. Andersen # ...
5.py
# Dancing Dron - CrazyFly dancing for music beat # Cnaan Aviv 2013-10-05 import time, sys import usb from threading import Thread import logging import cflib from cflib.crazyflie import Crazyflie from cfclient.utils.logconfigreader import LogConfig from cfclient.utils.logconfigreader import LogVariable ...
button_and_led.py
import logging import threading import RPi.GPIO as GPIO logger = logging.getLogger('EInkUI') class ButtonAndLed: def __init__(self, controller, button_gpio=26, led_gpio=21): self.button_gpio = button_gpio self.controller = controller GPIO.setmode(GPIO.BCM) GPIO.setup(button_gpio,...
Minecraft.py
import json import threading import time from datetime import datetime import requests from mcrcon import MCRcon from apps.bot.classes.bots.Bot import get_bot_by_platform from apps.bot.classes.consts.Consts import Role from apps.bot.classes.consts.Exceptions import PWarning from apps.bot.models import Profile from ap...
remotehost.py
# Host class # Copyright (c) 2016, Qualcomm Atheros, Inc. # # This software may be distributed under the terms of the BSD license. # See README for more details. import logging import subprocess import threading import tempfile import os import traceback import select logger = logging.getLogger() def remote_compatib...
conftest.py
# Copyright 2019 Axis Communications AB. # # For a full list of individual contributors, please see the commit history. # # 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.apac...
fit_rotation_curves.py
''' Create moment maps compatible with DiskFit, run DiskFit, and create useful outputs. ''' from astropy.io import fits from astropy import log from spectral_cube import SpectralCube import numpy as np import os from threading import Thread from galaxies import Galaxy from cube_analysis.rotation_curves import (run_d...
bilibili.py
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- """Bilibili Toolkit 哔哩哔哩工具箱 https://github.com/Hsury/Bilibili-Toolkit""" banner = r""" \\ // \\ // ##################### ________ ___ ___ ___ ________ ___ ___ ___ ## ## |\ ...
main.py
import logging from datetime import datetime from functools import partial from multiprocessing import Process, Queue from time import monotonic from typing import List, Tuple from asciimatics.effects import Print from asciimatics.event import Event, KeyboardEvent from asciimatics.exceptions import ResizeScreenError, ...
tpu_estimator.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
master_script.py
from mask_gui import run_mask_gui import os import sys from multiprocessing import Process, freeze_support sys.path.insert(0, 'C:/Users/koester_lab/Documents/Maria/ZebraFishRegistrationPipeline/Visualization') from movie_gui import run_movie_gui from detrend_data import detrend_file from segmentation import segmentatio...
efknockr.py
#!/usr/bin/env python # EFknockr (EFK) - Developed by acidvegas in Python (https://acid.vegas/efknockr) # efknockr.py ''' For all questions, comments, & concerns, please join #5000 on irc.supernets.org ''' import argparse import concurrent.futures import os import random import socket import ssl import string import ...
test_server_debugger.py
import socket import threading import time import unittest import sys from io import StringIO from server_debugger import EgtsServerDebugger from egts import * class TestServerDebugger(unittest.TestCase): """Tests for EgtsServerDebugger class""" def setUp(self): self.port = 9092 self.host = ...
runner.py
import argparse import json import logging import os import threading import time import traceback import colors import docker import numpy import psutil from ann_benchmarks.algorithms.definitions import (Definition, instantiate_algorithm) from ann_benchmarks.dataset...
jetsonvideostream.py
# import the necessary packages from threading import Thread import cv2 # Raspberry Pi Camera V2: # Full resolution: (3280, 2646), FOV: 62.2 deg H, 48.8 deg V # GStreamer supported full resolution: (3264, 2464), 21 FPS, FOV: 62 deg H, 48.8 deg V # Preferred resolution: (3264,1848), 28FPS, FOV: 62 deg H, 37 deg V clas...
bot.py
import re import time import queue import logging import threading import collections import json as json_ import os import psutil import websocket import interactive_conditional_samples as GPT WS_URL = "ws://127.0.0.1:6700/ws" # WebSocket 地址 NICKNAME = ["BOT", "ROBOT"] # 机器人昵称 SUPER_USER = [123754545...
file_prep.py
import os from fsl.eddy_correct_diff import eddy_corr def basic_files(cortex_only=True,atlas_type='mega'): if atlas_type == 'mega': if cortex_only: atlas_label = r'C:\Users\Admin\my_scripts\aal\megaatlas\MegaAtlas_cortex_Labels.nii' else: atlas_label = r'C:\Users\Admin\my_s...
main.py
import os, sys from threading import Thread, Timer from bokeh.layouts import column, row from bokeh.models import Button from bokeh.plotting import curdoc, figure from bokeh.models.widgets import Div from functools import partial try: import datashader except ImportError: datashader = None print("\n\nThe d...
mine.py
import os import shutil import time import threading from flask import jsonify, make_response from flask_restful import Resource, Api, reqparse from repominer.mining.ansible import AnsibleMiner from repominer.mining.tosca import ToscaMiner class Mine(Resource): def __init__(self, **kwargs): self.db = kw...
plugin.py
### # Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2008-2010, James McCoy # Copyright (c) 2010-2021, Valentin Lorentz # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistrib...
server.py
import socket import pickle from threading import Thread from tools import * from config import * from betterlog import log # Setting up server server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) log('Successfully created server_socket').header() server_socket.setsockopt(socket.SOL_SOCKET, sock...
MVC2_5G_Orc8r_deployment_script.py
#!/usr/bin/env python3 """ 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" BAS...
GenericsServiceServer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
app.py
#https://github.com/erm/asgi-examples #https://github.com/pgjones/quart/blob/master/docs/deployment.rst ##JavaScript: # https://stackoverflow.com/questions/16532577/javascript-refresh-countdown-text # http://psoug.org/snippet/Javascript-Countdown-to-link-enable_128.htm # https://stackoverflow.com/questions/90271...
visualizer.py
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
useCase.py
from threading import Thread class UseCase: done = False initialized = False progress = 0 asynchronous = False thread = False response = False def __init__(self): self.done = False initialized = False progress = 0 asynchronous = False response = Fa...
dirichlet_distributions.py
"""Statistical Manifold of Dirichlet distributions with the Fisher metric.""" import logging import math import multiprocessing from scipy.integrate import odeint, solve_bvp from scipy.stats import dirichlet import geomstats.backend as gs import geomstats.errors from geomstats.algebra_utils import from_vector_to_dia...
mock_csw_source.py
from __future__ import print_function import json import logging import SimpleHTTPServer import SocketServer import xml.etree.ElementTree as ET from threading import Thread from urlparse import parse_qs import pkg_resources log = logging.getLogger("harvester") PORT = 8998 class MockCSWHandler(SimpleHTTPServer.Simp...
multi_agent_communication.py
import select, socket, sys import pickle from multiprocessing import Process, Queue import time import numpy as np HEADERSIZE = 10 N_AGENTS = 6 def test_agent_communication(view, server, neighbors): neighbor_sockets = setup_connections(view, server, neighbors) time.sleep(2) for i in neighbor_sockets: ...
installwizard.py
from functools import partial import threading from kivy.app import App from kivy.clock import Clock from kivy.lang import Builder from kivy.properties import ObjectProperty, StringProperty, OptionProperty from kivy.core.window import Window from kivy.uix.button import Button from kivy.utils import platform from kivy...
test.py
from threading import Thread from time import sleep def sleepy(): sleep(5) print("i wake up") def testing(): if True: test = Thread(target=sleepy) test.start() print("out of if") return "maybe different" print(testing())
test_socket.py
import unittest from test import support from test.support import socket_helper import errno import io import itertools import socket import select import tempfile import time import traceback import queue import sys import os import platform import array import contextlib from weakref import proxy import signal impor...
distributed.py
""" Pytorch Distributed utils This piece of code was heavily inspired by the equivalent of Fairseq-py https://github.com/pytorch/fairseq """ import os import signal import math import pickle import torch.distributed from onmt.utils.misc import set_random_seed from onmt.utils.logging import init_logger, logger...
acceptor.py
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
tcpserver.py
#!/usr/bin/env python3 from __future__ import print_function import socket import threading try: import socketserver except ImportError: import SocketServer as socketserver import time import os import signal import sys import struct import errno from fprime.constants import DATA_ENCODING from optparse import...
webservice_engine.py
import http.server import urllib.parse import json import os import logging import socketserver from threading import Thread from webcommon.base_webservice import BaseWebService, HTTPStatus class ThreadedHTTPServer(socketserver.ThreadingMixIn, http.server.HTTPServer): """ Allows support for asynchronous behaviou...
count_server.py
from contextlib import contextmanager from multiprocessing import Process from time import sleep import trio from globalCounter.server.counter_server import UDPCounterServer, TCPCounterServer from globalCounter.server.async_counter_server import AsyncTCPCounterServer, AsyncUDPCounterServer @contextmanager def global...
test_threads.py
from __future__ import absolute_import import subprocess import threading from pyq import _k import os import sys def test_m9_in_thread(): def call_m9(): _k.m9() thread = threading.Thread(target=call_m9) thread.start() thread.join() if sys.version_info >= (3, ): MT_PEACH_CODE = "from th...
dark-mael.py
# -*- coding: utf-8 -*- import os, sys, time, datetime, random, hashlib, re, threading, json, getpass, urllib, requests, mechanize from multiprocessing.pool import ThreadPool from requests.exceptions import ConnectionError from mechanize import Browser reload(sys) sys.setdefaultencoding('utf8') br = mechanize.Browser...
test_neuron.py
""" UnitTests of the python interface to the neuron class. Items declared in neuron/__init__.py $Id$ """ import unittest import neuron from neuron import h class NeuronTestCase(unittest.TestCase): """Tests of neuron""" def testHClass(self): """Test subclass of hoc class.""" from ._subclass ...
demo.py
import pika import jarvisled import button import threading from threading import Thread import time import RPi.GPIO as GPIO living_room_led = 17 bedroom_led = 27 hall_led = 22 living_room_button = 12 hall_button = 18 host = 'andrelago.eu' username = 'rabbitmq' password = 'rabbitmq' bedroom_queue = '/house/bedroom_li...
game_wrapper.py
import os import re import signal import tempfile import subprocess import multiprocessing import threading import time import numpy as np import cv2 import config import win32pipe, win32file, win32api, win32con, win32job, pywintypes, msvcrt def is_int16(str): try: int(str, 16) return True ex...
database.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """ These tests check the database is functioning properly, both in memory and in its file """ import datetime import func...
module.py
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
uniprot.py
import requests import csv from typing import List, Tuple import Bio import threading import time from Bio.Blast import NCBIWWW results = [] threads = [] def blastn_helper(sequence: str): print("starting thread"+sequence, flush=True) blast_result = NCBIWWW.qblast('blastp', 'nr', sequence, hitlist_size=1) ...
interactions.py
#!/usr/bin/env python """ MIT License Copyright (c) 2020-2021 Linus Bartsch 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, c...
test_random.py
import warnings import numpy as np from numpy.testing import ( assert_, assert_raises, assert_equal, assert_warns, assert_no_warnings, assert_array_equal, assert_array_almost_equal, suppress_warnings ) from numpy import random import sys class TestSeed: def test_scala...
control.py
"""Contains RAPO control interface.""" import datetime as dt import json import multiprocessing as mp import sys import threading as th import time as tm import traceback as tb import sqlalchemy as sa from ..database import db from ..logger import logger from ..reader import reader from ..utils import utils class ...
SendEmail.py
import sys if sys.version_info < (3, 0): # Python 2 from Tkinter import * from threading import * import tkMessageBox as messagebox else: # Python 3 from tkinter import * from tkinter import messagebox from tkinter import constants from threading import * from smtplib import * class Application(Frame): send...
test_db.py
import sqlite3 import sys import threading from unittest import mock import pytest from .. import ( Database, Namespace, ) from .. import cursor as cursor_ from .. import ( database, query, script, ) from . import util def test_init(db): assert '__root__' in db.namespaces assert 'address...
test_aps_planner.py
import logging import time from threading import Thread from unittest import TestCase from unittest.mock import MagicMock from apscheduler.schedulers import SchedulerAlreadyRunningError, SchedulerNotRunningError from apscheduler.schedulers.base import STATE_RUNNING, STATE_STOPPED, STATE_PAUSED import databay from dat...
speaker.py
from pygame import mixer from gtts import gTTS from threading import Thread import os import uuid import time class speaker: queue = [] inPlay = False def __init__(self, lng): self.lng = lng def say(self, text): trackname = 'tmp/' + str(uuid.uuid4()) + '.mp3' info = {'name': trackname, 'play': F...
im2rec.py
#!/usr/bin/env python3 # -*- 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 Licens...
reactivebebop.py
import numpy import threading import time import roslib try: roslib.load_manifest('msgs_to_cv2') except: pass import rospy from std_msgs.msg import Empty from std_msgs.msg import Bool from geometry_msgs.msg import Twist from bebop_msgs.msg import CommonCommonStateBatteryStateChanged as Battery import termios import s...
convert_tfrecords.py
# Copyright 2018 Changan Wang # 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, so...
main.py
import json import os from argparse import ArgumentParser from google.cloud import storage as st from trainference import trainference KEYS = ['pid', 'study', 'args', 'last_sync', 'last_sync_update'] def validate_json(s): data = json.loads(s) # Same lengths. if len(data) != len(KEYS): return False ...
realtimehandposepipeline.py
"""Class for running the handpose estimation pipeline in realtime. RealtimeHandposePipeline provides interface for running the pose estimation. It is made of detection, image cropping and further pose estimation. Copyright 2015 Markus Oberweger, ICG, Graz University of Technology <oberweger@icg.tugraz.at> This file ...
challenge.py
import time import uuid from threading import Thread from django.core.cache import cache from .queue import QueueCommand from ...models import TwitchUser from ..command import Command, CommandException from ...queue import Queue from ... import twitch """ !challenge <user> !cancel !accept !decline !match Closest matc...
mlExp7.py
# 测试Gist特征+kNN的小样本性能 from PIL import Image from sklearn.neighbors import KNeighborsClassifier import numpy as np import random as rd import os import matplotlib.pyplot as plt from time import time from multiprocessing import Process, Queue import warnings from modules.utils.gist import getGists from modules.utils.dl...
dataset.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import rospy import torch import pandas as pd import threading from std_msgs.msg import String, Header from ros_example_torch_classifier.srv import Dump, DumpResponse from ros_example_torch_classifier.msg import StringStamped from ros_example_torch_classifier.utils import...
test_bz2.py
from test import support from test.support import bigmemtest, _4G import array import unittest from io import BytesIO, DEFAULT_BUFFER_SIZE import os import pickle import glob import tempfile import pathlib import random import shutil import subprocess import threading from test.support import import_helper from test.s...
ClientSoc.py
# coding=UTF-8 # python version 3.5 import socket import sys import time import threading port = 60007 # 开启ip和端口 server_ip_port = ('localhost', port) # 生成句柄 webClient = socket.socket(socket.AF_INET, socket.SOCK_STREAM) global isclose isclose = False global isRecv isRecv = '' def startClient(): ...
gstreamer.py
import asyncio import gi import multiprocessing import queue from functools import partial from typing import Optional from .utils import EventEmitter, get_logger logger = get_logger(__name__) gi.require_version('Gst', '1.0') gi.require_version('GstRtspServer', '1.0') from gi.repository import GLib, Gst, GstRtspServ...
test_notificationlog.py
from math import ceil from threading import Thread from uuid import uuid4 from eventsourcing.domain.model.events import DomainEvent from eventsourcing.infrastructure.repositories.array import BigArrayRepository from eventsourcing.interface.notificationlog import BigArrayNotificationLog, NotificationLogReader, \ No...
prog2.py
# -*- Encoding: utf-8 -*- from variables import * #Se importa la informacion del archivo variables.py donde esta definido el valor de pasajeros minimos y el numero de paradas import turtle from tkinter import PhotoImage import threading import time import random from random import randint # !/usr/bin/python num_parada...
imagemix.py
from kivy.clock import Clock from kivy.uix.screenmanager import ScreenManager from outputscreen import OutputScreen from configscreen import ConfigScreen from contentscreen import ContentScreen from stylescreen import StyleScreen from fastgraphconfigscreen import FastGraphConfigScreen from fastergraphconfigscreen imp...
mappfinder.py
###mappfinder #Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California #Author Nathan Salomonis - nsalomonis@gmail.com #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 Softwar...
manage_athenad.py
#!/usr/bin/env python3 import time from multiprocessing import Process from common.params import Params from selfdrive.manager.process import launcher from selfdrive.swaglog import cloudlog from selfdrive.version import get_version, get_dirty ATHENA_MGR_PID_PARAM = "AthenadPid" def main(): params = Params() do...
ImageBeamCalibrator.py
# -*- coding: iso-8859-1 -*- # The Leginon software is Copyright 2004 # The Scripps Research Institute, La Jolla, CA # For terms of the license agreement # see http://ami.scripps.edu/software/leginon-license # import threading import wx from leginon.gui.wx.Entry import IntEntry, FloatEntry import leginon.gui.wx.Calibr...
myssh.py
#coding:utf-8 from __future__ import division import os import sys import readline import time import yaml import re import platform import threading for path in sys.path: if re.search('\/myssh.+?.egg', path) : sys.path.append(path+'/myssh') break import tab import config import data import s...
train_sampling_multi_gpu.py
import dgl import numpy as np import torch as th import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.multiprocessing as mp import dgl.nn.pytorch as dglnn import time import math import argparse from torch.nn.parallel import DistributedDataParallel import tqdm from utils impor...
complex_fourier.py
#!/usr/bin/env python """This module allows the creation of visualization using complex Fouriers given by one one more components. Also a special case of this known as "spirograph" can easily be configured and drawn.""" from __future__ import annotations from typing import List, Optional import time from math import ...
iocsoar.py
#!/usr/bin/env python3 import os import socket import modules import logging import re as regex from time import sleep from threading import Thread from ipaddress import ip_address from importlib import import_module from tendo import singleton as Check from config import LogProfile, LoadConfig from pyotrs import Artic...
Peer.py
from multiprocessing import Process, Queue from P2pClient import P2pClient from P2pServer import P2pServer from constants import * def listen_for_peers(q): server = P2pServer() q.put(server.hole_punching()) server.listen_for_new_peer() def main(): client = P2pClient(TRACKER_HOST, TRACKER_PORT) c...
trainer.py
# Lint as: python2, python3 # Copyright 2018 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 # ...
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...
__init__.py
import re import argparse __all__ = ["GlasgowAppletError", "GlasgowApplet", "GlasgowAppletTool"] class GlasgowAppletError(Exception): """An exception raised when an applet encounters an error.""" class GlasgowApplet: all_applets = {} def __init_subclass__(cls, name, **kwargs): super().__init_...
TestServiceCallsServer.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...
packet_capture.py
""" Thread that continuously captures and processes packets. """ import scapy.all as sc import threading import time from host_state import HostState import utils class PacketCapture(object): def __init__(self, host_state): assert isinstance(host_state, HostState) self._host_state = host_state...