コード例 #1
0
def main(shapeStringArray,board):
    start = time.time()
    colorInit()
    shapes = initShapes(shapeStringArray)
    potentialspots = findPotentialSpots(shapes,board)
    solutions = []
    validateSolutionsRecursive([], potentialspots, board.allOpenings,solutions)
    newsols = filterDuplicates(solutions,shapes)
    printSolutions(newsols,shapes,board)
    print(time.time()-start)
コード例 #2
0
ファイル: ShotParser.py プロジェクト: boldstelvis/ShotParser
                        FileTransferSpeed, FormatLabel, Percentage, \
                        ProgressBar, ReverseBar, RotatingMarker, \
                        SimpleProgress, Timer

#set some login credentials for shotgun
shotgun_url = "https://yourstudio.shotgunstudio.com";
app_name = "yourAppName";
app_key = "yourAppKey";

try:
   from settings import *
except ImportError:
   pass

pp = pprint.PrettyPrinter(indent=4)
colorInit(autoreset=True) #init colorama


#drag and drop input file
XMLFiles = []
#XMLFiles.append("")
#XMLFiles.append("EA1_SC19X.xml")
for arg in sys.argv: 
    XMLFiles.append(arg)

print "Processing batch file: "+XMLFiles[1]

try:
	
	tree = ET.parse(XMLFiles[1])
コード例 #3
0
ファイル: View.py プロジェクト: Wizsmiles/TFG_UCM
 def show(nodo):
     colorInit()
     TreeView.recursiveShow(nodo, 0)
コード例 #4
0
ファイル: main.py プロジェクト: xuanxiaomai/coolQPythonBot
from time import time

from colorama import init as colorInit

from utils.exception import ExceptionProcess

colorInit()

COPYRIGHT = ("\033[0;37;1m" + r"""
                     _  _____ ______         _    _                   ______         _
                    | ||  _  || ___ \       | |  | |                  | ___ \       | |
  ___   ___    ___  | || | | || |_/ / _   _ | |_ | |__    ___   _ __  | |_/ /  ___  | |_
 / __| / _ \  / _ \ | || | | ||  __/ | | | || __|| '_ \  / _ \ | '_ \ | ___ \ / _ \ | __|
| (__ | (_) || (_) || |\ \/' /| |    | |_| || |_ | | | || (_) || | | || |_/ /| (_) || |_
 \___| \___/  \___/ |_| \_/\_\\_|     \__, | \__||_| |_| \___/ |_| |_|\____/  \___/  \__|
                                       __/ |
                                      |___/

Copyright © 2019-2020 mnixry,All Rights Reserved
Project: https://github.com/mnixry/coolQPythonBot
=================================================""" + "\033[0m")

if __name__ == "__main__":
    print(COPYRIGHT)
    import nonebot
    from app import initApp

    app = initApp()
    startTime = time()
    try:
        nonebot.run(use_reloader=False)
コード例 #5
0
global oauth
import socket  # connect to twitch

Running = True  #im getting better at using less global varialbes, I still need this one tho
sock = socket.socket()  #and this one
import time
import colorama
from multiprocessing import Process
import os
from colorama import Fore, Style
from colorama import init as colorInit
from names import *  # your twitch login

time.sleep(0.2)

colorInit(convert=True)


class Chat():
    def __init__(self, channel):
        self.channel = channel

    def connectToChat(self):  # Connects to the chat
        sock.connect(('irc.chat.twitch.tv', 6667))
        time.sleep(0.1)
        sock.send(f'PASS {oauth}\n'.encode('utf-8'))
        time.sleep(0.1)
        sock.send(f'NICK {user}\n'.encode('utf-8'))
        time.sleep(0.1)
        sock.send(f'JOIN #{self.channel}\n'.encode('utf-8'))
        resp = sock.recv(2048).decode('utf-8')