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
import json | |
from itertools import combinations | |
import requests | |
import networkx as nx | |
def get_senate_vote(vote): | |
# Year can be replaced to fetch votes from different years (e.g., 2013). 1989 is used | |
# as an example. |
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
scale_x_discrete(limits = rev(levels(the_factor))) |
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
# ruby 1.9.2 | |
require "csv" | |
File.open("contacts2.adr", "r") do |f| | |
contacts = [] | |
f.read.split("#CONTACT").each do |entry| | |
unless entry.empty? | |
contact = {} | |
entry.each_line do |line| |