summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <leonardomtenenbaum@gmail.com>2015-09-12 15:12:44 -0400
committerpommicket <leonardomtenenbaum@gmail.com>2015-09-12 15:12:44 -0400
commitf54d849d79945496e7998d0e3580fb43184006ab (patch)
treed80f2b3528d2c9558a1776c0fde27fceab3503ec
parentc8ed51494c2a83987227fadcda60ce5f27c6ccc5 (diff)
Added option to choose platform manually
-rw-r--r--AutoVideosLive.py33
1 files 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()