Skip to content

Instantly share code, notes, and snippets.

View ElHacker's full-sized avatar
🥽

Braulio Chavez ElHacker

🥽
View GitHub Profile
@ElHacker
ElHacker / __init__.py
Last active March 15, 2018 09:11
Python-for-android opencv 3.4.1 Recipe
import os
import sh
from pythonforandroid.toolchain import (
NDKRecipe,
Recipe,
current_directory,
info,
shprint,
)
from multiprocessing import cpu_count
@ElHacker
ElHacker / svm.py
Created April 19, 2020 06:23
SVM classifier Non-vectorized and Vectorized versions
def svm_loss_naive(W, X, y, reg):
"""
Structured SVM loss function, naive implementation (with loops).
Inputs have dimension D, there are C classes, and we operate on minibatches
of N examples.
Inputs:
- W: A numpy array of shape (D, C) containing weights.
- X: A numpy array of shape (N, D) containing a minibatch of data.
# aliases for git
alias gs="git status"
alias gh="git h"
alias gha="git ha"
alias gd="git diff"
alias gds="git diff --staged"
alias gai="git add -i"
alias gpo="git push origin master"
alias gcm="git commit -m"
alias gap="git add -p"
[user]
email = <your-email>
[alias]
h = log --pretty=format:'%Creset%C(red bold)[%ad] %C(blue bold)%h %Creset%C(magenta bold)%d %Creset%s %C(green bold)(%an)%Creset' --graph --abbrev-commit --date=short
ha = log --pretty=format:'%Creset%C(red bold)[%ad] %C(blue bold)%h %Creset%C(magenta bold)%d %Creset%s %C(green bold)(%an)%Creset' --graph --all --abbrev-commit --date=short
[push]
default = simple