source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
main.py | import os
import sys
import json
import threading
#################################################:
# usage: Convert every AVI file found in specified folder to MP4 file format.
# python 'script_name' 'ffmpeg exe location' 'avi file path location'
# EG: python main.py "scripts/ffmpeg.exe" "scripts/videos/"
#ffmp... |
test.py | import gzip
import json
import logging
import os
import io
import random
import threading
import time
import helpers.client
import pytest
from helpers.cluster import ClickHouseCluster, ClickHouseInstance, get_instances_dir
MINIO_INTERNAL_PORT = 9001
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
CONFIG_PA... |
MovingHeadMIDIServer.py | import pygame.midi as MIDI
import threading, socket
MIDI.init()
Device = 1
Input = MIDI.Input(Device)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.connect(("127.0.0.1", 8051))
def MIDIevent():
while(1):
if(Input.poll()):
event ... |
merge_tiles.py | # coding=utf-8
import base64
import json
import math
import os
import queue
import random
import threading
import urllib.parse
from itertools import chain, product
from urllib.parse import urlencode
from PIL import Image
from rosreestr2coord.utils import make_request, TimeoutException
from .logger import logger
Im... |
test_identifiers.py | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
arakoon_monkey.py | """
Copyright (2010-2014) INCUBAID BVBA
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... |
test_streaming_pull_manager.py | # Copyright 2018, 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,... |
messanger.py | '''
Created on 2011-08-13
@author: Nich
'''
import logging
from multiprocessing import Process, Queue
import inspect
from messages.message_types import *
class Messanger(object):
'''
Provides a mechanism for sending messages between objects
'''
def __init__(self):
'''
Constructor
... |
java_gateway.py | # -*- coding: UTF-8 -*-
"""Module to interact with objects in a Java Virtual Machine from a
Python Virtual Machine.
Variables that might clash with the JVM start with an underscore
(Java Naming Convention do not recommend to start with an underscore
so clashes become unlikely).
Created on Dec 3, 2009
:author: Barthe... |
swap_server.py | import numpy as np
import zmq
from optparse import OptionParser
import time
from collections import defaultdict
import threading
import sys
import logging
class SwapServer(object):
"""General purpose class for managing interactions between parallel subprocesses.
Each subprocess does its own computations but a... |
backend.py | from multiprocessing import Process
from artsci2019.lib.portrait import PortraitGen
from artsci2019.lib.image_storage import write_recognized_frames
class Backend:
def __init__(self, stack_size, pool_size, stable_points, directory):
self.portrait_gen = PortraitGen(stack_size, pool_size, stable_points)
... |
dump.py | #!/usr/bin/env python3
import sys
import argparse
import zmq
import json
from hexdump import hexdump
from threading import Thread
from cereal import log
import selfdrive.messaging as messaging
from selfdrive.services import service_list
def run_server(socketio):
socketio.run(app, host='0.0.0.0', port=4000)
if __na... |
importb3d.py | import struct
import sys
import timeit
import threading
import pdb
import bpy
import mathutils
import os.path
from bpy.props import *
from bpy_extras.image_utils import load_image
from ast import literal_eval as make_tuple
from math import sqrt
from math import atan2
import re
import bmesh
def openclose(file):
oc... |
test_filewatch.py | import os
import time
import threading
import pytest
from doit.filewatch import FileModifyWatcher, get_platform_system
def testUnsuportedPlatform(monkeypatch):
monkeypatch.setattr(FileModifyWatcher, 'supported_platforms', ())
pytest.raises(Exception, FileModifyWatcher, [])
platform = get_platform_system()... |
gen_pyxtal.py | '''
Random structure generation using PyXtal(https://github.com/qzhu2017/PyXtal)
'''
from multiprocessing import Process, Queue
import os
import random
import sys
import numpy as np
from pymatgen.core import Structure, Molecule
from pymatgen.core.periodic_table import DummySpecie
from pyxtal import pyxtal
from pyxtal... |
manager.py | import time
import secrets
from typing import Dict
from threading import Thread
import board
import adafruit_ssd1306
from PIL import Image
from . import WIDTH, HEIGHT, VERSION
from .draw import generate_status_image
class OLED:
"""
OLED Display Manager, automatically cycles through messages and prevents burn... |
tiktok.py | import random
import requests
import threading
from time import time, sleep
REQUEST_URL = 'https://api16-core-c-useast1a.tiktokv.com/aweme/v1/aweme/stats/?ac=WIFI&op_region=SE&app_skin=white&'
def get_video_id(video_url):
response = requests.get(video_url)
correct_url = str(response.url)
if 'com/v/' in... |
get_ip_addr.py | import pandas as pd
import multiprocess as mp
TESTSET = '250-test.dat'
CONTROLSETS = ["control"+str(x)+".dat" for x in range(1,9)]
SETS = CONTROLSETS[:].append(TESTSET)
SANITIZEDPATH = '/data/users/sarthak/comcast-data/separated/'
def get_device_ip_dict(setname):
df = pd.read_pickle(SANITIZEDPATH + setname )
... |
safety_violation_alert.py | from config.config import *
import numpy as np
import threading
import math
import cv2
import sys
import os
FONTS = cv2.FONT_HERSHEY_SIMPLEX
VIDEOPATH = os.path.join(os.getcwd(), FOLDERNAME, VIDEONAMEROI)
WEIGHTSPATH = os.path.join(os.getcwd(), MODELPATH, WEIGHTS)
PROTOTXTPATH = os.path.join(os.getcwd(), MODELPATH, PR... |
params.py | #!/usr/bin/env python3
"""ROS has a parameter server, we have files.
The parameter store is a persistent key value store, implemented as a directory with a writer lock.
On Android, we store params under params_dir = /data/params. The writer lock is a file
"<params_dir>/.lock" taken using flock(), and data is stored in... |
async_rl.py |
import time
import multiprocessing as mp
import psutil
import torch
from collections import deque, namedtuple
import math
from rlpyt.runners.base import BaseRunner
from rlpyt.utils.logging import logger
from rlpyt.utils.seed import set_seed, make_seed
from rlpyt.utils.prog_bar import ProgBarCounter
from rlpyt.utils.s... |
remind.py | #!/usr/bin/env python
"""
remind.py - Phenny Reminder Module
Copyright 2011, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.
http://inamidst.com/phenny/
"""
import re
import threading
import time
from modules import clock
from tools import GrumbleError, read_db, write_db
def load_database(phe... |
agent.py | #!/usr/bin/env python
# Standard Python libraries.
import argparse
import json
import multiprocessing
import os
import queue
import sys
import threading
import time
# Third party Python libraries.
# Custom Python libraries.
import modules.api
import modules.logger
import modules.scanner
class Worker(threading.Thre... |
WebSocket2SSH.py | import threading
import time
import asyncio
import websockets
from socket import *
from urllib import parse
import paramiko
from asgiref.sync import sync_to_async
from IEMP_Satellite.Function import DynamicPassword
import MainDB.models as DB
async def WS():
async with websockets.serve(WebSocket2SSH1.wsDeal, '0.0... |
test_aws_quantum_task.py | # Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... |
test_generator_mt19937.py | import sys
import hashlib
import pytest
import numpy as np
from numpy.linalg import LinAlgError
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_allclose,
assert_warns, assert_no_warnings, assert_array_equal,
assert_array_almost_equal, suppress_warnings)
from numpy.random import G... |
visualize.py | import os
import pickle
import logging
import time
import multiprocessing as mp
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
from src.features import PickledCorpusReader as pcr
from src.models import TextNormalizer as tn
from src.features import CorpusLoader as cl
from sklearn.base imp... |
worker.py | import redis
from threading import Thread, RLock
import json
import time
import queue
import traceback
import logging
import random
from . import defaults
from . import common
from .utils import (
hook_console,
__org_stdout__,
_stdout,
_stderr,
check_connect_sender,
Valve,
TaskEnv,
)
... |
GUI_MySQL.py | '''
May 2017
@author: Burkhard
'''
#======================
# imports
#======================
import tkinter as tk
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import Menu
from tkinter import Spinbox
import Ch07_Code.ToolTip as tt
from threading import Thread
from time import sleep
from queue im... |
server.py | from socket import *
from threading import Thread
import traceback
import random
import datetime
import os
import interactive_conditional_samples as gpt
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"... |
__init__.py | #!/usr/bin/env python3
from os import getenv
from rflib import RfCat
from watchdog import serve, set_watchdog_period
from registry import DEVICE_TYPES
from paho.mqtt import client as mqtt_client
from yaml import safe_load as yaml_load
from json import loads as json_loads
from random import randint
from utils import pi... |
train_net.py | import os
import os.path as osp
import bisect
import argparse
import multiprocessing as mp
import numpy as np
from tqdm import tqdm
import megengine as mge
from megengine import distributed as dist
from megengine import optimizer as optim
import megengine.autodiff as autodiff
from megengine import jit
import dataset
i... |
download_cache_test.py | import os
import textwrap
import time
import unittest
from collections import Counter
from threading import Thread
from bottle import static_file, request
import pytest
from conans.client.downloaders.cached_file_downloader import CachedFileDownloader
from conans.test.assets.genconanfile import GenConanfile
from conan... |
serverboards_aio.py | import sys
import os
import json
import time
import traceback
# from contextlib import contextmanager
sys.path.append(os.path.join(os.path.dirname(__file__),
'env/lib64/python3.6/site-packages/'))
sys.path.append(os.path.join(os.path.dirname(__file__),
'env/lib64/python3.5/site-packages/... |
app.py | #! /usr/bin/env python3
import os
import json
import re
from threading import Thread, Lock
from flask import Flask, request, jsonify
import redis
import requests
import random
app = Flask(__name__)
THE_REGEX = re.compile(r'(<?@[\w:+-]+>?) *([+]{2}|[-]{2})')
# Maybe don't hardcode the bot's id later on
LEADERBROAD_REX... |
rec.py | import queue
import sys
import tkinter as tk
from collections import defaultdict
from multiprocessing import Process, Value
from pathlib import Path
from time import sleep
import sounddevice as sd
import soundfile as sf
if len(sys.argv) != 2:
sys.exit("Usage: python rec.py utts.data")
else:
_, utts = sys.argv... |
imgtools.py | import threading
from helpers import tools
import numpy as np
import cv2
import pygame
import pygame.freetype
import unicodedata
import io
import os
import warnings
import asyncio
import requests
os.environ['SDL_AUDIODRIVER'] = 'dsp'
pygame.freetype.init()
ALPHA_COLOR = (255, 255, 255, 255)
LINE_TYPE = cv2.LINE_AA
... |
test_ssl.py | # Test the support for SSL and sockets
import sys
import unittest
import unittest.mock
from test import support
from test.support import import_helper
from test.support import os_helper
from test.support import socket_helper
from test.support import threading_helper
from test.support import warnings_helper
import sock... |
synchronous-concurrency-1.py | import sys
from Queue import Queue
from threading import Thread
lines = Queue(1)
count = Queue(1)
def read(file):
try:
for line in file:
lines.put(line)
finally:
lines.put(None)
print count.get()
def write(file):
n = 0
while 1:
line = lines.get()
if lin... |
ParallelAlgoTest.py | ##########################################################################
#
# Copyright (c) 2018, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... |
test_enum.py | import enum
import doctest
import inspect
import os
import pydoc
import sys
import unittest
import threading
from collections import OrderedDict
from enum import Enum, IntEnum, StrEnum, EnumType, Flag, IntFlag, unique, auto
from enum import STRICT, CONFORM, EJECT, KEEP, _simple_enum, _test_simple_enum
from io import St... |
test.py | import http.server
import socketserver
import queue
from threading import Thread
from time import sleep
import foundry
import requests
ready = queue.Queue()
server = None
def http_server():
global server
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT),... |
test_subprocess.py | import unittest
from test import script_helper
from test import support
import subprocess
import sys
import signal
import io
import locale
import os
import errno
import tempfile
import time
import re
import selectors
import sysconfig
import warnings
import select
import shutil
import gc
import textwrap
try:
import... |
controller.py | import functools
import inspect
import json
import re
from copy import copy
from datetime import datetime
from logging import getLogger
from threading import Thread, Event, RLock
from time import time
from typing import Sequence, Optional, Mapping, Callable, Any, List, Dict, Union
from attr import attrib, attrs
from ... |
run_inference_on_triton.py | #!/usr/bin/env python3
# Copyright (c) 2020, NVIDIA CORPORATION. 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
#
# U... |
ConductorWorker.py | #
# Copyright 2017 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
main.py | # -*- coding: utf-8 -*-
import configparser
import random
import re
import sys
from threading import Thread
import keyboard
import easygui as eg
from drag_and_drop_processing import drop_event
import text_processing as tp
import saved_data_manager
from saved_data_manager import DataManagerWindow
from PyQt5.QtGui impo... |
datasets.py | # Dataset utils and dataloaders
import glob
import math
import os
import random
import shutil
import time
from itertools import repeat
from multiprocessing.pool import ThreadPool
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
from PIL import Image, ExifT... |
test_detect_vitis.py | #!/usr/bin/env python
#
# // SPDX-License-Identifier: BSD-3-CLAUSE
#
# (C) Copyright 2019, Xilinx, Inc.
#
from __future__ import print_function
import os, sys
from six import itervalues, iteritems
from ctypes import *
import numpy as np
import timeit
import waa_rt
import cv2
sys.path.append("../../yolo")
from vai.dpu... |
BoMbEr.py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
╔═════════════════════════════════════════════════════════════════════════════════╗
║ ║
║ BoMbEr ║
║ Author:... |
mybmv2.py | # coding=utf-8
"""
Copyright 2019-present Open Networking Foundation
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 la... |
webstreaming.py | '''
Please see the dock
https://www.pyimagesearch.com/2019/09/02/opencv-stream-video-to-web-browser-html-page/
run cmd :
python webstreaming.py -i 192.168.123.100 -o 8080 -s 0
'''
# import the necessary packages
# from pyimagesearch.motion_detection import SingleMotionDetector
from imutils.video import VideoStream
fro... |
Control.py | #!../../venv/bin/python3
# -*- coding: utf-8 -*-
"""
+============================================================+
- Tác Giả: Hoàng Thành
- Viện Toán Ứng dụng và Tin học(SAMI - HUST)
- Email: thanh.hoangvan051199@gmail.com
- Github: https://github.com/thanhhoangvan
+===================================================... |
py4jbench.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import argparse
import codecs
from collections import OrderedDict, namedtuple, deque
import csv
import datetime
import gc
from math import sqrt
import os
import random
import platform
import subprocess
import sys
from threading import Thread
from time impo... |
test_ssl.py | # Test the support for SSL and sockets
import sys
import unittest
import unittest.mock
from test import support
from test.support import socket_helper
import socket
import select
import time
import datetime
import gc
import os
import errno
import pprint
import urllib.request
import threading
import traceback
import as... |
status_code.py | from gyomu.configurator import Configurator
from gyomu.db_connection_factory import DbConnectionFactory
from gyomu.gyomu_db_model import GyomuAppsInfoCdtbl, GyomuStatusHandler, GyomuStatusInfo
from gyomu.email_sender import EmailBuilder
from threading import Event, Thread
import traceback
from traceback import StackSum... |
test_decimal.py | # Copyright (c) 2004 Python Software Foundation.
# All rights reserved.
# Written by Eric Price <eprice at tjhsst.edu>
# and Facundo Batista <facundo at taniquetil.com.ar>
# and Raymond Hettinger <python at rcn.com>
# and Aahz (aahz at pobox.com)
# and Tim Peters
"""
These are the test cases for the Decim... |
SpiderPxory.py | #!/usr/bin/env python
# coding=utf-8
# skyvvx
# http://www.linuxyw.com
import urllib
import urllib2
import socket
import threading
import random
import bs4
from bs4 import BeautifulSoup
from gzip import GzipFile
from StringIO import StringIO
import zlib
import gzip
import re
import string
import time
import Queue
impor... |
qt.py | #!/usr/bin/env python
#
# Electrum - Lightweight Bitcoin Client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... |
txpoollistener.py | from web3.auto import w3
from threading import Thread
import time
from pprint import pprint
def handle_event(event):
hexed = w3.toHex(event)
print(hexed)
# and whatever
# print(w3.eth.getTransactionReceipt(event))
# print(w3.eth.getBlock(block_identifier=hexed, full_transactions=True))
# prin... |
udp_redis_bridge.py | #!/usr/bin/env python
# __BEGIN_LICENSE__
# Copyright (c) 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All rights reserved.
#
# The xGDS platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this fi... |
network_graph.py | import numpy as np
import torch
import torch.nn.functional as F
import matplotlib
import threading
try:
from matplotlib import pyplot as plt
except ImportError:
print("failed importing pyplot!")
from matplotlib import collections as mc
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.animation
import t... |
run.py | #!/usr/bin/env python3
# Usage: run.py [output_dir]
# If output directory is specified, it's used, otherwise a timestamp-named directory is created
gcc_arch = 'znver2' # skylake-avx512
gcc_arch = 'skylake-avx512'
icc_arch = 'skylake'
kernels = ['adi', 'atax', 'bicgkernel', 'correlation', 'covariance', 'dgemv3', 'f... |
resumable_client_connection.py | from .abstract_connection import AbstractConnection
from ..transport import AbstractTransport
import string
import random
import enum
import logging
import rx
import rx.subject
import rx.operators as op
import rx.scheduler
from queue import PriorityQueue, Queue
import threading
from .keepalive_support import KeepaliveS... |
p2p_stress.py | import testUtils
import p2p_test_peers
import random
import time
import copy
import threading
class StressNetwork:
speeds=[1,5,10,30,60,100,500]
sec=10
maxthreads=100
trList=[]
def maxIndex(self):
return len(self.speeds)
def randAcctName(self):
s=""
for i in range(12):... |
subsumption.py | # Got this code from: https://github.com/alexander-svendsen/ev3-python
import threading
import logging as log
class Behavior(object):
"""
This is an abstract class. Should embody an specific behavior belonging to a robot. Each Behavior must define three
things and should be implemented by the user:
1.... |
main.py | #Python Libs
import numpy as np
import time
import threading
import os
import json
import struct
import datetime
import tkinter as tk
from tkinter import ttk
from dataclasses import dataclass
from PIL import Image, ImageTk
#External Libs
import pytesseract
import cv2
import gtts
from mss impor... |
record.py | import sys
sys.path.append("../")
#! /usr/bin/python
import sensor_msgs.msg
import rospy
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
import cv2
import os
from std_msgs.msg import Float32MultiArray
from os.path import expanduser
import signal
import threading
from... |
cli.py | """
Command line entry
"""
import asyncio
import threading
from os import getpid
import psutil
from .web import Webserver
from ..models import WebserverArgs
from ..framework.communicator import CommunicatorFactory
class CommandLine:
'''Command line entry class
'''
def __init__(self, **kwargs):
se... |
hosted.py | #
# Part of info-beamer hosted. You can find the latest version
# of this file at:
#
# https://github.com/info-beamer/package-sdk
#
# Copyright (c) 2014-2020 Florian Wesch <fw@info-beamer.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted pro... |
Server.py | import socket
import Node
import p2pnetwork
import threading
class Server:
def __init__(self, node, port):
self.port = port
self.socket = None
self.node = node
def run(self, _):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #Using IPv4 protocol with TCP
... |
slp_graph_search.py | """
SLP Graph Search Client
Performs a background search and batch download of graph
transactions from a Graph Search server. For more information about
a Graph Search server see:
* gs++: https://github.com/blockparty-sh/cpp_slp_graph_search
* bchd: https://github.com/simpleledgerinc/bchd/tree/graphsearch
This class... |
map_test.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... |
process_join.py | '''
如果主进程的任务在执行到某一阶段时,需要等待子进程执行完毕后才能继续执行,
就需要一种机制能够让主进程检测子进程是否运行完毕,在子进程运行完毕后才继续
执行,否则一致在原地阻塞,这就是jion的用法.
'''
from multiprocessing import Process
import time
import random
import os
def task():
print('% is piaoing' % os.getpid())
time.sleep(random.randrange(1, 3))
print('%s is piao end' % os.getpid())
if _... |
wrtobleant.py | # ---------------------------------------------------------------------------
# Original code from the bfritscher Repo waterrower
# https://github.com/bfritscher/waterrower
# ---------------------------------------------------------------------------
import threading
import time
import datetime
import logging
import n... |
APIStreamConnector.py | from xapitrader.core.api.JsonSocket import JsonSocket
from xapitrader.core.api import settings
from threading import Thread
from xapitrader.utils import logger
def defaultErrFun(msg):
pass
class APIStreamConnector(JsonSocket):
def __init__(self, address=settings.DEFAULT_XAPI_ADDRESS, port=settings.DEFUALT_XAP... |
node_mobility.py | #!/usr/bin/env python3
import pickle, socket, traceback, struct, threading, time
from apscheduler.schedulers.background import BackgroundScheduler
from classes.mobility.pymobility.models.mobility import *
from classes import pprz_interface
class Mobility():
def __init__ (self, scenario, model, dimensions, velocity)... |
DUE_Miner.py | #!/usr/bin/env python3
##########################################
# Duino-Coin DUE Miner (v2.0)
# https://github.com/revoxhere/duino-coin
# Distributed under MIT license
# © Duino-Coin Community 2021
##########################################
import socket, threading, time, re, subprocess, configparser, sys, da... |
websocket_client.py | #
# gdax/WebsocketClient.py
# Daniel Paquin
#
# Template object to receive messages from the gdax Websocket Feed
from __future__ import print_function
import json
import base64
import hmac
import hashlib
import time
from threading import Thread
from websocket import create_connection, WebSocketConnectionClosedExceptio... |
test_dota_ms.py | # -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import os
import sys
import tensorflow as tf
import cv2
import numpy as np
import math
from tqdm import tqdm
import argparse
from multiprocessing import Queue, Process
sys.path.append(".... |
amber.py | import os
import threading
import time
import pytraj as pt
from .base import BaseMD
class AmberMD(BaseMD):
# TODO: doc
'''
Unstable API
Examples
--------
>>> from nglview.sandbox.amber import AmberMD
>>> amber_view = AmberMD(top='./peptide.top', restart='./md.r', reference='min.rst7')
... |
server.py | import logging
import os
import sys
import threading
from telegram.ext import (CommandHandler, Updater, CallbackQueryHandler)
import Brain
import Brain.Modules.help
from Brain.Utils.logger import initialize_logger
logger = logging.getLogger(__name__)
class Main:
def __init__(self):
threading.Thread(nam... |
arp-spoofing.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
import threading
"""
File name: hacking-arp-spoofing-DOS.Sniffing.py
Author: Jäger Cox // jagercox@gmail.com
Date created: 04/08/2016
License: MIT
Python Version: 2.7
Revision: PEP8
"""
__author__ = "Jäger Cox // jagercox@gmail.com"
... |
base.py | #! /usr/bin/env python3
# Copyright (c) 2014, HashFast Technologies LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... |
web_server.py | # -*- coding: utf-8 -*-
"""Xerox web server module."""
from __future__ import unicode_literals
import os
import threading
try:
from socketserver import ThreadingMixIn # Python 3 exclusive
from http.server import HTTPServer, SimpleHTTPRequestHandler
except Exception:
from SocketServer import ThreadingMixI... |
finalflow-mqtt-dev-local.py | # -*- coding: utf-8 -*
#import serial
import time
import sys
import os
import psutil
import RPi.GPIO as GPIO
#from adafruit_servokit import ServoKit
import os
import RPi.GPIO as GPIO
import uuid
#kit = ServoKit(channels=16)
from servo_actions_local import initialAvaIntroServo, myNameisAvaServo, Avadoyouhavequestion, c... |
GeneReview.py | # encoding: utf-8
import os
import annodb.models as dbmodels
from mongoengine import register_connection
from mongoengine.context_managers import switch_db
import annodb.lib.parser as parser
import re
import urllib3
from threading import Thread
from Queue import Queue
from bs4 import BeautifulSoup
urllib3.disable_warni... |
parameter.py |
try:
from ipywidgets import interact, interactive, interact_manual, HBox
import ipywidgets as widgets
except:
print("Can't import ipywidgets. Notebook widgets not available")
import unittest
from .cachemanager import VariantValue, VariantType
from .tinc_object import TincObject
from .variant import Varian... |
test_logging.py | #!/usr/bin/env python
#
# Copyright 2001-2004 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copy... |
util.py | import ctypes
import os
import shutil
import sys
from colorama import Back, Fore, Style
from taichi.core import settings
if sys.version_info[0] < 3 or sys.version_info[1] <= 5:
raise RuntimeError(
"\nPlease restart with Python 3.6+\n" + "Current Python version:",
sys.version_info)
ti_core = None
... |
MQTT_datos_2.py | #Script que publica el promedio de los valores sensados por el acelerometro ADXL345
#y por la sonda DS18B20 y los publica cada minuto en Adafruit IO
#!/bin/python3
import threading
import sys
import time
import random
import smbus
from w1thermsensor import W1ThermSensor, SensorNotReadyError
from Adafruit_IO import Requ... |
event_handler.py | import pygame
import sys
from pygame.locals import *
import core_communication
from multiprocessing import Queue, Process
def api_call_process(queue, playerId):
communicator = core_communication.WebServerCommunication()
info = communicator.getCurrentGame(playerId)
print info
queue.put(info)
class Ev... |
protocol_cp2110.py | #! python
#
# Backend for Silicon Labs CP2110/4 HID-to-UART devices.
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C) 2001-2015 Chris Liechti <cliechti@gmx.net>
# (C) 2019 Google LLC
#
# SPDX-License-Identifier: BSD-3-Clause
# This backend implements support for HID-to-UART devices manu... |
cloud_verifier_tornado.py | #!/usr/bin/python3
'''
SPDX-License-Identifier: Apache-2.0
Copyright 2017 Massachusetts Institute of Technology.
'''
import signal
import traceback
import sys
import functools
import asyncio
import os
from multiprocessing import Process
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.orm.exc import NoResul... |
__init__.py | import re, threading, time, traceback
from .DouYu import DouYuDanMuClient
from .Panda import PandaDanMuClient
from .ZhanQi import ZhanQiDanMuClient
from .QuanMin import QuanMinDanMuClient
from .Bilibili import BilibiliDanMuClient
from .HuoMao import HuoMaoDanMuClient
from .log import set_loggin... |
ffmpegmux.py | import os
import random
import threading
import subprocess
import sys
from livecli import StreamError
from livecli.stream import Stream
from livecli.stream.stream import StreamIO
from livecli.utils import NamedPipe
from livecli.compat import devnull
from livecli.compat import compat_which
class MuxedStream(Stream)... |
scheduler.py | import logging
import os
import signal
import time
import traceback
from datetime import datetime
from enum import Enum
from multiprocessing import Process
from redis import SSLConnection, UnixDomainSocketConnection
from .defaults import DEFAULT_LOGGING_DATE_FORMAT, DEFAULT_LOGGING_FORMAT
from .job import Job
from .l... |
new.py | import mindwave, time, subprocess
import RPi.GPIO as gpio
def init():
gpio.setmode(gpio.BCM)
gpio.setup(17, gpio.OUT)
gpio.setup(22, gpio.OUT)
gpio.setup(23, gpio.OUT)
gpio.setup(24, gpio.OUT)
def reverse(tf):
init()
gpio.output(17, True)
gpio.output(22, False)
gpio.output(23, True)
... |
board.py | import RPi.GPIO as GPIO
import time
import threading
import pygame
import random
class Board:
def __init__(self, fList=[], inputs={}):
GPIO.setmode(GPIO.BOARD)
random.seed(time.time())
self.fList = fList
self.inputs = {}
self.playBtn = 11
self.stopBtn = 12
se... |
FileLockTest.py | from queue import Empty
from multiprocessing import Process, Queue, Semaphore
from owmeta_core.file_lock import lock_file
from os import getpid, makedirs, unlink
from os.path import join as p
from tempfile import TemporaryDirectory
import pytest
def mutex_test_f(v, parent_q, fname, done, wait):
with lock_file(fn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.