move README to .txt
This commit is contained in:
parent
9df40da4cb
commit
3a2745e382
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
pendingPredictions=/home/pendingPredictions.txt
|
||||
pendingPredictionsTemp="${pendingPredictions}.t"
|
||||
resolvedPredictions=/home/resolvedPredictions.txt
|
79
README.md
79
README.md
|
@ -1,79 +0,0 @@
|
|||
# PRT: Predict, Resolve & Tally
|
||||
57 lines of code which allow you to make predictions, resolve, and tally them. It plays rough with the user. Name inspired by PRT ([Worm](https://parahumans.wordpress.com/)).
|
||||
|
||||
## Example of use
|
||||
|
||||
Open a terminal, with Ctrl+Alt+T
|
||||
|
||||
The command predict creates a new prediction:
|
||||
|
||||
```bash
|
||||
$ predict
|
||||
> Statement: Before 1 July 2020 will SpaceX launch its first crewed mission into orbit?
|
||||
> Probability (%): 50
|
||||
> Date of resolution (year/month/day): 2020/07/01
|
||||
```
|
||||
|
||||
The command resolve resolves all predictions whose dates have passed.
|
||||
|
||||
```bash
|
||||
$ resolve
|
||||
Before 10 April 2020 will former Catalan President Carles Puigdemont return to Spain? (2020/04/10)
|
||||
> (TRUE/FALSE) TRUE
|
||||
```
|
||||
|
||||
The command tally tallies how you did for all resolved predictions.
|
||||
|
||||
```bash
|
||||
$ tally
|
||||
0 to 10 : 0 TRUE and 10 FALSE
|
||||
10 to 20 : 0 TRUE and 5 FALSE
|
||||
20 to 30 : 1 TRUE and 3 FALSE
|
||||
30 to 40 : 2 TRUE and 7 FALSE
|
||||
40 to 50 : 10 TRUE and 11 FALSE
|
||||
50 to 60 : 10 TRUE and 10 FALSE
|
||||
60 to 70 : 7 TRUE and 0 FALSE
|
||||
70 to 80 : 10 TRUE and 2 FALSE
|
||||
80 to 90 : 10 TRUE and 1 FALSE
|
||||
90 to 100 : 1 TRUE and 0 FALSE
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Add the following to your .bashrc
|
||||
|
||||
Add the following at the end of your .bashrc file, where filePathWay is the location of the PRT file, so that you can use the predict, resolve and tally commands from any terminal. Lines which start with # are comments.
|
||||
```
|
||||
[ -f /filePathWay/PRT ] && . /filePathWay/PRT
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
[ -f /home/nuno/Documents/PRT ] && . /home/nuno/Documents/PRT
|
||||
```
|
||||
|
||||
Google "where is my .bashrc file stackoverflow" if you don't know where your bash file is.
|
||||
|
||||
### 2. Change the directory.
|
||||
|
||||
Change the first 3 lines so that the program uses the directory of your choice. For example, in my system they might be:
|
||||
|
||||
```
|
||||
pendingPredictions=/home/nuno/Documents/Forecasting/pendingPredictions.txt
|
||||
pendingPredictionsTemp="${pendingPredictions}.t"
|
||||
resolvedPredictions=/home/nuno/Documents/Forecasting/resolvedPredictions.txt
|
||||
```
|
||||
|
||||
## Gotchas
|
||||
- CSV: Statements, predictions and probabilities are saved, internally, as a csv file. This means that you can choose between:
|
||||
- Not using commas in your statements
|
||||
- Modifying the program so that it becomes more complicated, but suits your needs better
|
||||
- Dates: Dates are in the year/month/day format, so that they can be compared alphanumerically as strings. That is, an earlier date, in this format, would come earlier in a dictionary than a later date.
|
||||
- 2020/7/1 is not a valid date, because it would come after 2020/10/01. Write dates using two digits for both month and dates, like: 2020/07/01.
|
||||
- Alternatively, write a date parser to suit your needs. It's not difficult, but it's very annoying.
|
||||
- Bash
|
||||
- This program runs in [bash shells](https://en.wikipedia.org/wiki/Bash_(Unix_shell)), common in Unix systems.
|
||||
- Windows & Mac
|
||||
- You can install bash for Windows (I like the distribution in [git for Windows](https://git-scm.com/download/win)). See also [these](https://stackoverflow.com/questions/6413377/is-there-a-way-to-run-bash-scripts-on-windows) [two](https://stackoverflow.com/questions/6883760/git-for-windows-bashrc-or-equivalent-configuration-files-for-git-bash-shell) stackoverflow answers.
|
||||
- The tally function is really simple; it only accepts predictions with 1% granularity, and it aggregates them with 10% granularity. It might become more complicated in the future.
|
79
README.txt
Normal file
79
README.txt
Normal file
|
@ -0,0 +1,79 @@
|
|||
# PRT: Predict, Resolve & Tally
|
||||
|
||||
57 lines of code which allow you to make predictions, resolve, and tally them,
|
||||
without many user niceties. Name inspired by PRT, from the Worm serial
|
||||
|
||||
## Example of use
|
||||
|
||||
Open a terminal, with Ctrl+Alt+T
|
||||
|
||||
The command predict creates a new prediction:
|
||||
|
||||
$ predict
|
||||
> Statement: Before 1 July 2020 will SpaceX launch its first crewed mission into orbit?
|
||||
> Probability (%): 50
|
||||
> Date of resolution (year/month/day): 2020/07/01
|
||||
|
||||
The command resolve resolves all predictions whose dates have passed.
|
||||
|
||||
$ resolve
|
||||
Before 10 April 2020 will former Catalan President Carles Puigdemont return to Spain? (2020/04/10)
|
||||
> (TRUE/FALSE) TRUE
|
||||
|
||||
The command tally tallies how you did for all resolved predictions.
|
||||
|
||||
$ tally
|
||||
0 to 10 : 0 TRUE and 10 FALSE
|
||||
10 to 20 : 0 TRUE and 5 FALSE
|
||||
20 to 30 : 1 TRUE and 3 FALSE
|
||||
30 to 40 : 2 TRUE and 7 FALSE
|
||||
40 to 50 : 10 TRUE and 11 FALSE
|
||||
50 to 60 : 10 TRUE and 10 FALSE
|
||||
60 to 70 : 7 TRUE and 0 FALSE
|
||||
70 to 80 : 10 TRUE and 2 FALSE
|
||||
80 to 90 : 10 TRUE and 1 FALSE
|
||||
90 to 100 : 1 TRUE and 0 FALSE
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Add the following to your .bashrc
|
||||
|
||||
Copy the contents or source the PRT file to your .bashrc file. For example:
|
||||
|
||||
```
|
||||
[ -f /home/nuno/Documents/PRT ] && source /home/nuno/Documents/PRT
|
||||
```
|
||||
|
||||
### 2. Change the directory.
|
||||
|
||||
Change the first 3 lines so that the program uses the directory of your choice.
|
||||
For example, in my system they might be:
|
||||
|
||||
```
|
||||
pendingPredictions=/home/nuno/Documents/Forecasting/pendingPredictions.txt
|
||||
pendingPredictionsTemp="${pendingPredictions}.t"
|
||||
resolvedPredictions=/home/nuno/Documents/Forecasting/resolvedPredictions.txt
|
||||
```
|
||||
|
||||
## Gotchas
|
||||
|
||||
CSV
|
||||
- Statements, predictions and probabilities are saved, internally, as a csv
|
||||
file.
|
||||
- This requires not using commas in your statements
|
||||
|
||||
Dates:
|
||||
- Dates are in the year/month/day format, so that they can be compared
|
||||
alphanumerically as strings. That is, an earlier date, in this format, would
|
||||
come earlier in a dictionary than a later date.
|
||||
- 2020/7/1 is not a valid date, because it would come after 2020/10/01. Write
|
||||
dates using two digits for both month and dates, like: 2020/07/01.
|
||||
|
||||
Runs using bash. <https://en.wikipedia.org/wiki/Bash_(Unix_shell)>
|
||||
|
||||
Windows and Mac are not supported, though you could get this to run there if
|
||||
you wanted to, through various bash for Windows interpreters, like the one that
|
||||
comes with git for Windows <https://git-scm.com/download/win>
|
||||
|
||||
The tally function only accepts predictions with 1% granularity, and it
|
||||
aggregates them with 10% granularity.
|
Loading…
Reference in New Issue
Block a user