Skip to content

Instantly share code, notes, and snippets.

🙌
🙌

Loisaida Sam loisaidasam

🙌
🙌
Block or report user

Report or block loisaidasam

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
@loisaidasam
loisaidasam / writeup.md
Created Mar 21, 2017
numpy.savez() / load() weirdness
View writeup.md

Some weirdness about saving/loading some non-array/vector datatypes (int/str/float in numpy:

In [1]: import numpy as np

In [2]: np.savez('foo.npz', my_int=5, my_float=5.0, my_vec=np.array([0.2, 0.5, 0.9]), my_str='foo on
   ...:  the bar', my_dict={'foo': 'bar'}, my_list=[1, 2, 3])

In [3]: data = np.load('foo.npz')
@loisaidasam
loisaidasam / writeup.md
Created Mar 21, 2017
Oh My Rockness: 17 Bands To See At SXSW 2017
View writeup.md
@loisaidasam
loisaidasam / ideas.md
Created Feb 21, 2017
2017 NBA Allstar Stats Ideas
View ideas.md
@loisaidasam
loisaidasam / generator_with_mutable_data.py
Last active Feb 15, 2017
TIL about mutable python generator data
View generator_with_mutable_data.py
"""
TIL data used/returned in python generators doesn't have any special mutability
properties - they're just like the rest of us!
"""
In [1]: def generator():
...: result = [1, 2, 3, 4]
...: while True:
...: print "before", result
...: yield result
@loisaidasam
loisaidasam / lunch
Created Feb 13, 2017
CLI lunch place chooser, chosen randomly from a foursquare list
View lunch
#!/bin/bash
API_VERSION="20140401"
CLIENT_ID="YOUR CLIENT ID HERE"
CLIENT_SECRET="YOUR CLIENT SECRET HERE"
LIST_ID="YOUR LIST_ID HERE"
# or if you're in downtown Atlanta you could use mine, based on:
# https://foursquare.com/loisaidasam/list/hifi-lunch-eats--atl-edition
LIST_ID="5873b4bb0b56564a748ca1d5"
View tips_about_forms.md
  • an HTML form with 1 text input, and 0 submit inputs, will submit when u hit enter in the text input
  • an HTML form with > 1 text inputs and 0 submit inputs will NOT submit when u hit enter on any text input
  • an HTML form with any amount of text inputs, and 1 submit input, will submit when u hit enter on any input

TIL / FYI / TMYK

@loisaidasam
loisaidasam / README.md
Last active Nov 4, 2016
How to Javascript in 2016
View README.md

Here I was, all this time, thinking that JQuery was how people still did things.

Apparently Javascript has changed since I last looked, and things are simpler/more baked in.

Here are the new things:

Getting Elements

Where JQuery let you do:

@loisaidasam
loisaidasam / 1_problem_description.txt
Last active Nov 4, 2016
Befunge Email Decode Problem
View 1_problem_description.txt
Advice for Contacting Barak
Want to hire me? Send me an email. I read most things.
*Really* want to hire me? Get the output of this Befunge program for a priority address. I guarantee a response.
(Befunge rules here: https://en.wikipedia.org/wiki/Befunge)
@loisaidasam
loisaidasam / README.md
Last active Nov 1, 2016
Scraped Mitch Hedberg jokes
View README.md
@loisaidasam
loisaidasam / console.aws.amazon.com.js
Last active Oct 20, 2016
AWS Normalized instance hours cost using dot.js
View console.aws.amazon.com.js
/**
* Add actual cost in `Normalized instance hours` column
*
* Q: How do you calculate the Normalized Instance Hours displayed on the
* console ?
*
* On the AWS Management Console, every cluster has a Normalized Instance Hours
* column that displays the approximate number of compute hours the cluster has
* used. Normalized Instance Hours are hours of compute time based on the
You can’t perform that action at this time.