source
stringlengths
3
86
python
stringlengths
75
1.04M
sync.py
# Copyright (C) 2008 The Android Open Source Project # # 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 ...
_utils.py
"""Utilities Module for Amazon Lake Formation.""" import logging import time from math import inf from threading import Thread from typing import Any, Dict, List, Optional, Union import boto3 import botocore.exceptions from awswrangler import _utils, exceptions from awswrangler.catalog._utils import _catalog_id, _tra...
filter_fasta_multiprocess.py
##pair end fasta equalizer import sys, re, csv, os from Bio.Seq import Seq import gzip import screed import multiprocessing # from threading import Thread # import queue # in_queue = queue.Queue() # out_queue = queue.Queue() in_queue = multiprocessing.Manager().Queue() out_queue = multiprocessing.Manager().Queue(...
__init__.py
import contextlib import contextvars import datetime import errno import functools import inspect import multiprocessing import os import re import signal import socket import subprocess import sys import tempfile import threading from collections import OrderedDict, defaultdict, namedtuple from datetime import timezon...
__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Han Xiao <artex.xh@gmail.com> <https://hanxiao.github.io> import sys import threading import time import uuid import warnings from collections import namedtuple import numpy as np import zmq from zmq.utils import jsonapi __all__ = ['__version__', 'BertClient'] # in th...
fox1d_rx_pipe_2.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # SPDX-License-Identifier: GPL-3.0 # ################################################## # GNU Radio Python Flow Graph # Title: FOX1D Receiver, Pipe to FoxTelem # Generated: Sat Sep 15 17:34:18 2018 # GNU Radio version: 3.7.12.0 ###########################################...
adapter_.py
# The MIT License (MIT) # # Copyright (c) 2020 Dan Halbert for Adafruit Industries LLC # # 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 ...
latent_from_reduction_att_double.py
import numpy as np import time import sys import os import copy import chainer.functions as F import signal import pandas as pd from PIL import Image import threading from gpu import GPU import chainer from chainer import cuda, Function, gradient_check, report, training, utils, Variable from chainer import datasets, i...
feed.py
### # Author: Riley Raschke <rileyATrrappsdevDOTcom> # © 2019 rrappsdev.com ## import sys import socket from json.decoder import JSONDecodeError from websocket import create_connection from websocket._exceptions import WebSocketConnectionClosedException from threading import Thread from threading import currentThread...
dup_finder.py
import os import sys import hashlib import datetime from enum import Enum, auto from threading import Thread try: from send2trash import send2trash except ImportError: print("WARNING: send2trash module not installed, " "files will be deleted instead of moved to the recycle bin") # ideas # - test by...
athenad.py
#!/usr/bin/env python3.7 import json import os import hashlib import io import random import select import socket import time import threading import base64 import requests import queue from collections import namedtuple from functools import partial from jsonrpc import JSONRPCResponseManager, dispatcher from websocket...
dr2logger.py
import numpy as np import os import sys import threading import queue # import time import configparser import networking import utils import plots import dr2specific debug = False log_raw_data = False version_string = '(Version 1.7, 2020-03-25)' intro_text = ''' Dirt Rally 2.0 Race Logger {} by Philipp Erler https...
TestRunnerAgent.py
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2010 Orbitz WorldWide # # 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 # # ...
program.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...
test_fleet_private_function.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...
Personalized_Wisher_Bot.py
from pywebio.input import FLOAT, file_upload,input, select, input_group from pywebio.output import put_text,put_image, style from PIL import Image, ImageDraw, ImageSequence,ImageFont import io import random import numpy as np from threading import Thread def GIF_Genrator(GIF_PATH,data,themenum,IMAGE_PATH,font_li...
general_server_src_priority.py
import socket import selectors from io import BytesIO import types import struct import os import time import subprocess import smtplib from email.mime.text import MIMEText from threading import Thread, Lock home = '/home/ronnie' #TODO EDIT THIS BEFORE RUNNING TO REFLECT CURRENT HOME DIR store_dir = home + "/rocket_da...
thread_dishes.py
import threading, queue import time def washer(dishes, dish_queue): for dish in dishes: print ("Washing", dish) time.sleep(5) dish_queue.put(dish) def dryer(dish_queue): while True: dish = dish_queue.get() print ("Drying", dish) time.sleep(10) dish_queue...
gui.py
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, o...
test_gremlin_status_with_iam.py
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 """ import concurrent.futures import threading import time import pytest from os import cpu_count from botocore.session import get_session from gremlin_python.driver.protocol import GremlinServerError from grap...
legcy_processes_show_ver.py
#!/usr/bin/env python """ Use processes and Netmiko to connect to each of the devices. Execute 'show version' on each device. Record the amount of time required to do this. """ from __future__ import print_function, unicode_literals from multiprocessing import Process from datetime import datetime from netmiko import ...
labelImg.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import distutils.spawn import os.path import platform import re import sys import subprocess from functools import partial from collections import defaultdict from multiprocessing import Process, freeze_support import libs.cut_bbox import libs.auto_makebbox ...
test_pdb.py
# A test suite for pdb; not very comprehensive at the moment. import doctest import os import pdb import sys import types import codecs import unittest import subprocess import textwrap from contextlib import ExitStack from io import StringIO from test.support import os_helper # This little helper class is essential ...
train_LAI.py
#!/usr/bin/env python """ Main training workflow """ #encoding=utf-8 from __future__ import division import argparse import glob import os import random import signal import time import torch from pytorch_pretrained_bert import BertConfig import distributed from models import data_loader, model_builder from mod...
easy_config.py
"""a graphical config manager for StaSh""" import os import ast import threading import console import ui from stash.system.shcommon import _STASH_CONFIG_FILES import pythonista_add_action as paa _stash = globals()["_stash"] ORIENTATIONS = ("landscape", "landscape_left", "landscape_right") # define option types TY...
server.py
import socket import threading # Connection Data host = '127.0.0.1' port = 55555 # Starting Server server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((host, port)) server.listen() # Lists For Clients and Their Nicknames clients = [] nicknames = [] # Sending Messages To All Connec...
test_itertools.py
import unittest from test import support from itertools import * import weakref from decimal import Decimal from fractions import Fraction import operator import random import copy import pickle from functools import reduce import sys import struct import threading import gc maxsize = support.MAX_Py_ssize_t minsize = ...
test_indexer.py
#!/usr/bin/env python # coding: utf-8 from abc import ABCMeta, abstractmethod import cgi from concurrent.futures import ThreadPoolExecutor import copy import datetime from http.server import BaseHTTPRequestHandler, HTTPServer from io import BytesIO import io import json import logging import os import string import ha...
pyelastix.py
# Copyright (c) 2010-2016, Almar Klein # This code is subject to the MIT license """ PyElastix - Python wrapper for the Elastix nonrigid registration toolkit This Python module wraps the Elastix registration toolkit. For it to work, the Elastix command line application needs to be installed on your computer. You can ...
networkLayer.py
#!/usr/bin/env python import os, sys, time, socket, threading, random #, hashlib PORT,MAXBLOCKS,DELAY = int(sys.argv[1]),int(sys.argv[2]),float(sys.argv[3]) PROB_DEL,PROB_MANGLING = int(sys.argv[4]),int(sys.argv[5]) blocks,lock = {}, threading.Lock() def main(): global blocks, lock ssock = socket.socket(soc...
watcher.py
# Copyright (c) 2015 Xilinx Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
ue_mac.py
""" Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ from collections import namedtuple import threading from ryu.controller import ofp_event from ryu.controller.handl...
pastifix.py
# -*- coding: utf-8 -*- from linepy import * from datetime import datetime from time import sleep from bs4 import BeautifulSoup #from gtts import gTTS from humanfriendly import format_timespan, format_size, format_number, format_length import time, random, sys, json, codecs, threading, glob, re, string, os, requests, s...
util.py
# # Copyright (C) 2012-2017 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # import codecs from collections import deque import contextlib import csv from glob import iglob as std_iglob import io import json import logging import os import py_compile import re import socket try: import ssl ...
managers.py
# # Module providing the `SyncManager` class for dealing # with shared objects # # processing/managers.py # # Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt # __all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'CreatorMethod', 'Token' ] # # Imports # import os import sys imp...
rdd.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...
master.py
# -*- coding: utf-8 -*- ''' This module contains all of the routines needed to set up a master server, this involves preparing the three listeners and the workers needed by the master. ''' # Import python libs import os import re import time import errno import fnmatch import signal import shutil import stat import lo...
common.py
import inspect import json import os import random import subprocess import ssl import time import requests import ast import paramiko import rancher import pytest from urllib.parse import urlparse from rancher import ApiError from lib.aws import AmazonWebServices from copy import deepcopy from threading import Lock fr...
views.py
import tkinter as tk from queue import Queue from threading import Thread from functools import wraps from pylaunch import roku from pylaunch.roku.remote.buttons import RokuActionButton, RokuApplicationButton SELECT_HEIGHT = 3 SELECT_WIDTH = 30 PADDING_X = "2m" PADDING_Y = "1m" SELECT_BG = "black" SELECT_FG = "green"...
7_construct_locations_multiprocess.py
from pymongo import MongoClient import sys import time from multiprocessing import Queue, Process # Does the same thing as 7_construct_locations, but iterates over partitions of the arcgis locations. # Takes advantage of multiprocessing and batch updates. Very intensive. # The batch updating is a nightmare on icews b...
testcase.py
# -*- coding: utf-8 -*- # # Tencent is pleased to support the open source community by making QTA available. # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may ...
main.py
# 2020 # The BlackEyeSecurity Toolkit was programmed and developed by Taguar258. # The BlackEyeSecurity Toolkit is published under the MIT Licence. # The BlackEyeSecurity Toolkit is based on the CLIF-Framework. # The CLIF-Framework is programmed and developed by Taguar258. # The CLIF-Framework is published under the MI...
stepper.py
from time import sleep import threading import RPi.GPIO as GPIO import pigpio CW = 1 # Clockwise Rotation CCW = 0 # Counterclockwise Rotation class stepper: """This class is for handling the DRV8825 motor driver. E.g. to operate common bigger stepper motors. """ def __init__(self, DI...
scheduler.py
from __future__ import unicode_literals, division, absolute_import from datetime import datetime, timedelta, time as dt_time import logging import threading import time from sqlalchemy import Column, DateTime, Integer from flexget import db_schema from flexget.config_schema import register_config_key, parse_time from...
workers.py
from multiprocessing import Process, Queue import multiprocessing from re import L import threading import time import uuid import ctypes import traceback import json import logging import requests import jimi workers = None class _threading(threading.Thread): def __init__(self, *args, **keywords): thre...
network.py
# Electrum - Lightweight Bitcoin Client # Copyright (c) 2011-2016 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 limitation the rig...
__init__.py
import os import py import sys import time import math import pytest import _pytest import platform import threading import multiprocessing from tblib import pickling_support from multiprocessing import Manager, Process # In Python 3.8 and later, the default on macOS is spawn. # We force forking behavior at the expens...
ClointFusion.py
# Project Name: ClointFusion # Project Description: A Python based RPA Automation Framework for Desktop GUI, Citrix, Web and basic Excel operations. # Project Structure # 1. All imports # 2. All global variables # 3. All function definitions # 4. All test cases # 5. All default services # 1. All imports ...
ant.py
# Ant # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, m...
LManagerWindow.py
#!/usr/bin/env python # -*- coding:utf-8 -*- from GUI.LoginWindow import * from PyQt5.QtCore import QThread, pyqtSignal from PyQt5 import QtWidgets, QtGui from PyQt5.QtWidgets import * from GUI.ManagerWindow import Design_ManagerWindow from Controllers import ManagerControl import sys import win32com.client import ...
base.py
#!/usr/bin/python3 #encoding:UTF-8 import json, os, sys, time, signal import utils.BaseTasks as BaseTasks import utils.utils as utils from utils.BlockProcess import BlockProcess as BlockProcess from contextlib import suppress from steem.blockchain import Blockchain from steem.steemd import Steemd import queue import th...
mobility.py
#!/usr/bin/env python3 import pickle, socket, traceback, struct, threading from apscheduler.schedulers.background import BackgroundScheduler from classes.mobility.pymobility.models.mobility import * from classes import pprz_interface class Mobility(): def __init__ (self, Node, model): self.Node = Node self....
oto_loader.py
""" dmt/data/loading/oto_loader.py OTO = OneToOne. Meaning 1 subject loads exactly 1 batch example. Daemon loader wraps torch's Dataloader by continuously loading into a queue. 'Daemon' here refers to its original software interpretation (not Python's) where a process works continuously in the background. Added Func...
test_sys.py
import unittest, test.support import sys, io, os import struct import subprocess import textwrap import warnings import operator import codecs import gc import sysconfig import platform # count the number of test runs, used to create unique # strings to intern in test_intern() numruns = 0 try: import threading ex...
trainer.py
import time import torch import numpy as np import os import utils.tensorboard_writer as tw import utils.gsn_argparse as gap from utils.gsn_argparse import tab_printer from torch.optim.lr_scheduler import ReduceLROnPlateau from multiprocessing import Process, Queue from module.graph_star import GraphStar def get_edg...
mitie_featurizer.py
from mitie import * import urllib.request, urllib.error, urllib.parse import os import http.client import multiprocessing import progressbar import logging class MITIEFeaturizer(object): def __init__(self, fe_file): if not os.path.isfile(fe_file): self.download(fe_file) return # ...
collectives_test.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree.abs import os import os.path import unittest from hashlib import md5 import numpy as np i...
servctl_utils.py
import collections from threading import Thread import io import jinja2 import logging import os import subprocess import sys import time import yaml from deploy.utils.constants import COMPONENT_PORTS, COMPONENTS_TO_OPEN_IN_BROWSER from deploy.utils.kubectl_utils import get_pod_name, get_service_name, \ run_in_po...
multi.py
import time import threading def sum_1_to(n, i): ''' 一个耗时的累加计算。 ''' print('start: {}'.format(i)) start = time.time() r = 0 for j in range(n): r += j end = time.time() print('end {}: {}s'.format(i, end - start)) return r def new_daemon_thread(target, args): ''' ...
exposition.py
from __future__ import unicode_literals import base64 from contextlib import closing import os import socket import sys import threading from wsgiref.simple_server import make_server, WSGIRequestHandler, WSGIServer from .openmetrics import exposition as openmetrics from .registry import REGISTRY from .utils import fl...
featureedit_p3.py
''' Copyright 2012-2014 Nedim Srndic, University of Tuebingen This file is part of Mimicus. Mimicus is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later ...
test_callback.py
import math import textwrap import sys import pytest import threading import traceback import time import numpy as np from numpy.testing import IS_PYPY from . import util class TestF77Callback(util.F2PyTest): sources = [util.getpath("tests", "src", "callback", "foo.f")] @pytest.mark.parametrize("name", "t,t...
WindowCapture.py
from fastgrab import screenshot from xdo import Xdo from threading import Thread, Lock import numpy class WindowCapture: # threading properties stopped = True lock = None screenshot = None # properties win_location = [0, 0] win_size = [0, 0] w = 0 h = 0 window = None crop...
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...
train.py
#!/usr/bin/env python import os import json import torch import numpy as np import queue import pprint import random import argparse import importlib import threading import traceback import torch.distributed as dist import torch.multiprocessing as mp from tqdm import tqdm from torch.multiprocessing import Process, Q...
spark.py
from __future__ import print_function import copy import threading import time import timeit import traceback from hyperopt import base, fmin, Trials from hyperopt.base import validate_timeout, validate_loss_threshold from hyperopt.utils import coarse_utcnow, _get_logger, _get_random_id try: from pyspark.sql imp...
email.py
from threading import Thread from flask import current_app, render_template from flask.ext.mail import Message from . import mail def send_async_email(app, msg): with app.app_context(): mail.send(msg) def send_email(to, subject, template, **kwargs): app = current_app._get_current_object(...
ExchangeFailureManager.py
import threading import time import traceback import pandas as pd from Logger import logger def single(cls): cls_dict = dict() def wrapper(*args, **kwargs): if cls not in cls_dict: cls_dict.update({cls: cls(*args, **kwargs)}) return cls_dict[cls] return wrapper class Error...
poe_search.py
import poe.utils as utils import threading import json from nltk import bigrams from cachetools import cached from .cache import cache with open('utils/items.json') as f: items = json.load(f) def calc_bigrams(name, item, matches): count = 0 bi_item = [x for x in bigrams(item.lower())] for n in name...
iprofile_app.py
from __future__ import print_function import os import pstats import sys import traceback import time import webbrowser import fnmatch import threading import argparse import json from six import StringIO, iteritems, itervalues import tornado.ioloop import tornado.web from collections import defaultdict, deque from it...
trezor.py
from binascii import hexlify, unhexlify import traceback import sys from electrum.util import bfh, bh2u, versiontuple, UserCancelled from electrum.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, deserialize_xpub, TYPE_ADDRESS, TYPE_SCRIPT, is_address) from electrum import consta...
test_index.py
import pytest from base.client_base import TestcaseBase from base.index_wrapper import ApiIndexWrapper 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 common.code_mapping import CollectionErro...
yuyu.py
#!/usr/bin/env python3 import sys #reload(sys) #sys.setdefaultencoding('utf-8') import os import time import pygame import threading from hand_counting import hand_count import cv2 #pygame.init() #pygame.mixer.init() from pykeyboard import * from mutagen.mp3 import MP3 global music_path music_path = None #mp3 = MP...
independent.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import random import math import json import threading import numpy as np import tensorflow as tf import util import coref_ops import conll import metrics import optimization from bert import tokeniz...
2021-08-18.py
from job.nclimber import NClimber from math import ceil from multiprocessing.context import Process from behavior.oscillator import Oscillator from multiprocessing import Pool from util.run import Run from numpy import floor import wandb from job.learner import Learner from rl_ctrnn.ctrnn import Ctrnn import itertools ...
EasyProcess_util.py
# -*- coding: utf-8 -*- """Easy to use python subprocess interface.""" import logging import os.path import platform import signal import subprocess import tempfile import threading import time from easyprocess.unicodeutil import unidecode #from easyprocess.about import __version__ log = logging.getLogger(__name__)...
test_misc.py
import logging from multiprocessing import Process, Event, Queue import os import platform import shutil import sys import unittest from hashlib import md5 from lbrynet import conf from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.core.Session import Session from lbrynet.core.serv...
test_threading.py
from __future__ import print_function import sys import time import pytest import random import threading from functools import partial from yamicache import Cache from queue import Queue, Empty DEBUG_PRINT = False def debug_print(text): if DEBUG_PRINT: print(text) c = Cache(debug=False) @pytest.fix...
val.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Validate a trained YOLOv5 model accuracy on a custom dataset Usage: $ python path/to/val.py --data coco128.yaml --weights yolov5s.pt --img 640 """ import argparse import json import os import sys from pathlib import Path from threading import Thread import numpy as...
server.py
import os import re import sys import json import time import string import random import socket import pyaudio import smtplib from threading import Thread lib_path = os.path.abspath(os.path.join(__file__, '..', '..')) sys.path.append(lib_path) from mongoOperations import MongoOperations # print(lib_path) # class ...
GUI.py
# From tkinter import sys, os from tkinter import * import tkinter as tk from PIL import ImageTk, Image import tkinter.filedialog as fd import time import threading import re # From detectron2 #import random #from detectron2.utils.visualizer import Visualizer #from detectron2.data.catalog import MetadataCatalog, Datas...
5Bot.py
# -*- coding: utf-8 -*- import LINETCR from LINETCR.lib.curve.ttypes import * from datetime import datetime from bs4 import BeautifulSoup import time, random, sys, re, os, json, subprocess, threading, string, codecs, requests, tweepy, ctypes, urllib, urllib2, wikipedia,tempfile,glob,shutil,unicodedata,goslate from gtt...
main.py
# Code Starting point, starts both the recognize_face.py as well as the server. import time import logging logging.basicConfig(filename='app.log', filemode='a', format='[%(created)i]- %(levelname)s - %(message)s', level=logging.DEBUG, datefmt='%d-%b-%y %H:%M:%S') logging.info("Infinite Bit...") print("Starting") impor...
test_browser.py
# coding=utf-8 # Copyright 2013 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. from __future__ import print_function import argparse ...
dataset_generator.py
from __future__ import division, absolute_import, print_function import argparse import glob import multiprocessing import os import shutil import time import numpy as np from stable_baselines import PPO2 from stable_baselines.common import set_global_seeds from stable_baselines.common.vec_env import DummyVecEnv, Vec...
run_nvmf.py
#!/usr/bin/env python3 from json.decoder import JSONDecodeError import os import re import sys import argparse import json import zipfile import threading import subprocess import itertools import configparser import time import uuid from collections import OrderedDict import paramiko import pandas as pd from common ...
mainwindow.py
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Spyder, the Scientific Python Development Environment ===================================================== Developed and maintained by the Spyder Proj...
test_kubernetes.py
import asyncio import logging import multiprocessing import time from contextlib import suppress from copy import deepcopy import mock import pytest from aiohttp import web, ClientConnectorError from asyncio.subprocess import PIPE, STDOUT import pytz from krake import utils from krake.controller.kubernetes.client imp...
bccplus.py
#!/usr/bin/env python3 import socket import threading import time import sys import subprocess import os import collections import getpass import re import random import ipaddress import itertools import struct PORT = 44718 IPPROTO_IPV6 = getattr(socket, "IPPROTO_IPV6") if "IPPROTO_IPV6" in dir(socket) else 41 # work...
V6_2_SAC_Discrete_Multi_EOP.py
''' Soft Actor-Critic version 2 using target Q instead of V net: 2 Q net, 2 target Q net, 1 policy net add alpha loss compared with version 1 paper: https://arxiv.org/pdf/1812.05905.pdf https://github.com/quantumiracle/SOTA-RL-Algorithms ''' import random import gym import numpy as np import time import torch impor...
manager.py
#!/usr/bin/env python3 import os import time import sys import fcntl import errno import signal import shutil import subprocess import datetime import textwrap from typing import Dict, List from selfdrive.swaglog import cloudlog, add_logentries_handler from common.basedir import BASEDIR from common.hardware import HA...
mysql-schema-change.py
#!/usr/bin/env python # coding: utf-8 import argparse import MySQLdb import os import settings import threading import multiprocessing import time import signal import subprocess import pipes import types manager = None interrupt_counter = 0 #globals used for the worker sigint handler proc = None p1 = None p2 = None...
db.py
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
lsgn_data.py
import tensorflow as tf import tensorflow_hub as hub import h5py import json import numpy as np import random import threading from input_utils import * import util import srl_eval_utils # Names for the "given" tensors. _input_names = [ "tokens", "context_word_emb", "head_word_emb", "lm_emb", "char_idx", "text_...
o3m_lidar.py
# Copyright 2020 Aarhus University. # # 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 wr...
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 ModuleUpdate ModuleUpdate.update() import websockets import prompt_toolkit from prompt_tool...
server.py
#!/usr/bin/env python """ Client to communicate with RabbitMQ and extension of Population which add parallel computing capabilities. """ import json import pika import queue import threading import time import uuid from .populations import Population, GridPopulation class RpcClient(object): """Define a client w...
word2vec_optimized.py
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
trustedcoin.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...
getBirthday.py
import urlparse import requests import urllib2 import time import re import os import pickle import threading from bs4 import BeautifulSoup from bs4 import SoupStrainer from bs4 import Comment def getFriendsBirthdays(birthdays,friendsDict,s): # --------- Getting Birthday Info ----------- relatStrainer = SoupStrain...