Skip to content

Instantly share code, notes, and snippets.

@switzersc
switzersc / Submission.md
Last active February 24, 2019 17:37
HackIllinois 2019 Submission - OpenReferral Transformer

Project

We collaborated on multiple issues for Open Referral Tranformer. This is relaitvely new project so a lot of the work to be done this weekend was greenfield development. The project uses Ruby.

This tool allows you to convert data into an HSDS-compliant datapackage. The Human Services Data Specification (HSDS) is a data model that describes health and human services.

We used data from two nonpropfit organizations in Illinois and Florida that want to make their data more interoperable to share with other organizations doing good work. This data is used to help people in need find the services they need to thrive.

Problem statement

@switzersc
switzersc / README.md
Last active January 14, 2020 23:28
Connecting Minecraft Pi to the World

Intro

We (some engineers at Notion) recently led a kids activity at a Google Developer event, and we wanted to connect IoT devices (specifically Notion sensors) to a Minecraft server running on a Raspberry Pi, so that events detected by the sensors would trigger events in our Minecraft world. We used webhooks from the Notion API to POST to a locally running Python HTTP server (accessible from the web via an ngrok tunnel), which then triggered events in the Minecraft world using the awesome Python API for Minecraft Pi. For example, kids would wet a sensor with a cup of water, which would then cause huge blocks of water to appear in their Minecraft world -- or raining dandelions, or blocks of TNT, or whatever the kids programmed to happen. This gist shows how we did it.

Prerequisites

  • a Raspberry Pi
  • Minecraft Pi - This is a version of Minecraft built to run on the Raspbery Pi. It comes preinstalled with the latest version of [Raspbian](https://www.raspberry
@switzersc
switzersc / party_gist
Created May 27, 2014 15:29
this is a test gist
party all night!
@switzersc
switzersc / file1.txt
Created May 27, 2014 01:28
this is a test gist 4
party party
@switzersc
switzersc / blackjackclass.rb
Created March 31, 2014 16:11
blackjack game
game_decision = "yes"
while game_decision == "yes"
base_card = rand(10)
puts "Your number is #{base_card}."
puts "Continue? Yes or No"
answer = gets.chomp
@switzersc
switzersc / guessing_game.rb
Created March 31, 2014 16:10
guessing game
wheee
@switzersc
switzersc / problem_four.rb
Created December 9, 2013 20:23
project euler problems 1-4
# 4. A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
# Find the largest palindrome made from the product of two 3-digit numbers.
array = []
(100..999).each do |i|
(100...999).each do |y|
product = i * y
array << product if palindrome?(product)
end
end