source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
pushbullet.py | """
Pushbullet platform for sensor component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.pushbullet/
"""
import logging
import voluptuous as vol
from homeassistant.const import (CONF_API_KEY, CONF_MONITORED_CONDITIONS)
from homeassistant.com... |
data_store_test.py | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""These are basic tests for the data store abstraction.
Implementations should be able to pass these tests to be conformant.
"""
import csv
import functools
import hashlib
import inspect
import logging
import operator
import os
import random
import stri... |
settings_20210906114121.py | """
Django settings for First_Wish project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathli... |
ring_bot.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# -----------------------------------------------------------
# bot
# created 01.10.2021
# Thomas Kaulke, kaulketh@gmail.com
# https://github.com/kaulketh
# -----------------------------------------------------------
import os
import signal
import time
from multiprocessing imp... |
VideoStream.py |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for
# full license information.
from threading import Thread
import sys
import cv2
from queue import Queue
# This class reads all the video frames in a separate thread and always has the
# keeps o... |
array_utils.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... |
timing_utils.py | # -*- coding: utf-8 -*-
"""
Created on Sun May 24 22:08:53 2015
This file provides tools for better locking of timing in python programs
@author: Ian Spielman
"""
import time
from Queue import Queue
from threading import Thread
#
# Thread programs that run independentally and monitor timing
#
def ... |
ChannelPointsSFXTrigger_StreamlabsSystem.py | # -*- coding: utf-8 -*-
#---------------------------
# Import Libraries
#---------------------------
import clr, codecs, json, os, re, sys, threading, datetime, System
# Include the assembly with the name AnkhBotR2
clr.AddReference([asbly for asbly in System.AppDomain.CurrentDomain.GetAssemblies() if "AnkhBotR2" in... |
test.py | import argparse
import json
import os
from pathlib import Path
from threading import Thread
import numpy as np
import torch
import yaml
from tqdm import tqdm
from models.experimental import attempt_load
from utils.datasets import create_dataloader
from utils.general import coco80_to_coco91_class, check_dataset, check... |
es_index_listener.py | """\
Example.
%(prog)s production.ini
"""
from webtest import TestApp
from snovault import STORAGE
from snovault.elasticsearch import ELASTIC_SEARCH
import atexit
import datetime
import elasticsearch.exceptions
import json
import logging
import os
import psycopg2
import select
import signal
import socket
import ... |
app.py | from flask import Flask
from flask.blueprints import Blueprint
from flask_cors import CORS
import routes
import config
import threading
import logging
from services.kf_services import process_HTML_kf
import time
html2json_app = Flask(__name__)
log = logging.getLogger('file')
try:
t1 = threading.Thread(target=pr... |
connection.py | # Modules names in alphabetical order
import os,re,select,socket,sys,threading,time
class ConnectionError(Exception):
def __init__(self,name,code,mesg):
self.name = name
self.code = int(code)
self.mesg = mesg
def __str__(self):
return "[Connection Error %d] %s : %s" % (self.code,self.name,self.mesg)
class... |
P2PChat-UI.py | #!/usr/bin/python3
# Student name and No.:
# Student name and No.:
# Development platform:
# Python version: 3.6
# Version:1
##Hi
from tkinter import *
import sys
import socket
import threading
import time
import select
#
# Global variables
#
#user stuff
myUsername = ""
myHashID = None
myAddr... |
tornado.py | import asyncio
import fnmatch
import json
import logging
import os
import threading
import time
import webbrowser
from functools import partial
from typing import Dict
from urllib.parse import urlparse
import tornado
import tornado.httpserver
import tornado.ioloop
from tornado.web import StaticFileHandler
from tornado... |
main.py | #code:utf8
import torch
import os
from losses.main import get_loss
import numpy as np
from tqdm import tqdm
from torch import nn
import math
import val
import models.bn_inception as network
import models.embed as embed
import torchvision.models as model
from sample_data.sample_data import Preprocess
import threading
im... |
testing.py | import random
import os
import sys
import gi
gi.require_version('Gtk', '3.0')
from twisted.internet import gtk3reactor
import threading
gtk3reactor.install()
from gi.repository import GLib, Gtk, GObject
import time
from twisted.internet import reactor
from base import SignalObject
class BaseDevice(SignalObject):
... |
cache.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the QueryCache functionality of johnny."""
import django
from django.conf import settings
from django.db import connection
try:
from django.db import connections
except:
connections = None
from johnny import middleware
from johnny import settings as j... |
wukong.py | # -*- coding: utf-8-*-
import random
import threading
from snowboy import snowboydecoder
from robot import config, utils, constants, logging, statistic, Player
from robot.Updater import Updater
from robot.ConfigMonitor import ConfigMonitor
from robot.Conversation import Conversation
from server import server
from watc... |
cloudevents-receiver.py | #!/usr/bin/env python3
# copy to /usr/local/bin/cloudevents-receiver and use with cloudevents.service
import blinkt
import colorsys
import json
import random
import threading
import time
from flask import Flask, request
from cloudevents.http import from_http
app = Flask(__name__)
stop = threading.Event()
lock = threa... |
servidor_web.py | #!/usr/bin/env python3
# Authors:
# Brito Segura Angel
# Tovar Herrera Carlos Eduardo
# Zazueta Barajas Sebastián Pedro
# License: MIT
# Version 1.4
# Date: 07/12/2021
# Description: Servidor web para Control de Invernadero
# Paquetes para crear el servidor web
import os
import sys
import json
import magic
from http... |
python_layers.py | import sys
sys.path.insert(0, '../../python/')
import caffe
import random
import numpy as np
from threading import Thread
import pdb
from python_utils import *
class sortDataRead(object):
def __init__(self, data, batch_size, max_value, thread_result):
self.data = data
self.n = data.shape[0]
self.len_seq... |
PlexConnect.py | #!/usr/bin/env python
"""
PlexConnect
Sources:
inter-process-communication (queue): http://pymotw.com/2/multiprocessing/communication.html
"""
import sys, time
from os import sep
import socket
from multiprocessing import Process, Pipe
from multiprocessing.managers import BaseManager
import signal, errno
from Versi... |
door_adapter.py | import sys
import yaml
import argparse
import time
import threading
import rclpy
from DoorClientAPI import DoorClientAPI
from rclpy.node import Node
from rclpy.time import Time
from rmf_door_msgs.msg import DoorRequest, DoorState, DoorMode
#############################################################################... |
dense_update_ops_test.py | <<<<<<< HEAD
# Copyright 2015 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 requir... |
app.py | """
* Copyright 2019 EPAM Systems
*
* 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,... |
inference_server.py | import zmq
import sys
import gflags
import time
import multiprocessing
import threading
import msgpack
import msgpack_numpy
msgpack_numpy.patch()
from .sparsify_traj import find_sparsifier
gflags.DEFINE_string('addr', '', '')
gflags.DEFINE_string('weights_file', '', '')
gflags.DEFINE_integer('n_worker', 1, '')
FLAG... |
keylime_agent.py | #!/usr/bin/python3
'''
SPDX-License-Identifier: Apache-2.0
Copyright 2017 Massachusetts Institute of Technology.
'''
import asyncio
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
from socketserver import ThreadingMixIn
import threading
from urllib.parse import urlparse
import base64
imp... |
test_cli.py | #!/usr/bin/python
"""
(C) 2018,2019 Jack Lloyd
Botan is released under the Simplified BSD License (see license.txt)
"""
import subprocess
import sys
import os
import logging
import optparse # pylint: disable=deprecated-module
import time
import shutil
import tempfile
import re
import random
import json
import binasc... |
hot_reload.py | #!/usr/bin/env python
# coding:utf-8
from flask import Flask, request
import threading
import time
global_value = "voila"
def worker(global_value):
time.sleep(5)
global_value = "HAHAHA"
t = threading.Thread(target=worker,args=(global_value))
t.setDaemon(True)
t.start()
app = Flask(__name__)
@app.rout... |
test_util.py | # Copyright 2015 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... |
arcus_util.py | #
# arcus-python-client - Arcus python client drvier
# Copyright 2014 NAVER Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
messenger.py | import importlib
import traceback
import sys
import zuullogger
import storage
import threading
class Messenger(object):
''' abstract class to load the real used messenger as plugin
TODO: There is not much wrapping in the moment... In case we'll going to add another messenger, then a lot of wrapping need to be done... |
test_nanny.py | import asyncio
import gc
import logging
import multiprocessing as mp
import os
import random
from contextlib import suppress
from time import sleep
from unittest import mock
import psutil
import pytest
pytestmark = pytest.mark.gpu
from tlz import first, valmap
from tornado.ioloop import IOLoop
import dask
from dask... |
testserver.py | """
This is a simple web-server that does very few things. It is necessary for
the downloader tests.
Here is the logic behind the initialization:
Because several instances of the test can run simultaneously on the Build
machine, we have to take this into account and not start another server if
one is already runn... |
bootstrap.py | """
Bootstrap an installation of TLJH.
Sets up just enough TLJH environments to invoke tljh.installer.
This script is run as:
curl <script-url> | sudo python3 -
Constraints:
- Entire script should be compatible with Python 3.6 (We run on Ubuntu 18.04+)
- Script should parse in Python 3.4 (since we exit with... |
api.py | import os
import sys
import logging
import paramiko
import subprocess
import multiprocessing
if sys.version_info.major == 2:
from environment import Environment
else:
from yarn.environment import Environment
from getpass import getpass
from contextlib import contextmanager
from paramiko.ssh_exception import Aut... |
ffctrl.py | from __future__ import print_function
import json
from queue import Queue
import socket
import threading
# Python 3 compatibility
try:
input = raw_input
except NameError:
pass
class FirefoxRemoteControl(object):
''' Interact with a web browser running the Remote Control extension. '''
def __init__(sel... |
tractrac.py | #!/usr/bin/env python
#%%
#==============================================================================
# TRACTRAC -Masive Object Tracking Software
#==============================================================================
#usage: tractrac.py [-h] [-f FILE] [-tf TFILE] [-mmf MOTIONMODELFILE] [-a]
# ... |
self_contained_components.py | #!/usr/bin/env python
# Lint as: python3
"""Functions to run individual GRR components during self-contained testing."""
import atexit
import collections
import os
import platform
import shutil
import signal
import subprocess
import sys
import tempfile
import threading
import time
from typing import Dict, Iterable, L... |
perf.py | #!/usr/bin/python3
import argparse
import clickhouse_driver
import itertools
import functools
import math
import os
import pprint
import random
import re
import statistics
import string
import sys
import time
import traceback
import logging
import xml.etree.ElementTree as et
from threading import Thread
from scipy imp... |
Reference_Generator.py | import urllib.request as request
import shutil
from contextlib import closing
import gzip
import re
import os
import subprocess
from pathlib import Path
from multiprocessing import Process, current_process, cpu_count, Manager
from time import sleep
import os
import argparse
from sys import argv
from Web_Connector impor... |
mtping2.py | import subprocess
import threading
class Ping:
def __init__(self, host):
self.host = host
def __call__(self):
rc = subprocess.call(
'ping -c2 %s &> /dev/null' % self.host,
shell=True
)
if rc == 0:
print('\033[32;1m%s:up\033[0m' % self.host)
... |
test_gc.py | import unittest
import unittest.mock
from test.support import (verbose, refcount_test, run_unittest,
cpython_only, start_threads,
temp_dir, TESTFN, unlink,
import_module)
from test.support.script_helper import assert_python_ok, make_script
i... |
test_collection_count.py | import pdb
import pytest
import logging
import itertools
from time import sleep
import threading
from multiprocessing import Process
from milvus import IndexType, MetricType
from utils import *
dim = 128
index_file_size = 10
add_time_interval = 3
tag = "1970-01-01"
nb = 6000
class TestCollectionCount:
"""
par... |
pysurge.py | import logging
import multiprocessing
import os
import queue
import signal
import sys
import threading
import time
from concurrent.futures import ThreadPoolExecutor
from pydoc import locate
log = logging.getLogger(__name__)
class TestCase:
"""
Base class for a test case that is run by the perf tester
A... |
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 use the can backend... |
test_big_privacy.py | #!/usr/bin/python
from cloudlight import BigGraph
from cloudlight import PrivacyAttackStrategies
from cloudlight.utils.itertools_recipes import izip
from cloudlight.utils.estimator import TimeEstimator
import time, sys, os, random
from multiprocessing import Process, Queue
cache_size_pages = 2**16
filename = len... |
server.py | import socket
import threading
import random
import sched
import time
import sys
import numpy
import face_recognition
import mysql.connector
import communication_json
import insertdb
import utility
MAX_ACODE = 1000
# server info
server_ip = '192.168.152.108'
student_port = 60000
teacher_port = 6... |
testing_lib.py | #!/usr/bin/env python
import parallel
import multiprocessing
import time
import uuid
# max ms spent sending/receiving each job
TRANSPORT_MS = 50
def worker_addresses(ip_addresses):
'''Returns a list of (vent, sink) pairs based on ip_addresses.'''
worker_addresses = []
for address in ip_addresses:
... |
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... |
variable_scope.py | # Copyright 2015 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... |
main_server.py | import socket
import threading
import time
time_1 = 0
time_clean = 3
chat_cancel = False
buffer = "\n\n\n\n\n\n\n*CHAT STARTS HERE*\n\n"
host_server = input("-> Host IP: ")
def clean_buffer():
global time_1
global time_clean
global buffer
global chat_cancel
while(chat_cancel==False):
time.... |
test_incoming.py | # -*- encoding: utf-8 -*-
#
# Copyright © 2017 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 applica... |
batch_generator.py | # batch gen
import random
import h5py
import numpy as np
from scipy.ndimage.interpolation import rotate, shift, affine_transform, zoom
from numpy.random import random_sample, rand, random_integers, uniform
# import matplotlib.pyplot as plt
import cv2
from tqdm import tqdm
# from astropy.nddata.utils import block_reduce... |
httpCameraMotion.py | # signey julho 2018
# MIT License
# para fazer
# - diferença com contraste
# - tamanho da área atingida
# - área atingida na vertical ou na horizontal
# - área atingida se moveu
# add file /etc/pip.conf em nov/2018 (2 lines)
# [global]
# extra-index-url=https://www.piwheels.org/simple
# +
# install packages:
# - libj... |
vaults.py | import logging
import re
import threading
import time
from typing import List
from brownie import chain
from eth_utils import encode_hex, event_abi_to_log_topic
from joblib import Parallel, delayed
from semantic_version.base import Version
from yearn import apy
from yearn.apy.common import ApySamples
from yearn.common... |
test_flight.py | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... |
base.py | import logging
try:
from Queue import Queue # PY2
except ImportError:
from queue import Queue # PY3
from threading import Thread
try:
from urlparse import urljoin # PY2
except ImportError:
from urllib.parse import urljoin # PY3
from six import iteritems
from six.moves import range
from .utils impo... |
test_do_spaces.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import gzip
import pickle
import threading
import warnings
from datetime import datetime
from unittest import skipIf
from botocore.exceptions import ClientError
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from... |
main_window.py | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including witho... |
installwizard.py |
import os
import sys
import threading
import traceback
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from electrum_cadex.wallet import Wallet
from electrum_cadex.storage import WalletStorage
from electrum_cadex.util import UserCancelled, InvalidPassword
from electrum... |
updating_server.py | #!/usr/bin/env python
"""
Pymodbus Server With Updating Thread
--------------------------------------------------------------------------
This is an example of having a background thread updating the
context while the server is operating. This can also be done with
a python thread::
from threading import Thread
... |
online.py | '''
Online tests
'''
import unittest
from unittest import TestCase
from mock import MagicMock
import sys
from os import path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from rest_service import RestService
import time
import requests
from threading import Thread
class TestRestService(TestCas... |
main.py | #!/usr/bin/env python
import os
from datetime import datetime, timezone, timedelta
import threading
import logging
import re
import requests
import boto3
# semaphore limit of 5, picked this number arbitrarily
maxthreads = 5
sema = threading.Semaphore(value=maxthreads)
logging.getLogger('boto3').setLevel(logging.CRIT... |
plot.py | import multiprocessing as mp
from copy import copy
import numpy as np
import tkinter
import pickle
import os
from itertools import accumulate
from matplotlib import pyplot as plt, lines
from casadi import Callback, nlpsol_out, nlpsol_n_out, Sparsity
from ..misc.data import Data
from ..misc.enums import PlotType, Cont... |
utils.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
mpv.py | # -*- coding: utf-8 -*-
# vim: ts=4 sw=4 et
#
# Python MPV library module
# Copyright (C) 2017-2020 Sebastian Götte <code@jaseg.net>
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation, either... |
server.py | # -*- coding: utf-8 -*-
import os
import urllib.request
from urllib.error import URLError
from multiprocessing import Process
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
import threading
class AppiumServer:
def __init__(self, l_devices):
self.l_devices = l_devices
... |
test_autograd.py | # Owner(s): ["module: autograd"]
import contextlib
import gc
import io
import math
import os
import random
import sys
import tempfile
import threading
import time
import unittest
import uuid
import warnings
import operator
import subprocess
from copy import deepcopy
from collections import OrderedDict
from itertools i... |
ArmTest1.py | #!/usr/bin/python3
# encoding: utf-8
import asyncio
import threading
import time
import ArmController as controller #舵机转动
import random
import websockets
# 机械臂位置校准
def Arm_Pos_Corr():
controller.setServo(1, 1200, 500)
controller.setServo(2, 500, 500)
time.sleep(1)
def get_arm_pos():
while True:
... |
methods.py | # Copyright 2018 gRPC 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 applicable law or agreed to in writing... |
mail.py | import time
from datetime import datetime, timedelta
import configparser
from time import sleep
import sqlite3
from loguru import logger
import threading
import smtplib
from email.mime.text import MIMEText
from gmail import Gmail
from threading import Thread
class Notifier(Gmail, Thread):
def __init__(self, config... |
RunTesterServer.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... |
web_serial.py | # -*- coding: utf-8 -*-
from websocket_server import WebsocketServer
import json
import serial
import os
from time import sleep
import threading
class WebSerial(object):
"""this is websocket-serial"""
_instance_lock = threading.Lock()
def __init__(self,port,ipaddr):
self.ipport = ... |
segmentProcess.py | #import logging
#logging.basicConfig(level=logging.DEBUG)
import multiprocessing as mp
import signal
import cProfile
import time
import numpy as np
import cv2
import sys
import pyrealsense2 as rs
import constants
import traceback
import json
import bodyparts as bp
import os
import psutil
def scale(inMat):
a = 255.... |
HackRequests.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : w8ay
# @Mail : w8ay@qq.com
# @File : hackRequests.py
import copy
import gzip
import queue
import socket
import ssl
import threading
import time
import zlib
from http import client
from urllib import parse
class HackError(Exception):
def __... |
email_cron.py | import threading
import time
import sys
import utils.logs as logs
import time
from utils.sendemail import send_email
from utils.config import get_value
from utils.db import Database_update
from API.scanstatus import scan_status
email_db = Database_update()
emails = send_email()
def send_email_notification():
t... |
threaded_car_detection.py | import os
import cv2
import time
import glob
import threading
import skimage
import numpy as np
from car_detection.helpers import ParkedCarDetector
from .gps import GPS
# If there is no maximum capacity stored we set it to this
default_max_cap = 8
class ThreadedCarDetection:
def __init__(self, database, default_l... |
webSocket2.py | import websocket
import json
import time
import threading
class WebsocketClient(object):
"""docstring for WebsocketClient"""
def __init__(self, address, message_callback=None):
super(WebsocketClient, self).__init__()
self.address = address
self.message_callback = message_callback
... |
testCLSimServer.py | #!/usr/bin/env python
import sys
from icecube import clsim, icetray, dataclasses
# skip out if I3CLSimServer was not built
try:
clsim.I3CLSimServer
except AttributeError:
sys.exit(0)
import time
import tempfile
from multiprocessing import Process
try:
# PY2
from Queue import Queue
except ImportError:
... |
encrypter.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Matteo Bernardini
# Copyright (c) 2015 Marco Bonelli
#
# 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/LICEN... |
child_process_executor.py | '''Facilities for running arbitrary commands in child processes.'''
import multiprocessing
import os
import sys
from abc import ABCMeta, abstractmethod
from collections import namedtuple
import six
from dagster import check
from dagster.utils import get_multiprocessing_context
from dagster.utils.error import seriali... |
ssh.py | import logging
import os
import re
import shutil
import string
import sys
import tarfile
import tempfile
import threading
import time
from .. import term
from ..context import context
from ..log import getLogger
from ..timeout import Timeout
from ..util import hashes
from ..util import misc
from ..util import safeeval... |
hazelcast_cloud_discovery_test.py | import ssl
import os
import threading
from hazelcast.six.moves import BaseHTTPServer
from hazelcast import six
from unittest import TestCase
from hazelcast.core import Address
from hazelcast.errors import HazelcastCertificationError
from hazelcast.discovery import HazelcastCloudDiscovery
from hazelcast.client import H... |
app.py | from logging.config import dictConfig
from flask import Flask
from flask.blueprints import Blueprint
from flask_cors import CORS
from kafka_module.kf_service import process_fc_kf
from anuvaad_auditor.loghandler import log_info
from anuvaad_auditor.loghandler import log_error
import routes
import config
import time
imp... |
namedpipe.py | # Copyright 2015 Cloudbase Solutions Srl
# 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 r... |
utils.py | import threading
import queue
import traceback
from sys import stderr
from tkinter import Tk, Toplevel, PhotoImage
from .codegen import Codegen
guiCodegen = Codegen()
from platform import system as platformName #< for startFile
from subprocess import call as startSubProcess
def startFile(path:str):
name = platformN... |
cfncluster-release-check.py | #!/usr/bin/python
#
# Copyright 2018 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 t... |
Coach.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... |
raspi0.py | #!/usr/bin/env python3
# Copyright 2017 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 or... |
motelist.py | #!/usr/bin/env python
import os, sys, threading, time, itertools
import serial
try:
# For Python 3+
from urllib.request import urlopen
except ImportError:
# For Python 2.x
from urllib2 import urlopen
import configfile
if os.name == 'posix':
from motelist_src.get_ports_linux import comports # @Un... |
repairer.py | # Copyright 2013-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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... |
main.py | # -*- coding: utf-8 -*-
import os
import argparse
import logging
#import threading
#import shutil
import datetime
import time
from multiprocessing import Process
import multiprocessing
from paramiko import SSHClient
import paramiko
# Ruta de archivos estaticos
from unipath import Path
# librerias propias
from lib_... |
email.py | from threading import Thread
from flask_mail import Message
from flask import render_template
from app import app, mail
def send_async_email(app, msg):
with app.app_context():
mail.send(msg)
def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject, sender=sender, re... |
qolsys_socket.py | import json
import socket
import ssl
import sys
import time
import asyncio
import threading
import appdaemon.plugins.mqtt.mqttapi as mqtt
#
# qolsys socket manager
#
# args
# yep
#
class qolsys:
################################################################################
# Code
def __init__(self, app... |
test_initialize.py | import multiprocessing as mp
import numpy
import psutil
import pytest
from dask import array as da
from distributed import Client
from distributed.deploy.local import LocalCluster
from dask_cuda.initialize import initialize
from dask_cuda.utils import _ucx_110, _ucx_111, get_ucx_config
mp = mp.get_context("spawn") ... |
testrunner.py | __author__ = 'Steven Summers'
__version__ = ''
import argparse
# import builtins
import difflib
import importlib.util
import inspect
import io
import json
import re
import sys
import textwrap
import threading
import time
import traceback
import unittest
from bdb import Bdb
from collections import O... |
base.py | '''using socketer server to get data and process data.'''
import socket
import time
from threading import Thread
from queue import Queue
def log(x):
from datetime import datetime
time_now = datetime.now().strftime("%m-%d-%H:%M:%S.%f ")
print(time_now + x)
class BaseSocket:
def __init__(self, host, ... |
sanitylib.py | #!/usr/bin/env python3
# vim: set syntax=python ts=4 :
#
# Copyright (c) 2018 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import contextlib
import string
import mmap
import sys
import re
import subprocess
import select
import shutil
import shlex
import signal
import threading
import concurrent.fu... |
AppInit.py | # coding=utf-8
import multiprocessing
from src.utils.GetPhoneInfo import *
from .AppInit_Android import *
from .AppInit_iOS import *
class AppInit(object):
def __init__(self):
pass
def app_init(self):
sc = ShellCommand()
replace_appium_js = multiprocessing.Process(target=sc.replace_a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.