This file contains 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
""" | |
Plotting the accuracty of the rule of 72. | |
https://en.wikipedia.org/wiki/Rule_of_72 | |
""" | |
import math | |
import matplotlib.pyplot as plt |
This file contains 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 io | |
from itertools import pairwise | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
# https://www.minneapolisfed.org/about-us/monetary-policy/inflation-calculator/consumer-price-index-1913- | |
inflation_table_str = """ | |
year CPI inflation_rate | |
1997 160.5 2.3% |
This file contains 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 math | |
ATTRITION_RATE = 0.4 | |
ADULT_AGE = 22 | |
END_FERTILE_AGE = 42 | |
DEATH_AGE = 75 | |
PER_YEAR_PER_COUPLE = 1 | |
SIM_YEARS = 200 |
This file contains 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
""" | |
Graph the population of Greenville County over time. | |
Data from wikipedia. | |
https://en.wikipedia.org/wiki/Greenville_County,_South_Carolina | |
Need to `pip install sklearn` and `pip install matplotlib` first. | |
""" | |
import matplotlib.pyplot as plt | |
import math |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
""" | |
A short script to start a song at a random time on Christmas morning. | |
Usage | |
----- | |
You will need a way to keep your computer from falling asleep. I | |
used the Caffiene program which I believe is crossplatform. If your | |
computer does fall asleep, run out of batteries, get stolen by | |
Santa, etc; the music will not play in the morning. |
This file contains 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
# A list of spiders in alltheplacs that do not have wikidata added to them | |
# There are 548/690 which do not. | |
# Repository link: https://github.com/alltheplaces/alltheplaces | |
grep -rL 'brand_wikidata' locations/spiders/ | |
: ' | |
locations/spiders/lane_bryant.py | |
locations/spiders/chilis.py | |
locations/spiders/half_price_books.py | |
locations/spiders/trader_joes.py |
This file contains 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
"""A small module for finding the distance between two geometries in an arbitrary direction | |
Inspired by a question/issue in the Shapely github repository (`#1051`_). | |
Notes | |
----- | |
There is another way I can think of doing this which will probably be much faster for | |
large geometries, but less accurate. It should be possible to stretch both geometries | |
by a very large amount in the direction perpendicular to the direction you want to | |
find the distance in. Of course, you would loose the 'movement' idea (i.e. it could |
NewerOlder