source stringlengths 3 86 | python stringlengths 75 1.04M |
|---|---|
thread.py | # Copyright 2019 The Forte 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 ... |
utils.py | """
The MIT License
Copyright (c) 2014 Fred Stober
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, publis... |
recoco_spy.py | # Copyright 2012 James McCauley
#
# 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 writi... |
authcode.py | # Note: This docstring is also used by this script's command line help.
"""A one-stop helper for desktop app to acquire an authorization code.
It starts a web server to listen redirect_uri, waiting for auth code.
It optionally opens a browser window to guide a human user to manually login.
After obtaining an auth code... |
nntest_direct_useScores.py | from __future__ import print_function
import tensorflow as tf
from nn import linearND, linear
from mol_graph_direct_useScores import atom_fdim as adim, bond_fdim as bdim, max_nb, smiles2graph, bond_types
from models import *
import math, sys, random
from optparse import OptionParser
import threading
from multiprocessin... |
tests.py | # -*- coding: utf-8 -*-
import os
import shutil
import sys
import tempfile
import time
import unittest
from cStringIO import StringIO
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.core.files.base import ContentFile
from django.core.files.images import get_image_dime... |
main.py | import sys
import os
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(os.path.split(rootPath)[0])
print(sys.path)
from src.analysis.QQZoneAnalysis import QQZoneAnalysis
from src.spider.QQZoneSpider import QQZoneSpider
from src.util.constant import WEB_SPIDER_INFO... |
__init__.py | # Copyright The OpenTelemetry 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 or agreed to in ... |
server.py | import asyncio
import threading
import time
try:
from kivy.core.clipboard import Clipboard
except:
pass
connected_transport = dict()
class ServerClientProtocol(asyncio.Protocol):
def connection_made(self, transport):
self.transport = transport
self.peername = transport.get_extra_info('p... |
proc_w_queue.py | #!/usr/bin/env python
'''
Use processes and Netmiko to connect to each of the devices in the database. Execute
'show version' on each device. Use a queue to pass the output back to the parent process.
Record the amount of time required to do this.
'''
from netmiko import ConnectHandler
from datetime import datetime
f... |
application.py | import subprocess
import time
from io import BytesIO
import requests
from appdirs import user_cache_dir
import os
import vfmflathub
import threading
from appdirs import user_data_dir
class Application:
def __init__(self, flatpak_id, name, description, latest_version, image_url, installed=False):
self.fla... |
_run.py | from profil3r.app.colors import Colors
import threading
def run(self):
# Get arguments from the command line
self.parse_arguments()
self.load_config()
self.print_logo()
self.menu()
self.get_permutations()
modules = self.get_report_modules()
if modules:
# Number of permut... |
SerialClient.py | #!/usr/bin/env python
#####################################################################
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that th... |
communicator.py | from enum import Enum
import msgpack
import asyncio
import threading
import abc
import logging
import janus
log = logging.getLogger(__name__)
class Communicator:
def __init__(self, address, port, known_commands, ssl=None, timeout=10):
log.debug(f"Instancing pywco with address {address}:{port}")
... |
MessageProcessor.py | # Copyright 2015 Ufora 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 i... |
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... |
screens.py | import asyncio
from weakref import ref
from decimal import Decimal
import re
import threading
import traceback, sys
from typing import TYPE_CHECKING, List
from kivy.app import App
from kivy.cache import Cache
from kivy.clock import Clock
from kivy.compat import string_types
from kivy.properties import (ObjectProperty,... |
give_me_pic.py | from webdriver_manager.firefox import GeckoDriverManager
from multiprocessing import JoinableQueue
from selenium import webdriver
from threading import Thread
from pytube import YouTube
from time import sleep
from PIL import Image
import urllib
import shutil
import yaml
import cv2
import os
with open('./config.yml') ... |
test_binary.py | import torch
import torch.nn as nn
import os
import numpy as np
import tqdm
import json
from AFSD.common import videotransforms
from AFSD.common.anet_dataset import get_video_info, load_json
from AFSD.anet.BDNet import BDNet, DirichletLayer
from AFSD.common.segment_utils import softnms_v2
from AFSD.common.config import... |
view_rgbd.py | # Copyright 2021 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
bg_invoke.py | '''Wrapper around threading for running things in background.'''
from collections import deque
import multiprocessing as _mp
import threading as _t
import sys as _sys
import os as _os
from time import sleep
from .with_utils import dummy_scope
from .traceback import format_exception
from .time import sleep_until
from... |
testmultithread.py | import threading
import time
import logging
logging.basicConfig(level=logging.DEBUG,
format='(%(threadName)-9s) %(message)s',)
def wait_for_event(e):
logging.debug('wait_for_event starting')
event_is_set = e.wait()
logging.debug('event set: %s', event_is_set)
def w... |
metaNODE3.py | # Solid State Drive (SSD) recommended
# pip install websocket-client
import websocket
from random import random, shuffle, randint
from ast import literal_eval as literal
from multiprocessing import Process
from threading import Thread
from datetime import datetime
from statistics import mode
import logging
import ti... |
queues.py | #
# Module implementing queues
#
# multiprocessing/queues.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
# Modifications Copyright (c) 2020 Cloudlab URV
#
__all__ = ['Queue', 'SimpleQueue', 'JoinableQueue']
import os
import threading
import collections
import weakref
fro... |
shamir_client.py | import socket
import sqlite3
import sys
import aes_crypt
import rsa_encrypt
import settings
import json
import threading
import base64
import hashlib
def challenge():
#create host object
host = Host()
#Create a hash of the node's public key to send to the auth node for identity verification
keyhash ... |
gcp_janitor.py | #!/usr/bin/env python
# Copyright 2016 The Kubernetes 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 appli... |
Test.py | # -*- coding;utf-8 -*-
import time
import random
import itertools
import multiprocessing
MAX = 2**6
def producerLoop(q):
c = itertools.count(start=1, step=1)
while True:
e = c.next()
if e>MAX: break
q.put(e)
time.sleep(0)
# time.sleep(random.randint(1, 1... |
__init__.py | import os
import time
import shutil
import tempfile
import threading
from datetime import datetime
from subprocess import call
import platform
# "Cansu"
class Recorder:
def __init__(self,driver,fps,path=""):
self.driver = driver
self.fps = fps
self.status = False
self.tempdir = te... |
ssdaq_control.py | from ssdaq.utils import daemon
import ssdaq
from ssdaq.core import publishers
from ssdaq import sslogger, subscribers
from ssdaq import logging as handlers
import os
from pathlib import Path
import logging
sslogger.addHandler(handlers.ChecSocketLogHandler("127.0.0.1", 10001))
signal_counter = 0
class FileWriterDaem... |
flow_test.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Tests for API client and flows-related API calls."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import io
import threading
import time
from typing import Iterable
import zipfile
from absl import app
... |
ensembles_base.py | import warnings
from abc import abstractmethod
from functools import partial
from itertools import repeat
from multiprocessing import Process, Queue
from multiprocessing.pool import ThreadPool, Pool
from queue import PriorityQueue
from threading import Thread
import numpy as np
import scipy.stats
from ml_recsys_tools... |
page.py | import tkinter as tk
import paho.mqtt.client as mqtt
import json
import threading
import csv
import os
import pathlib
from tkinter import ttk
from graph import Plot
class Page(tk.Frame):
def __init__(self, client_id, update_time, *args, **kwargs):
"""
Initiation of Page class which is responsible f... |
manager.py | #!/usr/bin/env python3.7
import os
import time
import sys
import fcntl
import errno
import signal
import subprocess
import time
from selfdrive.tinklad.tinkla_interface import TinklaClient
from cereal import tinkla
from selfdrive.car.tesla.readconfig import CarSettings
import datetime
from common.spinner import Spinner
... |
test_browser.py | # coding=utf-8
# Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
import argparse
import json
import multiprocessing
imp... |
GUI.py | import pickle
from tkinter import *
from tkinter.ttk import *
from tkinter import messagebox
import socket
import threading
import os
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
def show_about_info():
messagebox.showinfo("关于", "3406")
class Chat(object):
def __init__(self):
self.IP = "192... |
test_search.py | import time
import pdb
import copy
import logging
from multiprocessing import Pool, Process
import pytest
import numpy as np
from milvus import DataType
from .utils import *
from .constants import *
uid = "test_search"
nq = 1
epsilon = 0.001
field_name = default_float_vec_field_name
binary_field_name = default_binary... |
apollon_dashboard.py | ## Apollon Dashboard Object ##
class ApollonDashboard(object):
# Erstellt ein neues Apollon Dashboard Objekt
def __init__(self, ChainMaster):
from flask import Flask
self.fl = Flask(__name__, static_url_path='', template_folder="dashboard/templates", static_folder="dashboard/static")
... |
custom.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
test_ssl.py | # Test the support for SSL and sockets
import sys
import unittest
from test import test_support
import asyncore
import socket
import select
import errno
import subprocess
import time
import os
import pprint
import urllib, urlparse
import shutil
import traceback
from BaseHTTPServer import HTTPServer
from SimpleHTTPSer... |
bokeh_server.py | ''' Interactive plot for rendering time-indexed graph simulations '''
import numpy as np
from functools import partial
from threading import Thread
from tornado import gen
import traceback
from bokeh.plotting import figure, output_file, show, curdoc, from_networkx
from bokeh.models import ColumnDataSource, Slider, S... |
stop_condition_validator.py | import datetime
import json
import logging
import os
import re
import threading
import time
import numexpr as ne
import pika
from tools.mongo_dao import MongoDB
class StopConditionValidator:
"""
Main idea is to create executable boolean math expression from the different stop conditions
using user-define... |
IrohaHashCustodian.py | from IrohaUtils import *
import logging
import hashlib
import threading
class BlockStorehouse():
"""
A class to track the blocks being placed on the chain, to cache the results of querying blocks
This will allow for a speed up as we will not need to query the same low height blocks over and over
"""
... |
util.py | import numpy as np
from tqdm import tqdm
from multiprocessing import Process
import osmium
from copy import deepcopy
import setproctitle
from argparse import Namespace
"""
This file contains multiple utility functions.
"""
def read_samples(path):
names = ['country', 'id', 'type', 'tags', 'lat', 'lon']
dtypes =... |
screentimereminder.py | import ctypes
from time import sleep
from threading import Thread
def showScreenTimeReminder():
ctypes.windll.user32.MessageBoxW(0,"Look away from your screen!","Screen-Time-Reminder",0)
if __name__ == '__main__':
Thread(target=showScreenTimeReminder).start()
while True:
sleep(1800)
Thread(target=func).start... |
create_window.py | # -*-coding:utf-8-*-
"""
创建windows界面
响应各控件功能
"""
import random
import shelve
import threading
from queue import Queue
import ctypes
import ctypes.wintypes
from PIL import ImageTk
from tkinter import *
from tkinter import ttk
import tkinter.messagebox as messagebox
from tkinter.scrolledtext import ScrolledText
from ga... |
main.py | from src.view.tui import Tui
from src.view.tui import Gui
from src.model.maze.Maze import Maze
from src.model.agent.Agent import Agent
from src.controller.environment import Environment
import logging
from threading import Thread
logging.basicConfig(level=logging.DEBUG, format='%(name)s - %(levelname)s - %(message)s')... |
app_test.py | from __future__ import print_function
from __future__ import unicode_literals
import re
import socket
import subprocess
import ttfw_idf
import time
import netifaces
from threading import Thread, Event
def run_server(server_stop, port, server_ip, client_ip):
print("Starting PPP server on port: {}".format(port))
... |
TDStream_v2.py | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 2 11:19:59 2019
The MIT License
Copyright (c) 2018 Addison Lynch
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, in... |
test_test.py | #!/usr/bin/env python
# Copyright 2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# standard library modules, , ,
import unittest
import copy
import time
import tempfile
# internal modules:
from yotta.lib.detect import systemDefaultTarget
from yotta.test.cli import ... |
client.pyw | from socket import *
import pickle
import random
import sys, os, time
import pygame
# GUI
try:
from tkinter import *
from tkinter.scrolledtext import ScrolledText
from tkinter.ttk import *
from tkinter.simpledialog import askstring
except:
from Tkinter import *
from ScrolledText import *
fr... |
main.wsgi | #!/usr/bin/env python
#-*- encoding: utf-8 -*-
import os, sys, _thread, signal
app_root = os.path.dirname(__file__)
if app_root.strip()!='':
sys.path.append(app_root)
os.chdir(app_root)
from config import *
web.config.debug = not variant.inside_container
from modules import docapi, webapp, mdocker, mdb
def... |
ac_server_plugin.py | """
Copyright (c) 2015, NeverEatYellowSnow (NEYS)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditio... |
users.py | #!/usr/bin/env python
from __future__ import print_function
from pygecko.ZmqClass import Pub, Sub
from pygecko.ZmqClass import Core, zmqTCP, GeckoCore
import multiprocessing as mp
import time
def publisher(e, topic):
p = Pub()
addr = zmqTCP('dalek.local', 9998)
p.connect(addr)
try:
cnt = 0
... |
app.py | # https://github.com/tnware/product-checker
# by Tyler Woods
# coded for Bird Bot and friends
# https://tylermade.net
from typing import Any
import requests
import time
import json
from datetime import datetime
import urllib.parse as urlparse
from urllib.parse import parse_qs
from threading import Thread, Semaphore
fr... |
main.py | #!/usr/bin/env python
import time
import os
import random
import threading
import argparse
import matplotlib.pyplot as plt
import numpy as np
import scipy as sc
import cv2
from collections import namedtuple
import torch
from torch.autograd import Variable
from robot import Robot
from trainer import Trainer
from logger... |
build.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... |
multiprocess_test_case.py | #!/usr/bin/env python3
# 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 multiprocessing
import os
import sys
import tempfile
import traceback
import unittest
import warnings
from func... |
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... |
multiprocess_guetzli.py | import argparse
from multiprocessing import Process
import subprocess
import os
def guetzli_dumper(input_file_path, input_q_file_path, input_o_file_path):
command = ["train_bin/Release/guetzli_dumper", input_file_path, input_q_file_path, input_o_file_path]
try:
subprocess.check_call(command)
except:
pass... |
http.py | import logging
import base64
import sys
import random
import string
import os
import ssl
import time
import copy
import json
import sys
from pydispatch import dispatcher
from flask import Flask, request, make_response, send_from_directory
# Empire imports
from lib.common import helpers
from lib.common import agents
fro... |
runners.py | # -*- coding: utf-8 -*-
import codecs
import locale
import os
import struct
import sys
import threading
from functools import partial
from subprocess import Popen, PIPE
# Import some platform-specific things at top level so they can be mocked for
# tests.
try:
import pty
except ImportError:
pty = None
try:
... |
jobManager.py | from __future__ import print_function
#
# JobManager - Thread that assigns jobs to worker threads
#
# The job manager thread wakes up every so often, scans the job list
# for new unassigned jobs, and tries to assign them.
#
# Assigning a job will try to get a preallocated VM that is ready,
# otherwise will pass 'None' ... |
led_rgb_pattern.py | #***************************************************************************************************
# Imports
#***************************************************************************************************
# Global imports
import os
import threading
import traceback
import math
import time
import enum
from typing... |
websocket_helper.py |
import PureCloudPlatformApiSdk
# For fetching historical adherence
import asyncio
import websockets
import threading
import json
import time
import singer
logger = singer.get_logger()
MAX_TRIES = 5
WEBHOOK_WAIT = 5
ADHERENCE_CHANNEL = 'v2.users.{}.workforcemanagement.historicaladherencequery'
async def get_websock... |
test_kafka_eager.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
base.py | # Copyright (c) 2016, Daniele Venzano
#
# 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 w... |
learn.py | # # Unity ML-Agents Toolkit
import logging
import argparse
from multiprocessing import Process, Queue
import os
import glob
import shutil
import numpy as np
from typing import Any, Callable, Optional, List, NamedTuple
import mlagents.trainers
import mlagents_envs
from mlagents import tf_utils
from mlagents.trainers.... |
Keylogger.py | """------------------------------------------------------- LIBRARIES -----------------------------------------------------------------"""
# GETTING RELATIVE PATHS
import sys
import os
from os.path import expanduser
# --------------------------------------------------------
# FOR THE CHECKUPS AND USING W... |
regrtest.py | #! /usr/bin/env python
"""
Usage:
python -m test.regrtest [options] [test_name1 [test_name2 ...]]
python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]]
If no arguments or options are provided, finds all files matching
the pattern "test_*" in the Lib/test subdirectory and runs
them i... |
server.py | #!/usr/bin/python3
import socket
import threading
import pickle
from tkinter import Tk, Text
host = "localhost" # input("Host: ")
port = 5000 # int(input("Port: "))
connections = []
total_connections = 0
text = None
class Client(threading.Thread):
def __init__(self, client_socket, client_address, client_id, c... |
notebookapp.py | # coding: utf-8
"""A tornado based IPython notebook server.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPY... |
subprocess_connection.py | import signal
import sys
from thonny.plugins.micropython.connection import MicroPythonConnection
class SubprocessConnection(MicroPythonConnection):
def __init__(self, executable, args=[]):
import threading
try:
import ptyprocess
except ImportError:
print(
... |
tunnel.py | """Basic ssh tunnel utilities, and convenience functions for tunneling
zeromq connections.
Authors
-------
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full... |
train.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import datetime
import json
import random
import multiprocessing
import sys
import threading
import time
import imp
import re
import os
import sqlite3
import numpy as np
from PIL import Image
import six
import six.moves.cPickle as pickle
from six.moves impo... |
mdx_server.py | # -*- coding: utf-8 -*-
# version: python 3.5
import logging as log
import threading
from urllib.parse import parse_qs
from wsgiref.simple_server import make_server, WSGIRequestHandler
import es
from mdict_query import IndexBuilder
from mdx_util import *
CONTENT_TYPE_MAP = {
'html': 'text/html; charset=utf-8',
... |
multiprocessing_pipe.py | # coding: utf-8
import os
import random
from multiprocessing import Process, Pipe
def producer_task(conn):
value = random.randint(1, 10)
conn.send(value)
print('Value [%d] sent by PID [%d]' % (value, os.getpid()))
conn.close()
def consumer_task(conn):
print('Value [%d] received by PID [%d]' % (c... |
escp.py | #!/usr/bin/python3
import os, sys, stat
import subprocess
import traceback
import pprint
import curses
import signal
import secrets
import base64
import shlex
import signal
import select
import socket
import argparse
try:
import argcomplete
except:
pass
import configparser
import threading
import queue
import... |
main.py | """
Copied and moidified from here:
https://github.com/Lux-AI-Challenge/Lux-Design-2021/blob/master/kits/cpp/simple/main.py
In a kaggle-environment submission, main.py is loaded into memory and the last function is
searched for. The last function is expected to have args (observation, configuration). Here
we wrap our s... |
android_data_analyzer_file_history.py | import os
import logging
from modules.andForensics.modules.utils.android_sqlite3 import SQLite3
from modules.andForensics.modules.analyzer.android_data_analyzer_utils import AnalyzerUtils
from multiprocessing import Process, Queue, Lock
import math
logger = logging.getLogger('andForensics')
#ANALYSIS_EXCEPTION_CALL_HI... |
custom_thread.py | # -*- coding:utf-8 -*-
# @Time : 2020/04/12 上午12:00
# @Author : ydf
"""
可自动实时调节线程数量的线程池。
不仅能扩大,还可缩小
"""
import atexit
import queue
import threading
import weakref
import time
from py_log import get_logger
_shutdown = False
_threads_queues = weakref.WeakKeyDictionary()
logger = get_logger(__name__)
def _python... |
music.py | import os
import threading
import time
import tkinter.messagebox
from tkinter import *
import tkinter as tk
from tkinter import filedialog
from tkinter import ttk
from ttkthemes import themed_tk as tk
from mutagen.mp3 import MP3
from pygame import mixer
screen = tk.ThemedTk()
screen.get_themes()
scr... |
demoOEMCM.py | # part of the demo. Run with demoCH and multiple instances of demoCarCM
import CM
import time, socketserver, os
from common import consts,utils,cryptostuff,packers
from simplehttp import simpleServer
from threading import Thread
# The role of the OEM in the demo is to prepare a message and send it to the CH before ser... |
worker.py | from contextlib import contextmanager
import colorama
import atexit
import faulthandler
import hashlib
import inspect
import io
import json
import logging
import os
import redis
import sys
import threading
import time
import traceback
from typing import Any, Dict, List, Iterator
# Ray modules
from ray.autoscaler._priv... |
site_list.py | """Sherlock: Supported Site Listing
This module generates the listing of supported sites.
"""
import json
import sys
import requests
import threading
import xml.etree.ElementTree as ET
from datetime import datetime
from argparse import ArgumentParser, RawDescriptionHelpFormatter
pool = list()
def get_rank(domain_to_q... |
random-server.py | #!/usr/bin/python
import shlex
import subprocess
from threading import Thread
import time
import web
urls = (
'/', 'help',
'/get', 'GetRandomData',
# '/reg', 'Register',
'/status', 'GetPoolStatus'
)
RESPONSE_SIZE=8192
MIN_POOL_SIZE=1 # in MB
MAX_POOL_SIZE=32 # in MB
class help:
def GET(self):
... |
loader.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright (c) 2013 Qin Xuye <qin@qinxuye.me>
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... |
test_httplib.py | import errno
from http import client, HTTPStatus
import io
import itertools
import os
import array
import re
import socket
import threading
import warnings
import unittest
TestCase = unittest.TestCase
from test import support
from test.support import os_helper
here = os.path.dirname(__file__)
# Self-signed cert file... |
stimulus.py | import abc
import atexit
import multiprocessing
import os
import signal
import sys
import time
from threading import Timer
from box import wiring
_LIGHT_PWM_PIN = 18 # pin for PWM control of visible light bar
_ELECTRIC_STIM_PIN = 25 # pin for enabling/disabling the electric current stimulation
_ELECTRIC_... |
ASUTimeTableTgBot.py | import requests, re, hashlib, time as ttime, datetime, threading, json, logging
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from xlutils.copy import copy
from xlrd import open_workbook
from bs4 import BeautifulSoup
#logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - ... |
future_mode_cluster_test.py | # Copyright (c) 2018 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... |
flexbe_onboard.py | #!/usr/bin/env python
import rclpy
from rclpy.exceptions import ParameterNotDeclaredException
from rclpy.node import Node
import os
import sys
import inspect
import tempfile
import threading
import time
import zlib
import contextlib
from ast import literal_eval as cast
from flexbe_core import BehaviorLibrary, Logger
f... |
fsd-threaded.py | # ez a jo :)
from modules import server
from modules import messages
import socket
import time
import threading
import sys, os, traceback, types
import select
from random import randint
TCP_IP = '88.151.99.237'
TCP_PORT = 6809
BUFFER_SIZE = 1024
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(... |
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
---------------------------------
"""
from __future__ impor... |
histogram.py | ## 영상 처## 영상 처리 및 데이터 분석 툴
from tkinter import *; import os.path ;import math
from tkinter.filedialog import *
from tkinter.simpledialog import *
## 함수 선언부
def loadImage(fname) :
global window, canvas, paper, filename, inImage, outImage, inW, inH, outW, outH
fsize = os.path.getsize(fname) # 파일 크기 확인
inH =... |
vivarium_ctrl.py | #!/usr/bin/python3
#
# vivarium_ctrl
#
# Copyright (c) 2020 Daniel Dean <dd@danieldean.uk>.
#
# Licensed under The MIT License a copy of which you should have
# received. If not, see:
#
# http://opensource.org/licenses/MIT
#
import adafruit_bme280
import sqlite3
import datetime
import board
import busio
import ... |
ppcommon.py | # Parallel Python Software: http://www.parallelpython.com
# Copyright (c) 2005-2012, Vitalii Vanovschi
# 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 reta... |
test_browser.py | # coding=utf-8
# Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
from __future__ import print_function
import argparse
... |
op_callbacks_test.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
mixins.py | # -*- coding: utf-8 -*-
'''
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
=============
Class Mix-Ins
=============
Some reusable class Mixins
'''
# pylint: disable=repr-flag-used-in-string
# Import python libs
from __future__ import absolute_import, print_function
import os
import sys
import t... |
packages_analyzer.py | #!/usr/bin/env python
"""
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")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.