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
Show hidden characters
{ | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"trim_trailing_white_space_on_save": true, | |
"tab_size": 4, | |
"translate_tabs_to_spaces": true, | |
"detect_indentation": false, | |
"use_tab_stops": true |
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
gee-off | |
geff | |
goff | |
george | |
jiff | |
joff | |
greg |
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
aluminium | |
kerfuffle | |
shenanigans |
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
def twitter_link(handle) | |
avatars_path = 'public/img/avatars/' | |
avatar = handle + '.jpg' | |
avatar_path = avatars_path + avatar | |
img_tag = "<img src='#{avatar_path.sub(/^public/, '')}' />" | |
# Check and see if there's already an avatar. | |
unless File.exists?(avatar_path) | |
# We don't have it. Let's try to get it from Twitter. | |
begin |
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
require 'rubygems' | |
require 'sentiment_analysis' | |
def get_sentiment(text) | |
sa = SentimentAnalysis::Client.new(:api_key => 'YOUR_API_KEY') | |
sentiment = sa.review(:text => text, :format => :json) | |
# The limit on the text is 360 characters. | |
return sentiment | |
end |
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
@app.route('/edit/<int:page_id>', methods=['GET']) | |
def edit(page_id): | |
context = "Edit" | |
page = Page.query.get(page_id) | |
title = page.title | |
text = page.text | |
return render_template('edit.html', title=title, text=text, context=context) | |
@app.route('/edit/<int:page_id>', methods=['POST']) |
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
#via http://stackoverflow.com/questions/2186525/use-a-glob-to-find-files-recursively-in-python | |
import fnmatch | |
import os | |
matches = [] | |
for root, dirnames, filenames in os.walk('src'): | |
for filename in fnmatch.filter(filenames, '*.c'): | |
matches.append(os.path.join(root, filename)) |
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
# Nashville's hottest days in 2011 | |
weather2011 <- read.csv('wunder-data-2011.txt', sep=',', header=TRUE) | |
fill_colors <- c() | |
for (i in 1:length(weather2011$tmax)) { | |
if (weather2011$tmax[i] > 80) { | |
fill_colors <- c(fill_colors, '#CC0000') | |
} else { | |
fill_colors <- c(fill_colors, '#CCCCCC') |
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
#Nashville Weather in 1981 | |
weather1981 <- read.csv('wunder-data-1981.txt', sep=',', header=TRUE) | |
high_colors <- c() | |
for (i in 1:length(weather1981$tmax)) { | |
if (weather1981$tmax[i] > 80) { | |
high_colors <- c(high_colors, '#CC0000') | |
} else { | |
high_colors <- c(high_colors, '#9ACC78') |
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
<div class="box"> | |
<div class="box-top"></div> | |
<div class="box-body"> | |
<div class="heading"> | |
<h1>Introduction</h1> | |
</div> | |
<div class="content"> | |
<p>The passion for play is probably as old, and will be as enduring, as the race of man. Some of us are too timid to risk a dollar, but the percentage of people in this feverish nation who would not enjoy winning one is very small. The passion culminates in the professional. He would rather play than eat. Winning is not his sole delight. Some one has remarked that there is but one pleasure in life greater than winning, that is, in making the hazard.</p> | |
</div> | |
</div> |
OlderNewer