Skip to content

Instantly share code, notes, and snippets.

View zstumgoren's full-sized avatar

Serdar Tumgoren zstumgoren

View GitHub Profile
"""
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
@zstumgoren
zstumgoren / gist:5817465
Last active December 18, 2015 17:19 — forked from sc0ttman/gist:1145418
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.
@zstumgoren
zstumgoren / ca_failed_banks.sh
Last active January 31, 2022 00:50 — forked from irenecasado/ca_failed_banks.sh
ca_failed_banks.sh
# 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
@zstumgoren
zstumgoren / senate-compromisers.py
Last active February 11, 2023 21:02 — forked from zhongleqi/leqi_assignment5_draft1.py
updated with feedback
"""
*** 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.