Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🚜💻📈

Brian S. Corbin corbinbs

💭
🚜💻📈
View GitHub Profile
@corbinbs
corbinbs / viola_sleep_assistant.py
Created Jul 10, 2019
Circuit Playground Express Sleep Assistant for Toddlers ( https://www.adafruit.com/product/3333 )
View viola_sleep_assistant.py
# a fun sleep assistant for toddlers adapting to life in a "big bed"
# when the circuit playground express lights up, it's OK to get up.
# if the playground is not yet lit up, please let the parent(s) sleep just a
# little longer...
import time
import audioio
import board
from digitalio import DigitalInOut, Direction, Pull
import neopixel
@corbinbs
corbinbs / corbin_claims_status_api_request.json
Created Oct 13, 2014
PokitDok Platform Claims status API request
View corbin_claims_status_api_request.json
{
"patient": {
"birth_date": "19XX-XX-XX",
"first_name": "BRIAN",
"id": "WXXXXXXXXX",
"last_name": "CORBIN"
},
"provider": {
"first_name": "CHRISTINA",
"last_name": "BERTOLAMI",
@corbinbs
corbinbs / corbin_claims_status_api_response.json
Last active Aug 29, 2015
PokitDok Platform Claims status API response
View corbin_claims_status_api_response.json
{
"patient": {
"claims": [
{
"adjudication_finalized_date": "2014-10-11",
"applied_to_deductible": true,
"claim_control_number": "E535HB9CW00",
"claim_payment_amount": {
"amount": "0",
"currency": "USD"
@corbinbs
corbinbs / corbin_claims_api_request.json
Last active Aug 29, 2015
PokitDok Platform claims API request
View corbin_claims_api_request.json
{
"billing_provider": {
"address": {
"address_lines": [
"1703 John B White Blvd, Unit A"
],
"city": "SPARTANBURG",
"state": "SC",
"zipcode": "29301"
},
@corbinbs
corbinbs / corbin_eligibility_api_response_summary.json
Last active Aug 29, 2015
PokitDok Platform eligibility API response summary
View corbin_eligibility_api_response_summary.json
{
"summary": {
"deductible": {
"family": {
"in_network": {
"applied": {
"amount": "2153.41",
"currency": "USD"
},
"limit": {
View keybase.md

Keybase proof

I hereby claim:

  • I am corbinbs on github.
  • I am corbinbs (https://keybase.io/corbinbs) on keybase.
  • I have a public key whose fingerprint is A16F FFC6 0789 FCBA ABA8 CB51 9128 64D8 41D1 4FD9

To claim this, I am signing this object:

View superpack.sh
#!/usr/bin/env bash
#
# superpack.sh:
#
# Define components you need to do work.
# Quickly.
# Superpack downloads/installs stuff so you don't have to.
# Blast new developers into productivity on their first day.
#
# Usage:
@corbinbs
corbinbs / json_required_example.py
Created Oct 2, 2012
Flask JSON Required Example
View json_required_example.py
@app.route("/do/something", methods=['POST'])
@json_required(
required_fields={
'first_name':"Please enter your first name.",
'last_name':"Please enter your last name.",
'email':'Please specify a valid email address',
'date_of_birth':'Please enter your date of birth'
},
validations=[
('email', 'Please specify a valid email address', lambda email: email is not None and EMAIL_REGEX.match(email)),
@corbinbs
corbinbs / json_required_example.json
Created Oct 2, 2012
Flask JSON Required Example Input
View json_required_example.json
{
"date_of_birth": "01/01/1970",
"email": "corbinbs@example.com",
"first_name": "Brian",
"last_name": "Corbin"
}
@corbinbs
corbinbs / json_required_demo.py
Created Sep 26, 2012
Flask JSON required decorator
View json_required_demo.py
"""
Demo of json_required decorator for API input validation/error handling
"""
import inspect
import functools
import json
from traceback import format_exception
from flask import jsonify, request
import sys