Mouseover to repel nodes. Adapted from my talk on force layouts.
This file contains hidden or 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 urllib,hmac,time,hashlib,base64,httplib,sys,json,urlparse | |
## This is just a simple example that is self contained. | |
## You will need to modified it to make it work | |
## | |
## creds - need to be filled out | |
## blognmae - needs to be defined | |
## | |
## reads in image files from the command line and posts to your blog |
This file contains hidden or 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
Write a program that reads the portfolio in portfolio.dat, the stock prices in prices.dat, and prints out how much the portfolio has increased or decreased. | |
Extra Credit: | |
Portfolio.dat and prices.dat both have a small number of stocks. At the meetup, a second set of files will have a much larger number of stocks to analyze. We'll use the comparison between both sizes to talk about writing code that is reusable and that scales to handle a larger number of inputs. |
This file contains hidden or 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 urlparse | |
import oauth2 as oauth | |
consumer_key = 'YOUR_KEY' | |
consumer_secret = 'YOUR_SECRET' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' | |
access_token_url = 'http://www.tumblr.com/oauth/access_token' | |
authorize_url = 'http://www.tumblr.com/oauth/authorize' |
This file contains hidden or 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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.9.0.js"></script> | |
<script> | |
$(document).ready(function() { | |
$('a.ajax-trigger').on('click', function(event) { | |
event.preventDefault(); // Stop the click from going anywhere | |
$.ajax('/help', { | |
type: 'GET', |
This file contains hidden or 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 urlparse | |
import oauth2 as oauth | |
consumer_key = raw_input('Consumer key?') | |
consumer_key = consumer_key.strip() | |
consumer_secret = raw_input('Consumer secret?') | |
consumer_secret = consumer_secret.strip() | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' |