source
stringlengths
3
86
python
stringlengths
75
1.04M
crawler.py
# !/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Vincent<vincent8280@outlook.com> # http://wax8280.github.io # Created on 2017/10/10 9:53 import traceback import time from queue import PriorityQueue, Empty, Queue import requests from threading import T...
v2_serving.py
# Copyright 2018 Iguazio # # 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, softwa...
Soundlocalization_socket_local.py
# # Created on Sat Oct 09 2021 # Author: Owen Yip # Mail: me@owenyip.com # import os, sys import threading import numpy as np import time import zmq import json pwd = os.path.abspath(os.path.abspath(__file__)) father_path = os.path.abspath(os.path.dirname(pwd) + os.path.sep + "..") sys.path.append(father_path) class...
quatport.py
import os import socket import sys import threading import queue import time os.system("cls"), os.system("mode con lines=22 cols=38"), os.system("rem Edited by RavelCros_Cro"), os.system("title QUARINTINE"), os.system("rem Made by @Wedertgh"), common_ports = { "21": "FTP", "22": "SSH", "23":...
main copy.py
#!/usr/bin/env python from smbus2 import SMBus from grooveGas import Gas import time import argparse import random import logging import threading from pythonosc import udp_client from oscserver import * print("OTHERWISE sensing") # Open i2c bus 1 and read one byte from address 80, offset 0 # bus = SMBus(1) # b = bus...
run.py
import subprocess; from threading import Thread # cargo watch -x "run -- -i=529f07b0b1d5d3df52b0440bad708090 -k=192.168.0.1 -p=5602 -t=2dc6bb40e73417bba878d3c8e3e08780 -c=192.168.0.1:5200 -n=5100 -d='d://workstation/expo/rust/fdb/data'" base_port = 5601; no_of_actors = 1; def make_cmd(port): base_cmd = 'cargo wa...
ThreadHandler.py
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # FEDERAL UNIVERSITY OF UBERLANDIA # Faculty of Electrical Engineering # Biomedical Engineering Lab # ------------------------------------------------------------------------------ # Author: Andrei Nakagawa, MSc # C...
__init__.py
# -*- coding: utf-8 -*- """The initialization file for the Pywikibot framework.""" # # (C) Pywikibot team, 2008-2020 # # Distributed under the terms of the MIT license. # import atexit import datetime import math import re import threading import time from contextlib import suppress from decimal import Decimal from qu...
installwizard.py
from functools import partial import threading import os from kivy.app import App from kivy.clock import Clock from kivy.lang import Builder from kivy.properties import ObjectProperty, StringProperty, OptionProperty from kivy.core.window import Window from kivy.uix.button import Button from kivy.utils import platform...
test_logsparse.py
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/gaogaotiantian/viztracer/blob/master/NOTICE.txt from .cmdline_tmpl import CmdlineTmpl import multiprocessing import os file_basic = """ from viztracer import log_sparse @log_sparse def f(): return 1...
trading.py
# Define Python imports import os import sys import time import config import threading import math import logging import logging.handlers # Define Custom imports from app.database import Database from app.account import Account from app.binance_handler import Orders from app.logger import CustomFormatter formater_st...
main_window.py
#!/usr/bin/env python3 # # 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 with...
test_api_thread.py
# -*- coding: utf-8 -*- import threading class TestAsyncThreadImport: def test_thread_import(self): def thread_func(results): try: import mygeotab mygeotab.API("testuser", session_id="abc123") results.append(None) except Exception a...
__init__.py
#!/usr/bin/env python3 # # 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 su...
script.py
#!/usr/bin/env python3 import socket import picamera as pc import time import serial import threading as th import sys import io import webiopi import atexit stp=th.Event() #Major stop flag for clean exit strmlive=th.Event() def streaminit(): sock=socket.socket() try: sock.bind(("0.0.0.0",8001)) except: stp.s...
app.py
#!/bin/python import logging from threading import Thread from logging.config import dictConfig from controller.wfmcontroller import wfmapp from kafkawrapper.wfmconsumer import consume from kafkawrapper.wfmcoreconsumer import core_consume from kafkawrapper.wfmerrorconsumer import error_consume from anuvaad_auditor.log...
async_rl.py
import time import multiprocessing as mp import psutil import torch from collections import deque import math from rlpyt.runners.base import BaseRunner from rlpyt.utils.quick_args import save__init__args from rlpyt.utils.logging import logger from rlpyt.utils.collections import AttrDict from rlpyt.utils.seed import s...
test_util.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...
TimeEventGenerator.py
# Copyright L.P.Klyne 2013 # Licenced under 3 clause BSD licence # $id:$ # # Class to handle UDP # # Lawrence Klyne # # import logging, threading import time from datetime import datetime from EventLib.Event import Event from EventHandlers.BaseHandler import BaseHandler from MiscLib.Sun import Sun _log = logg...
lesson_process_serial.py
import time import multiprocessing from compute_model import foo if __name__ == '__main__': #多进程串行 t_list = [] start_time = time.time() for i in range(5): i = multiprocessing.Process(target=foo, args=()) t_list.append(i) i.start() i.join() end_time = time.time() ...
easyaiortc.py
import asyncio import nest_asyncio nest_asyncio.apply() import random import numpy as np import cv2 from av import VideoFrame from aiortc import ( RTCIceCandidate, RTCPeerConnection, RTCSessionDescription, VideoStreamTrack, ) from aiortc.contrib.signaling import BYE, ApprtcSignaling import multiprocessi...
multithreading.py
import time import threading def calc_square(numbers): print('Calculating squares:') for n in numbers: time.sleep(0.2) print('square of {}: {}\n'.format(n, n * n)) def calc_cubes(numbers): print('Calculating cubes:') for n in numbers: time.sleep(0.2) print('cube of {}...
dead_lock.py
# -*- encoding: utf-8 -*- import threading from contextlib import contextmanager _local = threading.local() @contextmanager def acquire(*locks): locks = sorted(locks, key=lambda x: id(x)) acquired = getattr(_local, 'acquired', []) if acquired and max(id(lock) for lock in acquired) >= id(locks[0]): ...
runner.py
#!/usr/bin/env python """ @file runner.py @author Daniel Krajzewicz @author Michael Behrisch @author Leonhard Luecken @date 2010-02-20 @version $Id$ SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2008-2017 DLR (http://www.dlr.de/) and contributors This file is part of SUMO. SUMO i...
log.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import contextlib import copy import io import logging import logging.handlers import os import re import subprocess import sys import thread...
TS3Bot.py
#!/usr/bin/python import binascii # crc32 import datetime # for date strings import json import os # operating system commands -check if files exist import sqlite3 # Database import traceback import urllib.parse # for fetching guild emblems urls from threading import RLock import requests # to download guild emb...
test_backend_tk.py
import os import subprocess import sys import pytest _test_timeout = 10 # Empirically, 1s is not enough on CI. # NOTE: TkAgg tests seem to have interactions between tests, # So isolate each test in a subprocess. See GH#18261 @pytest.mark.backend('TkAgg', skip_on_importerror=True) def test_blit(): script = """...
standalone_test.py
"""Tests for acme.standalone.""" import socket import threading import unittest import josepy as jose import mock import requests from six.moves import http_client # pylint: disable=import-error from six.moves import socketserver # type: ignore # pylint: disable=import-error from acme import challenges from acme.m...
replays.py
# Copyright (c) 2020 Daniil Rakhov # # 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, distr...
Spec.py
import glob import os import sys from collections import defaultdict from functools import partial as curry from . import ( biblio, boilerplate, caniuse, conditional, config, constants, datablocks, dfns, extensions, fingerprinting, h, headings, highlight, idl, ...
test_advanced.py
# coding: utf-8 from concurrent.futures import ThreadPoolExecutor import json import logging import random import sys import threading import time import numpy as np import pytest import ray.cluster_utils import ray.test_utils from ray.test_utils import client_test_enabled from ray.test_utils import RayTestTimeoutEx...
rebalancetests.py
import time import unittest from TestInput import TestInputSingleton import logger from membase.api.rest_client import RestConnection, RestHelper from membase.helper.bucket_helper import BucketOperationHelper from membase.helper.cluster_helper import ClusterOperationHelper from membase.helper.rebalance_helper import Re...
jointSSmrl_roberta_bias.py
import torch print(torch.cuda.is_available()) from transformers import RobertaTokenizer, RobertaModel, GPT2Model, RobertaForMultipleChoice import tqdm, sklearn import numpy as np import os, time, sys import pickle import multiprocessing from multiprocessing import Process, Value, Manager from itertools import ...
test_query_concurrency.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
server.py
import click import threading import config # https://pypi.org/project/pyftpdlib/ from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.handlers import FTPHandler from pyftpdlib.servers import FTPServer server: FTPServer def start_server(): global server authorizer = DummyAuthorizer() authoriz...
spider.py
#!/usr/bin/python import argparse import json import logging import os import sys import re import threading import ConfigParser import Queue from htmlentitydefs import name2codepoint import requests import whoosh.analysis import whoosh.fields import whoosh.index CONFIG_FILE = '/etc/world4search.conf' def initial...
tests.py
# Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. import copy import io import os import pickle import re import shutil import tempfile import threading import time import unittest from pathlib import Path from unittest import mock from django.conf import settings from dj...
utils.py
from __future__ import print_function, division, absolute_import import atexit from collections import deque from contextlib import contextmanager from datetime import timedelta import functools from hashlib import md5 import inspect import json import logging import multiprocessing from numbers import Number import o...
example_subscribe.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: example_subscribe.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api # Documentation: https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api # PyPI: https://pypi.or...
ThreadCommunicationUsingWaitAndNotify.py
from threading import *; from time import *; class Producer: def __init__(self): self.products = [] self.ordersplaced = False def produce(self): for i in range(1,5): self.products.append("Product"+str(i)) sleep(1) print("Item Added") ...
igbotmanager.py
import pyautogui import time import math import random import os import sys import requests import wmi import imaplib import email from email.header import decode_header import webbrowser import threading import pyautogui from selenium import webdriver from selenium.webdriver.common.keys import Keys fro...
test_websocket_provider.py
import asyncio from concurrent.futures import ( TimeoutError, ) import pytest from threading import ( Thread, ) import websockets from tests.utils import ( wait_for_ws, ) from web3 import Web3 from web3.exceptions import ( ValidationError, ) from web3.providers.websocket import ( WebsocketProvider...
tests.py
import os import shutil import sys import tempfile import threading import time import unittest from datetime import datetime, timedelta from io import StringIO from urllib.request import urlopen from django.core.cache import cache from django.core.exceptions import SuspiciousFileOperation from django.core.files.base ...
elevator.py
# _*_ coding:utf-8 _*_ from time import sleep from tools import wapper_localtask from threading import Thread from globaltask import GlobalTask from traceback import format_exc import random MIN_FLOOR=-5 MAX_FLOOR=100 INIT_FLOOR=1 class ElevatorBase(object): def __init__(self,min_floor=MIN_FLOOR,max_floor=MAX_F...
phm_gui.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ PHM Gui """ import sys import os import time from threading import Thread, Event from datetime import datetime from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QThread, pyqtSignal from std_msgs.msg import String import yaml import rospy from ph...
worker.py
""" cea-worker: a worker-process that uses the /server/jobs/ api to figure out what needs to be loaded to complete a job. All output is wired through the /server/streams/ api. In the future, (Dataframe-) file reading / writing will happen through a /server/data api. This script is _not_ part of the ``scripts.yml``, b...
tutorial_wrappers.py
"""Env wrappers Note that this file is adapted from `https://pypi.org/project/gym-vec-env` and `https://github.com/openai/baselines/blob/master/baselines/common/*wrappers.py` """ from collections import deque from functools import partial from multiprocessing import Pipe, Process, cpu_count from sys import platform im...
tui.py
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os import time import random import textwrap import re import socket import curses import string import inspect import threading import math from queue import Queue from .messages import msg from pylib.printVersion import get_war_info # for putty connections ...
test_explicit_comms.py
import multiprocessing as mp import numpy as np import pandas as pd import pytest import dask from dask import dataframe as dd from distributed import Client from distributed.deploy.local import LocalCluster import cudf from cudf.tests.utils import assert_eq from dask_cuda.explicit_comms import CommsContext, datafr...
sys_current_frames.py
import sys import threading import time io_lock = threading.Lock() blocker = threading.Lock() def block(i): t = threading.current_thread() with io_lock: print('{} with ident {} going to sleep'.format( t.name, t.ident)) if i: blocker.acquire() # acquired but never released ...
threading_test.py
""" Simple demonstration of the threading concept """ import logging import threading import time def thread_function(name): """ A simple function that just logs and sleeps in between """ logging.info("Thread %s: starting", name) time.sleep(2) logging.info("Thread %s: finishing", name) if __name__ ==...
Cross_Validation.py
#C1949699 # import math import random import re import time from cv2 import INTER_AREA, INTER_BITS, INTER_CUBIC, INTER_LANCZOS4, INTER_LINEAR, INTER_LINEAR_EXACT, INTER_MAX, imread, imshow, waitKey import numpy as np import cv2 import os from multiprocessing import Process, Manager data_path = os.getcwd() dataset_path...
test_integration.py
import collections import threading import subprocess import os import json import mock import pwd import socket import sys import pytest try: from BaseHTTPServer import HTTPServer from BaseHTTPServer import BaseHTTPRequestHandler except ImportError: from http.server import HTTPServer from http.server...
tool.py
#!/usr/bin/python # Import modules import vcf as pyvcf import pysam import argparse import multiprocessing as mp import queue import time import sys import collections import subprocess import os import glob import pandas as pd import matplotlib.pyplot as plt import numpy as np import re from sklearn.mixture import Ga...
test_util.py
# Copyright (c) OpenMMLab. All rights reserved. import importlib import logging import os import tempfile from functools import partial import mmcv import pytest import torch.multiprocessing as mp import mmdeploy.utils as util from mmdeploy.utils import target_wrapper from mmdeploy.utils.constants import Backend, Cod...
stress_test_index_mp.py
"""Stress test diskcache.persistent.Index.""" import itertools as it import multiprocessing as mp import random import time import diskcache as dc KEYS = 100 OPERATIONS = 10000 SEED = 0 functions = [] def register(function): functions.append(function) return function @register def stress_get(index): ...
runserver.py
""" This script runs the Template application using a development server. """ from os import environ from Template import app import time import urllib2 import threading from threading import Event, Thread from Template.configParser import Config from flask import g # local imports from Template.mod....
vpn_status.py
# -*- coding: utf-8 -*- """ Drop-in replacement for i3status run_watch VPN module. Expands on the i3status module by displaying the name of the connected vpn using pydbus. Asynchronously updates on dbus signals unless check_pid is True. Configuration parameters: cache_timeout: How often to refresh in seconds when...
session_test.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...
draw_out.py
# coding: UTF-8 import os import json import re # in_path = r"D:\work\law_pre\test\in" # out_path = r"D:\work\law_pre\test\out" in_path = r"/disk/mysql/law_data/formed_data" out_path = r"/disk/mysql/law_data/critical_data" mid_text = u" _(:з」∠)_ " title_list = ["docId", "caseNumber", "caseName", "spcx", "court", "t...
SpheroLooper.py
#!/usr/bin/python3 from sphero_sprk.sphero import Sphero import time import threading import copy import numpy as np import matplotlib.pyplot as plt import tkinter as tk from Tools import Tools BREAK = Sphero.RAW_MOTOR_MODE_BRAKE FORWARD = Sphero.RAW_MOTOR_MODE_FORWARD REVERSE = Sphero.RAW_MOTOR_MODE_REVERSE class...
test_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 u...
webserver.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import BaseHTTPServer import SimpleHTTPServer import errno import logging import threading import...
metadata_committer.py
""" Copyright 2021 Merck & Co., Inc. Kenilworth, NJ, USA. 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 ...
test_websocket.py
import asyncio import functools import threading import time from contextlib import contextmanager import pytest import requests from uvicorn.config import Config from uvicorn.main import ServerState from uvicorn.protocols.http.h11_impl import H11Protocol from uvicorn.protocols.websockets.wsproto_impl import WSProtoc...
socketserver.py
import socket as pythonsocket from threading import Thread from time import sleep import datetime import pickle import datetime import database import string import random socket = pythonsocket.socket(pythonsocket.AF_INET, pythonsocket.SOCK_STREAM) def startServer(): database.beginDataBaseConnectio...
file_monitor1.py
import os import tempfile import threading import win32con import win32file FILE_CREATED = 1 FILE_DELETED = 2 FILE_MODIFIED = 3 FILE_RENAMED_FROM = 4 FILE_RENAMED_TO = 5 FILE_LIST_DIRECTORY = 0x0001 PATHS = ['c:\\Windows\\Temp', tempfile.gettempdir()] def monitor(path_to_watch): h_directory = win32file.CreateFi...
phishingRunner.py
###################################################### # # # SOCIALFISH v2.0 # # # # by: vaon4ik # # ...
WechatDriver.py
# coding=utf-8 from appium import webdriver from selenium.webdriver.common.by import By import time import threading class Wechat(): '''微信自动化操作助手''' def __init__(self, ip, port, name, udid): desired_caps = { 'platformName': 'Android', 'deviceName': name, 'udid': udi...
bittrex.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...
oracles.py
import asyncio import models.dfusion import models.chainlink import models.maker import models.compound import models.uniswap import models.coinbase from models.create_db import db import chainlink_methods import dfusion_methods import compound_methods import uniswap_methods import coinbase_methods import maker_methods...
timer_queue.py
""" A timer queue implementation """ from future import standard_library standard_library.install_aliases() from builtins import object import threading import queue from time import time import traceback from .timer import Timer from .common import log class TimerQueue(object): """ A timer queue implementa...
manager.py
import os import pickle import threading from gi.repository import GLib, GObject, Gtk import typecat.config as config from typecat.display.configwindow import GtkFontLoadingWindow from typecat.font import Font total_files = 0 loaded_files = 0 current_file_name = "" total_cache = 0 loaded_cache = 0 def load_cache()...
__init__.py
import sys import os.path from thonny.plugins.micropython import ( BareMetalMicroPythonProxy, BareMetalMicroPythonConfigPage, add_micropython_backend, ) from thonny import get_workbench, ui_utils from thonny.ui_utils import FileCopyDialog, CommonDialog, ems_to_pixels from thonny.misc_utils import find_volum...
edgetpu.py
import os import datetime import hashlib import multiprocessing as mp import queue from multiprocessing.connection import Connection from abc import ABC, abstractmethod from typing import Dict import numpy as np import tflite_runtime.interpreter as tflite from tflite_runtime.interpreter import load_delegate from frigat...
plotting.py
"""Pyvista plotting module.""" import pathlib import collections.abc from functools import partial import logging import os import time import warnings import weakref from functools import wraps from threading import Thread import imageio import numpy as np import scooby import vtk from vtk.util import numpy_support ...
zmq_driver.py
# Copyright 2018 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 applicable law or agreed to in wri...
bm_socket.py
import json import logging import threading import traceback from urllib.parse import urlparse import websocket from pymmbot.bitmex.auth import APIKeyAuth from pymmbot.settings import settings class BM_Socket(object): def __init__(self): self.callbacks = {} self.data = {} self.keys = {} ...
audio_a.py
from sys import byteorder from array import array from struct import pack import pyaudio import numpy as np import threading import time import sys from multiprocessing import Process, Queue fftString='' stringReady = False def filter_lpf(data,new_data,alpha): dataf = data*alpha + new_data*(1-alpha) retu...
installwizard.py
import os import sys import threading import traceback from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from electrum import Wallet, WalletStorage from electrum.util import UserCancelled, InvalidPassword from electrum.base_wizard import BaseWizard from electrum.i18n import _ from ....
base_camera.py
import time import threading try: from greenlet import getcurrent as get_ident except ImportError: try: from thread import get_ident except ImportError: from _thread import get_ident class CameraEvent(object): """An Event-like class that signals all active clients when a new frame is...
main.py
#General imports==================================== import threading from queue import Queue from spider import Spider from domain import * from general import * #Set variables for individual project============== PROJECT_NAME = 'sound-cloud' HOMEPAGE = 'https://soundcloud.com/' DOMAIN_NAME = get_domain_name(HOMEPA...
bucketprocessor.py
from threading import Lock from threading import Thread from threading import Condition from framerate import FrameRate from frameduration import FrameDuration class BucketProcessor: def __init__(self,stream,ipdictionary, ipselection): print("Creating BucketProcessor for " + stream.name) self._lo...
test_xmlrpc.py
zaimportuj base64 zaimportuj datetime zaimportuj sys zaimportuj time zaimportuj unittest z unittest zaimportuj mock zaimportuj xmlrpc.client jako xmlrpclib zaimportuj xmlrpc.server zaimportuj http.client zaimportuj socket zaimportuj os zaimportuj re zaimportuj io zaimportuj contextlib z test zaimportuj support spróbuj...
bot.py
import json import nest_asyncio import asyncio import tempfile import uuid import urllib.request import tornado import threading import os from telebot import TeleBot from telebot import types from TikTokApi import TikTokApi from moviepy.editor import * from database import database from tornado.ioloop import Peri...
product_table_channel.py
import asyncio from datetime import datetime from multiprocessing import Process import pathlib from message_passing_tree.prelude import * from message_passing_tree import SocketChannel from message_passing_tree.utils import json_stringify from message_passing_tree import ansi from spectralsequence_chart ...
movies.py
# encoding: utf-8 import operator from datetime import datetime # import Queue as queue # import threading from sqlalchemy import Column, Integer, String, DateTime import tmdbsimple as tmdb from uocciny import app, get_uf, save_uf from uocciny.database import Base, get_db, row2dict ''' https://stackoverflow.com/quest...
alexa_communication.py
import time import calendar import json import requests import threading from hyper import HTTP20Connection __author__ = "NJC" __license__ = "MIT" def read_from_downstream(boundary, data): """ This functions reads data from the raw downstream channel, and pulls out messages based on the sp...
utils.py
######## # Copyright (c) 2018-2020 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
dict_compilation_test.py
# Copyright 2017-2019 typed_python 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 # # Unless required by applicable law...
caprica.py
#!/usr/bin/python3 # # Crude replacement for Galactica + DHI with built-in clock # # Imports import argparse import signal import queue import threading import time import socketserver import socket import cairo import os import sys from unicodedata import normalize, combining from math import pi from pkg_resources imp...
broker.py
#!/usr/bin/env python3 from collections import defaultdict from pprint import pprint import threading import uuid import zmq from common import config class Broker: def __init__(self): self.id = uuid.uuid4() self.setupBroker() self.topicList = defaultdict(list) def __setupB...
fsi.py
from subprocess import Popen, PIPE from os import path import string import threading import tempfile import Queue import uuid import hidewin class FSharpInteractive: def __init__(self, fsi_path, is_debug = False): self._debug = is_debug #self.logfiledir = tempfile.gettempdir() + "/log.txt" ...
ntlmrelayx.py
#!/usr/bin/env python # Copyright (c) 2013-2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Generic NTLM Relay Module # # Authors: # Alberto Solino (@agsolino) # Dirk-ja...
Threads.py
import threading class Thread(): __instance = None threads = [] @staticmethod def getInstance(): if Thread.__instance == None: return Thread() return Thread.__instance def __init__(self): if Thread.__instance != None: raise Exception("...
sparql_status_with_iam.py
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 """ import threading import time import requests from graph_notebook.configuration.generate_config import AuthModeEnum from graph_notebook.authentication.iam_credentials_provider.credentials_factory import IAMAu...
base_crash_reporter.py
# Electrum - lightweight Merge client # # 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, ...
conductor.py
# Copyright (c) 2014 Rackspace, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
pretrainv8.py
import numpy as np import scipy.misc,scipy.io import time,os,sys import threading import util print(util.toYellow("=======================================================")) print(util.toYellow("pretrain.py (pretrain structure generator with fixed viewpoints)")) print(util.toYellow("===================================...
Setup.py
# -*- coding: utf-8 -*- import re, os, threading from re import findall, search, split, sub from enigma import RT_WRAP, RT_VALIGN_CENTER, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER, gFont, eListbox,eListboxPythonMultiContent, getDesktop, BT_SCALE, BT_FIXRATIO from Components.AVSwitch import AVSwitch from Compone...