From 808ab8822728c36153886569ec4a90f848c85efa Mon Sep 17 00:00:00 2001 From: Teddy Sudol Date: Sun, 22 Jan 2012 20:04:59 -0500 Subject: [PATCH 1/5] Revert "Revert "Heavy updates to README and commands.py. The program is bare-"" This reverts commit 5225c8e3d5c2741b86989336fff7561615bac176. DOUBLE REVERSION. Should just amend last one, eh? 1. Updated format and layout of PyChecklist 2. Renamed CheckList to PyChecklist for clarity. 3. Updated print statements with parenthesis's 3. Monkey patched an import statement and it works. --- README | 3 --- README.md | 18 ++++++++++++++++++ checkBuilder.py | 7 ++++--- commands.py | 27 +++++++++++++++++++-------- driver.py | 45 +++++++++++++++++++++++++++------------------ 5 files changed, 68 insertions(+), 32 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index 3a67110..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -A CheckList program in Python/GTK, using YAML for storage. Aimed at non-mobile users. - -This program will have three components: The checklist engine, a GUI version, and a command line utility. The GUI and the CL will both use the engine as their underlying method of performance and will read the same files. The actual checklists will be stored in YAML files for readability. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c02809f --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# PyChecklist +## Its the final CheckList +### A 'written in python for python' program in Python/GTK, using YAML for storage. Aimed at non-mobile users. + + +## This program will have three components: +1. The checklist engine +2. Graphical User Interface (GUI) version +3. Command Line Utility (CLU) + +The GUI and the CL will both use the engine as their underlying method of performance and will read the same files. The actual checklists will be stored in YAML files for readability. + + +## Update +1. Updated format and layout of PyChecklist +2. Renamed CheckList to PyChecklist for clarity. +3. Updated print statements with parenthesis's +3. Monkey patched an import statement and it works. \ No newline at end of file diff --git a/checkBuilder.py b/checkBuilder.py index 23dbd6f..1b729f2 100644 --- a/checkBuilder.py +++ b/checkBuilder.py @@ -25,14 +25,15 @@ def information(self): 'A formatted description of this item' return checkItem.template.format(self.title, self.created, self.due, self.priority, self.description) - + + class checkList(object): 'A list of tasks that need to be completed' def __init__(self, *items): self.items = [] #the list of checklist items if len(items) == 1: temp = items[0] - print temp + print(temp) elif len(items) > 0: for i in items: - print i + print(i) diff --git a/commands.py b/commands.py index 1c583d6..dc4e885 100644 --- a/commands.py +++ b/commands.py @@ -47,6 +47,7 @@ """ curList = [] #the current check list + def newCheckList(name='NewList'): """ Returns a new, empty checklist. @@ -59,7 +60,8 @@ def newCheckList(name='NewList'): new -- creates a new list called "NewList" """ return checkBuilder.checkList() - + + def loadCheckList(fp): """ Loads a checklist from a YAML file. @@ -76,11 +78,12 @@ def loadCheckList(fp): load tuesday -- sets "tuesday" as current list """ if exists(fp): - print "Will now load file---filename or filepath!" + print("Will now load file---filename or filepath!") else: - print "Now we would check for a checklist of the same name as file" + print("Now we would check for a checklist of the same name as file") return exists(fp) - + + def saveCheckList(): """ Saves a checklist in a YAML file. @@ -93,7 +96,8 @@ def saveCheckList(): save -- saves the current list """ return "It would be saved in the YAML format in a file nearby" - + + def addItem(item, clist=current, idx=0): """ Adds a new task to a checklist. @@ -112,7 +116,8 @@ def addItem(item, clist=current, idx=0): add newItem tuesday 5 -- adds the newItem to "tuesday" at index 5 """ return "Item appended!" - + + def remove(idx=0, clist=current): """ Removes the item at index i from the given checklist. @@ -131,6 +136,7 @@ def remove(idx=0, clist=current): """ return "Deletes items or a checklist!" + def clean(target="*all", clist=current): """ Removes overdue and completed items from a checklist. @@ -156,6 +162,7 @@ def clean(target="*all", clist=current): clean *old tuesday --removes overdue items from the list 'tuesday' """ + def listItems(clist=current): """ Displays the checklist in a well-formatted YAML list. @@ -165,7 +172,8 @@ def listItems(clist=current): - what do?? """ return "The well-formatted items would be displayed here" - + + def getInfo(idx=0, clist=current): """ Displays information about a given item or list. @@ -183,13 +191,15 @@ def getInfo(idx=0, clist=current): """ return "The item information is selected by index" + def editItem(idx): """ Edits the item at index i of the current list. NOT IMPLEMENTED. """ return "An interactive editing mode would start" - + + def nextDue(clist=current): """ Displays the information of the item that is due soonest. @@ -208,6 +218,7 @@ def nextDue(clist=current): """ return "The next item can be really useful!" + def showHelp(topic=False): """ Displays the help docs for a specific command or just everything! diff --git a/driver.py b/driver.py index 0e5bac3..979f03c 100644 --- a/driver.py +++ b/driver.py @@ -21,22 +21,28 @@ # VERSION = '0.1' import argparse -import commands +# import commands #Create the arg parser for command line argument parsing parser = argparse.ArgumentParser(description="An interactive checklist" - ,epilog=("--new and --load are mutually exclusive."+ - "FILE may be either a filename, a filepath, or a list's name.")) + ,epilog=("--new and --load are mutually exclusive."+ + "FILE may be either a filename, a filepath, or a list's name.")) parser.add_argument('-v','--version', action="version" - ,version="%(prog)s " + str(VERSION)) + ,version="%(prog)s " + str(VERSION)) megroup = parser.add_mutually_exclusive_group() megroup.add_argument('-n','--new', action='store_true' - ,help='start with an empty checklist') + ,help='start with an empty checklist') megroup.add_argument('-l','--load',help='start with the list in LIST' - ,metavar="LIST") - + ,metavar="LIST") + def doComm(c, args): + """ + + :param c: + :param args: + :return: + """ #we already know c is a valid command! if c == "new" and len(args) <= 1: return commands.newCheckList(*args) @@ -65,10 +71,13 @@ def doComm(c, args): else: return (("Invalid syntax of command '%s'" % c) + "\nwith args "+repr(args)) - - + def main(): + """ + + :return: + """ args = parser.parse_args() if args.load: print("We would load the file, then run the interpreter.") @@ -76,28 +85,28 @@ def main(): print("We'd say there's a new checklist, then run interpreter") else: print("No args - We'd start the interpreter right away!") - print "\nWelcome to the interactive checklist" - print "Enter commands at the interpreter below. 'help' for help!" + print("\nWelcome to the interactive checklist") + print("Enter commands at the interpreter below. 'help' for help!") done = False while not done: - s = raw_input("-> ") + s = input("-> ") s = s.split() if s == []: - print "Please enter a command, silly!" + print("Please enter a command, silly!") elif s[0] == "version": - print + print() elif s[0] == "exit": - print "Thank you for using this program!" + print("Thank you for using this program!") done = True elif s[0] in commands.commands: #the first part should always be the command, so the #rest of the list will be args for the functions that need #them. The function needs to split up the args itself. - print doComm(s[0], s[1:]) + print(doComm(s[0], s[1:])) elif s[0] in commands.commands.values(): - print "Please use the alias for '%s'" % s[0] + print("Please use the alias for '%s'" % s[0]) else: - print "%s is not a command!" % " ".join(s) + print("%s is not a command!" % " ".join(s)) return 0 if __name__ == '__main__': From c76db0d2c18bc320382fc5e18f99f645b62227d5 Mon Sep 17 00:00:00 2001 From: Teddy Sudol Date: Sun, 22 Jan 2012 20:04:59 -0500 Subject: [PATCH 2/5] updated to blackconnect linting... looks way more readable. --- driver.py | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/driver.py b/driver.py index 979f03c..0e5bac3 100644 --- a/driver.py +++ b/driver.py @@ -21,28 +21,22 @@ # VERSION = '0.1' import argparse -# import commands +import commands #Create the arg parser for command line argument parsing parser = argparse.ArgumentParser(description="An interactive checklist" - ,epilog=("--new and --load are mutually exclusive."+ - "FILE may be either a filename, a filepath, or a list's name.")) + ,epilog=("--new and --load are mutually exclusive."+ + "FILE may be either a filename, a filepath, or a list's name.")) parser.add_argument('-v','--version', action="version" - ,version="%(prog)s " + str(VERSION)) + ,version="%(prog)s " + str(VERSION)) megroup = parser.add_mutually_exclusive_group() megroup.add_argument('-n','--new', action='store_true' - ,help='start with an empty checklist') + ,help='start with an empty checklist') megroup.add_argument('-l','--load',help='start with the list in LIST' - ,metavar="LIST") - + ,metavar="LIST") + def doComm(c, args): - """ - - :param c: - :param args: - :return: - """ #we already know c is a valid command! if c == "new" and len(args) <= 1: return commands.newCheckList(*args) @@ -71,13 +65,10 @@ def doComm(c, args): else: return (("Invalid syntax of command '%s'" % c) + "\nwith args "+repr(args)) - + + def main(): - """ - - :return: - """ args = parser.parse_args() if args.load: print("We would load the file, then run the interpreter.") @@ -85,28 +76,28 @@ def main(): print("We'd say there's a new checklist, then run interpreter") else: print("No args - We'd start the interpreter right away!") - print("\nWelcome to the interactive checklist") - print("Enter commands at the interpreter below. 'help' for help!") + print "\nWelcome to the interactive checklist" + print "Enter commands at the interpreter below. 'help' for help!" done = False while not done: - s = input("-> ") + s = raw_input("-> ") s = s.split() if s == []: - print("Please enter a command, silly!") + print "Please enter a command, silly!" elif s[0] == "version": - print() + print elif s[0] == "exit": - print("Thank you for using this program!") + print "Thank you for using this program!" done = True elif s[0] in commands.commands: #the first part should always be the command, so the #rest of the list will be args for the functions that need #them. The function needs to split up the args itself. - print(doComm(s[0], s[1:])) + print doComm(s[0], s[1:]) elif s[0] in commands.commands.values(): - print("Please use the alias for '%s'" % s[0]) + print "Please use the alias for '%s'" % s[0] else: - print("%s is not a command!" % " ".join(s)) + print "%s is not a command!" % " ".join(s) return 0 if __name__ == '__main__': From 8d97e0550af70fffa186edcf1b56f88906c40e97 Mon Sep 17 00:00:00 2001 From: Teddy Sudol Date: Sun, 22 Jan 2012 20:04:59 -0500 Subject: [PATCH 3/5] updated code to 3.8 python, added data/ test folders --- commands.py | 2 +- driver.py | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/commands.py b/commands.py index dc4e885..b11d937 100644 --- a/commands.py +++ b/commands.py @@ -261,7 +261,7 @@ def showHelp(topic=False): } commList = commands.keys() -commList.sort() +commList.sort(commands) #Splits the list in half: [1,2,3,4,5] ==> [1,2] [3,4,5] a = commList[:len(commList)/2+1] b = commList[len(commList)/2+1:] diff --git a/driver.py b/driver.py index 979f03c..3f337a5 100644 --- a/driver.py +++ b/driver.py @@ -21,28 +21,22 @@ # VERSION = '0.1' import argparse -# import commands +import commands #Create the arg parser for command line argument parsing parser = argparse.ArgumentParser(description="An interactive checklist" - ,epilog=("--new and --load are mutually exclusive."+ - "FILE may be either a filename, a filepath, or a list's name.")) + ,epilog=("--new and --load are mutually exclusive."+ + "FILE may be either a filename, a filepath, or a list's name.")) parser.add_argument('-v','--version', action="version" - ,version="%(prog)s " + str(VERSION)) + ,version="%(prog)s " + str(VERSION)) megroup = parser.add_mutually_exclusive_group() megroup.add_argument('-n','--new', action='store_true' - ,help='start with an empty checklist') + ,help='start with an empty checklist') megroup.add_argument('-l','--load',help='start with the list in LIST' - ,metavar="LIST") - + ,metavar="LIST") + def doComm(c, args): - """ - - :param c: - :param args: - :return: - """ #we already know c is a valid command! if c == "new" and len(args) <= 1: return commands.newCheckList(*args) @@ -74,10 +68,6 @@ def doComm(c, args): def main(): - """ - - :return: - """ args = parser.parse_args() if args.load: print("We would load the file, then run the interpreter.") From 434fd2e96f156861dbbfe0dff803bfc8d963878f Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 26 Jan 2024 14:55:52 -0800 Subject: [PATCH 4/5] Merge remote-tracking branch 'origin/master' --- test_commands.ipynb | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/test_commands.ipynb b/test_commands.ipynb index 60f4415..2993670 100644 --- a/test_commands.ipynb +++ b/test_commands.ipynb @@ -2,13 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": 78, + "execution_count": 96, "id": "initial_id", "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2024-01-26T22:53:10.185184Z", - "start_time": "2024-01-26T22:53:10.166789Z" + "end_time": "2024-01-26T22:55:37.137607Z", + "start_time": "2024-01-26T22:55:37.098507Z" } }, "outputs": [], @@ -35,12 +35,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.470446Z", - "start_time": "2024-01-26T22:53:10.191013Z" + "end_time": "2024-01-26T22:55:38.829678Z", + "start_time": "2024-01-26T22:55:37.108371Z" } }, "id": "c3f646f72d169800", - "execution_count": 79 + "execution_count": 97 }, { "cell_type": "code", @@ -51,12 +51,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.481785Z", - "start_time": "2024-01-26T22:53:12.473377Z" + "end_time": "2024-01-26T22:55:38.838973Z", + "start_time": "2024-01-26T22:55:38.833063Z" } }, "id": "5ddf1354c47f2742", - "execution_count": 80 + "execution_count": 98 }, { "cell_type": "code", @@ -330,21 +330,21 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.502845Z", - "start_time": "2024-01-26T22:53:12.494180Z" + "end_time": "2024-01-26T22:55:38.868021Z", + "start_time": "2024-01-26T22:55:38.840235Z" } }, "id": "6a623428372f6bac", - "execution_count": 81 + "execution_count": 99 }, { "cell_type": "code", "outputs": [ { "data": { - "text/plain": "" + "text/plain": "" }, - "execution_count": 82, + "execution_count": 100, "metadata": {}, "output_type": "execute_result" } @@ -356,12 +356,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.518905Z", - "start_time": "2024-01-26T22:53:12.504465Z" + "end_time": "2024-01-26T22:55:38.880471Z", + "start_time": "2024-01-26T22:55:38.866981Z" } }, "id": "649cb7a8b21bb691", - "execution_count": 82 + "execution_count": 100 }, { "cell_type": "code", @@ -381,12 +381,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.553258Z", - "start_time": "2024-01-26T22:53:12.513672Z" + "end_time": "2024-01-26T22:55:38.881502Z", + "start_time": "2024-01-26T22:55:38.874697Z" } }, "id": "96b8c15709e51ada", - "execution_count": 83 + "execution_count": 101 }, { "cell_type": "code", @@ -397,12 +397,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.553867Z", - "start_time": "2024-01-26T22:53:12.523310Z" + "end_time": "2024-01-26T22:55:38.890712Z", + "start_time": "2024-01-26T22:55:38.881710Z" } }, "id": "1e5ea8b8c4cec5e1", - "execution_count": 84 + "execution_count": 102 }, { "cell_type": "code", @@ -432,12 +432,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.555261Z", - "start_time": "2024-01-26T22:53:12.529655Z" + "end_time": "2024-01-26T22:55:38.924575Z", + "start_time": "2024-01-26T22:55:38.887392Z" } }, "id": "8f06f57f85905351", - "execution_count": 85 + "execution_count": 103 }, { "cell_type": "code", @@ -449,7 +449,7 @@ "traceback": [ "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", "\u001B[0;31mTypeError\u001B[0m Traceback (most recent call last)", - "Cell \u001B[0;32mIn[86], line 4\u001B[0m\n\u001B[1;32m 1\u001B[0m commList \u001B[38;5;241m=\u001B[39m \u001B[38;5;28msorted\u001B[39m(commands\u001B[38;5;241m.\u001B[39mkeys()) \n\u001B[1;32m 2\u001B[0m \u001B[38;5;66;03m# commList.sorted(commList)\u001B[39;00m\n\u001B[1;32m 3\u001B[0m \u001B[38;5;66;03m#Splits the list in half: [1,2,3,4,5] ==> [1,2] [3,4,5]\u001B[39;00m\n\u001B[0;32m----> 4\u001B[0m a \u001B[38;5;241m=\u001B[39m \u001B[43mcommList\u001B[49m\u001B[43m[\u001B[49m\u001B[43m:\u001B[49m\u001B[38;5;28;43mlen\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43mcommList\u001B[49m\u001B[43m)\u001B[49m\u001B[38;5;241;43m/\u001B[39;49m\u001B[38;5;241;43m2\u001B[39;49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m]\u001B[49m\n\u001B[1;32m 5\u001B[0m b \u001B[38;5;241m=\u001B[39m commList[\u001B[38;5;28mlen\u001B[39m(commList)\u001B[38;5;241m/\u001B[39m\u001B[38;5;241m2\u001B[39m\u001B[38;5;241m+\u001B[39m\u001B[38;5;241m1\u001B[39m:]\n", + "Cell \u001B[0;32mIn[104], line 4\u001B[0m\n\u001B[1;32m 1\u001B[0m commList \u001B[38;5;241m=\u001B[39m \u001B[38;5;28msorted\u001B[39m(commands\u001B[38;5;241m.\u001B[39mkeys()) \n\u001B[1;32m 2\u001B[0m \u001B[38;5;66;03m# commList.sorted(commList)\u001B[39;00m\n\u001B[1;32m 3\u001B[0m \u001B[38;5;66;03m#Splits the list in half: [1,2,3,4,5] ==> [1,2] [3,4,5]\u001B[39;00m\n\u001B[0;32m----> 4\u001B[0m a \u001B[38;5;241m=\u001B[39m \u001B[43mcommList\u001B[49m\u001B[43m[\u001B[49m\u001B[43m:\u001B[49m\u001B[38;5;28;43mlen\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43mcommList\u001B[49m\u001B[43m)\u001B[49m\u001B[38;5;241;43m/\u001B[39;49m\u001B[38;5;241;43m2\u001B[39;49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m]\u001B[49m\n\u001B[1;32m 5\u001B[0m b \u001B[38;5;241m=\u001B[39m commList[\u001B[38;5;28mlen\u001B[39m(commList)\u001B[38;5;241m/\u001B[39m\u001B[38;5;241m2\u001B[39m\u001B[38;5;241m+\u001B[39m\u001B[38;5;241m1\u001B[39m:]\n", "\u001B[0;31mTypeError\u001B[0m: slice indices must be integers or None or have an __index__ method" ] } @@ -464,12 +464,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.602375Z", - "start_time": "2024-01-26T22:53:12.545028Z" + "end_time": "2024-01-26T22:55:38.984438Z", + "start_time": "2024-01-26T22:55:38.905832Z" } }, "id": "63ea9891464bf093", - "execution_count": 86 + "execution_count": 104 }, { "cell_type": "code", @@ -482,7 +482,7 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "start_time": "2024-01-26T22:53:12.572770Z" + "start_time": "2024-01-26T22:55:38.947928Z" } }, "id": "96989163f8eb8335" @@ -494,7 +494,7 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "start_time": "2024-01-26T22:53:12.576490Z" + "start_time": "2024-01-26T22:55:38.951277Z" } }, "id": "aa1cf58ecc39a045" @@ -521,7 +521,7 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "start_time": "2024-01-26T22:53:12.579983Z" + "start_time": "2024-01-26T22:55:38.953709Z" } }, "id": "208054299514c7c6" From 25a1da1e704a4b9619ea625010d7de247f330232 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 26 Jan 2024 14:55:52 -0800 Subject: [PATCH 5/5] Merge remote-tracking branch 'origin/master' --- test_commands.ipynb | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/test_commands.ipynb b/test_commands.ipynb index 60f4415..2993670 100644 --- a/test_commands.ipynb +++ b/test_commands.ipynb @@ -2,13 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": 78, + "execution_count": 96, "id": "initial_id", "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2024-01-26T22:53:10.185184Z", - "start_time": "2024-01-26T22:53:10.166789Z" + "end_time": "2024-01-26T22:55:37.137607Z", + "start_time": "2024-01-26T22:55:37.098507Z" } }, "outputs": [], @@ -35,12 +35,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.470446Z", - "start_time": "2024-01-26T22:53:10.191013Z" + "end_time": "2024-01-26T22:55:38.829678Z", + "start_time": "2024-01-26T22:55:37.108371Z" } }, "id": "c3f646f72d169800", - "execution_count": 79 + "execution_count": 97 }, { "cell_type": "code", @@ -51,12 +51,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.481785Z", - "start_time": "2024-01-26T22:53:12.473377Z" + "end_time": "2024-01-26T22:55:38.838973Z", + "start_time": "2024-01-26T22:55:38.833063Z" } }, "id": "5ddf1354c47f2742", - "execution_count": 80 + "execution_count": 98 }, { "cell_type": "code", @@ -330,21 +330,21 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.502845Z", - "start_time": "2024-01-26T22:53:12.494180Z" + "end_time": "2024-01-26T22:55:38.868021Z", + "start_time": "2024-01-26T22:55:38.840235Z" } }, "id": "6a623428372f6bac", - "execution_count": 81 + "execution_count": 99 }, { "cell_type": "code", "outputs": [ { "data": { - "text/plain": "" + "text/plain": "" }, - "execution_count": 82, + "execution_count": 100, "metadata": {}, "output_type": "execute_result" } @@ -356,12 +356,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.518905Z", - "start_time": "2024-01-26T22:53:12.504465Z" + "end_time": "2024-01-26T22:55:38.880471Z", + "start_time": "2024-01-26T22:55:38.866981Z" } }, "id": "649cb7a8b21bb691", - "execution_count": 82 + "execution_count": 100 }, { "cell_type": "code", @@ -381,12 +381,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.553258Z", - "start_time": "2024-01-26T22:53:12.513672Z" + "end_time": "2024-01-26T22:55:38.881502Z", + "start_time": "2024-01-26T22:55:38.874697Z" } }, "id": "96b8c15709e51ada", - "execution_count": 83 + "execution_count": 101 }, { "cell_type": "code", @@ -397,12 +397,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.553867Z", - "start_time": "2024-01-26T22:53:12.523310Z" + "end_time": "2024-01-26T22:55:38.890712Z", + "start_time": "2024-01-26T22:55:38.881710Z" } }, "id": "1e5ea8b8c4cec5e1", - "execution_count": 84 + "execution_count": 102 }, { "cell_type": "code", @@ -432,12 +432,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.555261Z", - "start_time": "2024-01-26T22:53:12.529655Z" + "end_time": "2024-01-26T22:55:38.924575Z", + "start_time": "2024-01-26T22:55:38.887392Z" } }, "id": "8f06f57f85905351", - "execution_count": 85 + "execution_count": 103 }, { "cell_type": "code", @@ -449,7 +449,7 @@ "traceback": [ "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", "\u001B[0;31mTypeError\u001B[0m Traceback (most recent call last)", - "Cell \u001B[0;32mIn[86], line 4\u001B[0m\n\u001B[1;32m 1\u001B[0m commList \u001B[38;5;241m=\u001B[39m \u001B[38;5;28msorted\u001B[39m(commands\u001B[38;5;241m.\u001B[39mkeys()) \n\u001B[1;32m 2\u001B[0m \u001B[38;5;66;03m# commList.sorted(commList)\u001B[39;00m\n\u001B[1;32m 3\u001B[0m \u001B[38;5;66;03m#Splits the list in half: [1,2,3,4,5] ==> [1,2] [3,4,5]\u001B[39;00m\n\u001B[0;32m----> 4\u001B[0m a \u001B[38;5;241m=\u001B[39m \u001B[43mcommList\u001B[49m\u001B[43m[\u001B[49m\u001B[43m:\u001B[49m\u001B[38;5;28;43mlen\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43mcommList\u001B[49m\u001B[43m)\u001B[49m\u001B[38;5;241;43m/\u001B[39;49m\u001B[38;5;241;43m2\u001B[39;49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m]\u001B[49m\n\u001B[1;32m 5\u001B[0m b \u001B[38;5;241m=\u001B[39m commList[\u001B[38;5;28mlen\u001B[39m(commList)\u001B[38;5;241m/\u001B[39m\u001B[38;5;241m2\u001B[39m\u001B[38;5;241m+\u001B[39m\u001B[38;5;241m1\u001B[39m:]\n", + "Cell \u001B[0;32mIn[104], line 4\u001B[0m\n\u001B[1;32m 1\u001B[0m commList \u001B[38;5;241m=\u001B[39m \u001B[38;5;28msorted\u001B[39m(commands\u001B[38;5;241m.\u001B[39mkeys()) \n\u001B[1;32m 2\u001B[0m \u001B[38;5;66;03m# commList.sorted(commList)\u001B[39;00m\n\u001B[1;32m 3\u001B[0m \u001B[38;5;66;03m#Splits the list in half: [1,2,3,4,5] ==> [1,2] [3,4,5]\u001B[39;00m\n\u001B[0;32m----> 4\u001B[0m a \u001B[38;5;241m=\u001B[39m \u001B[43mcommList\u001B[49m\u001B[43m[\u001B[49m\u001B[43m:\u001B[49m\u001B[38;5;28;43mlen\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43mcommList\u001B[49m\u001B[43m)\u001B[49m\u001B[38;5;241;43m/\u001B[39;49m\u001B[38;5;241;43m2\u001B[39;49m\u001B[38;5;241;43m+\u001B[39;49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m]\u001B[49m\n\u001B[1;32m 5\u001B[0m b \u001B[38;5;241m=\u001B[39m commList[\u001B[38;5;28mlen\u001B[39m(commList)\u001B[38;5;241m/\u001B[39m\u001B[38;5;241m2\u001B[39m\u001B[38;5;241m+\u001B[39m\u001B[38;5;241m1\u001B[39m:]\n", "\u001B[0;31mTypeError\u001B[0m: slice indices must be integers or None or have an __index__ method" ] } @@ -464,12 +464,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-26T22:53:12.602375Z", - "start_time": "2024-01-26T22:53:12.545028Z" + "end_time": "2024-01-26T22:55:38.984438Z", + "start_time": "2024-01-26T22:55:38.905832Z" } }, "id": "63ea9891464bf093", - "execution_count": 86 + "execution_count": 104 }, { "cell_type": "code", @@ -482,7 +482,7 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "start_time": "2024-01-26T22:53:12.572770Z" + "start_time": "2024-01-26T22:55:38.947928Z" } }, "id": "96989163f8eb8335" @@ -494,7 +494,7 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "start_time": "2024-01-26T22:53:12.576490Z" + "start_time": "2024-01-26T22:55:38.951277Z" } }, "id": "aa1cf58ecc39a045" @@ -521,7 +521,7 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "start_time": "2024-01-26T22:53:12.579983Z" + "start_time": "2024-01-26T22:55:38.953709Z" } }, "id": "208054299514c7c6"