source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
client_start.py | from PyQt5 import QtWidgets, QtGui, QtCore, uic
from PyQt5.QtCore import Qt, QThread, pyqtSlot
import time
import ctypes
import threading
from client import Client
from handlers import GuiReciever
from repo.server_repo import DbRepo
from repo.server_models import Base
import sys
class MyWindow(QtWidgets... |
thread.py | # curio/thread.py
#
# Not your parent's threading
__all__ = [ 'AWAIT', 'async_thread', 'spawn_thread' ]
# -- Standard Library
import threading
from concurrent.futures import Future
from functools import wraps
from inspect import iscoroutine, isgenerator
from contextlib import contextmanager
from types import corouti... |
server.py | ##
# This module implements a general-purpose server layer for sfa.
# The same basic server should be usable on the registry, component, or
# other interfaces.
#
# TODO: investigate ways to combine this with existing PLC server?
##
import sys
import socket, os
import traceback
import threading
from Queue import Queue
... |
icmp.py | '''ICMP echo ping.'''
import array
import random
import select
import socket
import struct
import sys
import threading
import time
import cping.protocols
import cping.utils
SOCKET_TYPE = socket.SOCK_RAW if sys.platform == 'win32' else socket.SOCK_DGRAM
class Ping(cping.protocols.Ping):
'''ICMP echo ping. The po... |
blockingclientproxy.py | '''
@author: Deniz Altinbuken, Emin Gun Sirer
@note: ConCoord Client Proxy
@copyright: See LICENSE
'''
import os, random, select, socket, sys, threading, time
import cPickle as pickle
from threading import Thread, Condition, Lock
from concoord.pack import *
from concoord.enums import *
from concoord.utils import *
from... |
pjit_test.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
store.py | import json
import logging
import os
import threading
import time
import uuid as uuid_builder
from copy import deepcopy
from os import mkdir, path, unlink
from threading import Lock
from changedetectionio.notification import (
default_notification_body,
default_notification_format,
default_notification_tit... |
installwizard.py | # Copyright (C) 2018 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import os
import sys
import threading
import traceback
from typing import Tuple, List, Callable, NamedTuple, Optional
from PyQt5.QtCore i... |
widget.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
The widget is called from web2py.
"""
import datetime
import sys
import cStringIO
import time
import threa... |
auto_scaler.py | #!/usr/bin/env impala-python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (... |
02_grundlagen_multithreading.py | # 02_grundlagen_multithreading.py
import os, re, time, datetime, threading
max_text_length=70
max_text_delta=24
def output(title, string):
print('╔'+''.center(max_text_length+8, '═')+'╗')
print('║ '+title.center(max_text_length+7).upper()+'║')
print('╠'+''.center(max_text_length+8, '═')+'╣')
string=s... |
test_main_loop.py | import os
import signal
import time
from itertools import count
from multiprocessing import Process
from fuel.datasets import IterableDataset
from mock import MagicMock, ANY
from numpy.testing import assert_raises
from six.moves import cPickle
from blocks.main_loop import MainLoop
from blocks.extensions import Traini... |
mesh_pool.py | import torch
import torch.nn as nn
from threading import Thread
from models.layers.mesh_union import MeshUnion
import numpy as np
from heapq import heappop, heapify
class MeshPool(nn.Module):
def __init__(self, target, multi_thread=False):
super(MeshPool, self).__init__()
self.__out_target = t... |
ProxyRefreshSchedule.py | # -*- coding: utf-8 -*-
# !/usr/bin/env python
"""
-------------------------------------------------
File Name: ProxyRefreshSchedule.py
Description : 代理定时刷新
Author : JHao
date: 2016/12/4
-------------------------------------------------
Change Activity:
2016/12/4: 代... |
test_ipc.py | import sys
import multiprocessing as mp
import traceback
import pickle
import numpy as np
from numba import cuda
from numba.cuda.cudadrv import drvapi, devicearray
from numba.cuda.testing import skip_on_cudasim, CUDATestCase
import unittest
not_linux = not sys.platform.startswith('linux')
has_mp_get_context = hasat... |
__init__.py | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2021, Johannes Köster"
__email__ = "johannes.koester@uni-due.de"
__license__ = "MIT"
import os
import sys
import contextlib
import time
import datetime
import json
import textwrap
import stat
import shutil
import shlex
import threading
import concurrent.futures... |
mailing.py | from telegram import Update, Message as TelegramMessage, TelegramError, Bot, PhotoSize, Animation, Video, ParseMode
from telegram.ext import CallbackContext, ConversationHandler
from threading import Thread
import logging
import time
from ..constants import Message, Keyboard, States
from ..models import User
def __... |
downloader.py | # -*- coding: utf-8 -*-
#
# Copyright 2020-2021 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
pgc02.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2019 ASMlover. 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... |
app_utils.py | # From http://www.pyimagesearch.com/2015/12/21/increasing-webcam-fps-with-python-and-opencv/
import struct
import six
import collections
import cv2
import datetime
from threading import Thread
from matplotlib import colors
class FPS:
def __init__(self):
# store the start time, end time, and total number ... |
merge_tiles.py | # coding=utf-8
from __future__ import print_function, unicode_literals, division
import json
import math
import os
import random
import threading
from itertools import chain, product
from logger import logger
from PIL import Image
try:
import Queue
import urlparse
from urllib import urlencode
except Impo... |
title_screen.py | import pygame
import socket
import errno
import threading
from button import Button
from text import Text, TextFeed
from textbox import TextBox
from message import Message
from instructions import Instruction
from cards import Deck, Card
class TitleScreen:
UPDATE_FREQUENCY = 1000
def __init__(self, screen_si... |
test_session.py | import os
import threading
import time
import socket
import importlib
from six.moves.http_client import HTTPConnection
import pytest
from path import Path
import cherrypy
from cherrypy._cpcompat import (
json_decode,
HTTPSConnection,
)
from cherrypy.lib import sessions
from cherrypy.lib import reprconf
from ... |
preprocessor-simulator.py | #!/usr/bin/env python
'''
preprocessor-simulator.py
Simulate a receiver with built-in preprocessor. This allow testing of the
light controller functionality without hooking up a RC system.
A web browser is used for the user interface
Author: Werner Lane
E-mail: laneboysrc@gmail.com
'''
from __futur... |
custom.py | import sublime
import threading
from sublime_plugin import WindowCommand
from ..git_command import GitCommand
from ..runtime import enqueue_on_worker
from ..ui_mixins.input_panel import show_single_line_input_panel
from ..view import replace_view_content
from ...common import util
__all__ = (
"gs_custom",
)
cl... |
val.py | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Validate a trained YOLOv5 model accuracy on a custom dataset
Usage:
$ python path/to/val.py --data coco128.yaml --weights yolov5s.pt --img 640
"""
import argparse
import json
import os
import sys
from pathlib import Path
from threading import Thread
import numpy as... |
dataset.py | import pandas as pd
import numpy as np
import os
import librosa
from queue import Queue
from threading import Thread
from typing import Tuple
DOC_PATH = 'alc_original/DOC/IS2011CHALLENGE'
DATA_PATH = 'alc_original'
TRAIN_TABLE = 'TRAIN.TBL'
D1_TABLE = 'D1.TBL'
D2_TABLE = 'D2.TBL'
TEST_TABLE = 'TESTMAPPING.txt'
SR = 16... |
train.py | # Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016
"""Train"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import cv2
from datetime import datetime
import os.path
import sys
import time
import numpy as np
from six.moves import xrange
import tensorfl... |
miner.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
## Copyright (c) 2017, The Sumokoin Project (www.sumokoin.org)
'''
Main miner worker, RPC client
'''
import sys, psutil
import json, socket, struct
import errno
import threading, time, urlparse, random, platform
from multiprocessing import Process, Event, cpu_count
#from th... |
subproc.py |
from multiprocessing import Process
from time import sleep
def count_sheeps(number):
"""Count all them sheeps."""
fd=open('C:/tmp/subproc3.log','w')
for sheep in range(number):
fd.write("%s " % sheep)
#sleep(1)
fd.close()
if __name__ == "__main__":
count_sheeps(20)
... |
inference_sequence.py | import os
import sys
import cv2
import torch
import argparse
import numpy as np
from tqdm import tqdm
from torch.nn import functional as F
import warnings
import _thread
import threading
from queue import Queue, Empty
warnings.filterwarnings("ignore")
from pprint import pprint, pformat
import time
import psutil
impor... |
__init__.py | import asyncio
import json
import re
import threading
import nonebot
from nonebot import on_command, NLPSession, on_startup, on_natural_language
from nonebot.command import Command, CommandSession
from .WifeClass import *
import difflib
from bot_config import GROUP_USE
def get_equal_rate(str1, str2):
... |
temp2.py | import threading
import queue
import time
import logging
logger = logging.getLogger(__name__)
class Send():
"""base class for a sender"""
def __init__(self, name, sQueue):
self.name = name
self.sQueue = sQueue
self.thread = threading.Thread(target=self.run, name=name)
... |
gui.py |
from vispy import app, io, scene, visuals
from vispy.visuals.transforms import MatrixTransform, STTransform
import datetime
import time
import threading
import pickle
import zmq
import numpy as np
# canvas = scene.SceneCanvas(keys='interactive', bgcolor='white',
# size=(800, 600), show=Tr... |
upgrade_test.py | #!/usr/bin/env python3
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import glob
import os
from pathlib import Path
import platform
import random
import shutil
import stat
import subprocess
import sys
from threading import Thread, Event
import traceback
import time
from urllib import request
import ... |
tests.py | # -*- coding: utf-8 -*-
import os
import shutil
import sys
import tempfile
import time
import unittest
from cStringIO import StringIO
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.core.files.base import ContentFile
from django.core.files.images import get_image_dime... |
loader.py |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------
import bisect
import os
import sys
from collections import defaultdict
from typing import List, Tuple
fro... |
processV0.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import tempfile
import subprocess
import tensorflow as tf
import numpy as np
import tfimage as im
import threading
import time
import multiprocessing
"""
# Resize source images
pytho... |
thread_crawl_taobao.py | # -*- coding:utf-8 -*-
import re
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from pyquery import PyQuery as pq
import requests
import time
import urllib
import os
impor... |
pgc01.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2019 ASMlover. 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... |
fifo.py | import threading
import time
import random
resultados = []
tiempos = []
tiempoEspera = 0
mutexActivo = threading.Semaphore(1)
torniquete = threading.Semaphore()
def ejecucion(idProceso):
global tiempoEspera
if(tiempoEspera == 0):
resultados[2][idProceso] = tiempoEspera
resultados[1][idProceso]... |
mcp23x17.py | """mcp23x17.py"""
import time
import warnings
from threading import Thread
from abc import abstractmethod, ABCMeta
from .devices import Device
class MCP23x17(Device):
"""Class representing mcp23x17 chips.
Steps for interrupts:
- Enable interrupt on pin through GPINTEN register
- Define ... |
process_example.py | from multiprocessing import Process, Value, Array, Lock
import time
def add_100(numbers, lock):
for i in range(100):
time.sleep(0.01)
# with lock: # no other processes can access this part of code, lock as context manager
# number.value += 1
for i in range(len(numbers)):
... |
client.py | #!/bin/python
# coding=utf-8
import threading
import sys
from communication.protocol import *
reload(sys)
sys.setdefaultencoding('utf-8')
def _receive_message(client_socket):
while True:
_, receive_message = recv_data(client_socket)
print receive_message
host_ip = get_ip()
host_port = get_port... |
_creating_thread.py | #creating a thread without using a class
from threading import*
# def display():
# for i in range(1, 11):
# print('child Thread')
# t = Thread(target = display) #creating thread object
# t.start()
# for i in range(1, 11):
# print('main thread')
#creating a thread by extending class
# from thre... |
ssr_check.py | #!/usr/bin/env python3
import requests
import time
import threading
from ssshare.ss import ss_local
import random
def test_connection(
url='http://cip.cc',
headers={'User-Agent': 'curl/7.21.3 (i686-pc-linux-gnu) ' 'libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18'},
proxies=None, port=10... |
ModbusTCP.py | #!/usr/bin/env python3
# Copyright (c) 2017 Dennis Mellican
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... |
mobile_insight_gui.py | #!/usr/bin/python3
"""
Python GUI for MobileInsight
Author: Moustafa Alzantot
Date : Feb 26, 2016
"""
import sys
import wx
import wx.grid
import wx.adv
from threading import Thread
from random import random
from datetime import datetime, timedelta
import matplotlib
from matplotlib.backends.backend_wxagg import Figur... |
multi_launcher.py | # coding: utf-8
from __future__ import unicode_literals
"""
This module contains methods for launching several Rockets in a parallel environment
"""
from multiprocessing import Process
import os
import threading
import time
from fireworks.fw_config import FWData, PING_TIME_SECS, DS_PASSWORD
from fireworks.core.rocke... |
terminal_pane.py | import wx
import threading
if not wx.GetApp():
app = wx.App()
ColourDatabase = wx.ColourDatabase()
FOREGROUND_COLOURS = {
30: wx.BLACK,
31: wx.RED,
32: wx.YELLOW,
33: wx.YELLOW,
34: wx.BLUE,
35: ColourDatabase.Find('MAGENTA'),
36: wx.CYAN,
37: wx.WHITE,
39: wx.GREEN
}
BACKGR... |
utility.py | # coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------... |
04-receive_data.py | #!/usr/bin/env python3
# Copyright (C) 2018 Simon Brummer <simon.brummer@posteo.de>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
import threading
from testrunner import ... |
test_queue.py | # Some simple queue module tests, plus some failure conditions
# to ensure the Queue locks remain stable.
import queue
import time
import unittest
from test import support
threading = support.import_module('threading')
QUEUE_SIZE = 5
def qfull(q):
return q.maxsize > 0 and q.qsize() == q.maxsize
# A ... |
datasets.py | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# 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 agre... |
cifar10_to_mr.py | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... |
contiguity_apply_async.py | #Contiguity using apply_async
import pysal as ps
from collections import defaultdict
import multiprocessing as mp
import time
import sys
import ctypes
import numpy as np
from numpy.random import randint
def check_contiguity(checks,lock,weight_type='ROOK'):
cid = mp.current_process()._name
geoms = np.frombuf... |
test_caching.py | import datetime
from itertools import count
import os
import threading
import time
import urllib.parse
import pytest
import cherrypy
from cherrypy.lib import httputil
from cherrypy.test import helper
curdir = os.path.join(os.getcwd(), os.path.dirname(__file__))
gif_bytes = (
b'GIF89a\x01\x00\x01\x00\x82\x00\x... |
test_worker_infrastructure.py | import threading
import logging
import time
import pytest
from dexbot.worker import WorkerInfrastructure
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s')
@pytest.fixture(scope='module')
def account(prepare_account):
account = prepare_account({'MYBASE': 10000, 'MYQUOTE': 20... |
test.py | import json
import os.path as p
import random
import socket
import subprocess
import threading
import time
import avro.schema
from confluent_kafka.avro.cached_schema_registry_client import CachedSchemaRegistryClient
from confluent_kafka.avro.serializer.message_serializer import MessageSerializer
from confluent_kafka i... |
mod_arty_crosshair102.py | # -*- coding: utf-8 -*-
import datetime
import re
import os
import json
import codecs
import urllib2
import urllib
import threading
from AvatarInputHandler import control_modes
import BigWorld
import BigWorld
from constants import AUTH_REALM
from gui.Scaleform.daapi.view.lobby.hangar.Hangar import Hangar
class Confi... |
test_file.py | import sys
import os
import unittest
import itertools
import time
import threading
from array import array
from weakref import proxy
from test import test_support
from test.test_support import TESTFN, findfile, run_unittest
from UserList import UserList
class AutoFileTests(unittest.TestCase):
# file tests for whi... |
views.py | # -*- coding: utf-8 -*-
from multiprocessing import Process
import simplejson as json
import time
import json
import sqlparse
import wtforms_json
import os
from django.contrib.auth.mixins import PermissionRequiredMixin, LoginRequiredMixin
from django.shortcuts import render
from pymongo import DESCENDING
from django.... |
chatcommunicate.py | import random
from threading import Thread, Lock
from parsing import *
from datahandling import *
from metasmoke import Metasmoke
from globalvars import GlobalVars
import os
import re
import requests
from datetime import datetime
from utcdate import UtcDate
from apigetpost import api_get_post
from spamhandling import h... |
application.py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import json
import logging
import subprocess
import tempfile
import textwrap
import threading
from pathlib import Path
from ty... |
event.py | import threading
import time
def task(event, sec):
print("Started thread but waiting for event...")
# make the thread wait for event with timeout set
internal_set = event.wait(sec)
print("waiting")
if internal_set:
print("Event set")
else:
print("Time out,event not set")
# i... |
kvstore_test.py | from multiprocessing import Process
from .kvstore import KVStore
from .kvstore_server import KVStoreServer
def test_case1():
def server(port):
kvstore_server = KVStoreServer(port=port)
kvstore_server.request_handle()
def worker(ports):
kvstore_worker = KVStore(ports=ports)
k... |
rbssh.py | #!/usr/bin/env python
#
# rbssh.py -- A custom SSH client for use in Review Board.
#
# This is used as an ssh replacement that can be used across platforms with
# a custom .ssh directory. OpenSSH doesn't respect $HOME, instead reading
# /etc/passwd directly, which causes problems for us. Using rbssh, we can
# work arou... |
test_utils_test.py | import asyncio
import pathlib
import socket
import threading
from contextlib import contextmanager
from time import sleep
import pytest
from tornado import gen
from distributed import Client, Nanny, Scheduler, Worker, config, default_client
from distributed.core import rpc
from distributed.metrics import time
from di... |
strategy_engine.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from queue import Queue
from threading import Thread
from nanomsg import Socket, SUB, PUSH, SUB_SUBSCRIBE, SOL_SOCKET, RCVTIMEO
from datetime import datetime, timedelta, time
import os
import yaml
import json
from collections import defaultdict
from copy import copy
import ... |
inference_lclcl.py | import numpy as np
import matplotlib.pyplot as plt
import PIL as PIL
from os import listdir
from os.path import isfile, join
import tensorflow as tf
import random
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
import threading
from queue import Queue
import traceback
from zipfile import ZipFile
import time
import s... |
master.py | # -*- coding: utf-8 -*-
'''
This module contains all of the routines needed to set up a master server, this
involves preparing the three listeners and the workers needed by the master.
'''
# Import python libs
from __future__ import absolute_import, with_statement, print_function, unicode_literals
import copy
import c... |
mission_commander.py | '''
Copyright 2019, David Pierce Walker-Howell, All rights reserved
Author: David Pierce Walker-Howell<piercedhowell@gmail.com>
Last Modified 08/05/2019
Description: The mission commander executes a mission based on a mission.json file
when the vehicle is in mission mode. Missions are started by pressing
... |
twitter.py | import threading
import subprocess
from datetime import datetime
import json
from os import listdir
from os.path import isfile, join
from pymongo import MongoClient
from flask import jsonify
from flask import Blueprint
from flask import flash
from flask import g
from flask import render_template
from flask import req... |
executer.py | import subprocess
import multiprocessing
def work(rounds=10):
for x in xrange(rounds):
proc = subprocess.Popen("nosetests -q test_network_advanced_inter_vmconnectivity test_network_basic_adminstateup test_network_basic_dhcp_disable"
" test_network_basic_dhcp_lease test_network_basic_inter_... |
wsdump.py | #!D:\puneeth\facemap\Scripts\python.exe
import argparse
import code
import sys
import threading
import time
import ssl
import gzip
import zlib
import six
from six.moves.urllib.parse import urlparse
import websocket
try:
import readline
except ImportError:
pass
def get_encoding():
encoding = getattr(sy... |
node.py | # coding: utf-8
import json
from time import time
import requests
from .config import config
from .log import get_logger
log = get_logger("CONFIG")
from .utils import TargetRepeatingThread
class Node(object):
status = "unknown"
name = None
host = None
port = None
platforms = None
queue = Non... |
InterfaceTest.py | #! /usr/local/bin/python3
# -*- coding: UTF-8 -*-
# 接口测试
import urllib
from urllib import request,parse
from urllib.parse import urlparse # 定义一个func(url),获取他?后的参数,并返回成一个dict
import threading # 多线程
import requests
import time
import hashlib # md5 加密
import json
from json import JSONDecodeError
import logging # 异常数据
imp... |
custom_player.py | from ffpyplayer.player import MediaPlayer
import queue
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import threading
import numpy as np
import io
import time
import cv2
import datetime
# https://currentmillis.com/
q = queue.Queue()
#wins3 = "rtmp://143.248.55.86/live/wins3"
wins3 = "rtmp://143.248... |
test_dag_serialization.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
#... |
colorSegmentationTSR.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#%%
import cv2
import time
import numpy as np
import math
import glob
import pickle
import os
from collections import OrderedDict
from scipy.spatial import distance as dist
from skimage import feature
#import colorcorrect.algorithm as cca
#import matplotlib.pyplot as plt... |
train.py | #!/usr/bin python3
""" The script to run the training process of faceswap """
import logging
import os
import sys
from threading import Lock
from time import sleep
import cv2
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
from lib.keypress import KBHit
from lib.multithreading impor... |
lldb_batchmode.py | # This script allows to use LLDB in a way similar to GDB's batch mode. That is, given a text file
# containing LLDB commands (one command per line), this script will execute the commands one after
# the other.
# LLDB also has the -s and -S commandline options which also execute a list of commands from a text
# file. Ho... |
server.py | # Copyright (c) 2012 Spotify AB
#
# 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... |
base.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import webbrowser
import multiprocessing
import logging
from abc import ABCMeta, abstractmethod
from ava.runtime import settings
STR_STATUS = 'Ava - running...'
STR_OPEN_WEBFRONT = u'Open Webfront'
STR_EXIT = u... |
test_gluon_model_zoo.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
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 mines dash paris dot org>
#
################################... |
__init__.py | import re
import types
import sys
import os
import io
from pathlib import Path
import tempfile
import random
import json
import asyncio
import shutil
import logging
from datetime import datetime
import threading
import click
from girder_client import GirderClient
from faker import Faker
from faker.providers import int... |
walking_simulation.py | #!/usr/bin/env python
import concurrent
import ctypes
import cv2
import math
import numpy as np
import os
import pybullet as p
import pybullet_data
import random
import rospkg
import rospy
import tf2_ros
import threading
from cv_bridge import CvBridge
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Po... |
core.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
#... |
scylla_node.py | # ccm node
from __future__ import with_statement
import datetime
import errno
import os
import signal
import shutil
import socket
import stat
import subprocess
import time
import threading
import psutil
import yaml
import glob
from six import print_
from six.moves import xrange
from ccmlib import common
from ccmlib... |
debug_data_multiplexer.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
A3C_Transfer.py | import threading # 多线程
import tensorflow as tf
import gym
import os
import shutil
from utils import *
import pickle
import argparse
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
seed_setting = 600
parser = argparse.ArgumentParser()
parser.add_argument('--mode', default='test', type=str)
parser.add_argument('--env', type=s... |
tests.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
uno_server.py | import uno_module as uno
import os
import uno_ai as ai
import socket
from _thread import *
import threading
import config
import sys
# local declarations
currentId = "0"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server = 'localhost'
port = 5555
server_ip = socket.gethostbyname(server)
try:
s.bind((... |
main.py | #!/bin/python2
import commands
import fcntl
import json
import random
import re
import socket
import struct
import urllib2 as urllib
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from SocketServer import ThreadingMixIn
from cv2 import imshow, namedWindow, setWindowProperty
from datetime import timedelta... |
log_battery.py | # log_battery.py/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro).
# This copyright was auto-generated on Wed, Sep 1, 2021 5:05:45 PM
"""Example to continuously read the battery (with no Wifi connection)"""
import csv
import time
import logging
import argparse
import threading
fro... |
PropertyMonitor.py | # ------------------------------------------------------------------
# imports
# ------------------------------------------------------------------
from shared.utils import HMILog
from shared.utils import tel_ids, redis_port
import threading
import time
from collections import Counter
import redis
import json
import js... |
solver.py | #
# Copyright 2021, NTT Communications 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 required by applic... |
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... |
engine.py | import rq
import time
import redis
import multiprocessing
from queue import Queue
from functools import partial
from threading import Thread, Lock
redis_conn = redis.Redis()
q = rq.Queue(connection=redis_conn)
def launch_task(func, *args, **kwargs):
"""Function to enqueue target function with arguments and retu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.