Skip to content

Instantly share code, notes, and snippets.

Paul Gambill paulgambill

Block or report user

Report or block paulgambill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View import_json_appsscript.js
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@paulgambill
paulgambill / gist:7146202
Created Oct 24, 2013
This Ruby script parses the dataset from https://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-data-by-state-and-district-of- to find the top name for each sex/year/state permutation. The result is a .csv with a row for each year/sex/top name combination. Be sure to replace the path on line 7 with your local path.
View gist:7146202
require 'csv'
year = 1910
CSV.open("stateNamesParsed.csv", "ab") do |csv|
Dir.glob('PATH/*.TXT') do |file|
next if file == '.' or file == '..'
File.open(file).readlines.each do |line|
array = line.split(',')
You can’t perform that action at this time.