source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
Boy.py | # -*- coding: utf-8 -*-
import LINETCR
from LINETCR.lib.curve.ttypes import *
from datetime import datetime
import time,random,sys,json,codecs,threading,glob,re
cl = LINETCR.LINE()
cl.Tokenlogin(=True)
cl.loginResult()
ki = LINETCR.()
ki.Tokenlogin(="")
ki = kk = kc = cl
print "login success"
reload(sys)
sys.setd... |
jobs.py | import logging
import multiprocessing as mp
import os
import sys
from functools import partial
import dill
from autogluon.core.scheduler.managers import TaskManagers
from autogluon.core.scheduler.reporter import Communicator, LocalStatusReporter
from autogluon.core.utils import CustomProcess, AutoGluonEarlyStop
from ... |
main.py | # -*- coding: utf-8 -*-
# 代理IP池程序入口
import re
import time
from threading import Thread
import schedule
import config
from crawler import get_all_proxies
from process import DataProcessor
from validate import validate, concat_proxy
# 数据处理器
dp = DataProcessor()
def crawler_task():
for item in get_all_proxies():... |
train.py | from concurrent.futures import ThreadPoolExecutor
import gym
import matplotlib.pyplot as plt
from math import tanh
import numpy as np
import os
import PIL
import threading
from time import sleep, time
from tqdm import tqdm
import torch
from torch.optim import Adam
import torchvision
from dataset import ModelDataset
fr... |
owersitex.py | import time
import threading
import keyboard
import pymem
import pymem.process
from PyQt5 import QtCore, QtGui, QtWidgets
import requests
from math import *
import ctypes
import random
offsets = 'https://raw.githubusercontent.com/owersite/Python-CSGO-Cheat/master/offsets/offsets.json'
response = requests.g... |
environment.py | import os
import ConfigParser
import logging
import httplib
import base64
import multiprocessing
from datetime import datetime
from selenium import webdriver
from elasticsearch import Elasticsearch
from sheer.wsgi import app_with_config
from pages.screenshot import Screenshot
from pages.base import Base
from pages.na... |
test_browser.py | # coding=utf-8
from __future__ import print_function
import argparse
import json
import multiprocessing
import os
import random
import re
import shlex
import shutil
import subprocess
import time
import unittest
import webbrowser
import zlib
from runner import BrowserCore, path_from_root, has_browser, EMTEST_BROWSER
f... |
chapter10.py | # Q1
from datetime import date
now = date.today()
now_string = now.isoformat()
with open('today.txt', 'w') as file:
print(now, file=file)
# Q2
today_string = None
with open('today.txt') as file:
today_string = file.read()
print(today_string)
# Q3
from datetime import datetime
format = '%Y-%m-%d\n'
print(d... |
tio_session.py | #!/usr/bin/env python3
# coding: utf-8
"""
Twinleaf IO (tio) - A serialization for instrumentation
Copyright 2017-2019 Twinleaf LLC
License: MIT
A simple protocol for working with sensors through single-port/serial connections.
"""
import serial
import socket
import threading
import struct
import urllib.parse
import ... |
multithread_dataiter_for_cross_entropy_v2.py | # -*- coding: utf-8 -*-
import random
import math
import threading
import time
import logging
import queue
import cv2
import numpy
from ChasingTrainFramework_GeneralOneClassDetection.image_augmentation.augmentor import Augmentor
from ChasingTrainFramework_GeneralOneClassDetection.data_iterator_base.data_batch import D... |
minion.py | # -*- coding: utf-8 -*-
'''
Routines to set up a minion
'''
# Import python libs
from __future__ import print_function
import copy
import errno
import fnmatch
import hashlib
import logging
import multiprocessing
import os
import re
import salt
import signal
import sys
import threading
import time
import traceback
impo... |
camera_process.py | from ..common.event import EventDispatcher
from ..common.events import *
from ..input.camera import Camera
from ..input.frame import Frame
from multiprocessing import Process, Pipe
import time
import copy
import numpy as np
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
def cameraWorke... |
GameView.py | import time
import threading
from tkinter import *
import socket
import errno
import OnitamaMessages
import OnitamaEngine
class GameView:
def __init__(self):
self._quitStatus = 300
self._sessionName = "Test Session Name"
self._isClosing = False
self._allIncomingTcpData = ""
... |
test_queues.py | import threading
import time
from dagster import ModeDefinition, default_executors
from dagster_celery import celery_executor
from .utils import execute_on_thread, skip_ci, start_celery_worker
celery_mode_defs = [ModeDefinition(executor_defs=default_executors + [celery_executor])]
# @pytest.mark.skip
@skip_ci
def ... |
test_InfluxDBClient.py | import http.server
import json
import os
import threading
import unittest
import pytest
from urllib3.exceptions import NewConnectionError, HTTPError
from influxdb_client import InfluxDBClient, Point
from influxdb_client.client.write_api import WriteOptions, WriteType, SYNCHRONOUS
from tests.base_test import BaseTest
... |
utils.py | #!/usr/bin/env python
"""This file contains various utility classes used by GRR."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import base64
import errno
import functools
import getpass
import io
import os
import... |
image_collect.py | import time
import threading
import cv2
import os
import sys
import socket
import struct
import pickle
import psutil
import random
import numpy as np
from tkinter import *
# tkinter stufffffff
angle = 1540
def throttlethread():
global angle
angle = 1540
def assign_angle(val):
global angle
... |
base.py | import logging
try:
from Queue import Queue # PY2
except ImportError:
from queue import Queue # PY3
from threading import Thread
try:
from urlparse import urljoin # PY2
except ImportError:
from urllib.parse import urljoin # PY3
from six import iteritems
from six.moves import range
from .utils impo... |
led_show.py | #!/usr/bin/env python3
import sys
import time
import threading
import random
import pifacedigitalio
class LedController:
"""Simple Class to controll the LED show behaviour"""
def __init__(self):
self.rnd = 0
self.odd_led = 0
self.even_led = 0
self.all_at_once = 0
self.l... |
RTTMonitor.py | # The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/license/.
#
# Software di... |
virtualcenter.py | # coding: utf-8
"""Backend management system classes
Used to communicate with providers without using CFME facilities
"""
import atexit
import operator
import re
import ssl
import threading
import time
from datetime import datetime
from distutils.version import LooseVersion
from functools import partial
import pytz
... |
serve.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import abc
import argparse
import json
import logging
import os
import platform
import signal
import socket
import sys
import threading
import time
import traceback
from six.moves import urllib
import uuid
from collections import defaultdict, OrderedDict
f... |
minibus.py | # Copyright 2015 Dan Brooks
#
# 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 i... |
application_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... |
mul.py | import threading
import socket
import operator
import sys
import tkinter as tkinter
import time
def get_operator_fn(op):
return {
'+' : operator.add,
'-' : operator.sub,
'*' : operator.mul,
'/' : operator.truediv,
'MOD' : operator.mod,
'^' : operator.xor,
}[op]
def eval_binary_expr(op1, operator, op2):
... |
007_semaphor.py | import time, threading
def producer():
with lock:
print('set locking', lock._value)
time.sleep(3)
print("I'm free")
max_workers = 1
lock = threading.BoundedSemaphore(value=max_workers)
task1 = threading.Thread(target=producer)
task2 = threading.Thread(target=producer)
task3 = threading.T... |
mysql.py | import logging
import os
import threading
from redash.query_runner import (
TYPE_FLOAT,
TYPE_INTEGER,
TYPE_DATETIME,
TYPE_STRING,
TYPE_DATE,
BaseSQLQueryRunner,
InterruptException,
JobTimeoutException,
register,
)
from redash.settings import parse_boolean
from redash.utils import js... |
scrape_characters.py | import pandas as pd
import requests
from bs4 import BeautifulSoup
import re
import threading
import time
df = pd.read_csv('Data/RankingLevelData/Players.csv')
base_url = 'https://new.margonem.pl'
df['Url'] = base_url + df['Url']
cnt = 0
global_lock = threading.Lock()
log = ''
l_new_players_data = []
l_new_characters_... |
serve.py | # -*- coding: utf-8 -*-
import abc
import argparse
import importlib
import json
import logging
import multiprocessing
import os
import platform
import signal
import socket
import subprocess
import sys
import threading
import time
import traceback
import urllib
import uuid
from collections import defaultdict, OrderedDi... |
multiple_thread.py | import threading
import time
def get_url_list():
print("get_url_list begining")
time.sleep(3)
print("get_url_list end")
def get_html_detail(url):
print("get_html_detail begining")
time.sleep(6)
print("get_html_detail end")
class GetUrlList(threading.Thread):
def __init__(self, name... |
test.py | #! /usr/bin/env python3
#
# Copyright 2019-2020 Garmin Ltd. or its subsidiaries
#
# 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... |
run.py | import os
import gym
import time
import torch
import numpy as np
import numpy.random as rd
from copy import deepcopy
from elegantrl.agent import ReplayBuffer, ReplayBufferMP
from elegantrl.env import PreprocessEnv
gym.logger.set_level(40) # Block warning: 'WARN: Box bound precision lowered by casting to float32'
""... |
Functions.py | # Christian Piper
# 11/6/19
# This is a file for all functions I create, so that they can be referenced from all files.
from time import time
import multiprocessing
import os
# Function for input to output conversion. For future use
def convertValues(inputVal, inputArray, outputArray, wrapAround):
'''
:param i... |
deleteme.py | import logging
import multiprocessing
import sys
LOG_FORMAT = "%(levelname)s %(asctime)s - %(message)s"
LOG_LEVEL = "INFO"
LOGGING_HANDLER = logging.StreamHandler(sys.stdout)
logging.basicConfig(handlers=[LOGGING_HANDLER], level=logging._nameToLevel[LOG_LEVEL.upper()],
format=LOG_FORMAT)
LOGGER =... |
run_squad.py | #! /usr/bin/env python
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... |
uds_client.py | #!/usr/bin/python
import socket
import sys
import json
from threading import Thread
# Create a UDS socket
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# Connect the socket to the port where the server is listening
server_address = '/tmp/quicklist.sock'
print('connecting to {}'.format(server_address))
d... |
GetValuesFromCam.py | # ===============================================================================================================================
#
# Name : mavlinkSonyCamWriteVals.py
# Desc : Global memory value class for use to write mavlink to sony cam
# Auth : AIR-obots Ai-Robots
#
# ===============================================... |
__init__.py | import hid, threading, time
from hexbytes import HexBytes
from eth_utils.crypto import keccak
import logging
#from shadowlands.credstick.transactions import (
# AttributeDict,
# encode_transaction,
# Transaction,
# UnsignedTransaction
#)
import rlp
from time import sleep
from shadowlands.tui.debug import debug
im... |
YeelightWifiBulbLanCtrl.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import time
import fcntl
import re
import os
import errno
import struct
from threading import Thread
from time import sleep
from collections import OrderedDict
detected_bulbs = {}
bulb_idx2ip = {}
DEBUGGING = False
RUNNING = True
current_command_id = 0
MCA... |
app.py | import threading
from flask import Flask, render_template
import ssh
from gevent import pywsgi
app = Flask(__name__)
host_info = {}
cfg_dict = {}
@app.before_first_request
def start_ssh():
global cfg_dict, host_info
ssh_pool, cfg_dict = ssh.init()
for (ssh_id, (host, ssh_cfg)) in enumerate(ssh_pool.ite... |
bloomfilter.py | #bloomfilter.py
from abc import ABC, abstractmethod; #abstract base class
import hashlib;
from bitstring import BitArray; #requires pip install bitstring
import numpy;
import threading;
import time;
class AbstractBloomFilter(ABC):
"Abstract Bloom Filter Class" #documentation
## instan... |
obs-cider-nowplaying.py | import obspython
from flask import Flask, Response, send_file, stream_with_context, abort, request
from threading import Thread
import mimetypes
import requests
import base64
import logging
# Prevent the server from logging
log = logging.getLogger("werkzeug")
log.setLevel(logging.ERROR)
mimetypes.add_type("text/css",... |
test_hash.py | # Copyright (c) 2013 Vindeka, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
datasets.py | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Dataloaders and dataset utils_
"""
import glob
import hashlib
import json
import logging
import os
import random
import shutil
import time
from itertools import repeat
from multiprocessing.pool import ThreadPool, Pool
from pathlib import Path
from threading import Thread... |
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 ... |
test_html.py | from __future__ import print_function
import glob
import os
import re
import threading
import warnings
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
import pandas.util.testing as tm
import pytest
from numpy.random import rand
from pandas import DataFrame, Index, MultiIndex, Series,... |
data_processor.py | import os
import subprocess
import threading
import numpy
import cv2
from ove import utils
class DataLoader:
def __init__(self, video_input, opt, channel_order, global_opt, frames_before):
"""
Parameters
----------
video_input: path to video in a format of [path, filename, ext]
... |
IgnaleoA.py | # coding: utf-8
portList=tuple([i for i in range(55568,55574)])#本服务器监听端口
# 如果aiohttp连接超时,则会raise,但只是raise,不带错误信息
import gc#内存垃圾清理控制
#gc.disable()#关闭自动清理
#from Voter import Voter
from Voter import Voter,printer,doNothing,CaptchaServers #VoterCN为中文模式!
from AsyncIteratorWrapper import AsyncIteratorWrapper
impo... |
rankPageWorld.py | import os, pickle, time
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.scrollview import ScrollView
from kivy.properties import... |
pyminer.py | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... |
ssh.py | # Date: 07/27/2018
# Author: Pure-L0G1C
# Description: Secure shell
import os
import ssl
import socket
from threading import Thread
from lib.const import CERT_FILE, KEY_FILE
from socket import timeout as TimeOutError
class Communicate(object):
def __init__(self, session):
self.session_rec... |
phpcs.py | import datetime
import os
import re
import subprocess
import threading
import time
import sublime
import sublime_plugin
import sys
try:
from HTMLParser import HTMLParser
except:
from html.parser import HTMLParser
from os.path import expanduser
class Pref:
project_file = None
keys = [
"show_d... |
camera.py | from pepper.framework.backend.abstract.camera import AbstractCamera, AbstractImage
from pepper.framework.infra.event.api import EventBus
from pepper.framework.infra.resource.api import ResourceManager
from pepper.framework.infra.util import Bounds
from pepper import NAOqiCameraIndex, CameraResolution
import qi
import... |
C2Server.py | #!/usr/bin/env python3
import os, sys, datetime, time, base64, logging, signal, re, ssl, traceback, threading
from urllib.request import urlopen, Request
from urllib.error import HTTPError, URLError
from socketserver import ThreadingMixIn
from http.server import BaseHTTPRequestHandler, HTTPServer
from poshc2.server.I... |
__init__.py | #!/usr/bin/env python
#
# Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved.
#
# Licensed under the MIT License. See the LICENSE accompanying this file
# for the specific language governing permissions and limitations under
# the License.
#
#
# Copy this script to /sbin/mount.efs and make sur... |
srv_manager.py | from sys import stderr, stdin, stdout
import threading, paramiko, os, time, hashlib
class wtype:
header = '\033[95m'
blue = '\033[94m'
cyan = '\033[96m'
green = '\033[92m'
warning = '\033[93m'
fail = '\033[91m'
normal = '\033[0m'
bold = '\033[1m'
underline = '\033[4m'
... |
serve.py | import abc
import argparse
import importlib
import json
import logging
import multiprocessing
import os
import platform
import subprocess
import sys
import threading
import time
import traceback
import urllib
import uuid
from collections import defaultdict, OrderedDict
from io import IOBase
from itertools import chain,... |
controller.py | #!/usr/bin/env python2
import json
import sys
import threading
import time
from app.ipsec import IPsecS2SApplication
from cli import start_cli
import switch_controller
# Load configuration
with open('config/topology.json', 'r') as f:
config = json.load(f)
# Setup base controller and switch connections
base_cont... |
environment.py | # Copyright 2020 Tensorforce Team. 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 la... |
thread_lock.py | import threading
import time
g_num = 0
def test1(num):
global g_num
for i in range(num):
mutex.acquire()
g_num += 1
mutex.release()
def test2(num):
global g_num
for i in range(num):
mutex.acquire()
g_num += 1
mutex.release()
mu... |
lyric_player.py | # coding : utf-8
import base64
import json
import os
import re
import threading
import time
from PyQt5.QtMultimedia import QMediaPlayer
from common.decode.lyric_decode import KrcFile, LrcFile, MrcFile
from common.path import LRC_PATH
from components.player.music_stream_queue import MusicStreamQueue
from components.pl... |
train_runner.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
assistant.py | import wolframalpha
from settings.logs import *
from tools.wiki_search import wiki_search , wiki_summary
from tools.browser.search import search_google
from settings.settings import bot
from termcolor import cprint
from time import time , sleep
from threading import Thread
import multiprocessing
from tqdm import tqdm
... |
dist_launcher.py | #!/usr/bin/python
"""
Launch a distributed job for BytePS
"""
import argparse
import os, sys
import signal
import logging
import subprocess
from multiprocessing import Pool, Process
from threading import Thread
def preprocess_envs(args_envs):
envs_map = {}
for item in args_envs:
i = item.find(":")
... |
test_interface.py | import logging
import multiprocessing as mp
import sys
import threading
import time
import ophyd
import pytest
from ..interface import (BaseInterface, TabCompletionHelperClass,
get_engineering_mode, set_engineering_mode,
setup_preset_paths)
from ..sim import FastMotor... |
multi_process_runner.py | # Lint as: python3
# 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 ... |
httpd_test.py | #!/usr/bin/python
"""
Test under 'test_root'. Some test cases could create 'tests/XXXX' directory.
"""
import fs
import httpd
import json
import os
import params
import random
import SimpleHTTPServer, BaseHTTPServer, httplib
import string
import subprocess
import tempfile
import time
import threading
import unittest... |
MultiServer.py | from __future__ import annotations
import argparse
import asyncio
import functools
import json
import logging
import zlib
import collections
import typing
import inspect
import weakref
import datetime
import threading
import random
import ModuleUpdate
ModuleUpdate.update()
import websockets
import prompt_toolkit
fr... |
avnusb.py | # -*- coding: utf-8 -*-
# vim: ts=2 sw=2 et ai
###############################################################################
# Copyright (c) 2012,2021 Andreas Vogel andreas@wellenvogel.net
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentatio... |
helper.py | """
helper.py
=========
Simple helper functions used in this project
"""
from threading import Thread
from functools import wraps
def run_async(func):
"""
This decorator help to run a async function
"""
@wraps(func)
def async_func(*args, **kwargs):
my_thread = Thread(target=func, args=a... |
dask.py | # pylint: disable=too-many-arguments, too-many-locals
# pylint: disable=missing-class-docstring, invalid-name
# pylint: disable=too-many-lines
"""Dask extensions for distributed training. See
https://xgboost.readthedocs.io/en/latest/tutorials/dask.html for simple
tutorial. Also xgboost/demo/dask for some examples.
Th... |
L1_gamepad.py | """Simple example showing how to get gamepad events."""
import time
import threading
import numpy as np
import inputs
from inputs import devices
from inputs import get_gamepad
class Gamepad:
def __init__(self):
gamepads = [device.name for device in devices if type(device) is inputs.GamePad]
if ga... |
multithreads1.py | import threading
import time
def say(name):
print('你好%s at %s' % (name, time.ctime()))
time.sleep(2)
print("结束%s at %s" % (name, time.ctime()))
def listen(name):
print('你好%s at %s' % (name, time.ctime()))
time.sleep(4)
print("结束%s at %s" % (name, time.ctime()))
if __name__ == '__main__':
... |
classes.py | import socket
import threading
import sys
import time, select
from rc4 import *
import struct
from arc4 import ARC4
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
#Class for standarize messages
class Msg:
def info(m):
... |
qiqo_chat.py | import json
import requests
import threading
from urllib import parse as urlparse
import civictechprojects.models
from django.conf import settings
from django.utils import timezone
from common.helpers.user_helpers import is_user_blank_name
def get_user_qiqo_iframe(contributor, request):
if not contributor.qiqo_uu... |
kernel_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 use ... |
DIPPID.py | import sys
import json
from threading import Thread
from time import sleep
from datetime import datetime
import signal
# those modules are imported dynamically during runtime
# they are imported only if the corresponding class is used
#import socket
#import serial
#import wiimote
class Sensor():
# class variable ... |
learn4.py | #!/usr/bin/python3
import io
import csv
import json
import warnings
import pickle
import operator
import time
import logging
import math
import functools
import numpy
from sklearn.preprocessing import MinMaxScaler
from threading import Thread
from random import shuffle
from sklearn.neural_network import MLPClassifier
... |
worker_test.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... |
client.py | #! /usr/bin/env python
import sys, os, random
import time
import threading
sys.path.insert(0,os.pardir) # to find testclient.py
import testclient
count = int(raw_input('Number of parallel clients: '))
test = testclient.getproxy('multithread')
testObjects=[test]
for i in range(count-1):
testObjects.append(test.... |
pyminer.py | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... |
test_io.py | import sys
import gc
import gzip
import os
import threading
import time
import warnings
import io
import re
import pytest
from pathlib import Path
from tempfile import NamedTemporaryFile
from io import BytesIO, StringIO
from datetime import datetime
import locale
from multiprocessing import Process, Value
from ctypes i... |
base_repository_test.py | # Copyright 2017 The Forseti Security 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... |
test_vrf.py | import sys
import time
import threading
import Queue
import yaml
import json
import random
import logging
from collections import OrderedDict
from natsort import natsorted
from netaddr import IPNetwork
import pytest
from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory # lgtm[py/unused-import]
fr... |
utils.py | import asyncio
import functools
import html
import importlib
import inspect
import json
import logging
import multiprocessing
import os
import pkgutil
import re
import shutil
import socket
import sys
import tempfile
import threading
import warnings
import weakref
import xml.etree.ElementTree
from asyncio import Timeout... |
primer_finder_ipcress.py | #!/usr/bin/env python
from olctools.accessoryFunctions.accessoryFunctions import GenObject, make_path, MetadataObject, run_subprocess, \
SetupLogging
from genemethods.assemblypipeline.legacy_vtyper import epcr_primers, Filer
from Bio.Blast.Applications import NcbiblastnCommandline
from Bio.SeqRecord import SeqRecor... |
nfsclient.py | import asyncio
import logging
import os
import socket
import time
from construct import Aligned, GreedyBytes
from threading import Thread
from .packets_nfs import getNfsCallStruct, getNfsResStruct, MountMntArgs, MountMntRes, MountVersion, NfsVersion, PortmapArgs, PortmapPort, PortmapVersion, PortmapRes, RpcMsg
from .r... |
pyarrow.py |
import code
import threading
import time
import typing
from itertools import product
from math import *
import pygame
# Initialize Pygame
pygame.init()
size = [960, 720]
screen = pygame.display.set_mode(size)
pygame.display.set_caption("PyArrow")
font_d = pygame.font.SysFont("comicsansms", 24)
# De... |
Main.py | #!/usr/bin/python
"""
*************************************************************************
*
* Fracktal Works
* __________________
* Authors: Vijay Varada
* Created: Nov 2016
*
* Licence: AGPLv3
*************************************************************************
"""
Development = False # set to Tru... |
interface_GeneFusionNeo.py | import os
from GeneFusionNeoprocessor import *
import shutil
def GF(opts):
config_file=opts.Config_file
f = open(config_file,"r"); # open the configure file
config_list = {}; # define a hash table
while 1:
text = f.readline();
if text == "":
break;
str = text.split(); # split the string
config_list[str[0... |
ps5.py | # 6.0001/6.00 Problem Set 5 - RSS Feed Filter
# Name: Ahmed Ali Mohamed
# Collaborators:
# Time:
import feedparser
import string
import time
import threading
from project_util import translate_html
from mtTkinter import *
from datetime import datetime
import pytz
import re
#------------------------------------------... |
test_search_20.py | import pytest
from base.client_base import TestcaseBase
from utils.util_log import test_log as log
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel, CheckTasks
from utils.utils import *
from common.constants import *
prefix = "search_collection"
search... |
agent.py | import os
import struct
import threading
from paramiko.common import asbytes
from paramiko.message import Message
from paramiko.py3compat import byte_chr
from six.moves import socketserver
if not hasattr(socketserver, "UnixStreamServer"):
raise ImportError(__name__)
SSH_AGENT_FAILURE = 5
SSH_AGENT_SUCCESS = 6
S... |
BotMonitor.py | #!/usr/bin/env python
'''
Created on Apr 23, 2012
@author: moloch
---------
websocket - WebSocket client library for Python
Copyright (C) 2010 Hiroki Ohtani(liris)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published... |
main.py | from multiprocessing import Process, Queue
from flask import Flask
from constants import BOLTEK_NAME, LIDAR_NAME, MULTISENSOR_NAME
from osc import OSCServer
app = Flask(__name__)
boltek_data, lidar_data, multisensor_data = Queue(1), Queue(1), Queue(1)
@app.route("/")
def root() -> str:
return "Root for Atmosp... |
test_gen_nccl_id_op.py | # Copyright (c) 2020 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 appli... |
views.py | from datetime import datetime
from threading import Thread
from time import sleep
from django.contrib import messages
from django.contrib.auth.decorators import login_required, permission_required
from django.db.models import Q
from django.shortcuts import render, get_object_or_404, redirect, reverse
import hostel.co... |
idf_monitor.py | #!/usr/bin/env python
#
# esp-idf serial output monitor tool. Does some helpful things:
# - Looks up hex addresses in ELF file with addr2line
# - Reset ESP32 via serial RTS line (Ctrl-T Ctrl-R)
# - Run flash build target to rebuild and flash entire project (Ctrl-T Ctrl-F)
# - Run app-flash build target to rebuild and f... |
ccbench.py | # This file should be kept compatible with both Python 2.6 and Python >= 3.0.
from __future__ import division
from __future__ import print_function
"""
ccbench, a Python concurrency benchmark.
"""
import time
import os
import sys
import functools
import itertools
import threading
import subprocess
import socket
from... |
torch.py | from . import _file_exists, _env, get_read_fn, get_write_fn, Timer
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
from threading import Thread
from itertools import chain, cycle
import tempfile
import math
import gc
import os
import glob
if _env.get('tqdm'):
from tqdm.auto import tqd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.