README.txt (2528B)
1 # PRT: Predict, Resolve & Tally 2 3 57 lines of code which allow you to make predictions, resolve, and tally them, 4 without many user niceties. Name inspired by PRT, from the Worm serial 5 6 ## Example of use 7 8 Open a terminal, with Ctrl+Alt+T 9 10 The command predict creates a new prediction: 11 12 $ predict 13 > Statement: Before 1 July 2020 will SpaceX launch its first crewed mission into orbit? 14 > Probability (%): 50 15 > Date of resolution (year/month/day): 2020/07/01 16 17 The command resolve resolves all predictions whose dates have passed. 18 19 $ resolve 20 Before 10 April 2020 will former Catalan President Carles Puigdemont return to Spain? (2020/04/10) 21 > (TRUE/FALSE) TRUE 22 23 The command tally tallies how you did for all resolved predictions. 24 25 $ tally 26 0 to 10 : 0 TRUE and 10 FALSE 27 10 to 20 : 0 TRUE and 5 FALSE 28 20 to 30 : 1 TRUE and 3 FALSE 29 30 to 40 : 2 TRUE and 7 FALSE 30 40 to 50 : 10 TRUE and 11 FALSE 31 50 to 60 : 10 TRUE and 10 FALSE 32 60 to 70 : 7 TRUE and 0 FALSE 33 70 to 80 : 10 TRUE and 2 FALSE 34 80 to 90 : 10 TRUE and 1 FALSE 35 90 to 100 : 1 TRUE and 0 FALSE 36 37 ## Installation 38 39 ### 1. Add the following to your .bashrc 40 41 Copy the contents or source the PRT file to your .bashrc file. For example: 42 43 ``` 44 [ -f /home/nuno/Documents/PRT ] && source /home/nuno/Documents/PRT 45 ``` 46 47 ### 2. Change the directory. 48 49 Change the first 3 lines so that the program uses the directory of your choice. 50 For example, in my system they might be: 51 52 ``` 53 pendingPredictions=/home/nuno/Documents/Forecasting/pendingPredictions.txt 54 pendingPredictionsTemp="${pendingPredictions}.t" 55 resolvedPredictions=/home/nuno/Documents/Forecasting/resolvedPredictions.txt 56 ``` 57 58 ## Gotchas 59 60 CSV 61 - Statements, predictions and probabilities are saved, internally, as a csv 62 file. 63 - This requires not using commas in your statements 64 65 Dates: 66 - Dates are in the year/month/day format, so that they can be compared 67 alphanumerically as strings. That is, an earlier date, in this format, would 68 come earlier in a dictionary than a later date. 69 - 2020/7/1 is not a valid date, because it would come after 2020/10/01. Write 70 dates using two digits for both month and dates, like: 2020/07/01. 71 72 Runs using bash. <https://en.wikipedia.org/wiki/Bash_(Unix_shell)> 73 74 Windows and Mac are not supported, though you could get this to run there if 75 you wanted to, through various bash for Windows interpreters, like the one that 76 comes with git for Windows <https://git-scm.com/download/win> 77 78 The tally function only accepts predictions with 1% granularity, and it 79 aggregates them with 10% granularity.