This file contains hidden or 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
# Run like so at repository root directory: | |
# | |
# python3 search_for_404s.py > output & | |
# tail -f output | |
import glob | |
import re | |
import requests | |
import sys |
This file contains hidden or 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
import copy | |
import random | |
chests = [ | |
['D', 'D', 'D'], | |
['D', 'D', 'E'], | |
['D', 'D', 'R'], | |
['D', 'E', 'E'], | |
['D', 'E', 'R'], | |
['D', 'R', 'R'], |
This file contains hidden or 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
cigarettes_per_day = 1 | |
total_cigarettes = 0 | |
day = 0 | |
while total_cigarettes < 200: | |
total_cigarettes += cigarettes_per_day | |
print(f'Smoked {cigarettes_per_day} on day {day}, with a total of {total_cigarettes}') | |
cigarettes_per_day += 7 |
This file contains hidden or 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
class Integer | |
@@memo = {0 => 1} | |
def factorial | |
return @@memo[self] if @@memo.include? self | |
value = self * (self - 1).factorial | |
@@memo[self] = value | |
value | |
end |