Advertisement
krusader74

Pywerball.md

Nov 28th, 2016
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1. % PYWERBALL(1)
  2. % krusader74
  3. % November 2016
  4.  
  5. # NAME
  6.  
  7. Pywerball - Powerball lottery utilities
  8.  
  9. # SYNOPSIS
  10.  
  11. **Pywerball** [*OPTION...*]
  12.  
  13. # DESCRIPTION
  14.  
  15. **Pywerball** is a Python script, useful for checking Powerball lottery results. **Pywerball** may also be used to generate Powerball numbers, show odds and prizes, and estimate the chances for a split jackpot.
  16.  
  17. # OPTIONS
  18.  
  19. **-c**, **--check** *FILE*
  20. : Read Powerball numbers from the *FILE* and check them. The winning numbers are downloaded from the web. Therefore, there must be a working web connection, the Powerball site must be online, and the winning numbers for the dates to be checked must be posted online.
  21.  
  22. **-d**, **--date** *DATE*
  23. : If *DATE* is 'next' or 'prev', then the next or previous drawing date is output. Otherwise, *DATE* is used to set the date for the `generate`, `numbers` and `split` options. If no date is given, assume the next drawing for the `generate` and `split` options, and assume the last drawing for the `numbers` option. The date option must be specified before the `generate`, `numbers` and `split` options. The format for *DATE* is `MM/DD/YYY`, e.g., `-d '11/26/2016'`.
  24.  
  25. **-g**, **--generate** *NUMBER*
  26. : Randomly generate the specified *NUMBER* of tickets.
  27.  
  28. **-h**, **--help**
  29. : Display this help message and exit.
  30.  
  31. **-n**, **--numbers**
  32. : Print the winning numbers.
  33.  
  34. **-o**, **--odds** *COMBO*
  35. : Print the odds of getting a combination of so many white balls plus so many power balls. The *COMBO* is formatted like 'WB+PB', e.g., `-o '0+1' -o '3+0'`. WB must be a number 0 to 5. PB must be a number 0 or 1.
  36.  
  37. **-p**, **--prize** *COMBO*
  38. : Print the prize for getting a combination of so many white balls plus so many power balls. The *COMBO* is formatted like 'WB+PB', e.g., `-p '0+1' -p '3+0'`. WB must be a number 0 to 5. PB must be a number 0 or 1.
  39.  
  40. **-v**, **--version**
  41. : Display the version (number and date) and exit.
  42.  
  43. # FILES
  44.  
  45. The *FILE* to be checked is formatted like so:
  46.  
  47. Draw Date WB1 WB2 WB3 WB4 WB5 PB
  48. 11/26/2016 01 20 37 51 67 18
  49. 11/26/2016 07 51 58 63 67 24
  50. 11/26/2016 16 31 45 46 69 18
  51. 11/26/2016 02 39 53 61 63 13
  52. 11/26/2016 12 31 42 55 68 03
  53. 11/26/2016 17 19 21 37 44 16
  54. 11/26/2016 11 19 21 37 42 11
  55. 11/26/2016 10 13 23 36 41 16
  56. 11/30/2016 17 19 21 37 44 16
  57.  
  58. If the *FILE* is named `powerball.txt`, and the current date is 11/27/2016, and you ran the following command
  59.  
  60. Pywerball -c powerball.txt
  61.  
  62. then you would see the following results printed to standard output:
  63.  
  64. Draw Date WB1 WB2 WB3 WB4 WB5 PB
  65. 11/26/2016 01 20 37 51 67 18 no match
  66. 11/26/2016 07 51 58 63 67 24 no match
  67. 11/26/2016 16 31 45 46 69 18 no match
  68. 11/26/2016 02 39 53 61 63 13 no match
  69. 11/26/2016 12 31 42 55 68 03 no match
  70. 11/26/2016 17 19 21 37 44 16 matches 5+1 for $Jackpot
  71. 11/26/2016 11 19 21 37 42 11 matches 3+0 for $7
  72. 11/26/2016 10 13 23 36 41 16 matches 0+1 for $4
  73. 11/30/2016 17 19 21 37 44 16 error: could not find matching date online!
  74.  
  75. # EXAMPLES
  76.  
  77. Check the numbers in the file `powerball.txt`:
  78.  
  79. Pywerball -c powerball.txt
  80.  
  81. Show the next draw date:
  82.  
  83. Pywerball -d next
  84.  
  85. Show the previous draw date:
  86.  
  87. Pywerball -d prev
  88.  
  89. Generate 10 random draws for the next Powerball drawing date. The output is formatted exactly like a *FILE* to be checked:
  90.  
  91. Pywerball -g 10
  92.  
  93. Generate 10 random draws for the drawing date specified with the --date option:
  94.  
  95. Pywerball -d '12/03/2016' -g 10
  96.  
  97. Show the winning numbers for the previous draw date:
  98.  
  99. Pywerball -n
  100.  
  101. Show the winning numbers for the date specified with the --date option:
  102.  
  103. Pywerball -d '11/12/2016' -n
  104.  
  105. Show the odds of getting 5 white balls plus 0 power balls:
  106.  
  107. Pywerball -o '5+0'
  108.  
  109. Show the prize for getting 5 white balls plus 0 power balls:
  110.  
  111. Pywerball -p '5+0'
  112.  
  113. # LIMITATIONS
  114.  
  115. Powerplay option is ignored.
  116.  
  117. The winning numbers are downloaded from the web. Therefore, there must be a working web connection, the Powerball site must be online, and the dates to be checked must be posted online.
  118.  
  119. # COPYLEFT
  120.  
  121. **Pywerball** 2016 by krusader74. This work has been released into the public domain by the copyright holder. This applies worldwide. This is free software: You are free to change and redistribute it. There is NO WARRANTY.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement