Skip to content

Instantly share code, notes, and snippets.

Rosie Hoyem rosiehoyem

Block or report user

Report or block rosiehoyem

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
@rosiehoyem
rosiehoyem / getting-started-with-airflow.md
Last active Jun 25, 2019
Getting Started With Airflow
View getting-started-with-airflow.md

Install Airflow

1. Install Airflow

Follow the installation instructions on the Airflow website.

Update Airflow Configurations

To configure Airflow to use Postgres rather than the default Sqlite3, go to airflow.cfg and update this configuration to LocalExecutor:

# The executor class that airflow should use. Choices include
View production-checklist.md
@rosiehoyem
rosiehoyem / min-viable-flask-app.md
Last active Apr 2, 2017
Minimally Viable Flask Application
View min-viable-flask-app.md

This is a tutorial for a mini data science quiz app that we will deploy to Heroku. You'll find the completed code here.

This simple app is based on the gettting started tutorial from the framework's creators, Pocoo.

0. Install Flask

If you're an Anaconda user, run:

conda install flask

View checkout_controller.rb
class CheckoutsController < ApplicationController
...
def create
@checkout = @item.checkouts.build(checkout_params)
respond_to do |format|
if @checkout.save
if @checkout.reservation == true
@checkout.create_activity :reservation, options = { owner: Person.find(@checkout.checked_out_by), recipient: @item, approved_by_id: @user.id }
else
@rosiehoyem
rosiehoyem / gemfile.rb
Created Mar 14, 2015
My preferred Ruby stack
View gemfile.rb
source 'https://rubygems.org'
gem 'rails', '4.1.1'
gem 'pg'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'therubyracer', platforms: :ruby
gem 'devise'
@rosiehoyem
rosiehoyem / blog_remind.coffee
Created Feb 2, 2015
Blog Reminder Script for Hubot
View blog_remind.coffee
# Description:
# Forgetful? Add reminders
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@rosiehoyem
rosiehoyem / app_controllers_digitize_steps_controller.rb
Last active Aug 29, 2015
Forms, Complex Data Models and AJAX
View app_controllers_digitize_steps_controller.rb
# /app/controllers/digitize_steps_controller.rb
...
responds_to :js
...
def form
end
...
@rosiehoyem
rosiehoyem / digitize_step_model.rb
Last active Aug 29, 2015
Meta Programming: instance_variable_set() and instance_variable_get()
View digitize_step_model.rb
# /app/models/digitize_step
class DigitizeStep < ActiveRecord::Base
belongs_to :process_step
end
View app_model_person.rb
class Person < ActiveRecord::Base
...
def destroy_door_access
if self.door_accesses.first
self.door_accesses.first.destroy
else
true
end
@rosiehoyem
rosiehoyem / testing_with_rspec
Created Nov 11, 2014
Testing Best Practicies
View testing_with_rspec
#Testing Best Practices
##Unit Testing with Rspec
Rspec Core Syntax
Rspec Expectations
Rspec Matchers
You can’t perform that action at this time.