Skip to content

Instantly share code, notes, and snippets.

@ericbolo
ericbolo / test.ipynb
Created March 10, 2024 13:59
test.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ericbolo
ericbolo / test.py
Created March 10, 2024 13:55
Test gist
print("hello world")
@ericbolo
ericbolo / mean-stack-heroku.md
Last active June 12, 2022 17:32
Creating, configuring and deploying a MEAN stack app on heroku

Introduction

This is a step-by-step guide to:

  • Creating a MEAN app
  • Managing and configuring three environments: local, staging and production using heroku
  • Connecting the app to a remote MongoDB database
  • Binding the production server to a domain name
  • Implementing a login/register system via Oauth
@ericbolo
ericbolo / use-redis-linux.md
Last active September 26, 2016 11:09
Installing, configuring and using Redis on Ubuntu 16.04

Installation

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install -y tcl8.5
wget http://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
tar xzf redis-stable.tar.gz
make

make test

@ericbolo
ericbolo / linux-use-mongo.md
Last active September 26, 2016 10:53
Installing, configuring and using Mongod on Ubuntu 16.04

Introduction

This is a guide to installing, configuring and using MongoDB on localhost

Installation & boot configuration

  • Import public key

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

@ericbolo
ericbolo / ml-pandas.md
Last active December 31, 2023 19:43
pandas for machine learning in python
@ericbolo
ericbolo / machine-learning_sklearn.md
Last active September 8, 2016 21:33
ML with SciKit Learn

Introduction

This is a list of commands and tricks to fit and evaluate machine learning models using sci-kit learn.

Most of them are notes from this great video series by Kevin Markham: http://www.dataschool.io/machine-learning-with-scikit-learn/

Classification accuracy

from sklearn import metrics print metrics.accuracy_score(y, y_pred);

@ericbolo
ericbolo / fix-npm-module-mismatch
Created August 25, 2016 06:35
Fix npm module mismatch
sudo rm -dr ./node_modules
npm install
(Assumes you are using NVM, otherwise add "sudo" to above cmd)
@ericbolo
ericbolo / attenuator-cable.md
Last active August 28, 2016 15:56
Attenuator cable: stereo jack audio output to mono mic TSR jack.

Introduction

In the context of a speech-to-text/IoT project, I needed to capture the audio output of one device and feed it to the mic of my raspberry PI. This gist is stricly concerned with the hardware aspect. Since I wanted to capture speech, not music, I used only one channel of the stereo audio

Checklist

  • One 1 microfaraday capacitor
  • One 1 kilo ohm potentiometer
@ericbolo
ericbolo / pulseaudio-volume-meter.md
Created August 4, 2016 11:53
Visualize volume of sound devices with Pulse Audio and the pavumeter command

Introduction

This shows you how to see the live volume of sound devices on Linux. I've tested this on Raspbian Jessie.

Steps

Make sure PulseAudio is running

pulseaudio -D