From f54d849d79945496e7998d0e3580fb43184006ab Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 12 Sep 2015 15:12:44 -0400 Subject: Added option to choose platform manually --- AutoVideosLive.py | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/AutoVideosLive.py b/AutoVideosLive.py index a402dc6..e617291 100644 --- a/AutoVideosLive.py +++ b/AutoVideosLive.py @@ -1,10 +1,27 @@ import GPU + +#GPU.platform_id = -1 #Uncomment this line to manually choose what device to use + + import random import numpy as np import time -#GPU.platform_id = -1 #Uncomment this line to choose what device to use -# (otherwise it will pick automatically) + +try: + import Tkinter as tk +except: + import tkinter as tk + + +try: + import ImageTk + import Image +except: + from PIL import ImageTk + from PIL import Image + + single = ['cos', 'sin'] #Operations on a single number binary = ['*', '+', '-'] #Operations for 2 numbers @@ -58,18 +75,6 @@ def randFunction(length, singleweight, numberweight): function += ')' * (function.count('(') - function.count(')')) return function -try: - import Tkinter as tk -except: - import tkinter as tk - - -try: - import ImageTk - import Image -except: - from PIL import ImageTk - from PIL import Image gpu = GPU.GPU() -- cgit v1.2.3