Skip to content

Instantly share code, notes, and snippets.

View stanlee321's full-sized avatar

Stanley Salvatierra stanlee321

View GitHub Profile
@stanlee321
stanlee321 / gist:ea1e9eb0201b66d6dea6
Last active September 18, 2015 19:04
Old CBEffects Parameter Reference
-------------------------------------------------------
CBEffects Parameter Documentation
-------------------------------------------------------
This is the overwhelmingly large .txt file containing all of the parameters you can possibly put in a Data Table for CBEffects.
Includes parameters for CBEffects One, One and One-Fourth, One and One-Half, One and Three-Fourths, One and Four-Fifths, Two, Two and One-Fourth, Two and Two-Fifths, Two and Four-Ninths.
--------------------------------------------------------
--------------------------------------------------------
@stanlee321
stanlee321 / nnCostFunction.m
Created May 27, 2016 00:36 — forked from denzilc/nnCostFunction.m
Neural Network Cost Function
function [J grad] = nnCostFunction(nn_params, ...
input_layer_size, ...
hidden_layer_size, ...
num_labels, ...
X, y, lambda)
%NNCOSTFUNCTION Implements the neural network cost function for a two layer
%neural network which performs classification
% [J grad] = NNCOSTFUNCTON(nn_params, hidden_layer_size, num_labels, ...
% X, y, lambda) computes the cost and gradient of the neural network. The
% parameters for the neural network are "unrolled" into the vector
@stanlee321
stanlee321 / fft_convolution.py
Created April 17, 2017 20:03 — forked from thearn/fft_convolution.py
1D and 2D FFT-based convolution functions in Python, using numpy.fft
from numpy.fft import fft, ifft, fft2, ifft2, fftshift
import numpy as np
def fft_convolve2d(x,y):
""" 2D convolution, using FFT"""
fr = fft2(x)
fr2 = fft2(np.flipud(np.fliplr(y)))
m,n = fr.shape
cc = np.real(ifft2(fr*fr2))
cc = np.roll(cc, -m/2+1,axis=0)
@stanlee321
stanlee321 / live_loss_plot_keras.ipynb
Created December 19, 2017 21:07 — forked from stared/live_loss_plot_keras.ipynb
Live loss plot for training models in Keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stanlee321
stanlee321 / boto_dynamodb_methods.py
Created June 22, 2018 01:05 — forked from martinapugliese/boto_dynamodb_methods.py
Some wrapper methods to deal with DynamoDB databases in Python, using boto3.
# Copyright (C) 2016 Martina Pugliese
from boto3 import resource
from boto3.dynamodb.conditions import Key
# The boto3 dynamoDB resource
dynamodb_resource = resource('dynamodb')
def get_table_metadata(table_name):
@stanlee321
stanlee321 / camerasettings.sh
Created July 6, 2018 04:20 — forked from justinledwards/camerasettings.sh
Camera settings on v4l2
#!/bin/bash
v4l2-ctl -c brightness=0
v4l2-ctl -c contrast=120
v4l2-ctl -c white_balance_temperature_auto=0
v4l2-ctl -c gamma=120
v4l2-ctl -c white_balance_temperature=4700
v4l2-ctl -c sharpness=100
v4l2-ctl -c backlight_compensation=0
v4l2-ctl -c focus_absolute=10
v4l2-ctl --list-ctrls-menus
@stanlee321
stanlee321 / createTable.py
Created July 12, 2018 17:02 — forked from svmotha/createTable.py
Check if DynamoDB table already exists and create one if it doesn't
import boto3
class tableCreate(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
# Query client and list_tables to see if table exists or not
def queryCreate(self):
# Instantiate your dynamo client object
client = boto3.client('dynamodb')
@stanlee321
stanlee321 / ASS.md
Created July 22, 2018 18:23 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@stanlee321
stanlee321 / get_machine_learning_wages_on_odesk.py
Created August 14, 2018 06:12 — forked from johnjosephhorton/get_machine_learning_wages_on_odesk.py
Get the hourly wages of machine learning contractors on oDesk
# John Horton
# www.john-joseph-horton.com
# Description: Answer to Quora question about machine learning hourly rates
# "http://www.quora.com/Machine-Learning/What-do-contractors-in-machine-learning-charge-by-the-hour"
from BeautifulSoup import BeautifulSoup
import urllib2
def contractors(skill, offset):
@stanlee321
stanlee321 / object_detection_API_dependencies.sh
Created August 22, 2018 16:29 — forked from Tony607/object_detection_API_dependencies.sh
DIY Object Detection Doodle camera with Raspberry Pi | DLology
sudo apt install libatlas-base-dev protobuf-compiler python-pil python-lxml python-tk
pip3 install tensorflow