-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
431 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
|
||
class colors: | ||
TITLE = '\033[35m' | ||
MIDTEXT ='\033[32m' | ||
QUESTIONS = '\033[94m' | ||
C_PLAYER1 = '\033[96m' | ||
C_PLAYER2 = '\033[91m' | ||
C_PLAYER2 = '\033[35m' | ||
NEUTRAL = '\033[93m' | ||
ENDC = '\033[0m' | ||
BOLD = '\033[1m' | ||
UNDERLINE = '\033[4m' | ||
UNDERLINE = '\033[4m' | ||
WARNING = '\033[31m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from textwrap import wrap | ||
from Projects.base.util.colors import colors | ||
|
||
def_width = 50 | ||
|
||
def wrap_it(s, clr, w=def_width, end='\n'): | ||
for i in wrap(s, w): | ||
print(clr + i, end=end) | ||
|
||
def question_cont(s, f=str): | ||
while True: | ||
try: | ||
wrap_it(s, colors.QUESTIONS, end=' '); | ||
val = f(input().strip()) | ||
break | ||
except KeyboardInterrupt: | ||
exit() | ||
except: | ||
wrap_it('The input is invalid.', colors.WARNING) | ||
return val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# loads pickle data on given path | ||
|
||
import argparse | ||
from Projects.pONE.user_tools.play import play_pONE | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--in_file", "-if", type=str, | ||
help="File path to load the results from") | ||
args = parser.parse_args() | ||
|
||
play_pONE(args.in_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
''' | ||
Sample runner for PONE. | ||
''' | ||
import argparse | ||
from Projects.pONE.user_tools.trainer import train_pONE | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--num_of_rows", "-nr", default=3, type=int, | ||
help="Number of rows on the board.") | ||
parser.add_argument("--num_of_cols", "-nc", default=3, type=int, | ||
help="Number of columns on the board.") | ||
parser.add_argument("--out_file", "-f", default="default_file", type=str, | ||
help="File path to save the resulting list on. Please do not add any extension to file.\ | ||
here is an example usage:\n\t'filepath/filename'") | ||
args = parser.parse_args() | ||
|
||
train_pONE(args.out_file, args.num_of_rows, args.num_of_cols) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.