source
stringlengths
3
86
python
stringlengths
75
1.04M
DirScan.py
import hashlib import aiohttp import asyncio import datetime import os from multiprocessing import Process, Queue, Manager class Dirscan: def __init__(self, target): self.target = target self.targetmd5 = '' self.allqueue = Queue() # 字典文件 # self.urlpath = r'../dictionary/asp...
say.py
# _*_coding:utf-8 _*_ # @Time  :2020/8/28 0028 下午 10:35 # @Author  : Loner Lin # @File   :say.py # @Software :PyCharm import pyttsx3 import threading class Say: def __init__(self, chinese=True): self.engine = pyttsx3.init() if chinese: self.engine.setProperty('voice', 'zh') d...
bems.py
import json import base64 import threading import requests as req from flask import request, current_app from flask_restful import Resource from loguru import logger from Cryptodome.Hash import SHA256 from config import AMI_CIPHER as ami_cipher from config import AMI_SIGNER as ami_signer from utils.tangle import Iota...
load-data.py
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # # This script is used to load the proper datasets for the specified workloads. It loads # all data via Hive except for parquet data which needs to be loaded via Impala. # Most ddl commands are executed by Impala. import collections import ...
test_pool.py
import collections import random import threading import time import weakref import sqlalchemy as tsa from sqlalchemy import event from sqlalchemy import pool from sqlalchemy import select from sqlalchemy import testing from sqlalchemy.testing import assert_raises from sqlalchemy.testing import assert_raises_context_o...
test_stats.py
# Copyright 2013 Hewlett-Packard Development Company, L.P. # Copyright 2014 OpenStack Foundation # Copyright 2018 Red Hat, 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:/...
gstreamer.py
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
train_sampling_multi_gpu.py
import dgl import numpy as np import torch as th import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.multiprocessing as mp from torch.utils.data import DataLoader import dgl.function as fn import dgl.nn.pytorch as dglnn import time import argparse from dgl.data import RedditDa...
__init__.py
from __future__ import annotations import collections from datetime import datetime from functools import wraps import operator import os import re import string from typing import ( TYPE_CHECKING, Callable, ContextManager, Counter, Iterable, List, Type, ) import warnings import numpy as n...
map_stage_op_test.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
common.py
# # Phoenix-RTOS test runner # # Common parts of phoenix-rtos test runners # # Copyright 2021 Phoenix SYstems # Authors: Jakub Sarzyński, Mateusz Niewiadomski, Damian Loewnau # import importlib import logging import os import signal import sys import threading import time import pexpect import pexpect.fdpexpect impor...
test.py
def foo(queue): from time import sleep while True: queue.put('hello') sleep(0.01) def main(): import multiprocessing as mp # Read the pipe, do the below only if image avail in the pipe # Use the 'spawn' method to start a new Process mp.set_start_method('spawn') # Create a ...
clusterScalerTest.py
# Copyright (C) 2015-2021 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...
test.py
from threading import Thread class ThreadCtl: def __init__(self,count): pass def set_functions(self): pass def runner(mylist,limit): y = 0 token = get_token(dlpqslogin, sys.argv[1], sys.argv[2]) while ( y < len(mylist)): #token = get_token(dlpqslogin, sys.argv[1], sys.argv[2])...
Build_Program.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # THIS FILE SHOULD NOT BE CHANGED! #******************************************************************************* #* © 2011-2017, Cypress Semiconductor Corporation #* or a subsidiary of Cypress Semiconductor Corporation. All rights #* reserved. #* #* This software, in...
kafka_producer.py
from threading import Thread from typing import Optional import confluent_kafka from forwarder.application_logger import setup_logger from forwarder.utils import Counter class KafkaProducer: def __init__( self, producer: confluent_kafka.Producer, update_msg_counter: Optional[Counter] = N...
session.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020 Alibaba Group Holding Limited. 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...
background.py
# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU General Public License # a...
eqwis_q.py
import torch import numpy as np import cv2 from time import time from datetime import datetime import csv import os import queue import threading class ObjectDetection: """ Class implements Yolo5 model to make inferences on a RTSP video stream using Opencv2. """ def __init__(self, rtsp, rtsp_t): ...
multiprocess_TCP_server.py
import time import multiprocessing import socket class MultiProcessingSocketStreamServer(object): def __init__(self,port,process): self._serversocket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) self._serversocket.bind(('localhost',port)) self._serversocket.listen(5) self.pro...
test_ftplib.py
"""Test script for ftplib module.""" # Modified by Giampaolo Rodola' to test FTP class, IPv6 and TLS # environment import ftplib import asyncore import asynchat import socket import io import errno import os import threading import time try: import ssl except ImportError: ssl = None from unittest import Test...
plugin.py
# -*- coding: utf-8 -*- import os import threading import re import urllib2 import time from Components.ActionMap import ActionMap from Components.Network import iNetwork from Plugins.Plugin import PluginDescriptor from Components.Label import Label from Components.Sources.StaticText import StaticText from Screens.Scr...
stream_layered_image.py
""" This script generates a Docker image from a set of store paths. Uses Docker Image Specification v1.2 as reference [1]. It expects a JSON file with the following properties and writes the image as an uncompressed tarball to stdout: * "architecture", "config", "os", "created", "repo_tag" correspond to the fields ...
test_ssl.py
"""Tests for TLS support.""" # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : from __future__ import absolute_import, division, print_function __metaclass__ = type import functools import json import os import ssl import subprocess import sys import threading import time import traceback import OpenSSL.SSL im...
SAM_worker.py
""" Licensed under the Unlicense License; you may not use this file except in compliance with the License. You may obtain a copy of the License at https://unlicense.org Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BAS...
sdk_worker_main.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...
server.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
rtest.py
#!/usr/bin/python3 # ######################################################################## # Copyright (c) 2021 Advanced Micro Devices, 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 Softw...
display_st7789_240x320e.py
#!/usr/bin/env python3 ''' ***************************************** PiFire Display Interface Library ***************************************** Description: This library supports using the ST7789 display with resolution. This module utilizes the Pimoroni libraries to interface this display. This module also ...
speedtest_cli.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012-2014 Matt Martz # 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.or...
connection.py
import threading import pexpect class Connection: def __init__(self, intro, conn, numb): self.open = False self.type = intro self.connection = conn self.listening = 1 self.number = int(numb) + 1 self.thread = threading.Thread(target=self.wait) self.thread.start() def __str__(self): string = "" if(s...
serverbooter.py
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/gaogaotiantian/progshot/blob/master/NOTICE.txt import argparse import asyncio import http.server import os import socket import socketserver import sys import threading import websockets from .pswebserver...
sync.py
from . import utils from .index import IndexManager from .index import bulk_add_pkgs from .utils import path from threading import Thread import logging import os import time logger = logging.getLogger(__name__) def sync_folder(index, folder): with utils.benchmark("Sync packages"): EXTS = index.archive_t...
batcher.py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # Modifications Copyright 2017 Abigail See # # 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...
control.py
import json import time import os import logging import threading from queue import Queue, Empty from contextlib import contextmanager import redis from redis.exceptions import ConnectionError as RedisConnectionError logger = logging.getLogger('archivebot.control') @contextmanager def conn(controller): try: ...
template.py
import asyncio import json import os import re import threading from functools import partial from os import path import time from percy import percySnapshot from selenium.webdriver import Chrome from selenium.webdriver.support.ui import Select from pywebio.input import * from pywebio.output import * from pywebio.ses...
test_user_agent.py
""" Tests for the pandas custom headers in http(s) requests """ import gzip import http.server from io import BytesIO import multiprocessing import os import socket import time import urllib.error import pytest import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm pytestmark = p...
dag_processing.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...
EmulatorStub.py
import random import threading from emulators.Medium import Medium from emulators.MessageStub import MessageStub class EmulatorStub: def __init__(self, number_of_devices: int, kind): self._devices = [] self._threads = [] self._media = [] self._progress = threading.Lock() ...
topcoat.py
#!/usr/bin/python3 """A basic threading example | rzfeeser@alta3.com""" # Make a thread that simulates a NASA count down # Wait 1 second at the bottom of each loop ## Python standard library import threading ## py standard library import time def groundcontrol(x): for i in range(x, -1, -1): print(i) ...
fgoGui.py
import configparser,json,os,sys,threading from PyQt6.QtCore import QRegularExpression,Qt,pyqtSignal from PyQt6.QtGui import QRegularExpressionValidator,QAction from PyQt6.QtWidgets import QApplication,QInputDialog,QMainWindow,QMessageBox,QStyle,QSystemTrayIcon,QMenu import fgoFunc from fgoMainWindow import Ui_fgoMainW...
search_index.py
# encoding: utf-8 import multiprocessing as mp import click import sqlalchemy as sa import ckan.plugins.toolkit as tk @click.group(name=u'search-index', short_help=u'Search index commands') @click.help_option(u'-h', u'--help') def search_index(): pass @search_index.command(name=u'rebuild', short_help=u'Rebuil...
helper.py
import os import sys import distutils.spawn import time import subprocess from threading import Thread from tempfile import NamedTemporaryFile from unix_windows import IS_WIN # python 2/3 compatibility try: input = raw_input except NameError: pass def executable_exists(name): binary_path = distutils.spa...
job.py
from threading import Thread from datetime import datetime, timedelta from loguru import logger class Job: def __init__(self, func, name, interval, sync, run_thread: bool, offset: int): self.func = func self.name = name self.interval = interval self.sync = sync self.run_th...
dag_processing.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...
session.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...
test_sys.py
import unittest, test.support from test.support.script_helper import assert_python_ok, assert_python_failure import sys, io, os import struct import subprocess import textwrap import warnings import operator import codecs import gc import sysconfig import locale import threading # count the number of test runs, used t...
dataloader.py
from typing import Iterable, Callable, Optional, Any, Union import time import platform import threading import queue import torch import torch.multiprocessing as tm from ding.torch_utils import to_device from ding.utils import LockContext, LockContextType from .base_dataloader import IDataLoader from .collate_fn impo...
multiprocess_data_loader.py
from collections import deque import logging from multiprocessing.process import BaseProcess import random import traceback from typing import List, Iterator, Optional, Iterable, Union, TypeVar from overrides import overrides import torch import torch.multiprocessing as mp from allennlp.common.util import lazy_groups...
main.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests #做web请求的库 from bs4 import BeautifulSoup #处理html的库 import itchat import datetime from selenium import webdriver from pyvirtualdisplay import Display import time # import argparse #import threading #多线程库 # import sys # #表单的url # formurl = 'https://billing.v...
banana_serial.py
#!/usr/bin/env python import threading import serial from cStringIO import StringIO import time import rospy def _OnLineReceived(line): print(line) class BananaSerial(object): def __init__(self, port="/dev/ttyUSB0", baudrate=115200, lineHandler = _OnLineReceived): self._Port = port self._Baudrate = baudrate ...
Simulation.py
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
client-1.py
import socket from threading import Thread from tkinter import * import sys def receive(): while True: recv_msg = s.recv(1024) if not recv_msg: sys.exit(0) recv_msg = recv_msg.decode() print(" ", recv_msg) msg_list.insert(END, recv_msg) ...
office365userenum.py
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function ''' . .1111... | Title: office365userenum.py .10000000000011. .. | Author: Oliver Morton (Sec-1 Ltd) .00 000... | Email: oliverm@sec-1.com 1 01.. | Description: ...
cgo_engine.py
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import logging import os import random import string import time import threading from typing import Iterable, List, Dict, Tuple from nni.common.device import GPUDevice from .interface import AbstractExecutionEngine, AbstractGraphListener, Worke...
main.py
# Libraries OwO from os import listdir, remove, path, chdir import sys from shutil import rmtree from re import compile import tkinter as tk from tkinter import filedialog from threading import * import json # Changing the working directory to the temporary one created by pyinstaller (mainly for the .ico) try: ch...
http.py
import asyncio import json import logging import os import sys import threading from app.classes.handlerBuilder import BuildModuleUrls import tornado.escape import tornado.httpserver import tornado.ioloop import tornado.locale import tornado.log import tornado.template import tornado.web from app.api import * from app...
test_asciiserial.py
import pytest import threading import time from zaber.serial import AsciiSerial, AsciiCommand, AsciiReply, BinaryCommand, TimeoutError def test_write_command(asciiserial, fake): a = AsciiCommand("/1 echo TEST\r\n") asciiserial.write(a) asciiserial.write("/1 echo TEST\r\n") asciiserial.write("1 echo TE...
store_utils.py
# Copyright 2011 OpenStack Foundation # Copyright 2012 Red Hat, Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/...
client.py
import sys sys.path = ["."] + sys.path from mastodon import Mastodon, StreamListener import re import time import datetime import html import pprint import shutil import termwrap import prompt_toolkit import prompt_toolkit.contrib import prompt_toolkit.contrib.completers import threading import colorsys import os imp...
minion.py
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import absolute_import, print_function, with_statement, unicode_literals import os import re import sys import copy import time import types import signal import random import fnmatch import logging import threading import ...
pyvenv.py
# -*- encoding: utf-8 -*- import os import sys from pathlib import Path, PurePath from subprocess import Popen, PIPE, check_output from threading import Thread from urllib.request import urlretrieve from urllib.parse import urlparse import re import hashlib import base64 import argparse import shutil impor...
abotkit.py
import os import sys import subprocess import configparser import signal import multiprocessing import requests import time import argparse import shutil config = configparser.ConfigParser() parser = argparse.ArgumentParser() parser.add_argument('--update', action='store_true', help='Shortcut for `git submodule updat...
util.py
import threading import time import sys from multiprocessing import Process def destroy_window(webview, delay=3): def stop(): time.sleep(delay) webview.destroy_window() if sys.platform == 'darwin': from util_cocoa import mouseMoveRelative mouseMoveRelative(1, 1) ...
10_3_threading.py
import threading from time import sleep,ctime loops = [4,2] class ThreadFunc(object): def __init__ (self,func,args,name=''): self.name=name self.func=func self.args=args def __call__(self): self.res=self.func(*self.args) def loop(nloop,nsec): print 'start loop...
comparison_tests.py
import logging import multiprocessing from queue import Full, Empty from time import time from unittest import TestCase import ctypes from faster_fifo import Queue ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) fmt = logging.Formatter('[%(asctime)s][%(process)05d] %(message)s') ch.setFormatter(fmt) log = l...
test_io.py
from __future__ import division, absolute_import, print_function import sys import gzip import os import threading import time import warnings import io import re import pytest from tempfile import NamedTemporaryFile from io import BytesIO, StringIO from datetime import datetime import locale import numpy as np impor...
main.py
import databaseManager as dbMan import requests, discord, json, time, os from requests.auth import HTTPBasicAuth from discord import Webhook, RequestsWebhookAdapter, File from multiprocessing import Process from Record import Record JSON_DATA_FILE = "data.json" AUTH_DATA = None JSON_DATA = None DB_CONNE...
test3.py
from multiprocessing import Process, Pipe class pro1: def __init__(self): self.A = 123 self.p1 = Pipe() def f(self, conn): self.p1.send([self.A, None, 'hello']) conn.close() def re(self): print(self.p1.recv()) class pro2: def __init__(self): ...
client.py
import argparse import threading from time import time import requests RESPONSES = [] ELAPSEDES = [] THREADS = [] def connect(num, host, port, path): response = requests.post( f"http://{host}:{port}{path}", data={"thing": "stuff", "num": LOREM_IPSUM} ) elapsed = response.elapsed ELAPSEDES.ap...
http_mapi.py
from __future__ import print_function from builtins import str from builtins import object import logging import base64 import random import os import ssl import time import copy import sys import threading from pydispatch import dispatcher from flask import Flask, request, make_response # Empire imports from lib.comm...
dummy.py
import gc import threading from threading import Thread from time import sleep import paho.mqtt.client as mqtt from random import randint import random GUIDs = [ 'b03a7679-49cc-4339-b157-a026ab1e3f4e', '881fddd7-0fe7-4fc8-9d2d-d2cbbef08fec', '5f5e460a-3f0d-495f-9069-643f6ed35570', 'e47a0cd5-f2fb-4ce2-...
servers.py
# Copyright 2014 The Oppia 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 applicable ...
train_policy.py
""" Original code from John Schulman for CS294 Deep Reinforcement Learning Spring 2017 Adapted for CS294-112 Fall 2017 by Abhishek Gupta and Joshua Achiam Adapted for CS294-112 Fall 2018 by Michael Chang and Soroush Nasiriany Adapted for use in CS294-112 Fall 2018 HW5 by Kate Rakelly and Michael Chang """ import numpy ...
test_grpc_gateway_runtime.py
import asyncio import copy import json import multiprocessing import time from multiprocessing import Process import pytest from jina import Document, DocumentArray from jina.clients.request import request_generator from jina.helper import random_port from jina.parsers import set_gateway_parser from jina.serve import...
common.py
"""Test the helper method for writing tests.""" import asyncio import collections import functools as ft import json import logging import os import uuid import sys import threading from collections import OrderedDict from contextlib import contextmanager from datetime import timedelta from io import StringIO from uni...
streaming.py
# Tweepy # Copyright 2009-2019 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets from __future__ import absolute_import import json import logging import re import requests import ssl import sys from threading import...
quickData.py
# Copyright 2017 Tate M. Walker # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
radio_rpc.py
from concurrent import futures from enum import Enum import logging import threading import grpc import radiomessages_pb2 import radiomessages_pb2_grpc from google.protobuf import empty_pb2 logger = logging.getLogger(__name__) class RadioRPC(): """ Class for invoking RPCs for the radio service. """ ...
NSF_Biosensing_kmer_count.py
from Bio.Seq import Seq import time from Bio.Alphabet import IUPAC from Bio import SeqIO import itertools import random import numpy as np import numpy.linalg as linalg import scipy.linalg as la import pickle import pandas as pd import matplotlib.pyplot as plt from kmer_classes_functions import * from copy...
subprocess_runner.py
import sys import datetime import traceback from multiprocessing import Pipe, Process SLEEP_INTERVAL = 0.1 TIMESTAMP_FORMAT = "%A, %d %b %Y %I:%M:%S %p" class SubprocessRunner(object): SCRIPT_RUN_STATE_SUCCESS = "success" SCRIPT_RUN_STATE_FAILURE = "failure" SCRIPT_RUN_STATE_RUNNING = "running" de...
ModuleImplGraph.py
from q3.ui.engine import qtw,qtc,qtg import threading from ...ModuleFactory import IoType, ModuleFactory, ModuleImplBase, ModuleType from .ModuleImplElement import ModuleImplElement from ...ionodeflags import IoNodeFlags from ...q3vector import Q3Vector #from ...Module import Module #using Elements = std::vector<...
callisto.py
# DEPENDENCIES import time from socket import * from threading import Thread class callistoServer: def __init__(self, callback, addr=("localhost", 3300), capacity=100, lifetime=10): self.__serverAddr = addr self.__capacity = capacity self.__callback = callback self.__lifetime = li...
smartercontroller.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Author Identity: Sergiy Maysak # Copyright: 2019-2022 Sergiy Maysak. All rights reserved. import asyncio from array import array from threading import Thread import functools import concurrent.futures USE_FILTER_ONLY = 0 USE_BEANS = 1 HOT_PLATE_ON = True STATE_READY_TO_S...
main.py
#!python3 try: from .Settings import * except Exception: # ImportError from Settings import * import time from classes import Variable_Holder as VH import math import websocket import json import threading global vars vars = VH() def set_servo(num, pi): cos_input = math.cos(math.radians(num)) mid...
main.py
import copy import os.path import threading import time from datetime import datetime import gateio_new_coins_announcements_bot.globals as globals from gateio_new_coins_announcements_bot.load_config import load_config from gateio_new_coins_announcements_bot.logger import logger from gateio_new_coins_announcements_bot....
__init__.py
import ast import datetime import json import time import threading import socket import paho.mqtt.client as mqtt from flask import Flask from flask import request from kafka import KafkaProducer from message.mqtt_message import MqttMessages from .healthcheck import HealthCheck from .actuator import Actuator from .ht...
main.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @ide : PyCharm @project : Image_Read @file : main.py @author : CALIBRATION @time : 2020/2/23 21:03 @description: None """ import os import get_info_modis from PySide2.QtGui import QPixmap, QIcon from PySide2.QtWidgets import QApplication, QF...
make_epub.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: mcxiaoke # @Date: 2018-01-17 13:59:14 from __future__ import unicode_literals, division, absolute_import, print_function import codecs import base64 import json import sys import os import time import shutil import random import argparse import traceback import...
fb.py
import json import threading import requests from bs4 import BeautifulSoup as bs import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC with open('config.json') as da...
terminal.py
"""runs the debug terminal for SMWN.""" import collections import threading import logging import copy import gameterm import pygame from database import MAIN_GAME_STATE import database import class_ def handle(event): """check to see if the event is proper. if it is, then start the terminal. """ if...
x.py
import argparse import asyncio import importlib.util import logging import os import signal import traceback from multiprocessing import get_context from typing import List, Text, Optional, Tuple, Union, Iterable import aiohttp import ruamel.yaml as yaml import rasa.cli.utils as cli_utils import rasa.utils.io as io_u...
log.py
################################################################################ # Copyright (C) 2013-2014 by gempa GmbH # # Thread-safe file logger # # Author: Stephan Herrnkind # Email: herrnkind@gempa.de ################################################################################ import os import Queue impor...
test_util.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import sys # !/usr/bin/env python from unittest import TestCase proto_class = os.getcwd() + '/Proto/grpc' sys.path.append(proto_class) from CollectorAgent.TPackets import * from Span_pb2 import PAcceptEvent, PSpan, PSpanEvent # -*- coding: UTF-8 -*- cl...
pysoda.py
# -*- coding: utf-8 -*- ### Import required python modules from gevent import monkey monkey.patch_all() import platform import os from os import listdir, stat, makedirs, mkdir, walk, remove, pardir from os.path import ( isdir, isfile, join, splitext, getmtime, basename, normpath, exis...
ChatApplication_client.py
# -*- coding: utf-8 -*- # ## # University of the West of Scotland # Author: Guillermo Siesto Sanchez B00334584 # e-Mail: b00334684 at studentmail.uws.ac.uk # Date: 2018 # Description: The purpose of this coursework is to develop a distributed # chat system using a networking library. # # =========== # C L I E N T # ...
bot.py
import discord, async, random, time, re, datetime, os, threading, math, asyncio, socket, hashlib, base64 import pickle from discord.ext import commands from functools import reduce from pymongo import MongoClient from bot.banco import DIA, HORA, MINUTO from .fortunas import fortunas import bot.scraper as scraper import...
eddynetwork.py
""" Created on Mar 23, 2015 @author: Maribel Acosta Updated on Mar 10, 2020 @author: Lars Heling """ from eddyoperator import EddyOperator from nlde.query.sparql_parser import parse from crop.query_plan_optimizer.idp_optimizer import IDP_Optimizer from crop.query_plan_optimizer.federated_optimizer import Federated_O...
pyminer.py
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
test_aea.py
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...