Skip to content

Instantly share code, notes, and snippets.

View mfcardenas's full-sized avatar
😁

Marlon Cárdenas mfcardenas

😁
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mfcardenas
mfcardenas / free-space-on-boot-disk.md
Created April 11, 2018 00:49 — forked from jbgo/free-space-on-boot-disk.md
Free up space on /boot disk (ubuntu)

Free disk space when /boot is full (Ubuntu)

TL;DR

dpkg -l linux-image*
uname -r
sudo apt-get remove linux-image-2.6.32-{21,37,38,39,40,41,42,43,44}-server
sudo apt-get autoremove
@mfcardenas
mfcardenas / rest-server.py
Created June 2, 2017 18:18 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask.ext.httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@mfcardenas
mfcardenas / install.sh
Created March 13, 2017 00:33 — forked from domderen/install.sh
Installation of apache spark on ubuntu machine.
#!/bin/sh
# installation of Oracle Java JDK.
sudo apt-get -y update
sudo apt-get -y install python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
sudo apt-get -y install oracle-java7-installer
# Installation of commonly used python scipy tools
@mfcardenas
mfcardenas / main.cpp
Created June 7, 2016 15:46 — forked from nikotan/main.cpp
face detection sample code for OpenCV
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/ml.h>
void doMosaic(IplImage* in, int x, int y,
int width, int height, int size);
int main (int argc, char **argv)
{
int i, c;
import sys, cv2
# Refactored https://realpython.com/blog/python/face-recognition-with-python/
def cascade_detect(cascade, image):
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
return cascade.detectMultiScale(
gray_image,
scaleFactor = 1.15,
minNeighbors = 5,
@mfcardenas
mfcardenas / display-cv-image-using-matplot.ipynb
Created May 27, 2016 13:18 — forked from ayang/display-cv-image-using-matplot.ipynb
display opencv image using matplotlib in ipython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.