From 917b55d4637e6de70288bc4a9709af72aa44e970 Mon Sep 17 00:00:00 2001 From: Biryuzovye Kleshni Date: Sat, 23 Jun 2018 11:00:24 +0000 Subject: [PATCH] Sorted imports --- src/workprover/__init__.py | 14 +++++++------- src/workprover/dumbsolver.py | 2 +- src/workprover/fastsolver.py | 4 ++-- src/workprover/forkingsolver.py | 2 +- src/workprover/gpusolver.py | 4 ++-- src/workprover/test.py | 10 +++++----- src/workprover/utils.py | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/workprover/__init__.py b/src/workprover/__init__.py index 2394af8f..68e9fba6 100644 --- a/src/workprover/__init__.py +++ b/src/workprover/__init__.py @@ -1,16 +1,16 @@ -import sys -import multiprocessing -import time -import struct -import threading import Queue import collections +import multiprocessing +import struct +import sys +import threading +import time -import utils import dumbsolver -import forkingsolver import fastsolver +import forkingsolver import gpusolver +import utils timeout = .5 diff --git a/src/workprover/dumbsolver.py b/src/workprover/dumbsolver.py index f3c974cb..094ecf27 100644 --- a/src/workprover/dumbsolver.py +++ b/src/workprover/dumbsolver.py @@ -1,6 +1,6 @@ import ctypes -import struct import hashlib +import struct import utils diff --git a/src/workprover/fastsolver.py b/src/workprover/fastsolver.py index 2c48ffa9..b845e032 100644 --- a/src/workprover/fastsolver.py +++ b/src/workprover/fastsolver.py @@ -1,8 +1,8 @@ -import sys +import ctypes import os.path import platform import subprocess -import ctypes +import sys class FastSolverError(Exception): pass diff --git a/src/workprover/forkingsolver.py b/src/workprover/forkingsolver.py index b31d2b15..488295c8 100644 --- a/src/workprover/forkingsolver.py +++ b/src/workprover/forkingsolver.py @@ -1,5 +1,5 @@ -import os import multiprocessing +import os import struct import dumbsolver diff --git a/src/workprover/gpusolver.py b/src/workprover/gpusolver.py index ce258099..8d1cd9a9 100644 --- a/src/workprover/gpusolver.py +++ b/src/workprover/gpusolver.py @@ -1,6 +1,6 @@ import hashlib -import struct import os.path +import struct import utils @@ -15,8 +15,8 @@ class GPUSolver(object): global pyopencl, numpy try: - import pyopencl import numpy + import pyopencl except ImportError: raise GPUSolverError() diff --git a/src/workprover/test.py b/src/workprover/test.py index c27ca38c..61a6e59d 100755 --- a/src/workprover/test.py +++ b/src/workprover/test.py @@ -1,19 +1,19 @@ #!/usr/bin/env python2.7 -import unittest -import os.path import binascii -import struct import ctypes import ctypes.util +import os.path +import struct import sys +import unittest import __init__ -import utils import dumbsolver -import forkingsolver import fastsolver +import forkingsolver import gpusolver +import utils codePath = os.path.dirname(__file__) diff --git a/src/workprover/utils.py b/src/workprover/utils.py index 696181cb..012a5033 100644 --- a/src/workprover/utils.py +++ b/src/workprover/utils.py @@ -1,9 +1,9 @@ import hashlib -import struct -import time import math -import sys import os +import struct +import sys +import time def calculateInitialHash(initialPayload): return hashlib.sha512(initialPayload).digest()