Skip to content

Instantly share code, notes, and snippets.

Avatar

Todd Wolfson twolfson

View GitHub Profile
@twolfson
twolfson / index.js
Created Jul 20, 2020
Exploration for familiarization with Promise API
View index.js
(async function () {
// Define a Promise generator
function getPromise() {
// return Promise.resolve('done2');
// return Promise.reject('throw text ');
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve('done');
}, 300 /* ms */);
});
@twolfson
twolfson / main.py
Last active Jul 19, 2020
Exploration gist for pandas
View main.py
# Load in our dependencies
import pandas
import numpy
# Define our main function
def main():
# Create a pandas dataframe
# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html
# `numpy.array()` syntax
# df = pandas.DataFrame([
@twolfson
twolfson / alt-submodule.js
Created Jul 15, 2020
ES6 module passthrough import/export editing experimentation
View alt-submodule.js
// Load in our dependencies
import submodule from './submodule.js';
// Edit our pass-through content
// DEV: We can only modify mutable content on the submodule's keys
// If we attempt to replace a direct key, then the edit won't pass through
// submodule.bar = 'world'; // Works in this file, but doesn't pass through
submodule.bar.baz = 'hi';
// DEV: The following is a similarly acceptable way to pass-through edit
@twolfson
twolfson / README.md
Created Jul 31, 2019
Proof of concept for reading serial output from Arduino directly
View README.md

gist-arduino-serial

Proof of concept for reading serial output from Arduino directly

Getting started

  • Clone the repo
  • Upload .ino file to Arduino (e.g. via IDE)
  • Verify output is being seen via Serial Monitor in Arduino IDE
  • Open terminal, listen to same port that Arduino writes to
    • tail -f /dev/ttyACM0 on Linux
    • May require more setup on other platforms
@twolfson
twolfson / README.md
Last active Jul 31, 2019
Proof of concept (potentially final) files for ConeDown sensors
View README.md

gist-conedown-sensor

Proof of concept (potentially final) files for ConeDown sensors

We're using force-sensitive resistors (FSRs) as sensors to detect presence on our dancefloor tiles. This is an integration between those sensors, an Arduino, and our computer

Getting started

Sensor testing with Arduino

@twolfson
twolfson / .gitignore
Created Jun 10, 2019
Exploration of SF's Assessor-Recorder tax roll
View keybase.md

Keybase proof

I hereby claim:

  • I am twolfson on github.
  • I am twolfson (https://keybase.io/twolfson) on keybase.
  • I have a public key ASB3gghMv9nXHX0Rd0KcEHTWc7bhofYUMS6CRaU517DVqwo

To claim this, I am signing this object:

@twolfson
twolfson / .gitignore
Created Dec 20, 2018 — forked from tmcw/foursquare_to_geojson.py
Turn your Foursquare Data Archive into a GeoJSON file
View .gitignore
checkins/
checkins.geojson
@twolfson
twolfson / README.md
Created Dec 19, 2018
Foursquare backup notes
View README.md

This is a personal log of getting a Foursquare backup/export setup. It's intended to be a bit of a resource for those who are bridging between technical and non-technical

It's not super explanatory either though. If you do have issues, feel free to email me and I'll update it in fuller detail =)


We want to export our Foursquare data and make the switch to Yelp in 2019 We have lost faith in Foursquare being maintained on Android and thus discovery can only be done on Yelp As a result, we might as well consolidate the data

You can’t perform that action at this time.