Skip to content

Instantly share code, notes, and snippets.

View devennorton's full-sized avatar

Deven Norton devennorton

View GitHub Profile
def title_case(title, minor_words):
final = ""
minor_words = [word.lower() for word in minor_words ] # make sure the minor words are all lower case
title = title.lower().split() # make title all lowercase and split into a list of words
final = title[0].capitalize() # always capitalize the first word
for word in title[1:]: #capitalize words not in list
if word not in minor_words:
final += ' ' + word.capitalize()
return final
@devennorton
devennorton / markup.html
Created April 30, 2013 16:21
A terse gist
<!DOCTYPE html>
<html>
<head>
<title>Boku in Heat</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Fusion Tables styling</title>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCu0KqDrN-FYvzwTCzec_EakWQlcPeoPC8&sensor=false"></script>
</head>
<body>
a'dls;kf'adfklo