Skip to content

Instantly share code, notes, and snippets.

View eloyz's full-sized avatar
🎯
Focusing

Eloy Zuniga Jr. eloyz

🎯
Focusing
View GitHub Profile
@eloyz
eloyz / is_none.py
Last active August 29, 2015 14:05
Function that tests if all values in dictionary are a None type object
def is_none(d):
"""Returns True if dictionary contains
all None type objects
"""
for i in d.itervalues():
if i is not None:
return False
return True
@eloyz
eloyz / uri.js
Last active August 29, 2015 16:08 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@eloyz
eloyz / json_with_uuid_support.py
Last active November 6, 2015 16:27
JSON with UUID serialization support
from utils import json
from uuid import uuid4
json.dumps({'id': uuid4()})
@eloyz
eloyz / brzycki.py
Created September 26, 2016 15:43
Weightlifting: One rep max based on weight and repetitions
#!/usr/bin/env python3.5
# Brzycki in Python
# 1 Rep Max Formula
def brzycki(weight, reps):
"""One rep max formula based on weight."""
return int(weight) * (36 / (37 - int(reps)))
@eloyz
eloyz / code.py
Created December 5, 2016 16:08
Alexa Skill: Math Drills
"""
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well
as testing instructions are located at http://amzn.to/1LzFrj6
For additional samples, visit the Alexa Skills Kit Getting Started guide at
http://amzn.to/1LGWsLG
"""
from __future__ import print_function
from random import randint
@eloyz
eloyz / value-investing-tesla.md
Last active March 1, 2018 14:42
Value Investing Tesla Presentation

footer: @eloy, 2018 slidenumbers: true slidecount: true

Value Investing - Tesla

TSLA: 343.06