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
""" | |
*** SERDAR's NOTES **** | |
This is a good start. There are a few minor issues that I've noted in the code towards the top of the file, | |
specifically in the "main" and "group_members_by_party" functions. Please read the notes I added to the top half of the | |
file and try to fix the code before moving on to the sorting and printing steps. | |
Let me know if you have any questions. |
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
# No need for creating new directories with this script. Note, if you were to use "mkdir-p" it requires a path to a directory | |
# as its argument. For example, "mkdir -p ~/code/example" | |
# mkdir -p | |
# cd code | |
curl -s --output banklist.csv https://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list/banklist.csv | |
# No need to touch the file | |
# touch ca_failed_banks.csv | |
# Instead, create it using head | |
head -1 banklist.csv > ca_failed_banks.csv | |
# You should delete extraneous commands not needed by the script such as below "cat" statement |
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
Rails3 - CheatSheet - CommandLine | |
rails new ApplicationName – Create a new application | |
rails _3.0.9_ new ApplicationName – Create a new application with a specific version of rails | |
rails generate/g model ModelName – Creates a model with the specified model_name | |
rails generate/g controller ControllerName – Creates a controller with the specified controller_name | |
rails generate/g migration MigrationName – Creates a migration with the specified migration_name | |
rails generate/g scaffold ModelName ControllerName – A shortcut for creating your controller, model and view files etc. | |
rails destroy controller ControllerName – Destroys the created controller and its related file. | |
rails destroy model - Destroys the created model and its related file. |
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 few notes: | |
* Lines starting with "#" signs are standard Python code comments | |
* Multi-line comments can be wrapped in triple-quotes (""") | |
""" | |
from itertools import islice, product | |
import calendar | |
from BeautifulSoup import BeautifulSoup | |
import requests |