Skip to content

Instantly share code, notes, and snippets.

View TheMushrr00m's full-sized avatar
🔥
learn, code and grow.

Gabriel Cueto TheMushrr00m

🔥
learn, code and grow.
View GitHub Profile

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

@TheMushrr00m
TheMushrr00m / matrix_mod.py
Created April 24, 2018 05:50
Simple modification of the Matrix class used at La Espora del Hongo blog posts.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# author: Gabriel Cueto <TheMushr00m - @Mushr00m_Dev>
class Matrix(object):
_n = 0
_m = 0
_elems = None
@TheMushrr00m
TheMushrr00m / roundRobin.py
Created November 29, 2017 06:32 — forked from Makistos/roundRobin.py
A round-robin algorithm implementation written in Python. #round-robin #scheduling #algorithm #python
#!/usr/bin/python
div1 = ["Lions", "Tigers", "Jaguars", "Cougars"]
div2 = ["Whales", "Sharks", "Piranhas", "Alligators"]
div3 = ["Cubs", "Kittens", "Puppies", "Calfs"]
def create_schedule(list):
""" Create a schedule for the teams in the list and return it"""
s = []
@TheMushrr00m
TheMushrr00m / facepass.py
Created June 26, 2017 16:04 — forked from rishimukherjee/facepass.py
Example of use of SimpleCV. This creates a face recognized password.
#!/usr/bin/python
import time
from SimpleCV import Color, Image, np, Camera
cam = Camera() #initialize the camera
quality = 400
minMatch = 0.3
try:
password = Image("password.jpg")
@TheMushrr00m
TheMushrr00m / cv2_detect.py
Created June 26, 2017 09:02 — forked from npinto/cv2_detect.py
Simple face detection with OpenCV 'cv2' python bindings from 2.4.x
import cv2
import cv2.cv as cv
def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml',
scaleFactor=1.3, minNeighbors=4, minSize=(20, 20),
flags=cv.CV_HAAR_SCALE_IMAGE):
cascade = cv2.CascadeClassifier(cascade_fn)
rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor,
@TheMushrr00m
TheMushrr00m / introrx.md
Created June 13, 2017 06:41 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@TheMushrr00m
TheMushrr00m / INSTALL.md
Created April 21, 2016 18:07 — forked from namuol/INSTALL.md
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

# encoding: utf8 1,1 Top# encoding: utf8
import argparse
from datetime import datetime
import json
from random import randint
import requests
import sys
from time import sleep
@TheMushrr00m
TheMushrr00m / beautiful_idiomatic_python.md
Created April 3, 2016 00:36 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]: