Skip to content

Instantly share code, notes, and snippets.

render() {
return (
<div>
<table className="table table-auto mx-auto">
<tbody className="bg-white divide-y divide-gray-200">
{this.state.rows ? (
this.state.rows.map((row, i) => {
return (
<tr
key={Math.random()}
@th3o6a1d
th3o6a1d / citibike_esp8266_get_bikes_available_from_station.ino
Created November 25, 2018 23:23
Get number of bikes available from citibike station by ID and blink ESP8266 default light.
#include <ESP8266WiFi.h>
#include <ArduinoJson.h>
const char* ssid = "";
const char* password = "";
const char* host = "gbfs.citibikenyc.com";
const String url = "/gbfs/en/station_status.json";
const uint16_t port = 80;
const String station_id = "422";
@th3o6a1d
th3o6a1d / report_cleaner.py
Created October 12, 2016 02:24
Clean up radiology reports from EPIC data dump. Usage: python report_cleaner.py input_filename.csv
#!/usr/bin/python
import re
import csv
import sys
# Usage: python report_cleaner.py input_file_name.csv
# This will write to input_filename_cleaned.csv
# Define how we clean up the reports after the lines
@th3o6a1d
th3o6a1d / server_monitor.py
Last active August 29, 2015 14:18
The Poor Man's Server Monitor -- Uses email-to-text to notify if server status code != 200.
### If using gmail, you will need to log in and confirm 'insecure app' settings
import requests
import smtplib
import time
while True:
try:
r = requests.get('http://sitetocheck.com')
if r.status_code != 200:
@th3o6a1d
th3o6a1d / extractor.py
Last active August 29, 2015 14:07
Python Script for Extracting Records from SPARCS Limited IP Data Files
import sys, csv, os
###
### Author Jason Theobald, MD/MBA Student 2014
### This script reads all SPARCS files with the .DAT extension in the same folder as the script
### Use this to retrieve patients by ICD-9 Code and generate a .csv file
### To run: python extractor.py on Mac OSX or Windows PC (with Python 2.7 installed)
###
### Shows what files are being read. Will open all .dat files in current directory.