source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
catchmind_ver2.py | #์์ง ํด๊ฒฐ ๋ชปํ๊ฑฐ:LED ์ถ๋ ฅ, ์์ฑ์ธ์
#๊ณต๋ฃก๊ฒ์์ผ๋ก ์ป์ ์๊น ๋ธ๋ญ ๊ฐฏ์๋ฅผ colorlistcnt
#์(๋นจ์ฃผ๋
ธ์ดํ๋ณดํฐ) colorlist
#colorlist=["red","orange","yellow","green","blue","purple","gray"]
colorlist=["black","red","green","yellow","blue","purple","skyblue"]
#colorlistcnt=[0,2,3,0,4,2,3]
colorlistcnt=[1,2,3,1,4,2,3]
from turtle import*
import time
import l... |
test_fx.py | import builtins
import contextlib
import copy
import functools
import inspect
import math
import numbers
import operator
import os
import pickle
import sys
import torch
import traceback
import warnings
import unittest
from math import sqrt
from torch.multiprocessing import Process
from torch.testing import FileCheck
fr... |
BuildReport.py | ## @file
# Routines for generating build report.
#
# This module contains the functionality to generate build report after
# build all target completes successfully.
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available... |
cluster.py | # Copyright 2019 รcole Polytechnique Fรฉdรฉrale de Lausanne. 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... |
ytdownloader_gui.py | # ============================================================================================
from tkinter import *
import tkinter as tk
from tkinter import messagebox
import tkinter.ttk as ttk
from tkinter.filedialog import askdirectory
import subprocess
import threading
import os
import sys
import eyed3
from pytub... |
test_operator.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... |
acquisitions.py | import numpy as np
import multiprocessing
import threading
from inspect import signature
import time
from pycromanager.zmq import deserialize_array, Bridge
from pycromanager.data import Dataset
import warnings
import os.path
import queue
from pycromanager.zmq import JavaObjectShadow
from docstring_inheritance import Nu... |
test_app.py | import json
import random
import threading
import tornado.websocket
import tornado.gen
from tornado.testing import AsyncHTTPTestCase
from tornado.httpclient import HTTPError
from tornado.options import options
from tests.sshserver import run_ssh_server, banner, Server
from tests.utils import encode_multipart_formdata,... |
main.py | import socket
import json
import threading
from gui import *
gui = GUI()
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
def main():
client.connect(('localhost', 8888))
readIncomingThread = threading.Thread(target=read_incoming)
readIncomingThread.start()
gui.pack()
gui.inputField.bi... |
patl.py | import pyaudio
import numpy
import time
import logging
from threading import Thread
from patutils import LENGTH, BOUND, TONES, ReturnCode
STOP = False
CHUNK = 2048
RATE = 44100
DEBUG = True
threads = []
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=RATE, input=True, frames_per_buffer=... |
websocket_server.py | #coding=utf-8
import sys,pathlib
gsqp=pathlib.Path(__file__).absolute(
).parent.parent.parent.__str__()
#*.py /N /qgb /[gsqp]
if gsqp not in sys.path:sys.path.append(gsqp)#py3 works
from qgb import py
U,T,N,F=py.importUTNF()
# py.pdb()()
#ไธ้ข่ฟๆ ทไธ่ก๏ผไธ็ดๅกๅจ'C:\\QGB\\babun\\cygwin\\bin\\qgb'๏ผๅคๅ .parentไนๆ ๆ
#... |
__init__.py | import curses, logging.config, threading, click
from time import sleep
from .interfaces import TextAccumulator, OptionWindow
from .textgenerator import TextGenerator
from random import randint
highlighted_slot_index = 0
def draw_menu(stdscrr, option_window, global_text_accumulator):
stdscr = curses.initscr()
... |
jrpc_py.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import random
import time
from builtins import *
import zmq
try:
import queue
except ImportError:
import queue as queue
import threading
import msgp... |
automating_all_users_csv.py | """
'Automated ALL' CSV Test Program v2.0, Copyright 2017 Sam Suri
CSV Test program retrieves live data but does not update ANYTHING in VAN. It shows the user what would happen via
use of a CSV file. Program should be run prior to running full program.
"""
import hmac, hashlib, time, json, requests
import thr... |
application.py | import os
import time
import multiprocessing as mp
import logging
import configparser as configparser
import json
import coloredlogs
from beaker.cache import CacheManager
from beaker.util import parse_cache_config_options
from lockfile import LockFile
from augur import logger
import argparse
def updater_process(name, ... |
zap.py | # ZAP - Zurich Atmosphere Purge
#
# Copyright (c) 2016 Kurt Soto
#
# 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 right... |
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... |
__init__.py | # __init__.py โ Debexpo application test package
#
# This file is part of debexpo -
# https://salsa.debian.org/mentors.debian.net-team/debexpo
#
# Copyright ยฉ 2008 Jonny Lamb <jonny@debian.org>
# Copyright ยฉ 2010 Jan Dittberner <jandd@debian.org>
# Copyright ยฉ 2019 Baptiste Beauplat <lyknode@cilg.org>
#
# ... |
local_job_service.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... |
Sync.py | from bin.service import ConfluenceAPI
from bin.service import Gitlab
from bin.service import JiraAPI
from bin.service import Logger
from bin.service import Environment
from bin.service import SciKitLearn
import threading
import yaml
import os
import time
import numpy
confluence_done = False
jira_done = False
git_done ... |
ipscan.py | # -*- coding: utf-8 -*-
'''
Author=yanyun
Email=yanyuneternal@163.com
'''
import platform
import os
import threading
import time
'''
call for example
print "start time %s"%time.ctime()
ipscan.ipscan('192.168.1',2,255)
print "start time %s"%time.ctime()
'''
def get_os():
os = platform.system()
if os == "Windows... |
test_run.py | import contextvars
import functools
import platform
import sys
import threading
import time
import types
import warnings
from contextlib import contextmanager, ExitStack
from math import inf
from textwrap import dedent
import attr
import outcome
import sniffio
import pytest
from .tutil import slow, check_sequence_mat... |
lisp-etr.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... |
test_integration.py | import itertools
import logging
import os
import subprocess
import sys
import mock
import pytest
import six
import ddtrace
from ddtrace import Tracer
from ddtrace.internal import agent
from ddtrace.internal.runtime import container
from ddtrace.internal.writer import AgentWriter
from tests.utils import AnyFloat
from ... |
modbus_server.py | """This file emulate a modbus server for tests."""
import logging
import threading
import time
from collections import defaultdict
from socketserver import TCPServer
from umodbus import conf
from umodbus.server.tcp import RequestHandler, get_server
from umodbus.utils import log_to_stream
log_to_stream(level=logging.... |
cli.py | import os
import sys
import threading
from contextlib import contextmanager
import click
import six
from gevent import pywsgi
from geventwebsocket.handler import WebSocketHandler
from dagster import check, seven
from dagster.cli.workspace import Workspace, get_workspace_from_kwargs, workspace_target_argument
from dag... |
timertest.py | # import the necessary packages
from threading import Thread
import time
class pingtimer:
def __init__(self, src=0, name="timer"):
# initialize the thread name
self.name = name
self.duration = 0
# initialize the variable used to indicate if the thread should
# be stopped
... |
evaluator.py | """This file runs as a free-standing program within a sandbox, and processes
permutation requests. It communicates with the outside world on stdin/stdout."""
import base64
from dataclasses import dataclass
import math
from multiprocessing import Process, Queue
import os
import queue
import sys
from tempfile import mkst... |
test_base.py | import unittest
import time
from contextlib import suppress
from queue import Queue as ThreadQueue
from threading import Thread
from threading import Event as ThreadEvent
import numpy as np
from pdp.base import InterruptableQueue, StopEvent, start_one2one_transformer
DEFAULT_LOOP_TIMEOUT = 0.02
def set_event_after... |
SetupDialog.py | import os
import time
import threading
import serial
import serial.tools.list_ports
import wx
from RomWack import RomWack
from SAD import SAD
from ExecLibrary import ExecLibrary
from AmigaSnippets import AmigaSnippets
class SetupDialog(wx.Frame):
#(CLK/BAUDRATE)-1 = SERPER
#CLK/(SERPER+1) = BAUDRATE
#(serpe... |
generate_data.py | #!/usr/bin/env python3
# Copyright 2016 Google Inc. 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... |
blacs_workers.py | #####################################################################
# #
# /NI_DAQmx/blacs_workers.py #
# #
# Copyright 2018, Monash University, JQI... |
background_caching_job.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... |
SerialClient.py | #!/usr/bin/env python
#####################################################################
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that th... |
run_tests.py | #!/usr/bin/env python
# Copyright 2013 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# -*- coding: utf-8 -*-
import argparse
import sys
import unittest
from multiprocessing import Process
from urllib import urlopen
from t... |
__main__.py | #####################################################################
# #
# /main.pyw #
# #
# Copyright 2014, Monash University ... |
channelapihelper.py | # Copyright 2012 Google Inc. 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 applicable law or a... |
handlers.py | import logging
import queue
import threading
import time
import traceback
from typing import Any, Dict, List
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.orm import sessionmaker
from sqlalchemy_utils import create_database, database_exists
from c2cw... |
abandonedanimal.py | import sys
import threading
def main():
n = int(input(''))
k = int(input(''))
supermarkets = []
for i in range(k):
index, food = input('').split(' ')
index = int(index)
if index >= len(supermarkets):
temp = {}
temp[food] = -1
supermarkets.append(temp)
else:
supermarkets[index][food] = -1
m = i... |
main.py | import json
import traceback
from json import JSONDecodeError
from spotifyAPI import SpotifyAPI
from soundcloudAPI import SoundcloudAPI
from downloader import Downloader
import os
import threading
import PySimpleGUI as sg
import logging
from sys import exit
LOG_FORMAT = "%(levelname)s %(asctime)s - %(message)s"
loggi... |
crawler1.py | #!/usr/bin/env python
# encoding=utf-8
#codeby ้้ฟไธ้ป
#email ydhcui@suliu.net/QQ664284092
#website http://www.suliu.net
import time
import re
import os
import sys
import queue
import urllib.parse as urlparse
'''
from lib import requests
from core.util import CoroutinePool as ThreadPool
from core.cmsfind imp... |
x32.py | from . import Handler
import hug
import socket
import threading
from collections import Iterable
from pythonosc import udp_client, osc_server, dispatcher
from pythonosc.osc_message_builder import OscMessageBuilder
# The included SimpleUDPClient class does not allow you to build messages
# with no values, which X32 r... |
kfold-cv-pool-answer.py | import numpy as np
import matplotlib
matplotlib.use('pdf')
import matplotlib.pyplot as plt
from multiprocessing import Pool, Process
from sklearn import svm
import time
test = np.loadtxt("optdigits.txt", delimiter = ",")
X = test[:, 0:64]
y = test[:, 64]
# Plot some of the digits
#fig = plt.figure(figsize=(8, 6))
#f... |
parser.py | import sublime, sublime_plugin
from http.server import BaseHTTPRequestHandler, HTTPServer
import json, _thread, threading
import platform, os, sys, time
TESTS_FILE_SUFFIX = ''
totalProblems, problems_parsed, successful_problems = 1, 0, 0
settings, user_settings = None, None
contest_name, contest_dir, working_dir, erro... |
loader.py | # Copyright (c) 2017-present, Facebook, 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... |
traffic_util.py | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... |
run_experiments.py | #!/usr/bin/env python3
#
# Copyright (C)ย ย 2022ย ย Intel Corporation.ย
#
# This software and the related documents are Intel copyrighted materials, and your use of them is governed by the express license under which they were provided to you ("License"). Unless the License provides otherwise, you may not use, modify, co... |
fake_wsdl_server.py | from threading import Thread
from wsgiref.simple_server import make_server
from spyne import (Application, ComplexModel, Integer, Iterable, ServiceBase,
String, Unicode, rpc)
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
class Person(ComplexModel):
name =... |
test_utils.py | # Copyright (c) 2010-2012 OpenStack 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 law or agree... |
cronjob.py | from pythontools.core import logger
from threading import Thread
import time, traceback, re, sys
from datetime import datetime, timedelta
_MANAGER = None
_CRONJOBS = []
_UPDATE_INTERVAL = 60
class CronJob:
def __init__(self, name, interval, function, wait_for_last_job=True):
self.name = name
sel... |
server.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... |
dag_processing.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
#... |
sauce.py | import csv
import os
import subprocess
import threading
# Gather the packages to test.
PREFIX = './packages/node_modules/'
CISCOSPARK = os.path.join(PREFIX, '@ciscospark')
WEBEX = os.path.join(PREFIX, '@webex')
PROD_ENV_VARS = {
# 'ACL_SERVICE_URL': 'https://acl-a.wbx2.com/acl/api/v1', ?
'ATLAS_SERVICE_URL': 'ht... |
brownian.py | # Brownian motion -- an example of a multi-threaded Tkinter program.
from tkinter import *
import random
import threading
import time
import sys
WIDTH = 400
HEIGHT = 300
SIGMA = 10
BUZZ = 2
RADIUS = 2
LAMBDA = 10
FILL = 'red'
stop = 0 # Set when main loop exits
def particle(canvas):
... |
pc2pc.py | from enum import Enum
from os import system
from threading import Thread
import numpy as np
import pygame, time
from pygame.locals import *
pygame.init()
class Mode(Enum):
Select = 1
Rotate = 2
Solve = 3
class User(Enum):
Null = 0
PC1 = 1
PC2 = 2
SOLVER = "solvers/hashsolver.o"
def draw():
... |
reindex.py | #!/usr/bin/env python
import time
import threading
import subprocess
import os
import logging
import sys
from assemblyline.al.common import forge, log as al_log, queue
config = forge.get_config()
# Run config
DATABASE_NUM = 3
RETRY_PRINT_THRESHOLD = 1000
PROCESSES_COUNT = 50
COUNT_INCREMENT = 1000
LOW_THRESHOLD = 10... |
thread.py | # Copyright 2017, Google Inc. 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 applicable law or ... |
target_bigquery.py | #!/usr/bin/env python3
import argparse
import io
import sys
import json
import logging
import collections
import threading
import http.client
import urllib
import pkg_resources
from jsonschema import validate
import singer
from oauth2client import tools
from tempfile import TemporaryFile
from google.cloud import bi... |
test_system.py | # Copyright 2016 Google LLC 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 applicable law or ag... |
impinj_xarray_itemsense.py | from interrogator import *
import requests
import base64
import threading
import json
import sys
from httplib2 import Http
import os
import queue
from time import sleep
import collections
import dateutil.parser
class ImpinjXArray(Interrogator):
def __init__(self, _ip_address, _db_host, _db_password, _cert_path, _d... |
ytdl.py |
import asyncio
import datetime
import functools
import logging
import os
import pathlib
import platform
import re
import subprocess
import tempfile
import threading
import traceback
import fakeredis
import filetype
import youtube_dl
from hachoir.metadata import extractMetadata
from hachoir.metadata.audio import FlacM... |
run.py | try:
import sr.comp
except ImportError:
print("No srcomp detected. Did you activate the virtualenv?")
print("$ source venv/bin/activate")
exit(1)
import cherrypy
import argparse
import os.path
import threading
import subprocess
import time
from sr.comp.http import app
parser = argparse.ArgumentParser(... |
e2e_throughput.py | #!/usr/bin/python3
from zoo.serving.client import InputQueue, OutputQueue
from zoo.common.encryption_utils import encrypt_with_AES_GCM
import os
import cv2
import json
import time
from optparse import OptionParser
import base64
from multiprocessing import Process
import redis
import yaml
import argparse
from numpy impo... |
rconrestart.py | import lib.rconprotocol
import sched
import logging
import time
import threading
"""
RconRestart class module.
Used to setup a shutdown timer with restart messages.
Please note that this module will only exit the server.
You may need an additional script (or watchdog) to get the server back online.
"""
class RconRest... |
manager.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# 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 b... |
test_crt_basic_vm_with_max_threads.py | '''
New Perf Test for creating KVM VM with basic L3 network.
The created number will depends on the environment variable: ZSTACK_TEST_NUM
The difference with test_basic_l3_vm_with_given_num.py is this case's max thread is 1000
@author: Youyk
'''
import zstackwoodpecker.test_util as test_util
import zsta... |
robot_driver.py | import rospy
import time
import actionlib
import threading
import argparse
from control_msgs.msg import FollowJointTrajectoryAction
from control_msgs.msg import FollowJointTrajectoryFeedback
from sensor_msgs.msg import JointState
from std_msgs.msg import String
from hiwin_robot_interface import HiwinRobotInterface
J... |
worker.py | import os
import sys
import json
import platform
import socket
import signal
import logging
import logging.config
import threading
import traceback
import argparse
import multiprocessing
from time import monotonic
from typing import Dict, Any, List, Tuple # noqa
import amqp
from kuyruk import importer, signals
from ... |
03_bosshp_detect.py |
import time
import os
from pynput.keyboard import Key, Listener, KeyCode
from pynput import mouse, keyboard
from windowcapture import WindowCapture
import cv2
from threading import Thread
os.chdir(os.path.dirname(os.path.abspath(__file__)))
class ScreenshotGrabber5Sec():
def __init__(self) -> None:
self... |
run_manager.py | # -*- coding: utf-8 -*-
# (c) 2020-2021 Martin Wendt and contributors; see https://github.com/mar10/stressor
# Licensed under the MIT license: https://www.opensource.org/licenses/mit-license.php
"""
"""
import itertools
import sys
import threading
import time
from collections import defaultdict
from datetime import dat... |
auto_rotate.py | #!/usr/bin/env python3
import sys, os, sh, threading, time
from tablet_mode_detection import pipe_switch_output, listen_for_switch_state
def find_monitor_name():
os.system("xrandr --listmonitors | grep '0:' > /tmp/showmonitor.txt")
with open("/tmp/showmonitor.txt", "rb") as f:
byts = 0
f.seek(... |
tasks.py | import os
import sys
import fcntl
import datetime
import json
import re
import time
import zipfile
import threading
import hashlib
import shutil
import subprocess
import pprint
import random
from invoke import task
import boto3
import botocore.exceptions
import multiprocessing
import io
import ai2thor.build
import logg... |
Chatcast.py | import socket, threading
def oku(bruh, nigga):
soket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
soket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
while True:
try:
soket.bind((bruh, nigga))
except:
continue
break
print("\nSuccess... |
test_imperative_thread_local_has_grad.py | # Copyright (c) 2021 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 ap... |
visualizer.py | import math
import numpy as np
import threading
import open3d as o3d
from open3d.visualization import gui
from open3d.visualization import rendering
from collections import deque
from .boundingbox import *
from .colormap import *
from .labellut import *
import time
class Model:
"""Attributes, data, and methods o... |
keep_alive.py | #this code is so uptimerobot or an external server can refresh this page and keep the bot online
#will no longer be required as repl will be boosted and kept online 24/7
#important imports for system
import flask
import threading
from flask import Flask
from threading import Thread
app = Flask("")
@app.route("/")
de... |
multilock1.py | import threading
import time
num = 100
def fun_sub():
global num
lock.acquire()
print('----ๅ ้----')
print('็ฐๅจๆไฝๅ
ฑไบซ่ตๆบ็็บฟ็จๅๅญๆฏ:', t.name)
num2 = num
time.sleep(0.001)
num = num2-1
lock.release()
print('----้ๆพ้----')
if __name__ == '__main__':
print('ๅผๅงๆต่ฏๅๆญฅ้ at %s' % time.ctime())... |
ray.py | #! /usr/bin/env python
# Copyright (c) 2019 Uber Technologies, 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 a... |
file_utils_unittest.py | #!/usr/bin/env python3
# Copyright 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittest for file_utils.py."""
import base64
import binascii
import hashlib
import logging
import multiprocessing
import os
im... |
config_store_client_tests.py | #!/usr/bin/env python3
#
# Copyright (c) 2014-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
fro... |
video.py | import os
import time
from queue import Queue, Empty, Full
from threading import Thread
import ffmpeg
import numpy
from .constant import PX_RGB, PX_BGR, DEFAULT_QUALITY, THUMBNAIL_RESOLUTION, SD_RESOLUTION
from .image import ENCODE_JPEG, ENCODE_PNG, imwrite
from .image import imencode, imdecode
from .tool import show... |
op_util.py | # Copyright 2017-2022 TensorHub, 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 writ... |
mipass.py | #!/usr/bin/env python
'''A password keeping service.
.. moduleauthor:: Lenx Wei <lenx.wei@gmail.com>
A server provides password cache and lookup service.
Depending on pycrypto, python-daemon
Password format::
id_md5_hashed_and_hex = rnd,pass_aes_encrypted_by_master_key1_and_hex
rnd is used to generate the IV, sh... |
corehandlers.py | """
socket server request handlers leveraged by core servers.
"""
import logging
import os
import shlex
import shutil
import sys
import threading
import time
from itertools import repeat
import socketserver
from builtins import range
from queue import Queue, Empty
from core import utils
from core.api.tlv import core... |
coap.py | import logging.config
import random
import socket
import struct
import threading
import xml.etree.ElementTree as ElementTree
import os
import re
from coapthon import defines
from coapthon.client.helperclient import HelperClient
from coapthon.layers.blocklayer import BlockLayer
from coapthon.layers.cachelayer import C... |
engine.py | # encoding: UTF-8
# ้่พพไฟกๆๆฐ่กๆ
ๅๅธๅจ
# ๅๅฏ่ตไบง
import copy
import json
import traceback
from threading import Thread
from datetime import datetime, timedelta
from time import sleep
from logging import ERROR
from pytdx.exhq import TdxExHq_API
from copy import deepcopy
from vnpy.event import EventEngine
from vnpy.trader.consta... |
Chap10_Example10.33.py | from threading import *
class abc:
def __init__(self, seat_available):
self.seat_available = seat_available
self.mylock = Lock()
def abc_reserveseat(self, seat_required):
self.mylock.acquire()
print("Number of seats remaining : ", self.seat_available)
if sel... |
power_monitoring.py | import random
import threading
import time
from statistics import mean
from typing import Optional
from cereal import log
from common.params import Params, put_nonblocking
from common.realtime import sec_since_boot
from selfdrive.hardware import HARDWARE
from selfdrive.swaglog import cloudlog
from selfdrive.statsd imp... |
__init__.py | """Support for functionality to download files."""
import logging
import os
import re
import threading
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.util import sanitize_filename
_LOGGER = logging.getLogger(__name__)
ATTR_FILENAME = 'filename'
ATTR_... |
main.py | import kivy
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.core.audio import SoundLoader
from kivy.clock import Clock
from functools import partial
import numpy as np
import cv2
import sys,os, cPickle
from threading import Thread
from levels import main_game,original_game
import datetim... |
webapp.py | """
WSGI Middleware for python webservers
"""
import types
import string
import weakref
import sys
import gc
import cgi
import os
from ConfigParser import ConfigParser
import urlparse
import re
import mimetypes
import time
import threading
import traceback
import datetime
from Cookie import SimpleCookie
import uuid
fro... |
ocr.py | #!/usr/bin/env python3
import threading
import ocrmypdf
import os
import sys
import warnings
import inspect
from PIL import Image
warnings.simplefilter('ignore', Image.DecompressionBombWarning)
def start_job(dir_path, currentfile, progressbar_batch, progressbar_singlefile, outputarea, ocrmypdfsettings):
t = threadi... |
start_sploit.py | #!/usr/bin/env python3
from urllib.request import Request, urlopen
from urllib.parse import urljoin
from math import ceil
from enum import Enum
from concurrent.futures import ThreadPoolExecutor
import threading
import time
import subprocess
import stat
import re
import random
import os
import logging
import json
impor... |
analyzer.py | # Date: 2021/7/19
# Author: Lan_zhijiang
# Description: AntiDDoSๅฏนๆฐๆฎ่ฟ่กๅ ๅทฅ
import threading
import time
import os
class Analyzer:
def __init__(self, base):
self.base = base
self.log = base.log
self.raw_queue = base.raw_queue
self.basic_analyze_result_queue = base.basic_analyze_resu... |
locomotion.py | """A model based controller framework."""
from absl import logging
from datetime import datetime
import enum
import ml_collections
import numpy as np
import pandas as pd
import os
import pickle
import pybullet
from pybullet_utils import bullet_client
import threading
import time
from typing import Tuple
from src.conv... |
AWSBucketDump.py | #!/usr/bin/env python
# AWSBucketDump is a tool to quickly enumerate AWS S3 buckets to look for loot.
# It's similar to a subdomain bruteforcer but is made specifically to S3
# buckets and also has some extra features that allow you to grep for
# delicous files as well as download interesting files if you're not
# afr... |
test_parser.py | #!/usr/bin/env python
import re
import random
import string
import threading
from tests import unittest, OrderedDict
from jmespath import parser
from jmespath import visitor
from jmespath import ast
from jmespath import exceptions
class TestParser(unittest.TestCase):
def setUp(self):
self.parser = parser... |
Opa.py |
import threading
import os, time
import json
import traceback
from base.urlop import UrlRequestOp
from core import login, course
from handler.struct.user import UserData
from handler import Pool
from handler.Error import LoginBasicException, UrlOpTimeOutError, PullerBasicException
import gui
import llogger
NOTICE... |
test_set_jy.py | import unittest
from test import test_support, test_set
import pickle
import threading
from java.io import (ByteArrayInputStream, ByteArrayOutputStream,
ObjectInputStream, ObjectOutputStream)
from java.util import Random, HashSet, LinkedHashSet
from javatests import PySetInJavaTest
class SetTes... |
server_runner.py | import logging
import threading
import time
import array
import mlperf_loadgen as lg
import numpy as np
from ..constants import QUERY_COUNT, NANO_SEC, MILLI_SEC
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
class ServerRu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.