source
stringlengths
3
86
python
stringlengths
75
1.04M
fsharpvim.py
from subprocess import Popen, PIPE from os import path import string import tempfile import unittest import json import threading class Statics: fsac = None locations = [] class Interaction: def __init__(self, proc, timeOut, logfile = None): self.data = None self.event = threading.Event() ...
run_simple_dialogue_system.py
from time import sleep, time import zmq import multiprocessing as mp from speech_to_text import speech_to_text_main from dialogue_control import control_main from text_to_speech import text_to_speech_main def start_pubsub_proxy(port_config): """ This is the pubsub proxy. We start it in another process as it block...
multi_camera_multi_target_tracking.py
#!/usr/bin/env python3 """ Copyright (c) 2019-2020 Intel Corporation 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 applicab...
zeromq.py
# -*- coding: utf-8 -*- ''' Zeromq transport classes ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals import os import sys import copy import errno import signal import socket import hashlib import logging import weakref import threading from random import randint # Im...
test_capi.py
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. from collections import OrderedDict import os import pickle import random import re import subprocess import sys import sysconfig import textwrap import threading import ...
keepkey.py
from binascii import hexlify, unhexlify import traceback import sys from electrum.util import bfh, bh2u, UserCancelled, UserFacingException from electrum.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT from electrum.bip32 import deserialize_xpub from electrum import constants from electrum.i18n import _ from electrum.transac...
whole_markket_recorder.py
""" 全市场行情录制 参考:https://www.vnpy.com/forum/topic/3046-quan-shi-chang-lu-zhi-xing-qing-shu-ju """ import sys import multiprocessing import re from contextlib import closing from copy import copy from copy import deepcopy from vnpy.trader.constant import Exchange, Interval from vnpy.trader.object import BarData, HistoryRe...
positioner.py
import logging import os.path import threading from pydm.widgets.channel import PyDMChannel from qtpy import QtCore, QtWidgets, uic from . import utils, widgets from .status import TyphosStatusThread logger = logging.getLogger(__name__) class TyphosPositionerWidget(utils.TyphosBase, widgets.TyphosDesignerMixin): ...
model_2_01.py
import tensorflow as tf from tensorflow.keras.layers import Dense, Conv2D, MaxPooling2D, Dropout, Flatten from tensorflow.keras.optimizers import Adam from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.callbacks import Callback import numpy as np import matplotlib.pyplot as plt f...
test_protocol.py
""" Copyright 2018 Inmanta 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 ...
scheduler.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Background processes made simple --------------------------------- """ USAGE = """ ## Example For an...
test_dag_serialization.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...
server.py
from datetime import datetime from sys import platform import json import logging import socketserver import multiprocessing import queue import threading from .helpers import load_task from . import helpers from django.utils import timezone import django log = logging.getLogger(__name__) def target(queue): dj...
__init__.py
#!/usr/bin/python3.8 # Copyright 2021 Aragubas # # 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...
data_fetcher.py
import vrpn import threading import time from functools import partial import config class DataFetcher(threading.Thread): daemon = True def __init__(self, mongo, opti_track_mode=True): super(DataFetcher, self).__init__() self.opti_track_mode = opti_track_mode self.mongo = mongo ...
peer.py
#!/usr/bin/env python3 """ Chord peer ========== This module provides peer of a Chord distributed hash table. """ import random import time import socket import socketserver import threading import logging logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s', level=logging.DEBUG) CH...
thread_.py
import threading from threading import Thread def get_current_thread(): return threading.current_thread() def get_current_thread_name(): return get_current_thread().getName() def is_alive(t): return t.is_alive() def create_and_start(name, target, daemon = True): t = Thread(target= target) ...
app.py
#!/usr/bin/env python3 import configparser import time import threading import mastodonTool import os import datetime import markovify import exportModel import re # 環境変数の読み込み config_ini = configparser.ConfigParser() config_ini.read('config.ini', encoding='utf-8') def worker(): # 学習 domain = config_ini['read...
main.py
from ledcd import CubeDrawer from falling_helper import * import colorsys from random import random import threading drawer = CubeDrawer.get_obj() plane = FallingWall(0, 1.5, colorsys.hsv_to_rgb(random(), 1, 1), drawer) # drawer.translate(7.5, 7.5, 7.5) # drawer.scale(0.5, 0.5, 0.5) def plane_updater(): global...
portable_runner.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...
BurnerManager.py
import serial import serial.tools.list_ports as port_list from time import sleep as delay from Utils import Utils import threading import sys from collections import deque as dq class BurnerManager: def __init__(self, SerialManager, file, progressBar, console): self.progressBar = progressBar s...
test_kafka.py
from multiprocessing import Process, Queue from unittest import TestCase from threading import Thread from time import sleep from unittest.mock import MagicMock from minibatch import connectdb, stream, streaming, make_emitter from minibatch.contrib.kafka import KafkaSource, KafkaSink from minibatch.tests.util import ...
test_debug.py
import pytest import re import sys from datetime import datetime, timedelta from flask_storm import store, FlaskStorm from flask_storm.debug import DebugTracer, get_debug_queries, DebugQuery, ShellTracer from mock import MagicMock, patch from storm.exceptions import OperationalError from threading import Thread try: ...
master.py
from builtins import str from builtins import range # 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.apa...
A3C.py
import copy import random import time import numpy as np import torch from torch import multiprocessing from torch.multiprocessing import Queue from torch.optim import Adam from agents.Base_Agent import Base_Agent from utilities.Utility_Functions import create_actor_distribution, SharedAdam class A3C(Base_Agent): ...
model.py
import os import re import shutil from pathlib import Path from typing import Callable, Dict, Tuple import threading from elpis.engines.common.objects.command import run from elpis.engines.common.objects.model import Model as BaseModel from elpis.engines.common.objects.dataset import Dataset from elpis.engines.common.o...
test_handler.py
# coding: utf-8 from __future__ import print_function, unicode_literals import mock import time import threading import unittest2 import logging from logtail.handler import LogtailHandler class TestLogtailHandler(unittest2.TestCase): source_token = 'dummy_source_token' host = 'dummy_host' @mock.patch('l...
generator.py
from __future__ import division, print_function import contextlib import os import threading import time if not hasattr(contextlib, 'ExitStack'): import contextlib2 as contextlib import numpy as np try: import queue except ImportError: import Queue as queue from visual_dynamics.utils.container import Ima...
test_search.py
import threading import time import pytest import random import numpy as np 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 prefix = "search_collection" e...
droidmaster.py
# This file contains the main class of droidbot # It can be used after AVD was started, app was installed, and adb had been set up properly # By configuring and creating a droidbot instance, # droidbot will start interacting with Android in AVD like a human import logging import os import sys import pkg_resources impor...
sleep.py
__copyright__ = "Copyright 2013-2016, http://radical.rutgers.edu" __license__ = "MIT" import os import time import threading as mt import radical.utils as ru from ... import states as rps from ... import constants as rpc from .base import AgentExecutingComponent # -----------------------------------...
PyShell.py
#! /usr/bin/env python import os import os.path import sys import string import getopt import re import socket import time import threading import traceback import types import macosxSupport import linecache from code import InteractiveInterpreter try: from Tkinter import * except ImportError...
__init__.py
""" iota-exrate-manager Python package that keeps track of iota exchange rates via various APIs and converts prices """ __version__ = "0.1.2" __author__ = 'F-Node-Karlsruhe' from .apis import coingecko, cmc from datetime import datetime, timedelta import sched import time import warnings import threading SUPPORTED_C...
main.py
from djitellopy import Tello import cv2 import pygame from pygame.locals import * import numpy as np import time import queue import threading from cam_class import Camera from timeit import default_timer as timer from video_writer import WriteVideo # Speed of the drone S = 60 # Speed for autonomous navigation S_prog ...
ddp_run.py
#!/bin/python3 # The MIT License (MIT) # Copyright © 2021 Yuma Rao # 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, ...
videodown.py
# -*- coding: utf-8 -*- import requests from contextlib import closing import time # import Queue # import hashlib # import threading import os from fake_useragent import UserAgent # import fake_useragent def download_file(url, path): # with closing(requests.get(url, stream=True)) as r: ua = UserAgent() h...
junos_collector.py
import json import logging import logging.config import threading import time import uuid from copy import deepcopy from datetime import datetime from multiprocessing import JoinableQueue import requests import yaml from jnpr.junos import Device from jnpr.junos.exception import ConnectError, RpcError # Constants DATA...
generate_breakpad_symbols.py
#!/usr/bin/env python # Copyright (c) 2013 GitHub, Inc. All rights reserved. # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Convert pdb to sym for given directories""" import errno import glob imp...
tube.py
# -*- coding: utf-8 -*- from .buffer import Buffer from ..timeout import Timeout from .. import term, atexit, context from ..util import misc, fiddling from ..log import getLogger, getPerformanceLogger import re, threading, sys, time, subprocess, logging, string log = getLogger(__name__) dumplog = getPerformanceLogger...
coordinator.py
from collections import defaultdict from threading import Thread from typing import Any, DefaultDict, Protocol from custom_types.alternative_string_types import Kaki from custom_types.response_types import FullResponseItem from modules import forvo, jisho, ojad, suzuki, tangorin, wadoku, wanikani class Module(Protoc...
main.py
# -*- coding:utf-8 -*- import sys, os import wx import fcvsGUI as ui import threading import re import serial import time from wx.lib.wordwrap import wordwrap import _winreg as winreg import itertools import icon32 import pkg_resources import zipfile from cStringIO import StringIO import webbrowser import glob MAINME...
federated_learning_keras_PS_CIFAR100.py
from DataSets import CIFARData from consensus.consensus_v2 import CFA_process from consensus.parameter_server import Parameter_Server # best use with PS active # from ReplayMemory import ReplayMemory import numpy as np import os import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers fr...
benchmark.py
from multiprocessing import Process, Queue import json import glob import inspect import pandas as pd def run_with_separate_process(func, *args): def _process(queue, func, *args): res = func(*args) queue.put(res) q = Queue() p = Process(target=_process, args=(q, func, *args)) p.start() ...
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...
transports.py
from .logging import exception_log, debug from .types import TCP_CONNECT_TIMEOUT from .types import TransportConfig from .typing import Dict, Any, Optional, IO, Protocol, Generic, List, Callable, Tuple, TypeVar, Union from contextlib import closing from functools import partial from queue import Queue import http impor...
train_E.py
# BSD 3-Clause License # # Copyright (c) 2019, FPAI # Copyright (c) 2019, SeriouslyHAO # Copyright (c) 2019, xcj2019 # Copyright (c) 2019, Leonfirst # # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
Matrix_Multiplication.py
# -*- coding: utf-8 -*- """ Created on Wed Apr 19 16:44:37 2017 @author: Usman """ import random,time,numpy as np,threading from matplotlib import pyplot as plt def multiply(rows,columns,matrix,matrix2,matrix3): for i in range(0,int(rows),1): for j in range(0,int(columns),1): value...
agent.py
# -*- coding: utf-8 -*- # # This file is part of Zoe Assistant # Licensed under MIT license - see LICENSE file # from zoe import * from colors import green, yellow import threading import logging import json import cmd import sys import os def show(what): return { 'intent': 'shell.show', 'payloads...
main.py
#!/usr/bin/env python3 from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, FileType from threading import Thread, Event from queue import Empty, Queue from lib.pastlylogger import PastlyLogger from lib.worker import Worker from lib.datamanager import DataManager import time, sys def fail_hard(*msg): ...
core.py
from py_expression.core import Exp from .base import * import uuid import threading from multiprocessing import Process as ParallelProcess, process class ProcessError(Exception):pass class Object(object):pass class ProcessSpec(object):pass class Token(object):pass """ para la implementacion de python se usara un dic...
test_streaming.py
# -*- coding: utf-8 -*- # (c) 2009-2021 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ Unit tests for wsgidav.stream_tools.FileLikeQueue """ import os import threading import unittest from tempfile ...
core.py
########################################################## # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import sys import configparser import os from utils import is_sequential_dict, model_init, optim...
server.py
from flask import Flask , request , jsonify , make_response , render_template from flask_cors import CORS import requests import json import flask import threading import updateCore , getRunning , controlProcess global pid pid = -1 global tid tid = -1 app = Flask(__name__) CORS(app) @app.route('/startprocess', metho...
api_tts.py
import os, hashlib, asyncio, threading, time, aiohttp, json, urllib from mutagen.mp3 import MP3 from homeassistant.helpers import template from homeassistant.const import (STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_OFF, STATE_UNAVAILABLE) from .api_config import ROOT_PATH, ApiConfig # 百度TTS IS_PY3 = True from url...
SimComponent.py
import time # import ACS__POA # from ACS import CBDescIn from Acspy.Clients.SimpleClient import PySimpleClient import random from utils import HMILog import threading # acs client client = PySimpleClient() # get the components t1_double = client.getComponent("TEST_JAVA_T1") t2_double = client.getComponent("TEST_JAVA_...
ithread.py
""" Copyright (c) 2017, Syslog777 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and...
httpserver.py
import sys if sys.version_info < (3, 0): from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import HTTPServer as OriginalHTTPServer else: from http.server import HTTPServer as OriginalHTTPServer, SimpleHTTPRequestHandler from scriptcore.encoding.encoding import Encoding import os.pat...
Main.py
import Bot import MQTT import Thinkspeak import threading a = threading.Thread(target=Bot.main) b = threading.Thread(target=MQTT.main) c = threading.Thread(target=Thinkspeak.main) b.start() c.start() a.start()
test.py
# import multiprocessing # import time # # def test1(): # while True: # print("test1---1---") # time.sleep(1) # def test2(): # while True: # print("test2---2---") # time.sleep(1) # # def main(): # p1 = multiprocessing.Process(target=test1) #创建进程对象 # p2 = multiprocessing....
trojan_git.py
#!/usr/bin/python import json import base64 import sys import time import imp import random import threading import Queue import os import github3 import lib_crypto as RSA # -------- Configuration ---------- # VERBOSE=False code_private_key="""-----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEA4BI+2xzBqLJivdx0i5zm85o+s6...
module.py
# tv # # Catbox module for playing online videos of birds and squirrels. # Support for offline tv maybe in the future. # # Authors: # Jonathon Roscoe / @jroscoe5 # Kyle Roscoe / @kroscoe45 import glob import os from queue import Queue from threading import Thread from time import sleep from chromedriver_py ...
ticrate.py
#!/usr/bin/env python3 from argparse import ArgumentParser from multiprocessing import Process from random import choice import os import vizdoom as vzd DEFAULT_CONFIG = os.path.join(vzd.scenarios_path, "basic.cfg") def play(config_file, ticrate=35): game = vzd.DoomGame() game.load_config(config_file) g...
form.py
import os from gi.repository import Gtk, Gdk, GLib, GObject, GdkPixbuf import math from src.simulation import Simulation from threading import Thread, Event GLADE_MARKUP = 'os-simulator.glade' class Dialog(Gtk.Dialog): def __init__(self, parent, title, message): Gtk.Dialog.__init__(self, title, parent, ...
node.py
#!/usr/bin/env python3 import pprint import math import rclpy import threading import numpy import time import av import tf2_ros import cv2 import time import yaml from djitellopy import Tello from rclpy.node import Node from tello_msg.msg import TelloStatus, TelloID, TelloWifiConfig from std_msgs.msg import Empty, ...
cbluepy.py
import logging import re from threading import Thread, Event from bluepy import btle from pylgbst.comms import Connection, LEGO_MOVE_HUB from pylgbst.utilities import str2hex, queue log = logging.getLogger('comms-bluepy') COMPLETE_LOCAL_NAME_ADTYPE = 9 PROPAGATE_DISPATCHER_EXCEPTION = False def _get_iface_number(...
term.py
__author__ = 'Shirish Pal' import os import subprocess import sys import argparse import json import jinja2 import time from threading import Thread import pdb import requests supported_ciphers = [ {'cipher_name' : 'AES128-SHA', 'cipher' : '{AES128-SHA}', 'sslv3' : '{sslv3}', 'tls1' : '{tl...
crawler_document_indexer.py
from models import CrawlerDocument from mongoengine import connect from threading import Thread, Lock from elasticsearchcli import ElasticSearchCli import logging from mongoengine import register_connection logging.basicConfig(level = logging.DEBUG) ''' Class is responsible for managing the index ''' class IndexC...
http_Review.py
#!/usr/bin/python3 from modules import * import argparse import sys import threading def reportrun(web_hosts): reportFolder = reportOUTPUT.makereportFolder() makereportSTART.makereportstart(reportFolder) threads = [] for host in web_hosts: t = threading.Thread(target=webRequest.webcheck, args=...
service.py
# -*- coding: utf-8 -*- # Author: asciidisco # Module: service # Created on: 13.01.2017 # License: MIT https://goo.gl/5bMj3H """Kodi plugin for Netflix (https://netflix.com)""" # pylint: disable=import-error import threading import socket import sys from datetime import datetime, timedelta import xbmc from resource...
wallet.py
from alert import alert from appwindow import AppWindow from cache import Cache from cachemanager import CacheManager from cards import Cards from config import BaseConfig, LocalConfig from datetime import datetime from downloader import Downloader from enum import Enum from ethereum import Ethereum from opensea import...
disturbance_manager.py
#!/usr/bin/env python3 # Copyright (c) 2020 The Plankton Authors. # All rights reserved. # # This source code is derived from UUV Simulator # (https://github.com/uuvsimulator/uuv_simulator) # Copyright (c) 2016-2019 The UUV Simulator Authors # licensed under the Apache license, Version 2.0 # cf. 3rd-party-licenses.txt ...
role_maker.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 app...
clusterScalerTest.py
# Copyright (C) 2015-2018 Regents of the University of California # # 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 app...
pickletester.py
import collections import copyreg import dbm import io import functools import os import math import pickle import pickletools import shutil import struct import sys import threading import unittest import weakref from textwrap import dedent from http.cookies import SimpleCookie try: import _testbuffer except Impo...
runMartingale.py
import math import datetime from threading import Timer from bitmex_websocket import Instrument import asyncio import websocket import time from bitmexClient import bitmexclient def printlog(message): timestr = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") with open('log.txt', 'a') as f: s = t...
test_framework.py
#/usr/bin/env python '''This test framework is responsible for running the test suite''' from __future__ import print_function from argparse import ArgumentParser from os.path import abspath, join, dirname, pardir, getmtime, relpath import curses import fcntl import fnmatch import math import multiprocessing import ...
cifar100_to_mr.py
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
app.py
# -*- coding:utf-8 -*- import os from threading import Thread from flask import Flask, request from flask import redirect, url_for from flask import flash from flask import render_template from flask_login import login_user, LoginManager, login_required, logout_user, current_user from flask_bootstrap import Bootstrap...
test_ssl.py
# Test the support for SSL and sockets import sys import unittest from test import support import socket import select import time import datetime import gc import os import errno import pprint import tempfile import urllib.request import traceback import asyncore import weakref import platform import functools ssl =...
command_runner.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import secrets import shlex from pathlib import Path from subprocess import PIPE from threading import Thread from psutil import Popen logger = logging.getLogger("fastflix-core") __all__ = ["BackgroundRunner"] white_detect = re.compile(r"^\s+") ...
Camera.py
#!/usr/bin/env python3 # encoding:utf-8 import sys import cv2 import time import threading import numpy as np if sys.version_info.major == 2: print('Please run this program with python3!') sys.exit(0) class Camera: def __init__(self, resolution=(640, 480)): self.cap = None self.width = res...
shellshock-exp.py
#!/usr/bin/python # -*- coding: utf-8 -*- # from IPython.core.debugger import Tracer; breakpoint = Tracer() import requests import time from base64 import b64encode from random import randrange import threading class AllTheReads(object): def __init__(self, interval=1): self.interval = interval thr...
main_window.py
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
test_scheduler.py
import os import time from datetime import datetime, timedelta from multiprocessing import Process from rq import Queue from rq.compat import utc, PY2 from rq.exceptions import NoSuchJobError from rq.job import Job from rq.registry import FinishedJobRegistry, ScheduledJobRegistry from rq.scheduler import RQScheduler ...
spotifyAccount.py
import platform import random import string import threading import time from os import system import requests if platform.system() == "Windows": # checking OS title = "windows" else: title = "linux" def randomName(size=10, chars=string.ascii_letters + string.digits): return ''.join(random.choice(chars)...
fileIO.py
# -*- coding: utf-8 -*- """ @author: %(Mikel Val Calvo)s @email: %(mikel1982mail@gmail.com) @institution: %(Dpto. de Inteligencia Artificial, Universidad Nacional de Educación a Distancia (UNED)) @DOI: 10.5281/zenodo.3759306 Modified by: Pablo Couso (cousop@gmail.com) """ from EDF.writeEDFFile import edf_writter from ...
wk8local.py
import os os.environ['WENKU8_LOCAL'] = "True" import time import webbrowser import threading from error_report import * try: from server import * from manage import logger except Exception as e: report_it(e, _exit=True) local_version = 5009 def open_browser(url, sleep_time=3): time.sleep(sleep_t...
usage_statistics.py
import atexit import copy import datetime import json import logging import platform import signal import sys import threading import time from functools import wraps from queue import Queue from typing import Optional import jsonschema import requests from great_expectations import __version__ as ge_version from gre...
analytics.py
import logging import io import json import datetime import threading import time from typing import Union from google.cloud import bigquery import discord from discord.ext import commands from discord_slash import SlashContext # Set up logging logger = logging.getLogger(__name__) def run_on_another_thread(function...
coincheck.py
from befh.restful_api_socket import RESTfulApiSocket from befh.exchanges.gateway import ExchangeGateway from befh.market_data import L2Depth, Trade from befh.util import Logger from befh.instrument import Instrument from befh.clients.sql_template import SqlClientTemplate from functools import partial from datetime impo...
test_io.py
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
main.py
import argparse import ctypes import os import sys import tempfile import threading import time import webbrowser from typing import Dict, Optional from django.conf import ENVIRONMENT_VARIABLE from django.core.exceptions import ImproperlyConfigured from django.utils.crypto import get_random_string from mypy_extensions...
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...
02-import-sequences.py
from tqdm import tqdm import traceback from SNDG.Comparative.Pangenome import Pangenome, Strain, sqldb from SNDG.WebServices.NCBI import NCBI from Bio import Entrez, SeqIO import multiprocessing from BioSQL import BioSeqDatabase server = BioSeqDatabase.open_database(driver="MySQLdb", user="root", ...
test_concurrent_futures.py
import test.support # Skip tests if _multiprocessing wasn't built. test.support.import_module('_multiprocessing') # Skip tests if sem_open implementation is broken. test.support.import_module('multiprocessing.synchronize') # import threading after _multiprocessing to raise a more relevant error # message: "No module n...
test_html.py
from functools import partial from importlib import reload from io import BytesIO, StringIO import os import re import threading import numpy as np from numpy.random import rand import pytest from pandas.compat import is_platform_windows from pandas.errors import ParserError import pandas.util._test_decorators as td ...
php.py
import json import sys import threading from telethon.sync import TelegramClient import asyncio updates = [] running = False def write(array): print(json.dumps(array, default=str)) async def callback(event): global updates updates.append(event.to_dict()) def newCallback(): client.add_event_handler...
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 ...
main_window.py
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
dev_test_dex_subscribe.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: dev_test_dex_subscribe.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://www.lucit.tech/unicorn-binance-websocket-api.html # Github: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api # Documentation: https://un...