Skip to content

Instantly share code, notes, and snippets.

View nblackburn87's full-sized avatar

Natalie Blackburn nblackburn87

  • Portland, Oregon
View GitHub Profile
class RiotApi
require 'logger'
include HTTParty
base_uri "https://na.api.pvp.net/api/lol"
logger ::Logger.new("httparty.log"), :debug, :curl
attr_accessor :id, :name, :profileIconId, :summonerLevel, :revisionDate, :pages, :summonerId

##Sprockets::Rails::Helper::AssetFilteredError in Calagator::Site#index Showing /Users/burnsbabe/Code/calagator/app/views/layouts/calagator/application.html.erb where line #27 raised:

Asset filtered out and will not be served: add Rails.application.config.assets.precompile += %w( leaflet.js ) to config/initializers/assets.rb and restart your server

Extracted source (around line #193): ` if asset && asset_needs_precompile?(asset.logical_path, asset.pathname.to_s) raise AssetFilteredError.new(asset.logical_path) end

@nblackburn87
nblackburn87 / py_web_scraper.py
Created April 17, 2015 23:07
Python Scraper
from bs4 import BeautifulSoup
from urllib3 import PoolManager
from time import sleep
BASE_URL = 'http://www.chicagoreader.com'
def make_soup(url):
html = urlopen(section_url).read()
return BeautifulSoup(html, 'lxml')
@nblackburn87
nblackburn87 / ada_eval.rb
Created February 23, 2015 22:52
Quick Code for Ada Eval
require 'csv'
csv_text = File.read('farmers-markets.csv')
csv = CSV.parse(csv_text, headers: true)
final_csv = csv.map { |row| row.to_hash }
def veggies_not_meat(final_csv)
count = 0
final_csv.each do |row|
if row['Vegetables'] == "Y" && row['Meat'] == "N"
@nblackburn87
nblackburn87 / gist:300379b05aab812527fd
Last active August 29, 2015 14:16
Ada Assessment Questions/Answers

####How many markets sell vegetables, but not meat? Markets with Veggies and not Meat: 1805

####How many markets are on public land? Give a range (lowest possible to highest possible) of the number of markets that may be located on public property. Note that there is inconsistent and incomplete data on market location types (for example, some government property may be considered public). Min number of markets on public land: 411 Max number of markets on public land: 2723

####How many US farmers markets are within this shaded rectangle? Number of markets located inside given lat/long 2151

###Natalie Blackburn
#####Web Developer

1716 NE 108th Ave.
Portland, Oregon 97220
[email protected]

####Technical Experience

@nblackburn87
nblackburn87 / array.rb
Last active August 29, 2015 14:05
Array Sorter
class List
def initialize(array_one, array_two)
@array_one = array_one
@array_two = array_two
end
def array_sort
final_array = []
final_array << (@array_one - @array_two)
final_array.flatten!
@nblackburn87
nblackburn87 / testing.csv
Last active August 29, 2015 14:02
CSV Test Output
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
"Class Session Number","User's Email","The class provided valuable information that was relevant to the subject","The subject matter presented was as advertised within the schedule/syllabus","The classroom and facilities were satisfactory","The class period length was adequate","The Instructor was knowledgeable of the subject matter","The instructor provided a clear and coherent presentation of the subject matter"," The instructor effectively employed visual aids that complemented the subject matter","The instructor effectively engaged the attendees","This class is recommended for individuals experienced in the subject matter","This class is recommended for individuals inexperienced in the subject matter","This class offered information that is relevant to the current measurement operating environment","This class was of value and is recommended for others"
"1006","[email protected]","Agree","Agree","Agree","Agree","Agree","Agree","Agree","Agree","Agree","Agree","Agree","Agree"
"1006","gerard.hwan
@nblackburn87
nblackburn87 / FizzBuzz
Created December 29, 2013 00:36
FizzBuzz Problem Solution.
puts "What number would you like to FizzBuzz up to?"
var = gets.chomp.to_i
(1..var).each do |x|
if x % 15 == 0
puts "FizzBuzz"
elsif x % 3 == 0
puts "Fizz"
elsif x % 5 == 0
puts "Buzz"